Skip to main content
Filter by
Sorted by
Tagged with
Advice
0 votes
3 replies
122 views

This is the program I am using: fig, ax = plt.subplots(figsize=(4, 4)) t, dt = np.linspace(-4, 4, 10, retstep=True) x = t y = t**3 - 9*t xy = np.stack((x, y), axis=1) n = len(xy) d1ydx1 = np....
Andrew's user avatar
  • 1,226
0 votes
0 answers
39 views

Good day everyone. I am writing a script which will parse a flat file with all the information I need, and if a certain variable is too long, or greater than some length, I need to break out of that ...
DanL's user avatar
  • 23
0 votes
0 answers
82 views

I have the following code: declare v_output varchar2(32767); begin v_output := shell('ls -ltr /opt/ibm/'); dbms_output.put_line(v_output); end; It throws error as the output is more than 32767 and ...
Amir's user avatar
  • 113
1 vote
0 answers
118 views

Edit: My bench marking code was wrong (SIZE / BUFSIZ in fwrite() should only be BUFSIZ), so everything is cleared up: in my case buffered fwrite() is giving better performance. I try to speed optimize ...
TheGlibber's user avatar
0 votes
0 answers
64 views

I have a list of generators L = [gen_1,...,gen_n] with variable length n. How can I implement in a compact way the following: for el_1 in gen_1: for ... for el_n in gen_n: ...
Radio Controlled's user avatar
0 votes
0 answers
38 views

I'm trying to read a binary data file containing time-series data in Matlab. Sample data: [23,-10,47,19,-417,-434,-1,29,11,22,23,6,18,13,-383] Command: fopen(filename,'r','ieee-le'); When I read the ...
Haoer Shi's user avatar
1 vote
2 answers
174 views

I am learning C and I realized that you can declare an array with the size determined by a function argument like in this example: #include <stdio.h> void foo(unsigned int size){ int array[...
Dioswison's user avatar
  • 119
0 votes
1 answer
60 views

I'd like to vertically align a text next to an image. The text can be short or long – and with responsivity in mind, the parent container can also shrink. But I personally find that the image should ...
WoodrowShigeru's user avatar
0 votes
1 answer
141 views

Is it possible to do nested LLLLVAR using J8583? With the given sample value below the DE 63 which has length of 18 will have its LLLLVAR = 0018313830303030313431313831343030303234, then using this ...
Bitwise DEVS's user avatar
  • 3,851
0 votes
1 answer
43 views

I have two different dataframes of different lengths, each with two value columns. What I want to do is find the mean and sum of each row of the two value columns in each dataframe by writing a ...
Jason Edelkind's user avatar
1 vote
1 answer
63 views

I need to check if the difference between land surface temperature in the past and present within the LULC is statistically significant. LULC units changed over time and the length of the temperature ...
BansheeEve's user avatar
1 vote
0 answers
384 views

I'm trying to implement LEB128 to write a custom Minecraft Server implemention. I'm doing so by following Wikipedia article about LEB128 and port example Javascript code given to C. https://en....
user21053170's user avatar
-2 votes
3 answers
577 views

If the "slick-initialized" div tag doesn't exist within a parent, then I want the parent ID (product recommender-recipe) to display none. Right now this is what I have set up: HTML is set up ...
Schneider G's user avatar
-1 votes
1 answer
416 views

I need to take a tuple of any length and preforming an operation to return the midpoint. However, I need to function to work with a tuple of any length so I'm not sure how to go about it. def ...
Kay's user avatar
  • 17
0 votes
0 answers
31 views

I have a dataset like below:- Location Reading Above 0.0370 Above 0.0261 Below 0.0660 Above 0.0420 now when I load this in R, it appears prefectly in the console but when I run the below script- model ...
Spybuster's user avatar
1 vote
1 answer
338 views

I'm trying to compile MIDI files, and I reached an issue with the duration values for track events. I know these values (according to this http://www.ccarh.org/courses/253/handout/vlv/) are variable ...
FireTheLost's user avatar
1 vote
2 answers
72 views

