Tuesday, June 23, 2020

Add-ons Firefox 3

Before using this following recomended firefox addons, you can read the warning :
"This is not monitored for security through Mozilla's Recommended Extensions program. Make sure you trust it before installing." (use with your own risk) from Mozilla Firefox add-ons site.

  • Speed Tweaks
    Speed up your browser with 7 tweaks via toolbar popup. Mobile View - Loading mobile version of sites. (break some website).
  • Text Linky Tool
    A useful tool for web links.
    • Copy as plain text.
    • Copy as HTML source.
    • Copy Link Name & URLs.
    • Copy Tab Name & URLs.
    • Analyze image/page URLs
    • in some website cannot copy the right text or link.

Add On Firefox 2

Add On Firefox

What’s That Preference
Quick Reference Firefox about:config Preferences On MozillaZine
https://addons.mozilla.org/en-US/firefox/addon/whats-that-preference/
UnloadTabs (Unload inactive tabs and reduce resource usage in Firefox)

AdBlock Video (Blocks Ads on Hulu, CBS, NBC, ABC and Fox)

Open in Browser (Open files in text, web page, source, XML and image format)
 
Link Status Redux

Table2Clipboard
TableTools2

@copy Links

FireLink
CoLT
ContextMenuPlus
Copy Urls Expert

@Copy function

copy-code
Easy Copy 


colt
context menu plus
free memory
google search link fix
link status redux
snap link plus

UnMHT
Mozilla Archive Format, with MHT and Faithful Save

show file size2
flashblock
greasemonkey
scrapbook plus
scrapbook backup helper
scrapbook copypageinfo
scrapbook chm creator
tile tab
table2clipboard
keyconfig 
 

Copy


must restart
CoLT
Makes it easy to copy link text and locations.

must restart
Copy Plain Text 2
Copies text without formatting.

copy-code
Usage: Click 'Copy' to clipboard link or Right Click on a Code Block & select "Copy Code"
Please note that right click only works with code blocks enclosed in "code" tag

no restart
Copy Link Text
right-clicking a link, its text can be immediately copied.
right-click images to get alt text and drop-down menu items, buttons, and other form controls to get their text or values, including password fields if that option is enabled.

no restart
Copy URL
Copy the URL of the current page to the clipboard at the click of a button. Copy URL is the "little brother" of the Copy ShortURL add-on.

Security

Down for Everyone or Just me
Adblock Plus
Element Hiding Helper for Adblock Plus
Adblock Plus Pop-up Addon
Disable Anti-Adblock
Flashblock
QuickJava
Image Block
no restart
Flash Control
Just Disable Stuff
(ESCapeFromThemGIFs)
SuperStop
Toggle animated GIFs
Image Blocker

Link

must restart
Link Status Redux
Shows an indicator on the status bar in front of the link address when the mouse cursor is over a link to a page you bookmarked or visited before.

Google search link fix
Prevents Google, Yahoo and Yandex search pages from modifying search result links when you click them. This is useful when copying links but it also helps privacy by preventing the search engines from recording your clicks.

Link Alert
Displays an icon in the tooltip or next to the cursor indicating the target of a link.

Text Link
Allows URI texts written in webpages to be loaded by double clicks.

Link Gopher
Extracts all links from web page, sorts them, removes duplicates, and displays them in a new tab for inspection or copy and paste into other systems.

Tab

 no restart
Tab History Redux
Links opened in a new tab retain their history. (If you open a link in a new tab, and then click back in that new tab, you'll go back to the page you opened the link from.)

BackTrack Tab History
Links that are opened in new tabs (and optionally in new windows) retain the "back" (session) history from the parent window.

Save


Save Link in Folder
Easily save links in personally customized folders.
Save Image in Folder
Easily save images in personally customized.

Writing


ScribeFire Next
blog, blogger, wordpress

Text Formatting Toolbar
Toolbar for formatting text in BBcode, HTML or Wiki code.
 
Reference: 

Saturday, June 20, 2020

Cara Hapus Paragraf Kosong Di OpenOffice atau LibreOffice

Cara Hapus Paragraf Kosong Di OpenOffice atau LibreOffice

  1. Klik menu Edit > Find & Replace.
  2. Isi kotak Search for: ^$
  3. Kosongkan isi kotak Replace with:
  4. Klik tombol More Options di bagian bawah, lalu centang kotak Regular expressions.
  5. Klik tombol Replace All
  6. Ketika proses selesai tekan tombol Close.
  7. Maka dokumen Anda akan dihapus setiap paragraf kosong.

Topik Berhubungan:


Cara Replace Dua Line Breaks Dengan Satu Line Breaks OpenOffice

Cara Replace Dua Line Breaks Dengan Satu Line Breaks Di OpenOffice atau LibreOffice

  1. Klik menu Edit > Find & Replace.
  2. Isi kotak Search for: \n\n
  3. Ganti isi kotak Replace with:\n
  4. Klik tombol More Options di bagian bawah, lalu centang kotak Regular expressions.
  5. Klik tombol Replace All
  6. Ketika proses selesai tekan tombol Close.
  7. Maka dokumen Anda akan diganti dari dua paragraf menjadi satu paragraf.

Topik Berhubungan:

Friday, June 19, 2020

Comparing Mac and Windows Keyboards

Apple’s keyboard layouts look very much like standard Windows keyboards. But the biggest difference is in the two keys on either side of the spacebar.

Alt Key than Command Key

On a PC, the keys closest to the spacebar are labeled Alt; the next one over commonly Windows Computer has a Windows logo. On a Mac, the keys closest to the spacebar have an Macintosh logo icon (Command) that looks like a four-bladed propeller or electric fan or clover leaf. These Command keys both have the same function. The next one over is the Option key.

The Command key is used in almost all keyboard shortcuts. It’s one of the most important things to know about the Mac. Another key that may not be familiar to PC users is at the upper-right on Apple keyboards. It’s the eject button for the optical drive (that reads and writes CDs and DVDs). You see the same symbol on the eject button on home audio devices. Continuing to the left on stand-alone keyboards, you find a key with a speaker symbol, which turns the system sound on and off. It’s a mute button, in effect. It is followed by two keys that raise and lower the volume.

The keyboards built into Apple laptops and Apple’s wireless keyboard have fewer keys than Apple’s wired stand-alone keyboard. No separate numeric keypad is available. You can use a group of keys on the right side as a keypad by activating the Num Lock function (press Control+F6). On many Mac keyboards, the sound-control keys, screen-brightness, and other controls are on the function keys.

Backspace and Delete Key

The large key at the right end of the numeral row on PC keyboards is labeled Backspace and deletes the character to the left of the insertion point. Long ago, Apple decided to label this key Delete, because that is what it really does. The problem is that PC keyboards have another, regular-sized Delete key in the group above, or sometimes next to, the arrow keys. This Delete key deletes the character to the right of the insertion point. Apple first omitted this key. Later, when Apple switched to connecting by USB for its stand-alone keyboards, the second delete key came back, labeled del or delete. It also has a standard delete symbol on it which looks like a boxy arrow pointing right with an x in it. The big Delete key doesn’t have a symbol on it, though one exists, and it has the same boxy arrow pointing left. The Apple laptops don’t have a second delete key, but you get the right delete function by holding down the function key (fn) when you press the Delete button.

Main Return/Enter Key

Apple keyboard Note the return/enter key, with dual labels. On Apple's keyboards, the main enter key is usually labeled “return” or just by a symbol “↩”. On PC keyboard, the main enter key is labeled “Enter ↵”.

Note: the main enter/return key is different from the Enter on number keypad. (it sends a different key signal.)

Windows Computer KeyboardMacintosh Keyboard
Alt Gr key ( alternate graph key )Alt/Option key ( alternate key )
Arrow Keys ( Up, Down, Left, Right key )Arrow Keys ( Up, Down, Left, Right key )
Backspace keyDelete key
Caps Lock ( Capitals Lock ) keyCaps Lock ( Capitals Lock ) key
Ctrl key ( control key )Alt/Option key ( alternate key )
Ctrl key ( control key )Command key ( Macintosh logo/pretzel key/Apple key/clover key looks like a clover leaf or four-bladed propeller or electric fan )
Delete keyDelete key or looks like a pentagon arrow with intersection line inside
Enter/Main Return KeyEnter/Return Key (different purpose)
Esc key ( Escape Key )Esc key ( Escape Key )
Fn key ( Function key )Fn key ( Function key )
Home/End keyHome/End key (different purpose)
Insert keynothing to compare ( Macintosh does not have a Insert key)
Menu / App Key ( Application key to open a Right click menu / context menu in most applications )Control key ( similar to Menu or App key in some applications )
nothing to compare ( Windows does not have a = key)= ( equal key )
nothing to compare ( Windows does not have a clear key)clear key
nothing to compare ( Windows does not have a F13 to F19 key)F13 to F19 key (Function key 13 to Function key 19)
Pause Break Keynothing to compare ( Macintosh does not have a Pause Break key)
PgUp/PgDn key ( PageUp/PageDown key )nothing to compare ( Macintosh does not have a PgUp/PgDn key, using other combination key )
PrtScn/Sysrq (Print Screen Key/System request)nothing to compare ( Macintosh does not have a Print Screen key)
ScrLk ( ScrollLock Key )nothing to compare ( Macintosh does not have a ScrLk key)
Shift keyShift key
Win key ( Windows key )Command key ( Macintosh logo/pretzel key/Apple key/clover key looks like a clover leaf or four-bladed propeller or electric fan )

Microsoft Office Word File Name Extensions

Microsoft Office Word File Name Extensions
Microsoft Office Word File Name Extensions
Microsoft Office Word File Name Extensions, you can download on these following link:  
FormatFile-Ms-Word.pdf

Legacy

Legacy filename extensions denote binary Microsoft Word formatting that became outdated with the release of Microsoft Office 2007. Although the latest version of Microsoft Word can still open them, they are no longer developed. Legacy filename extensions include:
  • .doc – Legacy Word document; Microsoft Office refers to them as "Microsoft Word 97 – 2003 Document"
  • .dot – Legacy Word templates; officially designated "Microsoft Word 97 – 2003 Template"
  • .wbk – Legacy Word document backup; referred as "Microsoft Word Backup Document"

OOXML

Office Open XML (OOXML) format was introduced with Microsoft Office 2007 and became the default format of Microsoft Word ever since. Pertaining file extensions include:
  • .docx – Word document
  • .docm – Word macro-enabled document; same as docx, but may contain macros and scripts
  • .dotx – Word template
  • .dotm – Word macro-enabled template; same as dotx, but may contain macros and scripts
  • .docb – Word binary document introduced in Microsoft Office 2007

Related Topics:



Thursday, June 18, 2020

Microsoft Windows Features

Action Center/Charm
Add or Remove Programs/Uninstall/Apps and Features
Add or Remove Windows Components
Address Bar
All Apps/All Programs
Alternate (Alt) keyboard button
Auto Insert Notification/Autorun/AutoPlay=Windows 98,Windows 2000
Ballon Tips
Button
Calculator
Calendar
Camera
Capitals Lock (Caps lock) keyboard button
Character Map
Click/Select
Clipboard
Close window
Command Prompt/Command Line
Context Menu/Right Click Menu/Pop up menu
Control (Ctrl) keyboard button
Cool Switch/Switch Running Applications
Cursor
cut, copy, and paste
Desktop
Dialog box
Document menu
Double Click/Open/Activate/running application
Drag and drop
Escape (Esc) keyboard button
Favorite
File Explorer/Windows Explorer
Fn (Function) keyboard button
Frequent Application
Frequent Folders
Hibernate
Hybrid Sleep
Icon
Jump List
Keyboard shortcut
Lock Screen
Magnifier
Mail App/Outlook Express
Math Input panel
Maximize window
Menu bar
Menu Item
Menu/pull-down menu
Metro UI Menu Bar
Minimize window
Mouse Pointer
Move window
Narrator
Navigation Button
Navigation Pane
Notepad
Notification Area button
Notification Area/System Tray
Number Lock (Numlock) keyboard button
Open With
Page Down (PgDn) keyboard button
Page Up (PgUp) keyboard button
Paint
Panel
Pin to Start/Pinned Application to Start Menu
Pin to Taskbar/Pinned Application to Taskbar
Properties window
Quick Actions
Recent files section
Recovery/System Restore
Restart
Restore window
Ribbon
Ribbon Group
Ribbon Tab Menu
Ribbon Tools/Ribbon Context
Right Click
Run
Run as admin/Run as
Running Applications View
Screen Saver
Scroll Lock (Scroll lock) keyboard button
Search box/Find
Shifting (Shift) keyboard button
Shortcut
shortcut menu for the active window
Shutdown
Size window
Sleep
Snipping tool
Software/Application/Apps/Program
Sound Recorder
Start Button
Start Menu
Start Menu classic
Start Menu scroll Programs
Start Menu Simple
Startup
Steps Recorder
Sticky Notes
Sub menu
System Image Recovery/Backup and Restore/Backup and Recovery
Tab (Tabulation) keyboard button
Tablet Mode/Start Screen/Metro UI
Tabs
Tabs view pane
Task Manager
Task View
Taskbar
Time and Date
Title Bar
Tooltip
Touch Keyboard/On Screen Keyboard
Underlined letter in a menu name/mnemonic in menu
Universal Apps
User Account control
User Accounts Screen/Logon Screen/Login Dialog
Username
Virtual Desktops
Wallpaper / Deskop Background
Window Control Menu/Window control shortcut menu for active window
Window fax and scan
Window Sizing Button
Window snapping
Windows
Windows Accessories/Accessories
Windows Key/Windows Keyboard button
Windows Loading Splash Screen
Windows Search/Find Fast=Windows 98
Windows Settings/Control panel/Gear Icon
Windows Speech Recognition
Windows Theme
Wordpad

Apple Macintosh and Microsoft Windows Features

Comparison Between Apple Macintosh than Microsoft Windows in features and applications

Apple Macintosh=Microsoft Windows
?=Windows Snipping Tool (screenshot capture)
?=Windows Steps Recorder
Apple AirDrop=?
Apple Automator/Apple Script=Windows Visual Basic Script/Windows Java Script/Batch Script/Power Shell Script
Apple Boot Camp=Microsoft Hyper-V/Windows Server Virtualization/Windows Virtual PC
Apple Characters=Windows Touch Keyboard Emoji
Apple Dark Mode=Windows Dark Theme
Apple iCloud=Microsoft One Drive (cloud storage and cloud computing service)
Apple iMovie=Windows Movie Maker
Apple iWork=Microsoft Office/Microsoft Office 365
Apple Keynote=Microsoft Office PowerPoint (presentation program)
Apple Menu Bar (on top of screen)=Microsoft Menu Bar (on each application)
Apple Menu=Windows Start Menu/Windows Start Button
Apple Music/iTunes=Microsoft Groove/Microsoft Windows Media Player
Apple Notes=Windows Sticky Notes
Apple Numbers=Microsoft Office Excel (spreadsheet)
Apple Pages=Microsoft Office Word/Microsoft Office Publisher (word processor and desktop publishing)
Apple Photos/iPhoto=Windows Live Photo Gallery (photo viewers and editor)
Apple TV/iTunes/Quick Time=Microsoft Films & Tv/Windows Media Player
iCal=Windows Calendar
Mac Activity Monitor/Process Listing=Windows Task Manager
Mac App Store=Microsoft Store(application store)
Mac Applications folder=Windows Program Files
Mac Clock=Windows Time
Mac Dock=Taskbar(navigation bar)
Mac Finder=Windows Explorer/File Explorer (file management)
Mac Help=Windows Help
Mac Launchpad=Windows Start Menu/Windows Start Button (application launcher)
Mac Mail=Microsoft Mail
Mac Mission Control=Windows Cool Switch
Mac Quick Look/Mac Preview Pane=Windows Preview Pane
Mac Safari=Microsoft Edge/Microsoft Internet Explorer
Mac Spaces and Expose=Windows Task View
Mac Spaces/Virtual Desktop=Windows Virtual Desktop
Mac Spotlight/Mac Sherlock=Windows Search/Windows Finder (search feature)
Mac Stacks=Windows Auto Arrange Icon
Mac Status Bar=System Tray, Notification Area (status bar)
Mac System Preferences=Windows Control Panel (configuration/preferences/settings)
Mac Terminal=Windows Command Prompt/Windows Command Line/Power Shell
Mac TextEdit=Windows Notepad
Mac Trash Can=Windows Recycle Bin
Mac Universal Access=Windows Accessibility

If you have other features or application of Apple Macintosh or Microsoft Windows, you can write on comment. Or maybe you have suggestion or correction then you can write on comment box.

Monday, June 15, 2020

How to Type Accent Marks Over Letters in Microsoft Word

Insert Accented Letters with Word’s Insert Function

If you only need to insert accented characters occasionally, it’s easy enough to pop open Word’s Symbol window and hunt for the letter you need.

Switch over to the “Insert” tab, and then click the “Symbol” button.
The dropdown menu shows your most recently-used symbols. If the symbol you’re after is there, just click it. If not, click the “More Symbols” command, instead.
The Symbol window that opens displays a huge number of characters to choose from—3,633 to be exact. Word does help by letting you filter by font and subset, though.

Use the “Font” dropdown menu to choose the font you’re using (or, you can just select the “Normal Text” entry). The “Subset” dropdown lets you jump to particular subsets of characters. In fact, if you scroll through the available characters, you can watch the Subset value change. For now, though, go ahead and choose “Latin-1 Supplement” from the “Subset” dropdown. That’s where you’ll likely find the accented letter you’re after.

Click the character you’re looking for, and then click the “Insert” button to insert it into your document. Note while you’re here that there are all kinds of other useful symbols in this window. Just in the image below, you can see the symbols for copyright (©) and registered trademark (®).

Insert Accented Letters with Keyboard Shortcuts

For example, to get the á character, you’d press Ctrl+’ (apostrophe), release those keys, and then quickly press the A key. Note that if you want Á instead of á, you’d have to enable caps lock before using the shortcut key, since using the Shift key would change the shortcut.

There are too many to list in this article, but here are a few shortcut keys provided by Office Support to get you started.

Symbol Code
à, è, ì, ò, ù Ctrl+` (Accent Grave), the letter
À, È, Ì, Ò, Ù
á, é, í, ó, ú Ctrl+’ (Apostrophe), the letter
Á, É, Í, Ó, Ú
â, ê, î, ô, û Ctrl+Shift+^ (Caret), the letter
Â, Ê, Î, Ô, Û
ã, ñ, õ Ctrl+Shift+~ (Tilde), the letter
Ã, Ñ, Õ
ä, ë, ï, ö, ü Ctrl+Shift+: (Colon), the letter
Ä, Ë, Ï, Ö, Ü

Insert Accented Characters with ASCII Codes


And what use would we be if we didn’t show you the geekiest way of all? If you’re going to be using a lot of accented characters—especially the same characters over and over—it might be worth your time to learn a few ASCII codes.

The American Standard Code for Information Interchange (ASCII), is an encoding system that provides a way to represent certain characters using the respective code. We won’t be going over the full list of ASCII codes, as there are hundreds of characters and it’s impossible to learn them all. Instead, we’ll go through the basics and give you a few short codes to quickly take care of those foreign words with diacritics.

To use this trick, you’ll need a number pad (either as part of your main keyboard or as an add-on). You’ll also need to make sure you’ve enabled NumLock by pressing the NumLock key at the top-left corner of your number pad. Most keyboards have an indicator light to let you know when NumLock is enabled.

To enter an ASCII code, all you have to do is hold down your Alt key while typing out a numeric code on your number pad. For example, the code for a lowercase letter “a” with a grave accent is 133. So, you’d hold down Alt, type 133, and then let go of the Alt key. As soon as you do, the character appears—voilà!

Obviously, it would be difficult to remember a ton of ASCII codes for different accented letters, but if you regularly use a few, it really simplifies the whole process. Here are a few to get you started:
Code Symbol Description
129 ü letter u with umlaut
130 é letter e with acute accent
131 â letter a with circumflex accent
132 ä letter a with umlaut
133 à letter a with grave accent
134 å letter a with a ring
136 ê letter e with circumflex accent
137 ë letter e with umlaut
138 è letter e with grave accent
139 ï letter i with umlaut
140 î letter i with circumflex accent
141 ì letter i with grave accent
142 Ä letter A with umlaut
143 Å letter A with a ring
144 É letter E with acute accent
147 ô letter o with circumflex accent
148 ö letter o with umlaut
149 ò letter o with grave accent
150 û letter u with circumflex accent
151 ù letter u with grave accent
152 ÿ letter y with diaeresis
153 Ö letter O with umlaut
154 Ü letter U with umlaut
160 á letter a with acute accent
161 í letter i with acute accent
162 ó letter o with acute accent
163 ú letter u with acute accent
164 ñ letter n with tilde

AutoCorrect Keyboard Characters to Special Characters

You can also use Word’s autocorrect feature to automatically insert accented characters when you type certain letter combinations. And, although this sounds like it would be the easiest method, it’s quirky and in practice, not as useful as it might sound.

Back at the Symbols window, select the character for which you want to set up an autocorrect function for. Click the “AutoCorrect” button at the bottom left.

In the “Replace” box, type the characters that you want to trigger the autocorrect replacement. When you’re done, click the “Add” button, and then the “OK” button.

In this case, we’re telling Word that when we type the letter “a” followed by the accent grave (`) and then a space, Word should automatically replace that with an “a” that has the accent grave above it.

