This file contains 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
// Database Number: Scale and Precision | |
// Input: 123456.1234 | |
// Output: scale 4, precision 6 | |
function getScaleAndPrecision(x) { | |
x = parseFloat(x); | |
if (!x || isNaN(x)) return null; //NaN, undefined, null, 'abcd', ""... | |
let parts = x.toString().split("."); | |
if (parts.length > 2) return null; | |
return { | |
scale: parts[1] ? parts[1].length : 0, |
This file contains 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
// Tracking cursor position in real-time without JavaScript | |
// Demo: https://twitter.com/davywtf/status/1124146339259002881 | |
package main | |
import ( | |
"fmt" | |
"net/http" | |
"strings" | |
) |
This file contains 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
''' | |
620031587 | |
Net-Centric Computing Assignment | |
Part A - RSA Encryption | |
''' | |
import random | |
''' |
This file contains 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
#!/bin/bash | |
# Date : (2014-10-20) | |
# Distribution used to test : Arch Linux 64-bit | |
# Author : RoninDusette | |
# Licence : GPLv3 | |
# PlayOnLinux: 4.2.8 | |
[ "$PLAYONLINUX" = "" ] && exit 0 | |
source "$PLAYONLINUX/lib/sources" |
This file contains 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
/* | |
Name: Syed Owais Ali Chishti | |
Roll no: P14-6011 | |
Task: Implement Fraction class such that it take input like | |
1/2, 4/5, 7/81 | |
Then overload | |
ARITHMETIC | |
+, -, /, %, * | |
ASSIGNMENT | |
+=, -=, *=, /=, %= |
This file contains 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
/* | |
* Name: Syed Owais Ali Chishti | |
* Roll no: P14-6011 | |
* Date: 2/3/2015 | |
* Task: Implement the Playfair Cipher Algorithm as discussed in the class. | |
*/ | |
#include <iostream> | |
#include <string> | |
#include <cstdlib> |
This file contains 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 | |
$rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator('/public_html/')); | |
$files = array(); | |
foreach ($rii as $file) { | |
if (!$file->isDir()) { | |
chmod($file->getPathname(), 0755); | |
} | |
else { |
This file contains 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
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" && cl.exe "{:mainfile}" | |
g++ -lm -o {:basename}.exe {:mainfile} |
This file contains 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 requests | |
from lxml import html | |
import sys, os, errno | |
import Queue | |
from threading import Thread | |
import getpass | |
user = raw_input("Username: "); | |
passwd = getpass.getpass(); |
This file contains 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 off | |
set /P mode=Start or Stop Oracle: | |
IF %mode%==start ( | |
echo "Starting Oracle Server" | |
net start OracleOraDB12Home2MTSRecoveryService | |
net start OracleOraDB12Home2TNSListener | |
net start OracleVssWriterORCLDB | |
net start OracleServiceORCLDB | |
) ELSE IF %mode%==stop ( | |
echo "Stoping Oracle Server" |
NewerOlder