On Sunday, 20 June 2021 at 12:34:33 UTC, vnr wrote:
I don't understand why the image doesn't display, when I take
an image from the internet and give the url, it works fine
though.
maybe this works:
const auto rndimg = format("/images/rndimg/img%d.jpg", a);
Also, is this a good way to
On Sunday, 20 June 2021 at 12:34:33 UTC, vnr wrote:
I don't understand why the image doesn't display, when I take
an image from the internet and give the url, it works fine
though.
```
$ curl -s http://127.0.0.1:8080/|grep img
```
This is a relative URL, so to satisfy it the
On Sunday, 20 June 2021 at 14:28:26 UTC, jfondren wrote:
On Sunday, 20 June 2021 at 13:58:22 UTC, vnr wrote:
Thanks for the answers, I understand better what is going on.
So, what should I do to make my server respond with a random
image, and not the random image page? I'm fairly new to
Hello,
I would like to display a random image each time a page is
refreshed. I think my random function works, but the image does
not appear on the page. I have this template:
```
/public
/images
/rndimg
img1.jpg
img2.jpg
img3.jpg
/source
On Sunday, 20 June 2021 at 13:06:20 UTC, jfondren wrote:
On Sunday, 20 June 2021 at 12:34:33 UTC, vnr wrote:
I don't understand why the image doesn't display, when I take
an image from the internet and give the url, it works fine
though.
```
$ curl -s http://127.0.0.1:8080/|grep img
On Sunday, 20 June 2021 at 13:58:22 UTC, vnr wrote:
Thanks for the answers, I understand better what is going on.
So, what should I do to make my server respond with a random
image, and not the random image page? I'm fairly new to vibe.d,
so I don't yet know the intricacies of how to handle
I often need to iterate through a filtered collection
(associative array) as following:
```d
string strComputerIDunwanted = "WS2"; /// associative array key
to exclude
foreach (strComputerID, udtComputer; udtComputers) { ///
.remove!(a => a == strComputerIDunwanted) ... ?
if
I mean, coding as following:
```d
int intWhatever = 0; /// default being zero anyway
foreach (classComputer objComputer, objComputers) { ... } ///
explicitly declaring the type instead of letting the compiler to
figure it out
struc Whatever {
public doSomething() { ... } /// explicitly
i.e append an array of elements into another array:
```Python
x = [1, 2, 3]
x.extend([4, 5])
print(x) # [1, 2, 3, 4, 5]
```
Thanks.
Since memory serves I use to name files with - instead of the
more common _
10 matches
Mail list logo