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
alert('Hello'); | |
console.writeline("Started"); | |
var mainUrl = "https://reps.mozilla.org/api/v1/rep/?offset=0&limit=0"; //Thanks to Debeloper | |
var Ajax = new XMLHttpRequest(); | |
Ajax.onreadystatechange = function(){ | |
if(Ajax.status == 200 && Ajax.readyState == 4){ | |
//Found the data. Now do the function. | |
var rep_rep_JSON = JSON.parse(Ajax.responseText); | |
themain(rep_rep_JSON); | |
} |
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
/************************************************************************ | |
* @author Nootan Ghimire <[email protected]> | |
* @file a.stopwatch.basic.cpp | |
* @includes conioLinux.h (Modified the code from StackOverflow) | |
* | |
* @license Creative Commons: Attribution-ShareAlike 4.0 International | |
(CC BY-SA 4.0) | |
* @license http://creativecommons.org/licenses/by-sa/4.0/deed.en_US | |
* | |
* @desc A Simple Stopwatch. |
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
/****************************************************** | |
* @author Nootan Ghimire <[email protected]> | |
* @file postfix-eval.cpp | |
* @desc Evaluation of Multi-Digit Postfix Expression | |
*****************************************************/ | |
// C++ Includes | |
#include <iostream> | |
#include <cctype> | |
#include <cstdlib> |
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<iostream> | |
#include<cstring> | |
char* trim(char* str); | |
int main(){ | |
return 1; | |
} | |
char* trim(char* str){ |
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 convert($num){ | |
$arr = array(०,१,२,३,४,५,६,७,८,९); | |
$newArr = array(); | |
$sep = str_split($num); //implicit string conversion | |
foreach($sep as $key=>$value){ | |
$newArr[$key] = $arr[$value]; | |
} | |
return implode('',$newArr); |
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 Obj = '{"my":"मेरो","name": "नााम","is-xyz": "xyz-हो",".":"।","1":"१","2":"२","3":"३","4":"४","5":"५","6":"६","7":"७","8":"८","9":"९","0":"०"}'; | |
//^^ The Localisation Objecy (Read from file or any other source) | |
ObjReal = JSON.parse(Obj); //Parsing the JSON | |
//The function starts | |
var l10n = function(localeObject, content){ | |
var arr = content.split(" ").reverse(); //Split by space. and reverse (actually non-reversed) the order |
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 | |
$q = "SELECT * FROM table WEHRE parent=0" ; | |
$res = mysql_query($q); | |
while ($row = mysql_fetch_array($res)){ | |
$q1 = "SELECT * FROM table WHERE parent = ". $row['id']; | |
$res1 = mysql_query($q1); | |
while($row1 = mysql_fetch_array($res1){ | |
$q2 = "SELECT * FROM table WHERE parent = ". $row1['id']; | |
$res2 = mysql_query($q2); | |
while($row2 = mysql_fetch_array($res2)){ |
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
#ducky.py -- returns the first website searched by | |
#duckduckgo | |
#[email protected] | |
import webbrowser | |
import sys | |
#print (sys.argv) | |
lst = sys.argv |
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
py2 → py3 | |
Tkinter → tkinter | |
tkMessageBox → tkinter.messagebox | |
tkColorChooser → tkinter.colorchooser | |
tkFileDialog → tkinter.filedialog | |
tkCommonDialog → tkinter.commondialog | |
tkSimpleDialog → tkinter.simpledialog | |
tkFont → tkinter.font | |
Tkdnd → tkinter.dnd | |
ScrolledText → tkinter.scrolledtext |
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 () { | |
var pickAnything = document.querySelector("#pick-anything"); | |
if (pickAnything) { | |
pickAnything.onclick = function() { | |
var storage = navigator.getDeviceStorage("sdcard"); | |
cursor = storage.enumerate(); | |
cursor.onerror = function() { |