unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Using Blitz implementation of JavaSpaces === I have great doubts about this forum, but I am willing to be pleasantly surprised ;) **Kudos and great karma to those who get me back on track.** I am attempting to use the blitz implementation of JavaSpaces (http://www.dancres.org/blitz/blitz_js.html) to implement the ComputeFarm example provided at http://today.java.net/pub/a/today/2005/04/21/farm.html The in memory example works fine, but whenever I attempt to use the blitz out-of-box implementation i get the following error: (yes **com.sun.jini.mahalo.TxnMgrProxy** is in the class path) 2008-09-24 09:57:37.316 ERROR [Thread-4] JavaSpaceComputeSpace 155 - Exception while taking task. java.rmi.ServerException: RemoteException in server thread; nested exception is: java.rmi.UnmarshalException: unmarshalling method/arguments; nested exception is: java.lang.ClassNotFoundException: com.sun.jini.mahalo.TxnMgrProxy at net.jini.jeri.BasicInvocationDispatcher.dispatch(BasicInvocationDispatcher.java:644) at com.sun.jini.jeri.internal.runtime.ObjectTable$6.run(ObjectTable.java:597) at net.jini.export.ServerContext.doWithServerContext(ServerContext.java:103) at com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch0(ObjectTable.java:595) at com.sun.jini.jeri.internal.runtime.ObjectTable$Target.access$700(ObjectTable.java:212) at com.sun.jini.jeri.internal.runtime.ObjectTable$5.run(ObjectTable.java:568) at com.sun.jini.start.AggregatePolicyProvider$6.run(AggregatePolicyProvider.java:527) at java.security.AccessController.doPrivileged(Native Method) at com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch(ObjectTable.java:565) at com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch(ObjectTable.java:540) at com.sun.jini.jeri.internal.runtime.ObjectTable$RD.dispatch(ObjectTable.java:778) at net.jini.jeri.connection.ServerConnectionManager$Dispatcher.dispatch(ServerConnectionManager.java:148) at com.sun.jini.jeri.internal.mux.MuxServer$2.run(MuxServer.java:244) at com.sun.jini.start.AggregatePolicyProvider$5.run(AggregatePolicyProvider.java:513) at java.security.AccessController.doPrivileged(Native Method) at com.sun.jini.jeri.internal.mux.MuxServer$1.run(MuxServer.java:241) at com.sun.jini.thread.ThreadPool$Worker.run(ThreadPool.java:136) at java.lang.Thread.run(Thread.java:595) at com.sun.jini.jeri.internal.runtime.Util.__________EXCEPTION_RECEIVED_FROM_SERVER__________(Util.java:108) at com.sun.jini.jeri.internal.runtime.Util.exceptionReceivedFromServer(Util.java:101) at net.jini.jeri.BasicInvocationHandler.unmarshalThrow(BasicInvocationHandler.java:1303) at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvocationHandler.java:832) at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethod(BasicInvocationHandler.java:659) at net.jini.jeri.BasicInvocationHandler.invoke(BasicInvocationHandler.java:528) at $Proxy0.take(Unknown Source) at org.dancres.blitz.remote.BlitzProxy.take(BlitzProxy.java:157) at compute.impl.javaspaces.JavaSpaceComputeSpace.take(JavaSpaceComputeSpace.java:138) at example.squares.SquaresJob.collectResults(SquaresJob.java:47) at compute.impl.AbstractJobRunner$CollectThread.run(AbstractJobRunner.java:28) Caused by: java.rmi.UnmarshalException: unmarshalling method/arguments; nested exception is: java.lang.ClassNotFoundException: com.sun.jini.mahalo.TxnMgrProxy at net.jini.jeri.BasicInvocationDispatcher.dispatch(BasicInvocationDispatcher.java:619) at com.sun.jini.jeri.internal.runtime.ObjectTable$6.run(ObjectTable.java:597) at net.jini.export.ServerContext.doWithServerContext(ServerContext.java:103) at com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch0(ObjectTable.java:595) at com.sun.jini.jeri.internal.runtime.ObjectTable$Target.access$700(ObjectTable.java:212) at com.sun.jini.jeri.internal.runtime.ObjectTable$5.run(ObjectTable.java:568) at com.sun.jini.start.AggregatePolicyProvider$6.run(AggregatePolicyProvider.java:527) at java.security.AccessController.doPrivileged(Native Method) at com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch(ObjectTable.java:565) at com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch(ObjectTable.java:540) at com.sun.jini.jeri.internal.runtime.ObjectTable$RD.dispatch(ObjectTable.java:778) at net.jini.jeri.connection.ServerConnectionManager$Dispatcher.dispatch(ServerConnectionManager.java:148) at com.sun.jini.jeri.internal.mux.MuxServer$2.run(MuxServer.java:244) at com.sun.jini.start.AggregatePolicyProvider$5.run(AggregatePolicyProvider.java:513) at java.security.AccessController.doPrivileged(Native Method) at com.sun.jini.jeri.internal.mux.MuxServer$1.run(MuxServer.java:241) at com.sun.jini.thread.ThreadPool$Worker.run(ThreadPool.java:136) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.ClassNotFoundException: com.sun.jini.mahalo.TxnMgrProxy at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at net.jini.loader.pref.PreferredClassLoader.loadClass(PreferredClassLoader.java:922) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at net.jini.loader.pref.PreferredClassProvider.loadClass(PreferredClassProvider.java:613) at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247) at net.jini.loader.ClassLoading.loadClass(ClassLoading.java:138) at net.jini.io.MarshalInputStream.resolveClass(MarshalInputStream.java:296) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) at com.sun.jini.jeri.internal.runtime.Util.unmarshalValue(Util.java:221) at net.jini.jeri.BasicInvocationDispatcher.unmarshalArguments(BasicInvocationDispatcher.java:1049) at net.jini.jeri.BasicInvocationDispatcher.dispatch(BasicInvocationDispatcher.java:599) ... 17 more
0
[ 2, 568, 20573, 6123, 16, 8247, 5582, 18, 800, 3726, 3726, 31, 57, 374, 16313, 88, 48, 5691, 15, 47, 31, 589, 4452, 20, 44, 6673, 102, 2948, 13, 73, 6, 13, 1409, 2294, 8609, 17, 374, 19486, 20, 273, 72, 164, 55, 97, 27, 792, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SAX vs XmlTextReader - SAX in C# === I am attempting to read a large XML document and I wanted to do it in chucks vs XMLDocument's way of reading the entire file into memory. I know I can use XMLTextReader to do this but I was wondering if anyone has used SAX for .NET? I know Java deveolpers swear by it and I was wondering if it is worth giving it a try and if so what are the benefits in using it. I am looking for specifics. Cheers
0
[ 2, 16070, 4611, 23504, 11969, 10647, 106, 13, 8, 16070, 19, 272, 5910, 800, 3726, 3726, 31, 589, 6314, 20, 1302, 21, 370, 23504, 4492, 17, 31, 417, 20, 107, 32, 19, 6513, 18, 4611, 23504, 28132, 22, 18, 161, 16, 1876, 14, 1078, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Source Safe 6.0d and Visual Studio 2005 project tree problems === Whenever I try to add a new project to my SourceSafe repository it creates 3 folders with the same name nested within each other. There is only one folder on my drive yet in Sourcesafe there are 3?? Can anyone suggest what may be causing this? Thanks
0
[ 2, 1267, 1834, 400, 9, 387, 43, 17, 3458, 1120, 812, 669, 1541, 1716, 800, 3726, 3726, 6634, 31, 1131, 20, 3547, 21, 78, 669, 20, 51, 1267, 18166, 24869, 32, 9695, 203, 19294, 18, 29, 14, 205, 204, 5618, 69, 363, 206, 89, 9, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you evaluate third party controls? === What criteria do you use when evaluating and comparing third party controls? Do you have standard integration and functionality tests?
0
[ 2, 184, 107, 42, 13, 15599, 422, 346, 8671, 60, 800, 3726, 3726, 98, 9157, 107, 42, 275, 76, 26764, 17, 15047, 422, 346, 8671, 60, 107, 42, 57, 1236, 8078, 17, 18548, 4894, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Mouse Scroll Wheel and IFRAME === I have an IFRAME with a vertical scroll bar on a page with a vertical scrollbar. I would like to be able to scroll the IFRAME with the scroll wheel, but in IE7 and FF3, when I click the IFRAME and scroll, both the IFRAME content and Page scrolls, not just the IFRAME. Eventually, the IFRAME is no longer under the mouse Has anyone had to deal with this and have some ideas about what I could do? (because I know this will come up -- I have to have the IFRAME with scrollbar and I don't control the outer page with the scrollbar)
0
[ 2, 7567, 12159, 3556, 17, 31, 8361, 800, 3726, 3726, 31, 57, 40, 31, 8361, 29, 21, 7035, 12159, 748, 27, 21, 2478, 29, 21, 7035, 12159, 1850, 9, 31, 83, 101, 20, 44, 777, 20, 12159, 14, 31, 8361, 29, 14, 12159, 3556, 15, 47, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to add Announcement list/webpart to Publishing Portal === I have a Publishing Portal site and I need to add some announcements to some of the pages. I've read an article which says that i have to create an announcement list to be able add an announcement web part but i can't seem to find any resources on how i can add an announcement list. Any help will be greatly appreciated. TIA!
0
[ 2, 184, 20, 3547, 7435, 968, 118, 14113, 3091, 20, 3107, 8281, 800, 3726, 3726, 31, 57, 21, 3107, 8281, 689, 17, 31, 376, 20, 3547, 109, 7435, 18, 20, 109, 16, 14, 4434, 9, 31, 22, 195, 1302, 40, 2002, 56, 898, 30, 31, 57, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the best practice for view file/directory structure in ASP.NET MVC? === I'm confused with how views are organized. Under the views directory, there are subdirectories. Inside these subdirectories are views. I'm assuming that the subdirectories map to controllers, and the controllers act on the views contained within their subdirectories. Is there an emerging expectation of what types of views are contained within these directories? For instance, should the default page for each directory be index.aspx? Should the pages follow a naming convention such as Create[controller].aspx, List[controller].aspx, etc?
0
[ 2, 98, 25, 14, 246, 1345, 26, 1418, 3893, 118, 10197, 93, 1411, 19, 28, 306, 9, 2328, 307, 8990, 60, 800, 3726, 3726, 31, 22, 79, 4230, 29, 184, 4146, 50, 2518, 9, 131, 14, 4146, 16755, 15, 80, 50, 972, 10197, 1596, 9, 572, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Which Gang Of Four design patterns do you believe are underutilized? === Is there a specfic [Gang Of Four Design Pattern][1] that you frequently use, yet hardly see used in other peoples designs? If possible, please describe a simple example where this pattern can be useful. It doesn't have to necessarily be a Gang Of Four pattern, but please include a hyperlink to the pattern's description if you choose a non-GoF pattern. [1]: http://en.wikipedia.org/wiki/Design_Patterns
0
[ 2, 56, 3285, 16, 222, 704, 6282, 107, 42, 985, 50, 131, 14255, 1333, 60, 800, 3726, 3726, 25, 80, 21, 12737, 15261, 636, 13019, 16, 222, 704, 3732, 500, 2558, 165, 500, 30, 42, 3086, 275, 15, 768, 5943, 196, 147, 19, 89, 148, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Multiple ModificationForms in Sharepoint Workflow === i am working on a Sharepoint Server 2007 Statemachine Workflow. Until now i have a few states and an custom Association/InitiationForm which i created with InfoPath 2007. At the moment i have a Problem with Modification forms. The modification link in the state page of my workflow is shown and leads on click to my InfoPath form. If i click the "Submit" button the form is closed. Everything works fine. Now i tried to add a second ModificationForm to my workflow. So i created a new InfoPath form and added it in the same way to the workflow as the first one. The workflow has no errors in the building or deploying-process. But if i now try to click the second Modification link in the state page the form is not shown. Instead of my form the text: "The form has been closed." is shown. I looked in the central administration and the InfoPath form is know under "Manage form templates". I gave every Modification in the Workflow.xml his own Guid. I used the following ModificationUrl: ModificationUrl="_layouts/ModWrkflIP.aspx" Does anybody know step by step how to use two or more ModificationForms in my workflow? Thank you in advance.
0
[ 2, 1886, 16135, 4190, 18, 19, 1891, 3132, 170, 9990, 800, 3726, 3726, 31, 589, 638, 27, 21, 1891, 3132, 8128, 624, 146, 20442, 170, 9990, 9, 163, 130, 31, 57, 21, 310, 202, 17, 40, 5816, 607, 118, 108, 8793, 857, 4190, 56, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best way to register js for modularity in User Control === i have a control that is organized like this ![alt text][1] and i want to have the javascript registered on the calling master pages, etc, so that anywhere this control folder is dropped and then registered, it will know how to find the URL to the js. Here is what i have so far (in the user control ) protected void Page_Load(object sender, EventArgs e) { if(!Page.IsClientScriptBlockRegistered("jqModal")) Page.ClientScript.RegisterClientScriptInclude("jqModal", ResolveClientUrl("~js/jqModal.js")); if (!Page.IsClientScriptBlockRegistered("jQuery")) Page.ClientScript.RegisterClientScriptInclude("jQuery", ResolveClientUrl("~/js/jQuery.js")); if (!Page.IsClientScriptBlockRegistered("tellAFriend")) Page.ClientScript.RegisterClientScriptInclude("tellAFriend", ResolveClientUrl("js/tellAFriend.js")); } Any ideas? [1]: https://dl-web.getdropbox.com/get/jsstructure.GIF?w=faef1ed3
0
[ 2, 246, 161, 20, 2243, 487, 18, 26, 20802, 856, 19, 4155, 569, 800, 3726, 3726, 31, 57, 21, 569, 30, 25, 2518, 101, 48, 13, 187, 2558, 192, 38, 1854, 500, 2558, 165, 500, 17, 31, 259, 20, 57, 14, 8247, 8741, 3801, 27, 14, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to get window titles of child windows from parent pid === Writing some test scripts in IronPython, I want to verify whether a window is displayed or not. I have the pid of the main app's process, and want to get a list of window titles that are related to the pid. I am trying to avoid using win32api calls, such as FindWindowEx. Is there a way to do this using built-in .net classes? Most of the stuff I have come across recommends using win32api, such as below. [.NET (C#): Getting child windows when you only have a process handle or PID?][1] [1]: http://stackoverflow.com/questions/79111/net-c-getting-child-windows-when-you-only-have-a-process-handle-or-pid
0
[ 2, 184, 20, 164, 1463, 3037, 16, 850, 1936, 37, 4766, 13, 11031, 800, 3726, 3726, 1174, 109, 1289, 17505, 19, 1751, 6448, 11570, 15, 31, 259, 20, 21012, 1472, 21, 1463, 25, 6115, 54, 52, 9, 31, 57, 14, 13, 11031, 16, 14, 407, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Sorting strings is much harder than you thought! === Sorting a list of strings **in a way that makes sense to a human** is a very complex task. It's not just about comparing ASCII values. Usually, the case doesn't matter. You probably want "File 2" to be sorted before "File 11". In German, 'Ä' often comes at the beginning of the alphabet, whereas in Swedish it's towards the end. And what about encoding? The list of pitfalls is long. So, fellow developer: what do you have to say about string sorting for human consumption? What are good techniques? What should be avoided? What are the correct APIs for your favorite platform? Post your answers, and make this page the definitive reference about sorting strings for humans.
0
[ 2, 2058, 68, 7887, 25, 212, 5229, 119, 42, 289, 187, 800, 3726, 3726, 2058, 68, 21, 968, 16, 7887, 13, 1409, 108, 21, 161, 30, 1364, 1259, 20, 21, 585, 1409, 25, 21, 253, 1502, 3005, 9, 32, 22, 18, 52, 114, 88, 15047, 28, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Compact Framework : any Finger Friendly GUI ? === i m developing a little tool on my Pocket PC using WM6 SDK but i would like to implement a finger friendly user interface (iphone-like). So i m looking for a free .NET framework that offers the possibility to easily integrate a finger friendly interface for Windows Mobile 6 Pro . Any ideas ?
0
[ 2, 8285, 6596, 13, 45, 186, 2363, 4753, 9457, 13, 60, 800, 3726, 3726, 31, 307, 3561, 21, 265, 5607, 27, 51, 3397, 5168, 568, 19312, 379, 13, 18, 43, 197, 47, 31, 83, 101, 20, 8713, 21, 2363, 4753, 4155, 6573, 13, 5, 49, 7709,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is Programming Style important? How Important === Last year I was troubleshooting a team members code and it was lacking indents and comments. I talking to him about it telling him it was not a good idea but he got offended. He was/is smarter than me or certainly more educated. Since then I found out he applied to Microsoft and when they had him do a double linked list implementation, he wrote it without indentation or comments, stating that he did not have time to worry about style. Microsoft did not call him back..... How do you think they responded, how would you respond.
0
[ 2, 25, 3143, 1034, 681, 60, 184, 681, 800, 3726, 3726, 236, 159, 31, 23, 2572, 12511, 68, 21, 173, 443, 1797, 17, 32, 23, 11690, 19, 817, 38, 18, 17, 7534, 9, 31, 1582, 20, 61, 88, 32, 2497, 61, 32, 23, 52, 21, 254, 882, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ASP .Net server control events order === Which are the events of an ASP .Net server control and how does their order relate to the containing page's events? The concrete problem is that I am looking for an event inside the server control that fires before the *Page_Load* event of the containing page.
0
[ 2, 28, 306, 13, 9, 2328, 8128, 569, 963, 389, 800, 3726, 3726, 56, 50, 14, 963, 16, 40, 28, 306, 13, 9, 2328, 8128, 569, 17, 184, 630, 66, 389, 16464, 20, 14, 3503, 2478, 22, 18, 963, 60, 14, 4105, 1448, 25, 30, 31, 589, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why Aren't All My WinForm Controls and Forms Localizing? === Greetings all, I'm trying to localize a .NET/C# project. I'm using string resource files and setting the "Localizable" property on all my forms to 'True'. The assembly culture is empty. The resx/resource files are successfully passed through Lingobit, resgen, and al. When running the localized executables, *some* of my forms are not localized (ones in which I know the Localizable flag is set) while others are. There are even a few forms which are localized but a button or two isn't. I cannot tell any difference between the non-localized forms/controls with the localized ones. Anyone have an idea what I might be missing? Thanks!
0
[ 2, 483, 4847, 22, 38, 65, 51, 628, 4190, 8671, 17, 1997, 375, 3335, 60, 800, 3726, 3726, 13769, 18, 65, 15, 31, 22, 79, 749, 20, 375, 2952, 21, 13, 9, 2328, 118, 150, 5910, 669, 9, 31, 22, 79, 568, 3724, 6577, 6488, 17, 2697...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SVN Working Copy xxx locked and cleanup failed === I get this error when I do a svn update: > Working copy xxxxxxxx locked Please > execute "Cleanup" command When I run cleanup, i get > Cleanup failed to process the > following paths: xxxxxx How do i get out of this loop?
0
[ 2, 13, 18, 16578, 638, 4344, 13, 13290, 4011, 17, 26862, 1702, 800, 3726, 3726, 31, 164, 48, 7019, 76, 31, 107, 21, 13, 18, 16578, 11100, 45, 13, 1, 638, 4344, 13, 8962, 13290, 13290, 4011, 2247, 13, 1, 15644, 13, 7, 20254, 576,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Deleting Custom Event Log Source Without Using Code === I have an application that has created a number of custom event log sources to help filter its output. How can I delete the custom sources from the machine WITHOUT writing any code as running a quick program using System.Diagnostics.EventLog.Delete is not possible. I've tried using RegEdit to remove the custom sources from [HKEY_LOCAL_MACHINE\SYSTEM\ControlSetXXX\Services\Eventlog] however the application acts as if the logs still exist behind the scenes. What else am I missing?
0
[ 2, 121, 1336, 68, 5816, 807, 6738, 1267, 366, 568, 1797, 800, 3726, 3726, 31, 57, 40, 3010, 30, 63, 679, 21, 234, 16, 5816, 807, 6738, 2662, 20, 448, 11945, 82, 5196, 9, 184, 92, 31, 27448, 14, 5816, 2662, 37, 14, 1940, 366, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it worth swapping Ctrl and Caps Lock for windows users that don't use Emacs === I'd be interested to hear from people who have successfully made the transition as well as those who have tried it and move back, but particularly from people who were doing it on **windows**. Will it lead to any improvement in my typing speed or comfort when typing. I've been aware of Steve Yege's advice to [swap Ctrl and Caps Lock][1] for a while now, although I don't use Emacs. I've just tried swapping them over as an experiment and I'm finding it difficult to adjust. There are several shortcuts that are second nature to me now and I hadn't realised quite how ingrained they are in how I use the keyboard. In particular, I keep going to the old Ctrl key for Ctrl+Z (undo), and for cut, copy & paste operations (Ctrl+ X, C and V). Experimenting with going from the home position to Ctrl+Z I don't know which finger to put on Z, as it feels awkward with either my ring, middle or index finger. Is this something I'll get used to the same way I've got used to the original position and I should just give it time or **is this arrangement not suited to windows keyboard shortcuts**. [1]: http://steve.yegge.googlepages.com/effective-emacs#item1
0
[ 2, 25, 32, 2715, 10143, 5574, 13, 4812, 6362, 17, 9293, 3991, 26, 1936, 3878, 30, 221, 22, 38, 275, 13, 62, 6893, 18, 800, 3726, 3726, 31, 22, 43, 44, 3158, 20, 990, 37, 148, 72, 57, 3673, 117, 14, 4513, 28, 134, 28, 273, 72...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Nested SELECT Statment === SQL is not my forte, but I'm working on it - thank you for the replies. I am working on a report that will return the completion percent of services for indiviudals in our contracts. There is a master table "Contracts," each individual Contract can have multiple services from the "services" table, each service has multiple standards for the "standards" table which records the percent complete for each standard. I've gotten as far as calculating the total percent complete for each individual service for a specific Contract_ServiceID, but how do I return all the services percentages for all the contracts? Something like this: <table border=1> <tr> <td> Contract </td> <td> Service </td> <td> Percent complete </td> </tr> <tr> <td> abc Company </td> <td> service 1 </td> <td> 98% </td> </tr> <tr> <td> abc Company </td> <td> service 2 </td> <td> 100% </td> </tr> <tr> <td> xyz Company </td> <td> service 1 </td> <td> 50% </td> </tr> </table> <br> Here's what I have so far: SELECT Contract_ServiceId, (SUM(CompletionPercentage)/COUNT(CompletionPercentage)) * 100 as "Percent Complete" FROM dbo.Standard sta WITH (NOLOCK) INNER JOIN dbo.Contract_Service conSer ON sta.ServiceId = conSer.ServiceId LEFT OUTER JOIN dbo.StandardResponse standResp ON sta.StandardId = standResp.StandardId AND conSer.StandardReportId = standResp.StandardReportId WHERE Contract_ServiceId = '[an id]' GROUP BY Contract_ServiceID This gets me too <table border=1> <tr> <td> Contract_serviceid </td> <td> Percent Complete </td> </tr> <tr> <td> [an id] </td> <td> 100% </td> <tr> </table>
0
[ 2, 5618, 69, 5407, 12819, 1130, 800, 3726, 3726, 4444, 255, 25, 52, 51, 26, 591, 15, 47, 31, 22, 79, 638, 27, 32, 13, 8, 3531, 42, 26, 14, 16287, 9, 31, 589, 638, 27, 21, 1330, 30, 129, 788, 14, 5392, 2091, 16, 687, 26, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
When using a HashMap are values and keys guaranteed to be in the same order when iterating? === When I iterate over the values or keys are they going to correlate? Will the second key map to the second value?
0
[ 2, 76, 568, 21, 19170, 15022, 50, 4070, 17, 5534, 13572, 20, 44, 19, 14, 205, 389, 76, 32, 106, 1880, 60, 800, 3726, 3726, 76, 31, 32, 106, 1373, 84, 14, 4070, 54, 5534, 50, 59, 228, 20, 28100, 60, 129, 14, 153, 1246, 2942, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Add dismiss control to session-flash() output in CakePHP === In a CakePHP 1.2 app, I'm using <?php $session->flash();?> to output messages like "Record edited". It's working great. However, I want to add a link called "Dismiss" that will fade out the message. I know how to construct the link, but I don't know how to insert into the output of the flass message. The flash message wraps itself in a DIV tag. I want to insert my dismiss code into that div, but I don't know how.
0
[ 2, 3547, 14372, 569, 20, 3723, 8, 26694, 5, 6, 5196, 19, 8390, 26120, 800, 3726, 3726, 19, 21, 8390, 26120, 137, 9, 135, 4865, 15, 31, 22, 79, 568, 13, 1, 60, 26120, 5579, 7202, 5991, 8, 1, 26694, 5, 6, 73, 60, 1, 20, 5196, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Variable UITableCellView height with subview === I want to create a UITableView with varying row heights, and I'm trying to accomplish this by creating UILabels inside the UITableViewCells. Here's my code so far: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *MyIdentifier = @"EntryCell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:MyIdentifier] autorelease]; } UILabel *textView = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, 300, 40)]; textView.numberOfLines = 0; textView.text = [entries objectAtIndex:[indexPath row]]; [cell.contentView addSubview:textView]; [textView release]; return cell; } This gives me 2 lines of text per cell. However, each "entry" has a different number of lines, and I want the UITableViewCells to resize automatically, wrapping text as necessary, without changing the font size. `[textView sizeToFit]` and/or `[cell sizeToFit]` don't seem to work. Here's how I want the UITableView to look: ---------------- Lorem ipsum ---------------- Lorem ipsum Lorem ipsum ---------------- Lorem ipsum Lorem ipsum Lorem ipsum ---------------- Lorem ipsum ---------------- Lorem ipsum Lorem ipsum ---------------- Does anyone know how to do this properly? Thanks.
0
[ 2, 7612, 13, 11193, 579, 9725, 4725, 2947, 29, 972, 4725, 800, 3726, 3726, 31, 259, 20, 1600, 21, 13, 11193, 579, 4725, 29, 9852, 3131, 7161, 15, 17, 31, 22, 79, 749, 20, 14570, 48, 34, 2936, 13, 5661, 21018, 18, 572, 14, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Make OSX application respond to first mouse click when not focused === Normal OSX applications eat the first mouse click when not focused to first focus the application. Then future clicks are processed by the application. iTunes and Finder behave differently, the first click is acted on even when not focused. I am looking for a way to force an existing application (Remote Desktop Connection.app) to act on the first click and not just focus.
0
[ 2, 233, 13, 759, 396, 3010, 4590, 20, 64, 7567, 10840, 76, 52, 2604, 800, 3726, 3726, 1826, 13, 759, 396, 3767, 2749, 14, 64, 7567, 10840, 76, 52, 2604, 20, 64, 1776, 14, 3010, 9, 94, 1022, 10840, 18, 50, 16697, 34, 14, 3010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Java, Swing: how do I set the maximum width of a JTextField ? === I'm writing a custom file selection component. In my UI, first the user clicks a button, which pops a `JFileChooser`; when it is closed, the absolute path of the selected file is written to a `JTextField`. The problem is, absolute paths are usually long, which causes the text field to enlarge, making its container too wide. I've tried this, but it didn't do anything, the text field is still too wide: fileNameTextField.setMaximumSize(new java.awt.Dimension(450, 2147483647)); Currently, when it is empty, it is already 400px long, because of `GridBagConstraints` attached to it. I'd like it to be like text fields in HTML pages, which have a fixed size and do not enlarge when the input is too long. So, how do I set the max size for a `JTextField` ?
0
[ 2, 8247, 15, 5587, 45, 184, 107, 31, 309, 14, 2979, 9456, 16, 21, 487, 11969, 1109, 13, 60, 800, 3726, 3726, 31, 22, 79, 1174, 21, 5816, 3893, 3155, 5912, 9, 19, 51, 13, 5661, 15, 64, 14, 4155, 10840, 18, 21, 5167, 15, 56, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best way to safely read query string parameters? === We have a project that generates a code snippet that can be used on various other projects. The purpose of the code is to read two parameters from the query string and assign them to the "src" attribute of an iframe. For example, the page at the URL http://oursite/Page.aspx?a=1&b=2 would have JavaScript in it to read the "a" and "b" parameters. The JavaScript would then set the "src" attribute of an iframe based on those parameters. For example, "&lt;iframe src="http://someothersite/Page.aspx?a=1&b=2" /&gt;" We're currently doing this with server-side code that uses Microsoft's Anti Cross-Scripting library to check the parameters. However, a new requirement has come stating that we need to use JavaScript, and that it can't use any third-party JavaScript tools (such as jQuery or Prototype). One way I know of is to replace any instances of "<", single quote, and double quote from the parameters before using them, but that doesn't seem secure enough to me. Does anybody have any suggestions for us? Thank you very much for your time.
0
[ 2, 246, 161, 20, 9817, 1302, 25597, 3724, 12905, 60, 800, 3726, 3726, 95, 57, 21, 669, 30, 7920, 18, 21, 1797, 13, 29061, 30, 92, 44, 147, 27, 617, 89, 2314, 9, 14, 2131, 16, 14, 1797, 25, 20, 1302, 81, 12905, 37, 14, 25597, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Just how popular is Flex? === In a recent conversation, I mentioned that I was using JavaScript for a web application. That comment prompted a response: "You should use Flex instead. It will cut your development time down and JavaScript is too hard to debug and maintain. You need to use the right tool for the right job." Now, I don't know too much about Flex, but I personally don't feel like JavaScript is too hard to debug or maintain, especially if you use a framework. JavaScript is also one of the most used languages right now, so it would seem a better choice in that regard too. However, his reply piqued my interest. Just how popular is Flex? What are the advantages of using it vs. a JavaScript framework? What are some of the disadvantages?
0
[ 2, 114, 184, 844, 25, 14409, 60, 800, 3726, 3726, 19, 21, 1764, 2735, 15, 31, 2211, 30, 31, 23, 568, 8247, 8741, 26, 21, 2741, 3010, 9, 30, 6484, 9491, 21, 1627, 45, 13, 7, 245, 378, 275, 14409, 700, 9, 32, 129, 1077, 154, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I pull from a Git repository through an HTTP proxy? === Note: while the use-case described is about using submodules within a project, the same applies to a normal `git clone` of a repository over HTTP. I have a project under Git control. I'd like to add a submodule: git submodule add http://github.com/jscruggs/metric_fu.git vendor/plugins/metric_fu But I get ... got 1b0313f016d98e556396c91d08127c59722762d0 got 4c42d44a9221209293e5f3eb7e662a1571b09421 got b0d6414e3ca5c2fb4b95b7712c7edbf7d2becac7 error: Unable to find abc07fcf79aebed56497e3894c6c3c06046f913a under http://github.com/jscruggs/metri... Cannot obtain needed commit abc07fcf79aebed56497e3894c6c3c06046f913a while processing commit ee576543b3a0820cc966cc10cc41e6ffb3415658. fatal: Fetch failed. Clone of 'http://github.com/jscruggs/metric_fu.git' into submodule path 'vendor/plugins/metric_fu' I have my HTTP_PROXY set up: c:\project> echo %HTTP_PROXY% http://proxy.mycompany:80 I even have a global Git setting for the http proxy: c:\project> git config --get http.proxy http://proxy.mycompany:80 Has anybody gotten HTTP fetches to consistently work through a proxy? What's really strange is that a few project on GitHub work fine ([`awesome_nested_set`][1] for example), but others consistently fail ([rails][2] for example). [1]: http://github.com/collectiveidea/awesome_nested_set/ [2]: http://github.com/rails/rails/
0
[ 2, 184, 107, 31, 2201, 37, 21, 13, 10404, 24869, 120, 40, 7775, 27188, 60, 800, 3726, 3726, 1945, 45, 133, 14, 275, 8, 10325, 745, 25, 88, 568, 972, 19673, 160, 363, 21, 669, 15, 14, 205, 13169, 20, 21, 1826, 13, 1, 10404, 138...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I lock a file using java (if possible) === I have a java process that opens a file using a FileReader. How can I prevent another (java) process to open this file, or at least make that second process know that the file is already opened? Does this automaticaly makes the second process get an exception if the file is open(which solves my problem) or do i have to explicitly open it in the first process with some sort of flag or argument?
0
[ 2, 184, 92, 31, 3991, 21, 3893, 568, 8247, 13, 5, 821, 938, 6, 800, 3726, 3726, 31, 57, 21, 8247, 953, 30, 8965, 21, 3893, 568, 21, 3893, 10647, 106, 9, 184, 92, 31, 2501, 226, 13, 5, 1004, 1385, 6, 953, 20, 368, 48, 3893, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Java Threads priority in Linux === I have a multi thread application built on Java and I need to set different priorities to this threads. In windows it works fine, a bigger value (priority) gets more CPU time just like it was supposed. On Linux, I cant find a logical answer to how it is working. Looked online, but can't seem to find a definitive answer on how its working on this platform. Some suggest that thread are given equal priorities, and the JVM ignores those settings... Some suggest values are just inverted (small value, more priority) because of the native process priority... etc. Is there a right way to use this in Linux?
0
[ 2, 8247, 20396, 9857, 19, 13024, 800, 3726, 3726, 31, 57, 21, 1889, 9322, 3010, 392, 27, 8247, 17, 31, 376, 20, 309, 421, 20872, 20, 48, 20396, 9, 19, 1936, 32, 693, 1123, 15, 21, 6197, 1923, 13, 5, 6944, 248, 856, 6, 3049, 91...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What to do with null fields in compare() ? === In Java, I use a class in which some fields can be `null`. For example: class Foo { String bar; //.... } I want to write a BarComparator for this class, private static class BarComparator implements Comparator<Foo> { public int compare( final Foo o1, final Foo o2 ) { // Implementation goes here } } Is there a standard way to deal with the fact that any of `o1`, `o2`, `o1.bar`, `o2.bar` can be `null`, without writing lots of nested `if`...`else`? Cheers!
0
[ 2, 98, 20, 107, 29, 16203, 2861, 19, 11590, 5, 6, 13, 60, 800, 3726, 3726, 19, 8247, 15, 31, 275, 21, 718, 19, 56, 109, 2861, 92, 44, 13, 1, 4215, 211, 1, 9, 26, 823, 45, 718, 4310, 111, 13, 1, 3724, 748, 73, 12894, 9, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Algorithm for merging large files === I have several log files of events (one event per line). The logs can possibly overlap. The logs are generated on separate client machines from possibly multiple time zones (but I assume I know the time zone). Each event has a timestamp that was normalized into a common time (by instantianting each log parsers calendar instance with the timezone appropriate to the log file and then using getTimeInMillis to get the UTC time). The logs are already sorted by timestamp. Multiple events can occur at the same time, but they are by no means equal events. These files can be relatively large, as in, 500000 events or more in a single log, so reading the entire contents of the logs into a simple Event[] is not feasible. What I am trying do is merge the events from each of the logs into a single log. It is kinda like a mergesort task, but each log is already sorted, I just need to bring them together. The second component is that the same event can be witnessed in each of the separate log files, and I want to "remove duplicate events" in the file output log. Can this be done "in place", as in, sequentially working over some small buffers of each log file? I can't simply read in all the files into an Event[], sort the list, and then remove duplicates, but so far my limited programming capabilities only enable me to see this as the solution. Is there some more sophisticated approach that I can use to do this as I read events from each of the logs concurrently?
0
[ 2, 9083, 26, 18842, 370, 6488, 800, 3726, 3726, 31, 57, 238, 6738, 6488, 16, 963, 13, 5, 849, 807, 416, 293, 6, 9, 14, 18893, 92, 2879, 15406, 9, 14, 18893, 50, 6756, 27, 1725, 6819, 6035, 37, 2879, 1886, 85, 11225, 13, 5, 811...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
In which cases do you test against an In-Memory Database instead of a Development Database? === When do you test against an In-Memory Database vs. a Development Database? Also, as a related side question, when you do use a Development Database, do you use an Individual Development Database, an Integration Development Database, or both?
0
[ 2, 19, 56, 1871, 107, 42, 1289, 149, 40, 19, 8, 790, 5171, 93, 6018, 700, 16, 21, 522, 6018, 60, 800, 3726, 3726, 76, 107, 42, 1289, 149, 40, 19, 8, 790, 5171, 93, 6018, 4611, 9, 21, 522, 6018, 60, 67, 15, 28, 21, 1597, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Benefits of Function programming to Object oriented programming === I'm thinking of entering functional programming soon, but what would the benefits be, what are the greatest differences between functional programming and OOP? Comments are apreciated.
0
[ 2, 5800, 16, 1990, 3143, 20, 3095, 13, 6800, 3143, 800, 3726, 3726, 31, 22, 79, 1440, 16, 4604, 7652, 3143, 651, 15, 47, 98, 83, 14, 5800, 44, 15, 98, 50, 14, 3023, 4921, 128, 7652, 3143, 17, 13, 21709, 60, 7534, 50, 8442, 151...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Dynamically adding controls in ASP.NET Repeater === I find my self having a repeater control which is being databound to an xml document. My client is now requesting that the Textbox's which are being repeater can be either a Textbox or a Checkbox. I cannot seem to find an easyway to essentially do the following: if ((System.Xml.XmlNode)e.Item.DataItem.Attributes["type"] == "text") <asp:TextBox runat="server" ID="txtField" Text='<%#((System.Xml.XmlNode)Container.DataItem).InnerText %>' CssClass="std"></asp:TextBox> else <asp:CheckBox runat="server" ID="txtField" Text='<%#((System.Xml.XmlNode)Container.DataItem).InnerText %>' CssClass="std"></asp:TextBox> Is there a nice way I can extend my current implementaion without have to rewrite the logic. If I could inject the control via "OnItemDataBound" that would also be fine. But I cannot seem to make it work
0
[ 2, 7782, 1326, 4721, 8671, 19, 28, 306, 9, 2328, 6830, 106, 800, 3726, 3726, 31, 477, 51, 1119, 452, 21, 6830, 106, 569, 56, 25, 142, 1054, 7410, 20, 40, 23504, 4492, 9, 51, 6819, 25, 130, 20033, 30, 14, 1854, 5309, 22, 18, 56...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I write a unit test for a controller class that uses winforms for views? === Has anyone been able to successfully unit test methods that are, by necessity, coupled to the System.Windows.Forms.Form class? I've recently been working on a C# winforms application, trying to build it with an MVC structure. This is difficult enough, given that the framework isn't really built with this in mind. However, it gets even tougher when you throw unit testing into the mix. I've been making sure that my controllers are not coupled to concrete view classes, so that I can use a stub/mock for unit testing. But referencing the Form class **somewhere** is unavoidable, and these methods do need to be tested. I've been using [Moq][1] because it has some nice type-safety features, and allows mocking concrete types. But unfortunately, it doesn't allow me to "expect" calls to methods or properties on a concrete type that are neither virtual nor abstract. And since the Form class was not built with subclassing in mind, this is a big problem. I need to be able to mock the Form class to prevent real windows from being created, by "expecting" ShowDialog, for example. So I'm left unable to run any unit tests that do much interaction with subclasses of Form, which my views are. Is there anyone out there who has successfully unit tested this type of code? How did you do it? Is this something that other mocking frameworks can get around? Would the string-based methods used by other mocking frameworks be subject to the same constraints? Can I write my own explicit long-hand mock classes, or will the lack of virtual members prevent me from being able to suppress the window behavior that way too? Or is there some way I haven't thought of to structure my classes so that the Forms-coupled code ends up in methods and classes of trivial complexity, such that I can get away without explicitly unit testing them, without my conscience beating me up for it? [1]: http://code.google.com/p/moq/
0
[ 2, 184, 92, 31, 2757, 21, 1237, 1289, 26, 21, 9919, 718, 30, 2027, 628, 4190, 18, 26, 4146, 60, 800, 3726, 3726, 63, 1276, 74, 777, 20, 3673, 1237, 1289, 3195, 30, 50, 15, 34, 14981, 15, 13420, 20, 14, 329, 9, 27508, 18, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Determining the index of an Item on a Form (J2ME) === Given an <code>Item</code> that has been appended to a <code>Form</code>, whats the best way to find out what index that item is at on the Form? <code>Form.append(Item)</code> will give me the index its initially added at, but if I later insert items before that the index will be out of sync.
0
[ 2, 13521, 14, 4348, 16, 40, 9101, 27, 21, 505, 13, 5, 728, 135, 790, 6, 800, 3726, 3726, 504, 40, 13, 1, 9375, 1, 2119, 79, 1, 118, 9375, 1, 30, 63, 74, 4865, 10726, 20, 21, 13, 1, 9375, 1, 4190, 1, 118, 9375, 1, 15, 98,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you find Leapyear in VBA? === What is a good implementation of a IsLeapYear function in VBA?
0
[ 2, 184, 107, 42, 477, 10336, 731, 19, 566, 969, 60, 800, 3726, 3726, 98, 25, 21, 254, 6123, 16, 21, 9717, 2552, 731, 1990, 19, 566, 969, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Assembler file as input for a driver build with the WDK tools === How to get an assembler file to be compiled and linked into a driver build. To clarify a bit The SOURCES file : TARGETTYPE=DRIVER DRIVERTYPE=WDM TARGETPATH=obj TARGETNAME=bla INCLUDES=$(DDK_INC_PATH) TARGETLIBS=$(DDK_LIB_PATH)\ks.lib SOURCES=x.cpp y.cpp z.asm The problem occurs with the ``z.asm file``. ``NMAKE`` complains that it does not know how to build ``z.obj``. So the question is, how to get the asm file assembled with ``build`` and linked into ``bla.sys``.
0
[ 2, 13, 13736, 139, 3893, 28, 6367, 26, 21, 2425, 1895, 29, 14, 13, 14733, 197, 4672, 800, 3726, 3726, 184, 20, 164, 40, 13, 13736, 139, 3893, 20, 44, 9316, 17, 4727, 77, 21, 2425, 1895, 9, 20, 23116, 21, 1142, 14, 2662, 3893, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What does "Create Statisics" do in SQL Server 2005? === The Database Tuning Advisor is recommending that I create a bunch of statistics in my Database. I'm something of a SQL n00b, so this was the first time I'd ever come across such a creature. The entry in MSDN was a little obtuse - could someone explain what exactly this does, and why it's a good idea?
0
[ 2, 98, 630, 13, 7, 6037, 1373, 12819, 403, 8354, 7, 107, 19, 4444, 255, 8128, 812, 60, 800, 3726, 3726, 14, 6018, 19253, 6721, 25, 12360, 68, 30, 31, 1600, 21, 7653, 16, 5818, 19, 51, 6018, 9, 31, 22, 79, 301, 16, 21, 4444, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Finding a partner for a for-profit software project === It's great when you have friends that have the skills necessary to do a project with you. But what if all the ones with skills are too busy, and the ones that have free time and want to work with you don't have the skills? Where would you start looking for partners?
2
[ 2, 3007, 21, 2417, 26, 21, 26, 8, 5888, 2306, 669, 800, 3726, 3726, 32, 22, 18, 374, 76, 42, 57, 954, 30, 57, 14, 3207, 2378, 20, 107, 21, 669, 29, 42, 9, 47, 98, 100, 65, 14, 53, 18, 29, 3207, 50, 266, 4394, 15, 17, 14,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Unicode in PDF === My program generates relatively simple PDF documents on request, but I'm having trouble with unicode characters, like kanji or odd math symbols. To write a normal string in PDF, you place it in brackets: (something) There is also the option to escape a character with octal codes: (\527) but this only goes up to 512 characters. How do you encode or escape higher characters? I've seen references to byte streams and hex-encoded strings, but none of the references I've read seem to be willing to tell me how to actually do it.
0
[ 2, 28010, 19, 13, 11124, 800, 3726, 3726, 51, 625, 7920, 18, 3109, 1935, 13, 11124, 4374, 27, 3772, 15, 47, 31, 22, 79, 452, 2572, 29, 28010, 1766, 15, 101, 28575, 54, 4210, 5057, 9794, 9, 20, 2757, 21, 1826, 3724, 19, 13, 11124...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Sample sql script to zip and transfer database backup file === I was looking for a sample sql script to zip my database backup file and transfer to a remote location. Please share if you have it with you.
0
[ 2, 5717, 4444, 255, 3884, 20, 12133, 17, 2617, 6018, 10119, 3893, 800, 3726, 3726, 31, 23, 699, 26, 21, 5717, 4444, 255, 3884, 20, 12133, 51, 6018, 10119, 3893, 17, 2617, 20, 21, 5388, 1474, 9, 2247, 1891, 100, 42, 57, 32, 29, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Retrieve Error text from SQL Server 2000 error === I need help logging errors from T-SQL in SQL Server 2000. We need to log errors that we trap, but are having trouble getting the same information we would have had sitting in front of SQL Server Management Studio. I can get a message without any argument substitution like this: SELECT MSG.description from master.dbo.sysmessages MSG INNER JOIN sys.syslanguages LANG ON MSG.msglangID=LANG.msglangid WHERE MSG.error=@err AND LANG.langid=@@LANGID But I have not found any way of finding out the error arguments. I want to see: Constraint violation MYCONSTRAINT2 on table MYTABLE7 not Constraint violation %s on table %s Googling has only turned up exotic schemes using DBCC OUTPUTBUFFER that require admin access and aren't appropriate for production code. How do I get an error message with argument replacement?
0
[ 2, 11917, 7019, 1854, 37, 4444, 255, 8128, 824, 7019, 800, 3726, 3726, 31, 376, 448, 13, 13919, 11908, 37, 13, 38, 8, 18, 22402, 19, 4444, 255, 8128, 824, 9, 95, 376, 20, 6738, 11908, 30, 95, 5585, 15, 47, 50, 452, 2572, 1017, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Embedding non-edit widgets in a DataGridView === Is there any way to embed a widget in a data-bound *DataGridViewCell* when it is not in editing mode? For example, we are wanting to display an existing calendar widget in a cell. That cell contains a comma separated list of dates. We want to show the calendar instead of the text. We could create a custom cell and override the *Draw* method so that it draws the calendar in the cell, but that would not handle the mouse-over tool-tip that we already have in the existing calendar widget.
0
[ 2, 11911, 69, 3258, 538, 8, 69, 242, 4807, 43, 3060, 18, 19, 21, 1054, 16375, 4725, 800, 3726, 3726, 25, 80, 186, 161, 20, 11911, 69, 21, 4807, 43, 3060, 19, 21, 1054, 8, 7410, 1637, 18768, 16375, 4725, 9725, 2483, 76, 32, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the best way to schedule employees to be on call? === We are a small group of 8 to 12 developers. We have clients that run web applications. Some are starting to ask for 24 hour emergency support. What is the best scheme for having employees share on-call duties? What compensation should be provided? I would be happy to hear what good schemes you have witnessed and experienced.
0
[ 2, 98, 25, 14, 246, 161, 20, 4345, 3716, 20, 44, 27, 645, 60, 800, 3726, 3726, 95, 50, 21, 284, 214, 16, 469, 20, 390, 10168, 9, 95, 57, 7421, 30, 485, 2741, 3767, 9, 109, 50, 1422, 20, 1349, 26, 937, 1671, 3644, 555, 9, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Debugging with Events in Windows === If I create an event using CreateEvent in Windows, how can I check if that event is signaled or not using the debugger in Visual Studio? CreateEvent returns back a Handle, which doesn't give me access to much information. Before I call WaitForSingleObject(...), I want to check to see if the event is signaled before I step into the function.
0
[ 2, 121, 16254, 2762, 29, 963, 19, 1936, 800, 3726, 3726, 100, 31, 1600, 40, 807, 568, 1600, 4943, 38, 19, 1936, 15, 184, 92, 31, 2631, 100, 30, 807, 25, 2800, 69, 54, 52, 568, 14, 121, 2345, 11356, 19, 3458, 1120, 60, 1600, 49...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to define persistent variable in SQL*PLUS === I am trying to do the following in SQL* PLUS in ORACLE. -Create a variable -Pass it as output variable to my method invocation -Print the value from output variable I get the error "undeclared variable" error. I am trying to create a variable that persists in the session till i close the SQL*PLUS window. variable subhandle number; exec MYMETHOD - (CHANGE_SET => 'SYNC_SET', - DESCRIPTION => 'Change data for emp', - SUBSCRIPTION_HANDLE => :subhandle); print subhandle;
0
[ 2, 184, 20, 9267, 15348, 7612, 19, 4444, 255, 2483, 13349, 800, 3726, 3726, 31, 589, 749, 20, 107, 14, 249, 19, 4444, 255, 2483, 3123, 19, 15759, 9, 13, 8, 6037, 1373, 21, 7612, 13, 8, 6201, 32, 28, 5196, 7612, 20, 51, 2109, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Dynamically change an image in a Crystal Report at runtime === I'm using the Crystal Reports included with VisualStudio 2005. I would like to change the image that is displayed on the report at runtime ideally by building a path to the image file and then have that image displayed on the report. Has anyone been able to accomplish this with this version of Crystal Reports?
0
[ 2, 7782, 1326, 753, 40, 1961, 19, 21, 4282, 1330, 35, 485, 891, 800, 3726, 3726, 31, 22, 79, 568, 14, 4282, 2813, 506, 29, 3458, 21026, 812, 9, 31, 83, 101, 20, 753, 14, 1961, 30, 25, 6115, 27, 14, 1330, 35, 485, 891, 5628, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Seeking CSS Browser compatibility information for setting width using left and right === Here's a question that's been haunting me for a year now. The root question is how do I set the size of an element relative to its parent so that it is inset by N pixels from every edge? Setting the width would be nice, but you don't know the width of the parent, and you want the elements to resize with the window. (You don't want to use percents because you need a specific number of pixels.) I tried solving this problem using {top:Npx;left:Npx;bottom:Npx;right:Npx;} but it only works in certain browsers. I could potentially write some javascript with jquery to fix all elements with every page resize, but I'm not real happy with that solution. (What if I want the top offset by 10px but the bottom only 5px? It gets complicated.) What I'd like to know is either how to solve this in a cross-browser way, or some list of browsers which allow the easy CSS solution. Maybe someone out there has a trick that makes this easy.
0
[ 2, 5246, 272, 18, 18, 16495, 13, 21618, 676, 26, 2697, 9456, 568, 225, 17, 193, 800, 3726, 3726, 235, 22, 18, 21, 1301, 30, 22, 18, 74, 22727, 55, 26, 21, 159, 130, 9, 14, 5900, 1301, 25, 184, 107, 31, 309, 14, 1072, 16, 40,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
UI Performance with custom border. === I am creating a user control in C# and I am adding my own border and background. Currently the background is 16 small images that I change depending on the status of the object. Performance wise, would I be better off using GDI+ instead of the images?
0
[ 2, 13, 5661, 956, 29, 5816, 1862, 9, 800, 3726, 3726, 31, 589, 2936, 21, 4155, 569, 19, 272, 5910, 17, 31, 589, 4721, 51, 258, 1862, 17, 2395, 9, 871, 14, 2395, 25, 347, 284, 3502, 30, 31, 753, 4758, 27, 14, 1782, 16, 14, 30...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the best way to store set data in Python? === Here is my situation. I have a list of data that looks like this: [(id\__1_, description, id\_type), (id\__2_, description, id\_type), ... , (id\__n_, description, id\_type)) The data is loaded from multiple files that all belong to the same grouping. In each grouping there could be multiples of the same id, each coming from different files. I don't care about the duplicates, so I thought a nice way to store all of this would be to throw it into a Set type. However there is a problem, sometimes for the same id the descriptions can vary slightly like this, IPI00110753 - Tubulin alpha-1A chain - Tubulin alpha-1 chain - Alpha-tubulin 1 - Alpha-tubulin isotype M-alpha-1 (Note this example is taken from the [uniprot protein database][1]) Now I don't care if the descriptions vary. Initially it might seem like I could just throw them away (because I could look them up in a database later). However I can't do this because there is a chance that the protein database I am using will not contain a listing for a certain identifier. If this happens I will want to be able to display the human readable description to the biologists so they know roughly what protein they are looking at. I am currently solving this problem by using a dictionary type. However I don't really like this solution because it uses a lot of memory (I have a lot of these ID's). This is only an intermediary listing of them. There is some additional processing the ID's go through before they are placed in the database so I would like to keep my data-structure smaller. I have two questions really. First, will I get a smaller memory footprint using the Set type (over the dictionary type) for this, or should I use a sorted list where I check every time I insert into the list to see if the ID exists, or is there a third solution that I haven't thought of? If the Set type is the better answer how do I key it to look at just the first element of the tuple instead of the whole thing? Thank you for reading my question, <br> Tim [1]: http://www.uniprot.org/uniprot/P68369
0
[ 2, 98, 25, 14, 246, 161, 20, 1718, 309, 1054, 19, 20059, 60, 800, 3726, 3726, 235, 25, 51, 1858, 9, 31, 57, 21, 968, 16, 1054, 30, 1879, 101, 48, 45, 636, 5, 1340, 1, 165, 1, 15, 5318, 15, 4924, 1, 4474, 6, 15, 13, 5, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Unconditionally execute a task in ant? === I'm trying to define a task that emits (using echo) a message when a target completes execution, regardless of whether that target was successful or not. Specifically, the target executes a <testng> task to run some unit tests, and I want to emit a message indicating where the results are available: <target name="mytarget"> <testng outputDir="${results}" ...> ... </testng> <echo>Tests complete. Results available in ${results}</echo> </target> Unfortunately, if the tests fail, the <testng> task fails and execution aborts. So the message is only output if the tests pass - the opposite of what I want. I know I can put the <echo> task before the <testng> task, but this will make it easier for users to miss this message. Is what I'm trying to do possible?
0
[ 2, 26938, 102, 15644, 21, 3005, 19, 40, 38, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 9267, 21, 3005, 30, 8468, 38, 18, 13, 5, 12655, 8117, 6, 21, 2802, 76, 21, 2935, 1279, 18, 5769, 15, 7148, 16, 1472, 30, 2935, 23, 1300, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Incorrectly set up APC for PHP? === I decided to install APC to speed up the site that I work for. Sadly, I found out that it was already installed and enabled(The developer who first worked on the servers has moved on). Then I decided to check the usage of it to see if it needs more memory allocated to it or not. This is when I discovered something weird. A simple file with this code: <?php print_r(apc_cache_info()); ?> It would not work when served from apache. I get `Error 320 (net::ERR_INVALID_RESPONSE): Unknown error.` And there is nothing in the error log. From the cli on the server, it works fine. But it only says that my check_apc.php file is cached(name of the script that I was running). So it looks like APC has not fully/correctly been set up. Any one know what the problem could be? Contents of /etc/php.d/apc.ini: ; Enable apc extension module extension = apc.so ; Options for the apc module apc.enabled=1 apc.shm_segments=1 apc.optimization=0 apc.shm_size=32 apc.ttl=7200 apc.user_ttl=7200 apc.num_files_hint=1024 apc.mmap_file_mask=/tmp/apc.XXXXXX apc.enable_cli=1 apc.cache_by_default=1 The server is running CentOS
0
[ 2, 22870, 309, 71, 21, 5779, 26, 13, 26120, 60, 800, 3726, 3726, 31, 868, 20, 16146, 21, 5779, 20, 1362, 71, 14, 689, 30, 31, 170, 26, 9, 16382, 15, 31, 216, 70, 30, 32, 23, 614, 4066, 17, 9338, 5, 124, 10058, 72, 64, 577, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
LINQ: custom column names === How do you create your own custom column names in LINQ? For example: Dim query = From u In db.Users _ Select u.FirstName AS 'First Name'
0
[ 2, 6294, 1251, 45, 5816, 4698, 1817, 800, 3726, 3726, 184, 107, 42, 1600, 154, 258, 5816, 4698, 1817, 19, 6294, 1251, 60, 26, 823, 45, 5937, 25597, 800, 37, 287, 19, 13, 9007, 9, 16704, 18, 13, 1, 5407, 287, 9, 3552, 7259, 28, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How best to define a custom action in WiX? === I have a wix installer and a custom action for it which uses a property from the installer. The custom action has to happen after all the files are on the hard disk. It seems that you need 16 entries in the wxs file for this; eight within the root, like so: <CustomAction Id="SetForRollbackDo" Execute="immediate" Property="RollbackDo" Value="[MYPROP]"/> <CustomAction Id="RollbackDo" Execute="rollback" BinaryKey="MyDLL" DllEntry="UndoThing" Return="ignore"/> <CustomAction Id="SetForDo" Execute="immediate" Property="RollbackDo" Value="[MYPROP]"/> <CustomAction Id="Do" Execute="deferred" BinaryKey="MyDLL" DllEntry="DoThing" Return="check"/> <CustomAction Id="SetForRollbackUndo" Execute="immediate" Property="RollbackDo" Value="[MYPROP]"/> <CustomAction Id="RollbackUndo" Execute="rollback" BinaryKey="MyDLL" DllEntry="DoThing" Return="ignore"/> <CustomAction Id="SetForUndo" Execute="immediate" Property="RollbackDo" Value="[MYPROP]"/> <CustomAction Id="Undo" Execute="deferred" BinaryKey="MyDLL" DllEntry="UndoThing" Return="check"/> And eight within the `InstallExecuteSequence`, like so: <Custom Action="SetForRollbackDo" After="InstallFiles">REMOVE&lt;>"ALL"</Custom> <Custom Action="RollbackDo" After="SetForRollbackDo">REMOVE&lt;>"ALL"</Custom> <Custom Action="SetForDo" After="RollbackDo">REMOVE&lt;>"ALL"</Custom> <Custom Action="Do" After="SetForDo">REMOVE&lt;>"ALL"</Custom> <Custom Action="SetForRollbackUndo" After="InstallInitialize">REMOVE="ALL"</Custom> <Custom Action="RollbackUndo" After="SetForRollbackUndo">REMOVE="ALL"</Custom> <Custom Action="SetForUndo" After="RollbackUndo">REMOVE="ALL"</Custom> <Custom Action="Undo" After="SetForUndo">REMOVE="ALL"</Custom> Is there a better way?
0
[ 2, 184, 246, 20, 9267, 21, 5816, 1028, 19, 4807, 396, 60, 800, 3726, 3726, 31, 57, 21, 4807, 396, 16146, 106, 17, 21, 5816, 1028, 26, 32, 56, 2027, 21, 1354, 37, 14, 16146, 106, 9, 14, 5816, 1028, 63, 20, 2384, 75, 65, 14, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you call an Asynchronous Web Request in VB.NET? === I am currently using the following code to create a web request: Dim myRequest As WebRequest = WebRequest.Create("http://foo.com/bar") Dim myResponse As WebResponse = myRequest.GetResponse() The problem is that this "locks" up the program until the request is completed (and program will hang if the request never completes). How do you change something like this to execute asynchronously so that other tasks can be completed while the web request completes?
0
[ 2, 184, 107, 42, 645, 40, 21, 16023, 1291, 2741, 3772, 19, 13, 20468, 9, 2328, 60, 800, 3726, 3726, 31, 589, 871, 568, 14, 249, 1797, 20, 1600, 21, 2741, 3772, 45, 5937, 51, 99, 10351, 28, 2741, 99, 10351, 800, 2741, 99, 10351, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the best framework for Unit Testing in JavaME? === What is currently the best tool for JavaME unit testing? I´ve never really used unit testing before (shame on me!), so learning curve is important. I would appreciate some pros and cons with your answer. :)
0
[ 2, 98, 25, 14, 246, 6596, 26, 1237, 4431, 19, 8247, 790, 60, 800, 3726, 3726, 98, 25, 871, 14, 246, 5607, 26, 8247, 790, 1237, 4431, 60, 31, 13, 195, 243, 510, 147, 1237, 4431, 115, 13, 5, 9582, 62, 27, 55, 187, 6, 15, 86, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What do I need in order to create 64 bit .NET applications === If I want to compile my .NET applications for a 64 bit environment. Do I need * 64 bit OS version or * 64 bit Visual Studio version Or both?
0
[ 2, 98, 107, 31, 376, 19, 389, 20, 1600, 4384, 1142, 13, 9, 2328, 3767, 800, 3726, 3726, 100, 31, 259, 20, 26561, 51, 13, 9, 2328, 3767, 26, 21, 4384, 1142, 2307, 9, 107, 31, 376, 1637, 4384, 1142, 13, 759, 615, 54, 1637, 4384,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
flex tutorials or books === Can anyone recommend any good sites or good books for learning flex? Thanks Damien
4
[ 2, 14409, 29724, 18, 54, 964, 800, 3726, 3726, 92, 1276, 12360, 186, 254, 3259, 54, 254, 964, 26, 2477, 14409, 60, 3669, 14100, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Tag images in the image itself? HOW-TO === How to tag images in the image itself in a web page? I know [taggify][1]. But... is there other options? Orkut also does it to tag people faces... How is it done? Anyone knows any public framework that is able to do it? [1]: http://www.taggify.net/
0
[ 2, 3383, 3502, 19, 14, 1961, 1145, 60, 184, 8, 262, 800, 3726, 3726, 184, 20, 3383, 3502, 19, 14, 1961, 1145, 19, 21, 2741, 2478, 60, 31, 143, 636, 536, 4572, 8612, 500, 2558, 165, 500, 9, 47, 9, 9, 9, 25, 80, 89, 6368, 60, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Display DIV at Cursor Position in Textarea === For a project of mine I would love to provide auto completion for a specific textarea. Similar to how intellisense/omnicomplete works. For that however I have to find out the absolute cursor position so that I know where the DIV should appear. Turns out: that's (nearly I hope) impossible to achieve. Does anyone has some neat ideas how to solve that problem?
0
[ 2, 3042, 13, 12916, 35, 29588, 649, 19, 1854, 17760, 800, 3726, 3726, 26, 21, 669, 16, 1114, 31, 83, 339, 20, 1181, 3108, 5392, 26, 21, 1903, 1854, 17760, 9, 835, 20, 184, 14635, 3159, 6498, 118, 2636, 889, 15990, 693, 9, 26, 30...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a better way to initialize a Hastable in .NET without using Add method? === I am currently initializing a Hashtable in the following way: Hashtable filter = new Hashtable(); filter.Add("building", "A-51"); filter.Add("apartment", "210"); I am looking for a nicer way to do this. I tried something like Hashtable filter2 = new Hashtable() { {"building", "A-51"}, {"apartment", "210"} }; However the above code does not compile.
0
[ 2, 25, 80, 21, 574, 161, 20, 2104, 2952, 21, 63, 5924, 19, 13, 9, 2328, 366, 568, 3547, 2109, 60, 800, 3726, 3726, 31, 589, 871, 2104, 3335, 21, 19170, 5924, 19, 14, 249, 161, 45, 19170, 5924, 11945, 800, 78, 19170, 5924, 5, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I find the center of a number of geographic points? === If I have a series of points as longitude and latitude, how would I calculate the center of all of those points?
0
[ 2, 184, 107, 31, 477, 14, 459, 16, 21, 234, 16, 9225, 819, 60, 800, 3726, 3726, 100, 31, 57, 21, 231, 16, 819, 28, 22291, 17, 16337, 15, 184, 83, 31, 18469, 14, 459, 16, 65, 16, 273, 819, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
String Format Date - C# or VB.NET === Date coming out of a database, need to format as "mm/dd/yy" For Each dr as DataRow in ds.Tables(0).Rows Response.Write(dr("CreateDate")) Next
0
[ 2, 3724, 2595, 1231, 13, 8, 272, 5910, 54, 13, 20468, 9, 2328, 800, 3726, 3726, 1231, 880, 70, 16, 21, 6018, 15, 376, 20, 2595, 28, 13, 7, 3363, 118, 8096, 118, 93, 93, 7, 26, 206, 744, 28, 1054, 5417, 19, 13, 43, 18, 9, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PHP: using preg_replace with htmlentities === I'm writing an RSS to JSON parser and as a part of that, I need to use htmlentities() on any tag found inside the description tag. Currently, I'm trying to use preg_replace(), but I'm struggling a little with it. My current (non-working) code looks like: $pattern[0] = "/\<description\>(.*?)\<\/description\>/is"; $replace[0] = '<description>'.htmlentities("$1").'</description>'; $rawFeed = preg_replace($pattern, $replace, $rawFeed); If you have a more elegant solution to this as well, please share. Thanks.
0
[ 2, 13, 26120, 45, 568, 782, 263, 1, 99, 5119, 29, 13, 15895, 2291, 3808, 800, 3726, 3726, 31, 22, 79, 1174, 40, 13, 1224, 18, 20, 487, 528, 2017, 4104, 17, 28, 21, 141, 16, 30, 15, 31, 376, 20, 275, 13, 15895, 2291, 3808, 5,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
When developing, do you turn off UAC in Vista? === I didn't upgrade to Vista until May or so and one of the things I've always heard developers I know in real life say is "first thing you should do is turn off that UAC crap" Well, I've left it on this whole time for a few reasons. First, just as a failsafe in case I do something idiotic like have a momentary lapse of reason and run an attachment from an email, or in case I view a site which hits some unpatched exploit. Second, as a big of an experiment to see how good or bad it really is. Finally, I figure that it enforces some better practices. I used to develop every website in Windows directly in inetpub\wwwroot (Visual Studio .NET 2003 more or less required this) but now I develop them elsewhere because the UAC clickfest is a nightmare. I figure this is Microsoft's way of saying "you should *really* be doing it this way". By way of another analogy - if you wrote a web app which runs on XP and 2000 just fine but requires 50 different security features of Server 2003 to be turned off, the real solution might be instead to just fix the application such that it doesn't require the security features to be turned off. But now I'm having to work with an app which is really really **NOT** designed to be developed outside of inetpub/wwwroot and so UAC is really a nuisance. It's beyond the scope of the project to rectify this. I want to stick to my guns and leave UAC on but I'm also worried about being so autopilot about clicking "Yes" or "Allow" three times every time I need to modify a file. Am I just being hard headed? Do most developers on Vista leave the UAC on or off? And for the instance described above, is there a better/easier way?
0
[ 2, 76, 3561, 15, 107, 42, 805, 168, 287, 1738, 19, 13520, 60, 800, 3726, 3726, 31, 223, 22, 38, 9483, 20, 13520, 163, 123, 54, 86, 17, 53, 16, 14, 564, 31, 22, 195, 550, 752, 10168, 31, 143, 19, 683, 201, 395, 25, 13, 7, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Count number of occurences of token in a file === I have a server access log, with timestamps of each http request, I'd like to obtain a count of the number of requests at each second. Using `sed`, and `cut -c`, so far I've managed to cut the file down to just the timestamps, such as: >22-Sep-2008 20:00:21 +0000 22-Sep-2008 20:00:22 +0000 22-Sep-2008 20:00:22 +0000 22-Sep-2008 20:00:22 +0000 22-Sep-2008 20:00:24 +0000 22-Sep-2008 20:00:24 +0000 What I'd love to get is the number of times each unique timestamp appears in the file. For example, with the above example, I'd like to get output that looks like: >22-Sep-2008 20:00:21 +0000: 1 22-Sep-2008 20:00:22 +0000: 3 22-Sep-2008 20:00:24 +0000: 2 I've used `sort -u` to filter the list of timestamps down to a list of unique tokens, hoping that I could use grep like grep -c -f <file containing patterns> <file> but this just produces a single line of a grand total of matching lines. I know this can be done in a single line, stringing a few utilities together ... but I can't think of which. Anyone know?
0
[ 2, 2468, 234, 16, 3744, 2940, 18, 16, 20, 2853, 19, 21, 3893, 800, 3726, 3726, 31, 57, 21, 8128, 1381, 6738, 15, 29, 436, 4919, 1919, 16, 206, 7775, 3772, 15, 31, 22, 43, 101, 20, 5545, 21, 2468, 16, 14, 234, 16, 12279, 35, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the 'best' way to do distributed transactions across multiple databases using Spring and Hibernate === I have an application - more like a utility - that sits in a corner and updates two different databases periodically. It is a little standalone app that has been built with a Spring Application Context. The context has two Hibernate Session Factories configured in it, in turn using Commons DBCP data sources configured in Spring. Currently there is no transaction management, but I would like to add some. The update to one database depends on a successful update to the other. The app does not sit in a JEE container - it is bootstrapped by a static launcher class called from a shell script. The launcher class instantiates the Application Context and then invokes a method on one of its beans. What is the 'best' way to put transactionality around the database updates? I will leave the definition of 'best' to you, but I think it should be some function of 'easy to set up', 'easy to configure', 'inexpensive', and 'easy to package and redistribute'. Naturally FOSS would be good.
0
[ 2, 98, 25, 14, 13, 22, 4936, 22, 161, 20, 107, 4387, 13147, 464, 1886, 6018, 18, 568, 1573, 17, 4148, 2102, 8820, 800, 3726, 3726, 31, 57, 40, 3010, 13, 8, 91, 101, 21, 10082, 13, 8, 30, 7550, 19, 21, 1531, 17, 16779, 81, 42...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Including many rewrite directives in lighttpd === I have a bunch of projects in parallel subdirectories that all have etc/lighttpd.conf files. The files are very simple; they just include a directive that looks like this: url.rewrite-once = ("^/project(.*)$"=>"project/router.php?args=$1") Unfortunately, I just discovered that I can't simply loop through them, because I'll get a "duplicate config variable" error. I see that the way I'm supposed to use it is like this: url.rewrite-once = ( "^/project1(.*)$"=>"project1/router.php?args=$1" ,"^/project2(.*)$"=>"project2/router.php?args=$1" ) However, if I make my per-directory config files just include the rewrites, and have a shell script build them, I can't really put any OTHER lighty directives in the per-directory files. Then again, I'm new to lighty, so maybe I don't need to and just don't realize it. What's "the right way" to do this?
0
[ 2, 215, 151, 27891, 15626, 18, 19, 471, 38, 9251, 800, 3726, 3726, 31, 57, 21, 7653, 16, 2314, 19, 3821, 972, 10197, 1596, 30, 65, 57, 2722, 118, 3130, 38, 9251, 9, 14093, 6488, 9, 14, 6488, 50, 253, 1935, 73, 59, 114, 468, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What are XML namespaces for? === This is something that I always find a bit hard to explain to others: Why do XML namespaces exist? When should we use them and when should we not? What are the common pitfalls when working with namespaces in XML?
0
[ 2, 98, 50, 23504, 204, 5582, 18, 26, 60, 800, 3726, 3726, 48, 25, 301, 30, 31, 550, 477, 21, 1142, 552, 20, 3271, 20, 654, 45, 483, 107, 23504, 204, 5582, 18, 3182, 60, 76, 378, 95, 275, 105, 17, 76, 378, 95, 52, 60, 98, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
SQL Query Question - Select * from view or Select col1,col2.....from view === We are using SQL2005 but this question can be for any rdbms. Which is more efficient, when selecting all columns from a view Select * from view or Select col1,col2.....from view
0
[ 2, 4444, 255, 25597, 1301, 13, 8, 5407, 1637, 37, 1418, 54, 5407, 3313, 165, 15, 7771, 135, 9, 9, 9, 9, 9, 2665, 1418, 800, 3726, 3726, 95, 50, 568, 4444, 255, 2835, 47, 48, 1301, 92, 44, 26, 186, 13, 897, 13178, 18, 9, 56, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is DataGrid a necessity in WPF? === I have seen a lot of discussions going on and people asking about DataGrid for WPF and complaining about Microsoft for not having one with their WPF framework till date. We know that WPF is a great UI technology and have the Concept of ItemsControl,DataTemplate, etc,etc to make great UX. Even WPF has got a more closely matching control- ListView, which can be easily templated to give better UX than a traditional Datagrid like display. And I would say a readymade DataGrid control will kill or hide a lot of creativity and it surely will decrease the innovations in User Experience field. So what is your opinion about the need of DataGrid in WPF as a Framework component? If you feel it is necessary then is it just because the world is so used to the DatGrid way of data display for many years?
0
[ 2, 25, 1054, 16375, 21, 14981, 19, 619, 7721, 60, 800, 3726, 3726, 31, 57, 541, 21, 865, 16, 11139, 228, 27, 17, 148, 3379, 88, 1054, 16375, 26, 619, 7721, 17, 20154, 88, 7099, 26, 52, 452, 53, 29, 66, 619, 7721, 6596, 3924, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Run Amazon EC2 AMI in Windows === Is there a way to run an Amazon EC2 AMI image in Windows? I'd like to be able to do some testing and configuration locally. I'm looking for something like Virtual PC.
0
[ 2, 485, 8059, 6695, 135, 13, 5448, 19, 1936, 800, 3726, 3726, 25, 80, 21, 161, 20, 485, 40, 8059, 6695, 135, 13, 5448, 1961, 19, 1936, 60, 31, 22, 43, 101, 20, 44, 777, 20, 107, 109, 4431, 17, 8091, 6680, 9, 31, 22, 79, 699,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
regular expression banker's rounding === Does anyone know how I can get a regular expression to use bankers rounding? I have been using "{0:c}" but that doesn't round the same way that bankers rounding does. The C# math.round does bankers rounding. I just need to be able to duplicate how C# rounds with a regular expression.
0
[ 2, 1290, 1803, 12426, 22, 18, 560, 68, 800, 3726, 3726, 630, 1276, 143, 184, 31, 92, 164, 21, 1290, 1803, 20, 275, 12426, 18, 560, 68, 60, 31, 57, 74, 568, 13, 7, 1, 387, 45, 150, 1, 7, 47, 30, 1437, 22, 38, 560, 14, 205, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Calling 32bit Code from 64bit Process === I have an application that we're trying to migrate to 64bit from 32bit. It's .NET, compiled using the x64 flags. However, we have a large number of DLLs written in FORTRAN 90 compiled for 32bit. The functions in the FORTRAN DLLs are fairly simple: you put data in, you pull data out; no state of any sort. We also don't spend a lot of time there, a total of maybe 3%, but the calculation logic it performs is invaluable. Can I somehow call the 32bit DLLs from 64bit code? MSDN suggests that I can't, period. I've done some simple hacking and verified this. Everything throws an invalid entry point exception. The only possible solution i've found so far is to create COM+ wrappers for all of the 32bit DLL functions and invoke COM from the 64bit process. This seems like quite a headache. We can also run the process in WoW emulation, but then the memory ceiling wouldn't be increased, capping at around 1.6gb. Is there any other way to call the 32bit DLLs from a 64bit CLR process?
0
[ 2, 2555, 2512, 3326, 1797, 37, 4384, 3326, 953, 800, 3726, 3726, 31, 57, 40, 3010, 30, 95, 22, 99, 749, 20, 22985, 20, 4384, 3326, 37, 2512, 3326, 9, 32, 22, 18, 13, 9, 2328, 15, 9316, 568, 14, 993, 3470, 9318, 9, 207, 15, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Typical Kimball Star-schema Data Warehouse - Model Views Feasible? and How to Code Gen === I have a data warehouse containing typical star schemas, and a whole bunch of code which does stuff like this (obviously a lot bigger, but this is illustrative): SELECT cdim.x ,SUM(fact.y) AS y ,dim.z FROM fact INNER JOIN conformed_dim AS cdim ON cdim.cdim_dim_id = fact.cdim_dim_id INNER JOIN nonconformed_dim AS dim ON dim.ncdim_dim_id = fact.ncdim_dim_id INNER JOIN date_dim AS ddim ON ddim.date_id = fact.date_id WHERE fact.date_id = @date_id GROUP BY cdim.x ,dim.z I'm thinking of replacing it with a view (`MODEL_SYSTEM_1`, say), so that it becomes: SELECT m.x ,SUM(m.y) AS y ,m.z FROM MODEL_SYSTEM_1 AS m WHERE m.date_id = @date_id GROUP BY m.x ,m.z But the view `MODEL_SYSTEM_1` would have to contain unique column names, and I'm also concerned about performance with the optimizer if I go ahead and do this, because I'm concerned that all the items in the WHERE clause across different facts and dimensions get optimized, since the view would be across a whole star, and views cannot be parametrized (boy, wouldn't that be cool!) So my questions are - 1. Is this approach OK, or is it just going to be an abstraction which hurts performance and doesn't give my anything but a lot nicer syntax? 2. What's the best way to code-gen these views, eliminating duplicate column names (even if the view later needs to be tweaked by hand), given that all the appropriate PK and FKs are in place? Should I just write some SQL to pull it out of the INFORMATION_SCHEMA or is there a good example already available.
0
[ 2, 3874, 27633, 778, 8, 7526, 540, 1054, 8308, 13, 8, 1061, 4146, 13, 23707, 60, 17, 184, 20, 1797, 4380, 800, 3726, 3726, 31, 57, 21, 1054, 8308, 3503, 3874, 778, 23874, 18, 15, 17, 21, 979, 7653, 16, 1797, 56, 630, 3217, 101, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
vbscript clipboard === I am looking for a method to place some text onto the clipboard with vbscript. The vbscript in question will be deployed as part of our login script. I would like to avoid using anything that isn't available on a clean Windows XP system.
0
[ 2, 13, 20468, 8741, 12229, 2806, 800, 3726, 3726, 31, 589, 699, 26, 21, 2109, 20, 209, 109, 1854, 1204, 14, 12229, 2806, 29, 13, 20468, 8741, 9, 14, 13, 20468, 8741, 19, 1301, 129, 44, 6698, 28, 141, 16, 318, 6738, 108, 3884, 9,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What's the best way to upgrade from Django 0.96 to 1.0 ? === Should I try and actually upgrade my existing app, or just rewrite it mostly from scratch, saving what pieces (templates, etc) I can?
0
[ 2, 98, 22, 18, 14, 246, 161, 20, 9483, 37, 3857, 14541, 713, 9, 4060, 20, 137, 9, 387, 13, 60, 800, 3726, 3726, 378, 31, 1131, 17, 1121, 9483, 51, 3149, 4865, 15, 54, 114, 27891, 32, 1555, 37, 12395, 15, 7599, 98, 2491, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
How do I write a working IThumbnailProvider for Windows Vista === I have written a thumbnail provider following the interfaces specified on MSDN. However, I have been unable to figure out how to register it in a way that Vista actually calls into it. Has anyone gotten a thumbnail provider working for Vista? Sample code or links would be especially helpful.
0
[ 2, 184, 107, 31, 2757, 21, 638, 32, 9269, 220, 325, 947, 26735, 139, 26, 1936, 13520, 800, 3726, 3726, 31, 57, 642, 21, 5078, 325, 947, 11747, 249, 14, 6573, 18, 9931, 27, 4235, 43, 103, 9, 207, 15, 31, 57, 74, 2343, 20, 1465,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Should Python import statements always be at the top of a module? === [PEP 08](http://www.python.org/dev/peps/pep-0008/) states: > Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants. However if the class/method/function that I am importing is only used in rare cases, surely it is more efficient to do the import when it is needed? Isn't this: class SomeClass(object): def not_often_called(self) from datetime import datetime self.datetime = datetime.now() more efficient than this? from datetime import datetime class SomeClass(object): def not_often_called(self) self.datetime = datetime.now()
0
[ 2, 378, 20059, 9010, 9015, 550, 44, 35, 14, 371, 16, 21, 12613, 60, 800, 3726, 3726, 636, 1664, 306, 13, 3099, 500, 5, 21127, 6903, 6483, 9, 6448, 11570, 9, 5583, 118, 14438, 118, 1664, 1919, 118, 1664, 306, 8, 3993, 12530, 6, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Recovering browser textareas === Is there a way to recover the contents of a browser textarea? Say, you've typed a long post and then accidentally clicked on a link. Then when you come back, the textfields tantalizingly retain the text you typed in, but the textarea is blank. Where does IE and Firefox store the stuff that prepopulates? Can textareas be brought back?
0
[ 2, 15135, 16495, 1854, 17760, 18, 800, 3726, 3726, 25, 80, 21, 161, 20, 7635, 14, 8478, 16, 21, 16495, 1854, 17760, 60, 395, 15, 42, 22, 195, 1001, 43, 21, 175, 678, 17, 94, 9746, 15802, 27, 21, 3508, 9, 94, 76, 42, 340, 97, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I make ImageMagick talk to Ghostscript === I am on Windows XP. I am using ImageMagick (MagickNet) to convert PDF's to TIF's. My problem is that when I load a PDF in the MagicNet.Image object, it doesn't throw an error, but when I look at the properties, it is obvious it didn't load the PDF (it doesn't contain any data). My guess is that ImageMagick isn't talking to Ghostscript. Any ideas?
0
[ 2, 184, 107, 31, 233, 1961, 21200, 197, 930, 20, 3995, 8741, 800, 3726, 3726, 31, 589, 27, 1936, 23045, 9, 31, 589, 568, 1961, 21200, 197, 13, 5, 21200, 197, 2328, 6, 20, 8406, 13, 11124, 22, 18, 20, 13, 38, 821, 22, 18, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Ruby error "Superclass mismatch for for class Cookie" from cgi.rb === I've just updated my ruby installation on my gentoo server to ruby 1.8.6 patchlevel 287 and have started getting an error on one of my eRuby apps. The error given in the apache error_log file is: [error] mod_ruby: /usr/lib/ruby/1.8/cgi.rb:774: superclass mismatch for class Cookie (TypeError) The strange thing is that it seems to work sometimes - but other times I get that error. Anyone any ideas?
0
[ 2, 10811, 7019, 13, 7, 8542, 1898, 2462, 12280, 26, 26, 718, 19980, 7, 37, 272, 2234, 9, 7549, 800, 3726, 3726, 31, 22, 195, 114, 6372, 51, 10811, 7758, 27, 51, 4380, 8175, 8128, 20, 10811, 137, 9, 457, 9, 379, 7331, 3906, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Compile-time error for NotSupportedException in subclass function === If I have a subclass that has yet to implement a function provided by the base class, I can override that function and have it throw a NotSupportedException. Is there a way to generate a compile-time error for this to avoid only hitting this at runtime?
0
[ 2, 26561, 8, 891, 7019, 26, 52, 24909, 10066, 872, 19, 972, 1898, 1990, 800, 3726, 3726, 100, 31, 57, 21, 972, 1898, 30, 63, 768, 20, 8713, 21, 1990, 1173, 34, 14, 1000, 718, 15, 31, 92, 84, 11891, 30, 1990, 17, 57, 32, 3814, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Modify config file based on build constants === I have an application dependent on some internal web services, and so we want our development and staging configurations to point to the development and staging servers for the web services. Right now, this means manually editing my app.config file to point to the appropriate URLs. This is not only a hassle, but prone to human error ("oops, did I not remove that production URL?" can cause many-a-problem). In a small handful of places in the code, I use the #if DEBUG // do something #endif preprocessing statement, and was wondering if something similar could be done for values in the app.config. I've been able to do this just fine with my app Settings, since these values are accessible in-code. I'm aware of post-build scripts, but it seems like there might be an easier way than writing a routine to munge the app.config XML everytime I do a build. Any suggestions? This is for C#, and .NET 3.5, and includes both old "web references" as well as the newer WCF "web services" references.
0
[ 2, 17579, 13, 14093, 2816, 3893, 432, 27, 1895, 3587, 18, 800, 3726, 3726, 31, 57, 40, 3010, 9063, 27, 109, 3117, 2741, 687, 15, 17, 86, 95, 259, 318, 522, 17, 16824, 8091, 18, 20, 454, 20, 14, 522, 17, 16824, 17595, 26, 14, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Any business examples of using Markov chains? === What business cases are there for using Markov chains? I've seen the sort of play area of a markov chain applied to someone's blog to write a fake post. I'd like some practical examples though? E.g. useful in business or prediction of stock market, or the like...
0
[ 2, 186, 508, 3770, 16, 568, 943, 2026, 8864, 60, 800, 3726, 3726, 98, 508, 1871, 50, 80, 26, 568, 943, 2026, 8864, 60, 31, 22, 195, 541, 14, 2058, 16, 418, 217, 16, 21, 943, 2026, 2858, 2435, 20, 737, 22, 18, 8146, 20, 2757, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there any way to have the JBoss connection pool reconnect to Oracle when connections go bad? === We have our JBoss and Oracle on separate servers. The connections seem to be dropped and is causing issues with JBoss. How can I have the JBoss reconnect to Oracle if the connection is bad while we figure out why the connections are being dropped in the first place?
0
[ 2, 25, 80, 186, 161, 20, 57, 14, 487, 10349, 18, 2760, 3067, 29693, 20, 15759, 76, 6760, 162, 896, 60, 800, 3726, 3726, 95, 57, 318, 487, 10349, 18, 17, 15759, 27, 1725, 17595, 9, 14, 6760, 2260, 20, 44, 1539, 17, 25, 3242, 15...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SQL Anywhere 11 (Sybase) with Entity Framework in Visual Studio SP1??? === Well, the question is pretty much in the title. I've just installed Visual Studio SP1, and now when I want to import a Entity Model from a database, it doesn't display the SQL Anywhere provider anymore. Does anyone know if there is a patch or some way to make it work with SP1? Thanks.
0
[ 2, 4444, 255, 4922, 547, 13, 5, 4980, 8436, 6, 29, 9252, 6596, 19, 3458, 1120, 3782, 165, 60, 60, 60, 800, 3726, 3726, 134, 15, 14, 1301, 25, 1772, 212, 19, 14, 581, 9, 31, 22, 195, 114, 4066, 3458, 1120, 3782, 165, 15, 17, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
In ClearQuest, How do I generate a query in SQL Editor that allows me to prompt the user for a value? === I generate a ClearQuest query using the Query Wizard. In the Query Editor, I am able to select a filter for a given field. However, I want to refine the query using the SQL Editor, but then I loose the ability to have a dynamic filter. How can I resolve this.
0
[ 2, 19, 1207, 10351, 15, 184, 107, 31, 7920, 21, 25597, 19, 4444, 255, 1835, 30, 2965, 55, 20, 11443, 4417, 14, 4155, 26, 21, 1923, 60, 800, 3726, 3726, 31, 7920, 21, 1207, 10351, 25597, 568, 14, 25597, 10276, 9, 19, 14, 25597, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a way to Categorize my custom controls in the toolbox? === I have built a number of asp.net servercontrols into a class library, & I would like them to be grouped a certain way when the other members of my team reference my dll. Is that possible? How?
0
[ 2, 25, 80, 21, 161, 20, 13, 14375, 2952, 51, 5816, 8671, 19, 14, 5607, 5309, 60, 800, 3726, 3726, 31, 57, 392, 21, 234, 16, 28, 306, 9, 2328, 8128, 12898, 18, 77, 21, 718, 1248, 15, 279, 31, 83, 101, 105, 20, 44, 19511, 21, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
When do I use the PHP constant "PHP_EOL"? === When is it a good idea to use [`PHP_EOL`][1]? I sometimes see this in code samples of PHP. Does this handle DOS/Mac/Unix endline issues? Most of the PHP I write is for generating HTML, and I use `<br/>` instead of actual newlines, so haven't used this constant before. [1]: http://us3.php.net/manual/en/reserved.constants.php
0
[ 2, 76, 107, 31, 275, 14, 13, 26120, 3587, 13, 7, 26120, 1, 62, 1823, 7, 60, 800, 3726, 3726, 76, 25, 32, 21, 254, 882, 20, 275, 636, 1, 26120, 1, 62, 1823, 1, 500, 2558, 165, 500, 60, 31, 1030, 196, 48, 19, 1797, 7855, 16,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Registering a custom win32 window class from c# inside wpf === I have a new application written in WPF that needs to support an old API that allows it to receive a message that has been posted to a hidden window. Typically another application uses FindWindow to identify the hidden window using the name of its custom window class. **1) I assume to implement a custom window class I need to use old school win32 calls?** My old c++ application used RegisterClass and CreateWindow to make the simplest possible invisible window. I believe I should be able to do the same all within c#. I don't want my project to have to compile any unmanaged code. I have tried inheriting from System.Windows.Interop.HwndHost and using System.Runtime.InteropServices.DllImport to pull in the above API methods. Doing this I can successfully host a standard win32 window e.g. "listbox" inside WPF. However when I call CreateWindowEx for my custom window it always returns null. My call to RegisterClass succeeds but I am not sure what I should be setting the WNDCLASS.lpfnWndProc member to. **2) Does anyone know how to do this successfully?**
0
[ 2, 2243, 68, 21, 5816, 628, 3125, 1463, 718, 37, 272, 5910, 572, 619, 7721, 800, 3726, 3726, 31, 57, 21, 78, 3010, 642, 19, 619, 7721, 30, 2274, 20, 555, 40, 315, 21, 2159, 30, 2965, 32, 20, 2588, 21, 2802, 30, 63, 74, 6054, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Problem POSTing to webservice in .net 3.5 solution === I'm at my wit's end here. I'm trying to use an auto-complete extender from the asp.net ajax extensions toolkit, which is filled from a bog-standard webservice. The application is a .net 3.5 web site, hosting the webservice in a subdirectory (real, not virtual). Whenever I try to post to the webservice I get the following error: <b>The HTTP verb POST used to access path '/Workarea/webservices/FindAdvisorNameService.asmx/FindAdvisorName' is not allowed.</b> To complicate matters, a co-worker of mine pulled down the solution and can run it fine. After doing some Googling, it seems that there are some issues with URL rewriting, so I had him try using my web.config -- he still has no problem, and I still have no success. Anyone have any thoughts on what could be up, or where to start looking? To complicate matters, this is an <a href="http://www.ektron.com">Ektron CMS400.Net</a> solution, but he has the same version of Ektron installed that I do. The project was recently upgraded from the 2.0 to 3.5 framework, but still, it's in 3.5 on his machine as well. I've checked the IIS mappings, and GET, POST, and DEBUG are allowed on ASMX files. Help me Obi-Wan KeSObi, you're my only hope!
2
[ 2, 1448, 15669, 20, 2741, 11449, 19, 13, 9, 2328, 203, 9, 264, 4295, 800, 3726, 3726, 31, 22, 79, 35, 51, 9642, 22, 18, 241, 235, 9, 31, 22, 79, 749, 20, 275, 40, 3108, 8, 15990, 7206, 106, 37, 14, 28, 306, 9, 2328, 20624, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using property() on classmethods === I have a class with two class methods (using the classmethod() function) for getting and setting what is essentially a static variable. I tried to use the property() function with these, but it results in an error. I was able to reproduce the error with the following in the interpreter: >>> class foo(object): ... _var=5 ... def getvar(cls): ... return cls._var ... getvar=classmethod(getvar) ... def setvar(cls,value): ... cls._var=value ... setvar=classmethod(setvar) ... var=property(getvar,setvar) ... >>> f.getvar() 5 >>> f.setvar(4) >>> f.getvar() 4 >>> f.var Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: 'classmethod' object is not callable >>> f.var=5 Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: 'classmethod' object is not callable Note that I'm using Python 2.3.5 which is why I'm not using the decorator syntax.
0
[ 2, 568, 1354, 5, 6, 27, 718, 5909, 1807, 43, 18, 800, 3726, 3726, 31, 57, 21, 718, 29, 81, 718, 3195, 13, 5, 12655, 14, 718, 5909, 1807, 43, 5, 6, 1990, 6, 26, 1017, 17, 2697, 98, 25, 7398, 21, 12038, 7612, 9, 31, 794, 20,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I define my own errno values? === When developing a module (device driver, middleware, etc...) that will run in the kernel space, we would like to have some way to capture the reason an operation might fail. In VxWorks, The errno mechanism seems to be a good way to do this. Is it possible to define my own errno values?
0
[ 2, 184, 107, 31, 9267, 51, 258, 13, 106, 139, 251, 4070, 60, 800, 3726, 3726, 76, 3561, 21, 12613, 13, 5, 546, 18507, 2425, 15, 772, 5011, 15, 2722, 9, 9, 9, 6, 30, 129, 485, 19, 14, 17007, 726, 15, 95, 83, 101, 20, 57, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
jQuery $().find problem === I'm trying to get the contents of a XML document element, but the element has a colon in it's name. This line works for every element but the ones with a colon in the name: $(this).find("geo:lat").text(); I assume that the colon needs escaping. How do I fix this?
0
[ 2, 487, 8190, 93, 5579, 5, 6, 9, 19811, 1448, 800, 3726, 3726, 31, 22, 79, 749, 20, 164, 14, 8478, 16, 21, 23504, 4492, 4520, 15, 47, 14, 4520, 63, 21, 10766, 19, 32, 22, 18, 204, 9, 48, 293, 693, 26, 352, 4520, 47, 14, 53...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Recursive descent parsing - from LL(1) up === The following simple "calculator expression" grammar (BNF) can be easily parsed with the a trivial recursive-descent parser, which is predictive LL(1): <expr> := <term> + <term> | <term> - <term> | <term> <term> := <factor> * <factor> <factor> / <factor> <factor> <factor> := <number> | <id> | ( <expr> ) <number> := \d+ <id> := [a-zA-Z_]\w+ Because it is always enough to see the next token in order to know the rule to pick. However, suppose that I add the following rule: <command> := <expr> | <id> = <expr> For the purpose of interacting with the calculator on the command line, with variables, like this: calc> 5+5 => 10 calc> x = 8 calc> 6 * x + 1 => 49 Is it true that I can not use a simple LL(1) predictive parser to parse `<command>` rules ? I tried to write the parser for it, but it seems that I need to know more tokens forward. Is the solution to use backtracking, or can I just implement LL(2) and always look two tokens forward ? How to RD parser generators handle this problem (ANTLR, for instance) ? Thanks in advance
0
[ 2, 302, 24244, 5974, 2017, 18, 68, 13, 8, 37, 13, 211, 5, 165, 6, 71, 800, 3726, 3726, 14, 249, 1935, 13, 7, 16304, 14868, 1803, 7, 7207, 13, 5, 220, 11408, 6, 92, 44, 2351, 2017, 18, 69, 29, 14, 21, 13, 19712, 302, 24244, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you incentivize good code? === Are there any methods/systems that you have in place to incentivize your development team members to write "good" code and add comments to their code? I recognize that "good" is a subjective term and it relates to an earlier question about [measuring the maintainability of code][1] as one measurement of good code. [1]: http://stackoverflow.com/questions/127360/is-there-a-rating-system-for-the-maintainability-of-source-code
0
[ 2, 184, 107, 42, 19, 5089, 3757, 2952, 254, 1797, 60, 800, 3726, 3726, 50, 80, 186, 3195, 118, 10724, 18, 30, 42, 57, 19, 209, 20, 19, 5089, 3757, 2952, 154, 522, 173, 443, 20, 2757, 13, 7, 3264, 7, 1797, 17, 3547, 7534, 20, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
In a .Net winforms application, how do I obtain the path the current user's temp folder? === Seems so basic, I can't believe I don't know this! I just need a scratch folder to dump some temporary files to. I don't care if it gets wiped out between usages or not, and I don't think I should have to go through the hassle of creating one and maintaining it myself from within my application. Is that too much to ask?
0
[ 2, 19, 21, 13, 9, 2328, 628, 4190, 18, 3010, 15, 184, 107, 31, 5545, 14, 2013, 14, 866, 4155, 22, 18, 13, 9577, 19294, 60, 800, 3726, 3726, 2206, 86, 2125, 15, 31, 92, 22, 38, 985, 31, 221, 22, 38, 143, 48, 187, 31, 114, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...