Search Results

Search found 4689 results on 188 pages for 'weak references'.

Page 59/188 | < Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >

  • constructor should not call methods

    - by Stefano Borini
    I described to a colleague why a constructor calling a method is an antipattern. example (in my rusty C++) class C { public : C(int foo); void setFoo(int foo); private: int foo; } C::C(int foo) { setFoo(foo); } void C::setFoo(int foo) { this->foo = foo } I would like to motivate better this fact through your additional contribute. If you have examples, book references, blog pages, or names of principles, they would be very welcome. Edit: I'm talking in general, but we are coding in python.

    Read the article

  • Sorting a vector of (double precision) reals and obtain their order

    - by Philipp
    Hello everyone, in C++ would like to sort a lengthy (2^20) vector of reals, obviously sort() does the trick. Having used R before I was used to the nice order() function which yields the permutation that leads to the sorted vector. Probably someone has done this in C++, maybe it's just my weak google-Fu that prevents me from finding it. And yeah, obivously my C++ newbness could stop me from spotting something straightforward. Example: x = {24, 55, 22, 1} then the permutation perm = {3, 2, 0, 1} maps the original x to the sorted x in ascending order. I can probably implement some bubble sort which does not only sort x but performs the same transpositions on the vector {0,1,2,...} and outputs both, but I believe someone must have thought about it and especially have done it efficiently. Thank you very much, Philipp

    Read the article

  • Implementing a FSM with ActionScript 2 without using classes?

    - by Up2u
    I have seen several references of A.I. and FSM, but sadly I still can't understand the point of an FSM in AS2.0. Is it a must to create a class for each state? I have a game-project which also it has an A.I., the A.I. has 3 states: distanceCheck, ChaseTarget, and Hit the target. It's an FPS game and played via mouse. I have created the A.I. successfully, but I want to convert it to FSM method... My first state is CheckDistanceState() and in that function I look for the nearest target and trigger the function ChaseState(), there I insert the Hit() function to destroy the enemy, The 3 functions that I created are being called in AI_cursor.onEnterframe. Is there any chance to implement an FSM without the need to create a class? From what I've read before, you have to create a class. I prefer to write the code on frames in flash and I still don't understand how to have external classes.

    Read the article

  • How are generics implemented?

    - by greenoldman
    This is the question from compiler internals perspective. I am interested in generics, not templates (C++), so I marked the question with C#. Not Java, because AFAIK the generics in both languages differ in implementations. When I look at languages w/o generics it is pretty straightforward, you can validate the class definition, add it to hierarchy and that's it. But what to do with generic class, and more importantly how handle references to it? How to make sure that static fields are singular per instantiations (i.e. each time generic parameters are resolved). Let's say I see a call: var x = new Foo<Bar>(); Do I add new Foo_Bar class to hierarchy? Update: So far I found only 2 relevant posts, however even they don't go into much details in sense "how to do it by yourself": http://www.jprl.com/Blog/archive/development/2007/Aug-31.html http://www.artima.com/intv/generics2.html

    Read the article

  • Constructor should generally not call methods

    - by Stefano Borini
    I described to a colleague why a constructor calling a method can be an antipattern. example (in my rusty C++) class C { public : C(int foo); void setFoo(int foo); private: int foo; } C::C(int foo) { setFoo(foo); } void C::setFoo(int foo) { this->foo = foo } I would like to motivate better this fact through your additional contribute. If you have examples, book references, blog pages, or names of principles, they would be very welcome. Edit: I'm talking in general, but we are coding in python.

    Read the article

  • Which prediction model for web page recommendation?

    - by Nilesh
    I am trying to implement a web page recommendation wherein registered users will be given a recommendation of which page to visit depending upon the previous data.So with initial study I decided to go on with clustering the data with rough sets and then will move forward to find out the sequential patters with the use of prefix span algorithm.So now I want to have a better prediction model in place which can predict the access frequency of pages.I have figured out with Markov model but still some more suggestions will be valuable.Also please help me with some references of the models too.Is it possible to directly predict the next page access with the result of PrefixSpan.If so how?

    Read the article

  • Class as first-class object

    - by mrpyo
    Could a class be a first-class object? If yes, how would the implementation look? I mean, how could syntax for dynamically creating new classes look like? EDIT: I mean what example syntax could look like (I'm sorry, English is not my native language), but still I believe this question makes sense - how you give this functionality while keeping language consistent. For example how you create reference for new type. Do you make reference first-class object too and then use something like this: Reference<newType> r = new Reference<newType>(); r.set(value); Well this could get messy so you may just force user to use Object type references for dynamically created classes, but then you loose type-checking. I think creating concise syntax for this is interesting problem which solving could lead to better language design, maybe language which is metalanguage for itself (I wonder if this is possible).

    Read the article

  • Question about Partitioning

    - by Trent C
    I am looking to dual boot Windows 7 and Ubuntu 13.10. I have been using windows for work and school for over a year, and have about 100 gig of stored files (backed up of course) and some paid programs. Because of this, I really want my partitioning experience to go well. Unfortunately, I am running into a bit of an anomoly When I load GPart, I see that my sda drive is unallocated http://i.imgur.com/Hi2XhIr.png Whereas my sdb appears to contain all of the windows files and partitions, and make up my C: drive http://i.imgur.com/aaCOXje.png Is this going to be an issue, as all literature on dual boot installation references sda? How do I work around it? System Info: Lenovo IdeaPad Y570- 750GB HDD with 64GB SSD Processor: Intel® Core™ i7-2670QM CPU @ 2.20GHz × 8

    Read the article

  • Comprehensive system for documentation and handoff of developer project

    - by Uzumaki Naruto
    I work on a technology team that typically develops projects for a period of time, and then hands off to other groups for long-term maintenance and improvements. My team currently uses ad hoc methods of handing off documentations, such as diagrams, API references, etc. Is there a open source solution (or even proprietary one) that enables us to manage: Infrastructure/architecture/software diagrams API documentation Directory structures/file structures Overall documentation summaries in one place? E.g., instead of using multiple systems like Swagger, Wikis, etc. - is there a solution that can seamlessly combine all of these? And enable us to generate a package including all 4 key items with one click to hand off to other teams.

    Read the article

  • Castle Windsor Dependency Injection with MVC4

    - by Renso
    Problem:Installed MVC4 on my local and ran a MVC3 app and got an error where Castle Windsor was unable to resolve any controllers' constructor injections. It failed with "No component for supporting the service....".As soon as I uninstall MVC4 beta, the problem vanishes like magic?!I also tried to upgrade to NHibernate 3 and Castle and Castle Windsor to version 3 (from version 2), but since I use Rhino Commons, that is not possible as the Rhino Commons project looks like is no longer supported and requests to upgrade it to work with NHibernate version 3 two years ago has gone unanswered. The problem is that Rhino Commons (the older version) references a method in Castle version 2 that has been depreciated in version 3: "CreateContainer("windsor.boo")' threw an exception of type 'System.MissingMethodException."Hope this helps anyone else who runs into this issue. Btw I used NuGet package manager to install the correct packages so I know that is not the issue.

    Read the article

  • What is Perl's relation with hackers?

    - by K.Steff
    I know Perl is a language revered by many hackers (as in hacker vs cracker) and respected by many good programmers for its expressiveness. I also realize it is useful to know and it's very handy at generalizing common Unix tasks (Unix here includes Linux and Cygwin). I also know that being a good hacker probably means you're a good programmer in general (references on this one are sparse around the web, but about everything Paul Graham has ever written seems approving of this statement to me). So my question is whether there is a reason that attracts hackers to Perl in particular? Will learing Perl improve my general programming, problem-solving and hacking skills if done properly? Does it present unique tools that are more useful to a hacker?

    Read the article

  • Exalogic X3-2 now orderable and shipping

    - by JuergenKress
    At our WebLogic Community Workspace (WebLogic Community membership required) you can find the latest ExaLogic product presentation Exalogic_X3-2_launch.pptx and reference presentation ExaLogic references 2012.ppt & Exalogic Case Studies. Addition to this we recommend to use of the ExaLogic Meter-to-Cash Solution for Utilities Offline Demo Video ExaLogic Demo 10.2012.zip. WebLogic Partner Community For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center. BlogTwitterLinkedInMixForumWiki Technorati Tags: ExaLogic,ExaLogic X3-2,WebLogic Community,Oracle,OPN,Jürgen Kress

    Read the article

  • System.Timers.Timer leaking due to "direct delegate roots"

    - by alimbada
    Apologies for the rather verbose and long-winded post, but this problem's been perplexing me for a few weeks now so I'm posting as much information as I can in order to get this resolved quickly. We have a WPF UserControl which is being loaded by a 3rd party app. The 3rd party app is a presentation application which loads and unloads controls on a schedule defined by an XML file which is downloaded from a server. Our control, when it is loaded into the application makes a web request to a web service and uses the data from the response to display some information. We're using an MVVM architecture for the control. The entry point of the control is a method that is implementing an interface exposed by the main app and this is where the control's configuration is set up. This is also where I set the DataContext of our control to our MainViewModel. The MainViewModel has two other view models as properties and the main UserControl has two child controls. Depending on the data received from the web service, the main UserControl decides which child control to display, e.g. if there is a HTTP error or the data received is not valid, then display child control A, otherwise display child control B. As you'd expect, these two child controls bind two separate view models each of which is a property of MainViewModel. Now child control B (which is displayed when the data is valid) has a RefreshService property/field. RefreshService is an object that is responsible for updating the model in a number of ways and contains 4 System.Timers.Timers; a _modelRefreshTimer a _viewRefreshTimer a _pageSwitchTimer a _retryFeedRetrievalOnErrorTimer (this is only enabled when something goes wrong with retrieving data). I should mention at this point that there are two types of data; the first changes every minute, the second changes every few hours. The controls' configuration decides which type we are using/displaying. If data is of the first type then we update the model quite frequently (every 30 seconds) using the _modelRefreshTimer's events. If the data is of the second type then we update the model after a longer interval. However, the view still needs to be refreshed every 30 seconds as stale data needs to be removed from the view (hence the _viewRefreshTimer). The control also paginates the data so we can see more than we can fit on the display area. This works by breaking the data up into Lists and switching the CurrentPage (which is a List) property of the view model to the right List. This is done by handling the _pageSwitchTimer's Elapsed event. Now the problem My problem is that the control, when removed from the visual tree doesn't dispose of it's timers. This was first noticed when we started getting an unusually high number of requests on the web server end very soon after deploying this control and found that requests were being made at least once a second! We found that the timers were living on and not stopping hours after the control had been removed from view and that the more timers there were the more requests piled up at the web server. My first solution was to implement IDisposable for the RefreshService and do some clean up when the control's UnLoaded event was fired. Within the RefreshServices Dispose method I've set Enabled to false for all the timers, then used the Stop() method on all of them. I've then called Dispose() too and set them to null. None of this worked. After some reading around I found that event handlers may hold references to Timers and prevent them from being disposed and collected. After some more reading and researching I found that the best way around this was to use the Weak Event Pattern. Using this blog and this blog I've managed to work around the shortcomings in the Weak Event pattern. However, none of this solves the problem. Timers are still not being disabled or stopped (let alone disposed) and web requests are continuing to build up. Mem Profiler tells me that "This type has N instances that are directly rooted by a delegate. This can indicate the delegate has not been properly removed" (where N is the number of instances). As far as I can tell though, all listeners of the Elapsed event for the timers are being removed during the cleanup so I can't understand why the timers continue to run. Thanks for reading. Eagerly awaiting your suggestions/comments/solutions (if you got this far :-p)

    Read the article

  • practical way to learn C?

    - by jondavidjohn
    I want to dig into C and normally when I want to learn a new language I think of a simple/attainable project goal that has some practical purpose (make use of an api, automate a task, etc...) I'm having a harder time coming up with one for C mainly because everything I read points to the fact that C's primary use currently is in embedded systems and more complex software projects like operating systems. Does this point me to the fact that I don't need to learn it or that I just need to be a bit more convoluted in my learning strategy? References to practical learning resources? (tutorial/how to that produces an end result that has some purpose/benifit)

    Read the article

  • Recommended way to support backward/forward compatibility in iPhone app?

    - by MrAleGuy
    I'm in the early stages of an iPhone app and I have a question. I did some searching but did not find what I was looking for. There are features in iPhone OS4 that I would like to take advantage of, but I would like for my app to also run on 3.X. It looks like I want to develop against the 4.0 SDK and do the following: Create a "weak link" to any new (4.0) frameworks Call respondsToSelector: for any new method in an existing framework or any method in a new framework before making that call Am I close? What's recommended? Pointers to similar questions welcome.

    Read the article

  • Using "screenshots" in a game, is it allowed?

    - by DevilWithin
    Lets say I have a game that is some kind of a quiz, and its questions are themed around gaming. For it to be interesting, I would need to make references to well-known games and game-related stuff. In a copyright infrigement sense, could I have problems with this? Imagine a question such as, "What was the currency used in game X?", or "Which company made game Y?". Also, the same applied to screenshots of known games, and have a question near it, such as "What game is this image from?". Toughts? Thanks

    Read the article

  • How to model interentity membership in entity-component architecture?

    - by croxis
    I'm falling in love with simple grace of entity-component design, although I still have issues breaking from MVC and OOP practices. Some of my game entities have membership relationships with each other (ex: a player is a member of a city, a city is a member of a nation), and I am unsure on the best way to implement it. My initial reaction is to have a a MemberOfCity component that points to the appropriate city component, but components are suppose to have no references to each other. My other option is to have a System do it, but that would require the system to persist data outside of a component. Is there a clean way to do this in an entity-component design, or am I trying to use a hammer on a screw and should use a hybrid/another approach?

    Read the article

  • What are best practices for testing programs with stochastic behavior?

    - by John Doucette
    Doing R&D work, I often find myself writing programs that have some large degree of randomness in their behavior. For example, when I work in Genetic Programming, I often write programs that generate and execute arbitrary random source code. A problem with testing such code is that bugs are often intermittent and can be very hard to reproduce. This goes beyond just setting a random seed to the same value and starting execution over. For instance, code might read a message from the kernal ring buffer, and then make conditional jumps on the message contents. Naturally, the ring buffer's state will have changed when one later attempts to reproduce the issue. Even though this behavior is a feature it can trigger other code in unexpected ways, and thus often reveals bugs that unit tests (or human testers) don't find. Are there established best practices for testing systems of this sort? If so, some references would be very helpful. If not, any other suggestions are welcome!

    Read the article

  • Secure database connection. DAL .net architecture best practice

    - by Andrew Florko
    We have several applications that are installed in several departments that interact with database via Intranet. Users tend to use weak passwords or store login/password written on a shits of paper where everybody can see them. I'm worried about login/password leakage & want to minimize consequences. Minimizing database-server attack surface by hiding database-server from Intranet access would be a great idea also. I'm thinking about intermediary data access service method-based security. It seems more flexible than table-based or connection-based database-server one. This approach also allows to hide database-server from public Intranet. What kind of .net technologies and best practices would you suggest? Thank in you in advance!

    Read the article

  • Network Security and Encryption explained in laymen terms

    - by Ehrann Mehdan
    Although I might pretend very well that I known a thing about networks or security and it might help me pass an interview, or fix a bug, I don't really feel I'm fooling anyone. I'm looking for a laymen terms explanation of nowadays network security concepts and solutions. The information is scattered around and I didn't find a resource for "dummies" like me (e.g experienced Java developers that can speak the jargon but have no real clue what it means) Topics I have a weak notion about and want to understand better as a Java developer PGP Public / Private keys RSA / DES SSL and 2 way SSL (keystore / trustore) Protecting against Man in the middle fraud Digital Signature and Certificates Is there a resource out there that really explains it in a way that doesn't require a Cisco certificate / Linux lingo / know what is subnet masking or other plumbing skills?

    Read the article

  • New Whitepaper: Deploying E-Business Suite on Exadata and Exalogic

    - by Elke Phelps (Oracle Development)
    Our E-Business Suite Performance Team recently published a new whitepaper to assist you with deploying E-Business Suite on the Oracle Exalogic Elastic Cloud and Oracle Exadata Database Machine , also referred to as Exastack.  If you are considering a migration to Exastack, this new whitepaper will assist you understanding sizing requirements, deployment standards and migration strategies: Deploying Oracle E-Business Suite on Oracle Exalogic Elastic Cloud and Oracle Exadata Database Machine (Note 1460742.1) This whitepaper covers the following topics: Scalability and Sizing Examples - provides performance benchmark analysis with concurrent user counts, scaling analysis and sizing recommendations Deployment Standards - includes recommendations for deploying the various components of the E-Business Suite architecture on Exastack Migration Standards and Guidelines - includes an overview of methods for migrating from commodity hardware to Exastack References Our Maximum Availability Architecture (MAA) team has a number of whitepapers that provide additional information regarding Oracle E-Business Suite on the Oracle Exadata Database Machine.  Their library of whitepapers may be found here: MAA Best Practices - Oracle Applications Unlimited  Related Articles Running E-Business Suite on Exadata V2 Running Oracle E-Business Suite on Exalogic Elastic Cloud

    Read the article

  • What's the difference between my nameserver and CName settings?

    - by Josh Mcquiston
    I have purchased a domain name(mxsoup.net) through GoDaddy, and it is just parked. In order to set up my custom URL for my SourceAudio site, they give me the following instructions: In order to host your site at a your own URL, we need you to set up some DNS records to point your URL to us. Specifically, we need two CNAME references, one for 'www.mxsoup.net' and one for 'secure.mxsoup.net', both of which should point to 'web2.sourceaudio.com'. But the rep on the phone at GoDaddy said that my site is hosted at HostMonster.com, and therefore I need to talk to them to accomplish this(which is possibly true, but my business owner says he hasn't purchased hosting for this particular domain, yet he does have some other sites in his hostmonster hosting acct.) My GoDaddy account shows that my nameservers are pointing at NS1.HOSTMONSTER.COM, and NS2.HOSTMONSTER.COM, and I can edit those. But is this the same as setting up the CNAME as described above? Any help would be greatly appreciated!

    Read the article

  • Fusion Learning Center News

    - by Richard Lefebvre
    The Fusion Learning Center portal now includes more than 1,600 learning assets. With so many assets, we have re-organized this portal slightly by introducing a new References section in the right lower corner, where we are providing quick links to the key assets. Furthermore, we have introduced a new Release Readiness section in the left navigation. Currently this points to the latest release; Release 4. We will be updating this section to also include the ability to stripe the assets by release. More to come on this later! New Assets and Uplifted Content include: The CRM Family Foundation webinar is updated to reflect the latest content CRM has also created two new Sales Positioning webinars: Contracts Solution Pitch and PRM Solution Pitch The Fusion Apps FAQ is updated - the changes can be found in the change log

    Read the article

  • Steps needed to install a PHP application (Mantis) on Windows Home Server - How please?

    - by Brian Frost
    I'm using Windows Home Server and have already managed to install SVN on it to allow me to use Tortoise SVN on client PC's sharing a repository on the server via SVN's service and port. I'd now like to install a bug tracker hosted on this server. I'm not fussy about which one but I saw Mantis - which is a PHP application and looks ok for my purpose. This is where I get weak on such stuff - what steps do I need to do to install and configure PHP (and presumably MySql to get mantis working? It is an http application. As an alternate answer, I'd be happy to use another - more easily installed - bug tracker that has a server service and a port of its own. I'll appreciate any comments.

    Read the article

  • Could not see memory being released on closing MFC modal dialog that hosts wpf user control using HW

    - by Naveen Chiluka
    This is in continuation with my last question posted "Continuous Memory leak while using WpfHWndSource" I have to load an WPF User Control in an MFC Modal Dialog that is being invoked from the ocx control. For this I have created a MFC Regular Dll(Mixed Mode Regular dll with clr option enabled), I have created a modal dialog which will host wpf user control using HWndSource. This exported dialog is placed as a child Dialog of the above MFC dialog that is being invoked from the ocx. Ny intermediate dialog uses C++/Cli code. When the main MFC dialog is closed, I am deleteing the ptr reference of the intermediate dialog created on the heap. In the the dipose of the .Net User Control, I have set most of the references that I have created to null, unsubscribed to the events (to avoid weak refernces), unbinded from the propertes(by using clear binding). Called delete on the HwndSource and the user control(which basically calls the dispose method). But I do not see complete memory being released. Any help would be greatful.

    Read the article

< Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >