Saturday, 10 November 2012

Problem with godaddy purchase.

Today i faced a great trouble when i purchase a plan in godaddy. I want to host some website so i went to godaddy.in and i follow their step by step rule to checkout the package.
My plan was unlimited Linux hosting. It costs around 5399INR. I completed all steps successfully and money is successfully transferred from my bank account. But i was confused, how can i logging to my control panel?
while following the steps, they never asked username or password. I just checked my email, yeah!! i got a mail from goddady about my credential. I wondered, username is my friends name... :-o I called him, and i knew that
he used my machine one week ago, so godday site added my purchase to his account... what a  great system?? I think i lost my money.. I just called to their support.. a lady answered. She could understand my problem and she told me to cancel my package, so that they can
refund my money back. My friend was very broad minded, even though his server contains lot of confidential files, he gave his username, password and pin. I signed in to his account and removed my new purchase from that account and followed the steps as per the executive said.

At last they told me that money will reach my account through my credit card with in 6-7 working days. I wondered i don't have a credit card. :-( . she replied that have no facility to send money back through net banking.. :( now a days small mobile recharging portal have that facility. They will refund even 10 rupees to 1000 or more.
then what is the solution??hmm she told me that they will send a cheque to my billing address, this may take 4-6 weeks (OMG, 4-6 weeks or months... no wonder...)

But she didn't forget to add removed order to my new account, she told me to continue with purchase... but my remaining balance was 80rupees... how can i purchase.. she gave a smile.. that hurts me :(
anyway i am waiting for my cheque.

Tuesday, 23 October 2012

Create your first helloworld in Codeigniter

Now lets learn how to make a helloworld application in codeigniter.

Download codeigniter-> extract it->rename to "test" so now "test" is your application name. You are going to access your application like
http://localhost/test

open test folder you can find another folder called application.

inside application folder there are lot of other folders and we ned to take care about four folders
1. Controller
2. Model
3. View
4. Config

open a notepad
<?php
  echo "helloworld";
?>

save it as hello.php in view folder.
open view folder (application/view)

open controller folder, you can find a welcome controller file just copy and paste it in same folder and rename it to hello.php
now open that hello.php,

change class name from "welcome" to "Hello" there is one more change
$this->load->view("hello")
so our first hello.php will be loaded.

Now save everything and open a browser
http://localhost/test/index.php/hello

will print "helloworld"

:)

Tuesday, 25 September 2012

Code Igniter :- Step by step tutoral

Step 1. Download Codeigniter. click here or copy and paste the url in browser tab.
            http://codeigniter.com/downloads/
Step 2. extract and rename the folder to the name you want to give. if you want to call / access your application like http://localhost/cms then rename the folder to cms