I wrote a function that returns the longest word const longestWord = (phrase) => { const arr = phrase.split(" "); let longest; for (let i = 0; i < arr.length; i++) { if (arr[i]....
Normye's user avatar
  • 27
0 votes
1 answer
45 views

I'm trying to collect the length of several select. How can I know the length of each select? The way I found is $('#mylist option').length which seems not feasible in this case since I don't have IDs ...
rd1218's user avatar
  • 457
3 votes
1 answer
4k views

I'm analysing how the compiler implements the variable-length array in c99. The following is my c code and disassembly which is commented on my understanding. The code is compiled with "-O3 -...
tmal's user avatar
  • 97
1 vote
1 answer
123 views

We have defined some rules in laravel but we need rule in which length of string should not be 5. code is given below. $rules = array( 'id' => 'required|numeric|digits_between:7,8' ); current rule ...
Nirav Trivedi's user avatar
1 vote
1 answer
508 views

I have a dataset of 50,000+ observations and I'm trying to create a table of my two variables of interest, chemical and lab_code. The code below outputs a working table that can be used to create a ...
Irene's user avatar
  • 47
0 votes
2 answers
545 views

getting simple permutations of a string is easy but how do you do if you want different length permutations For eg: def permutations(string): if len(string) == 1: return [string] else: ...
Saimon Ghimire's user avatar
1 vote
1 answer
161 views

let say I have a char pointer like this: unsigned char* value="Hello\0Hello"; how can i calculate the size of value, as strlen only calculate the size of string until the '/0' so I can not ...
Lia's user avatar
  • 43
1 vote
1 answer
109 views

Example code, treats argv[1] as a file path, replacing its extension with .png or appending it if none is found: #include <stdio.h> #include <string.h> int main(int argc, char **argv) { ...
landfill baby's user avatar
0 votes
1 answer
544 views

#restricting sample replicatedata_firststage <- replicatedata_full %>% filter(!is.na(belief_treatment_w3), hk_local == 1, followup_postjuly1st_w3 == 1, !is.na(...
collins fang's user avatar
0 votes
1 answer
34 views

What I have: first = [1,2,3] second = [1,2,3,4] What I want: third = [2,4,6,4] first + second = third I've tryed using numpy and zips but they all stop after the smallest list is complete.
Aspen Grey's user avatar
1 vote
1 answer
110 views

I am trying to get the length of the following formula: myformula <- ~ (1 | Variable1) + (1|Sex) + Age + Cells + Glucose But for some reason, R doesn't recognize the real number of elements (which ...
emr2's user avatar
  • 1,742
0 votes
2 answers
237 views

I have a variable which splits the results of a column based on a condition (group by in others programming languages). I'm trying to have a variable that counts the NR of each group. If we sum all ...
Jose Antonio Piedehierro Arias's user avatar
0 votes
1 answer
48 views

Good day, Please i need assistance trying to generalize this code for any matrix the data PoliticalDemocracy is available in the lavaan library What I tried library(lavaan) R<-chol(cor(...
Etini Akpayang's user avatar
0 votes
2 answers
731 views

Is it possible to write a Cypher query with a variable-length patter, that specifies that nodes between the start and end node can only be nodes with a certain property? I think that a query like the ...
DigitalJedi's user avatar
  • 1,680
-2 votes
1 answer
38 views

I am using a while loop to check if the number of guesses is less than 10 and once 10 guesses has been made it will prompt you one last time to input the whole answer not just individual characters. I ...
Austin Drake's user avatar
-1 votes
1 answer
111 views

I am trying to apply the following function over each column in a dataframe: def hurst_lag(x): minlag = 200 maxlag = 300 lags = range(minlag, maxlag) tau = [sqrt(std(subtract(x.dropna()...
SGriff's user avatar
  • 1
0 votes
2 answers
70 views

I have an array of matrices which are all different lengths. I want to compare the distance of each item in matrix 1 to the items in matrix 2 and so on. The for loops I've written below work well ...
Susanna's user avatar
0 votes
1 answer
51 views

I'm trying to fit probability distributions in R using EnvStat package and looping to calculate multiple columns at once. Columns have different lengths and some code error is happening. The data ...
Marcel 's user avatar
  • 313
1 vote
1 answer
680 views

I have a column with data that looks like this: Day D003 D004 D008 D010 D012 D028 And in the next column, I need to extract just the 3, 4, 10, 12, etc. with NO leading 0's. I tried the following: =IF(...
RaleighWalker's user avatar
0 votes
2 answers
316 views

I'm writing a function to analyse .csv files in a directory on my hard drive, using a series of for and while loops (I know for loops are unpopular in R, but they're good for what I need). The ...
James.H's user avatar
  • 25
1 vote
1 answer
257 views

The elements: <div>class="product-image-container"</div> <br> <br> The code: countMaterials(){ let countItems = 0; cy.get('#center_column').find("div&...
yuv's user avatar
  • 139
0 votes
0 answers
821 views

I have 4 value in a column. For example; ColumnA 2.651 3.5 4.55 7.9 And I want to sum it all and cast as a decimal; select CAST(sum(ColumnA) as Decimal(LEN(sum(ColumnA)),2)) FROM tablename; however ...
Gülşah Demiryürek's user avatar
1 vote
3 answers
381 views

I am totally confused on the below code execution, a= [10,30,4] a = a.sort() r = len(a) - 1 print (r) When the above code is executed I get r = len(a) - 1 TypeError: object of type 'NoneType' has no ...
Selva's user avatar
  • 65
0 votes
2 answers
1k views

I'm new to flutter. I am getting an error like this, can you help me? I've been stuck in http for json for 5 days, the codes in the source don't work. :( L It says list not entered but when I enter it ...
Meriç Türkyılmaz's user avatar
0 votes
1 answer
213 views

I have a data pipeline that receives data from multiple sources, one of which streams binary data in a known schema, with one field being of variable length. I need to parse this data into a tabular ...
Ely Shaffir's user avatar
0 votes
1 answer
138 views

I have to concatenate k different lengths of strings into one string res and save res string into ArrayBuffer[String](). But the k is variable. For example, val result = new ArrayBuffer[String]() ...
Bowen Peng's user avatar
  • 1,835
0 votes
1 answer
138 views

I'm new to Cypher, self taught so far. I've managed to get creative with basic queries but am now hitting something I have no idea how to achieve.... Given a list of job ID dependencies: │"A"...
bazza's user avatar
  • 3
1 vote
3 answers
77 views

Not sure if this is doable, but is there a way you can use .length or another method to get the rating score of something which is usually displayed in svg form? In the below HTML in each svg there's ...
leek1234's user avatar
  • 470
2 votes
1 answer
445 views

I would like to import a very large text file as a dataframe into R. The file is produced by the "National Institute for Health and Disability Insurance" in Belgium. It contains individual ...
Joël's user avatar
  • 73
1 vote
0 answers
255 views

Varint64 data is varlen data format. Varint64: Divide uint64 into 8 8bits, each 8bits contains the highest flag bit and the lower 7 data bits. When the flag bit is 1, it indicates that the next 8bit ...
Songmeng's user avatar
0 votes
1 answer
89 views

I have a list of 41 data from a functioned I defined, but I only want to access the first 40 of them. So, the index positions I am looking for are from 0 - 39 forecast_price(10)[:len(forecast_price(10)...
Ejin's user avatar
  • 13
-6 votes
1 answer
2k views

I have a nested struct and I need to find the length of an array which is one of the fields in the struct. Here are the structs : type TextEntry struct{ name string Doc []DocEntry } type ...
cyberbeast's user avatar
-1 votes
1 answer
116 views

As declaring a variable1 inside for loop I have assigned some string to it>>>whereas given another variable2 .....when provided with the output it shows variable1 len is 1 and variable2 has 8 ...
Shailendra Sisodia's user avatar
0 votes
1 answer
439 views

My code looks like struct MyData { int len; char data[1]; }; MyData *d1 = malloc(1024); strcpy(d1->data, a_string); I use it as variable-length buffer and guarantee the buffer not ...
Pan Ruochen's user avatar
  • 2,100

1
2 3 4 5 6