Thursday, December 28, 2017

Nova verzija aplikacije OTVARAC

Napravio sam novu verziju aplikacije OTVARAC, ispravljene su neke sitnice i sada je aplikacija veoma visokog kvaliteta.

Evo novi freeware za download:

https://goo.gl/zd26LY

Prvo raspakujete arhivu otvarac2----password----raspakuj.zip koristeći password raspakuj.

A zatim prati uputstvo za instalaciju:

USER MANUAL:


1) In Windows Explorer, My Computer or My Documents just  right click mouse on document (readme.rtf or something else), Context Menu will appear

2) Click on option OTVARAC in Context Menu


Ukoliko ste ranije instalirali neku od prethodnih verzija aplikacije, molimo Vas da pre instalacije ove najnovije verzije OTVARAC2----..., obavezno deinstalirate one prethodne verzije.

Aplikaciju možete veoma jednostavno deinstalirati koristeći:
c:\otvarac\unins000.exe

A, instalacija nove aplikacje se nalazi spakovana u ZIP arhivi:
 otvarac2----password----raspakuj.zip

Kao što samo ime govori, arhiva se raspakuje upotrebom password-a (lozinke): raspakuj,

pa nakon toga dobijete u nekom folderu instalacionu aplikaciju (instajler): mojsetup.exe

Kada ga startujete samo pritisnite nekoliko puta "NEXT", "NEXT", "NEXT",... i "OK" - aplikacija je instalirana u folder c:\otvarac.

E sad kako se koristi aplikacija:

Uputstvo za upotrebu:

Jednostavno u Windows Exploreru, My Computer, My Documents ili nekom drugom folderu kliknite desnim tasterom miša na datoteku koju želite da otvorite i odaberite u novootvorenom Context Menu-ju opciju OTVARAC.

Zašto je bitno da u buduće obavezno otvarate datoteke na ovaj način, a ne duplim klikom na levi taster miša ili opcijom Open u Context Menu-ju ?

Jednostavno zato što ćete imati spisak svih otvorenih datoteka ikada, a on je nezamenjiv kod ljudi koji otvaraju veoma velik broj dokumenata i žele da imaju mogućnost evidencije svih pokretanih aplikacija, sa mogućnošću ponovnog startovanja istih - upravo iz ove aplikacije.








Korisni linkovi za programere

http://beogradsko.blogspot.rs/2018/01/otvarac-kratko-uputstvo-za-instalaciju.html



https://english-online.rs/

https://teachyourselfcs.com/

http://libgen.io/

https://mitpress.mit.edu/sicp/full-text/book/book.html

https://archive.org/details/ucberkeley-webcast-PL3E89002AA9B9879E?sort=titleSorter

http://www3.cs.stonybrook.edu/~algorith/video-lectures/

https://courses.csail.mit.edu/6.042/spring17/mcs.pdf

https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/video-lectures/

http://pages.cs.wisc.edu/~remzi/OSTEP/

http://www.infocobuild.com/education/audio-video-courses/computer-science/cs162-spring2015-berkeley.html

https://lagunita.stanford.edu/courses/Engineering/Networking-SP/SelfPaced/about

http://www.redbook.io/

https://archive.org/details/UCBerkeley_Course_Computer_Science_186

https://lagunita.stanford.edu/courses/Engineering/Compilers/Fall2014/about

https://www.amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811?pldnSite=1

http://dsrg.pdos.csail.mit.edu/papers/

https://cs50.harvard.edu/

https://yaledailynews.com/blog/2015/09/22/cs50-yales-most-popular-course/

https://www.edx.org/

https://en.wikipedia.org/wiki/Massive_open_online_course

https://www.freecodecamp.org/

https://www.cs.cmu.edu/~15110-s13/Wing06-ct.pdf

https://www.quora.com/Why-does-CS50-at-Harvard-use-C-as-its-primary-language/answer/David-J-Malan

https://sites.fas.harvard.edu/~memhall/sanders.html

https://ap.cs50.net/

https://www.khanacademy.org/computing/computer-science/algorithms/merge-sort/a/divide-and-conquer-algorithms

https://www.scotthyoung.com/blog/myprojects/mit-challenge-2/

https://www.coursera.org/

https://www.udacity.com/

https://ocw.mit.edu/index.htm

http://online.stanford.edu/courses

https://git-scm.com/book/sr/v2

https://startit.rs/kreatori-i-alati-hajime-yamasaki-front-end-developer/

https://cubeteam.com/sr/naslovna

https://www.asus.com/Laptops/ASUS-Zenbook-UX310UQ/

https://code.visualstudio.com/

https://eslint.org/

https://marketplace.visualstudio.com/items?itemName=dzannotti.vscode-babel-coloring

http://editorconfig.org/

https://marketplace.visualstudio.com/items?itemName=stkb.Rewrap-18980

https://wallabyjs.com/

http://eloquentjavascript.net/

http://eloquentjavascript.net/Eloquent_JavaScript.pdf

http://eloquentjavascript.net/code/

https://github.com/getify/You-Dont-Know-JS

https://startit.rs/uvod-u-dizajn-paterne/

https://www.amazon.com/dp/0201633612/ref=cm_sw_r_cp_ep_dp_LMykybETPB43J

https://addyosmani.com/resources/essentialjsdesignpatterns/book/

https://medium.freecodecamp.org/

https://startit.rs/front-end-web-development/

https://javascript30.com/

https://www.youtube.com/watch?v=AaGK-fj-BAM

https://startit.rs/programiranje-za-pocetnike/

https://startit.rs/author/aleksav/

https://startit.rs/osnove-racunarskih-nauka/

https://startit.rs/kodiranje-vs-racunarske-nauke/

https://startit.rs/outsource-startap-posao-zaposljavanje/?klk=pvz

https://startit.rs/javascript-korisne-novine-koje-nedovoljno-koristite-u-praksi/

https://startit.rs/plate-programera-u-srbiji-5-godina-iskustva-kosta-1445e/

https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1848000693/?pldnSite=1



Delphi goodies + InnoSetup Compiler završnica

http://delphiexamples.com/systeminfo/

http://www.delphibasics.co.uk/RTL.asp?Name=formatdatetime


InnoSetup Compiler završnica:



https://msdn.microsoft.com/en-us/library/windows/desktop/bb736357(v=vs.85).aspx

http://www.jrsoftware.org/iskb.php?startwithwindows


[Registry]
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "YourApplicationName"; ValueData: """{app}\YourApplicationName.exe"""; Flags: uninsdeletevalue
Administrative privileges are needed to write to that key, so be sure this is in your [Setup] section:
PrivilegesRequired=admin

---------------

http://www.jrsoftware.org/iskb.php?startup

---------------


HOWTO: Create shortcuts in the Startup (or Autostart) group
Article Created: 2003-10-19 06:43 GMT by Jordan Russell
Last Updated: 2004-07-30 21:42 GMT by Jordan Russell

Shortcuts may be created in the Startup group by specifying either the {userstartup} or {commonstartup} constant in the Name parameter of an [Icons] section entry.

Example:

[Icons]
Name: "{commonstartup}\My Program"; Filename: "{app}\MyProg.exe"
Note: Writing to {commonstartup} requires administrative privileges, so be sure this is in your [Setup] section:

PrivilegesRequired=admin

------------------------------


https://stackoverflow.com/questions/12250151/how-to-add-a-scheduled-task-with-inno-setup


[Run]
Filename: "schtasks"; \
    Parameters: "/Create /F /SC HOURLY /TN ""My Task"" /TR ""'{app}\MyProg.exe' par1"""; \
    Flags: runhidden






Wednesday, December 27, 2017

FTP Indy Delphi Upload

https://stackoverflow.com/questions/33042220/upload-file-to-ftp-server-using-indy

uses
  ...
  OverbyteIcsFtpCli;

procedure FtpUploadFile( 
                             HostName: String; 
                             UserName: String; 
                             Password: String; 
                             UploadFileName: String; 
                             ToHostDir : String );
var
  FTP: TFtpClient;
begin
  FTP := TFtpClient.Create(nil);
  try
    FTP.HostName := HostName;
    FTP.Passive := True;
    FTP.Binary := True;
    FTP.Username := UserName;
    FTP.Password := Password;
    FTP.Port := '21';

    if not FTP.Open then
      raise Exception.Create('Failed to connect: ' + FTP.ErrorMessage);

    if (not FTP.User) or (not FTP.Pass) then 
      raise Exception.Create('Failed to login: ' + FTP.ErrorMessage);

    FTP.HostDirName := ToHostDir;
    if not FTP.Cwd then
      raise Exception.Create('Failed to change dir: ' + FTP.ErrorMessage);

    FTP.LocalFileName := UploadFileName;
    FTP.HostFileName := ExtractFileName(UploadFileName);

    if not FTP.Put then
      raise Exception.Create('Failed to upload file: ' + FTP.ErrorMessage);
  finally
    FTP.Free;
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
   FtpLoadFile('rubilaxe.hostoi.com',  
                     '******', '******',
                     IncludeTrailingPathDelimiter( 
                          ExtractFilePath(Application.ExeName) ) +'datafile.zip',
                     '/files'  );
end;


http://beogradsko.blogspot.rs/2018/01/otvarac-kratko-uputstvo-za-instalaciju.html

Jer Windows 10 pamti samo poslednjih 30 dokumenata, a zamislite da ste inspektor, advokat, pravnik ili neki javni beležnik koji dnevno ima da otvori i odštampa na stotine i hiljade dokumentata, onda Vam sigurno treba ovaj program

Evo novi freeware za download:

https://goo.gl/zd26LY

Prvo raspakujete arhivu otvarac----password----raspakuj.zip koristeći password raspakuj.

A zatim prati uputstvo za instalaciju:

http://beogradsko.blogspot.rs/2018/01/otvarac-kratko-uputstvo-za-instalaciju.html

USER MANUAL:


1) In Windows Explorer, My Computer or My Documents just  right click mouse on document (readme.rtf or something else), Context Menu will appear

2) Click on option OTVORI in Context Menu

Evo nove verzije mnogo bolje, ako slučajno imate problema sa instalacijom kliknite na mojsetup.exe desnim tasterom miša i u Context Menu-ju odaberite "Run As Administrator", jer aplikacija kreira folder c:\otvarac pa može se desiti da Vam operativni sistem Windows traži da mu dozvolite ovu operaciju.

Naravno, ukoliko imate neki zaštitni program na sistemu dodajte folder i aplikaciju na listu dozvoljenih aplikacija.

Tehnologije koje sam primenio u ovoj mojoj aplikaciji:

Inno Setup Compiler, Mutex in FPC, FPC, Regedit in Inno, Memo box i jedna tekstualna datoteka baza.txt u koju se beleže svi programi i datoteke koje ste otvarali pomoću ove aplikacije (desni taster miša, pa opcija OTVARAC).

Veoma jednostavno i veoma efektno, a koliko je korisna aplikacija ne treba ni govoriti. Od sada veoma jednostavno i lako pronalazim Microsoft Office dokumente, čak i ukoliko sam ih dnevno otvarao po hiljadu.

Jer Windows 10 pamti samo poslednjih 30 dokumenata, a zamislite da ste inspektor, advokat, pravnik ili neki javni beležnik koji dnevno ima da otvori i odštampa na stotine i hiljade dokumentata, onda Vam sigurno treba ovaj program !!!

Zašto je bitno da u buduće obavezno otvarate datoteke na ovaj način, a ne duplim klikom na levi taster miša ili opcijom Open u Context Menu-ju ?

Jednostavno zato što ćete imati spisak svih otvorenih datoteka ikada, a on je nezamenjiv kod ljudi koji otvaraju veoma velik broj dokumenata i žele da imaju mogućnost evidencije svih pokretanih aplikacija, sa mogućnošću ponovnog startovanja istih - upravo iz ove aplikacije.





MUTEX in FPC

http://forum.lazarus.freepascal.org/index.php?topic=36280.0

  1. PROGRAM UNIQUEWAVE;
  2.  {$MODE OBJFPC}{$H+}
  3.  USES
  4.   Interfaces,
  5.   SysUtils,
  6.   Forms,
  7.   Windows,
  8.   uUNIQUEWAVE;
  9.   {$R *.RES}
  10.  CONST
  11.   MutexName = 'UNIQUEWAVE MuTeX';
  12.  VAR
  13.   hMutex: THandle;
  14. BEGIN
  15.  Try
  16.   hMutex:= CreateMutex(Nil, True, MutexName);
  17.    If GetLastError = ERROR_ALREADY_EXISTS
  18.    Then
  19.     Begin
  20.      CloseHandle(hMutex);
  21.      Exit;
  22.     End;
  23.   Try
  24.    RequireDerivedFormResource:= True;
  25.     Application.Title:= 'UNIQUEWAVE';
  26.     Application.Initialize;
  27.      wndGUI:= TwndGUI.Create(Application); //no need for a TaskbarButton
  28.      wndGUI.Show;
  29.     Application.Run;
  30.   Finally
  31.    If hMutex <> 0
  32.    Then CloseHandle(hMutex);
  33.   End;
  34.  Except
  35.   On E: Exception
  36.   Do wndGUI.Log('MAIN PRG'+sLineBreak+E.ClassName+sLineBreak+E.Message, True);
  37.  End;
  38. END.



program MutexExample;

uses
  Vcl.Forms, Vcl.Dialogs,
  System.SyncObjs, // defines TMutex
  Winapi.Windows,  // defines ERROR_SUCCESS
  Unit1 in 'Unit1.pas' {Form1};

{$R *.res}

var
  AppMutex: TMutex = nil;
  MutexErr: Integer = 0;

procedure CheckSecondInstance;
const
  // any unique name will work--I chose to create a GUID
  UNIQUE_MUTEX_NAME = '{AD12094E-7308-4067-8CAC-565A1FF3ADDC}';
begin
  // try to create a mutex; don't need any security rights
  AppMutex := TMutex.Create(nil, True, UNIQUE_MUTEX_NAME);

  // check to see if it was successful
  MutexErr := GetLastError;

  // if not, previous instance of application already created the mutex
  if MutexErr <> ERROR_SUCCESS then
    ShowMessage(Application.Title + ' is already running.');
end;

begin
  // initialize app like normal, but don't start it yet
  Application.Initialize;
  Application.Title := 'Simple Mutex Example';

  // run our check here
  CheckSecondInstance;
  try
    // if the mutex was successfully created, this is the first instance of this app
    if MutexErr = ERROR_SUCCESS then begin
      Application.CreateForm(TForm1, Form1);
      Application.Run;
    end;
  finally
    // if a mutex was successfully created (and our app ran),
    // be sure to free it to release the mutex
    if Assigned(AppMutex) then
      AppMutex.Free;
  end;
end.

Šta reći, a ne zaplakati od sreće. 
Mutex, pa još u Lazarusu, pa radi lol.
PROGRAM UNIQUEWAVE;
 {$MODE OBJFPC}{$H+}
 
 USES
  Interfaces,
  SysUtils,
  Forms,
  Windows,
  uUNIQUEWAVE;
 
  {$R *.RES}
 
 CONST
  MutexName = 'UNIQUEWAVE MuTeX';
 
 VAR
  hMutex: THandle;
 
BEGIN
 Try
  hMutex:= CreateMutex(Nil, True, MutexName);
 
   If GetLastError = ERROR_ALREADY_EXISTS
   Then
    Begin
     CloseHandle(hMutex);
     Exit;
    End;
 
  Try
   RequireDerivedFormResource:= True;
    Application.Title:= 'UNIQUEWAVE';
    Application.Initialize;
     wndGUI:= TwndGUI.Create(Application); //no need for a TaskbarButton
     wndGUI.Show;
    Application.Run;
  Finally
   If hMutex <> 0
   Then CloseHandle(hMutex);
  End;
 Except
  On E: Exception
  Do wndGUI.Log('MAIN PRG'+sLineBreak+E.ClassName+sLineBreak+E.Message, True);
 End;
END.
 

MOŽE BITI SAMO JEDAN !
STARTUJTE SAMO JEDNU INSTANCU SVOJE APLIKACIJE !
KORISTITE MUTEX TEHNOLOGIJU !
Start only one instance of your application !
Use Mutex in Lazarus !

The Highlander: There can be only one