How To Get Environment Variables In VB.NET and C#


Environment
Environment Variables are set of values that are used for running special processes or special system files.. for example when you install java or python you must make a new environment variable in order to compile and run java or python programs that's all I know about it. Without wasting anytime let's get into it...

This is a simple code that will show you the environment variables..

For VB.NET

        Dim EV As String = Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Process Or EnvironmentVariableTarget.Machine)

        MsgBox(EV)

For C#

'you must add these namespaces 

using System;
using System.IO;
using System.Windows.Forms;
using Microsoft.Win32;

'add this code in an event 
string EV = Environment.GetEnvironmentVariable("PATH", 
                EnvironmentVariableTarget.Process | 
                EnvironmentVariableTarget.Machine);
            MessageBox.Show(EV);

The "PATH" defines the environment variable name so if you want to get another ones just change PATH with the variable name.

How To Check If Directory Exists In VB.NET And C#

directory in programming
I have had some hard times in solving this problem not these days but sometime ago when I started programming so I think this would be helpful for anyone who has started programming..

Here's the code to check if the directory exists in VB.NET :

Try
            If System.IO.Directory.GetDirectories("PATH").Length > 0 Then
                MsgBox("directory exists")

            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

All you need to do is replace PATH with the directory you want to check... length > 0 identifies if the directory exists.

Here's the code for C# :

