w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to get RSS feeds updates on my android application without sending requests to the server continuously
You generally write a server side component for this. The server polls the RSS feed regularly, often triggered by a cron job or the like. Clients register for push messages with the server. The server sends them push messages on update. See GCM for Android's implementation of push: http://developer.android.com/google/gcm/index.html

Categories : Android

Shared HTML page that updates for all users
You may want to look into WebSockets. In particular, if you're open to new technologies, I know that the Socket.io library for Node.js is really good for realtime web interfaces. You won't need to do anything with polling, it is all event-based, and your data should change immediately. It also has some really nice tutorials available across the web: Good beginners tutorial to socket.io? Socket.io official how to use page Official Wiki Real Time Chat With NodeJS, Socket.io and ExpressJS

Categories : PHP

How to save Image in shared preference in Android | Shared preference issue in Android with Image
I solved your problem do something like that: Write Method to encode your bitmap into string base64- // method for bitmap to base64 public static String encodeTobase64(Bitmap image) { Bitmap immage = image; ByteArrayOutputStream baos = new ByteArrayOutputStream(); immage.compress(Bitmap.CompressFormat.PNG, 100, baos); byte[] b = baos.toByteArray(); String imageEncoded = Base64.encodeToString(b, Base64.DEFAULT); Log.d("Image Log:", imageEncoded); return imageEncoded; } Pass your bitmap inside this method like something in your preference: SharedPreferences.Editor editor = myPrefrence.edit(); editor.putString("namePreferance", itemNAme); editor.putString("imagePreferance", encodeTobase64(yourbitmap)); editor.commit(); And when you want to display your image

Categories : Android

how to check an items stored in a shared preference if it is equal to a new entry to this shared preference
U can get It firstly what u have already stored in SharedPreference. String oldUser=spe.gettString("userName",name); String oldpass= spe.getString("password",pass); String oldId= spe.getString("userId",Id); Now, comapre them with new values as per your requirement: e.g: if(Id.equalsIgnoreCase(oldId)) { //it contains } else {}

Categories : Android

Titanium iPhone store variable value in shared preference
The App Properties module is used for storing application-related data in property/value pairs that persist beyond application sessions and device power cycles. Examples Store a property Store a string property. Ti.App.Properties.setString('givenName', 'Paul'); Ti.API.info('The value of the givenName property is: ' + Ti.App.Properties.getString('givenName')); More.

Categories : Javascript

shared preference issue not update
Replace SharedPreferences sharedPref = getSharedPreferences("account", Context.MODE_WORLD_READABLE); For SharedPreferences sharedPref = getSharedPreferences("account", MODE_PRIVATE); Hope this helps

Categories : Android

Trying to update a record, but the update code only updates one of the timestamp fields and nothing else
In your Page_Load (where you put the information from your datasource into the TextBoxes, etc) you need to wrap the databinding code in a If(Page.IsPostBack) block. So your code should look something like this: protected void Page_Load (object sender, EventArgs e) { if(!Page.IsPostBack) { // Whatever you use to load the data from the database into // your server controls goes here loadData(); // example } } This is why you're not getting the updated information - your markup elements are being reloaded from the database before your Update code has a chance to run.

Categories : C#

how to know how many shared preference in shared preferences in android
Not sure if you are looking to something like this . If it is just the size then you can just do a SharedPreferences pref = getSharedPreferences(<NAME>, <MODE>); pref.getAll().size();

Categories : Android

Web Application Updates: Caching old app
Have you tried using cache-headers plugin? It can help you to control how the browser cache your contents here

Categories : HTML

Receiving status updates from cmd application
You need to use the OutputDataRecieved event to handle the redirected output. Add these lines after reciever.Start() receiver.OutputDataReceived += receiver_OutputDataReceived; receiver.BeginOutputReadLine(); and then add the event handler void reciever_OutputDataReceived(object sender, DataReceivedEventArgs e) { ... } More information can be found here http://msdn.microsoft.com/en-us/library/system.diagnostics.process.outputdatareceived.aspx

Categories : C#

update mysql as user updates textbox value
You need something like this: $q= "update student set name = '".$name."', age = '".$age."', phone = '".$phone."', address = '".$address."', hobby = '".$hobby."' WHERE user = 'the user id'"; You should use a WHERE statement as well like the above example so that you can be sure that you are updating the correct row. You should also consider using mysql_real_escape_string function: $name = mysql_real_escape_string($_POST['name']); http://php.net/manual/en/function.mysql-real-escape-string.php If this will be an updating form you should also include the value in the input fields and etc. so they will see the values and update what they need. I also suggest that you use mysqli functions instead of mysql functions as mysql is no longer supported and deprecated.

Categories : PHP

Attempting to update combo box updates table instead?
This is dancing along the lines of an answer and a comment, but my comment was getting long and I like formatting, so I'm posting it. At a glance, you should use unbound controls for your filtering boxes (the machine and complex). The record source for your form (assuming machine table data, you could tailor it to whatever you want) could be bound to something like : SELECT * FROM machine WHERE complexID = [Forms]![myForm]![cboComplex] AND Machine = [Forms]![myForm]![cboMachine] You could form.requery on update of those boxes. Or you could have it more generic like Select * FROM Machine and just set your form's Filter property after update of your Machine combobox. So in after update of your combo box (you could filter each one individually, or assume / require selections from each

Categories : Vba

UPDATE using subqueries - Updates more than the needed records
Your problem is that you're doing an update of ALL records with RequestId = 3. Take into account that your subquery result is 3 so you end up updating all related records. Your query is equivalent to do UPDATE Workflow_Txn SET Status = 1 WHERE RequestId = 3 Not sure if you have any reason to make your query more complex than it needs to be. Seems to me that something simpler would do the trick UPDATE Workflow_Txn SET Status = 1 WHERE [OrderNumber] < (SELECT MAX(OrderNumber) FROM Workflow_Txn WHERE RequestId = 3) AND RequestId = 3

Categories : SQL

MySQL UPDATE only updates integers, not strings
Try escaping the variables: mysql_query("UPDATE $table SET '".$column."'='".$value."' WHERE id='".$userID.'", $con); Please stop using mysql_* functions as well, you code is easily hackable (you did not sanitize your $_POST values). Begin using mysqli_* or PDO asap, because what you're using is deprecated code. Basically, you're allowing raw input into your server (client side checks can be circumvented by disabling javascript) and that is incredibly bad.

Categories : Javascript

Update panel, postbacks and failed updates
You need to pass the ClientID of the UpdatePanel window.setInterval(function() { __doPostBack("<%=line2Sched.ClientID%>", ''); }, 3000); ASPX: <asp:UpdatePanel ID="line2Sched" runat="server" UpdateMode="Conditional" OnLoad="litL2Sched_ResetTable" > <ContentTemplate> <asp:Literal runat="server" ID="litL2Sched" ></asp:Literal> <asp:Button runat="server" ID="btnL2Refresh"/> </ContentTemplate> </asp:UpdatePanel> <script type="text/javascript"> function postBacks() { __doPostBack("<%=line2Sched.ClientID %>", null); } var oUpdatePanels = setInterval(postBacks, 1000); </script> Code Behind: protected void Page_Load(object sender, EventArgs e) { } protected void litL2Sched_ResetTab

Categories : C#

Check for Updates functionality For Windows application
I don't think there is any facility to add that feature through install shield but there is a software update framework for .NET called NetSparkle. You can try that if you want. If you want to implement something on your own then its better to some other websites like code project that provide startup code or similar projects. Here 's the link for NetSparkle. There is also a similar question on StackOverflow : Code to check for updates, install new version of app

Categories : C#

Node.js callback with MongoDB update never returns although it updates DB
I think that you misunderstand how async.series works. Your functions in async.series don't take callback as an argument and they don't call it. And that request(...) stuff is probably not a function at all. That's probably why it breaks async loop. Try this: async.series( [ function(callback) { // <--- missing callback log('starting'); db.connect('mongodb://127.0.0.1:27017/test', function(err, base){ if(err) throw err; db = base; callback(); // <--- missing callback }); }, function(callback) { // <--- missing function with callback request(website, function(err,resp,body) { start(err, resp, body, callback);

Categories : Node Js

How do I get updates to cascade between to related DataRow objects on update?
You want to add this line: ds.Tables["Child"].Constraints.Add( new ForeignKeyConstraint( ds.Tables["Parent"].Columns["id"], ds.Tables["Child"].Columns["parent_id"] ) ); See, though you have these constraints setup at the database level, you need to build this constraint so that the id field is cascaded down to the parent_id field after it gets back from the database.

Categories : C#

Update a record in table1 if table2 has updates (MySQL)
what is relation between that 2 tables, i assume that table1.id with table2.id. update table1 set books_rented=(select count(*) from table2 where user_id=id) Please try this at your dev machine first.

Categories : Mysql

Make sure the Android application was installed from Play-Store
The best way I've found to know if an app is from Play Store is what g00dy suggested: using the installer package name. String packageName = appContext.getPackageName(); String installerPackage = appContext.getPackageManager().getInstallerPackageName(packageName); if the app is downloaded in Play Store (even if the app is bought with a PC), installerPackage should be "com.vending.google".

Categories : Android

Android - Google Play Store closes app for update and not opening it afterwards
Post Honeycomb, apps have to be started manually by the user after installation or upgrade. If you need your app to always run continuously, you would need to turn off auto update and manually update it yourself so that you can launch it manually after updating.

Categories : Android

Remove from Observable collection in ViewModel does not update View, but Updates of Existing Items does update View
The code you're pasting should work, from what I can see. The most likely culprit is that your TransactionUpdateReceived event is being raised on a thread that is not the user interface thread. In WPF, single items can be modified on a background thread, but collections cannot (prior to .NET 4.5, but in .NET 4.5, they require extra work). There are two options. If you're using .NET 4.5, you can use BindingOperations.EnableCollectionSynchronization to allow the ObservableCollection to be modified from a background thread. Alternatively, you can use Dispatcher.Invoke to push the Add/Remove calls onto the main thread.

Categories : Dotnet

Should an application that updates Windows Mobile 6.5 to Compact Framework 3.5 be .NET 1.0 or native code?
For Windows CE (Windows Embedded Compact now) it is entirely up to the device manufacturer whether they want to include the CompactFramework. However, for Windows Mobile 6 the CF 2.0 SP2 was preinstalled with the OS (So I believe that 6.5 should have it too). I believe that you can probably write .NET CF 2.0 code for it and have it be expected to run. As far as native code, one thing to keep in mind is that if you have different processor architectures then you cannot have the same native code, for example x86 and ARM. However, again I think Windows Mobile 6 only supports ARM processors, so I'm not sure that would be a problem either. I think you could use either one.

Categories : Misc

Shared preference value as input to the JSONArray in Android
Do you forgot to commit changes? Try: editor.putString("email", inc_email.getText().toString()); editor.commit(); If you need JSON parsing, you may use this useful library https://jsonp.java.net/

Categories : Android

Android Service for GPS updates
To get the instance of your service you need to bind the service with the activity. Check these links: http://developer.android.com/guide/components/bound-services.html http://dharmendra4android.blogspot.mx/2012/05/bind-service-using-ibinder-class.html If you need aditional help, plese tell me.

Categories : Android

What happens on an android device when the app updates?
From what I could find in researching this, it seems as though the App needs to be closed in order for the files to be reachable for update. Once closed, Google Play updates only the changed pieces of the apk to save time and cost. There are several forum posts I have found that teach you how to rollback app options from flashed ROM (which happens all the time with rooted devices). Perhaps the user attempted to rollback after receiving the update. Either that, or the ID that was in the crash is referenced in part of your apk that was not updated. Sources: Notification of Update What Happens When You Update an App Google Play Saves Cost & Time

Categories : Android

how can i play an audio file in background using "App registers for location updates" background mode
Have you explicitly set the Audio Session category? The Audio Session Programming Guide has a useful section "Choosing the Best Category" which describes the different options: Audio Session Programming Guide I'm not in front of a Mac right now, so I can't test this. But I suspect adding the following to your viewDidLoad method might help you out when you multitask away from your app. NSError *sessionError = nil; [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:&sessionError];

Categories : IOS

How to save and fetch integer value in Shared Preference in android?
You can use shared preferences as follows //To save SharedPreferences settings = getSharedPreferences("YOUR_PREF_NAME", 0); SharedPreferences.Editor editor = settings.edit(); editor.putInt("SNOW_DENSITY",mSnowDensity); editor.commit(); //To retrieve SharedPreferences settings = getSharedPreferences("YOUR_PREF_NAME", 0); int snowDensity = settings.getInt("SNOW_DENSITY", 0); //0 is the default value getSharedPreferences() is a method of the Context class. If you are inside a Activity or a Service (which extend Context) you can use it like in this snippet. Else you should get the context using getApplicationContext() and then call getSharedPreferences() method. For more options you can refer to the documentation at http://developer.android.com/guide/topics/data/data-storage.html#pref

Categories : Android

Android | Load different layout based on a shared Preference value
Apparently I was wrong, it is possible to force select the state of the device, but keep in mind that those folders are meant for android to select based on the device configuration. Configuration config = new Configuration(getResources().getConfiguration()); config.screenLayout = Configuration.SCREENLAYOUT_SIZE_SMALL; getResources().updateConfiguration(config, getResources().getDisplayMetrics()); Which would force selecting of layouts in the folder layout-small, and config.densityDpi for the screen density. Your comment said that the selection you want is not based on screen sizes, if so, then I would recommend, creating the different layout files with appended qualifiers inside the layout folder (ie. main_activity_large.xml) and make the assignment from there. Cheers

Categories : Android

How to get notified of updates on the Android filesystem?
On Linux, people use inotify to achieve this goal, And in Android, we can use FileObserver: See the ref here: http://www.roman10.net/android-fileobserverthe-underlying-inotify-mechanism-and-an-example/ Android file system hooks

Categories : Android

AsyncTask Error - after the new Android SDK updates
You're not using the AsyncTask in a proper way. The usage of arguments are wrong. You have to return something from doInbackground to onPostExecute method, maybe an array of addresses, because your doinbackground was just trying to download something, while you're already accessing the data. Try to read the stack trace, it's pointing to your 217 line of code and also on your runOnUiThread. On line 217 your variable is null. onPostExecute is already a uiThread method, so no runnables should be implemented there. Just right your code smth like this: protected void onPostExecute(List<Address> addressList) { for (Address address : addressList) { YourActivity.this.displayAddressLines(address); } }

Categories : Android

Not receiving Location Updates in Android
You can find a working example here. It is not calculating the distance, but this should be easy to add.

Categories : Java

Filter publised android application by spefic devices on google play store
http://developer.android.com/google/play/filters.html take a look at this link, it tells you how to restrict certain devices installing or viewing your app in the play store. You can restrict access by sdk version or screen size.

Categories : Android

Run on UI thread updates only the last desired result (Android)
It's unzipping/installing too fast, it's the problem. So if you want to see all log just append text with += operator to your textview if you want to see operations step by step then use Thread.Sleep(500); in your every if statements

Categories : Java

Rebuild SQLite database when app updates, Android
You can use database version. Pass your database version by using SQLiteOpenHelper. You can refer to following answers. How to update table schema after an app upgrade on Android? How to upgrade SQLite database in Android?

Categories : Android

Location Updates in Android requestLocationUpdates method
My understanding is that requestLocationUpdates actually makes the request to the provider to send for an updated location? Yes. Why then are we passing a LocationListener callback to a request? How else were you planning on getting the updates? There's a PendingIntent flavor of requestLocationUpdates() if you would prefer it. Seems like the entire point of a LocationListener is to pick up changes in the location when the location provider decides it is time to update. Correct. So is the requestLocationUpdates a search function to see if the providers have looked for and found a new location No. is it an actual request that triggers the providers into activity that actively looks for a new location? Yes. Bear in mind that GPS, in particular, is powered down un

Categories : Java

Android Custom View with time-based updates
Probably invalidateSelf() on the drawable with your timer...you can check the developer docs for the details. Note the "Does nothing if there is no Callback attached to the Drawable" statement, or nothing will happen!

Categories : Android

How to display Service text updates on Screen in Android?
From within your service you should create a handler that can be triggered by a timer task, the handler should be the one directly responsible of doing the communication with the currently active UI thread..an example would be long delay = 3000; long period = 3000; TimerTask mDoTask = new TimerTask() { @Override public void run() { xHandler.sendMessage(Message.obtain(xHandler, SOME_OPERATION)); } }; mT.scheduleAtFixedRate(mDoTask, delay, period); Handler xHandler=new Handler(){ @Override public void handleMessage(Message message){ switch (message.what){ case SOME_OPERATION: YourMethod();// in this method you can display your text break; }

Categories : Android

Battery efficient android widget that updates once a minute
That's exactly how I did something similar. I created a Service (IntentService if you don't need anything complicated) and then register it with the alarm manager. long interval = intervalMinutes * 60 * 1000; long firstTime = Calendar.getInstance().getTimeInMillis(); Intent i = new Intent(ctx, AlarmService.class); // Use the widget ID to update only one widget at a time. i.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, id); PendingIntent mAlarmSender = PendingIntent.getService(ctx, id, i, PendingIntent.FLAG_UPDATE_CURRENT); AlarmManager am = (AlarmManager) ctx.getSystemService(ALARM_SERVICE); am.setRepeating(AlarmManager.RTC_WAKEUP, firstTime, interval, mAlarmSender); being AlarmService.class your Service or IntentService. For boot event, you can create a BroadcastReceiver and manage

Categories : Android

Make a windows forms application that updates data in a SQL Server Express db table work on client machiens
Need to install the same version of SQL Express(Example: 2012) you used for development in client machines. By default sql express will be installed as named instance with name ".sqlexpress" so your connection string need to point to the server as ".sqlexpress" or "(local)sqlexpress". You can change the named instance during installation if needed. Also users can add themself as SQL admin to sql express during installation so if they do that then your application should work fine. This link shows step by step installation of sql express 2012

Categories : Dotnet



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