elements

JQuery Select Box and Loop Help

一笑奈何 提交于 2019-12-21 04:06:27
问题 Thanks for reading. I'm a bit new to jQuery, and am trying to make a script I can include in all my websites to solve a problem that always drives me crazy... The problem: Select boxes with long options get cut off in Internet Explorer. For example, these select boxes: http://discoverfire.com/test/select.php In Firefox they are fine, but in IE, the options are cut off to the width of the select when they drop down. The solution: What I am looking to do, is create a script that I can include

How can multiple elements be added to an XML config file with wix?

和自甴很熟 提交于 2019-12-21 01:39:13
问题 I am trying to edit an XML file with Wix. I am using the WixUtilExtension bundled with Wix 3.7. The xml file is a settings file created in Visual Studio 2010 for a C# application. In this file, I am using an element which is used to store multiple string values in an array. This is the content of the unaltered settings file: <configuration> <applicationSettings> <AppName.Properties.Settings> <setting name="StringArray" serializeAs="Xml"> <value> <ArrayOfString xmlns:xsi="http://www.w3.org

Linq To Xml problems using XElement's method Elements(XName)

百般思念 提交于 2019-12-19 09:27:23
问题 I have a problem using Linq To Xml. A simple code. I have this XML: <?xml version="1.0" encoding="utf-8" ?> <data xmlns="http://www.example.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.com/directory file.xsd"> <contact> <name>aaa</name> <email>email@email.ext</email> <birthdate>2002-09-22</birthdate> <telephone>000:000000</telephone> <description>Description for this contact</description> </contact> <contact> <name>sss</name> <email>email

How to reset elements to their original state, after a chain of manipulations?

旧时模样 提交于 2019-12-19 08:52:04
问题 After a bunch of animating, adding classes and setting css styles. is there an easy way to reset an element to be back in its original server delivered state? 回答1: jQuery sets its manipulations using the inline style attribute, so just set that to '' . $('#someDiv').attr('style',''); This assumes there were no inline style attributes set on the element coming from the server. Better to use style sheets if so. If the element must come from the server with style attributes set, then I suppose

Element-wise Matrix Replication in MATLAB

别来无恙 提交于 2019-12-19 02:25:26
问题 I have a 3 dimensional matrix. I want to replicate the matrix of size 8x2x9 to a specified number of times in the third dimension given by a vector say [3, 2, 1, 1, 5, 4, 2, 2, 1] so that the resultant matrix is of size 8x2x21. Is there any built-in MATLAB function (I'm running version 2014a) to do this similar to the newer repelem function, for matrices? A simple example of what I need: % Input: A(:,:,1) = [1 2; 1 2]; A(:,:,2) = [2 3; 2 3]; % Function call: A = callingfunction(A, 1, 1, [1 2]

Retrieving native DOM elements from jQuery objects?

让人想犯罪 __ 提交于 2019-12-18 18:53:52
问题 How can I get jQuery to return the native DOM elements it encapsulates? 回答1: When you find elements with jQuery, you can get them with the "get" function: var regularElement = $('#myElementId').get(0); Inside a ".each()" function, the "this" pointer refers to a "real" element: $('input.special').each(function() { var type = this.type; this.value = "exploding balloon"; // etc }) Using jQuery doesn't make Javascript "different." It is Javascript, and the DOM is still the DOM. 回答2: $('myTag')

Get Area or Elements in zoomed Scatterplot

非 Y 不嫁゛ 提交于 2019-12-18 07:35:51
问题 I've got the following problem. I want to zoom-in a Scatterplot and then select all the displayed elements. It would be sufficient to somehow get the displayed area in the zoomed-in Scatterplot. From the range of this area i could determine which elements are displayed in the area and which are not. \edit: Found the Solution (Implementing AxisChangeListener Interface) import java.awt.Color; import java.awt.Dimension; import org.jfree.chart.ChartPanel; import org.jfree.chart.event

How to return a specific element of an array?

强颜欢笑 提交于 2019-12-18 07:08:07
问题 I want to return odd numbers of an array yet Eclipse doesn't seem to accept my return array[i]; code. I think it requires returning a whole array since I set an array as a parameter to my method. As I said before, I need to pass an array and get a specific element of that array in return. Even if I make that array static, how do I return a single element? Edit : Alright then, here it is: public class newClass{ public static void main(String[] args) { int [] newArray= new int [4]; int [] array

Python - shuffle only some elements of a list

不羁的心 提交于 2019-12-17 20:46:27
问题 I'm trying to shuffle only elements of a list on 3rd till last position so the 1st two will always stay in place e.g. list = ['a?','b','c','d','e'] into list = ['a?','b','d','e','c'] and for some reason this doesn't work: list = ['a?','b','c','d','e'] import random random.shuffle(list[2:]) print list Any know what am I doing wrong?? The only thing that works for me is so far this (EDITED): lists = [['a?','b','c','d','e'],['1?','2','3','4','5','6','7']] import random for list in lists: copy =

fastest way to locate elements selenium+java

我与影子孤独终老i 提交于 2019-12-13 17:46:36
问题 I need to check my site for invalid tooltips and other error mesages on my site during the tests to make sure everything is okey. the problem is that selenium seem to take forever to find these elements and they are set on a timer so they sometimes have time to disapere before selenium finds them, we are talking about a 3 second timer. right now I find them like so: List<WebElement> error = driver.findElements(By.cssSelector("div.alert .error")); if (error.size() == 0) {return true;} else