Daily Archives

Articles indexed Saturday March 20 2010

Page 25/89 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • JavaScript RegEx for div tags

    - by Eiso
    I have a JavaScript variable which holds an HTML page and due to the setup I need to extract everything between <div id="LiveArea"> and </div> from that variable using JavaScript. Any help is greatly appreciated.

    Read the article

  • MP3 Resampling in Linux

    - by sharon
    Hello folks. Tonight I am working on my music collection. I would like to resample a large selection of my MP3's to 192Kb/s for my Zune. I know the obvious way to do this is a recursive function using lame to encode MP3 at 192 - but lame doesn't maintain the ID3 tags! Does anyone know of another option that will retain ID3 info? Thank you all for your time / help!

    Read the article

  • mongrel_rails start command not found

    - by sean
    On my server I am unable to run mongrel_rails start. I looked in /usr/bin/ and could not locate the mongrel_rails file. Instead I found it in /var/lib/gems/1.8/bin. The file includes #!/usr/bin/ruby1.8, but I am still not getting this to work.

    Read the article

  • How does 64 bit code work on OS-X 10.5?

    - by philcolbourn
    I initially thought that 64 bit instructions would not work on OS-X 10.5. I wrote a little test program and compiled it with GCC -m64. I used long long for my 64 bit integers. The assembly instructions used look like they are 64 bit. eg. imultq and movq 8(%rbp),%rax. I seems to work. I am only using printf to display the 64 bit values using %lld. Is this the expected behaviour? Are there any gotcha's that would cause this to fail? Am I allowed to ask multiple questions in a question? Does this work on other OS's?

    Read the article

  • Your home backup strategy

    - by David Pokluda
    What is your recommended backup strategy for home computers? I have two computers - desktop and notebook. All the important data is store on the desktop computer. I am currently using Mozy to backup my data from desktop computer to Mozy servers. What do you use?

    Read the article

  • Find and replace in a block of text.

    - by David Tildon
    I have a database full of text fields that look like this: (paragraph of normal text) image:blog/clownboy.jpg (another paragraph) I'm trying to write a view helper for Rails that will take one of these big blocks of text, find bits like "image:blog/clownboy.jpg" and replace them with the corresponding <img src="blog/clownboy.jpg"> (without disturbing the surrounding whitespace) before outputting it to the user. I've been trying for an hour or so now, but I'm new to Ruby and the regular expressions are still a bit beyond me.

    Read the article

  • The cost of nested methods

    - by Palimondo
    In Scala one might define methods inside other methods. This limits their scope of use to inside of definition block. I use them to improve readability of code that uses several higher-order functions. In contrast to anonymous function literals, this allows me to give them meaningful names before passing them on. For example: class AggregatedPerson extends HashSet[PersonRecord] { def mostFrequentName: String = { type NameCount = (String, Int) def moreFirst(a: NameCount, b: NameCount) = a._2 > b._2 def countOccurrences(nameGroup: (String, List[PersonRecord])) = (nameGroup._1, nameGroup._2.size) iterator.toList.groupBy(_.fullName). map(countOccurrences).iterator.toList. sortWith(moreFirst).head._1 } } Is there any runtime cost because of the nested method definition I should be aware of? Does the answer differ for closures?

    Read the article

  • Parsing data without HMLT tags

    - by user296507
    Hi, I need to extract the actual phone number form the html listed below, but I'm not really sure how to do it using Nokogiri CSS since there are no html tags around it. When an at_css(.phonetitle) it only parse Phone and not the number. <div class="detail"> <span class="address">Corner of Toorak Road and Chapel Street, South Yarra</span><br> <span class="phonetitle">Phone</span> 95435 34341 <br><br> </div>

    Read the article

  • Error in jsp program calling servlet variable

    - by megala
    hi i created one webapplication project.It containe one servlet file jsp file. I created one string variable in servlet and assign some value like /* sampleservlet.java *******/ String s=" WELCOME" My constraints I want to display the string in my jsp file.so that i import the servlet file inj jsp and i created object as ---call--- jsp file contain following coding <%sampleservlet call ;% <%call.s% But it shows error how to solve this?

    Read the article

  • Specific programming text editor for simple open/close editing

    - by queen3
    I'm looking for very specific text editor: Closes on ESC, no project management or tabs Syntax highlighting - preferably with color themes (e.g. can apply different color themes without changing C# coloring definition) or, at least, can load/save themes; support for C/C#/XML/HTML/JavaScript/etc - common MS/.NET world - out of box Configurable keys, or: Shift-Tab shifts blocks XML/HTML auto-completion support - well, optional I use synplus plugin for Total Commander currently, but it has few drawbacks (e.g. crashes sometimes ;-), no auto-completion, etc). Basically I want fast Visual-Studio-like editor that I open, do edits, and then close using ESC. I remember I tried Notepad++, etc - most of them open files in tabs, don't close on ESC... - that is, behave like IDE. At least I've just downloaded Notepad++, it doesn't close on ESC even if I setup keybindings to do so. Autocompletion is optional (though it is to be simple as just tags completion), what I really look for is closing on ESC, not getting in the way with all the tabs and IDE-like, and good coloring. Plus shift-tab is must have for blocks manipulation. Update: any open-source one that I can easily tweak to close on ESC? ;-) Seems like ESC (and reasonable color highlighting) is the core requirement. I've just tried many editors - Programmer's Notepad, E, Crimson, etc - I can't set any of them to close on ESC. Any external tool to close selected program on ESC? ;-) UPDATE: Hm, found an awesome utility for my latest thought: http://www.autohotkey.com. Easy to setup to close any window on ESC (as well as many other tricks). Seems like the most tough requirements is gone - I can use ANY text editor ;-)

    Read the article

  • Disable Foreign key constraint on all tables didn't work ?

    - by Space Cracker
    i try a lot of commands to disable tables constraints in my database to make truncate to all tables but still now it give me the same error Cannot truncate table '' because it is being referenced by a FOREIGN KEY constraint. i try EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all" EXEC sp_MSforeachtable "TRUNCATE TABLE ?" and i tried this for each table ALTER TABLE [Table Name] NOCHECK CONSTRAINT ALL truncate table [Table Name] ALTER TABLE [Table Name] CHECK CONSTRAINT ALL and every time i have the previous error message .. could any please help me to solve sucha a problem ?

    Read the article

  • Sqlite + Java: table not updating

    - by Ben L
    I'm using a Java wrapper for SQLite called SQLiteJDBC - this may have some bearing on any answers... I have a table which I've displayed in a GUI, within that UI I have a button for the fields for an individual row of that table. When I save my changes I do this... Statement stmt = connection.createStatement(); stmt.execute("update 'tableName' set 'fieldName'=1 where userid=1"); int updateCount = stmt.getUpdateCount(); My connection is valid, I get no exceptions thrown and getUpdateCount() returns '1' indicating that one row has been updated. However my table is not updated. I've spent the last few hours trying to work out what's going on but I'm not having any luck. Help!!

    Read the article

  • Why GUID is returned as empty?

    - by jess
    Hi, After loading an entity from the database using LINQ-to_SQL,I pass the entity.ID to a method having argument of type GUID.When I access this parameter in the method,I get an empty value,and not the GUID.Why is it so?

    Read the article

  • Run C or C++ file as a script

    - by Brendan Long
    So this is probably a long shot, but is there any way to run a C or C++ file as a script? I tried: #!/usr/bin/gcc main.c -o main; ./main int main(){ return 0; } But it says: ./main.c:1:2: error: invalid preprocessing directive #!

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >