Skip to content

Instantly share code, notes, and snippets.

@edpichler
edpichler / TestRegex.java
Last active December 24, 2015 07:49
Regex problem.
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class TestRegex {
private static final String PTR_PERSON = "(\\d\\.)(([^\\d ])([a-z/ ]*))";
private static List<String> findPersonDetails(String input) {
RP/CTBB22115/CTBB22115 WI/AS 3JUN13/2003Z 2WAF3O
1.JONAS/JULIO MR 2.SILVA/MARIO MR 3.SILVA/JOANA MRS
4 SA 223 G 15OCT 2 GRUJNB HK3 2 1800 0750+1 *1A/E*
5 SA 286 H 20OCT 7 JNBHKG HK3 B 1655 1225+1 *1A/E*
6 SA 287 C 22OCT 2 HKGJNB HK3 2 2350 0715+1 *1A/E*
7 SA 222 L 23OCT 3 JNBGRU HK3 B 1040 1700 *1A/E*
8 AP CTB +553542494416 -
L - A
9 TK TL03JUN/CWBB44115
@edpichler
edpichler / form.xhtml
Last active December 20, 2015 03:59
Form in JSF 2.
<h:form id="frmButtons">
<h:commandButton id="btnExportWord" class="red" value="#{i18n.exportWord}"
style="padding:10px 20px;" action="#{decodeBean.exportToWord}"/>
</h:form>
@edpichler
edpichler / TrackEvent.js
Last active December 20, 2015 03:59
Google analytics. Tracking a button event before submit the form when using JSF.
$("#frmButtons\\:btnExportWord").click(function (e) {
//track the event
_gaq.push(['_trackEvent', 'Decode', 'Decode copying', 'Export to Word']);
var button = $(this);
//create a delay and call the same click
if (button.data('tracked') != 'true') {
e.preventDefault(); //consume event if not tracked yet
setTimeout( function(){
button.data('tracked', 'true');
Pichlermac:roms pichler$ sh sbf_flash JRDNEM_U3_2.21.0_SIGNED_UCAJRDNEMARAB1B80AA028.0R_USAJORDANO2DE_P040_A011_HWp3_Service1FF.sbf
SBF FLASH 1.24 (mbm)
http://opticaldelusion.org
=== JRDNEM_U3_2.21.0_SIGNED_UCAJRDNEMARAB1B80AA028.0R_USAJORDANO2DE_P040_A011_HWp3_Service1FF.sbf ===
Index[1]: Unexpected chip 32
Index[2]: Unexpected chip 32
Index[3]: Unexpected chip 32
Index[4]: Unexpected chip 32
Index[5]: Unexpected chip 32
Pichlermac:roms pichler$ sh sbf_flash J
JORLA_U3_3.4.2_107-7_R02_SIGNED_USAJORDMR1B15CLABRLA019.0R_JORLAFROCLABRLA_P009_A008_M002_HWp3_Service1FF.sbf
JRDNEM_U3_2.21.0_SIGNED_UCAJRDNEMARAB1B80AA028.0R_USAJORDANO2DE_P040_A011_HWp3_Service1FF.sbf
JRDNEM_U3_2.21.0_SIGNED_UCAJRDNEMARAB1B80AA028.0R_USAJORDANTMDE_P031_A012_M004_HWp3_Service1FF.sbf
JRDNEM_U3_2.26.0_BLUR_P3_SIGN_SIGNED_USAJRDNEMARAB1B5TEL02A.0R_USAJORDANTELSTRA_P033_A017_M008_HWp3_Service1FF.sbf
JRDNEM_U3_2.34.1_DEBLUR_P3_SIGN_SIGNED_UCAJRDNEMARAB1B80AA02B.0R_USAJORDANRTCEE_P029_A019_HWp3_Service1FF.sbf
JRDNEM_U3_2.51.0_CHN_P3_SIGN_SIGNED_UCAJRDNEMARAB1B50AA028.0R_USAJORDANRTINT15_P002_A018_HWp3_Service1FF.sbf
JRDNEM_U3_2.51.1_BLUR_P3_SIGN_SIGNED_UCAJRDNEMARAB1B80AA030.0R_USAJORDANO2DE_P048_A015_HWp3_Service1FF.sbf
JRDNEM_U3_2.59.0_CHN_P3_SIGN_SIGNED_UCAJRDNEMARAB1B50AA028.0R_USAJORDANRTINT15_P003_A020_HWp3_Service1FF.sbf
JRDNEM_U3_3.4.2_177-003_BLUR_SIGN_SIGNED_UCAJRDNEMARAB1B80AA03A.0R_PDS03C_USAJRDNFRYOO2DE_P021_A010_HWp3_Service1FF.sbf
@edpichler
edpichler / root defy +
Created June 7, 2013 20:53
Script to root a defy+
@echo off
cls
adb kill-server > NUL
COLOR F0
TITLE Defy+ Easy Root script v1
cls
echo ***************************************************************************
echo * *
echo * Defy+ Easy Root script v1 *
echo * erstellt von [email protected] *
@edpichler
edpichler / erro.log
Created November 12, 2012 17:03
Erro spring
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSource' defined in class path resource [spring/entitiesContext.xml]: Could not resolve placeholder 'database.url'
at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:209)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.processProperties(PropertySourcesPlaceholderConfigurer.java:174)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory(PropertySourcesPlaceholderConfigurer.java:151)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:681)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplic
-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
@edpichler
edpichler / ViewingConstraints.sql
Created August 25, 2012 15:40
Viewing constraint information in Oracle
select constraint_name, table_name from user_constraints where constraint_name='FK1NT_CNTR';