PIXNET Logo登入

Felix's Second Life 電腦數碼世界

跳到主文



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

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 10月 23 週四 201421:57
  • How to Make a Domain User the Local Administrator for all PCs

 You can create GPO and link the GPO to domain or OU containing all the computers.
 

Step 1 : Creating a Security Group
(繼續閱讀...)
文章標籤

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

  • 個人分類:windows server
▲top
  • 10月 18 週六 201410:18
  • 解決 PHP/mySQL 資料庫讀取中文顯示亂碼或問號

解決 PHP/mySQL 資料庫讀取中文顯示亂碼或問號

發佈時間: 2011-01-09 週日

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

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

  • 個人分類:php
▲top
  • 9月 13 週六 201409:14
  • Linux 中用戶切換:su 和 su- 的使用 環境變量詳解

大部分Linux發行版的默認賬戶是普通用戶,而更改系統文件或者執行某些命令,需要root身份才能進行,這就需要從當前用戶切換到root用戶,Linux中切換用戶的命令是su或su -,下面就su命令和su -命令最大的本質區別給大家詳解一下:  
前者只是切換了root身份,但Shell環境仍然是普通用戶的Shell;而後者連用戶和Shell環境一起切換成root身份了。只有切換了Shell環境才不會出現PATH環境變量錯誤。su切換成root用戶以後,pwd一下,發現工作目錄仍然是普通用戶的工作目錄;而用su -命令切換以後,工作目錄變成root的工作目錄了。用echo $PATH命令看一下su和su - 以後的環境變量有何不同。以此類推,要從當前用戶切換到其它用戶也一樣,應該使用su -命令。 
打個比方:在普通用戶下輸入:
$pwd
/home/test (當前用戶目錄)
$su ******
 (輸入密碼)
#pwd (再次查看路徑)

/home/test (還是當前用戶目錄)
但是如果換成su -
的話結果如下:
$pwd

/home/test(當前用戶目錄)
$su -

****** (輸入密碼)
#pwd (再次查看路徑)

/root (切換到超級用戶目錄)
(繼續閱讀...)
文章標籤

Felix 發表在 痞客邦 留言(0) 人氣(2,422)

  • 個人分類:Linux
▲top
  • 9月 11 週四 201419:37
  • linux系統下,安裝phpmyadmin顯示一片空白

linux下打印錯誤報告 sudo tail /var/log/httpd/error_log
 
顯示如下錯誤:phpMyAdmin\libraries\php-gettext\gettext.inc on line 177Fatal error:
(繼續閱讀...)
文章標籤

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

  • 個人分類:Linux
▲top
  • 9月 11 週四 201417:15
  • 解決:配置虛擬主機,重啟apache,[warn] _default_ VirtualHost overlap on port 80, the first has precedence

很多第一次配置apache的虛擬主機的時候,以為配置第一個虛擬主機完成以後,以後就不會出現什麼問題了。
在配置第一個虛擬主機的時候,重啟apache的時候,都可能會遇到下面的問題:


 
[warn] _default_ VirtualHost overlap on port 80, the first has precedence
(繼續閱讀...)
文章標籤

Felix 發表在 痞客邦 留言(0) 人氣(1,761)

  • 個人分類:Linux
▲top
  • 8月 30 週六 201412:52
  • 佈局管理器 動態產生佈局 Layout

為了更好的管理Android應用的用戶界面裡的個組件,Android提供了佈局管理器,通過佈局管理器,Android應用的圖形用戶界面具有良好的平台無關性。這裡什麼叫平台的無關性呢?就是說不同手機。我們知道不同手機它們的屏幕的分辨率、尺寸並不完全相同,而Android的佈局管理器可以根據運行平台來調整組件的大小,而我們所需要做的就是選擇合適的佈局管理器。
 與Swing編程不同的是,Android的佈局管理器本身就是一個UI組件,所有的佈局管理器都是ViewGroup的子類:
 
 
(繼續閱讀...)
文章標籤

Felix 發表在 痞客邦 留言(0) 人氣(7,246)

  • 個人分類:Android 開發
▲top
  • 8月 30 週六 201412:02
  • Android 利用 addView 讓 Activity 動態加入多個 View 物件

在 Android 中,

你可以利用排版 View 的 addView 函數,

將動態產生的 View 物件加入到排版 View 中,

範例如下 :
(繼續閱讀...)
文章標籤

Felix 發表在 痞客邦 留言(0) 人氣(9,979)

  • 個人分類:Android 開發
▲top
  • 8月 30 週六 201410:17
  • Android 元件佈局 RelativeLayout

上一篇介紹過如何使用LinearLayout進行元件佈局,但是單靠一種排版方式,設計出來的介面並不豐富,所以Android也有提供其它的排版方式,本篇將介紹如何使用RelativeLayout(相對佈局)進行排版。其它的排版方式會陸陸續續的介紹!!



使用RelativeLayout進行元件佈局
(繼續閱讀...)
文章標籤

Felix 發表在 痞客邦 留言(0) 人氣(2,694)

  • 個人分類:Android 開發
▲top
  • 8月 30 週六 201410:14
  • [Android UI 設計] 版面布局Layout-LinearLayout

 
 

      每一個人第一次接觸到Android UI 設計時,第一個認識的ViewGroup應該都是LinearLayout,因為eclipse自動新增的專案預設就是以「android.widget.LinearLayout 」為主要的版面布局。
      LinearLayout是以你設定它的「android:orientation」屬性;值有:垂直(vertical)或水平(horizontal)兩種,用來排列所有的子元件。所有的子元件都被線性堆放在其它元素之後,因此一個設定垂直屬性的每一列只會有一個元件一直向下排列,而不管他們有多寬;而一個設定水平屬性的每一行只有一個元件一直向右排列(高度為最高子元件的高度加上邊框高度)。LinearLayout保持子元件之間的間隔以及互相對齊。




LinearLayout常用屬性





屬性名稱



描述





android:orientation



LinearLayout佈局的方向,可取horizontal(水平)和vertical(垂直)兩種排列方式





android:gravity



內部元件對於父元件的對齊方式





android:layout_weight



元件的分配大小的權值,數字越大分配越多








?









1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87



<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:background="#ff0"

    android:orientation="vertical" >

 

 

    <Button

        android:id="@+id/Button15"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_gravity="left"

        android:text="靠左" />

 

    <Button

        android:id="@+id/Button02"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_marginLeft="30dp"

        android:text="離左邊界30dp" />

 

    <Button

        android:id="@+id/Button01"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_gravity="right"

        android:text="靠右" />

 

    <Button

        android:id="@+id/Button03"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_gravity="center_horizontal"

        android:text="置中" />

 

    <LinearLayout

        android:layout_width="wrap_content"

        android:layout_height="match_parent"

        android:background="#cc0"

        android:orientation="horizontal" >

 

        <Button

            android:id="@+id/Button14"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="Button" />

 

        <Button

            android:id="@+id/button2"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="Button" />

 

        <Button

            android:id="@+id/Button11"

            android:layout_width="wrap_content"

            android:layout_height="80dp"

            android:text="以我為列高" />

 

        <LinearLayout

            android:layout_width="100dp"

            android:layout_height="match_parent"

            android:background="#f0f"

            android:orientation="vertical" >

 

            <Button

                android:id="@+id/button1"

                android:layout_width="wrap_content"

                android:layout_height="wrap_content"

                android:text="Button" />

 

            <Button

                android:id="@+id/Button16"

                android:layout_width="wrap_content"

                android:layout_height="wrap_content"

                android:text="Button" />

 

            <Button

                android:id="@+id/Button17"

                android:layout_width="wrap_content"

                android:layout_height="wrap_content"

                android:text="Button" />

 

        </LinearLayout>

    </LinearLayout>

</LinearLayout>





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

Felix 發表在 痞客邦 留言(0) 人氣(12,562)

  • 個人分類:Android 開發
▲top
  • 8月 30 週六 201408:33
  • Android 從媒體櫃Gallery 選擇圖片

To fetch images on SD Card.Uri will be
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI
onActivityResult method:
protectedvoid onActivityResult(int requestCode,int resultCode,Intent intent)
{super.onActivityResult(requestCode, resultCode, intent);
if(resultCode == RESULT_OK)
{
Uri photoUri = intent.getData();
if(photoUri !=null)
{
try
{Bitmap bitmap =MediaStore.Images.Media.getBitmap(this.getContentResolver(), photoUri);
//Now you can upload this bitmap to server or do something else.
}catch(Exception e)
{
e
.printStackTrace();
}
}
}
}
(繼續閱讀...)
文章標籤

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

  • 個人分類:Android 開發
▲top
«1...34553»

參觀人氣

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

熱門文章

  • (3,981)批量txt 繁簡轉換 ConvertZ v8.02 多国语言版
  • (51,909)mhdd中文說明完整版
  • (212)什么是注册商标标记“TM”代表什么意思?
  • (122)linux像老婆windows像妓女-
  • (3,333)Symantec Ghost Solution Suite v2.0(Ghost 企業版)
  • (802)fcitx配置 说明文档(中文PDF文档)
  • (26,371)賭場實用英語教學!
  • (1,682)Your Uninstaller! 2008 PRO v6.1.1236 免安裝破解版
  • (13,632)按鍵精靈(QMacro)6.71 綠色免安裝破解簡體版
  • (8,200)開機還原光碟片GHOST的製作

AdSense Search BLOG 內文

標題搜尋

文章分類

  • Raspberry Pi (1)
  • postgresql (1)
  • 數據分析 (1)
  • 網絡安全 (6)
  • windows server (5)
  • Android 開發 (30)
  • HTML5 (7)
  • Esxi 5.1 (4)
  • 手機 (16)
  • MySQL (2)
  • Java (5)
  • php (18)
  • 網頁相關 (29)
  • windows 光碟制定、封裝 (14)
  • 網路文學 (8)
  • Economics (42)
  • Linux (86)
  • c++ (19)
  • Software for Windows (76)
  • 電腦雜項 (86)
  • 生活瑣事 (5)
  • Microsoft (52)
  • 未分類文章 (1)

clustrMaps

pixnet

pixGoogleAdsense1

pixGoogleAdsense2