How to synchronize Google Drive with Dropbox
Today I want to show you how you keep the two services Dropbox and Google Drive in sync. The whole thing is easier than perhaps previously thought.
Both, Dropbox and Google Drive, create a local folder on your computer. The files in this folder are then known to be synchronized with the cloud and all connected devices. If you want to protect yourself from data loss, for example, and therefore want to use two systems in parallel, you would have to copy files (after creating or changing them) in both folders (the Dropbox and the Google drives) every time.
You can remedy yourself, by pointing the Dropbox folder into a subfolder of your Google Drive. This is very easy.
How to convert C# DateTime.Ticks into Unix timestamp
With the .NET frameworks DateTime functions you can do a lot of nice things. The handling turns out, in my opinion, very pleasant. The only requirement: You find yourself in a pure .NET environment. When other systems come into play, the trouble begins. But why is it that you can not compare DateTime.Ticks with the PHP mktime()-function?
If you request the “timestamp” from a DateTime-object (DateTime.Ticks), so you get back the number of ticks since 01.01.0001 00:00. A tick in turn is 100 nanoseconds long.
A Unix timestamp, as produced by mktime() for example, is to the contrary, the number of seconds since 01/01/1970. A direct comparison is not possible. So you have to convert between the both units at first. And how to do this, is what I want to show you today, based on a […]
How to improve WordPress load speed by Lazy Load plugin
Today I want to give the WordPress bloggers among you a little tip. It’s about the free WordPress plugin Lazy Load, that serves to reduce the loading time of your WordPress blog. But how does it work?
Lazy Load jQuery makes advantage of the Sonar Expansion and loads images only when they come into the viewport. In plain text, images are only loaded when they are in the visible area of your web browser. The more images you have in an article/or on your main page, the more time you can save accordingly with the Lazy Load plugin.
Instead, the visitor must wait until all images are loaded so that he/she can scroll without lags, jerking or other restrictions on your site, visitors can now get going on much faster. Only when he scrolls into an area in […]
Simple XML serialization in C#
Today I want to show you how to perform a XML serialization in C#. Serialization itself, means that you convert an object to another, transportable form.
Using XML serialization, it is possible, for example, to store an object of a class in the form of an XML file and restore it later.
This can make sense if you if you want to transfer an object, for example, via HTTP or restore an object to its state after closing and reopening an application.
For our example, I created the following class “Blog”:
public class Blog
{
public string User { get; set; }
public string Pass { get; set; }
public string Subdomain { get; set; }
public string BaseUrl { get; set; }
}
The method used to serialize is as follows:
public […]
How to create articles on Blogspot with C#
Today I want to show you how to create a blog article on Blogger.com/Blogspot.com with C#. For this you need first of all the Google.GData.Client.dll, which you can find inside the Google .Net API package.
You can download the API package here from Google. (The file is called Google_Data_API_Setup_2.2.0.msi (Please note that the version number – 2.2.0 – over time may change of course.)
If the download is complete, install the package, open a new project in Visual Studio and add a reference to the Google.GData.Client.dll.
The .dll file can be found in the installation directory of the API package. (Click on the link “add a reference” above, if you need help embedding .dlls into a Visual Studio project.)
If you have included the DLL, you can start already. Blog posts (aka articles) can be created as follows:
private static int […]