Skip to main content
Filter by
Sorted by
Tagged with
7 votes
4 answers
413 views

I'm looking at genetics punnet squares for two homologous chromosome pairs, which I've modeled in R like this: # Punnet square for two homologous chromosome pairs col_names<-c("AB", "...
Phenomniverse's user avatar
Advice
0 votes
2 replies
35 views

For one of my projects, I have been working on a pattern matching engine that determines if a pattern tree can match to a target tree. The trees are rooted, the children are unordered, and the nodes ...
user499369's user avatar
0 votes
1 answer
304 views

How to implement a flat map using arrays when keys are known at compile time. Imagine I know my keys: enum class Asset { FONT, TEXTURE }; struct AssetContainer { }; Hence I could do: struct ...
SpeakX's user avatar
  • 437
-1 votes
2 answers
218 views

I have a list that i want to append another list on certain conditions. The structure looks like this: <ul class="menu"> <li class="list-1"><ul class="ul-1"...
Christian Ansel Thrige's user avatar
1 vote
1 answer
149 views

I have two Dataframes which contain tags in one of the columns. Tags can be present or absent in the list and are stored in an unordered manner. I would like to get the merge of the two datasets with ...
Melon Pie's user avatar
  • 131
0 votes
1 answer
240 views

So the thing is I want to get the return value from the starmap_async. However if I use the .get() to get the list of the result, it is little slow and same as starmap. How do I change the following ...
master_zhen's user avatar
0 votes
1 answer
95 views

For over 10 years now we have developed single page applications where an AJAX call goes out and downloads the text/html of an inner page from a template folder with all of our page content. When it ...
Roger Garstang's user avatar
0 votes
0 answers
197 views

