unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
delay JQuery effects === I want to fade out an element and all it's child elements after a delay of a few seconds. This poses a couple of problems: 1. The fadeOut() function only fades out the element it's called on, and doesn't affect the child elements 2. I haven't found a way to specify that an effect should start after a specified time delay. Thanks in Advance, Don
0
[ 2, 7255, 487, 8190, 93, 2292, 800, 3726, 3726, 31, 259, 20, 11381, 70, 40, 4520, 17, 65, 32, 22, 18, 850, 2065, 75, 21, 7255, 16, 21, 310, 2582, 9, 48, 10810, 18, 21, 1335, 16, 1716, 45, 137, 9, 14, 11381, 1320, 5, 6, 1990, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Validation in the middle tier === I want to do validation on my business code. I'm thinking on 2 ways to do this. One, do the validation on my class property setters in the following fashion class Student{ public string Name{ get { return _name; } set { if (value.IsNullOrEmpty) throw exception ... } } } Now, the problem with this approach is that, validation code is run every time Name gets assigned, which we may not need, like when fill it in with data from DB. Two, which I prefer, put static methods on these entity classes, like class Student{ public **static** void ValidateName(**string name**) { if (string.IsNullorEmpty(name)) { throw ... } ... } Notice I'm using a static method instead of a instance method, like class Student{ public void Validate() { // validation logic on instance properties if (string.IsNullorEmpty(Name)) { throw ... } ... } is because I'm not always getting a Student obj passed in, I do get primitive types like string name passed into a method often time, like public static FindStudentByName(string name) { // here I want to first do validation Student.ValidateName(name); // qeury DB ... } If I do get passed in a student obj, then of course I can do public static AddStudent(Student s) { // call the instance method s.Validate(); } ---------------------------------------------------------------------------------- Now, I'd like to keep things very simple, so I **don't want** to go any one of the following approaches 1. Use attributes on properties, like [StringLength(25)]. One, because this requires Reflection and affects performance, there are tricks to get performance hit low, but again I want to keep it simpler the better. Two, I want my site to be able to run in Medium Trust. As reflection as I understand it requires Full Trust. 2. Use any of the Validation Blocks out there, like MS. Enterprise Library etc found on CodePlex. Now, I want to get your opinion on this, what are some of the potential problems with the approach I'm going with? Would this approach perform better, more readable, easier to maintain than the other approaches? How are you doing validation on your middle tier? Thank a bunch! Ray.
0
[ 2, 27999, 19, 14, 772, 7197, 800, 3726, 3726, 31, 259, 20, 107, 27999, 27, 51, 508, 1797, 9, 31, 22, 79, 1440, 27, 172, 2847, 20, 107, 48, 9, 53, 15, 107, 14, 27999, 27, 51, 718, 1354, 309, 6052, 19, 14, 249, 3161, 718, 1209...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 stop a running process during an MSI based un-install? === I'm using Wise Package Studio 7.0 SP2 on Windows XP. I've got an MSI Wrapped EXE installation that goes about happily installing some files and then running one of the files from the installation which we can refer to as app.exe. So on the "Execute Deferred" tab of the MSI Editor, I had to add the lines: If Not Installed then Execute Installed Program app.exe (Action) End This ensured that my app.exe would be run *only* on an installation and not during a modify/repair/removal. When app.exe runs, it conveniently adds itself to the system tray. I'm looking for something that will do the reverse during a removal. I want to stop the app.exe process thus removing it from the system tray. Currently my removal gets rid of all the files however the app.exe remains running and still shows up in the systems tray. I've looked at adding the conditional statement: If REMOVE~="ALL" then *remove the app from the systray!* End The conditional statement will let me do something only on a removal, however I'm not sure of the best approach to go about actually terminating the process. Is there an MSI command I can run that will let me do that? Should I write my own .exe that will do that?
0
[ 2, 184, 20, 747, 21, 946, 953, 112, 40, 4235, 49, 432, 367, 8, 108, 21300, 60, 800, 3726, 3726, 31, 22, 79, 568, 6714, 6030, 1120, 453, 9, 387, 3782, 135, 27, 1936, 23045, 9, 31, 22, 195, 330, 40, 4235, 49, 3684, 1396, 62, 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 test Controller Filters in Ruby on Rails and Test::Unit === We have a large application in Ruby on Rails with many filters. Some of these filters can be complex. I am looking for a way to individually test these filters with a unit test. Right now I test them by testing them through an action that uses them with a functional test. This just doesn't feel like the right way. Does anyone have advice or experience with this?
0
[ 2, 184, 20, 1289, 9919, 21062, 19, 10811, 27, 2240, 18, 17, 1289, 45, 45, 15464, 800, 3726, 3726, 95, 57, 21, 370, 3010, 19, 10811, 27, 2240, 18, 29, 151, 21062, 9, 109, 16, 158, 21062, 92, 44, 1502, 9, 31, 589, 699, 26, 21, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What causes a TCP/IP reset (RST) flag to be sent? === I'm trying to figure out why my app's TCP/IP connection keeps hiccuping every 10 minutes. I ran Wireshark and discovered that after 10 minutes of inactivity the other end is sending a packet with the reset (RST) flag set. A google search tells me "the RESET flag signifies that the receiver has become confused and so wants to abort the connection" but that is a little short of the detail I need. What could be causing this? And is it possible that some router along the way is responsible for it or would this always come from the other endpoint?
0
[ 2, 98, 4047, 21, 13, 38, 7439, 118, 4307, 23422, 13, 5, 1224, 38, 6, 3157, 20, 44, 795, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 1465, 70, 483, 51, 4865, 22, 18, 13, 38, 7439, 118, 4307, 2760, 8968, 746, 596, 10407, 68, 352...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
http to https to http using mod_rewrite and j_security_check === Ok I have an apache IBM HTTP Server WAS 6.1 setup I have my certs correctly installed and can successfully load http and https pages. After a successful j_security_check authentication via https I want the now authorized page (and all subsequent pages) to load as http I want this all to work with mod_rewrite because I don't want to change application code for something that really should be simple to do on the webserver. I would think this would work but it doesn't and fear it's because j_security_check is bypassing mod_rewrite somehow. RewriteCond %{HTTPS} =off RewriteCond %{THE_REQUEST} login\.jsp.*action=init [OR] RewriteCond %{THE_REQUEST} login\.jsp.*action=submit RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L] <<-- this rule is working RewriteCond %{HTTPS} =on RewriteCond %{THE_REQUEST} !login\.jsp.*action=init [OR] RewriteCond %{THE_REQUEST} !login\.jsp.*action=submit RewriteRule .* http://%{SERVER_NAME}%{REQUEST_URI} [R,L] <--- this rule is not working or the condition is not returning true I know the [R,L] will force the executed rule to be the last rule to run on a request and redirect accordingly.
0
[ 2, 7775, 20, 7775, 18, 20, 7775, 568, 7226, 1, 99, 23716, 17, 487, 1, 17749, 1, 12542, 800, 3726, 3726, 5854, 31, 57, 40, 17140, 10233, 7775, 8128, 23, 400, 9, 165, 18161, 31, 57, 51, 13, 17580, 18, 12044, 4066, 17, 92, 3673, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 get the SID of the current Windows account? === I am looking for an easy way to get the SID for the current Windows user account. I know I can do it through WMI, but I don't want to go that route.
0
[ 2, 184, 92, 31, 164, 14, 7027, 16, 14, 866, 1936, 2176, 60, 800, 3726, 3726, 31, 589, 699, 26, 40, 2010, 161, 20, 164, 14, 7027, 26, 14, 866, 1936, 4155, 2176, 9, 31, 143, 31, 92, 107, 32, 120, 619, 1435, 15, 47, 31, 221, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
how to pass variables like arrays / datatable to SQL server ? === Sometimes you need to upgrade the database with many rows that you have in a datatable or you have an array full of data, instead of putting all this data together in a string and then splitting in SQL SERVER, or instead of iterating the datatable in the code row by row and updating database, is there any other way? Is there other type of variables besides the traditional ones in SQL SERVER 2005?
0
[ 2, 184, 20, 1477, 12157, 101, 7718, 18, 13, 118, 1054, 5924, 20, 4444, 255, 8128, 13, 60, 800, 3726, 3726, 1030, 42, 376, 20, 9483, 14, 6018, 29, 151, 11295, 30, 42, 57, 19, 21, 1054, 5924, 54, 42, 57, 40, 7718, 503, 16, 1054,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Updating many-to-one relationship === I have a User object that has a Country object on it. I map this with a many-to-one tag in the User mapping file: <many-to-one name="Country" column="CountryID" cascade="none"/> How do I update a User's country? At the moment my UI has a dropdown of countries and the ID of the new country is passed to the controller. The controller then sets the ID of the User's country from that value. So: var user = session.Get<User>(userID); user.Country.ID = Convert.ToInt32(Request.Form["Country_ID"]); But when I call: session.SaveOrUpdate(user); I get an error saying that "identifier of an instance of Country was altered from 7 to 8". Presumably this is because the Country object is marked as dirty by NHibernate? I don't want to update the country object though, just the ID reference in the User. Is it possible to do it this way? Thanks, Jon
0
[ 2, 71, 43, 1880, 151, 8, 262, 8, 849, 1429, 800, 3726, 3726, 31, 57, 21, 4155, 3095, 30, 63, 21, 475, 3095, 27, 32, 9, 31, 2942, 48, 29, 21, 151, 8, 262, 8, 849, 3383, 19, 14, 4155, 13305, 3893, 45, 13, 1, 14842, 8, 262, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Howto? Parameters and LIKE statement SQL === I am writing a searching function, and have thought up of this query using parameters to prevent, or at least limit, SQL injection attacks. However, when I run it through my program it does not return anything: `SELECT * FROM compliance_corner WHERE (body LIKE '%@query%') OR (title LIKE '%@query%')` Can parameters be used like this? or are they only valid in an instance such as: `SELECT * FROM compliance_corner WHERE body LIKE '%<string>%'` (where `<string>` is the search object).
0
[ 2, 184, 262, 60, 12905, 17, 101, 3331, 4444, 255, 800, 3726, 3726, 31, 589, 1174, 21, 5792, 1990, 15, 17, 57, 289, 71, 16, 48, 25597, 568, 12905, 20, 2501, 15, 54, 35, 639, 4496, 15, 4444, 255, 13646, 3080, 9, 207, 15, 76, 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...
Sorting PHP Iterators === Is there a simple way to sort an iterator in PHP (without just pulling it all into an array and sorting that). The specific example I have is a <a href="http://www.php.net/directoryiterator">DirectoryIterator</a> but it would be nice to have a solution general to any iterator. $dir = new DirectoryIterator('.'); foreach ($dir as $file) echo $file->getFilename(); I'd like to be able to sort these by various criteria (filename, size, etc)
0
[ 2, 2058, 68, 13, 26120, 32, 106, 9922, 800, 3726, 3726, 25, 80, 21, 1935, 161, 20, 2058, 40, 32, 106, 3457, 19, 13, 26120, 13, 5, 14506, 114, 3303, 32, 65, 77, 40, 7718, 17, 2058, 68, 30, 6, 9, 14, 1903, 823, 31, 57, 25, 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...
Select one column DISTINCT SQL === Is there a way to do a single column "DISTINCT" match when I don't care about the other columns returned? Example: **Table** Value A, Value L, Value P Value A, Value Q, Value Z I need to return only one of these rows based on what is in the first one (Value A). I still need results from the second and third columns (the second should actually match all across the board anyway, but the third is a unique key, which I need at least one of). Here's what I've got so far, although it doesn't work obviously: SELECT value, attribute_definition_id, value_rk FROM attribute_values WHERE value IN ( SELECT value, max(value_rk) FROM attribute_values ) ORDER BY attribute_definition_id I'm working in ColdFusion so if there's a simple workaround in that I'm open to that as well. NOTE: value_rk is not a number, but max works on it based on character values I assume
0
[ 2, 5407, 53, 4698, 4421, 4444, 255, 800, 3726, 3726, 25, 80, 21, 161, 20, 107, 21, 345, 4698, 13, 7, 25911, 7, 730, 76, 31, 221, 22, 38, 781, 88, 14, 89, 7498, 587, 60, 823, 45, 13, 1409, 5924, 1409, 1923, 21, 15, 1923, 644,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 use an asp.net user control in another user control? === I have a user control (gallery.ascx) and I want to use the photo.ascx control in the gallery control. I've added this register at the top of gallery.ascx, but it still can't find photo: <%@ Register TagPrefix="ssctrl" TagName="photo" Src="controls/photo.ascx" %> Any ideas?
0
[ 2, 184, 107, 31, 275, 40, 28, 306, 9, 2328, 4155, 569, 19, 226, 4155, 569, 60, 800, 3726, 3726, 31, 57, 21, 4155, 569, 13, 5, 14074, 3849, 9, 472, 150, 396, 6, 17, 31, 259, 20, 275, 14, 3056, 9, 472, 150, 396, 569, 19, 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...
Is there a good embeddable code widget for blogs === My co-founder is currently asking on our blog for an embeddable code widget. http://devver.net/blog/2008/10/someone-please-build-an-awesome-embeddable-code-widget/ Basically we want something like http://pastie.org/ or http://codepad.org/ but we really want to embed the code section in our blog. We know there are plugins for common blogs and server side solutions, but it would be great to be able to just embed a little javascript and have nicely formatted code anywhere... Does something like this exist? Have we just missed it?
0
[ 2, 25, 80, 21, 254, 11911, 69, 43, 579, 1797, 4807, 43, 3060, 26, 8146, 18, 800, 3726, 3726, 51, 326, 8, 7628, 25, 871, 3379, 27, 318, 8146, 26, 40, 11911, 69, 43, 579, 1797, 4807, 43, 3060, 9, 7775, 6903, 14438, 2304, 9, 2328...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 is SomeClass<? super T> not equivalent to SomeClass<T> in Java generic types? === I noticed the specificaition for Collections.sort: public static <T> void sort(List<T> list, Comparator<? super T> c) Why is the "`? super`" necessary here? If `ClassB` extends `ClassA`, then wouldn't we have a guarantee that a `Comparator<ClassA>` would be able to compare two `ClassB` objects anyway, without the "`? super`" part? In other words, given this code: List<ClassB> list = . . . ; Comparator<ClassA> comp = . . . ; Collections.sort(list, comp); why isn't the compiler smart enough to know that this is OK even without specifying "`? super`" for the declaration of Collections.sort()? ------- Here is a short sample program that illustrates this: public class Test { //identical to Collections.sort() public static <T> void mySort1(List<T> list, Comparator<? super T> c) { Collections.sort(list, c); } //doesn't use "? super" in the identifier for comparator public static <T> void mySort2(List<T> list, Comparator<T> c) { Collections.sort(list, c); } private static class ClassA { private final int valA; public ClassA(int v) { valA = v; } public int getVal() { return valA; } public String toString() { return Integer.toString(getVal()); } } private static class ClassB extends ClassA { private final int valB; public ClassB(int v) { super(-1); valB = v; } //overrides ClassA.getVal() public int getVal() { return valB; } } private final static class ClassAComparator implements Comparator<ClassA> { private final static ClassAComparator instance = new ClassAComparator(); private ClassAComparator() {} //hide constructor public static ClassAComparator getInstance() { return instance; } public int compare(ClassA o1, ClassA o2) { return o1.getVal() - o2.getVal(); } } //------------------------------------- // Test the code //------------------------------------- public static void main(String [] args) { Comparator<ClassA> compA = ClassAComparator.getInstance(); //List1: all ClassA objects in list //------------------------------------------------------- List<ClassA> list1 = new ArrayList<ClassA>(); for(int i = 1; i <= 10; i++) list1.add(new ClassA(i)); Collections.shuffle(list1); mySort1(list1, compA); //OK System.out.println(Arrays.toString(list1.toArray())); //verified: sorted properly Collections.shuffle(list1); mySort2(list1, compA); //still OK System.out.println(Arrays.toString(list1.toArray())); //verified: sorted properly //List2: mixture of ClassA and ClassB objects in list //------------------------------------------------------- List<ClassA> list2 = new ArrayList<ClassA>(); for(int i = 1; i <= 10; i++) list2.add(i%2==0 ? new ClassA(i) : new ClassB(i)); Collections.shuffle(list2); mySort1(list2, compA); //OK System.out.println(Arrays.toString(list2.toArray())); //verified: sorted properly Collections.shuffle(list2); mySort2(list2, compA); //still OK System.out.println(Arrays.toString(list2.toArray())); //verified: sorted properly //List3: all ClassB objects in list //------------------------------------------------------- List<ClassB> list3 = new ArrayList<ClassB>(); for(int i = 1; i <= 10; i++) list3.add(new ClassB(i)); Collections.shuffle(list3); mySort1(list3, compA); //OK System.out.println(Arrays.toString(list3.toArray())); //verified: sorted properly Collections.shuffle(list3); mySort2(list3, compA); //Gives compilation error! System.out.println(Arrays.toString(list3.toArray())); } }
0
[ 2, 483, 25, 109, 1898, 1, 60, 1026, 13, 38, 1, 52, 4602, 20, 109, 1898, 1, 38, 1, 19, 8247, 12733, 2551, 60, 800, 3726, 3726, 31, 2711, 14, 1903, 58, 9861, 26, 5721, 9, 22843, 45, 317, 12038, 13, 1, 38, 1, 11364, 2058, 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...
What does the new Facebook Connect platform offer over a traditional Facebook App? === [Facebook Connect][1] seems like the cool new way to leverage a user's Facebook account on your own site (get their friends list, write to their profile, etc). What I don't understand is what the new Facebook Connect platform offers over a traditional Facebook App with the Offline Access permission granted. Can anyone help me out by providing a clear explanation of the differences between the two options? When would it be better to use one over the other? [1]: http://developers.facebook.com/connect.php
0
[ 2, 98, 630, 14, 78, 9090, 6379, 2452, 1994, 84, 21, 1361, 9090, 4865, 60, 800, 3726, 3726, 636, 6413, 5199, 6379, 500, 2558, 165, 500, 2206, 101, 14, 2700, 78, 161, 20, 19414, 21, 4155, 22, 18, 9090, 2176, 27, 154, 258, 689, 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...
Changing the name in the header for a resource handler in C# === I have a resource handler that is Response.WriteFile(fileName) based on a parameter passed through the querystring. I am handling the mimetype correctly, but the issue is in some browsers, the filename comes up as Res.ashx (The name of the handler) instead of MyPdf.pdf (the file I am outputting). Can someone inform me how to change the name of the file when it is sent back to the server? Here is my code: // Get the name of the application string application = context.Request.QueryString["a"]; string resource = context.Request.QueryString["r"]; // Parse the file extension string[] extensionArray = resource.Split(".".ToCharArray()); // Set the content type if (extensionArray.Length > 0) context.Response.ContentType = MimeHandler.GetContentType( extensionArray[extensionArray.Length - 1].ToLower()); // clean the information application = (string.IsNullOrEmpty(application)) ? "../App_Data/" : application.Replace("..", ""); // clean the resource resource = (string.IsNullOrEmpty(resource)) ? "" : resource.Replace("..", ""); string url = "./App_Data/" + application + "/" + resource; context.Response.WriteFile(url);
0
[ 2, 4226, 14, 204, 19, 14, 157, 106, 26, 21, 6577, 24641, 19, 272, 5910, 800, 3726, 3726, 31, 57, 21, 6577, 24641, 30, 25, 1627, 9, 23716, 16877, 5, 16877, 7259, 6, 432, 27, 21, 18906, 1100, 120, 14, 25597, 11130, 9, 31, 589, 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...
Passing state to a callback in JavaScript an appropriate use of closures? === Suppose you want to make an async request in JavaScript, but you want to pass some state along to the callback method. Is the following an appropriate use of closures in JavaScript? function getSomethingAsync(someState, callback) { var req = abc.createRequestObject(someParams); req.invoke(makeCallback(someState, callback)); } function makeCallback(someState, callback) { return function getSomethingCallback(data) { var result = processDataUsingState(data, someState); callback(result); // alternately/optionally pass someState along to result } } If not, is there a better or more idiomatic way?
0
[ 2, 2848, 146, 20, 21, 645, 1958, 19, 8247, 8741, 40, 4593, 275, 16, 7790, 18, 60, 800, 3726, 3726, 5787, 42, 259, 20, 233, 40, 21, 9507, 150, 3772, 19, 8247, 8741, 15, 47, 42, 259, 20, 1477, 109, 146, 303, 20, 14, 645, 1958, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Reading files from own domain results in 404 === When I try to use `curl` or `file_get_contents` to read something like http://example.com/python/json/ from http://example.com/ I should be getting a JSON response, but instead I get a 404 error. Using curl or any other method outside my own domain works perfectly well. echo file_get_contents('http://example.com/python/json/'); => 404 echo file_get_contents('http://google.com'); => OK The same script works on my laptop, but I can't figure out what the difference is.
0
[ 2, 1876, 6488, 37, 258, 4603, 1736, 19, 13, 23397, 800, 3726, 3726, 76, 31, 1131, 20, 275, 13, 1, 4734, 255, 1, 54, 13, 1, 16877, 1, 3060, 1, 25424, 18, 1, 20, 1302, 301, 101, 7775, 6903, 29041, 9, 960, 118, 6448, 11570, 118, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 a Class Object to a function (probably by pointer not reference) C++ === So let's say I have two different functions. One is a part of the BST class, one is just a helper function that will call on that Class function. I will list them out here. sieve(BST<T>* t, int n); this function is called like this: sieve(t,n) the object is called BST<int> t; I'm going to be using the class remove function within the sieve function to remove specific objects. I'm not sure what my prototype for this basic function should look like? Doing this: sieve<BST<int> t, int n) What happens here is everything compiles just fine, but when t.remove function is called I see no actual results. I'm assuming because it's just creating a copy or a whole other t object instead of passing the one from my main() function. If I call the remove function (t.remove(value)) in my main function where the original object was created it removes everything properly. Once I start doing it through my sieve function I see no change when I re print it out from my main function. So my main function looks something like this: int main () { int n, i, len; BST<int> t; cin >> n; vector<int> v(n); srand(1); for (i = 0; i < n; i++) v[i] = rand() % n; for (i = 0; i < n; i++) t.insert(v[i]); print_stat(t); t.inOrder(print_data); sieve(v,t,n); print_stat(t); t.inOrder(print_data); return 0; } So my results end up being the same, even though my debug statements within the functions show it's actually deleting something. I'm guessing where I'm going wrong is how I am passing the t object onto the function.
0
[ 2, 2848, 21, 718, 3095, 20, 21, 1990, 13, 5, 14097, 34, 454, 106, 52, 2801, 6, 272, 20512, 800, 3726, 3726, 86, 408, 22, 18, 395, 31, 57, 81, 421, 3719, 9, 53, 25, 21, 141, 16, 14, 334, 384, 718, 15, 53, 25, 114, 21, 448, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
is something similar to ServiceLoader in Java 1.5? === Hello i want to discover at runtime classes in the classpath which implements a defined interface. ServiceLoader suits well (i think, i haven't used it), but i need do it in Java 1.5. any ideas?
0
[ 2, 25, 301, 835, 20, 365, 8294, 106, 19, 8247, 137, 9, 264, 60, 800, 3726, 3726, 10975, 31, 259, 20, 6297, 35, 485, 891, 2684, 19, 14, 718, 8353, 56, 8713, 18, 21, 2811, 6573, 9, 365, 8294, 106, 12702, 134, 13, 5, 49, 277, 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...
Get Drive Size in Java 5 === I want to get the size of a drive (or UNC path pointing to a partition would be nice, but not required), as well as free space for said drive (or UNC path). This doesn't need to work cross platform; only in Windows. I know it's easy to do in Java 6, but that's not an option; I'm stuck with Java 5. I can get the free space available by doing: >cmd.exe /c Z:\ /-c > >or > >cmd.exe /c \\\\server\share /-c and just parsing out the resulting bytes free. However I can't seem to find a way to get the total drive size. Any suggestions?
0
[ 2, 164, 1493, 1072, 19, 8247, 331, 800, 3726, 3726, 31, 259, 20, 164, 14, 1072, 16, 21, 1493, 13, 5, 248, 16061, 2013, 6832, 20, 21, 10711, 83, 44, 2210, 15, 47, 52, 1390, 6, 15, 28, 134, 28, 551, 726, 26, 87, 1493, 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...
How to get GDI objects associated to a process === I am looking for a tool (like **tasklist**) to get the GDI objects associated to a process. I can see the GDI objects in taskmanager, But my requirement to capture it periodically somewhere. For example in a text file.
0
[ 2, 184, 20, 164, 489, 1115, 3916, 1598, 20, 21, 953, 800, 3726, 3726, 31, 589, 699, 26, 21, 5607, 13, 5, 1403, 13, 1409, 38, 20310, 5739, 1409, 6, 20, 164, 14, 489, 1115, 3916, 1598, 20, 21, 953, 9, 31, 92, 196, 14, 489, 111...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
ActiveRecord find starts with === Really simple question - how do I do a search to find all records where the name starts with a certain string in ActiveRecord. I've seen all sorts of bits all over the internet where verbatim LIKE SQL clauses are used - but from what I've heard that isn't the 'correct' way of doing it. Is there a 'proper' Rails way?
0
[ 2, 1348, 14953, 477, 3244, 29, 800, 3726, 3726, 510, 1935, 1301, 13, 8, 184, 107, 31, 107, 21, 2122, 20, 477, 65, 742, 113, 14, 204, 3244, 29, 21, 1200, 3724, 19, 1348, 14953, 9, 31, 22, 195, 541, 65, 14357, 16, 10181, 65, 84,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 hashing algorithm in terms of hash collisions and performance === What would be the best hashing algorithm if we had the following priorities (in that order): 1. Minimal hash collisions 2. Performance It doesn't have to be secure. Any references to c# implementations would be appreciated.
0
[ 2, 246, 19170, 68, 9083, 19, 1663, 16, 19170, 11319, 18, 17, 956, 800, 3726, 3726, 98, 83, 44, 14, 246, 19170, 68, 9083, 100, 95, 41, 14, 249, 20872, 13, 5, 108, 30, 389, 6, 45, 137, 9, 8663, 19170, 11319, 18, 172, 9, 956, 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...
ordering by collection count in nhibernate === Is there a way of ordering a list of objects by a count of a property which is a collection? For arguments sake let's say I have a question object with a question name property, a property that is a collection of answer objects and another property that is a collection of user objects. The users join the question table via foreign key on question table and answers are joined with middle joining table. If I want nhibernate to get a list of "question" objects could I order it by Question.Answers.Count? i've tried the documentation's example using HQL: List<Question> list = nhelper.NHibernateSession .CreateQuery("Select q from Question q left join q.Answers a group by q,a order by count(a)") .List<Question>(); but i get "column Question.Name is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause" I've tried adding all the properties to the group by list but it doesn't work. What happens then is that foreign key userId causes the same error as above but i can't include it in the group by as nhibernate lists it as Question.Users.UserId which doesn't solve it if included. any ideas?
0
[ 2, 15775, 34, 1206, 2468, 19, 12109, 15191, 8820, 800, 3726, 3726, 25, 80, 21, 161, 16, 15775, 21, 968, 16, 3916, 34, 21, 2468, 16, 21, 1354, 56, 25, 21, 1206, 60, 26, 10553, 8132, 408, 22, 18, 395, 31, 57, 21, 1301, 3095, 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 do I implement "create" controller action for a view with many fields in ASP.NET MVC === I'm new to ASP.NET MVC so this may be a stupid question. I have an account object that has many parameters. I've figured out a strategy to break this down into a "wizard"-like interface that will walk a user through collecting the required fields to create the initial business objects. It will then step through pages to collect other, optional, parameters. This way the user isn't faced with a single page on which they have to enter 30 things (I'm probably exaggerating the number, but you get the idea). Still, the first page is going to have 10-12 items that the user needs to fill out before I can fill in all the required fields on the 2-3 business objects that accompany a successful registration. Basically, a new user needs to both get an account AND register for an event at the same time, thus the number of items. In ASP.NET MVC it appears that all of my form parameters map onto method parameters in the controller method. Knowing that methods with lots of parameters are considered a _code smell_ that ought to be refactored out, I'm wondering if there is a different way to accomplish this or if I'm stuck with a controller method that has a one-to-one mapping between form parameters and method parameters. Is there a good known pattern that I've missed in my Google searches to solve this problem?
0
[ 2, 184, 107, 31, 8713, 13, 7, 6037, 1373, 7, 9919, 1028, 26, 21, 1418, 29, 151, 2861, 19, 28, 306, 9, 2328, 307, 8990, 800, 3726, 3726, 31, 22, 79, 78, 20, 28, 306, 9, 2328, 307, 8990, 86, 48, 123, 44, 21, 3553, 1301, 9, 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...
JSF and SunOne Webserver 6.1 === Does anybody know which JSF version is most suitable to use when deploying to SunOne 6.1 SP2 Webserver? More important where I can find that type of information? Thanks, Alejo
0
[ 2, 487, 18, 410, 17, 939, 849, 2741, 10321, 106, 400, 9, 165, 800, 3726, 3726, 630, 11181, 143, 56, 487, 18, 410, 615, 25, 127, 6445, 20, 275, 76, 17617, 68, 20, 939, 849, 400, 9, 165, 3782, 135, 2741, 10321, 106, 60, 91, 681,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0...
Benefits of DataBinding over Manually Querying / Adding to Control === I've been a C# programmer for about 2 years total, and professionally for a little more than 1. I work at a company as a developer on an application that began before the days of .NET 2. My question is this: What is the benefit to use databinding from sql directly to a control over querying and manually adding items to the control? Is this approach generally considered cleaner, and simpler in terms of deploying? Will there still be cases where manually adding would give more fine grained control over the display / value of the data? I'm asking because I've been assigned some bugs that deal with some controls that populate themselves based off query results, and would love to clean up unnecessary logic and push that off to the libraries to handle instead of me.
0
[ 2, 5800, 16, 1054, 22260, 84, 23671, 25597, 68, 13, 118, 4721, 20, 569, 800, 3726, 3726, 31, 22, 195, 74, 21, 272, 5910, 17968, 26, 88, 172, 122, 600, 15, 17, 13550, 26, 21, 265, 91, 119, 137, 9, 31, 170, 35, 21, 237, 28, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Design Question - Control Array === Ok, I know how to do this, but I want to know if this is the BEST way. I have a table called "Topics" which has a list of topics(obv). I have a page with about 20 (+/-10) check boxes with all the different topics a user can subscribe to. I figured the best way to do this is to make a control array of check boxes and populate it on page load. The issue is that the check boxes are in a unique arrangement, should I place them on the page and then dynamically populate them on load? Is that the best way to do it? I'm not too familiar with control arrays. Thanks!
0
[ 2, 704, 1301, 13, 8, 569, 7718, 800, 3726, 3726, 5854, 15, 31, 143, 184, 20, 107, 48, 15, 47, 31, 259, 20, 143, 100, 48, 25, 14, 246, 161, 9, 31, 57, 21, 859, 227, 13, 7, 3880, 8354, 7, 56, 63, 21, 968, 16, 7569, 5, 4995...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Silverlight 2 Sidebar Gadget === How do you display a Silverlight 2.0 application in a Vista Sidebar gadget? Whenever I load a gadget with the standard Silverlight 2 object tag, I get the no-silverlight default content instead of the app. So, what's the trick to allowing it to run?
0
[ 2, 1172, 3130, 172, 270, 1850, 25661, 800, 3726, 3726, 184, 107, 42, 3042, 21, 1172, 3130, 172, 9, 387, 3010, 19, 21, 13520, 270, 1850, 25661, 60, 6634, 31, 6305, 21, 25661, 29, 14, 1236, 1172, 3130, 172, 3095, 3383, 15, 31, 164, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 is lock(this) {...} bad? === The MSDN documentation says that public class SomeObject { public void SomeOperation() { lock(this) { //Access instance variables } } } is "is a problem if the instance can be accessed publicly". I'm wondering why? Is it because the lock will be held longer than necessary? Or is there some more insidious reason?
0
[ 2, 483, 25, 3991, 5, 1565, 6, 13, 1, 9, 9, 9, 1, 896, 60, 800, 3726, 3726, 14, 4235, 43, 103, 13945, 898, 30, 317, 718, 109, 23793, 13, 1, 317, 11364, 109, 11377, 5, 6, 13, 1, 3991, 5, 1565, 6, 13, 1, 12894, 20604, 4851, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Library to check QueryStrings === Is there a library out there which I can use in my current ASP.NET app, to validate queryStrings? Thanks
0
[ 2, 13, 9, 2328, 1248, 20, 2631, 25597, 11130, 18, 800, 3726, 3726, 25, 80, 21, 1248, 70, 80, 56, 31, 92, 275, 19, 51, 866, 28, 306, 9, 2328, 4865, 15, 20, 7394, 1373, 25597, 11130, 18, 60, 3669, 3, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Using complex data types from Java in Axis webservice === I am currently developing a Java app which handles a SOAP webservice. The problem lies after I parse the WSDL [the **Parser** object from Apache Axis does it for me], and I create the call. When I try to invoke it, I have to pass a Object[] to assign the parameters [taken from the Action of the WSDL]. A normal action is easy, but when I have custom datatypes, I can't get it to fill it out for me. I try to pass Object[]{ new Object { }}, but it assigns the first field instead. I can't pass it already processed, because it changes the '< >' to '--lt --gt', and the server doesn't recognize it'. This is a fragment of the WSDL. > <s:element name="FERecuperaQTYRequest"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="argAuth" type="tns:FEAuthRequest" /> </s:sequence> </s:complexType> </s:element> <s:complexType name="FEAuthRequest"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Token" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="Sign" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="cuit" type="s:long" /> </s:sequence> </s:complexType> And this is the troublesome Java Fragment QTY = (String) call.invoke ( new Object[]{ new Object[]{ tokenConexion.getToken (), tokenConexion.getSign (), tokenConexion.getCUIT () } });
0
[ 2, 568, 1502, 1054, 2551, 37, 8247, 19, 8577, 2741, 11449, 800, 3726, 3726, 31, 589, 871, 3561, 21, 8247, 4865, 56, 3053, 18, 21, 6447, 2741, 11449, 9, 14, 1448, 1966, 75, 31, 2017, 870, 14, 619, 18, 8643, 636, 124, 13, 1409, 35...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Do any DLLs exist that implement luac's functionality? === Does anyone know of any DLLs (preferably .net, but could be anything) that encapsulate the lua 5.1 compiler? I'm working on a .net project where part of it needs to compile lua scripts, and i would rather have a DLL that i could send script code to instead of sending the script to a temporary file and running luac.exe.
0
[ 2, 107, 186, 13, 43, 211, 18, 3182, 30, 8713, 1612, 1738, 22, 18, 18548, 60, 800, 3726, 3726, 630, 1276, 143, 16, 186, 13, 43, 211, 18, 13, 5, 3515, 2407, 4801, 13, 9, 2328, 15, 47, 110, 44, 602, 6, 30, 1957, 4666, 18, 12383...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Create an empty object in JavaScript with {} or new Object()? === There are two different ways to create an empty object in JavaScript: var objectA = {} var objectB = new Object() Is there any difference in how the script engine handles them? Is there any reason to use one over the other? Similarly it is also possible to create an empty array using different syntax: var arrayA = [] var arrayB = new Array()
0
[ 2, 1600, 40, 2424, 3095, 19, 8247, 8741, 29, 13, 1, 54, 78, 3095, 5, 6, 60, 800, 3726, 3726, 80, 50, 81, 421, 2847, 20, 1600, 40, 2424, 3095, 19, 8247, 8741, 45, 4033, 3095, 58, 800, 13, 1, 4033, 3095, 220, 800, 78, 3095, 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 you make a heterogeneous boost::map? === I want to have a map that has a homogeneous key type but heterogeneous data types. I want to be able to do something like (pseudo-code): boost::map<std::string, magic_goes_here> m; m.add<int>("a", 2); m.add<std::string>("b", "black sheep"); int i = m.get<int>("a"); int j = m.get<int>("b"); // error! I could have a pointer to a base class as the data type but would rather not. I've never used boost before but have looked at the fusion library but can't figure out what I need to do. Thanks for your help.
0
[ 2, 184, 107, 42, 233, 21, 14154, 9181, 1291, 10419, 45, 45, 15022, 60, 800, 3726, 3726, 31, 259, 20, 57, 21, 2942, 30, 63, 21, 13, 24845, 1246, 1001, 47, 14154, 9181, 1291, 1054, 2551, 9, 31, 259, 20, 44, 777, 20, 107, 301, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Select from Select statement? === In MS SQL 2005 or T-SQL, you can do something like: SELECT T.NAME, T.DATE FROM (SELECT * FROM MyTable WHERE ....) AS T I failed to try the similar SQL on Oracle 9i DB. In MS SQL, the nested SQL is treated as a temporary/dynamic view created on fly and destroyed afterward. How can I do the similar thing in Oracle? I really don't want to create a view to do it.
0
[ 2, 5407, 37, 5407, 3331, 60, 800, 3726, 3726, 19, 4235, 4444, 255, 812, 54, 13, 38, 8, 18, 22402, 15, 42, 92, 107, 301, 101, 45, 5407, 13, 38, 9, 7259, 15, 13, 38, 9, 8209, 37, 13, 5, 18, 16964, 1637, 37, 51, 5924, 113, 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...
Embedded systems worst practices? === What would you consider "worst practices" to follow when developing an embedded system? Some of my ideas of what not to do are: <ol> <li>Avoid abstracting the hardware layer, instead spreading hardware accesses throughout the code.</li> <li>Not having any type of emulation environment, having only the actual hardware to exe/cute on.</li> <li>Avoiding unit tests, perhaps due to the above two points</li> <li>Not developing the system in a layered structure, so that higher up layers could depend on lower layers functionality debugged and working</li> </ol> I'm sure there are plenty of good ideas out there on what not to do, let's hear them!
0
[ 2, 12138, 1242, 4126, 5242, 60, 800, 3726, 3726, 98, 83, 42, 3563, 13, 7, 10041, 384, 5242, 7, 20, 1740, 76, 3561, 40, 12138, 329, 60, 109, 16, 51, 3478, 16, 98, 52, 20, 107, 50, 45, 13, 1, 1823, 1, 13, 1, 1210, 1, 13884, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Invoking javascript in iframe from parent page === Basically, I have an iframe embedded in a page and the iframe has some javascript routines I need to invoke from the parent page. Now the opposite is quite simple as you only need to call `parent.functionName()` but unfortunately I need exactly the opposite of that.
0
[ 2, 19, 2625, 1581, 8247, 8741, 19, 31, 8361, 37, 4766, 2478, 800, 3726, 3726, 11374, 15, 31, 57, 40, 31, 8361, 12138, 19, 21, 2478, 17, 14, 31, 8361, 63, 109, 8247, 8741, 8275, 18, 31, 376, 20, 28371, 37, 14, 4766, 2478, 9, 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...
typedefs for templated classes? === Is it possible to `typedef` long types that use templates? For example: template <typename myfloat_t> class LongClassName { // ... }; template <typename myfloat_t> typedef std::vector< boost::shared_ptr< LongClassName<myfloat_t> > > LongCollection; LongCollection<float> m_foo; This doesn't work, but is there a way to achieve a similar effect? I just want to avoid having to type and read a type definition that covers almost the full width of my editor window.
0
[ 2, 1001, 13862, 18, 26, 22894, 43, 2684, 60, 800, 3726, 3726, 25, 32, 938, 20, 13, 1, 4474, 13862, 1, 175, 2551, 30, 275, 22894, 18, 60, 26, 823, 45, 22894, 13, 1, 4474, 7259, 51, 14712, 721, 1, 38, 1, 718, 175, 1898, 7259, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 perform an "or" operation in LINQ to objects? === Looking up LINQ and Or in google is proving somewhat difficult so here I am. I want to so the following: (from creditCard in AvailableCreditCards where creditCard.BillToName.ToLowerInvariant().Contains(txtFilter.Text.ToLowerInvariant()) **or creditCard.CardNumber.().Contains(txtFilter.Text)** orderby creditCard.BillToName select creditCard)
0
[ 2, 92, 31, 2985, 40, 13, 7, 248, 7, 1453, 19, 6294, 1251, 20, 3916, 60, 800, 3726, 3726, 699, 71, 6294, 1251, 17, 54, 19, 8144, 25, 15333, 4131, 1956, 86, 235, 31, 589, 9, 31, 259, 20, 86, 14, 249, 45, 13, 5, 2665, 3251, 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...
Passing int list as a parameter to a web user control === I want to pass an int list (List<int>) as a declarative property to a web user control like this: <UC:MyControl runat="server" ModuleIds="1,2,3" /> I created a TypeConverter to do this: public class IntListConverter : System.ComponentModel.TypeConverter { public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, Type sourceType) { if (sourceType == typeof(string)) return true; return base.CanConvertFrom(context, sourceType); } public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) { string val = value as string; string[] vals = val.Split(','); System.Collections.Generic.List<int> ints = new System.Collections.Generic.List<int>(); foreach (string s in vals) ints.Add(Convert.ToInt32(s)); return ints; } } And then added the attribute to my property: [TypeConverter(typeof(IntegerListConverter))] public List<int> ModuleIds { get { ... }; set { ... }; } But I get this error at runtime: Unable to generate code for a value of type 'System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'. This error occurred while trying to generate the property value for ModuleIds. My question is similar to one found [here][1], but the solution does not solve my problem: [1]: http://stackoverflow.com/questions/116797/passing-int-array-as-parameter-in-web-user-control
0
[ 2, 2848, 19, 38, 968, 28, 21, 18906, 20, 21, 2741, 4155, 569, 800, 3726, 3726, 31, 259, 20, 1477, 40, 19, 38, 968, 13, 5, 5739, 1, 6391, 1, 6, 28, 21, 121, 12078, 3366, 1354, 20, 21, 2741, 4155, 569, 101, 48, 45, 13, 1, 63...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Script a ruby command-line app; best way to do this? === I have a command line Ruby app I'm developing and I want to allow a user of it to provide code that will run as a filter on part of the process. Basically, the application does this: 1. read in some data 2. If a filter is specified, use it to filter data 3. process the data I want the filtering process (step 2) to be as flexible as possible. My thinking was that the user could provide a Ruby file that set a known constant to point to an object implement an interface I define, e.g.: # user's filter class MyFilter def do_filter(array_to_filter) filtered_array = Array.new # do my filtering on array_to_filter filtered_array end FILTER = MyFilter.new My apps code would then do something like this array_that_might_get_filtered = get_my_array() if (options.filter_file) require options.filter_file array_that_might_get_filtered = FILTER.do_filter(array_that_might_get_filtered) end While this would work, it feels cheesy and it seems like there should be a better way to do this. I also considered having the filter be in the form of adding a method of a known name to a known class, but that didn't seem quite right, either. Is there a better idiom in Ruby for this?
0
[ 2, 3884, 21, 10811, 1202, 8, 1143, 4865, 73, 246, 161, 20, 107, 48, 60, 800, 3726, 3726, 31, 57, 21, 1202, 293, 10811, 4865, 31, 22, 79, 3561, 17, 31, 259, 20, 1655, 21, 4155, 16, 32, 20, 1181, 1797, 30, 129, 485, 28, 21, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Asking for code design advice: working with VB.Net and Ms-Access === Perhaps naively, I created a class (AdminDatabase) to handle connection to different MS-Access database files (see code at bottom). The purpose of the class was to allow retrieval of data from a MS-Access database and to manipulate the data. This works well. I can feed an instance of the AdminDatabase class an SQL statement and fill a dataTable with the result (*getDataTable* method in the **code** section. Now I have added data sets to the project using Visual Studio's data designer. Now I am a bit confused. The AdminDatabase class set's the connection string once the user has chosen the relevant data file. Since the new data sets also use the same setting, My.Settings.AdminConnectionString for the connection, which brings me to my questions: 1. After instantiating a AdminDatabase object, can I assume that the data sets I created using the data designer will connect to the MS-Access database file chosen by the user at run time? 2. Should I write methods in my connection class to access data in the or would accessing the data sets directly be ok? I guess I could just have a method somewhere to set the connection string setting in the project. 3. How else can I approach this? ### Code ### <pre> public class AdminDatabase ' stores the connection string which is set in the New() method dim strAdminConnection as string public sub New() ... adminName = dlgopen.FileName conAdminDB = New OleDbConnection conAdminDB.ConnectionString = "Data Source='" + adminName + "';" + _ "Provider=Microsoft.ACE.OLEDB.12.0" ' store the connection string in strAdminConnection strAdminConnection = conAdminDB.ConnectionString.ToString() My.Settings.SetUserOverride("AdminConnectionString", strAdminConnection) ... End Sub ' retrieves data from the database Public Function getDataTable(ByVal sqlStatement As String) As DataTable Dim ds As New DataSet Dim dt As New DataTable Dim da As New OleDbDataAdapter Dim localCon As New OleDbConnection localCon.ConnectionString = strAdminConnection Using localCon Dim command As OleDbCommand = localCon.CreateCommand() command.CommandText = sqlStatement localCon.Open() da.SelectCommand = command da.Fill(dt) getDataTable = dt End Using End Function End Class </pre>
0
[ 2, 3379, 26, 1797, 704, 4978, 45, 638, 29, 13, 20468, 9, 2328, 17, 4235, 8, 20604, 800, 3726, 3726, 1774, 16288, 102, 15, 31, 679, 21, 718, 13, 5, 1283, 2160, 18768, 8436, 6, 20, 3053, 2760, 20, 421, 4235, 8, 20604, 6018, 6488, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Running Visual Studio 2008 x86 on Windows Vista x64? === Is it possible to run the 32-bit version of Visual Studio 2008 Professional on a Windows Vista 64-bit system? - Are there any known cavates that I would need to be aware of? - I would have to install the x64 version of the .NET Framework correct? - Would there be any issues on building software targeted for x84? - Would there be any (justifiable) arguments for getting the x64 version of VS2008 instead of reusing the current x86 license? Quite tempted on getting a x64 Vista rig to be able to take advantage of more RAM :)
0
[ 2, 946, 3458, 1120, 570, 993, 3274, 27, 1936, 13520, 993, 3470, 60, 800, 3726, 3726, 25, 32, 938, 20, 485, 14, 2512, 8, 3326, 615, 16, 3458, 1120, 570, 736, 27, 21, 1936, 13520, 4384, 8, 3326, 329, 60, 13, 8, 50, 80, 186, 167,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Minimum time between subsequent AJAX calls === In AJAX applications that need to poll the server in regular intervals (like a chat applications), what is the recommended minimum time between two calls, so that the update is done as quickly as possible? What times are considered as hogs for the server and the client?
0
[ 2, 5187, 85, 128, 3147, 20624, 3029, 800, 3726, 3726, 19, 20624, 3767, 30, 376, 20, 4994, 14, 8128, 19, 1290, 15899, 13, 5, 1403, 21, 6615, 3767, 6, 15, 98, 25, 14, 5773, 5187, 85, 128, 81, 3029, 15, 86, 30, 14, 11100, 25, 677...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to get the function name as string in Python? === In Python, How do I get the function name as a string without calling the function? def my_function(): . . . print get_function_name_as_string(my_function) # my_function is not in quotes output => "my_function" is this available in python? if not, any idea how to write `get_function_name_as_string` in python?
0
[ 2, 184, 20, 164, 14, 1990, 204, 28, 3724, 19, 20059, 60, 800, 3726, 3726, 19, 20059, 15, 184, 107, 31, 164, 14, 1990, 204, 28, 21, 3724, 366, 2555, 14, 1990, 60, 6312, 51, 1, 22359, 5, 6, 45, 13, 9, 13, 9, 13, 9, 4793, 164...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 reference a input within a form in JQuery === An easy JQuery question. I have several identical forms ( except their name ) on one page with a few hidden inputs in each. I want to refer to them by using the form name and then the input name. ( the input names are not unique in my page ) So for instance: var xAmt = $('#xForm'+num).('#xAmt'); I really want to supply these values to an AJAX POST $.ajax({ url: "X.asp", cache: false, type: "POST", data: "XID=xID&xNumber=xNum&xAmt=xAmt", ... If I can get the values in the AJAX call even better.
0
[ 2, 184, 20, 2801, 21, 6367, 363, 21, 505, 19, 487, 8190, 93, 800, 3726, 3726, 40, 2010, 487, 8190, 93, 1301, 9, 31, 57, 238, 6323, 1997, 13, 5, 1613, 66, 204, 13, 6, 27, 53, 2478, 29, 21, 310, 3689, 6367, 18, 19, 206, 9, 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...
How can I create a video from a directory of images in C#? === I have a directory of bitmaps that are all of the same dimension. I would like to convert these bitmaps into a video file. I don't care if the video file (codec) is wmv or avi. My only requirement is that I specify the frame rate. This does not need to be cross platform, Windows only. I have read a few things about using the Windows Media SDK or DirectShow, but none of them are that explicit about providing code samples. Could anyone provide some insight, or some valuable resources that might help me to do this in C#? Thanks!
0
[ 2, 184, 92, 31, 1600, 21, 763, 37, 21, 16755, 16, 3502, 19, 272, 5910, 60, 800, 3726, 3726, 31, 57, 21, 16755, 16, 1142, 15022, 18, 30, 50, 65, 16, 14, 205, 9547, 9, 31, 83, 101, 20, 8406, 158, 1142, 15022, 18, 77, 21, 763, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
make an ID in a mysql table auto_increment (after the fact) === I acquired a database from another developer. He didn't use auto_incrementers on any tables. They all have primary key ID's, but he did all the incrementing manually, in code. Can I turn those into Auto_incrementers now?
0
[ 2, 233, 40, 4924, 19, 21, 51, 18, 22402, 859, 3108, 1, 28461, 13, 5, 5162, 14, 837, 6, 800, 3726, 3726, 31, 2020, 21, 6018, 37, 226, 10058, 9, 24, 223, 22, 38, 275, 3108, 1, 28461, 445, 27, 186, 7484, 9, 59, 65, 57, 1256, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 shrink a SQL Log file with Mirroring enabled? === I have several databases for my applications that use SQL 2005 mirroring to keep a nice copy of the data somewhere else. Works like a charm, however, the log file just seems to be growing and growing, one is at 15GB for a 3GB database. Normally, I can just shrink it - however a error pops up that this specficially cannot be done. But, it seems eventually if unchecked would just expand to use all the space on the drive. I see that I can set a maximum file size for the log file, is that the answer here? Will the log just roll when it hits the max, or will the DB just stop functioning? Thanks
0
[ 2, 184, 20, 16269, 21, 4444, 255, 6738, 3893, 29, 3402, 68, 9338, 60, 800, 3726, 3726, 31, 57, 238, 6018, 18, 26, 51, 3767, 30, 275, 4444, 255, 812, 3402, 68, 20, 643, 21, 2210, 4344, 16, 14, 1054, 3493, 962, 9, 693, 101, 21, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Casting in VB.Net === I would like to be able to cast a value dynamically where the type is known only on runtime. something lie this myvalue = ctype (value, "the type here could be string, integer or boolean but not know at this moment") Is this possible ? Thanks in advance.
0
[ 2, 9087, 19, 13, 20468, 9, 2328, 800, 3726, 3726, 31, 83, 101, 20, 44, 777, 20, 1325, 21, 1923, 7782, 1326, 113, 14, 1001, 25, 167, 104, 27, 485, 891, 9, 301, 2850, 48, 51, 15165, 800, 272, 4474, 13, 5, 15165, 15, 13, 7, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Dynamic class method invocation in PHP === Is there a way to dynamically invoke a method in the same class for PHP? I don't have the syntax right, but I'm looking to do something similar to this: $this->{$methodName}($arg1, $arg2, $arg3);
0
[ 2, 7782, 718, 2109, 19, 2625, 16893, 19, 13, 26120, 800, 3726, 3726, 25, 80, 21, 161, 20, 7782, 1326, 28371, 21, 2109, 19, 14, 205, 718, 26, 13, 26120, 60, 31, 221, 22, 38, 57, 14, 22649, 193, 15, 47, 31, 22, 79, 699, 20, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
EJB3 Business Logic Patterns & Practices === I'm in the process of developing a multi-tiered financial processing application in Java using EJB3 (Hibernate + Glassfish for the app and web services layer, Lift on Glassfish for the web UI) and I'm struggling with the question of where to put my business logic. When this project started, our first notion was to put the bulk of our business logic into the stateless session beans. As time has gone on, though, we've found the dependency injection provided by the EJB framework too limiting, so a lot of our business logic has ended up in POJOs that are assembled by Guice in the @PostConstruct method of the stateless session beans. This progress has led to fragmentation of our business logic between the session beans and the POJOs, and I'm trying to figure out an approach for correcting this. Initially, we tried to have our web tier use the remote interfaces of the session beans to perform some functions that are accessible both from the UI and from the web service layer, which is provided by @WebService-annotated stateless session beans. This turned out to be a nightmare from a persistence and performance perspective, because our entity graph can grow quite large and reattaching the detached entity graph to the persistence context turned out to be highly error-prone, so our solution was to start just passing object identifiers around and looking up the entities from the database wherever they were needed. My basic question is this: what principles and guidelines can you suggest for deciding whether business logic should go in a session bean or a POJO? When does it make sense to pass entity beans around, given a complex object graph?
0
[ 2, 13, 10022, 220, 240, 508, 7085, 6282, 279, 5242, 800, 3726, 3726, 31, 22, 79, 19, 14, 953, 16, 3561, 21, 1889, 8, 5259, 69, 1553, 5511, 3010, 19, 8247, 568, 13, 10022, 220, 240, 13, 5, 8630, 106, 8820, 2754, 1350, 4934, 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...
WYSIWIG Editor Not Working with AJAX === We're testing WYSIWYG editors, and we cannot see to make them work with asynchronous postbacks. We put the textbox(/textarea) in the UpdatePanel and call a simple save to the DB, and all of our pretty toolbars disappear, leaving us with a bunch of HTML in textboxes. This is the one we've been working to implement: nicedit.com/ We have found that CuteEditor works, but we've had so many problems with it, we're scrapping it entirely. Those are just two examples, but we've tried a number of others, including TinyMCE. What is causing this to mess up on the AJAX call?
0
[ 2, 5809, 18, 49, 12445, 1835, 52, 638, 29, 20624, 800, 3726, 3726, 95, 22, 99, 4431, 5809, 18, 49, 7913, 263, 12149, 15, 17, 95, 1967, 196, 20, 233, 105, 170, 29, 21, 16023, 1291, 678, 1958, 18, 9, 95, 442, 14, 1854, 5309, 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...
script languages on windows mobile - something similar to python @ nokia s60 === I try to find something similar to nokia's **python for windows mobile** based devices - a script interpreter [in this case also able to create standalone apps] with easy access to all phone interfaces - ability to make a phone call, send SMS, make a photo, send a file over GPRS, etc... While there is 2.5 **pythonce** available for windows mobile it is pure python interpreter and what I look for are all those "libraries" that nokia's python has like "import camera", "import messaging", ability to control the phone programatically. Also the bluetooth console of nokia python is great. I do not want to use .NET CF as even there (AFAIK) to control camera you need to use some indirect methods (for example: [http://blogs.msdn.com/marcpe/archive/2006/03/03/542941.aspx][1]). Appreciate any help you can provide, thanks in advance. I hope there is something I was unable to locate via google. [1]: http://blogs.msdn.com/marcpe/archive/2006/03/03/542941.aspx
0
[ 2, 3884, 2556, 27, 1936, 3241, 13, 8, 301, 835, 20, 20059, 13, 1, 24294, 13, 18, 3374, 800, 3726, 3726, 31, 1131, 20, 477, 301, 835, 20, 24294, 22, 18, 13, 1409, 6448, 11570, 26, 1936, 3241, 1409, 432, 4690, 13, 8, 21, 3884, 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 way to parse a date in MM/DD/YY format and adjust it to the current / previous century? === One of our customers wants to be able to enter a date with only 2 digits for the year component. The date will be in the past, so we want it to work for the previous century if the 2 digit year is after the current year, but work for the current century if the 2 digit year is equal to or less than the current year. as of today 10/30/2008 01/01/01 = 01/01/2001 01/01/09 = 01/01/1909 This is a strange requirement, and I solved the problem, I just don't like my solution. It feels like there is a better way to do this. Thanks for the help. public static String stupidDate(String dateString) { String twoDigitYear = StringUtils.right(dateString, 2); String newDate = StringUtils.left(dateString, dateString.length() - 2); int year = NumberUtils.toInt(twoDigitYear); Calendar c = GregorianCalendar.getInstance(); int centuryInt = c.get(Calendar.YEAR) - year; newDate = newDate + StringUtils.left(Integer.toString(centuryInt), 2) + twoDigitYear; return newDate; }
0
[ 2, 98, 25, 14, 246, 161, 20, 2017, 870, 21, 1231, 19, 1620, 118, 8096, 118, 93, 93, 2595, 17, 14328, 32, 20, 14, 866, 13, 118, 1158, 428, 60, 800, 3726, 3726, 53, 16, 318, 5279, 2846, 20, 44, 777, 20, 2830, 21, 1231, 29, 104...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
SharePoint stsadm addsolution - fails with permission based error (object ref) === Attempting to deploy a MOSS solution to a UAT server from dev server *for the first time*. On executing this command stsadm -o addsolution -filename xxx I get a "Object reference not set to an instance of an object" Based on these links: (and others): [http://social.msdn.microsoft.com/forums/en-US/sharepointdevelopment/thread/63f0f95d-1215-4041-be6d-64ae63bda276/][1] [http://www.telerik.com/community/forums/thread/b311D-bachea.aspx I made sure of the following:][1] 1. I am a member of the farm admin group on the MOSS server 2. I am member of the WSS_RESTRICTED_WPG on the server 3. I was already in the WSS_ADMIN_WPG group on the server I checked the event log and found exceptions saying that the login to my Site Services DB failed. If I attempt to add myself via SQL Server Mgt Studio I do not have access to set access to that DB such as this: > Reason: Cannot open database > "SharedServices1_DB" requested by the > login. The login failed. Login failed > for user 'XXXXX\Administrator'. So, what am I missing? Any obvious things I need to do? Any helpful suggestions are welcome. Thanks [1]: http://MSDN forum thread [1]: http://Telerik support thread
0
[ 2, 1891, 3132, 354, 18, 1283, 79, 10621, 18687, 3309, 13, 8, 13614, 29, 5572, 432, 7019, 13, 5, 23793, 13, 14057, 6, 800, 3726, 3726, 6314, 20, 17617, 21, 8188, 4295, 20, 21, 287, 721, 8128, 37, 9664, 8128, 1637, 1106, 14, 64, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Escape angle brackets in a Windows command prompt === I need to echo a string containing angle brackets (< and >) to a file on a Windows machine. Basically what I want to do is the following: `echo some string < with angle > brackets >>myfile.txt` This doesn't work since the command interpreter gets confused with the angle brackets. I could quote the whole string like this: `echo "some string < with angle > brackets" >>myfile.txt` But then I have double quotes in my file that I don't want. Escaping the brackets ala unix doesn't work either: `echo some string \< with angle \> brackets >>myfile.txt` Ideas?
0
[ 2, 2220, 5334, 21971, 19, 21, 1936, 1202, 11443, 4417, 800, 3726, 3726, 31, 376, 20, 8117, 21, 3724, 3503, 5334, 21971, 13, 5, 1, 17, 13, 1, 6, 20, 21, 3893, 27, 21, 1936, 1940, 9, 11374, 98, 31, 259, 20, 107, 25, 14, 249, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Add columns to an Access (Jet) table from .NET === Our app (already deployed) is using an Access/Jet database. The upcoming version of our software requires some additional columns in one of the tables. I need to first check if these columns exist, and then add them if they don't. Can someone provide a quick code sample, link, or nudge in the right direction? (I'm using c#, but a VB.NET sample would be fine, too).
0
[ 2, 3547, 7498, 20, 40, 1381, 13, 5, 10307, 6, 859, 37, 13, 9, 2328, 800, 3726, 3726, 318, 4865, 13, 5, 192, 15193, 6698, 6, 25, 568, 40, 1381, 118, 10307, 6018, 9, 14, 9078, 615, 16, 318, 2306, 4781, 109, 1351, 7498, 19, 53, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
CAML to HTML === I'm invoking <a href="http://msdn.microsoft.com/en-us/library/ms995760.aspx">one of SharePoint's web service APIs</a> that returns a CAML fragment. I've searched the interweb far and wide but I've been unable to figure out how to make this CAML fragment to render as "normal" HTML that I can render in a more sane environment like Plumtree, WLP, Liferay or any other portal besides SharePoint. Without a way to do this, I'm wondering why Micro$oft wrote SharePoint web service calls that return CAML in the first place. Web services are for interoperability and it seems the CAML is only valid within a WebPart running within SharePoint. [Note to Bill and Steve: that's not interoperability.] If I can't do anything with the CAML that comes back, I'm just going to call a different web service that returns only data and then write my own UI. I was hoping for an easier path. Any suggestions would be greatly appreciated.
0
[ 2, 5373, 255, 20, 13, 15895, 800, 3726, 3726, 31, 22, 79, 19, 2625, 1581, 13, 1, 58, 746, 14057, 3726, 7, 21127, 6903, 79, 18, 43, 103, 9, 22019, 12980, 9, 960, 118, 219, 8, 267, 118, 1210, 2559, 622, 118, 79, 18, 3483, 264, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
command line help === rename the file with datetime using windows command
0
[ 2, 1202, 293, 448, 800, 3726, 3726, 302, 7259, 14, 3893, 29, 1231, 891, 568, 1936, 1202, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
TBC files from an old and unknown database system === I have a bunch of *.TBC files from a very old application that runs in MS-DOS called TURBOLAB. Anyone know which DB System use files with a TBC extension. I've tried renaming the files to *.dbf to check if they are dBase files with no luck. Any idea?
0
[ 2, 13, 38, 7229, 6488, 37, 40, 315, 17, 2562, 6018, 329, 800, 3726, 3726, 31, 57, 21, 7653, 16, 1637, 9, 38, 7229, 6488, 37, 21, 253, 315, 3010, 30, 1461, 19, 4235, 8, 8609, 227, 12036, 9086, 9, 1276, 143, 56, 13, 9007, 329, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 AjaxControlToolKit Accordion set active pane via javascript === I would like to be able to change the active pane of an accordion using the pane itself. I see a behavior set_SelectedIndex but only show panes when they have data so I don't know at runtime what the pane indexes are. I know that Matt Berseth posted something similar at [http://mattberseth.com/blog/2008/04/3_tips_for_working_with_the_aj.html][1] to use with the tabcontainer. I would like to pass the pane which I am looking to switch to and switch to that pane regardless of what index it currently is. I don't see a way to get the index of a given pane within the Accordion control. If you know a way to do this it would be equally acceptable. [1]: http://mattberseth.com/blog/2008/04/3_tips_for_working_with_the_aj.html
0
[ 2, 28, 306, 9, 2328, 20624, 12898, 20799, 13703, 20753, 309, 1348, 13, 16660, 1197, 8247, 8741, 800, 3726, 3726, 31, 83, 101, 20, 44, 777, 20, 753, 14, 1348, 13, 16660, 16, 40, 20753, 568, 14, 13, 16660, 1145, 9, 31, 196, 21, 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...
VS2008 Code Coverage - can't find "not covered blocks" === I'm running VS2008's Code Coverage against a unit-tested DLL that I'm developing. For some of the functions it claims that 2 blocks are not covered and 50 or so are. When I view the function with the VS2008 highlighting it can't find the uncovered blocks. The highlighting appears to work with some functions though as it correctly shows a different color for uncovered blocks. Seems to be inconsistent. Is this a bug or PIBKAC? If the latter, what am I doing wrong?
0
[ 2, 4611, 2753, 1797, 5245, 13, 8, 92, 22, 38, 477, 13, 7, 1270, 1363, 5198, 7, 800, 3726, 3726, 31, 22, 79, 946, 4611, 2753, 22, 18, 1797, 5245, 149, 21, 1237, 8, 22372, 13, 43, 211, 30, 31, 22, 79, 3561, 9, 26, 109, 16, 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...
passing DB Connection object to methods === Was wondering if it is recomended to pass a database connection object around(to other modules) or let the method (in the other module) take care of setting it up. I am leaning toward letting the method set it up as to not have to check the state of the connection before using it, and just having the caller pass any needed data to the calling method that would be needed to setup the connection.
0
[ 2, 2848, 13, 9007, 2760, 3095, 20, 3195, 800, 3726, 3726, 23, 5712, 100, 32, 25, 302, 960, 10726, 20, 1477, 21, 6018, 2760, 3095, 140, 5, 262, 89, 17113, 6, 54, 408, 14, 2109, 13, 5, 108, 14, 89, 12613, 6, 247, 781, 16, 2697, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
one pretty printer "to rule them all" === I'm looking for a tool that can pretty-print (AKA tidy or beautify) source code in as many languages as possible. Those I'm particularly keen on include: - Java - JSP - HTML - JavaScript - SQL - JSON - XML Ideally, the tool should be able to update source files in-place and be able to format more than a single file at-a-time. It would be great if it could format files containing multiple languages (e.g. a JSP containing HTML, Java, and JavaScript source code), but that's probably asking for a bit much. I've already found a [commercial tool][1] that seems to cover a lot of languages, but a free one would be even better :) BTW, I know there is a source code tidier available for most languages, but what I'm looking for is a "one-stop shop". Cheers, Don [1]: http://www.polystyle.com/
0
[ 2, 53, 1772, 12925, 13, 7, 262, 1828, 105, 65, 7, 800, 3726, 3726, 31, 22, 79, 699, 26, 21, 5607, 30, 92, 1772, 8, 10299, 13, 5, 4176, 28028, 54, 7821, 38, 8612, 6, 1267, 1797, 19, 28, 151, 2556, 28, 938, 9, 273, 31, 22, 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 create XML/XSD equivalent of a DataSet or DataTable in VS2008 (or other tool) === So today I had to move some tables with data from an MS Access database into XML to be used in a web application. So I thought it would be an easy process to define the table structure as an XSD file in Visual Studio, then load in the data (for the sake of simplicity, lets say I would type it in). Well for the life of me I can't figure this out....I googled up lots of articles, but nothing seemed to click for me. I guess the simple form of my question is: is it possible to (graphically) define simple xml schemas in Visual Studio, and then edit the data contained within (within VS, via a nice grid interface) and have the data saved to an xml file? If not, is there a popular freeware or open source tool that would be appropriate for this?
0
[ 2, 184, 20, 1600, 23504, 118, 396, 18, 43, 4602, 16, 21, 1054, 3554, 54, 1054, 5924, 19, 4611, 2753, 13, 5, 248, 89, 5607, 6, 800, 3726, 3726, 86, 786, 31, 41, 20, 780, 109, 7484, 29, 1054, 37, 40, 4235, 1381, 6018, 77, 23504,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a map() function in ExtJS? === ExtJS has Ext.each() function, but is there a map() also hidden somewhere? I have tried hard, but haven't found anything that could fill this role. It seems to be something simple and trivial, that a JS library so large as Ext clearly must have. Or when Ext really doesn't include it, what would be the best way to add it to Ext. Sure, I could just write: Ext.map = function(arr, f) { ... }; But is this really the correct way to do this?
0
[ 2, 25, 80, 21, 2942, 5, 6, 1990, 19, 1396, 38, 728, 18, 60, 800, 3726, 3726, 1396, 38, 728, 18, 63, 1396, 38, 9, 14322, 5, 6, 1990, 15, 47, 25, 80, 21, 2942, 5, 6, 67, 3689, 3493, 60, 31, 57, 794, 552, 15, 47, 2933, 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...
Windows API colored output to stdout in Powershell/cmd.exe === Anyone know where to find a reference that describes how to output color on the Windows CLI interfaces using API and/or stdout?
0
[ 2, 1936, 21, 2159, 10133, 5196, 20, 354, 43, 1320, 19, 414, 15984, 118, 9095, 43, 9, 1706, 62, 800, 3726, 3726, 1276, 143, 113, 20, 477, 21, 2801, 30, 4359, 184, 20, 5196, 1665, 27, 14, 1936, 19391, 6573, 18, 568, 21, 2159, 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...
why use a web service with linq to sql? === can anyone tell me why the need/advantage to using a web service with an asp.net gui and using linq to sql? the web service layer seems unnecessary. linq to sql is completely new to me and i am researching as i am setting up a new project. does anyone have any experience with this?
0
[ 2, 483, 275, 21, 2741, 365, 29, 6294, 1251, 20, 4444, 255, 60, 800, 3726, 3726, 92, 1276, 494, 55, 483, 14, 376, 118, 1283, 17384, 1303, 20, 568, 21, 2741, 365, 29, 40, 28, 306, 9, 2328, 9457, 17, 568, 6294, 1251, 20, 4444, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I let my DBA pause and resume a stored procedure that is updating every row in a large table? === I have a table of about a million rows and I need to update every row in the table with the result of a lengthy calculation (the calculation gets a potentially different result for each row). Because it is time consuming, the DBA must be able to control execution. This particular calculation needs to be run once a year (it does a year-end summary). I wanted to create a job using DBMS\_SCHEDULER.CREATE\_JOB that would grab 100 rows from the table, update them and then stop; the next execution of the job would then pick up where the prior execution left off. My first thought was to include this code at the end of my stored procedure: -- update 100 rows, storing the primary key of the last -- updated row in last_id -- make a new job that will run in about a minute and will -- start from the primary key value just after last_id dbms_scheduler.create_job ( job_name=>'yearly_summary' , job_type=>'STORED_PROCEDURE' , job_action=>'yearly_summary_proc(' || last_id || ')' , start_date=>CURRENT_TIMESTAMP + 1/24/60 , enabled=>TRUE ); But I get this error when the stored procedure runs: ORA-27486: insufficient privileges ORA-06512: at "SYS.DBMS_ISCHED", line 99 ORA-06512: at "SYS.DBMS_SCHEDULER", line 262 ORA-06512: at "JBUI.YEARLY_SUMMARY_PROC", line 37 ORA-06512: at line 1 Suggestions for other ways to do this are welcome. I'd prefer to use DBMS\_SCHEDULER and I'd prefer not to have to create any tables; that's why I'm passing in the last_id to the stored procedure.
0
[ 2, 184, 107, 31, 408, 51, 13, 43, 969, 6911, 17, 13113, 21, 8214, 7004, 30, 25, 71, 43, 1880, 352, 3131, 19, 21, 370, 859, 60, 800, 3726, 3726, 31, 57, 21, 859, 16, 88, 21, 507, 11295, 17, 31, 376, 20, 11100, 352, 3131, 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 can I access BadgerFish notated attributes using javascript? === I have created a json object from ruby with cobravsmongoose, however the attributes have the '@' symbol in front of them. Whenever I try to access them with standard object notation in JavaScript, such as object.object.object.@attribute I get a parse error. Is there another way to access these objects?
0
[ 2, 184, 92, 31, 1381, 20868, 4934, 52, 1669, 13422, 568, 8247, 8741, 60, 800, 3726, 3726, 31, 57, 679, 21, 487, 528, 3095, 37, 10811, 29, 17647, 710, 18, 2111, 839, 6641, 15, 207, 14, 13422, 57, 14, 13, 22, 1, 22, 4678, 19, 43...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Checking for Shift+Click or Ctrl+Click in a Web User Control === I have a requirement to produce a Web User Control (in C#) which will exhibit different behaviour when clicked depending on whether the shift (or control) key is pressed at the time. The control itself will contain an ImageButton and/or Hyperlink. Is this possible? Basically, if the logged in user is an Admin then I need to allow them access to update the associated URL. I don't want to have a separate page for this admin as it will cause confusion. Thanks in advance
0
[ 2, 9886, 26, 4471, 2430, 150, 10129, 54, 13, 4812, 6362, 2430, 150, 10129, 19, 21, 2741, 4155, 569, 800, 3726, 3726, 31, 57, 21, 8981, 20, 2213, 21, 2741, 4155, 569, 13, 5, 108, 272, 5910, 6, 56, 129, 7454, 421, 7727, 76, 15802,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Issues with using unsupported Win32 GDI Pens modes? === The MSDN [documentation][1] is (somewhat) clear about the following two facts about GDI Pens: 1. A Cosmetic pen (create via CreatePen or ExtCreatePen w/ PS\_COSMETIC) must be 1 *unit* wide (well, <= 1, but let's not go there). 2. A Geometric (ExtCreatePen w/ PS\_GEOMETRIC) pen must solid (PS\_SOLID only, no PS_DASH, etc). They can, however, draw fatter lines. **Why can I voilate these rules and have GDI happily draw with these Pens?** I can create fat (width = 10, for example) cosmetic pens **and** dashed Geometric pens. Heck, I can create a fat, dashed geometric pen! These Pens seem to work fine *usually*. The only problem I've seen is in Polyline when I pass very large arrays of points - it renders the lines very slowly. However, Polyline is acting strangely with large arrays in general - it justs acts differently with the *bad* pens. (my other polyline problems may be another question...) **Is it ever safe to use wide Cosmetic pens or wide Geometric with patterns?** *(man am I screwed if I can't create pattern (PS\_DOT, PS\_DASH, etc) Pens of any width!!!)* [1]: http://msdn.microsoft.com/en-us/library/ms535223(VS.85).aspx
0
[ 2, 1549, 29, 568, 367, 24909, 628, 3125, 489, 1115, 2402, 18, 12770, 60, 800, 3726, 3726, 14, 4235, 43, 103, 636, 28132, 857, 500, 2558, 165, 500, 25, 13, 5, 3220, 608, 6, 1207, 88, 14, 249, 81, 10459, 88, 489, 1115, 2402, 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...
Perl: Checking if you have a module before using it. === I have some pretty simple perl code which relies on `Term::ReadKey` to get the terminal width; My NetBSD build is missing this module, and I want to default to 80 when the module is missing. The odd thing is, I can't figure out how to conditionally use a module, knowing ahead of time whether it is present. This code would just quit saying it can't find Term::ReadKey if it actually can't. #/usr/pkg/bin/perl -w # Try loading Term::ReadKey use Term::ReadKey; my ($wchar, $hchar, $wpixels, $hpixels) = GetTerminalSize();} my @p=(2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97); my $plen=$#p+1; printf("num |".("%".int(($wchar-5)/$plen)."d") x $plen."\n",@p);
0
[ 2, 416, 255, 45, 9886, 100, 42, 57, 21, 12613, 115, 568, 32, 9, 800, 3726, 3726, 31, 57, 109, 1772, 1935, 416, 255, 1797, 56, 19272, 27, 13, 1, 3964, 45, 45, 10647, 4237, 1, 20, 164, 14, 3855, 9456, 73, 51, 4275, 4562, 43, 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...
Fetching items which has a specific set of child elements (advanced query - possible?) === I have a SQL database (SQL Server 2008) which contains the following design ITEM ---- - ID (Int, Identity) - Name (NVarChar(50)) - Description (NVarChar(200)) META ---- - ID (Int, Identity) - Name (NVarChar(50)) There exists a N-N relationship between these two, i.e an Item can contain zero or more meta references and a meta can be associated with more than one item. Each meta can only be assocated with the same item once. This means I have the classic table in the middle ITEMMETA ---- - ItemID (Int) - MetaID (Int) I would like to to execute a LinqToSql query to extract all of the item entities which contains a specific set of meta links. For example, give me all the Items which have the following meta items associated with it - Car - Ford - Offroad Is it possible to write such a query with the help of LinqToSql? Let me provide some more requirements - I will have a list of Meta tags I want to use to filter the items which will be returned (for example in the example above I had Car, Ford and Offroad) - An item can have MORE meta items associated with it than what I provide in the match, i.e if an item had Car, Ford, Offroad and Red assocated to it then providing any combination of them in the filter should result in a match - However ALL of the meta names which are provided in the filter MUST be assocated with an item for it to be returned in the resultset. So sending in Car, Ford, Offroad and Red SHOULD NOT be a match for an item which has Car, Ford and Offroad (no Red) associated with itself I hope its clear what I'm trying to achieve, I feel Im not being quite as clear as I'd hoped =/ Let's hope its enough :) Thank you!
0
[ 2, 18312, 68, 3755, 56, 63, 21, 1903, 309, 16, 850, 2065, 13, 5, 1283, 2686, 11014, 25597, 13, 8, 938, 60, 6, 800, 3726, 3726, 31, 57, 21, 4444, 255, 6018, 13, 5, 18, 22402, 8128, 570, 6, 56, 1588, 14, 249, 704, 9101, 13, 8,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Silverlight, Wpf Web App or Click Once? Pros and Cons === We are starting a new project and I'm trying to decide which of the Wpf-esque develop/deploy strategies we should go with. In our case we are looking at quite a complex business app that will be used by 100s (not 1000s) of people, So I'm leaning towards a click-once app. My boss likes the idea of a Silverlight app as it means easier deployment. So which way should we jump? The answer is, of course, "it depends". So what are the pros and cons of each? I'll start the ball rolling: ---------- Silverlight - Pros Cross browser Doesn't require full framework. - Cons Can't interact with client's file system etc Has less functionality compared with full Wpf (anyone got a good resource that documents differences?) Single window Single version ---------- Wpf Web App - Pros Full Wpf. - Cons Single browser Requires full framework Can't interact with client's file system etc Single window Single version ---------- Wpf Click once - Pros Full Wpf Multiple windows Multiple versions (con?) - Cons Single browser Requires full framework *Slightly*(?) harder to install.
0
[ 2, 1172, 3130, 15, 619, 7721, 2741, 4865, 54, 10840, 382, 60, 895, 18, 17, 11608, 800, 3726, 3726, 95, 50, 1422, 21, 78, 669, 17, 31, 22, 79, 749, 20, 4073, 56, 16, 14, 619, 7721, 8, 17029, 2803, 118, 17309, 10892, 10272, 95, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a way to tell what files are not being used in a web application project === I have a project with literally thousands of image files that aren't being used. The main problem is that they are intermixed with images that are. Is there a way to get a list of all project artifacts which aren't referenced?
0
[ 2, 25, 80, 21, 161, 20, 494, 98, 6488, 50, 52, 142, 147, 19, 21, 2741, 3010, 669, 800, 3726, 3726, 31, 57, 21, 669, 29, 6949, 3805, 16, 1961, 6488, 30, 4847, 22, 38, 142, 147, 9, 14, 407, 1448, 25, 30, 59, 50, 1480, 21049, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Enabling ehcache statistics in jboss 4.2.1 === I've set hibernate.generate_statistics=true and now need to register the mbeans so I can see the statistics in the jmx console. I can't seem to get anywhere and this doesn't seem like it should be such a difficult problem. Maybe I'm making things overcomplicated, but in any case so far I've tried: - I copied EhCacheProvider and had it instantiate an extended version of CacheManager which overloaded init() and called ManagementService.registerMBeans(...) after initialization. The code all ran fine until the actual call to registerMBeans(...) which would cause the provider initialization to fail with a generic error (unfortunately I didn't write it down.) This approach was motivated by the methods used in [link text][1] - I created my own MBean with a start method that ran similar code to the example in [link text][2]. Everything appeared to work correctly and my mbean shows up in the jmx console but nothing for net.sf.ehcache. - I've since upgraded ehcache to 1.5 (we were using 1.3, not sure if that's specific to jboss 4.2.1 or just something we chose ourselves) and changed to using the SingletonEhCacheProvider and trying to just manually grab the statistics instead of dealing with the mbean registration. It hasn't really gone any better though; if I call getInstance() the CacheManager that's returned only has a copy of StandardQueryCache, but jboss logs show that many other caches have been initialized (one for each of the cached entities in our application.) [1]: http://www.kanonbra.com/index.php/projects/performance-testing/18-using-visualvm-on-liferay [2]: http://weblogs.java.net/blog/maxpoon/archive/2007/06/extending_the_n_2.html
0
[ 2, 13168, 16177, 793, 2569, 5818, 19, 487, 10349, 18, 268, 9, 135, 9, 165, 800, 3726, 3726, 31, 22, 195, 309, 4148, 2102, 8820, 9, 17083, 1373, 1, 29380, 8354, 3726, 13398, 17, 130, 376, 20, 2243, 14, 13, 10045, 5950, 86, 31, 92...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
SAAS per seat authentication === Our company makes the web based application which is priced per workstation. That means that user/pass credentials should only be used from one particular machine. Currently what is happening that several users are sharing credentials and we do not have any way to prevent this if they are not doing it concurrently. The nature on the application is such that user needs to use it once in a while so the inability to work concurrently does not bother the users much and the company loses it's possible revenues. The application currently is purely AJAX without flash/activeX/Java applets. The ideal solution would be to read the computer name or IP address of the client with javascript using "Shell.Network" scripting interface. But this is impossible because of the strict security settings in Internet Explorer. I have to mention that cross browser functionality does not matter and the only browser supported is IE. Searching google I came across this solution here http://www.reglos.de/myaddress/MyAddress.html but it requires JAVA applet so will not be very convenient. Are there any other solutions for this?
0
[ 2, 18194, 18, 416, 988, 27963, 800, 3726, 3726, 318, 237, 1364, 14, 2741, 432, 3010, 56, 25, 13, 24152, 416, 170, 10839, 9, 30, 1108, 30, 4155, 118, 6201, 5059, 43, 10107, 18, 378, 104, 44, 147, 37, 53, 1498, 1940, 9, 871, 98, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a way to separate long running (e.g. stress tests) out so they're not run by default in Maven 2? === We've had an ongoing need here that I can't figure out how to address using the stock Maven 2 tools and documentation. Some of our developers have some very long running JUnit tests (usually stress tests) that under no circumstances should be run as a regular part of the build process / nightly build. Of course we can use the surefire plugin's exclusion mechanism and just punt them from the build, but ideally we'd love something that would allow the developer to run them at will through Maven 2.
0
[ 2, 25, 80, 21, 161, 20, 1725, 175, 946, 13, 5, 62, 9, 263, 9, 5384, 4894, 6, 70, 86, 59, 22, 99, 52, 485, 34, 12838, 19, 1216, 3124, 172, 60, 800, 3726, 3726, 95, 22, 195, 41, 40, 6748, 376, 235, 30, 31, 92, 22, 38, 1465...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Should a user interface be implemented using the Singleton design pattern? === I can't think of many reasons (or any at all) in which multiple independent user interfaces should be instantiated in a desktop application. Is it good practice to implement the UI as a singleton? Are there are advantages or disadvantages to this approach?
0
[ 2, 378, 21, 4155, 6573, 44, 6807, 568, 14, 345, 444, 704, 3732, 60, 800, 3726, 3726, 31, 92, 22, 38, 277, 16, 151, 2932, 13, 5, 248, 186, 35, 65, 6, 19, 56, 1886, 1124, 4155, 6573, 18, 378, 44, 6322, 49, 1669, 19, 21, 17404,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Mark an Active Directory Object as "Read-Only"? === We had a bad day yesterday. One of our Domain Admins deleted an OU containing 700+ users and the same amount of computers as well as assorted other useful things like groups etc. We restored from a backup, but it wasn't pretty. I know that ADUC asks you if you're sure etc... but I'd like it if it was not possible to delete this particular OU without going into something like ADSIEdit to set it "allowable" for deletion - thereby not allowing people to delete without actually opening a new app and specifically indicating that "YES - I know what I'm doing". This would have the added benefit of stopping accidental miscoding from deleting critical AD objects. Any such attribute or method that you folks could think of?
0
[ 2, 943, 40, 1348, 16755, 3095, 28, 13, 7, 10647, 8, 4965, 7, 60, 800, 3726, 3726, 95, 41, 21, 896, 208, 7124, 9, 53, 16, 318, 4603, 21, 43, 2160, 18, 19584, 40, 9028, 3503, 10954, 2430, 3878, 17, 14, 205, 2006, 16, 7774, 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...
Odd issue with textbox and ASP.NET === This code was working properly before, basically I have a master page that has a single text box for searching, I named it **`searchBox`**. I have a method to pull the content of **`searchBox`** on form submit and set it to a variable **`userQuery`**. Here is the method: Public Function searchString(ByVal oTextBoxName As String) As String If Master IsNot Nothing Then Dim txtBoxSrc As New TextBox txtBoxSrc = CType(Master.FindControl(oTextBoxName), TextBox) If txtBoxSrc IsNot Nothing Then Return txtBoxSrc.Text End If End If Return Nothing End Function The results are displayed on **`search.aspx`**. Now, however, if **`searchBox`** is filled and submitted on a page other than **`search.aspx`**, the contents of the text box are not passed through. The form is very simple, just: `<asp:TextBox ID="searchBox" runat="server"></asp:TextBox> <asp:Button ID="searchbutton" runat="server" Text="search" UseSubmitBehavior="True" PostBackUrl="~/search.aspx" CssClass="searchBtn" />`.
0
[ 2, 4210, 1513, 29, 1854, 5309, 17, 28, 306, 9, 2328, 800, 3726, 3726, 48, 1797, 23, 638, 7428, 115, 15, 11374, 31, 57, 21, 1129, 2478, 30, 63, 21, 345, 1854, 1649, 26, 5792, 15, 31, 377, 32, 13, 1409, 1, 25136, 5309, 1, 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...
How to use scalax.io.CommandLineParser? === I want to create a class that takes string array as a constructor argument and has command line option values as members vals. Something like below, but I don't understand how the Bistate works. import scalax.data._ import scalax.io.CommandLineParser class TestCLI(arguments: Array[String]) extends CommandLineParser { private val opt1Option = new Flag("p", "print") with AllowAll private val opt2Option = new Flag("o", "out") with AllowAll private val strOption = new StringOption("v", "value") with AllowAll private val result = parse(arguments) // true or false val opt1 = result(opt1Option) val opt2 = result(opt2Option) val str = result(strOption) }
0
[ 2, 184, 20, 275, 25975, 396, 9, 1963, 9, 16239, 1143, 3574, 4104, 60, 800, 3726, 3726, 31, 259, 20, 1600, 21, 718, 30, 1384, 3724, 7718, 28, 21, 6960, 248, 5476, 17, 63, 1202, 293, 4255, 4070, 28, 443, 3347, 18, 9, 301, 101, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best way to get a comma delineated string into xml format? === Using VB.net (.net 2.0) I have a string in this format: record1_field1,record1_field2,record2_field3,record2_field1,record2_field2, etc... I wonder what the best (easiest) way is to get this into an xml? I can think of 2 ways: Method 1: - use split to get the items in an array - loop through array and build an xml string using concatenation Method 2: - use split to get the items in an array - loops through array to build a datatable - use writexml to output xml from the datatable The first sounds pretty simple but would require more logic to build the string. The second seems slicker and easier to understand. Are there other ways to do this?
0
[ 2, 246, 161, 20, 164, 21, 11951, 58, 121, 1143, 1669, 3724, 77, 23504, 2595, 60, 800, 3726, 3726, 568, 13, 20468, 9, 2328, 13, 5, 9, 2328, 172, 9, 387, 6, 31, 57, 21, 3724, 19, 48, 2595, 45, 571, 165, 1, 1109, 165, 15, 14953...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Pattern matching and placeholder values === __Language: C#__ Hello, I'm writing an application that uses renaming rules to rename a list of files based on information given by the user. The files may be inconsistently named to begin with, or the filenames may be consistent. The user selects a list of files, and inputs information about the files (for MP3s, they would be Artist, Title, Album, etc). Using a rename rule (example below), the program uses the user-inputted information to rename the files accordingly. However, if all or some the files are named consistently, I would like to allow the program to 'guess' the file information. That is the problem I'm having. What is the best way to do this? **Sample information** Sample filenames <pre> Kraftwerk-Kraftwerk-01-RuckZuck.mp3 Kraftwerk-Autobahn-01-Autobahn.mp3 Kraftwerk-Computer World-03-Numbers.mp3 </pre> Rename Rule <pre> %Artist%-%Album%-%Track%-%Title%.mp3 </pre> The program should properly deduce the Artist, Track number, Title, and Album name. Again, what's the best way to do this? I was thinking regular expressions, but I'm a bit confused.
0
[ 2, 3732, 10120, 17, 209, 12427, 4070, 800, 3726, 3726, 13, 1, 7020, 45, 272, 5910, 1, 10975, 15, 31, 22, 79, 1174, 40, 3010, 30, 2027, 25934, 1761, 20, 302, 7259, 21, 968, 16, 6488, 432, 27, 676, 504, 34, 14, 4155, 9, 14, 6488...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 don't you source control your references directly? === I'm in the process of establishing some new source control best practices for my organization, so I've been immersing myself in things like TreeSurgeon for the past few days. One thing I see a lot is that it's a best practice to include your references in your source control tree, but in a seperate directory (lib/ in tree surgeon) rather than directly with your code as they naturally appear in .NET projects. I know a few reasons why it's bad to source control them directly in the bin folder, but I want to understand the big picture including how you get those references back into, say, an ASP.NET project after you pull down code from source control on a fresh machine. Thanks in advance! Brian
0
[ 2, 483, 221, 22, 38, 42, 1267, 569, 154, 7231, 1703, 60, 800, 3726, 3726, 31, 22, 79, 19, 14, 953, 16, 6814, 109, 78, 1267, 569, 246, 5242, 26, 51, 1165, 15, 86, 31, 22, 195, 74, 13, 13788, 18, 68, 992, 19, 564, 101, 1913, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Misused design patterns === Are there, in the canonical Gang of Four list, any design patterns that you often find misused, misunderstood or overused (other than the highly debated Singleton)? In other words, is there a design pattern you would advise to think twice before using?
0
[ 2, 27519, 43, 704, 6282, 800, 3726, 3726, 50, 80, 15, 19, 14, 5742, 4272, 3285, 16, 222, 968, 15, 186, 704, 6282, 30, 42, 478, 477, 27519, 43, 15, 29000, 54, 84, 8795, 13, 5, 9539, 119, 14, 2157, 17881, 345, 444, 6, 60, 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...
Running Eclipse Junit Plugin tests with Junit 4.4 or newer -- why aren't tests detected? === I need to use JUnit 4.4 (or newer) in a set of eclipse plugin tests, but I've run into the following problem: Tests are not detected when running with the junit 4.4 or 4.5 bundles from springsource ([junit44] and [junit45]). The org.junit4 bundle that can be obtained with eclipse supplies junit 4.3 (as of Ganymead / Eclipse 3.4). The org.junit4 bundle *does* work in that it identifies and runs the tests, but it is not compatible with the latest versions of JMock, and I need to use a mocking library. Here is a sample test: package testingplugin; import static org.junit.Assert.*; import org.junit.Test; public class ActivatorTest { @Test public final void testDoaddTest() { fail("Not yet implemented"); } } When running this test, I receive the following exception: java.lang.Exception: No runnable methods at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:33) at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62) at org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:195) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212) However, if I switch the project dependencies from com.springsource.org.junit to org.junit4, then the test runs and fails (as expected). I am running the test as a JUnit Plug-in Test in Eclipse, with the following program arguments: -os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} The following plug-ins selected during launch (selected by me, then I used "add required plugins" to get the rest of the dependencies.): Workspace: testingPlugin Target Platform: com.springsource.org.hamcrest.core (1.1.0) com.springsource.org.junit (4.5.0) ....and a bunch of others... (nothing related to testing was auto-selected) Here is my MANIFEST.MF: Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: TestingPlugin Plug-in Bundle-SymbolicName: testingPlugin Bundle-Version: 1.0.0 Bundle-Activator: testingplugin.Activator Import-Package: org.osgi.framework;version="1.3.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Require-Bundle: com.springsource.org.junit;bundle-version="4.5.0" Switching the last line to: Require-Bundle: org.junit4;bundle-version="4.3.1" And updating the selected plugins at launch to: Workspace: testingPlugin Target Platform: org.junit4 (4.3.1) ...bunches of auto-selected bundles... (again, nothing else test related) Causes the test to run properly (but with the wrong version of junit). [junit44]: http://www.springsource.com/repository/app/bundle/version/detail?name=com.springsource.org.junit&version=4.4.0 [junit45]: http://www.springsource.com/repository/app/bundle/version/detail?name=com.springsource.org.junit&version=4.5.0&searchType=bundlesByName&searchQuery=junit
0
[ 2, 946, 11652, 7446, 242, 10922, 108, 4894, 29, 7446, 242, 268, 9, 300, 54, 12372, 13, 8, 8, 483, 4847, 22, 38, 4894, 11968, 60, 800, 3726, 3726, 31, 376, 20, 275, 7446, 242, 268, 9, 300, 13, 5, 248, 12372, 6, 19, 21, 309, 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...
How do I manage version control when developing with SQL Server Express? === I am developing a website using SQL Server Express on my development machine. My web hosting company is providing me with SQL Server 2005. At the moment all I have is a database that I develop with and a database that is on the live server. I do not have the original scripts to generate the schema but I can auto generate the create scripts individually or for the entire database. I am now putting my code into source control and I would like to know how I manage my database schema. What do I put into it? Create commands? Alter scripts? The database is very small at the moment and it is not hard to maintain the two databases, but I am concerned that going forward but it will get out of hand. Do you have any tips for getting the live database in sync when deploying new code?
0
[ 2, 184, 107, 31, 4705, 615, 569, 76, 3561, 29, 4444, 255, 8128, 2999, 60, 800, 3726, 3726, 31, 589, 3561, 21, 2271, 568, 4444, 255, 8128, 2999, 27, 51, 522, 1940, 9, 51, 2741, 10637, 237, 25, 2674, 55, 29, 4444, 255, 8128, 812, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Attributes on an interface === I have a interface that defines some methods with attributes. These attributes need to be accessed from the calling method, but the method I have does not pull the attributes from the interface. What am I missing? public class SomeClass: ISomeInterface { MyAttribute GetAttribute() { StackTrace stackTrace = new StackTrace(); StackFrame stackFrame = stackTrace.GetFrame(1); MethodBase methodBase = stackFrame.GetMethod(); object[] attributes = methodBase.GetCustomAttributes(typeof(MyAttribute), true); if (attributes.Count() == 0) throw new Exception("could not find MyAttribute defined for " + methodBase.Name); return attributes[0] as MyAttribute; } void DoSomething() { MyAttribute ma = GetAttribute(); string s = ma.SomeProperty; } }
0
[ 2, 13422, 27, 40, 6573, 800, 3726, 3726, 31, 57, 21, 6573, 30, 13110, 109, 3195, 29, 13422, 9, 158, 13422, 376, 20, 44, 12904, 37, 14, 2555, 2109, 15, 47, 14, 2109, 31, 57, 630, 52, 2201, 14, 13422, 37, 14, 6573, 9, 98, 589, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Programmatically generate an Eclipse project === I use eclipse to work on an application which was originally created independently of eclipse. As such, the application's directory structure is decidedly not eclipse-friendly. I want to programmatically generate a project for the application. The `.project` and `.classpath` files are easy enough to figure out, and I've learned that projects are stored in the workspace under `<workspace>/.metadata/.plugins/org.eclipse.core.resources/.projects` Unfortunately, some of the files under here (particularly `.location`) seem to be encoded in some kind of binary format. On a hunch I tried to deserialize it using `ObjectInputStream` - no dice. So it doesn't appear to be a serialized java object. My question is: is there a way to generate these files automatically? For the curious, the error I get trying to deserialize the `.location` file is the following: `java.io.StreamCorruptedException: java.io.StreamCorruptedException: invalid stream header: 40B18B81`
0
[ 2, 625, 6732, 1326, 7920, 40, 11652, 669, 800, 3726, 3726, 31, 275, 11652, 20, 170, 27, 40, 3010, 56, 23, 912, 679, 9029, 16, 11652, 9, 28, 145, 15, 14, 3010, 22, 18, 16755, 1411, 25, 868, 102, 52, 11652, 8, 15950, 9, 31, 259,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
jQuery and "Organized Code" === I've been struggling lately with understanding the best way to organize jQuery code. I asked another question earlier and I don't think I was specific enough ([found in this question here](http://stackoverflow.com/questions/247209/javascript-how-do-you-organize-this-mess)). My problem is that the richer you make an application, the quicker your client side gets out of control. Consider this situation... //Let's start some jQuery $(function() { var container = $("#inputContainer"); //Okay let's list text fields that can be updated for(var i=0; i < 5; i++) { //okay let's add an event for when a field changes $("<input/>").changed(function() { //okay something changed, let's update the server $.ajax({ success:function(data) { //Okay - no problem from the server... let's update //the bindings on our input fields $.each(container.children(), function(j,w) { //YIKES!! We're deep in here now!! $(w).unbind().changed(function() { //Then insanity starts... }); // end some function }); //end some loop } // what was this again? }); //ending something... not sure anymore }).appendTo(container); //input added to the page... logic WAY split apart }; //the first loop - whew! almost out! }); //The start of the code!! Now this situation isn't too far from impossible. I'm not saying this is the right way to do it, but it's not uncommon to find yourself several levels down into a jQuery command and starting to wonder how much more logic can add before the screen begins to melt. **My question is how are people managing this or organizing to limit the complexity of their code?** <em>[I listed how I'm doing it in my other post](http://stackoverflow.com/questions/247209/javascript-how-do-you-organize-this-mess#247382)...</em>
0
[ 2, 487, 8190, 93, 17, 13, 7, 19256, 1797, 7, 800, 3726, 3726, 31, 22, 195, 74, 7587, 10434, 29, 3260, 14, 246, 161, 20, 9213, 487, 8190, 93, 1797, 9, 31, 411, 226, 1301, 1201, 17, 31, 221, 22, 38, 277, 31, 23, 1903, 511, 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...
Formview Being Cleared === My problem is that all the textbox's my formview are getting cleared when I hit the submit button. I currently have a page with a small section that has an update panel around it. This small section adds an address to my databse. To the left of this form there is a gridview that is tied into the formview. So if i click on an item in the gridview its contents fill the address section(formview) with the correct data. When I hit add the data gets validated in the c# code behind, and if all the info is correct the address is inserted. **If there is an error the entire form is cleared** and the error message(label) is displayed. I have already done this many times in other pages, but none have had the gridview tied to the formview, and they have all worked. I tried removing the gridview and the form still erases itself. Is there some reason that .net thinks it should be clearing the form? When in other cases it decides it won't? If so what are these cases, or what general tips should I try to solve this?
0
[ 2, 505, 4725, 142, 4895, 800, 3726, 3726, 51, 1448, 25, 30, 65, 14, 1854, 5309, 22, 18, 51, 505, 4725, 50, 1017, 4895, 76, 31, 770, 14, 12298, 5167, 9, 31, 871, 57, 21, 2478, 29, 21, 284, 1050, 30, 63, 40, 11100, 4113, 140, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 would I go about investigating and resolving a Mercurial authorization problem? === I have a private repository with bitbucket. I'm using Mercurial Distributed SCM (version 0.9.3) on Ubuntu. When I try to clone my repository, I'm prompted for my username and password which I enter correctly. as a result i get: `abort: authorization failed` This works perfectly fine from windows. I just want to make sure I'm not missing something obvious before I submit a bug. I'm new to distributed version control.
0
[ 2, 184, 83, 31, 162, 88, 12490, 17, 28687, 21, 9046, 3594, 192, 22677, 1448, 60, 800, 3726, 3726, 31, 57, 21, 932, 24869, 29, 1142, 11925, 1198, 9, 31, 22, 79, 568, 9046, 3594, 192, 4387, 4729, 79, 13, 5, 10898, 713, 9, 518, 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...
Retrieve an object that has a memeber variable with the longest string length === Given a Generic List of objects that contain a member variable that is a string what is the best way to get the object that contains the string with the longest length. ie. assuming val1 is the string im comparing: 0 : { val1 = "a" } 1 : { val1 = "aa" } 2 : { val1 = "aba" } 3 : { val1 = "c" } what needs to be returned is object 2 because "aba" has the greatest length.
0
[ 2, 11917, 40, 3095, 30, 63, 21, 55, 790, 2102, 7612, 29, 14, 5646, 3724, 1476, 800, 3726, 3726, 504, 21, 12733, 968, 16, 3916, 30, 3717, 21, 322, 7612, 30, 25, 21, 3724, 98, 25, 14, 246, 161, 20, 164, 14, 3095, 30, 1588, 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...
Asp.Net : Extended range validation === I'm using Asp.Net 2.0. I have a scenario where i need to check a user input against any of two ranges. For e.g. I need to check a textbox value against ranges 100-200 or 500-600. I know that i can hook up 2 Asp.Net RangeValidators to the TextBox, but that will try to validate the input against both the ranges, an AND condition,if you will. CustomValidator is an option, but how would I pass the 2 ranges values from the server-side. Is it possible to extend the RangeValidator to solve this particular problem?
0
[ 2, 28, 306, 9, 2328, 13, 45, 1984, 978, 27999, 800, 3726, 3726, 31, 22, 79, 568, 28, 306, 9, 2328, 172, 9, 387, 9, 31, 57, 21, 12705, 113, 31, 376, 20, 2631, 21, 4155, 6367, 149, 186, 16, 81, 9230, 9, 26, 13, 62, 9, 263, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...