Use std.path.expandTilde() ->
http://dlang.org/phobos/std_path.html#expandTilde
On 13.4.2012 18:02, Minas wrote:
> I am trying to create a file in ~/.config
> My code is:
>
> [code]
> import std.stdio;
>
> void main()
> {
> auto f = File("~/.config/minas.txt", "w");
> }
> [/code]
>
> Howeve
[Excepció:
std.conv.ConvException@/usr/include/d2/4.6/std/conv.d(1640): Can't
convert value `HTT' of type string to type uint]
2012/1/20 Bystroushaak:
On 20.1.2012 18:42, Xan xan wrote:
Thank you very much. I should invite you to a beer ;-)
Write me if you will be in prag/czech republic
2012/1/20 Bystroushaak:
On 20.1.2012 18:42, Xan xan wrote:
Thank you very much. I should invite you to a beer ;-)
Write me if you will be in prag/czech republic :)
For the other hand,
I get this error:
[Excepció: std.conv.ConvException@/usr/include/d2/4.6/std/conv.d(1640):
Can't convert valu
On 20.1.2012 18:42, Xan xan wrote:
Thank you very much. I should invite you to a beer ;-)
Write me if you will be in prag/czech republic :)
For the other hand,
I get this error:
[Excepció: std.conv.ConvException@/usr/include/d2/4.6/std/conv.d(1640):
Can't convert value `HTT' of type string
rawWrite():
stdout.rawWrite(cast(ubyte[]) navegador.get(a));
On 20.1.2012 18:18, Xan xan wrote:
Mmmm... I understand it. But is there any way of circumvent it?
Perhaps I could write to one file, isn't?
2012/1/20 Bystroushaak:
Thats because you are trying writeln binary data, and th
/std/conv.d(1640):
Can't convert value `HTT' of type string to type uint]
The code:
//D 2.0
//gdmd-4.6 => surt el fitxer amb el mateix nom i .o
//Usa https://github.com/Bystroushaak/DHTTPClient
import std.stdio, std.string, std.conv, std.stream;
import std.socket, std.sockets
in this case: image/png
Here is full example:
https://github.com/Bystroushaak/DHTTPClient/blob/master/examples/download_binary_file.d
On 20.1.2012 18:00, Bystroushaak wrote:
It is unlimited, you just have to cast output to ubyte[]:
std.file.write("logo3w.png", cast(ubyte[])
It is unlimited, you just have to cast output to ubyte[]:
std.file.write("logo3w.png", cast(ubyte[])
cl.get("http://www.google.cz/images/srpr/logo3w.png";));
On 20.1.2012 17:53, Xan xan wrote:
Thank you very much, Bystroushaak.
I see you limite httpclient to xml/html
First version was buggy. I've updated code at github, so if you want to
try it, pull new version (git pull). I've also added new example into
examples/user_agent_change.d
On 20.1.2012 16:08, Bystroushaak wrote:
There are two ways:
Change global variable
There are two ways:
Change global variable for module:
dhttpclient.DefaultHeaders = dhttpclient.IEHeaders; // or your own
This will change headers for all clients.
---
Change instance headers:
string[string] my_headers = dhttpclient.FFHeaders; // there are more
headers than just User-Agent
This module is very simple, only for HTTP protocol, but there is way how
to add HTTPS:
public void setTcpSocketCreator(TcpSocket function(string domain, ushort
port) fn)
You can add lambda function which return SSL socket, which will be
called for every connection.
FTP is not supported - i
Client'
spider.o:(.data+0x24): undefined reference to `_D11dhttpclient12__ModuleInfoZ'
collect2: ld returned 1 exit status
with the file spider.d:
//D 2.0
//gdmd-4.6 => surt el fitxer amb el mateix nom i .o
//Usa https://github.com/Bystroushaak/DHTTPClient
import std.stdio, std.string
You can always use my module:
https://github.com/Bystroushaak/DHTTPClient
On 19.1.2012 20:24, Timon Gehr wrote:
On 01/19/2012 04:30 PM, Xan xan wrote:
Hi,
I want to simply code a script to get the url as string in D 2.0.
I have this code:
//D 2.0
//gdmd-4.6
import std.stdio, std.string
Bump with tits:
(o )( o)
On 5.1.2012 23:00, Bystroushaak wrote:
Hi.
Is there any way how to get MX records for given domain? I don't want to
implement whole RFC 1034/5.
I've looked at std.net.isemail, but it doesn't looks like what I need :/
Hi.
Is there any way how to get MX records for given domain? I don't want to
implement whole RFC 1034/5.
I've looked at std.net.isemail, but it doesn't looks like what I need :/
I've created HTTP client module. It's just http module, no cookies, no
https, so if you need something small, try it.
https://github.com/Bystroushaak/DHTTPClient
On 13.12.2011 18:29, Kai Meyer wrote:
> I've been trying to modify the htmlget.d example for std.socketstre
Yep. Useful google dork: sandbox.
On 14.12.2011 19:55, mta`chrono wrote:
> Maybe you should use a VM to run your restricted applications. Or have a
> look a chroot, dchroot or schroot, to setup such stuff. The Programming
> Language will not help you in this case!
I'm using linux too. I tried all IDEs for D, but all of them was
pretty lame, so I'm using Kate/Geany.
> I don't find an important feature: renaming variables/functions/etc.
BTW: It's called refactoring.
Oh, ok, thanks for your answer.
2011/11/4 Jonathan M Davis :
> On Thursday, November 03, 2011 16:58 Lishaak Bystroushaak wrote:
>> Hello.
>>
>> Is there any way how to format date with formating strings? Something
>> like strftime in python;
>> http://docs
Hello.
Is there any way how to format date with formating strings? Something
like strftime in python;
http://docs.python.org/library/datetime.html#strftime-and-strptime-behavior
20 matches
Mail list logo