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
| print(":".join("{:02x}".format(ord(c)) for c in s)) |
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> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| <style id="jsbin-css"> | |
| img{ | |
| width: 80%; | |
| margin: 0%; | |
| padding: 0%; |
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
| from subprocess import call | |
| from subprocess import Popen, PIPE, check_output | |
| import os | |
| dir_of_this_script = os.path.dirname(os.path.realpath(__file__)) | |
| pathforarg = os.path.join(dir_of_this_script,"*.py") | |
| out = check_output(['exp-oracle-dwitasdev.bat', '*.py'], shell=True) | |
| print out |
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
| class C(object): | |
| def __init__(self): | |
| self.c_a_d2 = "alpha in C" | |
| self.c_b_d2 = "beta in C" | |
| def mymethod(self): | |
| pass | |
| class B(object): | |
| def __init__(self): | |
| self.b_a_d1 = "alpha in B" |
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
| function GetURLParameter(sParam) { | |
| var sPageURL = window.location.search.substring(1); | |
| var sURLVariables = sPageURL.split('&'); | |
| for (var i = 0; i < sURLVariables.length; i++) { | |
| var sParameterName = sURLVariables[i].split('='); | |
| if (sParameterName[0] == sParam) { | |
| return sParameterName[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
| //NB: Doesn't work for TextArea elements | |
| // | |
| if ($('#' + arr_guids[i]).is('input:checkbox')){ | |
| console.log("checkbox"); | |
| } | |
| if ($('#' + arr_guids[i]).is('input:radio')){ | |
| console.log("radio"); | |
| } | |
| if ($('#' + arr_guids[i]).is('input[type="text"]')){ | |
| console.log("text input"); |
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
| set serveroutput on | |
| set pages 0 | |
| set feedback off | |
| set echo off | |
| DECLARE | |
| height index_stats.height%TYPE; | |
| del_lf_rows_len index_stats.del_lf_rows_len%TYPE; | |
| lf_rows_len index_stats.lf_rows_len%TYPE; | |
| del_perc number; | |
| table_name user_indexes.index_name%TYPE; |
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
| var jquiver4sheadbg = $.ui ? $.ui.version || "pre 1.6" : 'jQuery-UI not detected'; | |
| alert('jQ UI version : ' + jquiver4sheadbg); | |
| var jqcorever4sheadbg = $().jquery; | |
| alert('jQ version : ' + jqcorever4sheadbg); |
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
| class SomeMixin(object): | |
| def __init__(self, rel=None, attrs=None, *args, **kwargs): | |
| print 'Testing sharing an __init__ via a mixin class' | |
| self.someattr = "sm" | |
| super(SomeMixin, self).__init__(*args, **kwargs) | |
| class SomeSuper1(object): | |
| def __init__(self, rel=None, attrs=None, *args, **kwargs): | |
| print 'Testing sharing an __init__ via a super1 class' | |
| class SomeSuper2(object): | |
| def __init__(self, rel=None, attrs=None, *args, **kwargs): |
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
| def monthdelta(date, delta): | |
| ''' | |
| Acts like datetime.timedelta but deals with months | |
| `date`: A datetime object representing the base date | |
| `delta`: An integer representing the offset (-ve for going back in time) | |
| Found at : http://stackoverflow.com/a/3425124/364088 | |
| ''' |
OlderNewer