try
            {
                if (System.IO.Directory.GetDirectories("PATH").Length > 0)
                {
                    MessageBox.Show("directory exists");

                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

Do the same thing as given for VB.NET code.

How To Get The MD5 Hash Of A File In VB.NET

MD5 UPTUTORIALS
MD5 is a widely used cryptographic algorithm that produces a 128-BIT hash value. I think all the files you have in your computer has a unique md5 hash.. in some virus scanning process the files get identified easily with the hash value. Today we are going to make a simple application that will help you to get the md5 hash of any file.

Start a new project and do the traditions lol.. you must add a button, a label and a textbox.

user interface :)

You must add these namespaces before you could do any coding :

Imports System.Security.Cryptography
Imports System.IO
Imports System.Text

Here's the code for the application it's all under button click event.. I have explained the basic things by small comments.

  'creating the openfiledialog
        Dim Open As OpenFileDialog = New OpenFileDialog
        Open.Filter = "All Files (*.*)|*.*"
        If (Open.ShowDialog() = DialogResult.OK) Then TextBox1.Text = Open.FileName
        If Open.FileName = "" Then Exit Sub

        'accessing file & getting the hash
        Dim RD As FileStream = New FileStream(TextBox1.Text, FileMode.Open, FileAccess.Read, FileShare.Read, 8192)
        RD = New FileStream(TextBox1.Text, FileMode.Open, FileAccess.Read, FileShare.Read, 8192)
        Dim md5 As MD5CryptoServiceProvider = New MD5CryptoServiceProvider
        md5.ComputeHash(RD)
        RD.Close()

        'converting the bytes into string
        Dim hash As Byte() = md5.Hash
        Dim SB As StringBuilder = New StringBuilder
        Dim HB As Byte
        For Each HB In hash
            SB.Append(String.Format("{0:X1}", HB))
        Next
        LabelHash.Text = "MD5 : " & SB.ToString()

The usage is pretty easy all you have to do is select and load the file from the button and you will get the Md5 hash for the selected file in the Label.

How To Get The Cheapest Mobile And Contract Possible

How To Get The Cheapest Mobile And Contract PossibleNeed that mobile phone and service, but don't want to pay a fortune? Today we're going to tell you the cheapest possible way to get what you want. So if you're looking to save some cash, then here's how you can do it...

Buy Mobile Phones Online...
The first thing that you're going to need is a phone. Don't fall for the incentive contracts that mobile operators are trying to sell you. These are the contracts that come with a free phone, and as tempting as they may be they're going to end up costing you a lot more. The phone you get isn't free; you pay for it in instalments that are added to the cost of your monthly mobile bill. And when you add up all the instalments you'll find that you pay more than the retail cost for the phone. In the long run you're going to save more, and get lower mobile bills, by buying your own phone. The best way to buy mobile phones is online. Online prices are always cheaper, even if you're buying directly through a mobile operator.

You can get a perfectly decent budget, touch screen, smart phone for under a hundred and fifty pounds, so don't let the thought of big prices put you off. Check out the Huawei Ascend models or the lower end Sony Xperias for good deals. If it bothers you to buy mobile phones online, go out and get a physical look at the model you're buying before you commit, but then come home and buy it over the internet. This is by far the cheapest way that you're going to get a phone.

Consider Pay as You Go...
Now you're going to need to get service for that new phone, and you have a couple of options. The first thing you should consider is pay as you go. This is where you buy a SIM card from and operator and load it up with credit. When you use your phone, credit is deducted from your account, and when the credit's gone you phone stops working (though you can still receive texts and calls), at which point you'll need to put more credit on.

This has the advantage of only paying for services that you actually use. Plus, it makes controlling your budget easier, since you can only spend money that you've already put on your phone in credit. But rates on pay as you go are higher than on contract. This doesn't mean that you don't get savings though. In general, light phone users benefit more from pay as you go contracts, since they rarely use up the monthly calling plan limits on contracts. If you use less than ten calling minutes a week, send only three to four text messages a day, and only use mobile data for casual surfing and emailing, then you're probably going to save money with a pay as you go plan. Check out Tesco Mobile for the best pay as you go deals.

Choose a Calling Plan...
If pay as you go isn't for you, then you're going to be signing a mobile contract with an operator, and this means choosing a calling plan. The right calling plan is exceptionally important when it comes to saving money. A calling plan is going to give you a set of limits for the amount of calling minutes, text messages and mobile data that you can use each month for your fixed monthly fee. If this plan is too big you're going to waste money paying for minutes, texts and data that you don't use, because your monthly fee is the same regardless of whether you use all of your limits or none of them. If your plan is too small, then you're going to consistently go over your monthly calling plan limits. When this happens, you have to pay expensive premium rates on any extra services you use on top of your regular monthly fee. There are a couple of things that you can do to make sure that you're choosing the right calling plan. If you've had a contract before, then look at some of your old phone bills. These should give you an idea of what your monthly usage looks like. If you haven't had a contract before then the best thing that you can do is to get a pay as you go plan for a month and then track your phone usage. You can do this yourself, however most modern phones will do it for you. Just look under the settings menu and see if you can find minute, text and data counters. Set these counters to zero, use your phone normally for a month, and then go back and check the numbers. This will tell you the size of calling plan that you should go for.

Shop (online, again...)...
Now you're ready to find the cheapest contract for you. Go online and find yourself a mobile tariff comparison web site. You'll put the monthly calling plan limits that you're looking for into the site, and then you'll get a list of plans with different operators that match your needs. Make sure that the plan says it's SIM only (you don't want to sign an incentive contract, remember?). Now find the cheapest plan that's the closest match to your required limits. Before you buy, there's one more step to the process. Go to the web site of the operator that the plan is with, and find the coverage map. Every operator has one on their site. Use this to make sure that the provider has good coverage in your area. If they don't, choose another plan with a different operator. Bad coverage will give you bad mobile reception, and it's just not worth paying for. You can then go ahead and buy the contract, again doing it online to get online discounts. And you'll be safe in the knowledge that you've got the cheapest mobile and service plan that you can possibly get.

Sam Jones decided that it was time to buy mobile phones again for the household.  He found the latest offers online with sites like uSwitch and managed to get great phone packages for next to nothing.

Getting A New Mobile Contract - The Questions You Should Ask Yourself

Getting A New Mobile Contract - The Questions You Should Ask YourselfBefore you start signing a mobile contract, there are a few questions that you should be asking yourself to make sure that you're getting the best deal. Most of us want to save a little money these days, and the wrong mobile contract could cost you a fortune. You have plenty of options out there, and you want to make sure that you're choosing the right one. So before you sign, ask yourself these questions...

Do I Really Need a Contract?
You do have another option; you don't have to sign a contract. Pay as you go plans are not as popular as they once were, but some customers benefit more from them than from contracts. If you're a light phone user, someone who calls for less than ten minutes a week, who sends only three to four texts a day and who uses mobile data only for email and casual web browsing, then chances are that pay as you go will be a better deal for you. It's worth keeping in mind...

Am I Choosing the Right Calling Plan?
The calling plan is the most important part of any mobile contract. This is the set of monthly limits for the amount of calling minutes, text messages and mobile data that you're allowed to use for your set monthly fee. The wrong plan is going to end up costing you money. Here's the deal. Imagine you have a plan that includes thirty calling minutes.

