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
void split(const string& str, const string& delim, vector<string>* pParts) | |
{ | |
size_t start, end = 0; | |
while (end < str.size()) { | |
start = end; | |
while (start < str.size() && (delim.find(str[start]) != string::npos)) | |
{ | |
start++; // skip initial whitespace | |
} |
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
local tconcat = table.concat | |
local tinsert = table.insert | |
local srep = string.rep | |
function print_table(root) | |
local cache = { [root] = "." } | |
local function _dump(t,space,name) | |
local temp = {} | |
for k,v in pairs(t) do | |
local key = tostring(k) |
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
def get_content_type(): | |
return 'application/octet-stream' | |
def parse_xml(key,xml): | |
""" Simple XML parser """ | |
key = key.lower() | |
for tag in xml.split("<"): | |
tokens = tag.split() | |
if tokens and tokens[0].lower().startswith(key): | |
return tag.split(">")[1].strip() |
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 "stdafx.h" | |
#include <stdio.h> | |
/* fast strcpy -- Copyright (C) 2003 Thomas M. Ogrisegg <tom@hi-tek.fnord.at> */ | |
//#include <string.h> | |
//#include "dietfeatures.h" | |
//#include "dietstring.h" | |
// ----following are dietstring.h content. | |
//#include <endian.h> | |
//# define MKW(x) (x|x<<8|x<<16|x<<24) | |
int MKW(int x) |
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 "stdafx.h" | |
#include <stdlib.h> | |
/* Magic numbers for the algorithm */ | |
static const unsigned long mask01 = 0x01010101; | |
static const unsigned long mask80 = 0x80808080; | |
#define LONGPTR_MASK (sizeof(long) - 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
#include "stdafx.h" | |
#include <stdlib.h> | |
/* Magic numbers for the algorithm */ | |
static const unsigned long mask01 = 0x01010101; | |
static const unsigned long mask80 = 0x80808080; | |
#define LONGPTR_MASK (sizeof(long) - 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
#include "stdafx.h" | |
#include <stdlib.h> | |
/* Magic numbers for the algorithm */ | |
static const unsigned long mask01 = 0x01010101; | |
static const unsigned long mask80 = 0x80808080; | |
#define LONGPTR_MASK (sizeof(long) - 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
from google.appengine.ext import webapp | |
from google.appengine.ext.webapp.util import run_wsgi_app | |
import logging | |
from google.appengine.api import urlfetch | |
from BeautifulSoup import * | |
class SoapLinks(webapp.RequestHandler): | |
def get(self, url): |
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 google.appengine.ext import webapp | |
from google.appengine.ext.webapp.util import run_wsgi_app | |
import logging | |
from google.appengine.api import urlfetch | |
from BeautifulSoup import * | |
class SoapLinks(webapp.RequestHandler): | |
def get(self, url): |
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
Imports System | |
Imports EnvDTE | |
Imports EnvDTE80 | |
Imports EnvDTE90 | |
Imports System.Diagnostics | |
Public Module Module1 | |
Sub BeginMe() |
OlderNewer