Search Results

Search found 9366 results on 375 pages for 'common lisp'.

Page 158/375 | < Previous Page | 154 155 156 157 158 159 160 161 162 163 164 165  | Next Page >

  • Dealing with whitespace in SVN?

    - by Eric the Red
    All of the SVN shops I've worked in have a strict rule - replace all tabs with spaces, to avoid whitespace conflicts and variations of tabs in different editors. Is this a very common standard? Does it really make a huge difference, and is it worth the trouble to push this standard to a group of developers new to SVN?

    Read the article

  • Web hosting a setup where both Windows and Linux are required

    - by lk
    I have a system where a website needs to be hosted on a Linux machine while a backend application that the site talks to needs to reside on Windows. Is there any "common practice" for such hosting? Note - both of the systems are mine so there is the dilemma of whether to have the machines physically located together to avoid delay for calls over the net.

    Read the article

  • What are the Rails best practices for javascript templates in restful/resourceful controllers?

    - by numbers1311407
    First, 2 common (basic) approaches: # returning from some FoosController method respond_to do |format| # 1. render the javascript directly format.js { render :json => @foo.to_json } # 2. render the default template, say update.js.erb format.js { render } end # in update.js.erb $('#foo').html("<%= escape_javascript(render(@foo)) %>") These are obviously simple cases but I wanted to illustrate what I'm talking about. I believe that these are also the cases expected by the default responder in rails 3 (either the action-named default template or calling to_#{format} on the resource.) The Issues With 1, you have total flexibility on the view side with no worries about the template, but you have to manipulate the DOM directly via javascript. You lose access to helpers, partials, etc. With 2, you have partials and helpers at your disposal, but you're tied to the one template (by default at least). All your views that make JS calls to FoosController use the same template, which isn't exactly flexible. Three Other Approaches (none really satisfactory) 1.) Escape partials/helpers I need into javascript beforehand, then inserting them into the page after, using string replacement to tailor them to the results returned (subbing in name, id, etc). 2.) Put view logic in the templates. For example, looking for a particular DOM element and doing one thing if it exists, another if it does not. 3.) Put logic in the controller to render different templates. For example, in a polymorphic belongs to where update might be called for either comments/foo or posts/foo, rendering commnts/foos/update.js.erb versus posts/foos/update.js.erb. I've used all of these (and probably others I'm not thinking of). Often in the same app, which leads to confusing code. Are there best practices for this sort of thing? It seems like a common enough use-case that you'd want to call controllers via Ajax actions from different views and expect different things to happen (without having to do tedious things like escaping and string-replacing partials and helpers client side). Any thoughts?

    Read the article

  • please suggest good variable names that represent theirself ( php)

    - by I Like PHP
    Hi all, it may be wrong place to ask this question, but i hope u all programmer must have the interesting naming convention of variables. i have seen many places that some variable names are very good n effective like common variable names $link $db $connect $query $stmt $sql $qry $output $result $list so please suggest me some good names for variable , bcoz all time i have to write $x, $y etc.. if i want to save something instantly on page...that are even not relevant, so please suggest me good variable names

    Read the article

  • Is jQuery modular? How to trim it down?

    - by usr
    Uncompressed, jQuery is 160KB in size. I did not see a way to exclude seldomly used parts of it like with jQuery UI. How can I reduce the (compressed and minified) file size of jQuery? I am quite concerned because dial-up lines and slow machines/browsers are very common among users of my site.

    Read the article

  • Grep and Extract Data in Perl

    - by syker
    I have HTML content stored in a variable. How do I extract data that is found between a set of common tags in the page? For example, I am interested in the data (represented by DATA kept between a set of tags which one line after the other: ... <td class="jumlah">*DATA*</td> <td class="ud"><a href="">*DATA*</a></td> ...

    Read the article

  • Can Visual Studio manage function prototypes for me in C++ header files?

    - by Gibybo
    In C++, the common practice is to declare functions in header files and define them in cpp files. This leads to always having two copies of every function's prototype. Then whenever I want to change a function's name/return value/parameter, I have to manually change it in both files. This seems unnecessarily tedious and there must be lots of people that share my pain, so is there a way to automate these changes between files in VS? Bonus points for vim solutions as well.

    Read the article

  • NoSQL vs Relational Coding Styles

    - by Chris Henry
    When building objects that make use of data stored in a RDBMS, it's normally pretty clear what you're getting back, as dictated by the tables and columns being queried. However, when dealing with NoSQL, document-based systems, it's less clear what is being retrieved. What are common methods of keeping track of structure in which data is stored?

    Read the article

  • Best way to score and sum in Scala?

    - by adam77
    Is there a better way of doing this: val totalScore = set.foldLeft(0)( _ + score(_) ) or this: val totalScore = set.map(score(_)).sum I think it's quite a common operation so was expecting something sleeker like: val totalScore = set.sum( score(_) )

    Read the article

  • Can't get div to 100% height?

    - by James
    I'm not entirely sure what I'm doing wrong, and I can't figure out how to Google it because a common mistake is very prevalent. I have the parent's height explicitly set, but I can't get #main-sub-content 's height to 100%. Here's the page: http://coloryourspot.vadremix.com/ And the corresponding CSS: http://coloryourspot.vadremix.com/styles/primary/main.css Can anyone spot the issue? Solved: The problem was the parent element had height:auto!important;

    Read the article

  • Question about centering a Div .

    - by Sakti
    div { margin:90px auto; } This code centers the div in chrome with a top margin of 90px, but the results are different in all other browsers .. is there a common method to center the div and have a top margin at the same time ?

    Read the article

  • How do I find matching values in a generic list

    - by TDDG
    I have anywhere from 5 to 10 generic list in an ASP.NET VB.NET web app. I would like to write a method to pass them all into, and return only the elements they all have in common. I'm looking for some ideas how to accomplish this the easiest and cleanest way possible.

    Read the article

  • Cooler ASCII Spinners?

    - by Jason
    In a console app, an ascii spinner can be used, like the GUI wait cursor, to indicate that work is being done. A common spinner cycles through these 4 characters: '|', '/', '-', '\' What are some other cyclical animation sequences to spice up a console application?

    Read the article

  • TinyMCE: Looking for line count solution.

    - by Thariama
    I am looking for a plugin or code with a functionality like the "line count" or "line number" in common editors. The line number usually is shown on the left border of the editors content. Anyone got an idea how to do it with TinyMCE? Example: line number | content line number one number two 3. one line skipped (three is empty) 5. contents end

    Read the article

  • Encrypt hashed passwords?

    - by Industrial
    Hi everyone, Is it common sense to encrypt hashed&salted passwords that are stored in a database with a strong encryption (AES 192 or so) or are we just aiming for the stars? Of course, the encryption key will not be in the database itself, but will be kept at a safe place. Thanks a lot!

    Read the article

< Previous Page | 154 155 156 157 158 159 160 161 162 163 164 165  | Next Page >