PostId int64 13 11.8M | PostCreationDate stringlengths 19 19 | OwnerUserId int64 3 1.57M | OwnerCreationDate stringlengths 10 19 | ReputationAtPostCreation int64 -33 210k | OwnerUndeletedAnswerCountAtPostTime int64 0 5.77k | Title stringlengths 10 250 | BodyMarkdown stringlengths 12 30k | Tag1 stringlengths 1 25 ⌀ | Tag2 stringlengths 1 25 ⌀ | Tag3 stringlengths 1 25 ⌀ | Tag4 stringlengths 1 25 ⌀ | Tag5 stringlengths 1 25 ⌀ | PostClosedDate stringlengths 19 19 ⌀ | OpenStatus stringclasses 5 values | unified_texts stringlengths 47 30.1k | OpenStatus_id int64 0 4 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6,210,902 | 06/02/2011 05:45:38 | 341,129 | 05/14/2010 10:14:24 | 51 | 8 | Examination software | I'm working on an examination software similar to the http://www.exam-software.com/screenshots.htm
I would like to find some open-source clones of such software but I could not.
Have you ever seen any open-source applications related to my task?
Thanks!
P.s. C/C++, C# is required. | c# | c++ | c | exam | null | 06/02/2011 05:50:22 | too localized | Examination software
===
I'm working on an examination software similar to the http://www.exam-software.com/screenshots.htm
I would like to find some open-source clones of such software but I could not.
Have you ever seen any open-source applications related to my task?
Thanks!
P.s. C/C++, C# is required. | 3 |
2,724,508 | 04/27/2010 19:46:57 | 327,207 | 04/27/2010 19:44:04 | 1 | 0 | Keeping track of business rules within IT department? | I am looking for the best way to keep track of the business rules for both developers and everybody else (support staff / management) in a startup enviroment. The challenge is that our business model requires quite a lot of different business rules, which are created pretty much on the fly and evolving organically after that. After running this project for 3+ years, we have so many of such rules that often the only way to be sure about what the application is supposed to do in a certain situation is to go find the module responsible for that process and analyze its code and comments. That is all fine as long as you have one single developer who created the entire application from the scratch, but every new developer needs to go over pretty much entire codebase in order to understand how the application works. Even bigger problem is that non technical employees don't even have that option and therefore are forced to ask me pretty much every day how some certain case would be handled by the application.
Quick example - we only start charging for our customer campaigns once they have been active for at least 72 hours, but at the same time we stop creating invoices for campaigns that belong to insolvent accounts and close such accounts within a month of the first failed charge. That does not apply to accounts that are set to "non-chargeable" which most commonly belongs to us since we are using the service ourselves. The invoices are created on the 1st of each month and include charges from the previous month + any current balance that the account might have. However, some customers are charged only 4 days after their invoice has been generated due to issues with their billing department. In addition to that, invoices are also created when customer deactivates his campaign, but that can only be done once the campaign is not longer under mandatory 6 month contract, unless account manager approves early deactivation.
I know, that's quite a lot of rules that need to be taken into account when answering a question "when do we bill our customers", but actually I could still append an asterisk at the end of each sentence in order to disclose some rare exceptions. Of course, it would be easiest just to keep the business rules to the minimum, but we need to adapt to changing marketplace - i.e. less than a year ago we had no contracts whatsoever.
One idea that I had so far was a simplistic wiki with categories corresponding to areas such as "Account activation", "Invoicing", "Collection procedures" and so on. Another idea would be to have giant interactive flowchart showing the entire customer "life cycle" from prospecting to account deactivation.
What are your experiences / suggestions? | business-rules | management | project-management | null | null | null | open | Keeping track of business rules within IT department?
===
I am looking for the best way to keep track of the business rules for both developers and everybody else (support staff / management) in a startup enviroment. The challenge is that our business model requires quite a lot of different business rules, which are created pretty much on the fly and evolving organically after that. After running this project for 3+ years, we have so many of such rules that often the only way to be sure about what the application is supposed to do in a certain situation is to go find the module responsible for that process and analyze its code and comments. That is all fine as long as you have one single developer who created the entire application from the scratch, but every new developer needs to go over pretty much entire codebase in order to understand how the application works. Even bigger problem is that non technical employees don't even have that option and therefore are forced to ask me pretty much every day how some certain case would be handled by the application.
Quick example - we only start charging for our customer campaigns once they have been active for at least 72 hours, but at the same time we stop creating invoices for campaigns that belong to insolvent accounts and close such accounts within a month of the first failed charge. That does not apply to accounts that are set to "non-chargeable" which most commonly belongs to us since we are using the service ourselves. The invoices are created on the 1st of each month and include charges from the previous month + any current balance that the account might have. However, some customers are charged only 4 days after their invoice has been generated due to issues with their billing department. In addition to that, invoices are also created when customer deactivates his campaign, but that can only be done once the campaign is not longer under mandatory 6 month contract, unless account manager approves early deactivation.
I know, that's quite a lot of rules that need to be taken into account when answering a question "when do we bill our customers", but actually I could still append an asterisk at the end of each sentence in order to disclose some rare exceptions. Of course, it would be easiest just to keep the business rules to the minimum, but we need to adapt to changing marketplace - i.e. less than a year ago we had no contracts whatsoever.
One idea that I had so far was a simplistic wiki with categories corresponding to areas such as "Account activation", "Invoicing", "Collection procedures" and so on. Another idea would be to have giant interactive flowchart showing the entire customer "life cycle" from prospecting to account deactivation.
What are your experiences / suggestions? | 0 |
6,512,961 | 06/28/2011 20:54:35 | 667,776 | 03/19/2011 23:14:26 | 320 | 61 | How can I Optimize my WordPress Blog ? | WordPress broke my server and i want to ask:
How can i optimizate or cache my wordpress blog?
Can i use some plugin like "WP Super Cache" or "W3 Total Cache" and which is the best? | wordpress | caching | optimization | performance | null | 06/30/2011 10:40:29 | off topic | How can I Optimize my WordPress Blog ?
===
WordPress broke my server and i want to ask:
How can i optimizate or cache my wordpress blog?
Can i use some plugin like "WP Super Cache" or "W3 Total Cache" and which is the best? | 2 |
6,966,539 | 08/06/2011 11:38:07 | 260,480 | 01/27/2010 22:03:33 | 502 | 20 | How to query for models with specific parent (not any ancestor) in GAE | The [docs says][1] that `ancestor` will apply a filter of given ancestor being somewhere in the ancestry tree.
> You can filter your datastore queries to a specified ancestor, so that results contain only entities containing that ancestor. In other words, all of the results will have the **ancestor as their parent, or parent's parent**, or etc. Passing None as a parameter does not query for entities without ancestors and will return errors.
Can I somehow filter on one level, immediate ancestor relationship so that a query will provide models having specific parent? Or must I store parent relationship in a `ReferenceProperty` and filter on that?
[1]: http://code.google.com/intl/pl-PL/appengine/docs/python/datastore/queries.html#Ancestor_Queries | python | google-app-engine | gae-datastore | null | null | null | open | How to query for models with specific parent (not any ancestor) in GAE
===
The [docs says][1] that `ancestor` will apply a filter of given ancestor being somewhere in the ancestry tree.
> You can filter your datastore queries to a specified ancestor, so that results contain only entities containing that ancestor. In other words, all of the results will have the **ancestor as their parent, or parent's parent**, or etc. Passing None as a parameter does not query for entities without ancestors and will return errors.
Can I somehow filter on one level, immediate ancestor relationship so that a query will provide models having specific parent? Or must I store parent relationship in a `ReferenceProperty` and filter on that?
[1]: http://code.google.com/intl/pl-PL/appengine/docs/python/datastore/queries.html#Ancestor_Queries | 0 |
6,689,236 | 07/14/2011 06:26:34 | 826,771 | 07/03/2011 10:03:35 | 3 | 0 | need to return multiple values from NPAPI function | I am trying to create an NPAPI plugin where I call a javascript function and return some value from plugin. I did this by setting fields in NPVariant pointer. But since its a structure, I can put only one string at a time.
In few cases I need to return multiple values or array from NPAPI function to javascript. Any idea about how to achieve this? | plugins | google-chrome | npapi | null | null | null | open | need to return multiple values from NPAPI function
===
I am trying to create an NPAPI plugin where I call a javascript function and return some value from plugin. I did this by setting fields in NPVariant pointer. But since its a structure, I can put only one string at a time.
In few cases I need to return multiple values or array from NPAPI function to javascript. Any idea about how to achieve this? | 0 |
11,039,347 | 06/14/2012 18:39:47 | 1,017,247 | 10/27/2011 19:55:01 | 8 | 0 | Python: Tkinter paragraph | http://i.stack.imgur.com/ywFrq.png
(Please view this, can't upload images because of newbie restriction)
So yeah as you can see I want a paragraph exactly where the red line is. The buttons should appear beneath the 2 text boxes.
Current bit of code:
window = Tk()
window.title("Taschenrechner")
window.label_zahl1 = Label(window, text = 'Zahl 1:', anchor = W, justify = LEFT)
window.label_zahl1.pack(side=LEFT)
window.entry_zahl1 = Entry()
window.entry_zahl1.pack(side=LEFT)
window.label = Label(window, text = '\n')
window.label.pack(side=LEFT)
window.label_zahl2 = Label(window, text = 'Zahl 2:')
window.label_zahl2.pack(side=LEFT)
window.entry_zahl2 = Entry()
window.entry_zahl2.pack(side=LEFT)
window.button_plus = Button(window, text = "+")
window.button_plus.pack(side=LEFT)
window.button_minus = Button(window, text = "-")
window.button_minus.pack(side=LEFT)
window.button_divi = Button(window, text = "/")
window.button_divi.pack(side=RIGHT)
window.button_mal = Button(window, text = "*")
window.button_mal.pack(side=RIGHT)
window.ausgabe = Label(master = window, text = "")
window.ausgabe.pack()
window.mainloop() | python | tkinter | paragraph | null | null | null | open | Python: Tkinter paragraph
===
http://i.stack.imgur.com/ywFrq.png
(Please view this, can't upload images because of newbie restriction)
So yeah as you can see I want a paragraph exactly where the red line is. The buttons should appear beneath the 2 text boxes.
Current bit of code:
window = Tk()
window.title("Taschenrechner")
window.label_zahl1 = Label(window, text = 'Zahl 1:', anchor = W, justify = LEFT)
window.label_zahl1.pack(side=LEFT)
window.entry_zahl1 = Entry()
window.entry_zahl1.pack(side=LEFT)
window.label = Label(window, text = '\n')
window.label.pack(side=LEFT)
window.label_zahl2 = Label(window, text = 'Zahl 2:')
window.label_zahl2.pack(side=LEFT)
window.entry_zahl2 = Entry()
window.entry_zahl2.pack(side=LEFT)
window.button_plus = Button(window, text = "+")
window.button_plus.pack(side=LEFT)
window.button_minus = Button(window, text = "-")
window.button_minus.pack(side=LEFT)
window.button_divi = Button(window, text = "/")
window.button_divi.pack(side=RIGHT)
window.button_mal = Button(window, text = "*")
window.button_mal.pack(side=RIGHT)
window.ausgabe = Label(master = window, text = "")
window.ausgabe.pack()
window.mainloop() | 0 |
9,446,976 | 02/25/2012 18:48:07 | 1,206,987 | 02/13/2012 14:18:37 | 20 | 0 | Blender 3D design | I want to design a 3d living room using Blender. Can any one help me to find good tutorials. I saw a video tutorial in you tube but it is not enough. Videos or any other form of tutorials are OK.
Thanx. | graphics | 3d | blender | null | null | 02/26/2012 05:33:35 | off topic | Blender 3D design
===
I want to design a 3d living room using Blender. Can any one help me to find good tutorials. I saw a video tutorial in you tube but it is not enough. Videos or any other form of tutorials are OK.
Thanx. | 2 |
8,093,009 | 11/11/2011 11:00:46 | 1,041,485 | 11/11/2011 10:18:49 | 1 | 0 | java.io.NotSerializableException: org.springframework.jdbc.datasource.DriverManagerDataSource | I'm having a java.io.NotSerializableException after deploying in JBoss 5.0.1 my webapp.
All my beans and the managers are serializable objects
Any clue or wrong thing in the following configuration?
This is the aplication context dao.
<bean id="sqlMap" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<value>
classpath:SqlMapConfig.xml
</value>
</property>
<property name="dataSource" ref="fuenteDatos" />
</bean>
<bean id="pedidoAutomaticoALDAO" class="com.atosorigin.arqsab1j.serena.dao.PedidoAutomaticoALDAOImpl">
<property name="sqlMapClient" ref="sqlMap" />
</bean>
<bean id="fuenteDatos" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>com.ibm.as400.access.AS400JDBCDriver</value>
</property>
<property name="url">
<value>jdbc:as400://172.XX.XX:XX;naming=system;extended dynamic=true;package=jbpkg;package cache=true;package library=jboss;errors=full</value>
</property>
<property name="username">
<value>USER</value>
</property>
<property name="password">
<value>PASS</value>
</property>
</bean>
And this is the detailed error.
java.io.NotSerializableException: org.springframework.jdbc.datasource.DriverManagerDataSource
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at org.springframework.transaction.interceptor.TransactionInterceptor.writeObject(TransactionInterceptor.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at java.util.HashMap.writeObject(HashMap.java:1001)
at sun.reflect.GeneratedMethodAccessor307.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at org.jboss.ha.framework.server.SimpleCachableMarshalledValue.serialize(SimpleCachableMarshalledValue.java:271)
at org.jboss.ha.framework.server.SimpleCachableMarshalledValue.writeExternal(SimpleCachableMarshalledValue.java:252)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1429)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1398)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:460)
at org.jboss.cache.marshall.CacheMarshaller300.marshallObject(CacheMarshaller300.java:47)
at org.jboss.cache.marshall.CacheMarshaller200.marshallMap(CacheMarshaller200.java:569)
at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:370)
at org.jboss.cache.marshall.CacheMarshaller300.marshallObject(CacheMarshaller300.java:47)
at org.jboss.cache.marshall.CacheMarshaller200.marshallCommand(CacheMarshaller200.java:519)
at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:314)
at org.jboss.cache.marshall.CacheMarshaller300.marshallObject(CacheMarshaller300.java:47)
at org.jboss.cache.marshall.CacheMarshaller200.marshallCommand(CacheMarshaller200.java:519)
at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:314)
at org.jboss.cache.marshall.CacheMarshaller300.marshallObject(CacheMarshaller300.java:47)
at org.jboss.cache.marshall.CacheMarshaller200.objectToObjectStream(CacheMarshaller200.java:191)
at org.jboss.cache.marshall.CacheMarshaller200.objectToObjectStream(CacheMarshaller200.java:136)
at org.jboss.cache.marshall.VersionAwareMarshaller.objectToBuffer(VersionAwareMarshaller.java:182)
at org.jboss.cache.marshall.VersionAwareMarshaller.objectToBuffer(VersionAwareMarshaller.java:52)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher$ReplicationTask.call(CommandAwareRpcDispatcher.java:369)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher$ReplicationTask.call(CommandAwareRpcDispatcher.java:341)
at org.jboss.cache.util.concurrent.WithinThreadExecutor.submit(WithinThreadExecutor.java:82)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher.invokeRemoteCommands(CommandAwareRpcDispatcher.java:206)
at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:748)
at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:716)
at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:721)
at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:161)
at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:135)
at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:107)
at org.jboss.cache.interceptors.ReplicationInterceptor.handleCrudMethod(ReplicationInterceptor.java:160)
at org.jboss.cache.interceptors.ReplicationInterceptor.visitPutDataMapCommand(ReplicationInterceptor.java:113)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
at org.jboss.cache.commands.AbstractVisitor.visitPutDataMapCommand(AbstractVisitor.java:60)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.TxInterceptor.attachGtxAndPassUpChain(TxInterceptor.java:301)
at org.jboss.cache.interceptors.TxInterceptor.handleDefault(TxInterceptor.java:283)
at org.jboss.cache.commands.AbstractVisitor.visitPutDataMapCommand(AbstractVisitor.java:60)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.CacheMgmtInterceptor.visitPutDataMapCommand(CacheMgmtInterceptor.java:97)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:178)
at org.jboss.cache.interceptors.InvocationContextInterceptor.visitPutDataMapCommand(InvocationContextInterceptor.java:64)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.InterceptorChain.invoke(InterceptorChain.java:287)
at org.jboss.cache.invocation.CacheInvocationDelegate.invokePut(CacheInvocationDelegate.java:705)
at org.jboss.cache.invocation.CacheInvocationDelegate.put(CacheInvocationDelegate.java:519)
at org.jboss.ha.cachemanager.CacheManagerManagedCache.put(CacheManagerManagedCache.java:277)
at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.JBossCacheWrapper.put(JBossCacheWrapper.java:148)
at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.AbstractJBossCacheService.storeSessionData(AbstractJBossCacheService.java:405)
at org.jboss.web.tomcat.service.session.ClusteredSession.processSessionReplication(ClusteredSession.java:1166)
at org.jboss.web.tomcat.service.session.JBossCacheManager.processSessionRepl(JBossCacheManager.java:1937)
at org.jboss.web.tomcat.service.session.JBossCacheManager.storeSession(JBossCacheManager.java:309)
at org.jboss.web.tomcat.service.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:51)
at org.jboss.web.tomcat.service.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:147)
at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:94)
at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteValve.java:88)
at org.jboss.web.tomcat.service.session.LockingValve.invoke(LockingValve.java:62)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)
2011-11-09 23:17:49,286 ERROR [org.jboss.cache.marshall.CommandAwareRpcDispatcher] java.io.NotSerializableException: org.springframework.jdbc.datasource.DriverManagerDataSource
2011-11-09 23:17:49,287 WARN [org.jboss.web.tomcat.service.session.InstantSnapshotManager./a2tweb] Failed to replicate session q77Kw36KPdg6VlXgGA0-dw__.nodocluster1
java.lang.RuntimeException: Failure to marshal argument(s)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher$ReplicationTask.call(CommandAwareRpcDispatcher.java:374)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher$ReplicationTask.call(CommandAwareRpcDispatcher.java:341)
at org.jboss.cache.util.concurrent.WithinThreadExecutor.submit(WithinThreadExecutor.java:82)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher.invokeRemoteCommands(CommandAwareRpcDispatcher.java:206)
at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:748)
at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:716)
at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:721)
at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:161)
at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:135)
at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:107)
at org.jboss.cache.interceptors.ReplicationInterceptor.handleCrudMethod(ReplicationInterceptor.java:160)
at org.jboss.cache.interceptors.ReplicationInterceptor.visitPutDataMapCommand(ReplicationInterceptor.java:113)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
at org.jboss.cache.commands.AbstractVisitor.visitPutDataMapCommand(AbstractVisitor.java:60)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.TxInterceptor.attachGtxAndPassUpChain(TxInterceptor.java:301)
at org.jboss.cache.interceptors.TxInterceptor.handleDefault(TxInterceptor.java:283)
at org.jboss.cache.commands.AbstractVisitor.visitPutDataMapCommand(AbstractVisitor.java:60)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.CacheMgmtInterceptor.visitPutDataMapCommand(CacheMgmtInterceptor.java:97)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:178)
at org.jboss.cache.interceptors.InvocationContextInterceptor.visitPutDataMapCommand(InvocationContextInterceptor.java:64)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.InterceptorChain.invoke(InterceptorChain.java:287)
at org.jboss.cache.invocation.CacheInvocationDelegate.invokePut(CacheInvocationDelegate.java:705)
at org.jboss.cache.invocation.CacheInvocationDelegate.put(CacheInvocationDelegate.java:519)
at org.jboss.ha.cachemanager.CacheManagerManagedCache.put(CacheManagerManagedCache.java:277)
at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.JBossCacheWrapper.put(JBossCacheWrapper.java:148)
at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.AbstractJBossCacheService.storeSessionData(AbstractJBossCacheService.java:405)
at org.jboss.web.tomcat.service.session.ClusteredSession.processSessionReplication(ClusteredSession.java:1166)
at org.jboss.web.tomcat.service.session.JBossCacheManager.processSessionRepl(JBossCacheManager.java:1937)
at org.jboss.web.tomcat.service.session.JBossCacheManager.storeSession(JBossCacheManager.java:309)
at org.jboss.web.tomcat.service.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:51)
at org.jboss.web.tomcat.service.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:147)
at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:94)
at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteValve.java:88)
at org.jboss.web.tomcat.service.session.LockingValve.invoke(LockingValve.java:62)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.NotSerializableException: org.springframework.jdbc.datasource.DriverManagerDataSource
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at org.springframework.transaction.interceptor.TransactionInterceptor.writeObject(TransactionInterceptor.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at java.util.HashMap.writeObject(HashMap.java:1001)
at sun.reflect.GeneratedMethodAccessor307.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at org.jboss.ha.framework.server.SimpleCachableMarshalledValue.serialize(SimpleCachableMarshalledValue.java:271)
at org.jboss.ha.framework.server.SimpleCachableMarshalledValue.writeExternal(SimpleCachableMarshalledValue.java:252)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1429)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1398)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:460)
at org.jboss.cache.marshall.CacheMarshaller300.marshallObject(CacheMarshaller300.java:47)
at org.jboss.cache.marshall.CacheMarshaller200.marshallMap(CacheMarshaller200.java:569)
at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:370)
at org.jboss.cache.marshall.CacheMarshaller300.marshallObject(CacheMarshaller300.java:47)
at org.jboss.cache.marshall.CacheMarshaller200.marshallCommand(CacheMarshaller200.java:519)
at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:314)
at org.jboss.cache.marshall.CacheMarshaller300.marshallObject(CacheMarshaller300.java:47)
at org.jboss.cache.marshall.CacheMarshaller200.marshallCommand(CacheMarshaller200.java:519)
at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:314)
at org.jboss.cache.marshall.CacheMarshaller300.marshallObject(CacheMarshaller300.java:47)
at org.jboss.cache.marshall.CacheMarshaller200.objectToObjectStream(CacheMarshaller200.java:191)
at org.jboss.cache.marshall.CacheMarshaller200.objectToObjectStream(CacheMarshaller200.java:136)
at org.jboss.cache.marshall.VersionAwareMarshaller.objectToBuffer(VersionAwareMarshaller.java:182)
at org.jboss.cache.marshall.VersionAwareMarshaller.objectToBuffer(VersionAwareMarshaller.java:52)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher$ReplicationTask.call(CommandAwareRpcDispatcher.java:369)
... 54 more
2011-11-09 23:17:49,658 ERROR [org.jboss.cache.marshall.CacheMarshaller300] Error while marshalling object: ReplicateCommand{cmds=PutDataMapCommand{fqn=/JSESSION/a2tweb_localhost/q77Kw36KPdg6VlXgGA0-dw__, dataVersion=null, data={0=2, 1=1320880669359, 2=org.jboss.web.tomcat.service.session.distributedcache.spi.DistributableSessionMetadata@38dfcb48, 3=org.jboss.ha.framework.server.SimpleCachableMarshalledValue{raw={javax.faces.request.charset=UTF-8, UsuarioSeguridadBackingBean=com.atosorigin.arqsab1j.serena.controller.UsuarioSeguridadBackingBean@5fd79fdc}serialized=false}}, globalTransaction=null, erase=false}} | spring | cluster-computing | null | null | null | 11/11/2011 11:07:09 | not a real question | java.io.NotSerializableException: org.springframework.jdbc.datasource.DriverManagerDataSource
===
I'm having a java.io.NotSerializableException after deploying in JBoss 5.0.1 my webapp.
All my beans and the managers are serializable objects
Any clue or wrong thing in the following configuration?
This is the aplication context dao.
<bean id="sqlMap" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<value>
classpath:SqlMapConfig.xml
</value>
</property>
<property name="dataSource" ref="fuenteDatos" />
</bean>
<bean id="pedidoAutomaticoALDAO" class="com.atosorigin.arqsab1j.serena.dao.PedidoAutomaticoALDAOImpl">
<property name="sqlMapClient" ref="sqlMap" />
</bean>
<bean id="fuenteDatos" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>com.ibm.as400.access.AS400JDBCDriver</value>
</property>
<property name="url">
<value>jdbc:as400://172.XX.XX:XX;naming=system;extended dynamic=true;package=jbpkg;package cache=true;package library=jboss;errors=full</value>
</property>
<property name="username">
<value>USER</value>
</property>
<property name="password">
<value>PASS</value>
</property>
</bean>
And this is the detailed error.
java.io.NotSerializableException: org.springframework.jdbc.datasource.DriverManagerDataSource
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at org.springframework.transaction.interceptor.TransactionInterceptor.writeObject(TransactionInterceptor.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at java.util.HashMap.writeObject(HashMap.java:1001)
at sun.reflect.GeneratedMethodAccessor307.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at org.jboss.ha.framework.server.SimpleCachableMarshalledValue.serialize(SimpleCachableMarshalledValue.java:271)
at org.jboss.ha.framework.server.SimpleCachableMarshalledValue.writeExternal(SimpleCachableMarshalledValue.java:252)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1429)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1398)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:460)
at org.jboss.cache.marshall.CacheMarshaller300.marshallObject(CacheMarshaller300.java:47)
at org.jboss.cache.marshall.CacheMarshaller200.marshallMap(CacheMarshaller200.java:569)
at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:370)
at org.jboss.cache.marshall.CacheMarshaller300.marshallObject(CacheMarshaller300.java:47)
at org.jboss.cache.marshall.CacheMarshaller200.marshallCommand(CacheMarshaller200.java:519)
at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:314)
at org.jboss.cache.marshall.CacheMarshaller300.marshallObject(CacheMarshaller300.java:47)
at org.jboss.cache.marshall.CacheMarshaller200.marshallCommand(CacheMarshaller200.java:519)
at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:314)
at org.jboss.cache.marshall.CacheMarshaller300.marshallObject(CacheMarshaller300.java:47)
at org.jboss.cache.marshall.CacheMarshaller200.objectToObjectStream(CacheMarshaller200.java:191)
at org.jboss.cache.marshall.CacheMarshaller200.objectToObjectStream(CacheMarshaller200.java:136)
at org.jboss.cache.marshall.VersionAwareMarshaller.objectToBuffer(VersionAwareMarshaller.java:182)
at org.jboss.cache.marshall.VersionAwareMarshaller.objectToBuffer(VersionAwareMarshaller.java:52)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher$ReplicationTask.call(CommandAwareRpcDispatcher.java:369)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher$ReplicationTask.call(CommandAwareRpcDispatcher.java:341)
at org.jboss.cache.util.concurrent.WithinThreadExecutor.submit(WithinThreadExecutor.java:82)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher.invokeRemoteCommands(CommandAwareRpcDispatcher.java:206)
at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:748)
at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:716)
at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:721)
at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:161)
at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:135)
at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:107)
at org.jboss.cache.interceptors.ReplicationInterceptor.handleCrudMethod(ReplicationInterceptor.java:160)
at org.jboss.cache.interceptors.ReplicationInterceptor.visitPutDataMapCommand(ReplicationInterceptor.java:113)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
at org.jboss.cache.commands.AbstractVisitor.visitPutDataMapCommand(AbstractVisitor.java:60)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.TxInterceptor.attachGtxAndPassUpChain(TxInterceptor.java:301)
at org.jboss.cache.interceptors.TxInterceptor.handleDefault(TxInterceptor.java:283)
at org.jboss.cache.commands.AbstractVisitor.visitPutDataMapCommand(AbstractVisitor.java:60)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.CacheMgmtInterceptor.visitPutDataMapCommand(CacheMgmtInterceptor.java:97)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:178)
at org.jboss.cache.interceptors.InvocationContextInterceptor.visitPutDataMapCommand(InvocationContextInterceptor.java:64)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.InterceptorChain.invoke(InterceptorChain.java:287)
at org.jboss.cache.invocation.CacheInvocationDelegate.invokePut(CacheInvocationDelegate.java:705)
at org.jboss.cache.invocation.CacheInvocationDelegate.put(CacheInvocationDelegate.java:519)
at org.jboss.ha.cachemanager.CacheManagerManagedCache.put(CacheManagerManagedCache.java:277)
at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.JBossCacheWrapper.put(JBossCacheWrapper.java:148)
at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.AbstractJBossCacheService.storeSessionData(AbstractJBossCacheService.java:405)
at org.jboss.web.tomcat.service.session.ClusteredSession.processSessionReplication(ClusteredSession.java:1166)
at org.jboss.web.tomcat.service.session.JBossCacheManager.processSessionRepl(JBossCacheManager.java:1937)
at org.jboss.web.tomcat.service.session.JBossCacheManager.storeSession(JBossCacheManager.java:309)
at org.jboss.web.tomcat.service.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:51)
at org.jboss.web.tomcat.service.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:147)
at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:94)
at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteValve.java:88)
at org.jboss.web.tomcat.service.session.LockingValve.invoke(LockingValve.java:62)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)
2011-11-09 23:17:49,286 ERROR [org.jboss.cache.marshall.CommandAwareRpcDispatcher] java.io.NotSerializableException: org.springframework.jdbc.datasource.DriverManagerDataSource
2011-11-09 23:17:49,287 WARN [org.jboss.web.tomcat.service.session.InstantSnapshotManager./a2tweb] Failed to replicate session q77Kw36KPdg6VlXgGA0-dw__.nodocluster1
java.lang.RuntimeException: Failure to marshal argument(s)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher$ReplicationTask.call(CommandAwareRpcDispatcher.java:374)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher$ReplicationTask.call(CommandAwareRpcDispatcher.java:341)
at org.jboss.cache.util.concurrent.WithinThreadExecutor.submit(WithinThreadExecutor.java:82)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher.invokeRemoteCommands(CommandAwareRpcDispatcher.java:206)
at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:748)
at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:716)
at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:721)
at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:161)
at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:135)
at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:107)
at org.jboss.cache.interceptors.ReplicationInterceptor.handleCrudMethod(ReplicationInterceptor.java:160)
at org.jboss.cache.interceptors.ReplicationInterceptor.visitPutDataMapCommand(ReplicationInterceptor.java:113)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
at org.jboss.cache.commands.AbstractVisitor.visitPutDataMapCommand(AbstractVisitor.java:60)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.TxInterceptor.attachGtxAndPassUpChain(TxInterceptor.java:301)
at org.jboss.cache.interceptors.TxInterceptor.handleDefault(TxInterceptor.java:283)
at org.jboss.cache.commands.AbstractVisitor.visitPutDataMapCommand(AbstractVisitor.java:60)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.CacheMgmtInterceptor.visitPutDataMapCommand(CacheMgmtInterceptor.java:97)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:178)
at org.jboss.cache.interceptors.InvocationContextInterceptor.visitPutDataMapCommand(InvocationContextInterceptor.java:64)
at org.jboss.cache.commands.write.PutDataMapCommand.acceptVisitor(PutDataMapCommand.java:104)
at org.jboss.cache.interceptors.InterceptorChain.invoke(InterceptorChain.java:287)
at org.jboss.cache.invocation.CacheInvocationDelegate.invokePut(CacheInvocationDelegate.java:705)
at org.jboss.cache.invocation.CacheInvocationDelegate.put(CacheInvocationDelegate.java:519)
at org.jboss.ha.cachemanager.CacheManagerManagedCache.put(CacheManagerManagedCache.java:277)
at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.JBossCacheWrapper.put(JBossCacheWrapper.java:148)
at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.AbstractJBossCacheService.storeSessionData(AbstractJBossCacheService.java:405)
at org.jboss.web.tomcat.service.session.ClusteredSession.processSessionReplication(ClusteredSession.java:1166)
at org.jboss.web.tomcat.service.session.JBossCacheManager.processSessionRepl(JBossCacheManager.java:1937)
at org.jboss.web.tomcat.service.session.JBossCacheManager.storeSession(JBossCacheManager.java:309)
at org.jboss.web.tomcat.service.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:51)
at org.jboss.web.tomcat.service.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:147)
at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:94)
at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteValve.java:88)
at org.jboss.web.tomcat.service.session.LockingValve.invoke(LockingValve.java:62)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.NotSerializableException: org.springframework.jdbc.datasource.DriverManagerDataSource
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at org.springframework.transaction.interceptor.TransactionInterceptor.writeObject(TransactionInterceptor.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at java.util.HashMap.writeObject(HashMap.java:1001)
at sun.reflect.GeneratedMethodAccessor307.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at org.jboss.ha.framework.server.SimpleCachableMarshalledValue.serialize(SimpleCachableMarshalledValue.java:271)
at org.jboss.ha.framework.server.SimpleCachableMarshalledValue.writeExternal(SimpleCachableMarshalledValue.java:252)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1429)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1398)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:460)
at org.jboss.cache.marshall.CacheMarshaller300.marshallObject(CacheMarshaller300.java:47)
at org.jboss.cache.marshall.CacheMarshaller200.marshallMap(CacheMarshaller200.java:569)
at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:370)
at org.jboss.cache.marshall.CacheMarshaller300.marshallObject(CacheMarshaller300.java:47)
at org.jboss.cache.marshall.CacheMarshaller200.marshallCommand(CacheMarshaller200.java:519)
at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:314)
at org.jboss.cache.marshall.CacheMarshaller300.marshallObject(CacheMarshaller300.java:47)
at org.jboss.cache.marshall.CacheMarshaller200.marshallCommand(CacheMarshaller200.java:519)
at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:314)
at org.jboss.cache.marshall.CacheMarshaller300.marshallObject(CacheMarshaller300.java:47)
at org.jboss.cache.marshall.CacheMarshaller200.objectToObjectStream(CacheMarshaller200.java:191)
at org.jboss.cache.marshall.CacheMarshaller200.objectToObjectStream(CacheMarshaller200.java:136)
at org.jboss.cache.marshall.VersionAwareMarshaller.objectToBuffer(VersionAwareMarshaller.java:182)
at org.jboss.cache.marshall.VersionAwareMarshaller.objectToBuffer(VersionAwareMarshaller.java:52)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher$ReplicationTask.call(CommandAwareRpcDispatcher.java:369)
... 54 more
2011-11-09 23:17:49,658 ERROR [org.jboss.cache.marshall.CacheMarshaller300] Error while marshalling object: ReplicateCommand{cmds=PutDataMapCommand{fqn=/JSESSION/a2tweb_localhost/q77Kw36KPdg6VlXgGA0-dw__, dataVersion=null, data={0=2, 1=1320880669359, 2=org.jboss.web.tomcat.service.session.distributedcache.spi.DistributableSessionMetadata@38dfcb48, 3=org.jboss.ha.framework.server.SimpleCachableMarshalledValue{raw={javax.faces.request.charset=UTF-8, UsuarioSeguridadBackingBean=com.atosorigin.arqsab1j.serena.controller.UsuarioSeguridadBackingBean@5fd79fdc}serialized=false}}, globalTransaction=null, erase=false}} | 1 |
1,868,491 | 12/08/2009 17:22:09 | 227,324 | 12/08/2009 17:22:09 | 1 | 0 | HTML text does not disappear... both is visible!?!?! | after including sIFR3 and configure the sifr-config.js the new flash-font ist shown! But also the HTML-text is visible...
How can i hide the old html-text!?!??!
THNX Mike | sifr3 | null | null | null | null | 12/09/2009 10:56:23 | not a real question | HTML text does not disappear... both is visible!?!?!
===
after including sIFR3 and configure the sifr-config.js the new flash-font ist shown! But also the HTML-text is visible...
How can i hide the old html-text!?!??!
THNX Mike | 1 |
11,154,430 | 06/22/2012 10:25:35 | 1,474,514 | 06/22/2012 10:18:09 | 1 | 0 | How to make internal link between lots of articles? | I have a huge data of articles and i want make link to connect one article to another article.
e.g. I have an article, "this is all about computer science". then computer science become link that have address of another computer science article.
Like i set some keywords and according to that matching keyword will become a link like Wikipedia. i want this is php.
I used some regular expression but that are not working properly.
Please help me out
Thanks. | php | php5 | null | null | null | 06/23/2012 16:03:56 | not a real question | How to make internal link between lots of articles?
===
I have a huge data of articles and i want make link to connect one article to another article.
e.g. I have an article, "this is all about computer science". then computer science become link that have address of another computer science article.
Like i set some keywords and according to that matching keyword will become a link like Wikipedia. i want this is php.
I used some regular expression but that are not working properly.
Please help me out
Thanks. | 1 |
2,920,076 | 05/27/2010 09:58:02 | 261,496 | 01/29/2010 01:37:44 | 49 | 0 | HTML / CSS How to add image icon to input type="button" ? | I'm using this css, but it puts an image in the center. Any way to left or right align an icon using an input type="button" html button, so that the text and the image fit on the button nicely?
background: url('/common/assets/images/icons/16x16/add.png');background-position:center;background-repeat:no-repeat; | html | css | null | null | null | null | open | HTML / CSS How to add image icon to input type="button" ?
===
I'm using this css, but it puts an image in the center. Any way to left or right align an icon using an input type="button" html button, so that the text and the image fit on the button nicely?
background: url('/common/assets/images/icons/16x16/add.png');background-position:center;background-repeat:no-repeat; | 0 |
10,735,670 | 05/24/2012 10:28:21 | 761,411 | 05/19/2011 16:04:02 | 43 | 2 | One target page for all ajax calls or one for each | If I have two (or more) ajax calls on my page, ajax1 and ajax2, do I make one general target url ajax.php that conditionally returns a string, or do I make a target php page per call, ajax1.php and ajax2.php?
| php | javascript | ajax | call | echo | 05/24/2012 10:53:05 | not a real question | One target page for all ajax calls or one for each
===
If I have two (or more) ajax calls on my page, ajax1 and ajax2, do I make one general target url ajax.php that conditionally returns a string, or do I make a target php page per call, ajax1.php and ajax2.php?
| 1 |
8,153,907 | 11/16/2011 15:12:56 | 970,707 | 09/29/2011 08:33:26 | 33 | 3 | Styles from resources aren't used when UserControl is instantiated in other class | I create custom Expander inherited from common Expander. I have a file with styles at path `MyAssembly/Theme/generic.xaml`. I can see that **styles are applied in designer but are not in running program**.
MyExpander.xaml:
<Expander x:Class="Path.To.MyExpander"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008">
<Expander.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MyAssembly;component/Theme/generic.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Expander.Resources>
...
generic.xaml:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008">
...
code where I instanciate the expanders:
class Viewer
{
private void GenerateExpanders()
{
this.Expanders.Children.Clear();
foreach (...)
{
MyExpander ex = new MyExpander();
ex.HeaderText.Text = "Sample";
ex.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
ex.IsExpanded = true;
this.Expanders.Children.Add(ex);
}
}
}
All three files are in one assembly but class Viewer is instantiated in another assembly.
Is there something am I doing wrong? | wpf | resources | styles | null | null | null | open | Styles from resources aren't used when UserControl is instantiated in other class
===
I create custom Expander inherited from common Expander. I have a file with styles at path `MyAssembly/Theme/generic.xaml`. I can see that **styles are applied in designer but are not in running program**.
MyExpander.xaml:
<Expander x:Class="Path.To.MyExpander"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008">
<Expander.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MyAssembly;component/Theme/generic.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Expander.Resources>
...
generic.xaml:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008">
...
code where I instanciate the expanders:
class Viewer
{
private void GenerateExpanders()
{
this.Expanders.Children.Clear();
foreach (...)
{
MyExpander ex = new MyExpander();
ex.HeaderText.Text = "Sample";
ex.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
ex.IsExpanded = true;
this.Expanders.Children.Add(ex);
}
}
}
All three files are in one assembly but class Viewer is instantiated in another assembly.
Is there something am I doing wrong? | 0 |
5,193,995 | 03/04/2011 12:56:55 | 248,756 | 01/12/2010 09:41:09 | 786 | 34 | Which function is faster? substr() or str_replace()? | I have a script where I can use either `substr()` or `str_replace()`. With `substr()` I just have to cut off the last character and with str_replace I need to replace `!` with nothing. Which one would be faster?
I guess `substr()`? | php | substring | str-replace | substr | null | 03/04/2011 13:04:24 | too localized | Which function is faster? substr() or str_replace()?
===
I have a script where I can use either `substr()` or `str_replace()`. With `substr()` I just have to cut off the last character and with str_replace I need to replace `!` with nothing. Which one would be faster?
I guess `substr()`? | 3 |
10,016,873 | 04/04/2012 18:09:23 | 1,165,441 | 01/23/2012 17:10:47 | 15 | 3 | I am just wondering what is the "best" practice nowadays when handling user authentication and registration? | Right now I am using django-registration and the built in log in but I would like to make the website more user friendly so basically have registrations or logins via OpenID etc. I would also like it secure with some sort of captcha.
Thanks | python | django | null | null | null | 04/04/2012 18:25:07 | not constructive | I am just wondering what is the "best" practice nowadays when handling user authentication and registration?
===
Right now I am using django-registration and the built in log in but I would like to make the website more user friendly so basically have registrations or logins via OpenID etc. I would also like it secure with some sort of captcha.
Thanks | 4 |
11,743,981 | 07/31/2012 15:45:27 | 1,234,693 | 02/27/2012 02:49:11 | 71 | 4 | Where does the text in a thrown exception go? | Apologies if this is basic or duplicated - I did several searches first but didn't find anything that answered this.
If I do something basic like:
throw exception("This thing didn't work");
Where can I see that? The string doesn't show up in the output console, stack trace, or any of the .log files associated with the project. Makes me wonder why I'm even putting a string there if it can't be seen anywhere. I can of course use the stack trace to see where it blew up, but that kind of defeats the purpose of having exceptions in the first place.
In Java, when I give it a string, I'll see that string in the output somewhere. I just wonder if it's possible to reproduce this behavior in C++. | c++ | exception | null | null | null | null | open | Where does the text in a thrown exception go?
===
Apologies if this is basic or duplicated - I did several searches first but didn't find anything that answered this.
If I do something basic like:
throw exception("This thing didn't work");
Where can I see that? The string doesn't show up in the output console, stack trace, or any of the .log files associated with the project. Makes me wonder why I'm even putting a string there if it can't be seen anywhere. I can of course use the stack trace to see where it blew up, but that kind of defeats the purpose of having exceptions in the first place.
In Java, when I give it a string, I'll see that string in the output somewhere. I just wonder if it's possible to reproduce this behavior in C++. | 0 |
3,188,614 | 07/06/2010 17:23:30 | 217,189 | 11/23/2009 17:28:05 | 984 | 35 | What are the most important algorithms? | Christoph Koutschan has set up [an interesting survey][1] that tries to identify the most important algorithms "in the world". Since one of the criteria is that "the algorithm has to be widely used" I though that extending the survey to the huge group of users at Stack Overflow would be a natural thing to do.
So, what do you think? Which algorithms deserve a place in the Algorithm Hall of Fame?
[1]: http://www.risc.jku.at/people/ckoutsch/stuff/e_algorithms.html | algorithm | theory | null | null | null | 07/06/2010 17:37:23 | not constructive | What are the most important algorithms?
===
Christoph Koutschan has set up [an interesting survey][1] that tries to identify the most important algorithms "in the world". Since one of the criteria is that "the algorithm has to be widely used" I though that extending the survey to the huge group of users at Stack Overflow would be a natural thing to do.
So, what do you think? Which algorithms deserve a place in the Algorithm Hall of Fame?
[1]: http://www.risc.jku.at/people/ckoutsch/stuff/e_algorithms.html | 4 |
1,212,532 | 07/31/2009 13:26:33 | 99,573 | 05/01/2009 19:44:24 | 11 | 4 | Blogs and Books on Encryption and Security | Could any of you experienced programmers / ethical hackers out there recommend some blogs or books on security/encryption? The only blogs I look at now are
.Net Security Blog (http://blogs.msdn.com/shawnfa/archive/2009/03/17/authenticated-symmetric-encryption-in-net.aspx)
Laptop Security Blog (http://blog.absolute.com/cybercrimes-more-sophisticated-but-so-too-are-countermeasures/)
Schneier On Security (http://www.schneier.com/index.html)
I am especially interested in the mathematical theory behind the security/encryption, not just how to use it. Thanks in advance for all of your help. | security | encryption | math | hacking | null | 09/26/2011 14:34:27 | not constructive | Blogs and Books on Encryption and Security
===
Could any of you experienced programmers / ethical hackers out there recommend some blogs or books on security/encryption? The only blogs I look at now are
.Net Security Blog (http://blogs.msdn.com/shawnfa/archive/2009/03/17/authenticated-symmetric-encryption-in-net.aspx)
Laptop Security Blog (http://blog.absolute.com/cybercrimes-more-sophisticated-but-so-too-are-countermeasures/)
Schneier On Security (http://www.schneier.com/index.html)
I am especially interested in the mathematical theory behind the security/encryption, not just how to use it. Thanks in advance for all of your help. | 4 |
5,980,423 | 05/12/2011 15:25:52 | 682,300 | 03/29/2011 14:52:14 | 9 | 1 | HIPAA Compliancy, What do I need to know? | Ok so I would for a branding company and we're just scratching the surface of collecting pharma data. I know a bit about HIPAA com pliancy but I guess where I'm fuzzy is..
A). when collecting data via a form, do I need to de-identify the data.. I.e. store it across separate tables etc.
B). who/what has access to the functions/procedures to unencrypted any data stored.
C). Can the database be a MySQL database?
D). Do I need a certification/approval/license to do any of this?
Basically what do I need to do, besides encrypting the data and storing it on a HIPAA compliant server. I want to capture customer data via a form. Thanks!
| php | mysql | medical | hipaa | null | 05/12/2011 17:33:43 | off topic | HIPAA Compliancy, What do I need to know?
===
Ok so I would for a branding company and we're just scratching the surface of collecting pharma data. I know a bit about HIPAA com pliancy but I guess where I'm fuzzy is..
A). when collecting data via a form, do I need to de-identify the data.. I.e. store it across separate tables etc.
B). who/what has access to the functions/procedures to unencrypted any data stored.
C). Can the database be a MySQL database?
D). Do I need a certification/approval/license to do any of this?
Basically what do I need to do, besides encrypting the data and storing it on a HIPAA compliant server. I want to capture customer data via a form. Thanks!
| 2 |
6,897,830 | 08/01/2011 11:35:45 | 616,643 | 02/14/2011 18:18:02 | 182 | 9 | jQuery: Remove class containing string | How to select and remove class form the element based on string?
E.g
How to remove `class="s2"` form element `<p class="s2 s4 s5"></p>`
Please note that the order can be different. Any suggestion much appreciated. | jquery | null | null | null | null | null | open | jQuery: Remove class containing string
===
How to select and remove class form the element based on string?
E.g
How to remove `class="s2"` form element `<p class="s2 s4 s5"></p>`
Please note that the order can be different. Any suggestion much appreciated. | 0 |
3,635,867 | 09/03/2010 12:49:06 | 358,471 | 06/04/2010 13:15:15 | 206 | 4 | taking the Swing UI to next level? | i have designed an application using java swing, how to improve the look and feel and User interface? | java | swing | null | null | null | 09/03/2010 13:25:28 | not a real question | taking the Swing UI to next level?
===
i have designed an application using java swing, how to improve the look and feel and User interface? | 1 |
5,244,527 | 03/09/2011 10:37:19 | 651,341 | 03/09/2011 10:24:45 | 1 | 0 | how to acess file from another network | Hi everyone i would like to know how to search a particular file and access that file by specifying the file name in a search text box from another network just by giving the ip address and password ....I am a newbie and it would be great if some one helps me out.... | c# | null | null | null | null | null | open | how to acess file from another network
===
Hi everyone i would like to know how to search a particular file and access that file by specifying the file name in a search text box from another network just by giving the ip address and password ....I am a newbie and it would be great if some one helps me out.... | 0 |
8,336,736 | 12/01/2011 04:58:03 | 688,927 | 04/02/2011 13:07:26 | 131 | 14 | reply to a server-to-server request? | i am trying to setup google checkout on my site, now at one point, google sends me a serial number, to which i am supposed to reply after posting the 'OK' header,
( some details here http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Notification_API.html#responding_to_notifications )
The problem is that, idk how to reply, i am trying this:
{
header('HTTP/1.0 200 OK');
$post = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : file_get_contents("php://input");
$post = substr($post, 14);
$pr = @'<?xml version="1.0" encoding="UTF-8"?>
<notification-acknowledgment xmlns="http://checkout.google.com/schema/2" serial-number="' . $post . '" />';
echo $pr;
if (isset($post)) {
//Something with the DB..
}
After receiving this acknowledgement recieved notification google will stop posting me the request for the same serial numebr, but i keep on getting the requests(know this from db), implying that google is not able to receive my notification acknowledgement.
Where do i err>'?
Thanks a lot for your time.. | php | php5 | google | post | google-checkout | null | open | reply to a server-to-server request?
===
i am trying to setup google checkout on my site, now at one point, google sends me a serial number, to which i am supposed to reply after posting the 'OK' header,
( some details here http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Notification_API.html#responding_to_notifications )
The problem is that, idk how to reply, i am trying this:
{
header('HTTP/1.0 200 OK');
$post = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : file_get_contents("php://input");
$post = substr($post, 14);
$pr = @'<?xml version="1.0" encoding="UTF-8"?>
<notification-acknowledgment xmlns="http://checkout.google.com/schema/2" serial-number="' . $post . '" />';
echo $pr;
if (isset($post)) {
//Something with the DB..
}
After receiving this acknowledgement recieved notification google will stop posting me the request for the same serial numebr, but i keep on getting the requests(know this from db), implying that google is not able to receive my notification acknowledgement.
Where do i err>'?
Thanks a lot for your time.. | 0 |
10,709,515 | 05/22/2012 20:16:29 | 863,975 | 07/26/2011 17:35:27 | 160 | 8 | What client-side events does the standard ASP.NET GridView have? | I've implemented a GridView that is within an UpdatePanel whose trigger is the GridViews SelectedIndexChanged event. As expected, it works very slow. I'd instead like to handle this on the client-side, but cannot find enough information on what client-side events a GridView supports. Can anyone point out any references where this information may be available? | asp.net | gridview | client-side | null | null | null | open | What client-side events does the standard ASP.NET GridView have?
===
I've implemented a GridView that is within an UpdatePanel whose trigger is the GridViews SelectedIndexChanged event. As expected, it works very slow. I'd instead like to handle this on the client-side, but cannot find enough information on what client-side events a GridView supports. Can anyone point out any references where this information may be available? | 0 |
7,760,277 | 10/13/2011 20:52:26 | 802,858 | 06/17/2011 07:48:49 | 13 | 1 | Another e-commerce website has used my exact copy in their own product descriptions | I have just stumbled across a website where the product descriptions are exactly as my own. It is not clear it this is a cut and paste job or whether there is some kind of scraping going on.
It is an e-commerce site which is in competition to my own. Is there anything I can do? Are there rules to prevent this? Copyright? Legal action?
Thank you in advance. | e-commerce | copyright | copyright-law | null | null | 10/16/2011 10:09:15 | off topic | Another e-commerce website has used my exact copy in their own product descriptions
===
I have just stumbled across a website where the product descriptions are exactly as my own. It is not clear it this is a cut and paste job or whether there is some kind of scraping going on.
It is an e-commerce site which is in competition to my own. Is there anything I can do? Are there rules to prevent this? Copyright? Legal action?
Thank you in advance. | 2 |
5,304,758 | 03/14/2011 21:26:32 | 203,141 | 11/05/2009 03:30:35 | 144 | 13 | jquery not() has() | I'm working on a [page][1] on which I'm dynamically creating a Facebook Like button when a user clicks on a picture icon. (Since there are so many items on the page, if I didn't, the page load comes to a severe crawl.).
If I run this in Firebug:
var $clickTrackerGroup= $("#click-tracker-91");
console.log ($(".user-message-block", $clickTrackerGroup).html());
if ($(".user-message-block:has(div.hbo-message_likeBtn)", $clickTrackerGroup)) {
console.log("this group does not have an iframe");
}
I get this:
<div class="image-container">
<img src="http://graph.facebook.com/1422524707/picture" id="person-222-clicked" alt="AMANDA H" title="AMANDA H" width="50px" height="50px"></div>
<div class="user-message">
<span class="message-text">
"ipsum lorem....."</span>
<div class="message-create-time">
<span class="create-time">1/28/2011 7:33:17 AM</span>
<span class="user-name"> - Amanda H.</span>
</div>
</div>
<div class="hbo-message_likeBtn">
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.honeybunchesofoats.com%2FBunchesOfLove.aspx%2FMessage%2F250&layout=standard&show_faces=false&width=250&action=like&colorscheme=light&height=35"
style="border: medium none ; overflow: hidden; width: 250px; height: 35px;" allowtransparency="true"
frameborder="0" scrolling="no"></iframe>
</div>
this group does not have an iframe
I also tried:
if ($(".user-message-block:has(iframe)", $clickTrackerGroup)) {
console.log("this group does not have an iframe");
}
You can plainly see that the this block of html DOES, in fact, have an iframe in it.
How can I successfully test for the existence of this element?
Thanks,
Scott
[1]: http://www.honeybunchesofoats.com/ | jquery | jquery-selectors | null | null | null | null | open | jquery not() has()
===
I'm working on a [page][1] on which I'm dynamically creating a Facebook Like button when a user clicks on a picture icon. (Since there are so many items on the page, if I didn't, the page load comes to a severe crawl.).
If I run this in Firebug:
var $clickTrackerGroup= $("#click-tracker-91");
console.log ($(".user-message-block", $clickTrackerGroup).html());
if ($(".user-message-block:has(div.hbo-message_likeBtn)", $clickTrackerGroup)) {
console.log("this group does not have an iframe");
}
I get this:
<div class="image-container">
<img src="http://graph.facebook.com/1422524707/picture" id="person-222-clicked" alt="AMANDA H" title="AMANDA H" width="50px" height="50px"></div>
<div class="user-message">
<span class="message-text">
"ipsum lorem....."</span>
<div class="message-create-time">
<span class="create-time">1/28/2011 7:33:17 AM</span>
<span class="user-name"> - Amanda H.</span>
</div>
</div>
<div class="hbo-message_likeBtn">
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.honeybunchesofoats.com%2FBunchesOfLove.aspx%2FMessage%2F250&layout=standard&show_faces=false&width=250&action=like&colorscheme=light&height=35"
style="border: medium none ; overflow: hidden; width: 250px; height: 35px;" allowtransparency="true"
frameborder="0" scrolling="no"></iframe>
</div>
this group does not have an iframe
I also tried:
if ($(".user-message-block:has(iframe)", $clickTrackerGroup)) {
console.log("this group does not have an iframe");
}
You can plainly see that the this block of html DOES, in fact, have an iframe in it.
How can I successfully test for the existence of this element?
Thanks,
Scott
[1]: http://www.honeybunchesofoats.com/ | 0 |
8,108,790 | 11/13/2011 01:02:33 | 400,675 | 07/23/2010 21:01:40 | 431 | 32 | Generate CakePHP password in Rails | I'm trying to write the equivalent of
$password = Security::hash('text pw', null, true)
In CakePHP, that creates a security hash that will validate for "text pw" when a user logs in. I tried so far, in Rails:
password = Digest::MD5.hexdigest("text pw")
But that doesn't authenticate when I try to log into the CakePHP app. | ruby-on-rails | ruby | cakephp | md5 | null | null | open | Generate CakePHP password in Rails
===
I'm trying to write the equivalent of
$password = Security::hash('text pw', null, true)
In CakePHP, that creates a security hash that will validate for "text pw" when a user logs in. I tried so far, in Rails:
password = Digest::MD5.hexdigest("text pw")
But that doesn't authenticate when I try to log into the CakePHP app. | 0 |
5,350,849 | 03/18/2011 10:45:11 | 658,243 | 03/14/2011 04:47:12 | 16 | 0 | switch from PHP to Ruby Rails / Anoroid Develpment / Objective C | I am a PHP programmers and want to try my hands in something new. I am interested in mobile application development. But confused which platform is best for me.
- Ruby on Rails
- Objective C
- Sencha / Jtouch
- Anorid Development
- Windows 7 Mobile
Ruby on Rails seems interesting as far as I researched.
Please kindly share ideas in this with resources available, difficulties to learn, pros/cons, scope in current market etc....
Thank you in advance ...
| jquery | ruby-on-rails | windows-mobile | mobile-phones | null | 03/18/2011 11:17:41 | off topic | switch from PHP to Ruby Rails / Anoroid Develpment / Objective C
===
I am a PHP programmers and want to try my hands in something new. I am interested in mobile application development. But confused which platform is best for me.
- Ruby on Rails
- Objective C
- Sencha / Jtouch
- Anorid Development
- Windows 7 Mobile
Ruby on Rails seems interesting as far as I researched.
Please kindly share ideas in this with resources available, difficulties to learn, pros/cons, scope in current market etc....
Thank you in advance ...
| 2 |
4,120,566 | 11/08/2010 00:55:33 | 292,498 | 03/12/2010 16:54:14 | 14 | 0 | Displaying different images on different pages on a WordPress site | I've tried a couple of plugins but can't seem to get it to work. I've created a new folder in the main theme's directory "http://www.ecgresources.com/WP/wordpress/wp-content/themes/theme335/images/random-images". The div I want to display is called main. I want to be able to put a little code on each page and pull an image from that directory. If anyone has any hints, or tips, I would appreciate it!
Here is the style in style.css
.main {width:766px;
border:1px solid #818181; border-top:none; text-align:left; background-color:#030409;}
This main style is called in header.php | php | wordpress | null | null | null | null | open | Displaying different images on different pages on a WordPress site
===
I've tried a couple of plugins but can't seem to get it to work. I've created a new folder in the main theme's directory "http://www.ecgresources.com/WP/wordpress/wp-content/themes/theme335/images/random-images". The div I want to display is called main. I want to be able to put a little code on each page and pull an image from that directory. If anyone has any hints, or tips, I would appreciate it!
Here is the style in style.css
.main {width:766px;
border:1px solid #818181; border-top:none; text-align:left; background-color:#030409;}
This main style is called in header.php | 0 |
7,067,536 | 08/15/2011 16:14:33 | 393,087 | 07/15/2010 18:26:42 | 728 | 3 | how to reference closure that is a class variable? | class MyClass {
var $lambda;
function __construct() {
$this->lambda = function() {echo 'hello world';};
// no errors here, so I assume that this is legal
}
}
$myInstance = new MyClass();
$myInstance->lambda();
//Fatal error: Call to undefined method MyClass::lambda()
So what is the correct syntax for reaching class variables ? | php | php-5.3 | null | null | null | null | open | how to reference closure that is a class variable?
===
class MyClass {
var $lambda;
function __construct() {
$this->lambda = function() {echo 'hello world';};
// no errors here, so I assume that this is legal
}
}
$myInstance = new MyClass();
$myInstance->lambda();
//Fatal error: Call to undefined method MyClass::lambda()
So what is the correct syntax for reaching class variables ? | 0 |
9,949,645 | 03/30/2012 19:58:10 | 577,087 | 01/15/2011 22:18:47 | 86 | 13 | QUnit testing of HTML DOM manipulation procedures | This posting is not a question but a documentation of a useful technique to test a JQuery method that manipulates the elements in a DOM. The solution will also support any Javascript method that manipulates the DOM.
In my situation I wanted to create a unit test for a JQuery plugin I wrote that provides simple basic tree expansion capability. The objective of the plugin was to minimize footprint (200 lines of code) and support from the host page. Since this was to be used in an enterprise application, it was crucial it be effectively tested within an existing QUnit project. Since this method manipulates the DOM, it is desirable to be able to examine the resulting manipulations manually with the QUnit test that tested the method. I found a way to create dummy line item (“LI” element) using the QUnit “ok” method and inject the test DOM as a child of this list item, in this way the resulting manipulated DOM can be examined by expanding the test. Also if the test failed, the manipulated DOM elements will automatically be displayed by the QUnit system. The resulting QUnit output looks like the following:
![enter image description here][1]
I will post the solution as an “answer” to this “question” so that others can comment and rate what they think.
[1]: http://i.stack.imgur.com/cBlTB.png | javascript | jquery | qunit | null | null | 04/01/2012 04:19:53 | not a real question | QUnit testing of HTML DOM manipulation procedures
===
This posting is not a question but a documentation of a useful technique to test a JQuery method that manipulates the elements in a DOM. The solution will also support any Javascript method that manipulates the DOM.
In my situation I wanted to create a unit test for a JQuery plugin I wrote that provides simple basic tree expansion capability. The objective of the plugin was to minimize footprint (200 lines of code) and support from the host page. Since this was to be used in an enterprise application, it was crucial it be effectively tested within an existing QUnit project. Since this method manipulates the DOM, it is desirable to be able to examine the resulting manipulations manually with the QUnit test that tested the method. I found a way to create dummy line item (“LI” element) using the QUnit “ok” method and inject the test DOM as a child of this list item, in this way the resulting manipulated DOM can be examined by expanding the test. Also if the test failed, the manipulated DOM elements will automatically be displayed by the QUnit system. The resulting QUnit output looks like the following:
![enter image description here][1]
I will post the solution as an “answer” to this “question” so that others can comment and rate what they think.
[1]: http://i.stack.imgur.com/cBlTB.png | 1 |
8,710,561 | 01/03/2012 10:06:00 | 966,638 | 09/27/2011 08:52:12 | 453 | 15 | Linq IN in C# error | I'm trying to do this:
myList = (from c in ipE.Cars
where (someListOfIntegers.Contains(idCar) && c.name == someName)
select c).ToList();
I'm getting the eror LINQ to Entities does not recognize the method 'Boolean Contains(Int32)' method, and this method cannot be translated into a store expression.
I tried with ANY, it still doesn't work. I got the error Unable to create a constant value of type 'Closure type'. Only primitive types ('such as Int32, String, and Guid') are supported in this context.
How to resolve this? | c# | linq | null | null | null | null | open | Linq IN in C# error
===
I'm trying to do this:
myList = (from c in ipE.Cars
where (someListOfIntegers.Contains(idCar) && c.name == someName)
select c).ToList();
I'm getting the eror LINQ to Entities does not recognize the method 'Boolean Contains(Int32)' method, and this method cannot be translated into a store expression.
I tried with ANY, it still doesn't work. I got the error Unable to create a constant value of type 'Closure type'. Only primitive types ('such as Int32, String, and Guid') are supported in this context.
How to resolve this? | 0 |
9,657,350 | 03/11/2012 17:53:21 | 1,211,947 | 02/15/2012 17:04:51 | 1 | 0 | How can slove the errors in the code | Here is a code to count number of vowels but I have erreor that tell me the strlength is not declared .
| c++ | null | null | null | null | 03/11/2012 18:05:13 | not a real question | How can slove the errors in the code
===
Here is a code to count number of vowels but I have erreor that tell me the strlength is not declared .
| 1 |
9,224,774 | 02/10/2012 08:23:35 | 1,161,867 | 01/21/2012 03:59:55 | 42 | 0 | Facebook Like button for website | Can anyone tell me how can i get the Facebook like button for my website and also a like button for individual product. What is the full process to get the like button.
Thanks for your help:) | php | facebook | null | null | null | 02/10/2012 23:29:04 | not a real question | Facebook Like button for website
===
Can anyone tell me how can i get the Facebook like button for my website and also a like button for individual product. What is the full process to get the like button.
Thanks for your help:) | 1 |
4,446,992 | 12/15/2010 05:32:23 | 542,924 | 12/15/2010 05:32:23 | 1 | 0 | Frameworks to build web applications | We want to build a web application which is fast (to load), scalable, modular (should be able to easily extend to other domains) and should be appealing to users. Our website will host a lot of images. Don't want to slow it down due to image-loading.
I have read reviews about the following frameworks and am pretty confused on which one to start with. Language is not a constraint. Need some expert advice.
- Zend framework
- Django
- Kohana
- CodeIgniter
- Yii framework (looks promising but need reviews on ease of use)
Thanks. | django | zend-framework | codeigniter | kohana | yii | 01/21/2011 09:10:19 | not a real question | Frameworks to build web applications
===
We want to build a web application which is fast (to load), scalable, modular (should be able to easily extend to other domains) and should be appealing to users. Our website will host a lot of images. Don't want to slow it down due to image-loading.
I have read reviews about the following frameworks and am pretty confused on which one to start with. Language is not a constraint. Need some expert advice.
- Zend framework
- Django
- Kohana
- CodeIgniter
- Yii framework (looks promising but need reviews on ease of use)
Thanks. | 1 |
1,806,508 | 11/27/2009 02:33:51 | 91,365 | 04/15/2009 22:52:13 | 45 | 2 | preserving visibility when alias_method_chain on attr_accessor in Ruby 1.9 | I'm trying to port a library from ruby 1.8. I didn't write the library. I can change the API if absolutely necessary, but it does have a fair number of users I would prefer not to inconvenience.
Here's the problem simplified:
require 'rubygems'
require 'activesupport'
class Foo
private
def self.attr_accessor_with_magic(*attrs)
attr_accessor_without_magic(*attrs)
end
public
class << self
alias_method_chain :attr_accessor, :magic
end
attr_accessor :bar
end
foo=Foo.new
foo.bar=17
puts foo.bar
On Ruby 1.8.7p174, this prints `17`
On Ruby 1.9.1p243, I get `private method ``bar=' called for #<Foo:0x000000010a40f8> (NoMethodError)`
Obviously, the Ruby 1.9 behaviour is correct. To better illustrate the Ruby 1.8 bug replace the `public` with `private` in the above code. Ruby 1.8 still prints `17`!
Therefore I can retain "bug compatibility" with the current version of the library by writing
private
def self.attr_accessor_with_magic(*attrs)
public
attr_accessor_without_magic(*attrs)
private
end
Does anybody have any idea how I can do the right thing and create the appropriate visibility for the attr? On Ruby 1.8 it's going to be `public` no matter what I do, but is it possible to do the right thing for 1.9? | ruby-1.9 | ruby | null | null | null | null | open | preserving visibility when alias_method_chain on attr_accessor in Ruby 1.9
===
I'm trying to port a library from ruby 1.8. I didn't write the library. I can change the API if absolutely necessary, but it does have a fair number of users I would prefer not to inconvenience.
Here's the problem simplified:
require 'rubygems'
require 'activesupport'
class Foo
private
def self.attr_accessor_with_magic(*attrs)
attr_accessor_without_magic(*attrs)
end
public
class << self
alias_method_chain :attr_accessor, :magic
end
attr_accessor :bar
end
foo=Foo.new
foo.bar=17
puts foo.bar
On Ruby 1.8.7p174, this prints `17`
On Ruby 1.9.1p243, I get `private method ``bar=' called for #<Foo:0x000000010a40f8> (NoMethodError)`
Obviously, the Ruby 1.9 behaviour is correct. To better illustrate the Ruby 1.8 bug replace the `public` with `private` in the above code. Ruby 1.8 still prints `17`!
Therefore I can retain "bug compatibility" with the current version of the library by writing
private
def self.attr_accessor_with_magic(*attrs)
public
attr_accessor_without_magic(*attrs)
private
end
Does anybody have any idea how I can do the right thing and create the appropriate visibility for the attr? On Ruby 1.8 it's going to be `public` no matter what I do, but is it possible to do the right thing for 1.9? | 0 |
3,793,817 | 09/25/2010 12:34:37 | 148,869 | 08/01/2009 06:52:54 | 89 | 7 | How to get complete linking command with libtool | I am currently building an app and getting error in linking, here is a command,
CCLD Programs/GtkBonker
Now I want see the **Complete linking Command**, Any help is appreciated. | linux | linker | libtool | null | null | null | open | How to get complete linking command with libtool
===
I am currently building an app and getting error in linking, here is a command,
CCLD Programs/GtkBonker
Now I want see the **Complete linking Command**, Any help is appreciated. | 0 |
4,532,591 | 12/26/2010 03:10:45 | 553,848 | 12/25/2010 14:52:15 | 1 | 0 | Access Modifiers | How to combine with access modifiers to another package | java | null | null | null | null | 12/26/2010 03:39:08 | not a real question | Access Modifiers
===
How to combine with access modifiers to another package | 1 |
8,446,052 | 12/09/2011 13:21:04 | 2,249 | 08/21/2008 09:30:32 | 128 | 12 | Griffon Upgrade compilation error: mvcGroupInit repetitive method | I'm upgrading a big 0.3.1 Griffon app into 0.9.4 I'm getting these difficulties:
1. Controlllers:
I've disabled UI Threading Injection in order to avoid the Compilation BUG issue (see http://stackoverflow.com/questions/8311492/compilation-error-bug-exception-after-griffon-project-upgrade)
That's how I avoid that compilation error but then some other have appeared:
[griffonc]
[griffonc] C:\maestro\desarrollo\projects\interactionManager\sgmentia-client\griffon-app\controllers\com\nortia\sgmentia\client\select\SelectController.groovy: 53: Repetitive method name/signature for method 'void mvcGroupInit(java.util.Map)' in class 'com.nortia.sgmentia.client.select.SelectController'.
[griffonc] @ line 53, column 2.
[griffonc] void mvcGroupInit(Map args) {
[griffonc] ^
[griffonc]
[griffonc] C:\maestro\desarrollo\projects\interactionManager\sgmentia-client\griffon-app\controllers\com\nortia\sgmentia\client\select\SelectController.groovy: -1: Repetitive method name/signature for method 'void mvcGroupInit(java.util.Map)' in class 'com.nortia.sgmentia.client.select.SelectController'.
[griffonc] @ line -1, column -1.
It seems as if you were not allowed to overrride this method in a child controller. For example:
class MyCommonController{
...
}
class MyChildController extends MyCommonController{
...
void mvcGroupInit(java.util.Map){}
}
I solved this error in other controllers doing the following refactoring:
class MyCommonController{
...
void mvcGroupInit(java.util.Map args){
initMyCommon(map)
}
abstract void initMyCommon(map)
}
class MyChildController extends MyCommonController{
...
void initMyCommon(map){
//My real init code goes here
}
}
but this controller is more complicated to refactor:
class SelectController extends WindowAdapter implements DocumentController
Is this the real problem? Any ideas?
Thanks in advance.
Ivan.
| groovy | upgrade | griffon | null | null | null | open | Griffon Upgrade compilation error: mvcGroupInit repetitive method
===
I'm upgrading a big 0.3.1 Griffon app into 0.9.4 I'm getting these difficulties:
1. Controlllers:
I've disabled UI Threading Injection in order to avoid the Compilation BUG issue (see http://stackoverflow.com/questions/8311492/compilation-error-bug-exception-after-griffon-project-upgrade)
That's how I avoid that compilation error but then some other have appeared:
[griffonc]
[griffonc] C:\maestro\desarrollo\projects\interactionManager\sgmentia-client\griffon-app\controllers\com\nortia\sgmentia\client\select\SelectController.groovy: 53: Repetitive method name/signature for method 'void mvcGroupInit(java.util.Map)' in class 'com.nortia.sgmentia.client.select.SelectController'.
[griffonc] @ line 53, column 2.
[griffonc] void mvcGroupInit(Map args) {
[griffonc] ^
[griffonc]
[griffonc] C:\maestro\desarrollo\projects\interactionManager\sgmentia-client\griffon-app\controllers\com\nortia\sgmentia\client\select\SelectController.groovy: -1: Repetitive method name/signature for method 'void mvcGroupInit(java.util.Map)' in class 'com.nortia.sgmentia.client.select.SelectController'.
[griffonc] @ line -1, column -1.
It seems as if you were not allowed to overrride this method in a child controller. For example:
class MyCommonController{
...
}
class MyChildController extends MyCommonController{
...
void mvcGroupInit(java.util.Map){}
}
I solved this error in other controllers doing the following refactoring:
class MyCommonController{
...
void mvcGroupInit(java.util.Map args){
initMyCommon(map)
}
abstract void initMyCommon(map)
}
class MyChildController extends MyCommonController{
...
void initMyCommon(map){
//My real init code goes here
}
}
but this controller is more complicated to refactor:
class SelectController extends WindowAdapter implements DocumentController
Is this the real problem? Any ideas?
Thanks in advance.
Ivan.
| 0 |
4,438,222 | 12/14/2010 10:36:18 | 541,790 | 12/14/2010 10:28:42 | 1 | 0 | What does this code means? | namespace myApplication {
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}
What is `partial class Form1 : Form`
and what is `InitializeComponents();`
and why it is used `Form1 : Form` instead of only `Form1` | c# | null | null | null | null | 12/14/2010 11:59:29 | not a real question | What does this code means?
===
namespace myApplication {
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}
What is `partial class Form1 : Form`
and what is `InitializeComponents();`
and why it is used `Form1 : Form` instead of only `Form1` | 1 |
9,015,211 | 01/26/2012 07:56:04 | 985,084 | 10/08/2011 06:22:16 | 826 | 74 | Using MVC in PHP | I have a question about PHP and VMC usage.
Depending on my knowledge of PHP and MVC and after some researches about MVC and PHP`s structure, It seems **even** you do not know anything about MVC , when you are developing a PHP project, you are engaged with MVC.
I think it is because PHP is inherently designed to make you get involved with MVC.I think is is
Am i right?!
I know it is not look like a question, but i am starting to create a big project in PHP and need your advice about this issue?any idea can be useful engineers.thanks | php | mvc | null | null | null | 01/26/2012 08:14:21 | not constructive | Using MVC in PHP
===
I have a question about PHP and VMC usage.
Depending on my knowledge of PHP and MVC and after some researches about MVC and PHP`s structure, It seems **even** you do not know anything about MVC , when you are developing a PHP project, you are engaged with MVC.
I think it is because PHP is inherently designed to make you get involved with MVC.I think is is
Am i right?!
I know it is not look like a question, but i am starting to create a big project in PHP and need your advice about this issue?any idea can be useful engineers.thanks | 4 |
11,683,616 | 07/27/2012 07:50:05 | 79,891 | 03/19/2009 06:44:03 | 3,255 | 32 | Making controls 'move' in WinForms and compact framework | Is it possible to do animations, like moving buttons and stuff in WinForms and Compact Framework? | c# | .net | winforms | windows-mobile | compact-framework | null | open | Making controls 'move' in WinForms and compact framework
===
Is it possible to do animations, like moving buttons and stuff in WinForms and Compact Framework? | 0 |
347,524 | 12/07/2008 12:27:05 | 44,085 | 12/07/2008 12:19:49 | 1 | 0 | UpdateModel prefix - ASP.NET MVC | I'm having trouble with `TryUpdateModel()`. My form fields are named with a prefix but I am using - as my separator and not the default dot.
<input type="text" id="Record-Title" name="Record-Title" />
When I try to update the model it does not get updated. If i change the name attribute to `Record.Title` it works perfectly but that is not what I want to do.
bool success = TryUpdateModel(record, "Record");
Is it possible to use a custom separator? | asp.net-mvc | null | null | null | null | null | open | UpdateModel prefix - ASP.NET MVC
===
I'm having trouble with `TryUpdateModel()`. My form fields are named with a prefix but I am using - as my separator and not the default dot.
<input type="text" id="Record-Title" name="Record-Title" />
When I try to update the model it does not get updated. If i change the name attribute to `Record.Title` it works perfectly but that is not what I want to do.
bool success = TryUpdateModel(record, "Record");
Is it possible to use a custom separator? | 0 |
10,769,841 | 05/26/2012 21:15:55 | 548,618 | 12/29/2009 17:13:00 | 505 | 12 | Ruby code refactoring | I have n-times similar statements
if trigger_data.tt_closed
unless trouble_ticket.changes.key?(:status)
@run = 0
break
end
unless trouble_ticket.changes[:status][1] == "Closed"
@run = 0
break
end
end
if trigger_data.tt_assignee
unless trouble_ticket.changes.key?(:assigned_to)
@run = 0
break
end
unless trouble_ticket.changes[:assigned_to][1] == trigger_data.tt_assignee
@run
break
end
end
How to refactoring that code? Maybe dynamic statement build with pass some hash to input. I'm newbie in metaprogramming. Give me advise please | ruby | refactoring | null | null | null | 05/27/2012 07:39:14 | off topic | Ruby code refactoring
===
I have n-times similar statements
if trigger_data.tt_closed
unless trouble_ticket.changes.key?(:status)
@run = 0
break
end
unless trouble_ticket.changes[:status][1] == "Closed"
@run = 0
break
end
end
if trigger_data.tt_assignee
unless trouble_ticket.changes.key?(:assigned_to)
@run = 0
break
end
unless trouble_ticket.changes[:assigned_to][1] == trigger_data.tt_assignee
@run
break
end
end
How to refactoring that code? Maybe dynamic statement build with pass some hash to input. I'm newbie in metaprogramming. Give me advise please | 2 |
833,180 | 05/07/2009 06:37:14 | 11,410 | 09/16/2008 07:44:40 | 1,111 | 93 | Handy F# snippets | There are already [two][1] [questions][2] about F#/functional snippets.
However what I'm looking for here are **useful** snippets, little 'helper' functions that are reusable. Or obscure but nifty patterns that you can never quite remember.
Something like:
open System.IO
let rec visitor dir filter=
seq { yield! Directory.GetFiles(dir, filter)
for subdir in Directory.GetDirectories(dir) do
yield! visitor subdir filter}
I'd like to make this a kind of handy reference page. As such there will be no right answer, but hopefully lots of good ones.
[1]: http://stackoverflow.com/questions/35940/elegant-snippets-of-f
[2]: http://stackoverflow.com/questions/832569/list-of-functional-code-snippets-for-procedural-programmers
| f# | reference | code-snippets | null | null | 03/13/2012 03:33:12 | not constructive | Handy F# snippets
===
There are already [two][1] [questions][2] about F#/functional snippets.
However what I'm looking for here are **useful** snippets, little 'helper' functions that are reusable. Or obscure but nifty patterns that you can never quite remember.
Something like:
open System.IO
let rec visitor dir filter=
seq { yield! Directory.GetFiles(dir, filter)
for subdir in Directory.GetDirectories(dir) do
yield! visitor subdir filter}
I'd like to make this a kind of handy reference page. As such there will be no right answer, but hopefully lots of good ones.
[1]: http://stackoverflow.com/questions/35940/elegant-snippets-of-f
[2]: http://stackoverflow.com/questions/832569/list-of-functional-code-snippets-for-procedural-programmers
| 4 |
11,597,927 | 07/22/2012 05:20:25 | 1,392,794 | 05/14/2012 00:39:11 | 1 | 0 | Can I Distribute iOS Open Source Code to Bypass the App Store? | I am not talking about Beta Testing using https://testflightapp.com/ or even the limited distribution of beta apps allowed by Apple in general.
I know that in order to install "your own" apps for testing, you have to have an Apple Developer account for $100/year.
For people that have this, what is preventing legal distribution of the source code so that an open source app can be distributed, built, installed, tested and run on their own devices by end users?
I am well aware of the fact that this distribution model precludes a great majority of end users. This aside, it seems it would be an effective way to bypass Apple's restrictions.
If the process, for the end user, of registering the Apple Developer key, building and installing an app could be streamlined (likely by a Mac app), then the only barrier would be the yearly Apple Developer fee.
If there are compelling reasons to do this (e.g. high quality apps that likely break App Store policies or whose license precludes App Store distribution, like VLC or a version of Chrome that uses a native V8 javascript implementation and its own rendering engine, or many awesome apps that are available only on Cydia [and don't *require* a jailbroken device to function] or haven't been built at all), I think that some people might start to make that leap.
As far as I know, Apple would have no way to identify which users (either source distributors or end users) would be engaged in this activity. Nor do I think that this would violate any Apple policies (off hand, I haven't read the fine print, I suppose this could be problematic).
What am I missing? Why hasn't this been done yet?
(If anyone is interested in partnering with me to build this, please let me know!) | iphone | ios | ipad | open-source | app-store | 07/22/2012 15:26:51 | not constructive | Can I Distribute iOS Open Source Code to Bypass the App Store?
===
I am not talking about Beta Testing using https://testflightapp.com/ or even the limited distribution of beta apps allowed by Apple in general.
I know that in order to install "your own" apps for testing, you have to have an Apple Developer account for $100/year.
For people that have this, what is preventing legal distribution of the source code so that an open source app can be distributed, built, installed, tested and run on their own devices by end users?
I am well aware of the fact that this distribution model precludes a great majority of end users. This aside, it seems it would be an effective way to bypass Apple's restrictions.
If the process, for the end user, of registering the Apple Developer key, building and installing an app could be streamlined (likely by a Mac app), then the only barrier would be the yearly Apple Developer fee.
If there are compelling reasons to do this (e.g. high quality apps that likely break App Store policies or whose license precludes App Store distribution, like VLC or a version of Chrome that uses a native V8 javascript implementation and its own rendering engine, or many awesome apps that are available only on Cydia [and don't *require* a jailbroken device to function] or haven't been built at all), I think that some people might start to make that leap.
As far as I know, Apple would have no way to identify which users (either source distributors or end users) would be engaged in this activity. Nor do I think that this would violate any Apple policies (off hand, I haven't read the fine print, I suppose this could be problematic).
What am I missing? Why hasn't this been done yet?
(If anyone is interested in partnering with me to build this, please let me know!) | 4 |
7,656,910 | 10/05/2011 05:06:13 | 915,370 | 08/27/2011 10:50:07 | 32 | 4 | Django- Make A Queryset Without Any Interaction With Database | I Want To Convert A List Of Objects To Queryset Without Any Transaction With Database. How Can I Do It?
<br/>
For Example:
list = [user_object_1, user_object_2, user_object_3]
How Can I Convert It To A Queryset???? | python | django | django-models | null | null | null | open | Django- Make A Queryset Without Any Interaction With Database
===
I Want To Convert A List Of Objects To Queryset Without Any Transaction With Database. How Can I Do It?
<br/>
For Example:
list = [user_object_1, user_object_2, user_object_3]
How Can I Convert It To A Queryset???? | 0 |
4,592,666 | 01/04/2011 10:39:24 | 357,236 | 06/03/2010 08:26:19 | 244 | 5 | django need help in writing custom field | I'm aware that Django do not have a built in model field for postgresql 's custom type "text[]".
After looking at the docs, I'm have a question.
I realized I need to override the db_type method to reflect the 'text[]' data type, but is that all? What do I need to write for the to_python method? I mean, the default value returned is already a list I can use right?
using psycopg2. | python | django | psycopg2 | null | null | null | open | django need help in writing custom field
===
I'm aware that Django do not have a built in model field for postgresql 's custom type "text[]".
After looking at the docs, I'm have a question.
I realized I need to override the db_type method to reflect the 'text[]' data type, but is that all? What do I need to write for the to_python method? I mean, the default value returned is already a list I can use right?
using psycopg2. | 0 |
10,662,891 | 05/19/2012 06:26:36 | 1,403,801 | 05/12/2012 02:29:05 | 14 | 1 | Validating form using javascript | I am a beginner and I have written a code for validating the form as:
<pre>
function validateForm(){
var x=document.forms["myForm"]["fname"].value;
if (x==null || x==""){
alert("First name must be filled out");
return false;
}}
<!-- html part-->
<form name="myForm" action="demo_form.asp" onsubmit="return validateForm()" method="post">
First name: <input type="text" name="fname">
<input type="submit" value="Submit">
</form><br>
The problem with this is after pressing submit only I can check the form. I am thinking of making a form which will be checking the fields before even hitting submit button.<br> I mean to say is I want to make a form like in gmail registration page, if any user is not giving input after clicking the first name field it shows error message. I checked the source of that page and it was very lengthy. I could not get anything from it. Please help me. | javascript | html | forms | login | null | null | open | Validating form using javascript
===
I am a beginner and I have written a code for validating the form as:
<pre>
function validateForm(){
var x=document.forms["myForm"]["fname"].value;
if (x==null || x==""){
alert("First name must be filled out");
return false;
}}
<!-- html part-->
<form name="myForm" action="demo_form.asp" onsubmit="return validateForm()" method="post">
First name: <input type="text" name="fname">
<input type="submit" value="Submit">
</form><br>
The problem with this is after pressing submit only I can check the form. I am thinking of making a form which will be checking the fields before even hitting submit button.<br> I mean to say is I want to make a form like in gmail registration page, if any user is not giving input after clicking the first name field it shows error message. I checked the source of that page and it was very lengthy. I could not get anything from it. Please help me. | 0 |
8,418,159 | 12/07/2011 15:47:20 | 1,068 | 08/12/2008 08:44:09 | 2,957 | 65 | Error while building NVIDIA cuda computing SDK on Linux | Hello I have downloaded and unpacked NVIDIA GPU computing SDK file gpucomputingsdk_4.0.17_linux.run using sh gpucomputingsdk_4.0.17_linux.run, but when I say make it is giving me buid errors saying
/usr/bin/ld: cannot find -lGLU cannot find -lX11 cannot find -lXi cannot find -lXmu cannot find -lglut
Also tried to build OpenCL examples inside MY_NVIDIA_SDK_FOLDER/OpenCL/ using make. There I get error as
fatal error: GL/glx.h: No such file or directory
Have installed cuda toolkit and NVIDIA display driver on the system which is Ubuntu 11 with NVIDIA GTX 470 GPU card
1) What are the steps in building and using the various example code(C,OpenCL,CUDA) provided by this SDK?
2) Any particular path to be present in my LD_LIBRARY_PATH or some more dependencies needed here to fix this error?
| nvidia | gpu-programming | null | null | null | null | open | Error while building NVIDIA cuda computing SDK on Linux
===
Hello I have downloaded and unpacked NVIDIA GPU computing SDK file gpucomputingsdk_4.0.17_linux.run using sh gpucomputingsdk_4.0.17_linux.run, but when I say make it is giving me buid errors saying
/usr/bin/ld: cannot find -lGLU cannot find -lX11 cannot find -lXi cannot find -lXmu cannot find -lglut
Also tried to build OpenCL examples inside MY_NVIDIA_SDK_FOLDER/OpenCL/ using make. There I get error as
fatal error: GL/glx.h: No such file or directory
Have installed cuda toolkit and NVIDIA display driver on the system which is Ubuntu 11 with NVIDIA GTX 470 GPU card
1) What are the steps in building and using the various example code(C,OpenCL,CUDA) provided by this SDK?
2) Any particular path to be present in my LD_LIBRARY_PATH or some more dependencies needed here to fix this error?
| 0 |
11,739,379 | 07/31/2012 11:45:43 | 1,297,641 | 03/28/2012 08:46:28 | 74 | 10 | Apache Load Balancer , redundancy | I would like to know how I can achive such a design in which there are two machines and two same application installed on them working as pair (active/active state). If one of them is down the other will take control and reply the answers coming from loadbalancer.
In that case all requests are going through loadbalancer, and I want loadbalancer send these request only one machine and detect if it is alive. When this machine is down all request will forwarded to other machine.
Actually I know that Apache Http Load balancer does similar work but it forward messages to all active machines not only one machine. | apache | load-balancing | null | null | null | 07/31/2012 13:16:08 | off topic | Apache Load Balancer , redundancy
===
I would like to know how I can achive such a design in which there are two machines and two same application installed on them working as pair (active/active state). If one of them is down the other will take control and reply the answers coming from loadbalancer.
In that case all requests are going through loadbalancer, and I want loadbalancer send these request only one machine and detect if it is alive. When this machine is down all request will forwarded to other machine.
Actually I know that Apache Http Load balancer does similar work but it forward messages to all active machines not only one machine. | 2 |
241,602 | 10/27/2008 22:32:17 | 15,052 | 09/17/2008 05:29:32 | 209 | 13 | What non-technical items do you keep on your desk? | I have read that what you keep on your desk is very influential in how you work and your level of productivity. I am trying to optimise the way that I work (I am a terrible procrastinator) and am curious what other programmers have (or deliberately NOT have) on their desks.
By 'non-technical', I mean excluding computer, screen, mouse, keyboard, speakers etc.
| productivity | desk | procrastination | null | null | 11/03/2011 19:55:38 | off topic | What non-technical items do you keep on your desk?
===
I have read that what you keep on your desk is very influential in how you work and your level of productivity. I am trying to optimise the way that I work (I am a terrible procrastinator) and am curious what other programmers have (or deliberately NOT have) on their desks.
By 'non-technical', I mean excluding computer, screen, mouse, keyboard, speakers etc.
| 2 |
288,074 | 11/13/2008 20:02:54 | 20,774 | 09/22/2008 22:01:32 | 202 | 9 | Groovy advantages over Jython or Jruby? | Why would I choose to use Groovy when I could use Jython or Jruby? Does the language provide any inherent advantages to make up for the fact that Jython and Jruby skills are applicable to their parent languages outside of the JVM?
Keep in mind that I purposely keeping this question generic, but if there are any advantages that exist in a particular domain, please don't hesitate to describe them. | groovy | jython | jruby | jvm-languages | jvm | null | open | Groovy advantages over Jython or Jruby?
===
Why would I choose to use Groovy when I could use Jython or Jruby? Does the language provide any inherent advantages to make up for the fact that Jython and Jruby skills are applicable to their parent languages outside of the JVM?
Keep in mind that I purposely keeping this question generic, but if there are any advantages that exist in a particular domain, please don't hesitate to describe them. | 0 |
2,904,084 | 05/25/2010 11:25:08 | 148,765 | 07/31/2009 23:09:01 | 2,987 | 119 | What can a company possibly gain by making Android phones hard to root? | As someone who recently got a HTC Hero, I had to jump through several hoops to get root access on the phone to install custom firmware. Now, Android is open-source and fairly easy to build and hack on an emulator. It seems to be against the spirit of open-source to lock down a phone so you can't hack the phone itself.
Now, often, there are understandable (though not always justifiable) reasons for locking a device down. For example, it might have proprietary software on it or you might want to retain control of the platform. However, Android by its open-source nature makes such concerns moot. Everyone and their dog has access to the userland code, and HTC is forced by the GPL to release kernel sources for each of their devices.
So, I fail to see any motivation for alienating the hackers, when there is no possible benefit (in my mind) to be had from doing this. Any idea why a company would want to do this? Is it just short-sightedness or am I missing possible commercial implications of this? | android | open-source | business | philosophy | null | 05/26/2010 08:51:50 | off topic | What can a company possibly gain by making Android phones hard to root?
===
As someone who recently got a HTC Hero, I had to jump through several hoops to get root access on the phone to install custom firmware. Now, Android is open-source and fairly easy to build and hack on an emulator. It seems to be against the spirit of open-source to lock down a phone so you can't hack the phone itself.
Now, often, there are understandable (though not always justifiable) reasons for locking a device down. For example, it might have proprietary software on it or you might want to retain control of the platform. However, Android by its open-source nature makes such concerns moot. Everyone and their dog has access to the userland code, and HTC is forced by the GPL to release kernel sources for each of their devices.
So, I fail to see any motivation for alienating the hackers, when there is no possible benefit (in my mind) to be had from doing this. Any idea why a company would want to do this? Is it just short-sightedness or am I missing possible commercial implications of this? | 2 |
8,434,893 | 12/08/2011 17:15:35 | 1,078,312 | 12/02/2011 22:13:00 | 16 | 0 | javascript error object expected | While executing the code below i am getting javscript error "expected object" though i am able to run same piece of code in another solution. Pleae help.
$(document).ready(function ()
{
$('a.desc').click(function ()
{
$('label input[type="text"]').val($(this).html()).keyup();
});
$("a[rel^='prettyPhoto']").prettyPhoto();
bTable = $("#invoiceSummary").dataTable({
"bPaginate": true,
"bLengthChange": true,
"bFilter": true,
"bSort": true,
"bInfo": true,
"bAutoWidth": true,
"bJQueryUI": true,
"iDisplayLength": 25
});
}); | javascript | asp.net | asp.net-ajax | null | null | null | open | javascript error object expected
===
While executing the code below i am getting javscript error "expected object" though i am able to run same piece of code in another solution. Pleae help.
$(document).ready(function ()
{
$('a.desc').click(function ()
{
$('label input[type="text"]').val($(this).html()).keyup();
});
$("a[rel^='prettyPhoto']").prettyPhoto();
bTable = $("#invoiceSummary").dataTable({
"bPaginate": true,
"bLengthChange": true,
"bFilter": true,
"bSort": true,
"bInfo": true,
"bAutoWidth": true,
"bJQueryUI": true,
"iDisplayLength": 25
});
}); | 0 |
2,998,836 | 06/08/2010 15:35:03 | 268,733 | 02/08/2010 15:01:49 | 944 | 6 | Always can't separate these guys: ascending and descending! Are there good examples? | As a non-english dude, I have trouble differentiating this.
When I try to translate this into my language, I get something weird like "go up" for ascending. So lets say I want to sort the names of all my pets alphabetically. I want that A comes first, then B, then C... and so on. So since the alphabet is not a number for me, my brain refuses to grok what's "going up". A = 0? B = 1? C = 2? If yes, then ascending would be what I'm most of the time looking for. Table would start showing A, then B, then C... Or is that the other way around? Must I look from the bottom of the table, up?
And with numbers: If it's an ascending order, the smallest comes first? (would seem logical...)
Can someone post a short but good example for what is an ascending sort order, and what is an descending sort order? And does that apply to whatever platform, programming language, API, etc.? | general | null | null | null | null | 06/09/2010 13:25:08 | off topic | Always can't separate these guys: ascending and descending! Are there good examples?
===
As a non-english dude, I have trouble differentiating this.
When I try to translate this into my language, I get something weird like "go up" for ascending. So lets say I want to sort the names of all my pets alphabetically. I want that A comes first, then B, then C... and so on. So since the alphabet is not a number for me, my brain refuses to grok what's "going up". A = 0? B = 1? C = 2? If yes, then ascending would be what I'm most of the time looking for. Table would start showing A, then B, then C... Or is that the other way around? Must I look from the bottom of the table, up?
And with numbers: If it's an ascending order, the smallest comes first? (would seem logical...)
Can someone post a short but good example for what is an ascending sort order, and what is an descending sort order? And does that apply to whatever platform, programming language, API, etc.? | 2 |
8,684,426 | 12/30/2011 21:51:55 | 747,588 | 05/10/2011 20:49:11 | 32 | 1 | What is the best WYSIWYG Editor to use with security | I've got a lot of questions today ^^
I want to use WYSIWYG editor, but i'm using the function strip_tags & htmlspecialchars for security reasons, is there an editor with uses BBCODE or something else?
Or maybe you have another way for me to secure the users input without using those function?
Thanks in advance :)
also, i'm using jQuery :) | wysiwyg | null | null | null | null | 12/31/2011 12:00:05 | too localized | What is the best WYSIWYG Editor to use with security
===
I've got a lot of questions today ^^
I want to use WYSIWYG editor, but i'm using the function strip_tags & htmlspecialchars for security reasons, is there an editor with uses BBCODE or something else?
Or maybe you have another way for me to secure the users input without using those function?
Thanks in advance :)
also, i'm using jQuery :) | 3 |
11,189,243 | 06/25/2012 12:17:42 | 409,210 | 08/03/2010 01:48:43 | 84 | 4 | $unwind an object in aggregation framework | In the MongoDB aggregation framework, I was hoping to use the $unwind operator on an object (ie. a JSON collection). Doesn't look like this is possible [1], is there a workaround? Are there plans to implement this?
For example, take the article collection from the aggregation documentation [1]. Suppose there is an additional field "ratings" that is a map from user -> rating. Could you calculate the average rating for each user?
Other than this, I'm quite pleased with the aggregation framework.
[1] http://docs.mongodb.org/manual/reference/aggregation/#_S_unwind | mongodb | aggregation | null | null | null | null | open | $unwind an object in aggregation framework
===
In the MongoDB aggregation framework, I was hoping to use the $unwind operator on an object (ie. a JSON collection). Doesn't look like this is possible [1], is there a workaround? Are there plans to implement this?
For example, take the article collection from the aggregation documentation [1]. Suppose there is an additional field "ratings" that is a map from user -> rating. Could you calculate the average rating for each user?
Other than this, I'm quite pleased with the aggregation framework.
[1] http://docs.mongodb.org/manual/reference/aggregation/#_S_unwind | 0 |
5,202,333 | 03/05/2011 07:13:28 | 406,659 | 07/30/2010 11:15:29 | 608 | 15 | cakephp Update field | How do i force cake to update a field and not insert a new record. It should fail if the id does not exist in the db I found to force a insertion i can do [`'updated' => false`][1] so if i do `'updated' => true` will it work
[1]: http://book.cakephp.org/view/1031/Saving-Your-Data | php | cakephp | null | null | null | null | open | cakephp Update field
===
How do i force cake to update a field and not insert a new record. It should fail if the id does not exist in the db I found to force a insertion i can do [`'updated' => false`][1] so if i do `'updated' => true` will it work
[1]: http://book.cakephp.org/view/1031/Saving-Your-Data | 0 |
11,732,327 | 07/31/2012 02:35:43 | 1,503,328 | 07/05/2012 08:11:25 | 8 | 0 | sql query to find the different values for same record | i want to extract the records having all the possible values combination.
name | value1| value2|
-------------------------------------
test1 | 1 | 2
test1 | 3 | 4
test2 | 3 | 1
test2 | 2 | 1
i want the records that have the values 1|2|3 or 1|2|4 and for this example its TEST1.
Thanks | mysql | sql | null | null | null | 07/31/2012 20:58:59 | not a real question | sql query to find the different values for same record
===
i want to extract the records having all the possible values combination.
name | value1| value2|
-------------------------------------
test1 | 1 | 2
test1 | 3 | 4
test2 | 3 | 1
test2 | 2 | 1
i want the records that have the values 1|2|3 or 1|2|4 and for this example its TEST1.
Thanks | 1 |
2,022,999 | 01/07/2010 19:22:08 | 115,159 | 05/31/2009 17:36:10 | 97 | 1 | How to force Jruby to use inbuilt Ruby 1.9 instead of Ruby 1.8 which is default? | I have developed a Ruby on Rails application and successfully deployed on Weblogic using Jruby and Warbler (which creates a war file based on the settings in config/warble.rb).
I believe although Jruby comes with inbuilt Ruby 1.8 and 1.9, by default it uses 1.8 and I want to test the same rails application in Ruby 1.9 within JRuby as I heard that Ruby 1.9 is a lot faster than 1.8. I do not see any configuration option in warble.rb
where we can specify to use Ruby version to use. Whats the best way to force Jruby to use Ruby 1.9?
Also my Rails application is based on Rails 2.3.2, are there any compatability issues on running rails application (built on 2.3.2) on Ruby 1.9? If so will upgrading rails to 2.3.5 solve the problem?
Thanks in advance. | ruby-on-rails | jruby | ruby | null | null | null | open | How to force Jruby to use inbuilt Ruby 1.9 instead of Ruby 1.8 which is default?
===
I have developed a Ruby on Rails application and successfully deployed on Weblogic using Jruby and Warbler (which creates a war file based on the settings in config/warble.rb).
I believe although Jruby comes with inbuilt Ruby 1.8 and 1.9, by default it uses 1.8 and I want to test the same rails application in Ruby 1.9 within JRuby as I heard that Ruby 1.9 is a lot faster than 1.8. I do not see any configuration option in warble.rb
where we can specify to use Ruby version to use. Whats the best way to force Jruby to use Ruby 1.9?
Also my Rails application is based on Rails 2.3.2, are there any compatability issues on running rails application (built on 2.3.2) on Ruby 1.9? If so will upgrading rails to 2.3.5 solve the problem?
Thanks in advance. | 0 |
6,404,115 | 06/19/2011 17:52:20 | 794,346 | 06/11/2011 22:31:49 | 16 | 0 | Help me figure out how to design a gui in java | I have an app all coded up - it's my first one, a simple inventory application. It has been written in Java and now it's time for the last step. I need to make a GUI for the app and I want to know how to make one that doesn't suck.
I have looked at the MiG Layout Manager, but I am too much of a novice to get it to work correctly.
I am looking for another way to code the GUI. I've mocked up the GUI that you see below in Photoshop and am wondering the best and easiest way to implement it in Java, preferably using a layout manager that is built into the API, but I'll take anything.
Please, if you recommend a specific process or layout manager, please leave a link to a tutorial for your method so I can get acclimated and figure out just what the f I;m
 | java | gui | null | null | null | 06/19/2011 19:40:03 | not a real question | Help me figure out how to design a gui in java
===
I have an app all coded up - it's my first one, a simple inventory application. It has been written in Java and now it's time for the last step. I need to make a GUI for the app and I want to know how to make one that doesn't suck.
I have looked at the MiG Layout Manager, but I am too much of a novice to get it to work correctly.
I am looking for another way to code the GUI. I've mocked up the GUI that you see below in Photoshop and am wondering the best and easiest way to implement it in Java, preferably using a layout manager that is built into the API, but I'll take anything.
Please, if you recommend a specific process or layout manager, please leave a link to a tutorial for your method so I can get acclimated and figure out just what the f I;m
 | 1 |
2,720,346 | 04/27/2010 10:23:51 | 309,358 | 04/05/2010 16:42:24 | 21 | 2 | SSRS: Report label position dynamic | I have a report which displays customer address in multiple labels.
My customers use windowed envelopes for mailing. I need the address labels position to be configurable.
Something like, I'll have a database table which stores the Top/Left position of each label per customer. Based on this table, I need to position the address labels on my report.
I thought, it is doable by expressions, but Location property doesn't provides ability to set an expression and make the label's top and left dynamic.
Anybody, any ideas, on how to achieve this? | reporting-services | report | label | position | dynamic | null | open | SSRS: Report label position dynamic
===
I have a report which displays customer address in multiple labels.
My customers use windowed envelopes for mailing. I need the address labels position to be configurable.
Something like, I'll have a database table which stores the Top/Left position of each label per customer. Based on this table, I need to position the address labels on my report.
I thought, it is doable by expressions, but Location property doesn't provides ability to set an expression and make the label's top and left dynamic.
Anybody, any ideas, on how to achieve this? | 0 |
6,167,154 | 05/29/2011 10:20:38 | 127,401 | 06/23/2009 07:23:51 | 663 | 25 | Checking for existing child in OTP simple_on_for_one supervisor | I'm writing an map/reduce word counter to learn OTP. I've created a simple_one_for_one supervisor that can start reducers. For every Key, I would like a to check if there is already a child, if not, let the supervisor create the child.
I currently start childs in the supervisor module like this:
start_child(Key) ->
supervisor:start_child(?SERVER, [Key]).
I would like to do something like this (untested):
start_child(Key) ->
case supervisor:child_pid(Key) of
Pid -> Pid;
_ -> supervisor:start_child(?SERVER, [Key])
end.
What is a good OTP way to find out if there is already a child for Key? | erlang | mapreduce | otp | null | null | null | open | Checking for existing child in OTP simple_on_for_one supervisor
===
I'm writing an map/reduce word counter to learn OTP. I've created a simple_one_for_one supervisor that can start reducers. For every Key, I would like a to check if there is already a child, if not, let the supervisor create the child.
I currently start childs in the supervisor module like this:
start_child(Key) ->
supervisor:start_child(?SERVER, [Key]).
I would like to do something like this (untested):
start_child(Key) ->
case supervisor:child_pid(Key) of
Pid -> Pid;
_ -> supervisor:start_child(?SERVER, [Key])
end.
What is a good OTP way to find out if there is already a child for Key? | 0 |
11,336,689 | 07/05/2012 00:43:18 | 423,839 | 08/18/2010 10:06:33 | 1,151 | 43 | Forced doing what I think is misleading | We are team of 3. I'm doing some feature, and while doing that I came to design A. One guy of our team thinks, that this feature should be done with design B. I think his design will produce many bugs in the future. I do not quite understand his position about design A. He just doesn't like it. But let's say he also sees some problems in design A to have the situation more clean. Team leader supports this guy, and is forcing me to do it with design B.
My position here: "No problem, but I do not want to implement features with the code I'm already see problems in. If you want to do it with design B - you can do it yourself". He thinks that this is my task, and only I am who should do it. Such situations always repeating, it is not the first time we came to that.
Am I right? Should I obey or stay with my ideology to the end? And should I consider job change in the future? This guy always cut down my designs, and never explains why, and the team leader always supports him. | project-management | null | null | null | null | 07/05/2012 10:42:54 | off topic | Forced doing what I think is misleading
===
We are team of 3. I'm doing some feature, and while doing that I came to design A. One guy of our team thinks, that this feature should be done with design B. I think his design will produce many bugs in the future. I do not quite understand his position about design A. He just doesn't like it. But let's say he also sees some problems in design A to have the situation more clean. Team leader supports this guy, and is forcing me to do it with design B.
My position here: "No problem, but I do not want to implement features with the code I'm already see problems in. If you want to do it with design B - you can do it yourself". He thinks that this is my task, and only I am who should do it. Such situations always repeating, it is not the first time we came to that.
Am I right? Should I obey or stay with my ideology to the end? And should I consider job change in the future? This guy always cut down my designs, and never explains why, and the team leader always supports him. | 2 |
6,423,599 | 06/21/2011 10:08:59 | 789,741 | 06/08/2011 18:59:30 | 1 | 0 | JS to PHP conversion | I've got an old JS script to retrieve my last tweet and display the date in a « X minutes ago » fashion. I want to convert it to PHP and, in the process, improve/optimize it if possible :
var dateAct = new Date();
var diff = dateAct.getTime() - dateTwit.getTime();
var min = (diff/(1000*3600))*60;
var result; var sec;
var y = i+1; var z; var k;
if (min < 0) result = 'recently'
else if (min < 1) { sec = (diff/(1000*3600))*60*60; result = Math.round(sec) + ' seconds ago'; }
else if (min < 60) result = Math.round(min) + ' minutes ago';
else if (min < 120) result = 'about an hour ago';
else if (min < 1440 ) { var hours = Math.round(min/60); result = 'about ' + hours + ' hours ago'; }
else {
var days = Math.round(min/1440);
if (days < 365) result = 'about ' + days + ' day(s) ago';
else result = 'over a year ago';
}
| php | javascript | null | null | null | 06/21/2011 10:28:33 | not a real question | JS to PHP conversion
===
I've got an old JS script to retrieve my last tweet and display the date in a « X minutes ago » fashion. I want to convert it to PHP and, in the process, improve/optimize it if possible :
var dateAct = new Date();
var diff = dateAct.getTime() - dateTwit.getTime();
var min = (diff/(1000*3600))*60;
var result; var sec;
var y = i+1; var z; var k;
if (min < 0) result = 'recently'
else if (min < 1) { sec = (diff/(1000*3600))*60*60; result = Math.round(sec) + ' seconds ago'; }
else if (min < 60) result = Math.round(min) + ' minutes ago';
else if (min < 120) result = 'about an hour ago';
else if (min < 1440 ) { var hours = Math.round(min/60); result = 'about ' + hours + ' hours ago'; }
else {
var days = Math.round(min/1440);
if (days < 365) result = 'about ' + days + ' day(s) ago';
else result = 'over a year ago';
}
| 1 |
6,501,716 | 06/28/2011 04:55:00 | 818,520 | 06/28/2011 04:55:00 | 1 | 0 | Android: How to create a StateListDrawable programmatically | <p>I have a GridView to display some objects, and visually each of the objects will have an image icon and a text label. I also want the image icon to have some "push and pop" effect when clicked, that is, when pressed, the image will move a small distance to the bottom right direction, and when released get back to its original position.
<p>The objects (and their image icons) are from some dynamic sources. My intuition is to create a StateListDrawable for each item, which will have two states: pressed or not. For GridView item view, I would use a Button, which can accomodate a Drawable and a label, that perfectly satisfies my requirment.
<p>I defined an item class to wrap up the original object:
public class GridItem<T> {
public static final int ICON_OFFSET = 4;
private StateListDrawable mIcon;
private String mLabel;
private T mObject;
public Drawable getIcon() {
return mIcon;
}
public void setIcon(Drawable d) {
if (null == d) {
mIcon = null;
}else if(d instanceof StateListDrawable) {
mIcon = (StateListDrawable) d;
} else {
InsetDrawable d1 = new InsetDrawable(d, 0, 0, ICON_OFFSET, ICON_OFFSET);
InsetDrawable d2 = new InsetDrawable(d, ICON_OFFSET, ICON_OFFSET, 0, 0);
mIcon = new StateListDrawable();
mIcon.addState(new int[] { android.R.attr.state_pressed }, d2);
mIcon.addState(StateSet.WILD_CARD, d1);
//This won't help either: mIcon.addState(new int[]{}, d1);
}
}
public String getLabel() {
return mLabel;
}
public void setLabel(String l) {
mLabel = l;
}
public T getObject() {
return mObject;
}
public void setObject(T o) {
mObject = o;
}
}
<p>Now the problem is, when I touch a grid item, the icon "moves" quite as I have expected, but it won't restore its original position when my finger lifts up leaving the item.
<p>My question is: how to programmatically create a StateListDrawable equivalent to one inflated from an XML resource like
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/image_pressed" />
<item android:drawable="@drawable/image_normal" />
</selector>
? | android | statelist | null | null | null | null | open | Android: How to create a StateListDrawable programmatically
===
<p>I have a GridView to display some objects, and visually each of the objects will have an image icon and a text label. I also want the image icon to have some "push and pop" effect when clicked, that is, when pressed, the image will move a small distance to the bottom right direction, and when released get back to its original position.
<p>The objects (and their image icons) are from some dynamic sources. My intuition is to create a StateListDrawable for each item, which will have two states: pressed or not. For GridView item view, I would use a Button, which can accomodate a Drawable and a label, that perfectly satisfies my requirment.
<p>I defined an item class to wrap up the original object:
public class GridItem<T> {
public static final int ICON_OFFSET = 4;
private StateListDrawable mIcon;
private String mLabel;
private T mObject;
public Drawable getIcon() {
return mIcon;
}
public void setIcon(Drawable d) {
if (null == d) {
mIcon = null;
}else if(d instanceof StateListDrawable) {
mIcon = (StateListDrawable) d;
} else {
InsetDrawable d1 = new InsetDrawable(d, 0, 0, ICON_OFFSET, ICON_OFFSET);
InsetDrawable d2 = new InsetDrawable(d, ICON_OFFSET, ICON_OFFSET, 0, 0);
mIcon = new StateListDrawable();
mIcon.addState(new int[] { android.R.attr.state_pressed }, d2);
mIcon.addState(StateSet.WILD_CARD, d1);
//This won't help either: mIcon.addState(new int[]{}, d1);
}
}
public String getLabel() {
return mLabel;
}
public void setLabel(String l) {
mLabel = l;
}
public T getObject() {
return mObject;
}
public void setObject(T o) {
mObject = o;
}
}
<p>Now the problem is, when I touch a grid item, the icon "moves" quite as I have expected, but it won't restore its original position when my finger lifts up leaving the item.
<p>My question is: how to programmatically create a StateListDrawable equivalent to one inflated from an XML resource like
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/image_pressed" />
<item android:drawable="@drawable/image_normal" />
</selector>
? | 0 |
10,732,205 | 05/24/2012 06:23:21 | 1,344,880 | 04/19/2012 19:11:09 | 6 | 0 | algorithm for giving solutions after asking a number of questions | I have to develop an application which has to do the following:
The application will ask a number of questions, and the user has to choose an answer for each question.
After answering all questions, a list of solutions is shown.
The application contains a list of questions, each question has a number of possible answers.
The application also contains a list of solutions.
Depending the given answers, the list of solutions will be sorted using a specific trick.
I was wondering or there is an algorithm for this and how its named. (like the 'genetic algorithm' for solving planning software).
If you have any idea, or you know an code example/open source project, please let me know.
Thanks !
| algorithm | null | null | null | null | 05/25/2012 11:16:53 | not a real question | algorithm for giving solutions after asking a number of questions
===
I have to develop an application which has to do the following:
The application will ask a number of questions, and the user has to choose an answer for each question.
After answering all questions, a list of solutions is shown.
The application contains a list of questions, each question has a number of possible answers.
The application also contains a list of solutions.
Depending the given answers, the list of solutions will be sorted using a specific trick.
I was wondering or there is an algorithm for this and how its named. (like the 'genetic algorithm' for solving planning software).
If you have any idea, or you know an code example/open source project, please let me know.
Thanks !
| 1 |
751,652 | 04/15/2009 13:21:25 | 82,660 | 03/25/2009 15:52:23 | 61 | 12 | Do you like to compile ? | Since this is wide community using all kind of different technologies, it seems like appropriate place to ask this.
Do you like to compile or you prefer scripting ?
I ask this because I tend to program things in small scripting languages with chosen modules I actually need (like Lua, Awk, AutoHotKey ... ) instead of mainstream languages with full blown non-portable IDEs and big one-size-fits-all libraries where every little change require to load and recompile the project.
I like the ability that only tool I actually need to change/fix/update the project is any editor available on any system I happen to run the script (and of course, the interpreter which is single executable that I can either carry with me or download it instatly from Internet and just save it on disk without any kind of installation procedure).
I also feel good to know that anybody wanting to update the project doesn't require anything else but the editor - no notorious compilation issues, dependency problems etc., and that anybody that doesn't like the button I put *there*, can open the file and put it wherever he wants or even delete it in a matter of minutes.
I ask this becuase I noticed that there are some programmers that tend to think that anything that isn't native executable isn't good enough. I even remember one post on the forum where I keep one of my open source applications - another programmer said "*Good app, but it isn't .exe*"
| scripting | compilation | principles | null | null | 04/15/2009 13:26:50 | not constructive | Do you like to compile ?
===
Since this is wide community using all kind of different technologies, it seems like appropriate place to ask this.
Do you like to compile or you prefer scripting ?
I ask this because I tend to program things in small scripting languages with chosen modules I actually need (like Lua, Awk, AutoHotKey ... ) instead of mainstream languages with full blown non-portable IDEs and big one-size-fits-all libraries where every little change require to load and recompile the project.
I like the ability that only tool I actually need to change/fix/update the project is any editor available on any system I happen to run the script (and of course, the interpreter which is single executable that I can either carry with me or download it instatly from Internet and just save it on disk without any kind of installation procedure).
I also feel good to know that anybody wanting to update the project doesn't require anything else but the editor - no notorious compilation issues, dependency problems etc., and that anybody that doesn't like the button I put *there*, can open the file and put it wherever he wants or even delete it in a matter of minutes.
I ask this becuase I noticed that there are some programmers that tend to think that anything that isn't native executable isn't good enough. I even remember one post on the forum where I keep one of my open source applications - another programmer said "*Good app, but it isn't .exe*"
| 4 |
11,111,928 | 06/20/2012 02:08:44 | 135,318 | 07/08/2009 23:24:01 | 4,218 | 75 | How do I fully refresh an ASP.NET page so that Page_Load is run again? | I have an ASP.NET page where an iframe src is being dynamically set:
<iframe id="specialframe" src="<%= IframeSrc %>"></iframe>
And the codebehind:
internal string IframeSrc { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
IframeSrc = SpecialService.GetNewUrl();
}
`SpecialService` is a third-party service that, when called, returns a one-time use URL that looks something like:
http://www.specialservice.com/oneTimeUseId=fh8396123lkjufgh49
For security purposes, this ID can only be used once before expiring. However, this leads to a problem.
The first time I display the page in a browser, it loads the iframe correctly. However, if I hit **refresh**, I will receive an error message in the iframe because it's trying to use the same one-time use ID. It works properly if I **Ctrl+F5** refresh to force a cache clear, but I can't tell my users to do that every time.
My question is, is it possible to force the browser to never use the cache and **always** request a fresh copy from the server? | c# | asp.net | caching | browser | null | null | open | How do I fully refresh an ASP.NET page so that Page_Load is run again?
===
I have an ASP.NET page where an iframe src is being dynamically set:
<iframe id="specialframe" src="<%= IframeSrc %>"></iframe>
And the codebehind:
internal string IframeSrc { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
IframeSrc = SpecialService.GetNewUrl();
}
`SpecialService` is a third-party service that, when called, returns a one-time use URL that looks something like:
http://www.specialservice.com/oneTimeUseId=fh8396123lkjufgh49
For security purposes, this ID can only be used once before expiring. However, this leads to a problem.
The first time I display the page in a browser, it loads the iframe correctly. However, if I hit **refresh**, I will receive an error message in the iframe because it's trying to use the same one-time use ID. It works properly if I **Ctrl+F5** refresh to force a cache clear, but I can't tell my users to do that every time.
My question is, is it possible to force the browser to never use the cache and **always** request a fresh copy from the server? | 0 |
494,002 | 01/29/2009 23:54:46 | 53,185 | 01/09/2009 01:39:36 | 171 | 19 | Newbie: How sum two NSNumber? | Now this must be easy, but how can sum two NSNumber? Is like:
[one floatValue] + [two floatValue]
or exist a better way? | objective-c | math | null | null | null | null | open | Newbie: How sum two NSNumber?
===
Now this must be easy, but how can sum two NSNumber? Is like:
[one floatValue] + [two floatValue]
or exist a better way? | 0 |
3,203,890 | 07/08/2010 13:09:57 | 192,401 | 10/19/2009 12:03:00 | 61 | 12 | Theatre Seat booking and Data Structure? | Was wondering what would be the most effcient in memory data strucuture would be for a Theater seating plan and rendering that in a graphical form on screen for the user.
This came up as a converstation at work as we are looking at booking systems and there is a type of booking that we need to cater for that is outside of the rest of the type of booking that we need to do.
So - take for granted that the data is a database and that is the persitant store. The discussion is based on the need to efficient display this on screen as a coherant seating plan and record the state of the seat after payment for that seat within the organisation.
300+ in company user environment with the need for Public webSite for self booking.
Concurrency would be catered for in the website side - like checking the current state and timeout if reservation not continued or payment failed.
**Scenario**
So a customer calls the agent loads the seating plan. The page gets the information form the database and then draws the state of each seat according to the plan on screen. After some discussion about what is available the customer askes to book and pay for j56,j57,j58.
Looks like some form of Array made of Bytes, if drawn each time.
? Would this be efficient?
Alternatives looking at is static WPF app with these seating plan already and populating that from the data.
But thought that I would ask here just for sanity.
Rules.
- The main plan is 26 rows of 100 seats
- Each row is alphabetical
- Each set is sequential from 1 through to 100
- The seat has the following states
- Empty
- Reserved Not paid
- Reserved Not paid by member
- Paid
- Paid member rate
| c#-4.0 | null | null | null | null | null | open | Theatre Seat booking and Data Structure?
===
Was wondering what would be the most effcient in memory data strucuture would be for a Theater seating plan and rendering that in a graphical form on screen for the user.
This came up as a converstation at work as we are looking at booking systems and there is a type of booking that we need to cater for that is outside of the rest of the type of booking that we need to do.
So - take for granted that the data is a database and that is the persitant store. The discussion is based on the need to efficient display this on screen as a coherant seating plan and record the state of the seat after payment for that seat within the organisation.
300+ in company user environment with the need for Public webSite for self booking.
Concurrency would be catered for in the website side - like checking the current state and timeout if reservation not continued or payment failed.
**Scenario**
So a customer calls the agent loads the seating plan. The page gets the information form the database and then draws the state of each seat according to the plan on screen. After some discussion about what is available the customer askes to book and pay for j56,j57,j58.
Looks like some form of Array made of Bytes, if drawn each time.
? Would this be efficient?
Alternatives looking at is static WPF app with these seating plan already and populating that from the data.
But thought that I would ask here just for sanity.
Rules.
- The main plan is 26 rows of 100 seats
- Each row is alphabetical
- Each set is sequential from 1 through to 100
- The seat has the following states
- Empty
- Reserved Not paid
- Reserved Not paid by member
- Paid
- Paid member rate
| 0 |
5,796,468 | 04/26/2011 21:07:26 | 234,125 | 12/17/2009 21:05:33 | 322 | 30 | Amazon S3 Multipart Upload with plupload and Rails 3 | Amazon has multipart upload functionality where you can send a file in chunks and get it assembled on S3. This allows for some nice resume like functionality for uploading to S3. From another question i got this nice link: [Rails 3 & Plupload][1]
My question is does anyone have any examples where they used the plupload chunking feature with the Amazon multipart feature? Ideally with carrierwave & fog.
I can see it doing the following:
- Generate Unique ID for the upload with plupload,
can we do an event when the plupload
starts?
- Attaching an ajax request to
the chunk completed with the ID
- Having ajax controller method on the
server which uploads to s3 using the
ID
- when all are complete fire a
controller action to reassemble
There is supposedly some PHP code which does some combining, but not with S3 and i can't stand to read PHP.
[1]: http://neovintage.blogspot.com/2010/06/file-uploads-with-rails-3-plupload-and.html "Rails 3 & Plupload" | ruby-on-rails | ruby-on-rails-3 | file-upload | amazon-s3 | plupload | null | open | Amazon S3 Multipart Upload with plupload and Rails 3
===
Amazon has multipart upload functionality where you can send a file in chunks and get it assembled on S3. This allows for some nice resume like functionality for uploading to S3. From another question i got this nice link: [Rails 3 & Plupload][1]
My question is does anyone have any examples where they used the plupload chunking feature with the Amazon multipart feature? Ideally with carrierwave & fog.
I can see it doing the following:
- Generate Unique ID for the upload with plupload,
can we do an event when the plupload
starts?
- Attaching an ajax request to
the chunk completed with the ID
- Having ajax controller method on the
server which uploads to s3 using the
ID
- when all are complete fire a
controller action to reassemble
There is supposedly some PHP code which does some combining, but not with S3 and i can't stand to read PHP.
[1]: http://neovintage.blogspot.com/2010/06/file-uploads-with-rails-3-plupload-and.html "Rails 3 & Plupload" | 0 |
7,116,947 | 08/19/2011 04:28:16 | 804,486 | 06/18/2011 12:16:46 | 1 | 1 | Android java.io.IOException with audio streaming | When I am running audioplayer in streaming by using webservices I am getting IOException
08-19 09:24:54.235: WARN/System.err(394): java.io.IOException: Prepare failed.: status=0x64
08-19 09:24:54.235: WARN/System.err(394): at android.media.MediaPlayer.prepare(Native Method)
08-19 09:24:54.235: WARN/System.err(394): at com.sparsh.xavier.media.activity.AudioPlayerActivity$6$1.run(AudioPlayerActivity.java:183)
08-19 09:24:54.295: WARN/System.err(394): at android.os.Handler.handleCallback(Handler.java:587)
08-19 09:24:54.295: WARN/System.err(394): at android.os.Handler.dispatchMessage(Handler.java:92)
08-19 09:24:54.295: WARN/System.err(394): at android.os.Looper.loop(Looper.java:123)
08-19 09:24:54.295: WARN/System.err(394): at android.app.ActivityThread.main(ActivityThread.java:4627)
08-19 09:24:54.295: WARN/System.err(394): at java.lang.reflect.Method.invokeNative(Native Method)
08-19 09:24:54.295: WARN/System.err(394): at java.lang.reflect.Method.invoke(Method.java:521)
08-19 09:24:54.295: WARN/System.err(394): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-19 09:24:54.295: WARN/System.err(394): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-19 09:24:54.295: WARN/System.err(394): at dalvik.system.NativeStart.main(Native Method)
08-19 09:24:55.075: ERROR/AudioService(68): Media server died.
I have the above error when I am using below url
http://cdnbakmi.kaltura.com/p/672322/sp/67232200/raw/entry_id/0_281db5u2/version/0
but execute my application with out any errors when I am trying with sample url http://www.pocketjourney.com/downloads/pj/tutorials/audio.mp3
I write bellow code for my application
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mediaPlayer.reset();
mediaPlayer.setDataSource(audioURL);
mediaPlayer.prepare(); // might take long! (for buffering, etc)
mediaPlayer.start();
please tell me is this problem with my coding or with providing url.
thanks in advance.
| android | android-mediaplayer | null | null | null | null | open | Android java.io.IOException with audio streaming
===
When I am running audioplayer in streaming by using webservices I am getting IOException
08-19 09:24:54.235: WARN/System.err(394): java.io.IOException: Prepare failed.: status=0x64
08-19 09:24:54.235: WARN/System.err(394): at android.media.MediaPlayer.prepare(Native Method)
08-19 09:24:54.235: WARN/System.err(394): at com.sparsh.xavier.media.activity.AudioPlayerActivity$6$1.run(AudioPlayerActivity.java:183)
08-19 09:24:54.295: WARN/System.err(394): at android.os.Handler.handleCallback(Handler.java:587)
08-19 09:24:54.295: WARN/System.err(394): at android.os.Handler.dispatchMessage(Handler.java:92)
08-19 09:24:54.295: WARN/System.err(394): at android.os.Looper.loop(Looper.java:123)
08-19 09:24:54.295: WARN/System.err(394): at android.app.ActivityThread.main(ActivityThread.java:4627)
08-19 09:24:54.295: WARN/System.err(394): at java.lang.reflect.Method.invokeNative(Native Method)
08-19 09:24:54.295: WARN/System.err(394): at java.lang.reflect.Method.invoke(Method.java:521)
08-19 09:24:54.295: WARN/System.err(394): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-19 09:24:54.295: WARN/System.err(394): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-19 09:24:54.295: WARN/System.err(394): at dalvik.system.NativeStart.main(Native Method)
08-19 09:24:55.075: ERROR/AudioService(68): Media server died.
I have the above error when I am using below url
http://cdnbakmi.kaltura.com/p/672322/sp/67232200/raw/entry_id/0_281db5u2/version/0
but execute my application with out any errors when I am trying with sample url http://www.pocketjourney.com/downloads/pj/tutorials/audio.mp3
I write bellow code for my application
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mediaPlayer.reset();
mediaPlayer.setDataSource(audioURL);
mediaPlayer.prepare(); // might take long! (for buffering, etc)
mediaPlayer.start();
please tell me is this problem with my coding or with providing url.
thanks in advance.
| 0 |
3,144,287 | 06/29/2010 20:03:07 | 144,983 | 07/25/2009 12:44:18 | 156 | 12 | Best way to implement calendar/event program in RoR? | I need a way of implementing a calendar for a webpage to show events this month for a local society i am a member of. I am looking at doing this project in RoR. But have no experience of calendars in RoR can any one recommend any good plugins for RoR for me to play with?
Thanks in Advance
Dean | ruby-on-rails | ruby-on-rails-plugins | null | null | null | null | open | Best way to implement calendar/event program in RoR?
===
I need a way of implementing a calendar for a webpage to show events this month for a local society i am a member of. I am looking at doing this project in RoR. But have no experience of calendars in RoR can any one recommend any good plugins for RoR for me to play with?
Thanks in Advance
Dean | 0 |
5,472,542 | 03/29/2011 12:30:30 | 682,040 | 03/29/2011 12:30:30 | 1 | 0 | Dont know how to call paint method... | Hi i want to know how to call the paint method...
I am a novice programmer and am really just experimenting with things like paint.
The program i am trying to make is the game where there are 3 rungs and the aim of the game is to move different sized disks from the left/right rung to the right/left rung.
here is my code(no where near finished give me a break):
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int amount = 0;
// get the amount of rectangles to draw to represent disks
while (amount <= 1 && amount >= 5){
System.out.print("Please enter amount of discs to use(less than 7 more than one).");
amount = scan.nextInt();
}
// no idea what this is doing..... will use it later... mabye.
for (int i = 0; i < amount; i++){
}
}
public void paint(Graphics g){
// draw a certain amount of rectangles in ascending order
if (amount <= 1 && amount >= 5){
for (int i = 0; i < amount; i++){
g.fillRect(220 - (20 * i),200 + (10 * i),100 - (20 * i),20);
}
}
}
| java | null | null | null | null | null | open | Dont know how to call paint method...
===
Hi i want to know how to call the paint method...
I am a novice programmer and am really just experimenting with things like paint.
The program i am trying to make is the game where there are 3 rungs and the aim of the game is to move different sized disks from the left/right rung to the right/left rung.
here is my code(no where near finished give me a break):
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int amount = 0;
// get the amount of rectangles to draw to represent disks
while (amount <= 1 && amount >= 5){
System.out.print("Please enter amount of discs to use(less than 7 more than one).");
amount = scan.nextInt();
}
// no idea what this is doing..... will use it later... mabye.
for (int i = 0; i < amount; i++){
}
}
public void paint(Graphics g){
// draw a certain amount of rectangles in ascending order
if (amount <= 1 && amount >= 5){
for (int i = 0; i < amount; i++){
g.fillRect(220 - (20 * i),200 + (10 * i),100 - (20 * i),20);
}
}
}
| 0 |
5,219,799 | 03/07/2011 12:37:50 | 648,153 | 03/07/2011 12:37:50 | 1 | 0 | jrxml Report does not open after deployment on server. | I have developed a report using iReport in jrxml format. The report is opening and functioning as expected in the local level, but once I have deployed the same in my server, it is not getting opened and in the log I could find UnsupportedOperation Exception. I am using Oracle Adf 10g as the development framework and my server is of RedHat Linux.
Thanks,
Sachin Gour. | ireport | null | null | null | null | null | open | jrxml Report does not open after deployment on server.
===
I have developed a report using iReport in jrxml format. The report is opening and functioning as expected in the local level, but once I have deployed the same in my server, it is not getting opened and in the log I could find UnsupportedOperation Exception. I am using Oracle Adf 10g as the development framework and my server is of RedHat Linux.
Thanks,
Sachin Gour. | 0 |
351,662 | 12/09/2008 03:07:18 | 44,133 | 12/07/2008 20:19:35 | 168 | 6 | What is your ideal coding environment? | I know that I do my best coding late at night with [Groove Salad][1] playing in the background, but I was wondering how other people feel they do their best coding.
So my question is this - where and when do you do your best coding? Is there anything that you absolutely need to code?
[1]: http://somafm.com/play/groovesalad | work-environment | null | null | null | null | 11/03/2011 23:29:48 | not constructive | What is your ideal coding environment?
===
I know that I do my best coding late at night with [Groove Salad][1] playing in the background, but I was wondering how other people feel they do their best coding.
So my question is this - where and when do you do your best coding? Is there anything that you absolutely need to code?
[1]: http://somafm.com/play/groovesalad | 4 |
10,948,350 | 06/08/2012 11:53:41 | 1,292,746 | 03/26/2012 10:22:37 | 1 | 0 | python script as a service on Ubuntu | I am facing the following problem. I want to run a python script as a service on Ubuntu 11.10 system.(already mentioned in the following link :-
http://stackoverflow.com/questions/4705564/python-script-as-linux-service-daemon/10948190#10948190)
I followed the steps mentioned in the above mentioned link, but i got the following error message in syslog:--
**init: script main process (21826) terminated with status 1 <br>
Jun 8 16:59:55 bilbo kernel: [263012.984531] init: script main process ended, respawning<br>
Jun 8 16:59:55 bilbo kernel: [263013.044099] init: script main process (21827) terminated with status 1**<br>
The above two lines are getting repeated all the time.
On saying:- **sudo start script**
i get the following:--
**$sudo start script <br>
script start/running, process 21826**
Following is the content of my **script.conf** placed in **/etc/init**
**description "Used to start python script as a service"<br>
author "bilbo"<br>
start on runlevel [2]<br>
stop on runlevel [06]<br>
exec python /home/bilbo/scripts/webserver.py
respawn**
Please tell me what I am doing wrong?? Do I have to change my python code as well?
| python | null | null | null | null | 06/08/2012 15:30:35 | off topic | python script as a service on Ubuntu
===
I am facing the following problem. I want to run a python script as a service on Ubuntu 11.10 system.(already mentioned in the following link :-
http://stackoverflow.com/questions/4705564/python-script-as-linux-service-daemon/10948190#10948190)
I followed the steps mentioned in the above mentioned link, but i got the following error message in syslog:--
**init: script main process (21826) terminated with status 1 <br>
Jun 8 16:59:55 bilbo kernel: [263012.984531] init: script main process ended, respawning<br>
Jun 8 16:59:55 bilbo kernel: [263013.044099] init: script main process (21827) terminated with status 1**<br>
The above two lines are getting repeated all the time.
On saying:- **sudo start script**
i get the following:--
**$sudo start script <br>
script start/running, process 21826**
Following is the content of my **script.conf** placed in **/etc/init**
**description "Used to start python script as a service"<br>
author "bilbo"<br>
start on runlevel [2]<br>
stop on runlevel [06]<br>
exec python /home/bilbo/scripts/webserver.py
respawn**
Please tell me what I am doing wrong?? Do I have to change my python code as well?
| 2 |
8,222,354 | 11/22/2011 05:23:23 | 1,053,534 | 11/18/2011 09:53:12 | 16 | 0 | jquery tabs - show next tab after selection | If I have 4 tab, 1st shows by default obvioiusly..
In Tab 1, there will be 2 links (or more).
Tab 2 is only accessible once a selection has been made in Tab 1.
Same goes for Tab 3, and Tab 4.
Lastly, if I selected a item in Tab 1, and now I am on Tab 2, I'd like to be able to see Tab 1's selection outside of the element.
Little tricky, but I'm even willing to paypal some $ for this one :)
Also, if a jquery progress bar can be incorporated that would be great! | jquery | tabs | null | null | null | 11/23/2011 05:13:00 | not a real question | jquery tabs - show next tab after selection
===
If I have 4 tab, 1st shows by default obvioiusly..
In Tab 1, there will be 2 links (or more).
Tab 2 is only accessible once a selection has been made in Tab 1.
Same goes for Tab 3, and Tab 4.
Lastly, if I selected a item in Tab 1, and now I am on Tab 2, I'd like to be able to see Tab 1's selection outside of the element.
Little tricky, but I'm even willing to paypal some $ for this one :)
Also, if a jquery progress bar can be incorporated that would be great! | 1 |
4,776,672 | 01/23/2011 21:33:54 | 266,163 | 02/04/2010 12:17:49 | 61 | 3 | The best managment tool | Who can suggest the best managment tool for collabortive work which has:
- Gantt digramm like in MS Project (not just report like in redmine);
- tracking system (like in redmine);
- web-interface;
- integration with SVN;
- usefull reports; | svn | bug-tracking | project-organization | gantt | null | 09/12/2011 11:54:05 | not constructive | The best managment tool
===
Who can suggest the best managment tool for collabortive work which has:
- Gantt digramm like in MS Project (not just report like in redmine);
- tracking system (like in redmine);
- web-interface;
- integration with SVN;
- usefull reports; | 4 |
4,720,588 | 01/18/2011 04:51:29 | 522,559 | 11/27/2010 21:58:09 | 18 | 0 | implementing a chatroom | I want to create a chatroom server based. I want to be doing requests every 1 second to the server to see if new data is available. However, knowing that there are more than 2 users in the chatroom, I want to know what would be a good way to update all the users in the chatroom with the new content? In other words, while one of the users, for example, might be pulling the latest message sent by another user, there could be another user who sent a new message, but not all users receive the message at the same time, so how to make sure all users are on the same page? | theory | chatroom | null | null | null | 07/04/2012 02:32:06 | not a real question | implementing a chatroom
===
I want to create a chatroom server based. I want to be doing requests every 1 second to the server to see if new data is available. However, knowing that there are more than 2 users in the chatroom, I want to know what would be a good way to update all the users in the chatroom with the new content? In other words, while one of the users, for example, might be pulling the latest message sent by another user, there could be another user who sent a new message, but not all users receive the message at the same time, so how to make sure all users are on the same page? | 1 |
6,387,785 | 06/17/2011 15:04:19 | 80,427 | 03/20/2009 11:19:51 | 144 | 12 | Circular background behind a transparent png image | I have a div that contains a background image of size 64x64. I would like to give this div a circular shadow or radial background when the user hover's over the div with the mouse.
If I simply give the div a box shadow, the shadow is cast around in a square shape. If I make the div have a radius, then I will need to make my div bigger than 64x64 so that it doesn't crop?
Have a look at at the following example that illustrates what I am trying to describe:
http://jsfiddle.net/rNeaZ/2/
The 4th example (shown in link above) in particular doesn't suit what I am after because:
- it's size is much larger than my 64x64 image
- the image looks to have a circular border now, which is not what I want; I am after a circular shadow or background behind it | css3 | radial-gradients | null | null | null | null | open | Circular background behind a transparent png image
===
I have a div that contains a background image of size 64x64. I would like to give this div a circular shadow or radial background when the user hover's over the div with the mouse.
If I simply give the div a box shadow, the shadow is cast around in a square shape. If I make the div have a radius, then I will need to make my div bigger than 64x64 so that it doesn't crop?
Have a look at at the following example that illustrates what I am trying to describe:
http://jsfiddle.net/rNeaZ/2/
The 4th example (shown in link above) in particular doesn't suit what I am after because:
- it's size is much larger than my 64x64 image
- the image looks to have a circular border now, which is not what I want; I am after a circular shadow or background behind it | 0 |
9,379,304 | 02/21/2012 14:31:02 | 384,134 | 07/05/2010 06:18:11 | 171 | 2 | Confusion on dealloc calls | I have a basic question here.
I know that dealloc will be called when the object's reference count becomes zero,and dealloc releases all the resources hold by the object or frees memory.right?
The object reference count becomes zero if we send release message to that object right?.
Lets consider the following object with its property created as,
@property (retain) NSString* myString;//reference count 1
and
dealloc
{
[myString release];//reference count 0
[super dealloc];
}
I am not releasing the myString object any where except in dealloc.
My question is who is making myString object reference count to zero so that dealloc will be called?
Please clarify my doubt.
| objective-c | cocoa | dealloc | null | null | null | open | Confusion on dealloc calls
===
I have a basic question here.
I know that dealloc will be called when the object's reference count becomes zero,and dealloc releases all the resources hold by the object or frees memory.right?
The object reference count becomes zero if we send release message to that object right?.
Lets consider the following object with its property created as,
@property (retain) NSString* myString;//reference count 1
and
dealloc
{
[myString release];//reference count 0
[super dealloc];
}
I am not releasing the myString object any where except in dealloc.
My question is who is making myString object reference count to zero so that dealloc will be called?
Please clarify my doubt.
| 0 |
6,653,689 | 07/11/2011 16:58:39 | 756,029 | 05/16/2011 17:03:12 | 8 | 0 | failed to verify a dsawithSha1 signed message against a DSA public key in python/m2crypto | -
I'm trying to verify a signed message using a x509 certificate holding a dsa public key.
The x509 certificate was provided by an SAP System in PKCS7 encoding and after converting in PEM with openssl I'm able to read the contents (openssl x509 -in sapcert.pem -inform pem -text)
It holds a public key in dsaEncryption, showing me the DSA parameters y(pub), p, q and g.
Because I did not found a DSA implementation in M2Crypto x509 class, i tried to build the DSA public key by myself. Therefor I patched MyCrypto, (see: http://stackoverflow.com/questions/3027196/how-do-i-create-a-m2crypto-dsa-object-given-parameters-and-key-values), compilied it and got a new function DSA.pub_key_from_params(p,q,g,y) to build my DSA public-key using the parameters found in the certificate.
Until this point everything works fine. (The unittest although ran without errors).
in the second step I recieve the signedMessage (named seckey) as an URL parameter and after decoding it (base64) I got an proper DER string I'm able to read with openssl (openssl ans1parse -in seckey -inform der).
In the output from openssl I can see the signed messageDigest, which is exactly the SHA1 encoded messagedigest I try to verify (so I can be sure the signedMessage was provided properly). Although I can see a dsaWithSHA1 signature string which seems to hold the r and s values needing for verify an dsa signed message (see: http://stackoverflow.com/questions/3454523/m2crypto-verifying-dsa-signatures)
At this point I stuck in my attempts to verify the signedMessage for a couple of days now and I hope there is a crytographic-expert out there who can help me. I tried and googled a lot, tried the pyCrypto lib instead, all without success.
I tried to pass the SHA1 MessageDigest and the r and s values to the M2Crypto.DSA.verify function but due it fails I think I either had to pass the signedMessage or parts of it.
(in a Java forum I found some posts about verifying signedMessages provided by SAP and theres somewhat about calculating the signature over "the DER encoding
of the signed attributes." ?)
Here's my sample code:
# -*- coding: iso-8859-1 -*-
import M2Crypto
import urllib
import base64
from Crypto.Util import asn1
from M2Crypto import m2
import sha
# the certificate
cert = """subject=/C=DE/O=SAP Trust Community/OU=SAP Web AS/OU=I0020154766/CN=RE2
issuer=/C=DE/O=SAP Trust Community/OU=SAP Web AS/OU=I0020154766/CN=RE2
-----BEGIN CERTIFICATE-----
MIICMDCCAe8CAQAwCQYHKoZIzjgEAzBkMQswCQYDVQQGEwJERTEcMBoGA1UEChMT
U0FQIFRydXN0IENvbW11bml0eTETMBEGA1UECxMKU0FQIFdlYiBBUzEUMBIGA1UE
CxMLSTAwMjAxNTQ3NjYxDDAKBgNVBAMTA1JFMjAeFw05NzEwMDEwMDAwMDBaFw0z
ODAxMDEwMDAwMDBaMGQxCzAJBgNVBAYTAkRFMRwwGgYDVQQKExNTQVAgVHJ1c3Qg
Q29tbXVuaXR5MRMwEQYDVQQLEwpTQVAgV2ViIEFTMRQwEgYDVQQLEwtJMDAyMDE1
NDc2NjEMMAoGA1UEAxMDUkUyMIHyMIGpBgcqhkjOOAQBMIGdAkEA//8x1Bqn4a00
FKr9CTwPPskxy0yrx7iU6T4vza4wW93Mo2d/IYTZNAxFqhrm+fIUrEp5fxIpYRmJ
rKL2qRCUmQIVANrcsXlFvrXH455gM69vKZebhQZfAkEAmYzXTzHYwvqKEM46FvQX
yC5O+JInwgk7Dac7gqGAkkhCS1aII4Vkc9kIEx3GFLD2mx4+yJuMQ8pQ4wz4FkfB
JANEAAJBAI1em/0owxMTEP+akz56BovQ7Q6LiqUmVLLxJcjDozjI+5z6IrAPtub2
veLXPdghDHcHB5jHKoqT4JHpqRc+uhIwCQYHKoZIzjgEAwMwADAtAhRm2jqiMWL+
26mA7HdKfZdkawMuYQIVAMekXdAT4wbyrb5/yFtuIPjCBfpr
-----END CERTIFICATE-----
"""
f = open('sapcert.pem', 'w')
f.write(cert)
f.close()
# now you can see it content with openssl
# openssl x509 -in sapcert.pem -inform pem -text
# this is the signedMessage
secKey = "MIIBSwYJKoZIhvcNAQcCoIIBPDCCATgCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHATGCARcwggETAgEBMGkwZDELMAkGA1UEBhMCREUxHDAaBgNVBAoTE1NBUCBUcnVzdCBDb21tdW5pdHkxEzARBgNVBAsTClNBUCBXZWIgQVMxFDASBgNVBAsTC0kwMDIwMTU0NzY2MQwwCgYDVQQDEwNSRTICAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTExMDUyNjE1MzAyNVowIwYJKoZIhvcNAQkEMRYEFPelg4iVtaKORpuFxUvgo23Du7%2BtMAkGByqGSM44BAMELjAsAhQ46oCNmzZArb5yOFSYGY0hWu8dZwIUT35hPccJ6B9HIsOE0u8LwYZaFNk%3D"
secKey = urllib.unquote(secKey)
secKey64 = base64.b64decode(secKey)
# now you can save it as a DER encoded file
f = open('seckey.der', 'wb')
f.write(secKey64)
f.close()
# you can pass it to openssl to see the the content
# openssl asn1parse -in seckey.der -inform der
# here is the sha1 encoded messagedigest I had to verify
hashstr = "ZS4DDB9616BA031C40E1008003AC100097dCN%3DRE2,OU%3DI0020154766,OU%3DSAPWebAS,O%3DSAPTrustCommunity,C%3DDE20110526173025"
osha1=M2Crypto.EVP.MessageDigest('sha1')
osha1.update(hashstr)
sha1_md = osha1.digest()
print sha1_md.encode('hex')
# now i build a DSA key with the params found in the certificate
pub="8d5e9bfd28c3131310ff9a933e7a068bd0ed0e8b8aa52654b2f125c8c3a338c8fb9cfa22b00fb6e6f6bde2d73dd8210c77070798c72a8a93e091e9a9173eba12"
p="ffff31d41aa7e1ad3414aafd093c0f3ec931cb4cabc7b894e93e2fcdae305bddcca3677f2184d9340c45aa1ae6f9f214ac4a797f1229611989aca2f6a9109499"
q="dadcb17945beb5c7e39e6033af6f29979b85065f"
g="998cd74f31d8c2fa8a10ce3a16f417c82e4ef89227c2093b0da73b82a1809248424b568823856473d908131dc614b0f69b1e3ec89b8c43ca50e30cf81647c124"
pub1 = M2Crypto.m2.bn_to_mpi(M2Crypto.m2.hex_to_bn(pub))
p1 = M2Crypto.m2.bn_to_mpi(M2Crypto.m2.hex_to_bn(p))
q1 = M2Crypto.m2.bn_to_mpi(M2Crypto.m2.hex_to_bn(q))
g1 = M2Crypto.m2.bn_to_mpi(M2Crypto.m2.hex_to_bn(g))
# this function is available after patching und compiling M2Crypto
# https://bugzilla.osafoundation.org/attachment.cgi?id=5700
dsa1 = M2Crypto.DSA.pub_key_from_params(p1, q1, g1, pub1)
print dsa1.check_key()
# this seems to be the signature-values r and s in seckey.der
asn_hex = "302C021438EA808D9B3640ADBE72385498198D215AEF1D6702144F7E613DC709E81F4722C384D2EF0BC1865A14D9"
r = asn_hex[8:48]
s = asn_hex[52:]
r1 = M2Crypto.m2.bn_to_mpi(M2Crypto.m2.hex_to_bn(r))
s1 = M2Crypto.m2.bn_to_mpi(M2Crypto.m2.hex_to_bn(s))
# but this fails
v = dsa1.verify(sha1_md, r1, s1)
print v
# this too
sk = M2Crypto.m2.bn_to_mpi(M2Crypto.m2.bin_to_bn(secKey64))
v = dsa1.verify(sk, r1, s1)
print v
Is there anybody who knows how to do a proper dsawithsha1 signature verification? Please help!
best Regards,
Falko | digital-signature | sha1 | verification | m2crypto | dsa | null | open | failed to verify a dsawithSha1 signed message against a DSA public key in python/m2crypto
===
-
I'm trying to verify a signed message using a x509 certificate holding a dsa public key.
The x509 certificate was provided by an SAP System in PKCS7 encoding and after converting in PEM with openssl I'm able to read the contents (openssl x509 -in sapcert.pem -inform pem -text)
It holds a public key in dsaEncryption, showing me the DSA parameters y(pub), p, q and g.
Because I did not found a DSA implementation in M2Crypto x509 class, i tried to build the DSA public key by myself. Therefor I patched MyCrypto, (see: http://stackoverflow.com/questions/3027196/how-do-i-create-a-m2crypto-dsa-object-given-parameters-and-key-values), compilied it and got a new function DSA.pub_key_from_params(p,q,g,y) to build my DSA public-key using the parameters found in the certificate.
Until this point everything works fine. (The unittest although ran without errors).
in the second step I recieve the signedMessage (named seckey) as an URL parameter and after decoding it (base64) I got an proper DER string I'm able to read with openssl (openssl ans1parse -in seckey -inform der).
In the output from openssl I can see the signed messageDigest, which is exactly the SHA1 encoded messagedigest I try to verify (so I can be sure the signedMessage was provided properly). Although I can see a dsaWithSHA1 signature string which seems to hold the r and s values needing for verify an dsa signed message (see: http://stackoverflow.com/questions/3454523/m2crypto-verifying-dsa-signatures)
At this point I stuck in my attempts to verify the signedMessage for a couple of days now and I hope there is a crytographic-expert out there who can help me. I tried and googled a lot, tried the pyCrypto lib instead, all without success.
I tried to pass the SHA1 MessageDigest and the r and s values to the M2Crypto.DSA.verify function but due it fails I think I either had to pass the signedMessage or parts of it.
(in a Java forum I found some posts about verifying signedMessages provided by SAP and theres somewhat about calculating the signature over "the DER encoding
of the signed attributes." ?)
Here's my sample code:
# -*- coding: iso-8859-1 -*-
import M2Crypto
import urllib
import base64
from Crypto.Util import asn1
from M2Crypto import m2
import sha
# the certificate
cert = """subject=/C=DE/O=SAP Trust Community/OU=SAP Web AS/OU=I0020154766/CN=RE2
issuer=/C=DE/O=SAP Trust Community/OU=SAP Web AS/OU=I0020154766/CN=RE2
-----BEGIN CERTIFICATE-----
MIICMDCCAe8CAQAwCQYHKoZIzjgEAzBkMQswCQYDVQQGEwJERTEcMBoGA1UEChMT
U0FQIFRydXN0IENvbW11bml0eTETMBEGA1UECxMKU0FQIFdlYiBBUzEUMBIGA1UE
CxMLSTAwMjAxNTQ3NjYxDDAKBgNVBAMTA1JFMjAeFw05NzEwMDEwMDAwMDBaFw0z
ODAxMDEwMDAwMDBaMGQxCzAJBgNVBAYTAkRFMRwwGgYDVQQKExNTQVAgVHJ1c3Qg
Q29tbXVuaXR5MRMwEQYDVQQLEwpTQVAgV2ViIEFTMRQwEgYDVQQLEwtJMDAyMDE1
NDc2NjEMMAoGA1UEAxMDUkUyMIHyMIGpBgcqhkjOOAQBMIGdAkEA//8x1Bqn4a00
FKr9CTwPPskxy0yrx7iU6T4vza4wW93Mo2d/IYTZNAxFqhrm+fIUrEp5fxIpYRmJ
rKL2qRCUmQIVANrcsXlFvrXH455gM69vKZebhQZfAkEAmYzXTzHYwvqKEM46FvQX
yC5O+JInwgk7Dac7gqGAkkhCS1aII4Vkc9kIEx3GFLD2mx4+yJuMQ8pQ4wz4FkfB
JANEAAJBAI1em/0owxMTEP+akz56BovQ7Q6LiqUmVLLxJcjDozjI+5z6IrAPtub2
veLXPdghDHcHB5jHKoqT4JHpqRc+uhIwCQYHKoZIzjgEAwMwADAtAhRm2jqiMWL+
26mA7HdKfZdkawMuYQIVAMekXdAT4wbyrb5/yFtuIPjCBfpr
-----END CERTIFICATE-----
"""
f = open('sapcert.pem', 'w')
f.write(cert)
f.close()
# now you can see it content with openssl
# openssl x509 -in sapcert.pem -inform pem -text
# this is the signedMessage
secKey = "MIIBSwYJKoZIhvcNAQcCoIIBPDCCATgCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHATGCARcwggETAgEBMGkwZDELMAkGA1UEBhMCREUxHDAaBgNVBAoTE1NBUCBUcnVzdCBDb21tdW5pdHkxEzARBgNVBAsTClNBUCBXZWIgQVMxFDASBgNVBAsTC0kwMDIwMTU0NzY2MQwwCgYDVQQDEwNSRTICAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTExMDUyNjE1MzAyNVowIwYJKoZIhvcNAQkEMRYEFPelg4iVtaKORpuFxUvgo23Du7%2BtMAkGByqGSM44BAMELjAsAhQ46oCNmzZArb5yOFSYGY0hWu8dZwIUT35hPccJ6B9HIsOE0u8LwYZaFNk%3D"
secKey = urllib.unquote(secKey)
secKey64 = base64.b64decode(secKey)
# now you can save it as a DER encoded file
f = open('seckey.der', 'wb')
f.write(secKey64)
f.close()
# you can pass it to openssl to see the the content
# openssl asn1parse -in seckey.der -inform der
# here is the sha1 encoded messagedigest I had to verify
hashstr = "ZS4DDB9616BA031C40E1008003AC100097dCN%3DRE2,OU%3DI0020154766,OU%3DSAPWebAS,O%3DSAPTrustCommunity,C%3DDE20110526173025"
osha1=M2Crypto.EVP.MessageDigest('sha1')
osha1.update(hashstr)
sha1_md = osha1.digest()
print sha1_md.encode('hex')
# now i build a DSA key with the params found in the certificate
pub="8d5e9bfd28c3131310ff9a933e7a068bd0ed0e8b8aa52654b2f125c8c3a338c8fb9cfa22b00fb6e6f6bde2d73dd8210c77070798c72a8a93e091e9a9173eba12"
p="ffff31d41aa7e1ad3414aafd093c0f3ec931cb4cabc7b894e93e2fcdae305bddcca3677f2184d9340c45aa1ae6f9f214ac4a797f1229611989aca2f6a9109499"
q="dadcb17945beb5c7e39e6033af6f29979b85065f"
g="998cd74f31d8c2fa8a10ce3a16f417c82e4ef89227c2093b0da73b82a1809248424b568823856473d908131dc614b0f69b1e3ec89b8c43ca50e30cf81647c124"
pub1 = M2Crypto.m2.bn_to_mpi(M2Crypto.m2.hex_to_bn(pub))
p1 = M2Crypto.m2.bn_to_mpi(M2Crypto.m2.hex_to_bn(p))
q1 = M2Crypto.m2.bn_to_mpi(M2Crypto.m2.hex_to_bn(q))
g1 = M2Crypto.m2.bn_to_mpi(M2Crypto.m2.hex_to_bn(g))
# this function is available after patching und compiling M2Crypto
# https://bugzilla.osafoundation.org/attachment.cgi?id=5700
dsa1 = M2Crypto.DSA.pub_key_from_params(p1, q1, g1, pub1)
print dsa1.check_key()
# this seems to be the signature-values r and s in seckey.der
asn_hex = "302C021438EA808D9B3640ADBE72385498198D215AEF1D6702144F7E613DC709E81F4722C384D2EF0BC1865A14D9"
r = asn_hex[8:48]
s = asn_hex[52:]
r1 = M2Crypto.m2.bn_to_mpi(M2Crypto.m2.hex_to_bn(r))
s1 = M2Crypto.m2.bn_to_mpi(M2Crypto.m2.hex_to_bn(s))
# but this fails
v = dsa1.verify(sha1_md, r1, s1)
print v
# this too
sk = M2Crypto.m2.bn_to_mpi(M2Crypto.m2.bin_to_bn(secKey64))
v = dsa1.verify(sk, r1, s1)
print v
Is there anybody who knows how to do a proper dsawithsha1 signature verification? Please help!
best Regards,
Falko | 0 |
2,026,262 | 01/08/2010 08:19:23 | 246,236 | 01/08/2010 08:19:23 | 1 | 0 | Currently known best algorithm(s) for computer chess ? | I just wanted to learn name of algorithms.. thanks | chess | algorithm | null | null | null | 07/12/2011 12:28:59 | not constructive | Currently known best algorithm(s) for computer chess ?
===
I just wanted to learn name of algorithms.. thanks | 4 |
1,972,359 | 12/29/2009 00:43:36 | 117,069 | 06/04/2009 05:02:17 | 2,750 | 178 | The stack is an implementation detail, or not? | According to http://msdn.microsoft.com/en-us/library/ms229017.aspx, value types "are allocated on the stack or inline with other structures*". Yet in [the stack is an implementation detail](http://blogs.msdn.com/ericlippert/archive/2009/04/27/the-stack-is-an-implementation-detail.aspx), Eric Lippert states that that's an implementation detail.
To my understanding, an implementation detail is ["a behavior produced by code which may be relied on by consuming code, though that behavior is not specified by the spec the code is written to."](http://stackoverflow.com/questions/1777719/what-is-the-definition-of-an-implementation-detail/1777728#1777728). I understand that documentation is not a specification, though presumably if something is listed in the documentation that we can rely on it and it is no longer an implmentation detail. So, is the stack an implementation detail or isn't it?
*: i understand this to mean that structs can also be allocated inside of other ones instead of directly on the heap, though i could be wrong. | stack | value-type | implementation-details | confusion | .net | null | open | The stack is an implementation detail, or not?
===
According to http://msdn.microsoft.com/en-us/library/ms229017.aspx, value types "are allocated on the stack or inline with other structures*". Yet in [the stack is an implementation detail](http://blogs.msdn.com/ericlippert/archive/2009/04/27/the-stack-is-an-implementation-detail.aspx), Eric Lippert states that that's an implementation detail.
To my understanding, an implementation detail is ["a behavior produced by code which may be relied on by consuming code, though that behavior is not specified by the spec the code is written to."](http://stackoverflow.com/questions/1777719/what-is-the-definition-of-an-implementation-detail/1777728#1777728). I understand that documentation is not a specification, though presumably if something is listed in the documentation that we can rely on it and it is no longer an implmentation detail. So, is the stack an implementation detail or isn't it?
*: i understand this to mean that structs can also be allocated inside of other ones instead of directly on the heap, though i could be wrong. | 0 |
11,463,044 | 07/13/2012 01:43:51 | 499,484 | 11/06/2010 21:38:01 | 308 | 2 | Clojure: architecture advice needed | I'm writing a little clojure pub/sub interface. It's very barebones, only two methods that will actually be used: do-pub and sub-listen. sub-listen takes a string (a sub name) and do-pub takes two strings (a sub name and a value).
I'm still fairly new at clojure and am having some trouble coming up with a workable way to do this. My first thought (and indeed my first implementation) uses a single agent which holds a hash:
{ subname (promise1 promise2 etc) }
When a thread wants to sub it conj's a promise object to the list associated with the sub it wants, then immediately tries to de-reference that promise (therefore blocking).
When a pub happens it goes through every item in the list for the sub and delivers the value to that item (the promise). It then dissoc's that subname from the map and returns it to the agent.
In this way I got a simple pub sub implementation working. However, the problem comes when someone subs, doesn't receive a pub for a certain amount of time, then gets killed due to timeout. In this scenario there will be a worthless promise in the agent that doesn't need to be, and moreover this will be a source of a memory leak if that sub never gets pub'd.
Does anyone have any thoughts on how to solve this? Or if there is a better way to do what I'm trying to do overall (I'm trying to avoid using any external pre-cooked pubsub libraries, this is a pet project not a work one)? | clojure | publish-subscribe | null | null | null | null | open | Clojure: architecture advice needed
===
I'm writing a little clojure pub/sub interface. It's very barebones, only two methods that will actually be used: do-pub and sub-listen. sub-listen takes a string (a sub name) and do-pub takes two strings (a sub name and a value).
I'm still fairly new at clojure and am having some trouble coming up with a workable way to do this. My first thought (and indeed my first implementation) uses a single agent which holds a hash:
{ subname (promise1 promise2 etc) }
When a thread wants to sub it conj's a promise object to the list associated with the sub it wants, then immediately tries to de-reference that promise (therefore blocking).
When a pub happens it goes through every item in the list for the sub and delivers the value to that item (the promise). It then dissoc's that subname from the map and returns it to the agent.
In this way I got a simple pub sub implementation working. However, the problem comes when someone subs, doesn't receive a pub for a certain amount of time, then gets killed due to timeout. In this scenario there will be a worthless promise in the agent that doesn't need to be, and moreover this will be a source of a memory leak if that sub never gets pub'd.
Does anyone have any thoughts on how to solve this? Or if there is a better way to do what I'm trying to do overall (I'm trying to avoid using any external pre-cooked pubsub libraries, this is a pet project not a work one)? | 0 |
8,785,238 | 01/09/2012 07:41:16 | 1,072,846 | 11/30/2011 07:34:39 | 13 | 1 | Iterating through UI elements in an NSMutableArray | http://stackoverflow.com/questions/1443951/nsmutablearray-vs-uiview-iphone | iphone | objective-c | uiview | nsmutablearray | null | 01/09/2012 09:15:20 | not a real question | Iterating through UI elements in an NSMutableArray
===
http://stackoverflow.com/questions/1443951/nsmutablearray-vs-uiview-iphone | 1 |
10,725,938 | 05/23/2012 18:40:57 | 1,118,019 | 12/27/2011 17:12:55 | 138 | 1 | custom uiview in uitableviewcell blocks uitableviewcell from reciving an event | i have a custom uitableviewcell i.e. i subclassed uitableviewcell class
when populating each cell (or row) of the uitableview, i am creating my custom uitableviewcell, which composes of an image and some labels.
now when i override the following method in my custom 'uitableviewcell' class,
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
NSLog(@"CLICKED CLICKED CELL CLICKED CLICKED");
[super touchesBegan:touches withEvent:event];
}
it never gets called if i click on the custom views i added to the my custom uitableviecell, but it is fine (event triggered) when i click on the region where there is no custom view on top of it.
my goal is simple, i want to detect any touches in each row (uitableviewcell) in the uitableview. | ios | uitableview | uitableviewcell | ontouchevent | touchesbegan | null | open | custom uiview in uitableviewcell blocks uitableviewcell from reciving an event
===
i have a custom uitableviewcell i.e. i subclassed uitableviewcell class
when populating each cell (or row) of the uitableview, i am creating my custom uitableviewcell, which composes of an image and some labels.
now when i override the following method in my custom 'uitableviewcell' class,
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
NSLog(@"CLICKED CLICKED CELL CLICKED CLICKED");
[super touchesBegan:touches withEvent:event];
}
it never gets called if i click on the custom views i added to the my custom uitableviecell, but it is fine (event triggered) when i click on the region where there is no custom view on top of it.
my goal is simple, i want to detect any touches in each row (uitableviewcell) in the uitableview. | 0 |
5,389,775 | 03/22/2011 10:22:51 | 671,003 | 03/22/2011 10:22:51 | 1 | 0 | when should i create my own application? | When do i know that i am ready to create my own application from scratch and sell it? how good in programming should i be? should i know security,business,database administration... before i can do this? | c# | null | null | null | null | 03/22/2011 10:25:45 | not a real question | when should i create my own application?
===
When do i know that i am ready to create my own application from scratch and sell it? how good in programming should i be? should i know security,business,database administration... before i can do this? | 1 |
7,467,496 | 09/19/2011 07:09:15 | 587,153 | 01/24/2011 07:17:55 | 60 | 5 | C# : Getting all nodes of XML doc | Is there a simple way, to get all nodes from an xml document? I need every single node, childnode and so on, to check if they have certain attributes.
Or will I have to crawl through the document, asking for childnodes? | c# | xml | null | null | null | null | open | C# : Getting all nodes of XML doc
===
Is there a simple way, to get all nodes from an xml document? I need every single node, childnode and so on, to check if they have certain attributes.
Or will I have to crawl through the document, asking for childnodes? | 0 |
6,179,024 | 05/30/2011 17:10:44 | 740,249 | 05/05/2011 15:32:48 | 1 | 0 | Dendogram in Java | i am searching for an component which will visualize an dendogram which is interactive. The interaction should be: marking an edge, zooming etc.
I want to add this component easily to my project like in a jar-File.
I hope anyone could help me.
With greetz,
bladepit | java | null | null | null | null | 05/30/2011 17:16:51 | not a real question | Dendogram in Java
===
i am searching for an component which will visualize an dendogram which is interactive. The interaction should be: marking an edge, zooming etc.
I want to add this component easily to my project like in a jar-File.
I hope anyone could help me.
With greetz,
bladepit | 1 |
3,081,818 | 06/21/2010 02:32:50 | 157,300 | 08/16/2009 13:35:45 | 918 | 1 | looking for light-weight data persistence solution in perl | In my app I need to store some simple data both in memroy and in disk. A real database will be overkill in my case, so I need lighter one to handle the simple data persistence requirement. I do some google search by myself, and found something interesting like DBM and DBI CVS, etc. but since there are too many options there so it is difficult for me to make the actuaaly choice, so I'd like ask you here for the "best-practice" like light-weight data perisistence solution in perl. | perl | null | null | null | null | null | open | looking for light-weight data persistence solution in perl
===
In my app I need to store some simple data both in memroy and in disk. A real database will be overkill in my case, so I need lighter one to handle the simple data persistence requirement. I do some google search by myself, and found something interesting like DBM and DBI CVS, etc. but since there are too many options there so it is difficult for me to make the actuaaly choice, so I'd like ask you here for the "best-practice" like light-weight data perisistence solution in perl. | 0 |
5,414,065 | 03/24/2011 02:25:08 | 675,622 | 03/23/2011 19:58:01 | 11 | 0 | Send a file to another computer when you know it's IP using a batch file. | How would I send a file from one computer to another using only a batch file if I know the IP of the receiving computer? Could this be done with net send? Could it be copied to their desktop? | windows | batch | ip | null | null | 03/24/2011 05:40:03 | too localized | Send a file to another computer when you know it's IP using a batch file.
===
How would I send a file from one computer to another using only a batch file if I know the IP of the receiving computer? Could this be done with net send? Could it be copied to their desktop? | 3 |
429,722 | 01/09/2009 21:01:11 | 438 | 08/05/2008 18:28:20 | 275 | 19 | How to get rid validation warnings | The complete warning is Validation (): Element 'html' occurs too few times
This is for a JSON view, which you might guess returns a JSON result and hence no html. | visual-studio | asp.net-mvc | null | null | null | null | open | How to get rid validation warnings
===
The complete warning is Validation (): Element 'html' occurs too few times
This is for a JSON view, which you might guess returns a JSON result and hence no html. | 0 |
8,313,446 | 11/29/2011 15:33:05 | 78,496 | 03/16/2009 08:56:45 | 30 | 3 | Distributing Microsoft Anna recordings | Is it legal to distribute recordings generated by Microsoft Anna (or any other speech synthesiser) ? I can't find anything to suggest it isn't, but I can't help but shake the feeling that it's a legal grey-area. | text-to-speech | sapi | null | null | null | 11/29/2011 15:35:38 | off topic | Distributing Microsoft Anna recordings
===
Is it legal to distribute recordings generated by Microsoft Anna (or any other speech synthesiser) ? I can't find anything to suggest it isn't, but I can't help but shake the feeling that it's a legal grey-area. | 2 |
9,177,479 | 02/07/2012 13:54:13 | 1,194,777 | 02/07/2012 13:46:24 | 1 | 0 | UNIX: Moving files based on date | How can I move files from a source directory to target directory based on specific date? and this has to run everyday morning...
Can any one you please suggest me with some solution...
Thanks in advance, Dilip | unix | moving | null | null | null | 02/07/2012 13:59:28 | off topic | UNIX: Moving files based on date
===
How can I move files from a source directory to target directory based on specific date? and this has to run everyday morning...
Can any one you please suggest me with some solution...
Thanks in advance, Dilip | 2 |
1,227,018 | 08/04/2009 11:45:48 | 63,213 | 02/06/2009 06:31:53 | 155 | 7 | file transfer using socket | am doing client server prog using sokets. in that i have to send large(200 MB) database
file from client to server ... when i send a file i could send entire file at a time.
but i could't receive entire file at a time becoz of system lacked sufficient buffer space .
so i have to receive 10MB at a time... after recived all data am writing bytes as a file.
my prob is the destination db size is greater than source size also it's in unrecognised format.
how to solve this prob... thanx in advance
| c# | null | null | null | null | 08/04/2009 12:09:39 | not a real question | file transfer using socket
===
am doing client server prog using sokets. in that i have to send large(200 MB) database
file from client to server ... when i send a file i could send entire file at a time.
but i could't receive entire file at a time becoz of system lacked sufficient buffer space .
so i have to receive 10MB at a time... after recived all data am writing bytes as a file.
my prob is the destination db size is greater than source size also it's in unrecognised format.
how to solve this prob... thanx in advance
| 1 |
4,300,774 | 11/29/2010 04:04:30 | 503,901 | 11/10/2010 23:26:20 | 23 | 0 | Research position interview | I'll be going on a interview tomorrow for a research position at my university.
What are some things I should keep in mind? Any tips/advice? | interview-questions | null | null | null | null | 11/29/2010 04:14:25 | off topic | Research position interview
===
I'll be going on a interview tomorrow for a research position at my university.
What are some things I should keep in mind? Any tips/advice? | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.