EExcel 丞燕快速查詢2

EExcel 丞燕快速查詢2
EExcel 丞燕快速查詢2 https://sandk.ffbizs.com/

android crosswalk goback



MainActivity.java

@Override
public boolean dispatchKeyEvent(KeyEvent event) {
  if(event.getKeyCode() == KeyEvent.KEYCODE_BACK && event.getAction() != KeyEvent.ACTION_UP) { //按下有用,key up 無用
    if (mXWalkView != null && mXWalkView.getNavigationHistory().canGoBack()) {
      mXWalkView.getNavigationHistory().navigate(XWalkNavigationHistory.Direction.BACKWARD,     1);
      return true;
    }
  }

  return false;
}

[轉]为什么放弃WebView crosswalk

http://www.cnblogs.com/ct2011/p/4100132.html

android remove title bar



<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>

android crosswalk new for file upload、camera test

1、build.gradle


repositories {
  maven {
    url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
  }
}

compile 'org.xwalk:xwalk_core_library:18.48.477.13'





2、active_main.xml





<org.xwalk.core.XWalkView android:id="@+id/activity_main"
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent">
</org.xwalk.core.XWalkView>

3、MainActivity.java
 




mXWalkView = (XWalkView) findViewById(R.id.activity_main);
mXWalkView.load("https://blueimp.github.io/jQuery-File-Upload/", null);


@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  mXWalkView.onActivityResult(requestCode, resultCode, data);

 
4、AndroidManifest.xml



<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />





android:hardwareAccelerated="true"

web app javascript hyper app basic



基本上 codova phonegap都是用webview裡面的addJavascriptInterfac 指定@JavascriptInterface 的java method,間接呼叫 回傳資料,達到和原生溝通


codova phone 等等都是包好,讓使用者方便使用,而且共同開發,讓呼叫 回傳 android 多版本能正常


ionic、titanic、react native 等等 為了在web app上速度更快或是對應呼叫 回傳時,開發速度更快

[轉]Android WebView 与 JavaScript 交互 AND Java

https://codemumbai.wordpress.com/android-webview-image-upload-solved/

http://maurizionapoleoni.de/blog/implementing-a-file-input-with-camera-support-in-android-with-crosswalk/

=====
https://mthli.github.io/Android-WebView-JavaScript


http://stackoverflow.com/questions/11544992/taking-a-picture-from-the-camera-fails-20-of-the-time


http://bluereader.org/article/165908253


http://www.mobile-open.com/2015/65366.html


http://www.flapjacksandcode.com/blog/2015/2/17/android-webviews-getusermedia-putting-it-all-together

http://lookintoandroid.blogspot.tw/2015/11/getting-camera-captured-image-in.html
=====
upload file
http://www.unknownerror.org/opensource/brandonsavage/Upload/q/stackoverflow/5907369/file-upload-in-webview




=====

用CrossWalk包的話,可以肯定是最新的chrome,保證在操作上的正常!但app會非常的肥大~~

再不然就不能事先說明android 5以上才能存取 camera, file upload

[轉]免费空间+便宜VPS和OpenResty,Ngx_lua,Redis搭建系统负载均衡环境

http://www.freehao123.com/vps-openresty-ngx_lua/

免费空间+便宜VPS+OpenResty +Ngx_lua +Redis高效系统负载平衡环境,经过测试,15美金的服务器能支持每天2-3万IP的访问量



免费空间、nginx、ngx_lua、Redis


[轉]网站服务器压力Web性能测试:Apache Bench,Webbench,http_load安装使用


http://www.freehao123.com/apache-bench-webbench/

http://www.freehao123.com/linux-vps-cpu/

website moeny

http://www.cj.com/

https://affiliate-program.amazon.com/

oneinstack 一键安装 lnmp

https://oneinstack.com/install/


=====
可另外裝  oneinstack/shadowsocks.sh install

image resize and fill color



http://deepliquid.com/projects/Jcrop/demos.php?demo=advanced




http://dbwebb.se/opensource/cimage

[轉]怎麼知道 SEO (關鍵字) 成效如何?

https://cola.workxplay.net/how-to-know-seo-is-working/





快查 SEO 成效

– Chrome 請登出 Google 帳號
– 請用無痕模式


你可以在 Google 查詢 site:你的網址
確認你的頁面被 Google 收錄(建立索引 / index)了沒.






(已經被收錄的網址)






[轉]SMO

https://cola.workxplay.net/what-is-smo-metatag/



FaceBook : Open Graph tags
https://developers.facebook.com/docs/sharing/webmasters#markup
最常見的 FB og /社群標籤,直接影響轉貼、分享於 FB 上的內容

小乾貨:有時修改了 og tag 內容,但是 FB 的分享畫面總是出現舊資料,這時可以試試 https://developers.facebook.com/tools/debug/ ,請 FB 重新抓取指定網址的資料。

=====

Twitter card info
https://dev.twitter.com/cards/types/summary個人愛用,雖然近期使用人數大減,但他的好處和優點很難用文字說明 XD ,除了 card info 的標籤官網也指出:我們也吃 og 標籤
https://dev.twitter.com/cards/getting-started#opengraph


=====

Google Plus / Google +
https://developers.google.com/+/web/snippet/你以為 Google plus 沒人用,那就虧大了!Google 的 搜尋結果頁超愛這味的!
上面的網址內也有提供產生器,讓非工程師也能簡單使用。

=====

MicroData JSON-LD
https://developers.google.com/schemas/formats/json-ld?hl=zh-TW這算是比較工程師層面的,把內容丟給你家工程師看吧
由入門的 MicroData (http://schema.org/) 延伸到較進階的 JSON-LD


====================



Google 提供的 https://developers.google.com/structured-data/testing-tool/ ,他能驗證、檢驗你設定的 tag 有沒有生效、正確



強大的 http://smo.knowem.com/ ,他能將所有常用、相關的 tag 分類列出,並且還能告訴你缺少了哪些


較可惜的 https://www.similarweb.com/website/,他可以取得目標網站的各種資料,關鍵字、連入/連出網站等,缺點就是想要更多資訊,就需要升級付費功能

大量email

http://mailchimp.com/pricing/entrepreneur/

https://sendgrid.com/pricing

turnkeylinux bitnami

https://www.turnkeylinux.org

php news records previous next

http://www.sitepoint.com/forums/showthread.php?645467-Retreiving-the-previous-and-next-row-through-PDO&p=4425809&viewfull=1#post4425809


SELECT
i.images_id
,COALESCE(
(SELECT images.images_id FROM images WHERE images.images_id < i.images_id ORDER BY images.images_id DESC LIMIT 1),
(SELECT images.images_id FROM images ORDER BY images.images_id DESC LIMIT 1)
) AS previous_images_id
,COALESCE(
(SELECT images.images_id FROM images WHERE images.images_id > i.images_id ORDER BY images.images_id ASC LIMIT 1),
(SELECT images.images_id FROM images ORDER BY images.images_id ASC LIMIT 1)
) AS next_images_id
FROM
images i
WHERE
i.images_id = 1



==========
for record, not for page

1、 get all new_id in array  (PDO fetchAll(PDO::FETCH_ASSOC) )

$all_news_ids = $crud->sql("select news_id from news");


2、get $now_news_id key for array

$now_news_id_key_id = array_search(array('news_id'=>$now_news_id), $ar_all_news_ids);


3、check $now_news_id_key_id first, if empty

$prive_news_id = empty($now_news_id_key_id)?"":get_record_column('news_id', $all_news_ids, $now_news_id_key_id+1);
$next_news_id = empty($now_news_id_key_id)?"":get_record_column('news_id', $all_news_ids, $now_news_id_key_id-1);



function get_array_column($val, $ar){
return array_key_exists($val, $ar)?$ar[$val]:"";
  }

function get_record_column($val, $ar, $rec_arrow=0){
return (isset($ar[$rec_arrow]))?get_array_column($val, $ar[$rec_arrow]) : "";
  }

[轉]網頁已死,兇手是 App

https://yowureport.com/%E6%89%93%E4%B8%8D%E9%81%8E%E5%B0%B1%E4%BB%BF%E6%95%88%EF%BC%8C%E8%A1%8C%E5%8B%95%E7%B6%B2%E9%A0%81%E7%AA%81%E7%A0%B4-app-%E7%94%9F%E6%85%8B%E5%A3%9F%E6%96%B7%E5%B1%80%E9%9D%A2/

[轉]工程師轉職商人的心路歷程 #1 - 這輩子成長最快的一年

好文

http://adz.cool/posts/711838-merchant-mentality-of-1-software-engineer-to-be-redeployed-fastest-growth-ever-year


couchbaselabs mini-hacks

https://github.com/couchbaselabs/mini-hacks


Important !!
channels-users-roles
https://github.com/couchbaselabs/mini-hacks/tree/master/channels-users-roles

=====

level-1:未註冊使用者(發文要核準)
level-2:註冊使用者(發文不用核準)
level-3:版主(可核準或取消)

程式動態新增role
藍線:建立role
綠線:回覆結果

.角色(Roles)和使用者(users) 是可以被授權 而訪問 Channels.
  使用者(users) 被附予角色(Roles),則可以 用角色的授權 進而訪問 Channels

channel(channelname)  有讀取權限
access(doc.owner, channelname);  給 寫入權限
requireUser(doc.owner) requireRole(doc.role)  也可以給 寫入權限
document content (using throw)  ???

讀和寫權限是分開的。
寫的權限完全是用sync function控制:除非sync function拒絕.........


Write
requireUser(username)  是否是該使用者(User)
requireRole(rolename)  是否有該角色(Role)
requireAccess(channels)  是否有該Channel


curl -vX POST -H 'Content-Type: application/json' \ --cookie 'SyncGatewaySession=d007ceb561f0111512c128040c32c02ea9d90234' \ :4984/db/ \ -d '{"type": "review", "role": "level-1", "owner": "jens"}'

 {"type": "review", "role": "level-1", "owner": "jens"}  =>

type => doc.type
role => doc.role
owner => doc.owner

So

doc.type    review
doc.role     level-1
doc.owner  jens

=====

curl -vX POST -H 'Content-Type: application/json' \ --cookie 'SyncGatewaySession=6e7ce145ae53c83de436b47ae37d8d94beebebea' \ :4984/db/ \
-d '{"type": "review", "role": "level-2", "owner": "andy", "restaurant_id": "123"}'

 So

doc.type    review
doc.role     level-2
doc.owner  andy
doc.restaturant_id  123


=====

curl -vX POST -H 'Content-Type: application/json' \ --cookie 'SyncGatewaySession=3a5c5a67ff67643f8ade175363c65354584429e9' \ :4984/db/ \ -d '{"type": "profile", "name": "william", "role": "level-3"}'

So

doc.type   profile
doc.name william
doc.role    level-3