Lets share love

How ? copy url of this blog and share in your social network :) simple

Lets share love

How ? copy url of this blog and share in your social network :) simple

Monday, November 23, 2015

office word word to pdf converter

https://www.microsoft.com/en-us/download/details.aspx?id=9943

Sunday, September 20, 2015

How to Add Nepali Unicode Tool to Your Website

This is very simple.

1. put this code in head of html file.

<script src="nepali.js"></script>

 Download nepali.js here.


2. Now put this code in body where you want to place box for unicode conversion.

<form name="unicode">
<textarea onkeyup="conversion();" name="nepbox" rows="15" cols="60"></textarea>
</form>

And its done.

If you need to download it whole. here is the link. Click Here to Download

Thursday, September 17, 2015

How to use SSH keys with Putty in Digital Ocean

What is SSH keys

SSH keys serve as a means of identifying yourself to an SSH server using public-key cryptography and challenge-response authentication. One immediate advantage this method has over traditional password authentication is that you can be authenticated by the server without ever having to send your password over the network. Anyone eavesdropping on your connection will not be able to intercept and crack your password because it is never actually transmitted. Additionally, using SSH keys for authentication virtually eliminates the risk posed by brute-force password attacks by drastically reducing the chances of the attacker correctly guessing the proper credentials.


What is Putty 

PuTTY is a free and open-source terminal emulatorserial console and network file transfer application. It supports several network protocols, including SCPSSHTelnetrlogin, and raw socket connection. It can also connect to a serial port(since version 0.59). The name "PuTTY" has no definitive meaning.


How to set up SSH keys 

While it is possible to manage your servers using password-based logins, it is often a better idea to set up and utilize SSH key pairs. SSH keys are more secure than passwords, and can help you log in without having to remember long passwords.

For Windows users, a piece of software called PuTTY is typically used to create SSH sessions which allow you to connect to your server. This same suite of programs can be used to generate SSH keys and remember which keys should be used to connect with your servers.

How SSH Key Pairs Work

SSH key pairs are used as an authentication method by creating two related keys.
The first key is called a private key. The private key is a secret key that is owned and kept safe by the user who creates it. It is used to identify you and is kind of like the wax seals that used to be used to seal letters. It can be used to prove that a connection is legitimately coming from you.
You should not let anyone have your private key, because the other person could then masquerade as you and log into any accounts you have configured with your key. If you need to share access, there are better ways.
The other key is called the public key. This key is veritably associated with your private key. The difference is that you can freely share this key with anyone around the internet.
The only thing that someone else can do with this key is allow you to log into their machine. This is what we will be configuring in this guide, by creating our new servers with our public key already included.
You can download it here :
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Friday, September 11, 2015

XAMPP, Apache - Error: Apache shutdown unexpectedly

Today morning i got this error after installing Skype in my windows. I do not use Skype so i had not installed it earlier. So after Skype installation i got this problem. This happens because Skype by default use same port that Apache uses.

error shows like this:


16:50:25 [Apache] Status change detected: running 16:50:26 [Apache] Status change detected: stopped 16:50:26 [Apache] Error: Apache shutdown unexpectedly. 16:50:26 [Apache] This may be due to a blocked port, missing dependencies, 16:50:26 [Apache] improper privileges, a crash, or a shutdown by another method. 16:50:26 [Apache] Press the Logs button to view error logs and check 16:50:26 [Apache] the Windows Event Viewer for more clues 16:50:26 [Apache] If you need more help, copy and post this 16:50:26 [Apache] entire log window on the forums

Now go to Skype
Tools -> Options -> Advanced -> Connection.
Disable the "Use port 80 and 443 for alternatives for incoming connections"
Sign out Skype and restart it.





Wednesday, July 15, 2015

sending params in

params="['page':'feedback']"

and for data : params="['page': person.id]" instead of params="['page':${person.id}]"

Monday, July 13, 2015

Playing with Images

here is a great tutorial for images animations

http://designshack.net/articles/css/joshuajohnson-2/

Friday, June 12, 2015

Top 10 lies people tell their parent as students.

Students go to another city to study and on phone they tell so many lies to their parents. Here are top ten lies they tell.

1. Ate Food
- Yeah mom , already.

2. Son , you went college today. How were classes.
- Yeah Dad, i went in the early morning. Subjects are too tough. Need to study whole night. :p

