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
var DAY; | |
(function (DAY) { | |
DAY[DAY["SUNDAY"] = 0] = "SUNDAY"; | |
DAY[DAY["MONDAY"] = 1] = "MONDAY"; | |
DAY[DAY["TUESDAY"] = 2] = "TUESDAY"; | |
DAY[DAY["WEDNESDAY"] = 3] = "WEDNESDAY"; | |
DAY[DAY["THURSDAY"] = 4] = "THURSDAY"; | |
DAY[DAY["FRIDAY"] = 5] = "FRIDAY"; | |
DAY[DAY["SATURDAY"] = 6] = "SATURDAY"; | |
})(DAY || (DAY = {})); |
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
Show hidden characters
{ | |
"compilerOptions": { | |
/* Basic Options */ | |
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ | |
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ | |
// "lib": [], /* Specify library files to be included in the compilation. */ | |
// "allowJs": true, /* Allow javascript files to be compiled. */ | |
// "checkJs": true, /* Report errors in .js files. */ | |
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ | |
// "declaration": true, /* Generates corresponding '.d.ts' file. */ |
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
#include <ncurses.h> | |
using namespace std; | |
int main(int argc, char ** argv) | |
{ | |
// init screen and sets up screen | |
initscr(); | |
// print to screen | |
printw("Hello World"); |
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
#include <ncurses.h> | |
using namespace std; | |
int main (int argc, char ** argv) | |
{ | |
initscr(); | |
// moving cursor, x = 10, y = 20 | |
move(20, 10); |
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
#include <ncurses.h> | |
using namespace std; | |
int main(int argc, char **argv) | |
{ | |
initscr(); | |
// creating a window; | |
// with height = 15 and width = 10 | |
// also with start x axis 10 and start y axis = 20 |
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
#include <ncurses.h> | |
using namespace std; | |
int main(int argc, char const *argv[]) | |
{ | |
initscr(); | |
cbreak(); | |
// checking is terminal supports color | |
if (!has_colors()) |
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
#include <cstdlib> | |
#include <cstring> | |
#include <ncurses.h> | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
// setting up string |
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
# Bojack.py | |
from PIL import Image | |
import binascii | |
import string | |
def rgb2hex(r,g,b): | |
hex = "#{:02x}{:02x}{:02x}".format(r,g,b) | |
return str(hex) | |
im = Image.open('bojack.png') | |
print im | |
arr='' |
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
self.webView = QtWebKitWidgets.QWebView(self) | |
request = QtNetwork.QNetworkRequest() | |
request.setUrl(QtCore.QUrl("http://website.tk/")) | |
request.setRawHeader(b"User-Agent", b"US3RAGENT-$405$Application/NIMBUS") | |
self.webView.load(request) | |
self.webView.setGeometry(QtCore.QRect(0, 0, self.width(), self.height())) | |
self.webView.show() |
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
#include <stdio.h> | |
#include <string.h> | |
unsigned long hashcode = 0x21DD09EC; | |
unsigned long check_password(const char* p){ | |
int* ip = (int*)p; | |
int i; | |
int res=0; | |
for(i=0; i<5; i++){ | |
res += ip[i]; | |
} |