Search Results

Search found 28948 results on 1158 pages for 'app showdown'.

Page 146/1158 | < Previous Page | 142 143 144 145 146 147 148 149 150 151 152 153  | Next Page >

  • Using GQL to check if BlobProperty is NULL

    - by Joel
    Hello, I have a db.BlobProperty property (called "Icon") in my entity which contains an image binary. I want to run a GQL query to retrieve all entities with an image (i.e. their "Icon" property is not NULL). Trying to use the following query: "SELECT * FROM Names WHERE Icon!=NULL" did not work... Trying to use .filter("Icon!=",None) did not work as well... Any ideas? Thanks! Joel

    Read the article

  • Desktop mono app and MVC/MVP framework

    - by tempy
    I am looking for a MVC/MVP (mvp prefferably) framework for my first mono app. There doesn't seem to be too much out there, but I have found the following: http://www.mvcsharp.org/ http://desktoprails.osl.ull.es/doku.php I've been looking into both for some time, and MVC# seems to be closer to what I want. The issue is that MVC# seems to be a .net project and not designed specifically for mono (as opposed to desktop rails), so I'm not 100% sure how it will play with mono. Also, it is under the Microsoft Public License (MsPL), and I am not sure how well that license will play with other components I intend to use that are gpl/mit/apache/etc. So if anyone has any experience with either of these frameworks in mono and can answer any of these questions, I would appreciate any feedback.

    Read the article

  • How do I use a ListProperty(users.user) in a djangoforms.ModelForm on Google AppEngine?

    - by Gabriel
    I have been looking around a bit for info on how to do this. Essentially I have a Model: class SharableUserAsset(db.Model): name = StringProperty() users = ListProperty(users.User) My questions are: What is the best way to associate users to this value where they are not authenticated, visa vi invite from contacts list etc.? Is there a reasonable way to present a list control easily in a djangoforms.ModelForm? Once a user logs in I want to be able to check if that user is in the list for any number of SharableUserAsset class "records", how do I do that? Does user evaluate as a match to an email address or is there a way to look up a valid user against an email address?

    Read the article

  • I can create a cookie, but can't delete it from my iPhone app

    - by squeezemylime
    I am creating an iPhone app, and am using this method to create a cookie that will be accessed site-wide: NSMutableDictionary *cookieDictionary = [NSMutableDictionary dictionaryWithCapacity:4]; [cookieDictionary setObject:@"status" forKey:NSHTTPCookieName]; [cookieDictionary setObject:[self.usernameField text] forKey:NSHTTPCookieValue]; [cookieDictionary setObject:@"http://www.mydomain.com" forKey:NSHTTPCookieDomain]; [cookieDictionary setObject:@"/" forKey:NSHTTPCookiePath]; // Build the cookie. NSHTTPCookie *cookie = [NSHTTPCookie cookieWithProperties:cookieDictionary]; // Store the cookie. [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookie:cookie]; // Log the Cookie and display it for (cookie in [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]) { NSLog(@"%@", cookie.value); } Now I am trying to delete it via the following method, but it isn't working, and the documentation isn't quite helping me: NSHTTPCookieStorage* cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; NSArray* theCookies = [cookieStorage cookiesForURL:[NSURL URLWithString:@"http://mydomain.com"]]; for (NSHTTPCookie *cookie in theCookies) { [cookieStorage deleteCookie:cookie]; }

    Read the article

  • Storing a list of objects in GAE

    - by Dominic Bou-Samra
    I need to store some data that looks a little like this: xyz 123 abc 456 hij 678 rer 838 Now I would just store it as a traditional string and integer model, and put in the datastore. But the data changes regularly, and is ONLY relevant when looked at as a COLLECTION. So it needs to be store as either a list of lists, or a list of objects, both of which can't really be done without pickling as far as I know. Can anyone help? Even storing it as a text file may work :S

    Read the article

  • Try to fill the GAE datastore but the code consumes to much cpu time. How to optimize this?

    - by Neverland
    I try to get the list of images in Amazon EC2 inside the Google datastore. I want to realize this with a cron job inside the GAE. class AmazonEC2uswest(db.Model): ami = db.StringProperty(required=True) mani = db.StringProperty() typ = db.StringProperty() arch = db.StringProperty() state = db.StringProperty() owner = db.StringProperty() class CronAMIsAmazonUS_WEST(webapp.RequestHandler): def get(self): aws_access_key_id_admin = "<secret>" aws_secret_access_key_admin = "<secret>" conn_us_west = boto.ec2.connect_to_region('us-west-1', aws_access_key_id=aws_access_key_id_admin, aws_secret_access_key=aws_secret_access_key_admin, is_secure = False) liste_images_us_west = conn_us_west.get_all_images() laenge_liste_images_us_west = len(liste_images_us_west) for i in range(laenge_liste_images_us_west): datastore_uswest_AMIs = AmazonEC2uswest(ami=liste_images_us_west[i].id, mani=str(liste_images_us_west[i].location), typ=liste_images_us_west[i].type, arch=liste_images_us_west[i].architecture, state=liste_images_us_west[i].state, owner=liste_images_us_west[i].ownerId) datastore_uswest_AMIs.put() The problem: Getting the list with get_all_images() lasts only a few seconds. But writing the data to the Google datastore needs way too much CPU time. My IBM T42p (P4M with 2GHz) needs for that piece of code approx. 1 Minute! Is it possible to optimize my code in a way that it needs fewer CPU time?

    Read the article

  • How do you efficiently bulk index lookups?

    - by Liron Shapira
    I have these entity kinds: Molecule Atom MoleculeAtom Given a list(molecule_ids) whose lengths is in the hundreds, I need to get a dict of the form {molecule_id: list(atom_ids)}. Likewise, given a list(atom_ids) whose length is in the hunreds, I need to get a dict of the form {atom_id: list(molecule_ids)}. Both of these bulk lookups need to happen really fast. Right now I'm doing something like: atom_ids_by_molecule_id = {} for molecule_id in molecule_ids: moleculeatoms = MoleculeAtom.all().filter('molecule =', db.Key.from_path('molecule', molecule_id)).fetch(1000) atom_ids_by_molecule_id[molecule_id] = [ MoleculeAtom.atom.get_value_for_datastore(ma).id() for ma in moleculeatoms ] Like I said, len(molecule_ids) is in the hundreds. I need to do this kind of bulk index lookup on almost every single request, and I need it to be FAST, and right now it's too slow. Ideas: Will using a Molecule.atoms ListProperty do what I need? Consider that I am storing additional data on the MoleculeAtom node, and remember it's equally important for me to do the lookup in the molecule-atom and atom-molecule directions. Caching? I tried memcaching lists of atom IDs keyed by molecule ID, but I have tons of atoms and molecules, and the cache can't fit it. How about denormalizing the data by creating a new entity kind whose key name is a molecule ID and whose value is a list of atom IDs? The idea is, calling db.get on 500 keys is probably faster than looping through 500 fetches with filters, right?

    Read the article

  • asyncronous call doesn't return json

    - by Rebecca
    I am running wamp on an xp box. I am fairly new to web programming, this is for a student project, and have run out of avenues to try to solve this problem. Problem We have client side JavaScript code that uses GDownloadUrl- from the Google api- to wrap xmlHttpRequest calls to a php server side program that is accessing our database. In my callback program, the result of this call is always " ". However, if I use an alert to display the http:// call, with the arguments, and cut and paste that into my browser, the json I expected is displayed. I zipped my dir containing all the files, and tried it out on another team member's computer, and they were able to get the json in the callback function. Note this is exactly the same code and structure I was using, he just unzipped and ran. So now I'm thinking this is something about Firefox or Wamp? Would this be a config problem? I'm running wamp server 2.0, and Firefox 3.5.8. I have no problems with syncronous php, or reading in files asyncronously. Any help would be greatly appreciated. Rebecca

    Read the article

  • Can't wrap my head around appengine data store persistence

    - by aloo
    Hi, I've run into the "can't operate on multiple entity groups in a single transaction." problem when using APPENGINE FOR JAVA w/ JDO with the following code: PersistenceManager pm = PMF.get().getPersistenceManager(); Query q = pm.newQuery("SELECT this FROM " + TypeA.class.getName() + " WHERE userId == userIdParam "); q.declareParameters("String userIdParam"); List<TypeA> poos = (List<TypeA>) q.execute(userIdParam); for (TypeA a : allTypeAs) { a.setSomeField(someValue); } pm.close(); } The problem it seems is that I can't operate on a multiple entities at the same time b/c they arent in the same entity group while in a transaction. Even though it doesn't seem like I'm in a transaction, appengine generates one because I have the following set in my jdoconfig.xml: <property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/> Fine. So far I think I understand. BUT - if I replace TypeA in the above code, with TypeB - I don't get the error. I don't believe there is anything different between type a and type b - they both have the same key structure. They do have different fields but that shouldn't matter, right? My question is - what could possible be different between TypeA and TypeB that they give this different behavior? And consequently what do you I fundamentally misunderstand that this behavior could even exist.... Thanks.

    Read the article

  • How GAE emulator limits list of available Python modules?

    - by Konstantin
    I installed Python Mock module using PIP. When I try to import mock running under 'dev_appserver', GAE says that it can't find module 'mock'. import mock works perfectly in Python interpreter. I understand that dev_appserver behaves absolutely correctly because I can't install modules with PIP on GAE servers. My question is how technically dev_appserver filters list of modules that can be loaded?

    Read the article

  • Types in Python - Google Appengine

    - by Chris M
    Getting a bit peeved now; I have a model and a class thats just storing a get request in the database; basic tracking. class SearchRec(db.Model): WebSite = db.StringProperty()#required=True WebPage = db.StringProperty() CountryNM = db.StringProperty() PrefMailing = db.BooleanProperty() DateStamp = db.DateTimeProperty(auto_now_add=True) IP = db.StringProperty() class AddSearch(webapp.RequestHandler): def get(self): searchRec = SearchRec() searchRec.WebSite = self.request.get('WEBSITE') searchRec.WebPage = self.request.get('WEBPAGE') searchRec.CountryNM = self.request.get('COUNTRY') searchRec.PrefMailing = bool(self.request.get('MAIL')) searchRec.IP = self.request.get('IP') Bool has my biscuit; I thought that setting bool(self.reque....) would set the type of the string but no matter what I pass it it still stores it as TRUE in the database. I had the same issue with using required=True on strings for the model; the damn thing kept saying that nothing was being passed... but it had. Ta

    Read the article

  • How to output KML by GAE

    - by Niklas R
    Hi I use KML for a google map where entities have a geopt.db coordinate and soft memory limit was exceeded with 213.465 MB after servicing 1 requests total. The log says /list.kml 200 13130ms 10211cpu_ms 4238api_cpu_ms The file list.kml which outputs about 455,7 KB is a template as follows <?xml version="1.0" encoding="UTF-8"?><kml xmlns="http:// www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http:// www.w3.org/2005/Atom"> <Document>{% for a in list %} <Placemark> <name> </name> <description> <![CDATA[<a href="http://{{host}}/{{a.key.id}}"> {{ a.title }} </a> <br/>{{a.text}}]]> </description> <Style> <IconStyle> <Icon> <href> http://www.google.com/intl/en_us/mapfiles/ms/icons/green-dot.png </href> </Icon> </IconStyle> </Style> <Point> <coordinates> {{a.geopt.lon|floatformat:2}},{{a.geopt.lat|floatformat:2}} </coordinates> </Point> </Placemark> {% endfor %} </Document> </kml> Is there a memory leak in the template or the python that passes the list variable? Can I improve using other template engine or other framework than default? Is kmz compression a good idea in this case? Thanks in advance for any suggestion where or how to change the code.

    Read the article

  • Execute a PyQt app from an acpi event in linux

    - by alfredozn
    Hi, I want to use a PyQt application to display an image when some acpi event is triggered under linux. I already setting up the configuration for the event and the python scrip is executed when the event is triggered, but when program reach the creation of the QApplication app = QApplication(sys.argv) it stops without error. I tried setting up the same DISPLAY and PATH environment variables as my current user but it doesn't work. This is my event file: event=sony/hotkey SNC 00000001 00000011 action=/etc/acpi/vaio-tools/brightness/sonybright.sh up 2>&1>/tmp/vaio-tools_brightness.log I tried to find some error in the /tmp/vaio-tools_brightness.log but it doesn't log anything after it reach the QApp creation in code. any hints??

    Read the article

  • automatic enter login credentials while testing my app (from visual studio 2008)

    - by Michel
    Hi all, this is something that i don't want to program, but i was looking for a handy way of logging on to my web app. i'm building (and testing and running) my webapp over and over again, and here i've been provided a strong password. needless to say it's not so nice to enter my full user name + strong password 30 times a day. is there a nifty tool which lives in the background and when i open page localhost/mytestpage.aspx, it will say: "hey, let me type in michel and sdfs%^%gfhg in these two textboxes"?

    Read the article

  • iPhone app throwing EXC_BAD_ACCESS with dictionary from contents of file

    - by Mark Szymanski
    I have the code NSArray *paths = [[NSArray alloc] initWithArray:NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES)]; NSString *docsDirectory = [[NSString alloc] initWithString:[paths objectAtIndex:0]]; NSLog(@"This app's documents directory: %@",docsDirectory); NSString *docsDirectoryWithPlist = [[NSString alloc] initWithFormat:@"%@/Stuff.plist", docsDirectory]; BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:docsDirectoryWithPlist isDirectory:NO]; if (fileExists) { chdir([docsDirectory UTF8String]); NSMutableDictionary *readDict = [[NSMutableDictionary alloc] initWithContentsOfFile:@"Stuff.plist"]; in an application's applicationDidFinishLaunching method and whenever it gets to the last line it crashes, throwing EXC_BAD_ACCESS along the way. Thanks in advance!

    Read the article

  • Multiple Service Address Configs in WCF Silverlight App

    - by CraigS
    My team is building our first significant Silverlight application, using a 3 layered architecture and WCF. We have developed about 10 separate WCF services in the middle layer so far, and this number is only going to grow. Generally, the presentation layer (ie. the Silverlight app) is pointing to the services as hosted on our dev server. However, there are times when I want it to access the services from localhost - ie. the developers machine. Is there an easy way to change where the presentation layer is looking for the services? Is there some way of easily switching between options here?

    Read the article

  • Corrupt iPhone App Name

    - by vickirk
    I've done an adhoc build to test an application, but when I drag it into iTunes to add to my devices it is getting a corrupt name. It comes up with the name "Myapp Name <!DOCTYPE plist PUBLIC "-//APPLE//DTD PLIST 1.0//EN" http://www.apple.com/DTDs/PropertyList-1.0.dtd"" which continues with the whole plist I've tried the obvious, clean/rebuild/reboot. This worked fine last time I worked on the app and I've done nothing to project settings other than incement the version number and a couple of minor code changes. I've since update XCode to 3.2.1 and iTunes to 9.0.3. Anyone seen this before?

    Read the article

  • Is it possible to protect a single element in the appSettings section instead of the entire section?

    - by hambonious
    I would like to protect one key/value pair in my appSettings but not the others using something like I've previously done with the ProtectSection method as seen below. var configurationSection = config.GetSection("appSettings"); configurationSection.SectionInformation.ProtectSection("DataProtectionConfigurationProvider"); Ideally I would like to do something like the following: var configurationElement = config.GetSection("appSettings").GetElement("Protected"); configurationElement.ElementInformation.ProtectElement("DataProtectionConfigurationProvider"); Here is the example appSettings I would be operating on: <configuration> <appSettings> <add key="Unprotected" value="ChangeMeFreely" /> <add key="Protected" value="########"/> </appSettings> </configuration> I've been searching but haven't found a way to do this. Is this possible?

    Read the article

  • Distribute CouchDB as part of a Rails app?

    - by AaronThomson
    I am working on a Rails project and the Architect has asked me to investigate bundling CouchDB into to application so that it can be deployed by Capistrano across multiple platforms and managed by Rake. My expectation was that I could set up the Erlang VM on the various environments and then distribute the CouchDB application with Capistrano. However I can't find any option to download CouchDB without the Erlang runtime. I can, however see an option to build CouchDB from source which I assume is platform dependent. I am new to Erlang and CouchBD, am I missing something? Is there a way to bundle CouchDB into a Rails app and distribute it across multiple platforms?

    Read the article

  • No JSON object could be decoded - RPC POST call

    - by user1307067
    var body = JSON.stringify(params); // Create an XMLHttpRequest 'POST' request w/ an optional callback handler req.open('POST', '/rpc', async); req.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); req.setRequestHeader("Content-length", body.length); req.setRequestHeader("Connection", "close"); if (async) { req.onreadystatechange = function() { if(req.readyState == 4 && req.status == 200) { var response = null; try { response = JSON.parse(req.responseText); } catch (e) { response = req.responseText; } callback(response); } }; } // Make the actual request req.send(body); ---- on the server side ---- class RPCHandler(BaseHandler): '''@user_required''' def post(self): RPCmethods = ("UpdateScenario", "DeleteScenario") logging.info(u'body ' + self.request.body) args = simplejson.loads(self.request.body) ---- Get the following error on the server logs body %5B%22UpdateScenario%22%2C%22c%22%2C%224.5%22%2C%2230frm%22%2C%22Refinance%22%2C%22100000%22%2C%22740%22%2C%2294538%22%2C%2250000%22%2C%22owner%22%2C%22sfr%22%2C%22Fremont%22%2C%22CA%22%5D= No JSON object could be decoded: line 1 column 0 (char 0): Traceback (most recent call last): File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 703, in call handler.post(*groups) File "/base/data/home/apps/s~mortgageratealert-staging/1.357912751535215625/main.py", line 418, in post args = json.loads(self.request.body) File "/base/python_runtime/python_lib/versions/1/simplejson/init.py", line 388, in loads return _default_decoder.decode(s) File "/base/python_runtime/python_lib/versions/1/simplejson/decoder.py", line 402, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/base/python_runtime/python_lib/versions/1/simplejson/decoder.py", line 420, in raw_decode raise JSONDecodeError("No JSON object could be decoded", s, idx) JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0) --- firebug shows the following --- Parameters application/x-www-form-urlencoded ["UpdateScenario","c","4.... Source ["UpdateScenario","c","4.5","30frm","Refinance","100000","740","94538","50000","owner","sfr","Fremont","CA"] Based on the firebug report and also the logs shows self.request.body as anticipated. However simplejson load doesn't like it. Please help!

    Read the article

  • JODA time in Java Appengine

    - by aloo
    Has anyone gotten JODA time classes to work on Google Appengine? I'm using 1.3.4 of the java sdk and I get the following error when trying: java.lang.NoClassDefFoundError: com/google/appengine/repackaged/org/joda/time/DateTimeZone I've imported it as well: import com.google.appengine.repackaged.org.joda.time.DateTime;

    Read the article

  • GAE and Socket Data

    - by Vinod
    I have a field device which keeps on sending data over to any designated port using sockets. I am planning to use GAE for server-side infrastructure. I read GAE does not support sockets. But i can configure the device to send the data over port 80. so we wrote a genericservlet to capture this data on GAE. But it is not obtaining any values from the client. any suggestions to fix this issue?

    Read the article

< Previous Page | 142 143 144 145 146 147 148 149 150 151 152 153  | Next Page >