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 <iostream> | |
#include <sstream> | |
#include <tuple> | |
template<class Tuple, std::size_t N> | |
struct TuplePrinter { | |
static void print(const std::string& fmt, std::ostream& os, const Tuple& t) { | |
const size_t idx = fmt.find_last_of('%'); | |
TuplePrinter<Tuple, N-1>::print(std::string(fmt, 0, idx), os,t); | |
os << std::get<N-1>(t) << std::string(fmt, idx + 1); |
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
{ | |
"folders": | |
[ | |
{ | |
"path": "/Path/To/application/dir", | |
"folder_exclude_patterns": ["cache", "logs"], | |
"file_exclude_patterns": ["*_example.*", "backup_*"], | |
"name": "Application Name" | |
}, | |
{ |
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
#!/usr/bin/env python | |
############################################################################# | |
## | |
## Copyright (C) 2010 Riverbank Computing Limited. | |
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | |
## All rights reserved. | |
## | |
## This file is part of the examples of PyQt. |
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
SetTitleMatchMode RegEx | |
#ifWinActive, .* - Sublime Text$ | |
*^tab up:: | |
SetTimer, WaitForCtrlUp, 20 | |
return | |
#ifWinActive | |
WaitForCtrlUp: | |
if(GetKeyState("Ctrl")){ | |
if(GetKeyState("shift")){ |
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
from PyQt4 import QtGui, QtCore | |
class RenderManagement(QtGui.QWidget): | |
def __init__(self): | |
super(RenderManagement, self).__init__() | |
self.v_layout = QtGui.QVBoxLayout(self) | |
# Create 5 dynamic items |
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
# Autodetect text files | |
* text=auto | |
# Force the following filetypes to have unix eols, so Windows does not break them | |
*.* text eol=lf | |
# Force images/fonts to be handled as binaries | |
*.jpg binary | |
*.jpeg binary | |
*.gif binary |
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
# Proof of concept; retrieve the path of the syntax that a user has | |
# associated with any file extension in Sublime Text. | |
# | |
# 1) Create a temp file with the file extension of the desired syntax. | |
# 2) Open the temp file in ST with the API `open_file()` method; use a | |
# sublime.TRANSIENT buffer so that no tab is shown on the tab bar. | |
# 3) Retrieve the syntax ST has assigned to the view's settings. | |
# 4) Close the temp file's ST buffer. | |
# 5) Delete the temp 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
/* ============================================================================= * | |
* COMPUTE AND DRAW A BICUBIC SURFACE PATCH USING FORWARD DIFFERENCES * | |
* * | |
* This code implements and provides corrections to the algorithm named * | |
* DrawSurfaceFwdDif presented in Fig.11.46 at page 525 of the book * | |
* Computer Graphics - Principles and Practice 2.ed in C by Jamed D.Foley et.al. * | |
* This algorithm was neither corrected nor repeated in the 3rd (present) * | |
* edition of Foley et.al.'s book. * | |
* * | |
* The algorithm, as stated in the book, does not work: There is one error and * |
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
{ | |
"cmd" : ["$file"], | |
"selector" : "source.shell", | |
"shell" : "bash" | |
} |
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 time | |
from progress.bar import Bar # sudo pip install progress | |
bar = Bar('Processing', max=20, suffix='%(index)d/%(max)d - %(percent).1f%% - %(eta)ds') | |
for i in range(20): | |
time.sleep(.05) # Do some work | |
bar.next() | |
bar.finish() |
OlderNewer