http://jd.benow.ca/#jd-online
Friday, July 1, 2016
Wednesday, June 15, 2016
php mysql to display telugu font
- in the table where telugu words need to be stored, u need to set coalition accordingly
ALTER TABLE <table_name> CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
- before executing insert/select query - mysql_query("SET NAMES utf8")
- put html header or php header to set charset to utf-8
- set charset to utf-8 on mysql connection
ALTER TABLE <table_name> CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
- before executing insert/select query - mysql_query("SET NAMES utf8")
- put html header or php header to set charset to utf-8
- set charset to utf-8 on mysql connection
Tuesday, June 7, 2016
Spring external configuration
to provide a external config file (application.properties) when using spring boot, you should pass 'args' to SpringApplication.run() method.
will add a bit of code later.
will add a bit of code later.
Thursday, April 21, 2016
Lali Patalu lyrics
లాలిజో లాలిజో ఊరుకో పాపాయి
పారిపోనీకుండా పట్టుకో నా చేయి
తెలుసా ఈ ఊసు
చెబుతా కల ఊచు
కాపురం చేస్తున్న పావురం ఒకటుంది
ఆలినే కాదంది కాకినే కూడింది
అంతలో ఏమైంది అడగవే పాపాయి
పారిపోనీకుండా పట్టుకో నా చేయి
మాయనే నమ్మింది బోయతో పోయింది
దెయ్యమే పూనిందో రాయిలా మారింది
వెళ్ళే పెడదారిలో ముళ్ళే పొడిచాకనే
తప్పిదం తెలిసింది ముప్పునే చూసింది
కన్నులే విప్పింది గండమే తప్పింది
ఇంటిలో చోటుందా చెప్పవే పాపాయి
పారిపోనీకుండా పట్టుకో నా చేయి
మ్మ్ మ్మ్ మ్మ్ మ్మ్ మ్మ్
పిల్లలు ఇల్లాలు ఎంతగా ఏడ్చారు
గుండెలో ఇన్నళ్ళు కొండలే మోసారు
నేరం నాదైనా భారం మీపైన
తండ్రినే నేనైనా దండమే పెడుతున్నా
తల్లిగా మన్నించు మెల్లగా దండించు
కాళిలా మారమ్మా కాలితో తన్నమ్మా
బుద్దిలో లోపాలే దిద్దుకో నీవమ్మా
మ్మ్ మ్మ్ మ్మ్ మ్మ్ మ్మ్
కస్తూరి రంగ రంగ,
చిన్నారి kaaveti ranga rangaa,
Bangaaru
muddu kondaa,
Bajjora
nee kadupu challagundaa !
||
Kasturi ranga ranga ||
Charanam
1
Nee illu
neela gatta,
Nee nota
bellammu gadda gotta,
Nee inta
sirulu puttaa,
Cheemalai
chuttaalu chuttumuttaa!
||
Kasturi ranga ranga ||
Charanam
2
Raamayya
vanti thandri,
Achchamuga
seethamma vanti thalli,
Lakshmanuda
nenundagaa,
Naa
thandri neekinka lotemira !
||
Kasturi ranga ranga ||
Charanam
3
Ammaku
theerindiraa,
Ipude
mee naanna manasoorindira,
Paanakamulo
pudakaraa,
Inka nee
aagadamu chaalincharaa !
||
Kasturi ranga ranga ||
Maroka
jola paata
Tolutha
brahmandammu totle gaavinchi
Naalugoo
vedamula golusulamarinchi
Phanivaina
phani raaju paanpunamarinchi
cheliya
dolika lona cherchi laalinchi..
jooo....jooo.....
Naagendrudunnaadu
nanu ganna thandri
Kantikee
reppavale kaapadagaladu
jooo....jooo....
Maven
importing a maven project:
right click ->Import ->. Import -> Maven-> Existing Maven Project.
create new maven project
New -> Project -> Maven Project ->
click Next
select arche type
click Next
provide groupId and artifactId and click 'Finish'.
if eclipse gives error that 'could not resolve archetype'.. do below steps:
right click ->Import ->. Import -> Maven-> Existing Maven Project.
create new maven project
New -> Project -> Maven Project ->
click Next
select arche type
click Next
provide groupId and artifactId and click 'Finish'.
if eclipse gives error that 'could not resolve archetype'.. do below steps:
- Open Window > Preferences
- Open Maven > Archetypes
- Click 'Add Remote Catalog' and add the following:
- Catalog File: http://repo1.maven.org/maven2/archetype-catalog.xml
- Description: maven catalog
Creating shared git repo
follow the steps here:
http://www.gitguys.com/topics/creating-a-shared-repository-users-sharing-the-repository/
i have used sourcetree tool.. will share details commands/screenshots later. using windows network drive.
Wednesday, April 13, 2016
Struts
- MVC pattern
- a filter should be added in web.xml to inform to redirect every request to struts.
- struts1 has struts-config.xml
- there are large differences between struts1 and struts2
- struts.xml contains action mappings i.e which request should be addressed by which class.
- Action class can extend ActionSource class to get validation and other features.
- Action class can implement ModelDriven to map the input parameters to a java class instance.
- Action class can also act as model.
- all the action class variables will be available in ValueStack
- by default 'execute' method of action class will be called.. this can be configured in struts xml config.
- a filter should be added in web.xml to inform to redirect every request to struts.
- struts1 has struts-config.xml
- there are large differences between struts1 and struts2
- struts.xml contains action mappings i.e which request should be addressed by which class.
- Action class can extend ActionSource class to get validation and other features.
- Action class can implement ModelDriven to map the input parameters to a java class instance.
- Action class can also act as model.
- all the action class variables will be available in ValueStack
- by default 'execute' method of action class will be called.. this can be configured in struts xml config.
Friday, April 1, 2016
Java - some important/unknown/key facts
- main method is inherited by child class.
- if child class contains main method, then the main method of parent class (if contains) will become hidden.
- all static methods of parent class will be accessible from child class, if a static method with same signature as that of Parent class exists in Child class then the Parent class method will be hidden from Child class view.
- Overloading of main method is allowed but JVM always calls the one with 'String[] args' argument. other main methods will be like normal methods.
- if main method is not defined, till Java 6, JVM used to throw a RunTimeException as 'NoSuchMethod Error'. from Java7, it wil throw an error and suggests to define main method.
- till Java6, static blocks used to get execute before searching for main method. from Java7, static blocks wont get executed if class doesn't have main method.
- if child class contains main method, then the main method of parent class (if contains) will become hidden.
- all static methods of parent class will be accessible from child class, if a static method with same signature as that of Parent class exists in Child class then the Parent class method will be hidden from Child class view.
- Overloading of main method is allowed but JVM always calls the one with 'String[] args' argument. other main methods will be like normal methods.
- if main method is not defined, till Java 6, JVM used to throw a RunTimeException as 'NoSuchMethod Error'. from Java7, it wil throw an error and suggests to define main method.
- till Java6, static blocks used to get execute before searching for main method. from Java7, static blocks wont get executed if class doesn't have main method.
Wednesday, January 6, 2016
Installing an obsolete java version on Linux
for example if you have java 8 and want to install java 7, get the rpm of java 7
and install it with rpm command with '--nodeps' option:
rpm -ivh /tmp/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.x86_64.rpm --nodeps
after installation set your JAVA_HOME to 1.7.
list of java installations on your machine can be obtained through the below command:
alternatives --config java
and install it with rpm command with '--nodeps' option:
rpm -ivh /tmp/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.x86_64.rpm --nodeps
after installation set your JAVA_HOME to 1.7.
list of java installations on your machine can be obtained through the below command:
alternatives --config java
Subscribe to:
Posts (Atom)