I am trying to change the reference level for a linear model. R thinks my distance variable (entered as a character string) is "ordered" based on alphabetical order as follows: 10m, 15m, 20m(...
Stephen R's user avatar
0 votes
1 answer
47 views

I try to show some images on a single page in a strict order. The images comes from a NodeJs web server as ArrayBuffer. This is the recommended version but isn't working. The order of images is ...
Pelikanus Maximus's user avatar
0 votes
2 answers
186 views

I'm struggling understanding the rule mentioned in Java docs (https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html) related to parallel stream stating that "The Stream....
Abdelhamid Marey's user avatar
0 votes
2 answers
1k views

In Django I have replaced the user model using (AbstractUser). Then in the admin panel area the fields are unordered. When generating a new user, the password is not encrypted, the user is saved with ...
Basilio Cristov's user avatar
8 votes
3 answers
704 views

I'm trying to create a Dictionary is C# that takes an Unordered Pair of Indices as its Key. For example: exampleDictionary[new UnorderedPair(x,y)] and exampleDictionary[new UnorderedPair(y,x)] should ...
FaffyWaffles's user avatar
0 votes
1 answer
109 views

I would like to sort lists of the following form: ['1000-1005', '6767-8787', '88-5607', '600-607', '909-950'] by the integer value before the '-' symbol and also store the original index after sorting,...
Ryan's user avatar
  • 3,759
0 votes
1 answer
953 views

I have a statement which Inserts a new row to the table in my database, but the new row is added on the first row of the table. I want to add a new row on the end of the table, how would I do this? ...
Wabi-Sabi's user avatar
0 votes
1 answer
662 views

Today I experienced something I found rather interesting. I had a batch of unacknowledged messages that were all published within the same second, and for an expected reason, one of these messages ...
muffe's user avatar
  • 87
-4 votes
1 answer
513 views

List<Integer> list = new ArrayList<>(); for (int i = 0; i < 100_000_000; i++) { list.add(i); } list.stream().unordered().limit(50_000_000).skip(25_000_000).findFirst().ifPresent(...
JackStar's user avatar
-1 votes
2 answers
212 views

I'm working with a dataset with two columns that look something like this: df <- data.frame( Row1 = c("1, 2", "2, 6, 4", "3, 1", "2, 1, 4", "3"), ...
jinkx's user avatar
  • 21
2 votes
1 answer
1k views

I have a character factor-leveled vector. cat <- as.factor(c("AS-GEN-SUM-10-Fall", "AS-GEN-SUM-3-Fall","AS-GEN-SUM-4-Fall","AS-GEN-SUM-5-Fall")) cat [1] AS-...
amisos55's user avatar
  • 1,969
5 votes
2 answers
3k views

Let's run the following code: st = {3, 1, 2} st >>> {1, 2, 3} st.pop() >>> 1 st.pop() >>> 2 st.pop() >>> 3 Although sets are said to be unordered, this set behaves ...
mykhailohoy's user avatar
0 votes
1 answer
421 views

I'm trying to replicate the object-hash npm package in Go and need to be able to support unordered arrays (i.e. ordering of arrays shouldn't matter while deciding whether one JSON is different from ...
Sri Krishna Velivela's user avatar
0 votes
2 answers
1k views

In code I have already created a month column and groupby it according to month but the months names are not sorted. How can I do it enter code here plt.figure(figsize=(8,4)) bymonth = df1.groupby('...
shivani bisht's user avatar
0 votes
1 answer
2k views

I am trying to use the GPU to do some math on 2D arrays, which I supply to the compute shader as simple 2d textures (in R32_FLOAT) without mipmaps, tied to Shader Resource Views. They work, they are ...
kppodd's user avatar
  • 15
1 vote
0 answers
93 views

I'm still learning ReactJS but I found something weird, I'm using the special props children for a Card component, which is going to be wrapped around some elements fetched from Firebase. I was using ...
elG's user avatar
  • 639
5 votes
1 answer
704 views

In C++14, I have a std::vector of values for which I want to remove all elements that match a given value and I do not care about preserving the order of the elements after doing the remove. The ...
WilliamKF's user avatar
  • 43.7k
0 votes
1 answer
31 views

I've got a form with 2 radio buttons. Based on the radio buttons an unordered list is shown (hide/show using js). This works as desired. The list is used to select a service. When I select a service ...
Davidius1078's user avatar
0 votes
1 answer
416 views

This post raised a question of the absence of >, < .. comparison operators for unordered containers in C++. From the reply it looks meaningless to have those. However, I checked Python and see ...
user2376997's user avatar
1 vote
1 answer
78 views

From the boost documentation: It also implements the extension proposed by Peter Dimov in issue 6.18 of the Library Extension Technical Report Issues List (page 63), this adds support for: ... **the ...
Don Pedro's user avatar
  • 343
0 votes
3 answers
332 views

std::unordered_map<std::string,std::string> mymap; mymap.insert(std::make_pair("ELEMENTTYPE", "NEWINTERFACE")); mymap.insert(std::make_pair("STYLEFILE", "...
expl0it3r's user avatar
  • 335
0 votes
1 answer
82 views

I have a simple array of exactly 10 elements; their key, value pairs return correctly ordered when logged. $.each( sArray, function(i, k) { log(i, k); // log(i, k) returns correctly // [0] ...
Lithis's user avatar
  • 3
0 votes
2 answers
748 views

HTML Code <Select id="alphalist"> <option value="a">A</option> <option value="b">B</option> <option value="c">C</...
Eoin's user avatar
  • 147
0 votes
2 answers
262 views

HTML code <Select id="alphalist"> <option value="a">A</option> <option value="b">B</option> <option value="c">C</...
Eoin's user avatar
  • 147
0 votes
1 answer
39 views

I am trying to use REGEX in order to find out if a certain tag is found inside the source code of a website. The tag definitely starts with "<link" and definitely ends with ">&...
Shopsi's user avatar
  • 11
0 votes
2 answers
361 views

In Hash map data structure such as unordered_map in C++: unodered_map<char, int> mp = { {'a', 10}, {'b', 20} }; if (mp.find('a') != mp.end()) cout << "found you"; we know ...
Hui He's user avatar
  • 3
0 votes
2 answers
494 views

Hi I am printing an array to my DOM using an input method. I can get the user input to print out the list, but there are too many bullets. Here is my code below: function addPokemon() { var ...
Tom's user avatar
  • 49
1 vote
1 answer
824 views

I am trying to create an Unordered Binary tree. How do we insert a Treenode in an unordered Binary tree? What should be the logic? By inserting here I mean inserting the node as a leaf. Like if I ...
user avatar
2 votes
2 answers
761 views

In my code,there will be inserting or deleting in a std::map,but not change the value of a existed key. will it change the address of a existed key's value when inserting/deleting new keys ? int ...
scirocc's user avatar
  • 183
1 vote
2 answers
2k views

I have a map that takes a vector of ints as a key. I initialise the map with a key vector of values {1, 2, 3} typedef std::map<std::vector<int>, std::string> VectorMap; VectorMap ...
Tom's user avatar
  • 1,344
8 votes
2 answers
6k views

Let's say I have the following array: a = [4,2,3,1,4] Then I sort it: b = sorted(A) = [1,2,3,4,4] How could I have a list that map where each number was, ex: position(b,a) = [3,1,2,0,4] to clarify ...
user8920367's user avatar
0 votes
0 answers
348 views

I have been playing around with loading webpages into VBA as XML's and iterating through its data and have stumbled across a roadblock while trying to loop through the "li" tags nested in a "ul" tag. ...
honeybadger's user avatar
0 votes
0 answers
160 views

for Example: a = ['yes','no','both'] b = ['no','both','yes'] it should return True.
Faraz Khan Yz's user avatar
1 vote
2 answers
702 views

Is there any way to map a range of numbers to a particular number or value in cpp like this: 1-10 : 15 10-20 : 05 the range would be consecutive numbers. the value could be any random number. ...
athultuttu's user avatar
1 vote
0 answers
54 views

I am trying to build a multinomial probit model using the optmix and mvtnorm packages. Am not using the existing libraries for MNP since I will be extending it to multivariate models later. For ...
Ganesh Ambi Ramakrishnan's user avatar
0 votes
1 answer
1k views

Code: np.histogram(df['columnforhistogram'], bins=(np.arange(start=0, stop=2000, step=25)), density=True) plt.xlabel("Column") plt.ylabel('Bins') plt.show() Output I want: I want a histogram ...
noob's user avatar
  • 3,811
1 vote
0 answers
1k views

I'm using Python multiprocessing pool imap_unordered. In a generator, I'm filling my inputlist in fillInputList, sending this inputList to prepare_data_fill_arrays prepare_data_fill_arrays takes a ...
burcak's user avatar
  • 1,157
0 votes
0 answers
364 views

I'm using python multiprocessing imap.unordered with big expectations. However, my processes are in deep sleeping waiting for I/O. numofSimulations=10 chromNamesList=['chr1', 'chr2', 'chr3', 'chr4', '...
burcak's user avatar
  • 1,157
5 votes
4 answers
326 views

The following list has some duplicated sublists, with elements in different order: l1 = [ ['The', 'quick', 'brown', 'fox'], ['hi', 'there'], ['jumps', 'over', 'the', 'lazy', 'dog'], ['...
anon's user avatar
  • 866
2 votes
2 answers
57 views

I'd like list elements with class 'active' to be ordered alphabetically at the top of a list, with the remainder of the list underneath ordered separately. In other words, <li><label><...
Silverburch's user avatar
2 votes
2 answers
2k views

I am trying to understand the differences between python dictionaries in python 3.6.7 and python 3.5.2. The way they store the order of key-value pairs seems different. For example, assume there is a ...
Long's user avatar
  • 1,885
0 votes
1 answer
57 views

I have following problem: I have this string, which looks like this: * item1 * item2 ** item21 ** item22 * item3 ** item31 ** item32 ***item321 * item4 This is something like unordered nested list, (...
Pavel Sedlář's user avatar
0 votes
3 answers
936 views

I want to make a dictionary with a specific set of keys and a specific set of values. These are the keys I want to use: k = ['date', 'deviceCategory', 'transactionId', 'productSku', 'productName', '...
Julio María Meca Hansen's user avatar

1
2 3 4 5