Xojo 2019r3.2 – Drag and Drop Custom Control Set

This is for Web platform projects. Watch the control work in the image below:

This is the drag and drop control set in action.

Download the project here: Click this link for a direct download!

What this project does is use a set of WebContainerControl controls to accept and allow for dragging – although the actual act of dragging is not supported, I used the Event Handler code for MouseDown on a “row” control to send the pertinent data (WebStyle, Label1.Text, control name, parent name, and Enabled status) to the webpage named q’s properties. Then on the Drop event handler for the q’s designated drop box, I triggered a Method contained in the control’s Super form (that is, the container control that exists before it is dragged into q).

The Method then harvests the data from q’s set of properties, embeds a “row” container as a new container control instance, and disables the dragged control within its parent container.

The disabling of the control within a parent container was done by assigning the parent’s name and the dragged control’s name to a property reserved for that within the webpage named q.

To indicate to the user that controls were disabled, I created copies of each of the styles used in the set of controls and altered the opacity of the copies, showing a faded-out look when the control that was dragged is “used.”

I hope this helps!

Advertisements
Posted in Commentary | Tagged , , | Leave a comment

#DOGE nearly doubles price in one week (7/7/2020)

As of 10:00 am, 7/8/2020, the price was .0039 on https://finance.yahoo.com/quote/DOGE-USD/ – the price was holding steady for a while at approximately .0023 and then a sharp rise in price occurred.

Digging through the five-year history of prices reveals that June / mid-July dates trend towards price rises.

If you look at the pattern of prices before and after Dec 31, 2017 (this is when the biggest leap – from .001 to .017 – of 1,700% – happened) – you will see that the new floor ended up being significantly higher.

Does this mean that DOGE will be approaching two cents this year? Possibly.

DOGE’s strength lies in the fact that it is nowhere near a dollar in cost, meaning that people can pay each other for micro-transactions at a fraction of the cost that a traditional payment processor would charge. Converting from cryptocurrency to fiat currency, however, comes at a steep price that could be ten percent of the exchanged amount. Until those costs are brought down, cryptocurrencies’ usage will not be as popular as credit and debit card processing.

– June 8, 2020
###

Posted in Business, Economy, Finance, Financials, News, OpEd / Misc., Politics, Tech News, Trend Watch | Tagged , , , | Leave a comment

Blog Migration – survive old tweet link doom via .htaccess code!

I write this from experience – regarding this very blog.

When I moved my blog from [BigName Company] to a specialty host, I had literally thousands of references to my site, mostly to my listing of DDS license office locations.

I discovered an easy solution – craft an .htaccess file with the following code:

Options +SymLinksIfOwnerMatch 
RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . https://www.InsertNewSiteNameHere.com [L]

What this does is refer literally every unresolved link / file directly to the new blog address.

It’s a quick fix with ZERO finesse, but is totally worth it considering that visitors hate nothing more than a 404 error without any referrals to the new site.

If this has helped you, you might find more helpful things on the Twitter account:

Hope this helps!
###

Posted in #QuickTip, Business, Commentary, Help Me Understand, News, Programming, Social Media, Tech News, Tech Support, Technology, Web Dev, Web Dev | Tagged , , , , , , | Leave a comment

Xojo Web Apps: 2018r3 upload code that works.

View of the UploadComplete method, as shown in Isolation Mode.

It took me two days to track down file uploading code that actually works, and it was embedded within one of the demo apps available with each release.

I tried code from the documentation and even tried the offline help files. No dice.

The difference between the help files and the example project is that file and Files() are used in the help files code whereas Files() alone is used in the example project. Files() is the already-declared array of files that someone has uploaded and they are ready to be saved onto disk space. Within the help files, the variable file is undeclared (there is no code declaring files to be a variable) while during runtime, files is to be treated as an array.

The net result is that the help files code throws errors while the project code as found within the example projects works fine.

The code as presented below should be in the FileUploader control’s UploadComplete event handler.
It runs when a button or other control calls the FileUploader’s Upload method.

Dim source As Picture
Dim pFile As FolderItem

Dim uFolder As FolderItem
uFolder = GetFolderItem(“Uploads”)

If Not uFolder.Exists Then
uFolder.CreateAsFolder
End If
For i As Integer = 0 To UBound(files)
Try
source = Picture.FromData(files(i).Data)

// Create a file on the server
pFile = uFolder.Child(files(i).Name)

source.Save(pFile, Picture.SaveAsPNG)
Catch e As UnsupportedFormatException
Continue // Skip this file
End Try
Next

Source: Xojo – Examples > Web > Controls > WebFileUploader

NOTE: This code uses the syntax of version 2018r3 – An update was released changing the preferred declaration of variable command to Var from Dim. While Dim is not completely obsolete, it is depreciated.

~ This 27th of June, 2020.
###

Posted in Apps, Images, News, Programming, Programming, ScreenShots, Software, Tech News, Technology, Xojo | Tagged , , , , , , , , | Leave a comment

The curious case of COVID-19 and transit: things run efficiently!

It has been a running joke that the CCT 30 is consistently 30 minutes late. Some people have lost their jobs due to that route being both unpredictable & behind schedule. Today, it was different. The bus was quick & efficient, and people entered & exited the bus without delays.

I rode two separate buses, and, arguably, this is the first time in thirteen years that transit was actually easy to use. It was almost as fast as using a private vehicle. Almost.

So, what’s the difference between today & thirteen years of experience? Money.

COVID-19 sparked a number of changes, one of them being that businesses are less inclined to handling cash, and public transit systems are no different than govt departments and retail shops. Cobb County’s transit system followed suit and the end result is an amazing way to protect drivers while ensuring that riders receive excellent service — it eliminated fares.

Fares comprise only eighteen percent of Cobb County’s transit system budget – not exactly a drop in the bucket, but a small enough percentage that eliminating fares as a whole and raising taxes just a wee bit would boost the local economy and ensure that the impoverished would have one less barrier to things like work, food, and health care.

Those who stand to benefit the most from a fareless arrangement would be the working poor. It’s no joke to pay $5 per day for the commute to and from work – it adds up to $25 for five days, which roughly adds up to $100 per month. That’s a lot of money to anyone making close to minimum wage. Now tack on the cost of running a basic errand, or three or four errands.

There’s another cost that no one anticipated: time. How much time do reduced fare applicants spend each year renewing their reduced-fare passes, or better yet, dealing with malfunctioning fare boxes. And then there are the diggers – folks digging through pockets and bags for spare change, kinda like the person still sitting stopped and the light has been green for an agonizing several seconds. And then you get those who step on the bus and hold everything up to panhandle for fare money. Even those digging through their pocket for fare cards cost time.

And then there is crime. How much in resources does it cost to go after fare-jumpers? Large police departments like NYPD would have to actually fight real crime for a change if fares were eliminated. The net result of that would be less churn in the courts, and fewer resources needed to prosecute people, plus fewer opportunities for people to steal when folks do not have to dig money out of their wallets.

Part of the carceral culture involves daily socialization through barriers, bars, gates, and costs. It’s time to dismantle the carceral culture, partly by removing gates, bars, and fares. If we want a truly open economy, with opportunities available to all, then what we should want is easier and quicker access to transportation. One giant step for the public benefit, with one change.

How much money is spent on fare boxes, fixing fare collection equipment, securing gates against those who cannot afford fare, and the same for buses? That’s a huge chunk of the budget. Perhaps the best route to efficiency is not spending dollars to go after cents?

###

Posted in Activism / Advocacy, Business, Commentary, Crime & Punishment, Crime Beat, Cultures, Department of Transportation, Economy, Finance, Government, How to Save Money, News, OpEd / Misc., Policy Watch, Politics, Public Transit, The Etc Box, Trend Watch | Tagged , , | Leave a comment