Search Results

Search found 1816 results on 73 pages for 'attach'.

Page 28/73 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • "Use of uninitialised value" despite of memset

    - by Framester
    Hi there, I allocate a 2d array and use memset to fill it with zeros. #include<stdio.h> #include<string.h> #include<stdlib.h> void main() { int m=10; int n =10; int **array_2d; array_2d = (int**) malloc(m*sizeof(int*)); if(array_2d==NULL) { printf("\n Could not malloc 2d array \n"); exit(1); } for(int i=0;i<m;i++) { ((array_2d)[i])=malloc(n*sizeof(int)); memset(((array_2d)[i]),0,sizeof(n*sizeof(int))); } for(int i=0; i<10;i++){ for(int j=0; j<10;j++){ printf("(%i,%i)=",i,j); fflush(stdout); printf("%i ", array_2d[i][j]); } printf("\n"); } } Afterwards I use valgrind [1] to check for memory errors. I get following error: Conditional jump or move depends on uninitialised value(s) for line 24 (printf("%i ", array_2d[i][j]);). I always thought memset is the function to initialize arrays. How can I get rid off this error? Thanks! Valgrind output: ==3485== Memcheck, a memory error detector ==3485== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==3485== Using Valgrind-3.5.0-Debian and LibVEX; rerun with -h for copyright info ==3485== Command: ./a.out ==3485== (0,0)=0 (0,1)===3485== Use of uninitialised value of size 4 ==3485== at 0x409E186: _itoa_word (_itoa.c:195) ==3485== by 0x40A1AD1: vfprintf (vfprintf.c:1613) ==3485== by 0x40A8FFF: printf (printf.c:35) ==3485== by 0x8048724: main (playing_with_valgrind.c:39) ==3485== ==3485== ==3485== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- ==3485== Conditional jump or move depends on uninitialised value(s) ==3485== at 0x409E18E: _itoa_word (_itoa.c:195) ==3485== by 0x40A1AD1: vfprintf (vfprintf.c:1613) ==3485== by 0x40A8FFF: printf (printf.c:35) ==3485== by 0x8048724: main (playing_with_valgrind.c:39) [1] valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes --db-attach=yes ./a.out [gcc-cmd] gcc -std=c99 -lm -Wall -g3 playing_with_valgrind.c

    Read the article

  • Using UNC path as paths location in Mecurial IIS6 Server2003

    - by Chris M
    I'm running the latest Mercurial and Python 2.6; IIS6 is using the wildcard ISAPI method to attach the site to the Mecurial hgwebdir_wsgi [paths] \ = \\COMP3254\TestRepo\* [web] baseurl = / allow_push = * push_ssl = false style = monoblue The setup works perfectly if I reference the local drive E:\repo* but doesnt work if I specify the network as above; I've given the server (MERCDEV01$) full permissions on the shared folder on COMP3254, I can't think of any other reason it wouldn't work. Any ideas?

    Read the article

  • HTTP Proxy with monitor UI for local install

    - by zedoo
    Hi, I'm looking for an HTTP Proxy/GUI combination that should be installed locally on my Windows PC. The UI should display something similar to Firebugs "Network" tab, showing request/response headers and content as plaintext. It would be cool if I could attach requests to a sort of node for later comparison, similar to what you can do when using the Proxy that comes with JMeter.

    Read the article

  • Uploading photo from my website, and send it via email.

    - by Sohail
    Hello everybody, I have a form, which gathers some Information of my visitor, and when they submit the Information, it will send it to my desired email. now I need another input "file" that they can even attach their photo and send along with it to my email not on my server, I have no Idea how can I do that, I would appreciate any helps.

    Read the article

  • SQL Server 2008 : Standard or SQL Express

    - by dr
    Which is a better choice on a development box if you primarily develop Asp.Net applications and SSRS reports. I have never had to use the Express editions, so I don't really know the pros or cons. The cons I have listed for Standard+ editions are: toll it takes on system resources pain to attach database for projects pain to detach unused databases $$$ Pros: You have everything you need Management Studio features Easy move to production

    Read the article

  • Android - Showing Dialog from custom component

    - by Julian Arz
    Hi! I am writing a custom component (derived from a relative layout) which has to show a dialog, Is there a way to do this using callbacks like oncreatedialog or onpreparedialog? if not: if i have to create the dialog outside oncreatedialog, i have to "attach it to an Activity with setOwnerActivity(Activity)". How can the custom component access the activity it is used in, when it is used in the activity's xml-layout and not created from code?

    Read the article

  • Underlining RichTextArea content by default in Silverlight 4

    - by Rahul N
    I'm uisng a RichTextArea to display my html content in SL 4,I want to underline the content displayed by the control ( without modifying the html) and also attach an event of Onclick on the text . I tried different options i.e using RichTextArea in the content template of a Hyperlinkbutton but as the content of RichTextArea cannot be set directly, this was ruled out. Any suggestions ?

    Read the article

  • How to add an UIImage in MailComposer Sheet of MFMailComposeViewController in iPhone

    - by rkbang
    Hi everybody, I am asking this question second time in a different manner. I want to insert UIImages inside the composer sheet of MFMailComposerViewController. Please note I dont want to attach them but I want to place them in a table using HTML code which will be the part of the email body. I am really finding it difficult to find any help online, so if anyone come across any tutorial or any kind of info plz let me know. Tnx in advance.

    Read the article

  • Event to listen to attribute changes

    - by Luis
    I dont think this is possible but maybe someone knows a way to achieve this. I want to attach an event to an html element to listen to attribute change. So say for instance that I want something to happen when a visibility of a div changes. The reason is that I have no control over the javascript that is switching the visibility, hence the need for an event. Thanks

    Read the article

  • Custom Command WPF

    - by Sachin Gaur
    I have an application that contains Menu and sub menus. I have attached Appliocation Commands to some of the sub menu items such as Cut, Copy and Paste. I also have some other menu items that do not have application commands. How could I add a custom command binding to those sub menu items? I have gone through this artcile but unable to attach event to my sub menu items.

    Read the article

  • C# 3.5: Dynamically adding classes without recompiling

    - by Nir
    I'd like to build an infrastructure that will monitor a server and check ping, response time, and more. The catch is that future checks (for example: does a certain file exist) will be added without recompiling the infrastructure. How do I build it in such a way that will enable me to attach inherited classes with different functionality, and execute them without recompiling? Thanks!

    Read the article

  • Sending an image in a faceless email

    - by anurag
    I am trying to send a faceless email (sending an email without showing the interface), using the code below. I also want to attach an image to this email. Is this possible? - (void) sendEmailTo:(NSString *)toStr withSubject:(NSString *)subjectStr withBody:(NSString *)bodyStr { NSString *emailString=[[NSString alloc] initWithFormat:@"mailto:?to=%@&subject=%@&body=%@", [toStr stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding], [subjectStr stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding], [bodyStr stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:emailString]]; [emailString release]; }

    Read the article

  • Control is set to false, jQuery selector fails

    - by Damien Joe
    Hi I have some controls on an asp.net modal which I show manually via code behind. Now I am trying to attach a selector on one of the controls inside pageLoad(), problem being is that the modal container is initially set to visible=false. I tried checking for length but it still throws exception if ($('#<%= myControl.ClientId %>').length > 0) { $('#<%= myControl.ClientID %>').click(function() { // Do work }); } Compiler Error Message: CS0103: The name 'myControl' does not exist in the current context

    Read the article

  • Change inline onclick to unobtrusive jquery

    - by Clint
    Hi, I need to target all links with a class of hslide and attach this to them. Any jquery guru's out there know how to do this? onclick="return hs.expand(this, { slideshowGroup: 'groupC0', wrapperClassName: 'rounded-white', outlineType : 'rounded-white', dimmingOpacity: 0.8, align : 'center', transitions : ['expand', 'crossfade'], fadeInOut: true });" Thanks, C

    Read the article

  • HTML5 Canvas + select / drag-and-drop features in a JS lib?

    - by István
    Hi, I'd like to use HTML5 Canvas, but I'd like to use it in terms of shapes, texts and curves, able to attach traditional DOM events like onClick or drag-and-drop functions. Is there any Javascript library that is able to do that for me? I've seen that gwt-canvas is close to this approach, but haven't looked it in details. Thanks, Istvan

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >