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

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:

  1. 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
  2. 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


ASCII (American Standard Code for Information Interchange)
- 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

  1. UCS-2 (because it has two bytes) - the traditional store-it-in-two-byte methods
  2. 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)
  3. 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 
  4. UTF-7 - similar to UTF-8 but guarantees that the high bit will always be zero
  5. 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 encoding

Internationalized 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.

  1. View the robots.txt at http://YOURBLOGURL.blogspot.com/robots.txt. If Disallow property is set to /search, search is ignored.
  2. Go to Blogger Dashboard > Select Blog > Select Settings tab > Search Preferences
  3. Enable Custom robots.txt
  4. Copy the content of current robots.txt but set the Disallow property to blank.
  5. Save changes

Sunday, September 8, 2013

Derby

http://db.apache.org/derby/docs/10.9/devguide/cdevdvlp17453.html

Steps involved during Execution of a Java Program

  1. JVM startup
  2. Loading – finding binary representation of class/interface then constructing the Class object
  3. Linking – combining class/interface into the run-time state of the JVM so that it can be executed
    1. Verification - semantic/structure validation
    2. Preparation - storage allocation, all static fields are created and initialized with default values
    3. Resolution – optionally resolve symbolic reference to other classes/interfaces
  4. Initialization – static initialization 
    1. 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
    2. all static explicit field initializers and static initialization blocks are executed in textual order
  5. Instantiation - creation of object/class instance
    All the instance variables, including those declared in superclasses, are initialized to their default values first.
    1. start the constructor
    2. call explicit constructor this() if available
    3. call explicit/implicit super() unless class is Object – process recursively using same steps a. to e. 
    4. all non-static field initializers and non-static initialization blocks are executed in textual order
    5. execute the rest of the body of constructor
  6. Finalization – finalize() method is called before storage for object is reclaimed by GC
  7. Unloading – happens if its classloader is reclaimed by GC. Bootstrap loader may not be unloaded.
  8. Program Exit

Monday, August 12, 2013

DWR error handling

Exception/error handling of DWR calls can be centralized by setting the handlers. More here: http://directwebremoting.org/dwr/documentation/browser/errors.html


dwr.engine.setErrorHandler(UI.errorHandler);
dwr.engine.setTextHtmlHandler(UI.textHtmlHandler);

 // Handler for errors and exceptions
 errorHandler : function(msg, param2) {
  UI.hideLoading();
  Utils.resetClick();
  View.error(msg, 700)
 },

 // Handler when Ajax returns a text such as session timeout, page not found etc...
 textHtmlHandler : function() {
  UI.hideLoading();
  //View.error("Your session has expired, please login again." );
   document.location = '/adapt/web/jsp/timeout.jsp';
 },

Monday, July 29, 2013

Spring Inversion of Control

Bean Creation
- code POJO, add bean configuration element to the Spring XML configuration file or annotate the POJO
<bean id="message" class="org.springbyexample.di.xml.BelleMessage"/>

Inversion of Control
1. Constructor Injection

public ConstructorMessage(String message) {
    this.message = message;
}

<bean id="message" class="org.springbyexample.di.xml.ConstructorMessage">
    <constructor-arg value="Spring is fun." />
</bean>

2. Setter Injection

public void setMessage(String message) {
    this.message = message;
}

<bean id="message" class="org.springbyexample.di.xml.SetterMessage">
    <property name="message" value="Spring is fun." />
</bean>

3. Reference Injection

<bean id="message" class="org.springbyexample.di.xml.SetterMessage">
    <property name="message" ref="springMessage"" />
</bean>


source: http://www.springbyexample.org/examples/intro-to-ioc.html

Tuesday, July 9, 2013

Baking Supplies in Philippines

Sweetcraft Baking and Confectionery Supplies

Address: 373 Boni Avenue, Mandaluyong (in front of Rizal Technological University)
Tel no.: 532-1595
  • items: baking and cooking ingredients and equipment items, available in retail and wholesale quantities
  • tips: don't buy marshmallows

Chef's Nook

Address: 20 Pilar St., Addition Hills, Mandaluyong (corner street of the Honda showroom along Shaw Blvd.)
Tel. No.: 724- 5812
  • cheap: chocolates and nuts are cheaper than chocolate lovers, refrigerated/stored well

Chocolate Lovers

Address of Main Branch: 45 P. Tuazon Blvd. corner C. Benitez St.Cubao Quezon, City 1109 ( use Benitez St, main entrance)
Tel. Nos. 411-7474 / 724-5752 / 724-4964
Address of 2nd Branch: Kitanlad St. cor. Quezon Avenue, Quezon City
Tel nos. 732-8576 / 741-7487
  • items: chocolate compound and nuts, lot of cake packaging materials, cake boards, ready made cupcake toppers, cupcake stands, chocolate moulders, lollipop sticks, baking pans, glycerin, glucose, gelatin, confectioner's sugar
  • cheap: nuts
  • not available: corrugated Boards, big cake boxes, big icing tips

Best Way Merchandising

Address: 691 Sto. Cristo Street, Divisoria (outside Divisoria mall)
  • items: everything, styrophor dummy cakes, edible flowers, candles, cake backdrop
  • cheap: icing gel colors(85pesos/oz), nuts(500-800pesos/kg) and tylose powder (700pesos/kg), packaging materials like rolls of cellophane/or plastic wrapper(150-155 per roll)
  • expensive: baking tools - gourmet writer (800-850 pesos), macaron mat costs 650, cutters, molders, etc
  • tips: for wholesale confectionary sugar of Peotraco brand, it's in Sto. Cristo St. Binondo, for stainless items you can find them in Ilaya Street in Divisoria
  • other stores near:
    Estanislao Trading
        817 Sto. Cristo Street, Divisoria (3rd store right after crossing M. de Santos Street where Allied Bank is)
        Tel.Nos: 241-9541 / 241-9487 / 243-3976    
    Enriquez Multi-Sales (near Allied Bank)
       427 M. de Santos St., Divisoria
       Tel.Nos: 243-3678 / 243-3668
    George Enterprises
       736 Tabora St., Divisoria Manila
       Tel. Nos: 241-8578 / 241-8579

Killion Merchandising

Address: 40 Orosco Street, Quiapo Manila (near Quiapo church)
Tel No. 733-8221, 733-2093
Fax 733-7036
  • items: all baking ingredients except imported ones
  • cheap: packaging materials, flour and confectioner's sugar (cheapest here)
  • tips: long queue, come around 7:20-8:15 am

Nut Store in front of Killion

  • cheap: choco bars, choco molds at lowest prices, also canned fruits, flour, confectionary sugar, ice cones flavoring etc.

Mostwell

  • items: doilies and boxes for cupcakes and cakes, for candles and souveneirs plus plastics

New Sin Kian Heng

Address: 196 Carlos Palanca St. Quiapo, Manila (Right beside Quinta Market in Quiapo, Manila)
Tel.Nos:733-2131/ 733-6871/ 733-6367/ 733-6381
  • items: kitchenwares and baking equipments, lots of pans and molds, kitchen aids to pans, wilton decors, tips, whisks, stoves, ovens, spatulas
  • tips: Goldilocks Cakeshop has been a long time client of their store

The Cocoa Pantry  

Address: 130 Katipunan Road, Saint Ignatius Village QC
Tel No 4976957
Opening Hours
     Mondays to Fridays - 10:00am to 4:30pm
     Saturdays - 10:00am to 6:00pm
  • items: essential baking ingredients and hard-to-find packaging materials

Baker's Depot

Branches:
     - San Juan: 188B N. Domingo cor Manzano st. Tel: 723-8810
     - Waltermart North EDSA - Tel: 332-1281
     - Waltermart Makati
     - Victory Mall, Caloocan City

Bake Masters Food Ingredients Corp

Address: along Sucat Road Paranaque City.
Tel No. 887-0150
  • items: bakery, confectionery, snack and also meat processing ingredients

Carla's Bakery and Confectionary Supply

Address: Unit E Dr. A. Santos Ave. Sucat, Paranaque City (along Sucat Road in Paranaque, right across Santana Grove and Shopwise)
  • items: almost have anything you need from ingredients to packaging, variety of box sizes especially bigger sizes, can buy bigger boxes by pieces, they have corrugated boards

Love2Bake Co.

Address: 6 Palanca Street, Fruition Bldg, BF Homes, Paranaque
Website: https://www.facebook.com/love2bakeco
  • items: baking supplies, fondant rolling pin
  • cheap: americolor gel icing and airbrush color, pearl/luster/sparkle dusts, fondant moulds, cutters, macaron mats, pans, sheet trays, dummy styro and more

Ingrid’s Sweet Haven

Address: 363 Dr. Sixto Antonio Avenue corner Liwayway Street, Caniogan, Pasig
Websites: http://www.ingridsweethaven.com
Tel No.: 641-2561

Baking Buddies

Website: https://www.facebook.com/bakingbuddies
  • items: mported fondant shoe cutters, airbrush compressor package, macaron mats and more

MK Kitchen

Website: http://mksurpluswarehouse.tripod.com
  • items: kitchen stainless steel working table, sheet trays, tart moulders, spoon forks and other kitchen utensils

RM Boxes

Website: http://www.rmboxes.com/
  • items: boxes and packaging needs (some boxes in Chocolate Lovers and other suppliers are actually from them)


Accesible Stores

Gourdo's

Address: Unit G, The Fort Entertainment Complex, Bonifacio Global City, Taguig Metro Manila
      Greenbelt 2, Glorietta 4, Gateway, The Fort and The Podium (under the name LIVING WELL)
Tel.No.812-3022
  • pure vanilla extract (The Vanilla Company), official reseller of Wilton

LandMark Makati

Address: 4th floor of Landmark Mall in Makati
  • cheap: baking tools such as rolling pins, muffin pans, fondant cutters and smoothers, chocolate moulds, spatulas, cupcake stands, baking pans, food processors and more

Cooks Exchange

Address: Glorietta 4, SM Megamall Bldg. A
  • more expensive ingredients

SM Supermarkets

  • items: baking powder, baking soda, sugar, oil, butter, cheese in the supermarket 

SM Department Stores

  • items: Wilton and other branded products

Unimart

Greenhills Shopping Center, Ortigas Avenue, San Juan
Tel No. 721-0572
  • items: complete range of Baker’s brand chocolate, wide range of Ferna products, like Dutch-process cocoa, glucose, and light corn syrup, malted milk powder

Healthy Options

  • items: variety of flours including unbleached white, whole-wheat pastry, and spelt flours in both regular and organic. Healthy Options also carries corn meal, a wide range of oats, almond milk
  • cheap: real vanilla 
Sources:
http://www.khakiness.com/2011/07/where-to-buy-complete-and-affordable.html
http://www.mysassybaker.com/2013/05/baking-supplies-stores-manila.html
http://alliwannadoisbake.blogspot.com/2011/05/where-to-go-for-great-buys-on-baking.html
http://www.pepper.ph/baking-ingredients-resource-guide/

Monday, July 8, 2013

Drools Core

  1. create a knowledge builder to load processes from various resources (for example from the classpath or from file system)
  2. create a knowledge base from the builder
  3. instantiate a session based on the knowledge base
  4. start executing processes
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("ruleflow.rf"), ResourceType.DRF);
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
ProcessInstance processInstance = ksession.startProcess("com.sample.MyProcess");
ksession.fireAllRules();

Thursday, June 27, 2013

Investing Terms

Fundamental vs Technical Analysis

Technical Analyis 
Support vs Resistance
Support - prices on a chart that tend to act as a floor by preventing the price of an asset from being pushed downward
Resistance levels - also regarded as a ceiling because these price levels prevent the market from moving prices upward


GSW1 - 1985 to 1997
Wave 3 - 1989 to Dec 1993 (500 to 3300/3474)

GSW2 - 1997 to 2001 - (3474 to 1000)

GSW3 - 2001 to ____
Super Cycle Wave 1  -  Oct 2001 to Aug 2007  -  6 yrs more or less -  (1000 to 3800)
Super Cycle Wave 2  -  Oct 2007 to Nov 2008  -  1  yr     "          "
Super Cycle Wave 3  -  031709 to ? ( est dec2013 june 2014) -  (1747 to ____)
         cw 1  - 031709 to 080211
         cw 2  - 080211 to 092611 or 110310 to 092611
         cw 3  -  092611 to 051513
         cw 4  -  051513 to 062513 nx is sideways/consolidations
         cw 5  -  062513 to est. dec or nx yr
Supercycle Wave 4 may be in 2014 up to 2015 (1 year)
Supercylce Wave 5 may be in 2015.


Sources:
http://www.investopedia.com/articles/technical/061801.asp
http://www.pinoymoneytalk.com/forum
http://www.pinoymoneytalk.com/forum/index.php?topic=44602.720

Wednesday, June 26, 2013

Time

EST (Eastern Standard Time) - time in US

DST (Daylight Saving Time) - 12 hr difference b/w NJ & PH
Standard Time - 13 hr difference b/w NJ & PH (4am NJ = 5PM PH)

GMT (Greenwich Mean Time) - global standard time

  • US NJ/NY - GMT-5
  • PH - GMT+8



Sunday, June 23, 2013

Financial Sites

Bloomberg - http://bloomberg.com/
Financial Times - http://www.ft.com/
Reuters - http://www.reuters.com/

BLOGS:
Absolutetraders.com - http://absolutetraders.com/main/
tsupitero.com - http://tsupitero.com/

CONCEPTS:
Elliott Wave - http://stockcharts.com/school/doku.php?id=chart_school:market_analysis:elliott_wave_theory

http://www.moneylifeblood.com/2013/02/dividend-paying-stocks-and-5-year.html#.UcqDo_lORH0

Stock Code Bloomberg Quote Financial Times Quote Reuters Quote Dividend Per Share 2012 Dividend Yield Average
2011 2010 2009 2008 2007
FGEN FGEN:PM FGEN:PHS FGEN:PS NA 9.76 9.76
TEL TEL:PM TEL:PHS TEL:PS Php 171 8.73 8.57 7.9 9.17 4.72 7.818
GLO GLO:PM GLO:PHS GLO:PS Php 65.00 5.47 0 2.46 6.45 7.39 4.354
RLC RLC:PM RLC:PHS RLC:PS Php 0.36 3.19 3.23 2.57 7.53 4.13
URC URC:PM URC:PHS URC:PS Php 1.90 4.58 2.27 2.27 7.16 4.07
BPI BPI:PM BPI:PHS BPI:PS Php 2.30 3.26 1.53 3.85 7.48 1.81 3.586
PX PX:PM PX:PHS PX:PS Php 0.53 1.68 0.87 7.7 3.416667
EDC EDC:PM EDC:PHS EDC:PS Php 1.14 2.54 2.04 2.66 7.76 1.9 3.38
SCC SCC:PM SCC:PHS SCC:PS Php 12.00 4.52 3.24 1.22 3.95 2.81 3.148
SMPH SMPH:PM SMPH:PHS SMPH:PS Php 0.29 2.54 2.75 3.06 4 3.29 3.128
AP AP:PM AP:PHS AP:PS Php 1.54 4.41 0.96 2.33 4.74 3.11
BDO BDO:PM BDO:PHS BDO:PS 3% stock div 1.88 1.52 0.8 7.39 1.47 2.612
AEV AEV:PM AEV:PHS AEV:PS Php 1.58 3.94 1.4 3 0.89 2.9 2.426
MWC MWC:PM MWC:PHS MWC:PS Php 0.60 2.89 2.4 2.54 2.64 0.81 2.256
SMDC SMDC:PM SMDC:PHS SMDC:PS Php 0.05 1.62 1.12 1.77 3.18 3.56 2.25
DMC DMC:PM DMC:PHS DMC:PS Php 1.20 2.42 1.39 2.06 3.77 1.04 2.136
MER MER:PM MER:PHS MER:PS Php 8.10 3.16 2.48 1.22 1.68 2.135
SMC SMC:PM SMC:PHS SMC:PS Php 1.75 0.9 4.12 0.51 2.59 2.37 2.098
MBT MBT:PM MBT:PHS MBT:PS Php 1.0 1.47 0.83 2.28 4.47 1.13 2.036
AGI AGI:PM AGI:PHS AGI:PS Php 0.36 3.48 0.48 1.98
SM SM:PM SM:PHS SM:PS Php 10.40 1.55 1.45 2.12 3.07 1.59 1.956
JFC JFC:PM JFC:PHS JFC:PS Php 2.20 1.18 2.53 1.55 2.02 1.54 1.764
AC AC:PM AC:PHS AC:PS Php 2.00 1.93 1.22 1.59 1.15 2.55 1.688
ICT ICT:PM ICT:PHS ICT:PS Php 0.65 0.94 0.89 1.78 2.75 0.66 1.404
MEG MEG:PM MEG:PHS MEG:PS Php 0.03 1.4 0.77 1.28 2.77 0.49 1.342
PCOR PCOR:PM PCOR:PHS PCOR:PS Php 0.10 0.79 0.53 1.96 1.75 1.2575
ALI ALI:PM ALI:PHS ALI:PS Php 0.21 0.97 0.57 0.53 0.94 0.42 0.686
JGS JGS:PM JGS:PHS JGS:PS Php 0.16 0.32 0.26 0.45 1.76 0.26 0.61
MPI MPI:PM MPI:PHS MPI:PS Php 0.03 0.68 0.26 0.47

Monday, June 10, 2013

Outline: The 16 Days of Competencies

POST: http://zengerfolkman.wordpress.com/2011/09/21/the-16-days-of-competencies-1-displays-high-integrity-and-honesty/

POSTED BY: zengerfolkman, September 21, 2011

#1 DISPLAYS HIGH INTEGRITY AND HONESTY
  • Avoid saying one thing and doing another (i.e., walk the talk)
  • Follow through on promises and commitments
  • Model the core values
  • Lead by example
Are you able to communicate bad news to your boss? Do you confront difficult problems directly and promptly? Are you assertive enough to stand up for what you believe, even if it is not the popular position?

#2 TECHNICAL AND PROFESSIONAL EXPERTISE
  • Stay up to date in the field
  • Demonstrate technical, functional, and job-specific knowledge required for assignments
  • Be sought out for opinions, advice, and counsel
  • Make a significant contribution toward achieving team goals through knowledge and skills
Do you stay up to date by reading professional journals and books? Do you participate in trade association meetings? Do you help to integrate the different technologies that affect your group —determining how they fit together and how they contribute to the efforts of the organization?

#3 SOLVES PROBLEMS AND ANALYZES ISSUES
  • Systematically evaluate information by using a variety of proven methods and techniques
  • Encourage alternative approaches and new ideas
  • See patterns and trends in complex data and use the patterns to outline a path forward
  • Clarify complex data or situations so that others can comprehend, respond, and contribute
Do you ask your team members for help in solving problems? Do you consider the viewpoints of various interested parties? When problems arise, do you make a list of possible causes, prioritizing them in the order of probability that they actually contribute to the problem? Do you determine what information needs to be collected to resolve the problem?

#4 INNOVATES
  • Consistently generate creative, resourceful solutions to problems
  • Constructively challenge the usual approach to doing things, and find new and better ways to do the job
  • Create a culture of innovation and learning that drives individual development
  • Build on other people’s suggestions and ideas. (Doing so often leads to new approaches and improvements)
Do you champion ingenuity at all levels? Do you work to improve new ideas rather than discouraging them? Do you generate creative solutions by bringing together the most talented people? Do you integrate ideas and input from different sources to find innovative solutions?

#5 PRACTICES SELF-DEVELOPMENT
  • Make constructive efforts to change and improve based on feedback from others
  • Learn from both success and failure
  • Model self-development and embrace its value
Do you take ownership of your own development? Do you seek feedback from others to improve and develop? Do you look for ways to build challenge into current assignments?

#6 DRIVES FOR RESULTS
  • Do everything possible to meet goals or deadlines
  • Consistently meet or exceed commitments
  • Aggressively pursue all assignments and projects until completion
Do you follow up regularly on progress and reinforce any movement in the right direction? Are you willing to volunteer for a difficult task or assignment that requires you to stretch your current capability?

#7 ESTABLISH STRETCH GOALS
  • Build Commitment with all employees on team goals and objectives
  • Promote a spirit of continuous improvement
  • Maintain High Standards of performance
Do you focus on why you can achieve goals rather than on why they can’t be achieved? Are you willing to discuss your priorities and your commitment to your work with others?

#8 TAKES INITIATIVE
  • Volunteer for Challenging assignments
  • Go above and beyond what needs to be done without being told
  • Have the confidence to initiate action independently
Do you approach your work as if your responsibilities extend beyond your immediate job descriptions?  Are you willing to commit extra time and effort when the situation calls for it? Do you constantly ask, “Is there a better way to do this”?

#9 COMMUNICATES POWERFULLY AND PROLIFICALLY
  • Communicate clearly and concisely
  • Give clear, understandable instructions to employees and others
  • Skillfully communicate new insights
When you are preparing to speak to people, do you think about their backgrounds and needs, and about where they stand on the issue you will be discussing? Do you sketch out an outline that presents your case in a logical way?

#10 INSPIRES AND MOTIVATES OTHERS TO HIGH PERFORMANCE
  • Have a personal style that helps to positively motivate others.
  • Energize people to go the extra mile.
  • Skillfully persuade others toward commitment to ideas or action.
Do you employ different motivational strategies to influence the behavior of others?  Do you express confidence in the individual’s ability to reach goals? Do you demonstrate enthusiasm to your group by talking about why your goals are important and encouraging others to set challenging goals?

#11 BUILDS RELATIONSHIPS
  • Deal effectively with people in order to get work accomplished
  • By trusted by work group members
  • Be approachable and friendly
Do you pleasantly greet people when you meet them in the hall? Do you demonstrate an interest in people and their work? Are you able to handle difficult situations constructively and tactfully?

