SEO Fart | XML-RPC Ping Tool

Info.Tech, Software Development, Visual C# .Net Comments Off on SEO Fart | XML-RPC Ping Tool

As my latest creation which boost me up to create this desktop application are my SEO staff which they have been searching for a good ping tool for their SEO. So instead of buying a software, I created my own and let them use it for their SEO campaign. I call it XML-RPC Ping Tool and under a brand name of SEO Fart because most of us always fart in the office. Hahahhahaha!

XML-RPC Ping Tool – A made-easy tool that poke Search Engines via ping service websites that your blog or website has been updated. Capable of mass URL pinging and scheduled URL pinging to make your SEO tasks easy and fast.

However, in the office the application is for free but to other people, its for sale. Sweat and effort must be paid of course. ๐Ÿ™‚

Pingering – Free Ping Utility Tool for SEO

Info.Tech, Software Development, Visual C# .Net 1 Comment »

Yesterday, my friend Elvar ask me to create a tool for his SEO campaign. So since I have nothing to do even though my Adv. Stats exam is 2 days ahead yet I haven’t read my notes even a glance, I still have a change to create this tiny tool for Elvar, you and to whom who need it somewhere out there in the vast space of the cyber world. ๐Ÿ™‚

Download: Pingering | Ping Utility Tool (775)

By the way, if your running on Windows XP and older version of Windows, please install .NetFramework before running the Pingering.

Download .NetFramework 2.0: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en

Epoch Time

Info.Tech, PHP, Software Development, Visual C# .Net, Web Development Comments Off on Epoch Time

I saved this information due to I used it all the time in my programming either PHP, JavaScript nor Visual C#. I found very very useful.. ๐Ÿ™‚

——————————————–

What is epoch time?

The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z). Literally speaking the epoch is Unix time 0 (midnight 1-1-1970), but ‘epoch’ is often used as a synonym for ‘Unix time’. Many Unix systems store epoch dates as a signed 32-bit integer, which might cause problems on January 19, 2038 (known as the Year 2038 problem or Y2038).

Human readable time Seconds
1 minute 60 seconds
1 hour 3600 seconds
1 day 86400 seconds
1 week 604800 seconds
1 month (30.44 days) 2629743 seconds
1 year (365.24 days) 31556926 seconds

How to get the current epoch time in …

Perl time
PHP time()
Ruby Time.now (or Time.new). To display the epoch: Time.now.to_i
Python import time first, then time.time()
Java long epoch = System.currentTimeMillis()/1000;
Microsoft .NET C# epoch = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
VBScript/ASP DateDiff("s", "01/01/1970 00:00:00", Now())
Erlang calendar:datetime_to_gregorian_seconds(calendar:now_to_universal_time( now()))-719528*24*3600.
MySQL SELECT unix_timestamp(now()) More information
PostgreSQL SELECT extract(epoch FROM now());
Oracle PL/SQL SELECT (SYSDATE - TO_DATE('01-01-1970 00:00:00', 'DD-MM-YYYY HH24:MI:SS')) *
24 * 60 * 60 FROM DUAL
SQL Server SELECT DATEDIFF(s, '1970-01-01 00:00:00', GETUTCDATE())
JavaScript Math.round(new Date().getTime()/1000.0) getTime() returns time in milliseconds.
Unix/Linux Shell date +%s
PowerShell Get-Date -UFormat "%s" Produces: 1279152364.63599
Other OS’s Command line: perl -e "print time" (If Perl is installed on your system)

Convert from human readable date to epoch

Perl Use these Perl Epoch routines
PHP mktime(hour, minute, second, month, day, year) More information
Ruby Time.local(year, month, day, hour, minute, second, usec ) (or Time.gm for GMT/UTC input). To display add .to_i
Python import time first, then int(time.mktime(time.strptime('2000-01-01 12:34:00', '%Y-%m-%d %H:%M:%S'))) - time.timezone
Java long epoch = new java.text.SimpleDateFormat ("dd/MM/yyyy HH:mm:ss").parse("01/01/1970 01:00:00");
VBScript/ASP DateDiff("s", "01/01/1970 00:00:00", time field) More information
MySQL SELECT unix_timestamp(time) Time format: YYYY-MM-DD HH:MM:SS or YYMMDD or YYYYMMDD
More on using Epoch timestamps with MySQL
PostgreSQL SELECT extract(epoch FROM date('2000-01-01 12:34'));
With timestamp: SELECT EXTRACT(EPOCH FROM TIMESTAMP WITH TIME ZONE '2001-02-16 20:38:40-08');
With interval: SELECT EXTRACT(EPOCH FROM INTERVAL '5 days 3 hours');
SQL Server SELECT DATEDIFF(s, '1970-01-01 00:00:00', time field)
JavaScript use the JavaScript Date object
Unix/Linux Shell date +%s -d"Jan 1, 1980 00:00:01" Replace ‘-d’ with ‘-ud’ to input in GMT/UTC time.

Convert from epoch to human readable date

Perl Use these Perl Epoch routines
PHP date(output format, epoch); Output format example: ‘r’ = RFC 2822 date More information
Ruby Time.at(epoch)
Python import time first, then time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.localtime(epoch)) Replace time.localtime with time.gmtime for GMT time. More information
Java String date = new java.text.SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(new java.util.Date (epoch*1000));
VBScript/ASP DateAdd("s", epoch, "01/01/1970 00:00:00") More information
MySQL from_unixtime(epoch, optional output format) The default output format is YYY-MM-DD HH:MM:SS more …
PostgreSQL PostgreSQL version 8.1 and higher: SELECT to_timestamp(epoch); More information Older versions: SELECT TIMESTAMP WITH TIME ZONE 'epoch' + epoch * INTERVAL '1 second';
SQL Server DATEADD(s, epoch, '1970-01-01 00:00:00')
Microsoft Excel =(A1 / 86400) + 25569 Format the result cell for date/time, the result will be in GMT time (A1 is the cell with the epoch number). For other timezones: =((A1 +/- timezone adjustment) / 86400) + 25569.
Crystal Reports DateAdd("s", {EpochTimeStampField}-14400, #1/1/1970 00:00:00#) -14400 used for Eastern Standard Time. See Timezones.
JavaScript use the JavaScript Date object
Unix/Linux Shell date -d @1190000000 Replace 1190000000 with your epoch, needs recent version of ‘date’. Replace ‘-d’ with ‘-ud’ for GMT/UTC time.
PowerShell Function get-epochDate ($epochDate) { [timezone]::CurrentTimeZone.ToLocalTime(([datetime]'1/1/1970').AddSeconds($epochDate)) }, then use: get-epochDate 1279152364. Works for Windows PowerShell v1 and v2
Other OS’s Command line: perl -e "print scalar(localtime(epoch))" (If Perl is installed) Replace ‘localtime’ with ‘gmtime’ for GMT/UTC time.

———————————–

Reference: http://www.epochconverter.com

Link List

dev-C++, Info.Tech, Software Development Comments Off on Link List

Past few weeks, been busy with my online jobs.. yet back to my study in C++, dev-C++. I’m having difficulty on understanding link list coz I’m in the mode of refuse to learn. However, forcing myself will achieve my goal. hehehehe..

Link below is the problem;

  1. Swapping a Link List elements
  2. Search and Delete an elements from Link List

Source Codes:

  1. Swap Link List (807)
  2. Link List Search and Delete (786)

Again, its a rush coding.. its kinda messy.. bwuahahha..

dev-C++: Bank Queue Simulation using Graphic

dev-C++, Info.Tech, Software Development 4 Comments »

Again, I’m not good in C++. Yet I managed to finish my assignment in Advanced Data Structure for MIT. As required, I need to use graphic.h and struct (structure type variables) in dev-C++ to create Bank Queue Simulation.

theBank Sim Screenshot

theBank Sim Screenshot

Here’s the Demo Executable file: theBank Simulation (1153)

Source Code: Bank Queue Simulation Source Code (1323)

Algorithm: Graphic Sort

dev-C++, Info.Tech, Software Development Comments Off on Algorithm: Graphic Sort

Graphic Sort

Graphic Sort

Today, I created different kinds of sorting.

  1. Bubble sort
  2. Selection sort
  3. Insertion sort
  4. Quick sort

Yet, my Quick sort does not work properly… And I have 6 more sorting method to go… ๐Ÿ™

Download: Graphic Sorting (827) (demo executable file)

Download Source Code: Sorting Source Code (853)

Thanks to: http://www.cs.oswego.edu/~mohammad/classes/csc241/samples/sort/Sort2-E.html

dev-C++ : Bubble Sort with Graphic Plotting

dev-C++, Info.Tech, Software Development Comments Off on dev-C++ : Bubble Sort with Graphic Plotting

I’m having difficulties in creating good programming algorithm with C++. I find its very difficult. Somehow, I would like to share my accomplishment in creating this program, Bubble Sort with Graphic Plotting. But first, what is bubble sort?

Bubble sort is a simple sorting algorithm. It works by repeatedly stepping through the list to be sorted, comparing each pair of adjacent items and swapping them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted. The algorithm gets its name from the way smaller elements “bubble” to the top of the list. Because it only uses comparisons to operate on elements, it is a comparison sort.

Below is the demo, source codes and libraries needed…

If you have better algorithm solutions, if you don’t mind, can you email it to me… Like to see how others solve the problem.

Prototype POS System – Transparent GUI

Info.Tech, Software Development, Visual C# .Net 2 Comments »

POS System – Transparent GUI

My article is about a prototype POS system for grocery stores or 24 hours mini marts using Transparency graphical user interface.

Transparency in MS Visual C# works similar to chroma keys in Adobe After Effects or Premiere. All you have to do is set a color key to make it transparent.

  1. As you create a form as Form1, go to Form1 properties and set TransparencyKey to Black.
  2. Then set your Backcolor of your form to Black.
  3. In Photoshop or any image editing tools, create an GUI or layout design then save as PNG format.
  4. In Form1 properties, set BackgroundImage and select the PNG image you created from Photoshop or other image editing tools.
  5. Set also the FormBorderStyle to None and Opacity to 95%.
  6. Then run your project. You’ll see the transparency works well. ๐Ÿ™‚

See my sample source code.

Prototype POS System - Transparent GUI (939)

 

 

 

Visual C#: Detect Conflict Schedule

Info.Tech, Software Development, Visual C# .Net 4 Comments »
Screenshot

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 (801)

Visual C#: Retrieving Image (BLOB) from MySQL database

Info.Tech, Software Development, Visual C# .Net Comments Off on Visual C#: Retrieving Image (BLOB) from MySQL database

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 (1474) or http://blog.camilord.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();
}

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in