On Saturday, 29 February 2020 at 03:53:37 UTC, David Anderson
wrote:
I want to capture that text in a variable, but the upload
function returns void. How can I get the text returned by the
web server to be stored in a variable?
import std;
auto updata = read("inputfile");
auto dldata =
I'm working with std.net.curl. Using curl on the command line I
can do this:
curl -T file.txt http://localhost:9998/tika
and it returns text as a result.
When I attempt to do the same thing in D code as follows:
import std.net.curl;
upload("file.txt",
On Friday, 28 February 2020 at 18:34:08 UTC, cc wrote:
This compiles:
class Foo {
int x;
@(1) void y() {}
this() {
static foreach (idx, field; getSymbolsByUDA!(Foo, 1)) {
}
}
}
This does not:
class Foo {
@(1) int x;
On Thursday, 27 February 2020 at 21:46:08 UTC, Bruce Carneal
wrote:
On Thursday, 27 February 2020 at 19:46:23 UTC, Basile B. wrote:
[...]
The code below is the test jig that I'm using currently. It is
adopted from yours but has added the -d=distribution command
line option.
[...]
Yes I
This compiles:
class Foo {
int x;
@(1) void y() {}
this() {
static foreach (idx, field; getSymbolsByUDA!(Foo, 1)) {
}
}
}
This does not:
class Foo {
@(1) int x;
void y() {}
this() {
static
On Friday, 28 February 2020 at 16:51:10 UTC, AB wrote:
See https://dlang.org/spec/operatoroverloading.html#array-ops
for a better overview of the required operators or mir.ndslice
for an nD implementation.
Here's an old version of some of the things I've been using:
On Thursday, 27 February 2020 at 14:15:26 UTC, p.shkadzko wrote:
I'd like to sum 2D arrays. Let's create 2 random 2D arrays and
sum them.
```
import std.random : Xorshift, unpredictableSeed, uniform;
import std.range : generate, take, chunks;
import std.array : array;
static T[][]
On Friday, 28 February 2020 at 10:11:23 UTC, Bruce Carneal wrote:
On Friday, 28 February 2020 at 06:50:55 UTC, 9il wrote:
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B.
wrote:
So after reading the translation of RYU I was interested too
see if the decimalLength() function can be
On Friday, 28 February 2020 at 12:48:17 UTC, mipri wrote:
On Friday, 28 February 2020 at 12:44:52 UTC, Namal wrote:
Hello,
I don't understand why this simple code causes a compiler
error..
import std.stdio;
void main(){
int b = 0;
for (b; b<3; b++){
writeln(b);
}
}
On Friday, 28 February 2020 at 12:44:52 UTC, Namal wrote:
Hello,
I don't understand why this simple code causes a compiler
error..
import std.stdio;
void main(){
int b = 0;
for (b; b<3; b++){
writeln(b);
}
}
$Error: b has no effect
Well, that's the error. b has no
Hello,
I don't understand why this simple code causes a compiler error..
import std.stdio;
void main(){
int b = 0;
for (b; b<3; b++){
writeln(b);
}
}
$Error: b has no effect
Same works perfectly fine in C++
#include
int main(){
int i = 0;
for(i; i<3; i++)
On Friday, 28 February 2020 at 10:11:23 UTC, Bruce Carneal wrote:
On Friday, 28 February 2020 at 06:50:55 UTC, 9il wrote:
bsr can be done in one/two CPU operation, quite quick. But
core.bitop.bsr wouldn't be inlined. Instead, mir-core
(mir.bitop: ctlz) or LDC intrinsics llvm_ctlz can be used
On Friday, 28 February 2020 at 10:33:11 UTC, Виталий Фадеев wrote:
Thanks all !
I happy !
Check this one:
void On( T, M )( T o, M message )
{
[snip]
void main()
{
auto a = new A();
a.Send( a, WM_KEYUP );
a.Send( a, WM_KEYDOWN );
}
That does mostly
On Friday, 28 February 2020 at 10:11:23 UTC, Bruce Carneal wrote:
On Friday, 28 February 2020 at 06:50:55 UTC, 9il wrote:
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B.
wrote:
So after reading the translation of RYU I was interested too
see if the decimalLength() function can be
On Friday, 28 February 2020 at 10:20:03 UTC, Виталий Фадеев wrote:
On Friday, 28 February 2020 at 10:14:41 UTC, Виталий Фадеев
wrote:
On Friday, 28 February 2020 at 09:49:53 UTC, Simen Kjærås
wrote:
On Friday, 28 February 2020 at 09:25:58 UTC, Виталий Фадеев
wrote:
[...]
So let's create a
On Friday, 28 February 2020 at 10:14:41 UTC, Виталий Фадеев wrote:
On Friday, 28 February 2020 at 09:49:53 UTC, Simen Kjærås wrote:
On Friday, 28 February 2020 at 09:25:58 UTC, Виталий Фадеев
wrote:
[...]
So let's create a template for that:
[...]
Cool!
Think!
I writing code generation.
On Friday, 28 February 2020 at 06:50:55 UTC, 9il wrote:
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B. wrote:
So after reading the translation of RYU I was interested too
see if the decimalLength() function can be written to be
faster, as it cascades up to 8 CMP.
[...]
bsr can
On Friday, 28 February 2020 at 09:49:53 UTC, Simen Kjærås wrote:
On Friday, 28 February 2020 at 09:25:58 UTC, Виталий Фадеев
wrote:
[...]
So let's create a template for that:
[...]
Cool!
On Friday, 28 February 2020 at 09:25:58 UTC, Виталий Фадеев wrote:
Yes. Thank !
I read it.
Problem is - OS has many messages + user messages... It mean
what interfaces like IKeyDown must me declared. All. Dream on
write less code...
So let's create a template for that:
interface
On 2/28/20 12:25 PM, Виталий Фадеев wrote:
Now I reading Template doc for up skill...
I recommend this nice tutorial
https://github.com/PhilippeSigaud/D-templates-tutorial
On Friday, 28 February 2020 at 09:12:38 UTC, Simen Kjærås wrote:
On Friday, 28 February 2020 at 06:12:37 UTC, Виталий Фадеев
wrote:
Searching solution for idea !
For whatever reason, it seems my attempts at answering this
earlier has disappeared into the void. Here:
import
On 2/28/20 11:48 AM, Namal wrote:
Hello,
I don't understand why this simple code causes a compiler error..
import std.stdio;
void main(){
int b = 0;
for (b; b<3; b++){
writeln(b);
}
}
$Error: b has no effect
Same works perfectly fine in C++
#include
int main(){
int i = 0;
On Friday, 28 February 2020 at 06:12:37 UTC, Виталий Фадеев wrote:
Searching solution for idea !
For whatever reason, it seems my attempts at answering this
earlier has disappeared into the void. Here:
import core.sys.windows.windows;
import std.stdio;
class Base {
LRESULT On(UINT
Hello,
I don't understand why this simple code causes a compiler error..
import std.stdio;
void main(){
int b = 0;
for (b; b<3; b++){
writeln(b);
}
}
$Error: b has no effect
Same works perfectly fine in C++
#include
int main(){
int i = 0;
for(i; i<3; i++)
On Friday, 28 February 2020 at 08:36:53 UTC, mipri wrote:
On Friday, 28 February 2020 at 08:08:59 UTC, Виталий Фадеев
wrote:
[...]
The pattern throughout Phobos is static tests, like
isInputRange!R
[...]
It cool !
I will try !
Thank you !
On Friday, 28 February 2020 at 08:08:59 UTC, Виталий Фадеев wrote:
Searching for beauty readable code...
The pattern throughout Phobos is static tests, like isInputRange!R
So something like this:
import std.stdio;
import std.traits;
template canOnKey(T) {
static if
On Friday, 28 February 2020 at 08:08:59 UTC, Виталий Фадеев wrote:
On Friday, 28 February 2020 at 06:12:37 UTC, Виталий Фадеев
wrote:
Searching solution for idea !
Goal is to get System message, dispatch/route to method !
If method implemented only !
I dream on in future write clean code of a
On Friday, 28 February 2020 at 06:12:37 UTC, Виталий Фадеев wrote:
Searching solution for idea !
Goal is to get System message, dispatch/route to method !
If method implemented only !
I dream on in future write clean code of a derived widgets like
this :
class Base
{
//
28 matches
Mail list logo