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
using asp = Company.AspFunctions; | |
namespace _TestProjects | |
{ | |
class AspFunctionsTest | |
{ | |
public string TestAspFunctions() | |
{ | |
Console.WriteLine("year = " + asp.Conn.Date_Format(DateTime.Now, "%Y%m%d")); | |
return 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
#include <iostream> | |
using std::endl; | |
using std::cout; | |
class Foo | |
{ | |
public: Foo() { std::cout << std::endl << "Foo ";} | |
}; | |
class Bar: virtual Foo | |
{ |
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 <iostream> | |
using std::endl; | |
using std::cout; | |
class Foo | |
{ | |
public: Foo() { std::cout << std::endl << "Foo ";} | |
}; | |
class Bar: virtual Foo | |
{ |
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
using asp = Company.AspFunctions; |
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
# Useful command to get the group of log lines that: | |
# - Start with a keyword | |
# - End with a keyword | |
# Works on gzip files as well | |
# Breaks all groups by printing ---- in between as well. | |
# Note: Only works well when you have a well defined begin and end keyword else everything might be printed out | |
group() #Usage = 'group filename printBeginKeyword printUntilKeyword NumOfLines' // Works with regex | |
{ | |
if [[ "$#" -lt 3 ]] | |
then |
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
PROMPT_COMMAND='echo -ne "\033]0;${PWD}\007"' | |
#Long Version of Putty Title | |
#PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' | |
# Modify the title of the Putty window on your windows env | |
function title | |
{ | |
if [ "$TERM" == "xterm" ] ; then | |
# Remove the old title string in the PS1, if one is already set. |
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
public static void readExcelFile(string fileLocation, int workbookIndex, int worksheetIndex) | |
{ | |
// First open the Excel file | |
Application excelApp = default(Application); | |
excelApp = new Application(); | |
excelApp.Workbooks.Open(fileLocation); | |
// WorkBooks can be counted by using excelApp.Workbooks.Count | |
// To find out how many worksheets are there, on index 'workbookIndex' use the following: | |
// - excelApp.Workbooks[workbookIndex].Worksheets.Count |
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
class Node | |
{ | |
Node* next; | |
int data; | |
public: | |
friend class NodeAlgo; | |
~Node(void); |
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
Node* deleteNode(Node* head,int d) | |
{ | |
Node* n = head; | |
if (head->data == d) | |
{ | |
n = n->next; | |
delete head; | |
return n; | |
} |
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 removeDuplicates(Node* node) | |
{ | |
Node* n = node; | |
std::set<Node*, Node_Comparable> nodeSet; | |
nodeSet.insert(n); | |
while (n->next != NULL) | |
{ | |
std::pair<std::set<Node*>::iterator, bool> ret = nodeSet.insert(n->next); | |
if (ret.second) // element not there | |
{ |