Daily Archives

Articles indexed Friday June 18 2010

Page 32/76 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • NSURLConnection shown as leaking in instruments

    - by Gyozo Kudor
    Hello another stupid question regarding leaks and also NSURLConnection. How do i release it? Is it enough if i release in the following 2 methods? (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error (void)connectionDidFinishLoading:(NSURLConnection *)connection Because in instruments it shows me the line where I alloc my connection as the source of leaking. OK I don't get it. After the following code my urlConnection has a retain count of 2. WTF? NSURLConnection *urlConnection = [[NSURLConnection alloc] initWithRequest: urlRequest delegate: self]; This is the line that instruments points me to. I find this very weird.

    Read the article

  • How to use PHP-based authentication from non-PHP based AJAX app?

    - by DavidR
    I've been asked to create a stand-alone webapp using "straight" HTML and Javascript that does user authentication against an existing PHP app (backend is MySQL). Unfortunately, I really don't have a firm grasp on how PHP authentication works, and I'd rather not invest a lot of time in learning PHP just for this particular case. I can see two possibilites so far 1) create a PHP wrapper around my new app and use native PHP authentication (don't like this) 2) create a simple REST-ful webservice around the PHP authentication (don't know how to do this) Anything else I should consider? Help is much appreciated!

    Read the article

  • Using perl to split a line that may contain whitespace

    - by Tommy Fisk
    Okay, so I'm using perl to read in a file that contains some general configuration data. This data is organized into headers based on what they mean. An example follows: [vars] # This is how we define a variable! $var = 10; $str = "Hello thar!"; # This section contains flags which can be used to modify module behavior # All modules read this file and if they understand any of the flags, use them [flags] Verbose = true; # Notice the errant whitespace! [path] WinPath = default; # Keyword which loads the standard PATH as defined by the operating system. Append with additonal values. LinuxPath = default; Goal: Using the first line as an example "$var = 10;", I'd like to use the split function in perl to create an array that contains the characters "$var" and "10" as elements. Using another line as an example: Verbose = true; # Should become [Verbose, true] aka no whitespace is present This is needed because I will be outputting these values to a new file (which a different piece of C++ code will read) to instantiate dictionary objects. Just to give you a little taste of what it might look like (just making it up as I go along): define new dictionary name: [flags] # Start defining keys => values new key name: Verbose new value val: 10 # End dictionary Oh, and here is the code I currently have along with what it is doing (incorrectly): sub makeref($) { my @line = (split (/=/)); # Produces ["Verbose", " true"]; }

    Read the article

  • how to trigger notification from other framework in atmosphere (comet)?

    - by Sean Xiong
    basically i have read some samples, but all are self contained in one servlet. such as: use doGet to establish the long polling connection, and then use doPost to trigger the event to notify all suspended connections. Here is my question: I have other web actions programming in spring mvc, in the spring mvc controller a user post a message via /message/post, how can I make this action to trigger the atmosphere handler to notify the suspended connections?

    Read the article

  • Is there a way to watch all COM activity on a computer?

    - by Fake Name
    I'm trying to deal with a piece of specialized hardware, that presents it's interface as a COM object, using win32com in Python. However, the documentation for how to actually set up the hardware through the COM object is sparse (it requires a significant amount of initialization), and entirely oriented at using a bunch of pre-built libraries for Visual Studio, which are not accessible through python. That said, is there any way to watch all local COM activity, so I can sort through the activity logs to try and figure out how the existing demo programs properly initialize the hardware, and replicate the behavior in my python script? Ideally, there would be something in the vein of wireshark for doing this. Note: I have very little (read: basically no) experience using COM, as my focus is mostly embedded hardware (and a little python dev on the side). However, I'm stuck with this particular device.

    Read the article

  • Can't get UpdateAttributeRequest to work

    - by dsabater
    I am trying to use the Metadata Web Service of Dynamics CRM to update the order of some picklist options using the UpdateAttributeRequest message. Though I get to change the attribute's DisplayName using the MergeLabels = false option, the picklist option values themselves seem immutable.

    Read the article

  • [Ruby] [gem] A GEM error shown during run the commend: gem update --system

    - by Alex
    I’m a freshman on Ruby and now trying to install ruby on my machine according to the Tutorial on http://wiki.openqa.org/display/WTR/Tutorial However, after I installed the ruby186-26, and run the command “gem update --system”, the following error occurred: C:\Documents and Settings\e482090\Desktopgem update --system c:/ruby/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:51:in initialize': Inval id argument - <Not Set>/.gemrc (Errno::EINVAL) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:51:inopen' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:51:in initi alize' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:36:innew' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:36:in do_con figuration' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:25:inrun' from c:/ruby/bin/gem:23 C:\Documents and Settings\e482090\Desktopgem install watir c:/ruby/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:51:in initialize': Inval id argument - <Not Set>/.gemrc (Errno::EINVAL) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:51:inopen' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:51:in initi alize' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:36:innew' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:36:in do_con figuration' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:25:inrun' from c:/ruby/bin/gem:23 Meanwhile, we have tried this on other machines and the result turned out ok. Thus, my question is why the error happened on my pc? Have you met this kind of error before?

    Read the article

  • :first-child fails when an element of a different class is dynamically inserted above

    - by koko
    So, I've encountered a situation where inserting an element of a different class/id breaks all css-rules on that :first-child. <div id="nav"> <div class="nSub">abcdef</div> <div class="nSub">abcdef</div> <div class="nSub">abcdef</div> <div class="nSub">abcdef</div> <div class="nSub">abcdef</div> </div> .nSub:first-child { margin-top:15px; -moz-border-radius-topleft:5px; /* ... */ } .nSub { background:#666; /* ... */ } .nSub:last-child { -moz-border-radius-bottomleft:5px; /* ... */ } As soon as I insert an element of another class/id above, like this: $('nav').insert({top:'<div id="newWF"></div>'}); all declarations for .nSub:first-child are being ignored in both FF 3.6 and Safari 4.

    Read the article

  • ORM vs SQL XML, very simple middle-tier

    - by synergetic
    I know it is rather heated question. But anyway I'd like to hear opinions of those in Stackoverflow. Given that XML support is quite good in SQL Server 2005/2008, and there's no concern about database independency, why one need Linq-to-SQL, Entity Framework, NHibernate and the likes, which are quite complex and awkward in advanced use-cases, if by using POCOs, XmlSerializer, and stored procedures which process XML, one can achieve a lot less complex middle-tier? For reference, see the link: http://weblogs.asp.net/jezell/archive/2007/04/13/who-needs-orm-i-ve-got-sql-2005.aspx

    Read the article

  • Image processing in a multhithreaded mode using Java

    - by jadaaih
    Hi Folks, I am supposed to process images in a multithreaded mode using Java. I may having varying number of images where as my number of threads are fixed. I have to process all the images using the fixed set of threads. I am just stuck up on how to do it, I had a look ThreadExecutor and BlockingQueues etc...I am still not clear. What I am doing is, - Get the images and add them in a LinkedBlockingQueue which has runnable code of the image processor. - Create a threadpoolexecutor for which one of the arguements is the LinkedBlockingQueue earlier. - Iterate through a for loop till the queue size and do a threadpoolexecutor.execute(linkedblockingqueue.poll). - all i see is it processes only 100 images which is the minimum thread size passed in LinkedBlockingQueue size. I see I am seriously wrong in my understanding somewhere, how do I process all the images in sets of 100(threads) until they are all done? Any examples or psuedocodes would be highly helpful Thanks! J

    Read the article

  • Call External Javascript using php

    - by Ajith
    I am try to add a javascript using php as follows <?php Header("content-type: application/x-javascript"); $serverIP=$_SERVER['REMOTE_ADDR']; echo "document.write(\"Your IP address is: <b>" . $serverIP . "</b>\")"; ?> Here i need to print my output as follows Your IP address is: 127.0.0.1 but it is showing result like document.write("Your IP address is: <b>127.0.0.1</b>"). i am using apache server in ubuntu.What is wrong with me. help me please...

    Read the article

  • print address of virtual member function

    - by hidayat
    I am trying to print the address of a virtual member function. If I only wants to print the address of the function I can write: print("address: %p", &A::func); But I want to do something like this: A *b = new B(); printf("address: %p", &b->func); printf("address: %p", &b->A::func); however this does not compile, is it possible to do something like this even do looking up the address in the vtable is done in runtime?

    Read the article

  • can load data(google app enngine) from http://localhost:8100/remote_api ..

    - by zjm1126
    i can download data from gae (http://zjm1126.appspot.com/remote_api), this is code: appcfg.py download_data --application=zjm1126 --url=http://zjm1126.appspot.com/remote_api --filename=a.csv and it successful : D:\zjm_demo\app>appcfg.py download_data --application=zjm1126 --url=http://zjm1 126.appspot.com/remote_api --filename=a.csv Downloading data records. [INFO ] Logging to bulkloader-log-20100618.162421 [INFO ] Throttling transfers: [INFO ] Bandwidth: 250000 bytes/second [INFO ] HTTP connections: 8/second [INFO ] Entities inserted/fetched/modified: 20/second [INFO ] Batch Size: 10 [INFO ] Opening database: bulkloader-progress-20100618.162421.sql3 [INFO ] Opening database: bulkloader-results-20100618.162421.sql3 [INFO ] Connecting to zjm1126.appspot.com/remote_api Please enter login credentials for zjm1126.appspot.com Email: [email protected] Password for [email protected]: [INFO ] Downloading kinds: [u'LogText', u'Greeting', u'Forum', u'Thread'] .... [INFO ] Have 0 entities, 0 previously transferred [INFO ] 0 entities (8804 bytes) transferred in 11.3 seconds so i want to know can load data from 127.0.0.1 , this is my code : appcfg.py download_data --application=zjm1126 --url=http://localhost:8100/remote_api --filename=a.csv and the error is : D:\zjm_demo\app>appcfg.py download_data --application=zjm1126 --url=http://loca lhost:8100/remote_api --filename=a.csv Downloading data records. [INFO ] Logging to bulkloader-log-20100618.162325 [INFO ] Throttling transfers: [INFO ] Bandwidth: 250000 bytes/second [INFO ] HTTP connections: 8/second [INFO ] Entities inserted/fetched/modified: 20/second [INFO ] Batch Size: 10 [INFO ] Opening database: bulkloader-progress-20100618.162325.sql3 [INFO ] Opening database: bulkloader-results-20100618.162325.sql3 Please enter login credentials for localhost Email: [email protected] Password for [email protected]: [INFO ] Connecting to localhost:8100/remote_api [ERROR ] Exception during authentication Traceback (most recent call last): File "d:\Program Files\Google\google_appengine\google\appengine\tools\bulkload er.py", line 3169, in Run self.request_manager.Authenticate() File "d:\Program Files\Google\google_appengine\google\appengine\tools\bulkload er.py", line 1178, in Authenticate remote_api_stub.MaybeInvokeAuthentication() File "d:\Program Files\Google\google_appengine\google\appengine\ext\remote_api \remote_api_stub.py", line 542, in MaybeInvokeAuthentication datastore_stub._server.Send(datastore_stub._path, payload=None) File "d:\Program Files\Google\google_appengine\google\appengine\tools\appengin e_rpc.py", line 346, in Send f = self.opener.open(req) File "D:\Python25\lib\urllib2.py", line 387, in open response = meth(req, response) File "D:\Python25\lib\urllib2.py", line 498, in http_response 'http', request, response, code, msg, hdrs) File "D:\Python25\lib\urllib2.py", line 425, in error return self._call_chain(*args) File "D:\Python25\lib\urllib2.py", line 360, in _call_chain result = func(*args) File "D:\Python25\lib\urllib2.py", line 506, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 404: Not Found [INFO ] Authentication Failed so what should i do , thanks

    Read the article

  • Google code: what kind of license should I use?

    - by Dran Dane
    Hello I would like to store my code on a repository such as Google Code. What kind of license should I use? I don't want to block me. My code may be open source and reused by others but I want to be able to reuse it in any open source project or not, and gainful project or not. Thank you.

    Read the article

  • How can I sandbox Python in pure Python?

    - by Blixt
    I'm developing a web game in pure Python, and want some simple scripting available to allow for more dynamic game content. Game content can be added live by privileged users. It would be nice if the scripting language could be Python. However, it can't run with access to the environment the game runs on since a malicious user could wreak havoc which would be bad. Is it possible to run sandboxed Python in pure Python? If not, are there any open source script interpreters written in pure Python that I could use? The requirements are support for variables, basic conditionals and function calls (not definitions).

    Read the article

  • how important to register(license) your own components?

    - by XBasic3000
    i am new to component building, and i had notice to other components has a a comment on top of there units like agreement, terms and condition etc. wither its free or commercial. How important is to register(license) your own component and how/where? and when do you need to register it? how about the freeware? must have a licese too?

    Read the article

  • Help with Regular Expression

    - by shivesh
    Hello I need help with Regular Expression, I want to match each section (number and it's text - 2 groups), the text can be multi line, each section ends when another section starts (another number) or when .END is reached or EOF. Demo Expression: \(\d{1,3}\) ([\s\S]*?)(\.END|\(\d{1,3}\)) Input text: (1) some text some text some text some text some text some text (2) some text some textsome text (3) some textsome text some textsome textsome text (4) some text .END first group should match number (with brackets) and second group should match corresponded text.

    Read the article

  • Unit tests and Test Runner problems under .Net 4.0

    - by Brett Rigby
    Hi there, We're trying to migrate a .Net 3.5 solution into .Net 4.0, but are experiencing complications with the testing frameworks that can operate using an assembly that is built using version 4.0 of the .Net Framework. Previously, we used NUnit 2.4.3.0 and NCover 1.5.8.0 within our NAnt scripts, but NUnit 2.4.3.0 doesn't like .Net 4.0 projects. So, we upgraded to a newer version of the NUnit framework within the test project itself, but then found that NCover 1.5.8.0 doesn't support this version of NUnit. We get errors in the code saying words to the effect of the assembly was built using a newer version of the .Net Framework than is currently in use, as it's using .Net Framework 2.0 to run the tools. We then tried using Gallio's Icarus test runner GUI, but found that this and MbUnit only support up to version 3.5 of the .Net Frameword and the result is "the tests will be ignored". In terms of the coverage side of things (for reporting into CruiseControl.net), we have found that PartCover is a good candidate for substituting-out NCover, (as the newer version of NCover is quite dear, and PartCover is free), but this is a few steps down the line yet, as we can't get the test runners to work first!! Can any shed any light on a testnig framework that will run under .Net 4.0 in the same way as I've described above? If not, I fear we may have to revert back to using .Net 3.5 until the manufacturers of the tooling that we're currently using have a chance to upgrade to .Net 4.0. Thanks.

    Read the article

  • Dynamically loading type in Silverlight with Type.GetType()

    - by ondesertverge
    Trying to specify the assembly name like this: Type.GetType(string.Format("{0}.{1}, {0}", widget.Assembly, widget.Class)); Throws this: The requested assembly version conflicts with what is already bound in the app domain or specified in the manifest Trying it without the the assembly: Type.GetType(string.Format("{0}.{1}", widget.Assembly, widget.Class)); Returns null. I am looking for a way to instantiate a class using it's fully qualified name in Silverlight 4.0. Thanks.

    Read the article

  • Define a varbinary(max) column using sqlalchemy on MS SQL Server

    - by Mark Hall
    Hi, I'm querying an SQL Server database using SQLAlchemy and need to cast a column to varbinary(max). The thing I am struggling with is the "max" part. I can get the cast to work for any actual number (say varbinary(20)), but I cannot find how to get it to work for the "max" size of the varbinary column. Any pointers? Links? Solutions? Regards, Mark

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >