At some point in the future I may need to bulk load migration data (i.e. from a CSV). Has anyone had exceptions raised doing the following? Also is there any change in behaviour if the ndb.put_multi() function is used?
from google.appengine.ext import ndb
while True:
if not id:
break
id, name = read_csv_row(readline())
x = X(parent=ndb.Key('Y','static_id')
x.id, x.name = id, name
x.put()
class X(ndb.Model):
id = StringProperty()
name = StringProperty()
class Y(ndb.Model):
pass
def read_csv_row(line):
"""returns tuple"""
I'm having some strange issues with .removeClass() and .addClass() in jQuery.
Specifically it seems that when I use .removeClass() the class is indeed removed, but a single space is left in it's place. then when I .addClass("secondclass") I get class=" secondclass" (with the space in front).
I'm using jQuery 1.4.1
Is this intended behaviour or a bug? How to stop it?
I have been trying to change the cursor style to look like a pointer rather than an I beam thing, but it looks like FF does not respect the cursor spec in an input file field. For example, I have made this small fiddle: http://jsfiddle.net/jDZtn/4/ where Id like the cursor to look like a pointer rather than an Ibeam when the user hovers over it. My end plan is to introduce opacity==0 and use a clickable button over it.
I am not sure if this behaviour is a bug or not.
I am using VS 2010 and SL 4.And I came up with strange behaviour of the listbox that it don't have keyboard navigation(the one which is present in wpf :( ).So is there a way or any idea or suggestion how can i do it.. I know the long way thats shown up here ,
link text
But anything simpler then this or shortes then this will be nice.. :)
Pressing up/down keys will navigate through items present in the silverlight listbox
when I press 'enter' in contenteditable area a new <div> is produced what I rather want to add <br /> tag. How can I manipulate this behaviour. How is it done in WYMeditor. Is there any other method than preventdefault() and handle it ?
Is there any way how to override DataGrids header line ? Or at least its behaviour ? I'm trying to implement Outlook-like grouping of the table. That is allow user to drag column header out of the table to the dedicated area to sort by that column (for example XamDataGrid has that feature, you can see how it works here).
I cannot use any commercial solutions.
I will be thankfull for any experiences, ideas, code, notes or tutorials.
I have no idea if this is intended behaviour, but whenever the application exits (say, the user is double-clicking the home button and pressing on the red dash on the icon) I get the dreaded SIGKILL.
Now, when I try to launch the app again all I get is the old screen state and a frozen (I presume ?) program.
It could be because of clunky memory management, but NSZombieEnabled doesn't seem to agree.
Any thoughts ?
string a = "a";
string b = a;
string a = "c"
Why does string b still have the value "a" and not "c"?
As string is an object and not a stack value type, what's with this behaviour?
Thanks
Hello,
I use a fanpage which doesn't require authorization in a normal browser, but if I request my url in a UIWebView I get the Facebook login prompt.
Is this normal behaviour or can I avoid this?
I am using Lucene with Java. In the index I have a single document with a single name:value-field
text:alabama oklahoma
When I search for
+alabama -oklahoma
it returns no results, as expected.
However, when I search for
-alabama +oklahoma
it returns the single document as a match to the query.
Has anyone else noticed this behaviour? Any ideas on why this happens?
I'm not sure what I did to cause this, but adding a new file or package in IntelliJ now doesn't add them to subversion, and I have to add them manually via right-click - subverion - add.
Is there a setting that controls this behaviour?
Hi all,
I need to make a variable with similar behaviour like in C lanquage.
I need byte or unsigned char with range 0-255.
This variable should overflow, that means...
myVar = 255
myVar += 1
print myVar #!!myVar = 0!!
Can someone explain this behaviour?
test.c:
#include <stdio.h>
int main(void)
{
printf("%d, %d\n", (int) (300.6000/0.05000), (int) (300.65000/0.05000));
printf("%f, %f\n", (300.6000/0.05000), (300.65000/0.05000));
return 0;
}
$ gcc test.c
$ ./a.out
6012, 6012
6012.000000, 6013.000000
I checked the assembly code and it puts both the arguments of the first printf as 6012, so it seems to be a compile time bug.
I am having problem with setting a new Drawable to my ProgressBar.
If I use the setProgressDrawable() inside onCreate() method it works great. But when I try to call the same method inside a Handler post callback it doesn't work and the progressbar disapears.
Can someone explain this behaviour? How can I solve this problem?
JavaScript objects have no order stored for properties (according to the spec). Firefox seems preserve the order of definition of properties when using a for...in loop. Is this behaviour something that I can rely on? If not is there a piece of JavaScript code somewhere that implements an ordered hash type?
For some reason when an object's instance has errors, the f.label tags associated with error attributes isn't wrapped about the field_error_proc.
Is this the default behaviour?
Title is quite self explanatory, but I have some animation being done in a loop triggered by CADisplayLink. However, as soon as I scroll a UIScrollView I have added to my view hierarchy, the animation stops immediately, only to return again when scrolling has completely stopped and come to a standstill....
Anyway to cancel this behaviour?
I have a script that retrieves a file via SFTP, in some cases (hard to reproduce) the file arrives with only the 5 first characters of each row. Example:
<?xml
<resu
</res
Instead of :
<?xml version="1.0"?>
<results>
</results>
What can cause such behaviour?
The idea is that I want to build a small app that detects if the webcam is being used and by what.
I have thought about seeing who has use of the Twain.dll somehow (like the way process explorer knows)
It's for a security style app that picks out weird webcam behaviour.
Ideally I would use C# as it's my strong point, but I'm guessing it won't be that nice.
Consider the follwoing fragment:
int a,b;
a = 1;
b = 2;
c = a++++b; // does not work!! Compilation error.
c = a++*+b; // works !!
Please help me understand this behaviour.
Hi there
I have a question to the following procedure:
script/generate scaffold product
title:string description:text
db:migrate
#then I generate a migration which adds a column description to the
table products and migrate the db
again.
My question is: why is the field description not added to the project-views? Is that normal rails scaffold behaviour?
I think I saw in a video tutorial that the scaffold updates as well the views, which would be very convenient.
Thanks in advance for any help!
My development PC has windows installed. And I've experienced weird php behaviour:
<?php
file_put_contents('c:/q', microtime(1) . "\r\n", FILE_APPEND);
sleep(10);
When I run this script in browser simultaneously in two different tabs I get such results
1294713622.125
1294713632.2188
which obviously is not what I expected, although in CLI everything is fine.
So the question: what can block execution? (session.auto_start is Off)
.NET contains its own equality comparison functionality, however I don't really understand how it works.
If the desired Equals() and == behaviour is to verify that every field of an object is equal to every field of another object, is it necessary to override Equals() with a method that does this explicitly?