Custom high performance search engine development contract or hire by Kevin Duraj Tel: (310) 774-948

Category Archives: C++

How to Increase Server Stack Size

How to Check Server Stack Size

[kevin] ulimit -s
[kevin] 10240

How to increase 2x Stack Size

[kevin] ulimit -s 20880
[kevin] 20880

Find the largest sub array within array

/*
Find the largest of sub array withing array written by Kevin Duraj
*/

#include <iostream>
#define length(x) (sizeof x / sizeof *x)
using namespace std;

int find_large(int *a, int < size)
{
int temp=0;
int large=0;
int last=0;

for (int i = 0; i < size; i++)
[...]

Parsing key pair values from doc.get_data()

/*—————————————————————————*/
// Name : TestOutput.cpp
// Author : Kevin Duraj
// Description : Parsing Xapian get_data into keys pair and value
/*—————————————————————————*/
#include <iostream>
#include <fstream>
#include <string>
/*—————————————————————————*/
using namespace std;
/*—————————————————————————*/
int main()
{
string line, key, value;

ifstream in("/Users/kevinduraj/data.txt");
while(getline(in,line))
{
string::size_type j = line.find(‘=’);

if (j != string::npos)
{
key [...]

ANSI C library for CGI Programming

cgic: an ANSI C library for CGI Programming
Reference:
http://www.boutell.com/cgic/