Skip to content

Instantly share code, notes, and snippets.

package com.x.ocr;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import javax.imageio.ImageIO;
@laxman1129
laxman1129 / gist:5230bf522b49122f2aa1
Last active August 29, 2015 14:22
List of useful links
http://blog.grovehillsoftware.com/2009/08/interruptible-jdbc-statements.html
---------------------------help for cron re scheduling--------------------------------
https://pragmaticintegrator.wordpress.com/2007/04/26/scheduling-with-spring-and-quartz/
http://forum.spring.io/forum/spring-projects/container/22852-setting-dynamic-property
---------------------------End help for cron re scheduling----------------------------
------------------handling xml in angular js-----------------
http://jsfiddle.net/mahbub/b8Wcz/
--------------------d3js sample program--------------
@laxman1129
laxman1129 / BatchProducerJob.java
Last active August 29, 2015 14:24
quartz scheduler + spring implementation for reshceduling
package com.x.example;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.springframework.stereotype.Component;
@Component("batchProducer")
public class BatchProducerJob {
@laxman1129
laxman1129 / oracle questions
Created July 21, 2015 15:35
oracle questions
1. Display details of jobs where the minimum salary is greater than 10000.
2. Display the first name and join date of the employees who joined between 2002 and 2005.
3. Display first name and join date of the employees who is either IT Programmer or Sales Man.
4. Display employees who joined after 1st January 2008.
5. Display details of employee with ID 150 or 160.
6. Display first name, salary, commission pct, and hire date for employees with salary less than 10000.
7. Display job Title, the difference between minimum and maximum salaries for jobs with max salary in the range 10000 to 20000.
8. Display first name, salary, and round the salary to thousands.
9. Display details of jobs in the descending order of the title.
10. Display employees where the first name or last name starts with S.
@laxman1129
laxman1129 / sample ie to chrome
Last active August 29, 2015 14:27
open chrome window from internet explorer
$(document).ready(function() {
alert("The link will no longer take you to jquery.com");
alert(navigator.appName);
});
----------------
prefix url with cf:
cf:http://wikipedia.org
---------------------
@laxman1129
laxman1129 / sample d3js on click
Last active August 29, 2015 14:27
sample click d3js
http://bl.ocks.org/d3noob/5d621a60e2d1d02086bf
http://stackoverflow.com/questions/23728433/d3-js-click-event-show-hide-html-element
@laxman1129
laxman1129 / tooltip
Created August 29, 2015 13:04
d3 tooltop
$(document).ready(function() {
var height = 500;
var width = 500;
var tooltip = d3.selectAll('rect.tooltip');
var canvas = d3.select("body")
.append('svg')
.attr({
height: height,
width: width
@laxman1129
laxman1129 / coordinates
Last active September 14, 2015 19:52
coordinates
http://www.algebra.com/algebra/homework/word/geometry/Geometry_Word_Problems.faq.question.477701.html
http://math.wonderhowto.com/how-to/use-ratio-formula-find-coordinates-point-303044/
<html>
<head>
<style type="text/css">
body{
overflow: hidden;
}
div.container {
height: 100%;
width: 100%;
@laxman1129
laxman1129 / ActionEditor.java
Last active December 6, 2015 07:23
Jtable with column having multiple renderers and editors for a column
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.AbstractCellEditor;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JTable;