What do you want to save?
Add Code snippet
New code examples
-
VBA 2021-11-17 20:39:12
excel VBA return a result function
'In VBA, you assign the return value to the name of the function. 'This is different from many languages that use the 'return' keyword: Function Yesterday() As Date Yesterday = Date() - 1 End Function 'VBA functions can be called from other VBA code: ... Add solution -
C 2021-11-14 03:36:10
how to make recursive function
// Basic Recursive function // It works in all languages but lets try with C // lets make a greedy strlen int my_recursive_strlen(int index, char *str) // note that index must be set at 0 to work in this case { if (str[index] == '\0') return index... Add solution -
SQL 2021-11-10 19:50:09
mysql fill in missing dates
MySQL doesn't have recursive functionality, so you're left with using the NUMBERS table trick - Create a table that only holds incrementing numbers - easy to do using an auto_increment: DROP TABLE IF EXISTS `example`.`numbers`; CREATE TABLE `example`.`... Add solution -
PHP 2021-11-10 03:53:14
array_merge_recursive in php
// array_merge_recursive function in php <?php $a1=array(color=>"red","green"); $a2=array(color=>"blue","yellow"); print_r(array_merge_recursive($a1,$a2)); ?> //OUTPUT Array ( [color] => Array ( [0]... Add solution -
C++ 2021-11-09 06:50:09
print a 3d vector in c++
// A recursive function able to print a vector // of an arbitrary amount of dimensions. template<typename T> static void show(T vec) { std::cout << vec; } template<typename T> static void show(std::vector<T> vec) { int size =... Add solution -
VBA 2021-11-06 13:20:24
excelvba return a result from a function
'In VBA, you assign the return value to the name of the function. 'This is different from many languages that use the 'return' keyword: Function Yesterday() As Date Yesterday = Date() - 1 End Function 'VBA functions can be called from other VBA code: ... Add solution -
Python 2021-11-05 11:19:10
how to find closest distance for given points
# A divide and conquer program in Python3 # to find the smallest distance from a # given set of points. import math import copy # A class to represent a Point in 2D plane class Point(): def __init__(self, x, y): self.x = x self.y = y # A u... Add solution -
VBA 2021-10-30 01:48:03
excel how to return a result from a VBA function
'In VBA, you assign the return value to the name of the function. 'This is different from many languages that use the 'return' keyword: Function Yesterday() As Date Yesterday = Date() - 1 End Function 'VBA functions can be called from other VBA code: ... Add solution -
Javascript 2021-10-25 16:10:08
recursion in javascript
// Basic Recursive function // It works in all languages but lets try with Javascript // lets make a greedy factorial calculator function my_recursive_factorial(nb) // nb to compute his factorial { if (nb < 0 || nb > 12) // error case r... Add solution -
C++ 2021-10-19 13:05:16
detect cycle in an undirected graph c++
// A C++ Program to detect // cycle in an undirected graph #include<iostream> #include <list> #include <limits.h> using namespace std; // Class for an undirected graph class Graph { // No. of vertices int V; // ... Add solution