If you call for thirty minutes a month, you pay your monthly fee. If you call for five minutes a month, you still pay the same monthly fee. So a plan that's too big means paying for services that you don't use. Now imagine that you call for forty minutes a month, what happens now? You pay your regular monthly fee, plus premium rate charges on the extra ten minutes that you used. So a plan that's too small isn't a good financial decision either. You need the right sized calling plan, even if that means getting a pay as you go plan for a month so that you can track your usage and find out the amount of minutes, texts and data that you need.

Am I Taking Free Txt and Calling Minutes into Account?
Many operators these days will offer you free txt and calling minutes as an incentive to sign up for a contract. There's no point accepting this offer if you're not actually going to use them though. You'll want to take these free txt and calling minute offers into account when choosing your calling plan, so that you make full use of them. If you get thirty free calling minutes a month, for example, you might want to choose a calling plan that has lower calling minute limits than you would otherwise choose.

Do I Really Need that Incentive Phone?
Operators are going to offer you two contract choices, incentive and SIM only. Both of these are going to come with a calling plan of your choosing, but an incentive contract also comes with a free or low cost mobile phone. Think about this option carefully. A phone is pretty tempting, but it's not going to be free. The monthly bill on an incentive contract is going to be higher than the monthly bill on a SIM only contract, because basically you're buying a phone in instalments, and the bill will include a monthly payment for your phone. With most instalment plans you end up paying more than the actual cost of the item that you get, because you're both paying for the convenience of not having to make a big initial payment and because the company is taking a risk by giving you something without get full and immediate payment in return. Incentive contracts are no different. You will pay more than the retail cost of the phone that you get over the course of the contract.

If you already have a phone to use, or if you can afford to buy one up front, you should do so and then sign a SIM only contract, because you will save money. Don't be tempted into getting a new phone just because they're offering you one. You should only sign an incentive contract if that is the only way you can get a phone that you absolutely need.

How Long Am I Going to Sign Up For?
You will also be offered a choice of contract terms. Usually you can choose between a twenty four month, eighteen month or twelve month contract. Some SIM only contracts also come in rolling thirty day periods. This means that the contract is only for thirty days, but it will automatically renew every month unless you tell the operator that you want to stop your service. The longer your contract is the lower your payments will generally be. And if you sign an incentive contract this is especially true, since the cost of the phone is spread out over more monthly payments, making each individual payment smaller. But don't forget that once signed up, it's going to be difficult to get out of your contract. That means that switching to another operator to get a better deal could be complicated. And if your financial situation changes then you might be stuck making payments that you really can't afford to make.

Will I Have Good Service?
Your mobile reception depends on how good coverage is with your operator in you local area. If you don't get good coverage then you won't get good reception. That might mean that your phone won't work at all, but at the least it will mean that you get slow mobile data speeds and bad call quality. You should always check coverage in your area before signing up with an operator. Just go to the operator's web page and look for the coverage map that the operator is required to have there.

Sam Jones’s son knew that packages which included free txt messages would save him money.  He proved himself right when he compared deals online and started to spend less on his phone bill every month.

How To Get The Best PAYG Deal

How To Get The Best PAYG Deal
Contract mobile phones are definitely a convenience. You tend to get a free or heavily subsidized mobile phone, and you then get the comfort of never running out of credit and just receiving a monthly bill. However, there are downsides. That phone is not free of course, rather you'll be paying for it in monthly instalments on your phone bill, which over the two year contract can add up to a lot more than the actual cost of the phone. For many people, finding the best pay as you go tariff is the key to saving money on their mobiles. So how do you go about it? Read on to find out...
  • Find Out What You Need...
The key to a good PAYG tariff deal is to make sure that it matches your needs. Look at your old phone bills and find out how your phone activity is broken up, how much of the time do you spend calling, how many text messages do you send. This information will help you determine which kind of plan is best for you. If you're sending over 500 text messages a month, for example, it's probably a good idea to get a PAYG tariff that includes unlimited texting. Be warned, PAYG tariffs tend to work out as money savers only for those that plan to spend less than £25 a month. For users who regularly spend more, contract phones are still the best deal.
  • Decide What to Spend
