This file contains hidden or 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
| gboolean | |
| sessionLoadWindowStates (const gchar * filename) | |
| { | |
| FILE *f; | |
| gchar s[4096], s1[4096]; | |
| gint i, pos, pos1; | |
| unsigned long w; | |
| g_return_val_if_fail (filename != NULL, FALSE); |
This file contains hidden or 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
| #Type any easy to remember string to generate strong passwords. | |
| wallet() { | |
| read -s p; openssl sha512 -binary <<< $USER$p | base64 -w12 | nl | |
| } |
This file contains hidden or 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
| tr -c "[:alnum:]" " " < /dev/urandom | fold -w$COLUMNS | GREP_COLOR="1;32" grep --color . |
This file contains hidden or 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
| /* http://www.codersnotes.com/algorithms/signed-distance-fields */ | |
| #include <QImage> | |
| #include <time.h> | |
| #include <math.h> | |
| #include <stdio.h> | |
| #include <sys/time.h> | |
| static inline double get_wall_time() | |
| { | |
| struct timeval time; |
This file contains hidden or 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
| /**************************************************************************** | |
| ** | |
| ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). | |
| ** Copyright (C) 2013 Intel Corporation | |
| ** Contact: http://www.qt-project.org/legal | |
| ** | |
| ** This file is part of the QtCore module of the Qt Toolkit. | |
| ** | |
| ** $QT_BEGIN_LICENSE:LGPL21$ | |
| ** Commercial License Usage |
This file contains hidden or 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
| for f in "$@" | |
| do | |
| TMP=$(mktemp) | |
| SIZE_OLD=$(wc -c < "$f") | |
| echo "Optimizing '$f' of size $SIZE_OLD" | |
| /usr/bin/gs \ | |
| -sDEVICE=pdfwrite \ | |
| -dCompatibilityLevel=1.4 \ | |
| -dPDFSETTINGS=/ebook \ | |
| -dNOPAUSE \ |
This file contains hidden or 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
| function color() { | |
| case $1 in | |
| red) tput setaf 1;; | |
| green) tput setaf 2;; | |
| yellow) tput setaf 3;; | |
| blue) tput setaf 4;; | |
| purple) tput setaf 5;; | |
| cyan) tput setaf 6;; | |
| white) tput setaf 7;; | |
| #bold |
This file contains hidden or 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
| /* http://stackoverflow.com/questions/17432502/how-can-i-measure-cpu-time-and-wall-clock-time-on-both-linux-windows */ | |
| #include <stdio.h> | |
| /* Windows */ | |
| #ifdef _WIN32 | |
| #include <Windows.h> | |
| static inline double get_wall_time() | |
| { |
This file contains hidden or 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 "a.hpp" | |
| #include "stdio.h" | |
| void A::set(int a, int b) | |
| { | |
| x = a; | |
| y = b; | |
| } | |
| void A::get() | |
| { |
This file contains hidden or 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
| ==3177== 796 (440 direct, 356 indirect) bytes in 5 blocks are definitely lost in loss record 13,568 of 14,260 | |
| ==3177== at 0x4C266ED: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) | |
| ==3177== by 0x73D0400: g_malloc (in /usr/lib64/libglib-2.0.so.0.4000.0) | |
| ==3177== by 0x73C4145: g_key_file_get_string_list (in /usr/lib64/libglib-2.0.so.0.4000.0) | |
| ==3177== by 0x47F40C: configuration_load_session_files (keyfile.c:668) | |
| ==3177== by 0x480383: configuration_load (keyfile.c:1080) | |
| ==3177== by 0x44FB99: main (main.c:903) |