When you type a word, you have to type the accented character first. In other words, if you want to type “Voilà,” you’d first need to type a+’ then go back and type the “Viol” behind it. Otherwise, you’ll end up with Viola’—because Word won’t trigger the autocorrect when the trigger letters are part of a larger word. And, as you can imagine, this makes it really annoying if you have multiple accented characters in a single word.

And really, you’re still doing almost as much typing as you would using the built in keyboard shortcuts Word provides.

Related Topics

How to insert square root symbol (√ ) in Word

Insert Square root symbol in Microsoft Office Word Using Keyboard Shortcut

Name:Square root
Symbol:√
Alt Code:221A
Shortcut (windows):221A, Alt+X
Shortcut (Mac):Option+V

Alt code

To type the square root symbol in Word,
  1. first type 221A, 
  2. then press Alt+X to convert the code into the symbol. On Mac, press Option+V on the keyboard.

Numeric Keypad

To insert this symbol (using the Alt code), follow these three simple steps:
  1. Place the insertion pointer at where you want to insert the symbol.
  2. Hold down the Alt key and type 251 on the numeric keypad
  3. and release the Alt key.

Using insert Equation

Microsoft Word has made typing Math symbols so easy with its insert Equation feature.

With this option, you can effortlessly insert almost any mathematical symbol into your word document.

Below are the steps to help you out:
  1. Place the insertion pointer where you want to insert the square root symbol.
  2. Press Alt+= on your keyboard to show the Equation Field.
  3. In this field, type \sqrt and press the spacebar.
  4. As soon as you press the space bar after typing \sqrt, word will insert the square root symbol into your Word document.

Copy and paste the Square root symbol

The copy and paste option can be the easiest option to insert this symbol into MS Word.

Irrespective of the software you are working with, you can always copy and paste any symbol into your work.

Below is the Square root symbol if you want to copy and paste it into your work:


Using Insert Symbol Dialog

This method and the next doesn’t involve using the keyboard. Therefore, it can only be used in Microsoft Office applications that have the insert symbol function such as Office Word, Excel, PowerPoint or Access.
Below are the steps to insert the square root symbol using the Insert Symbol dialog.
  1. On the Insert tab, click the Symbol button and Click More Symbols…
  2. The Symbols dialog box will appear. It’s now the time to look for the symbol you want to insert (the Square root symbol).
  3. Locate the Symbol
    1. In the gallery of symbols, look for the square root symbol by scrolling up or down using the scroll bar.
    2. If you cannot find the symbol, at the bottom right area of the dialog, select Unicode (hex) in the from drop-down. Again, at the top right area of the dialog, select Mathematical Operators in the Subset drop-down.
    3. This way, only the Mathematical Operators including the Square root symbol will show in the visible area of the Symbols dialog.
    4. After inserting, close the Symbol dialog box.
This is how you may insert the Square root symbol into Word/Excel/PowerPoint/Access using the insert symbol dialog.

Using AutoCorrect

Another way to obtain the Square root symbol is through the use of AutoCorrect feature.

It is a facility designed for correcting spelling mistakes. For example, if you type thsi Word will correct it to this.

Using this feature, you can assign an AutoCorrect text to the Square root symbol (such as SQRT).

This way, whenever you type the text SQRT, Word will think that you actually wanted to type the square root symbol (√) and will convert it for you automatically.

This approach is particularly useful when you need to frequently insert the symbol into your work.

Without further ado, below are the steps you can use to assign AutoCorrect text to symbols.
  1. On the Insert tab, click the Symbol button and choose More Symbols…
  2. The Symbol dialog appears.
    1. Locate the Square root symbol, then click to select it.
    2. Click on the AutoCorrect… button to display the AutoCorrect dialog.
  3. In the AutoCorrect dialog box, enter the following:
    1. Replace: SQRT (or any text you want to assign to the symbol.
    2. With: √
    3. Click Add, then click OK.
  4. Word will automatically insert the Square root symbol into your document whenever you type SQRT.
Below are some few things to note though when you are using the AutoCorrect approach.
  1. AutoCorrect is case sensitive. Meaning if you type sqrt (in lowercase), Word will not convert it into the Square root symbol unless you type SQRT (in uppercase).
  2. If there is any text before or after the AutoCorrect text, Word will consider the AutoCorrect text as part of the text and hence will not convert. For example, XSQRT will not get converted, but X SQRT will get converted to X √.

Using Eq (Equation) field codes

Radical: \r(,)

Draws a radical or square root using one or two elements.

Example:

{ EQ \r(3,x) }


Reference:
http://docs.microsoft.com/

http://support.office.com/

Related Topics:



Saturday, June 13, 2020

Compile and run C/C++ code using Notepad++

MinGW

For compiling and running using MinGW:

npp_save
cd "$(CURRENT_DIRECTORY)"
gcc -o "$(NAME_PART).exe" "$(FULL_CURRENT_PATH)"
"$(NAME_PART).exe"

Microsoft Visual C

For compiling and running using Visual C 2019:

npp_save
cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build"
vcvarsall.bat x64 && cl "$(FULL_CURRENT_PATH)" /Fo$(CURRENT_DIRECTORY)\ /link /out:"$(CURRENT_DIRECTORY)\$(NAME_PART).exe"
cd $(CURRENT_DIRECTORY)
"$(NAME_PART).exe"

More info on Visual C vcvars scripts:

https://docs.microsoft.com/

Turbo C++

For compiling and running using Turbo C++:
npp_save
cd "c:\tc\bin\TCC.exe" 
"$(CURRENT_DIRECTORY)\$(NAME_PART).cpp"
cd $(CURRENT_DIRECTORY)
"$(NAME_PART).exe"

Borland C++

For compiling and running using Borland C++: 
cd "C:\BORLAND\BCC55 "$(CURRENT_DIRECTORY)\$(NAME_PART).cpp"
cd $(CURRENT_DIRECTORY)
"$(NAME_PART).exe"

Most Option In Notepad++ and Plugin

ALWAYS BACKUP THE FILE BEFORE EDITED!!

Notepad++ Configuration:

Notepad++ Configuration inside XML files are all found in %AppData%\notepad++\ (or, for zip-based local installations, in the notepad++ executable directory) unless otherwise noted.
  • General
    • Toolbar: Small icons (prefer to small screen) / Big icons (prefer to big screen).
    • Document List Panel: Disable extension column: If enabled, the Doc Switcher panel will show the extension as part of the Name column).
  • Editing
    • Multi-Editing Settings: allows multiple selections not necessarily contiguous with each other by using Ctrl+Mouse click on the selection(s).
  • Language
    • Tab settings:
      • Replace by space: when set, hitting TAB will insert that number of spaces; when not set, TAB will insert the literal ASCII TAB character.
    • Treat backslash as escape character for SQL: this affects the Language > SQL handling of the \ backslash character (Note: this option moved from MISC Preferences in v7.8.1)
  • Highlighting
    • Highlight Matching Tags
      • Highlight comment/php/asp zone.
  • Backup
    • Session snapshot and periodic backup
      • Remember current session for next launch: the current session is the current list of open files. The next time you run Notepad++, it will open with that same list of files.
      • Enable session snapshot and periodic backup: this will auto-save your changed file once every N seconds to the listed directory (default to %AppData%\Notepad++\backup\).
        1. It is not possible to select this option without Remember current session ... also being active.
        2. This is also how you enable Notepad++ to remember unsaved changes.
        3. This will allow you to exit Notepad++ and resume, remembering changes to files that hadn’t been intentionally saved.
        4. When you exit Notepad++ with unsaved changes, Notepad++ will not ask you to save changes. It will just keep the periodic backup file, and reload from there rather than from the normal disk location for the file.
        5. If you want Notepad++ to ask to you save edited files every time you close the file or exit Notepad++, do not enable this option.
        6. This is not a long-term backup option.
        7. Every time you do a manual save, or close the file while leaving Notepad++ open, this periodic backup of the file will be deleted.
        8. If there is a Notepad++ crash or Windows crash, it is possible for you to lose data.
  • Auto-Completion
    • Enable auto-completion on each input: a dropdown selection will appear as you type; arrow keys will select various choices, TAB or ENTER will accept a choice, ESC will cancel auto-completion.
    • Function parameters hint on input: for applicable programming languages, will provide hints on what to type in a function parameter list.
    • Auto-indent: when making a new line, automatically indent (following TAB or space settings for the active Language) based on the indent of the previous line (note: this setting was in the MISC preferences prior to v7.8.3)
  •  Delimiter
    • Delimiter selection settings
      • If you define open and close characters, Ctrl + MouseDoubleClick will select everything inside that delimiter pair.
      • Allow on several lines: Ctrl + MouseDoubleClick will work across multiple lines, instead of just on a single line.
  • MISC.
    • Document Switcher
      • Enable: hitting Ctrl+TAB will allow you to easily switch through all the open documents.
      • Enable MRU behavior: it will default to selecting the most-recently-used file (or “MRU”, for short) in the Ctrl+TAB list.
    • Clickable Link Settings
      • Enable: text that appears to be a URL will allow you to double-click to open that URL in your default browser. When you hover over the URL, it will change to the style defined in Style Configurator > Global Styles > URL hovered.
    • Show only filename in title bar: use just the file name (instead of the full path) of the active file in the Notepad++ title bar.
    • Enable Notepad++ auto-updater: will automatically download updates from the official website, once the development team has decided it’s time to push an update to users. If disabled, you will have to manually download the installer from the official website yourself.
    • Don't fill find field in Find dialog with selected word: when enabled, Find command will not replace the Find What text with the currently-selected text; when disabled (default), the Find What text will be replaced (added v7.8.3).
    • Session file ext.: populate with a file extension (without the .). When you open a file with this extension (whether from Windows file associations, or from the Notepad++ File > Open or similar), Notepad++ will treat the file as a session file, and open the files from that session, rather than showing and editing the contents of the file. This will honor the Multi-Instance settings.
    • Workspace file ext.: populate with a file extension (without the .). When you open a file with this extension (whether from Windows file associations, or from the Notepad++ File > Open or similar), Notepad++ will treat the file as a workspace file, and open that workspace, rather than showing and editing the contents of the file. This will honor the Multi-Instance settings.

Notepad++ Plugin:


DSpellCheck

Plugin > DSpellCheck
remove check on "Check Only Comments and Strings if Possible"


Reference:
https://npp-user-manual.org/

Top Notepad2 Fork

The Best of Fork of Notepad 2
  • Original basic (Florian Balmer): Notepad2.
  • CodeFolding and metapath, support Windows XP and above (zufuliu): Notepad2.
  • Some additional features,Edit Selection, Math Evaluation, support Windows XP and above (ProgerXP): Notepad2e.
  • Copy directory to clipboard and Open path in explorer, Undo/Redo preserves selection, change many keyboard shortcut, support Windows 7 and above (rizonesoft): Notepad3
Other text editor related to Notepad2:
  • Notepad++
  • Scintilla

Wednesday, June 10, 2020

Mengubah orientasi halaman

Mengubah orientasi halaman menjadi landscape atau portrait Dalam Microsoft Word

Versi yang didukung: mulai dari Microsoft Word 2007

Mengubah orientasi seluruh dokumen

  1. Untuk mengubah orientasi seluruh dokumen, pilih "Page Layout" > "Orientation".
  2. Pilih "Portrait" atau "Landscape".


Topik lain:

Monday, June 8, 2020

Default Server Ports


TCP is the abbreviation of "Transfer Control Protocol" whereas UDP is the abbreviation of "User Datagram Protocol". TCP and UDP are both the main protocols which are used during the Transport layer of a TCP/IP Model. Both of these protocols are involved in the process of transmission of data. While UDP is used in situations where the volume of data is large and security of data is not of much significance, TCP is used in those situations where security of data is one of the main issues.
 Following are some of the common TCP and UDP default ports.


SMTP - 25
SMTP is known as the Simple Mail Transfer Protocol. It is associated with the TCP port number 25. The primary purpose of this protocol is to make sure that email messages are communicated over the network securely. This port usually comes into being during the Application layer.

HTTP - 80
Port 80 is associated with HTTP, Hypertext Transfer Protocol. It comes under the category of a TCP protocol. It is one of the most famous and widely used ports in the world. The main purpose of port 80 is to allow the browser to connect to the web pages on the internet. Port 80 basically expects or waits for the web client to ask for a connection. Once this connection has been made, you will get the privilege to connect to the World Wide Web and get access to various web pages out there. In fact, HTTP - 80 is one of the most important ports associated with the TCP protocol. Moreover, this port is generally used during the application layer of the TCP/IP Model.

HTTPS - 443
HTTPS - 443 is also associated with the TCP protocol. HTTPS port 443 also lets you connect to the internet by establishing a connection between the webpages and the browser. This lets you connect to the World Wide Web. However, this port has an added feature of security to it, which HTTP port 80 does not have. This port is intended for establishing secure connections to make sure that the data is transmitted over a secure network. The use receives a warning if the browser is trying to access a webpage which is not secure. This port comes into being during the application layer. It basically encrypts and authenticates the network packets before transferring them over the network to increase the security. This feature of security is introduced by the use of SSL, which can also be referred to as Secure Socket Layer.

FTP - 20, 21
FTP is the abbreviation of "File Transfer Protocol". The purpose of FTP is to transfer files over the internet. It basically lays down all the rules which are to be followed during the transfer of data. Due to the concern of security, it also asks for authentication by the user before the transfer of data. It is associated with the TCP protocol and corresponds to two ports, port 20 and 21. Both of these ports function during the application layer.
  • Port 20 performs the task of forwarding and transferring of data. It takes over the task of transferring FTP data when it is in active mode.
  • Port 21 performs the task of signaling for FTP. It listens to all of the commands and provides a flow control for data. It is quite essential for maintaining the flow of data.
 TELNET - 23

TELNET port 23 comes under the category of TCP Protocols. Its main function is to establish a connection between a server and a remote computer. It establishes a connection once the authentication method has been approved. However, this port is not suitable to establish secure connections and does not cater to the concern of security. It enables the remote connection of a computer to be established with routers and switches as well. It makes use of a virtual terminal protocol to make a connection with the server. It comes into existence during the application layer of the TCP/IP protocol.


IMAP - 143

IMAP is the abbreviation of 'Internet Message Access Protocol'. The IMAP -143 Port lies under the category of TCP protocol. The primary purpose of this port is to retrieve emails from a remote server without having the need to download the email. You have the liberty to access the emails from anywhere by connecting to the server and viewing your email after providing authentication. This opportunity has been provided to you because of the existence of this port. It reserves a virtual memory for the email which enables you to read it by connecting to the server. However, you may also download the mail if you wish to. It also provides you the ability to search for your messages from a bunch of them to get to your desired one. IMAP 143 Port generally operates at the Application Layer of a TCP/IP Model. In addition to this, it also makes sure that the data remain secure during this connection.


RDP - 3389

RDP is also known as the 'Remote Desktop Protocol'. It operates on the port 3389 of the TCP protocol. This port has been developed by Microsoft. It enables you to establish a connection with a remote computer. With the help of this connection, you get the liberty to control the desktop of this remote computer. This will provide you the ease to access you home desktop system from anywhere in the world just by proper authentication. In order to connect to your remote computer, you will have to forward the connection to the TCP Port 3389 which will then make available to you all the files which you have kept on your remote computer. However, since this port have been developed by Microsoft, it is essential to have a Windows operating system running on your computer in order to access it remotely. Please keep in mind that you might have to do manual settings in order to remotely access your desktop using this port. It operates on the Application layer of the TCP/IP Model. It is used worldwide for the purpose of accessing your desktop remotely.


SSH - 22

SSH is also referred to as 'Secure Shell'. It operates on the port number 22 of the TCP protocol. It carries out the task of remotely connecting to a remote server or host. It allows you to execute a number of commands and move your files remotely as well. However, it is one of the most secure ways of accessing your files remotely. Using this port, you can remotely connect to a computer and move your files with ease. This port sends the data over the network in an encrypted form which adds an extra layer of security on it. In addition to this, only authorized people will be able to remotely log on to their systems using the Port 22 which makes sure that the information does not get into unauthorized hands. It provides the chance to move files within networks as well as gives the privilege to move files between different networks securely. It operates at the Application Layer of the TCP/IP Model and is considered as one of the most secure and reliable ports for accessing files remotely.


DNS - 53

DNS is referred to as 'Domain Name System'. It operates on the port 53 of TCP and UDP protocols. DNS makes use of relational databases to link the host names of the computers or networks to their respective IP Addresses. The port 53 waits for requests from DHCP to transfer the data over the network. It operates on the Application Layer of the TCP/IP Model.

TCP protocol is used by the Zone Transfer function of the DNS server. Once the connection is established, the zone data will be sent by the server using the TCP 53 port. However, when the query has to be transferred from the client computer, it will be sent using the port 53 on UDP protocol. However, if no response is received from the server within 5 seconds, the DNS query will be sent using the port 53 of TCP Protocol.


DHCP - 67, 68

DHCP is also known as 'Dynamic Host Configuration Protocol'. It basically runs on the UDP protocol. The basic purpose of DHCP is to assign IP Address related information to the clients on a network automatically. This information may comprise of subnet mask, IP Address etc. Many of the devices are automatically configured to look for IP Addresses using DHCP when they connect on a network. It makes it quite reliable to assign all the devices on a network with automatically produced IP Addresses. It generally operates on the Application layer of the TCP/IP Model. DHCP basically makes use of 2 ports; Port 67 and Port 68.

UDP Port 67 performs the task of accepting address requests from DHCP and sending the data to the server. On the other hand, UDP Port 68 performs the task of responding to all the requests of DHCP and forwarding data to the client.


POP3-110

POP3 is also referred to as Post Office
 Protocol Version 3. It operates on the port 110 of TCP Protocol. It allows the email messages to be retrieved from the SMTP servers. Using this port, you can download the messages from the server and then read them. However, this means that you will not be able to access the messages and read them without downloading them. Furthermore, the messages are also deleted from the server once they are downloaded. However, this port does not cater to the issue of security. The authentication details transferred over the network are not encrypted and sent in plain text. This means that any hacker can easily intercept this information and misuse it. Port 110 generally operates on the Application layer of the TCP/IP Model.

Others


The default listening port for,
Apache (Linux)=8080
Apache (Windows)=80
MySQL=3006.
Java Server Pages (JSP) Tomcat=8080
Java Server Pages (JSP) JBoss=8080
Django Python=8000
ruby on rails=3000
node js (debug)=9229
node js=93000
deno js (debug)=9229
deno js=8000
express js=3000
vue js=8080
angular js-cli=4200
react js=3000

Application/Web Servers

NamePort Number
Apache Derby Network Server1527
OHS (SSL)4443
GlassFish Admin Server4848
WebLogic Admin Console7001
OHS7777
Tomcat Shutdown8005
IHS Administration8008
Tomcat AJP Connector8009
Tomcat Startup8080
GlassFish HTTP8080
Jetty8080
JBoss Admin Console8080
Alfresco Explorer/Share8080
Jenkins8080
GlassFish HTTPS8181
Tomcat Startup (SSL)8443
Jonas Admin Console9000
WAS Admin Console (SSL)9043
WAS Admin Console9060
WildFly Admin Console9990
WAS JVM HTTP9080 (first one only)
WAS JVM HTTPS9443 (first one only)

Database/Datastore

NamePort Number
DB250000
Redis Server6379
Oracle Listener1521
mongoDB27017
MySQL3306
MS SQL1433
Memcached11211
MariaDB3306

