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
| $("a.select-user") | |
| .fancybox( | |
| {type: 'deferred', | |
| promise: | |
| function () { | |
| that.view = new App.Views.Admin.Popups.selectUserView({el: $("#fancybox-content"), | |
| order: that.order, | |
| member: that.order.member}); | |
| return that.view.renderTemplate(); | |
| }, |
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
| $.fn.makeInputToggle = function () { | |
| this.each(function () { | |
| var $this = $(this); | |
| if ($this.data("inputToggled")) { | |
| /* avoid double input toggle handling */ | |
| return; | |
| } | |
| /* click on the previous text span or element */ | |
| $this.hide().prev().click(function () { |
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
| #include <Ethernet.h> | |
| byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; | |
| byte ip[] = { 10, 0, 0, 177 }; | |
| byte gateway[] = { 10, 0, 0, 1 }; | |
| byte subnet[] = { 255, 255, 0, 0 }; | |
| Server server = Server(23); |
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
| (in-package :cl-user) | |
| (definfix or :precedence 50) | |
| (definfix and :precedence 40) | |
| (definfix not :precedence 30) | |
| (definfix => :precedence 60) | |
| (definfix <=> :precedence 70) | |
| (defun implies (a b) | |
| (or (not a) 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
| #include <iostream> | |
| #include <inttypes.h> | |
| template<bool C, typename Ta, typename Tb> | |
| class IfThenElse; | |
| template <typename Ta, typename Tb> | |
| class IfThenElse<true, Ta, Tb> { | |
| public: | |
| typedef Ta ResultT; |
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
| $uri = request_uri(); | |
| $DISABLE_XDEBUG_DIRS = array("/js/", "/resource/", "/rest/", "/css/", "/item/"); | |
| $ENABLE_XDEBUG_DIRS = array(); | |
| $disableXdebug = false; | |
| $enableXdebug = false; | |
| $dir = "/"; | |
| foreach ($DISABLE_XDEBUG_DIRS as $dir) { | |
| if (str_starts_with($uri, $dir)) { | |
| $disableXdebug = true; | |
| break; |
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
| # | |
| # generic AVR makefile | |
| # | |
| # (c) July 2011 - Manuel Odendahl - wesen@ruinwesen.com | |
| # | |
| # include this into your main Makefile, after having defined TARGET and TARGET_OBJS | |
| all: $(TARGET).hex |
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
| #!/bin/sh | |
| # | |
| # Usage: git hub-blame file line | |
| # | |
| # Opens the commit where the given line originates in the commit view. Useful for | |
| # code review on github. | |
| FILENAME=$1 | |
| LINE=$2 |
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
| #ifndef MUTEX_H__ | |
| #define MUTEX_H__ | |
| #include "common.h" | |
| #include <wirish/wirish_time.h> | |
| /** | |
| * Simple atomic swap memory mutex | |
| */ | |
| class Mutex { |
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
| m (7037) ~$ howdoi -a macro do while | |
| Answer found in google's first hit: http://bytes.com/groups/c/219859-do-while-0-macro-substitutions Andrey Tarasevich: The whole idea of using 'do/while' version is to make a macro which will | |
| expand into a regular statement, not into a compound statement. This is | |
| done in order to make the use of function-style macros uniform with the | |
| use of ordinary functions in all contexts. Consider the following code sketch if (<condition>) | |
| foo(a); | |
| else | |
| bar(a); where 'foo' and 'bar' are ordinary functions. Now imagine that you'd | |
| like to replace function 'foo' with a macro of the above nature if (<condition>) | |
| CALL_FUNCS(a); |