remove

Adding and removing multiple elements in javascript

Hello everyone, I am trying to populate a list of images dynamically using javascript. I have the following code, but it is not working. If you see any errors, or know of a better way of doing this, any help will be appreciated. code is as follows: <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <script type="text/javascript"> ...

How to get rid of pygame surfaces?

In the following code, there is not just one circle on the screen at any given point in time. I want to fix this to make it so that it looks like there is only one circle, instead of leaving a smudge trail where ever the mouse cursor has been. import pygame,sys from pygame.locals import * pygame.init() screen = pygame.display.set_mode(...

Mysql cut string, the first character?

Hi is it possible to cut string like this: String in "data" columns: ,123,456 Cut the first character i.e "," (comma). So the query is something like: Update users set data = cut first string... ...

How to delete list elements while cycling the list itself without duplicate it

I lost a little bit of time in this Python for statement: class MyListContainer: def __init__(self): self.list = [] def purge(self): for object in self.list: if (object.my_cond()): self.list.remove(object) return self.list container = MyListContainer() # now suppose both obj...

Strip quotes from a string

Hi. How do I strip Quotes from a string using Delphi? Ex. I need to remove all the quotes from 'A','B','C','D', giving a result of A,B,C,D. I've tried MyVar := jclStrings.StrRemoveChars(sRegions, [#34]); but no luck so far. Thanks, Pieter ...

jquery add remove class

Hi. I have 4 anchors, I want to add a class of current to an anchor as it is clicked and remove the class from the other 3 at the same time here's my code what am I doing doing wrong please? if ($("ul#thumb a").hasClass("current") { $("ul#thumb a").removeClass("current"); $(this).addClass("current"); }); and my html looks like...

Remove another program's frame/window/border (the Aero bit) using VB.NET

Is there a way to remove the border/frame (the Aero bit) of another application's window (say notepad) from a VB.NET program? ...

jQuery: Remove DOM element loaded via ajax

Hi, I'm using jQuery to load ajax content on to a page. However, trying to use jQuery's .remove() function doesn't seem to be working to remove the dynamically loaded element. My example function: function deletePerson(personID){ if (confirm("Are you sure you want to permanently delete this person?\nYou cannot undo this action.")...

How to remove whitespace from XElement object created from XElement.ReadFrom(XmlReader)

I am parsing a large xml file. So I am using an XmlReader in combination with XElement instead of XElement.Load(). I have created as XElement object from XmlReader as shown below and here. static IEnumerable<XElement> StreamRootChildDoc(string uri) { using (XmlReader reader = XmlReader.Create(uri, xmlReaderSettings)) { ...

jquery function not working in Safari?

Is there something unique about Safari that would render the code below useless? While it works as expected in all the other browsers, it fails in Safari, insomuch that the attribute isn't removed at all... $('ul.nice-menu a').each(function() { $(this).removeAttr('title'); }); ...

What is the fastest way to remove child elements from the DOM in IE?

I am using jQuery, and have a table element that contains a few hundred rows. I want to remove all of the rows, and then add a new set of rows. I do this by calling remove and then append on the parent element. My append logic is fairly fast, and follows the advice given here: http://www.learningjquery.com/2009/03/43439-reasons-to-use-a...

Get rid of leading zeros for date strings in Python?

Is there a nimble way to get rid of leading zeros for date strings in Python? In the example below I'd like to get 12/1/2009 in return instead of 12/01/2009. I guess I could use regular expressions. But to me that seems like overkill. Is there a better solution? >>> time.strftime('%m/%d/%Y',time.strptime('12/1/2009', '%m/%d/%Y')) '12/0...

Perforce: 'remove from workspace' from command line ?

The p4v Perforce GUI client has an 'Actions > Remove from Workspace' menu command which removes all files from the workspace that are under version control and were not opened for edit or delete. This functionality only seems to be available from the GUI client, I can't find any corresponding command in the ever growing list shown by p4...

Using prototype/scriptaculous to hide the previous row

I dont know if this is even possible, but I have a situation where I need to be able to hide the previous table row onload. Situation: <table> <tr> <td>1</td> <td>a</td> </tr> <tr> <td>2</td> <td>b</td> </tr> <tr id="removeabove"> <td>3</td> <td>c</td> </tr> </table> Now again I dont know if this is even p...

How to 'Refresh' the Vista start menu programmatically.

Hi, I am working on a piece of code that removes an extra folder we have in the user's start menu. I start by removing all of the shortcuts it contains, and then remove the folder itself. After this is done, I can confirm that the shortcuts have been removed from the start menu, but their containing folder remains listed in the start ...

Jquery: How to Remove Spaces from GET URL, Search

Hello, i replace the submit url from the search form with this jquery snippet: <script type="text/javascript"> $(document).ready(function() { $('.search-form').submit(function() { window.location.href = "/search-" + $('.search-form input:text').val() + "-" + "keyword"+ "-"+ "keyword2/" + $('.search-form input:text').val() +...

Script to remove history for all binary files in Git, without removing file itself

Say I have a huge git repository and it has a number of swfs and images in there. I want them to be included in the hosted github repository, but they don't need to be versioned, and I don't want to have to store them somewhere else. What is the simplest way I can remove their history every time I commit to a repository? ...Such that, ...

Remove Silverlight Animation

Hi all, I have a problem with my Silverlight animation that I can't seem to fix. The problem seems to be well established, but the techniques used to solve it don't seem to work in my case. Here is the storyboard code that I am using to animate a grid called "underGrid". underGrid is a base grid which I am applying a scale and location...

Jquery remove drawn line added via jquery svg library

Hi, In my application I have a line drawn from one table cell to another cell through jQuery SVG plugin. Following the steps of the blog post http://www.openstudio.fr/Library-for-simple-drawing-with.html I managed to add it. But at the same time I need to remove that line and draw it on another place when mouse hovers. Is there a metho...

How to remove $_SERVER['DOCUMENT_ROOT'] from a given string in PHP

How can i remove $_SERVER['DOCUMENT_ROOT'] from a string like this /home/bla/test/pic/photo.jpg the result should look like this /test/pic/photo.jpg I also need to take the photo.jpg from /test/pic/photo.jpg How can i do that i PHP? Thank ...