Skip to content

Instantly share code, notes, and snippets.

View nsisodiya's full-sized avatar

Narendra Sisodiya nsisodiya

View GitHub Profile
@nsisodiya
nsisodiya / FunctionScheduler.py
Created April 10, 2011 00:52
Python FunctionScheduler
#!/usr/bin/python
#(c) 2011 , Narendra Sisodiya , narendra@narendrasisodiya.com
# Sunday, 10 April 2011
# Released under MIT License
#
# PythonTimer is a timer class, you can download it from
# http://code.activestate.com/recipes/577646-pythontimer/
import threading
@nsisodiya
nsisodiya / popcorn.slide.js
Created May 17, 2011 09:49
popcorn.slide.js
// PLUGIN: SLIDE
(function (Popcorn) {
/**
* SLIDE popcorn plug-in = This will be helpful in creating slideshow.
* Adds HTML DIV SLIDE to an element on the page.
* Options parameter will need a start, end, target and ID OF SOURCE DIV.
* Start is the time that you want this plug-in to execute
* End is the time that you want this plug-in to stop executing
document.addEventListener('DOMContentLoaded', function () {
var popcorn = Popcorn( "#myaudio" );
popcorn.exec( 5, function() {
alert("asdf");
});
popcorn.play();
@nsisodiya
nsisodiya / gist:990704
Created May 25, 2011 10:02
MSPhotoStory XML
<MSPhotoStoryProject schemaVersion="2.0" appVersion="3.0.1115.0" linkOnly="0" defaultImageDuration="5" visualUnitCount="67" codecVersion="{50564D57-0000-0010-8000-00AA00389B71}" sessionSeed="8426737">
<VisualUnit duration="5" type="1">
<Transition duration="0.5" withPrevImage="0" type="{829BBF89-7707-4567-A0B8-9BF9631C79AD}"/>
<Image path="0.JPG" comments="IMG_5035.JPG" lastModified="5/25/2011 10:13:22 AM" width="3264" height="2448" noNarration="-1" useManualDuration="0" narrationTips="">
<Edit>
<RotateAndCrop rotateType="0">
<Rectangle upperLeftX="90" upperLeftY="151" width="3033" height="2275"/>
</RotateAndCrop>
<TextOverlay text="Different types of triangles" verticalAlignment="4" horizontalAlignment="1" fontReferenceWidth="312" fontReferenceHeight="234">
<Font faceName="Viner Hand ITC" width="0" height="-21" weight="700" strikeout="0" italic="1" underline="0" charset="0" clipprecision="2" escapement="0" orientation="0" outprecision="3" pitchandfamily="66" quality="1" color="65535"/>
#!/usr/bin/python
#By - Narendra Sisodiya - http://narendrasisodiya.com
from urllib import urlopen
import xml.dom.minidom
import re
def Get_Total_Tweets(user):
@nsisodiya
nsisodiya / gist:1273354
Created October 9, 2011 05:34
GenSec2 Error
[/media/Data/All/MyData/MyWork/Elpa/ODesk/David D3/edm/GenSec2]
$./GenSec2
[INFO 11:01:33.491 IST] main:log - Scanning files: [./web/WEB-INF/web.xml, ./web/WEB-INF/web.xml, ./web/WEB-INF/classes/com/yambina/mddbyam/ConditionType.class, ./web/WEB-INF/classes/com/yambina/mddbyam/Mid.class, ./web/WEB-INF/classes/com/yambina/mddbyam/DayRuleType.class, ./web/WEB-INF/classes/com/yambina/mddbyam/ConvertibleType.class, ./web/WEB-INF/classes/com/yambina/mddbyam/Factor.class, ./web/WEB-INF/classes/com/yambina/mddbyam/RateSpread.class, ./web/WEB-INF/classes/com/yambina/mddbyam/CodeType.class, ./web/WEB-INF/classes/com/yambina/mddbyam/Volume.class, ./web/WEB-INF/classes/com/yambina/mddbyam/Precision.class, ./web/WEB-INF/classes/com/yambina/mddbyam/PlaceOfTrade.class, ./web/WEB-INF/classes/com/yambina/mddbyam/Instrument.class, ./web/WEB-INF/classes/com/yambina/mddbyam/DayOfWeek.class, ./web/WEB-INF/classes/com/yambina/mddbyam/Settlement.class, ./web/WEB-INF/classes/com/yambina/mddbyam/RulesType.class, ./we
@nsisodiya
nsisodiya / test.js
Created November 3, 2011 10:26
Pass Argument to addEventListener
<!DOCTYPE html>
<html>
<head>
<title>HTML5</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript">
function fun1(){
Arr = ["A","B","C","D","E"];
for (var i = 0 ; i<Arr.length; i++){
@nsisodiya
nsisodiya / gist:1722542
Created February 2, 2012 09:27
Caching Response for API Calls
getCountries: function(){
var self = this;
function onSuccessCB(DataObj) {
$.jCacher.add("getCountries", DataObj);
clk.util.com.hideProcessing();
var SettingsResponse = DataObj.getData();
if (SettingsResponse.error != null) {
clk.util.com.showErrorMessage("Unable to get Contact Info" + SettingsResponse.error);
@nsisodiya
nsisodiya / gist:2049563
Created March 16, 2012 10:50
jQgrid Heighlight Column while Resize
Index: themes/blue/jquery-ui-1.8.2.custom.css
===================================================================
--- themes/blue/jquery-ui-1.8.2.custom.css (revision 69684)
+++ themes/blue/jquery-ui-1.8.2.custom.css (working copy)
@@ -615,7 +615,7 @@
#tabContainer .ui-jqgrid-hbox{ padding-right:0 !important;}
#tabContainer .ui-jqgrid-hbox table, #tabContainer .ui-jqgrid-bdiv table{ width:100% !important;}
#tabContainer .loading{ width:60px !important;}
-#tabContainer .ui-jqgrid .ui-jqgrid-resize-mark{ width:1px !important;}
+#tabContainer .ui-jqgrid .ui-jqgrid-resize-mark{ /*width:6px;*/}
@nsisodiya
nsisodiya / JS-Inheritance-5.js
Created July 19, 2012 12:50
JS-Inheritance-5.js
/* Author : Narendra Sisodiya
* Date : Thu Jul 19 18:16:38 IST 2012
* Licence : Public Code
* Purpose : Inheritance
*
*/
Function.prototype.inheritFrom = function (Base){
var F = function(){};
F.prototype = Base.prototype;