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.
###

Advertisements
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

Need to upgrade to Windows 10 from Windows 7? Here’s how.

There’s a free install tool available:

https://www.microsoft.com/en-us/software-download/windows10?ranMID=24542&ranEAID=IokOf8qagZo&ranSiteID=IokOf8qagZo-wOLnPoljLIoD6Lmwh3dggQ&epi=IokOf8qagZo-wOLnPoljLIoD6Lmwh3dggQ&irgwc=1&OCID=AID2000142_aff_7593_1243925&tduid=%28ir__vwawxyeicokftmxnkk0sohzlxe2xnv3t6tozooix00%29%287593%29%281243925%29%28IokOf8qagZo-wOLnPoljLIoD6Lmwh3dggQ%29%28%29&irclickid=_vwawxyeicokftmxnkk0sohzlxe2xnv3t6tozooix00?ranMID=24542&ranEAID=IokOf8qagZo&ranSiteID=IokOf8qagZo-wOLnPoljLIoD6Lmwh3dggQ&epi=IokOf8qagZo-wOLnPoljLIoD6Lmwh3dggQ&irgwc=1&OCID=AID2000142_aff_7593_1243925&tduid=%28ir__vwawxyeicokftmxnkk0sohzlxe2xnv3t6tozooix00%29%287593%29%281243925%29%28IokOf8qagZo-wOLnPoljLIoD6Lmwh3dggQ%29%28%29&irclickid=_vwawxyeicokftmxnkk0sohzlxe2xnv3t6tozooix00#link=%7B%22role%22:%22standard%22,%22href%22:%22https://click.linksynergy.com/deeplink?id=IokOf8qagZo&mid=24542&murl=https%3A%2F%2Fwww.microsoft.com%2Fsoftware-download%2Fwindows10%22,%22target%22:%22_blank%22,%22absolute%22:%22%22,%22linkText%22:%22Download%20Windows%2010%22%7D&u1=xid:fr1590872226102gah

Click the link above.

###

Posted in Commentary | Leave a comment

#COVID19 Math: Five ways the virus spread so fast, plus 12 ways to operate economies & governments while socially distancing.

Woman coughing while out shopping

The demand for closures of businesses and government operations was supported with sobering statistics relating to the fact that infected people can spread COVID-19 to a lot of other people during the approximately ten to twenty days that it takes symptoms to show up.

Let’s run some numbers, shall we?

  1. Court – If one person goes to the podium to render their plea, and sheds viruses, the podium might be touched by approximately 150 people throughout a misdemeanor calendar call, and approximately twenty to fifty people for a felony docket list.
    – How many family members does each defendant have? Co-workers?
  2. Government Meetings – If a person circulates throughout a room filled with seats and shakes hands, and touches the door and/or speaker’s podium, then anywhere between twenty and two hundred people could be exposed. While the speaker’s podium itself is technically less of a risk, those who do speak tend to socialize more, and the air inside these meeting rooms can go unfiltered for anywhere between one to six hours.
    – How many people attend these meetings? If it’s something important like the budget and tax rates, the room can be filled and overflowing to the point that there are 200 people crammed in like sardines and the Fire Marshal is stepping in to boot folks out.
    – Now, how many people do attendees interact with during and after meetings?
  3. Office Buildings – If you ever visit those forty-story buildings in Atlanta (or worse, the real high-rise buildings in NYC), each of those floors are kitted out by companies leasing the space for the purpose of maximizing the use of the space. Each floor might have, at the most, 100 people on it working, visiting, or doing business on that floor throughout the day.
    – How many people can each person in that building infect?
  4. Fast Food Restaurants – Hamburger retailers can easily accommodate about a dozen customers in a drive-thru lane per hour. With dining room sales, it can add up to twenty people per hour. Morning rush? Count on hundreds of visitors to show up in a few hours.
    – If a cashier is sick, how is it even possible to track down the subsequently-infected people?
    – How many customers actually wash their hands after using a restroom? Employees?
  5. Grocery Stores – By far one of the scariest places during a pandemic. Thousands of people circulate through grocers’ buildings each day, and no one is immune from hunger. The more profitable the store, the more people are thought to visit [and make purchases]. It is nigh impossible to prevent someone from coughing in common areas, where the flow of air throughout the store could be unfiltered and have unpredictable consequences.
    – How many products are not easily disinfected? How many times are these touched?
    – How many times does the average customer visit grocery stores during a week?

