Search Results

Search found 3678 results on 148 pages for 'weird'.

Page 15/148 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Weird bug with C++ lambda expressions in VS2010

    - by Andrei Tita
    In a couple of my projects, the following code: class SmallClass { public: int x1, y1; void TestFunc() { auto BadLambda = [&]() { int g = x1 + 1; //ok int h = y1 + 1; //c2296 int l = static_cast<int>(y1); //c2440 }; int y1_copy = y1; //it works if you create a local copy auto GoodLambda = [&]() { int h = y1_copy + 1; //ok int l = this->y1 + 1; //ok }; } }; generates error C2296: '+' : illegal, left operand has type 'double (__cdecl *)(double)' or alternatively error C2440: 'static_cast' : cannot convert from 'double (__cdecl *)(double)' to 'int' You get the picture. It also happens if catching by value. The error seems to be tied to the member name "y1". It happened in different classes, different projects and with (seemingly) any type for y1; for example, this code: [...] MyClass y1; void TestFunc() { auto BadLambda = [&]()->void { int l = static_cast<int>(y1); //c2440 }; } generates both these errors: error C2440: 'static_cast' : cannot convert from 'MyClass' to 'int' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called error C2440: 'static_cast' : cannot convert from 'double (__cdecl *)(double)' to 'int' There is no context in which this conversion is possible It didn't, however, happen in a completely new project. I thought maybe it was related to Lua (the projects where I managed to reproduce this bug both used Lua), but I did not manage to reproduce it in a new project linking Lua. It doesn't seem to be a known bug, and I'm at a loss. Any ideas as to why this happens? (I don't need a workaround; there are a few in the code already). Using Visual Studio 2010 Express version 10.0.40219.1 Sp1Rel.

    Read the article

  • Weird problem: IE8 user can't authenticate with web service

    - by NovaJoe
    I have an asp.net app. It has a page that requires authentication. The authenticated user can view the page because he/she is authenticated. The page makes a jQuery Ajax call to a WCF service. The WCF service checks that the user is authenticated via HttpContext. I have a user that is using WinXP and IE8. This user can authenticate to the page, but when the Ajax call is made from the page to the wb service, the user recieves my "session not authenticated" message on the page, generated by the service and displayed on the page. When I use the same OS/browser combo, the page and service work just fine, as expected; no errors. What option in this user's IE settings would cause this behavior?

    Read the article

  • Weird "Designer1.cs" files created

    - by Neil Barnwell
    How does visual studio link files to their corresponding designer.cs files? I have a strange situation that's occurred with both the DataSet designer and also the L2S DBML designer where it's ignoring the DataSet.Designer.cs and has created and used a DataSet.Designer1.cs instead. How can I switch it back?

    Read the article

  • Weird splitter behaviour when moving it

    - by tomo
    My demo app displays two rectangles which should fill whole browser's screen. There is a vertical splitter between them. This looks like a basic scenario but I have no idea how to implement this in xaml. I cannot force this to fill whole screen and when moving splitter then whole screen grows. Can anybody help? <UserControl xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" x:Class="SilverlightApplication1.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> <Grid x:Name="LayoutRoot" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Border BorderBrush="Black" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" MinWidth="50"> </Border> <controls:GridSplitter Grid.Column="1" VerticalAlignment="Stretch" Width="Auto" ></controls:GridSplitter> <Border BorderBrush="Blue" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Column="2" MinWidth="50"></Border> </Grid> </UserControl>

    Read the article

  • Weird gcc error stray/missing terminating " character in C

    - by DreamCodeR
    I get the following errors: error: missing terminating " character and error: stray `\' in program In this line of C code: system("sqlite3 -html /home/user/.rtcom-eventlogger/el.db \"SELECT service_id, event_type_id,free_text, remote_uid FROM Events WHERE remote_uid=\'%d\' ORDER BY start_time DESC;\" > lol.html", nr); "nr" is a integer variable. I have gone over this so many times but are totally stuck of finding a solution. EDIT: The errors is the ouput while compiling with gcc if I didn't make that clear.

    Read the article

  • Weird behaviour with vector::erase and std::remove_if with end range different from vector.end()

    - by Edison Gustavo Muenz
    Hi, I need to remove elements from the middle of a std::vector. So I tried: struct IsEven { bool operator()(int ele) { return ele % 2 == 0; } }; int elements[] = {1, 2, 3, 4, 5, 6}; std::vector<int> ints(elements, elements+6); std::vector<int>::iterator it = std::remove_if(ints.begin() + 2, ints.begin() + 4, IsEven()); ints.erase(it, ints.end()); After this I would expect that the ints vector have: [1, 2, 3, 5, 6]. In the debugger of Visual studio 2008, after the std::remove_if line, the elements of ints are modified, I'm guessing I'm into some sort of undefined behaviour here. So, how do I remove elements from a Range of a vector?

    Read the article

  • Weird ViewControllers - iPhone SDK

    - by Kevin
    Hello everyone, I have a Tab-Bar Application for this iPhone application I am making. I make a simple button on the 3rd view (3rd tab), and give it an IBAction to give an alert view. When I press build and go, everything works out fine. I go onto the 3rd tab, and I press my button. It simply crashes... Why is this happening? Everything I put in this 3rd tab crashes. I create a simple view controller, and write the class files to start over, but I keep getting the same errors.. Everything works fine on my first tab, where I originally got the first view controller.. P.S It also says Incomplete Implementation of Class 'ThirdViewController'. I don't know why its there.. If anyone can help me out here, i would greatly appreciate it. Kevin

    Read the article

  • Python csv reader acting weird

    - by PylonsN00b
    So OK if I run this wrong code: csvReader1 = csv.reader(file('new_categories.csv', "rU"), delimiter=',') for row1 in csvReader1: print row1[0] print row1[8] category_sku = str(row[8]) if category_sku == sku: classifications["Craft"] = row[0] classifications["Theme"] = row[1] I get: Knitting 391 Traceback (most recent call last): File "upload_all_inventory_ebay.py", line 403, in <module> inventory_item_list = get_item_list(product) File "upload_all_inventory_ebay.py", line 294, in get_item_list category_sku = str(row[8]) NameError: global name 'row' is not defined Where Knitting and 391 are exactly right, of course I need to refer to row[8] as row1[8]...k so I do this: csvReader1 = csv.reader(file('new_categories.csv', "rU"), delimiter=',') for row1 in csvReader1: print row1[0] print row1[8] category_sku = str(row1[8]) if category_sku == sku: classifications["Craft"] = row1[0] classifications["Theme"] = row1[1] And I get this: ........... Crochet 107452 Knitting 107454 Knitting 107455 Knitting 107456 Knitting 107457 Crochet 108200 Crochet 108201 Crochet 108205 Crochet 108213 Crochet 108214 Crochet 108217 108432 Quilt 108451 108482 108488 Scrapbooking 108711 Knitting 122363 Needlework Beading Crafts & Decorating Crochet Crochet Crochet Traceback (most recent call last): File "upload_all_inventory_ebay.py", line 403, in <module> inventory_item_list = get_item_list(product) File "upload_all_inventory_ebay.py", line 292, in get_item_list print row1[0] IndexError: list index out of range Where the output you see there is every effing thing in column 0 and column 1 !!!!!!!!!! Why? And WHY is row1[0] out of range if it wasn't before. YAY Fridays!

    Read the article

  • BetterAuthorizationSample weird???

    - by Nano8Blazex
    I have a quick, newbie question... I just started looking through authrozation services and Apple's BetterAuthorizationSample... for some reason, I just can't get the hang of it. For example... I deleted the HelperTool and InstallTool and SampleTool.c and all references, but why does the program seem to continue work like nothing happened at all even after a clean build? Even commenting out all the code in SampleTOol.c doesn't seem to affect the way the program runs? Thanks

    Read the article

  • Weird problem cucumber behaving differently when run with the debugger

    - by James
    When I run a cucumber test it executes the code thinking that a collection obtained inside of a controller via a has_many relationship on a model is empty when it isn't. I ran this same test but with the debugger turned and a breakpoint before the collection is used. When I print collection in the debugger at this breakpoint the collection is as it should be (not empty). Then I continue and the test executes as it should. With no debugger and breakpoints though, the test exectues as though the collection is empty. Has anyone had a problem like this/what did you do to fix it?

    Read the article

  • Weird cabal error: "inappropriate type"

    - by Bill
    ~ % cabal install --reinstall time Resolving dependencies... [1 of 1] Compiling Main ( /var/folders/0D/0D3du+YyGzuRETgUJZ5m8U+++TI/-Tmp-/time-1.2.0.251774/time-1.2.0.2/Setup.hs, /var/folders/0D/0D3du+YyGzuRETgUJZ5m8U+++TI/-Tmp-/time-1.2.0.251774/time-1.2.0.2/dist/setup/Main.o ) Linking /var/folders/0D/0D3du+YyGzuRETgUJZ5m8U+++TI/-Tmp-/time-1.2.0.251774/time-1.2.0.2/dist/setup/setup ... Configuring time-1.2.0.2... setup: dist/setup-config51799.tmp: inappropriate type cabal: Error: some packages failed to install: time-1.2.0.2 failed during the configure step. The exception was: ExitFailure 1 ~ % Has anyone seen this before?

    Read the article

  • Weird text addition in PHP

    - by Patrick Gates
    I have a form posting data to a php page. Then I have the PHP page echoing the data aswell as posting it to twitter. Whenever In a word with an apostrophe it adds a back-slash right before it. So I type in "I'm going to the park" it echos "I\'m going to the park" what's going on and how do I fix it? Thanx :)

    Read the article

  • UIImageView in UITableCell gets a weird size

    - by Behlül
    Hi, I'm trying to place a UIImageView in a UITableViewCell. I create a special view called ProductView. In that view, I have several components, one of them being a UIImageView. I set this ProductView as content view of the UITableViewCell. Everything is drawn properly except the UIImageView. UIImageView gets scaled meaninglessly. It's height gets twice the height of the table cell size. I've spent hours trying to solve this problem. I've set the frame of UIImageView manually, I've called drawRect method of UIImage in UIImageView, neither of them worked. I'm thinking of replacing UITableView with a UIScrollView if I can't find a solution. Does anyone know how to solve this problem?

    Read the article

  • Occasional weird Glassfish errors, resolved by a restart?

    - by Pooria
    I'm developing a web app using netbeans with GlassFishv3. Every once in a while when I add a new feature in my app, glassfish starts nagging with stupid errors, after a lot of time wasting and panicking, i restart glassfish and run my application again, then suddenly the errors all go away and my site starts acting correctly. (or in case I have made a real mistake, i receive a reasonable & descriptive error from GF.) [Edit: the rest of the question was revealed to have been my own mistake.] But the problems don't end there. Recently, i added the ability to write comments in a (JSF) page, after the user submits their comment, i add it to the database and redirect to the same page, so that hopefully the page refreshes with the new comment, but it wont! The underlying Mysql database shows that the new comment has been added, but the page just wont show the new comment! I've tried everything (e.g. deleting browser cache, using different browsers) but only after restarting GF is when the page shows the new comment! Do you have any idea what the problem could be? Could this be a Glassfish bug? What i am using: JSF2, EJB3.1, JPA, MySql

    Read the article

  • Weird javascript problem...

    - by Silvio Iannone
    Hi there, i'm building a page that is dinamically loaded with ajax. This is what the '$.get' jQuery function calls (this is located on an external HTML page): <script type="text/javascript"> $(function() { $('button').sb_animateButton(); $('input').sb_animateInput(); $('#settings_security_error').hide(); }); function check_passwords(password, password_confirm) { $('#settings_security_error').show(); alert('I\'m in funcion!'); // This works... if(password.length < 4) // ... this doesn't { $('#settings_security_error').innerHTML = 'Password too short'; } else { password = hex_md5(password); password_confirm = hex_md5(password_confirm); $.get('/engine/ajax/check_password.php?password=' + password + '$password_confirm=' + password_confirm, {language: "php", version: 5}, function(result) { $('#settings_security_error').innerHTML = result; }, 'html'); } } </script> <div class="title">Security</div> <table class="sub_container"> <tr> <td><label>Old password</label></td> <td class="td_input"><input type="password" name="old_password"/></td> </tr> <tr> <td><label>New password</label></td> <td class="td_input"><input type="password" name="new_password" id="settings_security_new_password" onkeyup="check_passwords(this.value, getElementById('settings_security_password_confirm').value)"/></td> </tr> <tr> <td><label>Confirm password</label></td> <td class="td_input"><input type="password" name="new_password_confirm" id="settings_security_password_confirm" onkeyup="check_passwords(getElementById('settings_security_new_password').value, this.value)"/></td> </tr> <tr> <td class="td_error" id="settings_security_error"></td> </tr> </table> And this is where the external HTML is placed...: <div id="settings_appearance"> </div> ... from this javascript snippet: function get_page_content(page, target_id) { $.get('engine/ajax/get_page_content.php?page=' + page, null, function(result) { $("#"+target_id).html(result); // Or whatever you need to insert the result }, 'html'); } Well... the problem is that the javascript in the first snippet is executed when it's loaded by the $.get function, but i still can't understand the reason why when i type into the input boxes nothing happen. It should write the output of the javascript function check_passwords(password, password_confirm) in <td class="td_error" id="settings_security_error"></td>. Thanks for helping. Silvio

    Read the article

  • Matching 'weird' characters in PHP regex

    - by Bill X
    I have some strings that need a-strippin': ÃœT: 9.996636,76.294363 Tons of long strings of location codes. A literal regex in PHP won't match them, IE $pattern = /ÃœT:/; echo preg_replace($pattern, "", $row['location']); Won't match/strip anything. (To know it's working, /T:/ does strip the last bit of that string). What's the encoding error doing on here? Alternately, I would accept a concise way to take out just the numbers.

    Read the article

  • Weird Overlay draw behaviour when zooming in the MapView [android]

    - by Itsik
    I've extended Overlay and implemented draw() in order to draw some stuff onto the map. When zooming is done through mapController.zoomIn() (called when doubleTapping the map), the overlay is drawn properly onto the map. BUT whenever I zoom in/out with the built in zoom controller, the overlay is not drawn properly and panning the map is needed to get the overlay refreshed.

    Read the article

  • Weird jquery behaviour

    - by musoNic80
    I'm trying to achieve something really basic but jquery isn't doing what I expect! I have a div with an id of "stuff". In the css I set the display attribute to "none" with the aim of changing it with jquery. This way the div is hidden unless the user has js enabled. My jquery code is simply $("#stuff").show(); unfortunately this isn't working and the div remains hidden.

    Read the article

  • Weird Rails URL issue when rendering a new action

    - by Tony
    I am rendering a new action but somehow getting the "index" URL. To be more specific, my create action looks like this: class ListingsController < ApplicationController def create @listing = Listing.new(params[:listing]) @listing.user = @current_user if @listing.save redirect_to @listing else flash[:error] = "There were errors" render :action => "new" end end end When there are errors, I get the "new" action but my URL is the index URL - http://domain.com/listings Anyone know why this would happen? My routes file is fairly standard: map.connect 'listings/send_message', :controller => 'listings', :action => 'send_message' map.resources :listings map.root :controller => "listings" map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format'

    Read the article

  • formtastic weird month name display

    - by Alexey Poimtsev
    Hi, i'm using formtastic, all is ok, but strange thing - on = form.input :birthdate, :as => :date it renders to something like <li><label for="profile_birthdate_2i">Month</label><select id="profile_birthdate_2i" name="profile[birthdate(2i)]"> <option value="1">114</option> <option value="2">97</option> <option value="3">110</option> <option value="4">115</option> <option value="5">108</option> <option value="6">97</option> <option value="7">116</option> <option value="8">105</option> <option value="9">111</option> <option value="10">110</option> <option value="11">32</option> <option value="12">109</option> </select> but if i'm using in semantic_form something like = form.datetime_select :birthdate it renders correctly. I've found information, that it may be caused by locale file with no translations for month names, but its so strange - why rails helpers renders month names ok, but formtastic - not :( any ideas?

    Read the article

  • Weird syntax for extending jQuery

    - by cantabilesoftware
    I recently saw this code on another post ( http://stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area ) new function($) { $.fn.setCursorPosition = function(pos) { // function body omitted, not relevant to question } } (jQuery); After too long trying to understand what it was doing I finally figured out that it's just creating a new function with a parameter $ and then invoking it with jQuery as the parameter value. So actually, it's just doing this: jQuery.fn.setCursorPosition = function(pos) { // function body omitted, not relevant to question } What's the reason for the original, more confusing version?

    Read the article

  • iPhone Debugger Message -- Weird

    - by Bill Shiff
    Hello, I have an iPhone app that I've been working on and have recently upgraded my version of XCode. Since the upgrade, I can build and debug in the iPhone Simulator just fine, but when I try to debug on an attached device I get the following messages: From Xcode4: GNU gdb 6.3.50-20050815 (Apple version gdb-1510) (Fri Oct 22 04:12:10 UTC 2010) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys001 sharedlibrary apply-load-rules all warning: Unable to read symbols from "dyld" (prefix __dyld_) (not yet mapped into memory). warning: Unable to read symbols for (null)/Library/Frameworks/MessageUI.framework/MessageUI (file not found). warning: Unable to read symbols from "MessageUI" (not yet mapped into memory). warning: Unable to read symbols for (null)/Library/Frameworks/MapKit.framework/MapKit (file not found). warning: Unable to read symbols from "MapKit" (not yet mapped into memory). warning: Unable to read symbols from "Foundation" (not yet mapped into memory). warning: Unable to read symbols for (null)/Library/Frameworks/UIKit.framework/UIKit (file not found). warning: Unable to read symbols from "UIKit" (not yet mapped into memory). warning: Unable to read symbols for (null)/Library/Frameworks/CoreGraphics.framework/CoreGraphics (file not found). warning: Unable to read symbols from "CoreGraphics" (not yet mapped into memory). warning: Unable to read symbols from "CoreData" (not yet mapped into memory). warning: Unable to read symbols from "QuartzCore" (not yet mapped into memory). warning: Unable to read symbols from "libgcc_s.1.dylib" (not yet mapped into memory). warning: Unable to read symbols from "libSystem.B.dylib" (not yet mapped into memory). warning: Unable to read symbols from "libobjc.A.dylib" (not yet mapped into memory). warning: Unable to read symbols from "CoreFoundation" (not yet mapped into memory). target remote-mobile /tmp/.XcodeGDBRemote-3836-28 Switching to remote-macosx protocol mem 0x1000 0x3fffffff cache mem 0x40000000 0xffffffff none mem 0x00000000 0x0fff none [Switching to thread 11523] [Switching to thread 11523] gdb stack crawl at point of internal error: 0 gdb-arm-apple-darwin 0x0013216e internal_vproblem + 316

    Read the article

  • Weird zend fw problem that makes me crazy!!

    - by Harun Baris Bulut
    Hi, There is a problem that I can't resolve. I am developing a project and test on my computer which runs as expected. But when I move the project to testing server, which also has Zend Server CE, it gives blank page. Display errors function is ON and I put try catch at the very begining, but it still shows a blank page. When ever I write "exit;" command at the end of related view script, page works normally! What can couse this problem ? Thanks

    Read the article

  • PHP MySQL Weird Update Problem

    - by Tim
    I have a heap based table in MySQL that I am trying to update via PHP, but for some reason, the updates do not seem to be taking place. Here is my test code: <?php $freepoints[] = 1; $freepoints[] = 2; $freepoints[] = 3; foreach ($freepoints as $entrypoint) { $query = "update gates set lane='{$entrypoint}' where traffic > 50 limit 50"; echo "$query\n"; mysql_query($query); echo mysql_affected_rows()."\n"; } ?> This outputs the following: update gates set lane='1' where traffic > 50 limit 50 50 update gates set lane='2' where traffic > 50 limit 50 50 update gates set lane='3' where traffic > 50 limit 50 50 In the database to start with lanes 1/2/3 had 0 records and lanes 4/5/6 had 100 records. From this I am expecting all 6 lanes to now have 50 records each. However when I look lanes 4/5/6 still have 100 records and 1/2/3 still have 0 records. When I copy the query "update gates set lane='1' where traffic 50 limit 50" into phpMyAdmin it works absolutely fine, so any ideas why it isn't working in my PHP script when mysql_affected_rows is saying it has updated 50 records?

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >