What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-20 10:49:03
rolling window 2d array
# Rolling window for 2D arrays in NumPy import numpy as np def rolling_window(a, shape): # rolling window for 2D array s = (a.shape[0] - shape[0] + 1,) + (a.shape[1] - shape[1] + 1,) + shape strides = a.strides + a.strides return np.lib.stri... Add solution -
VBA 2021-09-16 17:14:02
excel vba pass array to and from jscript
'VBA for passing arrays to and from JScript in the Script Control. 'JScript, running in the Microsoft Script Control, can be 'passed VBA safearrays... exactly the same as Internet Explorer can 'be. But before JScript can do anything with the values in t... Add solution -
C 2021-09-15 01:56:03
passing 2d array as parameter to function in c
#include <stdio.h> //passing 2D array as a parameter to a function void fun(int *arr, int m, int n) { int i, j; for (i = 0; i < m; i++){ for (j = 0; j < n; j++) printf("%d ", *((arr+i*n) + j)); printf("\n"); } } i... Add solution -
Javascript 2021-09-06 01:33:02
multidimentiional array javascript
// Javascript Multidimentional Array // 1D Array arr = Array(3); console.log(arr) // [ , , ] // 1D Array with Fill arr = Array(3).fill(2); console.log(arr) // [ 2, 2, 2 ] //2D Array arr = Array(3).fill( Array(3) ); console.log(arr); // [ [ , , ], [ ,... Add solution -
Other 2021-09-04 00:50:02
Load the pipe-delimited file P. It is organized with 3 fields on each line: firstname|lastname|birthday. Search for the firstname F and last name L, replacing the birthday with B. Write the file back out in the same pipe-delimited format.
# Get the filepath from the command line import sys import re P= sys.argv[1] F= sys.argv[2] L= sys.argv[3] B= sys.argv[4] # ---------------------------------------------------------------- # # Our Helper functions: # # --------------------------------... Add solution -
Other 2021-08-28 01:22:01
create 2d array take input form user and write a display fuction to display in array format in c
#include<stdio.h> int main(){ /* 2D array declaration*/ int disp[2][3]; /*Counter variables for the loop*/ int i, j; for(i=0; i<2; i++) { for(j=0;j<3;j++) { printf("Enter value for disp[%d][%d]:", i, j);... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5