3. What is semester fee son.
- Its 65k dad. (its 55000 actually )

4. Girlfriend
- No Mom , I have no girlfriend.

5. Instruments and stationary
- Dad I need 10000 to buy a instrument to buy a instrument that will be needed in next field visit.

6. Do you drink or smoke
- No mom, I have never touched such things. An i swear i will never.

7. You bought laptop
- Yeah i bought a brand new with high configuration.( Actually bought a used one from a friend)

8. How is that place son.
- It is like hell . I want to come home ASAP

9. How is your friend circle
- It is awesome mom. They all are so hardworking and responsible.

Add 10th of your own :) 

Monday, May 11, 2015

Tips on Choosing Fonts for Your Website

  • Is there a way to automatically install a font on my visitor's computer when they visit my site?

    Hopefully not.
    I sincerely hope the browser makers have plugged all the security holes that made such drive-by installations possible. Imagine going to a website and having all manner of things automatically installed onto your computer. It used to be one of the methods used by spyware and adware sites to infect computers, forcing many people to install anti-spyware software to protect themselves.

  • Is there a way to embed a font in my web page so that it can be viewed with that font?

    Not at this time.
    However, a future web standard is currently being worked on that will allow fonts to be embedded (in a manner of speaking) in your web page. Don't hold your breath though. After the standard is ratified, it will take time before all the browser vendors update their browsers. That is not the problem though. The main problem is that even when new versions of all web browsers are available, the majority of people on the Internet will probably still be using old browsers which won't have the technology, and will take many years to update it.
    Update: the above answer is no longer accurate. Most of the latest versions of the desktop web browsers allow you to embed fonts in your web pages in a fairly standard manner.

  • Can I ask my visitors to install a font before accessing my site?

    Sure you can. But will they?
    Chances are that they will just continue to view your site under some default browser font. In the end, you are better off designing your site around that fact so that your site looks optimal with that font rather than hoping they will download and install your designer font.
  • Does that mean that I can never use any fancy or non-standard fonts on my site?

    Not necessarily. I realise that some people, who have taken the trouble to download good looking fonts, want to be able to use them to beautify their site.
    The only fail-safe way to make sure a particular non-standard font shows up the same in all computers is to put the text using that font in a picture, and include that image in your web page. However, this is really only useful for decorative purposes, such as for design elements on your web page, or for small snippets of text that you don't really need to be indexed by the search engines. As I mentioned before in my articles on creating search engine friendly websites and ranking well in the search results, search engines cannot "see" pictures, so you should not try to put your entire web page into an image and display that image, just so you can use your favourite fancy font. Your site will not rank well, if at all. Nor will it be usable for visually impaired people who rely on screen readers

  • Why Does My Font Not Show When I View My Site on Another Computer?

    Designing your web page using one of standard lists of fonts mean that your web page will have more or less the same appearance on all computers, regardless of operating system it uses. Although this may mean that you can exercise a little less creativity in the design of your page, given the current state of affairs, it is the constraint that web designers have to work within.
    Otherwise you will end up like one of the visitors to thesitewizard.com who designed his site around a free font he found on the Internet only to find that when he accessed the site on another computer, it was displayed using a default browser font.

Wednesday, May 6, 2015

Chart and graphs for grails application

http://www.intelligrape.com/blog/generating-dyanmic-charts-in-grails/

Designer.xml Fatal Parsing Error in Dreamweaver CS5

I got "fatal parsing error associated with the designer.xml file" while working in Dreamweaver. Dreamweaver would not open with that.

And here is the simple trick that worked for me just rename the designer.xml file in 

C:\Users\.....\AppData\Roaming\Adobe\Dreamweaver CS5\en_US\Configuration\Workspace

and u can open dreamweaver again :) 


Tuesday, April 21, 2015

What is new in Grails 3.0.0

A few days ago Grails 3.0 was officially released. Grails is now based on Spring Boot, the build system changed from Gant to Gradle and significant parts of the framework have been rewritten. In this post we will have a look at all the major changes introduced by Grails 3.

Grails 3.0 uses the Gradle Build System for build related tasks such as compilation, runnings tests and producing binary distrubutions of your project. It is recommended to use Gradle 2.2 or above with Grails 3.0.

Read more about gradle and spring boot here.

Watch this video : https://www.youtube.com/watch?v=aro3_RZqgtU