While governments reacted and ordered shut-downs, it was still too late; it is ultimately up to the public to do the right thing; disruptions to both business and government operations can be kept to a minimum while social distancing is used to stay safe – here are twelve ideas:

  1. Video Chat – Video chat software is used at jails, ATMs, music lessons… the list goes on. IDs can be easily verified via scanners such as the ones on the new Georgia Tag Renewal kiosks. We should be able to access government services at secure kiosks / work centers. Chat services can trim $1,000+ per worker per year from expenditures.
  2. Document / Book Scanners – If you visit any modern law library, the scanners are impressive; the scanning speed and size of the resulting PDF files leave paper-based systems in the history books. Kiss mailing & copy costs, and processing delays, goodbye.
  3. Internet Forms– Evictions, small claims, and civil courts currently use remote technologies similar to the federal district courts’ PACER and CM/ECF which accept documents over the Internet. Businesses can make use of similar technology to manage documents, projects, and work teams. Wave goodbye to processing delays and costs.
  4. ATM Payment Kiosks – Automatic Teller Machines should be enabled to send or deposit money into accounts held by businesses and government entities. Child Support offices in Georgia now use the technology, as do detention facilities. Tax bills should be payable at ATMs nationwide, and accept credit card, debit, and cash payments. Staff time can be used for real work instead of shuffling stacks of paper and hand-writing receipts.
  5. Pick and Place teller windows for retailers – Pharmacies use this method to pull stock and deliver prescriptions within half an hour. Restaurants and retail stores are finally climbing aboard this via their in-house apps and website order / curbside pickup systems. For warehouse retailers with larger facilities, department-specific staff can do the picking and place items into robotic carts (a few distribution warehouses do this already).
  6. Online Chat – Chat apps used apply to police departments, government agencies, and courthouses with dedicated chat apps offering an alternative to a telephone conversation – this method of communication allows the Deaf easier access to services.
  7. Expanded Use of Courier Services – Your local pizza and Chinese food shops offer local delivery on demand. Nearly every county court system makes use of a dedicated team of local process servers, too. More businesses need to offer delivery, with couriers offering local delivery from any business near a customer’s designated delivery location.
  8. One Application for All Social Benefits – There should not be a separate paper application for each social benefit. A single application (with supplemental data provided only when circumstances require it) could reduce required contacts with agencies. Tax return data could be used to pre-qualify benefits applicants within an hour. Reducing the waste of time to filling out numerous forms can save a family between 10 and 20 hours of time, while saving governments and NGOs thousands of dollars on staff time used to enter data from written forms into computers.
  9. Free the Education – Self-study modules including lecture videos and interactive testing are currently in use at large companies to train thousands of employees each year. College courses at public institutions should be offered the same way, free of charge, except for costs of supplies, books, certification tests, and hands-on work such as laboratory work. Options towards upward mobility tend to have a positive effect on economies.
  10. Expand Access to Care – When people run into stress, especially when coping with a novel situation, lives can be destroyed quickly. One bad day, week, or month can cost someone everything they’ve ever earned. Access to care can enable a person to recover quickly. If people want to buy into the Medicare / Medicaid care system, then they should be able to qualify without delay, and be offered a sliding scale buy-in rate.
  11. Smart Justice Saves Lives – Police and prosecutors should focus less on conviction rates and more on benefits to society. Actual innocence proven should result in vacated charges. Drug use should be treated as a medical issue. Dealers of drugs should be offered entry into rehabilitation to earn their way back into legitimate employment, with tax benefits offered in return for hiring those seeking rehabilitation. Police should receive more education instead of being thrown to the streets with minimal instruction. Prisoners should earn market rate for work, with reparations due to victims being paid into a fund that pays victims directly while collecting payments from those owing reparations. Each person who is not jailed unnecessarily contributes anywhere between $10k to $60k to the economy each year. Further, jail time can cost the tax base $40+ per detained person each day, whereas probationers pay fees and their own living costs. Savings: millions of dollars.
  12. Paying Taxes Should Result in Tangible Benefits – Business owners should be able to opt into public directories within the service areas that they pay taxes in, so customers gain access to the full local marketplace. Further, agency service requests could be done via apps that generate and/or use PDFs & file management systems in lieu of reams of paper. Savings: tens of thousands of dollars.

These twelve ideas as presented could theoretically help improve access to business and government services. They are simply ideas presented in the hope of opening a possible path to recovery; it is possible to stay safe and have easy, fast, and efficient access to businesseses, governments, and sources of income. What do you think?

Hope this helps!
###

Posted in Apps, Atlanta, Business, Businesses, Cartoons, Civil & Human Rights, Clip Art, Cobb County, Commentary, Courts / Justice, Crime & Punishment, Economy, Finance, Government, Health, Health / Medicine, Housing, How to Save Money, Images, Law Enforcement, Locations, News, OpEd / Misc., Politics, Programming, Stock Cartoons, Tech News, Technology, The Etc Box | Tagged , , , , , | Leave a comment