Daily Archives

Articles indexed Tuesday February 22 2011

Page 7/14 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • What are the best patterns/designs for stateful API development?

    - by Svante
    I am about to implement a API for my TCP/IP server written in Java. Right now I have a temporary method that takes a String, executes a command based on the String and returns a String basically like the following. public void communicate(BufferedReader in, PrintWriter out) { while(true) { out.println(handleCommand(in.readLine())); } } private String handleCommand(String command) { if (command.equals("command1") { // do stuff return "Command 1 executed"; } else if (command.equals("command2") { // do some other stuff return "Command 2 executed"; } } I really want to do something more extensible, smarter and stateful, so I could handle more complex and stateful commands and without the method/class getting bloated. How would you start? Suggestions, ideas, or links for further reading are very welcome.

    Read the article

  • Web and Flex developer career question [closed]

    - by abhilashm86
    Possible Duplicate: should i concentrate on logical and puzzles part in programming, i want to be a web (flex)developer? I'm a computer science student and have been learning Flex and Actionscript 3.0 for 4 months. I know it's easy to program in MXML, and Actionscript 3.0 is pretty easy with bunch of classes, but when I try to code in C++ or C, I struggle, I feel I'm being inefficient and it scares me. Since I'm a student, I've no experience in developing algorithms and tough program solving? I'd like to be a web developer. Does a web developer need strong fundamentals when it comes to things such as complex algorithms and high end coding?

    Read the article

  • Student wanting to go to a developer conference

    - by Jamie Keeling
    I'm a 21 year old student in my last year of University, and I am looking for information about developer conferences. I live in Derby (United Kingdom) and there's not (As far as I know) many conferences local to where I live. I do have a car at my disposal so travelling shouldn't be a problem. I was hoping somebody could recommend the best way to go about finding and attending a conference, which one is probably the best to go to and what kind of things I'd need to know and take beforehand. I've done a couple of Google searches and searched SO itself but nothing specific to my needs was found. Note: I'm primarily a C# developer using WPF and WinForms but I'm open to pretty much anything.

    Read the article

  • should i concentrate on logical and puzzles part in programming, i want to be a web (flex)developer?

    - by abhilashm86
    I'm a student not good and can't easily crack at more puzzle, complex mathematics, hard logic problems? in college i studied c++, java, oops. I'm comfortable with all syntax and writing programs and using API's and doing mashups, i can do.......... but once a friend asked help on coding contest, i was in dilemma and frustration? It was simple and complex, i could not write code for those, so got scared? Is logical ability,complex mathematics, puzzles required for a developer point of view? please help and suggest methods to achieve things......

    Read the article

  • How long should one wait before going for a MS?

    - by Jungle Hunter
    Removed duplicate aspects of the question Hi! I'm an undergraduate Master's student. I've what seems to be a good offer in hand in Singapore (if location plays a role). Is an undergraduate Master's good enough for a Master's or one should go for MS? How much time should one wait (in their job) before going for a MS if that's the decision? Does one lose the progress which one makes while at the job before the Master's? Note: Undergraduate Master's is when my degree is called Master's but it is my first degree. This one is a four year one.

    Read the article

  • What have you learnt that has a steep learning curve?

    - by Jonathan Khoo
    Recently, I've invested time in learning the intricacies of Git and it has got me thinking about time and learning. (My previous experience with version control systems was only limited use of CVS and SVN.) It took me a whole day's worth of reading to be able to understand the concepts and differences of Git. There are an infinite number of things available for us to learn. Some, more useful than others. I don't know Fortran - I'm relatively young. But looking back at the preceding years of my life, I notice that I'm busier and busier as time goes on. The amount of things I have to get through in a day is increasingly out of my control. It doesn't take a genius to extrapolate that information and realise I'll have even less time in the future - unless I get fired, but I have no strong plans relating to that idea for now. So, given that I have much more time and energy now than I will have in the future: what have you learnt, that has a steep learning curve, that you would possibly recommend to a fellow programmer? Edit: I've stumbled upon the excellent question What programming skills have provided you the best return on investment? and hav realised that my way of approaching how to spend learning time was naive - it doesn't matter if ten useful concepts can be learnt in the time of one if they're worth it.

    Read the article

  • Python lower_case_with_underscores style convention: underscores not popular?

    - by squirrel
    PEP8 recommends using lowercase, with words separated by underscores as necessary to improve readability for variable and function names. I've seen this interpreted as lower_case_with_underscores by most people, although in practice and in Python's native methods it seems like lowercasewithoutunderscores is more popular. It seems like following PEP8 strictly would be awkward since it seems to suggest mixing both lower_case_with_underscores and lowercasewithoutunderscores, which would be inconsistent. What is your interpretation of PEP8's variable names, and what do you actually use in practice? (Personally, I like lowerCamelCase as a compromise between readability and ease of typing.)

    Read the article

  • Why doesn't my graphic card support 1280*1024?

    - by Allwar
    Hi, I have an external monitor which is an 20" 1280*1024. In windows 7 it works fine with that resolution but in ubuntu it can't. Example: In windows I connect it and activates it, done. In ubuntu I connect and the only resolution that is available is the ones my laptop screen support, 12" 1366*768. My laptop is an asus 1201n. If I force it to use 1280*1024 both screen crashes and i have to force a reboot. what should I do? alvar@alvars-laptop:~$ disper -l display DFP-0: HSD121PHW1 resolutions: 320x175, 320x200, 360x200, 320x240, 400x300, 416x312, 512x384, 640x350, 576x432, 640x400, 680x384, 720x400, 640x480, 720x450, 640x512, 700x525, 800x512, 840x525, 800x600, 960x540, 832x624, 1024x768, 1366x768 display CRT-0: CRT-0 resolutions: 320x240, 400x300, 512x384, 680x384, 640x480, 800x600, 1024x768, 1152x864, 1360x768

    Read the article

  • Get Creative soundcard working correctly

    - by schwiz
    I am trying to get sound going on my fresh install of 10.10. I have a creative fatlity branded sound card. My ALSA information. Most things seems to be working out of the box, once I turned off my onboard sound in my BIOS the soundcard kicked in. However, the system sounds aren't working (I love those drums and the road runner sound when you press backspace). Also, with a 7.1 setup my center channel and subwoofer don't work at all. All other channels are working like a champ. So I am trying to accomplish two things, get system sounds working and get center/sub channels working. How should I try to fix this?

    Read the article

  • Block access to specific applications

    - by Jason Aren
    I would like to give several users rights to a computer running Ubuntu to do most administrative functions such as add/remove programs, save files, make settings changes, etc. However, I would like to block them from using several specific applications. Is this possible, and how would I do so? To provide a bit more detail: I am trying to set up Gnome Nanny to block adult websites from my kids' computer. I'd like to give them full access to the computer ACCEPT for Gnome Nanny. Windows has a program called K9 that cannot be turned off or uninstalled unless the user has the password EVEN if the user is an admin. Sounds like this isn't available on Ubuntu without a rather involved process of setting permissions on a large list of applications and functions to mimic admin rights.

    Read the article

  • Broadcom STA driver doesn't work well with BCM4313

    - by Oli
    Following on from my other question about our new Samsung Q330, I've noticed that the wireless is incredibly flakey. It can connect but after a little use, especially if it does a lot of downloading at once (read: install something from the Software Centre), the connection stops working. Network Manager still see the connection, there's just no network throughput. I've simple tests like pinging other local network hosts and they just fail. The Samsung Q330 has a Broadcom BCM4313 wifi card (it's proper ID: 14e4:4727) and it's running on the Broadcom STA drivers that Jockey suggests (it didn't work at all without this). I did try installing b43-fwcutter but this just didn't do anything. I was expecting a configuration screen to come up (to select a firmware) but it never did. This page suggests the newer brcm80211 driver might be able to help, but I don't know how to install that. If you think this is the right route, please let me know how one goes about installing it.

    Read the article

  • Gnome indicator applet not showing same items on two computers

    - by EmmyS
    I have one computer running Lucid and another one that I recently upgraded to Maverick. Up until today, I was using AWN with Maverick, including their custom indicator applets. I've decided to switch back to the default gnome panels with dockbarx, but when I add the indicator applet to my panel, it's not displaying the same items as the applet on my Lucid machine. In particular, the network and Dropbox icons are not displaying. When I look at the About entry for the apps, Lucid shows version 0.3.7, whereas Maverick shows 0.4.6. Did they really remove the network information from the applet in Maverick, or do I need to do something to enable it? My network is very definitely connected, as I still have AWN running and can see the icon there. (A second question, although not particularly important: the applet doesn't inherit the transparency of the panel it's living on - any way to change that?)

    Read the article

  • Text box select issue

    - by Kent Boogaart
    I have this issue where the entire text in text boxes is selected whilst I'm typing in it. For example, in FireFox search box I'd try to type "foo" but end up with "o" because I managed to type "fo" before everything was selected, and then typed "o" which replaced the "fo". When it happens, it is incessant - not just a one-off. But it doesn't happen all the time, and I haven't managed to figure out what causes it to start and stop. Is this a known problem with an easy solution? EDIT: this has nothing to do with touchpad. I get this occasionally even on a machine without one. I can usually rectify the issue just be alt-tabbing about a few times.

    Read the article

  • Installing Ubuntu by writing on the Hard Drive

    - by Alexandros Marinos
    I have a laptop whose CD drive is not operational and is too old to boot from a flash stick. I have bought a new hard drive for it for which I have an enclosure. Is there a way to configure the disk as an external to my current ubuntu setup, copy some form of ubuntu on the hard drive, place the HD in the old laptop, and have ubuntu install ubuntu from there? Effectively what I am asking about is some sort of live cd that installs on itself (since the HD is writeable).

    Read the article

  • Program menu disappeared

    - by bikeless
    My problem is as follows: The program menu, the one that has file edit view all that does not display in some programs like Audicity Play on linux when i change the theme in the appearance it appears again i really do not know what is wrong with that or why. i have ubuntu 10.10 and running compiz have ubuntu tweak thanks for all that will answer and all that can not really thanks dudes. ubuntu is sure fun

    Read the article

  • Fn key sticks down

    - by Oli
    Just bought my significant other a shiny new Samsung Q330 13" netbook, stuck an OCZ Agility in it and installed Maverick. Just as a quick aside, this is a devastating combination. Graphics work perfectly and it cold-boots to desktop in about 7 seconds. Very quick. But (common to laptops) I've got a couple of problems. I'll start with the most problematic and start a new thread for the other. Like a lot of laptops, there is a Fn (function) modifier to allow some keys to have another purpose. When I tried to alter the brightness of the screen by tapping Fn+Down, it worked but kept on going until it was as dim as it could go. I tapped Fn+Up and it went to the other extreme. After that the entire keyboard ceases to work properly because the Fn modifier appears to be locked. Additionally, and as a direct side effect, I think, clicking on things doesn't result in a standard result. It's as if control is being held. A reboot is the only thing that seems to fix these problems. This isn't a problem if you don't touch the Fn key but as there are two of them on the keyboard, an accident is going to happen sooner than later, requiring a reboot (and probably some data loss). I don't have a lot of experience with laptops (I prefer my hulking great desktop) so this isn't my area of expertise. I'm open to all suggestions, even disabling the two Fn keys until we can find a better solution.

    Read the article

  • Photoshop, slice, Dreamweaver, web?

    - by Omega
    So I am playing around with Photoshop and Dreamweaver. I have created a site layout, and have used the slice function on it. Next, I saved as html & images. In Dreamweaver, I open such html file and I fill the page with content, links, etc. I have a website and everything, and I would like to use my newly created html page on it. But, obviously, if I copy & paste the html to my website it won't work because it will lack the images. But two things: I can't find the images, and apparently they are a lot. I am sure I am doing a great mistake regarding the images. Can someone help me?

    Read the article

  • Mass emailing bouncebacks- Sendblaster

    - by Matt
    I am currently using a mass emailer called sendblaster- if anyone has experience using this program for mass emails any help would be fantastic. The program has a feature that allows you to track reads and opens of emails sent, however the problem i have is with delivery failures/bouncebacks. The "manage bouncebacks" feature is very confusing, and appears to be incapable of showing which email addresses have bounced. For some reason the sender address does not receive delivery failures as with other mass email programs that I've used. If anyone knows a way to efficiently manage the delivery failures/bounceback using this program please help! Thanks

    Read the article

  • Where is the line drawn with domain names which include a trademark?

    - by Thomas Clayson
    A search on google for "iphone developer" turns up loads of websites which have "iphone" in them, a trademarked name by Apple. So I'm led to believe that having a domain such as iphonedeveloper.com is ok? Well, you're still using Apple's trademark, but it would be hard to brand yourself otherwise. You're an IPHONE DEVELOPER... right? Well, what if I want to provide a website where users pay to get a list of the best offers from Ebay? I might have a domain like ebaydeals.com (I don't... i'm just speculating!). Now I've heard that places like Ebay are really hot on the trigger and fire out emails to people who register domains like that straight away. But whats the difference? In both cases I'm making money from the trademark, effectively, so is it just down to how lenient the company who owns the trademark is? Or are there rules? Is there a specific "line" you don't cross? Thanks

    Read the article

  • Low coupling and tight cohesion

    - by hidayat
    Of course it depends on the situation. But when a lower lever object or system communicate with an higher level system, should callbacks or events be preferred to keeping a pointer to higher level object? For example, we have a world class that has a member variable vector<monster> monsters. When the monster class is going to communicate with the world class, should I prefer using a callback function then or should I have a pointer to the world class inside the monster class?

    Read the article

  • How to organize timeline in a Flash project?

    - by miguelSantirso
    Hi, I am starting a new Flash game and I was wondering if there is a better way to organize the timeline of the project. In my previous games I define a keyframe for each possible status of the game (loading, sponsor, intro, menu, gameplay, etc...). This method works but has some problems... For instance, it is not easy to implement transitions between the different screens in the game. How do you do this? Do you know of some better way?

    Read the article

  • Using JQuery in an AJAX control and avoiding conflicts

    - by Rich Andrews
    Hi, I am using JQuery within a custom AJAX user control (part of a home grown toolkit) and I need to ensure that JQuery is present on the hosting page. There can be multiple instances of the control on a page and some controls may need to use different versions of JQuery. At the moment I am using the following code to load in JQuery when the control initializes... Page.ClientScript.RegisterClientScriptInclude(Page.GetType(), "jquery-1.4.4.min.js", this.ResolveUrl("TextControlPlugin/lib/jquery-1.4.4.min.js")); This works because the scriptmanager handles not putting multiple copies of the same script into he page. Problems... I cannot use JQuery statically in the calling page (I may not have a control on the page but need to use JQuery) The scriptmanager appears to handle only duplicate URL's and I will need to deploy it from potentially 2 different URL's (the calling page's copy and the controls copy) So, is there a way to isolate a version of JQuery to the context of my control that doesnt interfear with any use of JQuery from the calling page? The developer writing the page may not have access to the internals of the control. I have looked at JQuery.noConflict() but cannot seem to get it to work correctly - I believe I'm having problems with the order in which the scripts are injected into the page - I keep getting JQuery is undefined errors. Any help would be much appreciated

    Read the article

  • C# / Filter input of a textbox and display notification balloon

    - by asmo
    I'm wondering how to filter the input of a .NET textbox. I already know that I could listen for the KeyDown event and intercept the key, but that won't filter pasted strings by a right-click menu or a CTRL+V. I also don't wan't to completely disable the possibility of pasting of characters in the textbox. The paste action should be cancelled whenever it contains one or more invalid characters. Finally, I'd like to display a notification balloon whenever invalid characters are either entered or pasted. µTorrent already has this exact behavior: How can I achieve this functionality in C# ?

    Read the article

  • jQuery validate - how do I ignore letter case?

    - by Jamie
    Probably a goofy question, but I can't seem to find anything in google land. I simply need one of my methods to ignore the case of the entered field. I am doing a city name match, but need both "Atlanta" and "atlanta" to be valid. How should I edit this to get the validation love that I need? jQuery.validator.addMethod("atlanta", function(value) { return value == "Atlanta"; //Need 'atlanta' to work too }, '**Recipient must reside in Chicago City Limits**'); Pre thanks to any and all :)

    Read the article

  • C++: select argmax over vector of classes w.r.t. arbitrary expression

    - by karpathy
    Hello, I have trouble describing my problem so I'll give an example: I have a class description that has a couple of variables in it, for example: class A{ float a, b, c, d; } Now, I maintain a vector<A> that contains many of these classes. What I need to do very very often is to find the object inside this vector that satisfies that one of it's parameters is maximal w.r.t to the others. i.e code looks something like: int maxi=-1; float maxa=-1000; for(int i=0;i<vec.size();i++){ res= vec[i].a; if(res > maxa) { maxa= res; maxi=i; } } return vec[maxi]; However, sometimes I need to find class with maximal a, sometimes with maximal b, sometimes the class with maximal 0.8*a + 0.2*b, sometimes I want a maximal a*VAR + b, where VAR is some variable that is assigned in front, etc. In other words, I need to evaluate an expression for every class, and take the max. I find myself copy-pasting this everywhere, and only changing the single line that defines res. What makes it even more complicated is that even the name of the vector changes. Sometimes it's vec, sometimes it can be something else. I have many vectors that contain A's. This could be changed if this makes the problem too hard. Is there some nice way to avoid this insanity in C++? What's the neatest way to handle this? Thank you!

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >