部落格文章訂閱


貧窮不能等,因為時間久了,你就會貧窮習慣了;
夢想不能等,因為努力晚了,人老就無能為力了;
學習不能等,因為懂得少了,就沒本事夢想成真了;
健康不能等,因為身體垮了,人生的一切就都沒了。


自訂搜尋

找不到想要的文章嗎? 請直接再下面的搜尋框裡輸入要查詢文章內容關鍵字 ,就能夠更快速的取得想要閱讀的問題喔~~謝謝大家的支持與愛護~若有任何建議事項, 歡迎透過留言板留言給我喔!!


  • 你不能決定生命的長度,但可以控制它的寬度;
  • 你不能左右天氣,但可以改變心情;
  • 你不能改變容顏,但可以展現笑容;
  • 你不能控制他人,但可以掌握自己;
  • 你不能預知明天,但可以利用今天;
  • 你不能樣樣勝利,但可以事事盡力。

free counters

目前分類:Java程式設計 (6)

瀏覽方式: 標題列表 簡短摘要

Quick tutorial shows you how to install Android Studio, a new Android development environment developed by Google and based on IntelliJ IDEA, via PPA in Ubuntu 14.10, Ubuntu 14.10, Ubuntu 12.04 and the next Ubuntu 15.04.

Similar to Eclipse with the ADT Plugin, Android Studio provides integrated Android developer tools for development and debugging.

On top of the capabilities you expect from IntelliJ, Android Studio offers:

  • Gradle-based build support.
  • Android-specific refactoring and quick fixes.
  • Lint tools to catch performance, usability, version compatibility and other problems.
  • ProGuard and app-signing capabilities.
  • Template-based wizards to create common Android designs and components.
  • A rich layout editor that allows you to drag-and-drop UI components, preview layouts on multiple screen configurations, and much more.
  • Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine as server-side components.

Install Android Studio via PPA in Ubuntu:

Installing Android Studio in Ubuntu becomes easy. A Ubuntu PPA contains simple script that automatically downloads and installs the latest release from Google download server. So far, Ubuntu 15.04, Ubuntu 14.10, Ubuntu 14.04, and Ubuntu 12.04 are supported.

文章標籤

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

如何知道某個字元在一串文字裡出現幾次 ?

public static int NumberOfKeywords(String strKeywords, String strkey){
int spcount =0;
String strTmp = "";

文章標籤

Frank 發表在 痞客邦 留言(2) 人氣()

The following JavaScript is used to detect the Internet Explorer version 8, 7 or 6. It’s returned -1 if the browser is not Internet Explorer.

function getInternetExplorerVersion()
// Returns the version of Windows Internet Explorer or a -1
// (indicating the use of another browser).
{
   var rv = -1; // Return value assumes failure.
   if (navigator.appName == 'Microsoft Internet Explorer')
   {
      var ua = navigator.userAgent;
      var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
      if (re.exec(ua) != null)
         rv = parseFloat( RegExp.$1 );
   }
   return rv;
}
function checkIEVersion()
{
   var msg = "You're not using Windows Internet Explorer.";
   var ver = getInternetExplorerVersion();
   if ( ver> -1 )
   {
      if ( ver>= 8.0 )
         msg = "You're using Windows Internet Explorer 8.";
      else if ( ver == 7.0 )
          msg = "You're using Windows Internet Explorer 7.";
      else if ( ver == 6.0 )
          msg = "You're using Windows Internet Explorer 6.";
      else
          msg = "You should upgrade your copy of Windows Internet Explorer";
    }
   alert( msg );

Reference

http://msdn.microsoft.com/en-us/library/cc817582.aspx

http://www.mkyong.com/javascript/how-to-detect-ie-version-using-javascript/


文章標籤

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

Q: How to get Minimum or Maximum value in Java array?

A: 

public static int getMaxValue(int[] numbers){

int maxValue = numbers[0];

文章標籤

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

Java如何取得營幕寬度? 

import java.awt.Toolkit;
import java.awt.Dimension;
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();

文章標籤

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

Question:

I'm new to Java but not to programming (I normally code in Ruby). One thing I've seen in Java code examples is the use of <> instead of () to pass params to an object. Below is a code example (taken from a Google Web Toolkit tutorial):

publicvoid onValueChange(ValueChangeEvent<String> event){
String token = event.getValue();
文章標籤

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