This file contains 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
<?php | |
$alphabeth = strtolower('ABCDEFGHIJKLMNOPQRSTUVWXYZ'); | |
$sentances = [ | |
'Fifa 2018', | |
'Grand Theft Auto V', | |
'Sims 5', | |
'Hitman', | |
'Assasins Creed', |
This file contains 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
<?php | |
$sqlDump = file_get_contents(dirname(__FILE__) . '/dump.sql'); | |
$sqlStatements = explode(";\n", $sqlDump); | |
$sqlStatements = array_filter($sqlStatements, function($statement) { | |
$statement = trim($statement); | |
return strpos($statement, '#') !== 0 && strpos($statement, '/*') !== 0; | |
}); | |
$sqlStatements = array_map(function($statement){ |
This file contains 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
var newDbName = 'comsave-miner'; | |
db.getCollectionNames().forEach(function (collName) { | |
var collDocsUpdated = 0; | |
db[collName].find().forEach(function (r) { | |
var refUpdated = false; | |
Object.keys(r).forEach(function(rKey){ | |
if(!r[rKey]) { | |
return; |
This file contains 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
[{ | |
"Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup", | |
"Country": "Afghanistan", | |
"ISO": "AF", | |
"Format": "NNNN", | |
"Regex": "^\\d{4}$" | |
}, { | |
"Note": "With Finland, first two numbers are 22.", | |
"Country": "Åland Islands", | |
"ISO": "AX", |
This file contains 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
package helpers | |
import ( | |
"errors" | |
"fmt" | |
"regexp" | |
) | |
type ZipCode struct{} |
This file contains 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
{ | |
"AF": "Afghanistan", | |
"AX": "Åland Islands", | |
"AL": "Albania", | |
"DZ": "Algeria", | |
"AS": "American Samoa", | |
"AD": "Andorra", | |
"AO": "Angola", | |
"AI": "Anguilla", | |
"AQ": "Antarctica", |
This file contains 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
func() { | |
consecutive := -1 | |
responseMocks := []string{ | |
responseString1, | |
responseString2, | |
} | |
httpClientMock.On("SendRequest", req).Return(func() *http.Response { | |
consecutive++ | |
return &http.Response{ | |
StatusCode: 200, |
This file contains 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
const translate = text => fetch("https://www.bing.com/ttranslatev3", { | |
"headers": { | |
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36", | |
"content-type": "application/x-www-form-urlencoded", | |
}, | |
"body": `&fromLang=nb&text=${encodeURIComponent(text)}&to=en`, | |
"method": "POST", | |
"mode": "cors" | |
}) | |
.then(response => response.json()) |
This file contains 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
<?php | |
final class CurrencyEnum extends BaseEnumerable | |
{ | |
public const ALL = 'ALL'; | |
public const AFN = 'AFN'; | |
public const ARS = 'ARS'; | |
public const AWG = 'AWG'; | |
public const AUD = 'AUD'; | |
public const AZN = 'AZN'; |
This file contains 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
<?php | |
$visitDates = [ | |
['2020-06-16', '2020-06-30'], | |
['2020-07-23', '2020-07-28'], | |
['2020-10-09', '2020-11-04'], | |
['2020-12-15', '2021-01-16'], | |
['2021-01-30', '2021-02-26'], | |
]; |
OlderNewer