How To Make Message Boxes In Java

Message boxes are used to display alerts and information messages to the user. It’s very easy to make Message Boxes in .NET languages, however in Java programming language it’s not very easy like in vb/c#. In Java we can use JOptionPane to display messages.

How To Use MDI In C#

An MDI(Multiple Document Interface) is a graphical user interface within which multiple windows reside below one parent window. The opposite words of MDI are SDI(Single Document Interface) and TDI(Tabbed Document Interface).

How To Keep JFrame Always On Top

Always On Top : It’s something that keeps the window on top, you might have seen in some programs they have a menu strip item called Always On Top when you enable it, it will keep the window on top most. You might have seen in Visual Basic or Visual C-Sharp they have a property for that in Form properties so you don’t need to write codes for that but in Java you all know that they neither have a official IDE nor a well advanced 3rd party IDE such as Visual Studio.

Simple TinyURL API in Java

I have been off for sometime for some issues anyway today we are going to see how to use TinyURL API in Java programming language.Well, to be honest theres nothing so serious I have imported Scanner to input, of course the GET request and some more to handle the exceptions and so. I'd like to say that I like console based(CLI) applications more than GUI so I don't bother about forms and others.

C# - Operators and Expressions

Operators are used to process the data. Expressions are created by combining the operators with variables and constants.

For example:

int number1, number2, sum;
number1 = 10;
number2 = 20;
sum = number1 + number2;

 In the last statement, two variables using the + symbol. The + is a operator also there are many operators in c#.

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.