Camilo Lozano III
Camilo III
This user hasn't shared any biographical information
Homepage: http://camilord.kagayan.com
Yahoo Messenger: camilo3rd
Posts by Camilo III
underNeaTH thE WavES…
Feb 1st
doing things in a milder way,to have a proper and positive perspective with life.many questions drenching me.. when can i bid goodbye to these emotional fatigue, tagging themselves voluntarily with me?
Victor Hugo said that the greatest happiness of life is the conviction that we are loved — for ourselves, or rather in spite of ourselves..
Songs, quotes, advises are written so nicely and undeniably promising… is it as promising as these songs we hum? quotes we read and live by? advises we’ve listened and taken?
i used to define love as both my admission of strength and my admission of weakness.. lavishly spoken, unfamiliar with how it really is..
until you…
until you i found the phrase’s truest sense, the deeper meaning on how to be feeling it.. living it.. in its truest sense you are indeed my admission of strength and weakness…
…. knowing there could have more than this life with you could offer.
……. i may be better off all of these we are into, but either way it is going to be difficult to breathe…
despite all of these things, i would still chose to be with you..
……with the moments you made me extremely mad, you are also the very reason that made me extremely happy.
…. you are my definition of love in its truest sense, every step i took with you has its cause, and all these things we are doing just kept on making sense everyday,
and what we are to become is the answer to this difficult love..
at times when the admission of weakness calls, the fight to stand firm with admission of strength lingers..
…..there could be nothing right without you..
……… it is not right if not you..
No hay palabra de honor
Jan 23rd
When I watched TV last December 2009 (which I watch TV rarely), I saw the advertisement of the promised politician, Manny Villar. (which also I got irritated with his ads) And I said, *puff!* He really got a guts running for President after his controversial C5. Not to mention what he promised to me and my colleagues way back year 2005, under Mindanao Business and Management Youth Congress program. (see picture below) And until now his ads still air on ABS-CBN. And thinking that every ads in ABS-CBN cost hundreds of thousands. Yet he can afford to air his ads. Then I realized the C5 controversial, and said to myself… Now I get it why he got enough funds for his campaign.
The picture was a meeting with Manny Villar and the MBMYC Staff. Villar promised that he will finance a livelihood program and helping the poor in the remote areas in Cagayan de Oro City. He made a lot of promises that day. Yet he accomplished nothing. After the meeting, no funds has been sent to us.
After that, I concluded that this politicians will do nothing for our country!
Election 2010, I won’t vote any president! They are all the same! Dick, Binay, Noynoy and Villar… Same feathers! And they flock together!
Filipinos will always be hopeless with these kind of people!
In addition, I was tagged in the facebook and laugh hard about it… And I think its true! Bwuahahahaha!
Visual C#: Detect Conflict Schedule
Jan 18th

