Search Results

Search found 270 results on 11 pages for 'joao pedro portelinha'.

Page 8/11 | < Previous Page | 4 5 6 7 8 9 10 11  | 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

  • How to automatically insert a class notation using eclipse templates?

    - by João Paulo G. Piccinini
    Does anybody know how to insert a "@RunWith anotation" above the class signature, using eclipse templates? Ex.: @RunWith(Parameterized.class) public class MyClassTest { ... @Parameters public static Collection<Object[]> parameters() { List<Object[]> list = new ArrayList<Object[]>(); list.add(new Object[] { "mind!", "find!" }); list.add(new Object[] { "misunderstood", "understood" }); return list; } ... } __ Template: // TODO: move this '@RunWith(Parameterized.class)' to class anotation @Parameters public static Collection<Object[]> parameters() { ${type:elemType(collection)}<Object[]> parametersList = new ${type:elemType(collection)}<Object[]>(); ${cursor}// TODO: populate collection return parametersList; } __ Thanks for the help!

    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

  • 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

  • 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

  • Concatenate String

    - by João Madureira Pires
    Hi there. I have the following javascript function: <script type="text/javascript"> function quickCardRegister_OnCompleteSave() { publishContent('This is a description',#{imagePath},'http://www.lala.com'); } </script> The imagePath variable is populated with value: http://localhost/img/30_w130px.gif I'm having the following script error: missing ) after argument list publishContent('This is a description',http://localhost/img/30_w130px.gif,'http://www.lala.com'); How can i surround http://localhost/img/30_w130px.gif with quotes? 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

  • Android listview array adapter selected

    - by João Melo
    i'm trying to add a contextual action mode to a listview, but i'm having some problems with the selection, if i make aList1.setSelection(position) it doesn't select anything, and if i make List1.setItemChecked(position, true) it works but it only changes the font color a little and i want it to change the background or something more notable, is there any way to detect the selection and manually and change the background, or i'm missing something? the list: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <ListView android:id="@+id/list1" android:layout_width="match_parent" android:layout_height="match_parent" android:choiceMode="singleChoice" android:drawSelectorOnTop="false"> </ListView> </RelativeLayout> the adapter: public class ServicesRowAdapter extends ArrayAdapter<String[]> { private final Activity context; private final ArrayList<String[]> names; static class ViewHolder { public TextView Id; public TextView Date; public RelativeLayout statusbar,bglayout; } public ServicesRowAdapter(Activity context, ArrayList<String[]> names) { super(context, R.layout.servicesrowlayout, names); this.context = context; this.names = names; } @Override public View getView(int position, View convertView, ViewGroup parent) { View rowView = convertView; if (rowView == null) { LayoutInflater inflater = context.getLayoutInflater(); rowView = inflater.inflate(R.layout.servicesrowlayout, null); ViewHolder viewHolder = new ViewHolder(); viewHolder.Id = (TextView) rowView.findViewById(R.id.idlabel); viewHolder.Date = (TextView) rowView.findViewById(R.id.datelabel); rowView.setTag(viewHolder); } ViewHolder holder = (ViewHolder) rowView.getTag(); holder.Date.setText(names.get(position)[2]); holder.Id.setText(names.get(position)[1]); return rowView; } } with the use of a layout: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" > <TextView android:id="@+id/idlabel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:gravity="right" android:text="@+id/idlabel" android:textSize="20dp" android:width="70dp" > </TextView> <TextView android:id="@+id/datelabel" android:layout_centerVertical="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@+id/datelabel" android:textSize="20dp" android:layout_marginLeft="90dp" > </TextView> </RelativeLayout

    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

  • Mapping an Array to a Single Row

    - by João Bragança
    I have the following classes: public class InventoryItem { private Usage[] usages = new Usage[12]; virtual public Usage[] Usages { get { return usages; }} virtual public string Name{get;set;} } public class Usage { virtual public double Quantity{get;set;} virtual public string SomethingElse{get;set;} } I know that Usages.Length will always be 12. I think it would be best to store it in the DB like so: Name nvarchar(64), Usage_Quantity_0 float, Usage_SomethingElse_0 nvarchar(16), Usage_Quantity_1 float, Usage_SomethingElse_1 nvarchar(16), ... Usage_Quantity_11 float, Usage_SomethingElse_11 nvarchar(16), How can I get this done?

    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

  • 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

  • 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

  • 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

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