I know containers of auto pointers should not be used and can cause problem. What is the actual reason for that? Is that any other kind of "smart" pointer which is safe to use in a container?
or conversly can you import a parents menu items into a child window?
So I have an UI that is composed of controls that all have their own context menu, but we also have a datagrid that get's nested inside our generic contaier.
So when you right click the datagrid elements I want to show both the context items I've created for the datagrid and the items from the generic container.
I am using a IoC Container (Castle Windsor) to instantiate classes accordingly to the configuration file. If I want to add classes from a new dll that didn't exist when I compiled the project, there is any way to do that without recompiling?
Edit: As this project is a Service Host for WCF service, and the classes that I want to include after compilation are WCF Services I would like also to know if I can include endpoint information about new services without recompiling.
Hello, I need to create something like internal frame in netbeans platform, which loads file from any location.
I tried it by jInternalFrame, but I was not able to find some container to which I can add my frame. I am working in netbeans platform, which has own pre-created main window.
Pease help me by any advice, I am dealing with this about 10 hours, still without result.
Hi, I already have my operators for, by example, eat banana problem
[#op{
action = [climb, on, {object}],
preconds = [[at, {place}, {object}], [at, {place}, me],
[on, floor, me], [on, floor, {object}], [large, {object}]],
add_list = [[on, {object}, me]],
del_list = [[on, floor, me]]
},
But how can I use it in the function solve(Problem, depth_first, []). And depth_first (Problem, Start) - search_tree(Problem, container.stack, Start).
Is there any way to set a fixed/custom height for ligtbox2?
#lightbox img{ width: auto; height: 600px;}
This only resizes the img and not the outer container.
Do you know if there is a list with all the reference implementation for every component of JEE6? I.e. Glassfish is the reference container, Hibernate Validator for validation, etc.
I've looked at a lot of various jQuery plugins that I thought I could tweak to get working the way I want but so far have been unsuccessful. I'm not sure if there is a plugin out there that meets these requirements or if I should just write my own (although I'm a bit of a novice!).
The requirements:
Scroll HTML containers left/right infintely in a loop/carousel
Scrolling action is triggered by mouseover on arrows
Scrolling action must be continuous during mouseover (i.e. doesn't pause after each container)
Number of containers is flexible
Is there a way to use jQuery (or generic javascript) to disable CSS inheritance on a block level? For example, if I am pulling in an external resource via javascript, say pastie.org, they will have their own CSS that my CSS overrides. I would like to place the embed code into its own container that has CSS inheritance disabled.
This is not my own CSS structure, so I can't rename IDs Classes or inline anything to make it work, the holy grail of inheritance blocking is my last resort.
i am taking an image from a source, say, facebook.
now when i want to insert that image in a container with fixed width and height, the image stretches to fit that space. is there a way the image can display in its normal size and the rest of the area clipped out?
Hi,
is it legal to remove the logo/terms of use link displayed on my integrated google map (google maps premier)? The problem is that when I zoom into the map, the link tends to get longer and loger and overlays the whole website which is pretty ugly. Of course it is possible to give the div container a "overflow: hidden;" flag which helps a little. But it is still not satisfying.
Thx
This works in jQuery 1.3.2, but not in 1.4
$("#container").children().map(function() {
var child = $(this);
if (child.is(":select")) {
//do something with child
}
});
What is the right way to do this in jQuery 1.4?
Hi,
Loose coupling is wonderful of course, but I have often wondered what overhead wiring up dynamically using an IoC container (for example Castle Windsor) has over a tightly coupled system?
I know that a detailed answer would depend on what the IoC was being used for, but I'm really just trying to get a feel for the magnitude of effort involved in the IoC work.
Does anyone have any stats or other resources regarding this?
Thanks
I have a horizontal JToolbar with JToggleButtons. For some reason it is placed in a container that has larger height. My JToggleButtons use only as much space as they need, leaving ugly empty space below and under them. How can I make them fill all available space without setting size arbitrarily?
Similar question: How I can make components fill all horizontal space in a vertical tool bar?
Hi
Is there any way to cast to a dynamic generic interface..
Site s = new Site();
IRepository<Site> obj = (IRepository<s.GetType()>)ServiceLocator.Current.GetInstance(t)
obviously the above won't compile with this cast. Is there anyway to do a dynamic cast of a generic interface. I have tried adding a non generic interface but the system is looses objects in the Loc container.
Thanks
Phil
I have a parent container, that has child containers within it. 2 child containers take up 60% width and 40% width respectively. They have no margin, and they have padding, but use box-sizing so this is included in the width. But for some reason they don't sit side by side. If I change one of them to 39% width then it looks fine.
What am I doing wrong?
Example can be seen at http://jsfiddle.net/Rcaet/
Hello,
Consider I scheduled a Runnable for periodic execution with ScheduledExecutorService and there occurs some system Error like OutOfMemory. It will be silently swallowed.
scheduler.scheduleWithFixedDelay(new Runnable() {
@Override
public void run() {
throw new OutOfMemoryError(); // Swallowed
}
}, 0, delay, TimeUnit.SECONDS);
Is it normal?
Why doesn't it propagate to the container?
What is the correct way to handle such errors?
Thanks!
In the snippet below, the child div is normally positioned until it is :hovered , when it becomes absolutely positioned. The reasoning behind this markup is to simulate a popup style in a limited environment where I can't use a <select> (among other limitations).
When child is hovered, the sibling elements jump around, which is expected, as the contents of the block have changed.
But how can I preserve their positioning? That is, what CSS can I add to prevent the siblings from jumping around when child is hovered.
Javascript is also not allowed, so please no answers using JS.
HTML:
<div class="container">
<div class="child">
<span class="d4"></span>
<label><input type="radio" name="radio" value="1"/>One</label>
<label><input type="radio" name="radio" value="2"/>Two</label>
</div>
<input type="text" name="sibling"/>
<button name="sibling2">Button</button>
</div>
CSS:
.container, .child, button {
display:inline-block;
}
.child {
vertical-align: middle;
width: 35px;
height: 35px;
}
.child:hover {
background: gray;
position:absolute;
width: 100px;
height: auto;
}
.child:hover > .d4 {
display: none;
}
.child label {
display:none;
}
.child:hover label {
display: inline-block;
}
.d4 {
background-position: -411px -1px;
width: 35px;
height: 35px;
background-image: url("https://i.imgur.com/zkgyBOi.png");
background-repeat: no-repeat;
color: transparent;
display: inline-block;
}
Here's a fiddle: http://jsfiddle.net/cpctZ/1/
i have this xml file for Creating a container ,
if i want create a db for save this items and and create container from db
how should i do ?
<?xml version="1.0" encoding="utf-8"?>
<config>
<nav>
<logout>
<label>logout</label>
<controller>authentication</controller>
<action>logout</action>
<resource>logout</resource>
</logout>
<login>
<label>login</label>
<controller>authentication</controller>
<action>login</action>
<resource>login</resource>
</login>
<test>
<label>test</label>
<uri>#</uri>
<resource>test</resource>
<pages>
<list>
<label>list</label>
<controller>tset</controller>
<action>listtest</action>
</list>
<archive>
<label>archive</label>
<controller>myarchive</controller>
<action>archive</action>
</archive>
</pages>
</test>
</nav>
</config>
and code in bootsrap
$navContainerConfig = new Zend_Config_Xml(APPLICATION_PATH . 'navigation.xml', 'nav');
$navContainer = new Zend_Navigation($navContainerConfig);
Is it possible to create a Line in XAML (without any C# code behind) to align a line inside of a layout container such as a Grid?
I'd like to effectively have:
<Grid>
<Line StrokeThickness="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Bottom"
Stroke="Red"/>
</Grid>
I need to use StrokeDashArray and StrokeDashOffset, otherwise I would just use a Border control with the BorderThickness set to "0,0,0,1"...
Thanks for any ideas!
Forgive me if this is a particularly stupid question!
mysql_query($query)
returns a boolean, but you can also assign it to a variable
$results = mysql_query($query)
and then use the other mysql_ functions to extract data.
Out of curiosity, how does mysq_query($query) act as both a boolean and a data container at the same time? What's happening "under the hood" during these steps?
(yes, I am a n00b..., please be kind!)
This is a problem I encounter frequently in working with more complex systems and which I have never figured out a good way to solve. It usually involves variations on the theme of a shared object whose construction and initialization are necessarily two distinct steps. This is generally because of architectural requirements, similar to applets, so answers that suggest I consolidate construction and initialization are not useful.
By way of example, let's say I have a class that is structured to fit into an application framework like so:
public class MyClass
{
private /*ideally-final*/ SomeObject someObject;
MyClass() {
someObject=null;
}
public void startup() {
someObject=new SomeObject(...arguments from environment which are not available until startup is called...);
}
public void shutdown() {
someObject=null; // this is not necessary, I am just expressing the intended scope of someObject explicitly
}
}
I can't make someObject final since it can't be set until startup() is invoked. But I would really like it to reflect it's write-once semantics and be able to directly access it from multiple threads, preferably avoiding synchronization.
The idea being to express and enforce a degree of finalness, I conjecture that I could create a generic container, like so:
public class WoRmObject<T>
{
private T object;
WoRmObject() {
object=null;
}
public WoRmObject set(T val) { object=val; return this; }
public T get() { return object; }
}
and then in MyClass, above, do:
private final WoRmObject<SomeObject> someObject;
MyClass() {
someObject=new WoRmObject<SomeObject>();
}
public void startup() {
someObject.set(SomeObject(...arguments from environment which are not available until startup is called...));
}
Which raises some questions for me:
Is there a better way, or existing Java object (would have to be available in Java 4)?
Is this thread-safe provided that no other thread accesses someObject.get() until after it's set() has been called. The other threads will only invoke methods on MyClass between startup() and shutdown() - the framework guarantees this.
Given the completely unsynchronized WoRmObject container, it is ever possible under either JMM to see a value of object which is neither null nor a reference to a SomeObject? In other words, does has the JMM always guaranteed that no thread can observe the memory of an object to be whatever values happened to be on the heap when the object was allocated.
Hello,
Can anybody explain what is difference between :-
@Resource
UserTransaction objUserTransaction;
and
EntityManager.getTransaction();
And also what is container managed transaction? and how should i do it in my session facade if i want to insert three rows in table in transaction.
I need to draw several simple objects (polygons composed by lines and arcs, eventually placed on different layers) inside a form (or any other container) and then handle events like:
right click on object
zoom
pan
Is there a library/framework that can handle my need or do I need to create my own?
I have the URL
http://acme.example.com/view/view_container_content/15?javascript_disabled=true&container=aoeu
but I want it to look like
http://acme.example.com/view/container_name/content_name/
with friendly_id, I've seen how to do URL mapping with one object... but I haven't seen an example with two...
ideas?