Monday, September 14, 2015

How to make gulp work on Windows?


After trying so many options, finally this worked for me.
  1. Install gulp globally.
    npm install -g gulp
  2. Install gulp locally in the project.
    npm install gulp
  3. Add below line inside scripts in your package.json
    "scripts" {
         "gulp": "gullp"
    }
  4. Run gulp.
    npm run gulp
For other tasks, do something like
npm run gulp -- build

or for example
npm run gulp -- scripts 


Saturday, September 12, 2015

eLearning Authoring Tool Comparison



Legend
1 - Most preferred
4 - Least preferred
Feature
Captivate 8
Lectora
Articulate
Studio '13
Storyline
Custom HTML5
Price
1
3
2
2
4
Ease of use
3
2
1
1
4
Graphics capability
2
3
1
2
1
Animations
2
4
1
2
4
Interactivity
3
2
1
1
1
Quizzing
3
1
2
2
1
Power/flexibility
2
2
3
2
1
ADA/Accessibility
2
1
3
2
1
Mobile
1
3
2
2
1
Software simulations
1
3
4
1
2
Audio/Video Syncing
2
4
2
2
3
IE8 Support
NA
2
2
1
1
HTML5 Support
2
2
2
2
1
PowerPoint Source 
3
3
1
2
4

eLearning industry is evolving and so is the list of the authoring tools. There was a time when Flash was everyone's favorite and now it is the most hated one and everyone sees it going to death. 

This comparison summarizes my experience with the tools. I may be biased in some cases such as I favor HTML5 because of its reach on mobile devices. For example Captivate 8 provides IE8 support also but not along with responsive content. You can have only one at a time i.e. either IE8 support or responsive. So, IE8 support does not make sense to me at this point of time.

Adobe Captivate 8

  • Pros
    • HTML5 output
    • Responsive design support
    • Best suited for software simulations
    • Timeline based
    • SCORM support
    • Imports PowerPoint as source
  • Cons
    • Learning curve
    • Responsive content does not support IE8

Articulate Studio ’13

  • Pros
    • HTML5 output
    • Uses PowerPoint as source file
    • Graphics and animations using PowerPoint capability
    • SCORM support
    • Quick translation
  • Cons
    • No official support from Articulate for third party mobile apps (such as SumTotal app) 
    • Not responsive

Storyline 2

  • Pros
    • HTML5 output
    • Easy to use
    • Interactive templates
    • Software simulations
    • Timeline based
    • SCORM support
    • Quick translation
    • Imports PowerPoint as source
  • Cons
    • Not responsive
    • HTML5 output can be with some glitches
    • No official support from Articulate for third party mobile apps (such as SumTotal app) 

Lectora 12

  • Pros
    • HTML output
    • Interactivities
    • Customization with JavaScript
    • SCORM support
    • Quick translation
    • Imports PowerPoint as source
  • Cons
    • Limited graphics and animation
    • Not responsive
    • Learning curve

Custom HTML5

  • Pros
    • HTML5 output 
    • High level of control 
    • No dependency on proprietary tools
    • SCORM support
    • Quick translation
  • Cons
    • High initial cost as almost everything to be built from scratch
    • Separate tool requirement for graphics and animations
    • Learning curve
    • Does not use PowerPoint as source

Wednesday, July 15, 2015

Got just 1 Minute to Get Started Quickly with NPM?


  • Install nodejs from http://nodejs.org/
  • Install less to compile use less and compile it into a CSS file. Command:
    npm install -g less
  • Command to compile .less files into .css:
    lessc styles.less > styles.css
  • Create a package.json file. Go the project root folder and run command:
    npm init
    Answer the questions it asks or just use the default options to get started. This json file is used to store information about frameworks, their versions, etc. used in the project in current folder. This is also used by Grunt and Gulp for automation.
  • Install required packages to use in the project. You have three ways to install packages.
    • Install in the current project folder without using any options.
    • Install globally using -g or -global option.
      npm install -g cordova
    • Create devDependencies section / property inside the package.json file. Use option:
      --save-dev
Example package.json:
{
  "name": "grvgl",
  "version": "0.0.0",
  "description": "sample",
  "main": "app/index.html",
  "scripts": {
    "test": "test"
  },
  "author": "",
  "license": "ISC"
}

Sunday, November 02, 2014

How to Extract Subtitles from a YouTube Video

Enter Your YouTube Video-ID: (example Video-ID)

You can even develop your own solution using the details at https://developers.google.com/youtube/2.0/developers_guide_protocol_captions?hl=en

Some more options are provided below.

Download subtiles in .srt format: http://keepsubs.com/

To view the subtitles in browser, use this link - http://video.google.com/timedtext?lang=en&v=VIDEO-ID Replace the VIDEO-ID with actual video id. For exmaple - http://video.google.com/timedtext?lang=en&v=uW-O6Th5Z9Q This link shows the subtitles in XML format with time stamp. To get rid of the time stamps and just have the plain transcript:

  1. Open up Microsoft Excel
  2. Copy paste the subtitles inside one cell
  3. Press Ctrl+H
  4. In the Replace dialogue box
    1. Type <*> in the Find What text box 
    2. Leave the Replace With  text box  blank
    3. Click Replace All. 
This will remove all XML tags from the original text.

Friday, October 10, 2014

Vim Commands Cheatsheet

Some great Vim commands are listed at Best of Vim Tips.

Moving the Cursor
  • h Move cursor left
  • l Move cursor right
  • k Move cursor up
  • j Move cursor down
  • nG Move cursor to line n
  • $ Move cursor to end of current line
  • 0 Move cursor to beginning of current line
  • w Move cursor forward one word
  • b Move cursor backward one ward
  • fc Move forward to c
  • Fc Move back to c
  • H Move to top of screen
  • M Move to middle of screen
  • L Move to bottom of screen
  • % Move to associated ( ), { }, [ ]
  • ( Move a sentence back
  • ) Move a sentence forward
  • { Move a paragraph back
  • } Move a paragraph forward
Save & Exit
  • :q Quit Vim (fails when changes have been made)
  • :q! Quit without saving
  • :cq Quit always, without saving
  • :w Save current file
  • :w [filename] Save current file as [filename]
  • :wq Save current file and exit
  • :wq! Save current file and exit always
  • :wq [filename] Save to [filename], exit if not editing the last
  • :wq! [filename] Save to [filename] and exit always
  • :[range] wqSave only lines in [range] and exit
  • ZZ Save current file, if modified, and exit
  • ZQ Quit current file and exit
Editing a File
  • :e Edit the current file
  • :e! Edit the current file always, discard any changes to current buffer
  • :e [filename] Edit [filename]
  • :e! [filename] Edit [filename] always, discard any changes to current buffer
  • gf Edit the file whose name is under or after the cursor
Working with multiple files
  • :e [filename] edit a file in a new buffer
  • :bnext or :bn go to the next buffer
  • :bprev or :bp go to the previous buffer
  • :bd delete a buffer (close a file)
  • :sp [filename] open a file in a new buffer and split window
  • :vsp [filename] open a file in a new buffer and vertically split window
  • Ctrl + ws split window
  • Ctrl + ww switch windows
  • Ctrl + wq quit a window
  • Ctrl + wv split window vertically
  • Ctrl + wh move cursor to next buffer (right)
  • Ctrl + wl move cursor to previous buffer (left)
Tabs
  • :tabnew [filename] or :tabn [filename] open a file in a new tab
  • Ctrl + wt move the current split window into its own tab
  • gt or :tabnext or :tabn move to the next tab
  • gT or :tabprev or :tabp move to the previous tab
  • #gt move to tab number #
  • :tabmove # move current tab to the #th position (indexed from 0)
  • :tabclose or :tabc close the current tab and all its windows
  • :tabonly or :tabo close all tabs except for the current one
Inserting Text
  • a Append text after the cursor
  • A Append text at the end of the line
  • i Insert text before the cursor
  • I Insert text before the first non-blank in the line
  • o Begin a new line below the cursor and insert text
  • O Begin a new line above the cursor and insert text
Inserting a File
  • :r [name] Insert the file [name] below the cursor
  • :r ![cmd] Execute [cmd] and insert its standard output below the cursor
Deleting Text
  • x Delete characters under and after the cursor
  • X Delete characters before the cursor
  • d Delete text that [motion] moves over
  • dw Delete word from cursor on
  • db Delete word backward
  • d$ Delete to end of line
  • dd Delete lines
  • D Delete the characters under the cursor until the end of the line
Yank (to copy)
  • yy Yank current line
  • y$ Yank to end of line from cursor
  • yw Yank from cursor to end of current word
  • nyy Yank n lines
Put (or paste)
  • p Paste below cursor
  • P Paste above cursor
  • u Undo last change
  • U Restore line
  • J Join next line down to current line
Substitute (Replace)
  • :s/pattern/string/flags Replace pattern with string according to flags in current line only.
  • :%s/pattern/string/flags Replace pattern with string according to flags in all lines.
  • g Flag - Replace all occurrences of pattern
  • :%s/\<pattern\>/string/g Change only whole words exactly matching 'pattern' to 'string'
  • c Flag - Confirm replaces. 
  • :%s/pattern/string/gc Change each pattern to string, but ask for confirmation first.
  • & Repeat last :s command
Visual commands
  • > shift text right
  • < shift text left
  • y yank (copy) marked text
  • d delete marked text
  • ~ switch case
Other Useful Commands
  • . Repeat last command
  • cw Change current word to new word
  • r Replace one character at the cursor position
  • R Begin overstrike or replace mode
  • :/ [pattern] Search forward for [pattern]
  • :? [pattern] Search backward for [pattern]
Regular Expressions
  • . Any single character except newline
  • * zero or more occurances of any character
  • [...] Any single character specified in the set
  • [^...] Any single character not specified in the set
  • ^ Anchor - beginning of the line
  • $ Anchor - end of line
  • \< Anchor - begining of word
  • \> Anchor - end of word
  • \(...\) Grouping - usually used to group conditions

Tuesday, July 01, 2014

Do you really need jQuery?

Very few people realize that modern browsers are much more consistent than they were in IE8 era.

No doubt, jQuery is great at what it does. Use it if it makes your job easy such as DOM manipulation. On the other hand, if you are developing anything that you plan to use across projects such as a framework or library, you may want to consider dropping jquery. When all you need is just few things that jQuery offers as utility, you may want to write the utility code, perhaps in a utils file or something similar. youmightnotneedjquery.com provides great JavaScript alternatives to jQuery.

A good option will be to add AngularJS in your kitty instead, it has futuristic approach, defaults to browser provided feature, if available. Yes, it is an opinionated framework defining most of the things how they should be done, the Angular way. So, may be intimidating at first, but worth it to learn and then be productive on the app instead.

