This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> hi deepseak | |
<think> | |
</think> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/* | |
validate[] - laver ikke værdien om, kan måske smide en error | |
transform[] - laver værdien om, kan måske smide en error | |
*/ | |
// Når Transformation indgår i validation navnet kan value ændre sig, der kan også være indbygget validering i disse methoder | |
$_POST["navn"] = "Bo"; | |
$navn = Validation::post("navn")->validateNotEmpty()->error("Navn er tom")->validateMinLength(3)->error("Angiv navn på minimum 3 tegn"); | |
$navn->value; // Bo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadJs(url){ | |
return new Promise((resolve, reject)=>{ | |
var script = document.createElement('script'); | |
script.src = url; | |
script.onload = resolve | |
script.onerror = reject | |
document.head.appendChild(script); | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def my_get_batches(x, y, size): | |
for batch in range( len(x) // size ): | |
yield x[batch*size:(batch+1)*size], y[batch*size:(batch+1)*size] | |
# for batch_x, batch_y in my_get_batches(train_x, train_y, batch_size): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Threading.Tasks; | |
/* | |
Husk at rette namespace | |
Du kan saette et default URL ved at replace [DEFAULT URL] med dit url | |
*/ | |
namespace [namespace].Common |