On Monday, 19 October 2015 at 03:33:18 UTC, holo wrote:
ok i fugure out it. When i do initiation i need to add
dependencies (thought it is enough to add them to sdl file).
Proper initiation should look like that:
dub init projectname kxml
No, you should never need to do that. I think your
Select parent tags and get data from their child tags like
instanceId.
On Monday, 19 October 2015 at 11:53:08 UTC, Kagamin wrote:
On Monday, 19 October 2015 at 04:49:25 UTC, holo wrote:
Why there is needed that "//" before tag?
That's an XPath expression.
Need, to read about that XPaths.
How to drop tags from respond? I have such result of parsing
by id
Sorry i was trying to use that XPaths to take out instanceId and
laounchTime but i always get an empty respond.
//instanceId/launchTime" - empty
//instanceId/* - empty too
//instanceId.launchTime - empty too
How to take instance id and variable which im interest in or
few/all for
On Monday, 19 October 2015 at 04:49:25 UTC, holo wrote:
Why there is needed that "//" before tag?
That's an XPath expression.
How to drop tags from respond? I have such result of parsing by
id tag:
i-xx
I need only value. Is there some equivalent to ".text" from
std.xml?
Try
On Monday, 19 October 2015 at 06:20:19 UTC, Mike Parker wrote:
On Monday, 19 October 2015 at 03:33:18 UTC, holo wrote:
ok i fugure out it. When i do initiation i need to add
dependencies (thought it is enough to add them to sdl file).
Proper initiation should look like that:
dub init
On Monday, 19 October 2015 at 12:54:52 UTC, Kagamin wrote:
Select parent tags and get data from their child tags like
instanceId.
void main()
{
string xmlstring = cast(string)read("test.xml");
XmlNode newdoc = xmlstring.readDocument();
XmlNode[] searchlist =
Is the following possible in D? To call a (unary) function f
with variable a, and let f print:
Called with argument named 'a'.
I am of course asking for a generic solution, independent of the
actual variable name (in this case, 'a'). I am aware that I am
likely asking the impossible
On Monday, 19 October 2015 at 14:28:06 UTC, Namal wrote:
Is it possible to create a foreach loop with a breakstetemen?
I mean something like that for the second loop where i want to
break if element from:
int [] g = [9,15,21];
int [] v = [2,3,5,7,8,9,11,13,17,19];
foreach(j;1..10)
for(int
On 20/10/15 3:28 AM, Namal wrote:
Is it possible to create a foreach loop with a breakstetemen?
I mean something like that for the second loop where i want to break if
element from:
int [] g = [9,15,21];
int [] v = [2,3,5,7,8,9,11,13,17,19];
foreach(j;1..10)
for(int i = 0; v[i]
I'm working with a library that has template structs of
mathematical vectors that can sometimes be the type of an array
I'm passing to a function.
The definition of the struct is like this:
struct Vector(type, int dimension_){ ... }
Where type is going to be an int/float/etc and dimension_
On Monday, October 19, 2015 04:14 PM, Handyman wrote:
> Is the following possible in D? To call a (unary) function f
> with variable a, and let f print:
>
>> Called with argument named 'a'.
>
> I am of course asking for a generic solution, independent of the
> actual variable name (in this
On Monday, October 19, 2015 04:51 PM, Stewart Moth wrote:
> struct Vector(type, int dimension_){ ... }
>
> Where type is going to be an int/float/etc and dimension_ is
> 2/3/4.
>
> I could write a bunch of functions for each case, but I'd rather
> not... I'd like to use something like the
Is it possible to create a foreach loop with a breakstetemen?
I mean something like that for the second loop where i want to
break if element from:
int [] g = [9,15,21];
int [] v = [2,3,5,7,8,9,11,13,17,19];
foreach(j;1..10)
for(int i = 0; v[i]
V Mon, 19 Oct 2015 14:28:03 +
Namal via Digitalmars-d-learn
napsáno:
> Is it possible to create a foreach loop with a breakstetemen?
>
> I mean something like that for the second loop where i want to
> break if element from:
>
> int [] g = [9,15,21];
>
On Mon, 19 Oct 2015 14:51:28 +, Stewart Moth wrote:
> I'm working with a library that has template structs of mathematical
> vectors that can sometimes be the type of an array I'm passing to a
> function.
>
> The definition of the struct is like this:
>
> struct Vector(type, int
If you don't want parent tag, then:
XmlNode[] searchlist2 = newdoc.parseXPath("//launchTime");
On Monday, 19 October 2015 at 14:43:04 UTC, Rikki Cattermole
wrote:
On 20/10/15 3:28 AM, Namal wrote:
Is it possible to create a foreach loop with a breakstetemen?
I mean something like that for the second loop where i want to
break if
element from:
int [] g = [9,15,21];
int [] v =
Is it possible to use foreach backwards?
foreach(int i;20..1)
writeln(i);
compiles but I get nothing.
On Sunday, 18 October 2015 at 21:44:57 UTC, Jonathan M Davis
wrote:
startsWith doesn't have an overload that takes only a
predicate. The existing overloads all require at least one
"needle" to search for in the "haystack." An overload that
doesn't require a needle could certainly be added, but
On Monday, 19 October 2015 at 16:12:56 UTC, Kagamin wrote:
If you don't want parent tag, then:
XmlNode[] searchlist2 = newdoc.parseXPath("//launchTime");
I wanted parent tag, i think. I almost figure out what i needed,
but getCData stops working :/
void main()
{
string xmlstring =
I have no idea what i'm doing, but i did it (i just choose 1
element of array):
void main()
{
string xmlstring = cast(string)read("test.xml");
XmlNode newdoc = xmlstring.readDocument();
XmlNode[] searchlist =
newdoc.parseXPath(`//instancesSet/item`);
foreach(list;
On Monday, 19 October 2015 at 15:56:00 UTC, Namal wrote:
Is it possible to use foreach backwards?
yes
http://dlang.org/statement.html#ForeachStatement
http://dpaste.dzfl.pl/cf847a9e1595
On Monday, 19 October 2015 at 15:56:00 UTC, Namal wrote:
Is it possible to use foreach backwards?
foreach(int i;20..1)
writeln(i);
compiles but I get nothing.
foreach_reverse(i; 1 .. 20)
writeln(i);
Or:
import std.range : iota, retro;
foreach(i; iota(1, 20).retro)
writeln(i);
But
24 matches
Mail list logo