Step 3. Copy the cms folder to WAMP's www folder
Step 4. Start WAMP and hit url in browser (http://localhost/cms)
Thus we completed the initial steps.

How to print Query in codeigniter

Sometimes we will not get expected results after a DB operation. CodeIgniter provides a feature to print the query statement. statement of last executed query. we can manually check and find the error

                                           $this->db->last_query();                                                                          

using echo you can print the query.

Wednesday, 19 September 2012

Difference between innoDB & MyISAM


innoDB MyISAM
innoDB support transactions, so that if something went wrong, we can roll back the transaction MyISAM is not meant for transactional purpose. Once command issued we cannot rollback the transaction
innoDB doesn't support full support text searching MyISAM support full text searching
innoDB do row locking MyISAM do table locking
innoDB maintain ACID MyISAM doesn't
innoDB can use with table having many data modification MyISAM doesn't recommended
innoDB for high volume & High performance MyISAM not recommended

Friday, 14 September 2012

Wamp Installation Error

“Aestan Tray Menu has encountered a problem and needs to close. We are sorry for the inconvenience.” This is a common error, familiar for wamp admins. Once I have met with this error and i tried several methods to solve it, but everything got failed. Finally i found the solution.

The Problem is your windows machine may not have proper/latest dotNet framework. I downloaded it and installed framework and reinstalled WAMP. Wamp loaded fine. 

Link: http://www.microsoft.com/en-us/download/details.aspx?id=21
Before Installing WAMP make sure that you uninstalled old versions.


Tuesday, 11 September 2012

How to Upload bulk user in moodle

Moodle allows bulk user management. You can upload and manage users.
 Create a new course in moodle.
goto Site Administration -> Users -> Account -> upload users

Click on upload user

Now we need to prepare CSV file. Open a notepad type as shown in figure. Save it filename.csv
then upload it.
Here CF100 is the course code.  Click upload button and you will reach this page


Click on upload user button at the bottom of the page. Hence you completed the  bulk user uploading
 

Monday, 10 September 2012

Moodle a Free online course management system

Moodle is one of the major online course management tool available in internet. This is a free software with almost all features of a professional course management system. You can download moodle from here.
Click here to Download. Moodle allows lot of features like
  1.  Site Management
  2. User Management
  3. Course Management
  4. Great Support
Site Management
Site can be managed by an administrator. There are lot of plugins & templates (themes) are available for Moodle

User Management
This includes
 1. Enrollment
 2. Roles
 You can add user by one by one and you have lot of options for managing the user. Bulk uploading feature allows you to upload list of users at a time.

Course Management
 This is the most important module of moodle. This module help the tutor to effectively manage his course and share it with his participants. Course management has following advantages
  1. Course Reports
  2. Assignment Module
  3. Chat Module
  4. Choice Module
  5. Forum Module
  6. Glossary Module
  7. Lesson Module
  8. Quiz Module
  9. Resource Module
  10. Survey Module
  11. Wiki Module
  12. Workshop Module

Support 

Moodle has a great community & organisations for its support.

1. Forum
2. User Forum
3. Social Forum

From the next posts we can learn how we can efficiently & effectively use Moodle.

Sunday, 9 September 2012

How to increase menu speed in windows?

We can increase Menu speed in windows machines (XP) by altering some values in registry.
For that open regedit
Start ->run and type regedit
Goto

HKEY_CURRENT_USER\Control Panel\Desktop
 
Locate the key called "MenuShowDelay" and it is probably set to 400.

Change that value to 150.
 
Restart PC
 
 

How to set a website as your home page in IE

There are lot of ways to set default homepage. To change home page in IE we can do the following procedure

Tools -> Internet Options
From the popup choose General Tab and here you can set it

Now lets learn how to make a default home page in IE. For that we have to make some registry files.  This tutorial also give an awareness to make registry files.

Here I am going to set google as my default home page.

CODE
REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"Search Page"="http://www.google.com"
"Search Bar"="http://www.google.com/ie"

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchURL]
""="http://www.google.com/keyword/%s"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Search]
"SearchAssistant"="http://www.google.com/ie"


Copy the whole text to a notepad and give a suitable name. please note that the extension should be
.reg
Then double click and import the library to registry. It will work!!
 

Tuesday, 4 September 2012

Keyboard Shorcuts (Microsoft Windows)

Hundreds  of shortcut that can prove your proficiency in front of your fiends and colleagues.
 
 Keyboard Shorcuts (Microsoft Windows)
1. CTRL+C (Copy)
2. CTRL+X (Cut)
... 3. CTRL+V (Paste)
4. CTRL+Z (Undo)
5. DELETE (Delete)
6. SHIFT+DELETE (Delete the selected item permanently without placing the item in the Recycle Bin)
7. CTRL while dragging an item (Copy the selected item)
8. CTRL+SHIFT while dragging an item (Create a shortcut to the selected item)
9. F2 key (Rename the selected item)
10. CTRL+RIGHT ARROW (Move the insertion point to the beginning of the next word)
11. CTRL+LEFT ARROW (Move the insertion point to the beginning of the previous word)
12. CTRL+DOWN ARROW (Move the insertion point to the beginning of the next paragraph)
13. CTRL+UP ARROW (Move the insertion point to the beginning of the previous paragraph)
14. CTRL+SHIFT with any of the arrow keys (Highlight a block of text)
SHIFT with any of the arrow keys (Select more than one item in a window or on the desktop, or select text in a document)
15. CTRL+A (Select all)
16. F3 key (Search for a file or a folder)
17. ALT+ENTER (View the properties for the selected item)
18. ALT+F4 (Close the active item, or quit the active program)
19. ALT+ENTER (Display the properties of the selected object)
20. ALT+SPACEBAR (Open the shortcut menu for the active window)
21. CTRL+F4 (Close the active document in programs that enable you to have multiple documents opensimultaneou sly)
22. ALT+TAB (Switch between the open items)
23. ALT+ESC (Cycle through items in the order that they had been opened)
24. F6 key (Cycle through the screen elements in a window or on the desktop)
25. F4 key (Display the Address bar list in My Computer or Windows Explorer)
26. SHIFT+F10 (Display the shortcut menu for the selected item)
27. ALT+SPACEBAR (Display the System menu for the active window)
28. CTRL+ESC (Display the Start menu)
29. ALT+Underlined letter in a menu name (Display the corresponding menu) Underlined letter in a command name on an open menu (Perform the corresponding command)
30. F10 key (Activate the menu bar in the active program)
31. RIGHT ARROW (Open the next menu to the right, or open a submenu)
32. LEFT ARROW (Open the next menu to the left, or close a submenu)
33. F5 key (Update the active window)
34. BACKSPACE (View the folder onelevel up in My Computer or Windows Explorer)
35. ESC (Cancel the current task)
36. SHIFT when you insert a CD-ROMinto the CD-ROM drive (Prevent the CD-ROM from automatically playing)
Dialog Box - Keyboard Shortcuts
1. CTRL+TAB (Move forward through the tabs)
2. CTRL+SHIFT+TAB (Move backward through the tabs)
3. TAB (Move forward through the options)
4. SHIFT+TAB (Move backward through the options)
5. ALT+Underlined letter (Perform the corresponding command or select the corresponding option)
6. ENTER (Perform the command for the active option or button)
7. SPACEBAR (Select or clear the check box if the active option is a check box)
8. Arrow keys (Select a button if the active option is a group of option buttons)
9. F1 key (Display Help)
10. F4 key (Display the items in the active list)
11. BACKSPACE (Open a folder one level up if a folder is selected in the Save As or Open dialog box)

