Search Results

Search found 15081 results on 604 pages for 'passing by reference'.

Page 88/604 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • Project Reference added to one of the projects in the same solution appears broken in another solution

    - by CSharpLearner
    I have couple of solutions. In the first solution I have many projects. One of the project named 'A' has a project reference of another project 'B' of the same solution. In second solution, the project 'A' is added but not the project 'B'. Both the solutions build successfully. However, in second solution, reference of B added in the project A, appears broken. Why? Now, in first solution, instead of adding Project reference of B into A, i simply add a 'file reference' of B's DLL (which is copied at the common output directory created for all the projects) into A. Now the reference appears broken in both the solution even though both the solutions are built successfully. May I know what should I do when I have such a scenario?

    Read the article

  • C# XNA: What can cause SpriteBatch.End() to throw a NPE?

    - by Rosarch
    I don't understand what I'm doing wrong here: public void Draw(GameTime gameTime) // in ScreenManager { SpriteBatch.Begin(SpriteBlendMode.AlphaBlend); for (int i = 0; i < Screens.Count; i++) { if (Screens[i].State == Screen.ScreenState.HIDDEN) continue; Screens[i].Draw(gameTime); } SpriteBatch.End(); // null ref exception } SpriteBatch itself is not null. Some more context: public class MasterEngine : Microsoft.Xna.Framework.Game { public MasterEngine() { graphicsDeviceManager = new GraphicsDeviceManager(this); Components.Add(new GamerServicesComponent(this)); // ... spriteBatch = new SpriteBatch(graphicsDeviceManager.GraphicsDevice); screenManager = new ScreenManager(assets, gameEngine, graphicsDeviceManager.GraphicsDevice, spriteBatch); } //... protected override void Draw(GameTime gameTime) { screenManager.Draw(gameTime); // calls the problematic method base.Draw(gameTime); } } Am I failing to initialize something properly? UPDATE: As an experiment, I tried this to the constructor of MasterEngine: spriteBatch = new SpriteBatch(graphicsDeviceManager.GraphicsDevice); spriteBatch.Begin(); spriteBatch.DrawString(assets.GetAsset<SpriteFont>("calibri"), "ftw", new Vector2(), Color.White); spriteBatch.End(); This does not cause a NRE. hmm....

    Read the article

  • Referencing dlls built with older .Net versions

    - by stiank81
    In a project using .Net4 - should there be any issues referencing dlls built for older versions of .Net? We're talking 3rd Party dlls here. I'm asking this as a general question. Specifically I have a problem referencing FluentNHibernate.dll - built with .Net3.5. It worked justed fine before I updated my project from .Net3.5 to .Net4.

    Read the article

  • Is this Leftist Tree piece of code from Wikipedia correct?

    - by they changed my name
    Link public Node merge(Node x, Node y) { if(x == null) return y; if(y == null) return x; // if this was a max height biased leftist tree, then the // next line would be: if(x.element < y.element) if(x.element.compareTo(y.element) > 0) { // x.element > y.element Node temp = x; x = y; y = temp; } x.rightChild = merge(x.rightChild, y); if(x.leftChild == null) { // left child doesn't exist, so move right child to the left side x.leftChild = x.rightChild; x.rightChild = null; x.s = 1; } else { // left child does exist, so compare s-values if(x.leftChild.s < x.rightChild.s) { Node temp = x.leftChild; x.leftChild = x.rightChild; x.rightChild = temp; } // since we know the right child has the lower s-value, we can just // add one to its s-value x.s = x.rightChild.s + 1; } return x; } What makes me ask this question is: if(x.element.compareTo(y.element) > 0) { // x.element > y.element Node temp = x; x = y; y = temp; } Isn't that just not gonna work, since the references are only switched inside the method?

    Read the article

  • rails: self-referential association

    - by john
    hi, My needs are very simple: I have a Tip table to receive comments and have comments to receive comments, too. To retrieve each comment that is stored in the same table (comments), I created another key for the comments on comments: "inverse_comments". I tried to use one comments table by using self-referntial association. Some resources seem to bring more than one table into the piture which are diffent from my needs. So I came up whth the following modeling for comments: class Comment < ActiveRecord::Base belongs_to :tip belongs_to :user has_many :mycomments, :through => :inverse_comments, :source => :comment end Apparently something is missing here but I cannot figure it out. Could some one enlighten me on this: what changes I need to do to make the model work? thanks.

    Read the article

  • Object still linked (referenced) after selecting it out of list?

    - by djerry
    Hey guys, I was wondering, and i'm not really sure, but help me out here. If you have a List items, and there's one object you need to change a property of it. Say myClass has a string property "status". I'm searching my list with a for-loop and i get my object so i do myClass item = items[i]; if i want to change the "status" property, i do this for example : item.Status = "new status"; My question/issue is this: is "item" still linked to the list item, so that if i execute the line above, it will be changed in the list as well without having to set this : items[i] = item; Hope this is clear. Thanks in advance.

    Read the article

  • Javascript jQuery .click() callback references local variable from the calling method instead of cop

    - by Eric Freese
    The following jQuery Javascript code is included on an otherwise empty page. $(function() { for (var i = 0; i < 10; i++) { element = $('<div>' + i + '</div>'); element.click(function() { alert(i); }); $('body').append(element); } }); The desired behavior is that this code should generate 10 div elements numbered from 0 to 9. When you click on a div element, an alert popup will show the number of the div element you clicked on (i.e. if a user clicks on the div element labeled '4', the alert popup should show the number 4). The alert popup instead shows the number 10 regardless of which div element is clicked on. How can I modify this code to make it behave in the desired way?

    Read the article

  • How to find distance between two geopoints in c using calculateDistance(const CWaypoint& wp)

    - by Harsha
    void getAllDataByPointer(string *pname,double *platitude, double *plongitude); void getAllDataByReference(string &pname,double &platitude, double &plongitude); double calculateDistance(const CWaypoint& wp); void print(int format); bool less(const CWaypoint& wp_right); CWaypoint add(const CWaypoint& wp_right); These are the functions I am using. I have the values as output but how to call the latitude values of two different cities so that I can use the following formula distance = ERADIUS * (acos(sin(latitude_1)*sin(latitude_2) + cos(latitude_1) * cos(latitude_2)*cos(longitude_2 - longitude_1)));

    Read the article

  • Does LearnDevNow offers a useful subscription for .NET related training : with video and text reference material?

    - by user766926
    Does LearnDevNow offers a useful subscription for .NET video and text reference training material or to learn .NET? I could not find a review of www.learnnowonline.com/learndevnow I've been doing research about places that offer .NET / ASP.NET / C# / LINQ / SQL / JQuery video training that provide excellent material for developers. Kind of like a Lynda.com for back end development. However, I have not find one place that offers quality material that is easily accessible for the user, and that is priced competitive. This is what I'm looking for: Online Video tutorials with free future updates (videos that can be accessed on any device ie: android portable devices, mac / ipad, linux machines) Printable courseware (ie PDFs so that you can take notes, print if necessary, and read in a tablet in case you don;t have internet access) labs, and easy to access code Pre/Post Assessments/Exams for each training to keep track of your progress and what you have learned/skills. (Appdev used to offer this but it was way too expensive (thousands for each training ie 1k for each. I paid about five thousand at Appdev, and now I regret that purchase), and after a few years/months the training became obsolete - outdated) I looked at learnnowonline.com/learndevnow but it seems that their courseware / text reference material can only be accessed online, and don't know if their videos work in all mobile devices, and browsers (Safari, Chrome, IE, Opera, Firefox) Also, it seems Appdev not longer exist and now is called " AppDev is now LearnNowPlus : www.learnnowonline.com/appdev That site not longer offers prices. I tried to find reviews but could not find any. Does anyone know, or can share a review about some of these type of online training service providers? I would appreciate your feedback on this, and if you can share your past experiences with their service or similar/better services that would even be better. Thanks.

    Read the article

  • Why "object reference not set to an instance of an object" doesn't tell us which object?

    - by Saeed Neamati
    We're launching a system, and we sometimes get the famous exception NullReferenceException with the message Object reference not set to an instance of an object. However, in a method where we have almost 20 objects, having a log which says an object is null, is really of no use at all. It's like telling you, when you are the security agent of a seminar, that a man among 100 attendees is a terrorist. That's really of no use to you at all. You should get more information, if you want to detect which man is the threatening man. Likewise, if we want to remove the bug, we do need to know which object is null. Now, something has obsessed my mind for several months, and that is: Why .NET doesn't give us the name, or at least the type of the object reference, which is null?. Can't it understand the type from reflection or any other source? Also, what are the best practices to understand which object is null? Should we always test nullability of objects in these contexts manually and log the result? Is there a better way?

    Read the article

  • Do cross reference database tables have a place in domain driven design?

    - by Mike Cellini
    First some background. Let's say we have a system where a customer is placing an order in a web interface. The items that customer is ordering can priced in various ways. Sometimes including the cost of delivery and sometimes not at all. That pricing effectively depends on a variety of factors including the vendor's own pricing model, that vendor's individual contracts with customers as well as that vendor's contracts with its own suppliers. Let's assume that once a customer places an order for a particular item and chooses a contract if any, the method of delivery can be determined by variables on those contracts. Those delivery methods also live in their own table in the database and have various properties consumed downstream. It makes sense that a cross reference or lookup table would store that information. That table would be loaded into the domain and could then be used to apply the appropriate delivery method while processing the order. Does this make sense in the context of domain driven design? Or is my thinking too relational? Is this logic that should be built into it's own class/method (I mean beyond apply the cross reference table data)?

    Read the article

  • Performance Testing &ndash; Quick Reference Guide &ndash; Released up on CodePlex

    - by Shawn Cicoria
    Why performance test at all right?  Well, physics still plays a role in what we do.  Why not take a better look at your application – need help, well, the Rangers team just released the following to help: The following has both VS2008 & VS2010 content: http://vstt2008qrg.codeplex.com/ Visual Studio Performance Testing Quick Reference Guide (Version 2.0) The final released copy is here and ready for full time use. Please enjoy and post feedback on the discussion board. This document is a collection of items from public blog sites, Microsoft® internal discussion aliases (sanitized) and experiences from various Test Consultants in the Microsoft Services Labs. The idea is to provide quick reference points around various aspects of Microsoft Visual Studio® performance testing features that may not be covered in core documentation, or may not be easily understood. The different types of information cover: How does this feature work under the covers? How can I implement a workaround for this missing feature? This is a known bug and here is a fix or workaround. How do I troubleshoot issues I am having

    Read the article

  • Magento - Add CMS Block to One Page

    - by a1anm
    I have this code in a xml layout file: <reference name="left"> <block type="blog/blog" name="left.blog.menu" before="-"> <action method="setTemplate" ifconfig="blog/menu/left"> <template>aw_blog/menu.phtml</template> </action> <block type="blog/tags" name="blog_tags" /> </block> </reference> I want to add a cms static block to the blog pages using this code: <block type="cms/block" name="brand_list"> <action method="setBlockId"><block_id>brand_list</block_id></action> </block> If I add it in directly after this line: <reference name="left"> It works but it is then displayed on every page. How can I get it to show only on the blog pages? Thanks. Edit: Here is the entire xml file: <layout version="0.1.0"> <default> <reference name="footer_links"> <block type="blog/blog" name="add.blog.footer"> <block type="blog/tags" name="blog_tags" /> <action method="addFooterLink" ifconfig="blog/menu/footer"></action> </block> </reference> <reference name="right"> <block type="blog/blog" name="right.blog.menu" before="-"> <action method="setTemplate" ifconfig="blog/menu/right" ifvalue="1"> <template>aw_blog/menu.phtml</template> </action> <block type="blog/tags" name="blog_tags" /> </block> </reference> <reference name="left"> <block type="blog/blog" name="left.blog.menu" before="-"> <action method="setTemplate" ifconfig="blog/menu/left"> <template>aw_blog/menu.phtml</template> </action> <block type="blog/tags" name="blog_tags" /> </block> </reference> <reference name="top.links"> <block type="blog/blog" name="add.blog.link"> <action method="addTopLink" ifconfig="blog/menu/top"></action> <block type="blog/tags" name="blog_tags" /> </block> </reference> <reference name="head"> <action method="addItem"><type>skin_css</type><name>aw_blog/css/style.css</name></action> </reference> </default> <blog_index_index> <reference name="content"> <block type="blog/blog" name="blog" template="aw_blog/blog.phtml"/> </reference> </blog_index_index> <blog_index_list> <reference name="content"> <block type="blog/blog" name="blog" template="aw_blog/blog.phtml"/> </reference> </blog_index_list> <blog_post_view> <reference name="content"> <block type="blog/post" name="post" template="aw_blog/post.phtml"> <block type="socialbookmarking/bookmarks" name="bookmarks" template="bookmarks/bookmarks.phtml"/> </block> </reference> </blog_post_view> <blog_cat_view> <reference name="content"> <block type="blog/cat" name="cat" template="aw_blog/cat.phtml" /> </reference> </blog_cat_view> <blog_rss_index> <block type="blog/rss" output="toHtml" name="rss.blog.new"/> </blog_rss_index> </layout>

    Read the article

  • How do .so files avoid problems associated with passing header-only templates like MS dll files have?

    - by Doug T.
    Based on the discussion around this question. I'd like to know how .so files/the ELF format/the gcc toolchain avoid problems passing classes defined purely in header files (like the std library). According to Jan in that answer, the dynamic linker/loader only picks one version of such a class to load if its defined in two .so files. So if two .so files have two definitions, perhaps with different compiler options/etc, the dynamic linker can pick one to use. Is this correct? How does this work with inlining? For example, MSVC inlines templates aggressively. This makes the solution I describe above untenable for dlls. Does Gcc never inline header-only templates like the std library as MSVC does? If so wouldn't that make the functionality of ELF described above ineffective in these cases?

    Read the article

  • libgtk2.0-common fails to build with Gdk-2.0.gir error, Type reference 'GdkPixbuf' not found

    - by Stefano Palazzo
    I'm trying to build gtk, but it fails. Here's what I'm doing: sudo apt-get build-dep libgtk2.0-common sudo apt-get source libgtk2.0-common cd gtk+2.0-2.22.0/ sudo gedit gtk/gtktreeview.c & #...editing a few files (or not, it's the same error) sudo ./configure --prefix=/usr sudo make The compilation runs for a while and then quits: Gdk-2.0.gir: error: Type reference 'GdkPixbuf' not found ... make: *** [all] Error 2 What am I doing wrong?

    Read the article

  • Passing functions into other functions as parameters, bad practice?

    - by BlueHat
    We've been in the process of changing how our AS3 application talks to our back end and we're in the process of implementing a REST system to replace our old one. Sadly the developer who started the work is now on long term sick leave and it's been handed over to me. I've been working with it for the past week or so now and I understand the system, but there's one thing that's been worrying me. There seems to be a lot of passing of functions into functions. For example our class that makes the call to our servers takes in a function that it will then call and pass an object to when the process is complete and errors have been handled etc. It's giving me that "bad feeling" where I feel like it's horrible practice and I can think of some reasons why but I want some confirmation before I propose a re-work to system. I was wondering if anyone had any experience with this possible problem?

    Read the article

  • Which language unifies OOP, both RPC call and Message passing a la Smalltalk, and more ...

    - by user310291
    I hate software editors who pretend to know better what you need and choose for you. Java and c# pretend multiple inheritance is dangerous. That I agree I often use Interface but in some cases I may need multiple inheritance : why not let me choose ? Also today you have to choose between RPC call à la Java and Message passing à la Objective C. Again can't I choose when one or the other is more practical ? So is there any language on earth which will free me from what I want to choose to use dependending on MY context and MY own judgement ?

    Read the article

  • How to get a Read-Write Reference to Parent GameObject from a script component attached to it?

    - by onguarde
    I have a game object(object) with a script component(myscript) attached. I have a reference to myscript component through getComponent, and I want to change the transform of the gameObject the script is attached to. myscript.gameObject.transform = (new value); The above code gives me error, Property 'UnityEngine.GameObject.transform' is read only. Is there a way to get a read-write version?

    Read the article

  • Cannot boot: "No init found. Try passing init=bootarg"

    - by glutz
    After losing power, my machine rebooted to this error: “error: no init found. Try passing init=bootarg” Per similar threads on this site and others, I've tried booting from a CD and selecting "Try Ubuntu". Then open a terminal and typing: sudo fsck-y /dev/sda1. The response is: Device or resource busy while trying to open /dev/sda1. Filesystem mounted or opened exclusively by another program? This is on Ubuntu 10.10. Any ideas on what I can try next?

    Read the article

  • Cross-compiling with OpenSSL for Windows

    - by singpolyma
    I'm trying to compile the oauth-utils http://mir.dnsalias.com/oss/oauth/start for Windows from Ubuntu. I have compiled it on Windows before (a few months back), but wanted to try cross-compiling. I got openssl build using mingw32 ok, and put libssl.a and libcrypto.a in the right place. The linker is now finding the libraries (yay!) but I get the following error: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xaac): undefined reference to `_CreateDCA@16' /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xab9): undefined reference to `_CreateCompatibleDC@4' /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xacc): undefined reference to `_GetDeviceCaps@8' /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xadc): undefined reference to `_GetDeviceCaps@8' /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xaf4): undefined reference to `_CreateCompatibleBitmap@12' /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xb04): undefined reference to `_SelectObject@8' /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xb18): undefined reference to `_GetObjectA@12' /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xb81): undefined reference to `_BitBlt@36' /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xb8c): undefined reference to `_GetBitmapBits@12' /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xbe5): undefined reference to `_SelectObject@8' /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xbec): undefined reference to `_DeleteObject@4' /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xbf6): undefined reference to `_DeleteDC@4' /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xc00): undefined reference to `_DeleteDC@4' Any ideas what could be causing this? Thanks.

    Read the article

  • Using an embedded DB (SQLite / SQL Compact) for Message Passing within an app?

    - by wk1989
    Hello, Just out of curiosity, for applications that have a fairly complicated module tree, would something like sqlite/sql compact edition work well for message passing? So if I have modules containing data such as: \SubsystemA\SubSubSysB\ModuleB\ModuleDataC, \SubSystemB\SubSubSystemC\ModuleA\ModuleDataX Using traditional message passing/routing, you have to go through intermediate modules in order to pass a message to ModuleB to request say ModuleDataC. Instead of doing that, if we we simply store "\SubsystemA\SubSubSysB\ModuleB\ModuleDataC" in a sqlite database, getting that data is as simple as a sql query and needs no routing and passing stuff around. Has anyone done this before? Even if you haven't, do you foresee any issues & performance impact? The only concern I have right now would be the passing of custom types, e.g. if ModuleDataC is a custom data structure or a pointer, I'll need some way of storing the data structure into the DB or storing the pointer into the DB. Thanks, JW EDIT One usage case I haven't thought about is when you want to send a message from ModuleA to ModuleB to get ModuleB to do something rather than just getting/setting data. Is it possible to do this using an embedded DB? I believe callback from the DB would be needed, how feasible is this?

    Read the article

  • Compiling C++ code with mingw under 12.04

    - by golemit
    I tried to setting up compiling of the C++ projects under my Ubuntu 12.04 by mingw with QT libraries. The idea was to get executable independent from variations of target Windows versions and development environments of my colleagues. It was successfully implemented under OpenSuse 12.2 with mingw32 and some additional libraries including mingw32-libqt4 and some others. Fine. However when trying to do the same under Ubuntu 12.04 with mingw-w64 including latest libraries QT-4.8.3 copied from Windows there were always errors. No luck. The typical errors in these attempts can be seen in attachments. The commands used: qmake -spec /path_to_my_conf/win32-x-g++ my_project.pro make Can someone give a hint of the problem source? I would appreciate a good advice. Serge some exctracts from LOG: ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0xec): undefined reference to `QDialog::accept()' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0xf0): undefined reference to `QDialog::reject()' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0x104): undefined reference to `non-virtual thunk to QWidget::devType() const' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0x108): undefined reference to `non-virtual thunk to QWidget::paintEngine() const' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0x10c): undefined reference to `non-virtual thunk to QWidget::getDC() const' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0x110): undefined reference to `non-virtual thunk to QWidget::releaseDC(HDC__*) const' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0x114): undefined reference to `non-virtual thunk to QWidget::metric(QPaintDevice::PaintDeviceMetric) const' ./.obj/qrc_images.o:qrc_images.cpp:(.text+0x24): undefined reference to `__imp___Z21qRegisterResourceDataiPKhS0_S0_' ./.obj/qrc_images.o:qrc_images.cpp:(.text+0x64): undefined reference to `__imp___Z23qUnregisterResourceDataiPKhS0_S0_' collect2: ld returned 1 exit status

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >