From the docs:
You usually access to-many
relationships using
mutableSetValueForKey:, which returns
a proxy object that both mutates the
relationship and sends appropriate
key-value observing notifications for
you.
So this returns an "intelligent" NSMutableSet which automatically lets the context delete objects when they get deleted from the set, and reverse? Is that a proxy object?
So I've found similar questions but none that answer all the questions I have and I know there must be a simple jQuery answer to this. I've got multiple images that are being dynamically placed in their own containing div that have overflow:hidden, they need to fill their containing divs and be centered(horizontally and vertically) also. The containing divs will be different sizes as well.
So in short:
multiple different sized images fill and center in containing div.
containing divs will be different sizes.
will be used multiple times on a page.
Hopefully this image helps explain what I'm after.
Click here to view the image.
HTML I'm using but can be changed
<div class="imageHolder">
<div class="first SlideImage">
<img src="..." alt="..."/>
</div>
<div class="second SlideImage">
<img src="..." alt="..."/>
</div>
<div class="third SlideImage">
<img src="..." alt="..."/>
</div>
</div>
And the CSS
.imageHandler{
float:left;
width:764px;
height:70px;
margin:1px 0px 0px;
}
.imageHolder .SlideImage{
float:left;
position:relative;
overflow:hidden;
}
.imageHolder .SlideImage img{
position:absolute;
}
.imageHolder .first.SlideImage{
width:381px;
height:339px;
margin-right:1px;
}
.imageHolder .second.SlideImage{margin-bottom:1px;}
.imageHolder .second.SlideImage, .imageHolder .third.SlideImage {
width: 382px;
height: 169px;
}
Ask me anything if this doesn't make sense,
thanks in advance
Hi,
I am new to iphone programming designs. I have hundreds of plists on my server. On the first launch i will be downloading all these plists into my application and storing it here. What are all the best ways to save and retrieve these plists in my application ? What are the iPhone libraries that should be used to get the best and memory efficient iphone application ?
I have a datamodel with to-many to-many relations. Using the example of employee database let say the entity division is related to department which in turn is related to employee. The employee has an attribute salary. How best to have a attribute at the level of division which is derived from the salary attribute. For example average salary or maximum salary.
I would need those attributes to sort the list of departments.
From a previous quest we asked about inserting a new attribute into a html tag and the code below does the job nicely, but how should it be coded to add multiple attributes, for example changing..
<body bgcolor="#DDDDDD">
to...
<body bgcolor="#DDDDDD" topmargin="0" leftmargin="0">
The code that works for a single attribute is...
document.getElementsByTagName("body")[0].setAttribute("id", "something");
How to modify this for inserting multiple attributes?
In an interactive session like the following one:
>>> f=open('test.txt','w')
>>> f
<open file 'test.txt', mode 'w' at 0x6e610>
what does 0x6e610 represents and what could i do with that hexadecimal number in python?
Hi,
I have a method (C#)
public void MethodName(List<Order> Order, int ID)
I need to pass this to a main page, in which i know to pass integer value to ID, am not able to pass multiple items in a single list.
The List order should have two number entries, (ie. Order.number1 and Order.number2)
How should i pass a single list as a parameter to this method containing multiple entries of number1 and 2, so that i can loop thro' and find it.
Thanks.
Hello,
I'm using NSPredicates to fetch entities based on a name attribute. Creating a predicate for names beginning with letters was easy (@"name BEGINSWITH %@", searchLetter), however now I'd like to fetch all entities with a name that begins with a numerical value, or rather a non-alphabetical number.
What would be the appropriate predicate expression here?
Right now I don't want to get too deep into predicate programming, as this is all I need right now and time flies. So, please, don't point me to the Predicate Programming Guide, I just need that expression.. :)
Thanks alot guys!
I'm trying to construct a DateTime object with multiple accepted formats.
According to the DateTime::createFromFormat docs, the first parameter (format) must be a string. I was wondering if there was a way to createFromFormats.
In my case, I want the year for my format to be optional:
DateTime::createFromFormat('Y-m-d', $date);
DateTime::createFromFormat('m-d', $date);
so that a user can input just 'm-d' and the year would be assumed 2013. If I wanted multiple accepted formats, would I have to call createFromFormat each time?
Shortest thing for my scenario is:
DateTime::createFromFormat('m-d', $date) ?: DateTime::createFromFormat('Y-m-d', $date);
I have installed cluebringer-2.0.7 for postfix and enabled below lines in
the main.cf file of postfix. But I could not see any policy working
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_policy_service inet:127.0.0.1:10031
smtpd_end_of_data_restrictions=check_policy_service inet:127.0.0.1:10031
To check further I enabled logging in policyd and its only shows below logs
and there is no logs getting populated when I send new emails..
[2012/06/12-21:18:50 - 13949] [CORE] NOTICE: Process Backgrounded
[2012/06/12-21:18:50 - 13949] [CBPOLICYD] NOTICE: Policyd v2 / Cluebringer - v2.0.7
[2012/06/12-21:18:50 - 13949] [CBPOLICYD] NOTICE: Initializing system modules.
[2012/06/12-21:18:50 - 13949] [CBPOLICYD] NOTICE: System modules initialized.
[2012/06/12-21:18:50 - 13949] [CBPOLICYD] NOTICE: Module load started...
[2012/06/12-21:18:50 - 13949] [CORE] NOTICE: = AccessControl: enabled
[2012/06/12-21:18:50 - 13949] [CORE] NOTICE: = CheckHelo: enabled
[2012/06/12-21:18:50 - 13949] [CORE] NOTICE: = CheckSPF: enabled
[2012/06/12-21:18:50 - 13949] [CORE] NOTICE: = Greylisting: enabled
[2012/06/12-21:18:50 - 13949] [CORE] NOTICE: = Quotas: enabled
[2012/06/12-21:18:50 - 13949] [CORE] NOTICE: = Protocol(Postfix): enabled
[2012/06/12-21:18:50 - 13949] [CORE] NOTICE: = Protocol(Bizanga): enabled
[2012/06/12-21:18:50 - 13949] [CBPOLICYD] NOTICE: Module load done.
[2012/06/12-21:18:50 - 13949] [CORE] NOTICE: 2012/06/12-21:18:50 cbp (type Net::Server::PreFork) starting! pid(13949)
[2012/06/12-21:18:50 - 13949] [CORE] NOTICE: Binding to TCP port 10031 on host *
[2012/06/12-21:18:50 - 13949] [CORE] WARNING: Group Not Defined. Defaulting to EGID '0 10 6 4 3 2 1 0'
[2012/06/12-21:18:50 - 13949] [CORE] WARNING: User Not Defined. Defaulting to EUID '0'
Do I need to do anymore settings for postfix to listen on policyd???Please
help
I have an XML file which has many section like the one below :
<Operations>
<Action [some attibutes ...]>
[some complexe content ...]
</Action>
<Action [some attibutes ...]>
[some complexe content ...]
</Action>
</Operations>
I have to add an to every . It seems that an XSLT should be a good solution to this problem :
<xsl:template match="Operations/Action[last()]">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
<Action>[some complexe content ...]</Action>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
My problem is that the content of my contains some xPath expressions. For exemple :
<Action code="p_histo01">
<customScript languageCode="gel">
<gel:script
xmlns:core="jelly:core"
xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sql="jelly:sql"
xmlns:x="jelly:xml"
xmlns:xog="http://www.niku.com/xog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sql:param value="${gel_stepInstanceId}"/>
</gel:script>
</customScript>
</Action>
The '${gel_stepInstanceId}' is interpreted by my XSLT but I would like it to be copied as-is. Is that posible ? How ?
So I have some legacy code which I would love to use more modern techniques. But I fear that given the way that things are designed, it is a non-option. The core issue is that often a node is in more than one list at a time. Something like this:
struct T {
T *next_1;
T *prev_1;
T *next_2;
T *prev_2;
int value;
};
this allows the core have a single object of type T be allocated and inserted into 2 doubly linked lists, nice and efficient.
Obviously I could just have 2 std::list<T*>'s and just insert the object into both...but there is one thing which would be way less efficient...removal.
Often the code needs to "destroy" an object of type T and this includes removing the element from all lists. This is nice because given a T* the code can remove that object from all lists it exists in. With something like a std::list I would need to search for the object to get an iterator, then remove that (I can't just pass around an iterator because it is in several lists).
Is there a nice c++-ish solution to this, or is the manually rolled way the best way? I have a feeling the manually rolled way is the answer, but I figured I'd ask.
When I try and start my app I get this error. I have verified that JarScanner exists in the CATALINA_HOME directory so I dont know why it cant find it. Is there anything that could lead to this issue starting my app? I noticed that earlier in the same log i find this:
[Loaded org.apache.tomcat.JarScanner from file:/usr/local/apache-tomcat-7.0.30/lib/tomcat-api.jar]
Here is the actual error further down:
Oct 8, 2012 1:24:01 PM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/client]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1582)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NoClassDefFoundError: org/apache/tomcat/JarScanner
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.apache.catalina.core.StandardContext.getJarScanner(StandardContext.java:1025)
at org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1911)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1265)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.JarScanner
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 33 more
Oct 8, 2012 1:24:01 PM org.apache.catalina.startup.HostConfig deployDescriptor
SEVERE: Error deploying configuration descriptor /software/sirsi/tomcat_sbox7/conf/Catalina/localhost/client.xml
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/client]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1582)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Oct 8, 2012 1:24:01 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /software/sirsi/tomcat_sbox7/conf/Catalina/localhost/custom.xml
Oct 8, 2012 1:24:01 PM org.apache.catalina.core.StandardContext setPath
WARNING: A context path must either be an empty string or start with a '/'. The path [custom] does not meet these criteria and has been changed to [/custom]
Oct 8, 2012 1:24:01 PM org.apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'debug' to '0' did not find a matching property.
Oct 8, 2012 1:24:01 PM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/custom]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1582)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NoClassDefFoundError: org/apache/tomcat/util/scan/StandardJarScanner
at org.apache.catalina.core.StandardContext.getJarScanner(StandardContext.java:1025)
at org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1911)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1265)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
Oct 8, 2012 1:24:01 PM org.apache.catalina.startup.HostConfig deployDescriptor
SEVERE: Error deploying configuration descriptor /software/sirsi/tomcat_sbox7/conf/Catalina/localhost/custom.xml
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/custom]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1582)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
How do i create multislide application in WPF? What is beast approach? What i need is something very similar to having tabcontrol with multiple pages and navigation buttons bellow, but i dont think that tab control is best for this task. I would like to have each view to be in seperate .xaml + class file. AND- it would be cool to have some animiation, when navigating to another page (like old page slides away or something like that.
What would be best technique to achieve this?
I'm looking for a way to programmatically alter the video properties in Windows 7. I'd like to toggle the Multiple display state (as seen in Control Panel Appearances and Personalization Display Screen Resolution) between "Extend these displays" and "Show desktop only on 1".
This is the sort of thing that I think is probably doable just by knowing the right Windows executable/dll to invoke with the right parameters and bundling that into a script or shortcut, but if so that information eludes me.
Actual code solutions are fine, of course, but I'd like the change to be permanent and not just disable the other monitor(s) for the duration of the application.
Using C# (VS2008) and WIA - scanning to TIFF format;
When I use the scanner for 1 page on the flatbed or document feeder the method executes without any problem.
When I load multiple forms into the feeder the execution halts after scanning the first page (keeping status: "scanning to pc") but does not scan the next document(s).
The method returns the stream of the first page and halts - am able to save the stream and everything; just am lost at what to do next...
What statement am I missing? What am I missing here? TIA!
I have multiple menues on my page...
<div class="menu">
<div>Menu header</div>
<div>Menu content</div>// should hide on click outside .menu
</div>
<div class="menu">
<div>Menu header</div>
<div>Menu content</div>// should hide on click outside .menu
</div>
basically i need all the menu(s) to hide when a click is detected unless someone is clicking any of the menues it should hide any other menu(s) apart from the menu they clicked on.
I have seen a few that work but only if you have one menu on the page which is not exactly useful using stopPropagation as it may cancel any other necessary instructions;
any ideas would be appriciated.