Search Results

Search found 12222 results on 489 pages for 'initial context'.

Page 225/489 | < Previous Page | 221 222 223 224 225 226 227 228 229 230 231 232  | Next Page >

  • Memory leaks in libxml2.2

    - by KSH
    I am using libxml2 to parse xml content in my iPhone app. The xml content is downloaded from a server similar to the Apple's own TopSongs sample app. When I check for leaks using the Instruments tool, I see memory leaks being reported on xmlNewParserCtxt, xmlNewInputStream and xmlAllocParserInputBuffer. I have called xmlFreeParserCtxt(context) at applicable places (dealloc). Am I missing something else ? Is this a known issue to contend with when using libxml2 parsers ?

    Read the article

  • keeping track of multiple runs of the same function, part 2

    - by qwertymk
    This is related to this Anyway what I need is actually something slightly different I need some way of doing this: function run(arg) { this.ran = this.ran || false; if (!this.ran) init; /* code */ this.ran = true; } This works fine, I just want to make sure that this code works even when this in case it was called with call() or apply() Check this out for what I'm talking about, All of the calls after the first one should all be true, no matter the context

    Read the article

  • Which Cassandra API provides the highest level of abstraction?

    - by knorv
    There are a lot of Cassandra API:s available and usually the programming language preference determines the choice of API. However, if we take the programming language component out of the equation, what Cassandra API provides the highest level of abstraction? Definition of "level of abstraction" in this context: An API providing a lot of extra goodies such as index handling, etc would be considered being at a higher abstraction layer than a bare bones "close to Thrift" API.

    Read the article

  • when would you use PendingIntent?

    - by Moshik
    Hi, I tried to understand from the api the porpese of PendingIntent, coz sometimes some method i use requires this, i still didnt get the idea right, anyone could exaplin? why cant i juse use context? thanks, moshik

    Read the article

  • I cannot get mlocManager.removeUpdates(mlocListener); to work

    - by Colin
    I have an app that uses the LocationManage functions which works well until the app is stopped or paused. The location listener function is still carrying on in the background. Relevant bits of code follow. When I click home or back the onstop() function is being triggered correctly. package uk.cr.anchor; import android.app.Activity; import android.content.Context; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.media.MediaPlayer; import android.media.RingtoneManager; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.TableRow; import android.widget.Toast; import android.widget.ToggleButton; import android.content.SharedPreferences; import android.graphics.Color; public class main extends Activity { /** Called when the activity is first created. */ private LocationManager mlocManager; private LocationListener mlocListener; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); LocationManager mlocManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); LocationListener mlocListener = new MyLocationListener(); mlocManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, 0, 0, mlocListener); } @Override protected void onStop(){ stoplistening(); super.onStop(); } /* Class My Location Listener */ public class MyLocationListener implements LocationListener { @Override public void onLocationChanged(Location loc) { loc.getLatitude(); loc.getLongitude(); etc etc etc } private void stoplistening() { if (mlocManager != null) { Toast.makeText( getApplicationContext(), "kill", Toast.LENGTH_SHORT ).show(); mlocManager.removeUpdates(mlocListener); } else { Toast.makeText( getApplicationContext(), " not kill", Toast.LENGTH_SHORT ).show(); } } } I always get the "not kill" message. Can anyone help me!

    Read the article

  • Access workflow ExectionProperties from Activity

    - by rekna
    When I derive an activity from NativeActivity, I can access Workflow executionproperties using the NativeActivityContext like this: context.Properties.Find("propertyname"); Some of my activities derive from Activity, because I they define a coded workflow using the Implementation property. An Activity has an ActivityContext, which does not provide access to the workflow execution properties, it does not have a Properties property. Is there another way to get access to the workflow execution properties from within an Activity

    Read the article

  • What's the purpose of the unnamed namespace?

    - by bbazso
    In a .cpp file, if I decare a constant as follows: namespace { const int UDP_PORT_MIN = 1024; const int UDP_PORT_MAX = 65535; } vs. just: const int UDP_PORT_MIN = 1024; const int UDP_PORT_MAX = 65535; What's the difference between these two? I often see constant definitions declared in an unnamed namespace, so I was wondering what's the purpose of the unnamed namespace in this context?

    Read the article

  • Passing data between asp.net pages

    - by user204588
    Hello, I'm wondering the opinion of what is the best way to pass a lot of values between pages. I was thinking of either saving the values to a database, using context.Items[], or Session[]. I'm not sure about what is the best method. I'm passing probably around 40 variables.

    Read the article

  • JAVA: how to load database url from web.xml?

    - by user357255
    I'm using persistence API and want to load jdbc URL from web.xml. URL should be a context parameter of servlet. I can't find how to construct EntityManagerFactory not using persistence.xml. May be I should create PersistenceUnit in servlet and set some parameters? Can you give me some short example? Thank you

    Read the article

  • Adding object to child collection causes entire collection to load in Fluent NHibernate.

    - by Mike C.
    Hello, I have my Parent object, which contains an ICollection of Children objects. The Children are lazy loaded and I do not need them in the context of my scenario. However, when I try to add a new child object to my Children collection, it kicks off the lazy load and loads all 7000 child records. I assume I am making a newbie mistake. Anybody out there know how I can fix this? Thanks!

    Read the article

  • BlackBerry - Handle and translate messages (sms/email/pim/pin)?

    - by humble coffee
    Does the native Blackberry API allow for the modification of any messaging interface? For example, I'd like to be able to build an app that added a button at the bottom of a received message which says 'translate this'. I've heard that this kind of thing is possible using J2ME plus the native BlackBerry API. Can this be done for all kinds of messages, eg SMS, email and BB messaging? The translation aspect is not relevant, it just provides the context for the kind of feature I'm after.

    Read the article

  • jQuery ajax form and Zend_Form file upload

    - by Sinisa Valentic
    If i submit my ajax form from jQuery, and do print_r($_FILES); i get a list of files uploaded, but if i do something like this $add_form->sound_file->isUploaded(); or $params = $this->_getAllParams(); print_r($params); i don't get my file in zend parametars, and i don't get it uploaded!? Mayb the problem is with he context beng ajax?!

    Read the article

  • spring component scan for classes

    - by awk
    I want to scan all the classes in a package that that are subclasses of the particular class. Then I want to take these classes and for each of them instantiate a bean of same type, using the class as a property. Then I want to gather all these anonymous beans and put them into collection. Is it possible to configure spring context in XML like this? Thx

    Read the article

  • Detecting if two png images are different

    - by Benjol
    (Context: running autohotkey scripts to try and automate some tests. The plan is to take screenshots and then compare them to 'standard' screenshots to detect if output has changed). Is there a 'clever' way to check if two png images are different? By clever I mean other than comparing them byte by byte? (after having compared their size, obviously)

    Read the article

  • Custom spring bean

    - by Hari
    Hi, I want to convert some of our internal API into a spring bean that we can use in other projects. This API needs some instantiation and other logic which I want to encapsulate in this bean so that we can just put the bean into our app context with necessary propoerties alone. I remember having read an article on this somewhere in the past - but cant find it now. Any pointers to something similar will be helpful

    Read the article

  • What's -mutableSetValueForKey: returning, actually? Is that something special?

    - by dontWatchMyProfile
    From the docs: You usually access to-many relationships using mutableSetValueForKey:, which returns a proxy object that both mutates the relationship and sends appropriate key-value observing notifications for you. So this returns an "intelligent" NSMutableSet which automatically lets the context delete objects when they get deleted from the set, and reverse? Is that a proxy object?

    Read the article

  • Android: Stopping method to be called twice if already running.

    - by user285831
    I'm trying to prevent my application to call the same method twice in the event of a double-click, or if the user presses different buttons quickly, almost at the same time. I have clickable Views, acting as buttons, that call the same method but passing different parameters. This is the call: startTheSearch(context, getState(), what, where); Inside this method I'm creating a new Thread, because it queries a web server for the result: new Thread(new Runnable() { public void run() { progDiag = ProgressDialog.show(ctx, null, "Searching", true); getServerXML(context, what, where, searchIsCustom, mOffset); handler.sendEmptyMessage(0); } }).start(); The problem is that upon two quick clicks, the method is fired twice, two threads are created, and consequently two new activities are created. That makes my app crash. When the methods are done, and we have the result from the server, we call the handler: private Handler handler = new Handler() { @Override public void handleMessage(Message msg) { super.handleMessage(msg); try { Intent i = new Intent(Golf.this, Result.class); Bundle b = new Bundle(); b.putString("what", mWhat); b.putString("where", mWhere); b.putInt("offset", mOffset); b.putBoolean("searchIsCustom", searchIsCustom); i.putExtras(b); startActivityForResult(i, Activity.RESULT_OK); progDiag.dismiss(); } catch (Exception e) { Alerts.generalDialogAlert("Error", "settings", ctx); } } }; I tried to have a global boolean variable called "blocked" initially set to false, creating a condition like: if(!blocked){ blocked = true; new Thread(new Runnable() { public void run() { But this only seems to work on slower phones like the G1, I tried on Nexus and before it set blocked = true, the second request has was granted. So is there any way I can block the method being called if it's already running, or if the thread has started so it wont create a new one? Please, I really need to fix this. I've been developing on Android for almost 2 months now, but I'm yet to tackle that bug. Thanks in advance.

    Read the article

  • Change the default Open With

    - by emptyheaded
    How can I change the program a file is opened with by default (or at least add that program in the list of programs from Open With... ) using C# or VB.NET ? What I mean is, I would like to have programs with the extension abc open by default by the program abc.exe. Or, have the program abc.exe in the list of programs that will be shown in the context menu on the "Open With" option, for files with extension "xls".

    Read the article

< Previous Page | 221 222 223 224 225 226 227 228 229 230 231 232  | Next Page >