Microsoft Natural Keyboard Shortcuts
1. Windows Logo (Display or hide the Start menu)
2. Windows Logo+BREAK (Display the System Properties dialog box)
3. Windows Logo+D (Display the desktop)
4. Windows Logo+M (Minimize all of the windows)
5. Windows Logo+SHIFT+M (Restorethe minimized windows)
6. Windows Logo+E (Open My Computer)
7. Windows Logo+F (Search for a file or a folder)
8. CTRL+Windows Logo+F (Search for computers)
9. Windows Logo+F1 (Display Windows Help)
10. Windows Logo+ L (Lock the keyboard)
11. Windows Logo+R (Open the Run dialog box)
12. Windows Logo+U (Open Utility Manager)
13. Accessibility Keyboard Shortcuts
14. Right SHIFT for eight seconds (Switch FilterKeys either on or off)
15. Left ALT+left SHIFT+PRINT SCREEN (Switch High Contrast either on or off)
16. Left ALT+left SHIFT+NUM LOCK (Switch the MouseKeys either on or off)
17. SHIFT five times (Switch the StickyKeys either on or off)
18. NUM LOCK for five seconds (Switch the ToggleKeys either on or off)
19. Windows Logo +U (Open Utility Manager)
20. Windows Explorer Keyboard Shortcuts
21. END (Display the bottom of the active window)
22. HOME (Display the top of the active window)
23. NUM LOCK+Asterisk sign (*) (Display all of the subfolders that are under the selected folder)
24. NUM LOCK+Plus sign (+) (Display the contents of the selected folder)
25. NUM LOCK+Minus sign (-) (Collapse the selected folder)
26. LEFT ARROW (Collapse the current selection if it is expanded, or select the parent folder)
27. RIGHT ARROW (Display the current selection if it is collapsed, or select the first subfolder)
Shortcut Keys for Character Map
After you double-click a character on the grid of characters, you can move through the grid by using the keyboard shortcuts:
1. RIGHT ARROW (Move to the rightor to the beginning of the next line)
2. LEFT ARROW (Move to the left orto the end of the previous line)
3. UP ARROW (Move up one row)
4. DOWN ARROW (Move down one row)
5. PAGE UP (Move up one screen at a time)
6. PAGE DOWN (Move down one screen at a time)
7. HOME (Move to the beginning of the line)
8. END (Move to the end of the line)
9. CTRL+HOME (Move to the first character)
10. CTRL+END (Move to the last character)
11. SPACEBAR (Switch between Enlarged and Normal mode when a character is selected)
Microsoft Management Console (MMC)
Main Window Keyboard Shortcuts
1. CTRL+O (Open a saved console)
2. CTRL+N (Open a new console)
3. CTRL+S (Save the open console)
4. CTRL+M (Add or remove a console item)
5. CTRL+W (Open a new window)
6. F5 key (Update the content of all console windows)
7. ALT+SPACEBAR (Display the MMC window menu)
8. ALT+F4 (Close the console)
9. ALT+A (Display the Action menu)
10. ALT+V (Display the View menu)
11. ALT+F (Display the File menu)
12. ALT+O (Display the Favorites menu)

MMC Console Window Keyboard Shortcuts
1. CTRL+P (Print the current page or active pane)
2. ALT+Minus sign (-) (Display the window menu for the active console window)
3. SHIFT+F10 (Display the Action shortcut menu for the selected item)
4. F1 key (Open the Help topic, if any, for the selected item)
5. F5 key (Update the content of all console windows)
6. CTRL+F10 (Maximize the active console window)
7. CTRL+F5 (Restore the active console window)
8. ALT+ENTER (Display the Properties dialog box, if any, for theselected item)
9. F2 key (Rename the selected item)
10. CTRL+F4 (Close the active console window. When a console has only one console window, this shortcut closes the console)
Remote Desktop Connection Navigation
1. CTRL+ALT+END (Open the Microsoft Windows NT Security dialog box)
2. ALT+PAGE UP (Switch between programs from left to right)
3. ALT+PAGE DOWN (Switch between programs from right to left)
4. ALT+INSERT (Cycle through the programs in most recently used order)
5. ALT+HOME (Display the Start menu)
6. CTRL+ALT+BREAK (Switch the client computer between a window and a full screen)
7. ALT+DELETE (Display the Windows menu)
8. CTRL+ALT+Minus sign (-) (Place a snapshot of the active window in the client on the Terminal server clipboard and provide the same functionality as pressing PRINT SCREEN on a local computer.)
9. CTRL+ALT+Plus sign (+) (Place asnapshot of the entire client window area on the Terminal server clipboardand provide the same functionality aspressing ALT+PRINT SCREEN on a local computer.)

