The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
// if (!window.L) { window.L = function () { console.log(arguments);} } // optional EZ quick logging for debugging | |
/** | |
* A modified (improved?) version of the jQuery plugin design pattern | |
* See http://docs.jquery.com/Plugins/Authoring (near the bottom) for details. | |
* | |
* ADVANTAGES OF EITHER FRAMEWORK: | |
* - Encapsulates additional plugin action methods without polluting the jQuery.fn namespace | |
* - Ensures ability to use '$' even in compat modes | |
* |
CGPoint scrollVelocity = [self.panGestureRecognizer velocityInView:self.superview]; | |
if (scrollVelocity.y > 0.0f) | |
NSLog(@"going down"); | |
else if (scrollVelocity.y < 0.0f) | |
NSLog(@"going up"); |
#define VTXSIZE 0.80 // Amplitude | |
#define WAVESIZE 100.0 // Frequency | |
#define FACTOR 1.2 | |
#define SPEED 2.0 | |
#define OCTAVES 3 | |
// Example of the same wave function used in the vertex engine | |
lowp float wave(lowp float x, | |
lowp float y, | |
lowp float timer) |
ffmpeg -i "https://content.jwplatform.com/manifests/Wqyolfwt.m3u8" -c copy -bsf:a aac_adtstoasc video.mp4 |
// Headers | |
#import <AudioToolbox/AudioToolbox.h> | |
void AudioServicesStopSystemSound(SystemSoundID inSystemSoundID); | |
void AudioServicesPlaySystemSoundWithVibration(SystemSoundID inSystemSoundID,id arg,NSDictionary* vibratePattern); | |
// Buzz code | |
NSArray *vibe = @[ @YES, @10 ]; // ON for 10ms | |
NSDictionary *dict = @{ @"Intensity": @0.1, @"VibePattern": vibe }; | |
AudioServicesPlaySystemSoundWithVibration(kSystemSoundID_Vibrate,nil,dict); |
/******* | |
*** vertex.glsl *********** | |
uniform mat4 u_projection_matrix; | |
attribute vec4 a_position; | |
//attribute vec4 a_source_color; | |
varying vec4 v_position; | |
void main(void) |
{ | |
"count":10, | |
"total_count":10, | |
"current_page":1, | |
"pages":1, | |
"products":[ | |
{ | |
"product":{ | |
"id":1060500593, |
#import <UIKit/UIKit.h> | |
@interface UIView (Marshmallows) | |
@property (nonatomic) CGFloat rotation; | |
/** @name Positioning convenience methods */ | |
- (void)moveByDeltaX:(CGFloat)delX deltaY:(CGFloat)delY; | |
- (void)moveOriginToX:(CGFloat)theX; | |
- (void)moveOriginToY:(CGFloat)theY; |
<?php | |
/* | |
PHP CSS Browser Selector v0.0.2 (Update by Hari Karam Singh) | |
Bastian Allgeier (http://bastian-allgeier.de) | |
http://bastian-allgeier.de/css_browser_selector | |
License: http://creativecommons.org/licenses/by/2.5/ | |
Credits: This is a php port from Rafael Lima's original Javascript CSS Browser Selector: http://rafael.adm.br/css_browser_selector | |
*/ |