#12 DEVELOPS OTHERS
  • Act as a coach or mentor to facilitate learning from experience
  • Give honest and candid feedback
  • Find stretch assignments for individuals which require them to achieve significant but realistic goals
  • Willingly share his/her time to help others develop.
Do you foster a learning environment that encourages others to learn from their experience? Do you act as a coach or mentor to facilitate learning from experience? Are you willing to make the tough decisions necessary to ensure the current and future success of your employees?

#13 COLLABORATION AND TEAMWORK
  • Promote a spirit of cooperation with other members of the work group
  • Champion an environment that supports effective teamwork
  • Have the trust and respect of the team
Have you developed cooperative working relationships with others in the company? Do you take into account how individual’s actions affect the team? Do you remove barriers to positive team performance?

#14 DEVELOPS STRATEGIC PERSPECTIVE
  • Know how work relates to the organization’s business strategy
  • Balance the short-term and long-term needs of the organization
  • Demonstrate forward thinking about tomorrow’s issues
Do you ensure that work group goals are aligned with the organization’s strategic goals and vision? Do you clarify vision, mission, values, and long-term goals for others? Do you propose initiatives that become part of the organization’s strategic plan?

#15 CHAMPIONS CHANGE
  • Act as a change agent—strongly support the continual need to change
  • Become a champion for projects or programs, presenting them so that others support them.
  • Be an effective marketer for work group projects, programs, or products.
Do you encourage people to let go of old ways so new ways can begin? Are you one to help teams and work groups translate new change goals into practical implementation steps? Can you champion organizational change initiatives in a way that helps people understand, appreciate, and support them?

#16 CONNECTS THE GROUP TO THE OUTSIDE WORLD
  • Know how to deliver products or services that delight customers by meeting and exceeding their expectations
  • Use knowledge and feedback from an external perspective to improve products or services
Do you view your work in the context (through the eyes) of the external customer? Are you willing to help people understand how meeting customer needs is central to the mission and goals of the organization?

Sunday, June 2, 2013

SSL and certificates

Terms:

  • SSL (Secure Socket Layer) - a security protocol that ensures secure transaction/connection between a server and a client
  • https - beginning of an SSL-secured website/URL
  • SSL Certificate - a small data file that establishes encrypted connection. It contains a key pair, a public and private key, and the subject identifying the certificate. Typically an SSL Certificate will contain your domain name, your company name, your address, your city, your state and your country. It will also contain the expiration date of the Certificate and details of the Certification Authority responsible for the issuance of the Certificate.
  • Certificate Authority or CA - the SSL Certificate issuer. It researches companies, checks references, assures identity and encrypts data to and from servers. 
  • certificate chain - a series of intermediate certificates
  • public, private, and session keys - anything encrypted with the public key can only be decrypted with the private key, and vice versa. After the secure connection is made, the session key is used to encrypt all transmitted data. 

Server Setup: (http://www.lwithers.me.uk/articles/cacert.html)

  1. In order for a server to handle SSL connections, it must activate SSL.
  2. Server will be prompted several question about identity of website or organization.
  3. Server generates the CSR (Certificate Signing Request). It contains the private key and a CSR data file.
  4. The CA uses the CSR data file to create a public key to match the private key.
  5. CA sends the SSL certificate.
  6. Server installs the SSL certificate. (http://www.digicert.com/ssl-certificate-installation.htm)

How it works:
  1. Browser connects to a web server secured with SSL (https). Browser requests that the server identify itself.
  2. Server sends a copy of its SSL Certificate (including the server’s public key), to assure the client that it can be trusted. The SSL Certficate was purchased from CA.
  3. Browser checks the certificate root against a list of trusted CAs and that the certificate is unexpired, unrevoked, and that its common name is valid for the website that it is connecting to. If the browser trusts the certificate, it creates, encrypts, and sends back a symmetric session key using the server’s public key. --- "SSL handshake"  
  4. Server decrypts the symmetric session key using its private key and sends back an acknowledgement encrypted with the session key to start the encrypted session.
  5. Server and Browser now encrypt all transmitted data with the session key.

Commands:

  • the default password is changeit
  • list certificates
    keytool -list -v -keystore [cacert location], ex. keytool -list -v -keystore cacerts.jks
  • list certificates to a text file
    keytool -list -v -keystore [cacert location] > [text file path]
    keytool -list -v -keystore "C:/Program Files (x86)/Java/jre6/lib/security/cacerts" > java_cacerts.txt
  • delete certificate (used when certificate is expired)
    keytool -delete -v -alias [alias] -keystore [cacert location], ex. keytool -delete -v -alias [alias] -keystore cacerts.jks
  • add certificate to cacert
    keytool -import -alias [alias name] -keystore  [cacert location] -file [cert to add path]
    keytool -import -alias Verisign -keystore  "C:/Program Files (x86)/Java/jre6/lib/security/cacerts" -file C:/bel/docs/certs/Verisign.cer


Source:
http://www.digicert.com/ssl.htm

Tuesday, April 23, 2013

Custom JSP tags

1) Make sure that the library for tags is in your classpath. servlet-api-2.3.jar supports it.
2) Create the tag class
   Ex.
   public class MyTag extends TagSupport
   public class HelloTag extends SimpleTagSupport
3) Create the tag libray descripto file and put anywhere inside WEB-INF directory
   Ex. WEB-INF/tld/myApp.tld
<taglib>
  <tlib-version>1.0</tlib-version>
  <jsp-version>2.0</jsp-version>
  <short-name>Example TLD</short-name>
  <tag>
    <name>Hello</name>
    <tag-class>com.tutorialspoint.HelloTag</tag-class>
    <body-content>empty</body-content>
  </tag>
</taglib>
4) Use the tag. You can also set uri in tld and use it as your uri in JSP page.
<%@ taglib prefix="ex" uri="WEB-INF/tld/myApp.tld"%>
<html>
  <head>
    <title>A sample custom tag</title>
  </head>
  <body>
    <ex:Hello message="This is custom tag" />
  </body>
</html>

Tuesday, April 2, 2013

Merging in SVN using Eclipse

  1. Do a fresh checkout of the project where you are going to merge into. This is done to ensure that your target branch is up to date.
  2. Right click the project and click Team -> Merge
  3. In URL, browse on the source project
  4. Click Ok
  5. Resolve any conflicts

Thursday, February 7, 2013

JBoss Drools

JBoss/JBoss AS (JavaBeans Open Source Software Application Server)

- now has a new name WildFly
- is a J2EE platform for developing and deploying enterprise Java applications, Web applications and services, and portals

Drools/JBoss Rules

- a rule language
- case sensitive
- single line comments starts with # or //, multi-line comments are enclosed in /* and */

Rule file - file ending with .drl

jBPM

- is a flexible java Business Process Management (BPM) Suite
BPM makes the bridge between business analysts, developers and end users, by offering process management features and tools in a way that both business users and developers like it

Components of jBPM

  • core process engine - the only required component
    • history log
    • human task service
  • graphical editors
    • eclipse plugin
    • web-based designer
  • Guvnor respository - can store all business processes
  • jBPM console - web-based console for managinf business processes

Core

knowledge base
   - used to look up the process definitions whenever necessary
   - uses a knowledge builder to load processes from various resources (for example from the classpath, from file system or process repository), i.e.
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("ruleflow.rf"), ResourceType.DRF);
   - can be dynamically changed (so you can add or remove processes at runtime)
session
   - instantiated from knowledge base and are used to execute processes and interact with the engine

Structure of a Rule File:

package package-name - must always be the first element
imports - optional, order does not matter
globals - optional, order does not matter, define global vars
functions - optional, order does not matter
function String hello(String name) {
    return "Hello "+name+"!";
}

queries - optional, order does not matter
rules - optional, order does not matter
rule "name"
    attributes
    when
        LHS
    then
        RHS
end


Common rule attributes: 

salience - priority, higher salience values are given higher priority, default is 0, can be positive or negative
agenda-group - a group name, only rules in the agenda group that has acquired the focus are allowed to fire
activation-group - same as if else, only one will fire

Ref:
http://docs.jboss.org/jbpm/v5.1/userguide/

Monday, January 28, 2013

Ant buildfile

Each buildfile contains one project and at least one (default) target. Targets contain task elements.

Basic components/tags:
1) project - attributes: name, default, and basedir

2) target - attributes: name, depends, if, unless, descriptiondefault, and basedir

3) tasks - can be built-in or user defined
Common tasks: init, sets properties, prepare, creates directories, build, builds the system, package, creates jar file, install, installs an application to Tomcat or other engine, deploy, deploy a WAR engine, reload, update previously installed application engine, redeploy

4) properties - to reference, enclose in "${" and "}"
Some Built-in Properties: basedir, ant.file, ant.version, ant.project.name, ant.java.version


Tags:
                     ...


Ref:
http://ant.apache.org/manual/using.html

Sunday, January 27, 2013

Windows and Unix common commands

WindowsUnixDescription
attrib

change(clear or set) the attribute of the file

cdpwdprint current working directory
cd <dir>cd <dir>change directory
clsclearclear screen
cmdStarts a new instance of the Windows command interpreter
copycpcopy
cp /mySrc .
date, timedateprint current date and/or time
delrmdelete
deltreerm - rrecursively delete entire directory tree
dirlslist files and directories
ls attributes:
-a Include hidden fiels (beginning with .)
-l long format
-s sort by time modified
-r reverse sort 
doskey /hhistoryprint history
editvi etc.create new file, show edit window

common vi commands:
/<text> - search forward
n - next occurrence
?<text> - search backward
n - previous occurrence
:set number - show line number
:q | :quit | :q! - quit
exitexit
Ctrl-D
exit
findfinds files/folders or string in files
Ex.
dir c:\ /s /b | find "CPU" - display the file names on drive C that contain the string "CPU"
find . -name "foo*"
findgrepsearch
grep -n 'UnknownServiceException' */*/*/server.log
grep -rni "string" * .*
grep -E "a|b"
  r = recursive i.e, search subdirectories within the current directory
  n = to print the line numbers to stdout
  i = case insensitive search
  .* = hidden files/directory
  -E = extended regex (i.e., may use | for or) 
helpmanhelp/manual
displays all available commands & how to use them
ipconfig /allipconfig -aprint network details
mkdirmkdircreate new folder/directory
movemvmove file or folder
rmdirrmdirremove folder/directory
setenvset environment variable
set Pathecho $PATHprint value of environment var PATH
startstarting/opening a command/program
List of commands for Windows XP, Vista and Windows 7: http://ss64.com/nt/run.html
Ex.
subst notepad
start /d "C:\Program Files (x86)\Notepad++" notepad++.exe -> start the executable and close the command prompt that called it
substsubstituting path
subst R: D:\temp\temp
typecatdisplay contents of a file, concatenate files or create a new file
Ex.
cat > 1.txt
This is the first line.
- creates a simple text file. ^D mrks the end of file.
cat 1.txt - display contents of 1.txt
cat 1.txt 2.txt > 3.txt - concatenate 1.txt and 2.txt ans save it in 3.txt
treefind .,
ls -R
print directory structure
lessdisplay the contents of a text file on console
lnmake link
Types:
1. Hard link (default) - Points to a file through inode number. If the original file's name is changed, hard link still points to same file.
2. Symbolic link (ln -s) - Points to a file through name. If the original file's name is changed, symbolic link still points to the original name and does not point anymore to the original file. If the original file's content is changed, symbolic link still points to the same file.
ln -s myFolder myShortcut - create
ln -sfn myFolder2 myShortcut - update
   -f = force
   -n = treat LINK_NAME as a normal file if it is a symbolic link to a directory, else LINK_NAME  will be treated as symbolic link and will not effectively remove link to previous target and point to new target
printenvprint environment variables
tararchive/extract
tar -xvf sample.tar.gz

PATH
WindowsUnixDescription
\/Directory separator, e.g. C:\user\docs\sample.txt
/-Switch, e.g. dir /w
[drive letter:]\ or
\\[server name]\[volume]\
/Root directory
..Current directory
....Parent directory
~Home directory - $HOME var in UNIX, which usually is /home/username
C:\user\docs\sample.txt
docs\sample.txt
A:pic.jpg \\server01\user\docs\sample.txt
//home/user/docs/Letter.txt .
/inthisdir
../../greatgrandparent ~/.rcinfotd>
Sample paths


Source:
https://en.wikipedia.org/wiki/Path_(computing)

Sunday, January 13, 2013

Software Testing

Testing Levels
  • Unit testing
    • done in local/DEV
    • testing fixes individually
  • Integration testing
    • done in SIT
    • testing integrated modules
    • deals with integration of a process in the system, not the integration of the whole system
  • System testing
    • done in SIT
    • testing the system as a whole
    • Types of system testing:
      • Usability testing – this is how well the user can access the different features in the system and how easy it is to use.
      • GUI software testing – this is to check if graphically that the program looks how was intended and the GUI works as intended.
      • Security testing – this would be to check if important information is secure and if there are certain access restriction that they work.
      • Accessibility – how easy is it for various users including users with disability to use the system.
      • Reliability testing – to check that the system works for long period of time and does not constantly crash.
  • User acceptance testing
    • done in UAT
    • obtain confirmation that a system meets mutually agreed-upon requirements