Re: Error: function declaration without return type.

2015-01-07 Thread Tobias Pankrath via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 08:58:35 UTC, Suliman wrote: thanks! Am I right understand that in next code scope(exit) stmt.close(); occur after this execution? And it will close connection so stmt in function become unavailable. this(parseConfig parseconfig) {

Re: Error: function declaration without return type.

2015-01-07 Thread Suliman via Digitalmars-d-learn
thanks! Am I right understand that in next code scope(exit) stmt.close(); occur after this execution? And it will close connection so stmt in function become unavailable. this(parseConfig parseconfig) { [] auto conn = ds.getConnection();

Re: Copy only frame pointer between objects of nested struct

2015-01-07 Thread Peter Alexander via Digitalmars-d-learn
On Tuesday, 6 January 2015 at 23:32:25 UTC, Artur Skawina via That shows a static struct, so I'm not sure it's the same problem. static structs with template alias parameters to local symbols count as nested structs. Your solution would likely work, but yes, I'm looking for something less

Shouldn't the pointers be different

2015-01-07 Thread Nick via Digitalmars-d-learn
When i try to run the following code import std.stdio; void main(){ auto a= new test!int(); a.add(0); a.add(1); } class test(T){ void add(T e){ auto temp= new node(); writeln(new node, temp); } class node{

Re: Shouldn't the pointers be different

2015-01-07 Thread John Colvin via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 10:37:18 UTC, Nick wrote: When i try to run the following code import std.stdio; void main(){ auto a= new test!int(); a.add(0); a.add(1); } class test(T){ void add(T e){ auto temp= new node();

Re: Shouldn't the pointers be different

2015-01-07 Thread bearophile via Digitalmars-d-learn
Nick: The two nodes have the same address, is this right? What you are printing is the address of the reference in the stack frame of add(). If you want to print the reference you can use this: import std.stdio; class Test(T) { static class Node { T v; } void add(T

Re: Shouldn't the pointers be different

2015-01-07 Thread John Colvin via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 10:56:09 UTC, John Colvin wrote: On Wednesday, 7 January 2015 at 10:37:18 UTC, Nick wrote: When i try to run the following code import std.stdio; void main(){ auto a= new test!int(); a.add(0); a.add(1); } class test(T){ void

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread Laeeth Isharc via Digitalmars-d-learn
What you want is some kind of code obfuscation. The easiest thing for you is to use exe compression. It is not going to stop a dedicated attacker, but ordinary people will not be able to extract any information from it. And I guess as an alternative to the utility you linked to, you

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread Martin Drašar via Digitalmars-d-learn
Dne 7.1.2015 v 12:00 Laeeth Isharc via Digitalmars-d-learn napsal(a): What you want is some kind of code obfuscation. The easiest thing for you is to use exe compression. It is not going to stop a dedicated attacker, but ordinary people will not be able to extract any information from it.

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread Tobias Pankrath via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 14:18:53 UTC, FrankLike wrote: On Wednesday, 7 January 2015 at 11:00:54 UTC, Laeeth Isharc wrote: What you want is some kind of code obfuscation. The easiest thing for you is to use exe compression. It is not going to stop a dedicated attacker, but ordinary

Re: idiomatic D: what to use instead of pointers in constructing a tree data structure?

2015-01-07 Thread Baz via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 15:04:24 UTC, Paulo Pinto wrote: On Wednesday, 7 January 2015 at 15:02:34 UTC, Laeeth Isharc wrote: Not true. If you're using a tree structure, you *should* use pointers. Unless you're using classes, which are by-reference, in which case you can just use the

Re: setup problem wih dub

2015-01-07 Thread Rikki Cattermole via Digitalmars-d-learn
On 8/01/2015 4:48 p.m., Jason den Dulk wrote: Hi. Package in question: fpdf Dub version I'm using: 0.9.22 DMD version: 2.066.1 (64 bit) Platform: Fedora 19 (64-bit). I created the fpdf package, and it is dependant on the imageformats package, but it won't compile. When I place a copy of

Re: Conditional Compilation for Specific Windows

2015-01-07 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-01-07 20:48, Jonathan Marler wrote: I've looked up the windows version helper functions (http://msdn.microsoft.com/en-us/library/windows/desktop/dn424972(v=vs.85).aspx). The problem is that these functions are not defined in DMD's user32.lib. I could use the operating system's

setup problem wih dub

2015-01-07 Thread Jason den Dulk via Digitalmars-d-learn
Hi. Package in question: fpdf Dub version I'm using: 0.9.22 DMD version: 2.066.1 (64 bit) Platform: Fedora 19 (64-bit). I created the fpdf package, and it is dependant on the imageformats package, but it won't compile. When I place a copy of imageformats.d into the project source directory,

Re: idiomatic D: what to use instead of pointers in constructing a tree data structure?

2015-01-07 Thread Meta via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 23:27:19 UTC, anonymous wrote: Don't do this without `dup`ing. Quoting the documentation: Oh, whoops. I thought those special variadic args were always allocated on the heap.

Re: What does dmd 2.066 want from me?

2015-01-07 Thread yazd via Digitalmars-d-learn
If you have just installed a newer compiler and trying to link with older compiled code, then linking and other things can get wrong. I suggest recompiling all of your code using the new compiler.

Re: Error: function declaration without return type.

2015-01-07 Thread Ali Çehreli via Digitalmars-d-learn
On 01/06/2015 01:25 PM, Suliman wrote: On Tuesday, 6 January 2015 at 21:19:38 UTC, bearophile wrote: Suliman: void foo() { writeln(test); writeln(mystring); } foo(); } I guess you have to remove that line. Bye, bearophile Why? I can't call function in

Re: idiomatic D: what to use instead of pointers in constructing a tree data structure?

2015-01-07 Thread anonymous via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 20:25:10 UTC, Meta wrote: struct Tree { this(string data, Tree[] children...) { this.data = data; this.children = children; Don't do this without `dup`ing. Quoting the documentation: An implementation may construct the object or array

Re: import std.random fails

2015-01-07 Thread ixid via Digitalmars-d-learn
On Tuesday, 6 January 2015 at 20:49:34 UTC, Rene Zwanenburg wrote: On Tuesday, 6 January 2015 at 20:26:25 UTC, ixid wrote: Dmd latest non-beta, with the latest VisualD. Debug build. Debug build and no additional or non default settings. Hmm.. Did you verify that the D installation directory

Re: Conditional Compilation for Specific Windows

2015-01-07 Thread Jonathan Marler via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 18:50:40 UTC, Jacob Carlborg wrote: On 2015-01-07 19:27, Jonathan Marler wrote: I'm looking at the Windows multicast API. It has different socket options depending on if you are on Windows XP or Windows Vista (and later). Is there a way to tell at runtime

Re: idiomatic D: what to use instead of pointers in constructing a tree data structure?

2015-01-07 Thread Meta via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 16:17:47 UTC, Tobias Pankrath wrote: A slice seems overkill to refer to just one object, but is that the best way ? struct Tree { Tree[] children; } Is one way to do it. You can add some nice sugar for this as well: struct Tree { this(string data,

What does dmd 2.066 want from me?

2015-01-07 Thread Artem Tarasov via Digitalmars-d-learn
I'm trying to compile my software with the latest compiler, and it spits out the following error: $ make ... rdmd --force --build-only -IBioD -g -L-Lhtslib -L-l:libhts.a -L-l:libphobos2.a -ofbuild/sambamba.o main.d ...

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread Baz via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 17:57:18 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Wed, Jan 07, 2015 at 05:16:13PM +, FrankLike via Digitalmars-d-learn wrote: To hide the infos you can also (I've seen people say that you can use a packer) encrypt the strings and decode them at

Re: Enumerator Alias-Skipping Dynamic Iteration of Enum Members

2015-01-07 Thread Nordlöw
On Wednesday, 7 January 2015 at 18:27:48 UTC, bearophile wrote: foreach (immutable e; [EnumMembers!T].sort().uniq) Thanks!

Re: Why do the same work about 'IndexOfAny' and 'indexOf' function?

2015-01-07 Thread bearophile via Digitalmars-d-learn
FrankLike: But now I want to know in a string (like hello.exe or hello.a,or hello.dll or hello.lib ) whether contains any of them: [exe,dll,a,lib]. Seems this: http://rosettacode.org/wiki/File_extension_is_in_extensions_list#D Bye, bearophile

Re: Shouldn't the pointers be different

2015-01-07 Thread Nick via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 10:56:07 UTC, bearophile wrote: Nick: The two nodes have the same address, is this right? What you are printing is the address of the reference in the stack frame of add(). If you want to print the reference you can use this: import std.stdio; class

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread FrankLike via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 11:00:54 UTC, Laeeth Isharc wrote: What you want is some kind of code obfuscation. The easiest thing for you is to use exe compression. It is not going to stop a dedicated attacker, but ordinary people will not be able to extract any information from it.

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread John Colvin via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 14:33:16 UTC, Tobias Pankrath wrote: On Wednesday, 7 January 2015 at 14:18:53 UTC, FrankLike wrote: On Wednesday, 7 January 2015 at 11:00:54 UTC, Laeeth Isharc wrote: What you want is some kind of code obfuscation. The easiest thing for you is to use exe

Re: idiomatic D: what to use instead of pointers in constructing a tree data structure?

2015-01-07 Thread Laeeth Isharc via Digitalmars-d-learn
ref is a reserved keyword. doh! Thanks.

Re: Why do the same work about 'IndexOfAny' and 'indexOf' function?

2015-01-07 Thread FrankLike via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 15:11:57 UTC, John Colvin wrote: On Wednesday, 7 January 2015 at 14:54:51 UTC, FrankLike wrote: I want to know whether the string strs contains 'exe','dll','a','lib',in c#, I can do : int index = indexofany(strs,[exe,dll,a,lib]); but in D: I must to do like

Re: Conditional Compilation for Specific Windows

2015-01-07 Thread Paulo Pinto via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 19:48:16 UTC, Jonathan Marler wrote: On Wednesday, 7 January 2015 at 18:50:40 UTC, Jacob Carlborg wrote: On 2015-01-07 19:27, Jonathan Marler wrote: I'm looking at the Windows multicast API. It has different socket options depending on if you are on Windows XP

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Jan 07, 2015 at 08:36:19PM +, Baz via Digitalmars-d-learn wrote: On Wednesday, 7 January 2015 at 17:57:18 UTC, H. S. Teoh via Digitalmars-d-learn wrote: [...] Note that these encryption/decryption schemes can only serve as deterrent to the casual user, they do not prevent a

Re: What does dmd 2.066 want from me?

2015-01-07 Thread Rikki Cattermole via Digitalmars-d-learn
On 8/01/2015 9:10 a.m., Artem Tarasov wrote: I'm trying to compile my software with the latest compiler, and it spits out the following error: $ make ... rdmd --force --build-only -IBioD -g -L-Lhtslib -L-l:libhts.a -L-l:libphobos2.a -ofbuild/sambamba.o main.d ...

idiomatic D: what to use instead of pointers in constructing a tree data structure?

2015-01-07 Thread Laeeth Isharc via Digitalmars-d-learn
Another schoolboy question. Suppose I am constructing a tree (in this case it is an AST). In C I would have a pointer for the child to find the parent, and an array or linked list of pointers to find the children from the parent. Obviously, I could still use pointers, but that would not be

Why do the same work about 'IndexOfAny' and 'indexOf' function?

2015-01-07 Thread FrankLike via Digitalmars-d-learn
I want to know whether the string strs contains 'exe','dll','a','lib',in c#, I can do : int index = indexofany(strs,[exe,dll,a,lib]); but in D: I must to do like this: findStr(strs,[exe,lib,dll,a])) bool findStr(string strIn,string[] strFind) { bool bFind = false;

Re: Why do the same work about 'IndexOfAny' and 'indexOf' function?

2015-01-07 Thread John Colvin via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 14:54:51 UTC, FrankLike wrote: I want to know whether the string strs contains 'exe','dll','a','lib',in c#, I can do : int index = indexofany(strs,[exe,dll,a,lib]); but in D: I must to do like this: findStr(strs,[exe,lib,dll,a])) bool findStr(string

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread Tobias Pankrath via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 16:23:38 UTC, John Colvin wrote: On Wednesday, 7 January 2015 at 16:15:49 UTC, Tobias Pankrath wrote: http://dpaste.dzfl.pl/3bbdecfefa5c I'm not sure about some of that. Bad casts w.r.t. immutability etc. How about: http://dpaste.dzfl.pl/706ab2db9ce1 I

Re: string concatenation with %s

2015-01-07 Thread Justin Whear via Digitalmars-d-learn
On Wed, 07 Jan 2015 16:38:23 +, Suliman wrote: I except that writefln have some behavior as string concatenation, but it does not. IS there any way to put needed values in place of %s in string? std.string.format interpolates string with the same behavior as writefln but returns the

Re: string concatenation with %s

2015-01-07 Thread Gary Willoughby via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 16:38:25 UTC, Suliman wrote: I need to construct complex SQL request, like: string sql = (INSERT INTO test.geomagnetic (`date`, `a_fredericksburg`, `fredericksburg`, `a_college`, `college`, `a_planetary`, `planetary`) VALUES ('%s', '%s', '%s', '%s', '%s',

Re: Why do the same work about 'IndexOfAny' and 'indexOf' function?

2015-01-07 Thread FrankLike via Digitalmars-d-learn
std.algorithm.find has several overloads, one of which takes multiple needles. The same is true for std.algorithm.canFind Quoting from the relevant std.algorithm.find overload docs: Finds two or more needles into a haystack. string strs =hello.exe; string[] s =[lib,exe,a,dll]; auto a =

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread FrankLike via Digitalmars-d-learn
I would keep the encryption inside a template to prevent users from assigning it to a variable without triggering CTFE. Why would that be a problem? Because the plain text will be in the object file. http://dpaste.dzfl.pl/95b17fff42c6 Take a look at the object file and you will find

Re: Why do the same work about 'IndexOfAny' and 'indexOf' function?

2015-01-07 Thread H. S. Teoh via Digitalmars-d-learn
Try this: http://dlang.org/phobos-prerelease/std_algorithm#.findAmong T -- MACINTOSH: Most Applications Crash, If Not, The Operating System Hangs

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread John Colvin via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 16:45:11 UTC, Tobias Pankrath wrote: On Wednesday, 7 January 2015 at 16:23:38 UTC, John Colvin wrote: On Wednesday, 7 January 2015 at 16:15:49 UTC, Tobias Pankrath wrote: http://dpaste.dzfl.pl/3bbdecfefa5c I'm not sure about some of that. Bad casts w.r.t.

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread Baz via Digitalmars-d-learn
On Tuesday, 6 January 2015 at 17:15:28 UTC, FrankLike wrote: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows? If you build a exe ,such as which can get Data from DataBase,when you modify the exe's extension to 'txt', and you open it

Re: Why do the same work about 'IndexOfAny' and 'indexOf' function?

2015-01-07 Thread John Colvin via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 15:57:18 UTC, FrankLike wrote: On Wednesday, 7 January 2015 at 15:11:57 UTC, John Colvin wrote: On Wednesday, 7 January 2015 at 14:54:51 UTC, FrankLike wrote: I want to know whether the string strs contains 'exe','dll','a','lib',in c#, I can do : int index =

string concatenation with %s

2015-01-07 Thread Suliman via Digitalmars-d-learn
I need to construct complex SQL request, like: string sql = (INSERT INTO test.geomagnetic (`date`, `a_fredericksburg`, `fredericksburg`, `a_college`, `college`, `a_planetary`, `planetary`) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s');, date[i], a_fredericksburg[i], fredericksburg[i],

Re: string concatenation with %s

2015-01-07 Thread bearophile via Digitalmars-d-learn
Suliman: I need to construct complex SQL request, like: string sql = (INSERT INTO test.geomagnetic (`date`, `a_fredericksburg`, `fredericksburg`, `a_college`, `college`, `a_planetary`, `planetary`) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s');, date[i], a_fredericksburg[i],

Re: idiomatic D: what to use instead of pointers in constructing a tree data structure?

2015-01-07 Thread Tobias Pankrath via Digitalmars-d-learn
A slice seems overkill to refer to just one object, but is that the best way ? struct Tree { Tree[] children; } Is one way to do it.

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread Tobias Pankrath via Digitalmars-d-learn
http://dpaste.dzfl.pl/3bbdecfefa5c I'm not sure about some of that. Bad casts w.r.t. immutability etc. How about: http://dpaste.dzfl.pl/706ab2db9ce1 I would keep the encryption inside a template to prevent users from assigning it to a variable without triggering CTFE.

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread FrankLike via Digitalmars-d-learn
How about: http://dpaste.dzfl.pl/706ab2db9ce1 Thanks.

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread FrankLike via Digitalmars-d-learn
http://dpaste.dzfl.pl/3bbdecfefa5c Thanks.

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread John Colvin via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 16:15:49 UTC, Tobias Pankrath wrote: http://dpaste.dzfl.pl/3bbdecfefa5c I'm not sure about some of that. Bad casts w.r.t. immutability etc. How about: http://dpaste.dzfl.pl/706ab2db9ce1 I would keep the encryption inside a template to prevent users from

Re: Why do the same work about 'IndexOfAny' and 'indexOf' function?

2015-01-07 Thread Tobias Pankrath via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 16:02:25 UTC, bearophile wrote: FrankLike: But now I want to know in a string (like hello.exe or hello.a,or hello.dll or hello.lib ) whether contains any of them: [exe,dll,a,lib]. Seems this: http://rosettacode.org/wiki/File_extension_is_in_extensions_list#D

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Jan 07, 2015 at 05:16:13PM +, FrankLike via Digitalmars-d-learn wrote: To hide the infos you can also (I've seen people say that you can use a packer) encrypt the strings and decode them at run-time (e.g base64, a simple XOR, etc) and use the import() idiom:

Re: Enumerator Alias-Skipping Dynamic Iteration of Enum Members

2015-01-07 Thread bearophile via Digitalmars-d-learn
Nordlöw: How do I make foreach (E; EnumMembers!T) - iterate dynamically instead of statically (no loop unrolling) and - skip enumerator aliases? Try: foreach (immutable e; [EnumMembers!T].sort().uniq) Bye, bearophile

Enumerator Alias-Skipping Dynamic Iteration of Enum Members

2015-01-07 Thread Nordlöw
How do I make foreach (E; EnumMembers!T) - iterate dynamically instead of statically (no loop unrolling) and - skip enumerator aliases?

Conditional Compilation for Specific Windows

2015-01-07 Thread Jonathan Marler via Digitalmars-d-learn
I'm looking at the Windows multicast API. It has different socket options depending on if you are on Windows XP or Windows Vista (and later). Is there a way to tell at runtime which version of windows you are on? Note: I'm specifically talking about runtime because I want the same binary to

Re: Conditional Compilation for Specific Windows

2015-01-07 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-01-07 19:27, Jonathan Marler wrote: I'm looking at the Windows multicast API. It has different socket options depending on if you are on Windows XP or Windows Vista (and later). Is there a way to tell at runtime which version of windows you are on? Note: I'm specifically talking about

Re: Conditional Compilation for Specific Windows

2015-01-07 Thread Jonathan Marler via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 18:50:40 UTC, Jacob Carlborg wrote: On 2015-01-07 19:27, Jonathan Marler wrote: I'm looking at the Windows multicast API. It has different socket options depending on if you are on Windows XP or Windows Vista (and later). Is there a way to tell at runtime

Re: Conditional Compilation for Specific Windows

2015-01-07 Thread Jonathan Marler via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 18:50:40 UTC, Jacob Carlborg wrote: On 2015-01-07 19:27, Jonathan Marler wrote: I'm looking at the Windows multicast API. It has different socket options depending on if you are on Windows XP or Windows Vista (and later). Is there a way to tell at runtime

Re: idiomatic D: what to use instead of pointers in constructing a tree data structure?

2015-01-07 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Jan 07, 2015 at 02:52:51PM +, Laeeth Isharc via Digitalmars-d-learn wrote: Another schoolboy question. Suppose I am constructing a tree (in this case it is an AST). In C I would have a pointer for the child to find the parent, and an array or linked list of pointers to find the

Re: idiomatic D: what to use instead of pointers in constructing a tree data structure?

2015-01-07 Thread Laeeth Isharc via Digitalmars-d-learn
Not true. If you're using a tree structure, you *should* use pointers. Unless you're using classes, which are by-reference, in which case you can just use the class as-is. :-) Thanks v much. I just came to that realization also when I stepped away. class node { string name;

Re: idiomatic D: what to use instead of pointers in constructing a tree data structure?

2015-01-07 Thread Paulo Pinto via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 15:02:34 UTC, Laeeth Isharc wrote: Not true. If you're using a tree structure, you *should* use pointers. Unless you're using classes, which are by-reference, in which case you can just use the class as-is. :-) Thanks v much. I just came to that realization

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread FrankLike via Digitalmars-d-learn
To hide the infos you can also (I've seen people say that you can use a packer) encrypt the strings and decode them at run-time (e.g base64, a simple XOR, etc) and use the import() idiom: https://p0nce.github.io/d-idioms/#Embed-a-dynamic-library-in-an-executable to import the compiled

Re: string concatenation with %s

2015-01-07 Thread Suliman via Digitalmars-d-learn
Please show the _clean_ input, followed by an output example. Bye, bearophile to prevent visual corruption I had past it here: http://www.everfall.com/paste/id.php?ftzy9lxr6yfy Just FYI use prepared statements instead of string concatenation for SQL queries. You mean some tools, that

Re: string concatenation with %s

2015-01-07 Thread Suliman via Digitalmars-d-learn
std.string.format interpolates string with the same behavior as writefln Thanks!

Re: string concatenation with %s

2015-01-07 Thread novice2 via Digitalmars-d-learn
what if a_college[i] will contain ` char? almost SQL have prepare statement...