manipulation

iphone string manipulation

Hi All, Coming across from vb.net to iphone. Im currently trying to iterate through a string to pull values out of it. I have the following example string: Field1ExampleField2ExampleField1ExampleField2Example So basically i want to loop through the string and put the Field1 and Field2 of each value into a list. In VB i would: while s...

using jQuery to remove markup above and below <html> </html>

I have a website on a free domain that has html mark-up added server side to produce web banners. This mark-up is placed above and below the main outer tag. Is it possible to have jQuery strip this out prior to the page rendering? ...

Javascript select only text of an element not its children

Hello. Please consider the following HTML: <td> Some Text <table>.....</table> </td> I need to manipulate the "Some Text" text of td element. I should not touch the table element inside of this td. So, just for example, maybe I want to replace all "e" with "@". I tried a few approaches with jQuery's .text() and .html(). I seem...

Manipulating CSS file programmatically

Hi All, Is there any library available around to manipulate CSS files like the Hpricot for HTML/XML etc. I have a lot of CSS files for different theme, and sometime for a minor change I need to open each CSS file and make that change. I want to do it programmatically, preferably in Ruby. Thanks, Imran ...

Create new dummy variable columns from categorical variable

I have a several data sets with 75,000 observations and a type variable that can take on a value 0-4. I want to add five new dummy variables to each data set for all types. The best way I could come up with to do this is as follows: # For the 'binom' data set create dummy variables for all types in all data sets binom.dummy.list<-list...

How to stop BB Code manipulation?

Hi I recently discovered an issue where people using BB Code to enter links are able to manipulate them. They are meant to enter something like: [LINK]http://www.domain.com[/LINK] However they can enter something like this to make the link color red: [LINK]http://www.domain.com 'span style="color:red;"'[/LINK] This is the code...

Simulate Photoshop's Multiply in PHP with gd or ImageMagick

Having until now only used PHP's gd image library to resize, crop and greyscale images I'm currently struggling to find a way to simulate what happens when, in Photoshop, you place a coloured layer over a greyscale image and select 'multiply' from the layer effects menu. Or, as my old print lecturer would explain it, I need to make a duo...

Convert HTML code to .NET string

Hi there, I have the following HTML code: <P>Notes:&nbsp;&nbsp; Mails: <BR> &nbsp; 1. <A href="mailto:[email protected]">[email protected]</A></P> and of course when I try to pass it to string it gives me error: string s = "<P>Notes:&nbsp;&nbsp; Mails: <BR> &nbsp; 1. <A href="mailto:[email protected]">[email protected]</A></P>"; Is ...

Rearranging a data frame in R

Dear R-experts, The following R code generates a snippet from data frame I am working with at the moment: rep1 <- c("20/02/01","23/03/02") rep2 <- c(NA, "03/05/02") rep3 <- c("16/04/01",NA) rep4 <- c(NA,"12/02/03") data <- data.frame(rep1 = rep1, rep2 = rep2, rep3 = rep3, rep4 = rep4) The data frame generated by the code looks like t...

R: Count number of entries in a row based on external criteria

Dear R-wizards, I have the following data frame: Date1 Date2 Date3 Date4 Date5 1 25 April 2005 10 May 2006 28 March 2007 14 November 2007 1 April 2008 2 25 April 2005 10 May 2006 28 March 2007 14 November 2007 1 April 2008 3 29 January 2008...

Efficient Hex Manipulation

I have a byte array represented by hex values, these are time durations. The data could be converted to integer values and multiplied by a constant to get the timings. The decoding of the data will be saved to a file as a series of hex strings. What would be an efficient way of manipulating hex values? I was looking at performance iss...

Pitch manipulation of Audio recorded Sounds

Hello All, I have a challenging task please help Task: Just say something into your iPhone or capture a friend saying something. Then application make it sound even MORE ridiculous with your choice of over a dozen different voices. Voices of animals, guitar, drum etc. In this task we have to convert Pitch Manipulation i suppose. Ple...

Java: Possibilities to protect files against manipulation

Good morning, my Java program builds some files (.html and .txt-files) in one directory. To finish a project I'd like to "pack" these files for example to send it to another person. But the other person should not be able to simple "unpack" the file and manipulate the html/txt-Files. Only open the packed file with my Java program. My ...

screen color filtering

Hi everybody! I want to create a filter over a specific area of the screen to perform filtering opertions. Examples what a filtering opertion might be:     - inverting (e.g. change black pixel to white pixels, red to cyan)     - masking pixels (e.g. mask = ff0000; input c79001 -> c70000)     - operations like photoshop's layer effects ...

insert frame title and subtitle for image in android?

Hi, I want to add frame to image with title and subtitle. The thing that I want to do is as follows : There are number of styled frames available and user selects any picture from the phone memory or takes a picture from camera, now on selecting any frame that picture should be in that frame. Also below that frame there should be title ...

Manipulating elements after ajax load()

I am trying to manipulate some elements after I load them using .load(). I have everything loading correctly, but I can't seem to target any elements within any of the loaded elements. This seems like something that would be easy, but I just can put my finger on it. I am using a callback after the elements load, but the DOM seems to no...

C++ equivalent to Java's System.arraycopy

I'm a Java programmer and have recently needed to start coding in C++. I'm trying to port some Java code of mine that makes heavy use of the System.arraycopy method and want to know if there is an equivalent in C++. Basically I want to have n byte arrays and combine them into one big array. Each of the initial arrays can be of variabl...

Sound manipulation reverse/playing recorded sound backwards on an iPhone

Hi everyone, I try to get my head around how to deal with some challenging requirements for my iPhone App. Requirements: 1. Record sound (voice of a person) 2. High quality 44100Mhz - 32 bit 3. Slow down playback (without pitching voice to high or to low!). however we would like to know how to do pitching/alter voice high and low as we...

C#: How do I find the index of an item when only part of the item name is known

Firstly, sorry if the title sounds confusing. How do I find the index of an item in a list string when only a substring of that item is known? Like, I have a list called directories. It has C:\test, C:\new and C:\files (3 items). Using the word "new" only, how can I find the index number of C:\new (that is 1) in directories? I am usi...

Replace a empty space with "&nbsp;" using Jquery

I am looking around on the web but I am not finding anything useful. :( I am having a problem that I don't understand. I am sure that I am doing something wrong, but I don't know well the syntax of jQuery to understand what is that I am not doing right. I am using animations with JS and CSS 3, and I am having troubles with empty spaces...