alternate-elements

addClass every nth

I have a list of elements that I want to style in 3 different ways. I want every 3rd list item to have the same class throughout the whole list. For example: <li class="A">Some Content</li> <li class="B">Some Content</li> <li class="C">Some Content</li> <li class="A">Some Content</li> <li class="B">Some Content</li> <li class="C">Some...

How to fill one UItableViewCell with odd and even entries from an NSMutableArray?

I have an uitableview with UITableViewCellSTyleValue1 so i have a textlabel and a detail text label. The second thing i've got is a NSMutableArray. Now i want to fill the textLabels with the even items and the detailTextlabels with the odd entries. So for example cell one(zero) gets entry 0 and 1 cell one gets 2 and 3 and so on. I did...

How to remove every other line?

How can I remove every odd line, using sed? remove keep remove keep remove ... ...