w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to enable forward compatibility on a reusable .NET library?
Have you thought about another custom assembly with the missing items in it? Then you test if a type/method exists (that would only exist in .net 4.5) and if it does, you load the assembly in. That way you can keep the exact same methods and classes, and save yourself pain of doing all of that crazy emit (not to mention the perf hit you will take if you find yourself doing that much).

Categories : C#

How do I enable perfect forward secrecy by default on Apache?
From my own understanding, you need to activate SSLHonorCipherOrder and to prepend SSLCipherSuite with ECDHE and DHE ciphers from openssl ciphers -v From my /etc/apache2/mods-available/ssl.conf: SSLHonorCipherOrder on SSLCipherSuite ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA:DHE-RSA-CAMELLIA128-SHA:AES128-SHA:RC4-SHA:HIGH:!aNULL:!MD5:!ADH To test your website, you can use: https://www.ssllabs.com/ssltest Note: Eliptic Curve DHE only seems to work with Apache 2.3.3 or higher (see source and Bruno's comment).

Categories : Apache

Unable to pause/forward/backward video using mediacontroller in android
Finally I found a solution... In some LG devices, by defaultly controls are disabled in VideoView. So we have to explicitly enable them by Overriding the below functions in VideoView: @Override public boolean canSeekForward() { return true; } @Override public boolean canSeekBackward() { return true; } @Override public boolean canPause() { return true; }

Categories : Android

This result is a forward only result set, calling rewind() after moving forward is not supported - Zend
You receive this Exception because this is expected behavior. Zend uses PDO to obtain its ZendDbResultSetResultset which is returned by ZendDbTableGatewayTableGateway. PDO result sets use a forward-only cursor by default, meaning you can only loop through the set once. For more information about cursors check Wikipedia and this article. As the ZendDbResultSetResultset implements the PHP Iterator you can extract an array of the set using the ZendDbResultSetResultset:toArray() method or using the iterator_to_array() function. Do be careful though about using this function on potentially large datasets! One of the best things about cursors is precisely that they avoid bringing in everything in one go, in case the data set is too large, so there are times when you won't want to put it all i

Categories : PHP

Making an iOS and Android app that will only show a specified webpage and have the option to include forward/back buttons
This would be quite easy using UIWebView (on iOS)... define your webview inside let's say the main UIViewController UIWebView *webView = [UIWebView alloc]init]; webView.delegate = self [webView loadHTMLString:@"yoursite.com" baseURL:nil] on the delegate you should implement - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { if(request.url.absoluteString isEqualToString:@"any of the strings you want") { return YES; } else { [[UIApplication sharedApplication] openURL:request.url] return NO; } } code is actually not tested but something by this idea should work on iOS... i only can help you with the iOS part though... hope this helps you... PS: to use the back and

Categories : Android

how to enable trace in android 4.3 as in android 4.2
From the Official Doc. Systrace events for apps Android 4.3 adds the Trace class with two static methods, beginSection() and endSection(), which allow you to define blocks of code to include with the systrace report. By creating sections of traceable code in your app, the systrace logs provide you a much more detailed analysis of where slowdown occurs within your app. For information about using the Systrace tool, read Analyzing Display and Performance with Systrace.

Categories : Android

How can I enable zoom on Android?
What version of Android? Android 2.2 doesn't support the viewport meta-tag, if your version is between 2.3.x and 4.x try this: <meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=yes" /> Hope this helps.

Categories : Android

How to enable SQLITE_ENABLE_UPDATE_DELETE_LIMIT in android?
how can I enable this option in the Android? You compile your own SQLite using the NDK and add this parameter to make the SQLite database support LIMIT on UPDATE and DELETE statements. Then, you write your own set of wrapper classes to access your custom SQLite library. This will be very complex; it will be far simpler for you to find some other solution to whatever problem you are trying to solve by using LIMIT in this fashion.

Categories : Android

How to enable USB debugging in Android?
Toggle on "USB Debugging" in the "Developer Options" area of Settings. If you do not see "Developer Options", go into "About device" in Settings and tap on the "Build number" entry seven times, which will unlock "Developer Options".

Categories : Android

