I'm currently using Xcode version 7.2.1, and I'm getting weird values displayed for most values in the debugger. The weird thing is it's always the same value. Other than a few values, all variables are listed as containing the value "00:30:00". The best way to show this is to give you an example.
I have tried restarting Xcode, clean and build, re-booting, and even re-installing Xcode, but I can't seem to escape this weird value. If I put in print statements, all the values show up correctly in the console. Is there any way I can get them to be correct in the debugger? Thanks.
Edit:
This is kind of interesting. If I move the mouse pointer over one of the entries, you can see that it displays "00:30:00", but if I inspect the value, it displays the correct date value.
I finally figured it out! I must have typed something in the "Edit Summary Format..." popup. It took it as a literal format string and displayed it for all string values from thereafter. Once I removed that, everything went back to normal.
Related
In the documentation it says that I should use this code to set new value's:
self.ref.child("users").child(user.uid).setValue(["username": username])
This way, I can set an username. However, if I want to add another value later on, like XP points, I use the following line of code:
var XPPoints = 1
self.ref.child("users").child(user.uid).setValue(["XPPoints": XPPoints])
This, however, deletes the username value, or any other value that was stored before. It replaces all value's.
I tried also the second thing the docs are saying at: https://firebase.google.com/docs/database/ios/read-and-write#basic_write which is this line of code:
self.ref.child("users/(user.uid)/username").setValue(username)
This will crash my app instantly when starting up. My question is: How can I add data, and not replacing the old value's?
Edit:
Fixed it by changing the code to:
self.ref.child("users/\(user.uid)/username").setValue(username)
Your solution shouldn't fix the problem you are having. You need to use updateChildValues instead of setValue. This adds the values instead of overwriting everything in the referenced node.
My program flow requires that I first set the value of a select option in the Viewmodel and then I load the available options into the Viewmodel. This causes problems, typically the first available option will be seen in the selection list after this, while the selected option value stays at the specified value.
I was hoping that setting the new "valueAllowUnset" would help, but instead my page becomes unresponsive when using it.
Therefore I currently set the original value again after loading the options. Strangely, this only works when I set the value, set a different value and then set the value again, e.g.
self.data()[field](orgValue);
self.data()[field]({});
self.data()[field](orgValue);
(I store values for multiple selection lists in the self.data observable and access them with the property index "field".)
I tried to strip this down to a simple JSFiddle (http://jsfiddle.net/timvdh/HN6DE/), but the behavior does not show there, although the example pretty much resembles my actual application. However, I am using about 30 select lists there.
So I was hoping, that someone can make an educated guess about what goes wrong in my application, I am hoping that the fact that I have to set the original value three times maybe gives a clue.
EDIT: This fiddle demonstrates, that setting the selected option before and after filling the options list does work with "valueAllowUnset": http://jsfiddle.net/timvdh/HT5Tp/
I am using JQuery Mobile with knockout.js and that caused the problem (sorry I did not even think about JQM being the problem in the first place). I am now setting the option before filling the list and after filling the list I call
$("#selectmenuID").selectmenu("refresh");
to display the option.
The hanging browser was not caused by knockout, there are additional subscriptions to the selectmenus in my app. "valueAllowUnset" changed the behavior of the selectmenus and triggered loops caused by problems in my code.
When I put a breakpoint in the OnRenderFrame function and inspect the FrameEventsArgs parameter I get really large numbers for FrameEventsArgs.Time.
Numbers like 1.75842543717402E+132 which is ridiculously large. I occasionally get ridiculously small numbers too.
If I create the default GL app with monodevelop and debug it without changing anything the value is always 3.46247528645812E-317.
I'm an idiot. I guess I could blame the Xamarin people for passing the FrameEventsArgs class as a parameter to OnRenderFrame but I wont.
OnUpdateFrame gets a valid FrameEventsArgs with the Time variable properly set.
Question using Grails 1.3.4 - the 'scale' constraint does not seem to keep my decimals.
I have a field defined as: Float latitude
I have a constraint: latitude(blank: false, range:-360.0f..360.0f, scale:6)
The Oracle 10g field is defined as: NUMBER(10,6)
When I enter a value in Create or Edit, the correct value gets to the database. However, it never displays correctly in Show. If I enter 10.1234567 and update, 10.123457 is in the database but 10.123 displays in Show.
If I Edit, the value shows as 10.123, and if I update without modifying it, 10.123 will be stored in the database, replacing 10.123457 even though I never touched that field.
If I edit the value to 10.456789, but leave another required field blank, the resulting Edit screen with the error message displays the value as 10.457.
Why is Grails continually rounding the value to 3 digits? I tried the field as a Double as well, but same results. I thought maybe it was Oracle, but I tried it with the default dev database, and same result. I thought maybe it was the 'range', but I took that off with the same result.
Hmm - are you sure it's displaying correctly in your database viewer? Also - check your use of tags: See http://www.pubbs.net/200908/grails/38057-grails-user-how-does-rounding-of-decimals-work-in-gsp.html
Wasted too much time trying to figure this out, ended up using the solution suggested by snowmanjack.
The default data binding that occurs with the fieldValue call is truncating it. You can write a new data binder that handles conversion the way you want as described here http://grails.org/doc/latest/guide/single.html#dataBinding
Or you can do the lazy, probably less safe method that I used and access the property directly.
I replaced.
${fieldValue(bean: countryInstance, field: "latitude")}
with
${contryInstance.latitude}
I dont know what exactly i have to type in title for this ,i tried my best
anyway coming to topic
I am making one acc checker for that purpose ,i am sending user and pass from my bsskinedit1 and bsskinedit2
here is my code
s:='http:\\site.com..premlogin='+bsskinedit.text+'&password='+bsskinedit2.text
but it giving some error ,then i used showmessage whats wrong with it then i came with strange result
see below
observer after 4 & and p combining together and appearing as a some new symbol :(
can any one tell me why its coming like this ?
Your code (where you build the URL) is most likely correct (I guess the above has some typos?!), but when you display the URL in a label for instance, the & character is treated as indicator for an accelerator key.
By Windows design, accelerator keys
enable the user to access a menu
command from the keyboard by pressing
Alt along the appropriate letter,
indicated in your code by the
preceding ampersand (&). The character
after the and sign (&) appears
underlined in the menu.
If you want to display the & character itself, you have to set your string variable to &&.
By placing two ampesands together - you state that the character following the first one is not used as the accelerator - rather you actually want to get it (only one) displayed.
Just use your debugger if you want to see the real value that your string variables have, don't output them to a message box or the like... It may have side effects, as you can see.
Regarding the URL you build: I can't possibly know how it has to be correctly, but at least you should use the right slashes!
s := 'http://site.com...'
(All quotes from delphi.about.com)
In addition to what Mef said, you can use OutputDebugString to add your string to the event log in its raw form, so you don't need to modify it before displaying it. Delphi should capture those strings automatically if you're running from the debugger. If you aren't running it from Delphi you can use DebugView instead, which captures the messages from any running applications.