Search Results

Search found 28563 results on 1143 pages for 'strange but true'.

Page 37/1143 | < Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >

  • Strange WPF Behaviour With WCF Async calls

    - by gvigsgb
    I have a WPF application calling WCF via Async calls. The application has four tabs in which each are loaded from seperate async calls, each tab has a busy indicator. The problem: When running within Visual Studio I can click a refresh button on each tab and each tab's busy indicator starts and the data is retrieved from the WCF service. As each tab's data comes back it is refreshed. When I deploy the application via one click the application's UI hangs after only two tabs start refreshing. So in this case I press refresh on tab one, then on tab two and the application hangs until one of the two tabs data comes back. I thought at first that it was something to do with the WCF service throtteling and that was not the case as both the Visual Studio and the One Click deployments of the application point to the same service. Anyone have any ideas on where to look? I cannot reproduce the hang issue within Visual Studio?

    Read the article

  • LINQ to SQL - Insert yielding strange behavior.

    - by Isaac
    Hi, I'm trying to insert several newly created items to the database. I have a LINQ2SQL generated class called "Order". Inside order, there's a property called "OrderItems" which is also generated by LINQ2SQL and represents the Items of that Order. So far so good. The problem I'm having right now, is when I try to add more than one newly created OrderItem inside Order. I.E: Order o = orderWorker.GetById( 10 ); for( int i=0; i < 5; ++i ) { OrderItem oi =new OrderItem { Order = order, Price = 100, ShippingPrice = 100, ShippingMethod = ... }; o.OrderItems.Add( oi ); } context.SubmitChanges(); Unfortunately, only a single entity is being added. Yes, I checked the generated SQL by adding Context.Log = Console.Out, and yes, only one statement was created. Any clues? By the way I know I'm not using InsertOnSubmit, by the documentation says: You can explicitly request Inserts by using InsertOnSubmit. Alternatively, LINQ to SQL can infer Inserts by finding objects connected to one of the known objects that must be updated. For example, if you add an Untracked object to an EntitySet(TEntity) or set an EntityRef(TEntity) to an Untracked object, you make the Untracked object reachable by way of tracked objects in the graph. While processing SubmitChanges, LINQ to SQL traverses the tracked objects and discovers any reachable persistent objects that are not tracked. Such objects are candidates for insertion into the database. Thank you very much for your time.

    Read the article

  • Strange Template error : error C2783: could not deduce template argument

    - by osum
    Hi, I have created a simple function with 2 diffrernt template arguments t1, t2 and return type t3. So far no compilation error. But when Itry to call the function from main, I encounter error C2783. I needed to know If the following code is legally ok? If not how is it fixed? please help! template <typename t1, typename t2, typename t3> t3 adder1 (t1 a , t2 b) { return int(a + b); }; int main() { int sum = adder1(1,6.0); // error C2783 could not deduce template argument for t3 return 0; }

    Read the article

  • Strange behavior of Switch Case statement in Java

    - by supernova
    I understand that Java switch case are designed this way but why is this behavior in Java int x = 1; switch(x){ case 1: System.out.println(1); case 2: System.out.println(2); case 3: System.out.println(3); default: System.out.println("default"); } output : 1 2 3 default My question is why case 2 and 3 are executed? I know I omitted break statement but x was never 2 or 3 but case 2 and case 3 still executes?

    Read the article

  • Strange error(dereferencing pointer to incomplete type)

    - by SMiX
    void get_cwd(char* buf) { char *result; current->fs->pwd; result = get_dentry_path(current->fs->pwd); memcpy(buf, result, strlen(result)+1); kfree(result); } error: dereferencing pointer to incomplete type The error points to current-fs-pwd; includes: #include <asm/stat.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/string.h> #include <linux/dirent.h> #include <linux/sched.h> #include <asm/uaccess.h> #include <asm/current.h> #include <linux/path.h> If I type current-fs; on 5th line gcc don't give error on this line. The problem is with pwd field.

    Read the article

  • Strange use of the index in Mysql

    - by user309067
    explain SELECT feed_objects.* FROM feed_objects WHERE (feed_objects.feed_id IN (165,160,159,158,157,153,152,151,150,149,148,147,129,128,127,126,125,124,122,121,120,119,118,117,116,115,114,113,111,110)) ; +----+-------------+--------------+------+---------------+------+---------+------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+--------------+------+---------------+------+---------+------+------+-------------+ | 1 | SIMPLE | feed_objects | ALL | by_feed_id | NULL | NULL | NULL | 188 | Using where | +----+-------------+--------------+------+---------------+------+---------+------+------+-------------+ Not used index 'by_feed_id' But when I point less than the values in the "WHERE" - everything is working right explain SELECT feed_objects.* FROM feed_objects WHERE (feed_objects.feed_id IN (165,160,159,158,157,153,152,151,150,149,148,147,129,128,127,125,124)) ; +----+-------------+--------------+-------+---------------+------------+---------+------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+--------------+-------+---------------+------------+---------+------+------+-------------+ | 1 | SIMPLE | feed_objects | range | by_feed_id | by_feed_id | 9 | NULL | 18 | Using where | +----+-------------+--------------+-------+---------------+------------+---------+------+------+-------------+ Used index 'by_feed_id' What is the problem?

    Read the article

  • removeAttribute do not return true or false

    - by Sourabh
    Hi , I am trying to remove attributes of a DOM element using below statement in javascript. var res = nodes.removeAttribute("style"); but the res is always "undefined" it seems that the removeAttribute function does not return anything (I tested it on firefox browser) How can I identify that the attribute is successfully removed or not ? Thanks, Sourabh

    Read the article

  • strange parsing Double behaviour...

    - by Cristian Boariu
    Hi, I have this line of code: return (this.pretWithoutDiscount / Double.Parse(UtilsStatic.getEuroValue())).ToString("N2") + "€"; In debug mode i've tested and the values are: UtilsStatic.getEuroValue() = "4.1878" this.pretWithoutDiscount = 111.0 Can anyone explaing WHY: Double.Parse(UtilsStatic.getEuroValue()) = 41878.0 when it should be 4.1878 ?? Thanks... PS: UtilsStatic.getEuroValue returns a string.

    Read the article

  • Strange margin-behaviour with Sifr spans in link (screens)

    - by knalstaaf
    I'm making a menu and it's supposed to look like picture nr 1 on this link. However, at this moment, it looks like picture nr 2. There's no logic in this behaviour, since all three elements have the same css-attributes. Moreover, let's change the word "Reiki" to "Psychotherapie" and see what happens... (picture nr 3) For some reason the word "Reiki" ignores certain attributes. This is not a problem when Sifr is turned off. I guess I'll need some extra CSS to solve this (messing with paddings, heights or margins on that specific element doesn't give any result. It just won't budge). Unless someone knows a more elegant solution?

    Read the article

  • Strange LINQ to SQL Behavior

    - by mcass20
    What is wrong with the last query? Is it a bug or am I missing something? This query returns 2 records (correct): query = query.Where(Log => SqlMethods.Like(Log.FormattedMessage, "%<key>Name</key><value>David</value>%")); This query returns 2 records (correct): query = query.Where(Log => SqlMethods.Like(Log.FormattedMessage, "%<key>Name</key><value>%David%</value>%")); This query returns 0 records (correct): query = query.Where(Log => SqlMethods.Like(Log.FormattedMessage, "%<key>Name</key><value>av</value>%")); This query returns 2 records (correct): query = query.Where(Log => SqlMethods.Like(Log.FormattedMessage, "%<key>Name</key><value>%av%</value>%")); This query returns 0 records (correct): query = query.Where(Log => SqlMethods.Like(Log.FormattedMessage, "%<key>Name</key><value>v</value>%")); This query returns 15 records (incorrect, should return 2): query = query.Where(Log => SqlMethods.Like(Log.FormattedMessage, "%<key>Name</key><value>%v%</value>%"));

    Read the article

  • Strange IP addresses in tomcat

    - by mdev
    Some where I have this in some generic class. public static String getRequestIp (HttpServletRequest request){ String ipaddr = request.getHeader("X-FORWARDED-FOR"); if (ipaddr == null)ipaddr = request.getRemoteAddr(); return ipaddr; } For every request i call that method and in a certain moment i insert a record in a mysql database. In most cases it works normally and i can see a record for every request with a valid ip address in the right field. But sometimes where the IP should be there is something like this. "unknown, 93.186.30.120" or "10.0.1.169, 186.38.84.3" Apache is at the front listening at port 80 and used as proxy to Tomcat that listens at port 8081. My router config would not allow to pass any conection that come by any port other than 80. Any Help? Thanks in advance.

    Read the article

  • A very strange problem -> CSS file not detected .Java web application

    - by Nitesh Panchal
    Hello, If i browse my site using http://localhost:8080/abc/Login/index.jsf, everything works fine. But if browse it using simply http://localhost:8080/abc, the page is shown but all its images and css files are missing. What can be the problem? I have this in my web.xml :- <form-login-config> <form-login-page>/Login/index.jsf</form-login-page> <form-error-page>/Login/index.jsf</form-error-page> </form-login-config> Probably, images are not getting referenced correctly. Can anybody help me? I have referenced css file as follows :- <link href="./Css/MainStyleSheet.css" rel="stylesheet" type="text/css" /> where Css is folder in Login

    Read the article

  • "Socket operation on non-socket" error due to strange sytax

    - by Robert S. Barnes
    I ran across the error Socket operation on non-socket in some of my networking code when calling connect and spent a lot of time trying to figure out what was causing it. I finally figured out that the following line of code was causing the problem: if ((sockfd = socket( ai->ai_family, ai->ai_socktype, ai->ai_protocol) < 0)) { See the problem? Here's what the line should look like: if ((sockfd = socket( ai->ai_family, ai->ai_socktype, ai->ai_protocol)) < 0) { What I don't understand is why the first, incorrect line doesn't produce a warning. To put it another way, shouldn't the general form: if ( foo = bar() < baz ) do_somthing(); look odd to the compiler, especially running with g++ -Wall -Wextra? If not, shouldn't it at least show up as "bad style" to cppcheck, which I'm also running as part of my compile?

    Read the article

  • Ajax(jQuery) strange file post problem

    - by faya
    Hello, I have a problem posting file via ajax jQuery function. I have something like this: $('#my_form').submit(function() { var serialized = $(this).formSerialize(); var sUrl = "xxx"; $.ajax({ url: sUrl, type: "POST", data: serialized, success: function(data) { $(".main_container").html(data); } }) return false; // THIS return statment blocks sending file content }); When I remove return false statement everything is okey, server side gets the file content and etc, but when it's there (i monitor with firebug) that this posting sends only file name. What can be wrong? P.S. - I need this return false statement, because I want to manipulate return data myself.

    Read the article

  • T-SQL: if exists always return true ?

    - by msfanboy
    Hello, What do you think , does the Stored Procedure always return 1 ? I am concerned about the if exists(..) BEGIN DECLARE @IsUserExisting bit SET NOCOUNT ON IF Exists ( Select null FROM G_User WHERE SamAccountName = @SamAccountName AND NetBIOSDomainName = @NetBIOSDomainName ) BEGIN SET @IsUserExisting = 1 END ELSE BEGIN SET @IsUserExisting = 0 END Select @IsUserExisting END

    Read the article

  • Strange behavior: save video recorded within app?

    - by Josue Espinosa
    I allow the user to record a video within my app, then later play it again. When a user records a video, I save the URL of the video, then play the video later from the saved URL. I save the video both in the Photos app and in my app. If I delete the video within the photos app, it still plays. After about 7 days, the video gets deleted. I think I am saving in my tmp directory, but i'm not sure. Here is what I am doing: -(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { NSString *mediaType = [info objectForKey: UIImagePickerControllerMediaType]; [self dismissViewControllerAnimated:YES completion:nil]; // Handle a movie capture if (CFStringCompare ((__bridge_retained CFStringRef) mediaType, kUTTypeMovie, 0) == kCFCompareEqualTo) { NSString *moviePath = [NSString stringWithFormat:@"%@",[[info objectForKey:UIImagePickerControllerMediaURL] path]]; NSURL *videoURL = [info objectForKey:UIImagePickerControllerMediaURL]; NSData *videoData = [NSData dataWithContentsOfURL:videoURL]; _justRecordedVideoURL = [NSString stringWithFormat:@"%@",videoURL]; AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; _managedObjectContext = [appDelegate managedObjectContext]; Video *video = [NSEntityDescription insertNewObjectForEntityForName:@"Video" inManagedObjectContext:_managedObjectContext]; [video setVideoData:videoData]; [video setVideoURL:[NSString stringWithFormat:@"%@",videoURL]]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; dateFormatter.dateStyle = NSDateFormatterLongStyle; [dateFormatter setDateStyle:NSDateFormatterLongStyle]; NSDate *date = [dateFormatter dateFromString:[dateFormatter stringFromDate:[NSDate date]]]; NSString *dateAdded = [dateFormatter stringFromDate:date]; [video setDate_recorded:dateAdded]; if(_currentAthlete != nil){ [video setWhosVideo:_currentAthlete]; } NSError *error = nil; if(![_managedObjectContext save:&error]){ //handle dat error } NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *tempPath = [documentsDirectory stringByAppendingFormat:@"/vid1.mp4"]; BOOL success = [videoData writeToFile:tempPath atomically:NO]; if(success == FALSE){ NSLog(@"Video was not successfully saved."); } if (UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(moviePath)) { UISaveVideoAtPathToSavedPhotosAlbum(moviePath, self, @selector(video:didFinishSavingWithError:contextInfo:), nil); } } } Am I saving it incorrectly? When I go to play the video, it works fine, after a couple days the video will play without audio, then eventually it will be gone. Any ideas why?

    Read the article

  • Oracle Date format - Strange behaviour

    - by Sauron
    I am writing a SQL query to retrive data from a table between two dates. I give two inputs as shown. I convert the Date TO_CHAR(DD/MON/YYYY). 1. StartDate > 01/SEP/2009 EndDate < 01/OCT/2009 2. StartDate > 01/SEP/2009 EndDate < 1/OCT/2009 I dont get any result for the first input. When I change it to second one i get the result. What is the difference between 01/OCT/2009 1/OCT/2009

    Read the article

  • QtWebkit and hasPendingEvents() always True

    - by Deorf
    Hello. I use project webkit2png (slightly appended) to take screenshots in Linux. On the server running the latest version QtWebkit and Python 2.6 On some sites (eg 118114.cn) problem and the application hangs forever. Debug shows that the problem in this code snippet: while self.__loading:    if timeout 0 and time.time() = cancelAt:       raise RuntimeError("Request timed out on %s" % url)    while QApplication.hasPendingEvents():       QCoreApplication.processEvents() Full version of the source code is available here (lines 270-275) Somehow Loading-event hangs and hasPendingEvents can not be False. Most of the screenshots are created normally, but sometimes due to some URL drops my app: ( Does anyone know how to solve this problem and why the event hangs?

    Read the article

  • PHP class_exists always returns true

    - by Ali
    I have a PHP class that needs some pre-defined globals before the file is included: File: includes/Product.inc.php if (class_exists('Product')) { return; } // This class requires some predefined globals if ( !isset($gLogger) || !isset($db) || !isset($glob) ) { return; } class Product { ... } The above is included in other PHP files that need to use Product using require_once. Anyone who wants to use Product must however ensure those globals are available, at least that's the idea. I recently debugged an issue in a function within the Product class which was caused because $gLogger was null. The code requiring the above Product.inc.php had not bothered to create the $gLogger. So The question is how was this class ever included if $gLogger was null? I tried to debug the code (xdebug in NetBeans), put a breakpoint at the start of Product.inc.php to find out and every time it came to the if (class_exists('Product')) clause it would simply step in and return thus never getting to the global checks. So how was it ever included the first time? This is PHP 5.1+ running under MAMP (Apache/MySQL). I don't have any auto loaders defined.

    Read the article

  • Strange pattern matching with functions instancing Show

    - by Sean D
    So I'm writing a program which returns a procedure for some given arithmetic problem, so I wanted to instance a couple of functions to Show so that I can print the same expression I evaluate when I test. The trouble is that the given code matches (-) to the first line when it should fall to the second. {-# OPTIONS_GHC -XFlexibleInstances #-} instance Show (t -> t-> t) where show (+) = "plus" show (-) = "minus" main = print [(+),(-)] returns [plus,plus] Am I just committing a motal sin printing functions in the first place or is there some way I can get it to match properly? edit:I realise I am getting the following warning: Warning: Pattern match(es) are overlapped In the definition of `show': show - = ... I still don't know why it overlaps, or how to stop it.

    Read the article

  • Strange errors in Visual C++ :: 'malloc' : function does not take 1 arguments

    - by pecker
    Error 38 error C2660: 'malloc' : function does not take 1 arguments C:\VolumeRenderer\render.cpp 296 1 VolumeRenderer Error 39 error C2660: 'malloc' : function does not take 1 arguments C:\VolumeRenderer\render.cpp 412 1 VolumeRenderer Error 40 error C2660: 'malloc' : function does not take 1 arguments C:\VolumeRenderer\render.cpp 414 1 VolumeRenderer Error 41 error C2660: 'read_den' : function does not take 4 arguments C:\VolumeRenderer\render.cpp 506 1 VolumeRenderer My all malloc sections are like this: /* allocate space for the raw data */ density_size = BRAIN_XLEN * BRAIN_YLEN * BRAIN_ZLEN; density = (unsigned char*)malloc(density_size); if (density == NULL) { fprintf(stderr, "out of memory\n"); exit(1); } regarding read_den (last error) unsigned char *read_den(char *filename,int *xptr,int *yptr,int *zptr)// function prototype src_volume = read_den(src_file, &src_xlen, &src_ylen, &src_zlen);// fucntion call Is it my code or the errors that are absurd. How to rectify them?

    Read the article

  • Strange iPhone application icon view in the iTunes's Applications section

    - by Spiel
    When I drag 'My iPhone App' application's file into iTunes it has proper view. Rounded corners and transparent background. Then I close iTunes and open it again. Corners are still rounded but... What has happened with the background? http://www.freeimagehosting.net/uploads/15fee337bc.png Icon is a project's resource file named 'iTunesArtwork' with dimension 512x512, PNG format.

    Read the article

  • sort giving strange results

    - by Jay
    I have an array of email addresses that I am trying to sort, but I'm getting odd results. Here is what I mean: sort($array); print_r($array); ...[79] => 91******@******.com [80] => 9l***@**********.com [81] => ps*******@**********.com [82] => a.c******@*****.com [83] => a.d****@*****.com... What would cause that email beginning with p's to be mixed in after the numbers and before the A's? I removed that email address from the database and replaced it with "testing" and then "testing" appeared in the same position.

    Read the article

< Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >