1) I have an Object (JB8XGctiZw) that has to keys: "patternName", and "tempoIntensities". When I run the following code, It will fetch the correct values of both keys.
ParseObject parseObject=ParseObject.createWithoutData("AudioPattern", "JB8XGctiZw");
parseObject=parseObject.fetch();
parseObject.pin();
Log.d("pattern",parseObject.getJSONArray("tempoIntensities").toString());
Log.d("pattern",parseObject.getString("patternName"));
2) From the web interface I change value contents for BOTH keys.
3) Run again the above code and it will successfully bring me the new value for "patterName", but "tempoIntensities", the JSONArray, will not be updated.
The only way to get the JSONArray updated is to clear local storage.
Is this a bug? Is this behavior normal?
Regards
It seems to be an issue with using ParseObject.getJSONArray and ParseObject.getJSONObject. For the moment I fixed this using ParseObject.get() and then casting it.
The version of Parse this applies to is 1.8.2,
And there is an assigned issue here:
https://developers.facebook.com/bugs/846833412048862/
You should be logged in to facebook to see this bug
Related
I am trying to get some key values from features in extent but I am unable to.
I tried to look up ID [feature.getId()] which works totally fine, see here:
If I try feature.get('id') it's undefined for some reason. (And it's undefined for every key I am trying to get by name)
I tried feature.getKeys() and it's returning geometry,info,index,popup.
I stored every info I need under info key.
I tried to get data in console and I can see that a point has 'id' key, and I am unable to get it with feature.get('id')
Does anyone know what am I doing wrong?
I had to access values with Object.values method.
Object.values(Object.values(feature.get("info"))[0][2])[1]
I have a collection of Person, stored in a legacy mongodb server (2.4) and accessed with the mongoid gem via the ruby mongodb driver.
If I perform a
Person.where(email: 'some.existing.email#server.tld').first
I get a result (let's assume I store the id in a variable called "the_very_same_id_obtained_above")
If I perform a
Person.find(the_very_same_id_obtained_above)
I got a
Mongoid::Errors::DocumentNotFound
exception
If I use the javascript syntax to perform the query, the result is found
Person.where("this._id == #{the_very_same_id_obtained_above}").first # this works!
I'm currently trying to migrate the data to a newever version. Currently mongodbrestore-ing on amazon documentdb to make tests (mongodb 3.6 compatible) and the issue remains.
One thing I noticed is that those object ids are peculiar:
5ce24b1169902e72c9739ff6 this works anyway
59de48f53137ec054b000004 this requires the trick
The small number of zeroes toward the end of the id seems to be highly correlated with the problem (I have no idea of the reason).
That's the default:
# Raise an error when performing a #find and the document is not found.
# (default: true)
raise_not_found_error: true
Source: https://docs.mongodb.com/mongoid/current/tutorials/mongoid-configuration/#anatomy-of-a-mongoid-config
If this doesn't answer your question, it's very likely the find method is overridden somewhere in your code!
I have a column ("DataDict") storing type of Dictionary (let say the variable name is call "dataDict")
Recently I've updated to Parse Unity 1.6.2 and I found out that whenever I make an update to dataDict, it doesn't get updated to the server.
For example:
Dictionary<string, object> dict = ParseUser.CurrentUser["DataDict"] as Dictionary<string, object>;
dict["name"] = "something new";
// after I call ParseUser.CurrentUser.SaveAsync()
// the server should have updated the dictionary
// but it's no longer working as what I expected after I've updated to Parse 1.6.2
Does anyone know what's going on?
I noticed one of the keypoint that listed in the changelogs:
Removed 'mutable containers' functionality, significantly enhances performance.
Does this affected my codes? How should I fix it?
I've solved this by calling
ParseUser.CurrentUser["DataDict"] = dict;
When I am saving data(String) to isolated data storage,it was saving data successfully ,but the while retrieve data from data Storage,I a getting data of previous page.
I am having String variable in App.xaml.cs and i assign the values to it from pages,on deactivating the app,information abt last page gets saved and when i restore it ,i should get my saved String,But this is place i am getting this issue,I get some time the previous or before pages values,If i delete the app and build app successfully it works successfully,but when withou deleting the app and when going on doing build and build process,I am getting this issue.
if (IsolatedStorageSettings.ApplicationSettings.Contains("endResponse"))
{
IsolatedStorageSettings.ApplicationSettings[endResponse] = App.endResponse;
}
else
{
settings.Add("endResponse", App.endResponse);
}
and for retreiving i am using
if (IsolatedStorageSettings.ApplicationSettings.Contains("endResponse"))
{
IsolatedStorageSettings.ApplicationSettings.TryGetValue<String>("endResponse", out App.endResponse);
}
Debug.WriteLine("App.end Response in IsolatedStorage while activation>>>" + App.endResponse);
When deleting the app from simulator and while testing the app,it works well ,apart from it I am not getting exact values always.
I am attaching the screenshot of issue,plz check and tell me ,if i miss anything.
After writing your settings, you need to call the Save method :-
http://msdn.microsoft.com/en-us/library/system.io.isolatedstorage.isolatedstoragesettings.save%28v=vs.95%29.aspx
Shouldn't you use
IsolatedStorageSettings.ApplicationSettings["endResponse"]
rather then this in your post?
IsolatedStorageSettings.ApplicationSettings[endResponse]
I'm using splunk-client to extract results from splunk. Here's the code:
query = "sourcetype=collection #{order_id}"
search = #splunk_client.search(query)
search.wait
The search is happening fine, and it seems like I'm doing everything according to the example (https://github.com/cbrito/splunk-client), but I get this error on the 'search.wait' line:
Undefined namespace prefix: //s:key[#name='isDone']
Any ideas what could be going wrong? Running these commands in irb works fine. Is there some sort of blocking issue?
There is currently very little error checking which occurs within the gem itself. The reason for the error is that wait looks for the status of the isDone key to change to true.
Since your credentials were not properly setup in the first place, the gem creates a search object with an invalid session. The search does not initially fail, because enough response came back from Splunk that Nokogiri processes it into an object without a Splunk search sid.
In the future I should likely raise an exception if a proper sid is not returned to avoid confusion.
Source: I wrote the gem.
I found out the issue -- the splunk client wasn't authenticating properly, and so search was actually a broken SplunkJob object (with a nil username and authentication key). It's strange that there was no error raised until the wait command, but upon inspecting the search object, one of the fields stated that the object was malformed.