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
# This function defines a 'cd' replacement function capable of keeping, | |
# displaying and accessing history of visited directories, up to 10 entries. | |
# To use it, uncomment it, source this file and try 'cd --'. | |
# acd_func 1.0.5, 10-nov-2004 | |
# Petar Marinov, http:/geocities.com/h2428, this is public domain | |
cd_func () | |
{ | |
local x2 the_new_dir adir index | |
local -i cnt |
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> | |
#include<string> | |
#include<cstring> | |
using namespace std; | |
void trim(string &str) | |
{ | |
while(!str.empty() && (str[0] == '0')) | |
str.erase(str.begin()); | |
} | |
int makeEqualLength(string &str1, string &str2) |