Firstly, Convert column into float type
data['Amount'] = data['Amount'].fillna(0).astype('float64')
Format column as Currency format. eg : 12,345.00
Firstly, Convert column into float type
data['Amount'] = data['Amount'].fillna(0).astype('float64')
Format column as Currency format. eg : 12,345.00
$ sudo du /backup/ -h | sort -h
<?php
$oldstring="12. What is Your Name";
$newstring=preg_replace('/[\d]+[\.]+[\s?]/', '',$oldstring);
echo $newstring;
?> SELECT DATE_FORMAT(NOW(), '%Y') - DATE_FORMAT(DOB, '%Y') - (DATE_FORMAT(NOW(), '00-%m-%d') < DATE_FORMAT(DOB, '00-%m-%d')) AS age FROM students SELECT YEAR( CURDATE( ) ) - YEAR( DOB ) AS age FROM students.$ mysqldump -u root -pmqr dbname |gzip -9 > /backup/koha/dbname-$(date +"%d-%m-%Y-%H:%M:%S").gz
<?php
// chek email validation
if (!preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/',$_POST['email']))
{
echo "invalid Email Address";
}
?>
<?php
$queries= parse_url($_SERVER['REQUEST_URI'],PHP_URL_QUERY); // splits url query string into array
$queries_elements = split('&', $queries);
//converts to array
for($i = 0; $i != sizeof($queries_elements); $i++)
{
$queries = split('=', $queries_elements[$i]);
//assigns to new array
$params[$queries[0]]=$queries[1];
}
var_dump($params);?> echo parse_url('http://example.com?mode=edit&id=34', PHP_URL_QUERY);echo parse_url('http://example.com?mode=edit&id=34#user', PHP_URL_FRAGMENT)echo parse_url('http://example.com', PHP_URL_SCHEME);echo parse_url('http://example.com?mode=edit&id=34#user', PHP_URL_HOST);echo parse_url('http://example.com:88?id=34', PHP_URL_PORT);| Option | Description |
short_open_tag=<On|Off> | The short open tag <? instead of <?php.If you run old applications, enable this; this may cause confusion if other language processors like XML, etc, are present. |
output_buffering=<Off|Integer|On> | Maximum output data buffer size before sending to client. On enables infinite buffer size (dangerous!). Best value: 4096. |
zlib.output_compression=<Off|On> | Enables/disables gzip compression of output. |
max_execution_time=<Integer> | Maximum script execution time (in seconds), set to 0 for CLI. Should be set after trial and error, though 30-60 seconds should be good for standard applications. A very large value is dangerous; a script can hog resources for a long time. |
max_input_time=<Integer> | Maximum time a script can spend parsing request data. Default is unlimited (-1) [hard-coded for CLI]. |
memory_limit=<size> | Maximum memory a script may consume; size defaults to bytes, but modifiers like M, G can be applied, like 128 M. Keep it so that malicious scripts don’t hog all available memory. 128-256 M is sufficient. |
error_reporting | Sets the type of errors reported to stdout, stderr or the error log. Default value: E_ALL & ~E_NOTICE. Production value: E_ALL & ~E_DEPRECATED. Development value: E_ALL | ~E_STRICT |
display_errors=<Off|On|stderr> | Displays errors to stdout or stderr. Stderr affects only CLI and CGI binaries. |
include_path=<paths separated by colon> | Colon-separated paths for PHP to search for files named in include, require, include_once or require_once. |
file_uploads = <Off|On> | Enables/disables file uploads. |
upload_max_filesize=<size> | Maximum file-size for file upload; takes modifiers like M, G, etc. |
max_file_uploads=<Integer> | Maximum number of files that can be uploaded in a single request. |
allow_url_include=<Off|On> | Inclusion of PHP files from URLs. This can pose a security threat; malicious files can be included from remote servers. |
extension_dir=<path> | Location to find PHP extensions. |
extension=<filename> | Tells PHP to load the extension named. filename takes full path to the extension, else it will be sought in extension_dir. |
| News | People |
|---|---|
| 1. Ipl | 1. Katrina Kaif |
| 2. World Cup 2011 | 2. Anna Hazare |
| 3. Cbse Result 2011 | 3. Salman Khan |
| 4. Diwali | 4. Poonam Pandey |
| 5. Lokpal Bill | 5. Justin Bieber |
| 6. Japan Earthquake | 6. Aishwarya Rai |
| 7. Aadhar Card | 7. Sachin Tendulkar |
| 8. Osama Bin Laden | 8. Kareena Kapoor |
| 9. Pakistan | 9. Steve Jobs |
| 10. F1 | 10. Priyanka Chopra |
| Movies | Top Searches |
| 1. Bodyguard | 1. Facebook |
| 2. Ra One | 2. Youtube |
| 3. Harry Potter | 3. Gmail |
| 4. Delhi Belly | 4. Yahoomail |
| 5. Singham | 5. Google |
| 6. Ready | 6. Yahoo |
| 7. Mankatha | 7. Irctc |
| 8. Transformers 3 | 8. Rediffmail |
| 9. Dookudu | 9. Indian Railways |
| 10. Zindagi Na Milegi Dobara | 10. Way2sms |
![]() |
| IBM 305 disk storage unit |
cat, cut, find,free, head,kill, man,nice, paste,sleep,tail, touch, watch , who - What is this!!| Command | Description |
|---|---|
| cat | Concatenate files and print on the standard output |
| clear | Clear terminal screen |
| cut | Divide a file into several parts |
| date | Display or change the date & time |
| echo | Display message on screen |
| eject | Eject CD-ROM |
| expand | Convert tabs to spaces |
| factor | Print prime factors |
| find | Search for files that meet a desired criteria |
| fold | Wrap text to fit a specified width |
| format | Format disks or tapes |
| free | Display memory usage |
| head | Output the first part of file(s) |
| join | Join lines on a common field |
| kill | Stop a process from running |
| less | Display output one screen at a time |
| man | Help manual |
| nice | Set the priority of a command or job |
| paste | Merge lines of files |
| screen | Terminal window manager |
| select | Accept keyboard input |
| sleep | Delay for a specified time |
| sort | Sort text files |
| split | Split a file into fixed-size pieces |
| tail | Output the last part of files |
| test | Evaluate a conditional expression |
| time | Measure Program Resource Use |
| touch | Change file timestamps |
| top | List processes running on the system |
| watch | Execute/display a program periodically |
| whereis | Report all known instances of a command |
| which | Locate a program file in the user's path |
| who | Print all usernames currently logged in |
| whoami | Print the current user id and name (`id -un') |
| yes | Print a string until interrupted |
| Command | Shortcut |
|---|---|
| Back | Alt + ← or Backspace |
| Forward | Alt + → or Shift + Backspace |
| Home | Alt + Home |
| Open File | Ctrl + O |
| Reload | F5 or Ctrl + R |
| Reload (override cache) | Ctrl + F5 or Ctrl + Shift + R |
| Stop | Esc. |
| Command | Shortcut |
|---|---|
| Go to Bottom of Page | End |
| Go to Top of Page | Home |
| Move to Next Frame | F6 |
| Move to Previous Frame | Shift + F6 |
| Ctrl + P | |
| Save Page As | Ctrl + S |
| Zoom In | Ctrl + + |
| Zoom Out | Ctrl + - |
| Zoom Reset | Ctrl + 0 |
| Command | Shortcut |
|---|---|
| Find | Ctrl + F |
| Find Again | F3 or Ctrl + G |
| Find Previous | Shift + F3 or Ctrl + Shift + G |
| Quick Find within link-text only | ' |
| Quick Find | / |
| Command | Shortcut |
|---|---|
| Complete .com Address | Ctrl + Enter |
| Complete .net Address | Shift + Enter |
| Complete .org Address | Ctrl + Shift + Enter |
| Delete Selected Autocomplete Entry | Del |
| Toggle Full Screen | F11 |
| Help | F1 |
| Toggle Menu Bar (when hidden) | Alt F10Alt (KDE) F10 (GNOME) |
| Show/Hide Add-on Bar | Ctrl + |
| Select Location Bar | F6 or Alt + D or Ctrl + L |
| Command | Shortcut |
|---|---|
| Bookmark All Tabs | Ctrl + Shift + D |
| Bookmark This Page | Ctrl + D |
| Bookmarks sidebar | Ctrl + B Ctrl + I |
| Library window (Bookmarks) | Ctrl + Shift + B |
| Command | Shortcut |
|---|---|
| Close Tab | Ctrl + W Ctrl + F4 |
| Close Window | Ctrl + Shift + W Alt + F4 |
| Move Tab in focus Left | Ctrl + ← Ctrl + ↑ |
| Move Tab in focus Right | Ctrl + → Ctrl + ↓ |
| Move Tab in focus to start | Ctrl + Home |
| Move Tab in focus to end | Ctrl + End |
| New Tab | Ctrl + T |
| New Window | Ctrl + N |
| Next Tab | Ctrl + Tab or Ctrl + Page Down |
| Open Address in New Tab | Alt + Enter (from Location Bar or Search Bar) |
| Previous Tab | Ctrl + Shift + Tab or Ctrl + Page Up |
| Undo Close Tab | Ctrl + Shift + T |
| Undo Close Window | Ctrl + Shift + N |
| Select Tab 1 to 8 | Ctrl + 1 to 8 |
Below is a listing of Windows keys that can be used on computers running a Microsoft Windows operating system and using a keyboard with a Windows key. In the below list of shortcuts, the Windows key is represented by "WINKEY".
| Shortcut Keys | Description |
|---|---|
| WINKEY | Pressing the Windows key alone will open Start. |
| WINKEY + F1 | Opens the Microsoft Windows help and support center. |
| WINKEY + F3 | Opens the Advanced find window in Microsoft Outlook. |
| WINKEY + D | Brings the desktop to the top of all other windows. |
| WINKEY + M | Minimizes all windows. |
| WINKEY + SHIFT + M | Undo the minimize done by WINKEY + M and WINKEY + D. |
| WINKEY + E | Open Microsoft Explorer. |
| WINKEY + Tab | Cycle through open programs through the taskbar. |
| WINKEY + F | Display the Windows Search / Find feature. |
| WINKEY + CTRL + F | Display the search for computers window. |
| WINKEY + R | Open the run window. |
| WINKEY + Pause / Break key | Open the system properties window. |
| WINKEY + U | Open Utility Manager. |
| WINKEY + L | Lock the computer and switch users if needed (Windows XP and above only). |
| WINKEY + P | Quickly change between monitor display types. (Windows 7 only) |
| WINKEY + LEFT ARROW | Shrinks the window to 1/2 screen on the left side for side by side viewing. (Windows 7 only) |
| WINKEY + RIGHT ARROW | Shrinks the window to 1/2 screen on the right side for side by side viewing. (Windows 7 only) |
| WINKEY + UP ARROW | When in the side by side viewing mode, this shortcut takes the screen back to full size. (Windows 7 only) |
| WINKEY + DOWN ARROW | Minimizes the screen. Also, when in the side by side viewing mode, this shortcut takes the screen back to a minimized size. (Windows 7 only) |
vi is a Visual Editor (hence the name -- vi for VIsual). vi is a widely-used and popular UNIX-based text editor. Like most UNIX system interfaces and other text editors, it lets you control the system by using the keyboard rather than a combination of mouse selections and keystrokes.
| Edit a file from command prompt | |
| Edit a file from command prompt for reading only | vi -R |
| Edit a file from within vi | :e |
| Edit a new file from within vi, discard changes to current file | :e! |
| Reload current file, discarding changes | :e! |
| Go forwards a page | Ctrl+F (or PgDn) |
| Go backwards a page | Ctrl+B (or PgUp) |
| Move around single lines or characters | Arrow keys |
| Save changes | :w |
| Save changes and override protected (read-only) files | :w! |
| Save changes and exit vi | ZZ |
| Quit | :q |
| Quit and discard changes | :q! |
| Get general help | :help |
| Get help on a command (eg. :set) | :help set |
| Go to line 1234 (do not see typing) | 1234G |
| Go to line 1234 (see typing) | :1234 |
| Go to start of file | 1G |
| Go to end of file | G |
| Find (forwards) a line containing "swordfish" | /swordfish |
| Find (forwards) a line using a regular expression | /you see .* here |
| Repeat last search | n |
| Repeat last search in opposite direction | N |
| Find (backwards) a line containing "swordfish" | ?swordfish |
| Find (backwards) a line using a regular expression | ?you see .* here |
| Search case insensitive (Ignore Case) | :set ic |
| Search with case sensitivity | :set noic |
| Wrap searches back to start of file | :set wrapscan |
| Do not wrap searches | :set nowrapscan |
| Insert after cursor | i |
| Insert before cursor | a |
| Insert at beginning of line | I |
| Insert at end of line (append) | A |
| Open (start) new line below cursor | o |
| Open (start) new line above cursor | O |
| Delete next 5 lines | 5dd |
| Delete to end of line | d$ |
| Delete to start of line | d0 |
| Delete to word "swordfish" | d/swordfish |
| Delete to the letter "x" | dfx |
| Delete lines 10 to 20 | :10,20d |
| Delete current line and another 5 lines | :.,+5d |
| Delete all lines | :%d |
| Delete current word | dw |
| Find line containing pattern, delete it | :/pattern/d |
| Find line containing "dog", delete until line containing "cat" | :/dog/,/cat/d |
| Delete from current line to line containing "foo" | :.,/foo/d |
UPDATE `jos_users` SET `password` = MD5( 'new_password' ) WHERE `jos_users`.`username` = "admin"
| Shortcut Keys | Description |
| Alt + Tab | Switch between open applications. |
| Alt + Shift + Tab | Switch backwards between open applications. |
| Alt + double-click | Display the properties of the object you double-click on. For example, doing this on a file would display its properties. |
| Ctrl + Tab | Switches between program groups or document windows in applications that support this feature. |
| Ctrl + Shift + Tab | Same as above but backwards. |
| Alt + Print Screen | Create a screen shot only for the program you are currently in. |
| Ctrl + Print Screen | Creates a screen shot of the entire screen |
| Ctrl + Alt + Del | Reboot the computer and brings up the Windows task manager. |
| Ctrl + Shift + Esc | Immediately bring up the Windows task manager. |
| Ctrl + Esc | Bring up the Windows Start menu. In Windows 3.x this would bring up the Task Manager. |
| Alt + Esc | Switch Between open applications on taskbar. |
| F1 | Activates help for current open application. |
| F2 | Renames selected Icon. |
| F3 | Starts find from desktop. |
| F4 | Opens the drive selection when browsing. |
| F5 | Refresh Contents to where you were on the page. |
| Ctrl + F5 | Refreshes page to the beginning of the page. |
| F10 | Activates menu bar. |
| Shift + F10 | Simulates right-click on selected item. |
| F4 | Select a different location to browse in the Windows Explorer toolbar. |
| Alt + F4 | Closes Current open program. |
| Ctrl + F4 | Closes Window in Program. |
| F6 | Move cursor to different Windows Explorer pane. |
| Alt + Space bar | Drops down the window control menu. |
| Ctrl + (the '+' key on the keypad) | Automatically adjust the widths of all the columns in Windows explorer |
| Alt + Enter | Opens properties window of selected icon or program. |
| Alt + Space bar | Open the control menu for the current window open. |
| Shift + Del | Delete programs/files without throwing them into the recycle bin. |
| Holding Shift | Boot Safe Mode or by pass system files as the computer is booting. |
| Holding Shift | When putting in an audio CD, will prevent CD Player from playing. |
| Enter | Activates the highlighted program. |
| Alt + Down arrow | Display all available options on drop down menu. |
| * (on the keypad) | Expands all folders on the currently selected folder or drive in Windows Explorer. |
| + (on the keypad) | Expands only the currently selected folder in Windows Explorer. |
| - (on the keypad) | Collapses the currently selected folder in Windows Explorer. |