This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std; | |
void main() | |
{ | |
writeln("Hello D"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std; | |
void main() | |
{ | |
long z = 0b101010; | |
string zStr = format("%b",z); | |
int t = 1100; | |
string tStr = format("%b",t); | |
writeln("z = :",zStr); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.stdio; | |
void main() | |
{ | |
string[string] aa; | |
string x = "xxx"; | |
aa["name"] = "Arthur"; | |
aa["quest"] = "seek the Holy Grail"; | |
aa["favoriteColor"] = "blue"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- test.d | |
module test; | |
import libweb; | |
import std; | |
void main() | |
{ | |
writeln("test"); | |
runClient(); | |
runServer(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- test.d | |
module test; | |
import libweb; | |
import std; | |
void main() | |
{ | |
writeln("test"); | |
runClient(); | |
runServer(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- test.d | |
module test; | |
import libweb; | |
void main() | |
{ | |
runClient(); | |
runServer(); | |
runConv(); | |
runText(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std; | |
void main() | |
{ | |
foreach (n; 1 .. 101) | |
{ | |
string rules = ( | |
(n % 3 == 0 ? "Fizz" : "") ~ | |
(n % 5 == 0 ? "Buzz" : "") | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std; | |
void main() | |
{ | |
foreach (n; 1..101) { | |
string rules = ( | |
(n % 3 == 0 ? "Fizz" : "") ~ | |
(n % 5 == 0 ? "Buzz" : "") | |
); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.stdio; | |
import sqlite; | |
void main() | |
{ | |
SQLite db = new SQLite(); // Crea una instancia de la base de datos | |
if (db.open("mi_basededatos.db") == SqlResult.SQL_OK) | |
{ | |
// Realiza una consulta simple | |
string query = "SELECT * FROM tabla"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.stdio; | |
import std.datetime; | |
import std.stdint; | |
import std.conv; | |
class Writer | |
{ | |
this(void delegate() del) | |
{ | |
_del = del; |
NewerOlder