Create Your own coupon web site

There are several voucher coupon or discount rule sites out there currently and additionally the competition could also be fierce. still, daily, ever additional sites are trying. the way to produce a discount code web site ranges with rather straightforward to assist terribly involved. One facet you simply create use of apparatus as well as blogger in conjunction with to the another you'll be getting in arthropod genus. do not panic if that may goes over your head! there's an answer in your case!

The most basic Voucher Code web site

For a awfully elementary discount rule web site many of us simply be a part of to Blogger and corresponding solutions. Then you'll simply check in to several of the larger on-line sites and trawling for out there voucher codes. Whenever you discover a brand new voucher code and are typically emailed one, then you certainly turn out a spick-and-span post.

There is not significantly freedom web promoting good during this method. Yes, it may also be coupled to a Tweets provide and then on to assist thrust the net page, still, you want to additionally operate exhausting at manufacturing web site|the location|the positioning} fashionable within the major search engines to form certain that almost all folks may stumble across your site.

People have to be compelled to find yourself terribly careful exactly however folks maintain with the net website since spick-and-span laws mean that you simply have to be compelled to subtract terminated deals. simply showing Associate in Nursing finish day isn't over enough, you want to exhibit they will be run out. These suggests whereas victimization the fundamental system that you simply got to possess a way of knowing that recent web pages you want to delete. Here you probably will create a clever use of tags with the indicate displaying the end day with the web promoting. Then you certainly merely list almost about all discussions victimization positive tag words in conjunction with delete these.

To make the web site a small indefinite amount cleverer and additional concerned, then you certainly simply migrate to your self revealed operative a web log company like WordPress. this offers you comprehensive management higher than the layout to your internet site, however you still have to be compelled to in person add in conjunction with take away discount codes.

Intermediate Voucher Coupon web site

As before long as you proceed far from the quality edition, you would possibly need at the smallest amount some technical expertise. The second time beginners coupon coupon website must be written by somebody with code encounter in conjunction with most likely needs an information supply. You write your own body to load this discounts to the info supply, and termination dates. It does not take a world of encounter, even additional a number of|some} assurance so you would possibly even be capable of use elementary power and a few tutorials to try to to exactly what's important.

But with this explicit version subsequently you'll party almost about all spirited distinctive codes along one internet site for any businessperson and maybe quite presumably exhibit the merchant's elementary particulars on your header within the page.


Introduction to Virtualization

With the discharge of processors obtaining quicker and therefore the use of accelerating amounts of RAM, it became a lot of and a lot of sense to cluster multiple servers from one machine, employing a virtualization system.

Virtualization is achieved by inserting associate intermediate layer between the system running within the virtual machine and therefore the machine's hardware, simulating an entire laptop.Virtualization software package is then answerable for managing all the hardware resources, as well as interrupts and memory addresses, so the systems among virtual machines (virtual machines, or just VMs) to control as if each had an entire machine reserved for you.

The main system during this case is to be known as the "host" (host) and therefore the systems that ar running within the virtual machine ar known as "guests" (invited). each thinks he includes a complete laptop for you, whereas really running among a "matrix", the virtual machine.

A virtualization system to divide one server into many freelance virtual servers, each will run a unique software. The virtual servers share the resources of the $64000 server, among the boundaries of memory usage and disc space you set.

Besides permitting to cut back prices, use virtual machines additionally offers blessings in terms of administration. as a result of the files for every virtual machine ar targeted in a very single folder, it's simple to form regular backups, to not mention the actual fact that virtual machines may be quickly transferred to a replacement server if necessary. With this, you have got freedom to maneuver a virtual server that was receiving a better volume of requests to a different machine with a lot of resources, as an example.

Of course, this work to simulate an entire laptop and on prime with a decent performance isn't straightforward, and so there's forever some overhead. Moreover, with multiple virtual machines running at the same time, the machine's resources find yourself being higher used, since they find yourself exploitation process and alternative resources in rotation, in step with the fluctuations within the employment of every one. a specific virtual server will receive several requests at mealtime, whereas another is employed preponderantly within the late afternoon, as an example.

Furthermore, the employment of virtualization permits multiple servers cluster of low demand on one machine, reducing prices. If you like to stay your DNS server or your email on a separate machine for safety, as an example, could use a virtual machine instead of use a second dedicated server.
Another common use is in things wherever you wish a particular software, or a specific UNIX system distribution to run a precise software package. rather than migrating your primary server for the distribution in question, or install a second server only for her, you'll be able to use a virtual machine.

The marketplace for virtualization solutions has big considerably in recent years, that has diode to varied solutions, each open supply and industrial. Four samples of software package that stand out ar VMware, Xen, Qemu and Virtuozzo, that work slightly otherwise, however with nice variations practices.

VMware uses the classical conception of virtualization, making an attempt where attainable to convert the commands utilized by the system among the virtual machine into commands that the host system to grasp and execute directly. this is applicable once it's necessary to transmit knowledge over the network card, show messages on video or execute directions from the processor, as an example. It interprets and interprets directions to a minimum, that makes the system within the virtual machine to run with a performance terribly like the particular performance of the machine. though it's a business application, VMware has 2 free versions, VMware Player and VMware Server, the most theme of this chapter. each ar out there on http://www.vmware.com.

Although comparatively unknown to the users desktop, Xen is wide used on servers. It uses a unique plan, paravirtualization, that is to transparently share the hardware resources, permitting the system to run guest with a discount of performance terribly tiny (less than five-hitter in several cases). the most important drawback is that to run among Xen is important that the system is changed guest, you'll be able to not run any system directly, as within the case of VMware. this can be not a serious drawback within the case of UNIX system distributions (where it's solely necessary to use a specially compiled kernel), however makes use of Windows and alternative closed-source software package among virtual machines.

Xen is a lot of difficult to tack than VMware, that somewhat limits its audience, even after we state servers. Even so, several distributions have you ever been to incorporate Xen in its package tree, as within the case of CentOS, greatly easing installation. The project page is http://www.xensource.com/.

Unlike VMware and Xen, Qemu is associate someone, that works equally to the previous console emulators, that we tend to use to run games from SNES and Mega Drive on your laptop. rather than employing a virtualization system, it tries to method all the directions, that winds up taking longer and creating the performance is lower. In general, VMware will build the system run guest regarding seventy to ninetieth of performance that may have if it were run directly, whereas Qemu get from five to 100 percent.

The Qemu has a further module, kqemu, that causes it to pass to operate a lot of like VMware, virtualizing an summary of the processor, instead of emulate it. Kqemu greatly improves the performance of Qemu, however still leaves him well behind VMware in a very matter of performance.

Initially, Qemu was simply a smaller project, that couldn't vie with giants like VMware, however recently he began to gain a lot of attention with the event of KVM, a virtualization system enclosed directly within the kernel, out there from version a pair of.6.20, that works in conjunction with it. as a result of it's ASCII text file, the KVM is probably going to evolve over the approaching years to start to vie with Xen and VMware.

We even have the Virtuozzo, an advert system that has been wide utilized in hosting services for the creation of virtual non-public servers, or virtual machines offered as low-coster|a less expensive} possibility for people who desire a dedicated server cheap. In several knowledge centers, you'll be able to embody associate installation of Virtuozzo on your dedicated server by paying a premium for licensing.

Unlike VMware and Xen, that use virtualization in hardware, by simulating the complete system, as well as hardware, Virtuozzo uses a lighter virtualization, that operates the software level, making containers with many instances of a similar software, every with its own network configuration, user list, table files, archives and libraries.

Although every instrumentality isn't a virtual machine "complete", as parts of the core software ar shared and access to hardware is restricted, they are doing behave as separate systems, so that, for sensible functions, the restrictions ar typically remunerated the reduction in overhead.


How does one diary and build cash Online?

How does one diary and build cash Online?

How does one diary and build cash online? the solution is that choose a distinct segment topic, setup a Blogger or Wordpress diary, write regular content, monetise your diary and drive traffic to your diary.How to perform of these steps? currently, the careful answer to the current question is as follows.

How to choose a distinct segment Topic?

While finding the niche topic to write down regarding in your diary, there area unit 2 decisions. Passion or Profit creating Keyword. If you're thus smitten by a specific topic, it's sensible to decide on a subject therein space.If your aim is to solely build cash from blogging, you'll be able to opt for a high paying keyword and accompany it.

How to Setup a Blog?

For writing your diary, you would like a blogging platform.If you accompany blogger.com, you do not got to obtain hosting.Google can provide you with free hosting.If you accompany Wordpress, you've got to obtain your own hosting.But, you'll get several versatile choices to decide on from.

