{ Snipperize }
Snipperize snippets
Advanced Directory Synchronization module
This program is an advanced directory synchronization and update tool. It can be used to update content between two directories, synchronize them, or just report the difference in content between them. It uses the syntax of the 'diff' program in printing the difference.
Python / robocopier, file, synchronization, diff, filecmp / by ThePeppersStudio (7 days, 12.66 hours ago)
Kill All MySQL Connections Based On Condition
Kill All MySQL Connections Based On Condition
SQL / kill, connection, information_schema / by ThePeppersStudio (9 days, 15.95 hours ago)
TouchXML Quick Guide
TouchXML Tutorial Code
Objective-C / TouchXML, CXMLDocument, parser, XML / by ThePeppersStudio (9 days, 16.00 hours ago)
Fetch Objects from the Object Model
Fetching data from the object model is very easy, no SQL skills required, almost. To simplify fetching data and reducing the amount of code I created a simple helper class with static methods that do most of the work. //predicate = [NSPredicate predicateWithFormat:@"(ProvinceToCounty == %@)", selectedObject];
Objective-C / coredata, NSFetchRequest, NSPredicate / by ThePeppersStudio (11 days, 8.07 hours ago)
PHP Contextual Dates
friendly contextual dates
PHP / contextual, date, friendly / by ThePeppersStudio (12 days, 7.47 hours ago)
Get Next Autoincrement Number
Get next autoincrement id.
SQL / autoincrement, information_schema / by ThePeppersStudio (12 days, 7.61 hours ago)
Compact Access DB with ADO
'Needs Microsoft Jet and Replication Objects Library 'Needs Microsoft ActiveX Data Objects Library 'Needs Microsoft Scripting Runtime
Visual Basic / access, database, ado / by ThePeppersStudio (12 days, 7.75 hours ago)
CSS Sticky Footer
must declare 0 margins on everything, also for main layout components use padding, not vertical margins (top and bottom) to add spacing, else those margins get added to total height and your footer gets pushed down a bit more, creating vertical scroll bars in the browser HTML ========================================================================== <div id="wrap"> <div id="main" class="clearfix"> </div> </div> <div id="footer"> </div>
CSS / sticky, footer / by ThePeppersStudio (12 days, 7.80 hours ago)
CSS Image Hover
CSS image hover with fade in-out effect.
CSS / image, hover, fade, transition / by ThePeppersStudio (12 days, 7.87 hours ago)
The goto decorator
This is the recipe for you if you are sick of the slow speed of the existing goto module http://entrian.com/goto/. The goto in this recipe is about 60x faster and is also cleaner (abusing sys.settrace seems hardly pythonic). Because this is a decorator, it alerts the reader which functions use goto. It does not implement the comefrom command, although it is not difficult to extend it to do so (exercise for the reader). Also, computed gotos aren't supported; they're not pythonic. Use dis.dis(fn) to show the bytecode disassembly of a function. The bytecodes of a function are accessed by fn.func_code.co_code. This is readonly so: The decorated function is created exactly the same as the old one, but with the bytecode updated to obey the goto commands. This is 2.x only; the new module is not in python 3.x (another exercise for the reader!)
Python / bytecodes, decorator, goto, label / by ThePeppersStudio (17 days, 16.04 hours ago)
- Home
- New Snippet
- Languages
-

