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
LOGIN_FILE="login" | |
space=" " | |
for i in `seq 1 10`; | |
do | |
CURR_FILE="$LOGIN_FILE""$i" | |
rm $CURR_FILE 2> /dev/null | |
touch $CURR_FILE | |
cat header.in | tr -d '\n' >> $CURR_FILE | |
touch temp.in |
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 <boost/lexical_cast.hpp> | |
inline std::string IntToString(unsigned int _uiIntToConvert) { | |
MODT_LOG_DEBUG(octopus::getRootLogger(), "EODUtils::IntToString", "Int to convert: [" << _uiIntToConvert << "]"); | |
std::string sRet; | |
try { | |
sRet = boost::lexical_cast< std::string >(_uiIntToConvert); | |
} catch (boost::bad_lexical_cast&) { | |
sRet = ""; |
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 <stdio.h> | |
#include <iostream> | |
#include <string.h> | |
struct Item { | |
int i; | |
char buf1[10]; | |
char buf2[20]; | |
}; |
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 <cstdlib> | |
#include <boost/bind.hpp> | |
#include <boost/function.hpp> | |
class A { | |
public: | |
void print(const std::string &s) { | |
std::cout << s << std::endl; | |
} |
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 <cstdlib> | |
#include <iostream> | |
class A { | |
public: | |
int callback(float variable) { | |
int result =6; | |
std::cout << "Callback invoked with result: " << result + variable << std::endl; | |
return result; | |
} |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#define EXIT_SUCCESS 0 | |
#define EXIT_FAILURE 1 | |
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
#!/bin/sh | |
# $Id: pdf2eps,v 0.01 2005/10/28 00:55:46 Herbert Voss Exp $ | |
# Convert PDF to encapsulated PostScript. | |
# usage: | |
# pdf2eps <page number> <pdf file without ext> | |
pdfcrop $2.pdf | |
pdftops -f $1 -l $1 -eps "$2-crop.pdf" | |
rm "$2-crop.pdf" | |
mv "$2-crop.eps" $2.eps |
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
#!/bin/bash | |
print_usage (){ | |
echo “USAGE:” | |
echo -e “\t $figtex2ps inputfile.fig” | |
} | |
#Compile Xfig figures with LaTeX commands | |
if [ "$1" = "" ]; then | |
print_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
void printPrimeNumbers(unsigned int num) { | |
std::list<unsigned int> listPrimes; | |
listPrimes.push_back(2); | |
listPrimes.push_back(3); | |
listPrimes.push_back(5); | |
listPrimes.push_back(7); | |
std::string sNum; | |
unsigned int iNum; | |
unsigned int sqrt1; |
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
/* | |
* File: main.cpp | |
* Author: mihiranad | |
* | |
* Created on August 28, 2014, 12:18 PM | |
*/ | |
#include <cstdlib> | |
#include <cstring> | |
#include <iostream> |
NewerOlder