w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
I want to add class in the container while droping a div in the container
Check jQuery UI documentation for droppable method used with sortable. You can see the example here.

Categories : Jquery

jquery : how to apply same changes inside mulitple container with same class name
Try this FIDDLE $('.product-actions').each(function () { $new = $(this).prepend("<div class='new_details_location'></div>"); $(".details", $(this)).prependTo($new); $('.buttons_3', $(this)).attr('class', 'buttons buttons_2 group'); }); You made a few mistakes: your selectors were not context sensitive and you were using id in prependTo which has to be unique, but you had 2 divs with the same id.

Categories : Javascript

jquery resize following div or container div and replace span class based on click
I got it working. Very inelegant but it works. I made a few updates but here is the main thing I needed to change. Must be a better way to do it but I couldn't figure it out. from: $(this).next('div.body').slideToggle(); To: $(this).parent().parent().parent().parent().parent().parent().find('div.portletBody').slideToggle(); Here is the updated jsfiddle: http://jsfiddle.net/djlerman/FV79X/3/

Categories : Jquery

Left div container as links/nav which upon click of a link, displays content in right div container?
This JSFiddle may be helpful to you. or code : HTML : <div id="wrapper"> <div id="left_div"> <a href="#" id="link1">Link1</a> <a href="#" id="link2">Link2</a> <a href="#" id="link3">Link3</a> <a href="#" id="link4">Link4</a> </div> <div id="right_div"> <div class="container"> </div> </div> </div> Javascript ( Jquery ) $(document).ready(function(){ $("#link1").click(function(){ animateDiv("right_div .container"); $("#right_div .container").html("You have Click on line1"); }); $("#link2").click(function(){ animateDiv("right_div .container"); $("#right_div .container").html("You have Cl

Categories : Javascript

Can't create container in Azure blob storage with the same name as a deleted container
Although this is an old thread, I had the same question a few days ago, and wanted to post my findings: http://msdn.microsoft.com/en-us/library/azure/dd179431.aspx states under the Exceptions to Default Timeout Interval section: A container that was recently deleted cannot be recreated until all of its blobs are deleted. Depending on how much data was stored within the container, complete deletion can take seconds or minutes. If you try to create a container of the same name during this cleanup period, your call returns an error immediately.

Categories : Python

Container-Bound Google Script not executing even after the container has been shared
The button will run under the users permission. If its anonymous it wont run if it needs any api permission (like reading the spreadsheet) since there is no user. For non anonymous users, you need to add a menu item that will trigger the google permission dialog (just do any dumb api call from it). After the user approves it will be able to click the image button

Categories : Google Apps Script

what is the better way to position two elements in a container using CSS? (one on the left and one on the right of its container)
i think there wont be any problem ..this can be also achieved in may other ways you can also use div.wrap to wrap #first & #second then you could use display:inline-block; in #first & #second while display:inline; in div.wrap and also see should you use inline-block as a substitute of float and also float vs inline-block you could use float:left; only in #first then #second would inherit it.it will give you side by side contents you can also use display:table-row; for div.wrap and display:table-cell; for #first & #second.but its better to avoid

Categories : HTML

Organize container content by container height
There is a standard algorithm Subset Sum Problem for solving this. Problem says You have n integers. Divide n integers into two sets such that |Set1| - |Set2| is minimum. where |Set(i)| represents the sum of elements in ith set. I see you have a similar problem here. Assume your containers as two sets and each box height as an integer which is going to be put in that set. Problem is we have to divide the integers (boxes) in such a way that heights of two containers remain minimum. Relevant Links: Subset Sum Problem - Wiki Geeks for Geeks tutorial - Good One

Categories : Javascript

Hide breadcrumb items when longer than container
You may need to build a custom Panel for the ListBox.ItemsPanelTemplate. Your required functionality could be created quite simply in this manner as you will essentially be able to measure each breadcrumb as it is rendered and only show the ones that fit. If you have no experience of this yet, don't be put off... you can achieve some wonderful things with custom Panels. Here are some articles to help you if you need them: Panels Overview (MSDN), How to create a Custom Layout Panel in WPF Creating Custom Panels In WPF

Categories : Wpf

Hide Boost::mutex from DLL Interface from lockable Container
Yes, in my opinion, you are on the right track. But you struct is so "heavy" that you should export it as an interface with get and set method of the values instead of the values itself. If you use the factory pattern, one function for create an object and one to delete you can safely deriver from the interface inside your dll without even expose the nasty Pimpl * impl. Looking again at it, you can avoid exposing the mutex at all. For example, if only both values should be set at once, expose a void setValues(double test1,double test2); inside the methode, you can set the mutex yourself. Or the more classic Win32 approach if you don't want a big get and set list: expose a struct without any method like: struct DLLTestData { double test1; double test2; // …and as many as you want

Categories : C++

iOS - View Controller With Container Views - Hide Keyboard
Change the viewController's UIView and the other container UIViews to UIButton, then bind them to one of the button's touch events to an IBAction with the following code: -(IBAction)press:(id)sender { [yourTextField resignFirstResponder]; }

Categories : Iphone

expand/contract container on hide/show animation
Can you just use slideToggle to resize your container to achieve this effect? jQuery $('#trigger').on('click', function() { var $content = $('#content'); $content.slideToggle(1000); }); JSFiddle example.

Categories : Javascript

Hide control inside repeater countrol if Container.index > 1 asp.net
try this: <asp:repeater id="rptRepeater" runat="server"> <separatortemplate> <div id="one"><%=getTitle('title')%></div> <div id="two"><%=getDescription('Desc')%></div> <hr id="hr" runat="server" style='<%# (Container.index > 1)?"display:none;":""' %> > </separatortemplate> </asp:repeater>

Categories : C#

Bootstrap container-fluid and container
It is, but you will need to remove it from the flow of the container either by placing it outside of it, or using CSS to control it by giving it position:absolute etc. Something like: <div class="logo"> <h1> <a href=""> hello.</a></h1> </div> <style> .logo { position:absolute; top:100px; left:100px; } </style> <div class="container-fluid full-width"> <div class="row-fluid header-top"> <div class="container"> <div class="menu span8"> <div class="navbar"> <ul class="nav" id="nav"> <li><a href="#"> Home </a></li>

Categories : CSS

show container on hover different container
Console gives an error on your facebook jssdk code. Uncaught TypeError: Cannot call method 'getElementsByTagName' of null on line 8: button = container.getElementsByTagName( 'h1' )[0], Try putting it below the page so you give your content the chance to load. Your javascript should work until there.

Categories : HTML

Is there a better way to check if a STL container is a multi* container
Seeing as there are a small finite number of std::multi* containers, you can just list them: #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <type_traits> template <typename Container> struct is_multi_container : std::false_type {}; template <typename T, typename Compare, typename Alloc> struct is_multi_container<std::multiset<T, Compare, Alloc>> : std::true_type {}; template <typename T, typename Compare, typename Alloc> struct is_multi_container<std::multimap<T, Compare, Alloc>> : std::true_type {}; template <typename T, typename Compare, typename Alloc> struct is_multi_container<std::unordered_multiset<T, Compare, Alloc>> : std::true_ty

Categories : C++

How to fetch container element based on class name and outer element's ID using jquery
You can use the class-selector to find out an element with the specified class $("#rowForcustomfield_11300 .name")

Categories : Jquery

Adding subview to superview shared by a container view resizes container view
When you're using auto layout, you can't set the frames of views you load from a xib or storyboard. Auto layout sets the frames, and it ignores changes you make to the frames. You need to update the constraints on those views if you need to move or resize them directly. You can create an outlet pointing to an NSLayoutConstraint in your view controller, and connect the outlet to the appropriate constraint in your xib or storyboard. Then you can change the constraint's constant property to change the view's position or height.

Categories : IOS

Bind click event to container, but exclude element within container from event logic
You need to prevent event propagation from the button $('div button').click(function(event){ event.stopPropagation() }) Demo: Fiddle

Categories : Javascript

in base class, how to define a container to contain function obj which can be any func of derived class?
Here's a way to achieve what your code looks like it's trying to do, without using function pointers: class Foo { Foo() {} virtual ~Foo(){} void print_ori(int i) const { std::cout << i << ' '; } virtual void do_runCallbacks(int v) { } void runCallbacks() { print_ori(3) do_runCallBacks(3); } }; struct Foo2 : public Foo { Foo2(int num) : Foo(num) {} void do_runcallbacks(int v) { print1(v); print2(v); } void print1(int i) const { std::cout << " - Foo2.p1 - " << i << endl; } void print2(int i) const { std::cout << " - Foo2.p2 - " << i << endl; } }; int main() { Foo* obj = new Foo2(); obj->runCallbacks(); } Now, there may well be reasons

Categories : C++

Best container for C++ class objects
Arraylist equivalent in C++ is the std::vector (they are very close). If you don't know which data structure to use, get std::vector. It's the best practice in C++ (IIRC, Scott Meyers/Bjarne/Sutter(item 76) recommend to use std::vector by default).

Categories : C++

Upgrade VB6 Container Class to VB.NET
I would not care too much about this. .Net is a managed, garbage-collected environment. I'm pretty sure the CLR will take care of collecting these objects for you when they're no longer needed. As a general rule, you should only worry about these kind of things when you're getting a hold of unmanaged resources (such as files, DB Connections, COM objects, etc.). In that case, you may want to implement IDisposable and properly release all your objects / resources in the Dispose() method.

Categories : Dotnet

Add methods container to another class
Your CRUDOperations are instantiated with self in the __init__ method of the CRUDModel. so they cannot be accessed as class operations on CRUDModel. You should do something like: class CRUDModel(Model): __crud__ = CRUDOperations(CRUDModel) Also, it is bad practice to name variables using a double underscore. Double underscores are meant for language reserved words. Use single underscores.

Categories : Python

How to set up a std container with a RAII class?
Resource guards may be stored in STL containers if you wrap them in a smart pointer. Which smart pointer to use exactly is up to your environment, I'd recommend to go with boost::shared_ptr as a starting point if you're not sure. Following that way you will conform with both resource guard semantics (only one instance that manages resource's lifetime) and STL container (keep equivalent copy of passed item).

Categories : C++

How the spring container starts and ways to load the spring container
The simplest solutions is to use a ContextLoaderListener: <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext*.xml</param-value> </context-param> See http://static.springsource.org/spring/docs/4.0.x/spring-framework-reference/html/web-integration.html for details.

Categories : Java

Defining an stl container for a class that has just been declared.
The standard requires that the types used to instantiate the templates in the library are complete at the point of instantiations with a few exceptions documented (for example std::shared_ptr<T>). You cannot fix the code without providing the full definition of the Material type. That is: you cannot instantiate an stl container with a type that has just been declared.

Categories : C++

Does A warning container class already exist in .NET?
.NET Framework has a TraceSource class for logging purposes. You can use it to log all sorts of messages your program produces. .NET applications can have multiple trace sources; many trace sources already exist in the framework (network, WPF bindings etc.). You can bind a listener to them, filter messages which are important for the user and display them in UI. If you want to "attach" messages to specific objects, I think there're no ready to use classes. But you can reuse already existing types like TraceEventType enumeration for severity.

Categories : C#

Using ruby and selenium webdriver how I can get class from "container"?
Okay,You can go as below : CSS3 [attribute$=value] Selector driver.find_element(:css,'a[class$="edit-button"]').click or driver.find_element(:css,'div#PaymentInfoDivContainer>div>a').click

Categories : Ruby

Adding a class to the last p element within a parent container
Give .last() a shot : $('div.jobpost_body p').last().addClass('classificationsContainer'); Supports IE 7. JsFiddle

Categories : Jquery

Returning a generic container without templating the class
Possibly what you are looking for are traits classes. Andrei Alexandrescu termed them the "else-if-then of types". A traits class simply carries information (like types) and algorithms (like, say, "advance"). You first define the general information, which will apply to any type T, and then you specialize the traits class for specific types U which grant the special behavior. In your case (an example more complex than it needs to be): #include<iostream> #include<map> template<typename T> struct container_traits { using container_t = std::map<int, int>; }; class Foo { public: using key_type = typename container_traits<Foo>::container_t::key_type; using mapped_type = typename container_traits<Foo>::container_t::mapped_type; using size_type

Categories : C++

Selection with jquery in Div Container
try this; fiddle: http://jsfiddle.net/kjSbj/ $('[id^=rezeile_]').each(function (index,val) { var temp = $(val).find('div > [id^=ztext_]').val(); var attrib1 = $(val).find('div > [id^=ztext_]').attr('id'); var attrib2 = $(val).find('div > [id^=zre_]').attr('id'); alert(temp); alert(attrib1); alert(attrib2); }); But I suggest you to use classes instead of id's for the repeating elments

Categories : Jquery

C++ - polymorphism: initialization of a container class with derived classes
Following should solve all your issues: #include <iostream> #include <memory> #include <string> #include <vector> using namespace std; struct Base { string s; Base(const Base& b) = delete; Base(Base && b) : s(move(b.s)) { } Base(const string & S) : s( S ) { } }; struct Derived : Base { Derived(const string & S) : Base( S ) { } }; #if 1 // not in C++11 template <typename T, typename ... Ts> std::unique_ptr<T> make_unique(Ts&&...args) { return std::unique_ptr<T>(new T{std::forward<Ts>(args)...}); } #endif // vector<move_only> cannot be construct from initializer list :-/ // Use this work around template <typename Base, typename ... Ts> std::vector<std::unique_ptr<Base&g

Categories : C++

boost shared_memory deque container containing custom class
Storing raw pointers in shared memory is a no-no: it's quite unlikely that the shared memory segment will be mapped at the same address in all processes. You need to use offset_ptr per the boost.interprocess documentation or simply store everything by value instead of pointer. i.e., typedef boost::interprocess::deque<my_custom_frame, ShmemAllocator> VideoDeque; or typedef boost::interprocess::deque<boost::interprocess::offset_ptr<my_custom_frame>, ShmemAllocator> VideoDeque;

Categories : C++

jQuery + CSS scroll to container part
try this => FIDDLE $('#nastepny').on('click', function(){ if(slidePosition<(slideCount-1)){ slidePosition++; pos = +(slidePosition * -900); $("#slide1_divs").css("transform"," translateX("+pos+"px)"); $("#slide1_controls div").removeClass("selected"); }else{ // other action... } });

Categories : Jquery

Toggle width of a container using jQuery
Following is the code as per your requirement so try this code: HTML <div id="container">this is container div</div> <div class="wrp">this is wrp div</div> <input type="button" value="toggle" id="toggle-button"> CSS #container { width:960px; background-color: red; } .wrp { width:1000px; background-color: green; } JS $(document).ready(function () { var setWidth = $.cookie("width"); if (typeof setWidth !== "undefined" && setWidth == "85%") { $('#container,.wrp').width(setWidth); // 85% width set using cookie } else if (typeof setWidth !== "undefined" && setWidth == "960px") { $('#container,.wrp').width(setWidth); // 960px,1000px(for wrp) width set using cookie } $('#toggle-button').

Categories : Jquery

Center Container for JQuery Packery?
DeSandro already has an example of a centered packery layout. The example is here. Basically it is just centered via CSS. I'm copying the code here too: HTML: <h1>Packery - centered</h1> <div class="packery js-packery" data-packery-options='{ "gutter": ".gutter-sizer", "itemSelector": ".item", "columnWidth": ".grid-sizer" }'> <div class="gutter-sizer"></div> <div class="grid-sizer"></div> <div class="item w2"></div> <div class="item"></div> <div class="item w2 h2"></div> <div class="item"></div> <div class="item w2"></div> <div class="item"></div> <div class="item h2"></div> <div class="item"></div> <div

Categories : Javascript

jQuery Rotate and container dimensions
There is a callback function which will be called when the animation is done.. In this function you can reset the img container width and height like this (not tested): var img = $('#img'); var cont = img.parent(); img.rotate({bind:{ click: function(){ $(this).rotate({ angle: 0, animateTo:180, callback: function(){ cont.css({ width: img.css('height'), height: img.css('width') }); } }) } } });

Categories : Javascript

jQuery wrap text without container
You might want to look at the .contents() method. This will give you text nodes as well as wrapped nodes, so you can wrap them. To adjust the example from the jQuery docs: $(".container") .contents() .filter(function() { // get only the text nodes return this.nodeType === 3; }) .wrap( "<span></span>" ); It sounds like you want to wrap the content after click, which I think might be quite difficult. If possible, it would be better to wrap the content before the user clicks, then apply a style to the span they clicked - this is much more straightforward. If you use the code above to wrap, you can then apply a handler like $(".container").on('click', 'span', function() { $(this).addClass('clicked'); });

Categories : Javascript

jQuery - How to find an index of an ID within another container DIV?
$("#main > div").index($("#two")) var isDivThere = $("#main > div").index($("#two")) != -1; Note: > is for filter only first level div's. So my solution will not work if you want to check the index of nested divs.

Categories : Javascript

Laravel 4 - Container class: share function & closure logic
For reference, this is the share method @ v4.0.5. So, what's happening here. I'll explain it in a couple of steps. Calling The Share Method As you pointed out this method is called from service providers. So, the FilesystemServiceProvider calls this method which looks something like this: $this->app['files'] = $this->app->share(function() { return new Filesystem; }); It's assigning the return value of this share method to a binding in the container. In a nutshell, that return value will be the new Filesystem instance that is returned in the closure. So What Does Share Do? The share method is just another way of defining a singleton in IoC container. All this can be a bit intimidating at first. Basically, Laravel itself is an IoC container. All the classes are bound as inst

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.