14 questions from the last 7 days
0
votes
0
answers
7
views
How to randomly show top 10 records from an xml feed?
Here in my WordPress plugin I am using the following Code to read an xml feed.
$itsw_rss_feed = simplexml_load_file($itsw_feedurls[wp_rand(0,count($itsw_feedurls) - 1)]);
then using a for loop I am ...
-8
votes
0
answers
94
views
Array of pointer to objects [closed]
I'm using C#. I have a certain number of Newtonsoft.Json.Linq.JArray, let's say A123, A124, A125, and so on.
I need to create an array or something similar of this objects in a way that, if I do ...
5
votes
0
answers
180
views
Why is my user-defined contiguous 2D array not dramatically faster than std::vector<std::vector<>>?
I implemented a simple 2D array wrapper using a single contiguous std::vector and, benchmarked it against std::vector<std::vector<>>.
Surprisingly, array2d is just slightly faster!
#...
1
vote
1
answer
61
views
Pre-Selecting Values for a MultiDatePicker
Premise
I have a MultiDatePicker bounded to a closed range of the current month. In addition, I have a datePicker representing a "Start Date" that is the current day. I want the Day of the ...
-5
votes
0
answers
79
views
Using relative file paths in JS arrays [closed]
I am working on a side-project to improve my FE-development skills and am designing a (fictional) toilet paper shop.
As a first step, I hard-coded some mock products directly into my HTML file (...
-6
votes
1
answer
161
views
How should I efficiently add all pairs in a key-value array to an object?
I have an object obj; and I then obtain an array arr of key-value pairs. Assuming that the key sets of obj and of arr are disjoint (i.e. no key appears in both) - how do I efficiently add all pairs in ...
3
votes
2
answers
112
views
Code is returning "[C Kernel] Executable exited with code -11", don't know what's wrong with it?
I'm working on this piece of code as part of my coursework, ideally any advice I get for this would be educational in some way; I don't want an exact answer, just need someone who knows more than I do ...