Some of the abbreviation used in the above list
  • WAS – WebSphere Application Server
  • AJP – Apache JServ Protocol
  • SSL – Secure Socket Layer
  • HTTP – Hyper Text Transfer Protocol
  • LDAP – Lightweight Directory Access Protocol
  • SSH – Secure Shell
  • SMTP – Simple Mail Transfer Protocol
  • IHS – IBM HTTP Server
  • NNTP – Network News Transport Protocol
  • SNMP – Simple Network Management Protocol

Microsoft Office Graphic Features

ClipArt
Chart
New Chart
Organization Chart
SmartArt
Equation
New Equation
Icons / Scalable Vector Graphics (SVG)
3D Model / 3D images
WordArt
---
Sort and Filter
Advanced Filter
Slicer

Easy Ways to Overline Text in Word

You shall already know the method to underline text in Microsoft Office Word. But addition to this, you may also have the demand to overline or overbar specified characters sometimes. For example, if you want to enter an average number in a mathematical document, a short line above a given variable is necessary.

In this post, you will get several simple methods based on Microsoft Word.
  1. Insert Shapes

The most direct way is to draw a line over the specified text.
  1. Click Insert – Shapes. Find the icon of straight line in Lines.
  2. Select it. Drag your cursor to draw a straight line over the text.
  3. Then you can choose the color and effect of the line you drew.
  4. The bright spot of this method is the high degree of freedom. You can draw any kind of line in anywhere you want.
  5. Finish.
  1. Borders

You can also regard the overline as a part of a border.
  1. First, select the text and find the icon of Borders in Home tab.
  2. Click the small triangle beside it to see the drop-down list, choose Top Border.
  3. Then a overline is added to the whole row.
  4. Adjusting the width of it requires you to use the horizontal Ruler. You can enable it by checking Ruler in View tab.
  5. Put your cursor at the row of the text you want to overline. Then drag the small triangle on the ruler to adjust the length of the line.
  6. Finish.
  1. Equation Editor

You can also use Equation Editor to insert overline to your text.
  1. Click Insert – Equations to enable the Equation Tools in Design, and a textbox will be added to your document.
  2. Click Accent in Design (Equation Tools) tab, select Bar in Accent or Overbar in Overbars and Underbars.
  3. Then the underline will be inserted in the equation textbox. You can click the dotted pane to input any text you want.
  1. Using a Field Code

  1. First, we’ll show you how to use a field code to apply overlining to text. Open an existing or new document in Word and place the cursor where you want to put the text with overlining. Press “Ctrl + F9” to insert field code brackets, which are highlighted in gray. The cursor is automatically placed in between the brackets.
  2. Enter the following text between the brackets.    EQ \x \to()
    • NOTE: There is a space between “EQ” and “\x” and between “\x” and “\to()”. “EQ” is the field code used to create an equation and the “\x” and “\to” are switches used to format the equation or text. There are other switches you can use in the EQ field code, including ones that apply bottom \bo, right \ri, left \le, and box borders to the equation or text.
  3. Put the cursor between the parentheses and enter the text you want to overline.
  4. To display this as text rather than a field code, right-click anywhere in the field code and select “Toggle Field Codes” from the popup menu.
  5. The text you entered into the field code displays with a line above it. When the field code displays as normal text, you can highlight it and apply various formatting to it, such as font, size, bold, color, etc.
    • NOTE: To display the field code again, simply right-click in the text and select “Toggle Field Codes” again. When you put the cursor in text generated from using a field code, the text is highlighted in gray, just like the field code.
  6. If you want the line to extend beyond either end of the text, add spaces when entering the text into the field code inside the parentheses. This is useful for creating lines with names under them for signing official documents.
    • NOTE: Field codes work in all versions of Word, for both Windows and Mac.
  7. Finish.
referensi:
https://www.howtogeek.com/ 
https://bettersolutions.com/

Related Topics:

JavaScipt String function and features


String

String Quotes

Strings can be enclosed within either single quotes, double quotes.


Backtick quotes

  • process expression

  • process function

  • multi line


Special characters



Accessing characters

Notes:
The only difference between them is that if no character is found, [] returns undefined, and charAt returns an empty string.

iterate character by character



String length



Changing the case




Searching for a substring

str.indexOf

  • returns the position where the match was found
  • -1 if nothing can be found.

str.lastIndexOf(substr, position)
There is also a similar method str.lastIndexOf(substr, position) that searches from the end of a string to its beginning. It would list the occurrences in the reverse order.

includes

The more modern method str.includes(substr, pos) returns true/false depending on whether str contains substr within. It’s the right choice if we need to test for the match, but don’t need its position

str.startsWith and str.endsWith


Sunday, June 7, 2020

JavaScript Quiz Game 1

Requirement:

quiz.html
quiz.js
quiz.css

quiz.html file code:

<div id="quiz"></div>
<button id="submit">Get Results</button> 
<div id="results"></div>

quiz.css file code:

body{
font-size: 20px;
font-family: sans-serif;
color: #333;
}
.question{
font-weight: 600;
}
.answers {
margin-bottom: 20px;
}
#submit{
font-family: sans-serif;
font-size: 20px;
background-color: #297;
color: #fff;
border: 0px;
border-radius: 3px;
padding: 20px;
cursor: pointer;
margin-bottom: 20px;
}
#submit:hover{
background-color: #3a8;
}

quiz.js file code: 

var quizContainer = document.getElementById('quiz');
var resultsContainer = document.getElementById('results');
var submitButton = document.getElementById('submit');

var myQuestions = [
    {
        question: "What is 10/2?",
        answers: {
            a: '3',
            b: '5',
            c: '115'
        },
        correctAnswer: 'b'
    },
    {
        question: "What is 30/3?",
        answers: {
            a: '3',
            b: '5',
            c: '10'
        },
        correctAnswer: 'c'
    }
];


generateQuiz(myQuestions, quizContainer, resultsContainer, submitButton);
 
function generateQuiz(questions, quizContainer, resultsContainer, submitButton){   
  function showQuestions(questions, quizContainer){ 
	// we'll need a place to store the output and the answer choices
	var output = [];
	var answers;

	// for each question...
	for(var i=0; i<questions.length; i++){
		
		// first reset the list of answers
		answers = [];

		// for each available answer to this question...
		for(letter in questions[i].answers){

			// ...add an html radio button
			answers.push(
				'<label>'
					+ '<input type="radio" name="question'+i+'" value="'+letter+'">'
					+ letter + ': '
					+ questions[i].answers[letter]
				+ '</label>'
			);
		}

		// add this question and its answers to the output
		output.push(
			'<div class="question">' + questions[i].question + '</div>'
			+ '<div class="answers">' + answers.join('') + '</div>'
		);
	}

	// finally combine our output list into one string of html and put it on the page
	quizContainer.innerHTML = output.join('');
  }   function showResults(questions, quizContainer, resultsContainer){ 
	// gather answer containers from our quiz
	var answerContainers = quizContainer.querySelectorAll('.answers');
	
	// keep track of user's answers
	var userAnswer = '';
	var numCorrect = 0;
	
	// for each question...
	for(var i=0; i<questions.length; i++){

		// find selected answer
		userAnswer = (answerContainers[i].querySelector('input[name=question'+i+']:checked')||{}).value;
		
		// if answer is correct
		if(userAnswer===questions[i].correctAnswer){
			// add to the number of correct answers
			numCorrect++;
			
			// color the answers green
			answerContainers[i].style.color = 'lightgreen';
		}
		// if answer is wrong or blank
		else{
			// color the answers red
			answerContainers[i].style.color = 'red';
		}
	}

	// show number of correct answers out of total
	resultsContainer.innerHTML = numCorrect + ' out of ' + questions.length;
  }   // show the questions 
 showQuestions(questions, quizContainer); 

 // when user clicks submit, show results 
 submitButton.onclick = function(){ 
   showResults(questions, quizContainer, resultsContainer); 
  } 
}
Reference:
https://simplestepscode.com/
http://w3schools.com/
https://codewithawa.com/

