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
export QT_SELECT=qt5; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$HOME/Software/KDE/kdevelop5-git -DQT_QT_INCLUDE_DIR=/usr/include/qt5 -DCMAKE_CXX_FLAGS=-fPIC .. |
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 python3 | |
from collections import namedtuple | |
Colors = namedtuple('Colors', 'response, success, fail, end') | |
COLORS = Colors( | |
response='\033[94m', | |
success='\033[92m', | |
fail='\033[91m', | |
end='\033[0m', |
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
// trim from start | |
static inline std::string <rim(std::string &s) { | |
s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<int, int>(std::isspace)))); | |
return s; | |
} | |
// trim from end | |
static inline std::string &rtrim(std::string &s) { | |
s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end()); | |
return s; |
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 <boost/thread.hpp> | |
#include <boost/asio.hpp> | |
#include <boost/scoped_ptr.hpp> | |
#include <cstdint> | |
#include <limits> | |
class X | |
{ | |
private: |
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 <QCoreApplication> | |
#include <QRegularExpression> | |
#include <QStringList> | |
#include <QDebug> | |
int main(int argc, char *argv[]) | |
{ | |
QCoreApplication a(argc, argv); | |
QString text = R"delim({{infobox historic building |
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 <iomanip> | |
#include <string> | |
#include <map> | |
#include <random> | |
#include <cmath> | |
int main() | |
{ | |
// Seed with a real random value, if available |
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> | |
using namespace std; | |
namespace X { struct F { static void f() { cout << __PRETTY_FUNCTION__; } }; } | |
// Clang: static void X::F::f() | |
// GCC: static void X::F::f() | |
int main() { X::F::f(); } |
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 java.util.HashSet; | |
public class Permutations { | |
public static HashSet<String> permutations(String str) { | |
return permutations("", str); | |
} | |
private static HashSet<String> permutations(String prefix, String str) { | |
HashSet<String> result = new HashSet<>(); | |
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 bash | |
function update () | |
{ | |
echo "Call to update ($1)" | |
if [ -d $1/.svn ] | |
then | |
echo "Updating $1..." | |
svn up $1 | |
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
#!/bin/sh -e | |
# gendocs.sh -- generate a GNU manual in many formats. This script is | |
# mentioned in maintain.texi. See the help message below for usage details. | |
scriptversion=2013-02-03.15 | |
# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 | |
# Free Software Foundation, Inc. | |
# | |
# This program is free software: you can redistribute it and/or modify |