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.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| public class Codechef { | |
| private static int[][] StrassenMultiply(int[][] A, int[][] B) { | |
| int n = A.length; |
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
| package Multithreading; | |
| import java.util.Scanner; | |
| class MyThread extends Thread{ | |
| private int[] arr; | |
| MyThread(int[] arr){ | |
| this.arr = arr; |
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 <stdio.h> | |
| #include <stdbool.h> | |
| #include <string.h> | |
| #define MAX_SIZE 100 | |
| struct Stack{ | |
| int top; | |
| char arr[MAX_SIZE]; | |
| } st; |
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 buffer = require('buffer'); | |
| var path = require('path'); | |
| var fs = require('fs'); | |
| function encode_base64(filename){ | |
| fs.readFile(path.join(__dirname,'/public/',filename),function(error,data){ | |
| if(error){ | |
| throw error; | |
| }else{ | |
| var buf = Buffer.from(data); |
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 net = require('net'); | |
| // creates the server | |
| var server = net.createServer(); | |
| //emitted when server closes ...not emitted until all connections closes. | |
| server.on('close',function(){ | |
| console.log('Server closed !'); | |
| }); |
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 udp = require('dgram'); | |
| // --------------------creating a udp server -------------------- | |
| // creating a udp server | |
| var server = udp.createSocket('udp4'); | |
| // emits when any error occurs | |
| server.on('error',function(error){ | |
| console.log('Error: ' + error); |
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 createDb() { | |
| var db_name = 'jabber'; | |
| var db_version = '1.0'; | |
| var db_describe = 'Bro,its jabber'; | |
| var db_size = 2048; | |
| var db = openDatabase(db_name, db_version, db_describe, db_size, function(db) { | |
| console.log(db); | |
| console.log("Database opened Successfully! Or created for the first time !"); | |
| createTable(db); | |
| }); |
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 ceaser_cipher(){ | |
| this.alphabets=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']; | |
| } | |
| ceaser_cipher.prototype.encrypt=function(s,n){ | |
| var plain_text=[...s]; | |
| for(var i = 0, length1 = plain_text.length; i < length1; i++){ | |
| plain_text[i]=this.alphabets[this.alphabets.indexOf(plain_text[i])+n]; | |
| } | |
| return plain_text.toString(); |
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
| *,*::after,*::before | |
| { | |
| margin: 0; | |
| padding: 0; | |
| outline: none; | |
| border: 0; vertical-align: baseline; | |
| -webkit-box-sizing:inherit; | |
| -moz-box-sizing: inherit; | |
| -o-box-sizing: inherit; | |
| box-sizing: inherit; |