Microsoft Internet Explorer Keyboard Shortcuts
1. CTRL+B (Open the Organize Favorites dialog box)
2. CTRL+E (Open the Search bar)
3. CTRL+F (Start the Find utility)
4. CTRL+H (Open the History bar)
5. CTRL+I (Open the Favorites bar)
6. CTRL+L (Open the Open dialog box)
7. CTRL+N (Start another instance of the browser with the same Web address)
8. CTRL+O (Open the Open dialog box,the same as CTRL+L)
9. CTRL+P (Open the Print dialog box)
10. CTRL+R (Update the current Web page

Friday, 10 August 2012

How to take values associated with radio buttons & Check box in PHP

There is a big confusion in some freshers that how to take  values associated with radio button as well as check box in PHP. Here is the piece of code that helps to do so.

cricket <input type='radio' name='radio' id='radio1' value='cricket' />
football <input type='radio' name='radio' id='radio2' value='football' />
tennis <input type='radio' name='radio' id='radio3' value='tennis' />

Don't forget to add values attribute in input tag

Now lets look how to take values in php

<?php
    $val = $_POST['radio'];
    echo $val;
?>

this code will print the opted input radio.

similarly for check box

cricket <input type='checkbox' name='check[]' id='check1' value='cricket' />
football <input type='checkbox' name='check[]' id='check2' value='football' />
tennis <input type='checkbox' name='check[]' id='check3' value='tennis' />

here also we can have above piece of code. But if you choose cricket and football you will get it as an array
 so you can have

$var = implode(",",$_POST['check']);
echo $var

this will print cricket,football
 

New computer virus for hacking financial transactions.

kaspersky Labs detects a new virus which hacks financial transactions. This is a spy software which sends our activities in social networking sites and Emails.This virus is called as "Gauss" and it can attack basic computer functionality.  According to Kaspersky's invention the founder of new virus is same lab which made Stuxnet to attack Iran's Nuclear plan. Gauss virus has been affected by personal computers in the regions like Lebanon, Palestine etc..

Thursday, 9 August 2012

IBM Great Mind Challenge

IBM (International Business machine ) which was founded in 1896 conducting The Great Mind Challenge (TGMC) is an annual nationwide software development competition, created by the Academic Initiative of IBM, Now it is actively conducting in India.

College Students can join this competition, who form teams within their respective colleges. There are lot of prizes as well as fortunes for those who win the competition. TGMC has been awarded the Limca Book of Records for the largest competition for engineering students.

website to register: http://www-07.ibm.com/in/university/greatmind/tgmc.html

TGMC Archive: http://www-07.ibm.com/in/university/greatmind/tgmc_2010.html

Wednesday, 8 August 2012

refresh technique using javascript

Refresh using button click
<input type="button" value="Reload" onClick="document.location.reload(true)">

Refresh in particular time interval

<html>
<head>
<script type="text/JavaScript">
<!--
function refreshMe(timeoutPeriod) {
    setTimeout("location.reload(true);",refreshMe);
}
//   -->
</script>
</head>
<body onload="JavaScript:refreshMe(2000);">
</body>
</html>

by varying the timeout interval we can change the time interval between each refresh

careeradvent an innovative job site


careeradvent.com is one of the leading job site in Indian job market. The specialties of careeradvent are following
  • careeradvent registration is free and any type of job seeker get same service.
  • careeradvent connects job seeker, employer , consultancy, Educational and training Institutions
  • careeradvent helps consultancies, educational & Training institutes to conduction events like recruitment drives
  • careeradvent also offer consulting and expert advice for job seekers and freshers
  • careeradvent have strong privacy protecting policy
  • Any type of member can post job. But verified can access job seekers profile.
  • careeradvent have strong anti cheat policy
  • Only verified member can conduct and popularize their event through careeradvent
  • careeradvent have a research wing
click here to reach site 

Tuesday, 7 August 2012

Micorsoft is forced to change the Name "Metro UI"

Microsoft is forced to change the Metro UI name to some other. The new name is not decided yet.
the verge reported a news on that.

The Windows team is "working on a replacement term" according to the memo,
"and plans to land on that by the end of this week." Until then, employees have been advised to refer to
the Metro style user interface as the "Windows 8 style UI." The memo was distributed to
employees earlier this week, so we expect to hear official news about the Metro replacement by the weekend.

if they use metro anymore they should face legal allegation metro metro IG

Monday, 6 August 2012

Configure Outlook to make sure that mail have subject

If you send a mail with out proper subject name causes lot of problems. It may not get proper attention.
It may not get proper importance etc.. But in our day to day life we may forget to include some headings for our mail. We can configure our outlook for alerting, if we try to send a mail with out subject


1. Open your Outlook,
2. Press Alt+F11. This opens the Visual Basic Editor and open Project-Project 1 (left side). If this doesn’t open Project-Project 1 then Press Ctrl+R.
3. On the Left Pane, one can see "Microsoft Outlook Objects" or "Project1", expand this. Now one can see the "ThisOutLookSession".
4. Double click on "ThisOutLookSession". It will open up a Code Pane on the right hand side.
5. Copy and Paste the following code in the right pane (Code Pane) and save it

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim strSubject As String
strSubject = Item.Subject
If Len(Trim(strSubject)) = 0 Then
Prompt$ = "Subject is Empty. Are you sure you want to send the Mail?"
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check for Subject") = vbNo Then
Cancel = True
End If
End If
End Sub

6. After pasting click on file menu and the save the project1.
7. Now whenever you try to send a mail without subject, a pop-up will be raised to remind you of the blank subject.

Text Editors For web based applications


here is some beautiful text/html editors, that can be used for web based applications.

1.  TinyMCE
  View       Demo      Download

2. FCK Editor
   View   Demo   Download

3. NIC Edit
    View   Demo  Download


Eleven things for DEMO

1. Make UI more attractive
2. Use proper data, That means use data that is frequently used by our targeting client
3. Give user's name as our client names.
4. avoid all scope of application failure.
5. Run application several time before Demo
6. Write and prepare a script that we have to present in front of client
7. Use Local environment
8. Make sure that a reserved environment is ready(We can use this if some thing goes wrong)
9. Make sure that there must Internet connection
10. Understand about client who is listening your presentation, if they are technically strong they may review your code
11. Use all things standardized. (code, configuration etc..)

PHP code that displays database structure

 Here is the piece of code that displays database structure.
 

 
<?php
   
   mysql_connect("host_name","user","password") or die(mysql_error());
   mysql_select_db("database_name") or die(mysql_error());



   $result = mysql_query("SHOW TABLES;") or die(mysql_error());  

   while($row = mysql_fetch_array($result)){
  
 echo $row[0]; //print the table name
 
 $result2 = mysql_query("DESCRIBE ".$row[0].";") or die(mysql_error());
 //get details schema for each table

 
 echo "<table border='1' width='70%'>";
 echo "<tr><td>Field</td><td>Type</td><td>Null</td><td>Key</td>
<td>Default</td><td>Extra</td>";

 
 while($row2 = mysql_fetch_array($result2)){
   
  for($i=0; $i<6; $i++){ 
   if($row2[$i] == "" || $row2[$i] == NULL){
    $row2[$i] = " ";
   }
  }   
   
  echo "<tr>";

  echo "<td>".$row2[0]."</td><td>".$row2[1]."</td><td>".$row2[2]."</td>
<td>".$row2[3]."</td><td>".$row2[4]."</td><td>".$row2[5];

  echo "</tr>";
 }
 
 echo "</table>"; 
 echo "<br/>";
}

?>

generating random string in PHP

Hi here is the code which generate random string.

function rand_string( $length ) {
    $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";   

    $size = strlen( $chars );
    for( $i = 0; $i < $length; $i++ ) {
        $str .= $chars[ rand( 0, $size - 1 ) ];
    }

    return $str;
}

Give $length as number of character required

Tuesday, 24 July 2012

Get URL values using javascript

The following piece of code will fetch URL variables & Its values.

var first = getUrlVars()["id"];
var second = getUrlVars()["page"];

alert(first);
alert(second);

The Code

function getUrlVars() {
    var vars = {};
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(m,key,value) {
        vars[key] = value;
    });
    return vars;
}

Monday, 16 July 2012

Javascript: Page scroll

Hi Friends,
using java-script we can scroll web pages
here is the code for it

function scorll() {
    window.scroll(x,y); // horizontal and vertical scroll targets
} 

In the above codegive x and y as required