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
| #include <unistd.h> | |
| #include <sys/wait.h> | |
| #include <stdio.h> | |
| void test() ; | |
| int main(int argc, char* argv[]) { | |
| if(argc == 1) { | |
| printf("Master\n") ; |
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
| #include <unistd.h> | |
| #include <sys/wait.h> | |
| #include <stdio.h> | |
| int main(int argc, char* argv[]) { | |
| pid_t pid = fork() ; | |
| if (pid) { | |
| // Parent |
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
| -- SELECT SUM(pre_y)+SUM(post_y) AS all_y | |
| WITH REC(level) AS ( | |
| SELECT 0 AS level | |
| UNION ALL | |
| SELECT r.level+1 AS level FROM REC r WHERE level < 10 -- Выборка из ссылки на себя | |
| ) | |
| SELECT * FROM REC ORDER BY level |
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
| DECLARE @f0 float(53) ; | |
| DECLARE @f1 real ; | |
| SET @f0 = 10.99 ; | |
| SET @f1 = 3.0513 ; | |
| SELECT @f0 + @f1; | |
| SELECT CAST(@f0 AS real) + @f1; | |
| SELECT CAST(@f0 AS numeric(38,2)) + CAST(@f1 AS numeric(38,2)); |
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
| SELECT | |
| COUNT(n), COUNT(m), COUNT(*) | |
| FROM( | |
| SELECT NULL AS n, 'n' AS m | |
| UNION ALL | |
| SELECT 2 AS n, 'n' AS m | |
| UNION ALL | |
| SELECT NULL AS n, 'n' AS m | |
| UNION ALL | |
| SELECT 4 AS n, 'n' AS m |
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
| join-test() { local IFS=':' ; ls -l "$*" ; ls -l "$@" ; } | |
| set -- -n -e | |
| echo "$*" | |
| echo "$@" | |
| echo | |
| set -- 1 2 3 | |
| IFS=: | |
| echo "$*" | |
| echo "$@" |
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
| SELECT | |
| ppays.* | |
| FROM ( | |
| SELECT 'Нео' AS name, 7 AS score | |
| UNION ALL | |
| SELECT 'Нео' AS name, 100 AS score | |
| UNION ALL | |
| SELECT 'И.И. Иванов' AS name, 1 AS score | |
| UNION ALL | |
| SELECT 'Нео' AS name, 3 AS score |
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
| while [ -f /tmp/8034 ]; do cat <<EOF | nc -q 1 -l -p 8034 | |
| HTTP/1.0 200 OK | |
| Content-Type: application/json | |
| [ | |
| { "id" : 0, "login" : "root" }, | |
| { "id" : 1001, "login" : "koi8-r" } | |
| ] | |
| EOF | |
| done |
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
| [ | |
| { "id" : 0, "login" : "root" }, | |
| { "id" : 1000, "login" : "Admin" }, | |
| { "id" : 1001, "login" : "user1" }, | |
| { "id" : 1002, "login" : "user2" }, | |
| { "id" : 65535, "login" : "nobody" }, | |
| ] |
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
| @Grab('org.codehaus.groovy.modules.http-builder:http-builder:0.7.1' ) | |
| @GrabConfig(systemClassLoader=true) | |
| @Grab('log4j:log4j:1.2.17') | |
| import groovyx.net.http.HTTPBuilder | |
| import groovy.util.logging.Log4j | |
| import static groovyx.net.http.Method.* | |
| import static groovyx.net.http.ContentType.* | |
| @Log4j |
OlderNewer