Ticus' Formules

Tuesday, January 21, 2014

OPEN A TEXT FILE USING C#

System.IO.StreamReader textIn=
new   System.IO.StreamReader(
new   System.IO.FileStream(dir, FileMode.OpenOrCreate, FileAccess.Read));
System.Data.DataTable table = new System.Data.DataTable();
table.Columns.Add("Key", typeof(string));
table.Columns.Add("Name", typeof(string));
table.Columns.Add("LastName", typeof(string));
table.Columns.Add("Salary", typeof(string));
while (textIn.Peek() != -1)
{
string row = textIn.ReadLine();
string[] columns = row.Split('|');
table.Rows.Add(columns[0], columns[1], columns[2], columns[3]);
}
textIn.Close();
return table;

Monday, March 4, 2013

IF YOU GOT THIS ERROR IN ECLIPSE + GRAILS 2.2.1

"Error opening zip file or JAR manifest missing : nullError occurred during initialization of VMagent library failed to init: instrument Grails"

1) Create a folder named: "/lib/com.springsource.springloaded" in your grails directory.
2) Copy the content of: "../lib/org.springsource.springloaded" to the folder that you created on step one.

Eg:
1) /usr/share/grails/lib$ sudo mkdir com.springsource.springloaded/
2) /usr/share/grails/lib$ sudo cp -r org.springsource.springloaded/springloaded-core/ com.springsource.springloaded/

Install Grails in Ubuntu Natty

1) Download the zip folder.
2) Unzip grailsx.x.zip
3) cp -r grails-x.x /usr/share/
4)Open ~/.profile and copy this:

JAVA_HOME=/usr/local/java/jdk1.7.0_09/
GRAILS_HOME=/usr/share/grails
PATH=$PATH:/usr/share/grails/bin
export JAVA_HOME PATH
export GRAILS_HOME PATH


Sources:
http://ullu.wordpress.com/2011/02/13/installing-groovy-grails-on-ubuntu/
http://mylearningongroovygrails.blogspot.com/2012/09/installing-grails-on-ubuntu-11.html

Wednesday, October 27, 2010

Install Java JDK on Ubuntu 10.04

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk

Source: http://happy-coding.com/install-sun-java6-jdk-on-ubuntu-10-04-lucid/

Monday, October 18, 2010

HOW TO MAKE A PRESENTATION WITH LATEX

After installing a latex interpreter, install beamer package. In Ubuntu 9.10, try this:

sudo apt-get install latex-beamer

Code example (subtracted from here):

\documentclass{beamer}
\usepackage[latin1]{inputenc}
\usetheme{Warsaw}
\title[Make a LaTeX presentation using Beamer]{Introduction to Beamer\\How to make a presentation with LaTeX?}
\author{Nadir Soualem -- Astozzia}
\institute{Math-linux.com}
\date{Jule 13, 2007}
\begin{document}

\begin{frame}
\titlepage
\end{frame}


\begin{frame}{Introduction}
This is a short introduction to Beamer class.
\end{frame}

\end{document}

Thanks to:

Sunday, October 10, 2010

HOW TO COPY FILES AND DIRECTORIES IN LINUX

find -iname "*.doc" -exec cp -rf --parents {} {}.doc \;

Example:

find /media/disk -iname "*.doc" -exec cp -rf --parents {} {}.doc /media/disk-1/Misdocumentos/TodosLosDocumentos \;


Sources:
http://www.linuxquestions.org/questions/linux-newbie-8/copy-files-from-multiple-directories-into-one-directory-162396/
http://www.codecoffee.com/tipsforlinux/articles/21.html

Tuesday, June 15, 2010

HOW TO INSTALL iText LIBRARY IN UBUNTU/DEBIAN


Depending of where the Java SDK is installed, there are many ways to install it, this is the most common:
  1. Download iText jar file from here.
  2. Save it on a new empty folder.
  3. Go to the new folder and copy the .jar file to /ext/ folder where the SDK is installed. Eg: sudo cp *.jar /usr/lib/jvm/java-6-sun/jre/lib/ext/
  4. That's it.

Stats


View My Stats

Contributors