How to Write Regular Content?

Posting regular content to your diary is a lot of necessary.You can write your own entries, purchase PLR articles, rent a contract author to write down your diary, setup RSS feeds to urge carmatic|the automated} content otherwise you can purchase a auto posting software package like Yahoo Answers Poster.Choosing any of this feature and protrusive thereto arrange can facilitate in golf shot regular content for your diary.

How to monetize Your Blog?

Blog may be monetized to earn a continual revenue from it.The options area unit Google Adsense, promoting affiliate merchandise, promoting your own merchandise, giving your freelance or service and merchandising the merchandise.

How to Drive Traffic to Your Blog?

If you would like to urge guests to your diary, you'll be able to use the free and paid traffic generation techniques like PPC selling, article selling, forum selling classifieds selling, social bookmarking and social networking.You can additionally comment in different people's blogs and obtain traffic from them.

Wish you all the most effective in your blogging endeavor.

How to create cash on-line? Earn up to $5000

How to create cash on-line? ascertain all the simplest potential ways in which to make cash online. Earn up to $5000 per month from home

Many of you will be thinking of getting in on-line jobs to supplement your financial gain or perhaps switch to a full-time  on-line job, however might not remember a way to begin. during this hub, i'd prefer to make a case for concerning completely different on-line job programs, through that you'll be able to create cash on-line. These square measure legitimate, internationally noted job programs which is able to fetch secured revenue if you're able to dedicate yourself. Further, these square measure fully liberal to be part of and you may get paid promptly. By enrolling onto multiple programs, you'll be able to multiply your earning potential. Through these programs, its potential to earn up to $5000 per month

To help you, I even have additionally given you the entire manual for every of those programs. you'll be able to check them below

Data Entry/Form Filling Jobs: You register onto these Free sites to fill straightforward knowledge entry Forms. you do not would like any special skills or data. All you would like to pay is half-hour to one hour daily. This way, you'll earn upto $100 per month

Article Writing: If you're smart at writing articles on-line, you've got nice news then!!!!! There square measure corporations that pay folks for drafting websites for his or her business. If you're ready to write skilled articles, you'll be able to create some smart cash through this mode of jobs

Blogging: Blogs square measure in style social, Free web content creation tools which will change you to form websites referred to as "Blogs". These blogs change you to form websites with topics of your selection and earn by displaying ads of in style PPC(pay-per-click) programs like Google Adsense. Today, ton of different corporations square measure giving journal tools, the popular ones being Blogger.com, HubPages and Squidoo. By defrayment around two hours daily, you'll be able to simply create around $500 per month

Forum posting Jobs: Forum web site is nothing however a site on internet that allows web users to post their comment or opinion concerning any subject. This forum post is viewed by anyone on the net, and anyone will reply to the forum post with their own comment or opinion. in style forum teams square measure blogs, groups.yahoo, Hubpages, ezinearticles.com etc. But, there square measure sites that pay folks for on-line forum writing. as a result of folks largely stumble upon forum instead of dedicated websites whenever they rummage around for a selected topic or subject on search engines like Yahoo or Google, several corporations haven't completed that Forums square measure a strong tool to come up with net traffic and obtaining folks to scan material on the net.

PPC(Pay-per-click) Programs: PPC(Pay-per-click) is an internet affiliate tool that allows electronic computer publishers to earn cash by displaying Ads on their websites or blogs. PPC programs square measure primarily designed to extend traffic to advertisers WHO need their merchandise to be publicized through different websites. the web site owner(publisher) are going to be paid by the publicist whenever a traveler clicks on the Ads displayed on the location. With search engines, advertisers generally bid on keyword phrases relevant to their target market space. the popular PPC programs square measure Google Adsense, Yahoo Publisher Network, MSN adCenter Network, Chitika Network, AdBrite and Kontera networks. Through these programs, you'll be able to create in far more than $1000 per month

Marketing Affiliate Programs: promoting affiliate programs change you to earn cash by increasing business to in style on-line promoting sites, by fun traveler traffic from your web site to the involved on-line promoting web site. this is often virtually almost like Google Adsense, but promoting affiliate networks pay you for referring new members to their sites, whereas PPC programs like Google Adsense pay you for user Ad Clicks. not like PPC Programs, you'll be able to earn flat commission rates on promoting affiliate networks, and it's potential to come up with in far more than $5000 per month through these programs. the 2 leading on-line promoting affiliate networks square measure eBay and Amazon

