Via Cà Matta 2 - Peschiera Borromeo (MI)
+39 02 00704272
info@synaptica.info

Blog

Digital Innovation Partner

Orace Tips – Recursive query

select PK_ID from USERS start with FK_USER_PARENT = PK_USER connect by prior PK_ID = FK_USER_PARENT;

Delphi – Int to Hex and Hex to Int

int2hex example in delphi: var str : string; // hex value b : byte; begin b := 15; str := system.sysutils.inttohex(b,2); end; // the result in str will be : ‘0F’ hex2int example: var strHexVal : string; // hex value intVal : integer; begin strHexVal := ‘0F’; intVal := StrToInt(‘$’ + strHexVal); end; // the…
Leggi tutto

Synaptica @office

Delphi Firemonkey manage VirtualKeyboard on mobile applications

In Firemonkey you can manage the virtualkeyboard on your mobile applications. if you need that the keyboard not autoshow in your application when a text box is selected you can add this code: // uses FMX.Types // you can set TVKAutoShowMode = (DefinedBySystem, Never, Always); FMX.Types.VKAutoShowMode :=TVKAutoShowMode.vkasNever; obviusly to enable the virtual keyboard: // uses…
Leggi tutto

Get GPS coordinates (latitude and longitude) from address in Java

public static Map getLatitudeLongitudeByAddress(String completeAddress) { try { String surl = “https://maps.googleapis.com/maps/api/geocode/json?address=”+URLEncoder.encode(completeAddress, “UTF-8”)+”&key=”+API_KEY; URL url = new URL(surl); InputStream is = url.openConnection().getInputStream(); BufferedReader streamReader = new BufferedReader(new InputStreamReader(is, “UTF-8”)); StringBuilder responseStrBuilder = new StringBuilder(); String inputStr; while ((inputStr = streamReader.readLine()) != null) responseStrBuilder.append(inputStr); JSONObject jo = new JSONObject(responseStrBuilder.toString()); JSONArray results = jo.getJSONArray(“results”); String lat =…
Leggi tutto

Build your own HTTPS server with Delphi – Open SSL Example

Assuming that you know how to make a web server with TidHttpServer, but now you need to put your server in HTTPS, so to do that you need to add to your application the TIdServerIOHandlerSSLOpenSSL and set it as the IOHandler of your TidHTTpServer. IMG IOHANDLER Now you need a valid and unique certificate, to…
Leggi tutto