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
lwsws[9182]: lwsws libwebsockets web server - license CC0 + LGPL2.1 | |
lwsws[9182]: (C) Copyright 2010-2016 Andy Green <[email protected]> | |
lwsws[9182]: Using config dir: "/etc/lwsws" | |
lwsws[9182]: Initial logging level 7 | |
lwsws[9182]: Libwebsockets version: 2.0.0 [email protected] | |
lwsws[9182]: IPV6 not compiled in | |
lwsws[9182]: libev support not compiled in | |
lwsws[9182]: libuv support compiled in and enabled | |
lwsws[9182]: Threads: 1 each 1024 fds | |
lwsws[9182]: mem: platform fd map: 8192 bytes |
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
// Just to make life easier. | |
var common = { | |
ajaxPut: function(url, body) { | |
return $.ajax({ | |
url: url, | |
type: 'PUT', | |
dataType: 'json', | |
data: body | |
}); | |
}, |
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
<?php | |
$arr = [ | |
0 => [ | |
10000, | |
9000, | |
2000, | |
3000, | |
] | |
]; |
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
{ | |
"caret_extra_width": 3, | |
"caret_style": "phase", | |
"centurion_folder_icons": true, | |
"color_scheme": "Packages/Theme - Cyanide/Monocyanide - Contrasted Light.tmTheme", | |
"contrasted_sidebar": true, | |
"contrasted_tabs": true, | |
"ensure_newline_at_eof_on_save": true, | |
"findreplace_small": true, | |
"font_size": 13, |
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
<?php | |
$arr = ['A','A','B','C','F','F']; | |
$uniqueChars = array_diff_assoc($arr, array_unique($arr)); | |
print_r($uniqueChars); // First Question | |
print_r(current($uniqueChars)); // Second Question |
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
{ | |
"caret_extra_width": 2, | |
"caret_style": "phase", | |
"centurion_folder_icons": true, | |
"color_scheme": "Packages/Theme - Cyanide/Monocyanide - Contrasted Light.tmTheme", | |
"contrasted_sidebar": true, | |
"contrasted_tabs": true, | |
"ensure_newline_at_eof_on_save": true, | |
"findreplace_small": true, | |
"font_size": 11, |
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
<?php | |
function dd($arg) { | |
die(var_dump($arg)); | |
} | |
$getOddAndEven = function($number) { | |
if (is_numeric($number)) { | |
$odd = ceil($number / 2); | |
return [ |
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
<?php | |
$arr = ['a', 'bc', 'def', 'longest']; | |
usort($arr, function($a, $b) { | |
return strlen($b) - strlen($a); | |
}); | |
echo $arr[0]; |
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, | |
Due to hardware limitation I'm afraid I have to write a pseudocote for this task. | |
If neccessary, I am willing to go there to code it in front of you guys, with your computers. | |
Here's my way of solving this particular problem. | |
Note that this current solution doesn't escape or sanitize user input, SQL injection is very possible at this point. | |
Database Design: | |
Database name: test-database |
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, | |
Due to hardware limitation I'm afraid I have to write a pseudocote for this task. | |
If neccessary, I am willing to go there to code it in front of you guys, with your computers. | |
Here's my way of solving this particular problem. | |
Note that this current solution doesn't escape or sanitize user input, SQL injection is very possible at this point. | |
Database Design: | |
Database name: test-database |