The first two folders (build and gradle) are related to Gradle, the new build system in Grails 3. As the name implies, build is the directory where build related files like compiled classes and assembled packages are located. The gradle directory contains theGradle Wrapper that allows you to build the project without a local Gradle installation.

The content of the conf folder has also been changed. The default format for configuration files is now YAML. If you prefer to write your configuration in Groovy, you can still create a grails-app/conf/application.groovy configuration file manually.
Logback is now the default logging provider. The logging configuration (previously part of Config.groovy) has been moved toconf/logback.groovy.
Note that the conf folder is not a source directory anymore.

init is a new folder in Grails 3. It contains Bootstrap.groovy (same content as in previous Grails versions) and the new Application main class (we will look into this in the Spring Boot section).

The structure of the src folder has been changed to match Gradle conventions. Additional Java and Groovy files are now located in:
src/main/java
src/main/groovy
src/test/java
src/test/groovy

build.gradle and gradle.properties contain the build configuration. BuildConfig.groovy from previous Grails versions does no longer exist.

Spring 4.1 and Spring Boot
Spring Boot is the new basis for Grails. According to Graeme Rocher Grails 3 is nothing less than a ground up rewrite on top of Spring Boot.

Like Spring Boot applications Grails 3 projects come with an Application class that has a standard main()method. This means you can start a Grails 3 application simply by running the main class from your IDE.

The default Application class looks like this:
1.class Application extends GrailsAutoConfiguration {
2.static void main(String[] args) {
3.GrailsApp.run(Application)
4.}
5.}
Note that the war file you get when packaging the application can now be executed using the java -jarcommand:

java -jar build/libs/myApplication-0.1.war

This runs the main method which starts the application using an embedded Tomcat server. Of course you can still deploy the war file on an application server of your choice like in previous Grails versions.

