- Click Format > Bullets and Numbering... > List Styles
- Select the style you want to modify and click Modify... . You can only modify user-defined styles.
- Update style
- Check Add to template. If you don't check this checkbox, your changes will only be applied to the current document else your changes will be applied to the template and will reflect not only to the current document but also to new documents.
Tuesday, November 15, 2016
How to modify a user-defined list style in Microsoft Word 2016
How to create a new List Style template in Microsoft Word 2016
- Click Multilevel List icon in Home > Define New Multilevel List... or click Format > Bullets and Numbering... > List Styles > +
- If you want to change the default multilevel style, click the Format on the lower left part of the window and click Numbering...
- To create your own style, you cannot add a new one. You should click Customize.. to modify an existing style. The Reset button is initially disabled/grayed out if the style is not modified/customized (built in style) and becomes enabled after it is modified/customized. When Reset button is enabled, you may click it to reset back to the original built in style.
- Select a style
- If you want your style to appear under Multilevel List icon > List Styles, check Add to Template
Thursday, November 10, 2016
How to determine/specify encoding?
- In Email - Content-Type: text/plain; charset="UTF-8"
- In Client/Web page - set encoding using the following (ordered from highest to lowest priority of browsers):
1) charset parameter on HTTP Content-Type response header from server
Content-Type: text/plain; charset=UTF-8
2) charset on meta tag/element of HTML response
<html> <head> <!-- meta tag must be the very first thing in the <head> section because when encountered by the browser it stops parsing the page and reinterpretes it --> <!-- charset attribute was introduced on HTML5 and is more recommended to use --> <meta charset="UTF-8"> <!-- use http-equiv attribute for HTML versions lower than HTML5 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- In Spring, to specify the encdoing to be usd in decoding form data - add filter for encoding
<filter> <filter-name>EncodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value> </init-param> </filter>
More on specifying encoding: http://stackoverflow.com/questions/138948/how-to-get-utf-8-working-in-java-webapps
Possible consequence of not specifying encoding:
- Security issue - Sample: Google's XSS issue with UTF-7, read http://nedbatchelder.com/blog/200704/xss_with_utf7.html for explanation
Saturday, May 28, 2016
How to update non modifiable Classpath Variables in Eclipse
M2REPO
- Go to Preferences -> Maven -> User Settings
- Update User Settings to the location of your Maven settings.xml. The local repository will be automatically updated based on the localRepository configuration in your settings.xml.
Friday, April 29, 2016
How to call a shell script from another shell script
Note: Make sure to add #!/bin/bash to the first line of the script and make it executable through chmod 700 <path to script>.
- <path to script> or /bin/bash <path to script> or <scriptname> (add script to $PATH environment variable and call as normal command)
- child script is executed in a new shell, changes in child script does not affect parent script
- can be executed asynchronously through background command - <path to script> &
- same as no. 1 but executes child script on background - source <path to script> or . <path to script>
- child script is executed in a current shell
- context is same as parent script (vars and functions of child script becomes visible on parent script)
- exit call in child script will also exit the parent script - exec <path to script>
- terminates the current shell and executes on a new shell
Wednesday, April 27, 2016
How to create Bash Script on Mac
- Create the bash script file.
Sample: File myscript.sh#!/bin/bash #”hash-bang" or “she-bang" indicating that this script is to be interpreted and run by the bash shell echo hello world #prints “hello world”
- Change the file permission to make it an executable. Open the terminal, navigate to the location of the file and type the following command:
chmod 700 myscript.sh
See this link for more info on chmod: http://www.thinkplexx.com/learn/article/unix/command/chmod-permissions-flags-explained-600-0600-700-777-100-etc - Run the script. Type the following in the terminal:
./myscript.sh
Thursday, May 7, 2015
Key Terms in Strategic Management
Most of these terms are used interchangeably and may mean different from one person to another. Based on various sources I read, here's what I think they mean:
Mission - enduring purpose/duty, most important aim
Vision - desired future state supporting mission
Goals / Objectives - what the organization intends to do, an end-game
Strategy
- a chosen path, direction or plan of action, to achieve goal
- involves all or most of the resources within organization
- usually long-term
- usually timeless
- what to do?
Tactics
- way to a achieve sub-goals or implement strategy, tools
- performed by a subset or a specific ___ in an organization
- shorter to mid term
- may vary depending on some factors like time, environment, etc.
- how to do?
Strategies should consider the tactics and tactical solutions should be aligned with strategies.
Some examples from Jan Zlotnick:
Goal: Be the market share leader in terms of sales in the mid-market in our industry.
Strategy: Remarkable Customer Service
Tactics: Offer lower cost solutions than enterprise competitors without sacrificing white-glove service for first 3 years of customer contracts.
Goal: Become a social utility that earth uses on an daily basis.
Strategy: Love Your Neighbor
Tactics: Offer a free global communication toolset that enables disparate personal interactions with your friends to monitor, share, and interact with.
Execution - implementation
Sources:
http://www.web-strategist.com/blog/2013/01/14/the-difference-between-strategy-and-tactics/
http://www.managementguru.net/key-terms-of-strategic-management/
http://bluesummitstrategy.com/strategy/mission-vs-vision/2007/
http://www.dummies.com/how-to/content/strategic-planning-strategy-vs-tactics.html
Mission - enduring purpose/duty, most important aim
Vision - desired future state supporting mission
Goals / Objectives - what the organization intends to do, an end-game
Strategy
- a chosen path, direction or plan of action, to achieve goal
- involves all or most of the resources within organization
- usually long-term
- usually timeless
- what to do?
Tactics
- way to a achieve sub-goals or implement strategy, tools
- performed by a subset or a specific ___ in an organization
- shorter to mid term
- may vary depending on some factors like time, environment, etc.
- how to do?
Strategies should consider the tactics and tactical solutions should be aligned with strategies.
Some examples from Jan Zlotnick:
Goal: Be the market share leader in terms of sales in the mid-market in our industry.
Strategy: Remarkable Customer Service
Tactics: Offer lower cost solutions than enterprise competitors without sacrificing white-glove service for first 3 years of customer contracts.
Goal: Become a social utility that earth uses on an daily basis.
Strategy: Love Your Neighbor
Tactics: Offer a free global communication toolset that enables disparate personal interactions with your friends to monitor, share, and interact with.
Execution - implementation
Sources:
http://www.web-strategist.com/blog/2013/01/14/the-difference-between-strategy-and-tactics/
http://www.managementguru.net/key-terms-of-strategic-management/
http://bluesummitstrategy.com/strategy/mission-vs-vision/2007/
http://www.dummies.com/how-to/content/strategic-planning-strategy-vs-tactics.html
Saturday, April 25, 2015
Outline: Talent is never Enough
by John C. Maxwell
1. Belief Lifts Your Talent
When is talent alone enough?
- Talent is never enough. If talent were enough, then the most effective and influential people would always be the most talented ones.
- Intelligence, imagination, and knowledge are essential resources, but only effectiveness converts them into results. - Peter Drucker, the father of modern management
- Some tasks are not improved by adding more people.
- More isn't always better, and some things are best done by an individual.
- But there are many tasks that call for talent more than numbers. Like high jumping, they require the extraordinary talent of one person, not the mediocre talent of many.
1. We should marvel at their giftedness.
Putting talent into perspective
1. We should marvel at their giftedness.
2. We should recognize their contribution to society?
3. We should separate what they can do from who they are.
- Talent gives you a head start on others but to keep on being a success, you should keep working on that talent.
Do you have what it takes?
1. Everyone has talent. Find your talent.
2. Develop the talent you have, not the one you want.
3. Anyone can make choices that will add value to talent.
- Destiny is not a matter of chance, it is a matter of choice. - William Jennings Bryan
- Destiny is not a matter of chance, it is a matter of choice. - William Jennings Bryan
KEY CHOICES TO MAXIMIZE TALENT
1. Belief Lifts Your Talent
-
2. Passion Energizes Your Talent
3. Initiative Activates Your Talent
4. Focus Directs Your Talent
5. Preparation Positions Your Talent
6. Practice Sharpens Your Talent
7. Perseverance Sustains Your Talent
8. Courage Tests Your Talent
9. Teachability Expands Your Talent
10. Character Protects Your Talent
11. Relationships Influence Your Talent
12. Responsibility Strengthens Your Talent
13. Teamwork Multiplies Your Talent
Wednesday, July 9, 2014
DB2 CHAR VS VARCHAR
CHAR
VARCHAR disadvantages:
- uses 2 extra bytes to store the length
- needs a little extra effort when storing and manipulating length of VARCHAR -> may affect efficiency
General Rule:
VARCHAR disadvantages:
- uses 2 extra bytes to store the length
- needs a little extra effort when storing and manipulating length of VARCHAR -> may affect efficiency
General Rule:
- Use CHAR if average length of field is more than 6 bytes to save space
- if average length of field is less than 6 bytes, there will be no storage savings for using char
- Use varchar for columns with more that 30 characters (can be shorter for others)
Monday, May 12, 2014
Creating a SOAP Web Service
1. Create the Java class with methods you want to be converted as web service
2. Add a WebService annotation to the class
3. Add WebMethod annotation to the web service method. This is optional. All public methods of the web service class are automatically considered a web service method.
Example:
@WebService
public class BookStore{
@WebMethod
public List<String> getBookNames() {
}
}
This will create a web service class called BookStoreService.
Wednesday, May 7, 2014
Consuming a Web Service
What you need:
- wsdl source
1. Use wsimport tool from java se. In command line enter:
wsimport -keep -s, e.g. wsimport -keep -s src
-keep - keep generated files (.java files)
2. Import the the java files in your project and use them as stubs to call the webservice method(s). The name of the stub you can use can be found in the wsdl:service tag of the wsdl.
Ex.
name="CurrencyConvertor">
CurrencyConvertor cc = new CurrencyConvertor();
CurrencyConvertorSoap ccs = cc.getCurrencyConvertorSoap();
- wsdl source
1. Use wsimport tool from java se. In command line enter:
wsimport -keep -s
-keep - keep generated files (.java files)
2. Import the the java files in your project and use them as stubs to call the webservice method(s). The name of the stub you can use can be found in the wsdl:service tag of the wsdl.
Ex.
CurrencyConvertor cc = new CurrencyConvertor();
CurrencyConvertorSoap ccs = cc.getCurrencyConvertorSoap();
Thursday, April 17, 2014
Scrum
Scrum
- one of the best Agile practicesProduct back log
- user stories/wish listRoles
- product owner - chooses what to deliver from product back log
- scrum master - similar to PM
- developers
- testers
- customers
- executives
Release planning
- release backlog with estimates
estimate by story point
estimate by hour - 1, 2, 4, 8 hours or 2, 3, 5, 10 days or 1, 2 , 3, 6 months - sprints - short duration milestones (2 to 30 days) - > ship ready state
- burndown chart - work remaining by time(day) chart
burndown velocity - ave. rate of productivity, slope - sprint backlog
- daily scrum - stand up meetings, completed tasks & obstacles
- sprint restrospective - what went right? and what went wrong/areas of improvement?
Software Development Methodologies
A software development methodology or system development methodology in software engineering is a framework that is used to structure, plan, and control the process of developing an information system.
Broadly these are:
There are many models under these methodologies
http://www.itinfo.am/eng/software-development-methodologies
http://en.wikipedia.org/wiki/Software_development_methodology
Broadly these are:
- Software development life cycle methodology
- Agile methodology
There are many models under these methodologies
- Software development life cycle:
- Waterfall: a linear framework
- Spiral: a combined linear-iterative framework
- Incremental: a combined linear-iterative framework or V Model
- Prototyping: an iterative framework
- Rapid application development (RAD): an iterative framework
- Agile methodology:
- Scrum
- Extreme programming
- Adaptive software development (ASD)
- Dynamic system development method (DSDM)
http://www.itinfo.am/eng/software-development-methodologies
http://en.wikipedia.org/wiki/Software_development_methodology
Saturday, April 12, 2014
GlassFish Basics
domain1
- default domain created during installation of GlassFish
- {glassfish.dir}/glassfish/domains/domain1
Start/stop of server
- in {glassfish.dir}/bin run command: asadmin start-domain or asadmin stop-domain
Console
- http://localhost:4848/
- default domain created during installation of GlassFish
- {glassfish.dir}/glassfish/domains/domain1
Start/stop of server
- in {glassfish.dir}/bin run command: asadmin start-domain
Console
- http://localhost:4848/
Thursday, January 16, 2014
Getting Started with Apache Tomcat
Requirements:
Steps:
http://tomcat.apache.org
- compatible JDK
Steps:
- Download Tomcat at http://tomcat.apache.org/download-60.cgi
- Install Tomcat. http://tomcat.apache.org/tomcat-6.0-doc/setup.html
Complete Intructions: see RUNNING.txt
Environment variables to set:
CATALINA_HOME - location of root directory of Tomcat bin
- Ex. CATALINA_HOME=C:\Apps\apache-tomcat-6.0.37
CATALINA_BASE - location of active Tomcat, defaults to CATALINA_HOME
JRE_HOME or JAVA_HOME - If both JRE_HOME and JAVA_HOME are specified, JRE_HOME is used.
- Ex. JAVA_HOME=C:\Apps\Java\jdk150_15
- sdas
http://tomcat.apache.org
Friday, November 1, 2013
English Grammar Reminders
direct vs indirect object
Direct object is often part of the predicate and is what the verb is being done to. To identify the direct object ask the question: Subject + Verb + What/Whom?
Indirect object cannot exist without direct object. It answers the question: To/For/From whom?
Ex.
She gave some cookies. She + gave + what? >> cookies (the direct object)
She gave the kids some cookies.
She + gave the kids + what? >> cookies (the direct object)
To whom did she gave cookies? >> kids (indirect object)
transitive vs intransitive verb
Transitive verbs require direct object while intransitive verb does not.
Ex.
The child broke the glass. >> transitive, without "the glass", the sentence in incomplete
The child arrived. >> intransitive, does not need direct object
The child eats every afternoon. The child eats the cake. >> eats is both transitive and intransitive
I or me
The rules around the use of the pronouns ‘I’ and ‘me’ can be tricky. A simple way to test whether you’re using the right one is to think about whether a statement would still make sense if you removed the other person. You wouldn’t say, “The car beeped at I” so the correct pronoun is ‘me’.
apostrophe
Expressions of time are also known as ‘temporal expressions’. When used in temporal expressions, the apostrophe is placed before the ‘s’ for single units and after for multiple units.
Ex.
I will be 30 in two years’ time.
I will be 29 in one year’s time.
that or which
You can remove the clause containing ‘which’ from a sentence without changing the meaning. ‘That’, however, is necessary.
Ex.
Phones that have cameras are generally more expensive.
My bedroom, which is currently pink, needs painting.
fewer or less
If you can count the number of items (count nouns) use ‘fewer’. If not, you’re probably referring to mass nouns so use ‘less’. Time, money and distance are exceptions – use ‘less’ for these too. So even if you can count how many hours a meeting lasted for, you’d say, “The meeting lasted for less than two hours.”
Ex.
We need less furniture in this office.
Could we get by with fewer desks?
i.e. or e.g.
‘E.g.’ is used to give an example. ‘I.e.’ is used to give more information.
Some animals are really cute, e.g. kittens and puppies.
The primary colours ( i.e. red, yellow and blue) are my favorites.
who or whom
‘Whom’ is used when referring to the object of a sentence. Use ‘who’ when referring to the subject of a sentence. There’s a trick to help you remember: If you can answer with ‘he’, use ‘who’ (e.g. ‘he ate all the doughnuts’). If you can answer with ‘him’ use ‘whom’ (e.g. ‘I saw him at the bar’). Just remember that ‘him’ and ‘whom’ both end in the letter m.
Ex.
Whom did you see at the bar last night?
I can’t think who would have eaten all the doughnuts.
lay or lie
‘Lay’ requires a direct object (e.g. in the sentence above, the direct object is the table) and ‘lie’ does not.
Ex.
Why don’t you go and lie down?
I’m going to lay the book on the table.
bored of, bored by, or bored with
Although ‘of’ is commonly used after ‘bored’, this is technically incorrect. Always use ‘with’ or ‘by’ in formal writing.
Ex.
I’m bored with this.
I’m bored by math class.
may and might
“May” implies a possibility. “Might” implies far more uncertainty.
Ex.
“You may get drunk if you have two shots in ten minutes” implies a real possibility of drunkenness.
“You might get a ticket if you operate a tug boat while drunk” implies a possibility that is far more remote.
farther and further
The word “farther” implies a measurable distance. “Further” should be reserved for abstract lengths you can't always measure.
Ex.
I threw the ball ten feet farther than Bill.
The financial crisis caused further implications.
since and because
“Since” refers to time. “Because” refers to causation.
Ex.
Since I quit drinking I’ve married and had two children.
Because I quit drinking I no longer wake up in my own vomit.
disinterested and uninterested
Contrary to popular usage, these words aren’t synonymous. A “disinterested” person is someone who’s impartial. For example, a hedge fund manager might take interest in a headline regarding the performance of a popular stock, even if he's never invested in it. He’s “disinterested,” i.e., he doesn’t seek to gain financially from the transaction he’s witnessed. Judges and referees are supposed to be "disinterested." If the sentence you’re using implies someone who couldn't care less, chances are you’ll want to use “uninterested.”
anxious
Unless you’re frightened of them, you shouldn't say you’re “anxious to see your friends.” You’re actually “eager,” or "excited." To be “anxious” implies a looming fear, dread or anxiety. It doesn’t mean you’re looking forward to something.
different than and different from
The adjective “different” is used to draw distinction. So, when “different” is followed by a preposition, it should be “from,” similar to “separate from,” “distinct from,” or “away from.” There are rare cases where “different than” is appropriate, if “than” operates as a conjunction. When in doubt, use “different from.”
Ex.
My living situation in New York was different from home.
Development is different in New York than in Los Angeles.
bring and take
In order to employ proper usage of “bring” or “take,” the writer must know whether the object is being moved toward or away from the subject. If it is toward, use “bring.” If it is away, use “take.” Your spouse may tell you to “take your clothes to the cleaners.” The owner of the dry cleaners would say “bring your clothes to the cleaners.”
affect and effect
“Affect” is almost always a verb (e.g., Facebook affects people’s attention spans), and “effect” is almost always a noun (e.g., Facebook's effects can also be positive). There are some exceptions. “Effect” may be used as a transitive verb, which means to bring about or make happen. e.g., My new computer effected a much-needed transition from magazines to Web porn. There are similarly rare examples where “affect” can be a noun. e.g., His lack of affect made him seem like a shallow person.
irony and coincidence
Too many people claim something is the former when they actually mean the latter. For example, it’s not “ironic” that “Barbara moved from California to New York, where she ended up meeting and falling in love with a fellow Californian.” The fact that they’re both from California is a "coincidence." "Irony" is the incongruity in a series of events between the expected results and the actual results. "Coincidence" is a series of events that appear planned when they’re actually accidental. So, it would be "ironic" if “Barbara moved from California to New York to escape California men, but the first man she ended up meeting and falling in love with was a fellow Californian.”
nauseous vs nauseated
Undoubtedly the most common mistake I encounter. Contrary to almost ubiquitous misuse, to be “nauseous” doesn't mean you've been sickened: it actually means you possess the ability to produce nausea in others. e.g., That week-old hot dog is nauseous. When you find yourself disgusted or made ill by a nauseating agent, you are actually “nauseated.” e.g., I was nauseated after falling into that dumpster behind the Planned Parenthood.
Source:
http://m.staples.ca/sbdca/en_CA/cre/programs/grammarquiz/
http://litreactor.com/columns/20-common-grammar-mistakes-that-almost-everyone-gets-wrong
Direct object is often part of the predicate and is what the verb is being done to. To identify the direct object ask the question: Subject + Verb + What/Whom?
Indirect object cannot exist without direct object. It answers the question: To/For/From whom?
Ex.
She gave some cookies. She + gave + what? >> cookies (the direct object)
She gave the kids some cookies.
She + gave the kids + what? >> cookies (the direct object)
To whom did she gave cookies? >> kids (indirect object)
transitive vs intransitive verb
Transitive verbs require direct object while intransitive verb does not.
Ex.
The child broke the glass. >> transitive, without "the glass", the sentence in incomplete
The child arrived. >> intransitive, does not need direct object
The child eats every afternoon. The child eats the cake. >> eats is both transitive and intransitive
I or me
The rules around the use of the pronouns ‘I’ and ‘me’ can be tricky. A simple way to test whether you’re using the right one is to think about whether a statement would still make sense if you removed the other person. You wouldn’t say, “The car beeped at I” so the correct pronoun is ‘me’.
apostrophe
Expressions of time are also known as ‘temporal expressions’. When used in temporal expressions, the apostrophe is placed before the ‘s’ for single units and after for multiple units.
Ex.
I will be 30 in two years’ time.
I will be 29 in one year’s time.
that or which
You can remove the clause containing ‘which’ from a sentence without changing the meaning. ‘That’, however, is necessary.
Ex.
Phones that have cameras are generally more expensive.
My bedroom, which is currently pink, needs painting.
fewer or less
If you can count the number of items (count nouns) use ‘fewer’. If not, you’re probably referring to mass nouns so use ‘less’. Time, money and distance are exceptions – use ‘less’ for these too. So even if you can count how many hours a meeting lasted for, you’d say, “The meeting lasted for less than two hours.”
Ex.
We need less furniture in this office.
Could we get by with fewer desks?
i.e. or e.g.
‘E.g.’ is used to give an example. ‘I.e.’ is used to give more information.
Some animals are really cute, e.g. kittens and puppies.
The primary colours ( i.e. red, yellow and blue) are my favorites.
who or whom
‘Whom’ is used when referring to the object of a sentence. Use ‘who’ when referring to the subject of a sentence. There’s a trick to help you remember: If you can answer with ‘he’, use ‘who’ (e.g. ‘he ate all the doughnuts’). If you can answer with ‘him’ use ‘whom’ (e.g. ‘I saw him at the bar’). Just remember that ‘him’ and ‘whom’ both end in the letter m.
Ex.
Whom did you see at the bar last night?
I can’t think who would have eaten all the doughnuts.
lay or lie
‘Lay’ requires a direct object (e.g. in the sentence above, the direct object is the table) and ‘lie’ does not.
Ex.
Why don’t you go and lie down?
I’m going to lay the book on the table.
bored of, bored by, or bored with
Although ‘of’ is commonly used after ‘bored’, this is technically incorrect. Always use ‘with’ or ‘by’ in formal writing.
Ex.
I’m bored with this.
I’m bored by math class.
may and might
“May” implies a possibility. “Might” implies far more uncertainty.
Ex.
“You may get drunk if you have two shots in ten minutes” implies a real possibility of drunkenness.
“You might get a ticket if you operate a tug boat while drunk” implies a possibility that is far more remote.
farther and further
The word “farther” implies a measurable distance. “Further” should be reserved for abstract lengths you can't always measure.
Ex.
I threw the ball ten feet farther than Bill.
The financial crisis caused further implications.
since and because
“Since” refers to time. “Because” refers to causation.
Ex.
Since I quit drinking I’ve married and had two children.
Because I quit drinking I no longer wake up in my own vomit.
disinterested and uninterested
Contrary to popular usage, these words aren’t synonymous. A “disinterested” person is someone who’s impartial. For example, a hedge fund manager might take interest in a headline regarding the performance of a popular stock, even if he's never invested in it. He’s “disinterested,” i.e., he doesn’t seek to gain financially from the transaction he’s witnessed. Judges and referees are supposed to be "disinterested." If the sentence you’re using implies someone who couldn't care less, chances are you’ll want to use “uninterested.”
anxious
Unless you’re frightened of them, you shouldn't say you’re “anxious to see your friends.” You’re actually “eager,” or "excited." To be “anxious” implies a looming fear, dread or anxiety. It doesn’t mean you’re looking forward to something.
different than and different from
The adjective “different” is used to draw distinction. So, when “different” is followed by a preposition, it should be “from,” similar to “separate from,” “distinct from,” or “away from.” There are rare cases where “different than” is appropriate, if “than” operates as a conjunction. When in doubt, use “different from.”
Ex.
My living situation in New York was different from home.
Development is different in New York than in Los Angeles.
bring and take
In order to employ proper usage of “bring” or “take,” the writer must know whether the object is being moved toward or away from the subject. If it is toward, use “bring.” If it is away, use “take.” Your spouse may tell you to “take your clothes to the cleaners.” The owner of the dry cleaners would say “bring your clothes to the cleaners.”
affect and effect
“Affect” is almost always a verb (e.g., Facebook affects people’s attention spans), and “effect” is almost always a noun (e.g., Facebook's effects can also be positive). There are some exceptions. “Effect” may be used as a transitive verb, which means to bring about or make happen. e.g., My new computer effected a much-needed transition from magazines to Web porn. There are similarly rare examples where “affect” can be a noun. e.g., His lack of affect made him seem like a shallow person.
irony and coincidence
Too many people claim something is the former when they actually mean the latter. For example, it’s not “ironic” that “Barbara moved from California to New York, where she ended up meeting and falling in love with a fellow Californian.” The fact that they’re both from California is a "coincidence." "Irony" is the incongruity in a series of events between the expected results and the actual results. "Coincidence" is a series of events that appear planned when they’re actually accidental. So, it would be "ironic" if “Barbara moved from California to New York to escape California men, but the first man she ended up meeting and falling in love with was a fellow Californian.”
nauseous vs nauseated
Undoubtedly the most common mistake I encounter. Contrary to almost ubiquitous misuse, to be “nauseous” doesn't mean you've been sickened: it actually means you possess the ability to produce nausea in others. e.g., That week-old hot dog is nauseous. When you find yourself disgusted or made ill by a nauseating agent, you are actually “nauseated.” e.g., I was nauseated after falling into that dumpster behind the Planned Parenthood.
Source:
http://m.staples.ca/sbdca/en_CA/cre/programs/grammarquiz/
http://litreactor.com/columns/20-common-grammar-mistakes-that-almost-everyone-gets-wrong
Sunday, September 22, 2013
Understanding Character Sets, Encoding and Unicode
Character Set/charset
- set of characters that may or may not define an encoding- Examples: ASCII (covers all English characters), ISO/IEC 646, Unicode (covers characters from all living languages in the world)
Encoding/Character encoding/Character set encoding
- General meaning: a set of rules or system for representing a character in some form such as bit pattern, sequence of natural numbers, octets, or electrical pulses, e.g. Morse code, Baudot code, ASCII and Unicode- More strict meaning: a mapping of characters to how they are stored in memory (bit sequence)
- Examples: ASCII encoding, Unicode encodings like UTF-8 and UTF-16
Source of Encoding Standards:
- Standards bodies
ANSI (American National Standards Institute)
- is the U.S. standards organization that creates standards (like the ASCII) for the computer industry
ISO (International Organization for Standardization)
- largest developer of voluntary International Standards
- adopted ASCII as ISO 646:IRV - Independent software vendors
IBM
- developed codepage 437 for DOS, codepage 852 for Eastern European languages that use Latin script, codepage 855 for Russian and some other Eastern European languages that use Cyrillic script, etc.
Windows
- developed the familiar Windows codepages, such as codepage 1252, alternately known as "Western", "Latin 1" or "ANSI"
Examples of character sets or encodings
- is a 7-bit encoding scheme used to encode letters, numerals, symbols, and device control codes as fixed-length codes using integers
- includes definitions for 128 characters
- 128 to 255 is free causing varied character representation of 128 to 255 resulting to varied ASCII extensions
EBCDIC (Extended Binary Coded Decimal Interchange Code)
- is an 8-bit character encoding used mainly on IBM mainframe and IBM midrange computer operating systems.
Codepage 1252 and ISO 8859-1
- ISO 8859-1 “Latin 1” is a standard developed by American National Standards Institute (ANSI)
- Codepage 1252 is a standard created by the Microsoft for Western European languages based on an early draft of the ANSI proposal that later became ISO 8859-1 “Latin 1”
- Codepage 1252 was finalised before ISO 8859-1 was finalised, however, and the two are not the same: Codepage 1252 is a superset of ISO 8859-1
ANSI codepage
- Microsoft referred Codepage 1252 as "the ANSI codepage" but around the time of Windows 95 development, Microsoft began to use the term "ANSI" in a different sense to mean any of the Windows codepages, as opposed to Unicode
- currently in the context of Windows, the terms "ANSI text" or "ANSI codepage" should be understood to mean text that is encoded with any of the legacy 8-bit Windows codepages rather than Unicode. It really should not be used to mean the specific codepage associated with the US version of Windows, which is Codepage 1252.
Other Legacy encoding standards
- most encode each character in terms of a single 8-bit processing unit, or byte
- some are double-byte encodings like Microsoft codepages for Chinese, Japanese and Korean
UTF-8 and Unicode
Unicode
- is a standard developed by the Unicode Consortium that assigns a unique number/identifier for every character, no matter what the platform, no matter what the program, no matter what the language
- In Unicode, every character is assigned a unique number called "code point"
Ways of Encoding Unicode
- UCS-2 (because it has two bytes) - the traditional store-it-in-two-byte methods
- UTF-16 (because it has 16 bits) - you have to figure out if it's high-endian UCS-2 (most significant byte first) or low-endian UCS-2 (least significant byte first) through the BOM (byte-order mark)
- UTF-8 (Unicode Transformation Format 8-bit)
- is a variable-width encoding that can represent every character in the Unicode character set. It was designed for backward compatibility with ASCII and to avoid the complications of endianness and byte order marks in UTF-16 and UTF-32 - UTF-7 - similar to UTF-8 but guarantees that the high bit will always be zero
- UCS-4 - stores each code point in 4 bytes
Other related terms
Code Page
- is a term that originated from IBM that essentially means the same as character set and encodingInternationalized URL / URL encoding / Percent encoding
- see https://www.w3.org/International/articles/idn-and-iri/, http://www.url-encode-decode.com/Sources:
http://www.unicode.org/
http://en.wikipedia.org
http://www.joelonsoftware.com/articles/Unicode.html
http://scripts.sil.org/cms/scripts/page.php?item_id=IWS-Chapter03
http://mikesusan.com/ascii.html
http://www.utf-8.com/
http://kunststube.net/encoding/
How to enable Search Widget/Gadget
If the the Search widget or gadget of your Blogger blog is not working but the embedded search box on the Navigation bar at the top is working, the cause could be the setting of robots.txt.
- View the robots.txt at http://YOURBLOGURL.blogspot.com/robots.txt. If Disallow property is set to /search, search is ignored.
- Go to Blogger Dashboard > Select Blog > Select Settings tab > Search Preferences
- Enable Custom robots.txt
- Copy the content of current robots.txt but set the Disallow property to blank.
- Save changes
Sunday, September 8, 2013
Steps involved during Execution of a Java Program
- JVM startup
- Loading – finding binary representation of class/interface then constructing the Class object
- Linking – combining class/interface into the run-time state of the JVM so that it can be executed
- Verification - semantic/structure validation
- Preparation - storage allocation, all static fields are created and initialized with default values
- Resolution – optionally resolve symbolic reference to other classes/interfaces
- Initialization – static initialization
- superclass/superinterface static initialization
- superclasses are initialized before subclasses
- interface initialization does not initialize superinterfaces
- only the class that declares static field is initialized, even though it might be referred to through the name of a subclass, a subinterface, or a class that implements an interface
- all static explicit field initializers and static initialization blocks are executed in textual order
- Instantiation - creation of object/class instance
All the instance variables, including those declared in superclasses, are initialized to their default values first. - start the constructor
- call explicit constructor this() if available
- call explicit/implicit super() unless class is Object – process recursively using same steps a. to e.
- all non-static field initializers and non-static initialization blocks are executed in textual order
- execute the rest of the body of constructor
- Finalization – finalize() method is called before storage for object is reclaimed by GC
- Unloading – happens if its classloader is reclaimed by GC. Bootstrap loader may not be unloaded.
- Program Exit
Subscribe to:
Comments (Atom)