Friday, May 02, 2014

How to Reduce Load Time and Make Fast Loading Web Pages

These are some tips and best practices for quick reference to reduce load time and have fast loading web pages.

  1. Content/Client side:
    1. Optimize image size.
      1. Use GIF format for images with few colors like logos.
      2. Use JPEG format for images with lots of colors and details such as photographs.
      3. Use PNG format for high quality transparent images.
      4. Use text in image only if it is really required.
      5. Specify image dimensions to avoid reflow once the images are downloaded. But, do not scale Down images as original file size will still download, even if the image is shown in smaller dimensions on the screen.
    2. Make Fewer HTTP Requests.
      1. Use CSS sprites to reduce the number of image requests.
      2. Use image maps instead of multiple images for interactive content.
      3. Use inline images (data: URL scheme) to embed the image data in CSS file.
      4. Combine scripts and stylesheets.
      5. You may embed JavaScript and CSS in the HTML document to further reduce the number of requests.
    3. Use a CDN (Content Delivery Network) for open source libraries such as jQuery etc.
    4. Minify JavaScript and CSS files.
    5. Put stylesheets in the HEAD tag to allow the page render progressively.
    6. Put Scripts at the bottom just before the closing body tag. This makes the page appear faster by avoiding the problem caused by blcoking parallel downloads.
    7. Avoid CSS expressions or 
      1. Reduce the number of evaluations by using one time calculations.
      2.  Use event handlers instead of CSS expressions.
    8. Make JavaScript and CSS external and that should get picked from cache next time in most of the cases. However, it may not be helpful if the server does not allow cache at all. 
    9. Reduce the number of DNS lookups by reducing the number of unique website names. However, this will also  reduce number of parallel downloads resulting in increased response time. So, you need to find a balance here. 2-4 domains should be a good balance between DNS lookup and parallel downloads.
    10. Minimize redirects.
    11. Remove duplicate scripts.
    12. Preload components while the browser is idle.
    13. Make AJAX cacheable.
    14. Reduce the number of DOM elements.
    15. Minimize the number of iframes as it blocks page onload.
    16. Use GET only if you are retrieving data. If you are only sending data, use POST.
    17. Use event delegation to attach event to the wrapper div.
    18. Use CSS instead of tables.
    19. Remove query strings from static content. A link cannot be cached with a "?" in its URL even if a Cache-control: public header is present. It acts same as Ctrl+F5.
    20. Specify a character set to speed up browser rendering.
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    21. Avoid multiple tracking scripts.
  2. Server:
    1. Use a CDN (Content Delivery Network)
    2. Add Expires or Cache Control Header.
    3. Configure the server to return Gzipped files/components.
    4. Configure ETags  or remove the ETag to make use of Last-Modified header validation based on the component's timestamp.
    5. Flush the Buffer Early. Such as for php
      </head>
      <?php flush(); ?>
      <body>
    6. Use GET only if you are retrieving data. If you are only sending data, use POST.
    7. Reduce cookie size.
    8. Update CMS software if you are using one.
    9. Switch off the plugins that you do not use.

Thursday, February 13, 2014

Software Design Patterns - MBS Pattern (ActionScript)

MBSPattern is a framework that provides an intuitive way to use design patterns.
  • At the application level, MBS is an MVC implementation with an approach to match with MBS naming conventions of the Mind, Body, Soul triad (Soul -> Mind -> Body => Source -> Connection -> Result).
  • MBSPattern is a collection of design patterns with their generic definitions.
  • MBSPattern uses naming conventions that are based on design patterns. That provides a consistent terminology to develop across the technologies.
  • It provides a cosistent way to harness the inherent capabilities of the languages.
MBS broadly categorizes design patterns into three types.
MBS at the core level:
Mind: Behaviour (Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor)
Body: Structure (Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy)
Soul: Creation (Abstract Factory, Builder, Factory, Prototype, Singleton)
MBS aims to develop a convenient way to getting started with development using design patterns. It provides a collection of design patterns to use in projects that should be easy to understand and use.
MBS – basic structure at the core level:
MBS categories the design patterns into three parts. There is also a fourth part that puts mind, body and soul into action. Name of the package is action.
MBSPattern code resides in com.shivolve.mbs package. Core design patterns exist in three packages mind body and soul . There is a fourth action package to utilize the in-built features of the language.
  • com.shivolve.mbs.as3.mind contains behavioral patterns. Use these patterns to think and guide behaviour.
  • com.shivolve.mbs.as3.body contains structural patterns. Use these patterns to make thigns with form and structure.
  • com.shivolve.mbs.as3.soul contains creational patterns. Use these patterns to inspire creativity.
  • com.shivolve.mbs.as3.action contains classes that utilize the inheret capabilities of the language. Extend or use the in-build language specific classes in this package.
MBSActionScript
MBSNotificationEvent
MBSNotifierEventDispatcher
MBS categorizes design patterns in three parts - form (body), source (soul) and behaviour (mind). Each Soul can have multiple bodies. Its the base of the application.
Each body has at least one mind.
MBS – basic structure at the applicatin level: MBS corresponds to MVC at the application level.
  • Mind:
    • Control (Strategy, Command)
    • Handles application logic, user interaction and updates Model
    • Has reference of the Soul
  • Body:
    • View (Observer, Context)
    • Handles display / communication
    • User interface with current application state
    • Has a reference of Mind (Control) and Soul (Model)
  • Soul:
    • Model (Subject)
    • Handles data storage and maintains application states
    • Does not have any reference of Mind (Control) or Body (View)
MBS vs MVC:
  • MBS, much like MVC, categorises things in three parts - mind (controller), body (view), soul (model).
  • MBS, unlike MVC, recognizes these three divisions of mind, body and soul in all the areas. For example, a component of body can also have its own mind, body and soul.
MVC design pattern can be refactored into MBS as below.
  • Mind -> ControlMind (controller) coordinates between body (view) and soul (model).
  • Body -> ViewBody (view) is visible to all and some parts of the body (view) can be a window to the soul (model).
  • Soul -> ModelFor a general understanding, as we know from our general knowledge Soul (Model) is something we refer to. Soul (model) does not refer to us (view or control) for its business.
One of the many ways design patterns can be used at the application level:
Observer Pattern: SOUL is SUBJECT and BODY is OBSERVER.
Strategy Pattern: BODY is CONTEXT and MIND is STRATEGY.
Composite Pattern: BODY contains Components and COMPOSITE nodes.
Responsibilities:
Mind handles user input and changes the state of the application in the Soul
Body contains user interface and displayes the state of the application
Soul contains application data and logic to manage the state of the application
Benefits:
  • Provides a way to use the inherent language capabilities right at the root of the framework (com.shivolve.as3.mbs.action ).
  • Provides a clear separation between technology specific details from pure design pattern related, independent of technology, details.
    • com.shivolve.as3.mbs.action package contains the code to utilize the inherent capabilities of the Action Script 3 language.
    • com.shivolve.as3.mbs.mind com.shivolve.as3.mbs.body andcom.shivolve.as3.mbs.soul packages contain the design pattern definitions.
  • Uses generic terminology (like Mind, Body and Soul) that everybody can understand and it becomes easy to get started.
Implementation Details:
  1. User interacts with an application body part. For example clicks a button in the body.
  2. The Body sends the click event to the Mind to handle it.
  3. The Mind updates the Soul based on its own decision to handle the button click.
  4. The Soul updates itself and tells the Body that the state of the soul has now changed.
  5. The Body observes the state information from the Soul and updates itself.
OOPs:
Use Inheritance to cut down on redundancy of methods doing same thigs.
Use Abstraction by implementing the solution independent of the details. Add the details just when they are required.
Use Encapsulation to build the application as combination of modules and components.
Use Encapsulation by using getters and setters. Use private variables for the details you want to hide.
Use Polymorphism to implement abstract methods in multiple sub-classes. Polymorphism allows you to avoid using switch or if statements.

Interface vs. Abstract classes

Use abstract classes for the ability to add more behaviors easily. Use interfaces to avoid base class if there not anything other classes should inherit.
Philosophy:
Object oriented programming models the real world. MBS programming uses mind, body, soul concepts to model the real world.
MBSPattern, at the core, is a collection of design patterns categorized as mind, body or soul. This is an attempt to feel at home by using Mind, Body, Soul perspective. Mind, Body and Soul form the universal triad. This being so evolutionary does not force to live to constraints to new definitions every time.
  • Thinking of Control, View, Model as Mind, Body and Soul feels great.
  • Application souls, minds and bodies extend the MBS Soul, Mind and Body.
    (All the souls extend the One Higher Soul. All the Bodies are an extension of His Body. Only That Mind works in all the minds.)
  • Classes within the mbs.action package extend the language specific built-in classes to utilize the inherent capabilities of the language (Action Script 3 in case of MBS_AS3).
MBS vs MVC:
  • Mind vs Control -> Mind understands. To understand is the best way to control. Mind refers to soul. Directs the body.
  • Body vs View -> Body has a form. It can be seen and heard. Body is there to see, touch, hear and feel.
  • Soul vs Model -> Soul is the best model to refer to. Soul is independent, inherent, omnipresent. Mind and Body can not ignore Soul.
You should find it useful in the long run and also if you have to change from one technology to other. Mind, Body, Soul relate more to life and our thinking patterns from any walk of life.

Thursday, January 23, 2014

Pros and Cons of Bootstrap

