Skip to main content

All Questions

Tagged with or
5 votes
4 answers
206 views

I am trying to check how many elements in one numpy array can be found, with a certain tolerance, inside another numpy array. For now I have been using a for loop to apply my comparison logic, however,...
Minivip89's user avatar
1 vote
5 answers
146 views

I would like to be able to use indices in R so that if there are no indices that meet the criteria, the data is not deleted. For example, the following code doesn't recognize that I want to keep the ...
user8229029's user avatar
  • 1,253
0 votes
3 answers
123 views

I want to add strings to a fixed 2D array. I have a core dumped error when executing my addToList function. The program passes the list pointer and the string to add as arguments. I then iterate ...
SolidSnake's user avatar
0 votes
4 answers
160 views

I have a completely functional system for dialogue in Unity, which uses strings for the text and commands for additional functionality (example: making a sound). Each command is attached to a line, ...
Mayuuri's user avatar
0 votes
2 answers
101 views

I need to pass into a function an array of arrays, like: L.polyline([[0, 0], [1, 1], [2, 1], [2, 2], [4, 9], [4, 10], [10, 10]]); However, I have a sequence that often repeats that I'd like to save ...
GFL's user avatar
  • 1,542
-4 votes
1 answer
175 views

I'm trying to repurpose Minesweeper to be used as an obscured map in a puzzle I'm making. I've had the most success in a Google Sheets clone I found that was built with Google Apps Script. I've done ...
moleculemort's user avatar
-1 votes
1 answer
265 views

What is the best way to achieve behavior like WorksheetFunction.Match() in VBA, since this function is not quite suited to my purposes? I am looking for some native functionality that seeks a (String)...
Greg's user avatar
  • 3,412
Advice
0 votes
4 replies
46 views

I'm working with an array of objects in JavaScript and I'm trying to retrieve elements based on a condition. I know there are find() and filter() methods, but I'm not sure which one to use in ...
Anilss's user avatar
  • 13
Best practices
1 vote
5 replies
87 views

I am currently using the following code to return a new array with the map_of_indexes = []; pupils =[1000,1001,1002,1005,1003,1004,1020,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,...
Flash20's user avatar
  • 73
3 votes
2 answers
163 views

A 1-d array of ints sorts correctly. An array of arrays of ints does not sort as ints; it sorts as strings. (10,1,2) | Sort-Object This works and is sorted as ints: 1 2 10 But consider this code: $...
john v kumpf's user avatar
2 votes
3 answers
81 views

Recently I have noticed an interesting thing when using the Observable annotation. I have a model marked with Observable, and there is an array in the model, at some point I call the removeAll on this ...
Teja Nandamuri's user avatar
-2 votes
1 answer
138 views

I have the following code that contains an array of different book titles in subsequent objects. The code I have that filters the array is fine and returns the right information. However is there a ...
FA_Cup_Winner's user avatar
-3 votes
1 answer
140 views

I understand the idea of the insertion sorting algorithm, and I know how it works after watching many videos and doing research. However, I had never seen any code for it, so I tried to code it myself....
Faris Alakassi20's user avatar
-1 votes
2 answers
117 views

I need to create a 2D array with size n*m, multiple times, with n and m changing each time. Here's the code similar to the one I'm using: vector <vector<unsigned short>> arr; for (int _ = ...
kolanlol's user avatar
-1 votes
1 answer
165 views

I have a problem where I have two arrays that can possibly have different shapes that I want to multiply together. Let's say I have two cases (I'm just using zeros right now cause all I care about is ...
Jehan Dastoor's user avatar

15 30 50 per page