Two boolean as one parameter value in function Java
boolean fc(boolean b) {
return b;
}// end fc
boolean bA = true;
boolean bB = true;
boolean bC = bA || bB; // true
bA = true;
bB = false;
bC = bA || bB; // true
bA = false;
bB = true;
bC = bA || bB; // true
bA = false;
bB = false;
bC = bA || bB; // false
if(!fc(bB||bA))
System.out.println("false"); // false
else
System.out.println("true");
396LW NO topic_id
AD
Další témata ....(Topics)
Hmotnost 160 g
Procesor 1.4 GHz Qualcomm Scorpion
Displej 800 x 480, 4.3 in. ClearBlack AMOLED capacitive touchscreen, 16m-color WVGA, Corning® Gorilla® Glass (odolný povrch)
Velikost displeje v palcích 4,3
Rozměry 128 x 68 x 11,5
Fotoaparát 8 Mpix, 3264x2448 pixelů, dual-LED flash, autofocus Carl Zeiss optika, 720p video capture
HD video, natačení videosekvencí, editace fotografií, přední kamera
Operační system Windows Phone 7
Datové funkce GPS modul, WiFi, Bluetooth, NFC, GPRS, EDGE, HSCSD
Přední kamera 1 Megapixel, 1280x720 pixelů
Připojení Bluetooth 2.1, 802.11b/g/n, dual mode A-GPS/GLONASS, micro-USB, 3.5mm audio jack, FM radio
Výhody svižný operační systém, editace MS Office dokumentů, napojení na cloudové uložiště SkyDrive (25GB prostoru zdarma), integrace sociálních sítí
Nevýhody v porovnání s Androidem méně aplikaci ke stažení zdarma
Procesor 1.4 GHz Qualcomm Scorpion
Displej 800 x 480, 4.3 in. ClearBlack AMOLED capacitive touchscreen, 16m-color WVGA, Corning® Gorilla® Glass (odolný povrch)
Velikost displeje v palcích 4,3
Rozměry 128 x 68 x 11,5
Fotoaparát 8 Mpix, 3264x2448 pixelů, dual-LED flash, autofocus Carl Zeiss optika, 720p video capture
HD video, natačení videosekvencí, editace fotografií, přední kamera
Operační system Windows Phone 7
Datové funkce GPS modul, WiFi, Bluetooth, NFC, GPRS, EDGE, HSCSD
Přední kamera 1 Megapixel, 1280x720 pixelů
Připojení Bluetooth 2.1, 802.11b/g/n, dual mode A-GPS/GLONASS, micro-USB, 3.5mm audio jack, FM radio
Výhody svižný operační systém, editace MS Office dokumentů, napojení na cloudové uložiště SkyDrive (25GB prostoru zdarma), integrace sociálních sítí
Nevýhody v porovnání s Androidem méně aplikaci ke stažení zdarma
// image from res/drawable
int resID = getResources().getIdentifier("my_image",
"drawable", getPackageName());
// view
int resID = getResources().getIdentifier("my_resource",
"id", getPackageName());
// string
int resID = getResources().getIdentifier("my_string",
"string", getPackageName());
If you change the package name, you have to add new package name in:
DictionaryProvider.java
Do not forget change package name in all java class and xml/searchable.xml
In my project I changed like this:
DictionaryProvider.java
public class DictionaryProvider extends ContentProvider {
String TAG = "DictionaryProvider";
// public static String AUTHORITY = "com.example.android.searchabledict.DictionaryProvider";
// change to your new package name
public static String AUTHORITY = "com.myweb.mysubdomen.searchabledict.DictionaryProvider";
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/dictionary");
// in AndroidManifest.xml
//change com.example.android to your package e.g. com.myweb.mysubdomen
<!-- Provides search suggestions for words and their definitions. -->
<provider android:name="com.example.android.searchabledict.DictionaryProvider"
android:configChanges="keyboard|keyboardHidden|orientation"
android:authorities="com.example.android.searchabledict.DictionaryProvider" />
<!-- Points to searchable activity so the whole app can invoke search. -->
<meta-data android:name="android.app.default_searchable"
android:configChanges="keyboard|keyboardHidden|orientation"
android:value=".SearchableDictionary" />
// I change like this:
<!-- Provides search suggestions for words and their definitions. -->
<provider android:name=".DictionaryProvider"
android:configChanges="keyboard|keyboardHidden|orientation"
android:authorities="cz.okhelp.android.searchabledict.DictionaryProvider" />
<!-- Points to searchable activity so the whole app can invoke search. -->
<meta-data android:name="android.app.default_searchable"
android:configChanges="keyboard|keyboardHidden|orientation"
android:value=".SearchableDictionary" />
Do not forget change package name in all java class and xml/searchable.xml
In my project I changed like this:
<searchable xmlns:android="//schemas.android.com/apk/res/android"
android:label="@string/search_label"
android:hint="@string/search_hint"
android:searchSettingsDescription="@string/settings_description"
android:searchSuggestAuthority="cz.okhelp.android.searchabledict.DictionaryProvider"
android:searchSuggestIntentAction="android.intent.action.VIEW"
android:searchSuggestIntentData="content://cz.okhelp.android.searchabledict.DictionaryProvider/dictionary"
android:searchSuggestSelection=" ?"
android:searchSuggestThreshold="1"
android:includeInGlobalSearch="true"
>
</searchable>
Try this code:
final String ERROR = "my error message....";
private class DownloadWebPageTask extends AsyncTask<String, Void, String> {
// some code and method ..... see AsyncTask
@Override
protected String doInBackground(String... urls) {
URL urlL = null;
try {
urlL = new URL(url);//"//chmi.cz..../"
HttpURLConnection urlConnection = null;
try {
urlConnection = (HttpURLConnection) urlL.openConnection();
InputStream in = new BufferedInputStream(urlConnection.getInputStream());
response = readStream(in);
return response;
} catch (IOException e) {
//throw new RuntimeException(e);
} finally {
if(urlConnection != null)
urlConnection.disconnect();
return ERROR;
}
} catch (MalformedURLException e) {
e.printStackTrace();
return ERROR;
}
}
return response;
}
private String readStream(InputStream is) {
try {
ByteArrayOutputStream bo = new ByteArrayOutputStream();
int i = is.read();
while(i != -1) {
bo.write(i);
i = is.read();
}
return bo.toString();
} catch (IOException e) {
return "";
}
}
Google Chrome and Shockwave Flash crashes on youtube.com
- open chrome://plugins/ with Google Chrome
- click on Plus button for more details
- find Flash (3 files)
- disable two other Shockwave Flash
- for more see image below
Editace: 2013-02-04 20:29:14
Počet článků v kategorii: 396
Url:two-boolean-as-one-parameter-value-in-function-java