updates

update preferences values after changing them programatically

微笑、不失礼 提交于 2019-12-24 08:49:23
问题 i've got a simple PreferenceActivity. in my activity im using the values stored in those keys. through getDefaultSharedPreferences and getBoolean("somekey") if i now change the preference associated with "somekey", everything works fine and the getBoolean returns the right value. but if i set the value "somekey" to another value programatically, via Preferences.Editor the settings view doesn't update to the new value! like this: pref_edit.putBoolean("somekey", true); pref_edit.commit(); if

Restoring Apple's JavaAppletPlugin.plugin after Java Update 2012-006

笑着哭i 提交于 2019-12-24 05:22:30
问题 So, I've discovered that some of my Java web apps have stopped functioning after applying the java update released by Apple on October 16th, 2012. The tech notes indicate that Apple has removed the web app plug-in from OS X and that you need to download it from Oracle directly. The problem with this is that Oracle only offers a 7x version of the plug-in and my apps require a 6x version, which I haven't been able to find. So, can anybody point me to where I could find a copy of

Ignore one property on update Entity Framework

情到浓时终转凉″ 提交于 2019-12-24 05:22:25
问题 I'm working with .NET C# and Entity Framework. I have a situation where I need to update an object in the database but I'll keep one property untouched. I'd like to know is it possible to do that? Take the following class for example: public class Person { public int PersonId { get; set; } public string Name{ get; set; } public int Age { get; set; } public DateTime CreationDate { get; set; } } So I would provide a HTML form in a page for the client to edit a person. Example: <form> <input

Permission to overwrite files

三世轮回 提交于 2019-12-24 03:14:29
问题 I have a python program which I then compile with cx_freeze that updates itself by downloading a zip file and then overwriting files. Thing is, whenever I execute it, this happens: Traceback (most recent call last): File ".\updater.py", line 69, in empezar_actualizacion self.bajar_archivos() File ".\updater.py", line 75, in bajar_archivos self.extraer_archivos() File ".\updater.py", line 80, in extraer_archivos self.descarga.descomprimir(self.archivos) File "utils.py", line 167, in

Updating an array of objects with a new key in mongoDB

流过昼夜 提交于 2019-12-23 18:13:17
问题 Similar to this question Barrowing the data set, I have something similar to this: { 'user_id':'{1231mjnD-32JIjn-3213}', 'name':'John', 'campaigns': [ { 'campaign_id':3221, 'start_date':'12-01-2012', }, { 'campaign_id':3222, 'start_date':'13-01-2012', } ] } And I want to add a new key in the campaigns like so: { 'user_id':'{1231mjnD-32JIjn-3213}', 'name':'John', 'campaigns': [ { 'campaign_id':3221, 'start_date':'12-01-2012', 'worker_id': '00000' }, { 'campaign_id':3222, 'start_date':'13-01

Programmatically update service worker if update() is not available

孤人 提交于 2019-12-23 16:02:52
问题 How can I programmatically update service worker since ServiceWorkerRegistration.update() has not been implemented in Chrome yet? Is there an alternative? 回答1: I assume you got this by now but I think you want serviceWorker.skipWaiting() 回答2: Thr best workaround seems to be to force update by changing checksum of the service worker file by some simple backend code (it can be like last commented line with microtime), which will be detected by browser 回答3: From the spec. if ('serviceWorker' in

“Visual Studio Extensions for Windows Library for Javascript” Won't Update

家住魔仙堡 提交于 2019-12-23 09:06:26
问题 Pounding on the update button in this screenshot does nothing. Nothing is downloaded, installed, etc. No message, nothing at all! Clicking "Release Notes" and "More Information" also does nothing. Searching for this update yields nothing useful, too. What ever shall I do? 回答1: Is Google Chrome your default browser by chance? I see the same behavior in that case, but not when IE or Firefox is. What Wade suggested earlier is precisely the file that pressing that button would have downloaded for

NodeJS + Mongo: Insert if not exists, otherwise - update

丶灬走出姿态 提交于 2019-12-23 06:49:08
问题 I have an object in my mongodb collection. Its schema is: { "instruments": ["A", "B", "C"], "_id": { "$oid": "508510cd6461cc5f61000001" } } My collection may have such object, but may not. I need to check if object with key "instruments" exists ( please, notе, I don't know what value "instrument" is at this time, it may contain any value or an array ), and if exists - perform update, otherwise – insert a new value. How can I do this? collection.find( { "instruments" : { $exists : true } },

NodeJS + Mongo: Insert if not exists, otherwise - update

情到浓时终转凉″ 提交于 2019-12-23 06:49:05
问题 I have an object in my mongodb collection. Its schema is: { "instruments": ["A", "B", "C"], "_id": { "$oid": "508510cd6461cc5f61000001" } } My collection may have such object, but may not. I need to check if object with key "instruments" exists ( please, notе, I don't know what value "instrument" is at this time, it may contain any value or an array ), and if exists - perform update, otherwise – insert a new value. How can I do this? collection.find( { "instruments" : { $exists : true } },

Updating a 'master' JSON object by adding data to a subobject

倾然丶 夕夏残阳落幕 提交于 2019-12-23 05:25:34
问题 Lets say I have a list of JSON objects: list = [{"Name": "NY", "Date": "12/2008", "features": [{"attributes": {"OID": 2, "Zone": "A"}, "geo": {"x": 10, "y": 20}}]},{"Name": "NY", "Date": "12/2008", "features": [{"attributes": {"OID": 3, "Zone": "D"}, "geo": {"x": 21, "y": 8}}]},{"Name": "NY", "Date": "12/2008", "features": [{"attributes": {"OID": 5, "Zone": "C"}, "geo": {"x": 15, "y": 10}}]}] I want to iterate through this list and have a single 'Master' json object: masterJson = {} for item