Forex Affiliate Network: Forex Affiliate program is one in every of the foremost powerful ways in which to create cash on-line. Being an enormous international business with a daily turnover of three(3) trillion greenbacks that is forty times the dimensions of data system, Forex commercialism is without doubt the foremost profitable business these days. not like different on-line affiliate jobs that may fetch solely a couple of many greenbacks a month, Forex afffiliate program may fetch you over $10,000 per month!!!!

SMS Mobile Affiliate Network:  SMS affiliate programs work almost like ppc(pay-per-click) programs like Google Adwords campaign whereas the publicist pays the corporate so as to publish his ads and corresponding Google Adsense campaign, wherever the net publisher get paid to show the ads. If you be part of SMS affiliate programs, you may assume the role of Associate in Nursing Adsense affilate whereas the one that desires to publish his ads assumes the role of Adwords subscriber. The SMS promoting company runs the business and provides you the task of causing SMS to a info of individuals for promoting varied merchandise. The merchandise could vary from straightforward commodity or service suppliers to business merchandise like Luxury cars.

10 Sites that supply Free internet Hosting

Why acquire internet hosting once there are places out there that may host your web site for free? really, there are many sensible reasons. Free internet hosting tends to be restricted in MB area and services and additionally typically includes advertising on your web site. If you are operational an expert web site, you will wish to pay to host it through a cheap company instead of through a free internet hosting service. however if you're simply golf shot up a private web site and/or you do not mind the restrictions of free internet hosting then there are definitely a over-plus of internet hosts out there that are happy to produce you services freed from charge.


Here are 10 totally different internet hosts that have some version of free hosting:


1. 000WebHost.com. this is often one among-st the higher free internet hosts out there however it is not essentially the best to use. It's ideal for the World Health Organization one who has some familiarity with web site building and style however who needs a free internet host. It offers 250 MB of disc space and a hundred GB of knowledge transfer at the side of variant totally different options.


2. 50megs. many of us have complained that this ad-supported service places too several ads on your web site however some people have with success used it for satisfying free internet hosting. curiously, their web site is suspiciously the same as Free Servers (featured below). Check it bent on compare.


3. lightsomeness Hoster. this is often a decent free internet host for the tiny business or the skilled solo web site. With twenty MB of disc space and five GB of knowledge transfer, it's corresponding to or over alternative services out there. you are allowed 2 domains and 5 sub domains on this web site at the side of 5 separate email accounts that is why it works for the tiny business.


4. AwardSpace. This free internet host is one among-st the simplest services in terms of instantly fitting a tiny low web site. It permits you two hundred MB disc space and five GB of monthly traffic that is significantly over several of the opposite on the market free services.


5. Bravenet. this is often associate degree ad-supported service that provides you free hosting with only a few limitations. you'll use one.5 GB monthly, you've got fifty MB of disc space and your variety of domains and sub domains are unlimited. it is a Linux-based system with 24/7 client service support and a over-plus of alternative free tools.


6. FortuneCity. this is often a favorite free internet hosting service as a result of it has been around for over a decade that the company has puzzled out plenty of its kinks. You get unlimited information measure, one GB of free internet area and a free diary builder to feature a diary to your web site at no charge. a significant profit is that there aren't any pop-up ads on your web site after you use this company.


7. FreeHostia. This service has gotten attention as being one among-st the quickest free internet hosts on the market. It provides you 250 MB of disc space and 5GB of information measure that is over most alternative free sites. to boot, it doesn't force ads on to your web site. As a result, this is often thought of one among-st the leading free internet hosts within the trade.


8. FreeServers. this is often associate degree ad-supported web site that provides you fifty MB of internet area and one GB of monthly information measure. It doesn't, sadly, allow you to incorporate a WordPress diary that may be a drawback for plenty of individuals. however if you are looking for a basic free web site, this company has established a reputation for itself within the business.


9. ProHosting. This free web hosting company provides you one.2 GB monthly and a hundred MB disc space therefore it's comparable the opposite major service suppliers out there.


10. TopCities. this is often a fun easy-to-use service that's ideal for individuals operating within the internet two.0 world. it's one hundred fifty MB of area and unlimited information measure. a lot of significantly, it permits for straightforward program submission and type email. However, the diary service remains within the works therefore this is often


The majority of the free internet host services on this list additionally supply premium services at an inexpensive value. you'll use the free services to check out the system. If you wish them and they are enough for you, you'll persist with them. If you wish them however wish a lot of, you'll upgrade to the paid hosting.

How to Protect your Adsense Account

How to shield your Adsense Account from Invalid Clicks through Google Analytics

Let Google know that you are honest and you do not have any connection or responsibilities on fraud clicking of your Ad-Sense.
  1. Invalid clicks contact form

    After you witness or notice the clicks of your Ad-Sense, you'll stock up this manner to report back to Google adsense and that they can verify if the clicks square measure invalid.
  2. Adsense invalid activity appeal form

    If Google Adsense ban your account, you'll be able to send them Associate in Nursing attractiveness through this type to reinstate your account. If they notice that you simply were a victim of click bombing, they'll sure activate your account. you simply need to look ahead to it should take many days to weeks before they finalized their call.
I hope everybody can reach this info before they knew that their adsense account must be protected against click fraud and most of all, before they got Associate in Nursing email that they're illegal from adsense.
For others like Maine World Health Organization had more responsible all the hardship before effort the approval for adsense account, it'd be very painful to be illegal simply because of click fraud.
If you discover this text helpful, kindly share to everybody you recognize World Health Organization have adsense account and particularly to people who ar wishing on adsense for extra family financial gain.


Boot and runlevels

Course's Plan:

  • Boot sequence. The x86 family bootstrapping. 
  • Runlevel implementation. Init and rc. 

Boot sequence

Description

Linux bootup steps:
  1. BIOS : Tests and MBR chain-up
  2. Bootloader: Kernel selection
  3. Kernel startup
  4. /sbin/init: Userland loading

BIOS (Basic Input Output System)

  • POST (Power On Self Test): 
    • Detect hardware 
    • Accessing bootable devices 
  •  Read MBR (Master Boot Record) 
    •  512 first bytes 
    • Hosts the partition table 
    • Hosts the starting procedure (to launch the boot manager) 
  • Start Boot manager (GRUB/LILO)   

System Boot

From BIOS to Kernel:


And the kernel makes its way to init

Kernel

/boot/vmlinuz
  • Uncompress it self.
  • organizes and takes control of the continued booting of system
  • Checks and sets the console, reads BIOS settings
  • initializes basic hardware interfaces.
  • Drivers (included into the kernel) probe existing hardware and initialize it accordingly.
The kernel controls the entire system hardware.

About the initrd

Early userland  and pivot_root.
  • initial ram disk
    • Filesystem image
    • CPIO archive
    • Compressed
  • Early userland
    • linuxrc script
    • fake init
    • Load drivers
    • Pivot_root to real root fs.
  • Distros provide creation tools

/sbin/init

Userland entry point.

The parent of all other processus (PID number 1). Allocate VT’s and run rc to switch to default runlevel.

relies on the /etc/inittab file → Read the default runlevel
              ↓

/etc/init.d/boot script → Main services
              ↓
starts the /etc/init.d/rc  script → Runlevel specific services

Runlevels implementation

About runlevels

System profiles.
  • Identifiers for system state
    • Numeric (most distros)
    • 0 -> 6
  • Used by init and rc
    • Start/Stop services
    • Enable/Disable multiuser
  • /etc/inittab
  • /etc/rcX.d/

Runlevels

The seven runlevels:
0    : System Halted.
1    : Singler User Mode.
2-5 : Custom levels used by distributions. Run services.
6    : System reboot.

/etc/inittab 

Init configuration file syntax:
id : runlevels : action : command

Some actions:

ActionDefinitions
onceRun the command and continue to next entry
waitRun the command and wait for completion before continuing to the next entry.
respawnRun the command, continue to the next entry and restart the process if it dies.

Working with runlevels

Common Commands

[root@linux ~]# runlevel
N 3
[root@linux ~]# who -r
    run-level 3 2011-09-21 08:35 last=S
[root@linux ~]# init 2
[root@linux ~]# telinit 1
[root@linux ~]# halt
[root@linux ~]# reboot


NetStat

Introduction

Netstat is a tool that help to determine the active TCP connections on the machine on which the command is enabled and thus list all TCP and UDP ports on your computer.

Commands

Show routing table :
#netstat -rn 
 -r: Linux kernel routing tables.
-n: Display numerical addresses instead of hostnames.

Kernel IP routing table 

Destination
192.168.1.0
0.0.0.0
Gateway
0.0.0.0
192.168.1.1
Genmask
255.255.255.0
0.0.0.0
Flags
U
UG
MSS
0
0
Window
0
0
irtt
0
0
Iface
eth1
eth1

Show quick interface statistics:
#netstat -i
-i: Interface Kernel Interface table

Iface
ath0
eth0
eth1
lo
MTU
1500
1500
1500
16436
Met
0
0
0
0
RX-OK
0
0
1156
225
RX-ERR
250
0
0
0
RX-DRP
0
0
0
0
RX-OVR
0
0
0
0
TX-OK
0
0
568
225
TX-ERR
0
0
0
0
TX-DRP
0
0
0
0
TX-OVR
0
0
0
0
FLG
BMRU
BMU
BMRU
LRU

Parameters of the netstat command.

Used without any arguments, the netstat command displays all connections opened by the machine. The netstat command has a number of optional parameters, the syntax is as follows:

 netstat [-a] [-e] [-n] [-o] [-s] [-p PROTO] [-r] [interval]


Used with the-a argument, the netstat command displays all connections and listening ports on the machine.
Used with the-e argument, the netstat command displays Ethernet statistics.

Used with the-n argument, the netstat command displays the addresses and port numbers in numeric format without name resolution.

Used with the-o argument, the netstat command details the number associated with the connection process.

Used with the-p argument followed by the name of the protocol (TCP, UDP or IP), the netstat command displays the information requested on the specified protocol.

Used with the-r argument, the netstat command displays the routing table.

Used with the-s argument, the netstat command displays detailed statistics by protocol.

Finally, an optional interval determines the refresh information in seconds. The default setting is 1 second.

Code download function C#

Here is a tutorial to write a function to download file and can be resumed, so we need a link and a destination where the file will be stored.

To do this task we need to use HttpWebRequest, this way we can resume download if we have any error, so we will loop until we finish the downloading process.

public void downloadFile(string _link, string destinationPath){
            bool download = true;
            long fileSize = 0;
            int bufferSize = 1024;
            long existLen = 0;
            System.IO.FileStream saveFileStream;
            System.Net.HttpWebRequest httpReq;
            System.Net.HttpWebResponse httpRes;

            while (download)
            {
                try
                {
                    fileSize = 0;
                    existLen = 0;

                    if (System.IO.File.Exists(destinationPath))
                    {
                        System.IO.FileInfo destinationFileInfo = new System.IO.FileInfo(destinationPath);
                        existLen = destinationFileInfo.Length;
                    }

                    if (existLen > 0)
                    {
                        saveFileStream = new System.IO.FileStream(destinationPath,
                                                                  System.IO.FileMode.Append,
                                                                  System.IO.FileAccess.Write,
                                                                  System.IO.FileShare.ReadWrite);
                    }
                    else
                    {
                        saveFileStream = new System.IO.FileStream(destinationPath,
                                                                  System.IO.FileMode.Create,
                                                                  System.IO.FileAccess.Write,
                                                                  System.IO.FileShare.ReadWrite);
                    }

                    httpReq = (HttpWebRequest)HttpWebRequest.Create(_link);
                    httpReq.AddRange((int)existLen);

                    System.IO.Stream resStream;
                    httpRes = (HttpWebResponse)httpReq.GetResponse();
                    resStream = httpRes.GetResponseStream();

                    fileSize = httpRes.ContentLength + existLen;

                    int byteSize;
                    byte[] downBuffer = new byte[bufferSize];

                    while ((byteSize = resStream.Read(downBuffer, 0, downBuffer.Length)) > 0)
                    {
                        saveFileStream.Write(downBuffer, 0, byteSize);
                    }

                    saveFileStream.Close();
                    download = false;
                }catch (Exception ex){
                    download = true;
                }
            }
        }

So as you see the method is simple and can be integrated on any software, so it can be essentially used in a thread, you transform it quickly to thread and enjoy your downloader.  


12 Way to optimize C++ Code

C++ Code optimizations

To optimize you c++ code you can do the steps shown bellow, it will make your code more fast and optimized.

1. Use Initialization Lists

Always use initialization lists in constructors. For example, use

TMyClass::TMyClass(const TData &data) : m_Data(data)
{
}


Rather than 

TMyClass::TMyClass(const TData &data)
{
m_Data data;
}


Without initialization lists, the variable's default constructor is invoked behind-the-scenes prior to the class's constructor, then its assignment operator is invoked. With initialization lists, only the copy constructor is invoked.

2. Use 'int'

Always use the int data type instead of char or short wherever possible. int is always the native type for the machine.

3. Optimize For Loops

Wherever possible, count down to zero rather than up to n. For example, use

for (n-1>= 0; --i)

Rather than

for (0n; ++i)

The test is done every iteration and it's faster to test against zero than anything else. Note also that

++is faster than i++ 

when it appears in the third part of the for loop statement.

4. Make Local Functions Static

Always declare local functions as static, e.g.,

static void foo()

This means they will not be visible to functions outside the .cpp file, and some C++ compilers can take advantage of this in their optimizations.

5. Optimize Switch Statements

Put the most common cases first.

6. Optimize If Statements

Factor out jumps. For example, use

bar();
if (
condition)
{
undoBar();foo();
rather than
 
if (condition)
{
foo();
}
else
{
bar();
}

Use a profiler and good judgement to decide if undoing the bar() operation is faster than jumping.

7. Initialize on Declaration

Wherever possible, initialize variables at the time they're declared. For example,

TMyClass x data;is faster than

TMyClass x
;data;

Declaration then initialization invokes the object's default constructor then its assignment operator. Initializing in the declaration invokes only its copy constructor.

8. Pass By Reference

Always try to pass classes by reference rather than by value. For example, use

void foo(TMyClass &x)
Rather than

void foo
(TMyClass x)

9. Avoid Expensive Operations

Addition is cheaper than multiplication and multiplication is cheaper than division. Factor out expensive operations wherever possible.

10. Delay Variable Declarations

Leave variable declarations right until the point when they're needed. Remember that when a variable is declared its constructor is called. This is wasteful if the variable is not used in the current scope.

Use 'op=' Wherever possible, use 'op=' in favour of 'op'. For example, use
 
+= value;
Rather than

value;

The first version is better than the second because it avoids creating a temporary object.

11. Use Nameless Objects

Wherever possible, use nameless objects. For example,

foo(TMyClass("abc"));
is faster than

TMyClass x
("abc");foo(x); 

because, in the first case, the parameter and the object share memory.

12. Inline Small Functions

Small, performance critical functions should be inlined using the inline keyword, e.g.,

inline void foo()

This causes the compiler to duplicate the body of the function in the place it was called from. Inlining large functions can cause cache misses resulting in slower execution times.


This is a 12 way to optimize c++ code and improve programs.
I hope it will help you improving your code you can ask and i will try to reply as soon as possible.


Configure VNC Server on CentOS

Introduction

Some times we need to use the graphical interface, or just connect to a server or a VPS to do some tasks, it's very important in some cases to use the graphical tool. for this reason i decide to write this tutorial to show you how to configure the vnc server on your own server in a simple steps.

Installing KDE:

Normally, when you are using a VPS you will use the command line and SSH connection, therefor we have to install at the first time a graphical interface, i choose the KDE interface and i will work on it. So you must connect to your server, computer or VPS using SSH connection.

The first command to run is : 

#yum groupinstall  "KDE Desktop"

this command will install KDE. and when it ask you to download any thing type 'y' and press 'enter'.

Now we have done the first step and we installed the KDE interface. the next step will be installing the vnc server.

Installing VNC Server:

In order to install a VNC Server you need to type the commands shown bellow.
First command : 
#yum install vnc-server vnc

When it ask you to download packages, type yes and download it, as it illustrated on the picture bellow :


When the installation finished, we can install the vnc server, which in CentOS is not vnc-server but its name is tigervnc-server, so lets installed it. Type the command :

#yum install tigervnc-server

And as we did before, when its ask you to download packages download all. Now after we installed the vnc server we can configure it, as i use a vps and i want to illustrate this method i will use my root user, if you want to do it you can create other users to use the vnc. So for me the next step will be setting vnc server, by using the command :
#vncpasswd

Well, it's time to configure our vncserver, so you can now edit the configuration file located on /etc/sysconfig/vncservers, i am using the vi editor, and you can use the editor you wish.

#vi /etc/sysconfig/vncservers 



In my case the configuration file will be as shown on the next picture :


You can add more than user on this configuration file, separate each user by space, and affect to each user a number (id) which will be used on the next line for arguments.
Finally, you can run you vnc server, to do that you must run the command line :

#service vncserver start


Now, and after all we have done, we can access our server using vnc client, see the next picture :


You must type the server name or the IP:Number, the number represent the id on you configuration file, so am connecting to my vnc server with my root username. and a dialog box request your password, type it.


And that's all, you will see your desktop, and you can control your computer using the VNC.


I hope i explained clearly the steps you need to install your VNC server on your own server.

Downloads:












Installing LAMP on CentOS

Introduction:

In this tutorial i will set the commons command and software to configure a web server on CentOS. CentOS is very powerful system used very well on VPSs and servers. this is why i am writing this few lines to give the most used command to configure a LAMP (Linux, Apache, MySQL, PHP/PERL/PYTHON...) server.

MySQL:

Step 1 : install MySQL:
The command to use to install MySQL on CentOS operating system is : 

#yum install mysql mysql-server

Step 2 : enable MySQL at startup :
To enable MySQL at the starting of the machine use the command line :

#chkconfig --levels 235 mysqld on

Step 3 : starting MySQL server:
To start the MySQL server type :

#/etc/init.d/mysqld start

Step 4 : define the root password:
To define the user password : 

mysqladmin -u root password yourrootsqlpassword

Step 5 : Testing you MySQL:
connect and test your MySQL server :

mysqladmin -h server1.example.com -u root password yourrootsqlpassword

Apache:

Step 1 : Installing Apache
To install Apache we type:

#yum install httpd

Step 2 : enable Apache on the startup
The command is similar to the MySQL command, we type :

#chkconfig --levels 235 httpd on

Step 3 : Starting Apache web server

#/etc/init.d/httpd start

You will find the config file for Apache on /etc/httpd/conf.d/httpd.conf

PHP :

Step 1 : Installing PHP
To install PHP we type:

#yum install php

Step 2 : restarting the Apache server

#/etc/init.d/httpd restart

or 

#service httpd restart


Cheapest VPS

Hello, in this article i will provide some of VPS provider, there is more than VPS provider, in the first step we will define what is the VPS and what is the type and technologies used to create a VPS.

What is a VPS:

Virtual Private Server or simply VPS is a virtual machine, having its own copy of an operating system, the superuser of that system who is the customer, can install, manage any kind of software he want and supported by the operating system.
we can describe the virtualization in the next picture :
there are many technologies used in visualization, i will give the most of them.

Xen:

Xen is an open-source type-1, which make it possible to run many instances of an operating systems (operating systems can be different) in parallel on a single machine (Host).
The architecture of Xen illustrated on the next picture :

OpenVZ:

OpenVZ is container-base virtualization for Linux. OpenVZ creates multiple secure, isolated Linux containers (otherwise known as VEs or VPSs) on a single physical server enabling better server utilization and ensuring that applications do not conflict.
OpenVZ website : http://openvz.org

VPS Providers:

BudgetVM:

Now i will give some VPS providers, just the cheapest providers i know and i try there services.
The first one is the budgetvm, it's provide OpenVZ VPS and Xen VPS. for the first type, in my mind it's the really cheapest one on the market, an example a VPS with 1GB in RAM and 3000 GB as a bandwidth and 3 IPs cost 5$. and the same configuration in Xen it cost 9$.
What i will choose ?
if you need really to run an application that will consume memory and need resources you must choose the Xen and not OpenVZ. so the choice is depend on the type of your application and usage of the VPS.

if you are interesting on this company you can get a VPS from one the two links bellow :

Affiliate link : https://www.budgetvm.com/account/aff.php?aff=1846
Direct link : https://www.budgetvm.com/

Hint:

To use more bandwidth you can get a VPS in the half of a month because they initialize the bandwidth always in the beginning of the month.

Virpus:

The virpus VPS using the Xen  technologies only, there vps are really affordable. a VPS with 1 GB RAM and 3000 GB in the bandwidth and 2 IPs cost 8$