Search Results

Search found 245 results on 10 pages for 'gabriel ciprian magda'.

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

  • Python: Pass parameter one time, but use more times

    - by Gabriel L. Oliveira
    I'm trying to do this: commands = { 'py': 'python %s', 'md': 'markdown "%s" "%s.html"; gnome-open "%s.html"', } commands['md'] % 'file.md' But like you see, the commmands['md'] uses the parameter 3 times, but the commands['py'] just use once. How can I repeat the parameter without changing the last line (so, just passing the parameter one time?)

    Read the article

  • Why people do not like OOP? [closed]

    - by Gabriel Šcerbák
    I do not understand why people choose C++ over Smalltalk in past and why Java over Python or Ruby. What is it that ties people so much to the procedural programming and makes it so difficult to go "all the way" to object oriented programming? What makes OOP hard? Should not objects be an abstraction which is easier to grasp for people, i.e. a more natural one than procedures? Is education the problem (because people tend to learn procedural programming before object oriented)?

    Read the article

  • How can I Query only __key__ on a Google Appengine PolyModel child?

    - by Gabriel
    So the situation is: I want to optimize my code some for doing counting of records. So I have a parent Model class Base, a PolyModel class Entry, and a child class of Entry Article: How would I query Article.key so I can reduce the query load but only get the Article count. My first thought was to use: q = db.GqlQuery("SELECT __key__ from Article where base = :1", i_base) but it turns out GqlQuery doesn't like that because articles are actually stored in a table called Entry. Would it be possible to Query the class attribute? something like: q = db.GqlQuery("select __key__ from Entry where base = :1 and :2 in class", i_base, 'Article') neither of which work. Turns out the answer is even easier. But I am going to finish this question because I looked everywhere for this. q = db.GqlQuery("select __key__ from Entry where base = :1 and class = :2", i_base, 'Article')

    Read the article

  • Database Schema for Machine Tags?

    - by Gabriel
    Machine tags are more precise tags: http://www.flickr.com/groups/api/discuss/72157594497877875. They allow a user to basically tag anything as an object in the format object:property=value Any tips on a rdbms schema that implements this? Just wondering if anyone has already dabbled with this. I imagine the schema is quite similar to implementing rdf triples in a rdbms

    Read the article

  • Pass parameter one time, but use more times

    - by Gabriel L. Oliveira
    I'm trying to do this: commands = { 'py': 'python %s', 'md': 'markdown "%s" "%s.html"; gnome-open "%s.html"', } commands['md'] % 'file.md' But like you see, the commmands['md'] uses the parameter 3 times, but the commands['py'] just use once. How can I repeat the parameter without changing the last line (so, just passing the parameter one time?)

    Read the article

  • is XULRUNNER suitable as a replacement for other C++ desktop applications frameworks such as QT?

    - by Gabriel Cuvillier
    XulRunner/Gecko seems to be really interesting for developing gui-intensive applications (by using widely used technologies such as HTML / CSS / SVG / XUL / Javascript). But the underlaying C++ APIS (XPCOM, NECKO, ...) looks so old and complex. Moreover the general lack of documentation/developper tools is really frightening. On the other hand, QT have a quite nice platform, and is well documented and supported. The UI part is really "traditional" though. What are your experiences with XULRUNNER, specially compared to other C++ desktop applications frameworks such as QT/GTK/MFC...? What is missing? What is awesome? Side question: If I wanted to migrate an existing MFC app to a cross platform C++ desktop application framework, would it be wise to use XULRUNNER instead of QT or GTK?

    Read the article

  • How do I close a form when the ESC key was hit, but only if no Control handled it?

    - by Gabriel
    I have a Form that closes itself when the ESC key is pressed, thanks to KeyPreview, ProcessKeyEventArgs, ProcessCmdKey or whatever. But I have a Control on that form that does very relevant things when ESC is pressed (it hides itself) and the Form should not be closed when that happens. The control uses the KeyDown event and sets the SuppressKeyPress flag to true, but that happens after the aforementioned form key preview, thus having no effect. Is there some sort KeyPostview ? How do I not close the form when a Control has a relevant use of a key hit ? Edit: The control handling ESC is a textbox embedded in a hand-maid ListView. The textbox appears when the user clicks a cell, enabling edition. To validate the new text, ENTER would be nice (that already works, as giving the focus to anything else). To cancel edition, ESC seems most natural.

    Read the article

  • jQuery : how to manipulate indexes?

    - by Gabriel Theron
    Should not be such a hard question... I'm just having a hard time figuring out how to make operations on some jquery elements, particularly their indexes. Teh codez: $( "#docSlider" ).css("background-image", "url(../../bundles/mypath/images/maquette/img" + $( "#selectable li" ).index( this ) + (".jpg)")); I want to make the name of the picture I load depend on the index of a jQuery selectable. So I grab the index and try to add 1... but it can't work because "+" is also a concatenator. I've tried to parseInt as well, but it was always worth 0. How do I simply transform the index to an integer and then concatenate it with the rest of the string? Thank you in advance! Edit : I'm using a function that already exists, so I can hardly change the parameters (well, I guess I can't...)

    Read the article

  • 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

  • [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

  • 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

  • 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

  • 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

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