Friday, September 19, 2014

restoring huge sql file from comman line mysql in MAC OSX.


Install xampp
stop mac default apache server if its running using command "sudo apachectl stop"
Open configuration panel of xampp
start mysql from manage server option

open ~/.profile by using
nano ~/.profile
copy following text to .profile
export
PATH=/opt/local/bin:/opt/local/sbin:/Applications/xampp/xamppfiles/bin:$PATH

save and exit t using  ctrl + o , ctrl x


type in terminal, mysql -h localhost -u root -p 789798

you will be logged in to mysql console.
 mysql> create database test;

mysql> use database test;

mysql> source /path/to/sql/file/test1.sql



Thursday, September 18, 2014

ERROR: Plugin 'PushPlugin' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml

Solution that worked for me:

http://stackoverflow.com/questions/18403225/phonegap-3-0-ios-plugins-not-found

Deleting the platforms/ios folder is not a solution for me as all manual customizations to the xcode project will be lost.
But there is a simple way around:
In XCode, goto Build Phases -> open the Compiled Sources dropdown. Click + and add the missing plugin .m file that should be in your Plugins directory (but is missing from the compiled sources).



http://trickortip.com/526/andres-felipe-diaz-2/geek-tips-how-to-and-tricks/how-to-access-the-mysql-command-line-in-xampp-from-mac-os-x-terminal.html/ 

Wednesday, September 17, 2014

IOS developement Error No Provisioning Profiles with a valid signing identity in xocde5

Solution:
http://stackoverflow.com/questions/20398176/no-provisioning-profiles-with-a-valid-signing-identity-in-xocde5

  1. Close Xcode
  2. Use keychain to delete your developer certificate and private key.
  3. Use Developer Center to revoke/delete your developer certificate.
  4. Use Developer Center to delete all the invalid development provisioning profiles.
  5. Run Xcode > Preferences > Accounts > (Double click your team) > Refresh.
  6. Xcode will prompt to submit a request to get a new developer certificate signed. (Choose yes).
  7. (Optional) Have you team leader approve the pending certificate in the Developer Center.
  8. Press refresh again to have Xcode download the new provisioning profiles.
You should now be able to select one of the Team Provisioning profiles to run in debug mode.


Shortcuts

  • Command-Shift-3: Take a screenshot of the screen, and save it as a file on the desktop
  • Command-Shift-4, then select an area: Take a screenshot of an area and save it as a file on the desktop
  • Command-Shift-4, then space, then click a window: Take a screenshot of a window and save it as a file on the desktop
  • Command-Control-Shift-3: Take a screenshot of the screen, and save it to the clipboard
  • Command-Control-Shift-4, then select an area: Take a screenshot of an area and save it to the clipboard
  • Command-Control-Shift-4, then space, then click a window: Take a screenshot of a window and save it to the clipboard
In Leopard and later, the following keys can be held down while selecting an area (via Command-Shift-4 or Command-Control-Shift-4):
  • Space, to lock the size of the selected region and instead move it when the mouse moves
  • Shift, to resize only one edge of the selected region
  • Option, to resize the selected region with its center as the anchor point

Saturday, August 23, 2014

Spring framework

Introduction
https://www.youtube.com/watch?v=Jjp_EYEn4bc
https://www.youtube.com/watch?v=8a2vcpxZdME
https://www.youtube.com/watch?v=fGQ8hxdhGjY

Spring tutorials
http://docs.spring.io/docs/Spring-MVC-step-by-step/
http://docs.spring.io/spring/docs/4.0.6.RELEASE/spring-framework-reference/htmlsingle/
https://www.youtube.com/watch?v=3zOZvencaew
Spring MVC
https://www.youtube.com/watch?v=gwdISLtlWic
http://spring.io/guides/gs/securing-web/

Spring template tiles tutorial
http://richardbarabe.wordpress.com/2014/02/02/apache-tiles-3-integration-with-spring-mvc/
http://www.springbyexample.org/examples/simple-tiles-spring-mvc-webapp-jsp-example.html

Spring MVC framework tiles for temlate views
http://dhruvgairola.blogspot.de/2013/03/spring-mvc-with-apache-tiles-3.html
Download different version of tiles jar from
 http://www.apache.org/dyn/closer.cgi/tiles/v3.0.4/tiles-3.0.4-bin.zip

spring hibernet,mysql example
http://www.developer.am/documentation/hibernate/?page=maven-spring-hibernate-mysql-example

http://www.developer.am/documentation/hibernate/?page=why-i-choose-hibernate-for-my-project

http://gerrydevstory.com/2013/06/29/spring-mvc-hibernate-mysql-quick-start-from-scratch/
https://www.youtube.com/watch?v=rdYQOqxq9F0

http://hibernate.org/orm/documentation/getting-started/

Jar download
http://www.java2s.com/Code/Jar/o/Downloadorgspringframeworkorm312RELEASEjar.htm


Links used during app development

Spring MVC-Hibernate error: BasicDataSource is not found

http://stackoverflow.com/questions/16329092/spring-mvc-hibernate-error-basicdatasource-is-not-found

http://viralpatel.net/blogs/spring3-mvc-hibernate-maven-tutorial-eclipse-example/

http://www.mkyong.com/hibernate/hibernate-transaction-handle-example/

http://stackoverflow.com/questions/19414734/understanding-spring-autowired-usage


http://www.dineshonjava.com/2012/12/spring-mvc-with-hibernate-crud-example.html#.VBLU-PmSySo





Saturday, August 9, 2014

Play framework 2.3.x scala template

http://www.playframework.com/documentation/2.1.0/ScalaTemplateUseCases

Ways of defining scala templating syntax
http://stackoverflow.com/questions/10624983/include-scala-html-files-in-play-2-0-scala

Error : Compilation error
Unclosed character literal link to css
<link rel="stylesheet" href="@routes.Assets.at('stylesheets/main.css')">

It was because I used single quote at'stylesheets/main.css' because java expects a character within single quote so solution is

<link rel="stylesheet" href="@routes.Assets.at("stylesheets/main.css")">

About Form sumbmission
http://www.playframework.com/documentation/2.1.1/JavaForms

Routes syntax
https://www.playframework.com/documentation/2.2.x/JavaRouting

Using gson
http://www.mkyong.com/java/how-do-convert-java-object-to-from-json-format-gson-api/