Skip to content

Instantly share code, notes, and snippets.

View vgartner's full-sized avatar

Vilson Cristiano Gärtner vgartner

View GitHub Profile
@vgartner
vgartner / uImageLoader.pas
Created February 27, 2020 11:19 — forked from dkstar88/uImageLoader.pas
A ImageLoader for FireMonkey TImage component. I written this when I found I need to load a few images from the Internet. Obviously delphi isn's browser, if I just call download using Indy it will just block my app's UI. ImageLoader is very simple class with a loading queue, and a timer to trigger the work on the queue. You just need to call the…
unit uImageLoader;
interface
uses SysUtils, Classes, System.Generics.Collections,
FMX.Types, FMX.Objects, FMX.Controls, AsyncTask, AsyncTask.HTTP;
type
TLoadQueueItem = record
ImageURL: String;
@vgartner
vgartner / formatDate.js
Created January 29, 2016 17:39 — forked from cstipkovic/formatDate.js
A simple format Date function using Javascript prototype
/*
Based on Rick Strahl code
http://www.west-wind.com/weblog/posts/2008/Mar/18/A-simple-formatDate-function-for-JavaScript
Contributors:
Clauber Stipkovic - @clauberhalic
Mário Rinaldi - @MarioRinaldi
*/
Date.prototype.formatDate = function (format) {