java

Java (Indonesian: Jawa; Javanese: ꦗꦮ) is an island of Indonesia. With a population of 143 million, Java is the world's most populous island, and one of the most densely populated places in the world. [read more at http://en.wikipedia.org/wiki/Java]

  • phpstorm_header

    JetBrains PhpStorm is a commercial IDE for PHP built on JetBrains' IntelliJ IDEA platform.

    PhpStorm provides intelligent editor for PHP code, HTML and JavaScript with on-the-fly code analysis and automated refactoring for PHP and JavaScript code. Code completion supports PHP 5.3 including namespaces and closures.

  • phpstorm_header

    JetBrains PhpStorm is a commercial IDE for PHP built on JetBrains' IntelliJ IDEA platform.

    PhpStorm provides intelligent editor for PHP code, HTML and JavaScript with on-the-fly code analysis and automated refactoring for PHP and JavaScript code. Code completion supports PHP 5.3 including namespaces and closures.

  • What if you have to decompile a huge jar file (like weblogic.jar) to debug a nasty issue? for a lot of closed source binary the source code is not always available, in this small post I will show you how to automate the de-compilation of java classes with a bit of bash magic.

     

    First you’ll have to get the JAD decompiler if you don’t already have this tool in your development toolbox

    wget
     www.varaneckas.com/sites/default/files/jad/jad158e.linux.static.zip
    unzip jad158e.linux.static.zip

    Unpack and decompile all class found in the jar file, replace the file weblogic.jar with any other jar file

    jar 
    -xf weblogic.jar && find . -iname "*.class" | xargs /path.to/jad -r

    Delete all files *.class from the current directory recursively

    find . -type f -name *.class -exec rm {} \;

    And rename all decompile .jad files to .java

    find -name *.jad -exec rename 's/\.jad$/\.java/' {} \;

    You can now repack the whole directory into a zip that you may deploy in your local maven repository or attached to weblogic.jar as source code in eclipse. I now just have to wish you good luck and happy debugging sessions!

    Links

    http://www.varaneckas.com/jad

  • Preinstalled applications are in /system/app folder, these are the one that can not be removed without root access. User installed applications are in /data/appbut also can be seen nor downloaded without a root access.

    If you just want to get an APK file of something you previously installed, you can do this:

    1. Get AirDroid from Google Play, this app let you wirelessly manage, control and access to Android Devices from a web browser Over-The-Air.
    2. Access your phone using AirDroid from your PC web browser,
    3. Go to Apps and select the installed app,
    4. Click the "download" button to download the APK version of this app from your phone.

    airdroid2

  • iphone

    You need of course a Jailbroken iPhone, normal and loyal user of Apple  you are not allowed to save your own SMS!!!

    shh to your iphone, using WINSCP for example

    iphone.export.sms.00

    Use login root, default password is alpine (but you should have change it to something else for better security a long time ago)

    Go to the directory  /private/var/mobile/Library/SMS

    iphone.export.sms.01

    and copy the file sms.db to your local disk

    Download SQL lite browser at http://sqlitebrowser.sourceforge.net/

    SQLite Database Browser is a freeware, public domain, open source visual tool used to create, design and edit database files compatible with SQLite. It is meant to be used for users and developers that want to create databases, edit and search data using a familiar spreadsheet-like interface, without the need to learn complicated SQL commands. Controls and wizards are available for users to:

    • Create and compact database files
    • Create, define, modify and delete tables
    • Create, define and delete indexes
    • Browse, edit, add and delete records
    • Search records
    • Import and export records as text
    • Import and export tables from/to CSV files
    • Import and export databases from/to SQL dump files
    • Issue SQL queries and inspect the results
    • Examine a log of all SQL commands issued by the application

    open the file sms.db  in Sql Lite Browser

    iphone.export.sms.02 

    Click on the Tab “Browse Data” and select the Table “Message”, you can see your SMS!

    Now under the menu File – Export – Export as CSV

    iphone.export.sms.03

    You’re done!

    iphone.export.sms.04

    Attention: even if the file format (CSV) can be read in any text editor /Open Office/Office Excel, the data are not presented in an user friendly manner!

    #@$!& APPLE: This is My iPhone and these are MY DATA!

  • Introduction

    I am presenting here some tips which may help You to correct bugs in programs or applications faster, If you have comments or want to submit new ideas, feel free to do it here
    Being good in the process of solving bugs is more or less a habit:

    • You must discover the right informations (most if the time coming from logs file),
    • Know a little bit the system and how components are interacting each other (software architecture),
    • Use some rules and decide what to do (actions).

    This document is all about theses points...and is targeted for java web applications.

    Process

    1. Discovering a bug. Depending on the type of person who report bugs: You, end users, a pool of professional tester, your developer collegues. You will have a different amount of informations and instructions to reproduce it. For a user, assertions like: "The system is not working, the system is slow" is common but it does not contains any real informations, except the fact that something is not working. Most of the time, a persons is responsibble to collect all user&39;s complains, be careful since this person may filter the only useful informations as well. In this phase, you need to collect as many informations as possible.
    2. Use a bug tracking tool, to keep a track of the bug, to have the name of persons and a description how to reproduce it (a web frontend tool like Mantis or Bugzilla is a good start). As a rule: Explain a bug, is the first step for avoiding it! Be descriptive when you assign a ticket in a tracking tool. If you still think You do not need such a tool, the quality of your application, cost controlling and distribution of tasks among developers before shipment will be disastrous,.
    3. Define priorities based on bug severity and assign to a developer (I will suppose it&39;s You :-)). All bug tracking let You define your own subset of priorities.
    4. Define Categories: is it a graphical user interface (GUI), backend, input control problem? All bug tracking let You define your own subset of categories.

      Example of Error Severity Definitions
      taken from Mantis

      Severity
      level

      Definition

      Description

      Consequences

      1Critical
      Error
      Productive operation is not possible.


      Example:
      - Crash,

      The system cannot be launched.
      1Functional ErrorPrevents the usage of the system

      .
      Examples:
      - A needed function is interrupted,
      - Loss of data, corruption of data
      - Usage of the system is hampered in a way that wrong results are created for critical data.
      - Performance or acceptance.o users

      The system cannot be launched.
      2Median ErrorThe productive usage of the system is possible with some interference (a "workaround" can be established)

      Example:
      - Deactivate some functions which are not working properly
      - A Hack in done in code which prevent the bug.
      A "workaround" will be implemented for a short time until the problem is properly fixed.
      3Minor ErrorT he system can be used and errors are imperceptible.
      The bug has to be enter in the bug tracking tool.Priority has to be assigned
      4Change RequestNice to have, improvments

      Example:
      - GUI is not perfect, colors has to be changed, font size, layout
      - Error in Titles, subtitles and blocs of text

      The bug has to be enter in the bug tracking tool.Priority has to be assigned. Usually these bugs are solved if the efforts is small or if developer has some spare time.
    5. Try to reproduce this bug in your development environment, whih is in best case not so much different from production environment. Of course You do not have the same processor or memory or disk but the same software components (database, jvm, classpath, structure of data))
    6. Correct the bug by changing code/avoiding exception case, rewriting algorithm, changing architecture, finding a workaround (hack), adapt functionnalities if it is possible.
    7. In an ideal world:
      1. Write JUNIT testcase(s) to avoid further existence of the same issue. This will greatly improve quality of code!
      2. Document the bugs, correction, and in worst case: a workaround in a central place: a FAQ (Frequently Asked Questions) for developer

    Bug life cycle

    from Mantis

     

     

    Loging, logs files

    • Logs file are the oldest way to degug or monitor an application and it&39;s probably the slowest way to debug or locate bugs. Most of the time, you need to reproduce the error in the system, and that can take a lot of time especially if the application has a very complicated workflow. A workflow: dialog and navigation through the application, ex: select a customer, view all account, do a transfer between 2 account This can be the execution of a use-case or a chain of use-cases.
    • It is a common Fact: Without informations, nobody can debug a process and this even with a lot of chance.
    • Worst case: developper use System.err and System.out for everything, they write "bullshit" in log output ("This is value of i= 2"). Developer do not use the same convention: "Exception : oups" or "@EXCEPTION: ioexception". You must force them to use a logging framework and teach them what to write and level of severity.
    • Best case: Your applications is already using a logging framework like Log4j.
      Log4j let You reduce the amount of logs to a special part of your application or keep track of unusual case in a elegant mannner.
      • The amount of logs (Level),
      • The location (file or TCP server, mail or...),
      • The domains in the system (packages, or components, or arbitrary part),
      • The layout is standard because the developer can not influence the apparence, you can add relevant information like thread name, time, date

      All these things can be changed without restarting your application and are controlled by a configuration file (.xml or .properties)!

    • Why logs are sometimes better? because during debugging You may change variables values in realtime to let the bug happen. This is why debugging session are called transient: the know how You bring during these sessions (where you set breakpoints, the iterations You do in code, how you manipulate variables/instances on the fly) is simply lost or not share with your collegue. In this case logging output is better because it may stay even after correcting the bug. This can be useful to avoid further existence of the same bug.
    • Some mistakes:
      • Do not log too much mainly because of performance issues or try to use a preprocessor which remove logging statements before deploying to production...
      • Do not write stupid data during logging, e.g. "this is the value of i" or "iteration i", in this case use the debuger. for the same reasons avoid writing a 100Kb XML, it is useless, write the XML in a file...
      • Do not rely on logging to rescue You from bad code: instead of losing correcting a bad code, why not try refactor it!
    • Log amount can be enormous, especially when you track a bug at the same time with 4000 users working in production on many server (webserver, application server, servlet runner, database cluster).... this is why You "must":
      • Use Unix or install cygwin (if your running under windows) only for having some command like grep, sed, tail, awk, ssh
      • Learn regular expression, to filter the logs file with command like grep, sed, awk
      • Watch logs files in realtime (when users or you are testing your application). Prefer the unix tail command because it is very efficient. You can even combine the tail with a grep command to filter logs output.tail -f Tomcat.out | grep &39;error&39;
      • If You really can not work with a command line, use Jedit which also support regular expression and will probaly have a tail pulgin.

    Silent exceptions

    The worst case in production is what I call "silent exception", these affects some users but not all. They are silent because the users can still use the application but can have some really bad effects afterwards. Example: During a save, your program encounter a problem, but do not rollback the transaction (due to a bad design or implementation) and save an imcomplete state on disk or in the database. In fact, You must really not let them occur, do something before users even remark the problem (It took always 2-3 days before a pool of end-users got crazy about a problem in general, this time is comming from communication channel).

    How to avoid silent exceptions:

    • Define job (can be unix crontab) that parse log files daily or weekly with regular expression, and send a report. With log4j you can for example decide to send an email if a certain error level is thrown (level FATAL fro example)
    • Explain to developer (with a training) differences between logging level, what is fatal, error, warning, what meaningful info they must add in their logging statements. Review their code by checking usage of logging levels, or reading logs when Your application is in DEBUG mode.
    • If you need more error level (better granularity, most of the times it is not a good idea), You may want to define your own level. (and that&39;s easy with log4j)

    Debugger and remote debugging

    The Java Virtual Machine has an interface which allow to remotely debug an application

    Running your application remotely

    The code is running in the developer environment but not in production...one more time there is a difference somewhere, finding it may not be easy...

    • If you are running your application on remote server, are You sure that you deploy the latest code version? this is very easy to test:
      • You can for example run a Unix scripts which compare class CRC or
      • Use beyond compare, a graphical tools to compare directories and contents even through FTP.
      • If You know the class name and package where the exception occurred (look at the stacktrace in log files), use a decompiler like JAD to verify if the latest code is there (follow the rule 1 : "never trust anyone" even You sometimes ;-) )
    • Suspect the classloader:
      • You may have different version of the same class in the classpath = bad deployment
      • The classloader do not respect the servlet guidelines (the servlet runner Resin has some problems for example)
      • Order of jar in classpath, You can have dfferent parser version in different jar files for example.
        In all cases above try:
        • to start the JVM in verbose mode, to see which classes is load a which moment.
        • Use the utility JWhich, inform You where the class was loaded (jar or directory)

    Process throw an Exception of Type X

    • If the process throw an exception and You know the exceptions class created. Use your IDE! all of them have the ability to trigger a breakpoint on that type. The debugger will then stop where the exception is thrown.

    Mistakes

    • Do not made a runtime patch (= identifying condition of exception and testing it through IF statements to avoid it), but instead try to find the real reason (design, init phase...) and operate before it occurs, maybe you will need to change your algorithm.
    • Do not correct bug or listen to people which assign too many critical errors, if You can proove that it only affect 0.1% of users in production. Definition of bugs priority is essential as ressources are always limited.

    Automate gathering of informations

    If the system crash, or run in troubles, try to create a journal written on the disk, it can contains

    Example of journal
    - Date: 13.02.2004
    - Application name:
    - Cause: application.io.database.CanNotOpenDB
    - Stacktrace:

    - memory state
    - user name to contact, useful in order to reproduce the bug
    - Meaningful state of the application like
    * http user session
    * main data structure: previous action done,

    Advantages:

    • You can look periodically to see if some error appear often enough to be corrected
    • You have some information on the state of the application, if youre design is good enough You can even imagine using/loading this state to put the application in the same status.

    Hotline or developer asking for support

    Capitalize problems and resolutions in a central place!

    • Use FAQ (Frequently Asked Questions) Maybe the error has been already described and a solution found. You may create a lot of FAQs, for developer, manager, hotline. You can not save informations in 1 FAQs for all audience as you may need to adapt responses to the audience.
    • Use the Bugs Tracking tool and search if this bug has exist in the past.
      Example: A new bug has been discover, search in the database, if it has already exist, (bug status closed) then it has to be reopened otherwise you can create a new one.
    • Do not listen to a developer on telephone when He ask for support, or need help and never trust totally what he says (depend on the person of course)! Always ask for the logs files, because most of the time, they tell the truth and based on my experience, nobody really read them!

    No code is perfect, accept it

    • Code is living! and like any living creature it is evolving (both in the good and bad way) Development time will or may improve some parts,
    • Never trust a process ! Before judging that is your process who made the fault, please verify the previous process. (It let you think that you are one of the best programmer 3 minutes more ;-) Sometimes it can be a consecutive error, so only look at the first exception on top of the list.
    • Bug in Apache frameworks or open source projects, of course their code is perfectible, people from Apache try to deliver highly reusable code, but they can not guaranty you that in some particular case it will always work. Remember that some database, OS are existing since 20 years and are constantly improved. So if you find a bug and find an elegant way to handle it, you can send them the corrected code with a short explanation. Do not forget that they do not have your particular application environment, and that they may need to reproduce all conditions before providing a correction to the community (and that&39;s very time consuming).

    Links, references

    Log4j

    Junit
    "Developers write code. Unfortunately, developers also write defects, most of which are injected during the initial coding phase. The cheapest place to fix these defects is, likewise, during the initial phases of development. If you wait until function or system testing to catch and fix defects, your software development costs will be much higher. In this article , authors Scott Will, Ted Rivera, and Adam Tate discuss some basic "defensive" coding and unit testing practices to make it easier for developers to find defects -- and, more importantly, help to prevent them in the first place."
    http://www-106.ibm.com/developerworks/java/library/j-arrive/?ca=dgr-jw17j-arrive

    Cygwin

  • Valid HTML 4.01 Frameset&160;opera safari chrome firefox ie

    I did learn a lot today while trying to validating my new sub domain: http://websitesasgraphs.waltercedric.com/ I found a huge number of examples using the tag <applet> which has been deprecated and create errors and warning in W3C validation engine. But no example using the&160; the new HTML <object> tag.&160; Hence I decide to publish this small post.

    The following page are now XHTM 1.0

    While this one is

    Here is the code to insert a java applet into an XHTML 1.0 Strict web page

    <div>
    <object classid="java:mkv_htmlgraph.class"  
            type="application/x-java-applet"
            archive="mkv_htmlgraph.jar"
            width="600" height="600">
        <param name="code" value="mkv_htmlgraph" />
        <param name="archive" value="mkv_htmlgraph.jar" /> 
        <param name="image" value="loading.gif" />
        <param name="boxmessage" value="Loading Processing software..." />
        <param name="boxbgcolor" value="FFFFFF" />
        <param name="urlFromForm" value="http://websitesasgraphs.waltercedric.com/getDataFromURL.php?url=&amp;lt;?php echo $url ?>" />
          <strong>
            This browser does not have a Java Plug-in.
          </strong>
          <br />
          <a href="http://java.sun.com/products/plugin/downloads/index.html">
            Get the latest Java Plug-in here.
          </a> 
    </object>
    </div>
    www.waltercedric.as.graph_thumb
    The source code websiteasgraph.v01.00.00.zip has been changed and is available here: Download now

    References

    By the way, I discover huge issues in IE8, less in IE7 with my homepage, none in Opera or Firefox. And since my homepage is currently not valid, I will correct everything to make it XHTML 1.0 compliant today.

  • Ubuntu 10.10 (Maverick) is offering as for today a relative old version PHP 5.3.3, if you want to have a better version, you’ll have to trust an unofficial APT repository. Here is How

    Thanks to the NGINX team, you can find nearly the latest version of PHP online at https://launchpad.net/~nginx/+archive/php5

    Create a new file php5-ppa.list

    vi /etc/apt/sources.list.d/php5-ppa.list

    and depending on the version of your ubuntu, you can replace the word maverick with the oldest oneiric, natty, or the latest lucid

    deb http://ppa.launchpad.net/nginx/php5/ubuntu maverick main
    deb-src http://ppa.launchpad.net/nginx/php5/ubuntu maverick main

    run an update, to get the latest PHP version

    # apt-get update
    # apt-get dist-upgrade

    Alternatively you can still compile PHP on your own..

  • vshare

    Disclaimer: I don’t recommend vShare or any other alternatives to Install .IPA files.&160; The only reason of this post is to help users try out paid apps before they decide to purchase them. This post do not support piracy or piracy-related apps.

    I recommend you to use instead Android since you can test any paid application for 24h and get a refund if you are not satisfied!

    You will need:

    Only 2 steps are required

    1. Install AppSync
    2. Install vShare

    AppSync

    • Is a package that Cydia asks you to install if you want to install Installous/vShare.
    • Allows users to sync and install cracked App Store applications to your iOS device.
    • Works by patching the Mobile Installation file on the iOS firmware which is needed to install .ipa files (App Store Apps) without going through iTunes.
    • Is only available through an external repository that must be added to Cydia.

    Install

    1. Open Cydia
    2. Go to Manage -> Sources -> Edit -> and tap on Add
    3. Type repo.hackyouriphone.org and tap on Add Source to add the repo
    4. Now search for “AppSync for iOS 6″&160; and install it

    &160;

    vShare


    After you’ve installed AppSync, do the following:

    Enjoy!

  • Thanks to https://github.com/drichard/mindmaps you can host your own copy of Mind Map like I did at

    http://mindmap.waltercedric.com/index.html

    image

    Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

    and npm is the package manager for the Node JavaScript platform.&160; It puts modules in place so that node can find them, and manages dependency
    conflicts intelligently. It is extremely configurable to support a wide variety of use cases. Most commonly, it is used to publish, discover, install, and develop node programs. (https://npmjs.org/)

  • Just in case I take too much time to deliver a ready to use download, duration 5 minutes, but you need to understand basic php coding

    1. Create a temporary directory c:\patch
    2. Copy an existing patch distribution, under a new name
      For example, lets download Joomla_1.5.13-Stable-Full_PackageForSecurityImages5.1.x_v01.01.00.zip into c:\patch\ and copy it to c:\patch\Joomla_1.5.14-Stable-Full_PackageForSecurityImages5.1.x_v01.01.00.zip
    3. Download the latest full zip package of Joomla that target the patch (here 1.5.14), so I download Joomla_1.5.14-Stable-Full_Package.zipand save it in the same directory c:\patch\
      patches.for.securityimages.howto
    4. Now download a free trial copy of Beyond compare from www.scootersoftware.com and install this great application
    5. Select the 2 zip files, and right click “compare”
      patches.for.securityimages.howto.1
    6. Now it is like a game, on the left side, you have you patch that need to be updated with the latest Joomla! core changes, just edit every file present on the left and update line that are new or changed till you are finished. Luckily there is only 14 files to merge
      patches.for.securityimages.howto.2
    7. Test the result in a Joomla test instance.

    I do this for you at each release of Joomla!

  • gmaillogo hotmail_logo&160;

    Solution 1

    use GMAIL Mail fetcher to retrieve automatically all emails and tag them accordingly. All you have to do is to set up GMAIL fetcher to retrieve and tags your old email one step at a time. For example, I decide to migrate all my Joomla email away of Hotmail.

    1. I empty or move all items of my hotmail inbox&160; in another folder,
    2. I set GMAIL fetcher to retrieve and tag all my items automatically with a new tag Joomla (using “Label incoming message with”)
    3. In hotmail, I move all my old email from the folder Joomla to the inbox,
    4. After some seconds, all your email will be moved to GMAIL, and&160; the date and timestamp is preserved.
    5. Do this for all your email one category at a time till your Hotmail inbox is empty.
    6. Keep GMAIL Mail fetcher to retrieve automatically all future emails

    The only issue is that emails from the junk folder are not sent to GMAIL. A visit to Hotmail is still mandatory every months or so.

    Solution 2

    Export all your email for archiving on disk with Windows Live Mail Desktop, then use GMAIL Mail fetcher to retrieve automatically all future emails

    WindowsLiveMailDesktop

    Get multiple e-mail accounts in one program – Hotmail, Gmail, Yahoo!* and more. And now Windows Live Mail has a calendar, too. Mail combines the ease of use of Outlook Express, with the speed of Windows Live.

    Outlook won't let you connect officially, you need to pay! but Windows Live Mail Desktop allow you to connect to your free Hotmail accounts, and drag mail into IMAP mail accounts as well as "Local Folders".
    it stores local copies of your mails in a folder (which you can configure using Tools -> Advanced Options), so you’ll end up with many directories containing *.eml files. Perfect for archiving your old emails.

  • rockettheme

    Note: I'll do this for you, but you'll have to send me the template per mail first. Since most of the RocketTheme  templates are commercial. I will send it back to you patched.

    Example patching ja_purity_template.zip

    1. Download beyond compare and install (trial 30 days)
    2. Download an existing patches for joomla! for example Joomla_1.5.20-Stable-Full_PackageForSecurityImages5.1.x_v01.02.00

    Select both files

    • Joomla_1.5.18-Stable-Full_PackageForSecurityImages5.1.x_v01.02.00
    • ja_purity_template.zip

    Right click and select compare

    Move to ja_purity_template.zip\template\ja_purity\html in the left windows and right click, select "Set a base folder", do the same in the right windows and select "components" and right click, select "Set a base folder"

    rocketThemeForSecurityImages001  

    Now move to each file, you'll see that Rocketthemes is overriding internal file of Joomla! (this is allowed), select on rigth side a file default_form.php and right click "compare to" (or click F7), select on the other side the same file name at an equivalent position in file system

    rocketThemeForSecurityImages002

    You see now the differences, the objective is to copy some part of the left side into the right side, select code on the right side and click the arrow to copy a block of code,

    rocketThemeForSecurityImages003

    If you succeed, carefully copying the code, you ll have a Rocket Theme (or any other Joomla! templates) patched for SecurityImages.

    If you can’t do this, remember ill do it for you! Templates that I already patched are

    • jA_purity
    • JA Opal

    This post is cross-posted from my WIKI

  • I am encountering strong spammings tentatives in my Wiki as well, that's why I decide to lock write changes to my WIki. This is how You can also do it.

    Open LocalSettings.php and set a new key $wgReadOnlyFile like this 

    $wgReadOnlyFile="./.lock.txt";

    The value must be the name of of a file, then put the reason for the lock inside the file using the wikipedia notation

    '''I've block my Wiki because of spammers! It will reopen as soon as I find a solution, if It annoy You can still contact me at http://www.waltercedric.com'''

    The contents of the file will be displayed to anyone trying to edit the wiki.

    Note that readonlyfile is not guaranteed to be absolutely safe; if you need to guarantee that MediaWiki will never write to the data, you need to do this on the database itself (e.g. revoke UPDATE,INSERT,DELETE from the wiki user, or put MySQL into read-only mode).

  • bos.oval.exhaust

    A small Do It Yourself (DIY) that i will never do anymore as it is really dirty and may be also very unhealthy (you MUST wear a mask). This BOS exhaust has an ABE number, and was simply making way too much noise for Switzerland. It is normal that after some kilometers the content get more compacted and as a result make the exhaust more noisy. Price of a new BOS Oval exhaust silencer is 475 euro

    Total costs:

    • 42 euro for the Bos re-pack kit for 1 silencer Complete with stainless steel wool, Fibercon damping material and gas-tight stainless rivets. (Ref 333001)
    • 52 euro for a stronger Rivet pliers (able to ply 4.5mm stainless rivets)

    First things to do is to open the casing, depending on your muscles and if you plan not to damage the casing, it can be quite challenging. A BOS exhaust is oval and has nearly no grip possibility. This is where some ratchet straps may help. You will have to use at least 4 of them!

    I use 2 straps to apply a force laterally and 2 to maintain the strap around the casing

    IMG_0064 IMG_0061 IMG_0062 IMG_0063

    Attention!

    You can pull 1.6 Tons of traction even on these small straps! Check your pillar (here my balcony pillar did resist :-) ). Chance are that you will open the exhaust that way.

    The dirty part now start, remove the old damping material

    IMG_0066 IMG_0065

    And place the new one, first the stainless steel wool

    IMG_0068

    then the Fibercon damping material, all of it, till you reach the diameter of the casing

    IMG_0070 IMG_0069

    Close the casing and you’re done. You’ll have just to wash your hands during 2 days to remove the black oily color and smell :-)

  • Do You want to install Mambo?, have a copy of Your productive mambo homepage running locally? or simply develop easily PHP/MySQL code? Do You want to make Mambo a try without the hassle of installations and configurations?
    EasyPHPmight be the answer!
    EasyPHP  is a complete software package allowing to use all the power and the flexibility that offers the dynamic language PHP and the effecient use of databases under Windows. Package includes an Apache server, a MySQL database, a fully PHP execution, as well as easy development tools for your web site or your applications.

    Click 
    Read more... to see my experience with it:

    Install easyPHP
    EasyPHP is a complete software package allowing to use all the power and the flexibility that offers the dynamic language PHP and the effecient use of databases under Windows. Package includes an Apache server, a MySQL database, a fully PHP execution, as well as easy development tools for your web site or your applications.

    The latest stable version (v1.7) is made of:
    • Apache 1.3.27
    • PHP 4.3.3
    • MySQL 4.0.15
    • PhpMyAdmin 2.5.3

    and can be downloaded at: http://www.easyphp.org/

    It is a windows executale, all You have to do is install it.
    Start EasyPHP in the programs menu
    Verify that EasyPHP is running in the system tray

    Check configuration, Apache and MySQl must be started.

    If not be sure not to have another apache process running on port 80

    Check proper installation of EasyPHP. Should open a web browser and drive You to this page

    Copy data from Your productive system (www)

    Copy How  
    all remote file Using Your favorite FTP tool  
    all data in remote Database With your provider HTML tool (PhpMyAdmin)
    Export all tables and content in a SQL file on your Disk
     

    Install file data locally

    Copy Your webserver root to: EasyPHP1-7www
    example: if EasyPHP is installed in E:/www.waltercedric.com/, then copy into E:/www.waltercedric.com/EasyPHP1-7/www/

    Restore database data locally

    Start a browser and go to http://127.0.0.1/mysql/

    Restore the Data in your new database by importing the SQL file.

     

    • Bloc by bloc (see picture) or
    • By importing the SQL zip file
      (not working for me as the browser is doing timeout
      since my Databse is quite big)
    If the restore is successful, create a user, as found in the configuration file of Mambo. Create a User
    • Of the same name and password, or
    • Create a new user (better because of security concerns) ut then do not forget to adapt the configuration.phpaccordingly.


    in Mambo/configuration.php
    ocate the mySQL login and password mambo is using
    <?php
    $mosConfig_offline = '0';
    $mosConfig_host = 'localhost';
    $mosConfig_user = 'XXXX';
    $mosConfig_password = 'XXXXX';
    .
    Grant this user all rights by clicking edit.

    Change Mambo settings

     

    there is a lot of chance that Your local Mambo is not at the same location of Your productive Mambo, so Small changes in Mambo/configuration.phpare needed:

    Example in production Example localy
    $mosConfig_absolute_path = 'www.waltercedric.com/Mambo'; $mosConfig_absolute_path = 'E:/www.waltercedric.com/EasyPHP1-7/www/Mambo';
    $mosConfig_cachepath = 'www.waltercedric.com/Mambo/cache'; $mosConfig_cachepath = 'E:/www.waltercedric.com/EasyPHP1-7/www/Mambo/cache';

    Create a cache directory locally (I never do a backup of this directory, as it can be quite big in production)

    Normally You're done!

     

  • joomla_cms

    mysql

    I was not seeing this error since at least 3 years:

    DB function failed with error number 1016

    Can't open file: 'jos_session.MYI' (errno: 145) SQL=INSERT INTO `jos_session`
    ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` )
    VALUES ( '4bc998b10d92bf4107976d0edacdbb26','1246725653','','0','1','0' )

    It happen sometimes and cause are unknown. While it is quite disturbing to have no more access to Joomla! frontend or backend, the fix is quite easy. You must repair this table jos_session, If you have access to


    PhpMyAdmin

    Require an access to the Plesk/CPA panel.

    Go to your Joomla database, select the table jos_session (tick the checkbox) and choose "Repair table" from the drop-down you find at the bottom of the list of tables.

    Using PHP

    Maybe the most easiest for non techies people

    I found this useful script http://www.cafewebmaster.com/repair-all-mysql-databases-tables-php, upload it at root of your host (in /httpdocs) under repair.php for example and run it, you’ll see the following:

    repair.table.in.php

    Tick repair, provide your login and password for database,

    repair.table.in.php2

    Remove the scripts after use, or add a die(‘not for use, edit script first’); at the top of it just in case it may be use to inject something in your database!

    Shell access

    For the most advanced of us, which understand Unix and have shell access

    # mysql –udblogin -p

    mysql>  use joom;

    mysql> REPAIR TABLE jos_session;
    +-------------------------+--------+----------+------------------------------------+
    | Table | Op | Msg_type | Msg_text |
    +-------------------------+--------+----------+------------------------------------+
    | joom.jos_session | repair | warning | Number of rows changed from 0 to 2 |
    | joom.jos_session | repair | status | OK |
    +-------------------------+--------+----------+------------------------------------+

    Finding Joomla! login and password

    These informations can be found in httpdocs/configuration.php under $user and $password as seen below

    ..

    var $user = 'hkuin47Gdfver';
    var $db = 'joom';
    var $dbprefix = 'dfrtCsdef_';
    var $mailer = 'mail';
    var $fromname = 'Happpp';
    var $sendmail = '/usr/sbin/sendmail';
    var $smtpauth = '0';
    var $smtpsecure = 'none';
    var $smtpport = '25';
    var $smtpuser = '';
    var $smtppass = '';
    var $smtphost = 'localhost';
    var $MetaAuthor = '1';
    var $MetaTitle = '1';
    var $lifetime = '15';
    var $session_handler = 'database';
    var $password = afedfhrr546fdhcfcv;

    ..

    And if the repair failed?

    Run the following sql to drop the table and make it new. Copy it into the PhpMyAdmin SQL field.

    DROP table if exist `jos_session`

    CREATE TABLE `jos_session` (
      `username` varchar(150) default '',
      `time` varchar(14) default '',
      `session_id` varchar(200) NOT NULL default '0',
      `guest` tinyint(4) default '1',
      `userid` int(11) default '0',
      `usertype` varchar(50) default '',
      `gid` tinyint(3) unsigned NOT NULL default '0',
      `client_id` tinyint(3) unsigned NOT NULL default '0',
      `data` longtext,
      PRIMARY KEY  (`session_id`(64)),
      KEY `whosonline` (`guest`,`usertype`),
      KEY `userid` (`userid`),
      KEY `time` (`time`)
    ) TYPE=MyISAM CHARACTER SET `utf8`;

  • Call task1, if the variable contains 'true', 'on', or '1' the task 'send a sms alert' is executed
    
    
    
    
    
    
  • A properties file in c:/confA commentstmp.path=c:\tempftp.login.default=cedricwalterftp.pwd.default=xxxxftp.host=ftp.adress.comftp.port=21
    
    
    
    
    
    
  • This script ask for security reason the login and password. (but accept default values)
    
    
     
    
    
    
     
    
    
    
    
    
    
  • This script ask for security reason the login and password. (but accept default values)
    
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
  • Apple IPhone don’t fly well, and here is a picture to prove it:

    broken.apple.iphone.3gs

    I will this week end publish an online “how to exchange your iPhone 3GS LCD screen yourself”

    • The Glass can be found on ebay for 22 euros
    • The whole assembled kit: Glass + LCD + frame + home button + speakers + kit of 7 tools for less than 42 euro! this is the kit I ordered yesterday online.

    iphone.3gs.screen.repair.kit

    By the way, Apple ask a little bit more than 200 CHF for replacing the glass.

  • There are “Still” plenty of reasons to jailbreak that aren't directly related to iPhone-specific hardware.

    • Cydia, an APT frontend for your iPhone, get all applications, most are open source or refused by Apple!
      By the way, Cydia was offering cut&paste, video editing, back grounding, MMS and more years before Apple gives us the OS 3.0. What’s coming in OS 4.0? skins and themes :-)
    • Winterboard, apply themes and skins to get more funny spring board, for example with the little big planet skins, they are really hundreds of them!
      &160;little.big.planet.cydia cydia.theme
    • Live Clock and Weather icons,
    • SBSettings,a customizable HUD with handy settings switches accessed by swiping across the status bar in any app or in the home screen, numerical status displays,
    • Customizable system fonts,
    • Multitasking support, dead simple: press Home 2 second to put app in background, 2 second more to disabled background, I did not see any huge power drain differences by running 2 instant messaging apps: Skype and Nimbuzz 2 hours without interruption. The only real issue that must be confirmed is that the iPhone get really hot in the back. I would suspect that Apple is aware of this problem and did not switch back grounding application for this reason.
    • Full access to the file system, normal users don’t need that, but developers find it fun!
    • Terminal, SSH (openSSH yes), VNC and VIM, I can now remotely connect to my host with my RSA keys but more on that later..

    How to Jailbreak your iPhone/iPod 3GS

    I MAKE NO SUPPORT, USE AT YOU OWN RISK

    I just want to share here how simple and how easy it was for ME, it doesnt mean it will work for YOU. Search in Google for a solution in case of disaster (iPhone wont boot up), it seems a backup/restore may save you time and eager.

    Jailbreak with Purplera1n http://purplera1n.com&160;

    Run the exe while having your iPhone connected through USB, click on the button “make it ra1n”

    The iPhone will reboot and a new icon “Freeze” will appear. Click on it to install Cydia [WikiPedia]. The operation take less than 1 minute

    NOTE:

    • You can also afterward install cracked Applications by Drag & Drop into iTunes or by double clicking them and Sync with your iPhone/iPod Touch !!!
    • I recommend you to install “Pandora Box”, a free app that run on any non jail broken iPhone and let you review every day or week all paid applications that get a price drop (paid to free, paid drop in prices ). There is enough (crap) to download for free before paying of even hacking the iPhone.
  • apache_maven

    I was fighting today against the maven-release-plugin of maven, solving complicated  errors in a row. As I am convince I made all possible errors,   I think it is worse to compile my findings here to help others :-)

    Maven Release Plugin

    This plugin is used to release a project with Maven, saving a lot of repetitive, manual work. Releasing a project is made in two steps: prepare and perform.

    My approach to speed up things is always to define a small project (in a sandbox SVN root) that is compiling and running in 10 seconds to make some test before trying to make it run on our bigger Innoveo Skye(tm) product (35 modules)

    I always have 2 projects prepared:

    • One TestSimpleProject: one Maven project with no code
    • One TestComplexProject: one maven project and 2 Maven sub modules

    For the reader that can not wait here is the running command line from TeamCity to be put in Build Runner Goals

    release:clean release:prepare release:perform -Dusername=xxxxxxx -Dpassword=yyyyyy

     

    Latest SVN client is  recommended

    You need the latest SVN command line client on all TeamCity  agent, or  at least not any SVN command line client > 1.5.x which don’t work (but 1.5.0 would have). We were using 1.5.1 of course on all our server (Murphy’s laws)

    Use at least a Subversion SVN client (1.6.6 as for today).

    If you dont have any SVN command line installed in your TeamCity agents, you’'ll  end with this easy to understand error

    [INFO] Unable to check for local modifications
    [11:34:40]:
    Provider message:
    [11:34:40]:
    The svn command failed.
    [11:34:40]:
    Command output:
    [11:34:40]:
    /bin/sh: svn: command not found
    [11:34:40]:
    [INFO] Trace
    [11:34:40]:
    org.apache.maven.BuildFailureException: Unable to check for local modifications
    [11:34:40]:
    Provider message:
    [11:34:40]:
    The svn command failed.
    [11:34:40]:
    Command output:
    [11:34:40]:
    /bin/sh: svn: command not found
    [11:34:40]:
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715)
    [11:34:40]:
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
    [11:34:40]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)

    The  maven release plugin require SVN client to be installed.

    Update maven-release-plugin to the latest

    You need to update maven-release-plugin away from 2.0.beta9 to 2.0 to solve the issue with multi module release. Luckily for me the 2.0 is available since 10 February 2010 Older version were working for simple Maven project (a project with no Maven module)  but not with Multi Modules Projects!

    With 2.0-beta9 I was getting this error in Multi Modules Projects!

    [18:41:46]:[ERROR] BUILD FAILURE
    [18:41:46]: [INFO] ------------------------------------------------------------------------
    [18:41:46]: [INFO] Unable to tag SCM
    [18:41:46]: Provider message:
    [18:41:46]: The svn tag command failed.
    [18:41:46]: Command output:
    [18:41:46]: svn: Commit failed (details follow):
    [18:41:46]: svn: File '/svn/xxxxx/skye/tags/skye-2.1.0.M8/skye-admin/pom.xml' already exists
    [18:41:46]: [INFO] Trace
    [18:41:46]: org.apache.maven.BuildFailureException: Unable to tag SCM
    [18:41:46]: Provider message:
    [18:41:46]:
    The svn tag command failed.
    [18:41:46]: Command output:
    [18:41:46]: svn: Commit failed (details follow):
    [18:41:46]: svn: File '/svn/xxxxx/skye/tags/skye-2.1.0.M8/skye-admin/pom.xml' already exists

    Invalid certificate handling

    Sometimes an issue if you craft some certificate yourself, You need to import certificate in each TeamCity build agent by running

    # svn co https://svn.xxxxxx.com/svn/yyyyyy/skye

    at least once and accepting permanently the certificate (break the command afterward) Do this with the same UNIX user under which the agent run or you’ll always get this error:

    [11:52:11]:[ERROR] BUILD FAILURE
    [11:52:11]:
    [INFO] ------------------------------------------------------------------------
    [11:52:11]:
    [INFO] Unable to checkout from SCM
    [11:52:11]:
    Provider message:
    [11:52:11]:
    The svn command failed.
    [11:52:11]:
    Command output:
    [11:52:11]:
    svn: OPTIONS of 'https://xxxxx.: Server certificate verification failed: certificate issued
                      for a different hostname, issuer is not trusted (xxxxxxxxx)
    [11:52:11]:
    [INFO] Trace
    [11:52:11]:
    org.apache.maven.BuildFailureException: Unable to checkout from SCM
    [11:52:11]:
    Provider message:
    [11:52:11]:
    The svn command failed.
    [11:52:11]: Command output:

    Maven 2.2.1 wrongly calculate SCM commit URL

    You can not use in <scm> tag this kind of URL’s https://user:This email address is being protected from spambots. You need JavaScript enabled to view it.  like in the example below:

    <scm>
    <connection>scm:svn:https://username:This email address is being protected from spambots. You need JavaScript enabled to view it./svn/yyyyy/skye/trunk/skye</connection>
    <developerConnection>scm:svn:https://username:This email address is being protected from spambots. You need JavaScript enabled to view it./svn/yyyyy/skye/trunk/skye</developerConnection>
    <url>scm:svn:https://username:This email address is being protected from spambots. You need JavaScript enabled to view it./svn/yyyyy/skye/trunk/skye</url>
    </scm>

    Even if the documentation state otherwise, as the maven-release-plugin go “crazy” by concatenating wrongly the tagging URL.

    [17:32:47]: [INFO] Working directory: /home/agent/buildagent/work/3d299c4b925af39b/TestRelease
    [17:32:47]: [INFO] ------------------------------------------------------------------------
    [17:32:47]:
    [ERROR] BUILD FAILURE
    [17:32:47]:
    [INFO] ------------------------------------------------------------------------
    [17:32:47]:
    [INFO] Unable to tag SCM
    [17:32:47]:
    Provider message:
    [17:32:47]:
    The svn tag command failed.
    [17:32:47]:
    Command output:
    [17:32:47]:
    svn: Source and dest appear not to be in the same repository
                         (src: 'https://svn.xxxxxx.com/svn/xxxxxxx/Sandbox/trunk';
                         dst: 'https://xxxxxxx:This email address is being protected from spambots. You need JavaScript enabled to view it./svn/xxxxxx/Sandbox/tags/TestRelease-0.0.11')
    [17:32:47]: [INFO] ------------------------------------------------------------------------

    I found a workaround by adding environment variables in the TeamCity build in the list of Maven Goals:                 

    –Dusername=xxxx –Dpassword=yyyy

    Beware of invalid SCM URL

    SCM (Software Configuration Management, also called Source Code/Control Management or, succinctly, version control) is an integral part of any healthy project. If your Maven project uses an SCM system (it does, doesn't it?) then here is where you would place that information into the POM.

    A lot of example are floating around in internet about <scm> values that look like this:

    <scm>
    <connection>scm:svn:https://svn.xxxxx.com/svn/yyyyy/skye/trunk</connection>
    <developerConnection>scm:svn:https://svn.xxxxx.com/svn/yyyyy/skye/trunk/</developerConnection>
    <url>scm:svn:https://svn.xxxx.com/svn/yyyyy/skye/trunk/skye</url>
    </scm>

    With the above, you’ll end up tagging your whole trunk under a new tags in https://svn.xxxxx.com/svn/yyyyy/skye/tags/skye-2.1.0

    No one is saying that you' should better have this, end up your scm connection with the project you would like to tag

    <scm>
    <connection>scm:svn:https://svn.xxxxx.com/svn/yyyyy/skye/trunk/skye</connection>
    <developerConnection>scm:svn:https://svn.xxxx.com/svn/yyyyy/skye/trunk/skye</developerConnection>
    <url>scm:svn:https://svn.xxxx.com/svn/yyyyy/skye/trunk/skye</url>
    </scm>

    Failure to deploy newly artifact

    This one is also irritating, because running a build in TeamCity with the goal : deploy run perfectly, the same build in prepare:release perform:release failed miserably at the end with

    INFO] [ERROR] BUILD ERROR
    [19:26:08]: [INFO] [INFO] ------------------------------------------------------------------------
    [19:26:08]: [INFO] [INFO] Error deploying artifact: Failed to transfer file: http://artifactory.xxxxxx.com:/libs-releases-local/…
                                           . Return code is: 401[19:26:08]:
    [ERROR] BUILD ERROR
    [19:26:08]:
    [INFO] ------------------------------------------------------------------------
    [19:26:08]:
    [INFO] Maven execution failed, exit code: '1'
    [19:26:08]: [INFO] ------------------------------------------------------------------------
    [19:26:08]:
    [INFO] Trace
    [19:26:08]:
    org.apache.maven.lifecycle.LifecycleExecutionException: Maven execution failed, exit code: '1'
    [19:26:08]:
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
    [19:26:08]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)

    I was not able to find a workaround to this one, the build is running without the maven-release-plugin and deploy correctly to artifactory! But I managed to get around it by using in place of the stable Maven 2.2.1 the latest version 3.0.alpha7!!!!

    I hope this post will help some of you.

  • Normally newbies never complains about this... try in order (first item are costing nothing, last solution is the most expensive):
    • Adjust your pitch curves (too much ° pitch asked ?),
    • Adjust your throttle curves,
    • Add more nitromethan, try 15% then 30%, but be careful of the fuel price and lifetime of engine!
      • Switch for an exhaust pipe, (Hatori...) +5 to +7% increase
    • Use smaller blade, (505mm instead of 550 mm),
    • Change for a better motor, (OS46 or OS50 instead of 30''size)

    For more basics advices, search for FAQs on internet, a lot of documents has been already written.....