`
fosa0989
  • 浏览: 108533 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
无聊想调用下嘀咕的api的时候,发现需要HTTP Basic Authentication,就看了下。 什么是HTTP Basic Authentication?直接看http://en.wikipedia.org/wiki/Basic_authentication_scheme吧。 在你访问一个需要HTTP Basic Authentication的URL的时候,如果你没有提供用户名和密码,服务器就会返回401,如果你直接在浏览器中打开,浏览器会提示你输入用户名和密码(google浏览器不会,bug?)。你可以尝试点击这个url看看效果:http://api.minicloud.co ...
You want to develop a RESTful web API for developers that is secure to use, but doesn’t require the complexity of OAuth and takes a simple “pass the credentials in the query” approach… or something equally-as-easy for people to use, but it needs to be secure. You are a smart guy, so you start to ...
When building iPhone applications that support or provide text input, it’s often necessary to create some extra buttons (or other controls) beyond the ones provided by the default keyboard interface. Those buttons should be created for specific operations needed by your application, such as moving to ...
 If you have ever written an iPhone app that requires numeric input, then you surely know about the UIKeyboardTypeNumberPad. And if you have ever used that flavor of the iPhone's keyboard, then you surely know that it lacks one very important feature: The UIKeyboardTypeNumberPad does not have a & ...
1.创建证书实用工具-钥匙串访问。然后在菜单栏里点击钥匙串访问-证书助理-创建证书来打开向导。证书名称必须为iPhone Developer,将类型设定为代码签名,勾选”让我覆盖这些默认值”,之后就一路Next。   2.环境配置首先确认已退出Xcode,然后开始修改配置文件:打开“终端”(1-4步都是在终端中执行)(1)修改 SDKSettings.plist先备份原文件:cd /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/sudo cp SDKSettings.plist SDKSett ...
一、Android的电源管理部分文件路径如下: frameworks/base/core/java/android/os/PowerManager.java      PowerManager类被APP调用,控制电源设备状态切换等 frameworks/base/services/java/com/android/server/PowerManagerService.java     PowerManagerService属于PowerManager的核心 framework ...
BatteryService monitors the charging status, and charge level of the device battery. When these values change this service broadcasts the new values to all IntentReceivers (android.content.BroadcastReceiver) that are watching the BATTERY_CHANGED (android.content.Intent#ACTION_BATTERY_CHANGED) action. ...
System Server是Android系统的核心,他在Dalvik虚拟机启动后立即开始初始化和运行。其它的系统服务在System Server进程的环境中运行。/base/services/java/com/android/server/SystemServer.java /** * This method is called from Zygote to initialize the system. This will cause the native * services (SurfaceFlinger, AudioFlinger, etc..) to ...
在.h中实现代码: @interface ShowTextfieldUnderKeyboardViewController : UIViewController <UITextViewDelegate>{ IBOutlet UITextView *myTextView; IBOutlet UIScrollView *myScrollView; } @property(nonatomic,retain) UITextView *myTextView; @property(nonatomic,retain) UIScrollView *myScrollView; -(IBA ...
一、获取系统所支持的国际化信息在国际化之前,你可以在iphone中的”设置->通用->多语言环境->语言”中来查看你的iphone支持哪些语言,当然也可以写一段代码测试一下你的iphone都支持哪些语言.测试代码如下: 1 2 3 NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSArray *languages = [defaults objectForKey:
使用NSTimer与iphone的简单动画,实现飘雪效果,这理原理比较简单,就是定时生成一定的雪花图片,然后使用动画的方式向下漂落(我在其它论坛,看到使用path的方式实现的一个云漂来漂去的效果,实际也可以用那种方式实现,这实际就是前面说的动画效果的两种应用)。所以,我们可以在 viewDidLoad事件中,增加一个图片及定时器并启动,这里的pic请在头文件中定义。 1 2 3 4 5 6 -(void)viewDidLoad{ [super viewDidLoad]; self.pic = [UIImage imageNamed
Android 编译环境 本身比较复杂,且不像普通的编译环境:只有顶层目录下才有 Makefile 文件,而其他的每个 component 都使用统一标准的 Android.mk . Android.mk 文件本身是比较简单的,不过它并不是我们熟悉的 Makefile ,而是经过了 Android 自身编译系统的很多处理,因此要真正理清楚其中的联系还比较复杂,不过这种方式的好处在于,编写一个新的 Android.mk 来给 Android 增加一个新的 Component 会比较简单。 编译 Java 程序可以直接采用 Ecl ...
Activity启动分为很多种情况,这里说的是打开新的应用程序第一个Activity的流程。 1. AcitivityManager产生新进程,新进程从android.app.ActivityThread.main开始运行。这里就是一般意义上的程序入口点,类似于C的main函数。 ActivityManagerService.java   private final void startProcessLocked(ProcessRecord app, String hostingType, String hostingNameStr) {       // Process里面通知Zygo ...
GNU的内核在体积和运行效率上不适合移动设备,系统核心组件都是以动态库的形式驻留在每个进程中,运行效率和内存占用都是十分重要的问题。Google开发了一个自定义的库名为Bionic ,以BSD许可形式开源。Bionic库仅为200KB大小是GNU版本体积的一半,这意味着更高的效率和低内存占用,同时配合经过优化的Java VM Dalvik才可以保证高的性能。Bionic不支持一些特性比如宽字节对unicode,类似c++那样的异常处理。   Android 2.1 |-- Makefile |-- bionic                        (bionic C库) | ...
#!/bin/bash   echo "Removing any other flash plugin previously installed:" sudo apt-get remove -y --purge flashplugin-nonfree gnash gnash-common mozilla-plugin-gnash swfdec-mozilla libflashsupport nspluginwrapper sudo rm -f /usr/lib/mozilla/plugins/*flash* sudo rm -f ~/.mozilla/plug ...
Global site tag (gtag.js) - Google Analytics