Daily Archives

Articles indexed Saturday February 12 2011

Page 2/10 | < Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • What are your suggestions on learning how to think?

    - by Jonathan Khoo
    First of all, this is not the generic 'make me a better programmer' question, even though the outcome of asking this question might seem similar to it. On programmers.SE, I've read and seen these get closed here, here, here, here, and here. We all know there are a multitude of generic suggestions to hone your programming skills (e.g reading SO, reading recommended books, following blogs, getting involved in open-source projects, etc.). This is not what I'm after. I also acknowledge the active readership on this web site and am hoping it works in my favour by yielding some great answers. From reading correspondence here, there appears to be a vast number of experienced people who are working, or have worked, programming-related fields. And most of you can convey thoughts in an eloquent, concise manner. I've recently noticed the distinction between someone who's capable of programming and a programmer who can really think. I refuse to believe that in order to become great at programmer, we simply submit ourselves to a lifetime of sponge-like behaviour (i.e absorb everything related to our field by reading, listening, watching, etc.). I would even state that simply knowing every single programming concept that allows you to solve problem X faster than everyone around you, if you can't think, you're enormously limiting yourself - you're just a fast robot. I like to believe there's a whole other face of being a great programmer which is unrelated to how much you know about programming, but it is how well you can intertwine new concepts and apply them to your programming profession or hobby. I haven't seen anyone delve into, or address, this facet of the human mind and programming. (Yes, it's also possible that I haven't looked hard enough too - sorry if that's the case.) So for anyone who has spent any time thinking about what I've mentioned above - or maybe it's everyone here because I'm a little behind in my personal/professional development - what are your suggestions on learning how to think? Aside from the usual reading, what else have you done to be better than the other people in your/our field?

    Read the article

  • What tools should every programmer know?

    - by acidzombie24
    What are some tools every programmer know about? Some examples i thought were Source control. (No explanation needed) Profiler. Many could go without but its good to know how to use one when the occasion arise What else? I was thinking a bug report software but i havent used one so i wasnt sure. Should programmers know how to use TRAC? I remember in the past a person telling me if i was making a shared library i should know (Some Name) which generates docs from the source (in that case C++). What was that called and what else should i know about? -edit- what about team management software? any software you could not live without in a specific project would be a good mention. I'll also mention i use VMs frequently during the prototype or end phase to see if there are any issues on a clean XP or linux distro and if i forgot anything in my redistribution. I cant imagine the end/release and testing phase of a project without a VM.

    Read the article

  • need example sql transaction procedures for sales tracking or financial database [closed]

    - by fa1c0n3r
    hi, i am making a database for an accounting/sales type system similar to a car sales database and would like to make some transactions for the following real world actions salesman creates new product shipped onto floor (itempk, car make, year, price).   salesman changes price.   salesman creates sale entry for product sold (salespk, itemforeignkey, price sold, salesman).   salesman cancels item for removed product.   salesman cancels sale for cancelled sale    the examples i have found online are too generic...like this is a transaction... i would like something resembling what i am trying to do to understand it.  anybody have some good similar or related sql examples i can look at to design these? do people use transactions for sales databases?  or if you have done this kind of sql transaction before could you make an outline for how these could be made?  thanks  my thread so far on stack overflow... http://stackoverflow.com/q/4975484/613799

    Read the article

  • What is the best place to go to ask questions about Aptana RadRails environment and setup problems?

    - by larson4
    I am having some issues using RadRails and the RadRails support site is not getting me any answers (I've had questions up for days with no response which StackOverflow has conditioned me to find unacceptable!). Primarily I have questions about things like exceptions thrown when running the project or mismatches between instructions and reality. Can I ask these questions on Programmers.stackexchange? Or Stackoverflow? Or can anyone recommend an active RadRails forumn somewhere?

    Read the article

  • Are short abbreviated method/function names that don't use full words bad practice or a matter of style?

    - by Alb
    Is there nowadays any case for brevity over clarity with method names? Tonight I came across the Python method repr() which seems like a bad name for a method to me. It's not an English word. It apparently is an abbreviation of 'representation' and even if you can deduce that, it still doesn't tell you what the method does. A good method name is subjective to a certain degree, but I had assumed that modern best practices agreed that names should be at least full words and descriptive enough to reveal enough about the method that you would easily find one when looking for it. Method names made from words help let your code read like English. repr() seems to have no advantages as a name other than being short and IDE auto-complete makes this a non-issue. An additional reason given in an answer is that python names are brief so that you can do many things on one line. Surely the better way is to just extract the many things to their own function, and repeat until lines are not too long. Are these just a hangover from the unix way of doing things? Commands with names like ls, rm, ps and du (if you could call those names) were hard to find and hard to remember. I know that the everyday usage of commands such as these is different than methods in code so the matter of whether those are bad names is a different matter.

    Read the article

  • Java web UI framework like ASP.NET MVC?

    - by Ethel Evans
    I'm doing some web apps for personal projects that might be shared out with my friends. I'm trying to use skills that will help me at work, but don't have $$ to spend on Visual Studio right now and don't want to try to cobble something together with Express Editions. Since I've been sort of wanting to bring my Java skills up to date and the main skills I want to work on are design and architecture skills, this isn't a big deal - except that I have no idea how to track down the right UI framework. I know I want something based on MVC, to get more practice with frameworks for that design pattern (we're using ASP .NET MVC2 at work). The UIs that I'll be making will be pretty simple - data entry, buttons, text, images. They will need AJAX. Any thoughts about which frameworks to look at? I'll be watching the comments, if anyone wants additional clarification on what I'm looking for.

    Read the article

  • Can't see my iPod

    - by Tom Brito
    When I plug in my 32GB iPod Touch 4G, it mounts a 1GB drive. Rhythmbox does not react, neither does Banshee. Any ideas how to copy my music? The output of df is: Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 28834716 4347480 23022512 16% / udev 1026788 288 1026500 1% /dev none 1026788 1496 1025292 1% /dev/shm none 1026788 204 1026584 1% /var/run none 1026788 0 1026788 0% /var/lock none 1026788 0 1026788 0% /lib/init/rw /dev/sda6 96124904 62709456 28532496 69% /home

    Read the article

  • How to avoid HDD spin up at system start? (Ubuntu from SSD)

    - by Oliver
    Thanks to hdparm -B1 /dev/sdb my HDD does no longer spin up when powered up on boot. But after completing the BIOS POST messages and starting Ubuntu the HDD gets a signal over the SATA data cable and spins up. Leaving the data cable (but still with plugged in SATA power cable) let the system boot up completely from my SSD without spinning up the HDD. What causes the HDD to spin up? Maybe Grub2? Edit: nope, doesn't seem to be Grub2 that spins up the drive. I just set up Grub to show its menu without timer. Nothings happens until I hit the Ubuntu standard boot option, then a few seconds later the drive spins up.

    Read the article

  • What is the easiest (preferably) graphical way to clone a hard drive to an image that I can open later?

    - by Roland Taylor
    I need to make a (preferably) mountable image of an 80GB Hdd, and store it on another hard drive. Is there some way that I can do this without losing data? Thanks for the answers I've received so far. The system in question cannot be used right now due to a problem with the power button :( [ugh!], but the information will really be useful =)! Thanks to all who answered so far, if anyone else wants to give me some tips I'll leave this open for a bit, as I still have not yet been able to clone the drive.

    Read the article

  • Ralink-based USB Wi-Fi adapter drops connection after some time

    - by Hector Aguilar
    I have an Intellinet Wireless 150N USB adapter (based on a Ralink rt3070 chip) in an Ubuntu 10.10 installation. The problem is, that it's dropping the connection after being connected to a wireless network for 10 - 20 minutes. I have to unplug it and plug it in again every time this happens. I read somewhere, that I need to blacklist some chipset modules, but I don't how? And which ralink modules I have to blacklist? Thanks for your answers! :D

    Read the article

  • How to solve this problem starting new Opera-windows on dual monitor-setup?

    - by Mnementh
    I use Opera and have a setup with two monitors. If I want to open a new URL opera -newwindow URL. The outcome differs, if I execute this command in a program on the same screen where Opera is, or on the other. On the same screen everything is fine. I get the message opera: Activated running instance and the new window with the URL is opened. On the other screen, I get a dialog with the following message: It appears another opera instance is using the same configuration directory because its lock file is active: /home/(my name)/.opera/lock and the URL is not shown. That's not only from console, also if I click a link in E-Mail or so. How can I fix this? Window-manager is awesome, if it does make a difference.

    Read the article

  • Tomboy error while tring to sync with Ubuntu one; Can anyone help?

    - by Michael Chapman
    So I'm sure you've heard the song before, but after trying to sync my notes with Ubuntu One(on 10.10 AMD64) I get "Could not synchronize notes. Check the details below and try again." Of course the problem is that there are no details and trying again doesn't help. So I ran tomboy -debug and compared my error to any thing I could find about similar problems (such as the post here) but found nothing useful. Any way here's my first error, I got this using preferencessynchronizationUbuntu_one [ERROR 21:08:42.271] Synchronization failed with the following exception: String was not recognized as a valid DateTime. at System.DateTime.Parse (System.String s, IFormatProvider provider, DateTimeStyles styles) [0x00000] in <filename unknown>:0 at System.DateTime.Parse (System.String s, IFormatProvider provider) [0x00000] in <filename unknown>:0 at System.DateTime.Parse (System.String s) [0x00000] in <filename unknown>:0 at Tomboy.WebSync.Api.NoteInfo.ParseJson (Hyena.Json.JsonObject jsonObj) [0x00000] in <filename unknown>:0 at Tomboy.WebSync.Api.UserInfo.ParseJsonNoteArray (Hyena.Json.JsonArray jsonArray) [0x00000] in <filename unknown>:0 at Tomboy.WebSync.Api.UserInfo.ParseJsonNotes (System.String jsonString, System.Nullable`1& latestSyncRevision) [0x00000] in <filename unknown>:0 at Tomboy.WebSync.Api.UserInfo.GetNotes (Boolean includeContent, Int32 sinceRevision, System.Nullable`1& latestSyncRevision) [0x00000] in <filename unknown>:0 at Tomboy.WebSync.WebSyncServer.GetNoteUpdatesSince (Int32 revision) [0x00000] in <filename unknown>:0 at Tomboy.Sync.SyncManager.SynchronizationThread () [0x00000] in <filename unknown>:0 The next thing I tried was using preferencessynchronizationtomboy_web with the default 'http://one.ubuntu.com/notes/' and got the same error plus one more. [ERROR 21:12:31.949] System.ObjectDisposedException: The object was used after being disposed. at System.Net.HttpListener.CheckDisposed () [0x00000] in <filename unknown>:0 at System.Net.HttpListener.EndGetContext (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 at Tomboy.WebSync.WebSyncPreferencesWidget.<OnAuthButtonClicked>m__1 (IAsyncResult localResult) [0x00000] in <filename unknown>:0 [ERROR 21:13:19.245] Synchronization failed with the following exception: String was not recognized as a valid DateTime. at System.DateTime.Parse (System.String s, IFormatProvider provider, DateTimeStyles styles) [0x00000] in <filename unknown>:0 at System.DateTime.Parse (System.String s, IFormatProvider provider) [0x00000] in <filename unknown>:0 at System.DateTime.Parse (System.String s) [0x00000] in <filename unknown>:0 at Tomboy.WebSync.Api.NoteInfo.ParseJson (Hyena.Json.JsonObject jsonObj) [0x00000] in <filename unknown>:0 at Tomboy.WebSync.Api.UserInfo.ParseJsonNoteArray (Hyena.Json.JsonArray jsonArray) [0x00000] in <filename unknown>:0 at Tomboy.WebSync.Api.UserInfo.ParseJsonNotes (System.String jsonString, System.Nullable`1& latestSyncRevision) [0x00000] in <filename unknown>:0 at Tomboy.WebSync.Api.UserInfo.GetNotes (Boolean includeContent, Int32 sinceRevision, System.Nullable`1& latestSyncRevision) [0x00000] in <filename unknown>:0 at Tomboy.WebSync.WebSyncServer.GetNoteUpdatesSince (Int32 revision) [0x00000] in <filename unknown>:0 at Tomboy.Sync.SyncManager.SynchronizationThread () [0x00000] in <filename unknown>:0 I Have also tried removing then re-adding My computer from my Ubuntu One account, but that did not help either. The only other Thing I have noticed is that under systempreferencesubuntu one services, "Notes" is not listed as a service. I don't know if this is normal or not. Thanks for any help and please let me know if anything is confusing.

    Read the article

  • How to interpret this crontab command?

    - by Bakhtiyor
    I know that if I wrote in crontab -e following command 01 04 * * * somecommand then it will run somecommand at 4:01am on every day of every month. What happens if I wrote * * * * * somecommand? Will it run somecommand every single minute? Will this syntax work also? And it is possible to use special strings like @reboot, @daily, etc as it is explained here. At what time of the day somecommand will be executed if I write @daily somecommand command?

    Read the article

  • Simple mod_rewrite Question

    - by user5358
    Hello, I want to have everything that looks like this: /1/2/3/4/5/[...] to redirect to this: /index.php?u=/1/2/3/4/5/[...] unless the requested string is a specific file. So anything that doesn't have a ".", I want to redirect to "index.php?u=[...]". I'll then parse the URI segments in PHP to determine what the user is requesting. I've been looking around for how to do this, but have only a very rough understanding of regular expressions and have been unable to find an example of how to do it. Thanks!

    Read the article

  • Looking for recommendations for a server-side newsletter program

    - by Sparky672
    Hello- I'm currently using a server-side SQL based mailing list program called Php-List on multiple sites and it works fairly well. But installation and setup is quite cumbersome, quirky and the interface is not well organized... neither is the code... with pieces all over the place in random fashion. Customizing the "look & feel" and full site integration are both tedious and painful. Upgrading the version is made more complex since multiple edits need to be manually transferred each time. Also, probably due to a poor English translation, descriptions and instructions within certain areas of the user interface are contradictory and unclear. You just have to play with it and remember what you did last time it worked. It's supposed to be so my customers can send out their own newsletters... after supplying a written tutorial, about half of them seem to stumble through it okay and the other half just hire me to do it for them. So not quite easy enough for most average people to use. I'm looking for something that's as easy for them as using a blog or discussion forum. It also must be easier to set up and integrate into a site than Php-List. I have no problem getting dirty and writing CSS or HTML by hand. Nor do I have any problem editing the program code. Perhaps what I'm looking for is a solution that is more organized, a better GUI, and template or "skin" based. Therefore, if I spend many hours customizing a skin, I can simply update the program and re-use my custom skin without having to reproduce the tedious setup over and over. (I currently maintain a list of about 25 things I must manually edit or add to multiple files in multiple directories each time I install or upgrade Php-List) A great example of what I'm looking for is very much like WordPress or phpBB. They're both easy to install and customize yet powerful and packed full of features. They're also VERY well organized making customization less painful. So enough yammering for now... anyone know of something, besides Php-List, with many of the same features as Php-List; maintaining a mailing list with a server-side database, custom sign-up pages, automatic opt-in opt-out, allowing custom HTML newsletter templates, etc? Thank-you!

    Read the article

  • Tracking Redirects Leading to your site

    - by Bill
    Is there a way in which I can find out if a user arrived at my site via a redirect? Here's an example: There are two sites, first.com & second.com. Any request to first.com will do a 302 redirect to second.com. When the request at second.com arrives, is there anyway to know it was redirected from first.com? Note that in this example you have no control over first.com. (In fact, it could be something bad, like kiddieporn.com.) Also note, because it is a redirect, it will not be in the HTTP referrer header.

    Read the article

  • Good practices in screen states management?

    - by DevilWithin
    I wonder what are the best ways to organize different screens in a game? I am thinking of it like this: Inheriting a base State class, and overriding update and render methods, to handle the current screen. Then, under certain events a StateManager is able to activate another Screen State, and the game screen changes as only the current State is rendered. On the activation of a new screen, effects like fading could be added, and also the same goes for its deactivation. This way a flow of screen could be made. By saying when A ends, B starts, allowing for complex animations etc. Toughts?

    Read the article

  • How can I create Wikipedia's footnote highlighting solely with jQuery

    - by andrew.bachman
    I would like to duplicate Wikipedia's footnote highlighting from in-text citation click solely in jQuery and CSS classes. I found a webpage that describes how to do so with CSS3 and then a JavaScript solution for IE. I would like however to do so solely with jQuery as the site I'm doing it on already has a bunch of jQuery elements. I've come up with a list of the process. In-Text Citation Clicked Replace highlight class with standard footnote class on <p> tag of footnotes that are already highlighted. Add highlight to the appropriate footnote Use jQuery to scroll down the page to appropriate footnote. I've come up with some jQuery so far but I'm extremely new to it relying heavy on tutorials and plugins to this point. Here is what I have with some plain English for the parts I haven't figured out yet. $('.inlineCite').click(function() { $('.footnoteHighlight').removeClass('footnoteHighlight').addClass('footnote'); //add highlight to id of highlightScroll //scroll to footnote with matching id }); If I had a method to pass a part of the selector into the function and turn it into a variable I believe I could pull it off. Most likely I'm sure one of you gurus will whip something up that puts anything I think I have done to shame. Any help will be greatly appreciated so thank you in advance. Cheers.

    Read the article

  • jquery mouseleave issue when moving too slow

    - by David
    Hello. I am using the jQuery mouseenter and mouseleave events to slide a div down and up. Everything works well except for the mouseleave which doesn't appear to fire ONLY if the mouse of moved off of the div quite slowly. If i move the mouse at a relatively normal or fast speed then it works as expected. Can anyone explain this or provide any info on how to get around this? Code: $(document).ready(function() { $('header').mouseenter(function() { $(this).stop().animate({'top' : '25px'}, 500, function() { $(this).delay(600).animate({'top' : '-50px'}, 500); }); }). mouseleave(function(e) { var position = $(this).position(); if (e.pageY > position.top + $(this).height()) { $(this).stop().delay(600).animate({'top' : '-75px'}, 500) ; } }); });

    Read the article

  • fitnesse test framework, arbitrary properties for test and queries/test runs based on them?

    - by Marcel
    hi, our testers have the requirement to store multiple properties for a test that are not present in the "properties". e.g. they want to store priority, a description(not in the wiki page itself) and so on. they don't want to use the tagging mechanism. is there a way to store any kind of new xml node in the properties.xml for a test? these properties should then be used to: query the fields via the search screen run tests based on the "SuiteResponder" ?suite=xxx&TAGx=abc&TAGy=cde they should be returned by "?properties" responder. they should appear in the test history of the test run in essence they want to store any kind of "meta" information in the properties.xml and work with them in all kinds of ways, search, run etc. does anybody here know if there is already something available in that direction? if not i think we have to "pimp" these features into fitnesse to make our testers happy. thanks a lot any help appreciated marcel ps: i've also posted the question in the yahoo fitnesse group

    Read the article

  • Configuring DSVL to show camera images from Logitech9000 webcam

    - by curryage
    I am trying to view camera feed from a Logitech9000 camera using DSVL(DirectShow Video Library) http://sourceforge.net/projects/dsvideolib/. The xml file currently looks as below: <?xml version="1.0" encoding="UTF-8"?> <dsvl_input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Documents and Settings\Thomas\My Documents\projects\ARToolKit &amp; DSVideoLib\ARVideoLib\DsVideoLib\DsVideoLib.xsd"> <camera show_format_dialog="false" friendly_name="Logitech Webcam Pro 9000"> <pixel_format> <RGB24 flip_v="false"/> </pixel_format> </camera> </dsvl_input> However, the image that comes up looks vertically inverted. I tried changing the flip_v value to true in the config above but it did not make any difference. Any suggestions?

    Read the article

  • Sharing Code, Images and Core Data models across iPhone and Mac project

    - by Robert
    Hi, I am maintaining a fairly large mac project and an iphone client for this project. Some code as well as some images and core data models are shared between these two projects. I want to create a shared framework containing this shared components but to my surprise, frameworks like we cocoa developers known them are not supported on the iphone os. Currently I see the following options: a) Include the files in both projects (much tedious work) b) Create a static library for both projects and manually copying the images/core data models c) Create a static lib for iphone and a framework for mac Any suggestions?

    Read the article

  • Wider dropdown based on text

    - by oshirowanen
    I have the following script: http://jsfiddle.net/oshirowanen/6SUwR/3/ How do I give the drop down section a dynamic width based on the characters in the dropdown? For example, if "navigation 1" was "this is the first item in the navigation", How do I make the width of the whole dropdown wider automatically, but without affecting the size of the navigation button which causes the dropdown the dropdown when mouseover'ed? Basically, I don't want to text to wrap in the dropdown, but at the same time, I don't want to button for the dropdown to go wider.

    Read the article

  • Google Maps: Multimarker not working

    - by HyperDevil
    Hi, I want to plot several markers on my map. Found some code on the internet, for that user it worked. The array is generated by PHP, example: var ships = [['61','10.2']['60.5','10.1']]; My Javascript: var map; function load(ships) { initialize(); createShips(ships); } function initialize() { //build the map var myLatlng = new google.maps.LatLng(63.65,10.65); var myOptions = { zoom: 9, center: myLatlng, mapTypeId: google.maps.MapTypeId.TERRAIN } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); } function createShips(ships) { for (var i = 0; i < ships.length; i++) { new google.maps.Marker({ position: new google.maps.LatLng(ships[i][0], ships[i][1]), map: map, title: ships[i][0] }); } } My html function to start the map is: body onload="load()" The map seems to appear, but no markers :(

    Read the article

  • What is wrong with locking non-static fields? What is the correct way to lock a particular instance?

    - by smartcaveman
    Why is it considered bad practice to lock non-static fields? And, if I am not locking non-static fields, then how do I lock an instance method without locking the method on all other instances of the same or derived class? I wrote an example to make my question more clear. public abstract class BaseClass { private readonly object NonStaticLockObject = new object(); private static readonly object StaticLockObject = new object(); protected void DoThreadSafeAction<T>(Action<T> action) where T: BaseClass { var derived = this as T; if(derived == null) { throw new Exception(); } lock(NonStaticLockObject) { action(derived); } } } public class DerivedClass :BaseClass { private readonly Queue<object> _queue; public void Enqueue(object obj) { DoThreadSafeAction<DerivedClass>(x=>x._queue.Enqueue(obj)); } } If I make the lock on the StaticLockObject, then the DoThreadSafeAction method will be locked for all instances of all classes that derive from BaseClass and that is not what I want. I want to make sure that no other threads can call a method on a particular instance of an object while it is locked.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >