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
| <iframe id="bannerTopWide" src="about:blank" width="100%" height="100%" marginwidth=0 marginheight=0 scrolling=no frameborder=0> | |
| </iframe> | |
| <script type="text/javascript"> | |
| $(function() { | |
| var content = '<sc' + 'ript charset="UTF-8" src="//cdn.rollad.ru/rollad.js"' + '></' + 'script>' | |
| +'<div><sc' + 'ript type="text/javascript">RRoller.load(10102030491929384);' + '</sc' + 'ript></div>'; | |
| var frDoc = $('#bannerTopWide')[0].contentWindow.document; |
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
| console.log($('input[type=hidden]').map(function(){ return $(this).val();}).get()); |
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
| //Fan out on Write | |
| //H Shard on “owner I sequence" | |
| db.shardCollection("myapp.inbox". { "owner": 1, "sequence":1 }); | |
| db.shardCollection("myapp.users", { "user name":1 }); | |
| msg = { | |
| from: "Joe", | |
| to: [ "Bob". "Jane" ], | |
| sent: new Date(). | |
| message: "Hi!", | |
| } |
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 d.datname AS Name, pg_catalog.pg_get_userbyid(d.datdba) AS Owner, | |
| CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') | |
| THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname)) | |
| ELSE 'No Access' | |
| END AS Size | |
| FROM pg_catalog.pg_database d | |
| ORDER BY | |
| CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') | |
| THEN pg_catalog.pg_database_size(d.datname) | |
| ELSE NULL |
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 nspname || '.' || relname AS "relation", | |
| pg_size_pretty(pg_relation_size(C.oid)) AS "size" | |
| FROM pg_class C | |
| LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) | |
| WHERE nspname NOT IN ('pg_catalog', 'information_schema') | |
| ORDER BY pg_relation_size(C.oid) DESC | |
| LIMIT 20; |
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
| var _allImgs = ''; | |
| $("img").on("click", function() { | |
| if (this.width > 600) { | |
| console.log(this.src, this.width, this.height); document._allImgs += "\n" + this.src; | |
| } | |
| }); | |
| document._allImgs = ''; |
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
| db.currentOp().inprog.forEach ( function(d) { if (d.secs_running > 100) {printjson(d); db.killOp(d.opid); } } ); | |
| use admin; | |
| db.runCommand( { logRotate : 1 } ) | |
| db.runCommand( { setParameter: 1, logLevel: 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
| echo "stats settings" | nc localhost 11211 | |
| telnet localhost 11211 | |
| get cmd | |
| key . "_ru_geo_" | |
| enable capturing information | |
| stats detail on | |
| stats detail off |
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 binadd($a, $b) { | |
| $n = strlen($a); | |
| $m = strlen($b); | |
| $max = max($n, $m); | |
| $sum = []; | |
| $r = 0; | |
| for ($i = 0; $i < $max; $i++) { | |
| $s = ($n > $i ? $a{$i} : 0) + ($m > $i ? $b{$i} : 0) + $r; $r = 0; | |
| $sum[] = $s & 1 ? '1' : '0'; | |
| if ($s > 1) { |
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
| import java.math.BigInteger; | |
| import java.util.*; | |
| public class A | |
| { | |
| public static void main(String args[]) | |
| { | |
| Scanner in=new Scanner(System.in); | |
| String a=in.next(); | |
| String b=in.next(); |