Search Results

Search found 202 results on 9 pages for 'pedro santos'.

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

  • Is there any "modern" text editor with command-line/minibuffer?

    - by Pedro Morte Rolo
    A command line in a text editor is a wonderful feature. It allows the user to explore the editor's functionality and learn it's shortcuts in a textual way. It's much faster than using the mouse, and it is much easier to memorise "shortcuts" this way. Emacs and VI provide this, though, emacs and vi are not "modern". By "modern", I mean one that is original built to cope with the modern de-facto standards of selecting, copying, pasting, cutting, undoing, redoing and auto-completing. Cream/vi or Emacs/CUA are not valid options, since there are loads of things built over them that conflict with the mentioned stuff. It would be nice if there was an editor that would cope with the modern de-facto standards out-off-the-box, but still provide a command-line/minibuffer to perform/explore the commands and learn its shortcuts. Is there such a thing? I do not intend to use the "modern" term as derrogatory. I love both Emacs and VI, but I hate their keyboard-shortcut historical baggage. When I reffer to de-facto standards, I am not talking about Windows vs Whatever. Kate, gedit, Eclipse, Intelij or Textmate also follow the norm I am talking about and are not Windows editors. Please do not advertise Vim and Emacs, that's not answering the question. I am asking for alternatives. Why don't I like emacs and vi: Emacs: Despite CUA mode, emacs has loads of modes that conflict with this (e.g. slime, ruby-mode, etc...) It would be nice to have something that would work out-off-the-box. VI: I do not like that it is Visual/Insert-based. I do not know how to browse the text-editor's commands. I do not like that it is so much tought for the terminal. I believe that it has the same problem that I mentioned for emacs. This question is starting to look like requirement analysis.. As de-facto standards I mean: Ctrol-XCV for cut-copy-paste Ctrol-A for select-all Contrl-Z for Undo Ctrol-Y for Redo Control-F for Searching Contrl-Space for auto-complete Shift-arrow for selection Control-arrow for word-navigation Alt-Arrow for moving

    Read the article

  • Copy constructor using private attributes

    - by Pedro Magueija
    Hello all, My first question here so be gentle. I would like arguments for the following code: public class Example { private String name; private int age; ... // copy constructor here public Example(Example e) { this.name = e.name; // accessing a private attribute of an instance this.age = e.age; } ... } I believe this breaks the modularity of the instance passed to the copy construct. This is what I believe to be correct: public class Example { private String name; private int age; ... // copy constructor here public Example(Example e) { this.setName(e.getName()); this.setAge(e.getAge()); } ... } A friend has exposed a valid point of view, saying that in the copy construct we should create the object as fast as possible. And adding getter/setter methods would result in unnecessary overhead. I stand on a crossroad. Can you shed some light?

    Read the article

  • Execuitng script in threads

    - by Pedro Magalhaes
    Hi. I wanna make an app that executes remote scripts. I am going to design it like a Windows Service that listen on tcp/ip port. Every new request I will execute a python scripts. So I can handle any number of tcp/ip request at same time, so I will need to execute python script in separate threads. How can I do that? Is that simple? The script will share some objects, like Log files(text files) and other modules. In the log file example every script will write in the same file. So the app (windows service) will be responsible for do that. I need to make this objects thread safe, right?

    Read the article

  • Create NinePatch at Runtime

    - by Pedro Lopes
    Hello everybody! I have a business need to create the NinePatchDrawable objects at runtime, this is, an exterior .png image is received from a server and it has to be applied in a button's background (for example) as a nine patch. I have tried to create the NinePatchDrawable object, but the constructor asks me for a "byte[] chuck" that describes the patch. The thing is, I have no idea on how to build this chunck from a bitmap that does not have the 9patch information in it. Any ideas on this topic? Am I seeing the problem from a wrong perpective? Thanks!

    Read the article

  • NHibernate + ASP.NET + Open Session in View + L2Cache

    - by Pedro
    I am using CodeProject's well known Open Session in View to handle NHibernate Sessions. Does it works well with Level 2 Cache? Anyone has succeeded doing it? Should I use NH.Burrow instead? Any advice on l2 cache in asp.net best practices is appreciated. Edit: link to CodeProject's article: http://www.codeproject.com/KB/architecture/NHibernateBestPractices.aspx

    Read the article

  • net c# lock statement in data access layer

    - by Pedro Rivera
    I saw a code where they have the data access layer like this: public class CustomerDA{ private static readonly object _sync = new object(); private static readonly CustomerDA _mutex = new CustomerDA(); private CustomerDA(){ } public CustomerDA GetInstance(){ lock(_sync){ return _mutex; } } public DataSet GetCustomers(){ //database SELECT //return a DataSet } public int UpdateCustomer(some parameters){ //update some user } } public class CustomerBO{ public DataSet GetCustomers(){ //some bussiness logic return CustomerDA.GetInstance().GetCustomers(); } } I was using it, but start thinking... "and what if had to build a facebook like application where there are hundreds of thousands of concurrent users? would I be blocking each user from doing his things until the previous user ends his database stuff? and for the Update method, is it useful to LOCK THREADS in the app when database engines already manage concurrency at database server level?" Then I started to think about moving the lock to the GetCustomers and UpdateCustomer methods, but think again: "is it useful at all?"

    Read the article

  • Is there any modern command-line based text editor?

    - by Pedro Morte Rolo
    A command line in a text editor is a wonderful feature. It allows the user to explore the editor's functionality and learn it's shortcuts in a textual way. It's much faster than using the mouse, and it is much easier to memorise "shortcuts" this way. Emacs and VI provide this, though, emacs and vi are not "modern". By "modern", I mean one that is original built to cope with the modern de-facto standards of selecting, copying, pasting, cutting, undoing, redoing and auto-completing. Cream/vi or EmacsCUE are not valid options, since there are loads of things built over them that conflict with the mentioned stuff. Is there any alternative?

    Read the article

  • Symfony2 Entity to array

    - by Adriano Pedro
    I'm trying to migrate my flat php project to Symfony2, but its coming to be very hard. For instance, I have a table of Products specification that have several specifications and are distinguishables by its "cat" attribute in that Extraspecs DB table. Therefore I've created a Entity for that table and want to make an array of just the specifications with "cat" = 0... I supose the code is this one.. right? $typeavailable = $this->getDoctrine() ->getRepository('LabsCatalogBundle:ProductExtraspecsSpecs') ->findBy(array('cat' => '0')); Now how can i put this in an array to work with a form like this?: form = $this ->createFormBuilder($product) ->add('specs', 'choice', array('choices' => $typeavailableArray), 'multiple' => true) Thank you in advance :) # Thank you all.. But now I've came across with another problem.. In fact i'm building a form from an existing object: $form = $this ->createFormBuilder($product) ->add('name', 'text') ->add('genspec', 'choice', array('choices' => array('0' => 'None', '1' => 'General', '2' => 'Specific'))) ->add('isReg', 'choice', array('choices' => array('0' => 'Material', '1' => 'Reagent', '2' => 'Antibody', '3' => 'Growth Factors', '4' => 'Rodents', '5' => 'Lagomorphs'))) So.. in that case my current value is named "extraspecs", so i've added this like: ->add('extraspecs', 'entity', array( 'label' => 'desc', 'empty_value' => ' --- ', 'class' => 'LabsCatalogBundle:ProductExtraspecsSpecs', 'property' => 'specsid', 'query_builder' => function(EntityRepository $er) { return $er ->createQueryBuilder('e'); But "extraspecs" come from a relationship of oneToMany where every product has several extraspecs... Here is the ORM: Labs\CatalogBundle\Entity\Product: type: entity table: orders__regmat id: id: type: integer generator: { strategy: AUTO } fields: name: type: string length: 100 catnumber: type: string scale: 100 brand: type: integer scale: 10 company: type: integer scale: 10 size: type: decimal scale: 10 units: type: integer scale: 10 price: type: decimal scale: 10 reqcert: type: integer scale: 1 isReg: type: integer scale: 1 genspec: type: integer scale: 1 oneToMany: extraspecs: targetEntity: ProductExtraspecs mappedBy: product Labs\CatalogBundle\Entity\ProductExtraspecs: type: entity table: orders__regmat__extraspecs fields: extraspecid: id: true type: integer unsigned: false nullable: false generator: strategy: IDENTITY regmatid: type: integer scale: 11 spec: type: integer scale: 11 attrib: type: string length: 20 value: type: string length: 200 lifecycleCallbacks: { } manyToOne: product: targetEntity: Product inversedBy: extraspecs joinColumn: name: regmatid referencedColumnName: id HOw should I do this? Thank you!!!

    Read the article

  • how to know what files or folder are changed before do commit

    - by Pedro
    My problem is how to know what files or folder are changed before do commit. I can add all the new files in my working copy before do commit, and the repository changes, but if for example i delete one file of the working copy i dont know the way to add this change before do commit. When you use the tortoise for example before do commit the program shows all the changes of the working copy and you can choose what changes commit and what changes dont. There is some way to do this usin sharp svn?? thanks for your answer!!!

    Read the article

  • Compression Array of Bytes

    - by Pedro Magalhaes
    Hi, My problem is: I want to store a array of bytes in compressed file, and then I want to read it with a good performance. So I create a array of bytes then pass to a ZLIB algorithm then store it in the file. For my surprise the algorithm doesn't work well., probably because the array is a random sample. Using this approach, it will will be ber easy to read. Just copy the stream to memory, decompress them and copy it to a array of bytes. But i need to compress the file. Do I have to use a algorithm, like RLE, for compresse the byte array? I think that I can store the byte array like a string and then compress it. But i think I am going to have a poor performance on reading data. Sorry for my poor english. Thanks

    Read the article

  • Jquery Close/Open Multiple Toggles

    - by Pedro
    Hi, I have the toggle in my menu Working successfully for the two links that I have within it. Because the top link once toggled covers the other link, there is no problem. But since the link beneath it leaves the top link exposed, a user could click that and now have two toggled items open and pretty much stacked on top of each other. Is there a way for me to check if the other toggled item is open and if so, close it? Thanks! <div class="parents-toggle"> <a href="#" id="customize-toggle">Customize</a><br/> <div class="menu-toggle hidden" id="customize-menu"> <div class="menu-toggle-one"> <h3>Background</h3> <ul> <li><a href="#">Dark Wood</a></li> <li><a href="#">Wallpaper</a></li> <li><a href="#">Bricks</a></li> <li><a href="#">Planks</a></li> <li><a href="#">Default</a></li> </ul> </div> <div class="menu-toggle-two"> <h3>Layout</h3> <ul> <li><a href="#">Grid</a></li> <li><a href="#">List</a></li> <li><a href="#">Full</a></li> </ul> </div> </div> </div> <a href="/submit/">Submit video</a><br/> <div class="parents-toggle"> <a href="#" id="channels-toggle">Channels</a> <div class="menu-toggle hidden" id="channels-menu"> <div class="menu-toggle-one"> <ul> <li><a href="#">Automotive</a></li> <li><a href="#">Comedy</a></li> <li><a href="#">Movies</a></li> <li><a href="#">Weather</a></li> </ul> </div> <div class="menu-toggle-two"> <ul> <li><a href="#">Business</a></li> <li><a href="#">Commercials</a></li> <li><a href="#">Music</a></li> <li><a href="#">Technology</a></li> </ul> </div> </div> </div> </div> <script> $("#customize-toggle").click(function () { $("#customize-menu").toggle(); }); $("#channels-toggle").click(function () { $("#channels-menu").toggle(); }); </script>

    Read the article

  • [Wordpress MU] Changing the uploads directory

    - by Pedro Reis
    Hi, I've looked everywhere and while there is solutions to change the uploads directory for all the blogs by changing this line in the wp-settings.php: define( "BLOGUPLOADDIR", WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" ); I can't find a way of changing the directory for each blog individually, something like: define( "BLOGUPLOADDIR", WP_CONTENT_DIR . "/blogs.dir/{$blog_name}/files/" ); But I have no idea how could I get the name of the blog from within the wp-settings.php as you can't use get_bloginfo('name'); outside of the template. Anybody with a solution for this?

    Read the article

  • iframe height not taken into account by IE8

    - by Pedro
    Hi guys, I'm building a dummy widget for a iGoogle/Netvibes like portal. This is a "Google Maps" widget, as it only renders a map centered on a specific location. The widget looks good in all browsers but IE8, in which the height I specify to the <div> that contains the map is not taken into account. Here's the interesting part of the code: <body onload="initialize()" > <div id="map_canvas" style="height:400px; width: 100%;"></div> </body> I have no control on the portal, so the only thing I can modify is the widget itself. I also tried to set the height for the <body>, but same thing. Any idea on why it's not working in IE? Thanks!

    Read the article

  • Fseek on C problem

    - by Pedro
    i'm testing this code, but doesn't work, it always says that an error occurred :S int main(int argc, char **argv) { FILE *file_pointer; file_pointer = fopen("text.txt","r"); if(fseek(file_pointer, 0, -1)) { puts("An error occurred"); } else { char buffer[100]; fgets(buffer, 100, file_pointer); puts("The first line of the file is:"); puts(buffer); } fclose(file_pointer); return 0; }

    Read the article

  • Changing url of background image

    - by João Pedro
    I'm doing this interface where I have a lot of buttons that are just a li with a background image like this #menu ul.icons li.nove { background-image:url(images/edit-menu/icons/undo.png); background-size:contain; display:block; margin-top:29px; } <ul class="icons"> <li class="um"></li> <li class="dois"></li> <li class="tres"></li> <li class="quatro"></li> <li class="cinco"></li> <li class="seis"></li> <li class="sete"></li> <li class="oito"></li> <li class="nove"></li> <li class="dez"></li> </ul> I need to create a code where I change the background image of the button when the user clicks it, to show that button its activated, I just need to change url(images/edit-menu/icons/ to url(images/edit-menu/select/ and keep the same filename. I need a way to do this dynamically so I won't have to do it for each of the 10 buttons. Hope I was clear, thanks in advance

    Read the article

  • Decompiling an old Program

    - by Pedro Laranjeiro
    Hi. I have been asked to update a program written in 1987 in Delphi (I guess). I have no documentation about this program only a few side notes the programmer took that don't make too much sense to make. The cd show this files: Size | Filename - 19956 VP.DTA - 142300 VP.LEX - 404 VP.NDX - 126502 VP.RCS - 131016 VP.SCR - 150067 VP.XEL - 101791 vp.exe Is anyone of this files a database? If so can I access it's data? I tried several code decompilers but they show a message saying it was not a Win32 compatible application. The program run in MS-DOS. Is it possible to obtain the source code? Can I use this code in any way to build a new application? Thanks Update01: I can run the program in MSDOS. The program conjugate verbs and shows an example sentence where the verb can be used. The GUI is a little bit confusing and there is no help menu so I can't see all the capabilities of the program.

    Read the article

  • In what circumstances are instance variables declared as '_var' in 'use fields' readonly?

    - by Pedro Silva
    I'm trying to understand the behavior of the fields pragma, which I find poorly documented, regarding fields prefixed with underscores. This is what the documentation has to say about it: Field names that start with an underscore character are made private to the class and are not visible to subclasses. Inherited fields can be overridden but will generate a warning if used together with the -w switch. This is not consistent with its actual behavior, according to my test, below. Not only are _-prefixed fields visible within a subclass, they are visible within foreign classes as well (unless I don't get what 'visible' means). Also, directly accessing the restricted hash works fine. Where can I find more about the behavior of the fields pragma, short of going at the source code? { package Foo; use strict; use warnings; use fields qw/a _b __c/; sub new { my ( $class ) = @_; my Foo $self = fields::new($class); $self->a = 1; $self->b = 2; $self->c = 3; return $self; } sub a : lvalue { shift->{a} } sub b : lvalue { shift->{_b} } sub c : lvalue { shift->{__c} } } { package Bar; use base 'Foo'; use strict; use warnings; use Data::Dumper; my $o = Bar->new; print Dumper $o; ##$VAR1 = bless({'_b' => 2, '__c' => 3, 'a' => 1}, 'Foo'); $o->a = 4; $o->b = 5; $o->c = 6; print Dumper $o; ##$VAR1 = bless({'_b' => 5, '__c' => 6, 'a' => 4}, 'Foo'); $o->{a} = 7; $o->{_b} = 8; $o->{__c} = 9; print Dumper $o; ##$VAR1 = bless({'_b' => 8, '__c' => 9, 'a' => 7}, 'Foo'); }

    Read the article

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