Skip to content

Instantly share code, notes, and snippets.

View code-walkers's full-sized avatar

arun code-walkers

View GitHub Profile
@code-walkers
code-walkers / GetNBits.c
Created October 15, 2011 08:40
getbits routine
/*Endian reverse function. If there is an instruction, its more efficient
*Can be used in the code below
*/
Uint32 EndianRev(unsigned int word)
{
Uint32 tmp = 0;
tmp = (((word & 0xff) << 24) & 0xff000000) ;
tmp |= (((word & 0xff00) << 8) & 0x00ff0000) ;
tmp |= (((word & 0xff0000) >> 8) & 0x0000ff00) ;
tmp |= (((word & 0xff000000) >> 24) & 0xff);
static wxString &GetNextJsonObject(wxString &input,wxString &obj)
{
char tempDst[BUFFER_SIZE];
memset(tempDst,0,BUFFER_SIZE);
char *s1 = strstr( input.c_str(),"\"retweet_count\":") ;
if( NULL == s1)return obj;
strncat(tempDst,input.c_str(),s1 - input.c_str());
char *s2 = strstr(s1 ,"}");
@code-walkers
code-walkers / CreateInstallerDlg.cpp
Created January 29, 2010 22:47
EasyInstaller Changes for installation on Win7
// CreateInstallerDlg.cpp : implementation file
//
// This is the program that creates the Installer (self-extracting exe) program:
// Run this program to create your install program.
//
#include "stdafx.h"
#include "CreateInstaller.h"
#include "CreateInstallerDlg.h"
#include "zip.h"
@code-walkers
code-walkers / MyApp.cpp
Created January 29, 2010 20:31
Writing win32 Service Application
/*The win32 service runs with its current working directory set to C:\Windows\System32
*You might need to place anyrun-time configuration scripts there.
*If you run into any confusion with the above detail, it is worthwhile to
*set the current working directory to your application installation directory like I did
*/
MyApp::OnInit()
{
//
//