PIXNET Logo登入

pcwiki的部落格

跳到主文

歡迎光臨pcwiki在痞客邦的小天地

部落格全站分類:數位生活

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 4月 17 週五 201516:21
  • How to dismiss SKScene? 關閉 取消 SKScene

[yourSKView presentScene:nil];
http://stackoverflow.com/questions/21920308/how-to-dismiss-skscene
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(18)

  • 個人分類:IOS
▲top
  • 10月 25 週六 201409:44
  • IOS 教學 01

開始學習IOS開發
會陸續貼上一些學習心得
------------------------
 
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(4)

  • 個人分類:IOS
▲top
  • 10月 11 週六 201403:46
  • android ndk 版本 下載 問題 哪個

下載ndk來用的時候要注意一下,
有分成看作業系統位元來下載的X86-64
然後是看目標裝置的位元來下載X86-64
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(173)

  • 個人分類:Android教學
▲top
  • 10月 11 週六 201403:42
  • [轉] 升級 Skype 後,我的登入畫面全走樣了?(格式排版亂掉、少了 CSS 檔、變無樣式網頁)skype 錯亂 畫面

【圖片:失去版型的 Skype 登入畫面】
http://atelier-wini.blogspot.tw/2013/12/skype-css.html
 
通常是更新 Skype 時發生這問題,目前看到是 Windows 7 使用者會碰上,但應該是任何作業系統都可能發生。
問題畫面擷圖
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(1) 人氣(844)

  • 個人分類:
▲top
  • 10月 11 週六 201403:40
  • [轉] 解决Excel数据导入sqlite中的中文乱码问题 亂碼 execl sql


http://blog.csdn.net/geekwangminli/article/details/8007114
 
  最近公司让做一个地图定位系统,需要将山东省大中城市的经纬度写入到sqlite中,手工逐个写入很不现实,最好的方法是将网上的资料导入到sqlite中,我先将网上下载的资源保存成excel表格,再导入sqlite中,这时发现导入的中文数据都是乱码,原来是由于两个工具之间的编码不同造成的,几经周折,问题终于解决,先列出该步骤,以飨网友。
     
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(1,043)

  • 個人分類:
▲top
  • 10月 11 週六 201403:34
  • [轉] Java Collections copy list

http://stackoverflow.com/questions/689370/java-collections-copy-list-i-dont-understand
若想要複製 collections
那要用下列方法:
List
<String> b =newArrayList<String>(a);
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(58)

  • 個人分類:
▲top
  • 10月 11 週六 201403:32
  • [轉] Java - String.getBytes()的中文編碼問題 亂碼 中文

http://uki-kemono.blogspot.tw/2009/07/java-stringgetbytes.html
 
因為放到server上一直出現亂碼,但又不是db和網頁的問題,找了一下是程式中關於getByte()的問題。
 
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(8,715)

  • 個人分類:
▲top
  • 9月 17 週三 201418:01
  • [轉] android 螢幕 亮度 開關 on off 調整 之二


一:只改变当前程序android屏幕亮度
(1)方法:
lp.screenBrightness 取值 0.0 -- 1.0 ※设定值(float)的范围,默认小于 0(系统设定)、0.0(暗)~1.0(亮) ※调用处理的地方,例如, Activity.onCreate()等等

代码:
WindowManager.LayoutParams lp = getWindow().getAttributes();

lp.screenBrightness = 1.0f;

getWindow().setAttributes(lp);


  注:1、b是一个浮点数 从0~1 ,表示亮度
 
         2、当我们遇到把Activity做为子Activity潜入到TabActivity 或者 ViewGroup 类容器时,通常上面的方法设置无法取得成功。
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(893)

  • 個人分類:Android教學
▲top
  • 9月 17 週三 201417:57
  • [轉] Android锁屏API-DevicePolicyManager介绍 鎖屏 鎖螢幕

从Android 2.2开始,加入了一个新的锁屏API位于android.app.admin.DevicePolicyManager包,DevicePolicyManager类的lockNow方法可以锁住屏幕,查看Android源代码发现其实是从IDevicePolicyManager实现的,整个AIDL接口调用代码为:



  1.       private final IDevicePolicyManager mService;


  2.    mService = IDevicePolicyManager.Stub.asInterface(

  3.                 ServiceManager.getService(Context.DEVICE_POLICY_SERVICE));


  4.   if (mService != null) {

  5.             try {

  6.                 mService.lockNow();

  7.             } catch (RemoteException e) {

  8.                 Log.w(TAG, "Failed talking with device policy service", e);

  9.             }

  10.         }


复制代码
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(296)

  • 個人分類:Android教學
▲top
  • 9月 17 週三 201417:54
  • [轉] android 螢幕 亮度 開關 on off 調整 之一








http://stackoverflow.com/questions/9561320/android-how-to-turn-screen-on-and-off-programmatically


Before marking this post as a "duplicate", I am writing this post because no other post holds the solution to the problem.


I am trying to turn off the device, then after a few minutes or sensor change, turn it back on.


Turn Off Display Tests


I am able to turn off the screen using:


params.flags |=LayoutParams.FLAG_KEEP_SCREEN_ON;params.screenBrightness =0;
getWindow
().setAttributes(params);

I have been unable to turn off the screen using the wl.release() method.


Turn On Display Test


My first guess, as follows, does not work. Nothing happens, screen remains off.


params.flags |=LayoutParams.FLAG_KEEP_SCREEN_ON;params.screenBrightness =-1f;
getWindow
().setAttributes(params);

I also then tried to use wakelocks, with no success.


PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK,"tag");
wl
.acquire();

Finally I have tried the following, with no result.


getWindow().addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);

All in all, I don't get any kind of error in the console for any of these methods. My test text "Screen should be on", is on the the screen when I turn on the device using the power button. This shows that the code should have ran. Please only answer if you have tested the code, it seems like many of the functions such as params.screenBrightness = -1, do not work as they should according to the sdk.


Thanks!



android










share|improve this question



edited Mar 11 '12 at 14:50

 

 




asked Mar 5 '12 at 3:36




thegreyspot
1,78431227







 

add a comment






(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(486)

  • 個人分類:Android教學
▲top
«1...56721»

個人資訊

pcwiki
暱稱:
pcwiki
分類:
數位生活
好友:
累積中
地區:

熱門文章

  • (1,893)Android 新手上路 安裝系統(linux, Android, eclipse, ADT)
  • (4,214)IBM DB2 Oracle MS SQL 的比較
  • (1,023)0707(3)_java輸出入與迴圈
  • (266)[轉][mysql]can't connect to MySQL Server
  • (11,458)[轉]解決javac編譯時中文編碼警告的問題
  • (222)[轉] WampServer php mysql 集成包 多國語
  • (18,129)[轉] WampServer 用自已電腦架站
  • (660)[轉] Android - 取得WIFI相關資訊
  • (8,715)[轉] Java - String.getBytes()的中文編碼問題 亂碼 中文
  • (1,043)[轉] 解决Excel数据导入sqlite中的中文乱码问题 亂碼 execl sql

文章分類

toggle IOS (1)
  • IOS (42)
  • 伺服器+資料庫 (7)
  • SCJP 6.0 (5)
  • Android軟體 (9)
  • Android影片教學 (5)
  • Android新聞 (8)
  • Android教學 (104)
  • linux (1)
  • 未分類文章 (1)

最新文章

  • [旅遊] 日本-大阪
  • [旅遊] 台中
  • [旅遊] 高雄
  • [旅遊] 苗栗
  • 工程師心得
  • ios core data database sample 範本 加入core data
  • 類似 Observer Pattern 的 NSNotificationCenter ios 訊息處理 觀察者模式
  • ios in-app purchase flow 流程 程式內購買 開發 詳細 教程
  • ios iRate 第三方 投票 評等 評分 評價 開發 應用程式 app
  • ios 更改 顯示名稱 本地化 多國語言

文章精選

文章搜尋

誰來我家

參觀人氣

  • 本日人氣:
  • 累積人氣: