Profile

Cover photo
Ricardo Ferraz Leal
Works at Oak Ridge National Laboratory
Attended Keele University
Lives in Knoxville TN, USA
555,325 views
AboutPosts

Stream

Ricardo Ferraz Leal

Shared publicly  - 
 
Replace Conditional with Polymorphism
Trying to convince my team to give up on if/then/else & case... Let's play with some code! First the the non Object Oriented / procedural version: /*  * non_oop.cpp  *  * Created on: Sep 4, 2015  * Author: ferrazlealrm@ornl.gov  *  * Non OOP example ...
Trying to convince my team to give up on if/then/else & case... Let's play with some code! First the the non Object Oriented / procedural version: /*  * non_oop.cpp  *  * Created on: Sep 4, 2015  * Author: ferrazlealrm@ornl.g...
1
Add a comment...

Ricardo Ferraz Leal

Shared publicly  - 
 
JQuery autocomplete with ranged fields
Few weeks ago I was looking for a way to get a form field autocomplete from a remote JSON file with a single HTTP request. the solution is  here . Now I want to do the same but using ranged fields (i.e., sort of an array where commas and hyphen mean ranges)...
1
Add a comment...

Ricardo Ferraz Leal

Shared publicly  - 
 
Git: Going back in time
1. Testing stuff on a old commit # This will detach your HEAD, that is, leave you with no branch checked out:
git checkout 0d1d7fc32 Or: # This will create a new branch to play and make new commits
git checkout -b old-state 0d1d7fc32 2. Getting rid of every...
1
1
Add a comment...

Ricardo Ferraz Leal

Shared publicly  - 
 
Git Roll Back
Rolling back to a previous commit: Only and if only you are working by your self! (This is dangerous in a collaborative environment: we are rewriting history!) git reset --hard git push -f origin Note, if by any reason you want to have access to the  lost  ...
1
Add a comment...

Ricardo Ferraz Leal

Shared publicly  - 
 
JQuery JavaScript autocomplete with remote json
Because it took me ages to figure it out: - No dynamic JSON request - One and a single one request to the remote location. Here the code: /* Function to populate the autocomplete from a remote json. */ function set_autocomplete ( selector , jsonurl ) { $ . ...
1
Add a comment...

Ricardo Ferraz Leal

Shared publicly  - 
 
TIOBE Index for January 2015
1
Add a comment...

Ricardo Ferraz Leal

Shared publicly  - 
 
Just for fun
64 cores, 512 GB of memory...
64 cores, 512 GB of memory...
1
Add a comment...

Ricardo Ferraz Leal

Shared publicly  - 
 
Writing post in markdown for your blog
Just write your markdown here: http://jbt.github.io/markdown-editor/ And copy paste from the right pane :) That's all!! Flavoured (i.e., github) Markdown syntax is available here: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
Just write your markdown here: http://jbt.github.io/markdown-editor/ And copy paste from the right pane :) That's all!! Flavoured (i.e., github) Markdown syntax is available here: https://github.com/adam-p/markdown-here/wik...
1
Add a comment...

Ricardo Ferraz Leal

Shared publicly  - 
 
Git: Delete Branch Remote and Locally
Delete the branch remotely: git push origin --delete And then (or the other way around) delete it locally: git branch -D
1
Add a comment...

Ricardo Ferraz Leal

Shared publicly  - 
 
Getting your pocket content delivered to your Kindle touch
I wanted to have the articles I save in my  Pocket  emailed to my old kindle touch... I hate reading in LCDs so I used for a while the  en2kindle  until the point it became paid. It's not expensive but after checking the  python wrapper for the pocket api I...
1
Add a comment...

Ricardo Ferraz Leal

Shared publicly  - 
 
Google Now can do tons of great stuff using nothing but voice commands. The list is more longer than you might think!
1
Add a comment...

Ricardo Ferraz Leal

Shared publicly  - 
1
José Gabadinho's profile photoRicardo Ferraz Leal's profile photoAngela Simpson's profile photo
3 comments
 
Wow. OK I want to go there!
Add a comment...
Story
Tagline
Scientist, photographer, world traveller, runner, biker, even geek...
Education
  • Keele University
    PhD Physics, 2005 - 2009
  • Instituto Superior Tecnico
    MSc Computer Science, 1996 - 2002
Basic Information
Gender
Male
Other names
Miguel Ferraz
Work
Occupation
Scientist
Employment
  • Oak Ridge National Laboratory
    Data Analysis Software Engineer, 2014 - present
  • Institut Laue-Langevin
    Scientist, 2012 - 2014
  • ESRF
    Scientist, 2004 - 2012
  • Sybase
    IT Consultant, 2002 - 2004
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Knoxville TN, USA
Previously
Grenoble, France - Lisbon, Portugal