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
--- Actions --- | |
$Copy <M-C> | |
$Cut <M-X> <S-Del> | |
$Delete <Del> <BS> <M-BS> | |
$LRU | |
$Paste <M-V> | |
$Redo <M-S-Z> <A-S-BS> | |
$SearchWeb <A-S-G> | |
$SelectAll <M-A> | |
$Undo <M-Z> |
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
--- Actions --- | |
$Copy <M-C> | |
$Cut <M-X> <S-Del> | |
$Delete <Del> <BS> <M-BS> | |
$LRU | |
$Paste <M-V> | |
$Redo <M-S-Z> <A-S-BS> | |
$SearchWeb <A-S-G> | |
$SelectAll <M-A> | |
$Undo <M-Z> |
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
--- Actions --- | |
$Copy <M-C> | |
$Cut <M-X> <S-Del> | |
$Delete <Del> <BS> <M-BS> | |
$LRU | |
$Paste <M-V> | |
$Redo <M-S-Z> <A-S-BS> | |
$SearchWeb <A-S-G> | |
$SelectAll <M-A> | |
$Undo <M-Z> |
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
############################################################################# | |
# Documentation # | |
############################################################################# | |
# Author: Todd Whiteman | |
# Date: 16th March, 2009 | |
# Verion: 2.0.0 | |
# License: Public Domain - free to do as you wish | |
# Homepage: http://twhiteman.netfirms.com/des.html | |
# |
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
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
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
class TZUtils: | |
def is_maintainance_time(self): | |
local_tz = timezone.get_current_timezone() | |
now = timezone.localtime(timezone.now()).time() | |
start = timezone.localtime(local_tz.localize(timezone.datetime.strptime('16:00', '%H:%M'))).time() | |
end = timezone.localtime(local_tz.localize(timezone.datetime.strptime('17:00', '%H:%M'))).time() | |
logger.info("is_maintainance_time: start - end - now: %s - %s - %s ", start, end, now) | |
if "BankName" == models.BankTokenization.BANKS_LIST[self.api_req.bank_id]: | |
return now < start or now > end | |
return False |
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
from django.contrib.humanize.templatetags.humanize import intcomma | |
// use lib | |
val = _("%s dong") % intcomma(credit_pay_amount)}) | |
val = '{0:,.3f}'.format(float(p['value'])/1000) + _('d') | |
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
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string | |
{ | |
// Prevent crashing undo bug | |
if(range.length + range.location > textField.text.length) | |
{ | |
return NO; | |
} | |
NSUInteger newLength = [textField.text length] + [string length] - range.length; | |
return newLength <= 2; |
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
UIDatePicker *datePicker = [[UIDatePicker alloc] init]; | |
datePicker.backgroundColor = [UIColor whiteColor]; | |
datePicker.datePickerMode = UIDatePickerModeDate; | |
[datePicker setMinimumDate:[self.dateFormatter dateFromString:@"1980-01-01"]]; | |
[datePicker setMaximumDate:[self.dateFormatter dateFromString:@"2050-01-01"]]; | |
[datePicker setLocale:[NSLocale localeWithLocaleIdentifier:[CPLanguage sharedInstance].currentLanguageCode]]; | |
self.dateFormatter = [[CPDateFormatter alloc] init]; | |
[self.dateFormatter setDateFormat:@"dd-MM-yyyy"]; | |
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
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item | |
android:top="-2.5dp" | |
android:bottom="-2dp" | |
android:right="-2dp"> | |
<shape> | |
<solid android:color="@android:color/transparent"/> | |
<stroke | |
android:width="2dp" |