PHP CRUD dengan MySQL database

Aplikasi: Daftar Kontak Sederhana, Buku Alamat

CRUD (Create, edit, update and delete) posts

Kebutuhan:

  • PHP
  • MySQL
    • database: crud.
    • table: info.
    • field:
      • id - int(11)
      • name - varchar(100)
      • address - varchar(100).
 index.php :

<!DOCTYPE html>
<html>
<head>
    <title>CRUD: CReate, Update, Delete PHP MySQL</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
    <form method="post" action="server.php" >
        <div class="input-group">
            <label>Name</label>
            <input type="text" name="name" value="">
        </div>
        <div class="input-group">
            <label>Address</label>
            <input type="text" name="address" value="">
        </div>
        <div class="input-group">
            <button class="btn" type="submit" name="save" >Save</button>
        </div>
    </form>
</body>
</html>
styles.css :

body {
    font-size: 19px;
}
table{
    width: 50%;
    margin: 30px auto;
    border-collapse: collapse;
    text-align: left;
}
tr {
    border-bottom: 1px solid #cbcbcb;
}
th, td{
    border: none;
    height: 30px;
    padding: 2px;
}
tr:hover {
    background: #F5F5F5;
}

form {
    width: 45%;
    margin: 50px auto;
    text-align: left;
    padding: 20px;
    border: 1px solid #bbbbbb;
    border-radius: 5px;
}

.input-group {
    margin: 10px 0px 10px 0px;
}
.input-group label {
    display: block;
    text-align: left;
    margin: 3px;
}
.input-group input {
    height: 30px;
    width: 93%;
    padding: 5px 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid gray;
}
.btn {
    padding: 10px;
    font-size: 15px;
    color: white;
    background: #5F9EA0;
    border: none;
    border-radius: 5px;
}
.edit_btn {
    text-decoration: none;
    padding: 2px 5px;
    background: #2E8B57;
    color: white;
    border-radius: 3px;
}

.del_btn {
    text-decoration: none;
    padding: 2px 5px;
    color: white;
    border-radius: 3px;
    background: #800000;
}
.msg {
    margin: 30px auto;
    padding: 10px;
    border-radius: 5px;
    color: #3c763d;
    background: #dff0d8;
    border: 1px solid #3c763d;
    width: 50%;
    text-align: center;
}

Aplikasi To-do list Dengan PHP dan MySQL

Kebutuhan:

  • database MySQL: todo.
  • table: tasks.
  • Field: id - int(10), task - varchar(255).
  • File: index.php, style.css.

index.php file:

<?php
    // initialize errors variable
    $errors = "";

    // connect to database
    $db = mysqli_connect("localhost", "root", "", "todo");

    // insert a quote if submit button is clicked
    if (isset($_POST['submit'])) {
        if (empty($_POST['task'])) {
            $errors = "You must fill in the task";
        }else{
            $task = $_POST['task'];
            $sql = "INSERT INTO tasks (task) VALUES ('$task')";
            mysqli_query($db, $sql);
            header('location: index.php');
        }
    }
 
 
// delete task
if (isset($_GET['del_task'])) {
    $id = $_GET['del_task'];

    mysqli_query($db, "DELETE FROM tasks WHERE id=".$id);
    header('location: index.php');
}
?>
<!DOCTYPE html>
<html>
<head>
    <title>ToDo List Application PHP and MySQL</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
    <div class="heading">
        <h2 style="font-style: 'Hervetica';">ToDo List Application PHP and MySQL database</h2>
    </div>
    <form method="post" action="index.php" class="input_form">
<?php if (isset($errors)) { ?>
    <p><?php echo $errors; ?></p>
<?php } ?>
        <input type="text" name="task" class="task_input">
        <button type="submit" name="submit" id="add_btn" class="add_btn">Add Task</button>
    </form>

<table>
    <thead>
        <tr>
            <th>N</th>
            <th>Tasks</th>
            <th style="width: 60px;">Action</th>
        </tr>
    </thead>

    <tbody>
        <?php
        // select all tasks if page is visited or refreshed
        $tasks = mysqli_query($db, "SELECT * FROM tasks");

        $i = 1; while ($row = mysqli_fetch_array($tasks)) { ?>
            <tr>
                <td> <?php echo $i; ?> </td>
                <td class="task"> <?php echo $row['task']; ?> </td>
                <td class="delete">
                    <a href="index.php?del_task=<?php echo $row['id'] ?>">x</a>
                </td>
            </tr>
        <?php $i++; } ?>   
    </tbody>
</table>

</body>
</html>

style.css file :

.heading{
    width: 50%;
    margin: 30px auto;
    text-align: center;
    color:     #6B8E23;
    background: #FFF8DC;
    border: 2px solid #6B8E23;
    border-radius: 20px;
}
form {
    width: 50%;
    margin: 30px auto;
    border-radius: 5px;
    padding: 10px;
    background: #FFF8DC;
    border: 1px solid #6B8E23;
}
form p {
    color: red;
    margin: 0px;
}
.task_input {
    width: 75%;
    height: 15px;
    padding: 10px;
    border: 2px solid #6B8E23;
}
.add_btn {
    height: 39px;
    background: #FFF8DC;
    color:     #6B8E23;
    border: 2px solid #6B8E23;
    border-radius: 5px;
    padding: 5px 20px;
}

table {
    width: 50%;
    margin: 30px auto;
    border-collapse: collapse;
}

tr {
    border-bottom: 1px solid #cbcbcb;
}

th {
    font-size: 19px;
    color: #6B8E23;
}

th, td{
    border: none;
    height: 30px;
    padding: 2px;
}

tr:hover {
    background: #E9E9E9;
}

.task {
    text-align: left;
}

.delete{
    text-align: center;
}
.delete a{
    color: white;
    background: #a52a2a;
    padding: 1px 6px;
    border-radius: 3px;
    text-decoration: none;
}
Referensi:
https://codewithawa.com/
https://www.bitdegree.org/