Search Results

Search found 47805 results on 1913 pages for 'return address'.

Page 67/1913 | < Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >

  • Extract IP address from an html string (python)

    - by GoJian
    My Friends, I really want to extract a simple IP address from a string (actually an one-line html) using Python. But it turns out that 2 hours passed I still couldn't come up with a good solution. >>> s = "<html><head><title>Current IP Check</title></head><body>Current IP Address: 165.91.15.131</body></html>" -- '165.91.15.131' is what I want! I tried using regular expression, but so far I can only get to the first number. >>> import re >>> ip = re.findall( r'([0-9]+)(?:\.[0-9]+){3}', s ) >>> ip ['165'] In fact, I don't feel I have a firm grasp on reg-expression and the above code was found and modified from elsewhere on the web. Seek your input and ideas!

    Read the article

  • Converting an IP address to a number:

    - by Quandary
    Question: When I convert the IP address 192.168.115.67 to a number, is it done like this: 192*256^3 + 168*256^2+115*256^1+67*256^0 = 3232265027 or like this: 192*256^0 + 168*256^1+115*256^2+67*256^3 = 1131653312 I find both variants online, and frankly it doesn't matter as long as reverse it according to the conversion process. But I want to calculate the IP V6 from the IPv4 address, and it seems both variants are on the web... resulting in different IPv6 addresses, and only one can be correct... I use the 1131653312 variant, as 1131653312 is the variant .NET gives me, but 3232265027 is the variant I find on the web for IPv4 to IPv6 conversion...

    Read the article

  • Faking a Single Address Space

    - by dsimcha
    I have a large scientific computing task that parallelizes very well with SMP, but at too fine grained a level to be easily parallelized via explicit message passing. I'd like to parallelize it across address spaces and physical machines. Is it feasible to create a scheduler that would parallelize already multithreaded code across multiple physical computers under the following conditions: The code is already multithreaded and can scale pretty well on SMP configurations. The fact that not all of the threads are running in the same address space or on the same physical machine must be transparent to the program, even if this comes at a significant performance penalty in some use cases. You may assume that all of the physical machines involved are running operating systems and CPU architectures that are binary compatible. Things like locks and atomic operations may be slow (having network latency to deal with and all) but must "just work".

    Read the article

  • What is the trick in pAddress & ~(PAGE_SIZE - 1) to get the page's base address

    - by Dbger
    Following function is used to get the page's base address of an address which is inside this page: void* GetPageAddress(void* pAddress) { return (void*)((ULONG_PTR)pAddress & ~(PAGE_SIZE - 1)); } But I couldn't quite get it, what is the trick it plays here? Conclusion: Personally, I think Amardeep's explanation plus Alex B's example are best answers. As Alex B's answer has already been voted up, I would like to accept Amardeep's answer as the official one to highlight it! Thanks you all.

    Read the article

  • Sending an anonymous email to my own address

    - by N3HL
    I want to send an anonymous email to my own gmail/hotmail/yahoo/any other mail service address (Im not trying to spam or something like that). Why? I have a .NET application and I want to add a "Send log to the developer" feature (attaching the log) using SmtpClient. The fact is I've read like 30+ pages, and found out, i.e. gmail's smtp client doesn't allow anonymous connections, and many other things. The idea is to receive a mail message like this: From: [email protected] (non-existent email really) To: [email protected] (this would be my real address which will recieve the logs attachments) Subject: Issue report nºX (auto-generated) Body: From a textbox Attachments: logs attached Is this possible? If so, how do I achieve it?

    Read the article

  • how to use ip address in xsl

    - by user1597122
    I'm using xsl to generate html from xsl. I have to use ip address in name of the class in css like this: <td><div title="delete" > <xsl:attribute name="class"> delete_link_<xsl:value-of select="destinationIp"/> </xsl:attribute> <img class="row-remover" src="/media/img/remove.png"/> </div></td> and i have this jquery function: $('.delete_link_<xsl:value-of select="destinationIp"/>').click( function() { // do some thing here }); but because there are 'dots' in ip address, the above code doesn't work. when i remove dots of destinationIp tag in xml file, it works. so i think it has problem with 'dot'. any idea to make it work? really thanks :)

    Read the article

  • Adding a subject line to mail address in ReCaptcha Mailhide

    - by bongman1612
    I'm not sure if this can be done. I was looking to for a way to add a subject line to an email address hidden via reCaptcha Mailhide. Usually we have a mailto tag which include a subject like so:- <a href="mailto:[email protected]">The text of your link</a> However when we use recaptcha mailhide, we encrypt the email address and the reCaptcha decrypts it for us on completion of the captcha (sort of) So nowhere am I actually setting the subject of the email. Is there a workaround for this?

    Read the article

  • C# Can I return HttpWebResponse result to iframe - Uses Digest authentication

    - by chadsxe
    I am trying to figure out a way to display a cross-domain web page that uses Digest Authentication. My initial thought was to make a web request and return the entire page source. I currently have no issues with authenticating and getting a response but I am not sure how to properly return the needed data. // Create a request for the URL. WebRequest request = WebRequest.Create("http://some-url/cgi/image.php?type=live"); // Set the credentials. request.Credentials = new NetworkCredential(username, password); // Get the response. HttpWebResponse response = (HttpWebResponse)request.GetResponse(); // Get the stream containing content returned by the server. Stream dataStream = response.GetResponseStream(); // Open the stream using a StreamReader for easy access. StreamReader reader = new StreamReader(dataStream); // Read the content. string responseFromServer = reader.ReadToEnd(); // Clean up the streams and the response. reader.Close(); dataStream.Close(); response.Close(); return responseFromServer; My problems are currently... responseFromServer is not returning the entire source of the page. I.E. missing body and head tags The data is encoded improperly in responseFromServer. I believe this has something to do with the transfer encoding being of the type chunked. Further more... I am not entirely sure if this is even possible. If it matters, this is being done in ASP.NET MVC 4 C#. Thanks, Chad

    Read the article

  • jQuery Autocomplete - Multicolumn and Return Data rather than Value

    - by MarkRobinson
    I am currently using the DevBridge jQuery Autocomplete plugin - it works fine as is, however I would like to display the returned information in a multi-column view, but yet when clicked only return the first value. HTML <form class="form" action="index.php" onsubmit="alert('Submit Form Event'); return false;"> <div id="selection"></div> <input type="text" name="q" id="query" class="textbox" /> </form> Javascript jQuery(function() { var options = { serviceUrl: '/autocompleterequestcall.php', maxHeight:400, width:600, fnFormatResult: fnFormatResult, deferRequestBy: 0 //miliseconds }; a1 = $('#query').autocomplete(options); }); So I expect I would need to use the fnFormatResult to somehow display the multicolumn values, which are separated by |, ie. REFERENCEID | POSTCODE | ADDRESS_LINE_1 | SURNAME I would have liked to wrap the whole return up as a <table> but I can't figure out where to put the start <table> and end </table> tags, or do I just replace | with </div><div>. Then, when an item is selected, instead of returning REFERENCEID | POSTCODE | ADDRESS_LINE_1 | SURNAME I would just like to see REFERENCEID

    Read the article

  • php: how to return an HTTP 500 code on any error, no matter what

    - by Jake
    Hi guys. I'm writing an authentication script in PHP, to be called as an API, that needs to return 200 only in the case that it approves the request, and 403 (Forbidden) or 500 otherwise. The problem I'm running into is that php returns 200 in the case of error conditions, outputting the error as html instead. How can I make absolutely sure that php will return an HTTP 500 code unless I explicitly return the HTTP 200 or HTTP 403 myself? In other words, I want to turn any and all warning or error conditions into 500s, no exceptions, so that the default case is rejecting the authentication request, and the exception is approving it with a 200 code. I've fiddled with set_error_handler() and error_reporting(), but so far no luck. For example, if the code outputs something before I send the HTTP response code, PHP naturally reports that you can't modify header information after outputting anything. However, this is reported by PHP as a 200 response code with html explaining the problem. I need even this kind of thing to be turned into a 500 code. Is this possible in PHP? Or do I need to do this at a higher level like using mod_rewrite somehow? If that's the case, any idea how I'd set that up? Thanks for any help. Jake

    Read the article

  • Disable Return key outside textareas on a Asp.Net web page (containing ajax code)

    - by Achim
    Hi, I have an Asp.Net web page, having the common Asp.Net form. The outer "border" of the page (i.e. main menu, header, ...) is build using normal Asp.Net code using a master page. The content of that page uses jQuery to display dynamic forms and to send data to the server. If I push the return key on that page, I jump to a (more or less) random page - which is not what the user expects. ;-) There are some text areas and the user must be able to enter line breaks. Otherwise it would be fine to disable the return key completely. Any bullet proof way to do that? I found some solutions on the web, which capture the keypress event and ignore \x13, but that does not really work. It works as long as the page has just loaded, but as soon as I have clicked on some elements, the return key behaves as usuall. Any hint would be really appreciated! Achim

    Read the article

  • how to return multiple array items using json/jquery

    - by Scarface
    Hey guys, quick question, I have a query that will usually return multiple results from a database, while I know how to return one result, I am not sure how to return multiple in jquery. I just want to take each of the returned results and run them through my prepare function. I have been trying to use 'for' to handle the array of data but I don't think it can work since I am returning different array values. If anyone has any suggestions, I would really appreciate it. JQUERY RETRIEVAL for(i=0; i < json.rows; i++) { $('#users_online').append(online_users(json[i])); $('#online_list-' + count2).fadeIn(1500); } PHP PROCESSING $qryuserscount1="SELECT active_users.username,COUNT(scrusersonline.id) AS rows FROM scrusersonline LEFT JOIN active_users ON scrusersonline.id=active_users.id WHERE topic_id='$topic_id'"; $userscount1=mysql_query($qryuserscount1); while ($row = mysql_fetch_array($userscount1)) { $onlineuser= $row['username']; $rows=$row['rows']; if ($username==$onlineuser){ $str2= "<a href=\"statistics.php?user=$onlineuser\"><div class=\"me\">$onlineuser</div></a>"; } else { $str2= "<b><a href=\"statistics.php?user=$onlineuser\"><div class=\"others\">$onlineuser</div></a></b>"; } $data['rows']=$rows; $data['entry']=$str1.$str2; }

    Read the article

  • i m trying to return list<object> from webmethod but gives error

    - by girish
    System.InvalidOperationException: There was an error generating the XML document. --- System.InvalidOperationException: The type WebService.Property.Property_Users was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically. at System.Xml.Serialization.XmlSerializationWriter.WriteTypedPrimitive(String name, String ns, Object o, Boolean xsiType) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write1_Object(String n, String ns, Object o, Boolean isNullable, Boolean needType) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write8_ArrayOfAnyType(Object o) at Microsoft.Xml.Serialization.GeneratedAssembly.ListOfObjectSerializer.Serialize(Object objectToSerialize, XmlSerializationWriter writer) at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id) --- End of inner exception stack trace --- at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id) at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o, XmlSerializerNamespaces namespaces) at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o) at System.Web.Services.Protocols.XmlReturnWriter.Write(HttpResponse response, Stream outputStream, Object returnValue) at System.Web.Services.Protocols.HttpServerProtocol.WriteReturns(Object[] returnValues, Stream outputStream) at System.Web.Services.Protocols.WebServiceHandler.WriteReturns(Object[] returnValues) at System.Web.Services.Protocols.WebServiceHandler.Invoke() public List<object> GetDataByModuleName(string ModuleName) { List<Property_Users> obj_UserList = new List<Property_Users>(); // performing some operation that add data to obj_UserList List < Object > myList = new List<object>(); return ConvertToObjectList<Property_Users>(obj_UserList); } public List<Object> ConvertToObjectList<N>(List<N> sourceList) { List<Object> result = new List<Object>(); foreach (N item in sourceList) { result.Add(item as Object); } return result; } [WebMethod] public List<object> GetDataByModuleName(string ModuleName) { List<object> obj_list = new List<object>(); obj_list = BAL_GeneralService.GetDataByModuleName(ModuleName); return obj_list; }

    Read the article

  • Can't return a List from a Compiled Query.

    - by Andrew
    I was speeding up my app by using compiled queries for queries which were getting hit over and over. I tried to implement it like this: Function Select(ByVal fk_id As Integer) As List(SomeEntity) Using db As New DataContext() db.ObjectTrackingEnabled = False Return CompiledSelect(db, fk_id) End Using End Function Shared CompiledSelect As Func(Of DataContext, Integer, List(Of SomeEntity)) = _ CompiledQuery.Compile(Function(db As DataContext, fk_id As Integer) _ (From u In db.SomeEntities _ Where u.SomeLinkedEntity.ID = fk_id _ Select u).ToList()) This did not work and I got this error message: Type : System.ArgumentNullException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Message : Value cannot be null. Parameter name: value However, when I changed my compiled query to return IQueryable instead of List like so: Function Select(ByVal fk_id As Integer) As List(SomeEntity) Using db As New DataContext() db.ObjectTrackingEnabled = False Return CompiledSelect(db, fk_id).ToList() End Using End Function Shared CompiledSelect As Func(Of DataContext, Integer, IQueryable(Of SomeEntity)) = _ CompiledQuery.Compile(Function(db As DataContext, fk_id As Integer) _ From u In db.SomeEntities _ Where u.SomeLinkedEntity.ID = fk_id _ Select u) It worked fine. Can anyone shed any light as to why this is? BTW, compiled queries rock! They sped up my app by a factor of 2.

    Read the article

  • Return an Oracle Associative Array from a function

    - by Paul Johnson
    Does anybody know if it is possible to return an associative array as the result of an Oracle function, if so do you have any examples? I have an Oracle package which contains an associative array declaration as defined below: TYPE EVENTPARAM IS TABLE OF NUMBER INDEX BY BINARY_INTEGER; This is then used in a stored procedure outside the package as follows: v_CompParams areva_interface.eventparam; The intention is to store an associative array of strings in the variable v_CompParams, returned from a Parse function in another package. The definition for which is as follows: PACKAGE STRING_MANIP IS TYPE a_array IS TABLE OF NUMBER INDEX BY BINARY_INTEGER; FUNCTION Parse (v_string VARCHAR2, v_delim VARCHAR2) RETURN a_array; FUNCTION RowCount(colln IN a_array) RETURN NUMBER; END; The code which implements this is: v_CompParams := STRING_MANIP.PARSE(v_CompID,v_Delim); Unfortunately it doesn't work, I get the error 'PLS-00382: expression is of wrong type'. I foolishly assumed, that since a_array derives from the same source Oracle type as the variable v_CompParams, that there would be no problem casting between them. Any help much appreciated. Kind Regards Paul J.

    Read the article

  • Return an empty collection when Linq where returns nothing

    - by ahsteele
    I am using the below statement with the intent of getting all of the machine objects from the MachineList collection (type IEnumerable) that have a MachineStatus of i. The MachineList collection will not always contain machines with a status of i. At times when no machines have a MachineStatus of i I'd like to return an empty collection. My call to ActiveMachines (which is used first) works but InactiveMachines does not. public IEnumerable<Machine> ActiveMachines { get { return Customer.MachineList .Where(m => m.MachineStatus == "a"); } } public IEnumerable<Machine> InactiveMachines { get { return Customer.MachineList .Where(m => m.MachineStatus == "i"); } } Edit Upon further examination it appears that any enumeration of MachineList will cause subsequent enumerations of MachineList to throw an exeception: Object reference not set to an instance of an object. Therefore, it doesn't matter if a call is made to ActiveMachines or InactiveMachines as its an issue with the MachineList collection. This is especially troubling because I can break calls to MachineList simply by enumerating it in a Watch before it is called in code. At its lowest level MachineList implements NHibernate.IQuery being returned as an IEnumerable. What's causing MachineList to lose its contents after an initial enumeration?

    Read the article

  • Should a connect method return a value?

    - by Matt S
    I was looking at some code I've inherited and I couldn't decided if I like a bit of code. Basically, there is a method that looks like the following: bool Connect(connection parameters){...} It returns true if it connects successfully, false otherwise. I've written code like that in the past, but now, when I see this method I don't like it for a number of reasons. Its easy to write code that just ignores the returned value, or not realize it returns a value. There is no way to return an error message. Checking the return of the method doesn't really look nice: if (!Connect(...)){....} I could rewrite code to throw an exception when it doesn't successfully connect, but I don't consider that an exceptional situation. Instead I'm thinking of refactoring the code as follows: void Connect(Connection Parameters, out bool successful, out string errorMessage){...} I like that other developers have to provide the success and error strings so they know the method has error conditions and I can know return a message Anyone have any thoughts on the matter? Thanks -Matt

    Read the article

  • C# How can I return my base class in a webservice

    - by HenriM
    I have a class Car and a derived SportsCar: Car Something like this: public class Car { public int TopSpeed{ get; set; } } public class SportsCar : Car { public string GirlFriend { get; set; } } I have a webservice with methods returning Cars i.e: [WebMethod] public Car GetCar() { return new Car() { TopSpeed = 100 }; } It returns: <Car> <TopSpeed>100</TopSpeed> </Car> I have another method that also returns cars like this: [WebMethod] public Car GetMyCar() { Car mycar = new SportsCar() { GirlFriend = "JLo", TopSpeed = 300 }; return mycar; } It compiles fine and everything, but when invoking it I get: System.InvalidOperationException: There was an error generating the XML document. --- System.InvalidOperationException: The type wsBaseDerived.SportsCar was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically. I find it strange that it can't serialize this as a straight car, as mycar is a car. Adding XmlInclude on the WebMethod of ourse removes the error: [WebMethod] [XmlInclude(typeof(SportsCar))] public Car GetMyCar() { Car mycar = new SportsCar() { GirlFriend = "JLo", TopSpeed = 300 }; return mycar; } and it now returns: <Car xsi:type="SportsCar"> <TopSpeed>300</TopSpeed> <GirlFriend>JLo</GirlFriend> </Car> But I really want the base class returned, without the extra properties etc from the derived class. Is that at all possible without creating mappers etc? Please say yes ;)

    Read the article

  • Return 0 where django quersyet is none

    - by gramware
    I have a django queryset in my views whose values I pack before passing to my template. There is a problem when the queryset returns none since associated values are not unpacked. the quersyet is called comments. Here is my views.py def forums(request ): post_list = list(forum.objects.filter(child='0')&forum.objects.filter(deleted='0').order_by('postDate')) user = UserProfile.objects.get(pk=request.session['_auth_user_id']) newpostform = PostForm(request.POST) deletepostform = PostDeleteForm(request.POST) DelPostFormSet = modelformset_factory(forum, exclude=('child','postSubject','postBody','postPoster','postDate','childParentId')) readform = ReadForumForm(request.POST) comments =list( forum.objects.filter(deleted='0').filter(child='1').order_by('childParentId').values('childParentId').annotate(y=Count('childParentId'))) if request.user.is_staff== True : staff = 1 else: staff = 0 staffis = 1 if newpostform.is_valid(): topic = request.POST['postSubject'] poster = request.POST['postPoster'] newpostform.save() return HttpResponseRedirect('/forums') else: newpostform = PostForm(initial = {'postPoster':user.id}) if request.GET: form = SearchForm(request.GET) if form.is_valid(): query = form.cleaned_data['query'] post_list = list((forum.objects.filter(child='0')&forum.objects.filter(deleted='0')&forum.objects.filter(Q(postSubject__icontains=query)|Q(postBody__icontains=query)|Q(postDate__icontains=query)))or(forum.objects.filter(deleted='0')&forum.objects.filter(Q(postSubject__icontains=query)|Q(postBody__icontains=query)|Q(postDate__icontains=query)).values('childParentId'))) if request.method == 'POST': delpostformset = DelPostFormSet(request.POST) if delpostformset.is_valid(): delpostformset.save() return HttpResponseRedirect('/forums') else: delpostformset = DelPostFormSet(queryset=forum.objects.filter(child='0', deleted='0')) """if readform.is_valid(): user=get_object_or_404(UserProfile.objects.all()) readform.save() else: readform = ReadForumForm()""" post= zip( post_list,comments, delpostformset.forms) paginator = Paginator(post, 10) # Show 10 contacts per page # Make sure page request is an int. If not, deliver first page. try: page = int(request.GET.get('page', '1')) except ValueError: page = 1 # If page request (9999) is out of range, deliver last page of results. try: post = paginator.page(page) except (EmptyPage, InvalidPage): post = paginator.page(paginator.num_pages) return render_to_response('forum.html', {'post':post, 'newpostform': newpostform,'delpost':delpostformset, 'username':user.username, 'comments':comments, 'user':user, },context_instance = RequestContext( request ))

    Read the article

  • Webmethod on my C# (server side) doesn't return data to client side (javascript)

    - by Philo
    I am using a c# Webmethod to return results to my client side written in Javascript. [WebMethod] public static string MyMethod(string Id) { SQL QUERIES and then .... // adding data to member class. Member member = new Member(Name, DOB, Sex, Member_Identification, Dates_of_services); return JsonConvert.SerializeObject(member); <-- member is a class of List strings } And on the client side you could invoke this method using the jQuery.ajax() function like this: $.ajax({ url: 'default.aspx/MyMethod', type: 'POST', contentType: 'application/json; charset=utf-8', data: JSON.stringify({ ID : ID }), success: on success { } }); function onSuccess(data) { // parses json returned data var jsondata = $.parseJSON(data.d); ..... } Now the data returned to the client side are Lists of Strings. This method works for me most times. However for one or two queries, the method runs forever without returning to the client side. On the server side however, I can use breakpoints and see that all the Lists of strings have been formed correctly. But I cannot seem to find out why they are never returned to the client side. My code reaches till the return statement on the server side and then the program just runs forever. It never reaches the function 'onsuccess' Can anyone tell me why this can happen? Anomalies in data maybe?

    Read the article

  • Passing pointer into function, data appears initialized in function, on return appears uninitialize

    - by Luke Mcneice
    Im passing function GetCurrentDate() the pointer to a tm struct. Within that function I printf the uninitialized data, then the initialized. Expected results. However when i return the tm struct appears uninitialized. See console output bellow. What am i doing wrong? uninitialized date:??? ???-1073908332 01:9448278:-1073908376 -1217355836 initialized date:Wed May 5 23:08:40 2010 Caller date:??? ???-1073908332 01:9448278:-1073908376 -121735583 int main() { test(); } int test() { struct tm* CurrentDate; GetCurrentDate(CurrentDate); printf("Caller date:%s\n",asctime (CurrentDate)); return 1; } int GetCurrentDate(struct tm* p_ReturnDate) { printf("uninitialized date:%s\n",asctime (p_ReturnDate)); time_t m_TimeEntity; m_TimeEntity = time(NULL); //setting current time into a time_t struct p_ReturnDate = localtime(&m_TimeEntity); //converting time_t to tm struct printf("initialized date:%s\n",asctime (p_ReturnDate)); return 1; }

    Read the article

  • JavaScript Module Pattern - What about using "return this"?

    - by Rob
    After doing some reading about the Module Pattern, I've seen a few ways of returning the properties which you want to be public. One of the most common ways is to declare your public properties and methods right inside of the "return" statement, apart from your private properties and methods. A similar way (the "Revealing" pattern) is to provide simply references to the properties and methods which you want to be public. Lastly, a third technique I saw was to create a new object inside your module function, to which you assign your new properties before returning said object. This was an interesting idea, but requires the creation of a new object. So I was thinking, why not just use "this.propertyName" to assign your public properties and methods, and finally use "return this" at the end? This way seems much simpler to me, as you can create private properties and methods with the usual "var" or "function" syntax, or use the "this.propertyName" syntax to declare your public methods. Here's the method I'm suggesting: (function() { var privateMethod = function () { alert('This is a private method.'); } this.publicMethod = function () { alert('This is a public method.'); } return this; })(); Are there any pros/cons to using the method above? What about the others?

    Read the article

  • release object of a return method object c

    - by Piero
    in run the app with the analyze build, and Xcode found me a lot of memory leak and there is one in particular that i don't know how solve here it is: - (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { UIImageView *sectionImage = [[UIImageView alloc] init]; if (section == 0)sectionImage.image = [UIImage imageNamed:@"myImage.png"]; return sectionImage; } so my question is, how i can release this sectionImage? if is the return of the method? EDIT: i have another question, analyze give me another memory leak, i have this: .h @property (nonatomic, retain) NSIndexPath *directCellPath; .m @synthesize directCellPath = _directCellPath; - (id)init{ if ((self = [super initWithNibName:@"MyViewController" bundle:nil])) { self.directCellPath = [[NSIndexPath alloc] init]; } return self; } then in the code i use it and finally in the dealloc i do this: - (void)dealloc { [_directCellPath release]; [super dealloc]; } and give me a memory leak on this line: self.directCellPath = [[NSIndexPath alloc] init]; why if i have deallocated it in the dealloc?

    Read the article

< Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >