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
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
# 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
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
<?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
// 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
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
<?php | |
/* | |
* Plugin Name: My Name Email | |
* Description: Use custom email From Name | |
* Plugin URI: http://toscho.de/?p=2201 | |
* Version: 2015.01.28 | |
* Author: Dody Rachmat Wicaksono | |
* Author URI: http://www.dodyrw.com | |
* License: GPL | |
*/ |
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.dwidasa.mpos; | |
import android.content.Context; | |
import android.util.Log; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.BaseAdapter; | |
import android.widget.TextView; |
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
function cat_build_stat($category_id) { | |
global $lep; | |
$children = cat_get_children($category_id); | |
$children[] = $category_id; | |
$children_str = implode(', ',$children); | |
$query = "select count(res_id) from lep_resource where category_id in ($children_str) and suspended = 0 and status = 1"; | |
$num_res = $lep->db->GetOne($query); |
OlderNewer