Skip to main content
Advice
1 vote
12 replies
154 views

Say I have a combination of the following: # This is a [string[]] type $A = [string[]]@("Aasdf","Casdf","Basdfs") # This is a [string] type $B = "Dasdfs" # This ...
Appleoddity's user avatar
  • 1,279
-1 votes
2 answers
143 views

I'm trying to do some simulation of CPU memory allocation in Java. I've got a NEW queue, a READY queue, and then a block of memory, represented by an array of size 256. I'm meant to load in a series ...
Jett McHugh's user avatar
Advice
1 vote
5 replies
116 views

So I'm trying to learn CUDA C. I had an idea for a simple code that could calculate the simple average of a float array. The idea is that main() will call a host function get_average(), which will ...
bob.sacamento's user avatar
2 votes
1 answer
173 views

If I wanted to replace large chunks of an array in C with items from another list, are there any solutions that don't involve for loops or writing code like the following? int64_t foo[size]; foo[value]...
Chubbachoo's user avatar
-1 votes
1 answer
144 views

I am working on a function where I will be recieving data from an SPI communication and then get the date/month/year from them I have created a function to do the latter void set_file_header(const ...
Maaz Madha's user avatar
2 votes
4 answers
139 views

I have 2 arrays 2d and I would like to compare both and count the common values between them, for instance here is my code: import numpy as np def f_m_common(V_R, V_A): r = len(V_A) c = len(...
Loro's user avatar
  • 21
0 votes
3 answers
123 views

I need to convert a JSON file to CSV in a bash script, this a sample file: { "total": 1, "jobs": [ { "deviceData": { "deviceId": "...
Cinghiuz's user avatar
0 votes
1 answer
133 views

In C, I first opened a binary file like this--- FILE *BINfile = fopen("./tmp.bin", "rb+"); Then I transferred the data into an unsigned char array (typedef as byte) like this--- (...
Bedanta Hazarika's user avatar
2 votes
1 answer
130 views

I have written a CFD code which I POC'd in Python. In order to accelerate the computationally expensive parts, I have rewritten these methods in C. I am calling them using ctypes which seems to work ...
TriJB's user avatar
  • 77
1 vote
2 answers
85 views

I have to split a string and use a part of it for further processing. So the idea is: string='aaa-bbb-ccc-ddd' parts=(${(@s:-:)string}) print -- $parts[3] # ccc I would like to refactor the second ...
MaxPowers's user avatar
  • 5,551
-2 votes
1 answer
140 views

I came across a problem in JavaScript where an item is to be inserted into an ordered array such that the array remains in the correct order. e.g. insertInOrder(19, [1, 2, 10, 20]) should return [1, 2,...
Jerry Huang's user avatar
1 vote
1 answer
126 views

I'm working with a large Pandas DataFrame and a multi-dimensional NumPy array. My goal is to efficiently "broadcast" a specific column of the DataFrame across one or more dimensions of the ...
MintForge π's user avatar
-2 votes
1 answer
190 views

I am writing a shuffling program to shuffle the words in an array, not the letters. For this purpose, I have created the code below: void shuffle(char *str) { srand(time(NULL)); int i = 0; ...
Mehmet emi Sevim's user avatar
2 votes
1 answer
146 views

I have a for in loop in my ViewModel that I want to process elements in an array one at a time, and if the API result from each element has a count of 1, then continue to the next element in the array,...
jonathan3087's user avatar
1 vote
1 answer
105 views

I'm trying to make a simple 3d renderer in CMU Graphics using rotation matrices. When I rotate the camera 90 degrees (left or right), and I try rotating (up / down), it does a "barrel roll" ...
Johan Nordén's user avatar

15 30 50 per page