Nugroho's blog.

Wednesday, November 18, 2015

Create CSV file using Delphi

 I used textfile variable to write to a file (or create it if it don't exist).

 CSV file? Just make sure that the name at assignfile  command had .csv extension, :)

 Of course we have to format the output to meet the CSV standart; separated by comma.


procedure TForm1.Button1Click(Sender: TObject);
var
fileku:textfile;
i,j,n:integer;
begin
n:=10;
assignfile(fileku,'data.csv');
rewrite(fileku);
writeln(fileku,'tadaa...');
for i:=1 to n do begin
for j:=1 to n do begin
writeln(fileku,i,',',j,',','data',i,j);
end;
end;
closefile(fileku);
end;

.









Turn right! No! Your other right!

 “I definitely didn’t have time to get my soul cast into a place I couldn’t even pronounce.”

 Typical Rick, :)

Friday, November 13, 2015

Darurat.

 Sepatu basah kena hujan.

 Gak bawa serep.

 Nyalakan AC, gantung di depan kipas, tunggu dua jam, :)





Thursday, November 12, 2015

Delphi on OS X

 Here's the WineSkin version.

 I found it's way smoother than WineBottler version, ...., but hard to figure how to use it

 To install Delphi in OS X using WineSkin, we have to download and install Wineskin, of course, :)

  • Open Wineskin Winery.app
  • Make sure you have a Wrapper version and an Engine
  • Select the Engine you want to use (I use WS9Wine1.7.52)
  • Press the Create Wrapper button
  • Enter in the name Delphi (or whatever you have in mind) for the wrapper and press OK
  • When its done being created, click the button to view it in Finder in the finished window
  • Close Wineskin Winery.app.
  • Right click Delphi.app in Finder and select “Show Package Contents”
  • Double click and run Wineskin.app.
  • Now click on the Install Software button
  • Select to choose a setup executable
  • Navigate to the Delphi setup exe file you downloaded in step one
  • Select the setup exe file and press the choose button
  • At this point Delphi setup should begin, go through the Delphi setup like a normal install
  • After the setup is done, back in Wineskin.app, it should pop up asking you to select the .exe file
  • Choose the delphi32.exe file in the drop down list and press the Select Button
  • Now press the Quit button to exit Wineskin.app
  • Back in Finder, double click Delphi.app and start coding

 It has the same problem with WineBottler,  the toolbar tab's seem order by itself alphabetically, so the default toolbar tab is not ' standard ' tab but 'additional' one

code
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
jalan:boolean=false;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
jalan := not jalan;
if jalan = true then button1.Caption:='Stop'
else button1.Caption:='Run';

end;

procedure TForm1.FormCreate(Sender: TObject);
begin
button1.Caption:='Run';
end;

end.
.









Delphi on OS X

 I use WineBottler to install Delphi 7 on my El Capitan.

 It's installed, it can run.

 The one that tickle me is the toolbar list is scrambled, it's sorted alphabetically, so additional toolbar is in the first and act as default toolbar.












code

Pulpen Cadangan, iPod dan Prasangka Baik Terhadap Soal.

 Senjata ujian jaman dulu, :)







Obat Tidur Alami

 Jangan memandang layar di jam-jam tidur, baik layar TV, komputer, handphone.

 Misal terpaksa bekerja dengan komputer di malam hari, gunakan aplikasi seperti flux. Aplikasi ini menghilangkan warna biru di layar.

 Warna biru (seperti cahaya matahari pagi hari) membuat kita tetap terjaga, karena tubuh menganggap hari masih belum malam. Cahaya biru dari layar TV, laptop, hp membuat jam biologis kita menjadi kacau.
Biological clock human.svg
"Biological clock human" by NoNameGYassineMrabetTalk fixed by Addicted04 - The work was done with Inkscape by YassineMrabet. Informations were provided from "The Body Clock Guide to Better Health" by Michael Smolensky and Lynne Lamberg; Henry Holt and Company, Publishers (2000). Landscape was sampled from Open Clip Art Library (Ryan, Public domain). Vitruvian Man and the clock were sampled from Image:P human body.svg (GNU licence) and Image:Nuvola apps clock.png, respectively.. Licensed under CC BY-SA 3.0 via Commons.


323f (5) amp (1) android (12) apple (7) arduino (18) art (1) assembler (21) astina (4) ATTiny (23) blackberry (4) camera (3) canon (2) cerita (2) computer (106) crazyness (11) debian (1) delphi (39) diary (286) flash (8) fortran (6) freebsd (6) google apps script (8) guitar (2) HTML5 (10) IFTTT (7) Instagram (7) internet (12) iOS (5) iPad (6) iPhone (5) java (1) javascript (1) keynote (2) LaTeX (6) lazarus (1) linux (29) lion (15) mac (28) macbook air (8) macbook pro (3) macOS (1) Math (3) mathematica (1) maverick (6) mazda (4) microcontroler (35) mountain lion (2) music (37) netbook (1) nugnux (6) os x (36) php (1) Physicist (29) Picture (3) programming (189) Python (109) S2 (13) software (7) Soliloquy (125) Ubuntu (5) unix (4) Video (8) wayang (3) yosemite (3)