Saturday, May 8, 2021

Unicode @ Bellard TCC as console app finally



TCC @ Windows 10 tips:

#include <fcntl.h>
#include <io.h>
#include <stdio.h>

int main(void) {
    wchar_t str[80];
    int i;
    setmode(_fileno(stdout), _O_U16TEXT);
    setmode(_fileno(stdin), _O_U16TEXT);
    wprintf(L"\x043a\x043e\x0448\x043a\x0430 \nđšđšđ77ђшђшђшђшђ");
    wscanf(L"%ls", str);
    wscanf(L"%d", &i);
    wprintf(L"I am a %ls ,and I have %d year.\n", str, i);
    return 0;
}

//I am very happy about TCC unicode, are you too ?
//Using of: tcc-0.9.27-win64-bin.zip installation


//Lean Mean Coding Machine



I have already managed to set up to use TCC to read from a SQLITE table and write to a text file, but this is much more effective, isn't it ?
You can now use SQLITE in addition to entering and printing text.


And you can try this too:

const wchar_t * wstring = L"some wide string";
wprintf( L"%s\n", wstring );

wchar_t wideChar = 0x1234;
wprintf( L"hex: %04X  char: %c\n", wideChar, wideChar );

Secure your Network with OpenDNS:




Linux tips:


Homebrew Cask extends Homebrew and brings its elegance, simplicity, and speed to the installation and management of GUI macOS applications such as Atom and Google Chrome.

We do this by providing a friendly CLI workflow for the administration of macOS applications distributed as binaries.

$ brew install alfred
==> Downloading https://cachefly.alfredapp.com/Alfred_4.2.1_1187.dmg
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'alfred'.
==> Installing Cask alfred
==> Moving App 'Alfred 4.app' to '/Applications/Alfred 4.app'.
🍺  alfred was successfully installed!
And there we have it. An application installed with one quick command: no clicking, no dragging, no dropping.


$

ls -latr

  1. l - long list  
  2. a - include hidden files 
  3. r - reverse order 
  4. t - sort by time 

  5. $
  6. lspci -k

  7. ++



Friday, May 7, 2021

CMD magic for masses

 systeminfo > C:\temp\SystemID.txt

wmic /output:C:\temp\InstalledPrograms.txt product get name,version

rem --------------------

wmic memorychip list full

wmic diskdrive list full

wmic baseboard list full

wmic cdrom list full

pause

rem --------------------

path "C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\"

acrord32 /p /h d:\20200122082625.pdf

rem --------------------

wmic /output:C:\temp\InstalledPrograms.txt product get name,version

rem --------------------

start iexplore "https://www.google.com/"

start msedge "https://www.google.com/"

start chrome "https://www.google.com/"

rem --------------------


C and Unicode:

#include <fcntl.h>
#include <io.h>
#include <stdio.h>

int main(void) {
    setmode(_fileno(stdout), _O_U16TEXT);
    wprintf(L"\x043a\x043e\x0448\x043a\x0430 \x65e5\x672c\x56fd\n");
    return 0;
}











Tuesday, May 4, 2021

Web Servers and stuffs

Mislite da sve znate o programiranju i kompjuterima, razmislite još jednom. 

https://www.easyphp.org/

https://www.tutorialspoint.com/html5/html5_web_sql.htm

https://www.proxmox.com/en/

++

PDF Workshop @ Windows 10

www.reducepdfsize.com


https://pdfsam.org/


http://www.rw-designer.com/picture-resize


Picture Resizer 6.0 @ Windows 10

---

Retrieve all HW information @ Linux Lite:


Microsoft C# @ Linux:

https://www.tutorialspoint.com/executing-chash-code-in-linux

https://docs.microsoft.com/en-us/dotnet/core/get-started

dotnet new console --output sample1 dotnet run --project sample1






CMD magic @ Windows 10:

wmic /output:C:\temp\InstalledPrograms.txt product get name,version


Chapters: 00:00 Why install/re-install Windows 00:19 Downloading ISOs, classic and TYC edition 02:11 The best way to activate Windows 03:29 Creating a installer USB with RUFUS 04:43 How to boot onto a USB drive 06:08 Windows setup 07:34 Creating a custom ISO 13:20 Conclusion

Media creation tool: https://www.microsoft.com/en-au/softw... Rufus here: https://rufus.ie/ MSMG Toolkit: https://msmgtoolkit.in/

++


PHP World:


PHPWord is installed via Composer. To add a dependency to PHPWord in your project, either

Run the following to use the latest stable version

    composer require phpoffice/phpword

or if you want the latest master version

    composer require phpoffice/phpword:dev-master

You can of course also manually edit your composer.json file

{
    "require": {
       "phpoffice/phpword": "v0.16.*"
    }
}


Thursday, April 29, 2021

Antix virtual machine start automatically when Windows 10 starts

 

  1. Press the Windows key and R to open the Run dialog box
  2. Enter shell:startup
  3. In the Startup folder, right-click and select New > Shortcut
  4. In the item location text field, enter

    "C:\Program Files\Oracle\VirtualBox\VirtualBoxVM.exe" --startvm "Antix"

    Make sure to use the quotation marks. If your VM name is different, be sure to change that. Click Next.
  5. In the name for the shortcut, enter Antix. Click Finish.



++
++





private void button1_Click_1(object sender, EventArgs e)
{
    conn.Open();
    SQLiteCommand comm = new SQLiteCommand("Select * From Patients", conn);
    using (SQLiteDataReader read = comm.ExecuteReader())
    {
        while (read.Read())
        {
            dataGridView1.Rows.Add(new object[] { 
            read.GetValue(0),  // U can use column index
            read.GetValue(read.GetOrdinal("PatientName")),  // Or column name like this
            read.GetValue(read.GetOrdinal("PatientAge")),
            read.GetValue(read.GetOrdinal("PhoneNumber")) 
            });
        }
    }

}


Monday, April 26, 2021

Links

 http://www.e-gimnazija.org/download/covid-19-manual.pdf


CODE: https://github.com/jdah/tetris-os EDITOR: NeoVim THEME: palenight EMULATOR: QEMU RESOURCES: osdev.org: https://wiki.osdev.org/Main_Page Sortix: https://sortix.org/ ToaruOS: https://toaruos.org/ James Molloy's Kernel Development Tutorials: http://www.jamesmolloy.co.uk/tutorial...

QUAKE1 Operating System:

https://toaruos.org/

https://sortix.org/

https://wiki.osdev.org/Projects


https://itsfoss.com/install-microsoft-fonts-ubuntu/



http://home.etf.rs/~kraus/knjige/


Јел пробао неко SCard4Wine?
http://scard4wine.sourceforge.net/

Омогућава WINE-у да користи pcsc Linux-ов драјвер за Windows апликације. Firefox, Java Runtime i middleware за сертификате се успешно инсталирају под WINE-ом. Више о примени SCard4Wine:
http://forum.od.ua/s...=1#post26626240

При приступу сајту за еПорезе, читач и даље није детектован. Ево па пробајте, треба WINE да искористи Linux-ов драјвер, али му не полази за руком.

https://blog.goranrakic.com/2010/08/jos_po_neko_zapazanje.html

http://www.milosmiladinovic.com/2015/02/jfreesteel-citac-licne-karte/

https://blog.goranrakic.com/

http://jfreesteel.devbase.net/program/ubuntu/



++


Friday, April 23, 2021

Tray icon

 ++

procedure TForm1.ApplicationEvents1Minimize(Sender: TObject);
begin
  { Hide the window and set its state variable to wsMinimized. }
  Hide();
  WindowState := wsMinimized;

  { Show the animated tray icon and also a hint balloon. }
  TrayIcon1.Visible := True;
  TrayIcon1.Animate := True;
  TrayIcon1.ShowBalloonHint;
end;

procedure TForm1.FormCreate(Sender: TObject);
var
  MyIcon : TIcon;
begin
  { Load the tray icons. }
  TrayIcon1.Icons := TImageList.Create(Self);
  MyIcon := TIcon.Create;
  MyIcon.LoadFromFile('icons/earth1.ico');
  TrayIcon1.Icon.Assign(MyIcon);
  TrayIcon1.Icons.AddIcon(MyIcon);

  MyIcon.LoadFromFile('icons/earth2.ico');
  TrayIcon1.Icons.AddIcon(MyIcon);
  MyIcon.LoadFromFile('icons/earth3.ico');
  TrayIcon1.Icons.AddIcon(MyIcon);
  MyIcon.LoadFromFile('icons/earth4.ico');
  TrayIcon1.Icons.AddIcon(MyIcon);

  { Set up a hint message and the animation interval. }
  TrayIcon1.Hint := 'Hello World!';
  TrayIcon1.AnimateInterval := 200;

  { Set up a hint balloon. }
  TrayIcon1.BalloonTitle := 'Restoring the window.';
  TrayIcon1.BalloonHint :=
    'Double click the system tray icon to restore the window.';
  TrayIcon1.BalloonFlags := bfInfo;
end;

procedure TForm1.TrayIcon1DblClick(Sender: TObject);
begin
  
  { Hide the tray icon and show the window,
  setting its state property to wsNormal. }
  TrayIcon1.Visible := False;
  Show();
  WindowState := wsNormal;
  Application.BringToFront();
end;





++


Office Laser Multifunction Printers
HP LaserJet MFP M443nda
(8AF72A)

https://origin.www8.hp.com/emea_middle_east/en/products/printers/product-detail.html?oid=31072330#!tab=specs
=111.900 din
https://atom.rs/?sid=27574

  1. http://www.computerhistory.org/atchm/adobe-photoshop-source-code [return]
  2. https://en.m.wikipedia.org/wiki/Turbo_Pascal [return]
  3. You can read more about the history of Pascal in the Free Pascal Wiki [return]
  4. http://castle-engine.io/modern_pascal_introduction.html [return]
  5. programming language performance benchmark at The Computer Language Benchmarks Game [return]
  6. http://www.freepascal.org/docs.var [return]
  7. http://wiki.freepascal.org [return]
  8. https://forum.lazarus.freepascal.org [return]
  9. https://plus.google.com/communities/114860965042324270757 [return]
  10. http://www.blaisepascal.eu [return]
  11. http://castle-engine.io [return]
  12. https://www.freepascal.org/~michael/articles/#web1
  13. https://wiki.lazarus.freepascal.org/fcl-web
  14. https://stackoverflow.com/questions/3640336/syntax-highlighting-example/3656605

Thursday, April 22, 2021

Must have software on Windows 10 and Linux Lite (or Q4OS, or Antix, or MX)

 1) WPS Office

2) Microsoft Visual Studio Code

3) Notepad++

4) Lazarus-IDE

5) Inkscape

6) GIMP

7) Libre Office

8) .NET CORE

https://docs.microsoft.com/en-us/aspnet/core/?view=aspnetcore-5.0

https://docs.microsoft.com/en-us/aspnet/core/introduction-to-aspnet-core?view=aspnetcore-5.0#recommended-learning-path

https://docs.microsoft.com/en-us/aspnet/core/introduction-to-aspnet-core?view=aspnetcore-5.0

https://dotnet.microsoft.com/download

https://beogradsko.blogspot.com/2020/04/udaljeni-pristup-linux-serveru-u-punoj.html

https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor

https://docs.microsoft.com/en-us/aspnet/core/razor-pages/?view=aspnetcore-5.0&tabs=visual-studio



https://www.uopeople.edu/programs/cs/degrees/computer-science-bachelor-degree-2/

https://www.freecodecamp.org/

https://askubuntu.com/questions/203173/run-application-on-local-machine-and-show-gui-on-remote-display


https://unix.stackexchange.com/questions/104290/html-client-for-x11-ssh-forwarding


http://xpra.org/


https://fabianlee.org/2018/10/14/ubuntu-x11-forwarding-to-view-gui-applications-running-on-server-hosts/


https://cat.pdx.edu/platforms/linux/remote-access/remote-x/


https://sourceforge.net/projects/xming/


https://www.freecodecamp.org/


https://www.mygermanuniversity.com/articles/tuition-free-universities-in-germany-taught-in-english




More tips for Lazarus-IDE:











How To Use POP3 with SSL

uses
  blcksock, smtpsend, pop3send, ssl_openssl,
//...
 
type
  ESMTP = class (Exception);
  EPOP3 = class (Exception);
 
//...
 
procedure TForm1.edReceiveClick(Sender: TObject);
var
  pop3: TPOP3Send;
  i: integer;
begin
  pop3 := TPOP3Send.Create();
  try
    pop3.AutoTLS := false;
    pop3.Username:='test';
    pop3.Password:='*****';
    pop3.TargetHost:='127.0.0.1';
    pop3.TargetPort := '995';
    pop3.FullSSL := true;
    pop3.Sock.SSL.SSLType := LT_SSLv3;
 
    pop3.Sock.SSLDoConnect();
    if not pop3.Login() then
      raise EPOP3.Create('POP3 ERROR: Login');
 
    AddToLog('POP3 Stat');
    if not pop3.Stat() then
      raise EPOP3.Create('POP3 ERROR: stat');
    AddToLog('Stat: '+IntToStr(pop3.StatCount)+' msgs');
    for i := 1 to pop3.StatCount do begin
      AddToLog('POP3 Retr(' + IntToStr(i) + ')');
      if not pop3.Retr(i) then
        raise EPOP3.Create('POP3 ERROR: retr(' + IntToStr(i) + ')');
      RichEdit2.lines.Add(' ');
      RichEdit2.lines.Add('*** POP3 Retr(' + IntToStr(i) + ') *******');
      RichEdit2.lines.AddStrings(pop3.FullResult);
      pop3.FullResult.SaveToFile('mail_' + IntToStr(i) + '.msg');
      if not pop3.Dele(i) then
        raise EPOP3.Create('POP3 ERROR: dele(' + IntToStr(i) + ')');
    end;
 
  finally
    pop3.Free;
  end;
end;