This file contains hidden or 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
| //wearversion | |
| //wearlog | |
| //wearvoiceinputenable | |
| //wearvoiceinputdisable | |
| //weargoogleapi | |
| //assert | |
| //pushassert | |
| //uplog | |
| //upcrash | |
| //switchnotificationstatus |
This file contains hidden or 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
| // get bitmap from ImageView | |
| Bitmap bmp = ((BitmapDrawable)image.getDrawable()).getBitmap(); | |
| FileOutputStream out = null; | |
| try { | |
| out = new FileOutputStream(filename); | |
| bmp.compress(Bitmap.CompressFormat.PNG, 100, out); // bmp is your Bitmap instance | |
| // PNG is a lossless format, the compression factor (100) is ignored | |
| } catch (Exception e) { | |
| e.printStackTrace(); |
This file contains hidden or 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
| jQuery(document).ready(function($) { | |
| // $(".gifImg").attr('src', './images/loading.gif'); | |
| /** | |
| * Created by Jolam on 2014/11/30. | |
| */ | |
| var ResourceLoader = (function (Config, Util, _, Backbone) { | |
| var ResourceLoader = function (opts) { | |
| this.files = opts.files; |
This file contains hidden or 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
| <input type="file" capture="camera" accept="image/*" /> |
This file contains hidden or 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
| list1 = [1,2,3] | |
| list2 = ['baidu','google','bing'] | |
| //->{1:'baidu', 2:'google', 3:'bing'} | |
| dict(map(lambda x,y:[x,y], list1,list2)) | |
| //or | |
| dict(zip(list1,list2)) |
This file contains hidden or 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
| cavas: | |
| 方法一: | |
| View view= getWindow().getDecorView(); | |
| Bitmap bmp = Bitmap.createBitmap(480, 800, Bitmap.Config.ARGB_8888); | |
| view.draw(new Canvas(b)); |
This file contains hidden or 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
| /* | |
| * Copyright (C) 2014 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>星级评分</title> <script src="http://www.codefans.net/ajaxjs/jquery1.3.2.js" type="text/javascript"></script> <script> $(function(){ $(".star li").mouseenter(function(){ $(".star li").css("background","#f60"); $(this).css("background","#f60"); $(this).nextAll().css("background","#ccc"); }) }); </script> <style type="text/css"> * {padding:0;margin:0;list-style:none; float:left;} .star li { float: left; height: 20px; width: 20px; background-color: #CCC; margin-right: 4px; } </style> </head> <body> <div>选几星:</div> <ul class="star"> <li></li> <li></li> <li></li> <li></li> <li></li> </ul> </body> </html> |
This file contains hidden or 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
| package com.qustom.dialog; | |
| import android.app.AlertDialog; | |
| import android.content.Context; | |
| import android.graphics.Color; | |
| import android.graphics.drawable.Drawable; | |
| import android.view.View; | |
| import android.widget.FrameLayout; | |
| import android.widget.ImageView; | |
| import android.widget.TextView; |