Not being tied down to a contract means that you don't have to spend money on your phone each month. However, it's a good idea to have a budget for the month that accurately reflects what credit you'll need. This is because a lot of PAYG tariffs offer special deals for customers who top up every month. For example, putting ten pounds of credit on your phone each month will get you unlimited internet.
  • Decide Which Operator to Go With...
This decision should have two parts. First, find the operators who have plans that match your needs (they'll probably be more than one of them). Then ask around, ask your family and friends which operator they use. This is a good idea for a couple of reasons; firstly, because you'll get some recommendations, but also because many operators offer lower calling and texting prices to numbers in the same network. If you call your Mum every day, it might not be a bad idea to be on the same network as she is to get some savings for both of you.
  • Shop Around
This can take some serious time, but it's definitely worth doing. Just because you already know which network you want doesn't mean that you need to go straight to their store. There are many online sources (such as Carphone Warehouse) that offer special deals on hand sets bought with PAYG tariffs. It may be that you end up back at your mobile service operator, but it doesn't hurt to take a look around and find out what's out there.

Phil Turner is searching for the best pay as you go tariff available to him because he hardly uses his phone at all.

Pros And Cons Of AdAware Anti-Spyware Program

Pros And Cons Of AdAware Anti-Spyware ProgramOften when you surf the Internet going from site to site adware is installed on your computers. This happens when you download a free application or even give out your email. It is a marketing tool that is used for finding out what websites you go to so they can sell products or services to you. There is a debate over whether this is an ethical marketing tool as some consumers do not like these programs.

Pros of Adware Anti-Spyware Program
Adware Anti-Spyware Program is a program you install on your computer or laptop that helps you detect these adware and malware programs. When the program detects the adware it lets blocks or stop the popup ads or programs from functioning. This program scans downloaded files to check for threats. When you attach a USB to your computer the program will scan for malware and infections.

When a file is suspected of infection or malware it moves the file to a quarantined area or sandbox. This program will monitor the behavior of the file to see if it is infected. This program helps you shop and bank online more safely. When people use social networks it helps protect their identify and from virus attacks when using email or links. This program has a game mode that let's you play a video game or watch a movie without the software interrupting you with urgent updates. It scans most websites for url's that are dangerous or downloadable files that have malware or viruses. This sites are checked against a central database of sites that are known to be dangerous.

This central database is updated every five to twenty minutes preventing you from stumbling on phishing sites accidently. The program has free installation and setup assistance. You can call the company by phone and get up to 15 minutes of free advice on a problem you have. If you think your laptop or computer are infected the Lavasoft Network will try to diagnose and fix the problem. This program is for home use or professional offices. It has a fast antivirus program that goes with the Adware Anti-Spyware Program. It protects you from email threats like viruses and program that are sent as attachments through email. It keeps you protected against the latest viruses and worms as they develop. It stops infected files from downloading before they can infect your computer. On social networks it protects your passwords and personal information. If there are links on posting of social network it scans them to insure safety. It has an advanced two way firewall that protect your computer . This program has a file shredder that permanently deletes files with passwords and information you do not want to be found.

Cons of The Program
When tested against other more powerful programs Lavasoft was found to be an average program. It does not slow down your system while performing and does a fairly accurate job of identifying dangerous files and websites. When tested for protecting against malware it was not found to be as good as other program that it competes with.

Reference: http://anti-spyware-review.toptenreviews.com/ad-aware-se-pro-review.html 

+Katrina uses her technical knowledge to help people. At Rack Solutions. her passion for technology and wealth of knowledge have helped many people find the right solution in their unique situation.

5 Best Data Backup Programs For You And/Or Your Business

5 Best Data Backup Programs For You And/Or Your BusinessWhy Should I Back My Data Up?
It is safe to say that computers are one of the most important technical advancements to date. We use them for almost everything imaginable, storing large amounts of data in the form of pictures, videos, music, documents, and executables. Many would attest to the argument that their lives are contained within these intangible bytes of information. Now think about losing all that information; every memory, work file, memoir, and life's work lost. Hard to imagine right? Like life itself coming to an end. This is why data backup software exists. These programs ensure the safety of your files using various methods and tools including scheduled backups and system restore, which allows you to recover all data after a major malfunction without the hassle of reformatting the entire computer.

This article will describe the top 5 data backup programs that will help you keep your data safe.

NovaBACKUP Professional ($49.95)
NovaBACKUP is a top of the line data backup program that uses an automatic back up process to continuously keep all your valuable files safe. In addition, NovaBACKUP can handle more complex processes like creating a full disk image of your hard drive, a more complete backup solution. This program sports a user-friendly interface with advanced options for more tech-savvy users and provides a free online storage service.

NTI Backup Now ($29.99)
NTI Backup Now takes the backup and restoration process and simplifies it into 3 steps. This program is geared towards those who are not very tech-savvy, with a simple UI and process walk-throughs. Because of this, it lacks some advanced features. Like other solutions, NTI Backup Now provides scheduled backups as well as a choice between full or incremental backups.

DT Utilities PC Backup Pro ($49.99)
PC Backup Pro is one of the most reliable and cost-effective data protection solutions. The software has a simple interface suitable for all user levels. It is capable of backing up and recovering data to/from a variety of storage devices including CD/DVDs, online storage, tape and disk drives. The program also provides step-by-step instructions on how to perform backup and restoration procedures, disk-imaging recovery, and scheduled backups.

Macrium Reflect Professional 5 ($58.99)
Macrium Reflect provides a variety of advanced backup tools like scripting abilities, Macirum ReDeploy (restoring your data to a new computer), and image verification. This software also provides the basic tools like incremental and automatic backup. When using these options, Macrium uses a unique drag and drop UI that makes it attractive and easy to use.

Genie Backup Manager 9 Home ($49.95)
Genie Backup Manager uses three different backup types: full, incremental, and mirror. Like the other programs mentioned, it supports scheduled backups but is capable of backing up your data even when you are not logged in. A truly unique feature. This program can also keep your data safe from hackers through military level encryption methods.

Though computers are machines built to support you, they are unreliable at times. These data backup programs were created to ease your mind and provide security for your life's data.

Reference: www.novastor.com, www.nticorp.com, www.dtransfer.com, www.macrium.com, www.genie9.com 

+Katrina uses her technical knowledge to help people. At Rack Solutions. her passion for technology and wealth of knowledge have helped many people find the right solution in their unique situation.

Reasons Why The Internet Is Essential For Freelancers

Reasons Why The Internet Is Essential For FreelancersIf you are a freelancer then you have probably heard more than once that you need to establish yourself online if you want to succeed. If you haven’t ever thought about what the internet can really provide you with then here are some of the biggest reasons why you need to go online as a freelancer.

Increase Your Customer Base

Of course the internet will open up many new doors to attract more clients. You can be instantly connected to people across the world and thus you can think about growing your business a lot quicker online. Many freelancers don’t need to be in the same physical location as their customers and thus you can really benefit from being on the internet.

Market In More Affordable Ways

The internet is also great in providing freelancers with the same opportunities to market their business as the big companies have. For example, with the proper use of SEO on your website and social media platforms you will be able to increase the exposure you get without spending a fortune. If you only had to market through the conventional means like TV ads and newspaper ads you could probably not afford it. But on the internet even running video ads and promotional videos on platforms like Youtube is possible and really affordable.

Improve Your Skills

In order to attract more customers you need to be constantly developing your skills and the internet is an amazing place for making sure you have the knowledge you need. There are so many more opportunities to learn about your industry online and it is important to take advantage of these opportunities. Odesk provides a comprehensive list of the best websites that freelancers can use to improve their skillset and make the most out of the internet. You may notice that many of the options available are either free or very affordable and you would often end up paying a lot of money if you had to take these courses offline. You can also attend seminars online and thus don’t need to travel around the world in order to get the right skills. Make sure you stay on top of your field by going online and making use of the opportunities available.

Get Help To Run Your Business

Being a freelancer isn’t easy and there are a lot of things that you need to learn to juggle at once on your own. But the great benefit of the current technology is that you have many more opportunities to ease your workload.

For example, companies providing online accountancy are really affordable and can give freelancers a lot more time to focus on the more essential parts of the business. Friendly Accountants suggests that getting help with your finances can be a really cost effective way of improving your business prospects. There are also many great tools that make the above points of marketing and attracting customers online a lot easier. It is a good idea to browse through these tools and find out what are the ones that work the best with you.

Marlene is enthusiastic in making sure freelancers are making the most of the internet and the technology available for them and she is constantly reading about new developments in the business field. She is a big ice-cream fan and could eat mint ice-cream all day long if her husband would allow it.