Data Types and Variables

 

A data type specifies whether or not a variable can store a number, a single character or text. Variables are names given to the memory location for storing data. Data Types are used to specify the types of values related to variables.

How To Use TinyURL API In VB.NET

TinyURL Icon Ultimate Programming TutorialsTinyURL is a URL shortening service a web service that provides short URLs for redirection of long URLs. This can be achieved very easily in PHP, I posted a PHP snippet about this you could reach it from here. Last year I created a TinyURL shortener I named it TinyURL Desktop App you can download it from here if you want. I found the source code of TinyURL Desktop App just now that's why I am writing this hehe. I used Devcomponents in my TinyURL Desktop App also I didn't handle exceptions because I was a noob then :0.

How To Execute Shell Commands and Print Results in Java

Java Command Shell,bash script -eq, bash script -ne, best way to learn java, execute shell commands, execute shell commands java, get runtime, host runtime, java, java learning, oracle sql plsql, print results, tutorial,
There are many ways to execute shell commands and print results in java I guess, the famous and the most used way is Runtime.getRuntime().exec you can find a good explanation for that from here. Coming to the point i am using the same way but little different! I use BufferedReader,InputStreamReader for simplicity and I can't make it much advanced. On the main event I have created a String where you put your command with the second event it executes the command and prints the result before I start I would like to give some credits to luismcosta.

How To Make A Port Scanner in PHP

Port scanners are created to find opened/closed ports in a host, you can get the same results in this Port Scanner coded in php by the way I wouldn't take all the credits to this because i am a php beginner so I had to make this from scratch also there are many more open source advanced Port Scanners. You can also easily add Ports if you need to.

Down For Everyone Or Just Me in VB.NET

Down for everyone or just me is a website that can check whether your website is down or up.

Required components
  • One Button
  • One TextBox
Coding :
Add these codes to Button click_event & don't forget to add the namespace Imports System.Net.
    
'Imports System.Net
 'defining strin as a string & setting it to download strings from the website & the URL
        Dim strin As String = New WebClient().DownloadString(("http://downforeveryoneorjustme.com/" + TextBox1.Text))
        'checking string
        If strin.Contains("It's just you.") Then
            'return
            MsgBox(TextBox1.Text + " is up", MessageBoxIcon.Information, MessageBoxButtons.OK)
            'checking string
        ElseIf strin.Contains("It's not just you!") Then
            'return
            MsgBox(TextBox1.Text + " is down", MessageBoxIcon.Information, MessageBoxButtons.OK)
            'checking string
        ElseIf strin.Contains("Huh?") Then
            'return
            MsgBox("Invalid website", MessageBoxIcon.Error, MessageBoxButtons.OK)
        End If
Now to check you can just enter the URL you want to check in TextBox and click on the Button you added.

How To Make A Lyrics Fetcher In VB.NET

Description of the program : You can get the lyrics of songs with the artist name & the song name from this program.

 As usual just create a new fresh project and add the following tools to your form

  • 2 Buttons
  • 2 TextBoxes
  • 1 RichTextBox
  • 1 SaveFileDialog
Usage of the tools that you have added(Don't forget to change the buttons text : 
  1. Button1 - Fetch
  2. Button2 - Save
  3. TextBox1 - Artist Name
  4. TextBox2 - Song Name
  5. RichTextBox1 - Lyrics
You have to add System.Web reference, select add reference from project menu then search for it and click ok :

Adding reference to VB.NET

How To Get Assembly Information In C#

I am sorry guys that I was not able to write articles regularly because I have some issues with my ISP so no internet. I just wanted to write something so I chose something interesting! it's about getting information about the assembly. Just create a console application in C#, import this namespace using System.Reflection; after that go to the main event and add these codes.
 Assembly assembly = Assembly.GetExecutingAssembly();
            AssemblyName assemblyName = assembly.GetName();
            string assembly_information = string.Format("{0}, {1}, {2}, {3}, {4}", assemblyName.Name, assemblyName.VersionCompatibility, assemblyName.ProcessorArchitecture, assemblyName.HashAlgorithm, assemblyName.Version.ToString());
            Console.WriteLine(assembly_information);
            Console.Read();
What that does is, first it defines the assembly events and then there’s a string with 5 slots to get the assembly information one by one. You can get more information such as KeyPair, FullName, EscapedCodeBase, ContentType, CultureInfo etc.

Just run the program to get the information and by the way don’t forget to add more slots to the string if you want to get more information about the assembly(I don’t know how it’s called I just call it slot).

How To Force/Prompt Your C# & VB.NET Program To Run As Administrator

If your code will target or access secured files or libraries, then your program needs Administrator Privilege. It's easy to run your program as Administrator, simply you can right click your program and select run as administrator, and in C# & VB.NET theres a XML Manifest that tells the .NET Framework to prompt the user to run the program as Administrator, we can easily configure your program to prompt the user to run the program as administrator.

How to configure your program to prompt the user to run your program as Administrator?

1 : Go to Project(in your visual studio menustrip) and select Add New Item(or simply CTRL+SHIFT+A shortcut to open Add New Item)

outling





















2 : Choose Application Manifest File and click add(actually your debug folder has a manifest file but we are adding a new one)
man

























3 : You will find a new file in your Solution Explorer called app.manifest and you will fall into that file automatically lol, inside that file you would have some text(of course XML)

  
  
    
      
        
        
      
    
  

  
    
      

      
      

      
      

      
      

    
  

  
  


4 : Inside that file find  <requestedExecutionLevel level="asInvoker" uiAccess="false" />

5 : Replace asInvoker with requireAdministrator

6 : That's all

Now whenever you run your program, your program will prompt to run the program as Administrator.

How To Unlink Google Plus Account From Youtube

google plus.com
I saw someone had asked a question about unlinking google+ account from YouTube in yahoo answers, so I thought I should write a tutorial on that, actually I didn't know that it would be possible but after discovering so much finally I found how to do it.

It's really simple, just follow the steps :

1 : Sign in to your google account & go to youtube
(below is a image that proves, I have my google+ plus account linked to youtube)
youtube logo

3 : Click "Create custom URL"
advanced youtube













4 : You will be redirected to http://www.youtube.com/account_username?action_custom_url=true, add some random text mixed with numbers in the textbox & click Create Channel URL
create










5 : Come back to http://www.youtube.com/account(You will be redirected)

6 : Click on "Return name to 'yourcustomURL', and disconnect Google+ profile" & you will be redirected http://www.youtube.com/account_revert

7 : Click OK button from the redirected page
goooooooooooooooooooooooooooooooogle
8 : As what that redirected page sayed your Google+ profile will be disconnected from your Youtube channel
save
9 : Click save & that's all! you have successfully disconnected your Google+ profile from Youtube

I think unlinking your Google+ from Youtube makes no sense.

How To Add LinkedIn Share Button To Blogger

in logo
LinkedIn is one of the largest social network(mostly it's used for business purposes), It was founded in 2002, launched in 2003 may now it has millions of users. LinkedIn has introduced share button for websites(including blogs) to make it easy to share Articles on LinkedIn. There are 3 types of LinkedIn share buttons available(with counters).
You can read the full history and it's rankings from wikipedia


The types are : Horizontal Count, Vertical count & No count.
LinkedIn Buttons Buddy








To add the button you like to your blogger blog, follow these steps

1 : Go to Dashboard -> Template -> Edit HTML

2 : Press CTRL+F and search for <div class='post-header-line-1'/>

3 : Add the codes of the button you like(see the below image)

<!--code-->
Horizontal Count
Codes :
<b:if cond='data:blog.pageType == "item"'>
<div style='float:left;margin-left:2px;'>
<script src='http://platform.linkedin.com/in.js' type='text/javascript'/><script data-counter='right' expr:data-url='data:post.url' type='in/share'/>
</div>
</b:if>

Preview :
Horizontal count





Vertical Count

Codes :
<b:if cond='data:blog.pageType == &quot;item&quot;'>
  <div style='float:right;margin-left:2px;margin-bottom:2px;'>
<script src='http://platform.linkedin.com/in.js' type='text/javascript'/><script data-counter='top' expr:data-url='data:post.url' type='in/share'/>
</div>
</b:if>
Preview :
Vertical Count









No Count
Codes :
<b:if cond='data:blog.pageType == &quot;item&quot;'>
  <div style='float:left;'>
<script src='http://platform.linkedin.com/in.js' type='text/javascript'/><script expr:data-url='data:post.url' type='in/share'/>
</div>
</b:if>
Preview :
No count







NOTE : You can also add this button at <data:post.body/>

4 : Finally save your template & that's it.


NOTE : You can also change Margin sizes & Alignment(float)


I recommend you to use the Horizontal Count because i am using it & I think that's the one that suits for any blog.

How To Make A EICAR-Test-File In VB.NET

The EICAR Standard Anti-Virus Test File or EICAR test file is a computer file that was developed by the European Institute for Computer Antivirus Research (EICAR) and Computer Antivirus Research Organization (CARO), to test the response of computer antivirus (AV) programs. - Wikipedia
It's really easy to build a EICAR-Test-File in VB.NET because it has 68 ASCII characters which makes the file get detected as virus so what we are going to make is very simple, we are going to write those characters into a EXECUTABLE file.

The ASCII Characters X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

Just add a button to your form or write down on any events
'Don't forget to add Imports System.IO namespace
'By Mohamed Shimran
   Dim File As Integer
        Dim Text As String
        File = FreeFile()
        Text = "X5O!P" & Chr(37) & Chr(64) & "AP[4\PZX54(P^)7CC)7}" & Chr(36) & Chr(69) & Chr(73) & "CAR-STANDARD-ANTIVIRUS-TEST-FILE!" & Chr(36) & "H+H*"
        Dim save As New SaveFileDialog
        save.Filter = "Executable Files'(*.exe)|*.exe"
        save.ShowDialog()
            Dim strwrt As New StreamWriter(save.FileName)
            strwrt.Write(Text)
            strwrt.Close()
As you can see we have a string,integer & a savefiledialog declared so it writes the ASCII chracters to the exe file using stream write.

I have saved the exe file and here my avast pops up
EICAR
I hope you enjoyed this tutorial.

How To Add 125x125 Ad Banners To Blogger

One of the main ad banner is 125x125, we can see 125x125 ad banners on many websites. Without wasting time let's get into it.....
  • Go to Blogger > Design > Page elements
  • Click on add a widget
  • Select HTML/JavaScript Widget
  • Add the codes below in it
  • Replace Ad URL with the website link of the advertiser 
  • Replace Ad Image URL with the ad image link Replace 
  • Ad Description with some information about the Advertisement, the description appears as ALT(mouse hover) 
  • Finally save the HTML/JavaScript Widget
I hope this tutorial is useful, keep visiting for more tutorials.

How To Embed Facebook Posts Into Your Blog Posts

facebook emedded
Sharing your Facebook posts on your website or blog page might help with the engagement on your website. however before you'll be able to embed a post, that individual post has to be public. Posts with restricted privacy settings will not be embeddable. therefore if you are attempting to embed your own post, confirm it's set to Public.

You need get the URL of the Facebook post that you wish to embed, you can get your Facebook post URL from your date of of your post.
facebook

How To Use Spell Checker WPF In VB.NET

How To Use Spell Checker WPF In VB.NET
I started WPF in vb.net and soon I will move to c# by the way this the first tutorial in Ultimate programming tutorials about WPF so be cool first of all WPF means windows presentation foundation as i know WPF is really cool . so to get started Start A new project and select WPF
How To Use Spell Checker WPF In VB.NET

so then you will see two items called Application.xaml and MainWindow.xaml in your right side bar where you see your forms and resources . go to MainWindow.xaml and double click it and you will see something alike form and you will have these codes

Widget to share photos,text & page

media

The best way to get traffic for your blog is from search engines and social media. Today I found a social media sharing service very impressive and attractive. Let me introduce to the service, there's a website called markely.com that promotes your blog visitors to share your blog articles in three ways.




1 : Page Sharing
page share
2 : Image Sharing
image share

3 : Text Sharing
text sharing


To install this service on your blog go to http://www.markerly.com/onboarding

Choose Social Media services + Sharing Types + Icon Color
social media
Sign up
sign up
Get your code
codes scripts
Put the code at </body> or somewhere in your template
</body tags
Verify your installation
verify install
They have a dashboard where you can see the sharing stats & etc, I hope this is helpful. Have a great day.

How To Edit/Change Comments In Blogger

This is my first blogger tutorial, sometimes we get spammy comments/offending comments and etc for our posts and if we delete the comment that is something not nice so what we can do is, we can just edit the posted comment easily.

First of you need to go to setting>other in your blogger control panel and click on Export blog.


How To Make A Random Text Generator In PHP

php
I don't do php at all but this is something I had to learn so to begin our Text Generator open your favorite Text Editor, I have Sublime Text 3 beta. First add the usual html>head>body tags and close the tags, after that let's add our css after body tag add these codes.
<style type="text/css">
.refresh {
    -moz-box-shadow:inset 0px 1px 0px 0px #caefab;
    -webkit-box-shadow:inset 0px 1px 0px 0px #caefab;
    box-shadow:inset 0px 1px 0px 0px #caefab;
    background-color:#77d42a;
    -moz-border-radius:6px;
    -webkit-border-radius:6px;
    border-radius:6px;
    border:1px solid #268a16;
    display:inline-block;
    color:#306108;
    font-family:arial;
    font-size:15px;
    font-weight:bold;
    padding:6px 24px;
    text-decoration:none;
    text-shadow:1px 1px 0px #aade7c;
}.refresh:hover {
    background-color:#5cb811;
}.refresh:active {
    position:relative;
    top:1px;
}
h1 {
font-family:Verdana, Arial, Helvetica, sans-serif; color:#000000; font-size:33pt
}
</style>
After that we have a PHP function, add these codes after your css codes
<?php
function Generate() {
                    $var = "abcdefghijkmnopqrstuvwxyz0123456789";
                    srand((double)microtime()*1000000);
                    $i = 0;
                    $code = '' ;
                    while ($i <= 6) {
                        $num = rand() % 35;
                        $tmp = substr($var, $num, 1);
                        $code = $code . $tmp;
                        $i++;
                    }
                    return $code;
                }           
?>
Now finally let's call the function with these codes, just add these codes after the function(php)
<center>
<h1>
<?php
echo Generate();
?>
</h1>
<a href="index.php" class="refresh">Refresh</a>
</center>

NOTE: Replace index.php with your PHP file name.

Now run the PHP, here is image of what we've made

php codes











I hope this php tutorial was interesting,Thank you for reading & do share if you thing the article deserves.

How To Load Array Values Into Listbox & ComboBox In C#

combox tutLast 3 days I have been working on a Library Management System, it's for my college actually it's a group project, but i promised my group members that I will code and design the whole system, by the way i really had lots of problems because this would be my first time doing with a database, also I didn't know how a Library Management System works because I have never been to a Library. Hopefully I am almost done, I am going to meet my group members and ask them to make the Documentation.

Loading Array values into a ComboBox, I had to do it in my Library Management System, I will wrote the same code that I used in my Library Management System.

First we need to create a private Const int(const is a special kind of variable....), a private String Array and set value to them.
private const int Total = 13;
        private String[] genre = new String[Total];
Now coming to the function, we'll create a Function called LoadBookGenres(), and set set values to the arrays, adding to the listbox or combobox, by the way you can still go straightly without creating a new Function like you can set the values for the arrays, and load(sort) the array values to the listbox or the combobox in an event(ex:Form_Load).
private void LoadBookGenres()
        {
            //Assign value into Array
            genre[0] = "Adventure";
            genre[1] = "Animals";
            genre[2] = "Computers & Internet";
            genre[3] = "Biography";
            genre[4] = "Comics";
            genre[5] = "Horror";
            genre[6] = "Sports";
            genre[7] = "Romance";
            genre[8] = "Historical";
            genre[9] = "Music";
            genre[10] = "Religion";
            genre[11] = "Mystery";
            genre[12] = "Other";

            //Sort array and fill listbox with the sorted array
            Array.Sort(genre);
            for (int i = 0; i < genre.Length; i++)
            {
                listBox1.Items.Add(genre[i]);
            }
        }
NOTE : Change ListBox1 to your listbox name or your combobox name.
 Remember we set the public const int to 13, always in computer science you should count from 0 and upwards.
Now we just need to call the Function from an event, I called it from Form_load
private void Form1_Load(object sender, EventArgs e)
        {
            LoadBookGenres();
        }

Here is a picture of this in ListBox.
array

Here is a picture of this in ComboBox.
 
I hope this has helped you in someway, Thanks for reading.

How To Make a Website Responsive

mobile of UP
Being a blogger or a webmaster everyone want's to make their website compatible with any device. Not everyone know this small one line code that makes your website fit with mobile/tablet etc devices size.

All you need to do is just add this one line code under your head.

<meta content='width=device-width, initial-scale=1, maximum-scale=1' name='viewport'/>

head
After adding it, save your template and let's check if it works, go to http://www.studiopress.com/responsive/ and enter your website URL & hit enter, within seconds you would be able to see how your website looks like and if it fits for other devices.

Theres another way to check it, just resize your webbrowser
resize,sizse
As you can see it works, Thanks for reading I hope this helps you.