29 Oct
Great blog about pharma traceability http://www.rxtrace.com/
26 Oct
You can download the GS1 Healthcare Conference presentations here: http://www.gs1.org/healthcare/news_events/231012/post … #GS1Healthcare
25 Oct
Yesterday I attended the Pedigree sessions of GS1 Healthcare conference in Lisbon http://www.gs1.org/healthcare/news_events/231012 … Very interesting!
15 Oct
http://trakchain.net is now available in English and Portuguese. All information was also updated with the latest project developments.
15 Oct
Updated my web page. Check it out! http://web.ist.utl.pt/miguel.pardal/ My publications are now easier to find! My social networks too!
9 Oct
Revising background chapters of my PhD thesis
4 Oct
Java evolution roadmap http://www.oracle.com/us/corporate/press/1854982 …
3 Oct
@IngoKegel JProfiler is amazingl! It would be even better if CPU export used session name by default and saved both html and xml w 1 click
2012-10-31
2012-10-18
How to add watermarks to your PDF files
You probably have seen documents with background watermarks stating something like:
Draft
Proof
Final
Urgent
Priority
Do Not Copy
Copy
For Your Eyes Only
Review Copy
Confidential
Top Secret
Duplicate
... you get the idea :)
There are free tools that can do it for you. I recommend PDFill Tools or Pdftk (command-line alternative).
Draft
Proof
Final
Urgent
Priority
Do Not Copy
Copy
For Your Eyes Only
Review Copy
Confidential
Top Secret
Duplicate
... you get the idea :)
There are free tools that can do it for you. I recommend PDFill Tools or Pdftk (command-line alternative).
2012-10-15
How to check SVN repository version
cat svn-repo/format/dbIf the file contents lists 3 on the first line, it stands for SVN 1.5, 4 for SVN 1.6
Credits: http://stackoverflow.com/a/282484/129497
The repository can be upgraded with:
svnadmin upgrade svn-repoThis can be important because SVN 1.5 and 1.6 introduced many improvements to branch operations including the svn mergeinfo command. If the repository is in an older version there is not enough metadata to ease the branch synchronizations.
How to set permissions for Linux personal web site
Let's suppose that we have a user account located at ~ and a web site at ~/www
We need to set the directory permissions to 755 allow every
We need to set the files to 644 (owner can r/w, everybody else can r)
These are the classic Unix file permissions.
However, if AFS is being used, we also need to provide permissions in the access control lists (ACL).
The following command gives access to the web folder to anyone:
The following lists the existing permissions:
More help on AFS
"
There are seven standard AFS permissions, each referred to by one of the letters r, l, i, d, w, k and a. The lida permissions apply to directories and the rwk permissions apply to files.
Directory permissions
l (lookup)
Allows one to list the contents of a directory. It does not allow the reading of files.
i (insert)
Allows one to create new files in a directory or copy new files to a directory.
d (delete)
Allows one to remove files and sub-directories from a directory.
a (administer)
Allows one to change a directory's ACL. The owner of a directory can always change the ACL of a directory that s/he owns, along with the ACLs of any subdirectories in that directory.
File permissions
r (read)
Allows one to read the contents of file in the directory.
w (write)
Allows one to modify the contents of files in a directory and use chmod on them.
k (lock)
Allows programs to lock files in a directory.
"
We need to set the directory permissions to 755 allow every
We need to set the files to 644 (owner can r/w, everybody else can r)
u g w 0 - 0 0 0 1 - 0 0 1 2 - 0 1 0 3 - 0 1 1 4 - 1 0 0 5 - 1 0 1 6 - 1 1 0 7 - 1 1 1u stands for 'user', g for 'group' and w for 'world'.
These are the classic Unix file permissions.
However, if AFS is being used, we also need to provide permissions in the access control lists (ACL).
The following command gives access to the web folder to anyone:
fs sa www system:anyuser rl
The following lists the existing permissions:
fs la www
More help on AFS
"
There are seven standard AFS permissions, each referred to by one of the letters r, l, i, d, w, k and a. The lida permissions apply to directories and the rwk permissions apply to files.
Directory permissions
l (lookup)
Allows one to list the contents of a directory. It does not allow the reading of files.
i (insert)
Allows one to create new files in a directory or copy new files to a directory.
d (delete)
Allows one to remove files and sub-directories from a directory.
a (administer)
Allows one to change a directory's ACL. The owner of a directory can always change the ACL of a directory that s/he owns, along with the ACLs of any subdirectories in that directory.
File permissions
r (read)
Allows one to read the contents of file in the directory.
w (write)
Allows one to modify the contents of files in a directory and use chmod on them.
k (lock)
Allows programs to lock files in a directory.
"
2012-10-06
Google Virtual Brain
Google Puts Its Virtual Brain Technology to Work - Technology Review: This summer Google set a new landmark in the field of artificial intelligence with software that learned how to recognize cats, people, and other things simply by watching YouTube videos (see "Self-Taught Software"). That technology, modeled on how brain cells operate, is now being put to work making Google's products smarter, with speech recognition being the first service to benefit.
Google's learning software is based on simulating groups of connected brain cells that communicate and influence one another. When such a neural network, as it's called, is exposed to data, the relationships between different neurons can change. That causes the network to develop the ability to react in certain ways to incoming data of a particular kind—and the network is said to have learned something.
Google's learning software is based on simulating groups of connected brain cells that communicate and influence one another. When such a neural network, as it's called, is exposed to data, the relationships between different neurons can change. That causes the network to develop the ability to react in certain ways to incoming data of a particular kind—and the network is said to have learned something.
2012-10-05
How to backup and restore Subversion repository
Backing up and Restoring Your Subversion Repository - OCS Support Wiki: Using the Console
Establish an SSH connection to your designated SVN / Trac server and login with the same username and password you use to obtain access to the SVN / Trac control panel. Once in, run:
svnadmin dump ~/svn/repo_name > repo_name.svn.dump
Replace repo_name with your repository name. This will backup your repository into a file called repo_name.svn.dump. You can then restore a Subversion backup with:
svnadmin load ~/svn/repo_name < repo_name.svn.dump
Establish an SSH connection to your designated SVN / Trac server and login with the same username and password you use to obtain access to the SVN / Trac control panel. Once in, run:
svnadmin dump ~/svn/repo_name > repo_name.svn.dump
Replace repo_name with your repository name. This will backup your repository into a file called repo_name.svn.dump. You can then restore a Subversion backup with:
svnadmin load ~/svn/repo_name < repo_name.svn.dump
How to change paper size for IEEE LaTeX template
(La)TeX Support for manuscript preparation: Guide to use ieeeconf.cls (based on IEEEtrans.cls) IEEEtran_HOWTO.pdf
The document sample_new.tex may be configured for US Letter paper or A4. Please note the following four important lines:
\documentclass[letterpaper, 10 pt, conference]{ieeeconf} % use above line letter sized paper
\documentclass[a4paper, 10pt, conference]{ieeeconf} % Use this line for a4 paper
\IEEEoverridecommandlockouts % Needed if you want to use the \thanks command
\overrideIEEEmargins % Needed to meet printer requirements.
The document sample_new.tex may be configured for US Letter paper or A4. Please note the following four important lines:
\documentclass[letterpaper, 10 pt, conference]{ieeeconf} % use above line letter sized paper
\documentclass[a4paper, 10pt, conference]{ieeeconf} % Use this line for a4 paper
\IEEEoverridecommandlockouts % Needed if you want to use the \thanks command
\overrideIEEEmargins % Needed to meet printer requirements.
Groovy Date Format one-liner
new Date().format("yyyy-MM-dd")
This method has been added to java.util.Date
Current date (mm/dd/yyyy) (Groovy forum at JavaRanch):
import org.codehaus.groovy.runtime.*;
class Run{
static void main(def args){
def dateTime = new Date()
println DateGroovyMethods.format(dateTime, 'MM/dd/yyyy')
}
}
This method has been added to java.util.Date
Current date (mm/dd/yyyy) (Groovy forum at JavaRanch):
import org.codehaus.groovy.runtime.*;
class Run{
static void main(def args){
def dateTime = new Date()
println DateGroovyMethods.format(dateTime, 'MM/dd/yyyy')
}
}
Groovy File One Liners
Groovy Scripting and Programming: Groovy File One Liners
One of the nice things about Groovy if you are a Java programmer is the ease that you can manipulate files with just one like of code.
Create or replace a file and write a line of text to it:
new File("myfile.txt").write("Here is a line: \"whats a nice programmer like you doing at a blog like this\" \n");
Append to a file (creates the if it doesn't exist)
new File("myfile.txt").append("\"Looking for a some code like this\"\n");
Read the second line (First line is line 0) of the file
println new File("myfile.txt").readLines()[1] //what was the response
One of the nice things about Groovy if you are a Java programmer is the ease that you can manipulate files with just one like of code.
Create or replace a file and write a line of text to it:
new File("myfile.txt").write("Here is a line: \"whats a nice programmer like you doing at a blog like this\" \n");
Append to a file (creates the if it doesn't exist)
new File("myfile.txt").append("\"Looking for a some code like this\"\n");
Read the second line (First line is line 0) of the file
println new File("myfile.txt").readLines()[1] //what was the response
2012-10-04
Groovy one-liner to extract file name without extension
Does groovy have an easy way to get a filename without the extension? - Stack Overflow:
file.name.lastIndexOf('.').with {it != -1 ? file.name[0..<it] : file.name}
or with a simple regexp:
file.name.replaceFirst(~/\.[^\.] $/, ''
file.name.lastIndexOf('.').with {it != -1 ? file.name[0..<it] : file.name}
or with a simple regexp:
file.name.replaceFirst(~/\.[^\.] $/, ''
2012-10-03
How to paste text to multiple columns in Excel
Learn Microsoft Excel: Smart Paste: Pasting text into different Excel cells can be done by making use of the TAB key in the text editor. Pressing Tab represents a new cell in Excel when pasting the contents into Microsoft Excel. To create a four column layout in Excel one would simply write down the name of the first column, press tab, write down the name of the second column, press tab and so on.
How to pipe command output to Windows clipboard
Use clip.exe!
Copy Command Line Output to Windows Clipboard Directly:
dir /h | clip – Copy the help manual for DIR command to the clipboard
tracert www.labnol.org | clip – Trace the path from your computer to another website – the output is automatically copied to the clipboard and not displayed on the screen.
netstat | clip - Check if your computer is connecting to websites without your knowledge.
The clip.exe utility can also be used to copy contents of text files to clipboard directly from the command line.
clip < C:\AUTOEXEC.bat – this will copy all the text from autoexec.bat to your Windows Clipboard.
Copy Command Line Output to Windows Clipboard Directly:
dir /h | clip – Copy the help manual for DIR command to the clipboard
tracert www.labnol.org | clip – Trace the path from your computer to another website – the output is automatically copied to the clipboard and not displayed on the screen.
netstat | clip - Check if your computer is connecting to websites without your knowledge.
The clip.exe utility can also be used to copy contents of text files to clipboard directly from the command line.
clip < C:\AUTOEXEC.bat – this will copy all the text from autoexec.bat to your Windows Clipboard.
Subscribe to:
Posts (Atom)