What do you want to save?
Add Code snippet
New code examples
-
C# 2022-03-04 13:20:31
c# find the smallest string in an array of strings
string[] names = new string[3]{ "Tom", "and", "jerry" }; string minValue = names[0]; foreach (string name in names) { if (name.Length < minValue.Length) { minValue = name; } } Console.WriteL... Add solution -
Other 2022-03-02 21:10:08
One or more errors occurred. (A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.))
foreach ($CipherSuite in $(Get-TlsCipherSuite).Name) { if ( $CipherSuite.substring(0,7) -eq "TLS_DHE" ) { "Disabling cipher suite: " + $CipherSuite Disable-TlsCipherSuite -Name $CipherSuite } else { ... Add solution -
TypeScript 2022-03-02 20:15:42
how to collect array of objects in one value key in laravel
$arr = json_decode($str, true); $names = array_column($arr, "name"); $codes = array_column($arr, "code"); foreach(array_unique($names) as $name){ $new[$name] = array_intersect_key($codes, array_intersect($names, [$name])); } var_d... Add solution -
Javascript 2022-02-28 14:40:05
node list files in directory
//requiring path and fs modules const path = require('path'); const fs = require('fs'); //joining path of directory const directoryPath = path.join(__dirname, 'Documents'); //passsing directoryPath and callback function fs.readdir(directoryPath, functio... Add solution