Search Results

Search found 5172 results on 207 pages for 'stackoverflow podcast'.

Page 73/207 | < Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >

  • gcc, strict-aliasing, and casting through a union

    - by Joseph Quinsey
    About a year ago the following paragraph was added to the GCC Manual, version 4.3.4, regarding -fstrict-aliasing: Similarly, access by taking the address, casting the resulting pointer and dereferencing the result has undefined behavior [emphasis added], even if the cast uses a union type, e.g.: union a_union { int i; double d; }; int f() { double d = 3.0; return ((union a_union *)&d)->i; } Does anyone have an example to illustrate this undefined behavior? Note this question is not about what the C99 standard says, or does not say. It is about the actual functioning of gcc, and other existing compilers, today. My simple, naive, attempt fails. For example: #include <stdio.h> union a_union { int i; double d; }; int f1(void) { union a_union t; t.d = 3333333.0; return t.i; // gcc manual: 'type-punning is allowed, provided ...' } int f2(void) { double d = 3333333.0; return ((union a_union *)&d)->i; // gcc manual: 'undefined behavior' } int main(void) { printf("%d\n", f1()); printf("%d\n", f2()); return 0; } works fine, giving on CYGWIN: -2147483648 -2147483648 Also note that taking addresses is obviously wrong (or right, if you are trying to illustrate undefined behavior). For example, just as we know this is wrong: extern void foo(int *, double *); union a_union t; t.d = 3.0; foo(&t.i, &t.d); // UD behavior so is this wrong: extern void foo(int *, double *); double d = 3.0; foo(&((union a_union *)&d)->i, &d); // UD behavior For background discussion about this, see for example: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1422.pdf http://gcc.gnu.org/ml/gcc/2010-01/msg00013.html http://davmac.wordpress.com/2010/02/26/c99-revisited/ http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html http://stackoverflow.com/questions/98650/what-is-the-strict-aliasing-rule http://stackoverflow.com/questions/2771023/c99-strict-aliasing-rules-in-c-gcc/2771041#2771041 The first link, draft minutes of an ISO meeting seven months ago, notes in section 4.16: Is there anybody that thinks the rules are clear enough? No one is really able to interpret tham.

    Read the article

  • How to integrate Windows Azure, Spring.NET and NHibernate?

    - by paologios
    Hi, we have a ASP.NET web application which makes use of NHibernate and Spring.NET (to do the session and transaction management stuff). Now we want to port parts of it to a Windows Azure application without making lots of changes to the used components. I already found this article of stackoverflow so I hope to get NHibernate running on Azure. My question: Has anybody experiences in running Spring.NET on Azure (with or without NHibernate) ??

    Read the article

  • How to use linked resource with eclipse CDT ?

    - by pejotr
    I found it very difficult to configure linked resource in Eclipse CDT. Folder "wspolne" is located somewhere in the system, I'd like to use .cpp .h files from it in my current project, but avoid copying it. From what i read about Linked Resources is a solution, but I can't build a projct :/ I followed instuctions described here with out any result: stackoverflow.com/questions/1907275/in-eclipse-cdt-shared-resource-folder-that-is-built-differently-for-the-project. What's wrong ? Image that shows problem: http://img260.imageshack.us/img260/1629/eclipsen.jpg

    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

  • Use OpenOffice to do server-side ppt(x) to swf conversion

    - by Steven Xu
    I'd like to turn Powerpoint presentations to SWF files the same way that OpenOffice does it, except automatically through a command line call. I came across http://stackoverflow.com/questions/886144, which led me to explore PyUNO bridge, which comes with OpenOffice as well as the OpenOffice command line API, but I wasn't able to make anything productive of it. Any guidance is appreciated. If there is a good solution outside of OpenOffice, I would be happy to try it too.

    Read the article

  • Path parsing in rails

    - by fl00r
    Hi! I am looking for method for parsing route path like this: ActionController::Routing.new("post_path").parse #=> {:controller => "posts", :action => "index"} It should be opposite to url_for Upd I've found out: http://stackoverflow.com/questions/2222522/what-is-the-opposite-of-url-for-in-rails-a-function-that-takes-a-path-and-genera ActionController::Routing::Routes.recognize_path("/posts") So now I need to convert posts_path into "/posts"

    Read the article

  • php-openID doesn't work with Yahoo!

    - by hd
    i am trying to use php-openid library for implementing openID in my site. the basic consumer example inside its package doesn't work for Google and Yahoo. i found the Google solution here: http://stackoverflow.com/questions/1183788/example-usage-of-ax-in-php-openid/2612816 but it doesn't still work for Yahoo! . how can i made it works?

    Read the article

  • Dynamic dropdown search box

    - by glebm
    Are there any gems that would help me make a search box like the one for tags on stackoverflow? (Rails 2.3.5, required IE7 support and graceful no-script fall-back) P.S.: Do these boxes annoy you or do you think it's a good thing to have one?

    Read the article

  • CLLOcationManager will work correctly in iphone sdk?

    - by Mikhail Naimy
    hi, I am using the code which is in the URL stackoverflow.but I have done database operation in that method(didEnterRegionCLRegion ).Will it work correctly without opening the application (in background).I have given alert also.but it is not called.anyone who is experienced , help me in this matter?I am in India..will it give only correct GEO information only for AT&T service provider?Apple did not give any sample code for it?I have registered location in viewcontroller, i have to do the same in any Delegate methods?

    Read the article

  • Managing attachmnet files with same name and different content.

    - by Pari
    Hi, I am extracting attachment from Inbox,Send,Drafts e.t.c. mails. And saving them in a folder. Using below logic: http://stackoverflow.com/questions/1361695/how-to-access-attachments-from-notes-mail But problem i am facing here is. Attachment having same type and name but different content. In current situation it is replacing old file with new one. How i can uniquely manage this attachment for different mails.

    Read the article

  • want to make better content display

    - by Rahul Mehta
    Hi, We are developing a social networking project, in this project we are adding content , e.g. images , video,audio,link(html). Currently we are using shadowbox.js to show it.But for better and effectiveness we want to use some other better plugin, or want to make own window for showing images and link. Please help , what is the best solution for this project. I want to know this is the white board quesion means programmer.stackexchange question or stackoverflow quesion? Thanks

    Read the article

  • change dojo namespace

    - by Robert
    I need to change the dojo namespace to something else. I found this stackoverflow post, but it refers to a dojo documentation page that no longer exists. Below is something I tried based on this page, but didn't work: <html <head <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js" djConfig="scopeMap: [[ 'dojo', 'newns' ]]"</script <script newns.addOnLoad(function(){ console.debug("hello world"); }); </script </head <body </body </html Help!

    Read the article

  • Extracting columns from text file using PowerShell

    - by atricapilla
    Hi, I have to extract columns from a text file explained in this post: http://stackoverflow.com/questions/2499746/extracting-columns-from-text-file-using-perl-similar-to-unix-cut but I have to do this also in a Windows Server 2008 which does not have Perl installed. How could I do this using PowerShell? Any ideas or resources? I'm PowerShell noob...

    Read the article

  • How to disable click sound in WebBrowser Control

    - by dr. evil
    I use Javascript to click a link in the webbrowser control. But I don't want to hear IE's "click" sound. Is there anyway to do this? P.S. I don't want to change system settings. I've seen this one(http://stackoverflow.com/questions/10456/howto-disable-webbrowser-click-sound-in-your-app-only) but Document.Write is not an option for me.

    Read the article

  • generate sha256 with openssl and C++

    - by Stanislav Palatnik
    Hello, I'm looking to create a hash with sha256 using openssl and C++. I know there's a similar post about this here: http://stackoverflow.com/questions/918676/generate-sha-hash-in-openssl, but I'm looking to specifically create sha256. UPDATE: Seems to be a problem witht he include paths. It can't find any openssl functions even though I included #include "openssl/sha.h" and I included the paths in my build -I/opt/ssl/include/ -L/opt/ssl/lib/ -lcrypto

    Read the article

  • Key Value Database For Windows?

    - by Axl
    Other than MongoDB and Memcached, what key-value stores run on Windows? Most of the ones I've seen seem to only run on Linux (Hypertable, Redis, Lightcloud). Related links: http://stackoverflow.com/questions/639545/is-there-a-business-proven-cloud-store-keyvalue-database-open-source http://www.metabrew.com/article/anti-rdbms-a-list-of-distributed-key-value-stores/

    Read the article

  • More nest Python nested dictionaries.

    - by clutch
    After reading http://stackoverflow.com/questions/635483/what-is-the-best-way-to-implement-nested-dictionaries-in-python why is it wrong to do: c = collections.defaultdict(collections.defaultdict(int)) in python? I would think this would work to produce {key:{key:1}} or am I thinking about it wrong?

    Read the article

  • Upload images to a specific Facebook Album

    - by Imran Naqvi
    Hi stackoverflow, i can create an album using facebook graph api by posting data to http://graph.facebook.com/PROFILE_ID/albums it returns an id, which is not the album id. I confirmed it in two ways by going to that album, aid is different than what id i received and by posting http://graph.facebook.com/{ALBUM_ID_I_RECIEVED/photos, but the photo is never published to newly created album instead it is published to a default application album. I need to know the real album id so that i can upload images to newly created album. Please Help

    Read the article

  • control + enter in browser takes only .com?

    - by Abhilash M
    I have this strange problem, how exactly does control + enter decides the domain of a website?? If i type stackoverflow,then hit control+enter, it works and takes to homepage, but i type ubuntuforums, then hit control + enter, it does not recognise its ubuntuforums.org, but goes to ubuntuforums.com?? How does this exactly work? If i need to change this behaviour, how should i do it?

    Read the article

< Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >