Search Results

Search found 4347 results on 174 pages for 'devils child'.

Page 135/174 | < Previous Page | 131 132 133 134 135 136 137 138 139 140 141 142  | Next Page >

  • how to append dropdown list box

    - by kumar
    $("#Grid").click( $("#showgrid").load('SomeURL')); $.each($('#Grid td:nth-child(4n)'), function() { var forthColumn = $(this); forthColumn.append("<select><option value='1'>Division 1</option><option value='2'>Division 2</option><option value='3'>Division 3</option></select>"); }); }; I am trying to append the dropdown list box? this way but I am not seeing the dropdownbox at 4th colum? is this right? thanks for all..

    Read the article

  • How to write a xpath to match all elements except a particular element

    - by Unmesh Kondolikar
    I am writing an XSL transformation. I want to write a template which matches all the child elements of the document except one particular node. My xml looks like this - <Document> <NodeA><\NodeA> <NodeB><\NodeB> <ServiceNode><\ServiceNode> <NodeX><\NodeX> </Document> I want to write a template that matches all nodes except ServiceNode i.e. NodeA to NodeX. How to write this Xpath to get - <xsl:template match="ALL Nodex Except ServiceNode">

    Read the article

  • Abstract class get parameter from implementing subclass?

    - by soren.qvist
    I'm wondering if there is way to do this without breaking encapsulation, I want the abstract class to rely on parameters defined in the implementing subclass. Like so: public abstract class Parent { private int size; private List<String> someList; public Parent() { size = getSize(); someList = new ArrayList<String>(size); } public abstract int getSize(); } public class Child extends Parent { @Override public int getSize() { return 5; } } Is this ugly? Is there a better way? And perhaps more importantly, is this even a good idea?

    Read the article

  • avoid caching of page in browser

    - by Shan
    I am using an iframe to show the child pages.In that one one particular page contains hidden div and i am showing it as a pop-up like thing with javascript by changing the visibility of the hidden div. Problem is before showing the hidden div , some manipulations are done at server level and I am calling the div from C# code after the manipulations like Page.ClientScript.RegisterStartupScript(GetType(), "MyKey", "javascript:OpenModelPopup('cb','cs');", true); so the page is getting posted back and the div is shown. after this, after going to next page if i click browser back it shows that page with that hidden div and on next click of browser back gives the page without hidden div. but I want to show only the initial stage of the page ie. without showing the hidden div that stage with hidden div should not be cached or it should not be shown on click of browser back.

    Read the article

  • Select lowest nested selector when clicked

    - by rikAtee
    I would like to click $('.sub-menu') selector and return the lowerst nested item that was clicked, rather than the highest. e.g., when I click "enlish", "root" is returned becasue "english" is a child of "root". I want "english" returned when I select "english". <div ID="browse_container"> <div class="sub-menu">Root <div class="sub-menu">English</div> <div class="sub-menu">Maths <div class="sub-menu">Year 1</div> <div class="sub-menu">Year 2</div> </div> <div class="sub-menu">? Science</div> </div> </div> my script is simply: $('.sub-menu, #root').on('click', function(event){ alert($(this).text()) });

    Read the article

  • Check for element equality in an animation function.

    - by Zardoz
    I have the the below code and would expect that in the first pass of the fadeTo function "yes" would be printed as those first two console logs tell me it is the same element. But it doesn't recognize them as equal. What do I miss here? var tds = self.element.find("td:nth-child(" + (columnIndex + 1) + ")"); tds.fadeTo(options.columnFadeOutTime, 0, function() { window.console.log(tds.first()); window.console.log($(this)); if ($(this) == tds.first()) { window.console.log("yes"); } else { window.console.log("no"); } }

    Read the article

  • Parent selector in jquery

    - by matthewsteiner
    I have a table row that needs to be hidden when the anchor with class "removerow" is clicked. <tr><td>Product Name</td><td><a class="removerow">Remove</a></td></tr> I've been trying this, but it doesn't work: $("a.removerow").click(function(){ $(tr > this).hide(); }); How can I select the entire table row with a child of ".removerow". What am I doing wrong? Thanks.

    Read the article

  • Qt: How to force a hidden widget to calculate its layout?

    - by Chris
    What I am trying to do is render a qwidget onto a different window (manually using a QPainter) I have a QWidget (w) with a layout and a bunch of child controls. w is hidden. Until w is shown, there is no layout calculations happening, which is expected. When I call w->render(painter, w->mapToGlobal(QPoint(0,0)), I get a bunch of controls all overlapping each other. w->layout()->activate();w->layout()->update() doesn't seem to do anything. Is there a way to force the layout to happen without showing w?

    Read the article

  • C++ template restrictions

    - by pingvinus
    I wondering is there any way to set restrictions on template class? Specify that every type substituted in template must have specific ancestor (realize some interface). template < class B > //and every B must be a child of abstract C class A { public: B * obj; int f() { return B::x + this->obj->f(); } }; Like = in haskell func :: (Ord a, Show b) => a -> b -> c

    Read the article

  • Resizing Ubuntu x64 Server Partition with VirtualBox not reflected in OS

    - by daleyjem
    I've already resized my virtual disk with VirtualBox, but now need to extend the partition of my Ubuntu VM itself. I thought I was on my way with GParted live CD, but after I resize the "extended" filesystem partition, and then the child "lvm2 pv" filesystem partition to fill the unallocated space, df -h still shows the original disk size after I reboot into the VM. Any tips on this? I've scoured the webs tirelessly. Should I be resizing the boot (/dev/sda1) partition instead? Should I try to convert my lvm2 to ext4 or something? I'm lost on this. Note: VirtualBox hard disk is "dynamic". Specs: VBox 4.2.18 Ubuntu 12.04.2 amd64 Gparted 0.16.2-1b-i486

    Read the article

  • What Java tools/apis to use for decrypting/encrypting

    - by Java_bear
    I am trying to decrypt (and later encrypt) an email message (ebXML). The message contains a Signature element that contains child elements to specify the SignedInfo, SignatureValue and KeyInfo. Also, the message contains an encrypted attachment. Question: What Java tools/apis should be used for decrypting? I would like to find some tool/api that would (automagically) instantiate objects based on whatever is included with the Signature element, so that the data (message) could be easily validated. And the other way around: Creating objects (specifying methods, signature value and keyinfo) and then outputting the xml to go into the message.

    Read the article

  • How can specific the layout_width and layout_height of a Framelayout which fits an image

    - by michael
    Hi, I have an image which is 80px X 50 px, and I need to place that in one of the child of a FrameLayout, how can I specific the layout_width and layout_height of a Framelayout which fits an image without scaling it? I know there is a layout_height="wrap_content" layout_wight="wrap_content" for FrameLayout, but I can't use it, since that FrameLayout has other children. So I would like to hard code the FrameLayout width/height to match the dimension of the image? Should I use layout_width="80px" or layout_width="80dip"? Thank you.

    Read the article

  • Silently binding a variable instance to a class in C++?

    - by gct
    So I've got a plugin-based system I'm writing. Users can create a child class of a Plugin class and then it will be loaded at runtime and integrated with the rest of the system. When a Plugin is run from the system, it's run in the context of a group of plugins, which I call a Session. My problem is that inside the user plugins, two streaming classes called pf_ostream and pf_istream can be used to read/write data to the system. I'd like to bind the plugin instance's session variable to pf_ostream and pf_istream somehow so that when the user instantiates those classes, it's already bound to the session for them (basically I don't want them to see the session internals) I could just do this with a macro, wrapping a call to the constructor like: #define MAKE_OSTREAM = pf_ostream_int(this->session) But I thought there might be a better way. I looked at using a nested class inside Plugin wrapping pf_ostream but it appears nested classes don't get access to the enclosing classes variables in a closure sort of way. Does anyone know of a neat way to do this?

    Read the article

  • How can I simulate a click event via script?

    - by Scott B
    I have a jquery accordion style menu that I'd like to add some shortcut links to across the top. When one of these shortcuts is clicked, it should have the same effect as if the user clicked the corresponding a tag that serves as that panel's header... Here's some code... <div> Application Shortcuts > <a href="" onclick="simulateAclick("generalSettings")>Open General Settings</a> </div> <ul class="menu collapsible"> <li class='header'><a href='#' id="generalSettings">General Settings</a> <ul class='acitem'>...stuff goes here... In the example above, clicking on "Open General Settings" toggles the "acitem" UL's child elements visible. I'd just like to simulate a click on that element, from a link at the top of my app...

    Read the article

  • How can I delete a row in the view only if the AJAX call & db deletion was successful?

    - by user1760663
    I have a table where each row has a button for deletion. Actually I delete the row everytime without checking if the ajax call was successfull. How can I achieve that, so that the row will only be deleted if the ajax call was ok. Here is my clickhandler on each row $("body").on('click', ".ui-icon-trash" ,function(){ var $closestTr = $(this).closest('tr'); // This will give the closest tr // If the class element is the child of tr deleteRowFromDB(oTable, closestTr); $closestTr.remove() ; // Will delete that }); And here my ajax call function deleteRowFromDB(oTable, sendallproperty){ var deleteEntryRoute = #{jsRoute @Application.deleteConfigurationEntry() /} console.log("route is: " + deleteEntryRoute.url) $.ajax({ url: deleteEntryRoute.url({id: sendallproperty}), type: deleteEntryRoute.method, data: 'id=' + sendallproperty });

    Read the article

  • DocumentBuilder.parse() / Parsing Entities

    - by stormin986
    I'm new to parsing XML and am having an issue with entities. (Am doing this on Android, if it makes a difference). Is there a way to have it turn an entity into the character it represents? I have this in the child of an element: "isn&#39;t" (minus quotes). I would prefer it parse it and the end result be a single text node. However, right now this is turned in to TEXT, ENTITY, TEXT. Is there a way to automatically have it parse the entity into text, or a manual way to do it?

    Read the article

  • web service data type (contract)

    - by cyberguest
    hi, i have a general design question. we have a fairly big data model that represents an clinical object, the object itself has 200+ child attributes in the hierarchy. and we have a SetObject operation, and a GetObject operation. my question is, best practice wise, would it make sense to use that single data model in both operations or different data model for each? Because the Get operation will return much more details than what's needed for Set. an example of what i mean: the data model has say ProviderId, and ProviderName attributes, in the Get operation, both the ProviderId, and ProviderName would need to be returned. However, in the Set operation, only the ProviderId is needed, and ProviderName is ignored by the service since system has that information already. In this case, if the Get and Set operations use the same data model, the ProviderName is exposed even for Set operation, does that confuse the consuming developer?

    Read the article

  • Find original owning process of a Linux socket

    - by Rob H
    In Linux and other UNIX-like operating systems, it is possible for two (or more) processes to share an Internet socket. Assuming there is no parent-child relationship between the processes, is there any way to tell what process originally created a socket? Clarification: I need to determine this from "outside" the processes using the /proc filesystem or similar. I can't modify the code of the processes. I can already tell what processes are sharing sockets by reading /proc/<pid>/fd, but that doesn't tell me what process originally created them.

    Read the article

  • any way to simplify this with a form of dynamic class instantiation?

    - by gnychis
    I have several child classes that extend a parent class, forced to have a uniform constructor. I have a queue which keeps a list of these classes, which must extend MergeHeuristic. The code that I currently have looks like the following: Class<? extends MergeHeuristic> heuristicRequest = _heuristicQueue.pop(); MergeHeuristic heuristic = null; if(heuristicRequest == AdjacentMACs.class) heuristic = new AdjacentMACs(_parent); if(heuristicRequest == SimilarInterfaceNames.class) heuristic = new SimilarInterfaceNames(_parent); if(heuristicRequest == SameMAC.class) heuristic = new SameMAC(_parent); Is there any way to simplify that to dynamically instantiate the class, something along the lines of: heuristic = new heuristicRequest.somethingSpecial(); That would flatten that block of if statements.

    Read the article

  • Filtering SQLAlchemy query on attribute_mapped_collection field of relationship

    - by bsa
    I have two classes, Tag and Hardware, defined with a simple parent-child relationship (see the full definition at the end). Now I want to filter a query on Tag using the version field in Hardware through an attribute_mapped_collection, eg: def get_tags(order_code=None, hardware_filters=None): session = Session() query = session.query(Tag) if order_code: query = query.filter(Tag.order_code == order_code) if hardware_filters: for k, v in hardware_filters.iteritems(): query = query.filter(getattr(Tag.hardware, k).version == v) return query.all() But I get: AttributeError: Neither 'InstrumentedAttribute' object nor 'Comparator' object associated with Tag.hardware has an attribute 'baseband The same thing happens if I strip it back by hard-coding the attribute, eg: query.filter(Tag.hardware.baseband.version == v) I can do it this way: query = query.filter(Tag.hardware.any(artefact=k, version=v)) But why can't I filter directly through the attribute? Class definitions class Tag(Base): __tablename__ = 'tag' tag_id = Column(Integer, primary_key=True) order_code = Column(String, nullable=False) version = Column(String, nullable=False) status = Column(String, nullable=False) comments = Column(String) hardware = relationship( "Hardware", backref="tag", collection_class=attribute_mapped_collection('artefact'), ) __table_args__ = ( UniqueConstraint('order_code', 'version'), ) class Hardware(Base): __tablename__ = 'hardware' hardware_id = Column(Integer, primary_key=True) tag_id = Column(String, ForeignKey('tag.tag_id')) product_id = Column(String, nullable=True) artefact = Column(String, nullable=False) version = Column(String, nullable=False)

    Read the article

  • get first parent of iframe javascript

    - by baaroz
    I have a iframe inside test.aspx,when the user click on a pay button inside the Iframe,the iframe redirct to check.aspx that has same iframe if payment was success on first time, then window.parent.location.href==test.aspx if payment was failed the iframe redirect again to check.aspx,so now the window.parent.location.href==check.aspx while the payement was failed the the iframe keep redirect to check.aspx and the parent location keep changing ,so for example if the client failed 3 time,inside check.aspx I need to do window.parent.parent.parent.location.href to get test.aspx redirect. when the user payment was success ,then I want to redirect the test.aspx but I can't know how much child iframe window he has! I need something like window.parent[0].location.href=success.aspx,so I will be able to redirect the first father window. Thanks for any Help Baaroz

    Read the article

  • JQuery: How to find what is between two text points

    - by Sarfraz
    Hello, Let's say I have this: <div id="wrapper"> <pre class="highlight"> $(function(){ // hide all links except for the first $('ul.child:not(:first)').hide(); $("a.slide:first").css("background-color","#FF9900"); /* The comment goes here. */ </pre> </div> With Jquery, I want to find what is in between: /* The comment goes here. */ Including those comment signs. So it should return: /* The comment goes here. */ How to do that, how to find text between two points? Thanks

    Read the article

  • Clearing Only inner text and not the childnodes

    - by Ravisha
    I have an xml as below < Image>ImageValue11 <Type>png<Type> <Value>ImageValue11</ Value> </ Image> Here ImageValue1 is present in two places.I want to remove innerText for Image node which is the parent.For which i am usign below code XmlNode customImageNode = imagedoc.SelectSingleNode("//Image"); customImageNode.InnerText = string.empty; But this is clearing the child nodes as well.Please let me know how to clear this test off .Looking for a generic solution.

    Read the article

  • SQL Server dynamic pivot table

    - by user972255
    In SQL Server, I have two tables TableA and TableB, based on these I need to generate a report which is kind of very complex and after doing some research I come to a conclusion that I have to go with SQL Pivot table but I dont have any idea about the SQL Pivot feature so, can anyone please help me on this. Please see the details below: Create table TableA ( ProjectID INT NOT NULL, ControlID INT NOT NULL, ControlCode Varchar(2) NOT NULL, ControlPoint Decimal NULL, ControlScore Decimal NULL, ControlValue Varchar(50) ) Sample Data ------------- ProjectID | ControlID | ControlCode | ControlPoint | ControlScore | ControlValue P001 1 A 30.44 65 Invalid P001 2 C 45.30 85 Valid Create table TableB ( ControlID INT NOT NULL, ControlChildID INT NOT NULL, ControlChildValue Varchar(200) NULL ) Sample Data ------------ ControlID | ControlChildID | ControlChildValue 1 100 Yes 1 101 No 1 102 NA 1 103 Others 2 104 Yes 2 105 SomeValue Output should be in a single row for a given ProjectID with all its Control values first & followed by child control values (based on the ControlCode (i.e.) ControlCode_Child (1, 2, 3...) and it should look like this

    Read the article

  • How to re-open a closed file descriptor

    - by chaitu
    I have a scenario where i created pipe for communication between two child and parent. Parent writes (using write function)data to the pipe and closes the respective file descriptor. The problem is when i want to write data again to the pipe, the write function is returning error code -1. I think its because writing end has been closed in previous iteration. Then how to open the corresponding file descriptor after it has been closed once. I tried using open() function which requires path to some file as arguement. But i am not using any files in my application. I have simple file descriptors (int arr[2]). Is it possible to achieve above scenario with pipes????

    Read the article

< Previous Page | 131 132 133 134 135 136 137 138 139 140 141 142  | Next Page >