Autor |
Beitrag |
Christian S.
Beiträge: 20451
Erhaltene Danke: 2264
Win 10
C# (VS 2019)
|
Verfasst: Di 11.03.14 20:48
Hallo, EE'ler!
Das Event
Vom 5. bis 7. Mai 2014 startet das diesjährige Delphi Code Camp in Düsseldorf. Das Trainingsevent wird präsentiert von der Entwickler Akademie in Kooperation mit dem Entwickler Magazin. Stefan Glienke und Bernd Ua vermitteln in drei ganztägigen Workshops Praxiswissen zum aktuellen Stand der Programmiersprache Delphi, zu den aktuellen Datenbankfeatures von Delphi sowie zur Gestaltung testbarer und wartbarer Anwendungen mit Dependency Injection. Alle Infos findet Ihr auf delphi-code-camp.de.
Die Verlosung
Anlässlich des Events können wir auch wieder drei Jahres-Abos des Entwickler Magazins verlosen! An der Verlosung nimmt teil, wer bis zum 11.04. hier in diesem Topic sein Interesse bekundet. Aaaaber, die Interessensbekundung muss dieses Jahr in Form eines Quelltextes geschehen. Also sowas wie
C#-Quelltext 1: 2:
| Interesse i = new Interesse(); i.Bekunde(); |
aber gerne kreativer . Die Verlosung findet dann unter allen Einsendung auf meinem Rechner ohne jegliche Aufsicht statt.
Viele Grüße
Christian
Einloggen, um Attachments anzusehen!
_________________ Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Zuletzt bearbeitet von Christian S. am Di 22.04.14 11:19, insgesamt 1-mal bearbeitet
Für diesen Beitrag haben gedankt: Chatfix, Narses, Nersgatt
|
|
platzwart
Beiträge: 1054
Erhaltene Danke: 78
Win 7, Ubuntu 9.10
Delphi 2007 Pro, C++, Qt
|
Verfasst: Di 11.03.14 21:07
Delphi-Quelltext 1: 2:
| while not(gewonnen) do Memo1.Lines.Add("Bitte, bitte, bitte... :-)"); |
_________________ Wissenschaft schafft Wissenschaft, denn Wissenschaft ist Wissenschaft, die mit Wissen und Schaffen Wissen schafft. (myself)
|
|
Perlsau
Ehemaliges Mitglied
Erhaltene Danke: 1
|
Verfasst: Di 11.03.14 21:12
Da fehlt aber das Setzen der Abbruchbedingung:
Delphi-Quelltext 1: 2: 3: 4: 5:
| while not gewonnen do begin Memo1.Lines.Add("Bitte, bitte, bitte... :-)"); gewonnen := ChefEntwicklerSaidYes; end; |
Und nein, ich habe kein Interesse (mehr) am Entwicklermagazin.
|
|
jaenicke
Beiträge: 19285
Erhaltene Danke: 1743
W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
|
Verfasst: Di 11.03.14 21:45
JavaScript-Quelltext 1:
| var _0x15be=["\x45\x69\x6E\x20\x73\x63\x68\xF6\x6E\x65\x73\x20\x4D\x61\x67\x61\x7A\x69\x6E\x21\x20\x53\x65\x68\x72\x20\x73\x63\x68\xF6\x6E\x65\x20\x41\x6B\x74\x69\x6F\x6E\x2E\x20\x41\x62\x65\x72\x20\x69\x63\x68\x20\x62\x65\x6B\x6F\x6D\x6D\x65\x20\x65\x73\x20\x6A\x61\x20\x73\x63\x68\x6F\x6E\x2E"];alert(_0x15be[0]); |
(ich bekomme das Entwickler Magazin ja noch (danke ), daher ebenfalls kein Interesse an der Verlosung )
|
|
Mathematiker
Beiträge: 2622
Erhaltene Danke: 1447
Win 7, 8.1, 10
Delphi 5, 7, 10.1
|
Verfasst: Di 11.03.14 22:29
Nicht originell, aber funktioniert:
Quelltext 1:
| >+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]>>>---.>+++.<-------------------------------------.>++++.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.<++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.-------------.---------------------------------------------------------------------.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.----------------.+++++.>++++++++++++++++++.<++++++.<<< |
Beste Grüße
Mathematiker
|
|
zuma
Beiträge: 660
Erhaltene Danke: 21
Win XP, Win7, Win 8
D7 Enterprise, Delphi XE, Interbase (5 - XE)
|
Verfasst: Mi 12.03.14 10:39
Delphi-Quelltext 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23:
| function GewinnspielGewonnen : boolean; var lGewonnen : boolean; begin Result := False; lGewonnen := False; while not lGewonnen or Gewinnspiel.Ende do lGewonnen := GuckeInPostkasten; Result := lGewonnen; end;
function GuckeInPostkasten : boolean; begin Result := (FPostKasten.PostArt = cEntwicklermagazin); end;
function MachGewinnSpielMit : TReaction; begin Result := rConfused; if not GewinnspielGewonnen then Result := rStartCrying else Result := rStartParty; end; |
Zuma.Reaction := MachGewinnSpielMit;
_________________ Ich habe nichts gegen Fremde. Aber diese Fremden sind nicht von hier! (Methusalix)
Warum sich Sorgen ums Leben machen? Keiner überlebts!
|
|
Nersgatt
Beiträge: 1581
Erhaltene Danke: 279
Delphi 10 Seattle Prof.
|
Verfasst: Mi 12.03.14 10:49
Na, das gibt aber ne Compilerwarnung.
1. H2077: Auf "Result" zugewiesener Wert wird niemals benutzt
2. H0815: Zweimalige Teilnahme führt zur Disqualifikation
_________________ Gruß, Jens
Zuerst ignorieren sie dich, dann lachen sie über dich, dann bekämpfen sie dich und dann gewinnst du. (Mahatma Gandhi)
|
|
zuma
Beiträge: 660
Erhaltene Danke: 21
Win XP, Win7, Win 8
D7 Enterprise, Delphi XE, Interbase (5 - XE)
|
Verfasst: Mi 12.03.14 10:54
pah, wen interessieren denn Compilerwarnungen ...
_________________ Ich habe nichts gegen Fremde. Aber diese Fremden sind nicht von hier! (Methusalix)
Warum sich Sorgen ums Leben machen? Keiner überlebts!
|
|
Chatfix
Beiträge: 1583
Erhaltene Danke: 10
Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
|
Verfasst: Mi 12.03.14 11:48
Delphi-Quelltext 1: 2: 3: 4: 5: 6:
| AnzahlAbos := 3; for i:=1 to AnzahlAbos do begin if Gewinner[i] = 'Chatfix' then Memo1.Lines.Add('Chatfix freut sich sehr und bedankt sich recht herzlich!'); end; |
_________________ Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
|
|
Nersgatt
Beiträge: 1581
Erhaltene Danke: 279
Delphi 10 Seattle Prof.
|
Verfasst: Mi 12.03.14 13:53
Delphi-Quelltext 1: 2: 3: 4: 5: 6: 7: 8:
| unit Unit2; interface uses Classes, UrlMon, SysUtils; type TCharPos = record Line : Integer; Char : Integer; end; TInteressensbekundungsgenerator = class private const TempFileName = 'c:\temp\temp.txt'; procedure DownloadFile; procedure BuildOutput(AStrings : TStrings); function DownloadUrl : String; function VollGeheimeVerschluesselung(AStr: String): String; public procedure CreateInteresse (AStrings : TStrings); end;implementation procedure TInteressensbekundungsgenerator.BuildOutput(AStrings : TStrings);var Line : String; tsFile : TStringList; i : Integer; const Positionen : Array[1..30] of TCharPos = ((Line: 5; Char: 113), (Line: 5; Char: 111),(Line: 5; Char: 115), (Line: 5; Char: 37),(Line: 5; Char: 39), (Line: 5; Char: 111),(Line: 5; Char: 55), (Line: 5; Char: 40),(Line: 5; Char: 112),(Line: 5; Char: 115), (Line: 7; Char: 13), (Line: 5; Char: 44),(Line: 5; Char: 65), (Line: 5; Char: 47), (Line: 5; Char: 115),(Line: 5; Char: 40), (Line: 5; Char: 111), (Line: 5; Char: 63), (Line: 5; Char: 113), (Line: 5; Char: 40),(Line: 5; Char: 791),(Line: 5; Char: 65), (Line: 5; Char: 55),(Line: 5; Char: 115), (Line: 5; Char: 37),(Line: 5; Char: 115), (Line: 5; Char: 43),(Line: 5; Char: 43), (Line: 5; Char: 115),(Line: 5; Char: 178));begin tsFile := TStringList.Create; try tsFile.LoadFromFile(TempFileName); Line := ''; for I := low(Positionen) to High(Positionen) do Line := Line + tsFile.Strings[Positionen[i].Line][Positionen[i].Char]; AStrings.Add(Line); finally tsFile.Free; end; end;procedure TInteressensbekundungsgenerator.CreateInteresse(AStrings: TStrings); begin DownloadFile; BuildOutput(AStrings); end;procedure TInteressensbekundungsgenerator.DownloadFile;var ret : Integer;begin ret := URLDownloadToFile(nil, PWideChar(DownloadUrl), TempFileName, 0, nil); if ret <> S_OK then raise Exception.Create('Download failed!'); if not FileExists(TempFileName) then raise Exception.Create('Download failed!');end;function TInteressensbekundungsgenerator.DownloadUrl: String;begin result := VollGeheimeVerschluesselung('uggc://yberzvcfhz.arg');end;function TInteressensbekundungsgenerator.VollGeheimeVerschluesselung(AStr: String): String;var i: integer; c: char;begin for i := 1 to Length(AStr) do begin c := AStr[i]; if (((c >= 'A') AND (c <= 'M')) OR ((c >= 'a') AND (c <= 'm'))) then c := chr(ord(c) + 13) else if (((c >= 'N') AND (c <= 'Z')) OR ((c >= 'n') AND (c <= 'z')) ) then c := chr(ord(c) - 13); Result := Result + c; end;end;end. |
Codeformatierung wird überbewertet.
Aber kompilierbar und funktionstüchtig. Nur die verwendetet Webseite darf sich nicht ändern.
Verwendung:
Delphi-Quelltext 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14:
| procedure TForm1.Button1Click(Sender: TObject); var ig : TInteressensbekundungsgenerator; begin
ig := TInteressensbekundungsgenerator.Create; try ig.CreateInteresse(Memo1.Lines); finally ig.Free; end;
end; |
Ihr hab übrigens einen Teil meiner Mittagspause auf dem Gewissen.
_________________ Gruß, Jens
Zuerst ignorieren sie dich, dann lachen sie über dich, dann bekämpfen sie dich und dann gewinnst du. (Mahatma Gandhi)
|
|
baumina
Beiträge: 305
Erhaltene Danke: 61
Win 7
Delphi 10.2 Tokyo Enterprise
|
Verfasst: Mi 12.03.14 17:06
Delphi-Quelltext 1:
| Interessenten.AddObject('baumina', TObject(baumina)); |
|
|
mvollmer
Beiträge: 42
Erhaltene Danke: 3
Delphi (Seattle), C (MPLAB X)
|
Verfasst: Mi 12.03.14 17:34
|
|
jaenicke
Beiträge: 19285
Erhaltene Danke: 1743
W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
|
Verfasst: Mi 12.03.14 17:47
|
|
baumina
Beiträge: 305
Erhaltene Danke: 61
Win 7
Delphi 10.2 Tokyo Enterprise
|
Verfasst: Mi 12.03.14 17:47
|
|
OlafSt
Beiträge: 486
Erhaltene Danke: 99
Win7, Win81, Win10
Tokyo, VS2017
|
Verfasst: Fr 14.03.14 00:03
Keiner denkt an Persistenz. tststs.
C#-Quelltext 1: 2: 3: 4: 5:
| Interessent interessent = new Interessent("OlafSt"); System.Xml.Serialization.XmlSerializer writer = new System.Xml.Serialization.XmlSerializer(typeof(Interessent)); System.IO.StreamWriter file = new System.IO.StreamWriter(InteressentenFileName); writer.Serialize(file, Interessent); file.Close(); |
_________________ Lies, was da steht. Denk dann drüber nach. Dann erst fragen.
|
|
ub60
Beiträge: 762
Erhaltene Danke: 127
|
Verfasst: So 16.03.14 16:52
Na dann:
Delphi-Quelltext 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:
| var Out, AllBits, Hex : String; i, j : Integer; Value :Byte; begin Hex:='B7245A6401AD3052DD01E4415818AC6E5150C52C03E974000A85D202421D0824478B2C731600AB5B14'; AllBits:=''; for i:=1 to Length(Hex) div 2 do begin Value:=StrToInt('$'+Copy(Hex, 2*i-1, 2)); for j:=1 to 8 do if Value AND (1 SHL (j-1))>0 then AllBits:=AllBits+'1' else AllBits:=AllBits+'0'; end; Out:=''; for i:=1 to Length(AllBits) div 5 do begin Value:=0; for j:=1 to 5 do if AllBits[j]='1' then Value:=Value+1 SHL (j-1); Delete(AllBits, 1, 5); if Value=0 then Out:=Out+' ' else Out:=Out+Chr(Value+64); end; ShowMessage(Out); end; |
ub60
|
|
Christian S.
Beiträge: 20451
Erhaltene Danke: 2264
Win 10
C# (VS 2019)
|
Verfasst: Do 17.04.14 20:03
So, ich bin endlich dazu gekommen, die Verlosung durchzuführen
Bitte schickt mir Eure Adressdaten, damit ich sie an den Verlag weitergeben kann.
_________________ Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Für diesen Beitrag haben gedankt: baumina, Mathematiker, Nersgatt, ub60
|
|
Mathematiker
Beiträge: 2622
Erhaltene Danke: 1447
Win 7, 8.1, 10
Delphi 5, 7, 10.1
|
Verfasst: Do 17.04.14 21:19
Vielen Dank für die tolle Nachricht. Das kommt sehr überraschend.
Frohe Ostern und nochmals Danke
Mathematiker
|
|
ub60
Beiträge: 762
Erhaltene Danke: 127
|
Verfasst: Fr 18.04.14 15:22
Da schaue ich doch hier im Urlaub auf Mallorca mal so "ganz zufällig" in der EE vorbei und habe gewonnen.
Das ist ja mal schick! Danke an die Glücksfee .
PS: Ich komme gerade mit Sonnenbrand vom Strand. Morgen sollen es bis 27 Grad werden. Grüße in die kalte Heimat!
ub60
|
|