Inputs
Outputs
Neuron type
Best algorithm has been found - locked
Patterns
Pattern |
Input |
Output |
1. |
|
|
2. |
|
|
3. |
|
|
4. |
|
|
5. |
|
|
Applicable neurons
-
character -
-
Substring (from start to position)
-
Substring (from position to end)
-
Get substring between string1 and string2
-
Get after substring
-
Get before substring
-
Get after last substring
-
Get first letter
-
Get first word
-
Get last character
-
Get the last XY characters
-
decimal part of a number
-
Half (0.5)
-
Can we fix it? (1/0)
-
(x)(y)
-
\\s
-
First child X position
-
character x
-
sql AVG(A, B)
-
convert seconds into hours, minutes and seconds
Algorithm
Test
Code made by AI:
/**
* character -:
*
* @return {Array}
*/
function neuron511()
{
return['-'];
}
/**
* Length of string:
*
* @param x1 String
* @return {Array}
*/
function neuron528(x1)
{
return[x1.toString().length];
}
/**
* PositionLast: Search last occurrence
*
* @param x1 MyString
* @param x2 FindMe
* @return {Array}
*/
function neuron581(x1, x2)
{
return [x1.toString().lastIndexOf(x2)];
}
/**
* Plus (x + y): The addition of two whole numbers is the total amount of those quantities combined.
*
* @param x1 first number
* @param x2 second number
* @return {Array}
*/
function neuron1(x1, x2)
{
math.config({number: 'BigNumber', precision: 64}); return [math.eval(Number(x1) + '+'+Number(x2)).toString()];
}
/**
* Length of string:
*
* @param x1 String
* @return {Array}
*/
function neuron528(x1)
{
return[x1.toString().length];
}
/**
* Substring (startPosition, endPosition): Get substring from string - from position - to pos
*
* @param x1 MyString
* @param x2 start position
* @param x3 end position
* @return {Array}
*/
function neuron525(x1, x2, x3)
{
return[x1.toString().substring(x2, x3)];
}
/**
* Substring (from position to end):
*
* @param x1 MyString
* @param x2 start position
* @return {Array}
*/
function neuron529(x1, x2)
{
var outputs = [];
outputs[0] = x1;
outputs[1] = x2;
arr = neuron528(outputs[0]);
outputs[2] = arr[0];
arr = neuron525(outputs[0], outputs[1], outputs[2]);
outputs[3] = arr[0];
return[outputs[3]];
}
/**
* Get after last substring:
*
* @param x1 MyString
* @param x2 Substring
* @return {Array}
*/
function neuron618(x1, x2)
{
var outputs = [];
outputs[0] = x1;
outputs[1] = x2;
arr = neuron528(outputs[1]);
outputs[2] = arr[0];
arr = neuron581(outputs[0], outputs[1]);
outputs[3] = arr[0];
arr = neuron1(outputs[2], outputs[3]);
outputs[4] = arr[0];
arr = neuron529(outputs[0], outputs[4]);
outputs[5] = arr[0];
return[outputs[5]];
}
/**
* 1:
*
* @return {Array}
*/
function neuron501()
{
return [1];
}
/**
* 0:
*
* @return {Array}
*/
function neuron500()
{
return [0];
}
/**
* Connect - two inputs:
*
* @param x1 Variable A
* @param x2 Variable B
* @return {Array}
*/
function neuron520(x1, x2)
{
return [x1.toString()+x2.toString()];
}
/**
* 100:
*
* @return {Array}
*/
function neuron537()
{
var outputs = [];
arr = neuron501();
outputs[0] = arr[0];
arr = neuron500();
outputs[1] = arr[0];
arr = neuron520(outputs[1], outputs[1]);
outputs[2] = arr[0];
arr = neuron520(outputs[0], outputs[2]);
outputs[3] = arr[0];
return[outputs[3]];
}
/**
* Multiple (x × y):
*
* @param x1 Number X
* @param x2 Number Y
* @return {Array}
*/
function neuron3(x1, x2)
{
math.config({number: 'BigNumber', precision: 64}); return [math.eval(Number(x1) + '*'+Number(x2)).toString()];
}
/**
* Round to an integer: round(x)
*
* @param x1 Value
* @return {Array}
*/
function neuron620(x1)
{
return[Math.round(Number(x1))]
}
/**
* Division (x ÷ y): X / Y
*
* @param x1 first number
* @param x2 second number
* @return {Array}
*/
function neuron17(x1, x2)
{
math.config({number: 'BigNumber', precision: 64}); return [math.eval(Number(x1) + '/'+Number(x2)).toString()];
}
/**
* Rounding to whole hundredths of something: round(x, 2)
*
* @param x1 Value
* @return {Array}
*/
function neuron623(x1)
{
var outputs = [];
outputs[0] = x1;
arr = neuron537();
outputs[1] = arr[0];
arr = neuron3(outputs[1], outputs[0]);
outputs[2] = arr[0];
arr = neuron620(outputs[2]);
outputs[3] = arr[0];
arr = neuron17(outputs[3], outputs[1]);
outputs[4] = arr[0];
return[outputs[4]];
}
/**
* get day from date (yyyy-mm-dd):
*
* @param x1 date
* @return {Array}
*/
function neuron893(x1)
{
var outputs = [];
outputs[0] = x1;
arr = neuron511();
outputs[1] = arr[0];
arr = neuron618(outputs[0], outputs[1]);
outputs[2] = arr[0];
arr = neuron623(outputs[2]);
outputs[3] = arr[0];
return[outputs[3]];
}
Code made by AI: