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
--- cccc_tbl.cc 2006-01-05 17:05:30.000000000 +0100 | |
+++ cccc_tbl--diff.cc 2014-05-31 10:44:07.565059727 +0200 | |
@@ -96,7 +96,7 @@ | |
typename map_t::iterator value_iterator=map_t::find(old_item_ptr->key()); | |
if(value_iterator!=map_t::end()) | |
{ | |
- erase(value_iterator); | |
+ this->erase(value_iterator); | |
retval=true; | |
} |
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
# | |
# Colored defines | |
# | |
RCol='\e[0m' # Text Reset | |
# Regular Bold Underline High Intensity BoldHigh Intens Background High Intensity Backgrounds | |
Bla='\e[0;30m'; BBla='\e[1;30m'; UBla='\e[4;30m'; IBla='\e[0;90m'; BIBla='\e[1;90m'; On_Bla='\e[40m'; On_IBla='\e[0;100m'; | |
Red='\e[0;31m'; BRed='\e[1;31m'; URed='\e[4;31m'; IRed='\e[0;91m'; BIRed='\e[1;91m'; On_Red='\e[41m'; On_IRed='\e[0;101m'; | |
Gre='\e[0;32m'; BGre='\e[1;32m'; UGre='\e[4;32m'; IGre='\e[0;92m'; BIGre='\e[1;92m'; On_Gre='\e[42m'; On_IGre='\e[0;102m'; |
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 | |
#Execute code metrics | |
echo -e "Start code metrics tool ..." | |
cd "$WORKSPACE" | |
wget -nv https://gist.githubusercontent.com/Toutjuste/a606a0d2079e3df1755b/raw/c4547f90c6a4bf65495421797fae6f6f5548851e/lang-def.cloc | |
cloc --force-lang-def=lang-def.cloc --by-file --xml --out="cloc.xml" . | |
# Get xslt conversion table file from gist | |
wget -nv https://gist.githubusercontent.com/Toutjuste/ebdfd3b839902d20fb78/raw/4106299437b73d68a52b9485913621858d1647b3/cloc2sloccount.xsl |
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
<xsl:stylesheet version="1.0" xmlns:de="." xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="text" version="4.0" encoding="iso-8859-1" | |
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" | |
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> | |
<xsl:template match="file"> | |
<xsl:variable name="file_path" select="translate(@name,'\\','/')"/> | |
<xsl:variable name="file_path_part1" select="substring-after($file_path,'/')"/> | |
<xsl:variable name="module" select="substring-before($file_path_part1,'/')"/> | |
<xsl:value-of select="@code"/> |
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
// Put the widget in the center of the screen | |
QRect qrect = QApplication::desktop()->availableGeometry(this); | |
move(qrect.center() - rect().center()); |
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
#To use the usb WIFI key sagem xg-703a, install this package : | |
# linux-firmware-nonfree | |
#On debian, the package name is: | |
# firmware-linux-nonfree | |
#On raspberry pi with raspbian (debian arm), do following commands: | |
sudo aptitude install firmware-linux-nonfree linux-wlan-ng | |
wget http://daemonizer.de/prism54/prism54-fw/fw-usb/2.13.1.0.lm86.arm --no-check-certificate |
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
#Add this lines in /etc/apt/sources.list | |
# deb http://twolife.be/raspbian/ wheezy main backports | |
# deb-src http://twolife.be/raspbian/ wheezy main backports | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 2578B775 | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install libqt5-* qt5-default libgles2-mesa |
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 <SFML/Graphics.hpp> | |
using namespace std; | |
using namespace sf; | |
int main(int argc, char** argv) | |
{ | |
// Création de la fenêtre de rendu | |
RenderWindow App(sf::VideoMode(800, 600, 32), "Fenetre de tests SFML"); |
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 <ctime> | |
std::string GetDate() | |
{ | |
time_t now = time(NULL); | |
struct tm * tm = localtime(&now); | |
char date[64]; | |
strftime(date, sizeof date, "%d-%m-%Y--%H-%M-%S", tm); |
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 <QChar> | |
QChar unaccented(const QChar char) | |
{ | |
const QString decomp = char.decomposition(); | |
return (decomp.isEmpty()) ? char : decomp.at(0); | |
} |
OlderNewer