2017-09-28

Access restriction: The type 'JPEGCodec' is not API (restriction on required library 'C:\Program Files\Java\jdk1.6.0_45\jre\lib\rt.jar')




Found solution at: https://stackoverflow.com/questions/9266632/access-restriction-is-not-accessible-due-to-restriction-on-required-library


I ran into something similar, I think that the cause of the warning is Eclipse trying to discourage you from using the internal com.sun packages that are installed as part of your workspace JRE but which are not part of the public Java API.
As Justin says in his answer, changing your compiler settings can hide the warning. A more fine-grained approach is to modify your build path to explicitly allow access to the package in question:
  1. Open the Libraries tab of the Java Build Path project property window.
  2. Expand the JRE System Library entry.
  3. Select "Access rules" and hit the Edit button.
  4. Click the Add button in the resulting dialog.
  5. For the new access rule, set the resolution to Accessible and the pattern to "com/sun/xml/internal/**".
After adding this access rule, your project should build without these warning.

2017-09-26

JAR libraries was not in maven repository.




Summary:

  1. Added Web App Libraries are to resolve eClipse IDE classes/jars unresolve issue.
  2. Assign Web App Libraries to [Native library location] are to resolve run as maven install, cannot find symbol



regEx - Regular Expression to exclude set of Keywords




RegEx format:
^(?:(?!.SearchText1|SearchText2|SearchText 3|Search Text\|4|SearchText5).)*$\r?\n?


^(?:(?!.No such file or directory|Permission denied|recursive directory loop|Operation not supported on socket).)*$\r?\n?

^(?:(?!.1.2|1.3|1.1.1|appVerision\|null|1.0).)*$\r?\n?


2017-09-25

The following error occurred while importing IMG_XXXX.JPG: A device attached to the system is not functioning.


My case was connected to the fast charging port of the laptop.

Message won't pop up anymore after change to normal USB of the laptop.





2017-09-18

The VM session was closed before any attempt to power it on.









Found reference from: http://www.sysprobs.com/vm-session-closed-attempt-power-virtualbox-32-error

But I was unable to follow through as unable to remove both drive advised in the post.

Then I was still able boot my VM back by:

  1. Right click VM.
  2. Choose "Detachable Start"
  3. With an error pop up.(forgot what was that)
  4. Then Right click VM.
  5. And do Normal Start.

2017-07-18

How to force to clear standby memory so can be reuse immediately.




By referring to:

https://blogs.technet.microsoft.com/askperf/2010/08/13/introduction-to-the-new-sysinternals-tool-rammap/

Download

RAMMap v1.5

from

https://technet.microsoft.com/en-us/sysinternals/ff700229.aspx


unzip  RAMMap.zip
run RAMMap.exe

from menu, select

Empty

>   Empty Standby List

2017-06-12

Oracle VM VirtualBox Version 5.1.22



Oracle VM VirtualBox Version 5.1.22

Unable to install antivirus of:


  1. Avast offline
  2. Avast online.
  3. AVG online











2016-12-30

tomcat softlink









#remember what u did in:
/opt/Programs/apache-tomcat-8.0.36/conf/context.xml

<Resources allowLinking="true"></Resources>


#1
Create a real/physical file at dashboard with path:
 /opt/Programs/apache-tomcat-8.0.36/webapps/dashboard/gg.jsp

#2
Then go to cp or other module:
cd /opt/Programs/apache-tomcat-8.0.36/webapps/cp

#3
Create softlink so u can access same file & source from dashboard, when u access cp.(which simulate leftnav.jsp) by using script:
ln -s /opt/Programs/apache-tomcat-8.0.36/webapps/dashboard/gg.jsp gg.jsp

#script definition:
ln -s sourceFullPath shortcut
#more refer to:
https://www.cyberciti.biz/faq/unix-creating-symbolic-link-ln-command/
#or:
google linux softlink

2016-12-20

java.lang.NoSuchMethodError


Reference URL: http://timen-zbt.iteye.com/blog/1871152



HTTP Status 500 - Handler processing failed; nested exception is java.lang.NoSuchMethodError: com.company.model.project.ObjectPerson.isMale()Z




注意:这里将superUser属性的类型改为Boolean(boolean的封装类型)
然后将编译后的Person.class拷贝到刚刚发布的项目中替换掉刚才的Person.class文件(注意你没有更改TestNoSuchMethodError类,所以大多你不会想更新这个类)









2016-09-15

SVN tab is missing from eclipse project properties for existing SVN projects after svn plugin/connector crashed.

1st, removed all related SVN plugins and connectors.
Then reinstall again SVN plugins & connectors.

But existing SVN projects won't appear to have SVN enabled.





http://stackoverflow.com/questions/166220/restore-eclipse-subversion-project-connection




Edit: is not applicable to Neon.2.


Trying for mars and successful:
https://docs.google.com/document/d/12Fh-NqSj4-shRVtlVwvjEOqiqMwlsvvfOGh1WpC_U2s/edit?usp=sharing

2016-06-14

1st meet with Jenkins...



https://zh.wikipedia.org/wiki/Jenkins_(%E8%BD%AF%E4%BB%B6)







To be continue...







New Line character(s)


References URL:

  • https://en.wikipedia.org/wiki/Newline






Info from Wikipedia

  • LF:    Multics, Unix and Unix-like systems (Linux, OS X, FreeBSD, AIX, Xenix, etc.), BeOS, Amiga, RISC OS, and others[1]
  • CR:    Commodore 8-bit machines, Acorn BBC, ZX Spectrum, TRS-80, Apple II family, Oberon, Mac OS up to version 9, MIT Lisp Machine and OS-9
  • RS:    QNX pre-POSIX implementation
  • 0x9B:  Atari 8-bit machines using ATASCII variant of ASCII (155 in decimal)
  • CR+LF: Microsoft Windows, DOS (MS-DOS, PC DOS, etc.), DEC TOPS-10, RT-11, CP/M, MP/M, Atari TOS, OS/2, Symbian OS, Palm OS, Amstrad CPC, and most other early non-Unix and non-IBM OSes
  • LF+CR: Acorn BBC and RISC OS spooled text output.



  • Not sure for Android, using Titanium...
    Facing issue to handle CSV files with contents, which lines end with CR+LF("\r\n")

    To be continue...



















    2016-05-11

    Spring javax.naming.PartialResultException LDAP Authentication


    Reference URL: http://stackoverflow.com/questions/16412236/how-to-resolve-javax-naming-partialresultexception






    Sample Errors:


    stdout: 2016-05-11 18:16:22,077     INFO: _____ -  URL 'ldap://valid-server-ip-address:389/DC=company,DC=com,DC=branch_location', root DN is 'DC=company,DC=com,DC=branch_location'.#####                com.company.spring.security.SpringSecurityContextSourceWrapper:   57
    stdout: 2016-05-11 18:16:22,138    DEBUG: _____ - AuthenticationSource not set - using default implementation.#####                      org.springframework.ldap.core.support.AbstractContextSource:  328
    stdout: 2016-05-11 18:16:22,140    DEBUG: _____ - Using LDAP pooling..#####                      org.springframework.ldap.core.support.AbstractContextSource:  346
    stdout: 2016-05-11 18:16:22,141    DEBUG: _____ - Trying provider Urls: ldap://valid-server-ip-address:389/dc=company,dc=com,dc=branch_location.#####                      org.springframework.ldap.core.support.AbstractContextSource:  371
    stdout: 2016-05-11 18:16:23,328    DEBUG: _____ - Looking for controller advice: org.springframework.context.support.ClassPathXmlApplicationContext@376f2723: startup date [Wed May 11 18:16:15 SGT 2016]; root of context hierarchy.##### org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter:  618
    stdout: 2016-05-11 18:16:23,388    DEBUG: _____ - Looking for exception mappings: org.springframework.context.support.ClassPathXmlApplicationContext@376f2723: startup date [Wed May 11 18:16:15 SGT 2016]; root of context hierarchy.##### org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver:  284
    stdout: 2016-05-11 18:16:23,782    DEBUG: _____ - Unable to locate LifecycleProcessor with name 'lifecycleProcessor': using default [org.springframework.context.support.DefaultLifecycleProcessor@23da34b5].#####               org.springframework.context.support.ClassPathXmlApplicationContext:  858
    stdout: 2016-05-11 18:16:23,784    TRACE: _____ - Publishing event in org.springframework.context.support.ClassPathXmlApplicationContext@376f2723: org.springframework.context.event.ContextRefreshedEvent[source=org.springframework.context.support.ClassPathXmlApplicationContext@376f2723: startup date [Wed May 11 18:16:15 SGT 2016]; root of context hierarchy].#####               org.springframework.context.support.ClassPathXmlApplicationContext:  332
    stdout: 2016-05-11 18:16:23,842    DEBUG: _____ - Got Ldap context on server 'ldap://valid-server-ip-address:389/dc=company,dc=com,dc=branch_location'.#####                      org.springframework.ldap.core.support.AbstractContextSource:  259
    stdout: 2016-05-11 18:16:23,903    DEBUG: _____ - PartialResultException encountered and ignored.#####                                       org.springframework.ldap.core.LdapTemplate:  312
    javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name '/'
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2866)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2840)
    at com.sun.jndi.ldap.LdapNamingEnumeration.getNextBatch(LdapNamingEnumeration.java:147)
    at com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(LdapNamingEnumeration.java:216)
    at com.sun.jndi.ldap.LdapNamingEnumeration.hasMore(LdapNamingEnumeration.java:189)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:295)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:237)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:624)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:535)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:462)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:483)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:503)
    at org.springframework.ldap.core.LdapTemplate.authenticate(LdapTemplate.java:1482)
    at org.springframework.ldap.core.LdapTemplate.authenticate(LdapTemplate.java:1386)
    at test.ldap.UTIL_AUTHEN.main(UTIL_AUTHEN.java:52)
    stdout: 2016-05-11 18:16:23,907    DEBUG: _____ - Removing pooling flag for user cn=Administrator,cn=Users,dc=company,dc=com,dc=branch_location.#####                com.company.spring.security.SpringSecurityContextSourceWrapper:   76
    stdout: 2016-05-11 18:16:23,917    DEBUG: _____ - Got Ldap context on server 'ldap://valid-server-ip-address:389/dc=company,dc=com,dc=branch_location'.#####                      org.springframework.ldap.core.support.AbstractContextSource:  259
    ===============================
    Administrator
    pa55word@2016
    ===============================
    true
    stdout: 2016-05-11 18:16:23,921    DEBUG: _____ - Got Ldap context on server 'ldap://valid-server-ip-address:389/dc=company,dc=com,dc=branch_location'.#####                      org.springframework.ldap.core.support.AbstractContextSource:  259
    stdout: 2016-05-11 18:16:23,936    DEBUG: _____ - PartialResultException encountered and ignored.#####                                       org.springframework.ldap.core.LdapTemplate:  312
    javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name '/'
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2866)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2840)
    at com.sun.jndi.ldap.LdapNamingEnumeration.getNextBatch(LdapNamingEnumeration.java:147)
    at com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(LdapNamingEnumeration.java:216)
    at com.sun.jndi.ldap.LdapNamingEnumeration.hasMore(LdapNamingEnumeration.java:189)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:295)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:237)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:624)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:535)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:462)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:483)
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:503)
    at org.springframework.ldap.core.LdapTemplate.authenticate(LdapTemplate.java:1482)
    at org.springframework.ldap.core.LdapTemplate.authenticate(LdapTemplate.java:1386)
    at test.ldap.UTIL_AUTHEN.main(UTIL_AUTHEN.java:65)
    stdout: 2016-05-11 18:16:23,938    DEBUG: _____ - Removing pooling flag for user cn=Staff Name,cn=Users,dc=company,dc=com,dc=branch_location.#####                com.company.spring.security.SpringSecurityContextSourceWrapper:   76
    stdout: 2016-05-11 18:16:23,949    DEBUG: _____ - Got Ldap context on server 'ldap://valid-server-ip-address:389/dc=company,dc=com,dc=branch_location'.#####                      org.springframework.ldap.core.support.AbstractContextSource:  259
    ===============================
    staff.name
    pa55word*()
    ===============================
    true







    <bean id="contextSourceLdap"
    class="com.customized.spring.security.SpringSecurityContextSourceWrapper">
    <constructor-arg value="${LDAP.SERVER}:389/${LDAP.DOMAIN}"/>
    <property name="userDn" value="${LDAP.USERDN}"/>
    <property name="password" value="${LDAP.PASSWORD}"/>
    </bean>





    <bean id="contextSourceLdap"
    class="com.customized.spring.security.SpringSecurityContextSourceWrapper">
    <constructor-arg value="${LDAP.SERVER}:3268/${LDAP.DOMAIN}"/>
    <property name="userDn" value="${LDAP.USERDN}"/>
    <property name="password" value="${LDAP.PASSWORD}"/>
    </bean>
































    2016-04-23

    FWD: Malaysia vs Singapore: Which Country Is Cheaper To Live In?




    Source URL: https://www.imoney.my/articles/malaysia-vs-singapore-which-country-is-cheaper-to-live-in

    Image URL: https://www.imoney.my/articles/wp-content/uploads/1995/04/R2_INFOGRAPHIC-Malaysia-vs.-Singapore-Which-country-will-let-you-earn-more-save-more-and-spend-less-3-1.jpg





    Who thinks the cost of living in Singapore is much higher than in Malaysia? Well, most people actually, considering that the island republic just topped theEconomist Intelligence Unit’s 2016 Worldwide Cost Of Living Survey, making that the third year in a row. The survey compares the cost of living in 133 cities around the world.
    Cost of living is the amount of money you need to sustain a certain way of living, including paying for basic expenses like food, clothing and housing.
    Of course, if you take it at face value, cost of living is indeed higher in Singapore, especially since Singapore has already attained developed nation status and is also a cosmopolitan nation, so naturally things are more expensive there.
    Housing and cars in the island nation are also way more expensive to own there. Due to its land scarcity, housing and rental rates in Singapore cost up to three times more than in Malaysia!
    Transportation, on the other hand, is way more advanced in Singapore, hence many residents in the island do not need to own a car. That is not something many Malaysians can do yet, as public transportation is only robust in certain areas of the Klang Valley.
    If you factor in the currency conversion rate (which stands at 2.9 at this point in writing), it might appear at first, that it would be much more expensive to live in Singapore than in Malaysia.
    However, for an apple-to-apple comparison, currency conversion should not be factored in when assessing the difference in cost of living in both countries.
    Cost of living is more accurately adjudged when you compare the average income of a nation versus the average prices of goods and services, especially in purchasing the necessities for sustaining a decent livelihood.
    To date, Malaysia’s average monthly disposable salary is RM3,505 (US$869.10) while Singapore’s is S$4,152 (US$3,028.38). The bad news is, Malaysians do not only earn less than their neighbours across the causeway, the weaker Ringgit currency compared to the US dollar (with an exchange rate of roughly 3.9 versus the Singapore dollar’s 1.36 at this point in writing) also means that imported goods that are sold in Malaysia often cost more in the Ringgit quantum.
    For instance, apparel like a pair of Nike shoes and Levi’s jeans could cost up to two times more in the Ringgit quantum, while a typical McDonald’s combo meal is sold for RM12 in Malaysia, compared to just S$7.50 in Singapore.
    Though the comparison of cost of living between these two countries do not just comprise comparing prices of clothing and McDonald’s meal, there are many areas that Malaysia prices top its counterparts across the causeway.

    So, which country has it better? View our infographic to find out.

    *Prices shown in the infographic are averages.
    Article is updated as of 22 April 2016.


     
    R2_INFOGRAPHIC-Malaysia-vs.-Singapore-Which-country-will-let-you-earn-more-save-more-and-spend-less-3-1.jpg























    2016-04-17

    Fwd: Visceral Fat (VFat)


    Visceral Fat (VFat)


    Source URL: https://www.facebook.com/stephanie.meiwan/media_set?set=a.10154038076566192.1073741894.509476191&type=3


    Visceral Fat is the fat that is wrapped around our heart and other vital organs. It is also the fat that is deposited around our arteries. Too much of visceral fat deposit causes blockage of blood flow in arteries. HEART ATTACK happens when the blockage occurs in heart arteriea; STROKE happens when the blockage occurs in brain arteries. BAD NEWS is visceral fat cannot be burn through any exercise at all. So if anyone of you out there who decides to start exercising hoping to burn your visceral fat, sadly to know that no matter how much you exercise, your visceral fat will stay the same. Visceral fat can only be reduced through diet (what you eat daily) and supplements. 

    Do you know how many layers of visceral fat is wrapping and covering your heart? 
    1 to 4: Excellent 
    5 to 8: Healthy 
    9 to 12: Bad 
    13 and above: Alarming 





































    2016-03-22

    Spring Webflow redirect url with execution value injected.






    Reference URL: https://github.com/icescrum/iceScrum/issues/8



    <Connector address="127.0.0.1" port="8080"
        protocol="org.apache.coyote.http11.Http11NioProtocol"    connectionTimeout="20000"
        redirectPort="8443" 
        scheme="https" proxyPort="443" />



    Related term:

    1. tomcat
    2. Spring
    3. Webflow
    4. redirect
    5. inject execution value










    2016-01-26

    Search in notepad++ [To be continue]



    notepad++_find_replace_mysql_createscript_to_selectscript

    Find What: "` .*?,\r\n\t"
    Replace with: "`, "










    Find: "` .*?,\r\n\t"
    Replace: "`" \)\;\r\n\tsb.appendCustomizedString\( ", "
    (exclude 1st and last character of double quote["] )





    to





















    2015-12-16

    Bookmark: 产品能力框架图


    Source URL: http://blog.bizcloudsoft.com/?attachment_id=194



    产品能力框架图



























    Fwd: How can I get rid of avast signature in gmail.


    Source URL: https://forum.avast.com/index.php?topic=180162.0



    If you are running latest build of Avast, you can disable Avast signature directly in Settings -> General > Uncheck "enable Avast email signature". 
    After restart of your PC, Avast email signature should be disabled.
























    2015-11-27

    【转】 —— 華碩、聯想、戴爾三大 PC 吐槽 MacBook!聯想批 Apple 落後一年


    Source URL: http://share.inside.com.tw/posts/15522





    華碩、聯想、戴爾三大 PC 吐槽 MacBook!聯想批 Apple 落後一年(tech.qq.com)

    http://tech.qq.com/a/20150313/020090.htm
    匿名 於 一天前發佈
    Apple 最近發表了其最薄最輕的 MacBook ,許多人都大加讚嘆,但 PC 廠商們對 Apple 就不是那麽客氣了,他們在 Twitter 上一起嘲笑 Apple MacBook ,說 MacBook 才不是市場上最薄、最輕和解析度最高的筆記型電腦。

    Asus

    華碩用其 ZenBook UX305 筆記型電腦跟 MacBook 做了對比,說 UX305「甚至比新 MacBook 身材更苗條」,而且「價格只有一半」。華碩的這款筆記型電腦雖然比新 MacBook 重了差不多半斤,但的確薄了近 1 mm。

    Dell

    Dell 則拿 MacBook 的 12 吋視網膜螢幕開刀,說比不上其XPS 13筆記型電腦。 Dell 在 Twitter上說:「我們的Dell XPS 13 擁有幾乎沒有邊框的顯示螢幕,解析度達 570 萬,比 12 寸視網膜螢幕高出200萬。」

    當然, Dell 沒說他們的 XPS13 比新 MacBook 厚了2 mm,比 MacBook 重了大約 227 克。

    Lenovo

    聯想則借此大大誇讚了自家的筆記型電腦,說新 MacBook 「So last year」(超落後)。聯想在其 Twitter 上說:「我們去年出的筆電就比你薄了(你真是超落後),還比你多了三種模式、兩個 USB 接口、和一個更高解析度的觸控螢幕。」

    聯想的 Yoga 3 Pro可在筆記型電腦和平板之間切換,搭配了 Windows 8.1 作業系統。像上述兩款筆記型電腦一樣,聯想 Yoga 3 Pro 也比 MacBook 重了一些。
    2008年 Apple 推出 MacBook Air 的時候,沒有 PC 廠商能夠做出如此輕薄的筆記型電腦。後來 Intel 入了 3 億美元推出 Ultrabook 計劃,PC廠商才在三年後開始趕上 Apple 。這一次, Apple 顯然認為 Apple 再次引領了發展的方向,首席設計師 Jonathan Ive 在推薦 MacBook 時說「大家都癡迷於簡單的概念,最終簡化了 MacBook 基本組件,創造了最有效的設計」。

    Google Referrals