Skip to content

Instantly share code, notes, and snippets.

@cnsoft
cnsoft / gist:5754608
Last active December 18, 2015 08:29
Facebook Concept.
http://www.simplewebtoolbox.com/whats-the-difference-between-facebook-account-and-pages/
Personal Profile: When you create a Facebook personal account, this is your individual account. You put your photo, your life history, all the things that are about you. It is against the Facebook terms of service to create a personal account with a business name. If you have done this, change the name on your account to a name. If they catch you with a business name instead of a personal name, they will shut the account down.
Friend Requests: With a Facebook Account, you can connect to people by becoming friends. They send a friend request, you accept, or vice versa.
Privacy Settings: With a Facebook account you can set privacy settings so only your friends on Facebook can see your information. You can also set it so some or all of your information is seen by non-friends. It’s your choice. The one thing that you cannot set to private is your profile photo. Also, the fact that you have a Facebook account will be availabl
@cnsoft
cnsoft / gist:5874985
Last active December 19, 2015 01:19
解决 duplicate symboal appdelegate.o 的问题.
http://stackoverflow.com/questions/2910205/how-to-handle-duplicate-symbol-error-from-3rd-party-libraries
这个办法是解开.a文件删除 .o $OBJ—CLASS
down vote
I'm going to assume that these are two third party libraries that have only provided you with the .a files and not the source code. You can use libtool, lipo and ar on the terminal to extract and recombine the files.
To see what architectures are in the file:
@cnsoft
cnsoft / gist:5875392
Created June 27, 2013 10:11
SampleCode. Integrated Baidu Share!
<!-- Baidu Button BEGIN -->
<div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare">
<span class="bds_more">分享到:</span>
<a class="bds_qzone"></a>
<a class="bds_tsina"></a>
<a class="bds_tqq"></a>
<a class="bds_renren"></a>
<a class="bds_t163"></a>
<a class="shareCount"></a>
</div>
@cnsoft
cnsoft / gist:5881812
Last active December 19, 2015 02:18
Last step of admob integrated with delphi xe4.
setense:
Undefined symbols for architecture armv7s:
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
Undefined symbols for architecture armv7
http://www.cocoachina.com/bbs/simple/?t117929.html
xiasix 2012-11-20 12:31
If you're using the Admob v6.2 library make sure you're NOT using the -all_load linker flag, use the -ObjC linker flag instead. 这个原因 找到了
@cnsoft
cnsoft / gist:5911269
Created July 2, 2013 17:26
UIWebView NSURLConnection NSURLResponse 用法.
//
http://ioscreator.com/loading-a-website-with-uiwebview/
Now modify the ViewDidLoad method in ViewController.m
- (void)viewDidLoad
{
[super viewDidLoad];
//1
unit BeRoDDS;
(*************************************
** 2-clause simplified BSD license ***
**************************************
**
** Copyright 2010-2011 Benjamin Rosseaux. All rights reserved.
**
** Redistribution and use in source and binary forms, with or without modification, are
** permitted provided that the following conditions are met:
**
@cnsoft
cnsoft / gist:5931455
Created July 5, 2013 03:29
Twitter oauth flow
I'm not familiar with this library, can you explain a bit more about how it interacts with OAuth? You're using some words here that don't really jive with OAuth: a token or key should never be present in any kind of "div" or "box" -- what's the usual sequence of events here? Are you doing some kind of page scraping?
If you're using callback-based OAuth, the sequence should be:
a) You ask for a request token
b) You send the user for authorization
c) They get sent to the oauth_callback you specified in step a
d) You exchange the request token for an access token using the oauth_verifier you got in step c
If you're using out-of-band based OAuth, the sequence should be:
/*
Example program to demonstrate sharing public keys from CryptoApi to CNG
Note: Reversing the process would allow sharing public keys from CNG to
CryptoApi. You would need to be careful of padding parameters and
versions.
License (yes, yes, BSD):
Copyright (c) 2013, Marc Durdin
import os
import sys
sys.path += [os.path.join(
os.path.dirname(
os.path.abspath(__file__)), 'lib')]
# Pythonista Modules
import console
from scene import *
import urllib2, urlparse, sys, webbrowser
itags = {'45': 'webm_720p',
'44': 'webm_480p',
'43': 'webm_360p',
'38': 'mp4_3072p',
'37': 'mp4_1080p',
'36': 'phone_mp4_240p',
'35': 'flv_480p',
'34': 'flv_360p',