Steps:
1. Open Virtual Network Editor

Felix 發表在 痞客邦 PIXNET 留言(0) 人氣()

Check out my new vm cloning article here.

VMware vSphere is the most robust virtualization solution today. Cloning a Virtual Machine(VM) in ESxi 5.1 is a feature of vCenter server. Out of the box vSphere free edition hypervisor does not support cloning. But there is an alternative way to clone a VM.

vSphere client version

vSphere client version

Felix 發表在 痞客邦 PIXNET 留言(0) 人氣()

There is a lot of buzz of VMware virtualization solution these days. No doubt that VMware is the number one virtualization solution provider in the industry. People who are new to VMware’s virtualization platform often get confused in getting to know about vSphere and its components. So today I will be explaining all about vSphere and its components. Folks face difficulty to know about major components of vSphere. It’s important to know the difference between vSphere, ESXi and vCenter. To get in-depth knowledge and experience of vSphere you can install vSphere inside VMware Workstation with little cost.

Difference between vSphere, ESXi and vCenter

VMware Inc. is a software company that develops many suite of software products specially for providing various virtualization solutions. There are many cloud productsdatacenter productsdesktop products and so on.

vSphere is a software suite that comes under data center product. vSphere is like Microsoft Office suite which has many software like MS Office, MS Excel, MS Access and so on. Like Microsoft Office, vSphere is also a software suite that has many software components like vCenter, ESXi, vSphere client and so on. So, the combination of all these software components is vSphere. vSphere is not a particular software that you can install and use, “it is just a package name which has other sub components”.

Felix 發表在 痞客邦 PIXNET 留言(0) 人氣()

The Web SQL Database API isn't actually part of the HTML5 specification but it is a separate specification which introduces a set of APIs to manipulate client-side databases using SQL.

I'm assuming you are a great web developer and if that is the case then no doubt, you would be well aware of SQL and RDBMS concepts. If you still want to have a session with SQL then, you can go through our SQL Tutorial.

Web SQL Database will work in latest version of Safari, Chrome and Opera.

Felix 發表在 痞客邦 PIXNET 留言(0) 人氣()

轉自 http://www.cnblogs.com/xiaoluo501395377/p/3430542.html

本篇隨筆將講解一下Android的多線程的知識,以及如何通過AsyncTask機制來實現線程之間的通信。

一、Android當中的多線程

Felix 發表在 痞客邦 PIXNET 留言(1) 人氣()

原創作品,允許轉載,轉載時請務必以超鏈接形式標明文章 原始出處 、作者信息和本聲明。否則將追究法律責任。http://liangruijun.blog.51cto.com/3061169/655014

    ToggleButton(開關按鈕)是Android系統中比較簡單的一個組件,是一個具有選中和未選擇狀態雙狀態的按鈕,並且需要為不同的狀態設置不同的顯示文本。

    ToggleButton常用的XML屬性

Felix 發表在 痞客邦 PIXNET 留言(0) 人氣()

要做一個Service要先了解,service無法自己啟動,必須要靠startService()才能啟動。

同樣的啟動後也必須要使用stopService()關閉。

在這邊需要注意的有幾點

1) startService()

2) stopService()

3) AndroidManiFest.xml增加service權限


第一點為開啟service必要條件,當然你要new一個intent

所以就是:

Intent intent = new Intent(MainActivity.this,service_class.class);
startService(intent);

MainActivity為你目前的class,service_class則是另外開的java檔(那邊則是寫service做的事情)


第二點跟第一點很類似,只有差在start / stop的差別

Intent intent = new Intent(MainActivity.this,service_class.class);
stopService(intent);

第三點就是你需要在Android ManiFest.xml裡面新增權限

否則跑起來會有

"

Unable to start service Intent: not found

"
這樣的錯誤訊息出現

好了,總結上面 MainActivity該如何寫?

package com.example.service_nonui_demo;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBar;
import android.support.v4.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.os.Build;

public class MainActivity extends ActionBarActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent intent = new Intent(MainActivity.this,service_class.class);
startService(intent);
}
@Override
public void onPause(){
super.onPause();
Intent intent = new Intent(MainActivity.this,service_class.class);
stopService(intent);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {

// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}

/**
 * A placeholder fragment containing a simple view.
 */
public static class PlaceholderFragment extends Fragment {

public PlaceholderFragment() {
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container,
false);
return rootView;
}
}

}

 

Felix 發表在 痞客邦 PIXNET 留言(0) 人氣()

Service的種類

  

按運行地點分類:

Felix 發表在 痞客邦 PIXNET 留言(0) 人氣()

之前提及過,啟動Service有兩種方式:startService 與 bindService。前者已經說過如何使用,所以,這篇貼子主要是關於 bind service的。 這裡所討論的是僅針對那些被綁定的service的,而那些既被startService() 又被 bindService() 的 service 不在此範圍內。

1 Bind Service就像是C/S架構中的服務端,其他組件(比如 Activity)綁定到它(通過 bindService()),可以向它發送請求,可以接受從它返回的響應,它甚至還提供了進程間通信(IPC)功能。

2 一個service要想能夠被其他組件綁定,那麼它的 onBind() 方法必須被實現,且必須返回一個 IBinder 對象,然後其他組件可以通過這個 IBinder 對象與該 service 進行通訊。

Felix 發表在 痞客邦 PIXNET 留言(0) 人氣()

不管是何種Service,它默認都是在應用程序的主線程(亦即UI線程)中運行的。所以,如果你的Service將要運行非常耗時或者可能被阻塞的操作時,你的應用程序將會被掛起,甚至會出現ANR錯誤。為了避免這一問題,你應該在Service中重新啟動一個新的線程來進行這些操作。現有兩種方法共大家參考:

1 直接在Service的onStartCommand()方法中重啟一個線程來執行,如:

Java代碼  收藏代码

Felix 發表在 痞客邦 PIXNET 留言(0) 人氣()

找更多相關文章與討論