std::exception
std::bad_alloc
thrown by new on allocation failure.std::bad_cast
thrown by dynamic_cast when fails with a referenced type.std::bad_exception
thrown when an exception type doesn't match any catch.std::bad_typeid
thrown by typeid.std::logic_error
thrown by logic errors, represent problems in the internal logic of a program; in theory, these are preventable, and even detectable
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
<?php | |
/** | |
* UUID class | |
* | |
* The following class generates VALID RFC 4122 COMPLIANT | |
* Universally Unique IDentifiers (UUID) version 3, 4 and 5. | |
* | |
* UUIDs generated validates using OSSP UUID Tool, and output | |
* for named-based UUIDs are exactly the same. This is a pure | |
* PHP implementation. |
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 "lcd.h" | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <linux/i2c-dev.h> | |
#include <sys/ioctl.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> |
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
// Check whether we are in browser or node.js | |
var _self = (typeof window !== 'undefined') ? window : {}; | |
// Scoping with anonymous closure for browser | |
var Foo = (function(){ | |
var _ = _self.Foo = { | |
init: function() { | |
} | |
} | |
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
{ | |
"startUrl": "https://del.icio.us/<your username>?&page=[1-100]", | |
"selectors": [{ | |
"parentSelectors": ["_root"], | |
"type": "SelectorElement", | |
"multiple": true, | |
"id": "bookmark", | |
"selector": "div.articleThumbBlockOuter", | |
"delay": "" | |
}, { |
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
remove Lock = Caps_Lock | |
keysym Caps_Lock = Escape |
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
<?php | |
/** | |
* This function generates a password salt as a string of x characters | |
* ranging from a-zA-Z0-9. | |
* | |
* @param $max integer The number of characters in the string | |
* @author AfroSoft <scripts@afrosoft.co.cc> | |
*/ | |
function generate_salt($max = 40) |
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
<?php | |
function filterSign($var) | |
{ | |
return strlen($var) < 2 ? false : true; | |
} | |
function getCombinations($values) | |
{ | |
$perms = array(null); |
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 pygame | |
class Time(object): | |
def __init__(self, uiTimeStep): | |
"Takes the time step in milliseconds as argument." | |
self.uiTimeStep = uiTimeStep | |
self.uiNewTime = 0 | |
self.uiCurrentTime = 0 | |
self.uiTimeAccumulator = 0 |
NewerOlder