Search Results

Search found 84 results on 4 pages for 'thorbjorn ravn andersen'.

Page 4/4 | < Previous Page | 1 2 3 4 

  • : for displaying all elements in a multidimensional array in python 3.1.

    - by Leif Andersen
    I have a multidimensional array in python like: arr = [['foo', 1], ['bar',2]] Now, if I want to print out everything in the array, I could do: print(arr[:][:]) Or I could also just do print(arr). However, If I only wanted to print out the first element of each box (for arr, that would be 'foo', 'bar'), I would imagine I would do something like: print(arr[:][0]) however, that just prints out the first data blog (['foo', 1]), also, I tried reversing it (just in case): print(arr[0][:]) and I got the same thing. So, is there anyway that I can get it to print the first element in each tuple (other than: for tuple in arr: print(tuple[0]) )? Thanks.

    Read the article

  • How do (or can I) hack a gem temporarily while looking for a bug?

    - by Tom Andersen
    I have a gem installed in my home directory on a laptop (eg not THE server). I have installed ruby 1.9.1 and also some other gems, notably right_aws - which allows access to s3, etc with ruby. All works, except there is a bug when I do a query on SimpleDB, and the returned list of items includes an item with any two byte utf-8 character in its itemName(). So I look through the sources of the right_aws gem installed on my machine, and I can see some places where I would like to test a fix. If I edit the file, save changes, (needing a password), then restart the server (script/server), it ignores my changes. I am quite new at ruby - do you have to 'compile' or other similar move to get the source code changes made take effect? I can see the edited file is changed by viewing it in terminal, etc.

    Read the article

  • Shame on you for stealing

    - by BuckWoody
    It's become quite common for people with no morals to steal from others. But that doesn't make it right. If you're reading this on SQLBLOGS.NET, then it's stolen from my "real" blog location. Send an e-mail right now to [email protected] and let this person know that taking something without asking is stealing - and he or she should be ashamed of themselves. Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!

    Read the article

  • JavaOne 2012: JDBC Community Discussion

    - by sowmya
    At JavaOne2012, Mark Biamonte of DataDirect Technologies and Lance Andersen of Oracle organized a discussion about JDBC. To learn more about using JDBC to develop database applications, see the JDBC trail in the Java Tutorials. You will know how to use the basic JDBC API to * create tables * insert values into them * query the tables * retrieve the results of the queries * update the tables In this process, you will learn how to use simple statements and prepared statements, and see an example of a stored procedure. You will also learn how to perform transactions and how to catch exceptions and warnings. - Sowmya

    Read the article

  • Is there such a thing as a super programmer? [closed]

    - by Muhammad Alkarouri
    Have you come across a super programmer? What identifies him or her as such, compared to "normal" experienced/great programmers? Also. how do you deal with a person in your team who believes he is a super programmer? Both in case he actually is or if he isn't? Edit: Interesting inputs all round, thanks. A few things can be gleaned: A few definitions emerged. Disregarding too localised definitions (that identified the authors or their acquaintance as super programmers), I liked a couple definitions: Thorbjørn's definition: a person who does the equivalent of a good team consistently for a long time. Free Electron, linked from Henry's answer. A very productive person, of exceptional abilities. The explanation is a good read. A Free Electron can do anything when it comes to code. They can write a complete application from scratch, learn a language in a weekend, and, most importantly, they can dive into a tremendous pile of spaghetti code, make sense of it, and actually getting it working. You can build an entire businesses around a Free Electron. They’re that good. Contrasting with the last definition, is the point linked to by James about the myth of the genius programmer (video). The same idea is expressed as egoless programming in rwong's comment. They present opposite opinions as whether to optimise for such a unique programmer or for a team. These definitions are definitely different, so I would appreciate it if you have an input as to which is better. Or add your own if you want of course, though it would help to say why it is different from those.

    Read the article

  • Why would more CPU cores on virtual machine slow compile times?

    - by Sid
    [edit#2] If anyone from VMWare can hit me up with a copy of VMWare Fusion, I'd be more than happy to do the same as a VirtualBox vs VMWare comparison. Somehow I suspect the VMWare hypervisor will be better tuned for hyperthreading (see my answer too) I'm seeing something curious. As I increase the number of cores on my Windows 7 x64 virtual machine, the overall compile time increases instead of decreasing. Compiling is usually very well suited for parallel processing as in the middle part (post dependency mapping) you can simply call a compiler instance on each of your .c/.cpp/.cs/whatever file to build partial objects for the linker to take over. So I would have imagined that compiling would actually scale very well with # of cores. But what I'm seeing is: 8 cores: 1.89 sec 4 cores: 1.33 sec 2 cores: 1.24 sec 1 core: 1.15 sec Is this simply a design artifact due to a particular vendor's hypervisor implementation (type2:virtualbox in my case) or something more pervasive across more VMs to make hypervisor implementations more simpler? With so many factors, I seem to be able to make arguments both for and against this behavior - so if someone knows more about this than me, I'd be curious to read your answer. Thanks Sid [edit:addressing comments] @MartinBeckett: Cold compiles were discarded. @MonsterTruck: Couldn't find an opensource project to compile directly. Would be great but can't screwup my dev env right now. @Mr Lister, @philosodad: Have 8 hw threads, using VirtualBox, so should be 1:1 mapping without emulation @Thorbjorn: I have 6.5GB for the VM and a smallish VS2012 project - it's quite unlikely that I'm swapping in/out trashing the page file. @All: If someone can point to an open source VS2010/VS2012 project, that might be a better community reference than my (proprietary) VS2012 project. Orchard and DNN seem to need environment tweaking to compile in VS2012. I really would like to see if someone with VMWare Fusion also sees this (for VMWare vs VirtualBox compartmentalization) Test details: Hardware: Macbook Pro Retina CPU : Core i7 @ 2.3Ghz (quad core, hyper threaded = 8 cores in windows task manager) Memory : 16 GB Disk : 256GB SSD Host OS: Mac OS X 10.8 VM type: VirtualBox 4.1.18 (type 2 hypervisor) Guest OS: Windows 7 x64 SP1 Compiler: VS2012 compiling a solution with 3 C# Azure projects Compile times measure by VS2012 plugin called 'VSCommands' All tests run 5 times, first 2 runs discarded, last 3 averaged

    Read the article

  • Hide/Replace Nginx Location Header?

    - by Steven Ou
    I am trying to pass a PCI compliance test, and I'm getting a single "high risk vulnerability". The problem is described as: Information on the machine which a web server is located is sometimes included in the header of a web page. Under certain circumstances that information may include local information from behind a firewall or proxy server such as the local IP address. It looks like Nginx is responding with: Service: https Received: HTTP/1.1 302 Found Cache-Control: no-cache Content-Type: text/html; charset=utf-8 Location: http://ip-10-194-73-254/ Server: nginx/1.0.4 + Phusion Passenger 3.0.7 (mod_rails/mod_rack) Status: 302 X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.7 X-Runtime: 0 Content-Length: 90 Connection: Close <html><body>You are being <a href="http://ip-10-194-73-254/">redirect ed</a>.</body></html> I'm no expert, so please correct me if I'm wrong: but from what I gathered, I think the problem is that the Location header is returning http://ip-10-194-73-254/, which is a private address, when it should be returning our domain name (which is ravn.com). So, I'm guessing I need to either hide or replace the Location header somehow? I'm a programmer and not a server admin so I have no idea what to do... Any help would be greatly appreciated! Also, might I add that we're running more than 1 server, so the configuration would need to be transferable to any server with any private address.

    Read the article

  • Ubuntu 10.04 RGBA(Transparent theme) bug

    - by Nrew
    I tried to follow this tutorial frome ghacks.net. But I end up with a bug. Everytime I try to change the desktop background or the theme. It opens up lots of folders. And then close it back again. So I cannot do anything when I try to change the background or the theme to the default. Here is the tutorial And I can't even shutdown my machine now, please help. EDIT I tried executing these commands in the terminal sudo add-apt-repository ppa:erik-b-andersen/rgba-gtk sudo apt-get update && sudo apt-get upgrade sudo apt-get install gnome-color-chooser gtk2-module-rgba sudo apt-get install murrine-themes And it installed gnome color changer. It works, and the windows became transparent, but I can't change to the default theme and I can't put a background Here's the screenshot, when I try to change something in the preferences: Its just okay if I can't change the theme, but it won't let me change the background either. Or maybe the background is changed but its transparent just like the other windows. You can see that in the taskbar(or whatever its called in Ubuntu). Its full. What can I do to atleast make the background visible.

    Read the article

  • applet does not load

    - by jcp
    We have a legacy program that was ported from Java 1.3 to Java 1.5. This application involves applets which worked fine before. After porting however, the applet would not load. However there are no errors or exceptions. The app would just try to load it forever. We tried to run it with Java 1.6 and poof! No problems whatsoever. Isn't Java 6 backwards compatible? So how come it would run in that version and not in 1.5? ==== Java Console log for Java 1.5.0_19 basic: Registered modality listener basic: Registered modality listener basic: Registered modality listener liveconnect: Invoking JS method: document liveconnect: Invoking JS method: document liveconnect: Invoking JS method: document liveconnect: Invoking JS method: URL liveconnect: Invoking JS method: URL liveconnect: Invoking JS method: URL basic: Referencing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=1 basic: Referencing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=2 basic: Referencing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=3 basic: Added progress listener: sun.plugin.util.GrayBoxPainter@b0bad7 basic: Loading applet ... basic: Initializing applet ... basic: Starting applet ... basic: Added progress listener: sun.plugin.util.GrayBoxPainter@ba9340 basic: Added progress listener: sun.plugin.util.GrayBoxPainter@1198891 basic: Loading applet ... basic: Initializing applet ... basic: Starting applet ... basic: Loading applet ... basic: Initializing applet ... basic: Starting applet ... basic: Referencing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=4 basic: Releasing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=3 basic: Referencing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=4 basic: Releasing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=3 basic: Referencing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=4 basic: Releasing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=3 network: Connecting <something>.jar with proxy=HTTP @ proxy/<ip address> basic: Loading <something>.jar from cache basic: No certificate info, this is unsigned JAR file. Left START init() Left END init() Right START init() Control start() Waiting for Left Panel to load... Right START start() network: Connecting socket://<ip address>:14444 with proxy=DIRECT Control start() Waiting for Left Panel to load... Control start() Waiting for Left Panel to load... Control start() Waiting for Left Panel to load... my HostName : <ip address> Thread-19 Check : Thread-19 Check : Monitor : run : start Thread-20 Monitor : Monitor: run() start Control start() Waiting for Left Panel to load... Control start() Waiting for Left Panel to load... Control start() Waiting for Left Panel to load... Control start() Waiting for Left Panel to load... Control start() Waiting for Left Panel to load... Control start() Waiting for Left Panel to load... the last message goes on forever... and now with the working version: ==== Java Console log for Java 1.6.0_15 basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@1b000e7 basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@12611a7 basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@1807ca8 network: CleanupThread used 6 us network: CleanupThread used 5 us network: CleanupThread used 6 us cache: Skip blacklist check as cached value is ok. network: Cache entry found [url: <something>.jar, version: null] network: Connecting <something>.jar with proxy=HTTP @ proxy/<ip address> network: ResponseCode for <something>.jar : 304 network: Encoding for <something>.jar : null network: Disconnect connection to <something>.jar Reading certificates from 11 <something>.jar | <something>.idx network: No certificate info for unsigned JAR file: <something>.jar basic: Applet loaded. basic: Applet loaded. basic: Applet resized and added to parent container basic: Applet resized and added to parent container basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 330275 us, pluginInit dt 27768955 us, TotalTime: 28099230 us Right START init() basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 330275 us, pluginInit dt 27770563 us, TotalTime: 28100838 us Left START init() basic: Applet loaded. basic: Applet resized and added to parent container basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 330275 us, pluginInit dt 27779332 us, TotalTime: 28109607 us Left END init() basic: Applet initialized basic: Removed progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@12611a7 basic: Applet made visible And that's it. Still haven't figured out why it works with java6 and not java5. @valli: the object tag was used, not applet @thorbjorn: i tried that already... it just keeps saying loading applet... @aaron: how can i know what exception it is, if there really is one? and yes we have considered that its a java bug but i still havent found what that bug is. i have to submit a report tomorrow and i've scoured the net but came up with nothing as of yet... @all: thank you for your replies

    Read the article

< Previous Page | 1 2 3 4