Search Results

Search found 231 results on 10 pages for 'gabriel guimaraes'.

Page 9/10 | < Previous Page | 5 6 7 8 9 10  | Next Page >

  • Threaded Django task doesn't automatically handle transactions or db connections?

    - by Gabriel Hurley
    I've got Django set up to run some recurring tasks in their own threads, and I noticed that they were always leaving behind unfinished database connection processes (pgsql "Idle In Transaction"). I looked through the Postgres logs and found that the transactions weren't being completed (no ROLLBACK). I tried using the various transaction decorators on my functions, no luck. I switched to manual transaction management and did the rollback manually, that worked, but still left the processes as "Idle". So then I called connection.close(), and all is well. But I'm left wondering, why doesn't Django's typical transaction and connection management work for these threaded tasks that are being spawned from the main Django thread?

    Read the article

  • CSS: How to display hidden class

    - by Gabriel Meono
    I'm trying to display with css the navigation buttons that are located inside my jquery rotating banner. Which are: <a class="ls-nav-prev" href="#"></a> <a class="ls-nav-next" href="#"></a> For some reason I can't show them, I've tried changing their position, setting a z-index, adding a background-image and color. Here's the website: http://npmaudiovisual.com/esde/ This is what I have: This is what I should have (buttons on corners)

    Read the article

  • I have to make a simple app that connects devices in a network, but I have no idea of how to this

    - by Gabriel Casado
    I want to write an App for android that has only one ListView. The App will constantly search for anything (mobile devices, desktops, etc.) that is connected in the wifi network. The problem is, I have no idea how to do this. What do I need to study? I comprehend I'd need to use a Thread or a Runnable to constantly search for those devices. Also I know very little about TCP, UDP or any internet protocols. So, can someone give me a basis of what I need to learn to develop this App?

    Read the article

  • prettyphoto and nivoslider

    - by Gabriel Ciprian Magda
    I have added the nivoslider and prettyphoto lightbox to a page. What I am trying to do: when you click one of the nivoslider images, prettyphoto should load a video. Everything works ok, except that whenever the nivo slider is sliding the images, the video in prettyphoto lightbox is reloading. How can I prevent the video from reloading once the sliding images are changing? I am not a javascript nija but I am guessing it can be done with changepicturecallback: function(){} from prettyphoto...

    Read the article

  • [WordPress] Need help with remove_action()

    - by gabriel
    I'm trying to remove the unsightly embedded <STYLE> tag the built-in Recent Comments widget puts in my <HEAD>, but I can't seem to get the syntax right. It originally calls add_action( 'wp_head', array(&$this, 'recent_comments_style') ); to add it (in wp-includes/default-widgets.php, line 609), and I'm trying to undo it. I think it should be something like this: remove_action('wp_head', 'WP_Widget_Recent_Comments::recent_comments_style'); but with all the variations I've tried I still can't get it right. Does anyone know how to achieve this? Possibly Helpful: Function Reference: remove_action

    Read the article

  • how do i use htaccess to make http requests work properly

    - by Gabriel
    I currently have css and javascript file calls (amongst other things) like the following: href="/css/default.css" src="/js/ui_control.js" putting the preceding / in to make the files relative to the root. This works great when my page is in the root of the domain. However, I'm currently in the middle of transferring my site to a new hosting provider and as such have a temporary URL which is: HOST-IP/~username As such, all file calls are trying to be called from HOST-IP/css/default.css etc instead of within the ~username sub-folder. Of course I can wait until the domain name servers propagate but that's beside the point. How would I go about writing a rule in the .htaccess file that would redirect all file calls that start with a /, from going to HOST-IP/FILE-CALL, and instead to go to HOST-IP/~USERNAME/FILE-CALL. ? Any ideas?

    Read the article

  • Java BufferedReader behavior in CSV vs TXT file

    - by Gabriel
    If i try to read a CSV file called csv_file.csv. The problem is that when i read lines with BufferedReader.readLine() it skips the first line with months. But when i rename the file to csv_file.txt it reads it allright and it's not skipping the first line. Is there an undocumented "feature" of BufferedReader that i'm not aware? Example of file: Months, SEP2010, OCT2010, NOV2010 col1, col2, col3, col4, col5 aaa,,sdf,"12,456",bla bla bla, xsaffadfafda and so on, and so on, "10,00", xxx, xxx The code: FileInputStream stream = new FileInputStream(UploadSupport.TEMPORARY_FILES_PATH+fileName); BufferedReader br = new BufferedReader(new InputStreamReader(stream, "UTF-8")); String line = br.readLine(); String months[] = line.split(","); while ((line=br.readLine())!=null) { /*parse other lines*/ }

    Read the article

  • Is it possible to create a Mac OS specific CSS to fix font difference ?

    - by Gabriel
    I'm working on a project with a designer and he insisted on using some specific font for titles and various elements in the page. So we're using a font kit to embed with @font-face. It's working perfectly on PC (Firefox, IE 7 and 8, Chrome, Safari) but on Mac OS (Safari and Firefox) the fonts are not vertically aligned the same way. After looking on the Web, I didn't find any solution for this except "there always been differences between browsers and platforms, live with it". I know that fonts are never rendered exactly the same across platforms, but this time it's not something like the font looks more bold or something like that. The font looks as if it's baseline is completely different between Windows and Mac OS X. On Mac OS, the font, at a size of 16px is 3px higher than on PC. So I'm looking for a backup solution : is there a way to create a CSS specifically for Mac OS users? I do not want to target only Safari because Safari PC is ok, and Firefox Mac is not ok. Or if you have a solution to fix the baseline difference that does not require a specific CSS file, I'd be happy to hear it. Thanks!

    Read the article

  • Merging .NET assemblies on Windows Store / Phone 8 / Portable Class Library

    - by Gabriel S.
    Is there a way to embed multiple dependent assemblies into a single one for projects written on the following platform types: Windows Store Apps, Windows Phone 8, Portable Class Library? I know that for regular .Net projects there is ILMerge, but on the aforementioned project types it doesn't work. Embedding assemblies as resources and then manually resolving the references using AppDomain.CurrentDomain.AssemblyResolve is not possible either, since AppDomain is not available in these types of project.

    Read the article

  • [MySQL] Load data from .csv applying regex before insert into table

    - by Gabriel L. Oliveira
    I know that there is a code to import .csv data into a mysql table, and I'm using this one: LOAD DATA INFILE "file.csv" INTO TABLE foo FIELDS TERMINATED BY "," LINES TERMINATED BY "\\r\\n"; The data inside this .csv are lines like this example: 08/e0/Breast_Cancer_Res_2001_Nov_2_3(1)_55-60.tar.gz Breast Cancer Res. 2001 Nov 2; 3(1):55-60 PMC13900 b0/ac/Breast_Cancer_Res_2001_Nov_9_3(1)_61-65.tar.gz Breast Cancer Res. 2001 Nov 9; 3(1):61-65 PMC13901 I just want the first part (the .tar.gz path), always on the pattern (letter or number)(letter or number) / (letter or number)(letter or number)/... and the part starting by 'PMC', always on the pattern PMC(number...) where 'number' means a number between 0 to 9 and a letter means a letter between a to z (both upper and lower case) So, applying the LOAD DATA, and the regex, and inserting the result entries on my sql table, the result table should be: 1 08/e0/Breast_Cancer_Res_2001_Nov_2_3(1)_55-60.tar.gz PMC13900 2 b0/ac/Breast_Cancer_Res_2001_Nov_9_3(1)_61-65.tar.gz PMC13901 What should be the SQL command to do all this?

    Read the article

  • Get Element with jQuery .on()

    - by Gabriel Ryan Nahmias
    If I'm using jQuery's .on() function like this (there's more to it but this is the main problem area extracted): $(document).on("click", $("#contcont a, #leftnav li a, #leftnav li ul a, #mainarea-home a").not(".secitem-mid a") , function clicker(event, sData) { var $this = $(this); sHREF = $this.attr("href"); alert(sHREF); } ); I'm getting undefined so what would be the best way to actually get the element that's being clicked? I need .on() so that it always occurs, obviously, instead of having to attach it to all the elements every time new data is loaded (this is through Yahoo! stores so it's a necessity to do it this way). Thanks.

    Read the article

  • How to bind Listbox to two properties?

    - by Gabriel
    I have in Silverlight a Grid with DataContext set to class ViewModel. ViewModel contains list of items (each of them containing int ID and string Text) and an integer "ID", which identifies actually active item (not selected item). I would like to construct xaml with ListBox where activated item has another color. How can I do it?

    Read the article

  • Template neglects const (why?)

    - by Gabriel
    Does somebody know, why this compiles?? template< typename TBufferTypeFront, typename TBufferTypeBack = TBufferTypeFront> class FrontBackBuffer{ public: FrontBackBuffer( const TBufferTypeFront front, const TBufferTypeBack back): ////const reference assigned to reference??? m_Front(front), m_Back(back) { }; ~FrontBackBuffer() {}; TBufferTypeFront m_Front; ///< The front buffer TBufferTypeBack m_Back; ///< The back buffer }; int main(){ int b; int a; FrontBackBuffer<int&,int&> buffer(a,b); // buffer.m_Back = 33; buffer.m_Front = 55; } I compile with GCC 4.4. Why does it even let me compile this? Shouldn't there be an error that I cannot assign a const reference to a non-const reference?

    Read the article

  • Help with simple javascript loop

    - by Gabriel
    Hello, I have a simple javascript that I'd like to loop for multiple elements. Here's my code: <script type='text/javascript'> for(i = 1; i < 100; i++) { $('#link'+i).click(function() { $('#container').removeClass(); $('#container').addClass('templateid'+i); }); } </script> What I'd like to achieve is the same addClass function for multiple id's (e.g. link2, link3, link4), with the corresponding class (e.g. template2, template3, template4). Any help would be hugely appreciated! For reference, an individual call like this one, does work, so I don't see why the loop above doesn't function the same: <script type='text/javascript'> $('#link2').click(function() { $('#container').removeClass(); $('#container').addClass('templateid2'); }); </script>

    Read the article

  • NGN/NLUUG conferentie vj2012: Operating Systems

    - by nospam(at)example.com (Joerg Moellenkamp)
    On April 11th, 2012 the Spring 2012 conference with the topic overarching topic "Operating Systems" takes place in Nieuwegein near Utrecht. Besides talks about Linux, Windows and AIX, there will be a track about Solaris. I will be the first speaker in the Solaris track and giving an overview about Solaris 11 and how features interact. Later on renowned experts like Detlef Drewanz ("Lifecycle Management with Oracle Solaris 11"), Andrew Gabriel ("Solaris 11 Networking - Crossbow Project"), Darren Moffat ("ZFS: Data integrity and Security") and Casper Dik ("Solaris 11 Zones and Immutable Zones") will take over. Finally Patrick Ale of UPC Broadband talks about his experiences with Solaris 11. When you want more information about this conference or register for it, you will find the webpage of the event at the NLUUG site.

    Read the article

  • How to compile x264 for iPhone

    - by SUKIYAKI
    Hi, I'm trying to compile x264 for use in an iPhone application. I can compile with using http://github.com/gabriel/ffmpeg-iphone-build File: build-x264-armv6/7. but only decoding. I want to use encoding too. when I use build-x264-armv6/7,The console show me "mp4 output: no". Does anyone know how to compile x264 which is able to encoding H.264?

    Read the article

  • using java Calendar

    - by owca
    I have a simple task. There are two classes : Ticket and Date. Ticket contains event, event place and event date which is a Date object. I also need to provide a move() method for Date object, so I used Calendar and Calendar's add(). Everything looks fine apart of the output. I constantly get 5,2,1 as the date's day,month,year. Lines with asterix return proper date. The code : Ticket class : public class Ticket { private String what; private String where; private Date when; public Ticket(String s1, String s2, Data d){ this.what = s1; this.where = s2; this.when = d; } *public Date giveDate(){ System.out.println("when in giveDate() "+this.when); return this.when; } public String toString(){ return "what: "+this.what+"\n"+"where: "+this.where+"\n"+"when: "+this.when; } } Date class: import java.util.Calendar; import java.util.GregorianCalendar; public class Date { public int day; public int month; public int year; public Date(int x, int y, int z){ *System.out.println("x: "+x); *System.out.println("y: "+y); *System.out.println("z: "+z); this.day = x; this.month = y; this.year = z; *System.out.println("this.day: "+this.day); *System.out.println("this.month: "+this.month); *System.out.println("this.year: "+this.year); } public Date move(int p){ *System.out.println("before_change: "+this.day+","+this.month+","+this.year); Calendar gc = new GregorianCalendar(this.year, this.month, this.day); System.out.println("before_adding: "+gc.DAY_OF_MONTH+","+gc.MONTH+","+gc.YEAR); gc.add(Calendar.DAY_OF_YEAR, p); System.out.println("after_adding: "+gc.DAY_OF_MONTH+","+gc.MONTH+","+gc.YEAR); this.year = gc.YEAR; this.day = gc.DAY_OF_MONTH; this.month = gc.MONTH; return this; } @Override public String toString(){ return this.day+","+this.month+","+this.year; } } Main for testing : public class Main { public static void main(String[] args) { Date date1=new Date(30,4,2002); Ticket event1=new Ticket("Peter Gabriel's gig", "London",date1 ); Ticket event2=new Ticket("Diana Kroll's concert", "Glasgow",date1 ); Date date2=event2.giveDate(); date2.move(30); Ticket event3=new Ticket("X's B-day", "some place",date2 ); System.out.println(date1); System.out.println(event1); System.out.println(event2); System.out.println(event3); } } And here's my output. I just can't get it where 5,2,1 come from :/ x: 30 y: 4 z: 2002 this.day: 30 this.month: 4 this.year: 2002 when in giveDate() 6,12,2004 before_change: 6,12,2004 before_adding: 5,2,1 after_adding: 5,2,1 5,2,1 what: Peter Gabriel's gig where: London when: 5,2,1 (...)

    Read the article

  • Devoxx UK JCP & Adopt-a-JSR activities

    - by Heather VanCura
    Devoxx UK starts this week!  The JCP Program is organizing many activities throughout the conference, including some tables in the Hackergarten area on 12-13 June.  Topics include Java EE, Data Grids, Java SE 8 (Lambdas and Date & Time API), Money & Currency API and OpenJDK.  We will have two book signings by Richard Warburton and Peter Pilgrim during the Hackergarten - free signed copy of their books at these times - first come, first served (limited quantities available).  Thursday night is the party and the Birds of a Feather (BoF) sessions - come with your favorite questions and topics related to the JCP, Adopt-a-JSR and Adopt OpenJDK Programs!  See below for the schedule of activities; I will fill in details for each session tomorrow.    Thursday 12 June 10:20 - 12:50 Java EE -- Arun Gupta 13:30-17:00 Lambdas/Date & Time API --Richard Warburton & Raoul-Gabriel Urma (also a book signing with Richard Warburon during the afternoon break) 14:30-17:30 Data Grids - Peter Lawrey 14:30-18:00 Money & Currency -- Anatole Tresch 18:45 Adopt OpenJDK BoF session (Java EE BoF runs concurrently) 19:45 JCP & Adopt-a-JSR BoF session Friday 13 June 10:20-13:00 OpenJDK -- Mani Sarkar  10:20- 14:30 Money & Currency -- Anatole Tresch 10:20 - 13:00 Java EE -- Peter Pilgrim 13:00-13:30 Peter Pilgrim Java EE 7 Book signing sponsored by JCP @ lunch time 13:30 - 15:30 JCP.Next/JSR 364 -- Heather VanCura

    Read the article

  • eSTEP TechCast - December 2011 - Solaris 11 - The First Cloud OS

    - by uwes
    Dear partner, we are pleased to announce our next eSTEP TechCast on Thursday 1st December and would be happy if you could join. Please see below the details for the next TechCast. Date and time: Thursday, 01. December 2011, 11:00 - 12:00 GMT (12:00 - 13:00 CET) Abstract: Solaris 11 contains many new features, particularly around improved virtualisation and network performance. Additionally, new software packaging for fool-proof upgrades, higher availability and reduced maintenance windows replace the former SRV4 packaging and upgrade/patching methods. Target audience: Tech Presales Speaker: Andrew Gabriel Call Info: Call-in-toll-free number: 08006948154 (United Kingdom) Call-in-toll-free number: +44-2081181001 (United Kingdom) Show global numbers Conference Code: 803 594 3 Security Passcode: 9876 Webex Info (Oracle Web Conference) Meeting Number: 597 686 322Meeting Password: tech2011 Playback / Recording / Archive: The webcasts will be recorded and will be available shortly after the event in the eSTEP portal under the Events tab, where you could find also material from already delivered eSTEP TechCasts. Use your email-adress and PIN: eSTEP_2011 to get access. Feel free to have a look. We are happy to get your comments and feedback. Thanks and best regards, Partner HW Enablement EMEA

    Read the article

  • Running multiple box2D world objects on a server

    - by CharbelAbdo
    I'm creating a multiplayer game using LibGdx (with Box2d) and Kryonet. Since this is the first time I work on multiplayer games, I read a bit about server - client implementations, and it turns out that the server should handle important tasks like collision detection, hits, characters dying etc... Based on some articles (like the excellent Gabriel Gambetta Fast paced multiplayer series), I also know that the client should work in parallel to avoid the lag while the server responds to commands. Physics wise, each game will have 2 players, and any projectiles fired. What I'm thinking of doing is the following: Create a physics world on the client When the game is signaled to start, I create the same physics world on the server (without any rendering obviously). Whenever the player issues a command (move or fire), I send the command to the server and immediately start processing it on the client. When the server receives the command, it applies it on the server's world (set velocity etc...) Each 100ms, the server sends the new state to the client which corrects what was calculated locally. Any critical action (hit, death, level up) is calculated only on the server and sent to the client. Essentially, I would have a Box2d World object running on the server for each game in progress, in sync with the worlds running on the clients. The alternative would be to do my own calculations on the server instead of relying on Box2D to do them for me, but I'm trying to avoid that. My question is: Is it wise to have, for example, 1000 instances of the World object running and executing steps on the server? Tomcat used around 750 MBytes of memory when trying it without any object added to the world. Anybody tried that before? If not, is there any alternative? Google did not help me, are there any guidelines to use when you want to have physics on both the client and the server? Thanks for any help.

    Read the article

  • Tech Article: Tired of Null Pointer Exceptions? Use Java SE 8's Optional!

    - by Tori Wieldt
    A wise man once said you are not a real Java programmer until you've dealt with a null pointer exception. The null reference is the source of many problems because it is often used to denote the absence of a value. Java SE 8 introduces a new class called java.util.Optional that can alleviate some of these problems. In the tech article "Tired of Null Pointer Exceptions? Use Java SE 8's Optional!" Java expert Raoul-Gabriel Urma shows you how to make your code more readable and protect it against null pointer exceptions. Urma explains "The purpose of Optional is not to replace every single null reference in your codebase but rather to help design better APIs in which—just by reading the signature of a method—users can tell whether to expect an optional value. In addition, Optional forces you to actively unwrap an Optional to deal with the absence of a value; as a result, you protect your code against unintended null pointer exceptions." Learn how to go from writing painful nested null checks to writing declarative code that is composable, readable, and better protected from null pointer exceptions. Read "Tired of Null Pointer Exceptions? Use Java SE 8's Optional!"

    Read the article

  • JSON in COCOA (with YAJL)

    - by mekanics
    at first, sry for my english... :) I'm using the YAJL Framework http://github.com/gabriel/yajl-objc My file look like this: [ [ 3753700, { "altitude" : 36950, "heading" : 129.918421384319, "latitude" : 47.554033252495699, "longitude" : 8.2125612837369903, "pointType" : "EXTRAPOLATED", "speed" : 455.04395392093699, "timestamp" : 1273252673301, "verticalRate" : 0.0 } ], [ 3753700, { "altitude" : 36950, "heading" : 129.918421384319, "latitude" : 47.552708437680799, "longitude" : 8.2149074662342798, "pointType" : "EXTRAPOLATED", "speed" : 455.04395392093699, "timestamp" : 1273252674555, "verticalRate" : 0.0 } ] ] I've tried it in x-variant, but I always get a 'NSInvalidArgumentException' from console: 2010-05-07 20:17:30.998 testApp[2365:207] *** -[NSConcreteData yajl_JSON]: unrecognized selector sent to instance 0x1353d0 2010-05-07 20:17:31.006 testApp[2365:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSConcreteData yajl_JSON]: unrecognized selector sent to instance 0x1353d0' How to read the data correctly? thx for help

    Read the article

  • The best Bar on the globe is ... in Seoul/Korea

    - by Mike Dietrich
    As you know already sometimes I write about things which really don't have to do anything with a database upgrade. So if you are looking for tips and tricks and articles about that topic please stop reading now Actually I'm not a lets-go-to-a-bar person. I enjoy good food and a fine dessert wine afterwards. But last week in Seoul/Korea Ryan, our local host, did ask us after a wonderful dinner at a Korean Barbecue place if we'd like to visit a bar. I was really tired as I flew into Seoul overnight from Sunday to Monday arriving Monday early morning, getting shower, breakfast - and then a full day of very good and productive customer meetings. But one thing Ryan mentioned catched my immediate attention: The owner of the bar collects records and has a huge tube amp stereo system - and you can ask him to play your favorite songs. The bar is called "Peter, Paul and Mary" - honestly not my favorite style of music. And I even coulnd't find a webpage or an address - only that little piece of information on Facebook. But after stepping down the stairs to the cellar my eyes almost poped out of my head. This is the audio system: Enourmus huge corner horn loudspeakers from Western Electric. Pretty old I'd suppose but delivering an incredible present dynamics into the room. And plenty of tube equipment from Jadis, NSA Labs and Shindo Laboratories Western Electric 300B Limited amps from Tokyo. And the owner (I was so amazed I had simply forgotten to ask for his name) collects records since 40 years. And we had many wishes that night. Actually when we did enter Peter, Paul and Mary he played an old Helloween song. That must have been destiny. A German entering a bar in Korea and the owner is playing an old song by one of Germany's best heavy metal bands ever. And it went on with the Doors, Rainbow's Stargazer, Scorpions, later Deep Purple's Perfect Strangers, a bit of Santana, Carly Simon, Jimi Hendrix, David Bowie ...Ronnie James Dio's Holy Diver, Gary Moore, Peter Gabriel's San Jacinto ... and many many more great songs ... Of course we were the last guests leaving the place at 2am in the morning - and I've never ever had a better night in a bar before ... I could have stayed days listening to so many records  ... Thanks Ryan, that was a phantastic night! -Mike

    Read the article

  • What's the state of the art in image upscaling?

    - by monov
    I like to collect cool pics and use them as wallpapers or for other things. Often, artists publish only low-res versions, probably for fear of theft. Example: Gabriel Pulecio's BIRDS Now, if I want to use that as a wallpaper, I'd have to upscale it, and obviously that'd make it look blurry because of the bicubic interpolation. I realize there's no real way to get a high-res version from a low-res pic, because the information is not simply there. That said, I'm wondering if heuristics have been developed for upscaling with less apparent loss of quality. Those would probably be optimized for specific image types. For photorealistic pictures, for cartoons with large flat areas, for pixel art... One algorithm I'm aware of is Seam Carving. It works for some kinds of pics, especially ones with a plain, undetailed or uninteresting background, and a subject that strongly stands out. But it's far from being general-purpose. Applying it to the above pic produces this. It looks quite sharp, but the proportions are horribly distorted because the algorithm is not designed for this kind of pic. Another is Pixel art scaling algorithms. Those are completely unfit for anything other than actual pixel art that's pixelized to begin with. For example, I tried the scale2x windows binary on my pic, but its output was nearly indistinguishable from nearest-neighbour scaling because the algorithm didn't detect any isolated pixely fragments to work from. Something else I tried was: I enlarged the image in Photoshop with bicubic interpolation, then I applied unsharp mask. The result looks pretty bad. The red blotch is actually resized reasonably well, but the dove is far from it. What I'm looking for is some app that makes a best-effort attempt at upscaling any input image while minimizing blurriness. If you know of any, I'll be thankful. Note that the subjective prettiness and sharpness of the result is what matters... the result doesn't need to be completely faithful to the original small image.

    Read the article

< Previous Page | 5 6 7 8 9 10  | Next Page >