Tag Archives: C#

Wake on LAN is a computer networking standard that allows devices to be powered on when they receive a specific network message, if your device supports this feature.

In this example we will demonstrate how to craft this “magic” packet in C#. The concept of the packet is fairly simple. The packet must contain anywhere in the payload six (6) 255 bytes in a row (FF in hexadecimal) followed by the MAC address of the device repeated sixteen times.

As an example, if your device MAC address is 01-00-00-00-00-02 the payload will look like this:

/* The magic packet is a broadcast frame containing anywhere within its payload 6 bytes of all 255 (FF FF FF FF FF FF in hexadecimal), followed by sixteen repetitions of the target computer's 48-bit MAC address, for a total of 102 bytes. */

byte[]payload=newbyte[1024];// Our packet that we will be broadcasting

Sometimes you might need to create database tables dynamically, based on new users, products etc. The snippet below allows you to do exactly that, create a new table in your database dynamically, straight from your code.

The first thing you need to do, as mentioned in the article linked above, is that you will need to add a reference to MySQL.Data in your project. After you have done that, you can modify the snippet below to create the table with the columns you want based on your requirements.

JetBrains, the creators of many amazing tools for software developers released a new IDE called CLion.

CLion is a powerful IDE that can be used to develop C and C++ applications on Linux, OS X and Windows, enhancing your productivity with a smart editor, code quality assurance, automated refactorings, and deep integration with CMake build system. Moreover, CLion provides support for JavaScript, XML, HTML and CSS.

The main features of CLion consist of:CMake – a build system that is used as a project model, which takes the information about your project from CMake files. All the changes are handled automatically and can be configured in Preferences.

An editor and one-click navigation to help you code easily:

Smart auto completion filters the suggestions to match the left value type.

With the end of 2014 approaching I was wondering what were the most popular programming languages of 2014 I decided to see if I can, somehow, get a satisfactory answer for my question.

Needless to say the chart below is nowhere near 100% accurate as there are a lot of variations for each tag. Moreover, it contains languages that might not be considered as programming languages, such as HTML, JavaScript etc and I have not added their frameworks in their count (example: JavaScript and JQuery). As you can imagine the data can be interpreted differently depending on how you want to parse the row data.

For my findings I used Stack Overflow’s database to query the posts that were created in 2014, then split and sorted the tags based on how many times they appeared in the posts. After parsing and processing 9307 unique tags with a total of 2591986 occurrences, these are the results.