Daily Archives

Articles indexed Wednesday May 30 2012

Page 13/22 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Why is quicksort better than other sorting algorithms in practice?

    - by Raphael
    This is a repost of a question on cs.SE by Janoma. Full credits and spoils to him or cs.SE. In a standard algorithms course we are taught that quicksort is O(n log n) on average and O(n²) in the worst case. At the same time, other sorting algorithms are studied which are O(n log n) in the worst case (like mergesort and heapsort), and even linear time in the best case (like bubblesort) but with some additional needs of memory. After a quick glance at some more running times it is natural to say that quicksort should not be as efficient as others. Also, consider that students learn in basic programming courses that recursion is not really good in general because it could use too much memory, etc. Therefore (and even though this is not a real argument), this gives the idea that quicksort might not be really good because it is a recursive algorithm. Why, then, does quicksort outperform other sorting algorithms in practice? Does it have to do with the structure of real-world data? Does it have to do with the way memory works in computers? I know that some memories are way faster than others, but I don't know if that's the real reason for this counter-intuitive performance (when compared to theoretical estimates).

    Read the article

  • Open Source Projects for Beginning Coders?

    - by MattDMo
    After working as a molecular biologist at the bench for many years, I lost my job last year and am thinking about a career change. I've been using open-source software and doing Linux system administration since the mid 90s, and have written/improved some small shell/Perl/PHP scripts, and am very comfortable building from source, but never progressed to creating non-trivial programs de novo. I want to move to actually learning real programming skills and contributing back to the community, with the possible eventual goal of getting into bioinformatics as a career in the future. I'm a stay-at-home dad now, so I have some time on my hands. I've done a lot of research on languages, and have settled on Python as my major focus for now. I'm set up on GitHub, but haven't forked anything yet. I've looked around OpenHatch some, but nothing really grabbed me. I've heard the advice to work on what you use/love, but that category is so broad that I'm having trouble finding any one thing to get started on. What are your suggestions for getting started? How do you pick a project that will welcome your (possibly amateurish) help? With a fairly limited skill set, how do you find a request that you can handle? What are common newbie mistakes to avoid? Any other advice?

    Read the article

  • Am I deluding myself? Business analyst transition to programmer

    - by Ryan
    Current job: Working as the lead business analyst for a Big 4 firm, leading a team of developers and testers working on a large scale re-platforming project (4 onshore dev, 4 offshore devs, several onshore/offshore testers). Also work in a similar capacity on other smaller scale projects. Extent of my role: Gathering/writing out requirements, creating functional specifications, designing the UI (basically mapping out all front-end aspects of the system), working closely with devs to communicate/clarify requirements and come up with solutions when we hit roadblocks, writing test cases (and doing much of the testing), working with senior management and key stakeholders, managing beta testers, creating user guides and leading training sessions, providing key technical support. I also write quite a few macros in Excel using VBA (several of my macros are now used across the entire firm, so there are maybe around 1000 people using them) and use SQL on a daily basis, both on the SQL compact files the program relies on, our SQL Server data and any Access databases I create. The developers feel that I am quite good in this role because I understand a lot about programming, inherent system limitations, structure of the databases, etc so it's easier for me to communicate ideas and come up with suggestions when we face problems. What really interests me is developing software. I do a fair amount of programming in VBA and have been wanting to learn C# for awhile (the dev team uses C# - I review code occasionally for my own sake but have not had any practical experience using it). I'm interested in not just the business process but also the technical side of things, so the traditional BA role doesn't really whet my appetite for the kind of stuff I want to do. Right now I have a few small projects that managers have given me and I'm finding new ways to do them (like building custom Access applications), so there's a bit here and there to keep me interested. My question is this: what I would like to do is create custom Excel or Access applications for small businesses as a freelance business (working as a one-man shop; maybe having an occasional contractor depending on a project's complexity). This would obviously start out as a part-time venture while I have a day job, but eventually become a full-time job. Am I deluding myself to thinking I can go from BA/part-time VBA programmer to making a full-time go of a freelance business (where I would be starting out just writing custom Excel/Access apps in VBA)? Or is this type of thing not usually attempted until someone gains years of full-time programming experience? And is there even a market for these types of applications amongst small businesses (and maybe medium-sized) businesses?

    Read the article

  • On what name should I claim copyright in open source software?

    - by ONOZ
    When I want to use the Apache 2.0 licence in my project, I should include this in the comments of my source code: Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. What name should I fill in for [name of copyright owner]? I am currently working alone on this project, but I'm going to release the source code so there might be other contributors in the near future.

    Read the article

  • Are R&D mini-projects a good activity for interns?

    - by dukeofgaming
    I'm going to be in charge of hiring some interns for our software department soon (automotive infotainment systems) and I'm designing an internship program. The main productive activity "menu" I'm planning for them consists of: Verification testing Writing Unit Tests (automated, with an xUnit-compliant framework [several languages in our projects]) Documenting Code Updating wiki Updating diagrams & design docs Helping with low priority tickets (supervised/mentored) Hunting down & cleaning compiler/run-time warnings Refactoring/cleaning code against our coding standards But I also have this idea that having them do small R&D projects would be good to test their talent and get them to have fun. These mini-projects would be: Experimental implementations & optimizations Proof of concept implementations for new technologies Small papers (~2-5 pages) doing formal research on the previous two points Apps (from a mini-project pool) These kinds of projects would be pre-defined and very concrete, although new ideas from the interns themselves would be very welcome. Even if a project is too big or is abandoned, the idea would also be to lay the ground work so they can be retaken by another intern or intern team. While I think this is good in concept, I don't know if it could be good in practice, as obviously this would diminish their productivity on "real work" (work with immediate value to the company), but I think it could help bring aboard very bright people and get them to want to stay in the future (which, I think, is the end goal for any internship program). My question here is if these activities are too open ended or difficult for the average intern to accomplish and if R&D is an efficient use of an interns time or if it makes more sense for to assign project work to interns instead.

    Read the article

  • Is it a bad practice to store large files (10 MB) in a database?

    - by B Seven
    I am currently creating a web application that allows users to store and share files, 1 MB - 10 MB in size. It seems to me that storing the files in a database will significantly slow down database access. Is this a valid concern? Is it better to store the files in the file system and save the file name and path in the database? Are there any best practices related to storing files when working with a database? I am working in PHP and MySQL for this project, but is the issue the same for most environments (Ruby on Rails, PHP, .NET) and databases (MySQL, PostgreSQL).

    Read the article

  • Pass FORTRAN variable to Python [migrated]

    - by Matthew Bilskie
    I have a FORTRAN program that is called from a Python script (as an ArcGIS tool). I need to pass an array, Raster_Z(i,j), from FORTRAN to python. I have read about the Python subprocess module; however, I have not had much luck in understanding how to do this with FORTRAN. All examples I have found involve simple unix command line calls and not actual programs. Has anyone had any experience in passing a variable from FORTRAN to Python via a memory PIPE? Thank you for your time.

    Read the article

  • How to learn an API

    - by inovaovao
    When I find some interesting project (e.g. on GitHub) I often would like to use it and try it out to see how it works, but if there isn't a good documentation or some kind of tutorial it's hard to figure out how to use it. So my question is: how do you approach such a situation? How do you figure out which classes are important and how to chain them to put them to use? What would you look at first? An advice I found is to look at the tests (if there are any). But if there are unit tests for every class, how do you know which ones to look at first?

    Read the article

  • Can observer pattern be represented by cars and traffic lights?

    - by eeerahul
    I wanted to verify with all of you, if I have a correct Observer Pattern analogy. The scenario is as follows: Consider, at a junction, there is a traffic signal, having red, yellow and green lights respectively. There are vehicles facing the traffic signal post. When it shows red, the vehicles stop, when it shows green, the vehicles move on. In case, it is yellow, the driver must decide whether to go or to stop, depending on whether he/she has crossed the stop line or not. At the same time, there are vehicles that do not care about the signal. They would do as they like. The similarities are that, the Traffic Signal happens to be the subject, notifying its states by glowing the appropriate lights. Those looking at it and following the signal are the ones subscribed to it, and behave according to the state of the subject. Those who do not care about it, are sort-of un-subscribed from the traffic signal. Please tell me, if you think this is a correct analogy or not?

    Read the article

  • Single Responsibility Principle - How Can I Avoid Code Fragmentation?

    - by Dean Chalk
    I'm working on a team where the team leader is a virulent advocate of SOLID development principles. However, he lacks a lot of experience in getting complex software out of the door. We have a situation where he has applied SRP to what was already quite a complex code base, which has now become very highly fragmented and difficult to understand and debug. We now have a problem not only with code fragmentation, but also encapsulation, as methods within a class that may have been private or protected have been judged to represent a 'reason to change' and have been extracted to public or internal classes and interfaces which is not in keeping with the encapsulation goals of the application. We have some class constructors which take over 20 interface parameters, so our IoC registration and resolution is becoming a monster in its own right. I want to know if there is any 'refactor away from SRP' approach we could use to help fix some of these issues. I have read that it doesn't violate SOLID if I create a number of empty courser-grained classes that 'wrap' a number of closely related classes to provide a single-point of access to the sum of their functionality (i.e. mimicking a less overly SRP'd class implementation). Apart from that, I cannot think of a solution which will allow us to pragmatically continue with our development efforts, while keeping everyone happy. Any suggestions ?

    Read the article

  • Review quality of code

    - by magol
    I have been asked to quality review two code bases. I've never done anything like that, and need advice on how to perform it and report it. Background There are two providers of code, one in VB and one in C (ISO 9899:1999 (C99)). These two programs do not work so well together, and of course, the two suppliers blames each other. I will therefore as a independent person review both codes, on a comprehensive level review the quality of the codes to find out where it is most likely that the problem lies. I will not try to find problems, but simply review the quality and how simple it is to manage and understand the code. Edit: I have yet not received much information about what the problem consists of. I've just been told that I will examine the code in terms of quality. Not so much more. I do not know the background to why they took this decision.

    Read the article

  • Mysql my.cnf as simbolic link in Ubuntu 12.04

    - by Juan Cruz
    I am not able to use symlink for my.cnf file (Ubuntu 12.04 server). I added the alias to /etc/apparmor.d/tunables/alias file (as I did for 10.04 and worked) but I get: May 30 16:00:01 ip-10-242-209-203 kernel: [176926.213403] type=1400 audit(1338393601.350:244): apparmor="DENIED" operation="open" parent=1 profile="/usr/sbin/mysqld" name="/opt/data/my.cnf" pid=18128 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0 May 30 16:00:01 ip-10-242-209-203 kernel: [176926.222016] init: mysql main process (18128) terminated with status 1 May 30 16:00:01 ip-10-242-209-203 kernel: [176926.222084] init: mysql respawning too fast, stopped As a workaround I added the following line /etc/mysql/my.cnf r, to the /etc/apparmor.d/local/usr.sbin.mysqld file. The default configuration is /etc/mysql/*.cnf r, Is this a bug? is an apparmor bug or a mysql bug? It seems that that configuration has changed since MySql 5.1 (https://bugs.launchpad.net/ubuntu/+source/mysql-5.1/+bug/619172) but now worked for me. Thanks!

    Read the article

  • Can I make Launcher icons dark/dim unless app is running (then in color)?

    - by Greg
    To improve visibility of what Launcher-Applications I have running (instead of relying solely on that small right-facing triangle), is it possible to make Launcher-icons default to a black&white/dark/dim state? And then when a launcher-icon is clicked (or the super+# shortcut used) that icon would gain color and backlight signifying the app is running? If the Launcher icon's app is not running, it is dimmed out. If the icon's app is running, it is showing in color and backlit. I'd prefer an "inhouse" solution as opposed to having to install additional software, but I'm interested in hearing all options for if this is possible.

    Read the article

  • How do I resolve unmet dependencies?

    - by jrg
    How do I resolve unmet package dependencies? occasionally, when I'm installing stuff, I get an error like the following: Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Broken packages How can I resolve it?

    Read the article

  • Nautilus statusbar visibilty - Quickly check free space

    - by Jeremy
    In prior versions, I would open Nautilus and check the statusbar, which would tell me how much free space there is. Now, the statusbar isn't shown by default. I know you can enable it from the View menu, but 99% of users won't do that (and I'd rather not do that, if possible). So, is there some new recommended way to keep tabs on hard drive usage? Or is there maybe some other method that I should have been using in the past but never noticed?

    Read the article

  • Trying to install flash player on ubuntu 12.04

    - by Eric
    I am having trouble installing this program. I do not know how to locate the browser plugins directory, or change the directory in the terminal. Installation instructions Installing using the plugin tar.gz: Unpack the plugin tar.gz and copy the files to the appropriate location. Save the plugin tar.gz locally and note the location the file was saved to. Launch terminal and change directories to the location the file was saved to. Unpack the tar.gz file. Once unpacked you will see the following: + libflashplayer.so + /usr Identify the location of the browser plugins directory, based on your Linux distribution and Firefox version Copy libflashplayer.so to the appropriate browser plugins directory. At the prompt type: cp libflashlayer.so <BrowserPluginsLocation> Copy the Flash Player Local Settings configurations files to the /usr directory. At the prompt type: sudo cp -r usr/* /usr Installing the plugin using RPM: - As root, enter in terminal: rpm -Uvh <rpm_package_file> - Click Enter key and follow prompts Installing the standalone player Unpack the tar.gz file To execute the standalone player Double-click, or enter in terminal: ./flashplayer

    Read the article

  • "/usr/bin/ld: cannot find -lboost_python-mt" error when installing pycuda 2011.2.2

    - by maxrider11
    I am installing pycuda2011.2.2 on ubuntu 11.10, but can't complete it. When i do pycuda-2011.2.2 $ make -j 4 I get this error: /usr/bin/ld: cannot find -lboost_python-mt , /usr/bin/ld: cannot find -lcuda I got 1 exact problem match in google search and solution as well : $ sudo ln -s /usr/lib/libboost_python-mt-py26 /usr/lib/libboost_python-mt But booooom, My problem doesn't vanish. It makes me wonder that why there are no relavant results in google search, as if only I have this problem. What is wrong ? Any help is appreciated. Thanks,

    Read the article

  • Resize images to specific height value in ImageMagick?

    - by Jason
    I've looked around for this, and can't find an easily implemented solution. Currently I'm working on an application that deals with panoramas. As they come out of the batch stitch process, the dimensions average 18000x4000. Using ImageMagick, how can I downscale those images to a specific height value while maintaining aspect ratio? According to the manual, the convert operation takes in both height and width to resize to while maintaining the same aspect ratio. What I'd like is to put in 600 and 1000 in my existing resize script function and have both a regular viewable image as well as a reduced size.

    Read the article

  • How to stop postgres from autostarting during start up

    - by bcrawl
    I have postgresql 8.4 installed on my desktop. It keeps starting on bootup because I think I used default settings. so I issue /etc/init.d/postgresql stop everytime and sometimes i keep forgetting It has folder paths as, /etc/postgresql/8.4/main /usr/lib/postgresql/8.4 There are a lot of configuration files and if someone can tell me where to look and what to change, that will be great. Thanks.

    Read the article

  • GNU Smalltalk package

    - by Peter
    I've installed the GNU Smalltalk package and can get to the SmallTalk command line with the command 'gst'. However, I can't start the visual gst browser using the command: $ gst-browser When I try, this is what I get: peter@peredur:~$ gst-browser Object: CFunctionDescriptor new: 1 "<0x40488720>" error: Invalid C call-out gdk_colormap_get_type SystemExceptions.CInterfaceError(Smalltalk.Exception)>>signal (ExcHandling.st:254) SystemExceptions.CInterfaceError class(Smalltalk.Exception class)>>signal: (ExcHandling.st:161) Smalltalk.CFunctionDescriptor(Smalltalk.CCallable)>>callInto: (CCallable.st:165) GdkColormap class>>getType (GTK.star#VFS.ZipFile/Funcs.st:1) optimized [] in GLib class>>registerAllTypes (GTK.star#VFS.ZipFile/GtkDecl.st:78) Smalltalk.OrderedCollection>>do: (OrderColl.st:68) GLib class>>registerAllTypes (GTK.star#VFS.ZipFile/GtkDecl.st:78) Smalltalk.UndefinedObject>>executeStatements (GTK.star#VFS.ZipFile/GtkImpl.st:1078) Object: CFunctionDescriptor new: 1 "<0x404a7c28>" error: Invalid C call-out gtk_window_new SystemExceptions.CInterfaceError(Exception)>>signal (ExcHandling.st:254) SystemExceptions.CInterfaceError class(Exception class)>>signal: (ExcHandling.st:161) CFunctionDescriptor(CCallable)>>callInto: (CCallable.st:165) GTK.GtkWindow class>>new: (GTK.star#VFS.ZipFile/Funcs.st:1) VisualGST.GtkDebugger(VisualGST.GtkMainWindow)>>initialize (VisualGST.star#VFS.ZipFile/GtkMainWindow.st:131) VisualGST.GtkDebugger class(VisualGST.GtkMainWindow class)>>openSized: (VisualGST.star#VFS.ZipFile/GtkMainWindow.st:19) [] in VisualGST.GtkDebugger class>>open: (VisualGST.star#VFS.ZipFile/Debugger/GtkDebugger.st:16) [] in BlockClosure>>forkDebugger (DebugTools.star#VFS.ZipFile/DebugTools.st:380) [] in Process>>onBlock:at:suspend: (Process.st:392) BlockClosure>>on:do: (BlkClosure.st:193) [] in Process>>onBlock:at:suspend: (Process.st:393) BlockClosure>>ensure: (BlkClosure.st:269) [] in Process>>onBlock:at:suspend: (Process.st:370) [] in BlockClosure>>asContext: (BlkClosure.st:179) BlockContext class>>fromClosure:parent: (BlkContext.st:68) Everything hangs at this point until I hit ^C, after which, I get: Object: CFunctionDescriptor new: 1 "<0x404a7c28>" error: Invalid C call-out gtk_window_new SystemExceptions.CInterfaceError(Exception)>>signal (ExcHandling.st:254) SystemExceptions.CInterfaceError class(Exception class)>>signal: (ExcHandling.st:161) CFunctionDescriptor(CCallable)>>callInto: (CCallable.st:165) GTK.GtkWindow class>>new: (GTK.star#VFS.ZipFile/Funcs.st:1) VisualGST.GtkDebugger(VisualGST.GtkMainWindow)>>initialize (VisualGST.star#VFS.ZipFile/GtkMainWindow.st:131) VisualGST.GtkDebugger class(VisualGST.GtkMainWindow class)>>openSized: (VisualGST.star#VFS.ZipFile/GtkMainWindow.st:19) [] in VisualGST.GtkDebugger class>>open: (VisualGST.star#VFS.ZipFile/Debugger/GtkDebugger.st:16) [] in BlockClosure>>forkDebugger (DebugTools.star#VFS.ZipFile/DebugTools.st:380) [] in Process>>onBlock:at:suspend: (Process.st:392) BlockClosure>>on:do: (BlkClosure.st:193) [] in Process>>onBlock:at:suspend: (Process.st:393) BlockClosure>>ensure: (BlkClosure.st:269) [] in Process>>onBlock:at:suspend: (Process.st:370) [] in BlockClosure>>asContext: (BlkClosure.st:179) BlockContext class>>fromClosure:parent: (BlkContext.st:68) peter@peredur:~$ Is there a problem with this package?

    Read the article

  • Logitech Wireless Keyboard & mouse not working aftesr upgrade to 12.04?

    - by deerjay99
    I upgraded my Dell Dimension 9200C to 12.04 Precise Pangolin with no issues, I ran it fine for a night but when I went back in a couple days later my Logitech Wireless Keyboard K350 and M510 mouse weren't active when booted. I can boot into an older version from the main the boot screen the mouse and keyboard work, but the network stack is gone. It says the networking manager on this version is not compatible. I'm scratching my head, it isn't the mouse and keyboard, they work fine on my dual boot, and they load fine in Knoppix. They did work fine on 12.04 for 1 night. Open to suggestions before I re-install completely.

    Read the article

  • How to add a link group to update-alternatives?

    - by Kurtosis
    Is it possible to add a custom link group to update-alternatives that is not already there by default? For example, I want to add Scala and all its supporting binaries as a link group 'scala'. I'm trying using this script, but keep getting the error: update-alternatives: error: unknown argument `' I'm not sure what that means, but after troubleshooting the script a bit with no luck, I'm wondering if update-alternatives has a hard-coded list of link groups, that can't be added to, and that doesn't include scala. PS - any chance someone with higher karma can create an update-alternatives tag? Seems this topic gets a decent number of questions, but no tag for it.

    Read the article

  • Unable to detect windows hard drive while running Ubuntu 12.04 from USB

    - by eapen jacob
    I am completely new to Ubuntu. I experimented with Ubuntu 12.04 by running it from a USB drive, in-order to recover files from my hard disc. History: My laptop is an IBM R60 running windows 7. Suddenly it gave me an error stating "error 2100 - Hard drive initialization error". I have read all the forums and most of them suggested that I remove and replace my HDD and that did not work. And one site suggested to try using Ubuntu to recover files. I booted my system from USB, and once Ubuntu came up, I choose "Try Ubuntu". It came up fine and I was able to surf ,and do other things, etc. I was unable to to access my files which are on the hard disc and "Attached Devices" is grayed out. 1- Is there any way to gain access to my hard disc to recover the files? How do I navigate to search for my files. 2- Is it just simply not possible if the hard disc themselves are not working? Is that why I`m unable to find the drives. I know its a very novice question, but hoping someone would help me out. Thank you, Eapen

    Read the article

  • Ubuntu won't save my settings for thinkpad trackpoint

    - by serve.chilled
    I'm using Ubuntu 12.04 on a Thinkpad X200. To configure the trackpoint, I use "configure TrackPoint". Unfortunately I can't make Ubuntu saving my settings (concerning the sensitivity etc.). Whenever I reboot the computer, it's set to generic settings again. I already tried htorque's answer to a similar question and created a new udev-rule for the trackpoint-settings but it didn't helped. So, how can I make theses settings permanent?

    Read the article

  • Building a linux system

    - by webyankee
    I am worried about hardware compatibility. I have several older PCs with various hardware and wish to install Linux onto them. I have several ideas about what I would like to do. first, I am a novice and know just enough to get me into trouble in a lot of areas. I can not find adequate descriptions of the usage between a desktop and a server version of Linux. When would you want to choose to build a server instead of a desktop and can you change a desktop to a server if you need higher functionality? I wonder if I should use 32 or 64 bit? I believe 32 bit on older (P1 or P2 systems) would be the safe way to go. what is the extent can these systems be used? Can they used to play high end graphics on-line games or just simple browsing and word processing? How do I determine what programs the system can use? I have pondered on the idea of linking several systems together to make one big computer. I know this can be done with some functionality improvement. Any Ideas about this?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >