February 2012
2 posts
What about Liferay Sync? Nice, hmm? →
4 tags
MDIChild form from an MDIChild form in C #
I was working in a MDI Desktop Application, and I was looking for a way to open a new form (send some parameters) and make this new form a child of my MDIControl Form or main Form. I didn’t have to much luck looking around for an answer on Forums so here I post a very simple solution that I came up with.
I hope this help someone in need out there :)
October 2011
1 post
Steve Jobs 1955-2011 →
September 2011
2 posts
Get a chicken, hijack its DNA, and stand back!
– How to Hatch a Dinosaur | Magazine
7 tags
Backing up files in Windows with a .bat file
I was asked to write a batch file or script to backup some files in one of the servers. Here I attached an image of the batch file. It used xcopy and /I if the destination does’t exist and there is more than one file to copy assume that is a folder, /E Copy directories and and subdirectories, including empty ones. You set up the scheduler to run this batch one a day and voila! I hope this...
August 2011
2 posts
4 tags
Rework - by the 37 signals' guys
I was reading rework a few weeks ago, I just got the time to finish it today morning. Interesting stuff, if you have the time and interest in Biz topics Rework is a fresh and controversial alternative.
I’m not a biz guy myself, but after work in freelance projects for a while sometimes there is a necessity of understand topics that are covered in this book. It is fun to see how a...
4 tags
June 2011
2 posts
5 tags
Sorting Arrays by object attribute (C# / Ruby)
I was working in one of the chef contest problems this morning and I found the need of sort an array by an object attribute, I thought it was pretty neat. Here I attached the code in C#
The class:
Sorting the array… (yc is an array)
The Ruby version :
...
4 tags
CodeChef, Easy Factorial
All submissions for this problem are available.
The most important part of a GSM network is so called Base Transceiver Station (BTS). These transceivers form the areas called cells (this term gave the name to the cellular phone) and every phone connects to the BTS with the strongest signal (in a little simplified view). Of course, BTSes need some attention and technicians need to check their...
May 2011
8 posts
5 tags
JRuby 1.6.2 + Netbeans 7 + Windows 7
As everyone knows now, there is not official support for ruby in the new Netbeans 7. That’s sad, but there is a way (at your own risk) that we can make this combo works:
1. Click Tools > Settings Tab > Add
2. Set name to “beta 1”
3. Set URL to ‘http://updates.netbeans.org/netbeans/updates/7.0/uc/beta/stable/catalog.xml.gz’
4. Press ‘OK’ and...
4 tags
Is my childForm already running in...
I want to run one childForm a kind to run once at a time, here is a way to verify id there is another one already running. I used to do that because I don’t want my users to open two Forms of the same kind at the time because they found it confusing at a time.
This code is inside my MDI parent Form:
4 tags
Is my program already running? (C#)
Sometimes to protect data integrity, specially if we are accessing a remote DB. I just want one instance of my program running, here is a way to determinate the number of processes running. Be careful where you write this piece of code. I added it up to program.cs.
The form is not on production yet, but it works checking your processes!
4 tags
CodeChef, Medium Prime Generator Prime1
All submissions for this problem are available.
Shridhar wants to generate some prime numbers for his cryptosystem. Help him! Your task is to generate all prime numbers between two given numbers.
Input
The first line contains t, the number of test cases (less then or equal to 10).
Followed by t lines which contain two numbers m and n (1 <= m <= n <= 1000000000, n-m<=100000)...
4 tags
CodeChef, Peer Problem 1
All submissions for this problem are available.
Reversed number is a number written in arabic numerals but the order of digits is reversed. The first digit becomes last and vice versa. For example, if the number is 1245,it will become 5421 .Note that all the leading zeros are omitted. That means if the number ends with a zero, the zero is lost by reversing (e.g. 1200 gives 21). Also note that...
9rules, independent bloggers →
4 tags
From DB to datagridview, no wizards allowed
I was looking for an easy way to populate my datagridview, keeping my column headers and without playing around with the properties too much. Here i wrote a method that grab data from a DB, and I used it here to pass it through the screen. First, I get the data from the DB to a Dataset, so I use a Datatable to order my data and then I used a double for-loop to fill the DGV up.
The only thing...
5 tags
July 2008
1 post
3 tags