trimming

Automatically trimming a mp3 in PHP

Are there any ways to automatically trim an MP3 uploaded to a website to 30 seconds (or some other length) in PHP? If not, is there any good 3rd party services that could be integrated (transparently to the user) to achieve the same effect? Thanks. ...

auto trim whitespace in jsps

is there a good way to trim whitespaces generated by JSPs without resorting to the following techniques: trimSpaces jasper directive: may ruin your layout by eating significant spaces where you want them surrounding areas you want to trim with JSP comments, commenting out the spaces. this makes the JSP harder to edit and looks horrible...

iPhone UIImagePicker Camera video trimming problem

How to get the trimming video function working on iPhone? I am using UIImagePicker to capture videos, and set allowsEditing to YES. In the view with the "Use" button right after video captured, I was able to drag the yellow trimming box, but it looks like the video saved are not trimmed. Any ideas? Thanks! ...

JSF trimming white spaces

HI, I have an input field in which I want to trim any leading/trailing whitespaces. We are using JSF and binding the input field to a backing bean in the jsp using: <h:inputText id="inputSN" value="#{regBean.inputSN}" maxlength="10"/> My question is that besides validation can this be done in the jsp? I know we can also do this using...

Reading a line in c# without trimming the line delimiter character

Hi! I've got a string that I want to read line-by-line, but I also need to have the line delimiter character, which StringReader.ReadLine unfortunately trims (unlike in ruby where it is kept). What is the fastest and most robust way to accomplish this? Alternatives I've been thinking about: Reading the input character-by-character an...

jQuery text truncation (read more style)

Hi There, My question is very similar to "http://stackoverflow.com/questions/2104653/trim-text-to-340-chars" but in jQuery. It sounded very straight forward but when I searched around I couldn't find any reference for it. Ok, I have a div $('#content') I want to trim the text to 'x' amount of characters lets say '600' BUT I don't want ...

CSS - Multiple images in one and using CSS to determine a background

If you don't know what I mean, check this image out: Multiple images I want to know how it works, CSS yes, but exactly how does it all work out when using a background using this image and then it is all cut all exactly what it is supposed to do - when determined as a background for this image. Would be interesting for me to know how ...

[Integrity] of a Http Post Request from Iphone to web server

Hey everyone, I am currently building a module that makes possible to comment a news and as you probably understood, I will need to insert this new comment in my web database. I know this stuff can be very fastidous so I would like to know if someone has a method which could assure the integrity of the request by checking some of the u...

How to remove trailing symbol for a constant in Rails initializer?

How does one remove trailing character correctly in the following sentence if it's in config/environment.rb file. KEY = ENV['KEY'].delete "\r" It produces the following error: undefined method `delete' for nil:NilClass (NoMethodError) It works well in IRB, but not in environment.rb Solved Aptana Studio 3 stopped to load .bashrc a...

Java equivalent of python's String lstrip()?

I'd like to remove the leading whitespace in a string, but without removing the trailing whitespace - so trim() won't work. In python I use lstrip(), but I'm not sure if there's an equivalent in Java. As an example " foobar " should become "foobar " I'd also like to avoid using Regex if at all possible. Is there a built...

Trimming in SQL Management Studio 2008

Hi, I'm trying to trim some info from a table. The column has a number and then a word (e.g. 5 Apples). I just need the number so that I can sum the total of apples. I can't use count because I need to go by the value (e.g. 5 Apples for one, 3 Apples for the other) and count will just return that there are 2 entries and not pull the 5...

trim "px" off the end of Jquery var

I have a variable which stores the css value of a margin. I want to remove the "px" from the end so that i just have the number to work with. How can i do this? ...

Parsing html frame

Hi2all, what a good-way for parsing html page, by using QWebKit (lang cpp). I need to view frame, trimmed <div id="chat_wrapper"> *any_html_data* </div>? ...

How do I trim a log file with vb.net?

I'm writing a simple application in vb.net and need to output some information to a log file for diagnostic purposes. In order to ensure that the log file doesn't get too big, I need to trim it to a certain number of lines (say 5000). For performance reasons, the trimming doesn't have to occur each time a log entry is written out nor is...