Search Results

Search found 3574 results on 143 pages for 'difficult'.

Page 66/143 | < Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >

  • Can't connect nonlocally after 12.10 upgrade

    - by user101815
    I've just upgraded one of my systems from 12.04 to 12.10. Now I can't connect on that system beyond my local network. Connections within the local network seem to work fine, and I can make nonlocal connections from other machines (like the one I'm asking this question from). I suspect that some routing information has been messed up, but I don't know where to look for it. It's not a nameserver problem -- pinging outside sites by their IP addresses doesn't work either. I have another laptop next to this one, also running Kubuntu 12.10. On the one that can't connect, arp produces no output. On the other one, it produces 192.168.0.1 ether 00:23:69:fa:ce:ae C wlan0 On the working machine, the output of netstat starts with some tcp entries. On the nonworking one, those entries are absent. I asked this question on the Ubuntu forum but haven't gotten any answers there. One further complication: since the troublesome machine has no outside connection, it's extremely difficult to download anything to it. For what it's worth, "ping 8.8.8.8" produces "connect: Network is unreachable". Update: after a lot of fiddling, I have my external world back. I don't know what the key action was, but the first indication of progress was that "ping 8.8.8.8" worked. At that point I still didn't have a working nameserver, so external URLs didn't work. But I did this (based on an online post, of course): sudo dpkg-reconfigure resolvconf and answered Yes to all prompts. That did the trick!! Apparently my problem was unique, or close to it, since I couldn't find any online references to it: local net working, remote net not working, including explicit IP addresses. So I suppose that if no one else has this problem, no one cares about the solution!!

    Read the article

  • When creating a GUI wizard, should all pages/tabs be of the same size? [closed]

    - by Job
    I understand that some libraries would force me to, but my question is general. If I have a set of buttons at the bottom: Back, Next, Cancel?, (other?), then should their location ever change? If the answer is no, then what do I do about pages with little content? Do I stretch things? Place them in the lone upper left corner? According to Steve Krug, it does not make sense to add anything to GUI that does not need to be there. I understand that there are different approaches to wizards - some have tabs, others do not. Some tabs are lined horizontally at the top; others - vertically on the left. Some do not show pages/tabs, and are simply sequences of dialogs. This is probably a must when the wizard is "non-linear", e.g. some earlier choices can result in branching. Either way the problem is the same - sacrifice on the consistency of the "big picture" (outline of the page/tab + location of buttons), or the consistency of details (some tabs might be somewhat packed; others having very little content). A third choice, I suppose is putting extra effort in the content in order to make sure that organizing the content such that it is more or less evenly distributed from page to page. However, this can be difficult to do (say, when the very first tab contains only a choice of three things, and then branches off from there; there are probably other examples), and hard to maintain this balance if any of the content changes later. Can you recommend a good approach? A link to a relevant good blog post or a chapter of a book is also welcome. Let me know if you have questions.

    Read the article

  • HTML Manifest for Content Folios

    - by Kyle Hatlestad
    I recently worked on a project to create a custom content folio renderer in WebCenter Content. It needed to output the native files in the folio along with a manifest file in HTML format which would list the contents of the folio along with any designated metadata and a relative link to the file within the download.  This way a person could hand someone the folio download and it would be a self-contained package with all of the content and a single file to display the information on the contents.  The default Zip rendition of the folio will output the web-viewable version of the file with an HDA formatted file for each one. And unless you are fluent in HDA or have a tool to read them, they are difficult to consume. I thought this might be useful for others, so I'm posting a copy of the component here. Beyond the standard instructions for installing a component, there is an environment configuration file (folionativezipwithmanifestrenderer_environment.cfg) which has a couple of options. FolioMetadataManifestList - This is a comma separated list of metadata fields (system or custom) that should be included in the manifest file. FolioMetadataManifestUseOriginalFilename - (True or False) If set to True, the filenames in the zip file will be based on the original filename as it was checked into WebCenter Content.  If False, it will use the 'Name' of the item as defined within the Folio.  This is usually the Title of the item. The component also includes the source code, so feel free to use this as a reference for creating other interesting folios. 

    Read the article

  • At what point does programming become a useful skill?

    - by Elip
    This is probably a very difficult question to answer, because of its subjectivity, but even a vague guess would help me out: Now that Khan Academy is beginning to offer Computer Science lectures I'm getting an itch to learn programming again. I maybe am a bit more technical than your average computer user, using Ubuntu as my OS, LaTeX for writing and I know some small tricks like regular expressions or boolean search for google. However from my previous attempts to learn programming, I realized I do not have a natural aptitude for it and I also don't seem to enjoy the process. But I am fairly certain that a basic proficiency in programming could prove to be very beneficial for me career wise; I also often get ideas for little scripts that I cannot implement. My question is: Let's say you study programming 1 hour / day on average. At what point will you become good enough so that programming can be used for automating tasks and actually saving time? Do you think programming is worth picking up if you never have the ambition to make it your career or even your hobby, but use it strictly for utility purposes?

    Read the article

  • Fastest approach to 3D animation

    - by HappyFerret
    I'm currently tasked with designing a small HTML5 game. Having done everything by myself so far (3D models, codebase, game design, etc) I'm now at a point where I'm running out of time. I've less than a day to animate and bind everything together. However, that's exactly my problem. I was under the naive impression that everything would be easier if I went with pre-rendered 3D models. However, I didn't consider the most difficult part. Animation. After having spent over an hour trying to figure out messiahStudio, I figured it's time to ask for outside help. Is there any easier solution to 3D animation than 3D rigging? What I'm basically looking for is some sort of tool that allows me to simply grab and move/deform select polygons. It doesn't have to be as life-like and accurate as rigging, just efficient enough. Were the circumstances any different, I might just learn how to rig. But that's sorely out of scope right now. PS:The models were created in Sculptris but are fairly low-poly.

    Read the article

  • Is it reasonable to null guard every single dereferenced pointer?

    - by evadeflow
    At a new job, I've been getting flagged in code reviews for code like this: PowerManager::PowerManager(IMsgSender* msgSender) : msgSender_(msgSender) { } void PowerManager::SignalShutdown() { msgSender_->sendMsg("shutdown()"); } I'm told that last method should read: void PowerManager::SignalShutdown() { if (msgSender_) { msgSender_->sendMsg("shutdown()"); } } i.e., I must put a NULL guard around the msgSender_ variable, even though it is a private data member. It's difficult for me to restrain myself from using expletives to describe how I feel about this piece of 'wisdom'. When I ask for an explanation, I get a litany of horror stories about how some junior programmer, some-year, got confused about how a class was supposed to work and accidentally deleted a member he shouldn't have (and set it to NULL afterwards, apparently), and things blew up in the field right after a product release, and we've "learned the hard way, trust us" that it's better to just NULL check everything. To me, this feels like cargo cult programming, plain and simple. A few well-meaning colleagues are earnestly trying to help me 'get it' and see how this will help me write more robust code, but... I can't help feeling like they're the ones who don't get it. Is it reasonable for a coding standard to require that every single pointer dereferenced in a function be checked for NULL first—even private data members? (Note: To give some context, we make a consumer electronics device, not an air traffic control system or some other 'failure-equals-people-die' product.) EDIT: In the above example, the msgSender_ collaborator isn't optional. If it's ever NULL, it indicates a bug. The only reason it is passed into the constructor is so PowerManager can be tested with a mock IMsgSender subclass.

    Read the article

  • Why doesn't wireless work on Wubi 12.04 with a Broadcom BCM4312 card?

    - by Kristin
    I have recently set up ubuntu 12.04 on my laptop using the Wubi installer. I am having a very difficult time setting up a wireless internet connection. I am currently set up with an ethernet connection which I have used to download all new updates and to activate the Broadcom STA wireless driver. I have tried several things in the terminal based on other people's posts: ~$ rfkill list 0: brcmwl-0: Wireless LAN Soft blocked: no Hard blocked: yes ~$ rfkill unblock all It doesn't change anything. I also tried rebooting and connecting to the internet on my Windows Vista OS, and it worked, so I know that the connection should not be hard blocked. I have also tried installing b43 firmware (lp/phy version) that is supposed to work with my chip (BCM4312). It seems to have no effect. Then I tried: ~$ iwconfig lo no wireless extensions. eth1 IEEE 802.11 Access Point: Not-Associated Link Quality:5 Signal level:0 Noise level:0 Rx invalid nwid:0 invalid crypt:0 invalid misc:0 eth0 no wireless extensions. This is my first time trying to work with ubuntu, so I would appreciate any help. Thanks. Also sorry this is poorly formatted. I'm having troubles with that too.

    Read the article

  • Seek first to understand, then to be understood

    - by BuckWoody
    One of the most important (and most difficult) lessons for a technical professional to learn is to not jump to the solution. Perhaps you’ve done this, or had it happen to you. As the person you’re “listening” to is speaking, your mind is performing a B-Tree lookup on possible solutions, and when the final node of the B-Tree in your mind is reached, you blurt out the “only” solution there is to the problem, whether they are done or not. There are two issues here – both of them fatal if you don’t factor them in. First, your B-Tree may not be complete, or correct. That of course leads to an incorrect response, which blows your credibility. People will not trust you if this happens often. The second danger is that the person may modify their entire problem with a single word or phrase. I once had a client explain a detailed problem to me – and I just KNEW the answer. Then they said at the end “well, that’s what it used to do, anyway. Now it doesn’t do that anymore.” Which of course negated my entire solution – happily I had kept my mouth shut until they finished. So practice listening, rather than waiting for your turn to speak. Let the person finish, let them get the concept out, give them your full attention. They’ll appreciate the courtesy, you’ll look more intelligent, and you both may find the right answer to the problem. Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!

    Read the article

  • Thinking about open-sourcing quiz project [closed]

    - by user72727
    I was thinking about starting an open source project. I have a few projects that might work ok as an open project but thought I might dip my toe into the water with a simple quiz project. The idea is you can add questions to a quiz, arrange questions by topic, difficulty or location. Users would hopefully get an interesting quiz, tuned to their ability. At the end they'd get a score and hopefully they might provide either some feedback on the questions or even supply a few questions of their own. I couldn't see a similar project (fame's last words). I have a basic version of the project that gives the user a bunch of questions to answer in 10 minutes. It doesn't currently group the questions into topics, and no feedback is taken. I've also been told the graphical questions don't work on Ipads for some reason. Would this be a suitable project to go open source? I did find various quiz's out there but all seemed rather narrowly focused. I really wanted something that could cover any type of question on any type of subject. I prefer to keep the questions in MySQL but I could see how this might make it more difficult for others to get on board - should I move to data files? How do I proceed? http://www.checkmypages.com/numbers

    Read the article

  • Why does Scala require functions to have explicit return type?

    - by garbage collection
    I recently began learning to program in Scala, and it's been fun so far. I really like the ability to declare functions within another function which just seems to intuitive thing to do. One pet peeve I have about Scala is the fact that Scala requires explicit return type in its functions. And I feel like this hinders on expressiveness of the language. Also it's just difficult to program with that requirement. Maybe it's because I come from Javascript and Ruby comfort zone. But for a language like Scala which will have tons of connected functions in an application, I cannot conceive how I brainstorm in my head exactly what type the particular function I am writing should return with recursions after recursions. This requirement of explicit return type declaration on functions, do not bother me for languages like Java and C++. Recursions in Java and C++, when they did happen, often were dealt with 2 to 3 functions max. Never several functions chained up together like Scala. So I guess I'm wondering if there is a good reason why Scala should have the requirement of functions having explicit return type?

    Read the article

  • Why is text on my TV monitor all grainy?

    - by searchfgold6789
    I have successfully installed the Catalyst drivers and hooked up my 1080p TV to the Radeon HD 5750's HDMI port and now it is working. There only seems to be one issue - most images appear OK, at least to my eyes, but text is grainy and difficult to read (not sure how well it can be seen in the picture): It works fine with a smaller screen, and hopefully you can see it with the new pictures which are only slightly better, but images are rendered a little funny too. Changing antialiasing does nothing and changing the refresh rate only makes a slight change if any. The small monitor I have works fine. Smaller resolutions such as 1024x768 look OK but are the wrong aspect ratio. I have tried renaming the input mode on the TV to "PC", and that helped... a little bit. Also, I tried a different PC with the same result. Messing around extensively with the ATI Catalyst Control Center also did not help. I am wondering if there is anything else I can try to increase the quality so it is more usable.

    Read the article

  • Can I eventually consider myself a professional developer if I don't have a CS degree? [on hold]

    - by heltonbiker
    Question first, context later: If I am a dedicated, self-taught programmer, always seeking top-quality books AND READING THEM, while successfully applying all that new knowledge into my current work, could I call myself (and offer my work as) a PROFESSIONAL developer? How limiting (or how common) that is nowadays? I am afraid that, no matter how hard I study and practice, it could be too difficult to compete with "actual", college graduated developers, and potential employers might have doubts investing in an "undergraduated" person. Now, context: My former profession is from healthcare sector, then I studied mechanical engineering (quit in the middle), then I studied product design (master degree), and I ended up working (very happily) at an engineering company that manufactures medical devices. For more than two years now my main activity in this company is software development. The devices contain software, and we gave up hiring software development (domain knowledge needed, too much communication cost). My current company sees a lot of value in what I do, but I cannot afford the risk of depending on this single company for the rest of my life, you get it. But a lot of job offers require some minimal formal education, usually a CS degree. Fact is that I am sure this is my target profession, I don't plan to go to another area, it is a pleasure to dive into books that normal people would consider unreadable, but I'm 36 years old and can't see going back to college as a viable alternative.

    Read the article

  • In developing a soap client proxy, which return structure is easier to use and more sensible?

    - by cori
    I'm writing (in PHP) a client/proxy for a SOAP web service. The return types are consistently wrapped in response objects that contain the return values. In many cases this make a lot of sense - for instance when multiple values are being returned: GetDetailsResponse Object ( Results Object ( [TotalResults] => 10 [NextPage] => 2 ) [Details] => Array ( [0] => Detail Object ( [Id] => 1 ) ) ) But some of the methods return a single scalar value or a single object or array wrapped in a response object: GetThingummyIdResponse Object ( [ThingummyId] => 42 ) In some cases these objects might be pretty deep, so getting at properties within requires drilling down several layers: $response->Details->Detail[0]->Contents->Item[5]->Id And if I unwrap them before passing them back I can strip out a layer from consumers' code. I know I'm probably being a little bit of an Architecture Astronaut here, but the latter style really bug me, so I've been working through my code to have my proxy methods just return the scalar value to the client code where there's no absolute need for a wrapper object. My question is, am I actually making things more difficult for the consumers of my code? Would I be better off just leaving the return values wrapped in response objects so that everything is consistent, or is removing unneccessary layers of indirection/abstraction worthwhile?

    Read the article

  • 2012 Oracle Fusion Innovation Awards - Part 1

    - by Michelle Kimihira
    Author: Moazzam Chaudry This year we recognized 29 customers for their innovative use of Oracle Fusion Middleware and their significant results. The winners were selected across 8 product categories from 11 countries spanning diverse industries around the world. This is a two-part blog series. The 2012 Fusion Middleware Innovation Awards winners were announced at OOW on October 2nd by Hasan Rizvi (EVP Fusion Middleware and Java development), Amit Zavery (VP Product Management) and Ed Zou (VP Product Management) to an audience that included press, analysts and customers. Winners were selected based on the uniqueness of their business case, business benefits, level of impact relative to the size of the organization, complexity and magnitude of implementation, and the originality of architecture. The program is in its 6th year and this year, we are excited to have received over 250 submissions from customers around the globe. The winners were selected by a panel of internal and external judges; it was a difficult time selecting this year's most innovative projects. Judges scored each entry across multiple scoring categories. This year, winning use cases for Fusion Middleware include: Improve customer experience by monitoring real-time and simplifying user experience of tens of millions of customer Drive social enagement through social media channels in fields, including healthcare, harness big data by analyzing and improving visibility across 60M+customers and hundreds of terabytes of data Enable mobile adoption by delivering mobile news experience to 50% of the Australian population, embrace cloud computing by delivering hospitality services to 3000+ hotels and monitoring services to hospitals, and optimize criticial processes such as, remarketing cars through tens of thousands of dealers On Monday's blog, we will talk about the winners in each category and what customers had to say in the customer panel. Congratulations to the 2012 Oracle Fusion Innovation Award winners:  

    Read the article

  • Allowing client to select data to return via REST interface

    - by CMP
    I have a rest service that is essentially a proxy to a variety of other services. So if I call GET /users/{id} It will get their user profile, as well as order history, and contact info, etc... all from various services, and aggregates them into one nice object. My problem is that each call to a different service has the potential to add time to the original request, so we would rather not get ALL the data ALL of the time if a particular client does not care about all of the pieces. A solution I have arrived at is to do something like this: GET /users/{id}?includeOrders=true&includeX=true&includeY=true... That works, and it allow me to do only what I need to, but it is cumbersome. We have added enough different data sources that there are too many parameters for that style to be useful. I could do something similar with a single integer and a bitmask or something, but that only makes it harder to read, and it does not feel very Restful. I could break it down into multiple calls so they would need to call /users/{id}/orders and /users/{id}/profile separately, but that sort of defeats the purpose of an aggregating proxy, who's purpose is to make clients jobs easier. Are there any good patterns that can help me return just enough data for each client, without making it too difficult for them to filter and select what they want?

    Read the article

  • How can I better manage far-reaching changes in my code?

    - by neuviemeporte
    In my work (writing scientific software in C++), I often get asked by the people who use the software to get their work done to add some functionality or change the way things are done and organized right now. Most of the time this is just a matter of adding a new class or a function and applying some glue to do the job, but from time to time, a seemingly simple change turns out to have far-reaching consequences that require me to redesign a substantial amount of existing code, which takes a lot of time and effort, and is difficult to evaluate in terms of time required. I don't think it has as much to do with inter-dependence of modules, as with changing requirements (admittedly, on a smaller scale). To provide an example, I was thinking about the recently-added multi-user functionality in Android. I don't know whether they planned to introduce it from the very beginning, but assuming they didn't, it seems hard to predict all the areas that will be affected by the change (apps preferences, themes, need to store account info somehow, etc...?), even though the concept seems simple enough, and the code is well-organized. How do you deal with such situations? Do you just jump in to code and then sort out the cruft later like I do? Or do you do a detailed analysis beforehand of what will be affected, what needs to be updated and how, and what has to be rewritten? If so, what tools (if any) and approaches do you use?

    Read the article

  • I need a decent alternative to c++ [closed]

    - by wxiiir
    I've learned php and c++, i will list the things i liked and didn't liked on each of them, how i decided to learn them in the first place and why i feel the need to learn a decent alternative to c++, i'm not a professional programmer and only do projects for myself. PHP - Decided to learn because i wanted to build a dynamic website, that i did and turned out very good, i even coded a 'not so basic' search engine for it that would display the results 'google style' and really fast, pretty cool stuff. PROS - Pretty consistent syntax for all stuff (minor caveats), great functionality, a joy for me to code in it (it seems to 'know' what i want it to do and just does it) CONS - Painfully slow for number crunching (which takes me to c++ that i only learned because i wanted to do some number crunching and it had to be screaming fast) C++ - Learned because number crunching was so slow in php and manipulating large amounts of data was very difficult, i thought, it's popular programming language and all, and tests show that it's fast, the basic stuff resemble php so it shouldn't be hard to pick up PROS - It can be used to virtually anything, very very fast CONS - Although fun to code at the start, if i need to do something out of the ordinary, memory allocation routines, pointer stuff, stack sizes etc... will get me tired really quick, syntax is a bit inconsistent some times (more caveats) I guess that from what i wrote you guys will understand what i'm looking for, there are thousands of languages out there, it's likely that one of them will suit my needs, i've been seeing stuff today and a friend of mine that is a professional programmer tried OCaml and Fortran and said that both are fast for numerical stuff, i've been inclined to test Fortran, but i need some more input because i want to have some other good 'candidates' to choose from, for example the python syntax seemed great to me, but then i found out from some tests that it was a lot slower than c++ and i simply don't want to twiddle my thumbs all day.

    Read the article

  • Lenovo ThinkPad W530 problem to activate the optical/DVD drive

    - by Marko Apfel
    Problem Sometimes my notebook shows the optical drive as power off: But the hint there is not changing this state. Solution By looking in the device manager you see the next problem: So open the properties via right mouse click. This gives you the hint to remove the drive first. “Windows cannot use this hardware device because it has been prepared for "safe removal", but it has not been removed from the computer. (Code 47)” Whether you select the comment by dragging the mouse over the the hidden part or pressing the button “Properties”. So we unplug and reinsert the ultrabay. If you think, now the system is working – you are wrong. Now the system is the meaning, that the ultrabay is unplugged. You could verify this by refresh the view in the device panel. Now there is no longer our device. Yet your great gig comes – unplug the ultra bay and reinsert it a second time! After this you could hear with a media inside, that the motor is really started and we have a working device What a difficult birth …

    Read the article

  • What kinds of languages would be most useful for this kind of webapp?

    - by Caedar
    I've had some experience with programming in the past (2-3 years of C++ self-teaching), so I'm no stranger to the programming process, but there are so many languages out there that I'm lost when thinking about this project idea that's been floating around my head: I would like to create a webapp that would be used for helping somebody figure out what kinds of productivity tools would suit them. The first part of the app would basically be a survey with a variety of questions that would help weed out tools that wouldn't be useful for them. (Slider bar between minimalist and maximizer, slider bar between all free apps and no cost limit, checkboxes on what platforms are required, etc.) While the person is filling out the survey, they will see a web of applications, webapps, and other tools forming on the screen with links showing the relationships the programs have with eachother (syncing supported, good combinations of apps, etc.), along with a list of applications below sorted by general use (notetaking, document organization, storage, etc.) I would imagine that each program entered into the database that will be accessed would have a certain set of characteristics, ie. price, user friendliness, platforms supported, general uses, etc. and the survey would be designed to correlate to those elements and remove programs that don't match the criteria set. The difficult part of this entire process would be getting the web of applications to arrange itself and render properly. Now that I've finished mind-dumping, onto my question: What kinds/combinations of programming languages would you imagine being useful for this kind of project, and why? I learn best by setting up a project for myself like this one and tinkering with the languages, so I don't mind if the end product is out of reach from my current skill level. I'd just like some guidance so I don't fumble in the dark for too long.

    Read the article

  • How to build a "traffic AI"?

    - by Lunikon
    A project I am working on right now features a lot of "traffic" in the sense of cars moving along roads, aircraft moving aroun an apron etc. As of now the available paths are precalculated, so nodes are generated automatically for crossings which themselves are interconnected by edges. When a character/agent spawns into the world it starts at some node and finds a path to a target node by means of a simply A* algorithm. The agent follows the path and ultimately reaches its destination. No problem so far. Now I need to enable the agents to avoid collisions and to handle complex traffic situations. Since I'm new to the field of AI I looked up several papers/articles on steering behavior but found them to be too low-level. My problem consists less of the actual collision avoidance (which is rather simple in this case because the agents follow strictly defined paths) but of situations like one agent leaving a dead-end while another one wants to enter exactly the same one. Or two agents meeting at a bottleneck which only allows one agent to pass at a time but both need to pass it (according to the optimal route found before) and they need to find a way to let the other one pass first. So basically the main aspect of the problem would be predicting traffic movement to avoid dead-locks. Difficult to describe, but I guess you get what I mean. Do you have any recommendations for me on where to start looking? Any papers, sample projects or similar things that could get me started? I appreciate your help!

    Read the article

  • Will Ubuntu Live CD move MFT to resize NTFS volumes?

    - by irwazr
    I have a feeling some will consider this a duplicate, but please hear me out. I've been reading tons of questions and threads around this but have never really found an answer for this specifically. I want to shrink my NTFS partition to make room for a Ubuntu install, so I can dual boot them. However when shrinking the NTFS volume in Windows disk management, it will only go so far as the MFT is sitting near the end of the volume. I've read plenty of posts about why it does this, and how difficult/dangerous it is to move the MFT etc. I've also read that Perfect Disk can apparently do it under it's trial period, but I remain cautious to try this method. I was wondering however if the disk partitioning utility included in the Ubuntu install wizard handles the moving of the MFT when dragging the partition boundaries. It all seems too simple that you simply tell it the new size you want it to be. Would it tell me if it couldn't resize by the amount you requested if the MFT was an issue, or move it for you if it were able. I'm concerned it might corrupt the MFT and the volume, even though I doubt the install wizard would be so daft. So what exactly is the deal with the partition resizing tool in the Ubuntu install wizard? Will it safely resize my NTFS volume despite the location of my MFT? Thanks in advance.

    Read the article

  • Trying to implement pre/post method code: better to use methods or a parent class?

    - by Will
    I'm finding it difficult to frame this question so ... I want to execute code both before and after a method runs in PHP. There are, as far as I know, two ways to implement this: Method One: pre and post methods class Model { function find($id) { $this->_precode(); // ... do stuff $this->post_code(); } } Add the calls to _precode() and _postcode() to each method where I need this functionality. Method Two: __call and method naming class Model extends PrePost { function prepost_find($id) { // ... do stuff ... } } class PrePost { function __call($method,$param) { $method = "prepost_$method"; // .. precode here .. $result = $this->$method($param); // .. postcode here .. } } This relies on naming a method in a specific way in the inheriting class. Is there a preferred way of doing this? The call method can be made to only handle its specific cases and even defer to a child class's call if there is one. I'm not looking for opinions; I'm looking to find out if there are valid reasons to choose one way over another.

    Read the article

  • SQL 2008/2005 Hosting :: Error - “Named Pipes Provider, error: 40 – Could not open a connection to SQL Server”

    - by mbridge
    When setting up a Microsoft Windows Server 2008 system, I went through the motions to set up IIS, MS SQL Server 2008, and Visual Studio 2010 to use as a test-bed. One of the immediate benefits of setting up such a system is that most development can be done remotely: MS SQL Server Management Studio, Visual Studio’s Web development suite, as well as file shares, remote desktop, etc, make for a great way to remotely develop in ‘pristine’ conditions. But there are drawbacks, too, such as needing to deal with firewall issues, not being able to penetrate past a router or the requirement of setting up a VPN. One of the problems I encountered when trying to remote into the MS SQL Server 2008 that I’d set up was the following error: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server I followed the below steps, and was able to connect to the server after just a few moments of tinkering: 1. From the server in question, surf to this Microsoft article, and download and install the Firewall rules modification program. Never drop your firewall, even on a development machine, unless you have a really good reason to. 2. Launch SQL Server Configuration Manager. Navigate to SQL Server Network Configuration, then Protocols for your server name. Enable TCP/IP and Named Pipes by right-clicking and choosing Enable for each given Protocol Name. 3. Restart the SQL Server service from Services (or from command line, subsequently run “net stop mssqlserver” then “net start mssqlserver”. 4. Try your remote connection once more, and you should be able to connect. It’s not a terribly difficult concept, but one of the more challenging tasks developers face is dealing with environment setup. And while there is a certain blurred-line overlap between software development and server administration, sometimes the latter is daunting, especially given that you might set up only a handful of servers during your career.

    Read the article

  • What is the preferred pattern when attaching a 'runtime object'?

    - by sebf
    In my application I have the following: public class NeatObject { /* lots of static data, and configuration flags */ } public class NeatObjectConsumer { void DoCleverStuffWithObjectOnGPU(NeatObject obj); } Where NeatObject and its consumer are used to control the GPU. The idea being that, the configuration of an instance of NeatObject and its members, define how the consumer instance behaves. The object can be passed around, edited, and most importantly serialised/deserialised by the application, with and without knowledge of NeatObjectConsumer, then provided back to the consumer to do something else. The purpose of this seperation is: The consumer manages hardware resources, which change depending on the computer, and even on the execution of the application, making preserving the state of an object which does everything difficult. Avoids circular references if the assembly that contains the consumer needs to reference one that only needs to know about NeatObject. However, there is a complication in that the consumer creates hardware resources and needs to associate them with NeatObject. These don't need to be preserved, but still need to be retrieved. DoCleverStuffWithObjectOnGPU() will be called many, many times during execution and so any bottleneck is a concern, therefore I would like to avoid dictionary lookups. What is the preferred method of attaching this information to NeatObject? By preferred, I mean intuitive - other coders can see immediately what is going on - and robust - method doesn't invite playing with the resources or present them in such a way as to make them easily corruptible. Essentially, I want to add my own metadata - how should I do it? Try to use 'actual metadata' functionality like Reflection? A member of the type of an abstract class? Unmanaged pointers? If you took on a project that used this pattern, what would you have liked the previous developer to do?

    Read the article

  • When to open source a project under development? [closed]

    - by QuasarDonkey
    Possible Duplicate: Is it OK to push my code to GitHub while it is still in early development? I've been working on a hobby project for a few months now; it's clocking in at over 15000 source lines of code. A number of people have expressed interest in joining development, and I have full intentions of going open source, since it would not be feasible for me to complete the project alone. I'm just not sure when to open-source it. For context, I've notice many successful open source projects, such as the Linux kernel, had considerable work done before they were open-sourced. In my case, I'd been planning on open-sourcing it after I complete all the underlying libraries and overall architecture. Is this a mistake; should I just release it right now? I'm worried that since certain critical underlying components haven't been finalized, if people build a large codebase around them, it will be very difficult to change or fix things later. On the other hand, it's a very large project that will require multiple developers to complete in a reasonable time. So when is the right time during development to go open source? Preferably, I'd like to hear from some folks who have started their own projects.

    Read the article

< Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >