unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Synchronising twice on the same object? === I was wondering if in Java I would get any odd behaviour if I synchronise twice on the same object? The scenario is as follows pulbic class SillyClassName { object moo; ... public void method1(){ synchronised(object) { .... method2(); .... } } public void method2(){ synchronised(object) { doStuff(); } } } Both methods use the object and are synchronised on it. Will the second method when called by the first method stop because it's locked? I don't think so because it's the same thread but I'm unsure of any other odd results that might occur.
0
[ 2, 13, 16023, 7552, 2088, 27, 14, 205, 3095, 60, 800, 3726, 3726, 31, 23, 5712, 100, 19, 8247, 31, 83, 164, 186, 4210, 7727, 100, 31, 13, 16023, 2628, 2088, 27, 14, 205, 3095, 60, 14, 12705, 25, 28, 2415, 6971, 15896, 718, 10752...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 tell for a php page if someone came by POST or GET? === I'd like to have a page in php that normally displays information based on the GET request sent to it. However, I'd like for it to also be able to process certain POST requests. So, how can I tell if any data was sent by POST so I can act on it?
0
[ 2, 184, 107, 31, 494, 26, 21, 13, 26120, 2478, 100, 737, 281, 34, 678, 54, 164, 60, 800, 3726, 3726, 31, 22, 43, 101, 20, 57, 21, 2478, 19, 13, 26120, 30, 4147, 9412, 676, 432, 27, 14, 164, 3772, 795, 20, 32, 9, 207, 15, 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...
Creating a REST client API === I'm currently looking into options for creating a client API for a RESTfull application. Up until now we have had WCF services to allow all application to connect to the Business Layer and we're growing dissatisfied with it. We already have most of the infrastructure in place for the web (html and json requests) but we need to access the services from other applications (some will be linked against the main web app models library, others won't be). I've been reading about WADL [here][1] and [here][2] and it seems like it would be beneficial. We could generate the wadl, the client libraries and use it to check javascript urls. I would like to know what others have used, what worked and what didn't. [1]: http://searchsoa.techtarget.com/tip/0,289483,sid26_gci1265367,00.html [2]: https://wadl.dev.java.net/wadl2java.html
0
[ 2, 2936, 21, 760, 6819, 21, 2159, 800, 3726, 3726, 31, 22, 79, 871, 699, 77, 6368, 26, 2936, 21, 6819, 21, 2159, 26, 21, 760, 13727, 3010, 9, 71, 163, 130, 95, 57, 41, 11801, 410, 687, 20, 1655, 65, 3010, 20, 6379, 20, 14, 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...
Why MSI CustomAction that sets a reg key needs to be deffered on Vista with UAC? === We have a CustomAction that sets some registry key HKEY LOCAL_MACHINE. This wasn't working on Vista with UAC, until we made the action "deferred". The installer worked in other cases. Anyone knows why? We are using WIX to create the installer.
0
[ 2, 483, 4235, 49, 5816, 8645, 30, 3415, 21, 7953, 1246, 2274, 20, 44, 121, 6866, 69, 27, 13520, 29, 287, 1738, 60, 800, 3726, 3726, 95, 57, 21, 5816, 8645, 30, 3415, 109, 18269, 1246, 746, 4237, 375, 1, 20442, 9, 48, 526, 22, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
If the html says <div id="two words", how do I write the CSS selector in the style sheet? === If it said "oneword", then I could write "#oneword", but what do I write when there is a space in the word?
0
[ 2, 100, 14, 13, 15895, 898, 13, 1, 12916, 4924, 3726, 7, 3734, 715, 7, 15, 184, 107, 31, 2757, 14, 272, 18, 18, 23946, 19, 14, 1034, 6125, 60, 800, 3726, 3726, 100, 32, 87, 13, 7, 849, 9587, 7, 15, 94, 31, 110, 2757, 13, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 copy a structure of nodes from one xml to an other with a different namespace? === I have two XML files with two different XSD schemas and different namespaces. They have both an identical substructure. And now i need to copy that node (and all childs) from one XML document to the other one. Clone would do, if the namespaces were the same. Is there a nice way to do it? (The substructure will change later on - but will be kept identical.)
0
[ 2, 184, 20, 4344, 21, 1411, 16, 16272, 37, 53, 23504, 20, 40, 89, 29, 21, 421, 204, 5582, 60, 800, 3726, 3726, 31, 57, 81, 23504, 6488, 29, 81, 421, 993, 18, 43, 23874, 18, 17, 421, 204, 5582, 18, 9, 59, 57, 156, 40, 6323, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Online reference listing all standard SQL keywords? === Is there a comprehensive online reference listing all **standard** SQL keywords / functions? (More helpful if they are listed together and not spread about a site.)
0
[ 2, 2087, 2801, 9554, 65, 1236, 4444, 255, 1246, 12827, 60, 800, 3726, 3726, 25, 80, 21, 7041, 2087, 2801, 9554, 65, 13, 1409, 15566, 1409, 4444, 255, 1246, 12827, 13, 118, 3719, 60, 13, 5, 1995, 15600, 100, 59, 50, 1510, 429, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Equivelent to webcontrols in other frameworks? === What is the equivelent to web controls in frameworks other than ASP.Net? Specifically I'd like to know about Java, PHP and Ruby on Rails. What are the relative merits/faults of each of these frameworks for web development? I've had some exposure to ASP.Net and have been asked to look into developing an app that will have configurable controls on it. I know how I'd do this in ASP.Net, but it's to run on a linux box and in my experience Mono is not mature/stable when running ASP.Net.
0
[ 2, 13, 9629, 195, 13465, 20, 2741, 12898, 18, 19, 89, 6596, 18, 60, 800, 3726, 3726, 98, 25, 14, 13, 9629, 195, 13465, 20, 2741, 8671, 19, 6596, 18, 89, 119, 28, 306, 9, 2328, 60, 3524, 31, 22, 43, 101, 20, 143, 88, 8247, 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...
As a .NET developer, what exams other than the Microsoft ones are worthwhile? === I am a developer with no formal training. Having taught myself, I have come quite far but I am consolidating my experience with a lot of practise in making systems of varying sizes and complexity. I am revising for the 70-536 exam because it will make me really appreciate the fundamentals of .NET (surprisingly there were a few small things I didn't know), but I am not 100% keen on doing the whole .NET 3.5 certification thing due to the time and conflict with my practise programme. Also, by the time I finish all the certification, it will be out of date (I am thinking if I did .NET 3.5 exams I will finish it by late 2010 and .NET 4.0 will be out by then, and then I need to upgrade or something). What other exams are shorter and more worthwhile for my career? Thanks
0
[ 2, 28, 21, 13, 9, 2328, 10058, 15, 98, 15954, 89, 119, 14, 7099, 53, 18, 50, 29604, 60, 800, 3726, 3726, 31, 589, 21, 10058, 29, 90, 3337, 838, 9, 452, 2359, 992, 15, 31, 57, 340, 1450, 463, 47, 31, 589, 1065, 23666, 1880, 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 find the DNS servers in Android from a Java program? === The `java.net.InetAddress.GetByName(String host)` method can only return `A` records so to lookup other record types I need to be able to send DNS queries using the `dnsjava` library. However that normally relies on being able to parse `/etc/resolv.conf` or similar to find the DNS server addresses and that doesn't work on Android. The current DNS settings on Android can apparently only be obtained from within a shell by using the `getprop` command. Can anyone tell me how to get those settings from Java other than by spawning a shell with `Runtime.exec()` and parsing the output from `getprop`?
0
[ 2, 184, 107, 31, 477, 14, 13, 43, 2172, 17595, 19, 13005, 37, 21, 8247, 625, 60, 800, 3726, 3726, 14, 13, 1, 1004, 1385, 9, 2328, 9, 1149, 38, 27950, 9, 3060, 779, 7259, 5, 11130, 2015, 6, 1, 2109, 92, 104, 788, 13, 1, 58, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Passing Eval from ASPX to Javascript function as Parameter === <a id="lblShowTimings" runat="server" title='<%# Eval("SHOW_Name") %>' **onclick='PopulateTicketDiv(<%#Eval("SHOW_ID") %>)'**> <%#Eval("SHOW_Time") %></a> Can Eval be passed as an argument to a javascript function? If so whats the syntax?
0
[ 2, 2848, 13, 62, 3377, 37, 28, 306, 396, 20, 8247, 8741, 1990, 28, 18906, 800, 3726, 3726, 13, 1, 58, 4924, 3726, 7, 255, 6287, 9303, 10002, 68, 18, 7, 485, 721, 3726, 7, 10321, 106, 7, 581, 3726, 22, 1, 11881, 5910, 13, 62, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Executable started by a windows service using the local system account cannot access network shares === I have an executable that is started by a windows service, this program will be run on a customers machine and will need to connect to a remote share to perform a particular task. This share is specified by the customer via a UI, so we do not know this in advance meaning it can't be "hard-coded", or the share mapped in advance. Previously we required the customer to log on to their machine and run the executable on log-on , but we have always wanted to allow our program to run within a service and not require a log-in, primarily to make it easier for the customer and prevent any accidental log-outs shutting down our software. So this also means we don't know what local user accounts exist on a customers machine, so we have to start the service using the local system account. We now have, as mentioned above, a wrapper service to start the executable and perform various tasks. This appears to work fine in most cases and accesses the underlying network fine - our software's purpose mainly involves capturing packets etc. However, when the software tries to connect to a windows share (UNC name) it cannot connect. Whereas if the executable was started manually it connects fine. The suggestions I have generally seen to resolve these kind of issues appear to all say use a user account as the system account cannot access network shares, but in our case this isn't possible. Is there any other way we could get this to work?
0
[ 2, 1396, 17194, 5924, 373, 34, 21, 1936, 365, 568, 14, 375, 329, 2176, 1967, 1381, 982, 5945, 800, 3726, 3726, 31, 57, 40, 1396, 17194, 5924, 30, 25, 373, 34, 21, 1936, 365, 15, 48, 625, 129, 44, 485, 27, 21, 5279, 1940, 17, 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...
What are great _specific_ usability guidelines? === Usability is extremely important, and yet there are so many products that violate a lot of rules. There are several questions on StackOverflow that are about usability (see: [link1][1], [link2][2], [link3][3]), however what I feel is missing still is a comprehensive list of usability "tactics": concrete examples of what (not) to do for a web application. Please don't add references to books. Please list one exapmle per answer so that we can use the voting to actually prioritize the list. [1]: http://stackoverflow.com/questions/42863/what-metrics-for-gui-usability-do-you-know [2]: http://stackoverflow.com/questions/42793/gui-design-techinques-to-enhance-user-experience [3]: http://stackoverflow.com/questions/97913/quick-and-dirty-usability-testing-tips
0
[ 2, 98, 50, 374, 13, 1, 9219, 1, 182, 4091, 12629, 60, 800, 3726, 3726, 182, 4091, 25, 3898, 681, 15, 17, 768, 80, 50, 86, 151, 1985, 30, 21957, 21, 865, 16, 1761, 9, 80, 50, 238, 2346, 27, 7566, 2549, 9990, 30, 50, 88, 182, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 apache_request_headers() diagrees with reality (as confirmed by Firebug): why? === I have written a web app in PHP which makes use of Ajax requests (made using YUI.util.Connect.asyncRequest). Most of the time, this works fine. The request is sent with an **X-Requested-With** value of **XMLHttpRequest**. My PHP controller code uses apache\_request\_headers() to check whether an incoming request is Ajax or not and all works well. But not always. Intermittently, I'm getting a situation where the Ajax request is sent (and Firebug confirms for me that the headers on the request include an X-Requested-With of XMLHttpRequest) but apache\_request\_headers() is not returning that header in its list. The output from when I var\_dump the apache\_request\_headers() is as follows (note the lack of X- 'Host' => string 'peterh.labs.example.com' (length=26) 'User-Agent' => string 'Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.3) Gecko/2008101315 Ubuntu/8.10 (intrepid) Firefox/3.0.3' (length=105) 'Accept' => string 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' (length=63) 'Accept-Language' => string 'en-gb,en;q=0.5' (length=14) 'Accept-Encoding' => string 'gzip,deflate' (length=12) 'Accept-Charset' => string 'ISO-8859-1,utf-8;q=0.7,*;q=0.7' (length=30) 'Keep-Alive' => string '300' (length=3) 'Connection' => string 'keep-alive' (length=10) 'Referer' => string 'http://peterh.labs.example.com/qmail/' (length=40) 'Cookie' => string 'WORKFLOW_SESSION=55f9aff2051746851de453c1f776ad10745354f6' (length=57) 'Pragma' => string 'no-cache' (length=8) 'Cache-Control' => string 'no-cache' (length=8) But Firebug tells me: Request Headers: Host peterh.labs.example.com User-Agent Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.3) Gecko/2008101315 Ubuntu/8.10 (intrepid) Firefox/3.0.3 Accept text/html,application/xhtml+xml,application/xml;q=0.9,**;q=0.8 Accept-Language en-gb,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 300 Connection keep-alive X-Requested-With XMLHttpRequest Referer http://peterh.labs.example.com/qmail/ Cookie WORKFLOW_SESSION=55f9aff2051746851de453c1f776ad10745354f6 This mismatch is (apparently) intermittent when executing the same code. But I don't believe in "intermittent" when it comes to software! Help!
0
[ 2, 13, 26120, 17140, 1, 99, 10351, 1, 1743, 445, 5, 6, 6842, 6879, 160, 29, 2902, 13, 5, 472, 2842, 34, 535, 16254, 6, 45, 483, 60, 800, 3726, 3726, 31, 57, 642, 21, 2741, 4865, 19, 13, 26120, 56, 1364, 275, 16, 20624, 12279, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 are TDD 'Spikes' called 'Spikes? === The test driven development guys call (as far as I can tell) a quick, exploratory, investigation that involves coding something up to see if it works, a 'spike'. Any ideas why they came up with that word?
0
[ 2, 483, 50, 15596, 43, 13, 22, 18, 2159, 7218, 22, 227, 13, 22, 18, 2159, 7218, 60, 800, 3726, 3726, 14, 1289, 5355, 522, 2776, 645, 13, 5, 472, 463, 28, 31, 92, 494, 6, 21, 2231, 15, 13, 6899, 7386, 7496, 15, 3193, 30, 6569...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
WPF: How to apply a GeneralTransform to a Geometry data and return the new geometry? === Having some Geometry data and a Transform how can the transform be applied to the Geometry to get a new Geometry it's data transformed ? Ex: I Have a Path object that has it's Path.Data set to a PathGeometry object, I want to tranform **the points** of the PathGeometry object **in place** using a transform, and not apply a transform to the PathGeometry that will be used at render time. P.S. I know that the Transform class has a method `Point Transform.Transform(Point p)` that can be used to transform a Point but...is there a way to transform a arbitrary geometry at once?
0
[ 2, 619, 7721, 45, 184, 20, 5645, 21, 297, 7028, 4190, 20, 21, 11689, 1054, 17, 788, 14, 78, 11689, 60, 800, 3726, 3726, 452, 109, 11689, 1054, 17, 21, 8007, 184, 92, 14, 8007, 44, 2435, 20, 14, 11689, 20, 164, 21, 78, 11689, 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...
Whether const char * and strdup serve the same function when used with getopt in C? === In the below code snippet can i replace char * to const char * and remove the strdup() function call and directly take the value from getopt()? I am advised to use const char * to skip the strdup function usage. Appreciate the help in advance. /* Code Snippet */ char *dir = NULL; char *bld = NULL; int chr; while ( ( chr = getopt( argc, argv, "d:a:b:f:" ) ) != -1 ) { switch( chr ) { case 'd': //Directory parameter dir = strdup( optarg ); if (dir == NULL) { /*Error*/ } case 'b': //Build parameter bld = strdup( optarg ); if (bld == NULL) { /*Error*/ } } } I really dont understand the need for doing so. Thanks, Liju
0
[ 2, 1472, 11608, 38, 4892, 1637, 17, 354, 897, 576, 1884, 14, 205, 1990, 76, 147, 29, 164, 2594, 38, 19, 272, 60, 800, 3726, 3726, 19, 14, 1021, 1797, 13, 29061, 92, 31, 3934, 4892, 1637, 20, 11608, 38, 4892, 1637, 17, 4681, 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...
PHP Framework Decision - Analysis paralysis! === Ok, sorry for the length of this question in advance! i've spent ages reading about the pros and cons of all the major PHP Frameworks (i.e. Zend, CakePHP, symfony, CodeIgniter etc. etc.). I've also read most of the questions and answers already posted in here about PHP Frameworks....and I STILL can't make up my mind as to which one I should go with. So I thought I'd ask u good peeps for your opinions based on my own background. Ok, i'm pretty new to developing PHP (background in asp.net originally) I've been hacking php since 2000, but never developed anything from scratch. But I'm looking to build a Web 2.0 style app with PHP which will run similar to basecamp using a software as a service model eventually to make money from it. I'm building this on my own as a personal side project outside of my 9-5 so my time is limited to weekends/nights. I'm looking for a framework so I can standardise my development methods and all the other reasons one would want to use a framework and I've narrowed it down to: - Symfony - CakePHP - CodeIgnitor My analysis tells me I've listed the frameworks above by the most complex down to the simplest. CodeIgnitor might get me up and running quickly but doesn't have all the bells and whistles of symfony. symfony will take me longer to learn but ultimately might the be best choice in the long run - not to mention the excellentn askeet tutorial and the fact that yahoo uses it for some of it's newer projects. My problem now is making the decision. All the frameworks above are potential candidates. I'm not under a massive deadline to get this done (only my own expectations to meet!) but I do have limited time. Should I start out with CodeIgnitor or dive straight in at the deepend with symfony and take the extra time to learn a complex framework? Thanks in advance for your responses! Ed
4
[ 2, 13, 26120, 6596, 1401, 13, 8, 2495, 27688, 187, 800, 3726, 3726, 5854, 15, 1875, 26, 14, 1476, 16, 48, 1301, 19, 3612, 187, 31, 22, 195, 1111, 5520, 1876, 88, 14, 895, 18, 17, 11608, 16, 65, 14, 394, 13, 26120, 6596, 18, 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...
Making Thrift calls from a C++ app in Windows === As the title says, I have a Windows app written in C++ from which I need to make calls to remote Thrift services, and I'm a bit lost on the subject, to be honest. http://wiki.apache.org/thrift/ThriftInstallationWin32 states that "The Thrift C++ runtime library does not currently work on Windows". Does that mean I'm shit out of luck, or is there a workaround?
0
[ 2, 544, 13, 96, 9807, 38, 3029, 37, 21, 272, 20512, 4865, 19, 1936, 800, 3726, 3726, 28, 14, 581, 898, 15, 31, 57, 21, 1936, 4865, 642, 19, 272, 20512, 37, 56, 31, 376, 20, 233, 3029, 20, 5388, 13, 96, 9807, 38, 687, 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...
How do I seed the Bug number in Bugzilla? === We'd like to start our bug numbers to something other than 1 for a new Bugzilla installation. Is there a way to do this?
0
[ 2, 184, 107, 31, 5134, 14, 6256, 234, 19, 6256, 380, 3247, 60, 800, 3726, 3726, 95, 22, 43, 101, 20, 799, 318, 6256, 2116, 20, 301, 89, 119, 137, 26, 21, 78, 6256, 380, 3247, 7758, 9, 25, 80, 21, 161, 20, 107, 48, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
What is the statment in c# for this ?! (Mathematical Problem) === I know my quiestion is silly but I'm not good in Math: I'm writing a program: I want to count the consumption of water and electricity and phone calls. I know how i want it but i dont know how to translate it to C# statments 1- I created the method decimal getElect(Unit kw) I want the consumption to be counted as the following:- -----KW-------------------------Price--- The first 100 kw-------------5--------- The second 100 kw-------10-------- The third 100 kw-----------20-------- More than three------------50-------- ---------------------------------- I will explaine more, for example if the total kw=250 the way to count them is the cost of the first 100 = 5*100 the cost of the second 100=10*100 the cost of 50 =50*20 total cost will be = 500+1000+1000=2500 ================================================================================== 2- I created the method decimal getWater(unit m3) I want the consumption to be counted as the following:- -----M3-------------------------Price--- 0 ....100---------------------5--------- 100 ....200-----------------10-------- 200....300------------------20-------- More than that---------------50-------- ---------------------------------- I will explaine more, for example if M3=150 the cost =150*10=1500 =====================================================================================
0
[ 2, 98, 25, 14, 12819, 1130, 19, 272, 5910, 26, 48, 13, 60, 187, 13, 5, 540, 124, 6732, 192, 1448, 6, 800, 3726, 3726, 31, 143, 51, 9153, 160, 3309, 25, 10752, 47, 31, 22, 79, 52, 254, 19, 5057, 45, 31, 22, 79, 1174, 21, 62...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Can I fetch the value of a non-standard CSS property via Javascript? === I am trying to read a custom (non-standard) CSS property, set in a stylesheet (not the inline style attribute) and get its value. Take this CSS for example: #someElement { foo: 'bar'; } I have managed to get its value with the currentStyle property in IE7: var element = document.getElementById('someElement'); var val = element.currentStyle.foo; But currentStyle is MS-specific. So I tried getComputedStyle() in Firefox 3 and Safari 3: var val = getComputedStyle(element,null).foo; ...and it returns undefined. **Does anyone know a cross-browser way of retreiving a custom CSS property value?** *(As you might have noticed, this isn't valid CSS. But it should work as long as the value follows the correct syntax. A better property name would be "-myNameSpace-foo" or something.)*
0
[ 2, 92, 31, 18312, 14, 1923, 16, 21, 538, 8, 15566, 272, 18, 18, 1354, 1197, 8247, 8741, 60, 800, 3726, 3726, 31, 589, 749, 20, 1302, 21, 5816, 13, 5, 3951, 8, 15566, 6, 272, 18, 18, 1354, 15, 309, 19, 21, 1034, 17627, 13, 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...
Windbg help -> how can I read the code at this callstack? === I have a dump of a windows service i made. The exception is that my code can't move a file (for some reason). Now, in my code there's a number of places where i move files around the filesystem. So, using Windbg, i'm trying to see the code where the exception occurs. here's my !clrstack dump.. 0:016> !clrstack -p OS Thread Id: 0xdf8 (16) Child-SP RetAddr Call Site 0000000019edea70 0000064278a15e4f System.IO.__Error.WinIOError(Int32, System.String) PARAMETERS: errorCode = <no data> maybeFullPath = <no data> 0000000019edead0 0000064280181ce5 System.IO.File.Move(System.String, System.String) PARAMETERS: sourceFileName = <no data> destFileName = <no data> 0000000019edeb50 0000064280196532 MyClass.Foo.DoSomeStuffInHere(System.String) PARAMETERS: this = 0x0000000000c30aa8 filePathAndName = 0x0000000000d1aad0 now, this helps a lot... 0:016> !do 0x0000000000d1aad0 Name: System.String MethodTable: 00000642784365e8 EEClass: 000006427803e4f0 Size: 88(0x58) bytes (C:\WINDOWS\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll) String: C:\BlahBlahFolder\FooFolder\4469.jpg Fields: -snipped- So i've figured out the file which failed to be moved. kewl. But i just want to see the code in this method MyClass.Foo.DoSomeStuffInHere(System.String) which calls File.Move(..). That method has lots of File.Move .. so i could put try / catches / debug / trace information .. but i'm hoping to be more efficient by using Windbg to help find this problem. Any thoughts?
0
[ 2, 1511, 19924, 448, 13, 8, 1, 184, 92, 31, 1302, 14, 1797, 35, 48, 645, 25325, 60, 800, 3726, 3726, 31, 57, 21, 11424, 16, 21, 1936, 365, 31, 117, 9, 14, 5391, 25, 30, 51, 1797, 92, 22, 38, 780, 21, 3893, 13, 5, 1106, 109...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
An alternative to alert/confirm/error dialogs? === We all know that alerts are bad. If you didn't know it read [this][1] Alerts are used to communicate with the user. So if we don't use them what is a good alternative? I'd like to get a nice list of good alternatives to choose from when implementing something that requires user communications. I'll give one myself as an example and for everyone to use: **Case:** we need to validate user input before we can proceed. **Solution:** instead of showing an alert box when user clicks ok/next/submit show a clearly styled (eg. red on a white bg) "frame" around/next to the user input that has the invalid input with an informative text on what is wrong. To make it easier on the user the input in question should gain focus and if necessary moved back into view. [1]: http://www.codinghorror.com/blog/archives/000114.html
0
[ 2, 40, 2676, 20, 7863, 118, 1126, 20590, 118, 29992, 28223, 18, 60, 800, 3726, 3726, 95, 65, 143, 30, 7863, 18, 50, 896, 9, 100, 42, 223, 22, 38, 143, 32, 1302, 636, 1565, 500, 2558, 165, 500, 7863, 18, 50, 147, 20, 8709, 29, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Define 'poco'? === Can someone define what exactly 'poco' means? I've encountering the term more and more often and I'm wondering is it only about plain classes or it mean something more?
0
[ 2, 9267, 13, 22, 1638, 716, 22, 60, 800, 3726, 3726, 92, 737, 9267, 98, 1890, 13, 22, 1638, 716, 22, 1108, 60, 31, 22, 195, 7007, 68, 14, 981, 91, 17, 91, 478, 17, 31, 22, 79, 5712, 25, 32, 104, 88, 3748, 2684, 54, 32, 884...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Gridview sorting: SortDirection always Ascending === I have a gridview and I need to sort its elements when the user clicks on the header. Its datasource is a List object. The aspx is defined this way : <asp:GridView ID="grdHeader" AllowSorting="true" AllowPaging="false" AutoGenerateColumns="false" Width="780" runat="server" OnSorting="grdHeader_OnSorting" EnableViewState="true"> <Columns> <asp:BoundField DataField="Entitycode" HeaderText="Entity" SortExpression="Entitycode" /> <asp:BoundField DataField="Statusname" HeaderText="Status" SortExpression="Statusname" /> <asp:BoundField DataField="Username" HeaderText="User" SortExpression="Username" /> </Columns> </asp:GridView> The code behind is defined this way : First load : protected void btnSearch_Click(object sender, EventArgs e) { List<V_ReportPeriodStatusEntity> items = GetPeriodStatusesForScreenSelection(); this.grdHeader.DataSource = items; this.grdHeader.DataBind(); } when the user clicks on headers : protected void grdHeader_OnSorting(object sender, GridViewSortEventArgs e) { List<V_ReportPeriodStatusEntity> items = GetPeriodStatusesForScreenSelection(); items.Sort(new Helpers.GenericComparer<V_ReportPeriodStatusEntity>(e.SortExpression, e.SortDirection)); grdHeader.DataSource = items; grdHeader.DataBind(); } My problem is that e.SortDirection is always set to Ascending. I have webpage with a similar code and it works well, e.SortDirection alternates between Ascending and Descending. What did I do wrong ?
0
[ 2, 7354, 4725, 2058, 68, 45, 2058, 14706, 872, 550, 24859, 800, 3726, 3726, 31, 57, 21, 7354, 4725, 17, 31, 376, 20, 2058, 82, 2065, 76, 14, 4155, 10840, 18, 27, 14, 157, 106, 9, 82, 1054, 12097, 25, 21, 968, 3095, 9, 14, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I add post-install scripts to easy_install / setuptools / distutils? === I would like to be able to add a hook to my setup.py that will be run post-install (either when easy_install'ing or when doing python setup.py install). In my project, [PySmell](http://code.google.com/p/pysmell), I have some support files for Vim and Emacs. When a user installs PySmell the usual way, these files get copied in the actual egg, and the user has to fish them out and place them in his .vim or .emacs directories. What I want is either asking the user, post-installation, where would he like these files copied, or even just a message printing the location of the files and what should he do with them. What is the best way to do this? Thanks My setup.py looks like so: #!/usr/bin/env python # -*- coding: UTF-8 -*- from setuptools import setup version = __import__('pysmell.pysmell').pysmell.__version__ setup( name='pysmell', version = version, description = 'An autocompletion library for Python', author = 'Orestis Markou', author_email = 'orestis@orestis.gr', packages = ['pysmell'], entry_points = { 'console_scripts': [ 'pysmell = pysmell.pysmell:main' ] }, data_files = [ ('vim', ['pysmell.vim']), ('emacs', ['pysmell.el']), ], include_package_data = True, keywords = 'vim autocomplete', url = 'http://code.google.com/p/pysmell', long_description = """\ PySmell is a python IDE completion helper. It tries to statically analyze Python source code, without executing it, and generates information about a project's structure that IDE tools can use. The first target is Vim, because that's what I'm using and because its completion mechanism is very straightforward, but it's not limited to it. """, classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development', 'Topic :: Utilities', 'Topic :: Text Editors', ] )
0
[ 2, 184, 92, 31, 3547, 678, 8, 108, 21300, 17505, 20, 2010, 1, 108, 21300, 13, 118, 18161, 20799, 18, 13, 118, 1460, 38, 14255, 18, 60, 800, 3726, 3726, 31, 83, 101, 20, 44, 777, 20, 3547, 21, 5559, 20, 51, 18161, 9, 6448, 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...
UI diagram layout === Wanted to generate a UI diagram (with nice layout) depicting relationships amongst network components. Which is the best Java based API to do such layouts with minimum fuss and light codebase.
0
[ 2, 13, 5661, 14161, 9106, 800, 3726, 3726, 417, 20, 7920, 21, 13, 5661, 14161, 13, 5, 1410, 2210, 9106, 6, 11235, 5833, 4667, 982, 5090, 9, 56, 25, 14, 246, 8247, 432, 21, 2159, 20, 107, 145, 9106, 18, 29, 5187, 20053, 17, 471, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Best programming methodology for very fast timeline and little requirements? === What is a good programming methodology for custom applications that need to be coded very fast and very customized? I realize the lack of requirements is a problem no matter what. Also how do you convince management to change their practices? Next question is how to you get people to stop writing 5000 line single file programs?
0
[ 2, 246, 3143, 18653, 26, 253, 1512, 18398, 17, 265, 4786, 60, 800, 3726, 3726, 98, 25, 21, 254, 3143, 18653, 26, 5816, 3767, 30, 376, 20, 44, 13, 22254, 253, 1512, 17, 253, 28779, 60, 31, 4007, 14, 1792, 16, 4786, 25, 21, 1448, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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: Warning on changed data closing windows === I'd like to warn users when they **try to close a browser window** if they **didn't save** the changes they made in the web form. I'm using ASP.NET 3.5 (with ASP.NET Ajax). Is there a common solution which I could easily implement?
0
[ 2, 28, 306, 9, 2328, 45, 3590, 27, 1015, 1054, 4239, 1936, 800, 3726, 3726, 31, 22, 43, 101, 20, 9296, 3878, 76, 59, 13, 1409, 5840, 20, 543, 21, 16495, 1463, 1409, 100, 59, 13, 1409, 18771, 22, 38, 2079, 1409, 14, 1693, 59, 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...
Flex - Remoting vs HTTPService - when to use what? === I have been using Flex for a while and have not used remoting as of yet. Currently my apps use a webservice that generates xml that I use for databinding. What would be the benefit to using remoting over an xml webservice in this use case? Is there a general guideline when I should choose remoting over webservices? Why would I want to use remoting? I have downloaded http://www.fluorinefx.com/, but have yet to do any real tinkering... Thanks.
0
[ 2, 14409, 13, 8, 302, 7662, 68, 4611, 7775, 11449, 13, 8, 76, 20, 275, 98, 60, 800, 3726, 3726, 31, 57, 74, 568, 14409, 26, 21, 133, 17, 57, 52, 147, 302, 7662, 68, 28, 16, 768, 9, 871, 51, 4865, 18, 275, 21, 2741, 11449, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 meant by the term "true" object orientation === I have been hearing a lot about Ruby and possibly even Javascript being "true" object oriented langauages as opposed to C++ and C# which are class oriented (or template based) languages. What is meant by true OO and what are the advantages of this over the class/template approach?
0
[ 2, 98, 25, 1380, 34, 14, 981, 13, 7, 13398, 7, 3095, 10245, 800, 3726, 3726, 31, 57, 74, 3229, 21, 865, 88, 10811, 17, 2879, 166, 8247, 8741, 142, 13, 7, 13398, 7, 3095, 13, 6800, 4544, 1346, 14465, 28, 3499, 20, 272, 20512, 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...
Web developers - Is it better to test on your local machine or on a remote host? === What are the pro/cons of doing web development on your local machine rather than on a centralized development server? For those that do dev on your local machine, how do you keep an updated db architecture for local development when multiple developers are involved? In particular, I'm currently experimenting with XAMPP for PHP and was curious how I keep the MySQL DB instance on my local machine in sync when other developers are regularly changing data/db structure. Is local development only practical when working alone?
0
[ 2, 2741, 10168, 13, 8, 25, 32, 574, 20, 1289, 27, 154, 375, 1940, 54, 27, 21, 5388, 2015, 60, 800, 3726, 3726, 98, 50, 14, 895, 118, 12124, 16, 845, 2741, 522, 27, 154, 375, 1940, 864, 119, 27, 21, 25176, 522, 8128, 60, 26, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 with SQLite (linqtosql) === I have a small project that require a storage (I choose SQLite) and I got good result with the [ADO DLL for .Net for Sqlite][1]. After the Install, I noticed that it contain a SQLLinq.dll. Before investigating too much effort, and because I haven't see any good example on the web, I would like to know if anyone got any good result with SQLite and LINQ? *If linqtosql work the same way what ever the SQL database, let me know it. I was interesting with the Dll when I saw it because I never use Linqtosql before and I thought it would be a great opportunity to try, [1]: http://sqlite.phxsoftware.com/
0
[ 2, 6294, 1251, 29, 4444, 10601, 13, 5, 1226, 1251, 262, 18, 22402, 6, 800, 3726, 3726, 31, 57, 21, 284, 669, 30, 4077, 21, 4326, 13, 5, 49, 3538, 4444, 10601, 6, 17, 31, 330, 254, 829, 29, 14, 636, 5672, 13, 43, 211, 26, 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...
How to check a date in classic asp === I have a variable **last_login** and want to output a message if the last login was *yesterday*, *today* or elsewise output the date. The last two cases are clear but how can I check if a given date in classic asp was **yesterday**? I'm blockheaded right now...
0
[ 2, 184, 20, 2631, 21, 1231, 19, 2732, 28, 306, 800, 3726, 3726, 31, 57, 21, 7612, 13, 1409, 8558, 1, 5567, 108, 1409, 17, 259, 20, 5196, 21, 2802, 100, 14, 236, 6738, 108, 23, 1637, 93, 6930, 1185, 2483, 15, 1637, 15260, 2483, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 check if a file exist in a makefile === I have a makefile template to compile a single DLL (for a plugin system). The makefile of the user looks like this: EXTRA_SRCS=file1 file2 include makefile.in In the `makefile.in` I have: plugin.dll: plugin.os $(patsubst %,%.os,$(EXTRA_SRCS)) Where `plugin.os` is the main C++ file to be compiled. Btw, the files ending is `.os` are the object files compiled for shared library (i.e. using the `-fpic` option with `gcc`) Now, the problem is that the extra sources will probably(but not necessarily) header files. Ideally I would like to add them as dependencies for the target `plugin.os` and the `file.cpp`, but only if they exist. The method should work for both windows and linux, or at least be adaptable to each. However, I only use the GNU version of make.
0
[ 2, 184, 20, 2631, 100, 21, 3893, 3182, 19, 21, 233, 16877, 800, 3726, 3726, 31, 57, 21, 233, 16877, 22894, 20, 26561, 21, 345, 13, 43, 211, 13, 5, 1106, 21, 10922, 108, 329, 6, 9, 14, 233, 16877, 16, 14, 4155, 1879, 101, 48, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 read arbitrary number of bytes using std::copy? === I'm trying to code opposite action to this: std::ostream outs; // properly initialized of course std::set<int> my_set; // ditto outs << my_set.size(); std::copy( my_set.begin(), my_set.end(), std::ostream_iterator<int>( outs ) ); it should be something like this: std::istream ins; std::set<int>::size_type size; ins >> size; std::copy( std::istream_iterator<int>( ins ), std::istream_iterator<int>( ins ) ???, std::inserter( my_set, my_set.end() ) ); But I'm stuck with the 'end' iterator -- input interators can't use std::advance and neither I can use two streams with the same source... Is there any elegant way how to solve this? Of course I can use for loop, but maybe there's something nicer :)
0
[ 2, 184, 20, 1302, 17237, 234, 16, 34, 3231, 568, 354, 43, 45, 45, 19625, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 1797, 2794, 1028, 20, 48, 45, 354, 43, 45, 45, 111, 11260, 70, 18, 73, 12894, 7428, 2104, 1333, 16, 674, 354, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
partition full, or not? === my partition /tmp is full... and its empty at the same time. So the partition is full. Check the directory: <pre> # du -sh /tmp 28K /tmp </pre> What? It is empty... And it is really empty... just two empty directories are located in /tmp Checking partition details: <pre> # du -h Filesystem Size Used Avail Use% Mounted on /dev/cciss/c0d0p9 1012M 961M 0 100% /tmp </pre> It is full! But why is used + available != size? Checking Inodes: <pre> # du -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/cciss/c0d0p9 131616 17 131599 1% /tmp </pre> So what happens here?
0
[ 2, 10711, 503, 15, 54, 52, 60, 800, 3726, 3726, 51, 10711, 13, 118, 38, 2554, 25, 503, 9, 9, 9, 17, 82, 2424, 35, 14, 205, 85, 9, 86, 14, 10711, 25, 503, 9, 2631, 14, 16755, 45, 13, 1, 3515, 1, 6926, 1052, 13, 8, 1635, 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...
What is the best platform to document standard and best practice? === I'm in the process of exploring our next development platform. So far, I have chose asp.net MVC with MS SQL Server for persistence. I want to document the best practice and standard that my team will use. In the process, I want to read about each aspect, make some prototypes and summarize my conclusion. Even after my initial conclusion, I am open to change it if somebody can demonstrate a better way to do it. Because I like to have some feedback from the community, I think it will be fair to let the result public for future referencing. Some of the aspect I want to cover: - layer separation - each layer role - naming convention - Data access - Internationalization - Exception handling - Unit test - etc. What is the best online platform to do it?
4
[ 2, 98, 25, 14, 246, 2452, 20, 4492, 1236, 17, 246, 1345, 60, 800, 3726, 3726, 31, 22, 79, 19, 14, 953, 16, 11748, 318, 328, 522, 2452, 9, 86, 463, 15, 31, 57, 3305, 28, 306, 9, 2328, 307, 8990, 29, 4235, 4444, 255, 8128, 26,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Server Management Studio 2008 Intellisense === I just installed SQL Server Express 2008 because of intellisense feature. It worked at first but than it stopped working. Looking for the option to check and later consulting Google I have found that it looks like **Microsoft disabled intellisense if you connect to SQL Server 2005 databases.** Is this absolutely correct ?<br/> Is there any solution for this (some registry "switch") ?
0
[ 2, 4444, 255, 8128, 1097, 1120, 570, 14635, 3159, 6498, 800, 3726, 3726, 31, 114, 4066, 4444, 255, 8128, 2999, 570, 185, 16, 14635, 3159, 6498, 1580, 9, 32, 577, 35, 64, 47, 119, 32, 1175, 638, 9, 699, 26, 14, 4255, 20, 2631, 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...
Refactoring static method / static field for Testing === I have the following legacy code: public class MyLegacyClass { private static final String jndiName = "java:comp/env/jdbc/LegacyDataSource" public static SomeLegacyClass doSomeLegacyStuff(SomeOtherLegacyClass legacyObj) { // do stuff using jndiName } } This class is working in a J2EE-Container. Now I would like to test the class outside of the container. What is the best strategy? Refactoring is basically allowed. Accessing the LegacyDataSource is allowed (the test does not have to be a "pure" unit-test).
0
[ 2, 302, 17455, 68, 12038, 2109, 13, 118, 12038, 575, 26, 4431, 800, 3726, 3726, 31, 57, 14, 249, 7780, 1797, 45, 317, 718, 51, 6727, 12852, 1898, 13, 1, 932, 12038, 426, 3724, 487, 9805, 7259, 800, 13, 7, 1004, 1385, 45, 11103, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Lua as a general-purpose scripting language? === When I see Lua, the only thing I ever read is "great for embedding", "fast", "lightweight" and more often than anything else: "World of Warcraft" or in short "WoW". Why is it limited to embedding the whole thing into another application? Why not write general-purpose scripts like you do with Python or Perl? Lua seems to be doing great in aspects like speed and memory-usage (The fastest scripting language afaik) so why is it that I never see Lua being used as a "Desktop scripting-language" to automate task? For example: - Renaming a bunch of files - Download some files from the web - Webscraping Is it the lack of the standard library?
0
[ 2, 1612, 58, 28, 21, 297, 8, 12060, 3884, 68, 816, 60, 800, 3726, 3726, 76, 31, 196, 1612, 58, 15, 14, 104, 584, 31, 462, 1302, 25, 13, 7, 6894, 26, 11911, 69, 3258, 7, 15, 13, 7, 13088, 7, 15, 13, 7, 3130, 8696, 7, 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...
CrmImpersonator and IFD === I have an asp.net page which works fine for internal calls to the services, however when used on an externally facing site I just cannot get it to function at all. The CRMImpersonator works ok when accessed internally but when using the IFD interface all I get is a message saying 'Microsoft.Crm.WebServices.Crm2007.CookieAndSoapHeaderAuthenticationProvider, Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' doesn't exist. Parameter name: Microsoft.Crm.WebServices.Crm2007.CookieAndSoapHeaderAuthenticationProvider, Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: 'Microsoft.Crm.WebServices.Crm2007.CookieAndSoapHeaderAuthenticationProvider, Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' doesn't exist. Parameter name: Microsoft.Crm.WebServices.Crm2007.CookieAndSoapHeaderAuthenticationProvider, Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Any ideas would be greatly appreciated my code is as below public string orgname; public string crmurl; public string metaurl; public bool offline; protected void Page_Load(object sender, EventArgs e) { #region CRM URLs and Organization Name //Determine Offline State from Host Name if (Request.Url.Host.ToString() == "127.0.0.1") { #region offline offline = true; //Retrieve the Port and OrgName from the Registry //RegistryKey regkey = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\MSCRMClient"); //orgname = regkey.GetValue("ClientAuthOrganizationName").ToString(); string portnumber = regkey.GetValue("CassiniPort").ToString(); //Construct the URLs string baseurl = "http://localhost:" + portnumber + "/mscrmservices/2007/"; crmurl = baseurl + "crmservice.asmx"; metaurl = baseurl + "metadataservice.asmx"; #endregion } else { offline = false; //Retrieve the URLs from the Registry //RegistryKey regkey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\MSCRM"); //string ServerUrl = regkey.GetValue("ServerUrl").ToString(); string ServerUrl = "http://192.168.1.152:5555/MSCRMServices"; crmurl = ServerUrl + "/2007/crmservice.asmx"; metaurl = ServerUrl + "/2007/metadataservice.asmx"; Response.Write("ServerURL " + ServerUrl + "<br>"); Response.Write("CRMURL: " + crmurl + "<br>"); Response.Write("MetaURL: " + metaurl + "<br>"); //Retrieve the Query String from the current URL if (Request.QueryString["orgname"] == null) { orgname = string.Empty; } else { //Query String string orgquerystring = Request.QueryString["orgname"].ToString(); if (string.IsNullOrEmpty(orgquerystring)) { orgname = string.Empty; } else { orgname = orgquerystring; } } if (string.IsNullOrEmpty(orgname)) { //Windows Auth URL if (Request.Url.Segments[2].TrimEnd('/').ToLower() == "isv") { orgname = Request.Url.Segments[1].TrimEnd('/').ToLower(); } //IFD URL if (string.IsNullOrEmpty(orgname)) { string url = Request.Url.ToString().ToLower(); int start = url.IndexOf("://") + 3; orgname = url.Substring(start, url.IndexOf(".") - start); } } Response.Write(orgname + "<br>"); } #endregion }
0
[ 2, 6186, 79, 12579, 528, 3457, 17, 100, 43, 800, 3726, 3726, 31, 57, 40, 28, 306, 9, 2328, 2478, 56, 693, 1123, 26, 3117, 3029, 20, 14, 687, 15, 207, 76, 147, 27, 40, 4886, 102, 4325, 689, 31, 114, 1967, 164, 32, 20, 1990, 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...
Should members of an object be automatically set in the class? === When you have a complex property, should you instantiate it or leave it to the user to instantiate it? For example (C#) A) class Xyz{ List<String> Names {get; set;} } When I try to use, I have to set it. ... Xyz xyz = new Xyz(); xyz.Name = new List<String>(); xyz.Name.Add("foo"); ... Where as if I modify the code B) class Xyz{ public Xyz(){ Names = new List<String>(); } List<String> Names {get; } } which in this case, I can make the List read-only. Another scenario might arise, I suppose where you would intentionally not want to set it. For example in C) class Xyz{ String Name {get; set;} } I would thing it bad practice to initialize. Are there some rules of thumb for such scenarios?
0
[ 2, 378, 443, 16, 40, 3095, 44, 7499, 309, 19, 14, 718, 60, 800, 3726, 3726, 76, 42, 57, 21, 1502, 1354, 15, 378, 42, 6322, 15882, 32, 54, 767, 32, 20, 14, 4155, 20, 6322, 15882, 32, 60, 26, 823, 13, 5, 150, 5910, 6, 21, 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...
NoClassDefFoundError while trying to run my jar with java.exe -jar...what's wrong? === I have an application that I'm trying to wrap into a jar for easier deployment. The application compiles and runs fine (in a Windows cmd window) when run as a set of classes reachable from the CLASSPATH. But when I jar up my classes and try to run it with java 1.6 in the same cmd window, I start getting exceptions: C:\dev\myapp\src\common\datagen>C:/apps/jdk1.6.0_07/bin/java.exe -classpath C:\myapp\libs\commons -logging-1.1.jar -server -jar DataGen.jar Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at com.harris.myapp.fomc.common.datagen.DataGenerationTest.<clinit>(Unknown Source) Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory 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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) ... 1 more The funny thing is, the offending LogFactory seems to be in commons-logging-1.1.jar, which is in the class path specified. The jar file (yep, it's really there): C:\dev\myapp\src\common\datagen>dir C:\myapp\libs\commons-logging-1.1.jar Volume in drive C is Local Disk Volume Serial Number is ECCD-A6A7 Directory of C:\myapp\libs 12/11/2007 11:46 AM 52,915 commons-logging-1.1.jar 1 File(s) 52,915 bytes 0 Dir(s) 10,956,947,456 bytes free The contents of the commons-logging-1.1.jar file: C:\dev\myapp\src\common\datagen>jar -tf C:\myapp\libs\commons-logging-1.1.jar META-INF/ META-INF/MANIFEST.MF org/ org/apache/ org/apache/commons/ org/apache/commons/logging/ org/apache/commons/logging/impl/ META-INF/LICENSE.txt META-INF/NOTICE.txt org/apache/commons/logging/Log.class org/apache/commons/logging/LogConfigurationException.class org/apache/commons/logging/LogFactory$1.class org/apache/commons/logging/LogFactory$2.class org/apache/commons/logging/LogFactory$3.class org/apache/commons/logging/LogFactory$4.class org/apache/commons/logging/LogFactory$5.class org/apache/commons/logging/LogFactory.class ... (more classes in commons-logging-1.1 ...) Yep, commons-logging has the LogFactory class. And finally, the contents of my jar's manifest: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.6.5 Created-By: 10.0-b23 (Sun Microsystems Inc.) Main-Class: com.harris.myapp.fomc.common.datagen.DataGenerationTest Class-Path: commons-logging-1.1.jar commons-lang.jar antlr.jar toplink .jar GroboTestingJUnit-1.2.1-core.jar junit.jar This has stumped me, and any coworkers I've bugged for more than a day now. Just to cull the answers, for now at least, third party solutions to this are probably out due to licensing restrictions and company policies (e.g.: tools for creating exe's or packaging up jars). The ultimate goal is to create a jar that can be copied from my development Windows box to a Linux server (with any dependent jars) and used to populate a database (so classpaths may wind up being different between development and deployment environments). Any clues to this mystery would be greatly appreciated!
0
[ 2, 90, 1898, 13862, 12235, 29992, 133, 749, 20, 485, 51, 5112, 29, 8247, 9, 1706, 62, 13, 8, 6300, 9, 9, 9, 608, 22, 18, 1389, 60, 800, 3726, 3726, 31, 57, 40, 3010, 30, 31, 22, 79, 749, 20, 8118, 77, 21, 5112, 26, 4950, 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...
Source control/management of implementation of an existing open source project. === I'm currently installing and configuring an open source project on a test server. I've been well trained to use source control, and I want to make sure everything I do is managed properly (both for me, the sole dev/admin, and for future maintaners). The open source project is available as a source download or by svn checkout. I want to have my own source controlled version of the project. I don't intend to be changing the (java servlet) code much (if at all), but there are configurations, XML files, XSL, CSS, etc. all involved that I definitely want to be source controlled. Should I go ahead and just make my own local repository of all of the source code? Should I try to only control the files that I need to change? In that case I would want the directory structure to match, so I could do checkouts directly to the build directories.
0
[ 2, 1267, 569, 118, 23502, 16, 6123, 16, 40, 3149, 368, 1267, 669, 9, 800, 3726, 3726, 31, 22, 79, 871, 25429, 17, 1065, 13549, 68, 40, 368, 1267, 669, 27, 21, 1289, 8128, 9, 31, 22, 195, 74, 134, 3416, 20, 275, 1267, 569, 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...
Integer math in c# === I have a menu of product brands that I want to split over 4 columns. So if I have 39 brands, then I want the maximum item count for each column to be 10 (with a single gap in the last column. Here's how I'm calculating the item count for a column (using C#): int ItemCount = Convert.ToInt32(Math.Ceiling(Convert.ToDecimal(BrandCount) / 4m)); All that conversion seems really ugly to me. Is there a better way to do math on integers in C#?
0
[ 2, 13820, 5057, 19, 272, 5910, 800, 3726, 3726, 31, 57, 21, 11379, 16, 2374, 10086, 30, 31, 259, 20, 2132, 84, 268, 7498, 9, 86, 100, 31, 57, 4890, 10086, 15, 94, 31, 259, 14, 2979, 9101, 2468, 26, 206, 4698, 20, 44, 332, 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...
Dealing with param values === I am attempting to compose a style sheet that, given an XML input (obviously) and a parameter that specifies a "target", will produce a list of commands that match that target. Here is the style sheet as written: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:param name="target" select="cora_cmd"/> <xsl:output method="xml" indent="yes"/> <xsl:template match="command/program"> <xsl:if test="@name=$target"> <xsl:message terminate="no">found match <xsl:value-of select="$target"/> </xsl:message> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"> <xsl:attribute name="href"><xsl:value-of select="../@help"/></xsl:attribute> </xi:include> </xsl:if> </xsl:template> </xsl:stylesheet> I am invoking xsltproc to execute this style sheet as follows: xsltproc --param target cora_cmd gen-commands.xsl commands.xml The problem that I am encountering is that the parameter value for target does not seem to get set. At least the name that comes from the message appears to be an empty string and the test for xsl:if always fails. I am certain that this is due to some bone-headed mistake on my part but I've yet to recognise it. Does anybody know what I've done wrong?
0
[ 2, 5746, 29, 2258, 79, 4070, 800, 3726, 3726, 31, 589, 6314, 20, 18217, 21, 1034, 6125, 30, 15, 504, 40, 23504, 6367, 13, 5, 4995, 710, 18190, 6, 17, 21, 18906, 30, 27669, 21, 13, 7, 3958, 3060, 7, 15, 129, 2213, 21, 968, 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...
How can I optimize this Google App Engine code? === I'm relatively new to the python world, but this seems very straight forward. Google is yelling at me that this code needs to be optimized: class AddLinks(webapp.RequestHandler): def post(self): # Hash the textarea input to generate pseudo-unique value hash = md5.new(self.request.get('links')).hexdigest() # Seperate the input by line allLinks = self.request.get('links').splitlines() # For each line in the input, add to the database for x in allLinks: newGroup = LinkGrouping() newGroup.reference = hash newGroup.link = x newGroup.put() # testing vs live #baseURL = 'http://localhost:8080' baseURL = 'http://linkabyss.appspot.com' # Build template parameters template_values = { 'all_links': allLinks, 'base_url': baseURL, 'reference': hash, } # Output the template path = os.path.join(os.path.dirname(__file__), 'addLinks.html') self.response.out.write(template.render(path, template_values)) The dashboard is telling me that this is using a ton of CPU. Where should I look for improvements?
0
[ 2, 184, 92, 31, 22864, 48, 8144, 4865, 1406, 1797, 60, 800, 3726, 3726, 31, 22, 79, 3109, 78, 20, 14, 20059, 126, 15, 47, 48, 2206, 253, 1599, 917, 9, 8144, 25, 14169, 35, 55, 30, 48, 1797, 2274, 20, 44, 22864, 43, 45, 718, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
VBA how to check for LAN environment and Cancel check === I am updating a VBA program (excel). At startup the program checks if it can find a directory which is on the office fileserver using: FileSystemObject.FolderExists("\\servername\path") If this is not found the program switches to offline mode and saves its output to the local hard disk (for later transfer), instead of directly to the fileserver. This works OK, It's very quick if the computer can reach the path, however it can sometimes take a while (up to one minute) for the call to FolderExists to complete/time-out, especially if there is a network connection open but the required path does not exist (i.e. we are connected to some other LAN). My Question(s): 1. is there a quicker/better way to check for the existence of a network path using VBA? 2. is there a way to have the user cancel the search done by FolderExists() when (s)he knows it cannot succeed because they're not in the office. I.e. is there some way to prematurely exit FolderExists() (or any other function call for that matter) I want the solution to have as little user input as possible, which is why the check is done automatically, rather than just asking the user if (s)he's in the office or not in the first place.
0
[ 2, 566, 969, 184, 20, 2631, 26, 6178, 2307, 17, 14815, 2631, 800, 3726, 3726, 31, 589, 71, 43, 1880, 21, 566, 969, 625, 13, 5, 1706, 11040, 6, 9, 35, 20205, 14, 625, 16602, 100, 32, 92, 477, 21, 16755, 56, 25, 27, 14, 488, 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...
Popup detection before user logs in === Is there a good way to determine if a person has a popup blocker enabled? I need to maintain a web application that unfortunately has tons of popups throughout it and I need to check if the user has popup blockers enabled. The only way I've found to do this is to open a window from javascript, check to see if it's open to determine if a blocker is enabled and then close it right away. This is slightly annoying since users who do not have it enabled see a small flash on the screen as the window opens and closes right away. Are there any other non-obtrusive methods for accomplishing this?
0
[ 2, 1675, 576, 11643, 115, 4155, 18893, 19, 800, 3726, 3726, 25, 80, 21, 254, 161, 20, 3746, 100, 21, 840, 63, 21, 1675, 576, 1921, 106, 9338, 60, 31, 376, 20, 4027, 21, 2741, 3010, 30, 6200, 63, 5278, 16, 1675, 15699, 892, 32, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Are there any good professional associations for IT Managers/Programmers? === Are there any good professional associations for IT Managers that I could join and network with other managers to share ideas and information?
0
[ 2, 50, 80, 186, 254, 736, 10642, 26, 32, 12657, 118, 19746, 12271, 60, 800, 3726, 3726, 50, 80, 186, 254, 736, 10642, 26, 32, 12657, 30, 31, 110, 1865, 17, 982, 29, 89, 12657, 20, 1891, 3478, 17, 676, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
How to get function to fire when buttonless form is submitted === I have a page with many forms on it. could be 1..200. None of these forms have buttons and they are built programatically. I am using jquery to submit all the forms that are checked. function FakeName() { $("input:checked").parent("form").submit(); } My forms look like: <form name="FakeForm<%=i%>" action="javascript:void%200" onSubmit="processRow(<%=i%>)" method="post" style="margin:0px;"> <input type="checkbox" name="FakeNameCheck" value="FakeNameCheck"/> <input type="hidden" name="FakeNum" value="<%= FakeNum%>"/> <input type="hidden" name="FakeId" value="<%=FakeIdr%>"/> <input type="hidden" name="FakeAmt" value="<%=FakeAmount%>"/> <input type="hidden" name="FakeTrans" value="FakeTrans"/> </form> Note: action is set to "javascript:void%200" so that it posts to a fake page. I want to handle my own posting in processRow. OnSubmit never gets called and therefore ProcessRow never gets called. Obviously all the names of the functions and variables have been changed to protect their identity :D How can I get a function in each form to fire when I call submit programmatically.
0
[ 2, 184, 20, 164, 1990, 20, 535, 76, 5167, 923, 505, 25, 7368, 800, 3726, 3726, 31, 57, 21, 2478, 29, 151, 1997, 27, 32, 9, 110, 44, 137, 9, 9, 4621, 9, 2369, 16, 158, 1997, 57, 12861, 17, 59, 50, 392, 625, 721, 8438, 9, 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...
PEAR mail - escaping hotmails junk folder === I have been trying to get PEAR mail to successfully deliver emails to hotmail users without being flagged as SPAM and ending up in the junk folder, i have no problems with yahoo/gmail only with hotmail. google suggested that this was a common problem with hotmail and that possible causes can include - incorrect reverse DNS for main IP of the server - lack of SenderId/SPF records - being blacklisted having checked all of the above i can only think of one other reason - incorrectly formatted headers ? to test this theory i set up outlook to send email via the same address that PEAR mail uses and sent a quick test - it delivered straight to my inbox so i compared the headers from the email sent from PEAR mail against the headers sent by Outlook and there are only a few differences - i have only listed the differences to save space (and peoples eyes) PEAR mail headers (not in outlook headers) X-PHP-Script: www.example.com/register.php for [users ip address] Outlook headers (not in PEAR mail headers) X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ack6CWSQlgV8s6+6SWyifka2NNpB7g== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 the only other differences that i can see are - the order of the From: and To: headers are reversed - and in the Received: section of the headers Outlook Received: from myhomehostname.com ([ip address] helo=simber) by mywebhostname.com with local (Exim 4.67) PEAR mail Received: from apache by mywebhostname.com with local (Exim 4.67) could these small differences in the headers be the cause or am i looking in the wrong place ? i knew this might be problematic hence why i chose to use the PEAR mail class rather than rolling my own but now i really have no idea where to go with this, any help would be greatly appreciated.
0
[ 2, 16619, 4216, 13, 8, 14700, 1047, 8079, 18, 12096, 19294, 800, 3726, 3726, 31, 57, 74, 749, 20, 164, 16619, 4216, 20, 3673, 5879, 8517, 18, 20, 1047, 8079, 3878, 366, 142, 13, 29694, 28, 6954, 79, 17, 3119, 71, 19, 14, 12096, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Collapsing a git repository's history === We have a git project which has quite a big history. Specifically, early in the project there were quite a lot of binary resource files in the project, these have now been removed as they're effectively external resources. However, the size of our repository is >200MB (the total checkout is currently ~20MB) due to having these files previously committed. What we'd like to do is "collapse" the history so that the repository appears to have been created from a later revision than it was. For example 1-----2-----3-----4-----+---+---+ \ / +-----+---+---+ 1. Repository created 2. Large set of binary files added 3. Large set of binary files removed 4. New intended 'start' of repository So effectively we want to lose the project history before a certain point. At this point there is only one branch, so there's no complication with trying to deal with multiple start points etc. However we don't want to lose all of the history and start a new repository with the current version. Is this possible, or are we doomed to have a bloated repository forever?
0
[ 2, 24898, 21, 13, 10404, 24869, 22, 18, 447, 800, 3726, 3726, 95, 57, 21, 13, 10404, 669, 56, 63, 1450, 21, 580, 447, 9, 3524, 15, 274, 19, 14, 669, 80, 46, 1450, 21, 865, 16, 14171, 6577, 6488, 19, 14, 669, 15, 158, 57, 130...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
C# 2.0 Threading Question (anonymous methods) === I have a simple application with the following code: FileInfo[] files = (new DirectoryInfo(initialDirectory)).GetFiles(); List<Thread> threads = new List<Thread>(files.Length); foreach (FileInfo f in files) { Thread t = new Thread(delegate() { Console.WriteLine(f.FullName); }); threads.Add(t); } foreach (Thread t in threads) t.Start(); Lets say in 'initialDirectory' directory I have 3 files. This application should then create 3 threads, with each thread printing off one of the file names; however, instead each thread will print off the name of the last file in the 'files' array. Why is this? Why is the current file 'f' variable not getting setup in the anonymous method correctly?
0
[ 2, 272, 5910, 172, 9, 387, 9322, 68, 1301, 13, 5, 210, 14016, 1291, 3195, 6, 800, 3726, 3726, 31, 57, 21, 1935, 3010, 29, 14, 249, 1797, 45, 3893, 108, 4120, 2558, 500, 6488, 800, 13, 5, 2681, 16755, 108, 4120, 5, 27313, 10197, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
.NET base type cannot be serialized by WCF === I'm writing a WCF service and want to expose some custom configuration elements (e.g. Custom ConfigurationSection and ConnectionStringSettings) so that I can modify the service's configuration. One of my custom configuration elements inherits from System.Configuration.ConfigurationElementCollection. When I try to start my WCF service I get the following error message... Type 'System.Configuration.ConfigurationElementCollection' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. See the Microsoft .NET Framework documentation for other supported types. Is there a way to implement the DataContract for this Type? I have my inherited class marked with the [DataContract] attribute. Please help. David
0
[ 2, 13, 9, 2328, 1000, 1001, 1967, 44, 27877, 34, 11801, 410, 800, 3726, 3726, 31, 22, 79, 1174, 21, 11801, 410, 365, 17, 259, 20, 13833, 109, 5816, 8091, 2065, 13, 5, 62, 9, 263, 9, 5816, 8091, 10579, 17, 2760, 11130, 19831, 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...
JavaScript switch statement === I have problem in some JavaScript that I am writing where the Switch statement does not seem to be working as expected. switch (msg.ResultType) { case 0: $('#txtConsole').val("Some Val 0"); break; case 1: $('#txtConsole').val("Some Val 1"); break; case 2: $('#txtConsole').text("Some Val 2"); break; } The ResultType is an integer value 0-2 and I can see that in FireBug. In all cases, the switch transfers control to the final break statement which means all the logic is completely skipped. What am I missing?
0
[ 2, 8247, 8741, 5521, 3331, 800, 3726, 3726, 31, 57, 1448, 19, 109, 8247, 8741, 30, 31, 589, 1174, 113, 14, 5521, 3331, 630, 52, 2260, 20, 44, 638, 28, 1727, 9, 5521, 13, 5, 79, 18, 263, 9, 29955, 4474, 6, 13, 1, 610, 713, 45...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Python Regex Use - How to Get Positions of Matches === Maybe I'm overlooking something in the Python re library but how can I get the start and end positions of for all matches of my pattern matches in a string? For example for pattern r'[a-z]' on string 'a1b2c3d4' I'd want to get the positions where it finds each letter. (ideally I'd like to get the text of the match back too). Any ideas?
0
[ 2, 20059, 7953, 1706, 275, 13, 8, 184, 20, 164, 3062, 16, 1717, 800, 3726, 3726, 913, 31, 22, 79, 14237, 301, 19, 14, 20059, 302, 1248, 47, 184, 92, 31, 164, 14, 799, 17, 241, 3062, 16, 26, 65, 1717, 16, 51, 3732, 1717, 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...
How to scp in python? === What's the most pythonic way to scp a file in Python? The only route I'm aware of is os.system('scp "%s" "%s:%s"' % (localfile, remotehost, remotefile) ) which is a hack, and which doesn't work outside linux-like systems, and which only really works cleanly if you have passwordless SSH set up already to the remote host. I'd prefer to avoid implementing scp myself via low-level ssh modules. I'm aware of `paramiko`, a Python module that supports ssh and sftp; but it doesn't support scp. Background: I'm connecting to a router which doesn't support sftp but does support ssh/scp, so sftp isn't an option.
0
[ 2, 184, 20, 13, 18, 7439, 19, 20059, 60, 800, 3726, 3726, 98, 22, 18, 14, 127, 20059, 596, 161, 20, 13, 18, 7439, 21, 3893, 19, 20059, 60, 14, 104, 858, 31, 22, 79, 3854, 16, 25, 13, 759, 9, 10724, 5, 22, 18, 7439, 13, 7, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 practices: Many small functions/methods, or bigger functions with logical process components inline? === Is it better to write many small methods (or functions), or to simply write the logic/code of those small processes right into the place where you would have called the small method? What about breaking off code into a small function even if for the time being it is only called from one spot? If one's choice depends on some criteria, what are they; how should a programmer make a good judgement call? I'm hoping the answer can be applied generally across many languages, but if necessary, answers given can be specific to a language or languages. In particular, I'm thinking of SQL (functions, rules and stored procedures), Perl, PHP, Javascript and Ruby.
0
[ 2, 246, 5242, 45, 151, 284, 3719, 118, 5909, 1807, 43, 18, 15, 54, 6197, 3719, 29, 11545, 953, 5090, 19, 1143, 60, 800, 3726, 3726, 25, 32, 574, 20, 2757, 151, 284, 3195, 13, 5, 248, 3719, 6, 15, 54, 20, 1659, 2757, 14, 7085, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 to create a new SQL Server Index? === Obviously (methinks), creating an index on a `BIT` column is unnecessary. However, if you had a column that you need to search in which every value is likely unique, like `BlogPost` or `StreetAddress` or something, then an index seems appropriate (again, methinks). But what's the cutoff? What if you expect 10,000 rows and you'll have about 20 unique values among them. Should an index be created? Thanks in advance.
0
[ 2, 76, 20, 1600, 21, 78, 4444, 255, 8128, 4348, 60, 800, 3726, 3726, 4409, 13, 5, 790, 10550, 18, 6, 15, 2936, 40, 4348, 27, 21, 13, 1, 3326, 1, 4698, 25, 16435, 9, 207, 15, 100, 42, 41, 21, 4698, 30, 42, 376, 20, 2122, 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...
Parsing HTML Fragments === What's the best way to parse fragments of HTML in C#? For context, I've inherited an application that uses a great deal of composite controls, which is fine, but a good deal of the controls are rendered using a long sequence of literal controls, which is fairly terrifying. I'm trying to get the application into unit tests, and I want to get these controls under tests that will find out if they're generating well formed HTML, and in a dream solution, validate that HTML.
0
[ 2, 2017, 18, 68, 13, 15895, 10837, 800, 3726, 3726, 98, 22, 18, 14, 246, 161, 20, 2017, 870, 10837, 16, 13, 15895, 19, 272, 5910, 60, 26, 4141, 15, 31, 22, 195, 7179, 40, 3010, 30, 2027, 21, 374, 1183, 16, 12639, 8671, 15, 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...
Editing the Registry with VBScript on Vista === A VBScript cannot edit the registry by default on Vista. How do I get elevation (even if the user has to do something when they run the script) so that the script can edit the registry? The error is: --------------------------- Windows Script Host --------------------------- Script: blah blah blah.vbs Line: 6 Char: 1 Error: Permission denied Code: 800A0046 Source: Microsoft VBScript runtime error --------------------------- OK ---------------------------
0
[ 2, 9510, 14, 18269, 29, 13, 20468, 8741, 27, 13520, 800, 3726, 3726, 21, 13, 20468, 8741, 1967, 9392, 14, 18269, 34, 12838, 27, 13520, 9, 184, 107, 31, 164, 4960, 13, 5, 4943, 100, 14, 4155, 63, 20, 107, 301, 76, 59, 485, 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...
How can I dynamically alter the Java LAF UIDefaults? === I'm working on cusomizing a Swing application by dynamically altering the UIDefaults. The end goal is to alter many of them (colors, fonts, sizes, borders, etc) and save the result on a per user basis. While it may give the application some non-standard looks, the client asketh and the client shall receive. The only problem I'm running into is that GUI will only update ONCE. The first time I change a ui property everthing is great, subsequent changes don't affect anything. // called from the EDT // uiKeyName points to some ColorUIResource UIManager.getDefaults().put(uiKeyName, <<color from color picker>>); SwingUtilties.updateComponentTreeUI(rootWindow); It works once, but never again. Ideas?
0
[ 2, 184, 92, 31, 7782, 1326, 7835, 14, 8247, 13, 21645, 13, 5661, 13862, 9708, 18, 60, 800, 3726, 3726, 31, 22, 79, 638, 27, 3141, 10723, 3335, 21, 5587, 3010, 34, 7782, 1326, 7835, 68, 14, 13, 5661, 13862, 9708, 18, 9, 14, 241, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 SPSite from 32bit application to access 64bit SharePoint === I've created a batch job that running in 32bit mode as it using 32bit COM objectes, this need to connect to SharePoint to make updates to list. It works in my development environment as it is full 32bit. But in my test and prodution environment we use 64bit SharePoint and this is what I get from SPSite: System.IO.FileNotFoundException: The Web application at http://<my sp host>/ could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application. at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri req... this is what I do using (SPSite site = new SPSite(_url)) { using (SPWeb web = site.OpenWeb()) { try { SPList list = web.Lists[new Guid(_listID)]; SPListItem item = list.GetItemById(id); item[field] = value; item.SystemUpdate(false); } catch (Exception x) { log.Error(x); } } }
0
[ 2, 568, 3782, 9097, 37, 2512, 3326, 3010, 20, 1381, 4384, 3326, 1891, 3132, 800, 3726, 3726, 31, 22, 195, 679, 21, 13064, 1205, 30, 946, 19, 2512, 3326, 3740, 28, 32, 568, 2512, 3326, 13, 960, 3095, 160, 15, 48, 376, 20, 6379, 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...
Internet explorer creates horizontal scrollbar for vertical scrollbar's width === A div, containing a table has the following CSS styling: #formulaAlts{ float: right; height: 200px; overflow: auto; } This makes it so that when the table is >200px, a scrollbar appears only for the table and the other elements on the page stay put. Great! Now for our friend IE... In IE, the element spawns the vertical scrollbar without growing the containing element. To "solve" this, a horizontal scrollbar is created. That sucks. And I don't want it to suck... Any ideas? **--EDIT--** I found out that the line overflow-x: hidden; forces IE to ignore the horizontal scrollbar. This is better.. but not quite there because now part of my table is invisble.
0
[ 2, 2620, 8520, 9695, 10095, 12159, 1850, 26, 7035, 12159, 1850, 22, 18, 9456, 800, 3726, 3726, 21, 13, 12916, 15, 3503, 21, 859, 63, 14, 249, 272, 18, 18, 23020, 45, 6926, 4190, 3743, 192, 38, 18, 1, 11510, 45, 193, 73, 2947, 45...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 would you choose for your data layer today, Linq or Subsonic? === We are ready to start a brand new project at work, no legacy code. We did use Subsonic in the past and we pretty happy with it. But that was before Linq. Has anyone had to face this same issue (Linq x Subsonic)? What was your decision? What were the reasons? Any insight appreciated.
0
[ 2, 98, 83, 42, 3538, 26, 154, 1054, 5385, 786, 15, 6294, 1251, 54, 972, 17766, 60, 800, 3726, 3726, 95, 50, 1451, 20, 799, 21, 2209, 78, 669, 35, 170, 15, 90, 7780, 1797, 9, 95, 144, 275, 972, 17766, 19, 14, 640, 17, 95, 177...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Control amount of Javascript Ajax Control Toolkit spits out === with the Ajax Control Toolkit, one can easily drag and drop all types of great extender onto controls, but they register a boatload of Javascript to do it. 1) how do control this. and 2) If the scriptmanager is in the masterpage, is there anyway to control the loading of a script on one page that isn't in another? for example: calendar extender is on one page, but the script for it gets loaded on every page that is a child of the master page.
0
[ 2, 569, 2006, 16, 8247, 8741, 20624, 569, 5607, 13703, 9286, 18, 70, 800, 3726, 3726, 29, 14, 20624, 569, 5607, 13703, 15, 53, 92, 2351, 5501, 17, 2804, 65, 2551, 16, 374, 7206, 106, 1204, 8671, 15, 47, 59, 2243, 21, 2252, 8294, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Are LINQ expression trees Turing complete? === As they are in .Net 3.5. I know they are in 4.0, as that's what the DLR works with, but I'm interested in the version we have now.
0
[ 2, 50, 6294, 1251, 1803, 1913, 6205, 68, 1279, 60, 800, 3726, 3726, 28, 59, 50, 19, 13, 9, 2328, 203, 9, 264, 9, 31, 143, 59, 50, 19, 268, 9, 387, 15, 28, 30, 22, 18, 98, 14, 13, 43, 12988, 693, 29, 15, 47, 31, 22, 79, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0...
Can source code examples be kept in a SQL database while retaining all formatting? If so... === Can source code examples be kept in a SQL database **while retaining all formatting** (tabs, newlines, etc.)? If so what data type would be used?
0
[ 2, 92, 1267, 1797, 3770, 44, 1025, 19, 21, 4444, 255, 6018, 133, 14151, 65, 2595, 1203, 60, 100, 86, 9, 9, 9, 800, 3726, 3726, 92, 1267, 1797, 3770, 44, 1025, 19, 21, 4444, 255, 6018, 13, 1409, 10144, 14151, 65, 2595, 1203, 1409...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Does anyone know of any C/C++/C# code libraries that do audio synthesizer emulation? === I'm trying to write a software synthesizer that recreates the sounds made by classic synthesizers like the Moog and the DX7. Does anyone know of any code resources for something like this? Thanks.
0
[ 2, 630, 1276, 143, 16, 186, 272, 118, 150, 20512, 118, 150, 5910, 1797, 8649, 30, 107, 4023, 11506, 3579, 11123, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 2757, 21, 2306, 11506, 30, 21119, 18, 14, 2795, 117, 34, 2732, 11506, 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...
What you like about Django? === I started to learn Django a few days ago, and as i dive into it it seems that I'm starting to like it even more. Trying to migrate from other language. I won't say which one, as the purpose of this question is not to bash anything. So i would like to know your opinion about Django. What do you like about it? What made you switch/use it? What features you would like it to have that aren't there? What would make you switch to it? How fast is it in production? How hard is it to master it?
0
[ 2, 98, 42, 101, 88, 3857, 14541, 60, 800, 3726, 3726, 31, 373, 20, 2484, 3857, 14541, 21, 310, 509, 1464, 15, 17, 28, 31, 8523, 77, 32, 32, 2206, 30, 31, 22, 79, 1422, 20, 101, 32, 166, 91, 9, 749, 20, 22985, 37, 89, 816, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 specify relations using SQLAlchemy declarative syntax? === I can't find any proper documentation on how to specify relations using the declarative syntax of SQLAlchemy.. Is it unsupported? That is, should I use the "traditional" syntax? I'm trying to declare a simple one-to-many.. Thanks for your help!
0
[ 2, 184, 20, 19077, 2649, 568, 4444, 10834, 2569, 915, 121, 12078, 3366, 22649, 60, 800, 3726, 3726, 31, 92, 22, 38, 477, 186, 4119, 13945, 27, 184, 20, 19077, 2649, 568, 14, 121, 12078, 3366, 22649, 16, 4444, 10834, 2569, 915, 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...
Rules Engine - pros and cons === I'm auditing a project that uses what is called a [Rules Engine][1]. In short, it's a way to externalize business logic from application code. This concept is entirely new to me and I'm pretty skeptical about it. After hearing people talk about [Anemic Domain Models][2] for the past few years, I'm questioning the Rules Engine Approach. To me they seem like a great way to WEAKEN a domain model. For example say I'm doing a java webapp interacting with a Rules Engine. Then I decide I want to have an Android app based on the same domain. Unless I want the Android app to interact with the Rules Engine as well, I'm going to have to miss out on whatever business logic was already written. As I don't have any experience with them yet, just curiosity, I was interested to hear about the pros and cons are in using a Rules Engine? The only pro that I can think of is that you don't need to rebuild your entire Application just to change some business rule (but really, how many apps really have that many changes?). But using a Rules Engine to solve that problem kind of sounds to me like putting a band-aid over a shotgun wound. [1]: http://en.wikipedia.org/wiki/Business_rules_engine [2]: http://www.martinfowler.com/bliki/AnemicDomainModel.html
0
[ 2, 1761, 1406, 13, 8, 895, 18, 17, 11608, 800, 3726, 3726, 31, 22, 79, 13471, 68, 21, 669, 30, 2027, 98, 25, 227, 21, 636, 16154, 18, 1406, 500, 2558, 165, 500, 9, 19, 502, 15, 32, 22, 18, 21, 161, 20, 4886, 2952, 508, 7085,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Where does Console.WriteLine go in Debug? === I found [this question][1], but what I want to know is different - does the output from Console.WriteLine go anywhere when debugging? I know that for it to go to the output window I should should Debug.WriteLine() or other methods, but where does the standard Console.WriteLine() go? [1]: http://stackoverflow.com/questions/122778/capture-console-output-for-debugging-in-vs
0
[ 2, 113, 630, 8650, 9, 23716, 1143, 162, 19, 121, 16254, 60, 800, 3726, 3726, 31, 216, 636, 1565, 1301, 500, 2558, 165, 500, 15, 47, 98, 31, 259, 20, 143, 25, 421, 13, 8, 630, 14, 5196, 37, 8650, 9, 23716, 1143, 162, 4922, 76, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 implement text fields with autocomplete for habtm fields ? === I tried the example from Rails Cookbook and managed to get it to work. However the `text_field_with_auto_complete` works only for one value. class Expense < ActiveRecord::Base has_and_belongs_to_many :categories end In the New Expense View rhtml <%= text_field_with_auto_complete :category, :name %> Auto complete works for the first category. How do I get it working for multiple categories? e.g. Category1, Category2 *Intended behavior: like the StackOverflow Tags textbox*
0
[ 2, 184, 107, 31, 8713, 1854, 2861, 29, 3108, 15990, 26, 13, 9075, 38, 79, 2861, 13, 60, 800, 3726, 3726, 31, 794, 14, 823, 37, 2240, 18, 27526, 17, 1471, 20, 164, 32, 20, 170, 9, 207, 14, 13, 1, 11969, 1, 1109, 1, 1410, 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...
Where can I write data to on Windows Vista using any account and be viewable from all other accounts? === I need to write some registration data (unique computer number, and corresponding activation code). The Computer Number needs to be visible from *all* accounts ({Admin|Non Admin} with User Access Control turned {On|Off} ). It's acceptable to write the Computer Number and Activation Code only from an Admin account, but it needs to be readable from any of the other accounts. Currently (and I need to test this more) it seems that if the the CN and Activation Code are written with UAC off then when the user switches UAC ON the Computer Number isn't visible.
0
[ 2, 113, 92, 31, 2757, 1054, 20, 27, 1936, 13520, 568, 186, 2176, 17, 44, 1418, 579, 37, 65, 89, 5310, 60, 800, 3726, 3726, 31, 376, 20, 2757, 109, 8587, 1054, 13, 5, 1020, 5312, 1428, 234, 15, 17, 7265, 15519, 1797, 6, 9, 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...
Visual Studio Macro - Code Gen Language === I am writing a macro for Visual studio that will generate some code. I would like for the macro to generate for both C# and VB, is there a way to determine what language is being used in the active (current) document?
0
[ 2, 3458, 1120, 9069, 13, 8, 1797, 4380, 816, 800, 3726, 3726, 31, 589, 1174, 21, 9069, 26, 3458, 1120, 30, 129, 7920, 109, 1797, 9, 31, 83, 101, 26, 14, 9069, 20, 7920, 26, 156, 272, 5910, 17, 13, 20468, 15, 25, 80, 21, 161, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
What is the correct naming notation for classes, functions, variables etc in c#? === I'm a web developer with no formal computing background behind me, I've been writing code now some years now, but every time I need to create a new class / function / variable, I spend about two minutes just deciding on a name and then how to type it. For instance, if I write a function to sum up a bunch of numbers. Should I call it Sum() GetSum() getSum() get_sum() AddNumbersReturnTotal() I know there is a right way to do this, and a link to a good definitive source is all I ask :D
0
[ 2, 98, 25, 14, 4456, 10929, 15591, 26, 2684, 15, 3719, 15, 12157, 2722, 19, 272, 5910, 60, 800, 3726, 3726, 31, 22, 79, 21, 2741, 10058, 29, 90, 3337, 10626, 2395, 439, 55, 15, 31, 22, 195, 74, 1174, 1797, 130, 109, 122, 130, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 return values and arguments for public methods only be types from within the same assembly? === I am wondering what are the best practices for public methods and their return values. Is it ok to return types from referenced assemblies or should I make sure that all the parameters as well as return values are all from within the same assembly? The reason I ask is that I am in the process of merging assemblies with ILMerge and I would like to internalize all the assemblies except for the main one but that seems to be impossible to do if I have public methods in the main assembly that have parameters or return values for types that are in the internalized assemblies. Can anyone clarify this for me?
0
[ 2, 378, 788, 4070, 17, 10553, 26, 317, 3195, 104, 44, 2551, 37, 363, 14, 205, 1475, 60, 800, 3726, 3726, 31, 589, 5712, 98, 50, 14, 246, 5242, 26, 317, 3195, 17, 66, 788, 4070, 9, 25, 32, 5854, 20, 788, 2551, 37, 17571, 21066,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Ajax: close window after Ajax call? === I'm using ASP.NET Ajax. How can I **tell the browser to close the current window** after the server call finishes (server-side code)? I managed to do this using the ASP.NET Ajax's ScriptManager method "RegisterDataItem" in the server method (inside a button click handler): sm.RegisterDataItem(ActionLabel, "action:closewindow") and a hidden Label and handling it this way on the client: function PageLoadingHandler(sender, args) { var dataItems = args.get_dataItems(); if (dataItems['ActionLabel'] == 'action:closewindow') { window.close() } } Sys.WebForms.PageRequestManager.getInstance().add_pageLoading(PageLoadingHandler); But it feels **dirty**. There must be a more elegant way to do this. Thanks for any advice.
0
[ 2, 28, 306, 9, 2328, 20624, 45, 543, 1463, 75, 20624, 645, 60, 800, 3726, 3726, 31, 22, 79, 568, 28, 306, 9, 2328, 20624, 9, 184, 92, 31, 13, 1409, 4213, 14, 16495, 20, 543, 14, 866, 1463, 1409, 75, 14, 8128, 645, 13625, 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...
Inversion of Control with .net === It's rare that I hear someone using [Inversion of Control (Ioc)][1] principle with .Net. I have some friend that work with Java that use a lot more Ioc with Spring and PicoContainer. I understand the principle of removing dependencies from your code... but I have a doubt that it's so much better. **Why does .Net programmer do not use (or use less) those type of framework? If you do, do you really find a positive effect in the long time?** [1]: http://martinfowler.com/articles/injection.html
0
[ 2, 19, 10898, 16, 569, 29, 13, 9, 2328, 800, 3726, 3726, 32, 22, 18, 2890, 30, 31, 990, 737, 568, 636, 108, 10898, 16, 569, 13, 5, 49, 2499, 6, 500, 2558, 165, 500, 5897, 29, 13, 9, 2328, 9, 31, 57, 109, 860, 30, 170, 29, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 use variables in a JQuery call === I am trying to function doRow(rowNum) { $.ajax({ url: "z.html", cache: false, success: function(html){ $('#result + rowNum + "'").append(html); } }); This does not seem to work. I also want to pass variables to data attribute when I get that far.
0
[ 2, 184, 20, 275, 12157, 19, 21, 487, 8190, 93, 645, 800, 3726, 3726, 31, 589, 749, 20, 1990, 107, 5417, 5, 5417, 6336, 6, 13, 1, 5579, 9, 6881, 7522, 5, 1, 287, 6362, 45, 13, 7, 380, 9, 15895, 7, 15, 16522, 45, 4997, 15, 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...
Why call SqlClient.SqlDataReader Close() method anyway? === Is the SqlClient.SqlDataReader a .NET managed object or not? Why do we have to call the Close() method explicitly close an open connection? Shouldn't running out of scope for such an object automatically close this? Shouldn't garbage collector clean it up anyway? Please help me understand what is the best practise here. I have seen a related question [here][1] and it further illustrates the issue I have with a web application. The issue is that we were running out of connections. The detailed error is here: Exception: System.InvalidOperationException Message: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Source: System.Data at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) at System.Data.SqlClient.SqlConnection.Open() To fix this, I had to explicitly close all the SQLDataReader objects. I am using .NET Framework 3.5 [1]: http://stackoverflow.com/questions/247311/sqldatareader-in-this-scenario-will-the-reader-get-closed
0
[ 2, 483, 645, 4444, 6109, 18513, 38, 9, 18, 22402, 18768, 10647, 106, 543, 5, 6, 2109, 2774, 60, 800, 3726, 3726, 25, 14, 4444, 6109, 18513, 38, 9, 18, 22402, 18768, 10647, 106, 21, 13, 9, 2328, 1471, 3095, 54, 52, 60, 483, 107, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Database Driven Front End Controller / Page Management Good or Bad? === I am currently working within a custom framework that uses the database to setup a Page Object which contains the information about Module, View, Controller, etc which is used by a Front Controller to handle routing and the like within an MVC (obviously) pattern. The original reason for handling the pages within the database was because we needed to be able to create new landing pages on the fly from within a admin interface and because we also needed to create onLoad and onUnload events to which other dynamic objects could be attached. However, after reading this <a href="http://stackoverflow.com/questions/249281/embedding-html-code-in-stored-procedures">post</a> yesterday, it made me wonder if we shouldn't move this handling out of the database and make it all file structure and code driven like other frameworks so that pages can be tested without having the database be a component. I am currently looking at whether to scrap the custom framework and go with one of the standard frameworks and extend it (which is what's most likely right now), but I'm wondering whether to extend the framework to handle page requests through database like we are now or if we should simply go with whatever routing / handling mechanism comes with the framework?
0
[ 2, 6018, 5355, 431, 241, 9919, 13, 118, 2478, 1097, 254, 54, 896, 60, 800, 3726, 3726, 31, 589, 871, 638, 363, 21, 5816, 6596, 30, 2027, 14, 6018, 20, 18161, 21, 2478, 3095, 56, 1588, 14, 676, 88, 12613, 15, 1418, 15, 9919, 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...
What the best way to access the databse inside a class in PHP? === I have a session class that needs to store session information in a MySQL database. Obviously I will need to query the database in the methods of this class. In general I may need to connect more than one database simultaneously and may or may not be connected to that database already. Given that, what's the best way to access databases for the session class or any class for that matter. Would creating a class to manage connections make sense?
0
[ 2, 98, 14, 246, 161, 20, 1381, 14, 1054, 220, 870, 572, 21, 718, 19, 13, 26120, 60, 800, 3726, 3726, 31, 57, 21, 3723, 718, 30, 2274, 20, 1718, 3723, 676, 19, 21, 51, 18, 22402, 6018, 9, 4409, 31, 129, 376, 20, 25597, 14, 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...
VB.Net: Are events raised even if there are no event handlers? === I have a class that downloads, examines and saves some large XML files. Sometimes I want the UI to tell me what's going on, but sometimes I will use the class and ignore the events. So I have placed lines of code like this in a dozen places: RaiseEvent Report("Sending request: " & queryString) RaiseEvent Report("Saving file: " & fileName) RaiseEvent Report("Finished") My question is this - will these events slow down my code if nothing is listening for them? Will they even fire?
0
[ 2, 13, 20468, 9, 2328, 45, 50, 963, 1127, 166, 100, 80, 50, 90, 807, 24641, 18, 60, 800, 3726, 3726, 31, 57, 21, 718, 30, 7121, 18, 15, 9691, 18, 17, 16815, 109, 370, 23504, 6488, 9, 1030, 31, 259, 14, 13, 5661, 20, 494, 55,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Excel cannot enable references / missing functions === I have a working excel workbook that has VBA code and macros to help in data input. I use a calendar to capture dates and read data out of cells. The application works 100% on my machine (application developed in 2007 but saved as a .XLS – 97/2000 for compatibility in the office). When I give the file to other people, the calendar control and the “TRIM()” function do not work. On my machine I can get to the references section but on all other machines in the office the “references” function is grayed out. …. Any idea why a common object like the calendar and a common function like trim() do not work on some machines
0
[ 2, 20700, 1967, 9240, 7231, 13, 118, 2863, 3719, 800, 3726, 3726, 31, 57, 21, 638, 20700, 170, 5199, 30, 63, 566, 969, 1797, 17, 9069, 18, 20, 448, 19, 1054, 6367, 9, 31, 275, 21, 7036, 20, 3683, 4076, 17, 1302, 1054, 70, 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...
Besides URL rewriting, what options are available for maintaining sessions without using cookies? === I've seen various options for URL rewriting here on Stack Overflow, and other places on the web, but was curious to see if there were other options.
0
[ 2, 3410, 287, 6362, 302, 12646, 15, 98, 6368, 50, 904, 26, 8215, 5763, 366, 568, 19396, 60, 800, 3726, 3726, 31, 22, 195, 541, 617, 6368, 26, 287, 6362, 302, 12646, 235, 27, 7566, 20285, 15, 17, 89, 1489, 27, 14, 2741, 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, 0, 0, 0, 0, 0, 0, 0, 0...
Best way to create a search function ASP.NET and SQL server === I have an SQL database with multiple tables, and I am working on creating a searching feature. Other than having multiple queries for the different tables, is there a different way to go about said searching function?
0
[ 2, 246, 161, 20, 1600, 21, 2122, 1990, 28, 306, 9, 2328, 17, 4444, 255, 8128, 800, 3726, 3726, 31, 57, 40, 4444, 255, 6018, 29, 1886, 7484, 15, 17, 31, 589, 638, 27, 2936, 21, 5792, 1580, 9, 89, 119, 452, 1886, 9386, 2829, 26,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
VBA SQL Query Table Error problem === Gentlemen, I am trying to pull data from a call data system, Nortel Caontact Center 6.0 to be exact, and if you use that particular system what I am trying to capture is the daily call by call data. However when I use this code print("sSql = "" sConn = "ODBC;DSN=Aus1S002;UID="somevaliduser";PWD="avalidpassword";SRVR="Thecorrectserver";DB=blue" sSql = "SELECT " & sCW & sDate & ".Timestamp, " sSql = sSql & sCW & sDate & ".CallEvent, " sSql = sSql & sCW & sDate & ".CallEventName, " sSql = sSql & sCW & sDate & ".CallID, " sSql = sSql & sCW & sDate & ".TelsetLoginID, " sSql = sSql & sCW & sDate & ".AssociatedData, " sSql = sSql & sCW & sDate & ".Destination, " sSql = sSql & sCW & sDate & ".EventData, " sSql = sSql & sCW & sDate & ".Source, " sSql = sSql & sCW & sDate & ".Time " & vbCrLf sSql = sSql & "FROM blue.dbo.eCallByCallStat" & sDate & " " & sCW & sDate & vbCrLf sSql = sSql & " ORDER BY " & sCW & sDate & ".Timestamp" Set oQT = ActiveSheet.QueryTables.Add(Connection:=sConn, Destination:=Range("A1"), Sql:=sSql) oQT.Refresh BackgroundQuery:=False Do While oQT.Refreshing = True Loop"); When I run this I get an odd error message at oQT.Refresh BackgroundQuery:=False Oddly enough it worked for a month or so then just died
0
[ 2, 566, 969, 4444, 255, 25597, 859, 7019, 1448, 800, 3726, 3726, 12521, 15, 31, 589, 749, 20, 2201, 1054, 37, 21, 645, 1054, 329, 15, 2127, 3454, 15100, 2877, 5183, 459, 400, 9, 387, 20, 44, 5340, 15, 17, 100, 42, 275, 30, 1498,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Suppress "PL/SQL procedure successfully completed" message in sqlplus? === Is there a way that you can have SERVEROUTPUT set to ON in sqlplus but somehow repress the message "PL/SQL procedure successfully completed" that is automatically generated upon completed execution of a plsql procedure?
0
[ 2, 184, 107, 31, 12451, 13, 7, 5727, 118, 18, 22402, 7004, 3673, 1066, 7, 2802, 19, 4444, 255, 13349, 60, 800, 3726, 3726, 25, 80, 21, 161, 30, 42, 92, 57, 8128, 1320, 4881, 309, 20, 27, 19, 4444, 255, 13349, 47, 3625, 302, 58...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Windows Service or SQL Job? === I have an archiving process that basically deletes archived records after a set number of days. Is it better to write a scheduled SQL job or a windows service to accomplish the deletion? The database is mssql2005.
0
[ 2, 1936, 365, 54, 4444, 255, 1205, 60, 800, 3726, 3726, 31, 57, 40, 13, 25328, 68, 953, 30, 11374, 27448, 18, 10692, 742, 75, 21, 309, 234, 16, 509, 9, 25, 32, 574, 20, 2757, 21, 3758, 4444, 255, 1205, 54, 21, 1936, 365, 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, 0, 0, 0, 0, 0...
What do i use instead of e.Values.add(... for the ListViewEditEventArgs to upload an Image === i can upload images to the database using linq and the listview control when referancing the e.Values method for the ListViewInsertEventArgs, but there is no such method in the ListViewEditEventArgs, so what can i use to achieve the same results? here is my inserting code: protected void ProjectPhotosList_ItemInserting(object sender, ListViewInsertEventArgs e) { FileUpload uplImage = (FileUpload)ProjectPhotosList.InsertItem.FindControl("uplImage"); Label fileuploadlbl = (Label)ProjectPhotosList.InsertItem.FindControl("fileuploadlbl"); byte[] img = null; if (uplImage.HasFile || !uplImage.FileName.ToLower().EndsWith(".jpg")) { try { img = new byte[uplImage.PostedFile.ContentLength]; uplImage.PostedFile.InputStream.Read(img, 0, img.Length); } catch { fileuploadlbl.Text = "unable to upload " + uplImage.FileName.ToString(); } } if (img == null) { e.Cancel = true; fileuploadlbl.Text = "Please choose a file to upload"; } try { e.Values.Add("ProjectPhoto", new System.Data.Linq.Binary(img)); fileuploadlbl.Text = "File Upload Successful"; } catch { fileuploadlbl.Text = "File Upload Failed, please try again"; } }
0
[ 2, 98, 107, 31, 275, 700, 16, 13, 62, 9, 15165, 18, 9, 14854, 5, 9, 9, 9, 26, 14, 968, 4725, 69, 2119, 6645, 10663, 18, 20, 71, 8294, 40, 1961, 800, 3726, 3726, 31, 92, 71, 8294, 3502, 20, 14, 6018, 568, 6294, 1251, 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...
schema dump on legacy oracle database using db:schema:dump using rake === Does anyone know of any specific DSL implementations used to import legacy Oracle database schemas. I have tried to just run db:schema:dump on my existing db I want to port to a new ruby app. However, the rake dies about halfway through with out any error. It kinda just locks up. I started looking for the best way to tackle this and found examples of how to override some stuff for SQLServer but not much for Oracle. I basically want to pull in the schema and generate a scaffold and model from it. Is there a more simple way to do this or will I have to invent the wheel?
0
[ 2, 23874, 11424, 27, 7780, 15759, 6018, 568, 13, 9007, 45, 7526, 540, 45, 43, 11134, 568, 21009, 800, 3726, 3726, 630, 1276, 143, 16, 186, 1903, 13, 43, 18, 255, 6123, 18, 147, 20, 9010, 7780, 15759, 6018, 23874, 18, 9, 31, 57, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Shortest code to calculate list min/max in .NET === I'd like something like int minIndex = list.FindMin(delegate (MyClass a, MyClass b) {returns a.CompareTo(b);}); Is there a builtin way to do this in .NET?
0
[ 2, 23576, 1797, 20, 18469, 968, 4232, 118, 8304, 19, 13, 9, 2328, 800, 3726, 3726, 31, 22, 43, 101, 301, 101, 19, 38, 4232, 25671, 800, 968, 9, 19811, 2160, 5, 24249, 3322, 13, 5, 915, 1898, 21, 15, 51, 1898, 334, 6, 13, 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...
Correct approach to Properties. === I am working in Java on a fairly large project. My question is about how to best structure the set of Properties for my application. Approach 1: Have some static Properties object that's accessible by every class. (Disadvantages: then, some classes lose their generality should they be taken out of the context of the application; they also require explicit calls to some static object that is located in a different class and may in the future disappear; it just doesn't _feel_ right, am I wrong?) Approach 2: Have the Properties be instantiated by the main class and handed down to the other application classes. (Disadvantages: you end up passing a pointer to the Properties object to almost every class and it seems to become very redundant and cumbersome; I don't _like_ it.) Any suggestions?
0
[ 2, 4456, 2141, 20, 3704, 9, 800, 3726, 3726, 31, 589, 638, 19, 8247, 27, 21, 6647, 370, 669, 9, 51, 1301, 25, 88, 184, 20, 246, 1411, 14, 309, 16, 3704, 26, 51, 3010, 9, 2141, 6352, 57, 109, 12038, 3704, 3095, 30, 22, 18, 73...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 check, from C#, are files for complex script and rtl languages installed? === How to check, from C#, are files for complex script and rtl languages (Regional and Language settings) installed? Thanks
0
[ 2, 184, 20, 2631, 15, 37, 272, 5910, 15, 50, 6488, 26, 1502, 3884, 17, 761, 7786, 2556, 4066, 60, 800, 3726, 3726, 184, 20, 2631, 15, 37, 272, 5910, 15, 50, 6488, 26, 1502, 3884, 17, 761, 7786, 2556, 13, 5, 24967, 17, 816, 124...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 do I gzip webpage output with Rails? === What is the best plugin for Rails that gzips my webpage output? I [found this plugin][1] but it's out of date and I am not sure if I should use it. [1]: http://wiki.rubyonrails.org/rails/pages/Output+Compression+Plugin
0
[ 2, 184, 107, 31, 489, 2553, 306, 2741, 6486, 5196, 29, 2240, 18, 60, 800, 3726, 3726, 98, 25, 14, 246, 10922, 108, 26, 2240, 18, 30, 489, 2553, 1919, 51, 2741, 6486, 5196, 60, 31, 636, 12235, 48, 10922, 108, 500, 2558, 165, 500,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...