Screenshot
It seems a lot of people are searching about solving conflict schedule. So I decided to create a sample. Below is the core code of checking conflict schedule…
// sample conflict detection (defined) [start]
DateTime d = new DateTime(2010, 1, 13);
richTextBox1.Text = DateTime.Now.ToLongDateString() + ” = ” + d.ToLongDateString() + “\n”;
if (DateTime.Now.CompareTo(d) > 0)
{
richTextBox1.Text += “true\n” + DateTime.Now.CompareTo(d).ToString();
}
else
{
richTextBox1.Text += “false\n” + DateTime.Now.CompareTo(d).ToString();
}
richTextBox1.Text += “\n\n”;
DateTime dx = DateTime.Now;
//MessageBox.Show(dx.Hour.ToString());
DateTime[] dt = new DateTime[4];
// enrolled schedule
dt[0] = new DateTime(int.Parse(dx.Year.ToString()), int.Parse(dx.Month.ToString()), int.Parse(dx.Day.ToString()), 8, 0, 0);
dt[1] = new DateTime(int.Parse(dx.Year.ToString()), int.Parse(dx.Month.ToString()), int.Parse(dx.Day.ToString()), 9, 0, 0);
// adding new schedule
dt[2] = new DateTime(int.Parse(dx.Year.ToString()), int.Parse(dx.Month.ToString()), int.Parse(dx.Day.ToString()), 9, 0, 0);
dt[3] = new DateTime(int.Parse(dx.Year.ToString()), int.Parse(dx.Month.ToString()), int.Parse(dx.Day.ToString()), 10, 0, 0);
// checking schedule conflict
if (((dt[0].CompareTo(dt[2]) < 0) && (dt[1].CompareTo(dt[2]) > 0)) || (dt[0].ToShortTimeString() == dt[2].ToShortTimeString()))
{
richTextBox1.Text += dt[0].ToShortTimeString() + ” – ” + dt[1].ToShortTimeString() + ” against ” + dt[2].ToShortTimeString() + ” – ” + dt[3].ToShortTimeString() + “\nResult: CONFLICT”;
}
else
{
richTextBox1.Text += dt[0].ToShortTimeString() + ” – ” + dt[1].ToShortTimeString() + ” against ” + dt[2].ToShortTimeString() + ” – ” + dt[3].ToShortTimeString() + “\nResult: NO CONFLICT”;
}
// sample conflict detection (defined) [end]
If you want to download the whole code, link below and enjoy… Do not practice the copy and paste!
Download: Detect Conflict Schedule (14)
Visual C#: Retrieving Image (BLOB) from MySQL database
Dec 14th
I’ve been searching an article about storing and retrieving an image (BLOB data type) from MySQL database. Somehow, I only found the retrieving process but I created the storing process using PHP…
You may download my works, link provided below…
- idsystem_database.sql.zip – the dump file of MySQL database; import this SQL file before running the project
- the rest of the files are the project sample files
-> retrieveImg_public.zip (39) or http://camilord.kagayan.com/my.files/retrieveImg_public.zip
For the credits, Thanks to Markusek Peter…
MySqlConnection myConnection = new MySqlConnection(myConnString);
string testQuery = “SELECT sp.studePhoto, s.firstName, s.lastName
FROM students AS s, student_photos AS sp WHERE s.id = sp.studentID”;
MySqlCommand myCommand = new MySqlCommand(testQuery, myConnection);myConnection.Open();
MySqlDataReader myReader = myCommand.ExecuteReader();FileStream fs; // Writes the BLOB to a file (*.jpg).
BinaryWriter bw; // Streams the BLOB to the FileStream object.
int bufferSize = 100; // Size of the BLOB buffer.
// The BLOB byte[] buffer to be filled by GetBytes.
byte[] outbyte = new byte[bufferSize];
long retval; // The bytes returned from GetBytes.
long startIndex = 0; // The starting position in the BLOB output.while (myReader.Read())
{
DateTime tmp = new DateTime();
tmp = DateTime.Now;
// Create a file to hold the output.
string filename = camilordMD5(tmp.ToLongDateString().ToString() + tmp.ToLongTimeString().ToString()) + “.jpg”;string dest = Directory.GetCurrentDirectory() + “/” + filename;
fs = new FileStream(dest, FileMode.OpenOrCreate, FileAccess.Write);
bw = new BinaryWriter(fs);// Reset the starting byte for the new BLOB.
startIndex = 0;
// Read the bytes into outbyte[] and retain the number of bytes returned.//myReader.GetBytes(0, startIndex, outbyte, 0, bufferSize);
retval =(long) myReader.GetBytes(0, startIndex, outbyte, 0, bufferSize);
lblName.Text = myReader.GetString(1) + ” ” + myReader.GetString(2);// Continue reading and writing while there are bytes beyond the size of the buffer.
while (retval == bufferSize)
{
bw.Write(outbyte);
bw.Flush();// Reposition the start index to the end of the last buffer and fill thebuffer.
startIndex += bufferSize;
retval = myReader.GetBytes(0, startIndex, outbyte, 0, bufferSize);}
pictureBox1.ImageLocation = Directory.GetCurrentDirectory() + “/test.jpg”;
//pictureBox1.Image = retval;// Write the remaining buffer.
bw.Write(outbyte, 0, (int)retval – 1);
bw.Flush();// Close the output file.
bw.Close();
fs.Close();
}
Visual C#: Handling X button (top-right)
Dec 7th
Disabling the X button
private const int CP_NOCLOSE_BUTTON = 0x200;
protected override CreateParams CreateParams
{
get
{
CreateParams myCp = base.CreateParams;
myCp.ClassStyle = myCp.ClassStyle | CP_NOCLOSE_BUTTON;
return myCp;
}
}
Add confirmation if window closing or closed…
Insert this code to Main form or the Form1.cs…
private void Form1_Closing(object sender,
System.ComponentModel.CancelEventArgs e)
{
if (MessageBox.Show("Are you sure you want to exit?", "Confirm exit",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
e.Cancel = true;
}
}
Insert this to Form1.Designer.cs…
this.Closing += new System.ComponentModel.CancelEventHandler(
this.frmCCS_Closing);
[PHP] Converting a value to MAC address format
Oct 20th
I just want to post this since someone ask about it. It might help if someone in this world is searching for an answer with the same problem my friend does. This is about converting a value of 0014:f8c4:9e32 or 0014f8c49e32 to 00:14:f8:c4:9e:32…
Now here’s some answers for that…
function convertMACAddress($input)
{
// clean up unwanted characters
$input = preg_replace( '/[^a-zA-Z0-9]/', '', $input);
// initiate character positioning
$pos = 0;
// declare output container
$output = '';
// if given MAC is invalid, terminate process and return an error
if (strlen($input) < 12)
{
return '[Unrecognized MAC address]';
}
// initiate convertion...
for ($i = 0; $i < 6; $i++)
{
if ($i == 0)
{
$output .= substr($input, $pos, 2);
}
else
{
$output .= ':'.substr($input, $pos, 2);
}
$pos += 2;
}
return $output;
}
That’s it… Problem solved.
If need a sample code, please download the source -> Mac Convert (28) — Have fun coding..
Facebook: Cafe World Tips and Tricks (Cheats)
Oct 17th
Lately, I was addicted playing the Cafe World by Zynga. There are some tricks that my fellow office mates how to earn coins so fast and its cafe popularity. I would like to share this to you all…

Deep freeze Popularity
Here’s the Tips and Tricks…
- Barricade your chef and waiter(s) with tables (shown in the images)
- Remove your doors if you have nothing to serve, this is to preserve your popularity rate
- Serve at least 2 or more varieties of food to boost the growth of popularity rate
- Having below 15 popularity rate, If you notice that few customers are coming in, click the Expand Cafe or Functional then click the check or OK. This will make the customer appear in your restaurant automatically
- Having 30 popularity rate, put many doors as possible

Speedy Food Distribution
Gmail v.s. Ymail
Jul 13th
Since my first plug into the internet, I use yahoo. When I search, I also use Yahoo search and that was year 1998. But now, Yahoo change a lot with sophisticated functionality. For google, I only use for search as alternative for Yahoo. But now, Google has the best functionalities and all.
Gmail and Google Search
- Simple
- User-friendly
- Less Ads (if there’s an ads, it’s just a line)
- Powerful spam filter
- Lots of labs modules
Ymail and Yahoo Search
- Sophisticated Functionalities
- Lots of spam
- Copied the chat functionality of Google
- Lots of Ads (like really big ads)
- Stupid Seals
As a conclusion, Yahoo sucks! Google Rocks!!!
Attacks in Mindanao
Jul 10th
Since I’m young, I always experience about bombing here and there anywhere in Mindanao. After many-many years, I realized that its all a play. A way of having more money to come for the politicians.
- Bombing of Maria Christina Bridge in Iligan City (April 20, 2009) – It seems the election is so near, all bombs away where the money comes. I think 64M has been released for the repair. And many months later from the released date, there no repair happened. Again, its a play to get the money from above.
- Bombing of Sabayle Street, Iligan City (July 6, 2009 — includes also other places in Mindanao) – I think it all about the charter change. Since they want to change the constitution, they want to declare martial law by using the terrorist act and somehow, they were the terrorist.
As my conclusion to these events, Mindanao is the source of their money. Not to mention all the illegal drugs, firearms and etc are came from Mindanao and somehow protected by the highest position in this country. In short, Mindanao is the lab rats!

