Posts

Showing posts from 2014

Creating a new application pool in IIS

Image
If you see only two application pools and both of them are set to the .NET Framework 2.0, you have to install ASP.NET 4 in IIS:     Open a command prompt window by right-clicking Command Prompt in the Windows Start menu and selecting Run as Administrator. Then run aspnet_regiis.exe to install ASP.NET 4 in IIS, using the following commands. (In 64-bit systems, replace "Framework" with "Framework64".)     cd %windir%\Microsoft.NET\Framework\v4.0.30319     aspnet_regiis.exe –iru     aspnet_regiis_installing_ASP.NET_4     This command creates new application pools for the .NET Framework 4, but the default application pool will still be set to 2.0. You'll be deploying an application that targets .NET 4 to that application pool, so you have to change the application pool to .NET 4. If you closed IIS Manager, run it again, expand the server node, and click Application Pools to display the Application Pools pane again. Content Copied from asp.net site. Details ca

What is the difference between ExecuteScalar, ExecuteReader and ExecuteNonQuery?

ExecuteReader: Used for any result which returns multiple rows / columns. Mostly used for select statements. ExecuteScalar: Used for any result which return only single value. if it returns more that 1 row/column, then the result is the first column of the first row. Mostly used in aggregate functions like sum, avg etc. ExecuteNonQuery: Used in queries which does not return any data. Mostly used with Delete, Update, Insert queries.

What is the point of using abstract methods?

Say you have a three printers that you would need to write a driver for, Lexmark , Canon , and HP . All three printers will have the print() and getSystemResource() methods. However, only print() will be different for each printer. getSystemResource() remains the same throughout the three printers. You also have another concern, you would like to apply polymorphism. So since getSystemResource() is the same for all three printers, so this can be pushed up to the super class to be implemented, in Java, this can be done via making this abstract in the super class, and in making a method abstract in a super class, the class itself needs to be abstract as well. public abstract class Printer { public void getSystemResource (){ // real implementation of getting system resources } public abstract void print (); } public class Canon extends Printer { public void print (){ // here you will provide the implementation of p

Wordpress widgets not saving?

Sometimes in word press you can face a scenario where you are not able to save widgets items. I face the same problem where i wasnt able to save a "text" widget. After spending few hours on google i found the solution, which helped me to resolve the issue. I am copying down the solution which worked for me Go to Appearence --> Widgets Then at the top right of the screen you should see a tab that says Screen Options. Click on that, then a link will appear in the top left of your screen that says ‘Enable Accessibility Mode’ and click on that and give it a try. Try to save a widget now. This solution worked perfectly for me, there are few other solutions too which are covered on this blog. If there is any question please feel free to ask on twitter. Thanks

Yahoo Emails/mails Going to Trash, Yahoo No Email in Inbox/Sent

Image
Hi. Today i came across to a shocking situation when one of my friend's yahoo inbox/sent item everything was empty. Also The emails were not sending and  the receiving emails were moving to trash. So i thought to write a blog about it to Help everyone. First thing to do is go to your Account Info, Enter your password 2nd Change your password and also check your RESET INFO. And also open UPDATE YOUR CONTACT INFORMATION. And Check for all emails address. If you don't know any remove it  and also add your Cell number and save it. =============================================================== The above part was how to secure the compromised email. Now the Below part is how to fix all the changing made by hacker. Go back to your mail panel and click on that Gear button and click on Settings and go to Accounts . And click on Edit . If there is any Reply to Address remove it. And if the radio button is on FORWARD change it to POP.  And Click on Save and Save. F

IIS w3svc error

Problem Statement: I am trying to start my website in IIS, whenever i try to start my website i get the following error "Cannot start service w3svc on computer" I tried to start "World wide web publishing service", but i wasnt able to start it as it said "Error 1068: The dependency service or group failed to start". Meanwhile when i checked my log i found this error, "The World Wide Web Publishing Service service depends on the HTTP service which failed to start because of the following error: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it." Please help me, i am badly caught with this error, i hhave spent a week researching this error but havnt found a solution yet. Solution: Well finally after a week struggle, i came to a solution. I am listing down the steps which i followed to solve my error 1- Confirm that "Windows Management Instrumentation"

#2006 MySQL Server has gone away error in Wamp

Error Description: Im using wamp / xamp server . When i try to import a sql file, either through MySQL Query Browser or PHPMyAdmin,i get the following error. Error 2006 : MySQL Server has gone away .   Solution: You need to change max_allowed_packet, and the error will be fixed. File Path: This configuration file is located at «XAMPP install directory, this is C:\XAMPP by default» \mysql\bin\my.ini . # note the change has to be made at this section [ mysqld ] port = 3306 socket = "/xampp/mysql/mysql.sock" basedir = "/xampp/mysql" tmpdir = "/xampp/tmp" datadir = "/xampp/mysql/data" skip-locking key_buffer = 16 M # it was 1 M by default max_allowed_packet = 2 M table_cache = 64 sort_buffer_size = 512 K net_buffer_length = 8 K read_buffer_size = 256 K read_rnd_buffer_size = 512 K myisam_sort_buffer_size = 8 M        

What does a "Great Software" means?

Answer for this question varies from person to person, for a client or a user a great software should always does what is supposed to be, it should complete all the processes without being cracked and produce expected results. For a programmer point of view a great software is one which is strictly following object oriented principals, there is no duplicate code and each object is controlling its behavior. I tried to give you just an idea about a great software, what does great software means to you, please write it down in comments.