Elenco codici paese Locale Languagecode LCIDstring LCIDDecimal LCIDHexadecimal Codepage Afrikaans af af 1078 436 1252 Albanian sq sq 1052 1250 Amharic am am 1118 Arabic – Algeria ar ar-dz 5121 1401 1256 Arabic – Bahrain ar ar-bh 15361 1256 Arabic – Egypt ar ar-eg 3073 1256 Arabic – Iraq ar ar-iq 2049 801 1256 Arabic…
Leggi tutto
edit or create the rc.local file:
1 |
sudo nano /etc/rc.local |
1 2 3 4 5 |
#!/bin/bash <your_program>.sh exit 0 |
make rc.local executable:
1 |
sudo chmod +x /etc/rc.local |
edit /etc/systemd/system/rc-local.service:
1 |
sudo nano /etc/systemd/system/rc-local.service |
add this content to rc.local.service:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# SPDX-License-Identifier: LGPL-2.1+ # # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # This unit gets pulled automatically into multi-user.target by # systemd-rc-local-generator if /etc/rc.local is executable. [Unit] Description=/etc/rc.local Compatibility Documentation=man:systemd-rc-local-generator(8) ConditionFileIsExecutable=/etc/rc.local After=network.target [Service] Type=forking ExecStart=/etc/rc.local start TimeoutSec=0 RemainAfterExit=yes GuessMainPID=no [Install] WantedBy=multi-user.target |
enable rc.local by service:
1 |
sudo systemctl enable rc-local.service |
start rc.local by service:
1 |
sudo systemctl start rc-local.service |
check the rc.local status:
1 |
sudo systemctl status rc-local.service |
create file rc.local :
Xtumble è una suite di prodotti per gestire l’intero flusso di dati della tua azienda in modo organico e strutturato. – E-commerce attivo in pochi minuti – Sincronizzato con lo shop di Facebook – Condividi progetti con i tuoi clienti e fornitori con il modulo B2B Guarda una demo di registrazione https://www.youtube.com/watch?v=6sq8ITTWE30 Provalo senza impegno,…
Leggi tutto
RadStudio 10.4 è una release che promette grandi cose in tutte le aree di questo fantastico ambiente di sviluppo. Facendo un primo giro di test abbiamo notato: Nelle applicazioni FMX abbiamo notato un notevole miglioramento del render dei caratteri Il nuovo sistema LSP (language server protocol) sembra aver reso l’IDE ancora più fluido e produttivo…
Leggi tutto
Hide element on click outside, is a must-have functionality for the dropdown menu. Apart from that, it also used in some situations where you need to hide div when the user clicks outside of this element. You can easily hide div or element when click outside of it using jQuery. In the example code snippet,…
Leggi tutto
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
TThreadedMsgEvent = class( TThread ) private FLock : TCriticalSection; FStr : TQueue<String>; FMemo : TMemo; function GetEvent : String; protected procedure Execute; override; public procedure AddEvent( aMsg : String ); constructor Create( AMemo: TMemo ); destructor Destroy; override; end; implementation { TThreadedMsgEvent } procedure TThreadedMsgEvent.AddEvent(aMsg: String); begin FLock.Acquire; FStr.Enqueue( FormatDateTime('DD/MM/YY HH:NN:SS.ZZZ',Now)+ ' : '+ aMsg ); FLock.Release; end; constructor TThreadedMsgEvent.Create(aMemo: TMemo); begin inherited Create(True); FreeOnTerminate := False; FOnMessage := ACallBack; FStr := TQueue<String>.Create(); FLock := TCriticalSection.Create; FMemo := aMemo; Resume; end; destructor TThreadedMsgEvent.Destroy; override; begin FreeAndNil( FStr ); FreeAndNil( FLock ); end; procedure TThreadedMsgEvent.Execute; begin while not Terminated do begin try if (FStr.Count > 0) then begin if Assigned( aMemo ) then begin TThread.synchronize( procedure begin FMemo.Lines.Add( GetEvent ); end; ); end; end; except end; TThread.Sleep(1); end; end; function TThreadedMsgEvent.GetEvent: String; begin FLock.Acquire; result := FStr.Dequeue; FLock.Release; end; |
From post found at: https://stackoverflow.com/questions/17506615/how-to-handle-log-in-a-threaded-manner-in-delphi