This file contains 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
// formula as 'width == width' | |
static NSLayoutConstraint* | |
_lcItemRel(UIView *v1, NSString *formula, UIView *v2, float ratio, float constant) { | |
static NSDictionary *attrValueForName = nil; | |
static dispatch_once_t attrOnceToken; | |
dispatch_once(&attrOnceToken, ^{ | |
attrValueForName = | |
@{ | |
@"left": @(NSLayoutAttributeLeft), | |
@"right": @(NSLayoutAttributeRight), |
This file contains 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
/* | |
* Copyright (c) 2015 lalawue | |
* | |
* This library is free software; you can redistribute it and/or modify it | |
* under the terms of the MIT license. See LICENSE for details. | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
This file contains 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
/* | |
* Copyright (c) 2015 lalawue | |
* | |
* This library is free software; you can redistribute it and/or modify it | |
* under the terms of the MIT license. See LICENSE for details. | |
*/ | |
#include <stdio.h> | |
#include <string> | |
#include <vector> |
This file contains 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
;; for Xcode pragma mark, and C/C++ functions | |
(require 'anything) | |
(require 'anything-config) | |
(defvar anything-c-source-objc-headline | |
'((name . "Objective-C Headline") | |
(headline "^[-+@]\\|^#pragma mark") | |
)) | |
(defvar anything-c-source-c-headline |
This file contains 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
;; jump between source and header file | |
(defun c-base-mode-in-header-file () | |
(let* ((filename (buffer-file-name)) | |
(extension (car (last (split-string filename "\\."))))) | |
(string= "h" extension))) | |
(defun c-base-mode-file-jump-to-extension (extension) | |
(let* ((filename (buffer-file-name)) | |
(file-components (append (butlast (split-string filename | |
"\\.")) |