How to enable 3G by a button - android
hi! you just have to call the function inside the onClickListener of each button and let the function run in a separate thread! On Button: btOn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Toast.makeText(MainActivity.this,"Trying to switch on 3G!",Toast.LENGTH_SHORT).show(); (new Thread(new Runnable() { @Override public void run() { setMobileDataEnabled(MainActivity.this,true); runOnUiThread(new Runnable() { @Override public void run() { Toast.makeText(MainActivity.this, "Switched ON 3G!", Toast.LENGTH_SHORT).

Categories : Java

Enable camera settings -- android
if you are talking about Camera.Parameters when you say settings, yes of course you can. All possibilities are listed here: http://developer.android.com/reference/android/hardware/Camera.Parameters.html You will have to write your own user interface to get the desired parameters and pass them to the camera-objekt before you start a preview.

Categories : Android

How to enable certain Internet connection in Android app?
I'm not sure you can do this programatically within the app but you can present the user with a button to open wireless settings so they can enable/disable one or the other. That's covered here: Ask user to start WiFi or 3G on launching an android app if not connected to Internet Also, it is possible to restrict apps from using mobile data and force them to use only WiFi in the Android settings menu. Go to Settings -> Data Usage -> Select the app -> Restrict Background Data. This will only allow the app to use WiFi data and the restriction is at the OS level. I hope these help!

Categories : Android

Disable and enable view android
Yes you can switch between the receivers of touch events by returning false in your onTouchEvent, this should propagate event to the next view. UPD: The code should be something like this: @Override public boolean onTouchEvent(MotionEvent event) { if (!isTouchable) return false; // your DrawerView logic } where isTouchable is a boolean variable which should be false is you don't want to draw on your view and true if you want to draw.

Categories : Android

How to enable cookies in android webview?
CookieManager.getInstance() is the CookieManager instance for your entire application. Hence, you enable or disable cookies for all the webviews in your application. Normally it should work if your webview is already initialized: http://developer.android.com/reference/android/webkit/CookieManager.html#getInstance() Maybe you call CookieManager.getInstance().setAcceptCookie(true); before you initialize your webview and this is the problem?

Categories : Android

How to enable VideoView TouchListener Android?
Put your videoview in linearlayout and intialize it and use like below code: LinearLayout linearLayoutLiveVideo; linearLayoutLiveVideo.setOnTouchListener(new OnTouchListener(){ public void onTouchEvent(MotionEvent event) { Log.d(TAG, "onTouch entered"); //your play pause code } });

Categories : Android

Enable accessibility service on android
As far as I know you can only take them to the list of accessibility services. You cannot automate much of the accessibility stuff because of the implications it has. So you are automating it as far as you can.

Categories : Android

Auto enable Wi-fi Location in Android 4.2.x
But Can I do it with Pragmatically to directly Enable without prompt any dialog? Fortunately, no, for obvious privacy and security reasons. Below link is work with GPS Satelitte option Fortunately, most Android devices are not affected by this security flaw.

Categories : Android

How to enable the GPS location in android webview?
You need to begin requesting GPS updates in the code. LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE); LocationListener locationListener = new LocationListener() { public void onLocationChanged(Location location) { // Called when a new location is found by the location provider. } } locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 1000, locationListener); You can then take the GPS values that you receive and pass them yo the webview through the URL

Categories : Android

Enable Android System Touch Sounds
I think u are missing permission for this . Add all the following permissions. public static final String MODIFY_AUDIO_SETTINGS Constant Value:android.permission.MODIFY_AUDIO_SETTINGS" public static final String WRITE_SETTINGS Constant Value: "android.permission.WRITE_SETTINGS"

Categories : Android

enable voice/audio over ip webcam android
Write to a Socket. One thing, you could do is to get the AudioRecorder class to stream to a LocalSocket. This way as and when you have bytes flowing in from the AudioRecorder, they're pushed to LocalSocket. Can someone improve upon my answer, I've just seen this done before, never really tried it myself. PS: The class names here are from memory, might be a little off on that.

Categories : Android

Radio Button In Android Enable and Disable
findViewById(R.id.buttonEng).setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { Button btnEng=(Button)findviewById(R.id.btnEng); btnEng.setEnabled(false); } }); Is this what you asked for? If yes, then that's the code. Then just re-enable it when the other buttons are clicked.

Categories : Java

Enable GPS programmatically in android 4.1 or heigher version
You can check this code .It is working for me.. import android.net.Uri; import android.provider.Settings private void turnGPSOn() { String provider = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED); if(!provider.contains("gps")) { final Intent poke = new Intent(); poke.setClassName("com.android.settings", "com.android.settings.widget.SettingsAppWidgetProvider"); poke.addCategory(Intent.CATEGORY_ALTERNATIVE); poke.setData(Uri.parse("3")); sendBroadcast(poke); } }

Categories : Android

Enable and Disble Listview with Some Condition in Android
if(yourcheckbox.isChecked()){ yourlistview.setClickable(true);} else{ yourlistview.setClickable(false);} You can run this as a background process, in a separate thread so it keeps getting checked, whether the checkbox is checked or not.

Categories : Android

Android: Ask user to either enable wifi or quit app
May this link can help you : 1 2 best of luck !

Categories : Android

Code to Enable dataconnection in Android 4.0.4 Tablet in Background
You need to have the instance of IConnectivityManager class from the connectivityManager object and then use the setMobileDataEnabled() method on the iConnectivityManager instance. Try the code below (tested on Galaxy Y (2.3) and Nexus 4 (4.2)) : public void cellularState(boolean shouldEnable) { ConnectivityManager conman = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); try { Class<?> conmanClass = Class.forName(conman.getClass().getName()); Field iConnectivityManagerField = conmanClass.getDeclaredField("mService"); iConnectivityManagerField.setAccessible(true); Object iConnectivityManager = iConnectivityManagerField.get(conman); Class<?> iConnectivityManagerClass = Class.forName(iConnectivityMan

Categories : Android

Android disable/enable Wifi and Bluetooth permanently
Just 5 minutes more got me the on the right track... the problem with my approach above is, that i wait listen to turning off / on. It seems that if i disable the bluetooth while it is just turning on, it will just continue to turn on and stay on. So i have to wait until it is actually turned on and then disable it. In other words, i had to remove 8 characters and it works fine: public void onReceive(final Context context, final Intent intent) { // get new wifi state final int bluetoothState = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.STATE_ON); final BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); // if enabling, check if thats okay if (bluetoothState == BluetoothAdapter.STATE_ON && BT_FORCE_DISABLE) {

Categories : Android

Enable Android Preference Item programmatically in Java
This method is deprecated, because it is irrelevant to a fragment-based activity: This method was deprecated in API level 11. This function is not relevant for a modern fragment-based PreferenceActivity. However, if you decide to build your PreferenceActivity without fragments, it is perfectly fine for you to use this method (You have to use it, to be honest). If you do want to use fragments, read more about them in PreferenceActivitys here.

Categories : Android

Enable/disable GPS and toggle the icon in the status bar - android
Fortunately, these script-kiddie hacks have not worked in quite some time. You are welcome to lead the user to the Settings screen where they can enable or disable GPS, by means of starting an ACTION_LOCATION_SOURCE_SETTINGS activity.

Categories : Android

Enable and Disable Airplane Mode successively Android
Replace the onClick method with this: public void onClick(View v) { // check current state first boolean state = isAirplaneMode(); // toggle the state final Handler handler = new Handler(){ @Override public void handleMessage(Message msg) { toggleAirplaneMode(!state); super.handleMessage(msg); } }; Thread th = new Thread() { @Override public void run() { toggleAirplaneMode(!state);

Categories : Android

Enable "Use network-provided values" programatically in android
You are looking for Settings.System.AUTO_TIME settings (which was moved to Settings.Global.AUTO_TIME in API level 17). Before API level 17 was introduced you could both read and change that value, but now this value is read-only for non-system apps. private boolean isAutoTimeEnabled() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { // For JB+ return Settings.Global.getInt(getContentResolver(), Settings.Global.AUTO_TIME, 0) > 0; } // For older Android versions return Settings.System.getInt(getContentResolver(), Settings.System.AUTO_TIME, 0) > 0; }

Categories : Android

Android App crashed OnResume() after request for Enable Bluetooth
I think the problem is that you need to move all of that code after starting the Activity to your onActivityResult() which I don't see in your code. When you use startActivityForResult() then after the Activity finishes that was called, your calling Acitvity's startActivityForResult() will run. So, your onResume() will run through even after you call that. So do something like protected void onActivityResult(int requestCode, int resultCode, Intent data) { BluetoothDevice device = btAdapter.getRemoteDevice(address); try { btSocket = device.createRfcommSocketToServiceRecord(MY_UUID); } catch (IOException e) { AlertBox("Fatal Error", "Failed to create socket" + e.getMessage() + "."); } ... } Activity

Categories : Android

How to map Microsoft Visual Studio 2012 forward/back buttons to mouse forward/back buttons?
Found a nice Mouse navigation extension. Not sure if it only works exclusively on 2012, but it does work on 2012. http://visualstudiogallery.msdn.microsoft.com/87fb8c65-d1db-49e9-a068-d62a222a4ae7 If anyone interested in the link for the info I found on 2010 stuff, here it is: How do I edit Visual Studio's mouse shortcuts?

Categories : Visual Studio 2012

Enable two-finger zoom in InChart mode of TeeChart for Android
I understand you want to use pinch gesture to make the chart rescale the axes, right? The problem here is that, between the start and the end of the pinch gesture, each time the device detects a movement in one of your fingers. And, if we rescale and repaint the chart each time a movement is detected, we'll repaint the chart many times, slowing the process. In some versions of TeeChart there's a special Zoom style that plays with images to do this zoom effect, making it faster. But I'm afraid this style isn't available in TeeChart Java for Android yet.

Categories : Android

Enable back button when return from facebook.com, phonegap android
Don't forget to call the "deviceready" event. From phonegap doc : This is a very important event that every Cordova application should use. Cordova consists of two code bases: native and JavaScript. While the native code is loading, a custom loading image is displayed. However, JavaScript is only loaded once the DOM loads. This means your web application could, potentially, call a Cordova JavaScript function before it is loaded. The Cordova deviceready event fires once Cordova has fully loaded. After the device has fired, you can safely make calls to Cordova function. Try something like this : var deviceReady = false; document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { deviceReady = true; } function f_click(url,

Categories : Android

howto enable android tether on boot with init.d script
This answer may help you better, although for me it didn't work, probably because of some missing parameters. If you succeeded please post the solution.

Categories : Android

how do you enable php to enable to make http calls
The thing is that fsockopen is used for opening socks (i.e connect to the specified port on the specified host/IP). When you try to open sock to the host "http://google.com" it is like running "ping http://google.com" - you will get an error - as there is no such host "http://" What you shout do is use http_get or curl <?php $response = http_get("http://www.example.com/", array("timeout"=>1), $info); print_r($info); ?> or remove the "http://" <?php $fp = fsockopen("www.example.com", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br /> "; } else { $out = "GET / HTTP/1.1 "; $out .= "Host: www.example.com "; $out .= "Connection: Close "; fwrite($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($

Categories : PHP

How to enable delete button on android table row view when left-to-right swipe?
Such option is called FLING in android... Check is sample: https://github.com/krishjlk/android-listview-swipe-delete-example-sample-tuorial May help EDIT : private class GestureListener extends SimpleOnGestureListener { @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { System.out.println("UFFFFF"); if (e1.getX() - e2.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { System.out.println("Right to left"); return false; // Right to left } else if (e2.getX() - e1.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { System.out.println("Left to

Categories : Android

How can apply superadmin permissions to handle enable/disable events for GPS in Android App
use these permissions in manifest file <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Categories : Android

dynamically enable/disable hide/unhide Android ActionBar action icon
Have a look at this, it shows how to change menu items at runtime. http://developer.android.com/guide/topics/ui/menus.html#ChangingTheMenu You could for example save the menu as a member variable of your Activity inside onCreateOpionsMenu() and then do something like this: MenuItem item = mMenu.findItem(R.id.addAction); item.doSomething() when you want to change something on a specific menu item.

Categories : Android

How to disable and enable icons based on zoom level in android google maps v2.?
I got it by using bellow code: private void listenOnCameraChange() { googleMap.setOnCameraChangeListener(new OnCameraChangeListener() { @Override public void onCameraChange(CameraPosition position) { Set<Entry<Marker, MarkingInfo>> entrySetmarkers.entrySet(); for (Entry<Marker, MarkingInfo> entry : entrySet) { Marker marker = entry.getKey(); MarkingInfo markingInfo = entry.getValue(); if (markingInfo.getZoomlevel() <= position.zoom) { marker.setVisible(true); } else { marker.setVisible(false); } } } }); }

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.