The Application class acts as Spring configuration class. So, we can use Spring's @Bean annotation to define custom beans. Methods like onStartup() or onShutdown() can be overwritten if you want to execute custom code at certain application events.
01.class Application extends GrailsAutoConfiguration {
02. 
03....
04. 
05.@Bean
06.MyBean myBeanId() {
07.return new MyBeanImpl();
08.}
09. 
10.@Override
11.void onStartup(Map<String, Object> event) {
12.super.onStartup(event)
13.// custom startup code..
14.}
15.

Traits
In Grails components like Controllers or Domain classes always had some magically attached functionality. For example, in Controllers you can use methods like render(), redirect() or getParams() without subclassing another class. In Grails 3 these features have been rewritten to make use of Traits introduced by Groovy 2.3.
Certain Traits are automatically attached to Controllers, Services, Tag libraries and so on to make framework methods available. For example, a Controller automatically gets the following Traits: TagLibraryInvoker,AsyncControllerRestResponderController.

The cool thing with Traits is that you can easily add them to your own classes.
For example: Assume you want to access the request and params objects outside a Grails Controller. All you have to do now is adding the WebAttributes trait to your class:
01.class MyCustomComponent implements WebAttributes {
02. 
03.public MyCustomComponent() {
04. 
05.// make use of WebAttributes methods like getWebRequest() or getParams()
06.println "base url: " + webRequest.baseUrl
07.println "params: " + params
08....
09.}
10.}

Interceptors
Grails 3 introduced standalone Interceptors. Interceptors can intercept incoming requests to perform common tasks (e.g. logging, authentication, etc.).

A new Interceptor can be created using create-interceptor command:

grails create-interceptor MyInterceptor

A newly created Interceptor looks like this:
01.class MyInterceptor {
02. 
03.boolean before() { 
04.// executed before a request is processed by a controller
05.true 
06.}
07. 
08.boolean after() {
09.// executed after a request is processed by a controller
10.true
11.}
12. 
13.void afterView() { 
14.// executed after the view has been rendered
15.}
16. 
17.}

Interceptors replace Filters used by previous Grails versions. Filters still work in Grails 3 for backwards compatibility. However, they are considered deprecated now.

If you are aware of Spring web MVC, you can easily see the similarities to Springs Handler Interceptor.


Gradle
As mentioned before, Grails 3 uses Gradle instead of Gant as build system. Gradle is used for tasks like compilation, running tests and packaging the application.
When a Grails command like grails clean is executed, the job is delegated to the corresponding Gradle task (e.g. gradle clean). The Gradle-Wrapper shipped with Grails 3 is used for this.
If you want to use a local installation of Gradle you can execute the Gradle task directly with your own Gradle version. Gradle 2.2 or newer is recommended.

The following table shows Grails commands and their corresponding Gradle tasks:
Grails command Gradle Task
cleanclean
compileclasses
packageassemble
run-apprun
test-apptest
warassemble

BuildConfig.groovy from previous Grails versions has been completely replaced by the Gradle configuration (build.gradle). Third party dependencies are now defined in build.gradle:
1.dependencies {
2.compile 'org.grails.plugins:hibernate' 
3.compile 'org.grails.plugins:cache' 
4.compile 'org.hibernate:hibernate-ehcache'
5.runtime 'org.grails.plugins:asset-pipeline' 
6.runtime 'org.grails.plugins:scaffolding'
7....
8.}
For more details, you can have a look at Dependency Management Guide in the Gradle documentation.


Profiles
Whenever you run the create-app command Grails 3 will use a Profile to create a new app.
A Profile encapsulates project structure, commands, templates and plugins. By default Grails 3 uses the webProfile, which creates an app like shown in the screenshot above.

To create a project with a different Profile, you can use the --profile parameter:

grails create-app myapp --profile=web-plugin

Grails 3 comes with three different Profiles:
  • web for standard Grails web applications
  • web-plugin for web application plugins
  • web-micro a minimal micro service application

File Location Differences

The location of certain files have changed or been replaced with other files in Grails 3.0. The following table lists old default locations and their respective new locations:
Old LocationNew LocationDescription
grails-app/conf/BuildConfig.groovybuild.gradleBuild time configuration is now defined in a Gradle build file
grails-app/conf/Config.groovygrails-app/conf/application.groovyRenamed for consistency with Spring Boot
grails-app/conf/UrlMappings.groovygrails-app/controllers/UrlMappings.groovyMoved since grails-app/conf is not a source directory anymore
grails-app/conf/BootStrap.groovygrails-app/init/BootStrap.groovyMoved since grails-app/conf is not a source directory anymore
scriptssrc/main/scriptsMoved for consistency with Gradle
src/groovysrc/main/groovyMoved for consistency with Gradle
src/javasrc/main/groovyMoved for consistency with Gradle
test/unitsrc/test/groovyMoved for consistency with Gradle
test/integrationsrc/integration-test/groovyMoved for consistency with Gradle
web-appsrc/main/webappMoved for consistency with Gradle
*GrailsPlugin.groovysrc/main/groovyThe plugin descriptor moved to a source directory

New Files Not Present in Grails 2.x

The reason it is best to create a new application and copy your original sources to it is because there are a number of new files that are not present in Grails 2.x by default. These include:
FileDescription
build.gradleThe Gradle build descriptor located in the root of the project
gradle.propertiesProperties file defining the Grails and Gradle versions
grails-app/conf/logback.groovyLogging previously defined in Config.groovy is now defined using Logback
grails-app/conf/application.ymlConfiguration can now also be defined using YAML
grails-app/init/PACKAGE_PATH/Application.groovyThe Application class used By Spring Boot to start the application


Files Not Present in Grails 3.x

Some files that were previously created by Grails 2.x are no longer created. These have either been removed or an appropriate replacement added. The following table lists files no longer in use:
FileDescription
application.propertiesThe application name and version is now defined in build.gradle
grails-app/conf/DataSource.groovyMerged together into application.yml
libDependency resolution should be used to resolve JAR files
web-app/WEB-INF/applicationContext.xmlRemoved, beans can be defined in grails-app/conf/spring/resources.groovy
src/templates/war/web.xmlGrails 3.0 no longer requires web.xml. Customizations can be done via Spring
web-app/WEB-INF/sitemesh.xmlRemoved, sitemesh filter no longer present.
web-app/WEB-INF/tldRemoved, can be restored in src/main/webapp

Short summary
Grails 3 comes with major changes. The code basis changed to Spring Boot, Gant was replaced with Gradle, existing features were reimplemented using Traits and new features like Profiles and Interceptors were added.
With all those changes it can become quite challenging to upgrade an existing Grails 2.x application to Grails 3 (all Plugins need to be updated first). If you plan to Upgrade to Grails 3, you should have a look at theGrails 3 upgrade guide