What do you want to save?
Add Code snippet
New code examples
-
C 2021-09-30 05:39:06
c langauge array
// Syntax: datatype_variable[dimension] = new datatype[size]{array}; // For example: string MyArray[] = new string[1]{"Hello","World"}; // or just: string MyArray[]={"Hello","world"}; // for multidimensions: // ... Add solution -
VBA 2021-09-29 12:54:05
excel vba remove leading or trailing spaces in an entire column of data
'VBA function to clean data from range and return an array. This 'function does NOT use loops: Function CleanMAX(r As Range) CleanMAX = Replace("trim(clean(substitute(|,char(160),"" "")))", "|", r.Address) ... Add solution -
Python 2021-09-27 16:32:06
python multiply one column of array by a value
import numpy as np # Let a be some 2d array; here we just use dummy data # to illustrate the method a = np.ones((10,5)) # Multiply just the 2nd column by 5.2 in-place a[:,1] *= 5.2 # Now get the cumulative sum of just that column csum = np.cumsum(a[:,1]) Add solution -
Other 2021-09-23 21:31:03
Intermediate Algorithm Scripting: DNA Pairing
function pairElement(str) { //define a map object with all pair possibilities var map = {T:'A', A:'T', G:'C', C:'G'}; //split str into a char Array strArr = str.split(''); //replace each Array item with a 2d Array using map for (var i=0;i<... Add solution -
VBA 2021-09-22 15:37:03
vba static array declaration
'VBA arrays can be fixed-size (static) or resizable (dynamic). 'This is determined when the array is declared: Dim vArrA() 'dynamic: size is determined later. Dim vArrB(1 to 5) 'static: size is determined now and cannot be changed. 'Array size refers ... Add solution -
Python 2021-09-21 17:49:03
how to make text change lines pygame
import pygame pygame.init() SIZE = WIDTH, HEIGHT = (1024, 720) FPS = 30 screen = pygame.display.set_mode(SIZE, pygame.RESIZABLE) clock = pygame.time.Clock() def blit_text(surface, text, pos, font, color=pygame.Color('black')): words = [word.split(... Add solution