Search Results

Search found 12 results on 1 pages for 'gaston'.

Page 1/1 | 1 

  • Deadlock Analysis in NetBeans 8

    - by Geertjan
    Lock contention profiling is very important in multi-core environments. Lock contention occurs when a thread tries to acquire a lock while another thread is holding it, forcing it to wait. Lock contentions result in deadlocks. Multi-core environments have even more threads to deal with, causing an increased likelihood of lock contentions. In NetBeans 8, the NetBeans Profiler has new support for displaying detailed information about lock contention, i.e., the relationship between the threads that are locked. After all, whenever there's a deadlock, in any aspect of interaction, e.g., a political deadlock, it helps to be able to point to the responsible party or, at least, the order in which events happened resulting in the deadlock. As an example, let's take the handy Deadlock sample code from the Java Tutorial and look at the tools in NetBeans IDE for identifying and analyzing the code. The description of the deadlock is nice: Alphonse and Gaston are friends, and great believers in courtesy. A strict rule of courtesy is that when you bow to a friend, you must remain bowed until your friend has a chance to return the bow. Unfortunately, this rule does not account for the possibility that two friends might bow to each other at the same time. To help identify who bowed first or, at least, the order in which bowing took place, right-click the file and choose "Profile File". In the Profile Task Manager, make the choices below: When you have clicked Run, the Threads window shows the two threads are blocked, i.e., the red "Monitor" lines tell you that the related threads are blocked while trying to enter a synchronized method or block: But which thread is holding the lock? Which one is blocked by the other? The above visualization does not answer these questions. New in NetBeans 8 is that you can analyze the deadlock in the new Lock Contention window to determine which of the threads is responsible for the lock: Here is the code that simulates the lock, very slightly tweaked at the end, where I use "setName" on the threads, so that it's even easier to analyze the threads in the relevant NetBeans tools. Also, I converted the anonymous inner Runnables to lambda expressions. package org.demo; public class Deadlock { static class Friend { private final String name; public Friend(String name) { this.name = name; } public String getName() { return this.name; } public synchronized void bow(Friend bower) { System.out.format("%s: %s" + " has bowed to me!%n", this.name, bower.getName()); bower.bowBack(this); } public synchronized void bowBack(Friend bower) { System.out.format("%s: %s" + " has bowed back to me!%n", this.name, bower.getName()); } } public static void main(String[] args) { final Friend alphonse = new Friend("Alphonse"); final Friend gaston = new Friend("Gaston"); Thread t1 = new Thread(() -> { alphonse.bow(gaston); }); t1.setName("Alphonse bows to Gaston"); t1.start(); Thread t2 = new Thread(() -> { gaston.bow(alphonse); }); t2.setName("Gaston bows to Alphonse"); t2.start(); } } In the above code, it's extremely likely that both threads will block when they attempt to invoke bowBack. Neither block will ever end, because each thread is waiting for the other to exit bow. Note: As you can see, it really helps to use "Thread.setName", everywhere, wherever you're creating a Thread in your code, since the tools in the IDE become a lot more meaningful when you've defined the name of the thread because otherwise the Profiler will be forced to use thread names like "thread-5" and "thread-6", i.e., based on the order of the threads, which is kind of meaningless. (Normally, except in a simple demo scenario like the above, you're not starting the threads in the same class, so you have no idea at all what "thread-5" and "thread-6" mean because you don't know the order in which the threads were started.) Slightly more compact: Thread t1 = new Thread(() -> { alphonse.bow(gaston); },"Alphonse bows to Gaston"); t1.start(); Thread t2 = new Thread(() -> { gaston.bow(alphonse); },"Gaston bows to Alphonse"); t2.start();

    Read the article

  • CoolCommands for Visual Studio 2010

    - by ChrisD
    Gaston Milano has just informed me that he has a new version of CoolCommands for Visual Studio 2010.  In addition to all the existing commands, the new release, now called CoolX,  supports Context Explorer shell commands, support for multiple monitors and new features to help tame the Project Reference beast. Check out all the info including a download, available here –>http://visualstudiogallery.msdn.microsoft.com/en-us/53fe63d5-780d-409b-afc3-10d05906e0a6 I’m also hosting a version for download here. Thanks Gaston!

    Read the article

  • vim: how do I keep 10 lines visible when scrolling up to EOF with CRTL-F ???

    - by Gaston
    Hello! I am used to use vi, not vim. What I find annoying in vim is that when you are scrolling with CTRL-F and reach EOF, vim scrolls down to the very last line and put this line on the top of your screen, and you can't see the lines above. You must scroll up a little bit so you can see the context. All this happens with CTRL-F only, not with j or the down cursor key. In vi, you scroll down (with CTRL-F), but when you reach EOF it still show you, say, 15 lines and then the tippical ~. I am using Putty for remote access. How can I config vim to behave like vi in this case? Hope you understand the question. Thank you! Gaston.

    Read the article

  • Interesting/Innovative Open Source tools for indie games

    - by Gastón
    Just out of curiosity, I want to know opensource tools or projects that can add some interesting features to indie games, preferably those that could only be found on big-budget games. EDIT: As suggested by The Communist Duck and Joe Wreschnig, I'm putting the examples as answers. EDIT 2: Please do not post tools like PyGame, Inkscape, Gimp, Audacity, Slick2D, Phys2D, Blender (except for interesting plugins) and the like. I know they are great tools/libraries and some would argue essential to develop good games, but I'm looking for more rare projects. Could be something really specific or niche, like generating realistic trees and plants, or realistic AI for animals.

    Read the article

  • Interesting/Innovative Open Source tools for indie games [closed]

    - by Gastón
    Just out of curiosity, I want to know opensource tools or projects that can add some interesting features to indie games, preferably those that could only be found on big-budget games. EDIT: As suggested by The Communist Duck and Joe Wreschnig, I'm putting the examples as answers. EDIT 2: Please do not post tools like PyGame, Inkscape, Gimp, Audacity, Slick2D, Phys2D, Blender (except for interesting plugins) and the like. I know they are great tools/libraries and some would argue essential to develop good games, but I'm looking for more rare projects. Could be something really specific or niche, like generating realistic trees and plants, or realistic AI for animals.

    Read the article

  • Error when trying to activate FGLRX graphic propietary control ATI/AMD

    - by Gastón
    I'm new to Ubuntu. I still don't understand a lot of features. As far as I know, I can install the ATI drivers through the Additional drivers When I press 'Activate' in the FGLRX graphic propietary control ATI/AMD it comes up with an error. Lo sentimos, la instalación de este controlador falló. Revise el archivo de registro para ver más detalles: /var/log/jockey.log English translation: Sorry, this driver installation failed. Check the log file for more details: /var/log/jockey.log The problem is that i'm trying to make Compiz work. And since i have no video card drivers i cant modify any of the interface features (Like 3d cube and that stuff).

    Read the article

  • NGINX Remove index.php /index.php/something/more/ to /something/more

    - by Gaston
    I'm trying to clean urls in NGINX using framework DooPHP. This = - http://example.com/index.php/something/more/ To This = - http://example.com/something/more/ I want to remove (clean url) the "index.php" from the url if someone try to enter in the first form. Like a permanent redirect. How to do this config on NGINX? Thanks. [Update: Actual nginx config] server { listen 80; server_name vip.example.com; rewrite ^/(.*) https://vip.example.com/$1 permanent; } server { listen 443; server_name vip.example.com; error_page 404 /vip.example.com/404.html; error_page 403 /vip.example.com/403.html; error_page 401 /vip.example.com/401.html; location /vip.example.com { root /sites/errors; } ssl on; ssl_certificate /etc/nginx/config/server.csr; ssl_certificate_key /etc/nginx/config/server.sky; if (!-e $request_filename){ rewrite /.* /index.php; } location / { auth_basic "example Team Access"; auth_basic_user_file config/htpasswd; root /sites/vip.example.com; index index.php; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /sites/vip.example.com$fastcgi_script_name; include fastcgi_params; fastcgi_param PATH_INFO $fastcgi_script_name; } }

    Read the article

  • Filters in Doctrine

    - by Gaston
    nHibernate has a great feature called filters, so i can create criterias globally for my applications. I'm starting a project in PHP and i need to use an ORM, i'd like to know if Doctrine has a similar feature to manage query conditions. thanks

    Read the article

  • Jquery Tabs 1.8 ajax content > #history problem

    - by Gaston
    Hey! I'm trying to load jQuery content in the same container (div#realContent) and it seems that when I use the a 'title' to enter the div ID (all links the same title) the history stop working. You can enter here http://home.d23.com.uy/fermata/ user: fermata pass: fermata , and see what I mean. Thanks

    Read the article

  • Expanding/contracting columns with browser (ASP.Net)

    - by Gastón
    Hi, I'm trying to accomplish something like this (http://picturegroup.com) , where you have images displayed in several columns, but as you resize your browser, columns will (dis)appear so to fit what you can see on the screen. Any ideas on how can I do this (links, etc)? Thanks! PS: Bear in mind that I'm quite a ASP.Net noob

    Read the article

  • A Trip to the Moon (Le Voyage dans la Lune) [Super Retro Classic Sci-Fi Video]

    - by Asian Angel
    If you are into retro sci-fi movies, then you will definitely want to have a look at this French classic from 1902. This silent movie is only 10.5 minutes long, but is well worth watching and makes for a fun romp through the early days of sci-fi. From YouTube: A Trip to the Moon (French: Le Voyage dans la lune) is a 1902 French black and white silent science fiction film. It is loosely based on two popular novels of the time: From the Earth to the Moon by Jules Verne and The First Men in the Moon by H. G. Wells. The film was written and directed by Georges Melies, assisted by his brother Gaston. The film runs 14 minutes if projected at 16 frames per second, which was the standard frame rate at the time the film was produced. It was extremely popular at the time of its release and is the best-known of the hundreds of fantasy films made by Melies. A Trip to the Moon is the first science fiction film, and utilizes innovative animation and special effects, including the iconic shot of the rocketship landing in the Moon’s eye. A Trip to the Moon / Le Voyage dans la lune – 1902 [via 20 best designs in sci-fi movies - Page 3 (Creative Bloq)] How to Use an Xbox 360 Controller On Your Windows PC Download the Official How-To Geek Trivia App for Windows 8 How to Banish Duplicate Photos with VisiPic

    Read the article

1