1) Install Mozplugger
$> sudo apt-get install mozplugger
2) Place the following in ~/.mozilla/mozpluggerrc
application/pdf: pdf: PDF file
application/x-pdf: pdf: PDF file
text/pdf: pdf: PDF file
text/x-pdf: pdf: PDF file
application/x-postscript: ps: PostScript file
application/postscript: ps: PostScript file
repeat noisy swallow(evince) fill: evince "$file"
3) Restart Firefox
Execute the libc linary, as in
$> /lib/libc.so.6
or, if not possible in your platform, execute
$> ldd --version
$> valgrind --leak-check=full --show-reachable=yes --track-origins=yes \
--track-fds=yes --demangle=yes --max-stackframe=256000 executable
#include <cstdlib>
#include <iostream>
/**
* Find the index in the array of the first element accepted by the predicate
**/
template<class T, class UnaryPredicate>
size_t index_of( T array[], size_t size, UnaryPredicate pred )
{
for(size_t i = 0; i < size;i++)
{
if(pred(array[i]))
return i;
}
return size;
}
/**
* The function object defining the "less_than" predicate
**/
template<typename T>
class less_than
{
public:
less_than(T value): value_(value) {};
bool operator() (T value)
{
return value < value_;
}
private:
T value_;
};
/**
* The function object defining the "between" predicate
**/
template<typename T>
class between
{
public:
between(T lower, T upper): lower_(lower), upper_(upper) {};
bool operator() (T value)
{
return lower_ <= value && value <= upper_;
}
private:
T lower_;
T upper_;
};
/**
* Macro to get the size of the array
**/
#define SIZEOF(A) (sizeof A / sizeof A[0])
/**
* Example of usage...
**/
int main(void)
{
double a[] = {56,200,643,45,8,1,3,1,23,5};
std::cout << index_of(a, SIZEOF(a), less_than<double>(45)) << std::endl;
std::cout << index_of(a, SIZEOF(a), between<double>(44, 46)) << std::endl;
}
bool is_system_big_endian()
{
long one = 1;
return !(*((char *)(&one)));
}
Add the following to your application’s WorkbenchAdvisor to remove the “Help” preference page:
@Override
public void postStartup() {
PreferenceManager pm = PlatformUI.getWorkbench().getPreferenceManager( );
pm.remove( "org.eclipse.help.ui.browsersPreferencePage" );
}
PreferencePage.noDefaultAndApplyButton();
- Had to install the following prerequisites, while using a Ubuntu box. Some might have already been installed. Check the list of prerequisites.
$> sudo apt-get install libmpc-dev libgmp3-dev libmpfr-dev
- Select a mirror and download the required version through http://gcc.gnu.org/releases.html.
$> wget http://mirrors-us.seosue.com/gcc/releases/gcc-4.6.2/gcc-4.6.2.tar.gz
Extract the downloaded package archive into a temporary source directory (SRC_DIR).
- Prepare the object directory (OBJ_DIR) and configure the build. Consider setting the PREFIX_DIR (e.g. /opt/gcc-4.6.2) in configure conmmand.
$> mkdir $OBJ_DIR
$> cd $OBJ_DIR
$> $SRC_DIR/configure --prefix=$PREFIX_DIR --enable-languages=c,c++,fortran
--disable-bootstrap --disable-multilib
- Compile
$> make
- Install
$> make install
The following works with Firefox 9.0.1 (installed in a Ubuntu Linux PC):
- Install keyconfig extension, available at mozillazine foruns.
- Go to Tools -> Keyconfig…, add a new key binding for (Ctrl+Alt+B) named “Bookmarks Toolbar”
- Setup the key binding code to
var E=document.getElementById('PersonalToolbar');
if(E.collapsed){E.removeAttribute('collapsed')}
else{E.setAttribute('collapsed',true)}
- Restart firefox.