"Let's create an ES6 class!" you say. "Let's give it a private variable x
."
class Foo {
constructor(x) {
this.x = x;
}
getX() {
// | |
// Created by tdimson on 9/5/12. | |
#import <QuartzCore/QuartzCore.h> | |
#import "SFSChickenScreen.h" | |
@implementation SFSChickenScreen { | |
__weak CAEmitterLayer *_chickenEmitter; | |
CGFloat _decayAmount; |
#!/bin/sh | |
# Launch application using ios-sim and set up environment to inject test bundle into application | |
# Source: http://stackoverflow.com/a/12682617/504494 | |
if [ "$RUN_APPLICATION_TESTS_WITH_IOS_SIM" = "YES" ]; then | |
test_bundle_path="$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.$WRAPPER_EXTENSION" | |
environment_args="--setenv DYLD_INSERT_LIBRARIES=/../../Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection --setenv XCInjectBundle=$test_bundle_path --setenv XCInjectBundleInto=$TEST_HOST" | |
ios-sim launch $(dirname $TEST_HOST) $environment_args --args -SenTest All $test_bundle_path | |
echo "Finished running tests with ios-sim" |
#!/bin/bash | |
# This script builds the iOS and Mac openSSL libraries | |
# Download openssl http://www.openssl.org/source/ and place the tarball next to this script | |
# Credits: | |
# https://github.com/st3fan/ios-openssl | |
# https://github.com/x2on/OpenSSL-for-iPhone/blob/master/build-libssl.sh | |
//This should be added before the layout of the view | |
- (void) adaptToTopLayoutGuide { | |
//Check if we can get the top layoutguide | |
if (![self respondsToSelector:@selector(topLayoutGuide)]) { | |
return; | |
} | |
//tankView is a contaner view | |
NSArray * array = [self.tankView referencingConstraintsInSuperviews]; //<--For this method get the Autolayout Demistified Book Sample made by Erica Sadun | |
[self.view removeConstraints:array]; | |
NSArray * constraintsVertical = [NSLayoutConstraint constraintsWithVisualFormat:@"V:|[topLayoutGuide]-0-[tankView]|" options:0 metrics:nil views:@{@"tankView": self.tankView, @"topLayoutGuide":self.topLayoutGuide}]; |
// | |
// NFViewController.m | |
// TextFieldTest | |
// | |
// Created by Florian Sey on 06/02/14. | |
// Copyright (c) 2014 NeoFacto. All rights reserved. | |
// | |
#import "NFViewController.h" |
# Plugin: jekyll-contentblocks | |
# Author: Rusty Geldmacher | |
# Git: https://github.com/rustygeldmacher/jekyll-contentblocks | |
# Instructions: https://github.com/rustygeldmacher/jekyll-contentblocks#usage | |
module Jekyll | |
module ContentBlocks | |
VERSION = "0.0.3" | |
module Common | |
def get_content_block_name(tag_name, block_name) | |
block_name = (block_name || '').strip |
The early programmer struggles with the Javascript keyword this
. But understanding your this
context is easier than it seems.
This
is all about where a function is invoked.
Often, early programmers worry about where the function was declared. Perhaps the function was declared in a specific file or a particular object. Surely this changes it's this
!
Nope.