Search Results

Search found 5419 results on 217 pages for 'warning'.

Page 50/217 | < Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >

  • return the variable used for using inside the using C#

    - by di3go
    Hello, I am returning the variable I am creating in a using statement inside the using statement (sounds funny): public DataTable foo () { using (DataTable properties = new DataTable()) { // do something return properties; } } Will this Dispose the properties variable?? After doing this am still getting this Warning: Warning 34 CA2000 : Microsoft.Reliability : In method 'test.test', call System.IDisposable.Dispose on object 'properties' before all references to it are out of scope. Any Ideas? Thanks

    Read the article

  • send mail by using php5

    - by rajson
    hi friends, i wish to send form data throw mailto() in php, but i got an warning msg that "Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\ please sugest me that what i have to do for send data to a mail id properly

    Read the article

  • What's the correct type to use for pointer subtraction on x64?

    - by Cheeso
    I'm just starting out with x64 compilation. I have a couple of char*'s, and I'm subtracting them. With a 32-bit compile, this works: char * p1 = .... char * p3 = ... int delta = p3 - p1; But if I compile for x64 I get a warning: warning C4244: 'initializing' : conversion from '__int64' to 'int', possible loss of data What is the correct type to use, to represent a difference between two pointers, that works in both x86 and x64 compiles?

    Read the article

  • How to export C++ function as a dll that throws exception?

    - by ShaChris23
    When I try to export the following function as a dll: extern "C" __declspec(dllexport) void some_func() { throw std::runtime_error("test throwing exception"); } Visual C++ 2008 gives me the following warning: 1>.\SampleTrainer.cpp(11) : warning C4297: 'some_func' : function assumed not to throw an exception but does 1> The function is extern "C" and /EHc was specified I need to extern "C" because I use Qt QLibrary to load the dll and resolve the function name. Without extern "C" it can't find the some_func() function.

    Read the article

  • Endianness conversion and g++ warnings

    - by SuperBloup
    I've got the following C++ code : template <int isBigEndian, typename val> struct EndiannessConv { inline static val fromLittleEndianToHost( val v ) { union { val outVal __attribute__ ((used)); uint8_t bytes[ sizeof( val ) ] __attribute__ ((used)); } ; outVal = v; std::reverse( &bytes[0], &bytes[ sizeof(val) ] ); return outVal; } inline static void convertArray( val v[], uint32_t size ) { // TODO : find a way to map the array for (uint32_t i = 0; i < size; i++) for (uint32_t i = 0; i < size; i++) v[i] = fromLittleEndianToHost( v[i] ); } }; Which work and has been tested (without the used attributes). When compiling I obtain the following errors from g++ (version 4.4.1) || g++ -Wall -Wextra -O3 -o t t.cc || t.cc: In static member function 'static val EndiannessConv<isBigEndian, val>::fromLittleEndianToHost(val)': t.cc|98| warning: 'used' attribute ignored t.cc|99| warning: 'used' attribute ignored || t.cc: In static member function 'static val EndiannessConv<isBigEndian, val>::fromLittleEndianToHost(val) [with int isBigEndian = 1, val = double]': t.cc|148| instantiated from here t.cc|100| warning: unused variable 'outVal' t.cc|100| warning: unused variable 'bytes' I've tried to use the following code : template <int size, typename valType> struct EndianInverser { /* should not compile */ }; template <typename valType> struct EndianInverser<4, valType> { static inline valType reverseEndianness( const valType &val ) { uint32_t castedVal = *reinterpret_cast<const uint32_t*>( &val ); castedVal = (castedVal & 0x000000FF << (3 * 8)) | (castedVal & 0x0000FF00 << (1 * 8)) | (castedVal & 0x00FF0000 >> (1 * 8)) | (castedVal & 0xFF000000 >> (3 * 8)); return *reinterpret_cast<valType*>( &castedVal ); } }; but it break when enabling optimizations due to the type punning. So, why does my used attribute got ignored? Is there a workaround to convert endianness (I rely on the enum to avoid type punning) in templates?

    Read the article

  • PHP not talking to MySQL

    - by KodeSeeker
    Im trying to set up a AMP installation on my windows 8 laptop. However, Im not being able to get PHP to talk to MySQL. When I start apache server, the following error log is generated PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_mysql.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_mysqli.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line .. Any idea why this could be happening?

    Read the article

  • Trouble in type casting or any ideas ???

    - by ahmet732
    I write code below but it gives warning.. I identified dbdesc as a NSString but nothing changes.. How will I handle with this type of warnings? **[self.searchDetailViewController setText:appDelegate.dbdesc];** warning:'searchDetailViewController' may not respond to 'setText:' (Messages without a message method signatures will be assumed to return (id) and accept '...'as arguments )

    Read the article

  • Headers already sent

    - by Tom
    Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\atseit\irankiai.php:3) in C:\xampp\htdocs\atseit\irankiai.php on line 211 Is there any way to remove this warning and make cookies work? My 3rd line defines title and 211 line sets cookie.

    Read the article

  • php:unable to download youtube video using phptube class

    - by I Like PHP
    i m using phptube class for downloading you tube video. from this site In code i paste youtube url on a input box but there is errors below. Warning: file_get_contents(http://www.youtube.com/get_video?video_id=&t=) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found and Warning: file_put_contents(./flvs/3Hx9VsqMUug.flv) [function.file-put-contents]: failed to open stream: No such file or directory in E:\xampp\htdocs\vdo\utube \functions.php on line 19 path:./flvs/3Hx9VsqMUug.flv please tell me where is problem???

    Read the article

  • Is something wrong with this php GD code?

    - by ThinkingInBits
    if ($img = @imagecreatefromjpeg('./images/upload/13/1.JPG')) { imagejpeg($img, $path, 100); imagedestroy($img); } else { die ("image was not created or saved"); } I'm getting the message: Warning: imagejpeg(): 8 is not a valid Image resource in C:\xampp\htdocs\invivid\libraries\photograph_classes.php on line 276 Warning: imagedestroy(): 8 is not a valid Image resource in C:\xampp\htdocs\invivid\libraries\photograph_classes.php on line 277 The image is being created initially, we know this from the if statement, but why doesn't imagejpeg or imagedestroy work properly?

    Read the article

  • Guide me on UIDevice currentDevice

    - by barbgal
    I am using the following code to set the device orientaion [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight]; when i used i got the warning and i found the below code to fix that warning. @interface UIDevice (MyPrivateNameThatAppleWouldNeverUseGoesHere) - (void) setOrientation:(UIInterfaceOrientation)orientation; @end Now what i would like to know is ... Can the app store accepts this code to be in an application? Thanks for any help!.

    Read the article

  • Objective C: Class Extensions and Protocol Conformation Warnings

    - by Ben Reeves
    I have a large class, which I have divided into several different class extension files for readability. @protocol MyProtocol @required -(void)required; @end @interface MyClass : NSObject <MyProtocol> @end @interface MyClass (RequiredExtension) -(void)required; @end Is there a better way to do this, without the compiler warning? warning: class 'MyClass' does not fully implement the 'MyProtocol' protocol

    Read the article

  • Simulate memory warnings from the code, possible?

    - by krasnyk
    I know i can simulate a memory warning on the simulator by selecting 'Simulate Memory Warning' from the drop down menu of the iPhone Simulator. I can even make a hot key for that. But this is not what I'd like to achieve. I'd like to do that from the code by simply, lets say doing it every 5 seconds. Is that possible?

    Read the article

  • drupal POST Content-Length exceeds the limit

    - by Arun
    hi i got list of warning regarding file size when i try to upload an image using file upload. "POST Content-Length of 12223490 bytes exceeds the limit of 8388608 bytes in Unknown on line 0" My question is how to avoid displaying warning messages (i got 5 warnings).

    Read the article

  • implicit declaration of function 'objc_lookUpClass'

    - by idober
    I am getting this warning for the line code: Class myClass = objc_lookUpClass([_className UTF8String]); I am adding #import <Foundation/NSObjCRuntime.h> #import <objc/objc.h> And it still don't resolve the problem Another warning i get on this line is: "Initialization makes pointer from integer without a cast"

    Read the article

  • unhandled errors in php

    - by lexus
    How can I know during runtime that my code threw a Warning? example try { echo (25/0); } catch (exception $exc) { echo "exception catched"; } throws a "Warning: Division by zero" error that i can not handle on my code.

    Read the article

  • Convert NSString to string

    - by coure06
    NSDate *now = [NSDate date]; NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:@"yyyy"]; NSString *stringFromDate = [formatter stringFromDate:now]; CGContextShowTextAtPoint(context, 50, 50, stringFromDate, 5); I am not getting the exact date? also getting warning while compiling warning: passing argument 4 of 'CGContextShowTextAtPoint' from incompatible pointer type

    Read the article

  • vim c++ break line

    - by Myx
    Hello: How can I break long lines when writing c++ code in vim? For example, if I have something like 56 fprintf(stderr, "Syntax error reading recursion value on 57 line %d in file %s\n", line_count, filename); I get the following compile errors: :56:25: warning: missing terminating " character :56: error: missing terminating " character :57: error: stray ‘\’ in program :57:37: warning: missing terminating " character :57: error: missing terminating " character I'm a vim newbie. Thanks!

    Read the article

  • useless class storage specifier in empty declaration

    - by robUK
    Hello, gcc 4.4.1 c89 I have the following code and I get a warning: unless class storage specifier in empty declaration static enum states { ACTIVE, RUNNING, STOPPED, IDLE } However, if i remove the static keyword I don't get that warning. I am compiling with the following flags: -Wall -Wextra Many thanks for any suggestions,

    Read the article

  • Three20 - SIGABRT on setting TTTableLongTextItem to TTStyledText

    - by gavinblair
    My code is as follows TTTableLongTextItem *descItem = [[TTTableLongTextItem alloc] autorelease]; TTStyledText *styledDesc = [[TTStyledText alloc] autorelease]; styledDesc = [TTStyledText textWithURLs:@"howdy http://www.google.com"]; //this line causes the SIGABRT: descItem.text = styledDesc; //I also get a warning on this line that says "warning: passing argument 1 of 'setText:' from distinct Objective-C type" What am I missing here? Any help is muchly appreciated - Three20 documentation is a little sparse!

    Read the article

  • PHP GD problem--not enough permission to make image?

    - by aaron
    Error: Warning: imagejpeg() [function.imagejpeg]: Unable to open 'images/xxx/xxx.jpg' for writing: Permission denied in /usr/www/users/xxx/resources/func.createthumbs.php on line 48 images/xxx/xxx/xxx.jpg Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/xxx/resources/updatethumbs.php:17) in /usr/www/users/xxx/resources/func.createthumbs.php on line 3 So... How can I change the permission? This is being run on a shared server--is it possible?

    Read the article

  • Is it compulsory to learn about Data Structures if you want to be a Java/C++ programmer ?

    - by happysoul
    So do I like really need to learn about them ? Isn't there an interesting way to learn about stacks, linked lists, heaps ,etc ? I found it a boring subject. **While posting this question it showed some warning.Am I not allowed to post such a question ? Admins please clarify and I will delete it :/ Warning :: The question you're asking appears subjective and is likely to be closed.

    Read the article

< Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >