Advertisements

Thursday, October 2, 2014

// // Leave a Comment

Downloading Windows 10

Hi,

I was downloading Windows 10 Technical Preview this morning. When it was taking too long, I have asked my ISP to increase Bandwidth and they did.

Here is the screenshot. 30 MBPS, whoo! Incredible speed in India.

Feeling Excited. It is downloaded when I write this post. Will install and share some cool screens.

Keep visiting.
Read More

Sunday, September 28, 2014

// // Leave a Comment

How to Limit Bandwidth Per IP Address - MicroTik

Hi,

If you are administrator or manage network in your office, your most challenging work is to divide the bandwidth as per requirement of user and to stop un-necessary use of Internet Bandwidth causing slower internet for others.

Requirement/Background: 

Some of people always love to download songs, apps or other kind of digital data when they get Free Internet (that do not cost their own money). So they use most of bandwidth using Download Manager and other Accelerators.
If your internet connectivity is equipped with MicroTik devices like FirePro router or RouterBoard routers, here is the method to limit bandwidth per user/ip address.

Step 1: 

Login to router WinBox or Webfig using your Router Address and Username/Password. Default are admin/admin.

Step 2: 

Click on Queue Menu and click on Add button.

Step 3: 

You will see following screen. Fill the form as filled in example screenshot. Click Apply and OK to close the dialogue screen.


Now, whenever, the particular IP address try to cross the bandwidth limit which is specified here, that will automatically marked Red and restricted the bandwidth. Lets be clear with following screen.

You have successfully put limit on user. Now the user can not cross the limit and the bandwidth will remain in flow.

You can also disable the Internet Access or Downloading or Uploading separately to particular IP address, without letting him know that we will discuss on next post.

Thanks for reading.
+John Bhatt  
Read More

Sunday, September 21, 2014

// // Leave a Comment

Feeling Awesome - Thank You

Whooo!

We are about to reach 1,00,000 Hits on this domain only.
Combined stats is about to reach 1,40,000 hits. 
This blog got 80,000 hits in last 8 months since our last announcement on 20 January 2014 on average of 10,000 hits per month. 

Keep supporting and your feedback are most welcome. 

Thanks from 
P.Yar.B Complex
Read More

Sunday, September 14, 2014

// // 1 comment

50 Lakh GMail Passwords Leaked

Hi,

This time its sad news if you use Google's Mail Service or any other Google product and might not enabled two step authentication or secure password which is not shared with anyone/anywhere.
Currently on 09 Sep 2014 23:38 a Russian BitCoin forum member has released 49,29,090 passwords with their account name and they are still publishing more.
Snapshot with Password of database. (Image Credit: BTSEC forum)

Reference:
Original Thread: BTSEC Forum
On CNews.ru : CNews.ru
DailyDot.com : DailyDot.com
They have released database in Plain text and which is of size 103 MB (108,763,323 bytes). They have compressed using format 7z and file available for download is 28.7 MB (30,108,353 bytes).

This list includes thousands of Yandex login passwords also. While according to Google and Yandex representative, the list is some old and might be collected using Phishing pages. As per Google there might be chance of hack between data transmission between two servers containing authentication records. They are working to fix it and make it more secure.

But, what of those, who have been compromised.

Suggested steps are:

  1. Keep your password strong enough.
  2. Do not enter your password anywhere else. Even some mail client or mobile application claiming that they serve mail might store and sent your password online.
  3. Enable two step authentication.
  4. Do not disclose your password during any online chat (asking for support/help) etc.
Thank you for reading.
+John Bhatt  
Read More

Sunday, August 17, 2014

// // Leave a Comment

Change Display Style of Unread Mail - Microsoft Outlook

Hi,

It has been a long time since we posted any Microsoft Office article. Here we go with Microsoft Outlook. Our task today is To Change the display style of Unread Mail. By default, Microsoft Outlook shows unread message in bold Text or with different color based on Outlook Version.

I am using Microsoft Outlook 2013 (MS-Office version 15.0.xx) in this tutorial. Below is our Expected Result. Above is the default view in Microsoft Outlook 2013 and below is the modified view for Unread Messages. We can follow the same steps to customize formatting styles for different conditions.

Procedure

Step -1 : Click on View Pane, Choose View Settings from Current View section. You can do this directly clicking in Column Headers.

Step -2 : You will get following screen. Choose Conditional Formatting. This is Conditional Formatting window where we change default Rule for selected view. We have selected Unread Message in above case. Then Click on Fonts Button to proceed next. You can also Add new Rule to rule list.
Step -3 : Now change the Font Name, Color, Style, Effect, Size etc from Font Wizard screen. Have a look at below screen.
Ok, you have made the required changes, Restart Microsoft Office Outlook to reflect changes. Your new unread mails will be displayed with new formatting.

Thanks for reading. Hope you find our post helpful. Please share among your friends and social network to help us growing. Feedback and suggestions are always welcome.
+John Bhatt 
Read More

Friday, August 15, 2014

// // Leave a Comment

Happy Independence Day

Hi,

Wishing all my Indian Friend living in India and abroad a very happy Independence Day. Memorize the struggle done by leaders and Martyr.

-
From P.Yar.B Complex
Read More

Friday, July 11, 2014

// // Leave a Comment

KitKat update for Motorola Moto E

Hi,
If you are using Motorola Moto E, here is the great news. As motorola has announced on 5th of this month regarding KitKat 4.4.4 update, they have released update today.

Check screens below.



Tap on Setting > About Phone > System Updates if you did not get any notifications.

Oh yes, It is approx 57.9 MB in size, so you can easily download it over mobile data connection.

Enjoy your update.

Thanks for reading. 
John Bhatt
Read More

Wednesday, July 9, 2014

// // Leave a Comment

Software Review - Parental Control Software - Freeware

Hi,

It have been long time since last post. Today I am going to review a software that is is most useful if you work in a office and handle your IT department, If you have children at home and your want to block access to some sites without any visible changes, here is the best application for you.

Introduction:

Software name: Golden Filter Premium
Provider Company: GSI Technologies
File Name: GFPreSetup.exe
File Size: 3.10 MB
Latest Version: 3.1

Features: 

Some of the most important and required features listed below.

  • It does not create any folder or shortcut in Start Menu.
  • It does not create its files at easily visible place.
  • It does not create any taskbar icon while running. No one can know what is running in background.
  • It is totally safe (No Virus, Malware, Adware or any other kind of threat, confirmed with multiple antivirus applications. ex. MSE, Norton, AVG, QuickHeal, McAfee)
  • No listing at Add or Remove Program control panel. No one can remove it easily.
  • Can be disabled using software itself. 
  • Password Protected.
  • Toggle Function keys to show and hide application.
  • Can capture Screen and record to play later for administrator.
  • Restricted words to shut down any application running that contains such words (all supported Browsers).
  • Restricted Software
  • Hiding your important Folders
  • It is FREEWARE.

Screenshots:

Login Screen:

Home Screen:


Application Setting Screen: 
Time Based Setting Screen:
I have just included some of sample images. There a lot more control to use this application.

Download Links


Thanks for reading. One your next visit, I will be writing about the using method of this application with detailed snapshots. Please share if you find this post helpful.

Read More

Wednesday, June 25, 2014

// // Leave a Comment

Microsoft Excel : Formula Result not showing

Hi,
Lets get known to a common Microsoft Excel issue.

Issue/Problem

Last day, I was working with a file in my office. That file was in Microsoft Excel format and I have to analyze data. When placing some formula, I noticed, excel is not calculating formula.
Lets be clear with following screenshot.

I tried many thing, Converted File to older format, newer format, opened and closed in other system and many other tricks but no one worked.

Actual Cause

Then suddenly I show the Format of the textbox where formula is placed. That is of kind Text and was the actually reason for not calculating formula. Microsoft Excel treats everything as normal Text string while placed or formatted as Text.

Solution

I have following two simple steps and Results are back.
Step 1: Changed formatting of Cell to Number which is of course my data type for the result. Lets have look at below screen to be more clear.

Step 2: Clicked in Cell to go to edit mode and pressed Enter key without any modification as formula was correct. Have a look at this screen to confirm.
Problem solved.

If you find my posts helpful, do not forget to share on social network or with your friends. Suggestions and feedback are awaited and always welcome.

+John Bhatt 
Read More

Friday, June 13, 2014

// // Leave a Comment

SLC 2070 Result Published

Hi,

Office Of The Controller Of Examinations has published result of SLC examinations taken on 2070 BS. Meanwhile, result is not available to view, we have downloaded their database and uploaded to our website. You can follow below link to get your result.
http://www.johnbhatt.com/Results.aspx


http://www.johnbhatt.com/Results.aspx

Congratulations and All the Best for all students who passed, for those students whose roll number is not in list, do not worry, you can check your marksheet soon and final result might change.

Thanks,
+John Bhatt 
Read More

Friday, May 30, 2014

// // Leave a Comment

HTTP Error 500.23 - Internal Server Error - Solution 2

Hi,

If you keep visiting here, some days ago, I have posted a same post here. The problem is similar again but difference is another way to solve the same problem.
Lets have a look at fresh snapshot.

HTTP Error 500.23 - Internal Server Error

An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

Most likely causes:

  • This application defines configuration in the system.web/httpHandlers section.

Things you can try:

  • Migrate the configuration to the system.webServer/handlers section. You can do so manually or by using AppCmd from the command line - for example, %SystemRoot%\system32\inetsrv\appcmd migrate config "Default Web Site/". Using appcmd to migrate your application will enable it to work in Integrated mode, and continue to work in Classic mode and on previous versions of IIS.
  • If you are certain that it is OK to ignore this error, it can be disabled by setting system.webServer/validation@validateIntegratedModeConfiguration to false.
  • Alternatively, switch the application to a Classic mode application pool - for example, appcmd set app "Default Web Site/" /applicationPool:"Classic .NET AppPool". Only do this if you are unable to migrate your application.
(Set "Default Web Site" and "Classic .NET AppPool" to your application path and application pool name)

If you are still confused about the previous post, here is the link.
http://www.pyarb.com/2014/02/http-error-50023-internal-server-error.html

Problem

Last time, we received the similar problem while debugging from Visual Studio, this time it is produced by IIS itself after publishing.

Solution

We will add small piece of code into web.config file. This can be done using two methods. Either you open any text-editor (notepad) with Administrator Privilege and open web.config from your IIS root or change the setting in Visual Studio web.config and publish again. What you want to is totally on you.
Piece of Code:
......
<system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
    </system.webServer>
</configuration>


Place this code inside configuration node. Also, this will not harm you in case of security, This will just tell not to check such settings which are not required.
Thanks for reading. Do not forget to share or provide feedback.
+John Bhatt

Read More

Friday, May 16, 2014

// // Leave a Comment

Update on Download Center

Hi,

Sorry for the interruption on services of Download Center. Due to some technical mistakes with our web-host and application, all our download files are removed. However, we have all songs available for listening.

Now instead of relying on WordPress and PHP, these days me and my team is busy to develop a CMS based on ASP.NET for Download Center.

We will be back soon.

From
P.Yar.B Complex
Read More

Saturday, May 10, 2014

// // Leave a Comment

Funniest Wrestling Match

Hi,

Its fun time now. I am sharing you a recorded copy of a wrestling match which is recorded from TV.

Enjoy. No rights reserved. 
Read More

Tuesday, May 6, 2014

// // Leave a Comment

CSS - Cascaded Style Sheet : Part 2 (Selectors)

Hi,

In my previous article, I have written about Introduction of CSS and its basics. In continuation of CSS Tutorial series, this post will help you learning about SELECTOR. We will discuss here for beginners so that they can get maximum and understand the basic difference of their types.

Introduction:

In a embedded or External style sheet, the target element is not fix. Basically we write CSS in embedded or External mode so that we can re-use it when required and can modify whole look of page or website by modifying CSS file only. For using multiple CSS values and properties, we need Identifiers which are called Selector in CSS. Just as In case of C we write a function and use it anywhere, the SELECTOR are same. You will understand more by its example. As per CSS Rule, Selector are divided in three types.

HTML Selector:

HTML Selector are part of HTML Tags. They need not to be used at HTML/XHTML syntax. In short we can define style sheet for any of the markup tags which is used in document but we can not create our own selector of this kind. 
Example:
/* HTML Selectors */
 h1
 {
  font-family: Verdana, Calibry, Tahoma;
  color:green; /* You are strictly suggested to use Hexa color code. Ex. #ff0000 etc. */
  font-size:21px;
  text-decoration: bold;
 }
 
 h2
 {
  font-family: Verdana, Calibry, Tahoma;
  color:blue; /* You are strictly suggested to use Hexa color code. Ex. #ff0000 etc. */
  font-size:18px;
  text-decoration: underline;
  text-align:center;
 }
 
 p
 {
 font-family: Verdana, Calibry, Tahoma;
 text-align:justify;
 padding: 4px 4px 4px 4px;
 }

Class Selector:

Class selector are selectors which need to be used  with class tag in HTML or similar tag in various language. These start with period/dot (.) symbol. These can be used unlimited times in documents and need to be defined each time for markup syntax. You are free to choose name of selector.
Example:
 /*  Class Selectors */
 .textBox
 {
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    padding-right: 10px;
    padding-left: 6px;
    padding-top: 2px;
    padding-bottom: 2px;
    font-family: Calibri,Tahoma,Verdana,'Segoe UI';
    border: solid 1px black;
    font-size: 13px;
    text-decoration: none;
    margin-left: 0px;
 }
 
 .button
 {
    font-family: Calibri,Tahoma,'Segoe UI',Verdana, Geneva, 'DejaVu Sans', sans-serif;
    border-top: 1px solid #dec227;
    background: #ffd800;
    background: -webkit-gradient(linear, left top, left bottom, from(#3e779d), to(#65a9d7));
    background: -webkit-linear-gradient(top, #ffd800, #65a9d7);
    background: -moz-linear-gradient(top, #ffd800, #65a9d7);
    background: -ms-linear-gradient(top, #ffd800, #65a9d7);
    background: #ffd800;
    padding: 1px 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    text-shadow: rgba(0,0,0,.4) 0 1px 0;
    -webkit-text-shadow: rgba(0,0,0,.4) 0 1px 0;
    color: white;
    font-size: 13px;    
    text-decoration: none;
    vertical-align: middle;
    height: 27px;
 }

ID Selector:

ID Selector are based upon ID of element. These are initialized with Pound or Hash (#) sign. These can be used only once in a document as the ID of attribute must be unique as per document markup standard. These need not be assigned with attribute but remember, the ID of document element should be same as ID defined in selector. They typography case (lowercase/uppercase) is sensitive here.
Example:
 /* ID Selectors  */
 
 #footer {
    font-family: Calibri,Tahoma,Verdana,'Segoe UI';
    font-size: 15px;
    color: red;
    background-color: #ffd800;
	text-align:center;
}
For you, here is the complete code of HTML Page which is as shown in above screenshot.
<html>
<head>
<title>CSS Stylesheets & Selectors </title>
<style>
/* HTML Selectors */
 h1
 {
  font-family: Verdana, Calibry, Tahoma;
  color:green; /* You are strictly suggested to use Hexa color code. Ex. #ff0000 etc. */
  font-size:21px;
  text-decoration: bold;
 }
 
 h2
 {
  font-family: Verdana, Calibry, Tahoma;
  color:blue; /* You are strictly suggested to use Hexa color code. Ex. #ff0000 etc. */
  font-size:18px;
  text-decoration: underline;
  text-align:center;
 }
 
 p
 {
 font-family: Verdana, Calibry, Tahoma;
 text-align:justify;
 padding: 4px 4px 4px 4px;
 }
 
 
 /*  Class Selectors */
 .textBox
 {
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    padding-right: 10px;
    padding-left: 6px;
    padding-top: 2px;
    padding-bottom: 2px;
    font-family: Calibri,Tahoma,Verdana,'Segoe UI';
    border: solid 1px black;
    font-size: 13px;
    text-decoration: none;
    margin-left: 0px;
 }
 
 .button
 {
    font-family: Calibri,Tahoma,'Segoe UI',Verdana, Geneva, 'DejaVu Sans', sans-serif;
    border-top: 1px solid #dec227;
    background: #ffd800;
    background: -webkit-gradient(linear, left top, left bottom, from(#3e779d), to(#65a9d7));
    background: -webkit-linear-gradient(top, #ffd800, #65a9d7);
    background: -moz-linear-gradient(top, #ffd800, #65a9d7);
    background: -ms-linear-gradient(top, #ffd800, #65a9d7);
    background: #ffd800;
    padding: 1px 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    text-shadow: rgba(0,0,0,.4) 0 1px 0;
    -webkit-text-shadow: rgba(0,0,0,.4) 0 1px 0;
    color: white;
    font-size: 13px;    
    text-decoration: none;
    vertical-align: middle;
    height: 27px;
 }
 
 /* ID Selectors  */
 
 #footer {
    font-family: Calibri,Tahoma,Verdana,'Segoe UI';
    font-size: 15px;
    color: red;
    background-color: #ffd800;
	text-align:center;
}
</style>
</head>
<body>
<H1>Types of Selectors in CSS</H1>
<p>In this topic we will be discussing about different types of Selectors in CSS (Cascaded Style Sheets). You will learn about all kind of selectors with examples at the last of this post.</p>
<h2>1. HTML Selector</h2>
<p>As on this line, we did not applied any of stylesheet tags (class or ID). But you will see the changes in style of H1 , H2 and P tag. These are HTML Tags and automatically used by HTTP Web server as they are present in stylesheet.<p>
<h2>2. Class Selectors</h2>
<input type="text" class="textBox" name="FirstName" value="Enter your first Name." />
<input type="button" class="button" name="Submit" value="Click to Submit" />
<p>In above two lines we used class="textbox" and class="button". As in above stylesheet we have created them with period (.) and used with class attribute of HTML element, so these are called Class selectors.</p>
<h2>3. ID Selector</h2>
<p>We will be applying these settings in last of this webpage where we will write footer.</p>
<div id="footer">All Rights are reserved.</div>
</body>
</html>
Thanks for reading. I will be back with another article in CSS series. Your suggestions or feedback are expected and play great role in our development. Keep reading, writing & sharing.
John Bhatt
Read More

Saturday, May 3, 2014

// // Leave a Comment

CSS - Cascaded Style Sheets : Part 1

Hi,

This time, as we did in beginning for HTML, I am back with CSS Tutorial. This post will contain all information about Cascaded Style Sheets, commonly known as CSS.

Introduction:

CSS is used to decorate HTML elements. This is developed by W3C, Bert Bos, Hakon Wium Lie. In other words it is a scripting language written in any text editor that is used to describe look and formatting of hypertext document. However this is present in all kinds of documents that are written in any markup languages including HTML. Latest version is CSS 4 which is in early stage in current days. CSS Statement is divided in 3 parts in simple.
This is written between STYLE tags or with STYLE attribute if any HTML Keyword. Style tag is container/closed tag of HTML.

Example

text-align : left ;

Property: These are fixed set of keywords which define property of element. In above example text-align is property.
Separator: This separates property and value and always presented by : (colon).
Value: This is the value to property. In above case left is the value of property text-align.

Using Method:

Based on using method, CSS is classified in two parts. One is Internal and other External.
  1. Internal: In this method, we write all CSS markup inside the same file where it is applied. This is also done in two methods. 
    • Inline CSS: In this method, CSS is written inside the HTML or XHTML statement using STYLE tag. 
    • Block CSS: In this method, we write CSS code in HEAD section of HTML document between STYLE tag.
  2. External: In this method, we write all CSS markup in another file and insert reference to the file in required HTML file using LINK tag.
    Example:
     <link href="path/to/file.css" rel="stylesheet">
Apart from this, we have another term in CSS which is called SELECTOR.
Selector are simply collection of CSS attributes and their value. Selectors are used in HTML using CLASS or ID or with HTML tag. So further CSS Selector are divided in 3 parts.
We will discuss about all kind of CSS Selector in another post. Before this let me show you an example of CSS used in all methods.

<html>
<head>
<title>Introduction to CSS</title>
<style type="text/css">
h1
{
    font-family: Calibri,Tahoma,Verdana, Geneva, 'DejaVu Sans', sans-serif;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
}
</style>

<link href="styles/main.css" rel="stylesheet" />

</head>
<body>
<h1>Introduction to CSS</h1>
<p style="text-align: justify;">This is random text in paragraph.Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document. To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. For example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries. Themes and styles also help keep your document coordinated. When you click Design and choose a new Theme, the pictures, charts, and SmartArt graphics change to match your new theme. When you apply styles, your headings change to match the new theme. Save time in Word with new buttons that show up where you need them. To change the way a picture fits in your document, click it and a button for layout options appears next to it. When you work on a table, click where you want to add a row or a column, and then click the plus sign. Reading is easier, too, in the new Reading view. You can collapse parts of the document and focus on the text you want. If you need to stop reading before you reach the end, Word remembers where you left off - even on another device.</p>
</body>
</html>

Keep reading for next part.
John Bhatt
Read More

Friday, May 2, 2014

// // Leave a Comment

Problem Opening Office Documents

Hi,
Today I want to tell you about a common problem that you must have faced if you are still using MS Office 2003. When you tried to open the document created by Ms Office 2007, 2010 or 2013 by default this is in different extension and shows error while opening in lower version. To escape from this problem you either have to uninstall your MS Office package and upgrade to higher version (at least MS office 2007) or Ask the author of file to send a compatible file in Office 1997-2003 version.

But here is a best way that you can try without any cost and without any request.To open all types of Office Documents that are of created with higher versions of MS Office, you can download Office Converter. Microsoft has published it as Compatibility Pack for 2007 Office System.

You may follow the link to downnload Microsoft Office Document Converter.
Steps:

  • Save Downloaded file to disk.
  • When download completes, run the executable file.
  • Proceed to installation.
  • When complete, reboot your system.
This will install all rendering engine in your Office 2003 and you can open your existing files as well as files with newer version.


+John Bhatt

Read More

Wednesday, April 23, 2014

// // Leave a Comment

Twitter Updated its Layout

Hi,

If you are using Twitter, here is a good news for you all. Now twitter has updated its layout and made similar as Older Facebook layout. It has 3 columns and based in your screen resolution, it reduce to 2 column.
Some of the new features are as below.
Big Profile Photo
Bigger Header Image

Feature to Filter Tweets
When you Joined Twitter
Bigger notification for Followers profile
Ability to Pin Ability

Custom size for Tweets according to their popularity
There are a lot of new features also available. You are requested to visit and check yourself.
Reference: Aakarpost
Thanks for reading. Please provide feedback and comments and do not forget to share.
+John Bhatt 
Read More
// // Leave a Comment

Running DOS or C/C++ in Full Screen in Windows 7 or 8

Hi,

If you are a developer, of learning programming languages, you must have to deal with Turbo C/C++ compiler. On the early days of Learning, we have used Windows XP which have ability to run Command Prompt (MS DOS) in full screen mode. But Microsoft has ended support to Windows XP and released 4 new operating system after Windows XP. The major change in newer versions is that, they do not support MS DOS in full screen mode.

Now the requirement is, if you have to work on C/C++ application, you have to work in minimized screen. To make it full screen, we have an application named DOSBox, which is open-source and cross platform.
Below is step by step guide to install and configure DOSBox.

  • Download and Install DOSBox from http://www.dosbox.com/download.php?main=1.
  • After installing open DOSBox from menu.
  • You will see following screen.
  • Type following command to load Turbo C compiler in DOSBox.
    MOUNT C C:\TC ⏎
    C: ⏎
    CD BIN ⏎
    TC ⏎
    

Description of Code:

Line 1: MOUNT C C:\TC : Mounts C:\TC (where Turbo C is located) as C Drive. You can choose any drive that exists in your system. This will not effect your existing files.
Line 2: C: : Navigated to C Drive.
Line 3: CD BIN Navigated to Folder BIN normally as we do in MS - DOS.
Line 4: TC Run the Turbo C/C++ Compiler IDE located inside BIN folder.


Lets make it full screen.
Do not forget to change the Directory options from Options menu so that Include directories work fine.
If you find this article helpful, do share with your friends. If you have any suggestions or comments, let us know. We will read and improve ourselves.
John Bhatt
Read More

Wednesday, March 26, 2014

// // Leave a Comment

Microsoft Excel : Text Functions Part -3

Hi,

In previous post we have talked about some of the Text functions in detail. We will continue this post from where we left.

If you have not read previous posts, this post might be some confusing to you. I will request you to read these posts before proceeding.

Text Functions in Microsoft Excel Part -1

Text Functions in Microsoft Excel Part –2

Directly moving ahead to function details and their use.

9. FIXED()

Introduction: FIXED function Rounds a number to the specified number of decimals, formats the number in decimal format using a period and commas, and returns the result as text.
Using Method: This function takes minimum of one and maximum of 3 parameters. First one is Number, this can be any number value or reference to a cell. Second is the decimals , for rounding. Last one is a Boolean option for keeping period separator or not.

=FIXED(139493.4532,2) or =FIXED(A1,-1,TRUE)

Example:

FIXED

NOTE: Difference between ROUND function and FIXED function is, FIXED converts number to text after rounding but ROUND keep number to number after rounding.

10. LEFT()

Introduction: LEFT function returns specified number of characters from start based in start number (length) in a string.

Using Method: This function takes two parameters. First one is text to be searched, this can be simple string value or reference to a cell. Second is the number of characters to start.
=LEFT("Hello World",6) or =LEFT(A1,6)

Example:

LEFT

11. LEN()

Introduction: LEN function returns number of characters in a string. In simple words, it returns the length of a string.

Using Method: This function takes single parameter and that is of type string or reference to a cell.

=LEN(“Hello World”) or =LEN(A1)

Example:

 LEN

12. LOWER()

Introduction: LOWER function converts all characters in a string to lower case.
Using Method: This function takes a single parameter and that is of type string or reference to a cell.

=LOWER(“Hello World”) or =LOWER(A1)

Example:

LOWER 

13. MID()

Introduction: MID function returns the middle characters from a string specified by start number and length.
Using Method: This function takes three parameters. One is text which is required, another is Start number to search from and another is number of character to show or length to be picked.
=MID(“John is from Nepal”,9,10) or =MID(A1,9,10)

Example:

 MID

14. PROPER()

Introduction: PROPER function converts all characters and words to Title case as per English Grammar. Means all the beginning character of all words are in capital letter and other are in small letter regardless of their typography.
Using Method: This function takes a single parameter and that is text string or reference to cell .

=PROPER(“this is going to BE CHANGED in title”) or =PROPER(A1)

Example:

PROPER 

15. REPLACE()

Introduction: REPLACE function replaces a part of string with specified string.
Using Method: This function takes four parameters, First one is text to be replaced, then starting number of character where replace to be started, then number of character to replace (length), and final one is new text.
=REPLACE(A1,6,3,”was ”) or =REPLACE(A1,6,3,C1)

Example:

 REPLACE

16. RIGHT()

Introduction: RIGHT function does the exactly same work as LEFT do but from opposite index. This returns the text from end of an string based on the length passed by user.
Using Method: This function takes two parameters and both are required. First one is string or reference to cell containing text and another is number of character to be shown.
=RIGHT(“The last five words”,5) or =RIGHT(A1,5)

Example:

 RIGHT 

I will be back with remaining text function in another post. Thanks for reading.

You can provide feedback using comments or contact page.

John Bhatt

Read More

Wednesday, March 12, 2014

// // Leave a Comment

Print GridView only in ASP.NET

Hi,

Lets come back to ASP.NET tips and trick series. We are once again going to learn new trick related to GridView. Previously I have posted following articles related to GridView.

Requirement

Suppose, you have a page where you are displaying any kind of data to user. You want to add a functionality to print these records. But problem with Browsers Default Print options (Ctrl+P) is that, it will print whole page. All header images, footer, sidebar and colors will printed, which is not required. You have two options, either create a new page for print view and redirect user to that page or just print the required area, in our case it is GridView. 
Most of developer working in a web applications have MasterPage for their web-application. MasterPage are similar to templates in normal HTML having some advanced functionality and customized code for maintaining easier and common look of website or application.
Lets have a look at below screen to make our requirement more clear.

Code for Default.aspx

This is the code for GridView.
   <asp:GridView runat="server" ID="gvProducts" AutoGenerateColumns="false" AllowPaging="false" AlternatingRowStyle-BackColor="Linen" HeaderStyle-BackColor="SkyBlue" Width="100%" OnPageIndexChanging="gvProducts_PageIndexChanging" EmptyDataText="Sorry! No Products to List. First Add from Add Product Link.">
                    <Columns>
                        <asp:TemplateField HeaderText="Product ID">
                            <ItemTemplate>
                                <asp:Label ID="lblProductID" runat="server" Text='<%#Eval("ProductID")%>' ToolTip="ID of Product as stored in Database."></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <Columns>
                        <asp:TemplateField HeaderText="Product Name">
                            <ItemTemplate>
                                <asp:Label ID="lblProductName" runat="server" ToolTip="Name of Product" Text='<%#Eval("ProductName")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <Columns>
                        <asp:TemplateField HeaderText="Brand">
                            <ItemTemplate>
                                <asp:Label ID="lblBrandName" runat="server" ToolTip="Brand of Product" Text='<%#Eval("BrandName")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <Columns>
                        <asp:TemplateField HeaderText="Category">
                            <ItemTemplate>
                                <asp:Label ID="lblProductCat" runat="server" ToolTip="Category of Product" Text='<%#Eval("CategoryName")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <Columns>
                        <asp:TemplateField HeaderText="In Stock">
                            <ItemTemplate>
                                <asp:Label ID="lblProductinStock" runat="server" ToolTip="Quantity available in Stock"
                                    Text='<%#Eval("UnitsInStock")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>

Code for Default.aspx.cs

We do not have much more at backend, we are just going to bind data to GridView.
 protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConToStore"].ConnectionString);
            SqlDataAdapter adp = new SqlDataAdapter("Select * from Products,Brands,Category where Products.BrandID=Brands.BrandID and Products.CategoryID=Category.CategoryID", con);
            DataSet ds = new DataSet();
            adp.Fill(ds);
            gvProducts.DataSource = ds.Tables[0];
            gvProducts.DataBind();
        }
    }

Printing Page.

Lets press Ctrl+P key combination to print page, before printing see the Preview.

Printing GridView Only

We need to make following change to print GridView only. Lets start with HTML.
Wrap the GridView inside a Table or Panel. I am using Table. You can also go with Panel.
  <table width="70%" id="pnlGridView" runat="server" align="center" class="ContentTable">
        <tr>
            <td colspan="2" align="center">
                <h1>All Products in Store</h1>
            </td>
        </tr>
        <tr>
            <td> </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:GridView runat="server" ID="gvProducts" AutoGenerateColumns="false" AllowPaging="false" 
    AlternatingRowStyle-BackColor="Linen" HeaderStyle-BackColor="SkyBlue" Width="100%" 
    OnPageIndexChanging="gvProducts_PageIndexChanging" 
    EmptyDataText="Sorry! No Products to List. First Add from Add Product Link.">
                    ...............
     .............
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:LinkButton ID="lnkPrint" runat="server" ToolTip="Click to Print All Records" Text="Print Data" OnClick="lnkPrint_Click"></asp:LinkButton>     
                <asp:LinkButton ID="lnkExportAll" runat="server" ToolTip="Export this List" Text="Export to Excel" OnClick="lnkExportAll_Click"></asp:LinkButton>
                     
                <asp:LinkButton ID="lnkAddNew" runat="server" ToolTip="Add New Product"
                    Text="Add New" OnClick="lnkAddNew_Click"></asp:LinkButton>
            </td>
        </tr>
    </table>
Now just add following JavaScript function in head section and assign that function to Print linkbutton.
    <script language="javascript" type="text/javascript">
        function PrintPage() {
            var printContent = document.getElementById('<%= pnlGridView.ClientID %>');
            var printWindow = window.open("All Records", "Print Panel", 'left=50000,top=50000,width=0,height=0');
            printWindow.document.write(printContent.innerHTML);
            printWindow.document.close();
            printWindow.focus();
            printWindow.print();
        }
    </script>
Now lets click on Print Link button which we have created. Following will be output for above code.

Bingo! It was the requirement.
Hope you enjoyed reading. If you have any feedback or suggestions, please send us as comment or using contact options. Keep sharing.
John Bhatt
Read More