Pros
  • Works in all modern browsers
  • Normalizes many little CSS annoyances
  • Lightweight
  • Customizable
  • Encourages use of LESS CSS (http://lesscss.org)
  • Gives consistency
  • Many starter templates available
  • Integrated with jQuery
  • Comes with some jQuery plugins
  • Some jQuery plugins now offer Bootstrap theming
Cons
  • Less originality
  • Limited jQuery plugins. Certainly, you can integrate your own; find other 3rd party controls, etc. But out of the box, you are missing the heavy-hitters, like grids, tree views, drag and drop, etc.
  • Weak for complex data entry forms
  • Naming conventions and semantics are mediocre. Example: using the <i> tag for icons. Class names like "pull-right".
  • It's very customizable, but inevitably many sites start looking alike (just like WordPress—consider how many blog sites look the same).

Thursday, November 14, 2013

Articulate Storyline: SCORM Reporting from WebObject to LMS

The sample zip file posted here in articulate community contains an example of WebObject sending SCORM variable to LMS. Published output has two javascript files. WebObject uses these two files.
  1. story_content/custom.js: This file acts as bridge between Storyline variables and WebObject. WebObject uses custom.js file to communicate with LMS and also to update the Storyline variables on slide for display.
  2. webobject/scripts/main.js: WebObject uses main.js for all its internal logics. 

// custom.js
// JavaScript Document

var findAPITries = 0;
var lmsAPI;
var gameScore = 0;

function findAPI(win){
while ((win.objLMS == null) && (win.parent != null) && (win.parent != win))
{
findAPITries++;
// Note: 7 is an arbitrary number, but should be more than sufficient
if (findAPITries > 7) 
{
alert("Error finding API -- too deeply nested.");
return null;
}
win = win.parent;
}
return win.objLMS;
}
function getAPI()
{
   var theAPI = findAPI(window);
   if ((theAPI == null) && (window.opener != null) && (typeof(window.opener) != "undefined"))
   {
      theAPI = findAPI(window.opener);
   }
   if (theAPI == null)
   {
    if (_Debug) // BMD added
      alert("Unable to find an API adapter");
   }
   return theAPI
}
function init(){
lmsAPI = getAPI();
}
function GetPlayer()
{
var player = parent.GetPlayer();
return player;
}
function setVariable(varName, varValue){
var player = GetPlayer();
player.SetVar(varName, varValue);
setScormScore();
}
function getVariable(varName){
var player = GetPlayer();
gameScore = player.GetVar(varName);
console.log("gameScore=" + gameScore);
console.log("cmi.core.score.raw=" + getScormScore());
}
function setScormScore(){
var blnResult;
blnResult = lmsAPI.SetScore(gameScore, 100, 0);
console.log("Returning " + blnResult);
return blnResult;
}
function getScormScore(){
var sLearnerScore = lmsAPI.GetScore();
return sLearnerScore;
}
init();
// custom.js ends here
------------------------------------
// main.js
// JavaScript Document

function setGameScore(score){
gameScore = score;
setVariable("gameScore", gameScore);
}
function getGameScore(){
getVariable("gameScore");
}

Tuesday, March 19, 2013

Tips to Avoid Issues with CreateJS JavaScript Library

  • Remove any blank key frames in the fla. Do not leave any blank key frames in the Flash file. This can save a lot of your time later. Blank key frames can even create issues somewhere else in the application and keep you scratching your head for hours.
  • In motion tweens, ensure that both start and end key frames have the same symbol type i.e. either both key frames have graphic symbol or both key frames have movie clip symbol.
Still, if you are facing weird problems in the app and everything else looks great logically try this weird solution - distribute motion tweens across layers to have only one tween per layer. I know this can be really weird for big apps but if everything else has failed there is no harm in trying luck :-)

Some other worth noting points are:
  • Flash CreateJS plugin converts dynamic text fields to static text.
  • Frames are index based i.e. the frame number starts with 0, not 1.
  • If same text field has both bold and italic text, fla file will not publish. Do not do this in Flash if you have to export the file using CreateJS later. Do this later in JavaScript/CSS.
  • Sometimes, CreatejJS includes unexpected line breaks in the code. But, this is probably the first thing you will notice when testing in browser. You can also check your application JavaScript  in Dreamweaver or some other good editor that highlights syntax errors.


Sunday, February 03, 2013

Windows Run Commands


To access the "Run" command:

  • Press Windows Key + R on the keyboard.
    or
  • Click "Start" button and then locate the "Run" textfield.

Run Commands:

  1. Accessibility Controls - access.cpl
  2. Accessibility Wizard - accwiz
  3. Add Hardware Wizard - hdwwiz.cpl
  4. Add/Remove Programs - appwiz.cpl
  5. Administrative Tools - control admintools
  6. Automatic Updates - wuaucpl.cpl
  7. Bluetooth Transfer Wizard - fsquirt
  8. Calculator - calc
  9. Certificate Manager - certmgr.msc
  10. Character Map - charmap
  11. Check Disk Utility - chkdsk
  12. Chrome - chrome
  13. Clipboard Viewer - clipbrd
  14. Command Prompt - cmd
  15. Component Services - dcomcnfg
  16. Computer Management - compmgmt.msc
  17. Control Panel - control
  18. Date and Time Properties - timedate.cpl
  19. DDE Shares - ddeshare
  20. Device Manager - devmgmt.msc
  21. Direct X Troubleshooter - dxdiag
  22. Disk Cleanup Utility - cleanmgr
  23. Disk Defragment - dfrg.msc
  24. Disk Management - diskmgmt.msc
  25. Disk Partition Manager - diskpart
  26. Display Properties - control desktop
  27. Display Properties - desk.cpl
  28. Dr. Watson System Troubleshooting­ Utility - drwtsn32
  29. Driver Verifier Utility - verifier
  30. Excel - excel
  31. Event Viewer - eventvwr.msc
  32. File Signature Verification Tool - sigverif
  33. Files and Settings Transfer Tool - migwiz
  34. Findfast - findfast.cpl
  35. Firefox - firefox
  36. Folders Properties - control folders
  37. Fonts - control fonts
  38. Fonts Folder - fonts
  39. Free Cell Card Game - freecell
  40. Game Controllers - joy.cpl
  41. Group Policy Editor (for xp professional) - gpedit.msc
  42. Hearts Card Game - mshearts
  43. Help and Support - helpctr
  44. HyperTerminal - hypertrm
  45. Iexpress Wizard - iexpress
  46. Indexing Service - ciadv.msc
  47. Internet Connection Wizard - icwconn1
  48. Internet Explorer - iexplore
  49. Internet Properties - inetcpl.cpl
  50. Keyboard Properties - control keyboard
  51. Local Security Settings - secpol.msc
  52. Local Users and Groups - lusrmgr.msc
  53. Logs You Out Of Windows - logoff
  54. Malicious Software Removal Tool - mrt
  55. Microsoft Chat - winchat
  56. Microsoft Movie Maker - moviemk
  57. Microsoft Paint - mspaint
  58. Microsoft Syncronization Tool - mobsync
  59. Minesweeper Game - winmine
  60. Mouse Properties - control mouse
  61. Mouse Properties - main.cpl
  62. Netmeeting - conf
  63. Network Connections - control netconnections
  64. Network Connections - ncpa.cpl
  65. Network Setup Wizard - netsetup.cpl
  66. Notepad - notepad
  67. Object Packager - packager
  68. ODBC Data Source Administrator - odbccp32.cpl
  69. On Screen Keyboard - osk
  70. Outlook Express - msimn
  71. Paint - pbrush
  72. Password Properties - password.cpl
  73. Performance Monitor - perfmon
  74. Performance Monitor - perfmon.msc
  75. Phone and Modem Options - telephon.cpl
  76. Phone Dialer - dialer
  77. Pinball Game - pinball
  78. Power Configuration - powercfg.cpl
  79. Printers and Faxes - control printers
  80. Printers Folder - printers
  81. Regional Settings - intl.cpl
  82. Registry Editor - regedit
  83. Registry Editor - regedit32
  84. Remote Access Phonebook - rasphone
  85. Remote Desktop - mstsc
  86. Removable Storage - ntmsmgr.msc
  87. Removable Storage Operator Requests - ntmsoprq.msc
  88. Resultant Set of Policy (for xp professional) - rsop.msc
  89. Scanners and Cameras - sticpl.cpl
  90. Scheduled Tasks - control schedtasks
  91. Security Center - wscui.cpl
  92. Services - services.msc
  93. Shared Folders - fsmgmt.msc
  94. Shuts Down Windows - shutdown
  95. Sounds and Audio - mmsys.cpl
  96. Spider Solitare Card Game - spider
  97. SQL Client Configuration - cliconfg
  98. System Configuration Editor - sysedit
  99. System Configuration Utility - msconfig
  100. System Information - msinfo32
  101. System Properties - sysdm.cpl
  102. Task Manager - taskmgr
  103. TCP Tester - tcptest
  104. Telnet Client - telnet
  105. User Account Management - nusrmgr.cpl
  106. Utility Manager - utilman
  107. Windows Address Book - wab
  108. Windows Address Book Import Utility - wabmig
  109. Windows Explorer - explorer
  110. Windows Firewall - firewall.cpl
  111. Windows Magnifier - magnify
  112. Windows Management Infrastructure - wmimgmt.msc
  113. Windows Media Player - wmplayer
  114. Windows Messenger - msmsgs
  115. Windows System Security Tool - syskey
  116. Windows Update Launches - wupdmgr
  117. Windows Version - winver
  118. Word - winword
  119. Wordpad - write

                                                                                                                                                                                                                                        Friday, July 20, 2007

                                                                                                                                                                                                                                        Common Cygwin Commands

                                                                                                                                                                                                                                        I am assuming that you also installed cygwin in c:\cygwin. Activate cygwin using below command in the command prompt.

                                                                                                                                                                                                                                        C:\>cygwin\cygwin

                                                                                                                                                                                                                                        CP
                                                                                                                                                                                                                                        Copy from here to there.
                                                                                                                                                                                                                                        $ cp -r path/fromDirectory path/toDirectory

                                                                                                                                                                                                                                        CURL
                                                                                                                                                                                                                                        Upload an archive at ftp location.
                                                                                                                                                                                                                                        $ curl -T archive.tgz ftp://localhost -u newuser

                                                                                                                                                                                                                                        GZIP
                                                                                                                                                                                                                                        List the content of an archive.
                                                                                                                                                                                                                                        $ gzip -l listContentsInMyFile.tar.gz

                                                                                                                                                                                                                                        INFO
                                                                                                                                                                                                                                        C:\>cygwin\cygwin
                                                                                                                                                                                                                                        $ info commandName

                                                                                                                                                                                                                                        MAN
                                                                                                                                                                                                                                        C:\>cygwin\cygwin
                                                                                                                                                                                                                                        $ man commandName

                                                                                                                                                                                                                                        RM
                                                                                                                                                                                                                                        Remove a file.
                                                                                                                                                                                                                                        rm -v filename.ext

                                                                                                                                                                                                                                        Remove a directory.
                                                                                                                                                                                                                                        rm -rv directory

                                                                                                                                                                                                                                        TAR
                                                                                                                                                                                                                                        C:\>c:\cygwin\bin\tar -cvf createdMyStuff_C_Drive.tar myStuff_C_Drive
                                                                                                                                                                                                                                        C:\>c:\cygwin\bin\tar -xvf extractMyStuff_C_Drive.tar

                                                                                                                                                                                                                                        Uses GZIP to compress the file. tar converts directory into a file. gzip just compresses a file.
                                                                                                                                                                                                                                        $ tar -cvzf backup.tgz directory
                                                                                                                                                                                                                                        c = create, v = verbose, z = compress with GZIP, f = archive name

                                                                                                                                                                                                                                        Extract the contents from the zip file.
                                                                                                                                                                                                                                        $ tar -xvzf backup.tgz 
                                                                                                                                                                                                                                        x = extract, v = verbose, z = use GZIP, f = archive name

                                                                                                                                                                                                                                        For better compression you can use below also.
                                                                                                                                                                                                                                        $ tar -cvjf backup.tar.bz2 directory

                                                                                                                                                                                                                                        Decompress the backup using below command.
                                                                                                                                                                                                                                        $ tar -xvjf backup.tar.bz2

                                                                                                                                                                                                                                        Friday, June 29, 2007

                                                                                                                                                                                                                                        Shivolve Custom Search

                                                                                                                                                                                                                                        Custom Search Box at http://open-source-is-open.blogspot.com/ shows search results from the selected sites on the criteria that they are having good content for self improvement. It is created using Google Custom Search.


                                                                                                                                                                                                                                        1. For displaying the search results in a new page use below code.


                                                                                                                                                                                                                                        Google Custom Search

                                                                                                                                                                                                                                        2. To show the search box and the search results in different blocks (usually div tag) use below code.
                                                                                                                                                                                                                                        2.1 Copy and paste below code at the place in your site where you want the search box to appear. You will need to change the page URL where you want the search results to appear. I wanted the search results to appear at http://open-source-is-open.blogspot.com/.




                                                                                                                                                                                                                                        2.1 Copy and paste the below code in the page where you want the search results to appear.



                                                                                                                                                                                                                                        Friday, May 04, 2007

                                                                                                                                                                                                                                        Valid ActionScript 3 classes

                                                                                                                                                                                                                                        This is one class in a package.

                                                                                                                                                                                                                                        //MyClass.as
                                                                                                                                                                                                                                        package com.blogspot.sourceOpenToAll
                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                        public class MyClass
                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                        public function MyClass()
                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                        ...
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                        These are two classes in same file. Notice that the private class is outside the package block.

                                                                                                                                                                                                                                        //MyClass.as
                                                                                                                                                                                                                                        package com.blogspot.sourceOpenToAll
                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                        public class classicClass
                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                        public function MyClass()
                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                        ...
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                        class MyPrivateClass
                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                        public function MyPrivateClass()
                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                        ...
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                        Sunday, April 29, 2007

                                                                                                                                                                                                                                        Installing CiviCRM 1.7 with Drupal

                                                                                                                                                                                                                                        I have Drupal installed in XAMPP on Windows Vista.

                                                                                                                                                                                                                                        Drupal is installed in 'drupal' database. CiviCRM installed in 'civicrm' database. XAMP creates a default user 'root' with blank password for any new database created in MySQL.

                                                                                                                                                                                                                                        I could follow the steps to install CiviCRM given at http://wiki.civicrm.org/confluence/display/CRMDOC/Install+CiviCRM+1.7+for+Drupal. However, changes to be made in civicrm.settings.php took some time. So, I am posting the code changes here.

                                                                                                                                                                                                                                        Drupal version, user... to be updated with below changes:
                                                                                                                                                                                                                                        define( 'CIVICRM_UF', 'Drupal');
                                                                                                                                                                                                                                        define( 'CIVICRM_UF_VERSION', '5.1');
                                                                                                                                                                                                                                        define( 'CIVICRM_UF_URLVAR', 'q');

                                                                                                                                                                                                                                        define( 'CIVICRM_UF_DSN', 'mysql://root:@localhost/drupal?new_link=true');

                                                                                                                                                                                                                                        CiviCRM related:
                                                                                                                                                                                                                                        define( 'CIVICRM_MYSQL_VERSION', 4.1);
                                                                                                                                                                                                                                        define( 'CIVICRM_DSN', 'mysql://root:@localhost/civicrm?new_link=true');
                                                                                                                                                                                                                                        define( 'CIVICRM_MYSQL_PATH', '/usr/bin/');

                                                                                                                                                                                                                                        $civicrm_root = './sites/all/modules/civicrm';

                                                                                                                                                                                                                                        define( 'CIVICRM_TEMPLATE_COMPILEDIR', './files/civicrm/templates_c');

                                                                                                                                                                                                                                        That worked to get started!

                                                                                                                                                                                                                                        Friday, April 27, 2007

                                                                                                                                                                                                                                        trace(); not working with flex_sdk_2?

                                                                                                                                                                                                                                        It did not work for me either until the error messages stopped coming...

                                                                                                                                                                                                                                        First error message was this:

                                                                                                                                                                                                                                        C:\WINDOWS\system32\Macromed\Flash\Flash9c.ocx
                                                                                                                                                                                                                                        Flex Builder cannot locate the required debug version of the Flash Player. You may need to install the debug version of Flash Player 9.0 or reinstall Flex Builder. Do you want to try to debug with the current version?


                                                                                                                                                                                                                                        To fix this download and install Adobe Flash Player 9 — Debugger Version for your browser from
                                                                                                                                                                                                                                        http://www.adobe.com/support/flashplayer/downloads.html.

                                                                                                                                                                                                                                        Installed? Good. That stopped the above error message for me. Well, that was not enough. Then, I got this error message:

                                                                                                                                                                                                                                        Failed to connect; session timed out.
                                                                                                                                                                                                                                        Ensure that:
                                                                                                                                                                                                                                        1. You compiled your Flash application with debugging on.
                                                                                                                                                                                                                                        2. You are running the debug version of the Flash Player.


                                                                                                                                                                                                                                        To fix above error I corrected build.xml to keep debugging on - debug="true".
                                                                                                                                                                                                                                        <!--build_AS3.xml----------------------------->
                                                                                                                                                                                                                                        <?xml version="1.0" encoding="ISO-8859-1"?>
                                                                                                                                                                                                                                        <project name="AS3" basedir="." default="compile">
                                                                                                                                                                                                                                        <property name="mxmlc" location="C:\flex_sdk_2\bin\mxmlc.exe" />
                                                                                                                                                                                                                                        <property name="src.dir" value="${basedir}" />
                                                                                                                                                                                                                                        <property name="bin.dir" value="${basedir}\bin" />

                                                                                                                                                                                                                                        <target name="compile" description="compiles the tasks">
                                                                                                                                                                                                                                        <mxmlc
                                                                                                                                                                                                                                        compiler="${mxmlc}"
                                                                                                                                                                                                                                        mainclass="${src.dir}\HelloWorld.as"
                                                                                                                                                                                                                                        as3="true"
                                                                                                                                                                                                                                        strict="true"
                                                                                                                                                                                                                                        output="${bin.dir}\HelloWorld.swf"
                                                                                                                                                                                                                                        benchmark="false"
                                                                                                                                                                                                                                        debug="true"
                                                                                                                                                                                                                                        />
                                                                                                                                                                                                                                        </target>
                                                                                                                                                                                                                                        </project>

                                                                                                                                                                                                                                        I was trying to debug below AS3 file.
                                                                                                                                                                                                                                        //HelloWorld.as
                                                                                                                                                                                                                                        package
                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                        import flash.display.Sprite;
                                                                                                                                                                                                                                        import flash.text.TextField;
                                                                                                                                                                                                                                        import flash.display.SimpleButton;
                                                                                                                                                                                                                                        import flash.events.Event;

                                                                                                                                                                                                                                        public class HelloWorld extends Sprite
                                                                                                                                                                                                                                        {

                                                                                                                                                                                                                                        public function HelloWorld()
                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                        var btn:SimpleButton = new SimpleButton();
                                                                                                                                                                                                                                        btn.name = "hit me";
                                                                                                                                                                                                                                        btn.addEventListener("click", click);
                                                                                                                                                                                                                                        addChild(btn);

                                                                                                                                                                                                                                        var upSprite:Sprite = new Sprite();
                                                                                                                                                                                                                                        upSprite.graphics.lineStyle(1,0xabc);
                                                                                                                                                                                                                                        upSprite.graphics.beginFill(0xcde,1);
                                                                                                                                                                                                                                        upSprite.graphics.drawRect(100,100,200,50);
                                                                                                                                                                                                                                        btn.upState = upSprite;
                                                                                                                                                                                                                                        btn.overState = upSprite;
                                                                                                                                                                                                                                        btn.downState = upSprite;
                                                                                                                                                                                                                                        btn.useHandCursor = true;
                                                                                                                                                                                                                                        btn.hitTestState = upSprite;
                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                        public function click(event:Event):void
                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                        var display_txt:TextField = new TextField();
                                                                                                                                                                                                                                        display_txt.text = "Hello World!";
                                                                                                                                                                                                                                        addChild(display_txt);
                                                                                                                                                                                                                                        trace(display_txt.text);
                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                        Yes, I got the trace output. It was "Hello World!"

                                                                                                                                                                                                                                        Wednesday, April 25, 2007

                                                                                                                                                                                                                                        Flex goes Open Source!

                                                                                                                                                                                                                                        Good news!

                                                                                                                                                                                                                                        Flex is open source now. Checkout the link...
                                                                                                                                                                                                                                        http://labs.adobe.com/wiki/index.php/Flex:Open_Source

                                                                                                                                                                                                                                        This would certainly make Flex live longer and us, happier!

                                                                                                                                                                                                                                        Saturday, April 07, 2007

                                                                                                                                                                                                                                        Open Source Development Environment

                                                                                                                                                                                                                                        Seems like Open Source development is coming to full circle now. I was uncompressing Eclipse, browsing net while it uncompressed and got this - http://baptista.ca/408Contribution/. This link presents a nice tutorial on using XAMPP, Eclipse and PHPEclipse.

                                                                                                                                                                                                                                        Complete web development withought going for anything to buy! wow!!!

                                                                                                                                                                                                                                        I used below PHPEclipse URL to install PHPEclipse as a plugin in Eclipse.
                                                                                                                                                                                                                                        http://phpeclipse.sourceforge.net/update/releases

                                                                                                                                                                                                                                        Next, I wanted to see the page in PHPEclipse browser. I right clicked a php page and clicked 'Open PHP Browser'. That greeted me with this error message -
                                                                                                                                                                                                                                        Please configure your localhost and documentRoot.
                                                                                                                                                                                                                                        I went to Window >> Preferences >> PHPeclipse Web Development >> Project Defaults and set the values as below:

                                                                                                                                                                                                                                        Localhost: http://localhost/projectDirectoryName
                                                                                                                                                                                                                                        DocumentRoot: C:/xampp/htdocs/projectDirectoryName

                                                                                                                                                                                                                                        I again right clicked the php page and then 'Open PHP Browser' and lo! I could see my php page in the PHP browser. Running everything from inside Eclipse gives a nice feeling to develop and test pages I create :)