This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title></title> | |
| </head> | |
| <body> | |
| <div id="link">http://pkashyap28.wordpress.com | |
| </div> | |
| <a href="javascript:void (0)" id="copy-btn">Copy To Clipboard</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.springframework.context.ApplicationContext | |
| import org.springframework.context.ApplicationContextAware | |
| import javax.servlet.ServletContext | |
| import org.codehaus.groovy.grails.commons.GrailsApplication | |
| import org.codehaus.groovy.grails.plugins.GrailsPluginManager | |
| import org.springframework.context.ApplicationContext | |
| import org.springframework.context.ApplicationContextAware | |
| @Singleton |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| beans = { | |
| applicationContextHolder(ApplicationContextHolder) { bean -> | |
| bean.factoryMethod = 'getInstance' | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GrailsApplication app = ApplicationContextHolder.getGrailsApplication() | |
| ConfigObject config = app.getConfig() | |
| String variable = config.grails.variableNamefromConfig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.BufferedReader; | |
| import java.io.DataOutputStream; | |
| import java.io.InputStreamReader; | |
| import java.net.HttpURLConnection; | |
| import java.net.URL; | |
| import javax.net.ssl.HttpsURLConnection; | |
| public class HttpURLConnectionExample { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.BufferedReader; | |
| import java.io.InputStreamReader; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import org.apache.http.HttpResponse; | |
| import org.apache.http.NameValuePair; | |
| import org.apache.http.client.HttpClient; | |
| import org.apache.http.client.entity.UrlEncodedFormEntity; | |
| import org.apache.http.client.methods.HttpGet; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package hadoop; | |
| import java.util.*; | |
| import java.io.IOException; | |
| import java.io.IOException; | |
| import org.apache.hadoop.fs.Path; | |
| import org.apache.hadoop.conf.*; | |
| import org.apache.hadoop.io.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Java program for implementation of Selection Sort | |
| class SelectionSort | |
| { | |
| void sort(int arr[]) | |
| { | |
| int n = arr.length; | |
| // One by one move boundary of unsorted subarray | |
| for (int i = 0; i < n-1; i++) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Java program for implementation of Bubble Sort | |
| class BubbleSort | |
| { | |
| void bubbleSort(int arr[]) | |
| { | |
| int n = arr.length; | |
| for (int i = 0; i < n-1; i++) | |
| for (int j = 0; j < n-i-1; j++) | |
| if (arr[j] > arr[j+1]) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Java program for implementation of Insertion Sort | |
| class InsertionSort | |
| { | |
| /*Function to sort array using insertion sort*/ | |
| void sort(int arr[]) | |
| { | |
| int n = arr.length; | |
| for (int i=1; i<n; ++i) | |
| { | |
| int key = arr[i]; |