Daily Archives

Articles indexed Wednesday October 17 2012

Page 11/17 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Building a website, want to use java

    - by Robb
    I'd like to make a simple-ish website that is essentially a small game. Key strokes are to be processed and sent to a server (already acquired and should support SQL and JSP, I believe) which then translate to a location and written to the DB. SQL queries are to be used to retrieve these locations and written to other clients connected to the website. Their page is to be updated with these locations. I have working knowledge of Java, jQuery/Ajax, SQL and JavaScript but I'm unfamiliar with JSP and how everything hooks up. I'm aware of the MVC paradigm as well. For my little game idea, would these technologies work? Am I over thinking this and can make it much easier to implement? What might be a good tutorial or example to study?

    Read the article

  • How to prevent code from leaking outside work?

    - by AeroCross
    I'm working on an institution that has a really strong sense of "possession" - each line of software we write should be only ours. Ironically, I'm the only programmer (ATM), but we're planning in hiring others. Since my bosses wouldn't count the new programmers as people they can trust, they have an issue with the copies of the source code. We use Git, so they would have a entire copy of each of the projects they work on, when they clone the repository. We can restrict access to them to a single key with Gitolite and bind that to their PC's, but they can copy those keys to another computer and they would have the repository access in another PC. Also (and the most obvious method) they could just upload the files somewhere else, add another remote, or just copy the files to an USB drive. Is there any (perhaps clever) way to prevent events like these?

    Read the article

  • Designing a Database Application with OOP

    - by Tim C
    I often develop SQL database applications using Linq, and my methodology is to build model classes to represent each table, and each table that needs inserting or updating gets a Save() method (which either does an InsertOnSubmit() or SubmitChanges(), depending on the state of the object). Often, when I need to represent a collection of records, I'll create a class that inherits from a List-like object of the atomic class. ex. public class CustomerCollection : CoreCollection<Customer> { } Recently, I was working on an application where end-users were experiencing slowness, where each of the objects needed to be saved to the database if they met a certain criteria. My Save() method was slow, presumably because I was making all kinds of round-trips to the server, and calling DataContext.SubmitChanges() after each atomic save. So, the code might have looked something like this foreach(Customer c in customerCollection) { if(c.ShouldSave()) { c.Save(); } } I worked through multiple strategies to optimize, but ultimately settled on passing a big string of data to a SQL stored procedure, where the string has all the data that represents the records I was working with - it might look something like this: CustomerID:34567;CurrentAddress:23 3rd St;CustomerID:23456;CurrentAddress:123 4th St So, SQL server parses the string, performs the logic to determine appropriateness of save, and then Inserts, Updates, or Ignores. With C#/Linq doing this work, it saved 5-10 records / s. When SQL does it, I get 100 records / s, so there is no denying the Stored Proc is more efficient; however, I hate the solution because it doesn't seem nearly as clean or safe. My real concern is that I don't have any better solutions that hold a candle to the performance of the stored proc solution. Am I doing something obviously wrong in how I'm thinking about designing database applications? Are there better ways of designing database applications?

    Read the article

  • Regardig Vb.net [closed]

    - by user68999
    hi everyone i am making a project for school management and manage all the record of student so I'm using VB.net 2008 and sql server 2008. i have a problem when i enter student date of birth in text box with date&time picker in database. but i want in the search option enter the date from date&time picker and get age of all the student data in data-view grid. like student are 10 year old, 11 year old etc. so how it can possible please help..........?

    Read the article

  • Java Alphabetize Algorithm Insertion sort vs Bubble Sort

    - by Chris Okyen
    I am supposed to "Develop a program that alphabetizes three strings. The program should allow the user to enter the three strings, and then display the strings in alphabetical order." It's instructed that I need to use the String library compareTo()/charAt()/toLowerCase() to make all the characters lowercase so the Lexicon comparison is also a alphabetical comparison. Input Pseudo Code: String input[3]; Scanner keyboard = new Scanner(System.in); System.out.println("Enter three strings: "); for(byte i = 0; i < 3; i++) input[i] = keyboard.next() The sorting would be Insertion Sort: 321 2 3 1 2 31 231 1 23 1 2 3 1 23 1 23 123 Bubble Sort 321 231 213 123 Which would be more efficient in this case? The bubble sort seems to be more efficient though they seem to have equal stats for worst best and avg case, but I read the Insertion Sort is quicker for small amounts of data like my case.

    Read the article

  • Can I require a large donation ($499) in order for a company to receive an extended version of my open source project? [closed]

    - by Damian
    I want to make my project open source but some of its more advanced features are targeted to companies so I would like to require a donation before I send the source code to the donating company. It will be something like that: "If you want to use the extended features of XXXXXXX, please make a donation of $499 and you will receive the source code and the jar with the extended features. You will also receive personalized support by email." Is it legal and acceptable to do something like that? Can the companies donate an amount like that to an open source project? I mean, is it easy for them in terms of their accounting, tax, etc. to donate $499 dollars to an open source project. I know it is not a matter whether they will have money or not but more of a paying procedure matter.

    Read the article

  • What should a system architect know? [closed]

    - by marko
    What does the title System Architect really mean? What do you need to know to be a system architect. Do you need to know design patterns or something like that? At work we have a couple so called "System Architects". They do the same stuff as we developers, but the distinction are that they are older and thus has more experience and knowledge of the business domain we work in. But I'm not really seeing the architecting side of work really...

    Read the article

  • The road to become a programmer [closed]

    - by user68991
    I'm looking for a 'career' change, I don't actually have a career at the moment since I haven't been able to find a job since I graduated with a degree in Materials Engineering. One of my loves has always been computers and programming, though I have never studied it seriously. When I was 11 I wrote a very basic graphical 'game' using notepad and HTML, where I drew each possible position of the main character on the different 'maze' level in MSPaint, using pictures of arrows as links to a new page with the character in a new position, and various other buttons would pop up 'search box', 'press button' etc. At the time I thought this was an amazing achievement of my programming skills. I've used a little bit of FORTRAN 90 whilst I was at university, which rekindled my interest in programming. When I was a kid I mainly used C and HTML, but only very basically as my 'game' suggests. I want to learn a new programming language, I'm not entirely sure where I want to go with it, but the number one contender at the moment is android apps. I'm looking at learning Java, but I've read that it's a difficult place to begin with; so I've also looked at learning Visual Basic, which I believe is also object oriented(?) but a little easier to understand? (not that I know what an object is anyway). Any information people could give me regarding which language to learn, and if there are any good online tutorial for that language I'd really appreciate it. Some of the tutorials I've used so far are full or jargon I can't understand. Also, I'm not afraid of maths having got an engineering degree. Thanks in advance for any help/advice. James

    Read the article

  • PHP - Data Access Layer

    - by scarpacci
    I am currently reviewing a code base and noticed that a majority of the calls (along with DB connections) are just buried inside the PHP scripts. I would have assumed that like other languages they would have developed some sort of data access layer (Like I would do in .Net or Java) for all of the communication to the DB (or implemented MVC, etc). Is this still a common pattern in PHP or is there alternative methodologies/patterns for this technology? I am just trying to understand why the subs would have developed it this way. Any insight/info on how experienced developers design an approach data access in PHP would be very much appreciated.

    Read the article

  • Types of semantic bugs, logic errors [closed]

    - by C-Otto
    I am a PhD student and currently focus on automatically finding instances of new types of bugs in (Java) programs that cannot be found by existing tools like FindBugs. The existing tool currently is used to prove/disprove termination of (Java) programs. I have some ideas (see below), but I could need more input from you (experienced programmers, potential users of my tool). What kind of bugs do you wish to find? What types of bugs exist and might be suitable for my analysis? One strength of the approach I use is detailled information about the heap. So in contrast to FindBugs, I can work with knowledge of the form "variable x and variable y are disjoint on the heap" or "variable z is not cyclic". It is also possible to see if a method might have side effects (and if so, which variables may/may not be affected by it). Example 1: Vacuous call: Graph graphOne = createGraph(); Graph graphTwo = createGraph(); Node source = graphTwo.getRootNode(); for (Node n : graphOne.getNodes()) { if (areConnected(source, n)) { graphTwo.addNode(n); } } Imagine createGraph() creates a fresh graph, so that graphOne and graphTwo are disjoint on the heap. Then, because source is taken from graphTwo instead of graphOne, the call to areConnected always returns false. In this situation I could find out that the call areConnected is useless (because it does not have any side effect and the return value always is false) which helps finding the real bug (taking source from the wrong graph). For this the information that x and y are disjoint (because graphOne and graphTwo are disjoint) is crucial. This bug is related to calling x.equals(y) where x and y are objects of different classes. In this scenario, most implementations of equals() always return false, which most likely is not the intended result. FindBugs already finds this bug (hardcoded to equals(), semantics of implementation is not checked). Example 2: Useless code: someCode(); while (something()) { yetMoreSomething(); } moreCode(); In the case that the loop (so the code in something() and yetMoreSomething()) does not modify anything visible outside the loop, it does not make sense to run this code - the program has the same behaviour as someCode(); moreCode() (i.e., without the loop). To find this out, one needs detailled information about the side effects of the (possibly useless) code. If I can prove that the code does not have any side effect that can be observed afterwards (in the example: in moreCode() or later), then the code indeed is useless. Of course, here Input/Output of any form must be seen as a side effect, so that a System.out.println(...) is not considered useless. Example 3: Ignored return value: Instead of x = foo(); and making use of x, the method is called without storing the result: foo();. If the method does not have any side effect, its invocation is useless and can be dropped. Most likely, the bug here is that the returned value should have been used. Here, too, detailled information about side effects are needed. Can you think of similar types of bugs that might be detected (only) with detailled information about the heap, side effects, semantics of called methods, ...? Did you encounter bugs related to the ones shown below in "real life"? By the way, the tool is AProVE and Java related publications can be found on my homepage. Thanks a lot, Carsten

    Read the article

  • Pair programming and unit testing

    - by TheSilverBullet
    My team follows the Scrum development cycle. We have received feedback that our unit testing coverage is not very good. A team member is suggesting the addition of an external testing team to assist the core team, but I feel this will backfire in a bad way. I am thinking of suggesting pair programming approach. I have a feeling that this should help the code be more "test-worthy" and soon the team can move to test driven development! What are the potential problems that might arise out of pair programming??

    Read the article

  • Next step after first few years at work [closed]

    - by juniordeveloper87
    Its been 2 years since graduating from uni and working in a IT solutions company as a programmer. My initial year was particularly exciting when we were trying to get a fresh product up to speed. The product has now gone live and are in the maintenance phase. My current day job involves merely bug fixing and also small designing/implementing change requests and also helping resolve issues faced from clients. Slowly I feel a little 'normal' in my role. I wonder how I can make myself stand out. (I work in a company of no more than 200 people) Or what should be the next step I take after 2 years doing programming? Thanks!

    Read the article

  • Task ownership with Wordpress - CSS - Designer or Developer?

    - by Syed Absar
    We have a dispute regarding who owns which tasks when it comes to the CSS on our live site. Our designer argues that he is not responsible to log-in to word press and modify the css or use ftp for any changes because that's not his job description while developer argues that since it is css, it belongs to designer and that he is to update the changes to the server and then compare and correct the output. I'd like experienced people working in professional development environment to put a light on this scenario. I'm not sure if this is the right place to ask this question, or is there a separate forum for business development or project management specific questions?

    Read the article

  • PHP PSR-0 + several namespaces in one file and autoload

    - by Nemoden
    I've been thinking for a while about defining several namespaces in one php file and so, having several classes inside this file. Suppose, I want to implement something like Doctrine\ORM\Query\Expr: Expr.php Expr |-- Andx.php |-- Base.php |-- Comparison.php |-- Composite.php |-- From.php |-- Func.php |-- GroupBy.php |-- Join.php |-- Literal.php |-- Math.php |-- OrderBy.php |-- Orx.php `-- Select.php It would be nice if I had all of this in one file - Expr.php: namespace Doctrine\ORM\Query; class Expr { // code } namespace Doctrine\ORM\Query\Expr; class Func { // code } // etc... What I'm thinking of is directories naming convention and, unlike PSR-0 having several classes and namespaces in one file. It's best explained by the code: ls Doctrine/orm/query Expr.php that's it - only Expr.php Since Expr.php is somewhat I call a "meta-namespace" for Expr\Func, it make sense to place all the classes inside Expr.php (as shown above). So, the vendor name is still starts with an uppercased letter (Doctrine) and the other parts of namespace start with lowercased letter. We can write an autoload so it would respect this notion: function load_class($class) { if (class_exists($class)) { return true; } $tokenized_path = explode(array("_", "\\"), DIRECTORY_SEPARATOR, $class); // array('Doctrine', 'orm', 'query', 'Expr', 'Func'); // ^^^^ // first, we are looking for first uppercased namespace part // and if it's not last (not the class name), we use it as a filename // and wiping away the rest to compose a path to a file we need to include if (FALSE !== ($meta_class_index = find_meta_class($tokenized_path))) { $new_tokenized_path = array_slice($tokenized_path, 0, $meta_class_index); $path_to_class = implode(DIRECTORY_SEPARATOR, $new_tokenized_path); } else { // no meta class found $path_to_class = implode(DIRECTORY_SEPARATOR, $tokenized_path); } if (file_exists($path_to_class.'.php')) { require_once $path_to_class.'.php'; } return false; } Another reason to do so is to reduce a number of php files scattered among directories. Usually you check file existence before you require a file to fail gracefully: file_exists($path_to_class.'.php'); If you take a look at actual Doctrine\ORM\Query\Expr code, you'll see they use all of the "inner-classes", so you actually do: file_exists("/path/to/Doctrine/ORM/Query/Expr.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/AndX.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Base.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Comparison.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Composite.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/From.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Func.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/GroupBy.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Join.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Literal.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Math.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/OrderBy.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Orx.php"); file_exists("/path/to/Doctrine/ORM/Query/Expr/Select.php"); in your autoload which causes quite a few I/O reads. Isn't it too much to check on each user's hit? I'm just putting this on a discussion. I want to hear from another PHP programmers what do they think of it. And, of course, if you have a silver bullet addressing this problems I've designated here, please share. I also have been thinking if my vogue question fits here and according to the FAQ it seems like this question addresses "software architecture" problem slash proposal. I'm sorry if my scribble may seem a bit clunky :) Thanks.

    Read the article

  • What's the current best practice for C multithreading?

    - by Dexter
    I've been a Java (and PHP) developer for most of my life, but will need to use C for my next project. I remember some basic stuff we did back in school with fork, pthread, semaphores, etc. but I'm not sure if that's still the "way to go" here, or if there have been any recent developments/improvements etc. Google's results seem to be fairly dated. Or does that just mean that this is still the current "state of the art"? Or will I have to use a (system-independent) libary like glib if I want higher-level abstractions, like synchronized queues? What other libraries are there? (The programm will only have to run on Linux though)

    Read the article

  • Where can I post software challenges and offer prizes as a way to outsource some work?

    - by r0u1i
    My apologies if this is off-topic, I thought this question suits this site better than stackoverflow. We have a few rather small and bounded problems in my company that we would love to outsource. Since they are very similar to challenges ("prove this and this can be done" rather than "supply the code"), we thought of posting them as challenges and offer prizes to the first guys who will crack them up. The outsourcing sites I know off (TopCoder, ODesk) are more interested in long term contracts with monthly pay. Is there a site better matching my needs out there?

    Read the article

  • How can a script detect if the user is idle

    - by josinalvo
    I want to check, inside a bash script (*), how much time the user of a X session has been idle The user himself does not have to be using bash, but just X. If the user just moved the mouse, for example, a good answer would be "idle for 0 seconds". If he has not touched the computer in 5 minutes, a good answer would be "idle for 300 seconds" The reason to not use xautolock straight away is to be able to implement some complex behavior. For example, if the user is idle for 10 minutes, try to suspend, if he is idle for more 5 minutes, shutoff (I know it sounds odd, but suspend does not always work here ...) (*)or could be another language.

    Read the article

  • why Ubuntu 12.04.1 nautilus left panel, doesn't show other partitions and usb drives?

    - by amerllica
    how do you do friends will be fine I had Ubuntu 12.04 and all thing work well but at one day i decide to change my partition tables, and done it. at now I've windows 8, Ubuntu 12.04.1 and Backtrack5 R3 on my laptop. my partitions are: /dev/sda1 * 2048 58597375 29297664 7 HPFS/NTFS/exFAT /dev/sda2 58601472 976773119 459085824 5 Extended /dev/sda5 58605120 797020159 369207520 7 HPFS/NTFS/exFAT /dev/sda6 797030400 933763071 68366336 83 Linux /dev/sda7 933765120 972834815 19534848 83 Linux /dev/sda8 972836864 976773119 1968128 82 Linux swap / Solaris at first I install windows 8 and then Backtrack5 R3, and at last I install Ubuntu 12.04.1 and I realize that my Ubuntu nautilus doesn't show other partitions or usb/cd/dvd drives. I search in Google and various Linux or Ubuntu forums, But I can't find any solution, just one thing... that is "gvfs-gdu-volume" cause nautilus left panel show other partitions which didn't mounted. but when I see top there isn't this program. who can I solve this problem? how nautilus can show other partitions or drives in its left panel once again?

    Read the article

  • Four monitor setup with two Nvidia graphics cards

    - by user94329
    I'm running Ubuntu 12.04 and I have two nVidia quadro 2000 video cards, each with two monitors plugged in (all 4 monitors are identical). Now I have the latest nVidia drivers, and I'm trying to use the nVidia control panel to use all four monitors, and I can't get it to work. Currently, my configuration is using TwinView to have 2 monitors per X screen. This doesn't work well because either i turn xinerama on, and nothing appears on the screen when I start a X session with Compiz enabled. Things only work in Ubuntu 2D. i turn xinerama off, and compiz works, but now, I cant drag windows between the two screens and i have no idea how to start applications in the other screen. Is there a better way to configure my four monitor setup? Is there a way to get both GPUs onto a single X screen?

    Read the article

  • Ubuntu perfomance issues

    - by Pelda
    I have as deafult Win 7 64b. But i get annoyed by some windows stuff so I decided to install ubuntu and learn Linux, because Win 8 is a nightmare. I have my Ubuntu 12.04 64bit installed in 100gb partition of my 1 Tb disc. My problem is that my Ubuntu feel really slower than Win 7 - even though my Win 7 are after some years of usage and they became much slower. And Ubuntu is just installed OS - I just downloaded wine and skype. It takes some time for new window to appear (its not 10 seconds, but its really slower than my windows). Sometimes my donwload get stuck (in basic ubuntu app store) Its just weird to me. I thought its because of some drivers, but I am really new to linux, so I decided to ask some1 before I screw whole system up. Specs: -6gbs of RAM - 3x2gb -3.0 ghz CPU quadcore -graphic card is HD4870 sapphire Please excuse my poor english and my addiction to windows interface. Pelda

    Read the article

  • Unable to download a file using drag&drop

    - by espectalll123
    I've been downloading images from the Internet doing drag&drop while holding the Ctrl key. Using Google Chrome, and of course Nautilus, it used to work fine. But I recently had problems with packages and now every time I do that a warning menu appears showing this message: The specified location is not supported Probably I removed the packaged which allowed me to download content... can anybody help me? Note: Downloading doing right-click works, but I use more drag&drop.

    Read the article

  • 11.10 update manager upgrade to 12.04 fails

    - by Kane
    Currently using 11.10 on a new dell vostro 2420 laptop and wanted to upgrade to 12.04.01lte. Using the update manager and clicking the upgrade option first came up with a 'failure to authenticate' message and after a restart of the computer I click the upgrade and it will download 2 files then the popup closes and no further prompts/screens come up. Is there some issue with my laptop that will prevent an upgrade? Or should I just wait and try the upgrade again another day?

    Read the article

  • Incorrect instructions on Upgrading to 12.10 from 12.04LTS

    - by Russ F
    https://wiki.ubuntu.com/QuantalQuetzal/TechnicalOverview/Beta1 reports incorrect instructions for upgrading from Ubuntu 12.04 LTS. The correct steps are: Alt+F2, Update Manager, choose settings, updates tab and set notify to "For any new version." Close the manager. Press Alt+F2, Terminal, then enter "sudo update-manager -d" (without the quotes)... Sorry to pester this list, but the Ubuntu wiki has no provisions for "Talk" or "Discussion" that do not require registration and a login. I feel like I should be able to point out a problem without signing in.

    Read the article

  • Gnome extensions stay in the list after being removed

    - by SingerOfTheFall
    I've got a little issue with gnome shell extensions. After installing some of them, I understood I didn't like them and decided to remove them. The extensions themselves (their folders in /home/username/.local/share/gnome-shell/extensions) were deleted successfully. However, the deleted extensions were not removed from the list of installed extensions at extensions.gnome.org. They also were not removed from the list in gnome-tweak-tool. So now in my list I have a bunch of extensions that I have already deleted. The funny thing is that I can't reinstall them too, since both the gnome-tweak-tool and the website think they are still there. This isn't a big deal of course, but I find it to be a little annoying. Reinstalling gnome-tweak-tool didn't help. Is there a way to somehow update the status of installed extensions?

    Read the article

  • Changing OS from Windows to Ubuntu

    - by Shadowinnothing
    So my computer has 2 operating systems on it, Windows 7 and Ubuntu 12.04. When I downloaded Ubuntu i had a ton of trouble booting windows 7 up again, then I downloaded GRUB and switched my default OS back to Windows. Sadly though, I'm trying to get into writing php with Apache. I Downloaded WAMP (windows Apache MySQL php) but for some reason, php doesn't work. I though i would try downloading LAMP (Linux apace MySQL php) but whenever I boot up my PC, I don't get a chance to enter the Ubuntu OS. How could I get back to running Ubuntu? Actually, it doesn't prompt me for a boot menu or anything. It just goes straight to the windows symbol

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17  | Next Page >