Centos X window installation- GNOME, KDE

The easiest way to install X (and a GUI system) is to use the yum groupinstall feature.

First you can see all the yum groups available with the command:

yum grouplist

You can install X and Gnome or KDE like this:

yum groupinstall “X Window System” “GNOME Desktop Environment”


yum groupinstall “X Window System” “KDE (K Desktop Environment)”

You may also want to add some other groups from the list like “Graphical Internet” or “Office/Productivity”

Installing Snort on Centos Linux

Step by step snort installation on Centos Linux.

# wget http://dl.snort.org/snort-beta/snort-2.8.6-beta.tar.gz

# tar -xzvf snort-2.8.6-beta.tar.gz

# yum install flex

# ./configure

# yum install byacc bison

# make

# make install

# make clean

# wget http://sourceforge.net/projects/pcre/files/pcre/8.01/pcre-8.01.zip/download

# unzip pcre-8.01.zip

#unzip pcre-8.01.zip

# cd pcre-8.01

# ./configure

# make

# make install

# wget http://www.tcpdump.org/release/libpcap-1.0.0.tar.gz

# tar -xzvf libpcap-1.0.0.tar.gz

# cd libpcap-1.0.0


# make

# make install

# cd snort-2.8.6

# ./configure

# make

# make install

# make clean

There you go you have the snort installed. You can configure snort with MySQL or other databases.

Algorithms – Selection Sort

Selection sort is a comparison based sort. Selection Sort’s running time is : Θ(n2).

Selection sort is a stable sorting algorithm, it s done in-place.

Selection sort works as the following : Given an input array, select the minimum element in the array and switch it with the first element of the array. Select the minimum element from the rest of the array and switch it with the second element of the array. Select the third smallest element of the array and switch it with the third element of the array and so on.

For any input you are destined to do Θ(n2) operations. The only good part about this algorithm is: it s very easy to implement.

Java- Installation and Configuration on Centos Linux

Download the JDK from sun website to your Centos Linux system via wget.  The file you ll likely to get will be a bin file.

# chmod 777 jdk.bin
# ./jdk.bin

This will install Java to your system into /usr/java/jdk1.6.0_18 folder

Now you need to set up Java Path so that you system will know where Java is. To do that you need set JAVA_HOME and JAVA Path, otherwise your applications wont find java. You need to add this to .bash_profile file in your home folder.

# export JAVA_HOME=/usr/java/jdk1.6.0_18

# export PATH=$JAVA_HOME/bin:$PATH
Then you need to exit from your shell and re-login to your system, Java will be there for you.
# java -version
will show you the version you are using.

Algorithms – Insertion Sort

Insertion sort is a comparison based sorting algorithm. It s worst case running time is Θ(n2), while best case running time is Θ(n). Using binary insert, insertion sort can run with Θ(nlogn). Insertion sort is a stable sorting algorithm, which means, the order of elements are preserved while sorting it. Insertion sort is also in-place which means, insertion sort doesn’t require additional memory. Insertion sort is an online sorting algorithms which means, new elements can be added to the input while sorting it.

Insertion sort is easy to implement and usually efficient for small data sets.

Best case input for insertion sort is when the input is already sorted. Then insertion sort runs with Θ(n) running time. On the other hand the worst case input for insertion sort is when the input is reverse sorted, then insertion sort runs with Θ(n2). On a average input using binary insert, insertion sort can run with Θ(nlogn) running time.

well, what s the insertion sort algorithm ?

Imagine you are playing bridge card game, you’ve been dealt 13 cards and you wish to sort the cards by number from smallest to biggest. You take one card and place it in your hand, you take the second card, you compare it with the first card, if it s smaller you place the smaller card to the left, otherwise to the right of the other card.

You take the 3rd card and you look at the first card on the left if the 3rd card is bigger then you look at the second card if 3rd card is bigger than 2nd card you place the 3rd card to 3rd position and etc..

Pretty straight forward algorithm.

If you use binary search for insertion sort, the worst case running time decreases to Θ(nlogn), but you are still paying for shifting the elements.

Insertion sort is usually more efficient than selection sort and buble sort.

More to read :




Could not load file or assembly ‘Assembly’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

Could not load file or assembly ‘NameOfAssemblyGoesHere’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

This message being spewed-forth by an asp.net application means that the DLL concerned has been compiled as a specific “bitness”, but one that doesn’t match that which IIS is running at. The most usual reason for this is an assembly marked as “x86” deployed to an “x64” server. If the assembly doesn’t P/Invoke out to any 32-bit DLLs, change the platform target to “AnyCpu”.

As far as the .net framework is concerned, the x86/x64 categorisation is only used as an indicator of requirements, thus if no P/Invoke is going on it’s not needed, as the JIT compiler takes the assembly and JIT compiles it to the relevant instruction set at runtime anyway.

Another workaround is to set IIS in compatibility mode for 32 bits.
That worked for me.


Open a command prompt and navigate to the %systemdrive%\Inetpub\AdminScripts directory.


Type the following command:

cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 “true”


Press ENTER.

Also, you can set different CPU types from the configuration manager, which worked as well.

Advertising Glossary and Terms

Ad tags
Bits of HTML code that let publishers display Right Media Exchange ads on their web pages. Ad tags are specific to a publisher’s site, ad display type and/or size (banner or pop).

A participant in the Right Media Exchange who buys ad space from publishers.

A graphical ad that typically displays with a horizontal orientation. Common sizes: 728×90, 468×60, and 720×300.Campaign. Typically refers to an advertiser line item that runs a series of related ads. Ads may be grouped into campaigns according to product offers or themes that reflect similar marketing goals.

Content of Offer
Describes the kind of product or service being advertised in a creative, such as credit card, travel, or software downloads. Creatives are categorized so that networks and publishers can target appropriately.
CPC. Type of campaign with cost-per-click pricing. The advertiser pays for an impression only when a user clicks on the ad.
CPM. Type of campaign with cost-per-mil pricing (cost per thousand impressions). The advertiser pays for the impression every time its ad displays. Cost of one impression is 1/1000 the CPM price.

Another name for an ad. A single creative can have image elements, rich media elements, and supporting files that make up the ad.

Dynamic pricing
Pricing model that lets advertisers vary what they pay for an impression, instead of paying one flat CPM price. Advertisers are typically willing to pay more for an impression on premium inventory that has lots of good users. They’re also willing to pay for impressions on less desirable inventory, but those impressions are worth a lot less. Dynamic pricing lets them pay for each impression based on how much it’s worth to them.

See effective CPM.

Effective CPM
The effective price per 1000 impressions shown. When campaigns have CPM, CPC, and CPA pricing, the only way to compare them is to translate each one into an equivalent effective CPM, or eCPM.

Exit pop
Creative that appears when users close their browser or leave the publisher’s site.

Expandable banner
A banner ad that expands when users move their mouse pointer over the ad, causing the ad to expand beyond its borders.

Flash ad
Type of creative featuring animation. Creative can be identified by the .swf file extension, which stands for Shockwave Flash.

Floating ad
Type of ad that is super-imposed over a page and floats over it for a certain number of seconds, then disappears or fades.

Frequency cap
Limits the number of times a line item can serve a creative during a certain time period.

Specifies which geographical regions a particular network or advertisers will receive impressions from. If a network should only serve to US traffic, you should geotarget the US only.

HTML creative
Type of creative that may have images, text, and other elements written in HTML.

An instance of an ad displaying on a publisher’s site. Sometimes referred to as “imps”.

Type of creative that appears between pages of a website. When users leave one page of the site, the interstitial ad appears for a certain number of seconds before the requested destination page loads.

The ad space that publishers offer for sale on their websites or other media property.

Inventory type
Type of media property that a publisher makes available for displaying ads, such as a website, toolbar, email message, or desktop software. Categorizes publisher properties so that advertisers and networks can target appropriately.

Unlike other advertising optimization systems, there is no predetermined learning or audition period in the Right Media Exchange. It begins optimizing a campaign automatically, as soon as enough statistically significant data is available. Because it is completely automated, optimization happens more quickly than with other technologies. Learning is the process by which the Right Media Exchange gathers creative performance data, such as impressions, clicks, conversions, and user characteristics, in order to predict the probability of a click or conversion on a site. The ad server uses this information to calculate a bid price for the ad auction. When the Right Media Exchange has enough predictive information, a creative changes from learning mode to optimized mode.

Media Guard
The Right Media Exchange’s ad classification and regulation system that protects your site from potentially brand-damaging advertising, bringing trust to the exchange. Every single creative in the exchange is scrutinized by an automated and human review process and categorized with an unprecedented level of detail and accuracy. Media Guard has created a set of objective and uniform classification standards that aligns all buyers and sellers in the exchange. That regulation builds trust in the marketplace, and gives you confidence that you’re going to get the advertising you want on your site.

Minimum Payout
The minimum revenue that you must earn before a network will issue a payment.

An entity that facilitates the buying and selling of media between a group of publishers and advertisers. Sometimes referred to as an “ad network”.

A creative that has finished learning. See “Learning”.

Controls impression delivery to each network, based on price, frequency capping and geotargeting preferences.

Type of creative that appears in a new window, either over a website page (popup) or under a website page (popunder). The window can be popped by the publisher or by the advertiser’s tag.

A participant in the Right Media Exchage who maintains a website, desktop application or other inventory type with ad space that is available for sale to advertisers.

Revenue share
The share of earned revenue that each network offers to its publishers.

Rich media sd
Type of creative that uses Javascript or other technology to stream video, include sound or animations, or display elements that interact with the user. Takes more bandwidth and time to load than an image or text ad and may not be supported by all browsers. Some examples: expandable banners, pointroll ads.

Right Media Exchange
The Right Media Exchange is interactive advertising’s first open media exchange. Connected on a common platform, buyers and sellers seamlessly trade more than two billion impressions on the exchange each day. The Right Media Exchange enables competition in an open, fair market to drive more value for ad networks, publishers and advertisers.The Right Media Exchange does for digital media what the NASDAQ and other auction-based financial exchanges do for securities.

Key benefits to publishers include open access to campaigns, true value discovery, maximized revenue, control over what runs on your site and the ability to easily develop new relationships.

A distinct category of users or members of a target audience who can be identified based on the webpages they visit or actions they take.

A participant in the Right Media Exchange who sells advertising space. Can be a publisher or a network.

A graphical ad that typically displays with a vertical orientation. Common sizes: 160×600 and 120×600.

Rules that govern when, where, how often, and to whom an ad should serve.

Type of creative that uses only text (words) with hyperlinks to the advertiser’s website or a page containing more advertising information.

Third Party Ad Network
An ad network that is not currently a direct participant in the Right Media Exchange.

Third Party Creative/Third Party Tag Creative
Type of creative that is hosted by a third party ad server instead of by the Right Media Exchange ad server.

URL creative
Type of creative that consists of a Web address that points to a webpage, hosted image, or JavaScript file.

Coordinated Universal Time (Greenwich Mean Time).

A measure of how much traffic a website receives. Typically expressed as a number of impressions, such as 100,000 impressions per month.