Search Results

Search found 3722 results on 149 pages for 'choice'.

Page 126/149 | < Previous Page | 122 123 124 125 126 127 128 129 130 131 132 133  | Next Page >

  • What is the fastest (to access) struct-like object in Python?

    - by DNS
    I'm optimizing some code whose main bottleneck is running through and accessing a very large list of struct-like objects. Currently I'm using namedtuples, for readability. But some quick benchmarking using 'timeit' shows that this is really the wrong way to go where performance is a factor: Named tuple with a, b, c: >>> timeit("z = a.c", "from __main__ import a") 0.38655471766332994 Class using __slots__, with a, b, c: >>> timeit("z = b.c", "from __main__ import b") 0.14527461047146062 Dictionary with keys a, b, c: >>> timeit("z = c['c']", "from __main__ import c") 0.11588272541098377 Tuple with three values, using a constant key: >>> timeit("z = d[2]", "from __main__ import d") 0.11106188992948773 List with three values, using a constant key: >>> timeit("z = e[2]", "from __main__ import e") 0.086038238242508669 Tuple with three values, using a local key: >>> timeit("z = d[key]", "from __main__ import d, key") 0.11187358437882722 List with three values, using a local key: >>> timeit("z = e[key]", "from __main__ import e, key") 0.088604143037173344 First of all, is there anything about these little timeit tests that would render them invalid? I ran each several times, to make sure no random system event had thrown them off, and the results were almost identical. It would appear that dictionaries offer the best balance between performance and readability, with classes coming in second. This is unfortunate, since, for my purposes, I also need the object to be sequence-like; hence my choice of namedtuple. Lists are substantially faster, but constant keys are unmaintainable; I'd have to create a bunch of index-constants, i.e. KEY_1 = 1, KEY_2 = 2, etc. which is also not ideal. Am I stuck with these choices, or is there an alternative that I've missed?

    Read the article

  • Does the Java Memory Model (JSR-133) imply that entering a monitor flushes the CPU data cache(s)?

    - by Durandal
    There is something that bugs me with the Java memory model (if i even understand everything correctly). If there are two threads A and B, there are no guarantees that B will ever see a value written by A, unless both A and B synchronize on the same monitor. For any system architecture that guarantees cache coherency between threads, there is no problem. But if the architecture does not support cache coherency in hardware, this essentially means that whenever a thread enters a monitor, all memory changes made before must be commited to main memory, and the cache must be invalidated. And it needs to be the entire data cache, not just a few lines, since the monitor has no information which variables in memory it guards. But that would surely impact performance of any application that needs to synchronize frequently (especially things like job queues with short running jobs). So can Java work reasonably well on architectures without hardware cache-coherency? If not, why doesn't the memory model make stronger guarantees about visibility? Wouldn't it be more efficient if the language would require information what is guarded by a monitor? As i see it the memory model gives us the worst of both worlds, the absolute need to synchronize, even if cache coherency is guaranteed in hardware, and on the other hand bad performance on incoherent architectures (full cache flushes). So shouldn't it be more strict (require information what is guarded by a monitor) or more lose and restrict potential platforms to cache-coherent architectures? As it is now, it doesn't make too much sense to me. Can somebody clear up why this specific memory model was choosen? EDIT: My use of strict and lose was a bad choice in retrospect. I used "strict" for the case where less guarantees are made and "lose" for the opposite. To avoid confusion, its probably better to speak in terms of stronger or weaker guarantees.

    Read the article

  • Drupal 6: Creating "ON/OFF News Links" functionality for a block created with View Module.

    - by artmania
    Hi friends, I'm a drupal newbie who needs some advice... I have a news list block at homepage, created with View Module. It is listing all added news' title and link. Everything is cool so far. Now I need to add an ON/OFF option at admin side for homepage news block. When the setting is ON, it will work as it is. When it is OFF, only the titles will be listed with no linking to news detail page. So, now where should I add this ON/OFF option? I have only add/edit/delete pages for each news, there is no common news page to add such option. Should I create an admin page with such ON/OFF option in? Also I think I need to create a db table to keep this ON/OFF status. and controlling this value at homepage block, if it is 1 or 0, and displaying links according to db value :/ it looks too long way Create db table Create an page with ON/OFF option in add php codes to update db for admin's choice get the db value in homepage block to display links, etc. is there any shorter, better way to do what I need? Appreciate helps so much!!! Thanks a lot!!

    Read the article

  • Getting the Item Count of a large sharepoint list in fastest way

    - by sooraj
    I am trying to get the count of the items in a sharepoint document library programatically. The scale I am working with is 30-70000 items. We have usercontrol in a smartpart to display the count . Ours is a TEAM site. This is the code to get the total count SPList VoulnterrList = web.Lists[ListTitle]; SPQuery query = new SPQuery(); query.ViewAttributes = "Scope=\"Recursive\""; string queries = "<Where><Eq><FieldRef Name='ApprovalStatus' /><Value Type='Choice'>Pending</Value></Eq></Where>"; query.Query = queries; SPListItemCollection lstitemcollAssoID = VoulnterrList.GetItems(query); lblCount.Text = "Total Proofs: " + VoulnterrList.Items.Count.ToString() + " Pending Proofs: " + lstitemcollAssoID.Count.ToString(); The problem is this has serious performance issue it takes 75 to 80 sec to load the page. if we comment this page load will decrees to 4 sec. Any better approch for this problem Ours is sharepoint 2007

    Read the article

  • Detecting TCP dropout over an unreliable network

    - by yx
    I am doing some experimentation over an unreliable radio network (home brewed) using very rudimentary java socket programming to transfer messages back and forth between the end nodes. The setup is as follows: Node A --- Relay Node --- Node B One problem I am constantly running into is that somehow the connection drops out and neither Node A or B knows that the link is dead, and yet continues to transmit data. The TCP connection does not time out either. I have added in a heartbeat message that causes a timeout after a while, but I still would like to know what is the underlying cause of why TCP does not time out. Here are the options I am enabling when setting up a socket: channel.socket().setKeepAlive(false); channel.socket().setTrafficClass(0x08); // for max throughput This behavior is strange since it is totally different than when I have a wired network. On a wired network, I can simulate a disconnected connection by pulling out the ethernet cord, however, once I plug the cord back in, the connection becomes restablished and messages begin to be passed through once more. On the radio network, the connection is never reestablished and once it silently dies, the messages never resume. Is there some other unknown java implentation or setting for a socket that I can use, also, why am I seeing this behavior in the first place? And yes, before anyone says anything, I know TCP is not the preffered choice over an unreliable network, but in this case I wanted to ensure no packet loss.

    Read the article

  • Is there a free tool which can help visualize the logic of a stored procedure in SQL Server 2008 R2?

    - by Hamish Grubijan
    I would like to be able to plot a call graph of a stored procedure. I am not interested in every detail, and I am not concerned with dynamic SQL (although it would be cool to detect it and skip it maybe or mark it as such.) I would like the tool to generate a tree for me, given the server name, db name, stored proc name, a "call tree", which includes: Parent stored procedure. Every other stored procedure that is being called as a child of the caller. Every table that is being modified (updated or deleted from) as a child of the stored proc which does it. Hopefully it is clear what I am after; if not - please do ask. If there is not a tool that can do this, then I would like to try to write one myself. Python 2.6 is my language of choice, and I would like to use standard libraries as much as possible. Any suggestions? EDIT: For the purposes of bounty Warning: SQL syntax is COMPLEX. I need something that can parse all kinds of SQL 2008, even if it looks stupid. No corner cases barred :) EDIT2: I would be OK if all I am missing is graphics.

    Read the article

  • select dropdown option by value using jquery

    - by user1765862
    I have select following html structure <select id="mainMenu" data-mini="true" name="select-choice-min"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> </select> on page load I want initially set option with value 5 so I tried (but nothing changed) $(document).ready(function () { $('#mainMenu option').eq(5).prop('selected', true); }) I'm using jquery 1.8.3 and jqueyr mobile since this is mobile website <script src="/Scripts/jquery-1.8.3.js"></script> <script src="/Scripts/jquery.mobile-1.4.2.js"></script> UPDATE: I just realize that every code from posted answers works (as well as mine), #mainMenu option value is set to desired value (5) but it's text doesnt change (in any of this scenarios). Is this normal and is there workarround for this. I tried $("mainMenu").text("5");

    Read the article

  • Should I really use a UITableView in this situation?

    - by mystify
    Imagine you have a view like this: At the top, there is an UISegmentedControl with two segments. It functions like a tab. Pressing one segment will activate this particular content below that UISegmentedControl. Below the UISegmentedControl are some switches. These modify the way how the content should be rendered. And finally, below those switches, there's a table. Imagine a table not in sense of UITableView, but just what it really is: A table. It shows little messages like twitter messages or chat messages for example, one below the other. Like you know it from skype and other chats. Basically they're just rows with some formatting. A label, some image views, some lines, a background. Pretty basic. The data comes from an array. No core data. The whole thing including the segmented control and setup switches must be scrollable. So what I did is: I put all this stuff in an UIScrollView. Now I have to make the decision if I would use a UITableView inside there for that table part, or if I would just print a lot of rows on to the scroll view (with -drawRect:). But some problems stick in my head: Can I put a UITableView inside a UIScrollView? I assume this makes a lot of problems. I don't want that the table part is separately scrollable. Again imagine that view: First there are some basic choice things (segmented control, switches). Then there comes the table. When you scroll, the whole thing scrolls. That's mainly because this first part with the settings can be pretty big, so you would want to scroll it away. The next thing is: Can I customize UITableView in such a way, that it consists of two parts? One for that settings part, and one for the actual data to display?

    Read the article

  • How can a B-tree node be represented?

    - by chronodekar
    We're learning B-trees in class and have been asked to implement them in code. The teacher has left choice of programming language to us and I want to try and do it in C#. My problem is that the following structure is illegal in C#, unsafe struct BtreeNode { int key_num; // The number of keys in a node int[] key; // Array of keys bool leaf; // Is it a leaf node or not? BtreeNode*[] c; // Pointers to next nodes } Specifically, one is not allowed to create a pointer to point to the structure itself. Is there some work-around or alternate approach I could use? I'm fairly certain that there MUST be a way to do this within the managed code, but I can't figure it out. EDIT: Eric's answer pointed me in the right direction. Here's what I ended up using, class BtreeNode { public List<BtreeNode> children; // The child nodes public static int MinDeg; // The Minimum Degree of the tree public bool IsLeaf { get; set; } // Is the current node a leaf or not? public List<int> key; // The list of keys ... }

    Read the article

  • How best to present a security vulnerability to a web development team in your own company?

    - by BigCoEmployee
    Imagine the following scenario: You work at Big Co. and your coworkers down the hall are on the web development team for Big Co's public blog system, which a lot of Big Co employees and some public people use. The blog system allows any HTML and JavaScript, and you've been told that it was a choice (not by accident) but you aren't sure if they realize the implications of this. So you want to convince them that this is a bad idea. You write some demonstration code and plant a XSS script in your own blog, and then write some blog posts. Soon after, the head blog admin (down the hall) visits your blog post and the XSS sends his cookies to you. You copy them into your browser and you are now logged in as him. Okay, now you're logged in as him... And you start realizing that it maybe wasn't such a good idea to go ahead and 'hack' the blog system. But you are a good guy! You don't touch his account after logging into it, and you definitely don't plan on publicizing this weakness; you just maybe want to show them that the public is able to do this, so that they can fix it before someone malicious realizes the same thing! What is the best course of action from here?

    Read the article

  • Suitable web framework for the following scenario

    - by Paralife
    I have the following scenario: I have a view in an Oracle server and all Iwant is to show that view in a web browser, along with an input field or two for basic filtering. No users, no authentication, just this view maybe with a column or two linking to a second page for master detail viewing. The children are just string descriptions of the columns of the master that contain IDs. No inserts or updates. The question is which is the JAVA based web framework of choice that can accomplish the above in the minimum amount of code lines code time(subjective but also kind of objective if someone has expirience with more than one or two frameworks) configuration effort deployment effort and requirements. dependencies and mem footprint Also: 6. Oracle APEX is not an option. 3,4 and 5 are maybe the same in the sense that they are everything except the functionality coding. I want something that I can compile, deploy by just FTPing to the database host, run and forget. (e.g. For the deployment aspect, Hudson way comes in mind (java -jar hudson.war and that's all)). Also: 3,4 have priority over 1 and 2. (Explanation with a rant: I dont mind coding a lot as long as it is application code and not "why the fuck do we still use javascript over http for everything" code) Thanks.

    Read the article

  • fastest public web app framework for quick DB apps?

    - by Steve Eisner
    I'd like to pick up a new tech for my toolbox - something for rapid prototyping of web apps. Brief requirements: public access (not hosted on my machine) - like Google's appengine, etc no tricky configuration necessary to build a simple web app host DB access (small storage provided) including some kind of SQLish query language easy front end HTML templating ability to access as a JSON service C# or Java,PHP or Python - or a fun new language to learn is OK free! An example app, very simple: render an AJAXy editable (add/delete/edit/drag) list of rich-data list items via some template language, so I can quickly mock up a UI for a client. ie. I can do most of the work client-side, but need convenient back end to handle the permanent storage. (In fact I suppose it doesn't even need HTML templating if I can directly access a DB via AJAX calls.) I realize this is a bit vague but am wondering if anyone has recommendations. A Rails host might be best for this (but probably not free) or maybe App Engine, or some other choice I'm not aware of? I've been doing everything with heavyweight servers (ASP.NET etc) for so long that I'm just not up on the latest... Thanks - I'll follow up on comments if this isn't clear enough :)

    Read the article

  • What's a good starting point, tutorial, or project, to learn database programming?

    - by DarthNoodles
    I've been a Software Developer now for over 10 years. I've mostly worked in Embedded C with some time spent on C++ (limited) and Java. I'm looking to learn some new technologies and skills. I thought that database programming may be interesting to learn. I would like to make my own pet project in order to learn these things. My platform of choice is Windows but can work in Linux also. My ideal pet project would involve a GUI and some network/internet programming also which I have some experience doing. I wouldn't mind getting into C# but don't want to bite off more than I can chew right now as my spare time is limited. If I understand correctly SQLite allows for programs to use a database without running an ODBC server. Is this correct? Is that a good place to start? What can I do to start that is not too complicated but not so simple that I won't learn the details also? Your opinions and feedback would be appreciated.

    Read the article

  • what are good ways to implement search and search results using ajax?

    - by Amr ElGarhy
    i have some text box in a page and in the same page there will be a table 'grid' like for holding the search result. When the user start editing and of the textbox above, the search must start by sending all textboxs values to the server 'ajax', and get back with the results to fill the below grid. Notes: This grid should support paging, sorting by clicking on headers and it will contains some controls beside the results such as checkboxs for boolean values and links for opening details in another page. I know many ways to do this some of them are: 1- updatepanel around all of these controls and thats it "fast dirty solution" 2- send the search criteria using ajax request using JQuery post function for example and get back the JSON result, and using a template will draw the grid "clean but will take time to finish and will be harder to edit later". 3- .... My question is: What do you think will be the best choice to implement this scenario? because i face this scenario too much, and want to know which implementation will be better regarding performance, optimization, and time to finish. I just want to know your thoughts about this issue.

    Read the article

  • Looking for a book which teaches how to write applications (as opposed to writng code)

    - by rumtscho
    I am not a developer. I have coded for fun and for university projects in several languages, and during an internship, I have written code which is still in use by a department of Fortune Global 500 company. I also have extensive theoretical knowledge of software engineering - process models, architecture, project management, UI construction using Lauesen's virtual windows... you get the picture. But I am not involved with software development in my job. I recently decided to start coding for fun again, and now I have some free days to do it. But this time, I want to do it right. I want to write a real, useful application, install it on my devices and use it myself. Also I want to publish it for others to use, should they want to do so. I am vaguely aware that there is more to writing an application than to writing code. There is stuff like version control software, decision for the right IDE, having a suite of unit tests, producing an installation package - and probably lots of other things I never thought of but which must be taken care of in a proper application, as opposed to a bunch of classes I am running from my IDE. All this is stuff I should know before I start, but I have not learned it. Coding books touch on some of the subjects like IDE choice, but don't go into detail, and are not exhaustive. Theoretical software engineering textbooks are even less helpful. So is there a book which teaches exactly that? I know that I can find information on each of these topics on the Internet, but I'd rather have a systematic book exhaustively listing all the things I should take care of if I want to create a good application, and offering the currently accepted solutions for them. In the best case, it will be language- and platform independent, but if you know of a good book focusing on a specific platform, I would like to know about it too. I know I want a lot, but given how important such knowledge is and how many people need it, surely somebody must have written such a book?

    Read the article

  • How to pass a parameter in a Javascript confirm function?

    - by Miles M.
    I have something like that in my code: <?php foreach($clients as $client): ?> <tr class="tableContent"> <td onclick="location.href='<?php echo site_url('clients/edit/'.$client->id ) ?>'"><?php echo $client->id ?></td> <td><a class='Right btn btn-danger' onClick="ConfirmMessage('client', <?php $client->id ?>,'clients')"> <i class="icon-remove-sign icon-white"></i> </a></td> </tr> <?php endforeach ?> that's actually the view. So when the user click on the delete button (thr one with the btn-danger class) I'd like him to confirm his choice with a javascript confirmation box message. You can find that script in the header <script> function ConfirmMessage(type, id, types) { if (confirm("Are you sure you want to delete this ",type," ?")) { // Clic sur OK document.location.href='<?php echo site_url(); ?>',types,'/delete/',id; } } </script> So here is my question: I would like the $type to be replaced by a paramenter (like client, article, post .. ) that I'll pass to the function. And i would like to get the $client-id parameter as well. I'm bad in javascript and as you already have guess, It is obviously not working at all.

    Read the article

  • Disable redirect in fb:request-form Send/Cancel button

    - by Colossal Paul
    How do I disable the redirect in Facebook's invite form? <fb:serverfbml style="width: 600px; height: 650px;"> <script type="text/fbml"> <fb:request-form action="index.php" method="POST" invite="true" type="MyApp" content="Please have a look. <fb:req-choice url='http://apps.facebook.com/myapp/' label='View Now!' />"> <div class="clearfix" style="padding-bottom: 10px;"> <fb:multi-friend-selector condensed="true" style="width: 600px;" /> </div> <fb:request-form-submit /> </fb:request-form> After selecting friends, you will see the final Send Invite dialog with your template. After you click send or cancel, how do i disable the redirect by just closing the the dialog? Thanks.

    Read the article

  • What is the best (Windows) program launcher?

    - by AR
    One of the biggest general productivity boosters I've used is a good program launcher. I was a long-time user of SlickRun, and I've tried a few others. My current favorite is Executor - by far the best I've used. Other options: Executor: My current favorite Vista Start Menu: Pretty good, actually, but Executor is similar (binds to Win+Z) and much more flexible. Quicksilver: For Macs only, but it seems to be the gold standard against which most other launchers are measured. Google Desktop: Press Ctrl+Ctrl and it's a quick launcher! AutoHotKey: Much,much more than just a launcher - more than I need, really. SlickRun: simple and unobtrusive Launchy: Seems to be the launcher of choice for many StackOverflow users :) Colibri: "Type Ahead - Information at the tip of your wings". Quite a cool concept. Many, many others. Scott Hanselman outlines some more here. I realize that everyone will have their own preferences, but the question is: is there anything that really stands out in terms of speed, features, and especially productivity increase?

    Read the article

  • Boolean comparison of array of strings in Ruby

    - by Kyle Kaitan
    I've got an array in Ruby that essentially represents a square boolean matrix. Dots represent zeroes, while any other character represents ones. Example: irb(main):044:0> g => [".b", "m."] # This grid has two '1' values and two '0' values. I'd like to perform a specified logical operation (say, OR) on this array with another similar array to get a third result. For example, if h is ["q.", "r."], then something akin to g.perform_or(h) should yield a new array ["qb", "r."]. (The choice of r to represent the result of 'm' || 'r' is arbitrary and not relevant; any other non-'.' character can be there.) How might I do this? Edit: I made an error in my example. Apologies!

    Read the article

  • jquery disable text box created after drag and drop

    - by user1736989
    I have two div one for tools where to drag and one for dropping in. html is <div id="popular"> <ul> <li class="dragfield" id="textfield">Text field</li> <li class="dragfield"id="textarea">Text area</li> <li class="dragfield"id="emailfield">email field</li> <li class="dragfield"id="dropdownselection">dropdown selection</li> <li class="dragfield"id="checkboxes">checkboxes</li> <li class="dragfield"id="multiplechoicecheckboxes">multiple choice checkboxes</li> </ul> </div> <div id="editable"> <p>hii</p> </div> and here is javascript for droppable $(function() { $('.dragfield').draggable(); $( "#editable" ).droppable({ drop: handletextDrop }); }); function handletextDrop( event, ui ) { var id = ui.draggable.attr("id"); if(id=="textfield") { var $Div = $('<div id="TextBoxDiv"></div>'); $Div.append('<label>Textbox</label>' + '<input type="text" name="textbox" id="textbox" value="" />'); $('#editable').append($Div); } } I want to make this textbox which is being created to remain disabled.javascript applying to id of these div e.g. #textbox etc. not working Is there any easy way in which i can include this html from some other page?

    Read the article

  • What would be the best approach to finding a date in a freeform text?

    - by Matthew DeVos
    What would be the best approach to finding a date in a freeform text? A post where a user may place a date in it in several different ways such as: July 14th & 15th 7/14 & 7/15 7-14 & 7-15 Saturday 14th and Sunday 15th Saturday July 14th and 15th and so on. Is regex my best choice for this type of thing with preg_match? I would also like to search if there are two dates, one for a start date and a second for an end date, but in the text I'm searching there may be one date or two. This is my PHP code so far: $dates1 = '01-01'; $dates2 = 'July 14th & 15th'; $dates3 = '7/14 & 7/15'; $dates4 = '7-14 & 7-15'; $dates5 = 'Saturday 14th and Sunday 15th'; $dates6 = 'Saturday July 14th and 15th'; $regexes = array( '/\s(1|2|3|4|5|6|7|8|9|10|11|12)\/\d{1,2}/', //finds a date '/\s(1|2|3|4|5|6|7|8|9|10|11|12)-\d{1,2}/', //finds another date '%\b(0?[1-9]|[12][0-9]|3[01])[- /.](0?[1-9]|1[012])\b%', //finds date format dd-mm or dd.mm ); foreach($regexes as $regex){ preg_match($regex,$dates,$matches); } var_dump($matches);

    Read the article

  • Java: multi-threaded maps: how do the implementations compare?

    - by user346629
    I'm looking for a good hash map implementation. Specifically, one that's good for creating a large number of maps, most of them small. So memory is an issue. It should be thread-safe (though losing the odd put might be an OK compromise in return for better performance), and fast for both get and put. And I'd also like the moon on a stick, please, with a side-order of justice. The options I know are: HashMap. Disastrously un-thread safe. ConcurrentHashMap. My first choice, but this has a hefty memory footprint - about 2k per instance. Collections.sychronizedMap(HashMap). That's working OK for me, but I'm sure there must be faster alternatives. Trove or Colt - I think neither of these are thread-safe, but perhaps the code could be adapted to be thread safe. Any others? Any advice on what beats what when? Any really good new hash map algorithms that Java could use an implementation of? Thanks in advance for your input!

    Read the article

  • Where is a small, simple CMS that has no Front End done in PHP?

    - by user559469
    The keys are: small and simple PHP MySql no Front End By "no front end" I mean literally, I can control the look 100%. I just want a CMS on the "backend" to manage content (user login/security, upload images, udate articles, etc.) that will not dictate in anyway how the managed data is presented. Maybe it just keeps the info in a (MySql) database (which I can query and extract myself) or if it writes content, it is in super-clean xhtml fragments or even just xml I will parse myself? I have looked at Wordpress -- and don't like the code it generates, not to mention the sites look too "canned" (you can usually spot a WP site a mile a way.) Joomla and Drupal look more customizable, but they are bloated now in my opinion, and really I just want something lightweight and simple. For one-user mom-and-pop sites. (No tiered publishing/approval systems, and all that.) I envision plugging this CMS into existing websites/web apps where most of the site is made and managed by me, but a few choice areas are managed by the site owner.

    Read the article

  • What is the "un-tab" sequence in (g)Vim?

    - by OwenP
    This is an annoyance I've had for a long time. (Nitpicky section: I prefer 4 space characters to tab characters. It's a lot easier to type "tab" instead of explaining that. When I say "tab", I mean "the action that happens when you press the tab key" which is probably more simply stated as "increase indentation".) I'm using smartindent while editing a document where indentation has some significance. In "dumb" windows text editors I can press Shift+Tab to remove a tab or, more appropriately, decrease the indentation level of the current line. I can't figure out how to do this from edit mode in Vim; Shift+Tab seems to count just the same as Tab. I know in Command mode << will decrease indentation. I want the equivalent in edit mode. These are the solutions I've found so far and why I don't like them, one in particular may be the key to the answer. Use Notepad++ or some other dumb editor. I've done this for a couple of years but I really miss Vim. Exit edit mode, use <<, enter edit mode. This just puts the cursor at column 0; if I wanted this I wouldn't have tried smartindent. Stop using smartindent. I don't decrease indent as often as I need to keep the same indent level; this would be a loss of productivity. The left arrow key seems to decrease the indent by one level. I'd rather something I can do without leaving the home row. This is the most promising choice. Maybe there's an option I can set? Maybe I can rebind left arrow to something? (If it requires rebinding please explain in detail; I've never delved into reconfiguring (g)Vim.

    Read the article

  • Choose 'better' or more familiar technologies for a new project?

    - by John
    I am looking to start work on a brand-new project, something I've been thinking about for a while as my first independent sellable project. It's broadly speaking a web-based service application, and my first choice, server-language is quite easy... I know Java pretty well from working on Java web-apps in the past. However my experience doing web-apps involved JSP, Servlets and JSTL... I know the ideas behind newer technologies like Hibernate/Spring but have never used them. So we wrote our own DAOs, handled AJAX by writing special mini-JSP pages that generated XML/JSON pages, etc. I'm not hugely into the idea that Spring/Hibernate are the 'only' or 'right' way to do any Java web-project, but they are widely used. On the other hand, not only would trying to learn these increase initial development time, but I'd be using my learning attempts to build a production system. I remember one of Joel's early articles said (I'll paraphrase since I can't find it) "regardless what's cool, always use the technologies that the lead developer (or dev team?) knows best" I wondered what people thought about that? ps: should this be CW?

    Read the article

< Previous Page | 122 123 124 125 126 127 128 129 130 131 132 133  | Next Page >