Selasa, 12 Desember 2017

Delphi 10.2 Tokyo - error: cannot find -lcurl

ubuntu :

sudo add-apt-repository ppa:ubuntu-sdk-team/ppa && sudo apt update && sudo apt dist-upgrade && sudo apt install ubuntu-sdk-ide

centos
sudo yum install -y gcc gcc-c++
sudo yum install -y openssl-devel


Senin, 11 Desember 2017

Delphi 10.2 Tokyo - crossvcl - error cannot find -IGL


  1. sudo apt install mesa-utils in Linux 
  2. sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev libglfw3-dev libgles2-mesa-dev
  3. update SDK in Delphi, ==> tools - Options - Enviroment Option - SDK Manager
  4. Finish

Sabtu, 28 Oktober 2017

Replace CR & LF with spaces - Oracle SQL

select replace(replace(alamat_pemilik,chr(10),''),chr(13),' ') alamat from dual

Rabu, 18 Oktober 2017

Join SQL

Tuk pengingat aku dan yang lain jk ada yg butuh


Jumat, 06 Mei 2016

TOAD ORA-01031: insufficient privileges when connecting to Oracle 12c

An issue  faced is that when we try to connect from TOAD (version: 11.6 ) to a newly upgraded Oracle database 12c we faced the error:
ORA-01031: insufficient privileges
TOAD Error Message ORA-01031
The reason we are facing this problem, is the newly security implementation by Oracle in 12c for the system privilege SELECT ANY DICTIONARY. They have stripped this system privilege from accessing the following tables:USER$, ENC$,DEFAULT_PWD$, LINK$, USER_HISTORY$, CDB_LOCAL_ADMINAUTH$, XS$VERIFIERS
The current TOAD version checks the old (SELECT ANY DICTIONARY) which already has this table SYS.USER$ part of its permissionwhen it can’t access this table, it throws the error message:  ORA-01031
The reason in 12c they stripped those tables from “SELECT ANY DICTIONARY” is to protect the passwords in case this privilege is granted to non-DBA account , so the hashed passwords are not exposed (ONLY SYS account can query those tables).
So, to let the current version of TOAD works for 12c execute the following sql query:
SQL> grant select on sys.user$ to database_account;
Hope This Helps😉

Senin, 29 Februari 2016

Shortcuts Keyboard Sublime 3

Shortcuts Keyboard Sublime 3

Basic

F11Full Screen
shift + F11Distraction Free Mode
ctrl + shift + pCommand Palette
ctrl + `Show Console
ctrl + k + bShow/Hide Sidebar
ctrl + /Comment
ctrl + shift + /Block Comment
ctrl + k + uUppercase
ctrl + k + lLowercase

Selections

ctrl + dSelect Word
ctrl + dUse multiple times to select next instance of the selected word
ctrl + clickCreate multiple cursors for multi-editing
ctrl + shift + spaceExpand selection to scope. Repeating keeps expanding.
ctrl + shift + mExpand to brackets
ctrl + shift + jExpand to indentation

Go To

ctrl + pOpen file based on name
ctrl + gGo to line number
ctrl + rGo to symbol
ctrl + p THEN @Open file based on name and search for symbol
ctrl + mGo to matching bracket

Lines

ctrl + lSelect line
ctrl + shift + kDelete line
ctrl + ]Indent
ctrl + [Unindent
ctrl + enterInsert line after
ctrl + shift + enterInsert line before
ctrl + shift + ↑Swap line up
ctrl + shift + ↓Swap line down
ctrl + shift + dDuplicate line
ctrl + jJoin Line

Code Folding

ctrl + shift + [Fold
ctrl + shift + ]Unfold
ctrl + k + jUnfold All

Search / Find / Replace

ctrl + fFind
F3Find next
shift + F3Find previous
ctrl + shift + fSearch all files in a folder
ctrl + hReplace
ctrl + f THEN alt + enterFind a certain term then select them all for multi-editing

Tabs and Window Panes

ctrl + shift + nNew Window
ctrl + nNew Tab
alt + #Select a Tab (ie alt + 3)
ctrl + wClose Tab
ctrl + shift + #Move tab to a Pane (ie ctrl + shift + 2)
ctrl + #Focus on a Pane (ie ctrl + 2)
alt + shift + 1One Column
alt + shift + 2Two Columns
alt + shift + 3Three Columns
alt + shift + 4Four Columns
alt + shift + 8Two Rows
alt + shift + 9Three Rows
alt + shift + 5Two x Two Grid

Bookmarks

ctrl + F2Create Bookmark
F2Next Bookmark
shift + F2Previous Bookmark
ctrl + shift + F2Clear Bookmarks

Senin, 30 November 2015

Drop Box Dinamis

...
type
  TString = class(TObject)
    private
      fStr: String;
    public
    constructor Create(const AStr: String) ;
    property Str: String read FStr write FStr;

...
constructor TString.Create(const AStr: String);
begin
  inherited Create;
  FStr := AStr;
end;


Proses ke combobox nya :
-------------------------------

cbDealer.Properties.Items.Clear;
  with DM.Q do
  begin
    Close;
    SQL.Text := 'select KD_DEALER,NAMA_DEALER from t_faktur'+
                ' where DATE_FORMAT(tgl_faktur, ''%Y%m%d'') between :tgl and :tgl2 group by KD_DEALER order by KD_DEALER';
    Params[0].AsString := FormatDateTime('yyyymmdd',dt.Date);
    Params[1].AsString := FormatDateTime('yyyymmdd',dt2.Date);
    Open;

    if DM.Q.RecordCount > 0 then
    begin
      while not eof do
      begin
        cbDealer.Properties.Items.AddObject(Fields[1].AsString,TString.Create(Fields[0].AsString));
      Next;
      end;
    end
    else
    begin
      cbDealer.Properties.Items.AddObject('SEMUA DEALER',TString.Create('ALL'));
    end;
  end;
 
  cbDealer.Text := '';

.......

Penggunaan pada saat combobox di pilih adalah sebagai berikut:

params() := TString(cbDealer.Properties.Items.Objects[cbDealer.ItemIndex]).Str;