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
NSString *myString = @"1233 12313"; | |
[myString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] |
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
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}") | |
buildNumber=$(($buildNumber + 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}" |
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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
#author:rikugun | |
import sys | |
import urllib | |
import os | |
from shutil import copyfile | |
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 reportlab.pdfgen import canvas | |
from reportlab.lib.pagesizes import A4 | |
from reportlab.lib.units import mm | |
#I"ll be generating code39 barcodes, others are available | |
from reportlab.graphics.barcode import code39 | |
# generate a canvas (A4 in this case, size doesn"t really matter) | |
c=canvas.Canvas("barcode_example.pdf",pagesize=A4) | |
# create a barcode object | |
# (is not displayed yet) |
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 a simple code for generate pdf with reportlab. | |
More information:http://www.reportlab.com/software/opensource/rl-toolkit/faq/ | |
''' | |
from reportlab.pdfgen import canvas | |
from reportlab.lib.units import cm | |
my_pdf = canvas.Canvas("hello.pdf") | |
my_pdf.drawString(9*cm, 22*cm, "Hello World!") | |
my_pdf.showPage() | |
my_pdf.save() |
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
import re | |
import urllib2 | |
import urllib | |
import sys | |
import time | |
#get html of page | |
def getHtml(url): | |
page = urllib2.urlopen(url) | |
html = page.read() |
NewerOlder