unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
how do I implement a custom code page used by a serial device so I can convert text to it in Python ? === I have a scrolling LED sign that takes messages in either ASCII or (using some specific code) characters from a custom code page. For example, the euro sign should be sent as <U00> and ä is <U64> (You can find the full code page in the [documentation][1]) My question is, what is the most pythonic way to implement this custom code page, and to have a codec that can convert UTF strings to my custom code page ? [1]: http://www.domoticaforum.eu/uploaded/Jfn/20082291593_RGB%20ledbar%20conrad.pdf
0
[ 2, 184, 107, 31, 8713, 21, 5816, 1797, 2478, 147, 34, 21, 5956, 3646, 86, 31, 92, 8406, 1854, 20, 32, 19, 20059, 13, 60, 800, 3726, 3726, 31, 57, 21, 13, 28166, 481, 1676, 30, 1384, 7561, 19, 694, 28, 1892, 49, 54, 13, 5, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Aggregate adjacent only records with T-SQL === I have (simplified for the example) a table with the following data Row Start Finish ID Amount --- --------- ---------- -- ------ 1 2008-10-01 2008-10-02 01 10 2 2008-10-02 2008-10-03 02 20 3 2008-10-03 2008-10-04 01 38 4 2008-10-04 2008-10-05 01 23 5 2008-10-05 2008-10-06 03 14 6 2008-10-06 2008-10-07 02 3 7 2008-10-07 2008-10-08 02 8 8 2008-10-08 2008-11-08 03 19 The dates represent a period in time, the ID is the state a system was in during that period and the amount is a value related to that state. What I want to do is to aggregate the Amounts for *adjacent* rows with the *same* ID number, but keep the same overall sequence so that contiguous runs can be combined. Thus I want to end up with data like: Row Start Finish ID Amount --- --------- ---------- -- ------ 1 2008-10-01 2008-10-02 01 10 2 2008-10-02 2008-10-03 02 20 3 2008-10-03 2008-10-05 01 61 4 2008-10-05 2008-10-06 03 14 5 2008-10-06 2008-10-08 02 11 6 2008-10-08 2008-11-08 03 19 I am after a T-SQL solution that can be put into a SP, however I can't see how to do that with simple queries. I suspect that it may require iteration of some sort but I don't want to go down that path. The reason I want to do this aggregation is that the next step in the process is to do a SUM() and Count() grouped by the unique ID's that occur within the sequence, so that my final data will look something like: ID Counts Total -- ------ ----- 01 2 71 02 2 31 03 2 33 However if I do a simple SELECT COUNT(ID), SUM(Amount) FROM data GROUP BY ID On the original table I get something like ID Counts Total -- ------ ----- 01 3 71 02 3 31 03 2 33 Which is not what I want. Thanks for any help. Peter
0
[ 2, 8544, 4209, 104, 742, 29, 13, 38, 8, 18, 22402, 800, 3726, 3726, 31, 57, 13, 5, 11268, 26, 14, 823, 6, 21, 859, 29, 14, 249, 1054, 3131, 799, 2106, 4924, 2006, 13, 8, 8, 8, 13, 8, 8, 8, 8, 8, 8, 8, 8, 8, 13, 8, 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...
Is there a standard way to do findfirst, findnext with gcc on linux using stl? === I can't seem to find the _findfirst / findfirst, _findnext / findnext API on gcc for Linux, and would actually rather use the Standard Template Library (STL) for that if it is included there. Does anyone know what API there is available for listing files in a directory under Linux for C++ (gcc)?
0
[ 2, 25, 80, 21, 1236, 161, 20, 107, 477, 3552, 15, 477, 20021, 29, 489, 3384, 27, 13024, 568, 354, 255, 60, 800, 3726, 3726, 31, 92, 22, 38, 2260, 20, 477, 14, 13, 1, 19811, 3552, 13, 118, 477, 3552, 15, 13, 1, 19811, 20021, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Visual Studio 2008 Syntax Coloring Problem === In a VB.NET Web Site, the User Types syntax coloring doesn't work. What are potential causes of this? Note: C# works as expected.
0
[ 2, 3458, 1120, 570, 22649, 1665, 68, 1448, 800, 3726, 3726, 19, 21, 13, 20468, 9, 2328, 2741, 689, 15, 14, 4155, 2551, 22649, 1665, 68, 1437, 22, 38, 170, 9, 98, 50, 2222, 4047, 16, 48, 60, 1945, 45, 272, 5910, 693, 28, 1727, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Environment Variables in Python on Linux === Python's access to environment variables does not accurately reflect the operating system's view of the processes environment. os.getenv and os.environ do not function as expected in particular cases. Is there a way to properly get the running process' environment? ------ To demonstrate what I mean, take the two roughly equivalent programs (the first in C, the other in python): #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main(int argc, char *argv[]){ char *env; for(;;){ env = getenv("SOME_VARIABLE"); if(env) puts(env); sleep(5); } } ----- import os import time while True: env = os.getenv("SOME_VARIABLE") if env is not None: print env time.sleep(5) ----- Now, if we run the C program and attach to the running process with gdb and forcibly change the environment under the hood by doing something like this: (gdb) print setenv("SOME_VARIABLE", "my value", 1) [Switching to Thread -1208600896 (LWP 16163)] $1 = 0 (gdb) print (char *)getenv("SOME_VARIABLE") $2 = 0x8293126 "my value" then the aforementioned C program will start spewing out "my value" once every 5 seconds. The aforementioned python program, however, will not. Is there a way to get the python program to function like the C program in this case? (Yes, I realize this is a very obscure and potentially damaging action to perform on a running process) Also, I'm currently using python 2.4, this may have been fixed in a later version of python.
0
[ 2, 2307, 12157, 19, 20059, 27, 13024, 800, 3726, 3726, 20059, 22, 18, 1381, 20, 2307, 12157, 630, 52, 16353, 6907, 14, 2455, 329, 22, 18, 1418, 16, 14, 5102, 2307, 9, 13, 759, 9, 3060, 219, 710, 17, 13, 759, 9, 219, 8145, 218, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Vim 80 column layout concerns === I feel like the way I do 80-column indication in Vim is incorrect: `set columns=80`. At times I also `set textwidth` but I like to be able to see and anticipate line overflow with the `set columns` alternative. This has some unfortunate side effects -- I can't `set number` for fear of splitting between files that have different orders of line numbers; i.e. < 100 line files and >= 100 line files will require two different `set columns` values because of the extra column used for the additional digit display. I also start new (g)Vim sessions instead of splitting windows vertically, which forces me to use the window manager's clipboard -- `vsplit`s force me to do `set columns` every time I open or close a pane, so starting a new session is less hassle. How do you handle the 80-character indication when you want to `set numbers`, vertically split, etc.?
0
[ 2, 1790, 79, 2972, 4698, 9106, 4823, 800, 3726, 3726, 31, 583, 101, 14, 161, 31, 107, 2972, 8, 716, 4404, 103, 11290, 19, 1790, 79, 25, 18867, 45, 13, 1, 3554, 7498, 3726, 2887, 1, 9, 35, 436, 31, 67, 13, 1, 3554, 1854, 3976, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Revoming Items From IDictionary With Recursion === Anybody have a slicker way to do this? Seems like it should be easier than this, but I'm having a mental block. Basically I need to remove items from an dictionary and recurse into the values of the items that are also dictionaries. private void RemoveNotPermittedItems(ActionDictionary menu) { var keysToRemove = new List<string>(); foreach (var item in menu) { if (!GetIsPermitted(item.Value.Call)) { keysToRemove.Add(item.Key); } else if (item.Value is ActionDictionary) { RemoveNotPermittedItems((ActionDictionary)item.Value); if (((ActionDictionary)item.Value).Count == 0) { keysToRemove.Add(item.Key); } } } foreach (var key in (from item in menu where keysToRemove.Contains(item.Key) select item.Key).ToArray()) { menu.Remove(key); } } Action dictionary is like this: public class ActionDictionary : Dictionary<string, IActionItem>, IActionItem
0
[ 2, 3867, 2636, 68, 3755, 37, 31, 22595, 1857, 29, 26604, 5991, 800, 3726, 3726, 11181, 57, 21, 12544, 106, 161, 20, 107, 48, 60, 2206, 101, 32, 378, 44, 4950, 119, 48, 15, 47, 31, 22, 79, 452, 21, 3584, 1921, 9, 11374, 31, 376...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Access to Modified Closure === string [] files = new string[2]; files[0] = "ThinkFarAhead.Example.Settings.Configuration_Local.xml"; files[1] = "ThinkFarAhead.Example.Settings.Configuration_Global.xml"; //Resharper complains this is an "access to modified closure" for (int i = 0; i < files.Length; i++ ) { // Resharper disable AccessToModifiedClosure if(Array.Exists(Assembly.GetExecutingAssembly().GetManifestResourceNames(), delegate(string name) { return name.Equals(files[i]); })) return Assembly.GetExecutingAssembly().GetManifestResourceStream(files[i]); // ReSharper restore AccessToModifiedClosure } The above seems to work fine though resharper complains that this is "access to modified closure". Can any one shed light on this? Thanks in advance.
0
[ 2, 1381, 20, 5372, 7790, 800, 3726, 3726, 3724, 20767, 6488, 800, 78, 3724, 2558, 135, 12660, 6488, 2558, 387, 500, 800, 13, 7, 10550, 3700, 58, 1743, 9, 29041, 9, 19831, 18, 9, 1126, 13549, 857, 1, 15580, 9, 396, 8184, 7, 73, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to effectively implement sessions in GAE? === I was wondering about implementing my own sessions (more for an exercise than anything else) for a GAE app I'm working ... at first I was thinking of using the datastore to store the session data. However, every time something needs to be added to the session 'bucket', it would require saving to the datastore. Obviously that's bad since we want to minimize our writes. Then I thought about using memcache ... seemed like a good idea but then we're faced with issues of possible session corruption due to memcache being "evicted through memory pressure" by Google. So does that mean we are left with only the following options: 1. Storing all session data in cookies 2. Writing all session data to datastore and memcache, and then only reading from memcache Anyone have any other ideas?
0
[ 2, 184, 20, 5463, 8713, 5763, 19, 13, 17721, 60, 800, 3726, 3726, 31, 23, 5712, 88, 17333, 51, 258, 5763, 13, 5, 1995, 26, 40, 5935, 119, 602, 962, 6, 26, 21, 13, 17721, 4865, 31, 22, 79, 638, 13, 9, 9, 9, 35, 64, 31, 23, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Good FAQ For Recompiling apps with GCC for AmigaOS? === There are a couple of open source apps I am trying to recompile to work under amigaOS. Can someone point me to a good step-by-step guide explaining what changes (from a rule-of-thumb standpoint) I need to make to the source before it'll compile?
0
[ 2, 254, 1399, 1251, 26, 302, 11103, 49, 802, 4865, 18, 29, 489, 3384, 26, 24441, 759, 60, 800, 3726, 3726, 80, 50, 21, 1335, 16, 368, 1267, 4865, 18, 31, 589, 749, 20, 302, 11103, 3599, 20, 170, 131, 24441, 759, 9, 92, 737, 45...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is my OCaml implementation of SHA256 sane? === I'm a novice OCaml programmer and thought I would throw myself into the deep end by attempting to implement a very tricky algorithm. I'm open to all criticisms great and small be they stylistic or security or performance related. One criticism that I'm already aware of is that the algorithm requires the entire message to fit in memory (whereas the reference implementation of SHA256 can process a block at a time). I'm especially concerned about if any of the recursive-functions are not tail-recursive. I have tested the code and it does produce proper message digests on x86_64 Linux. Thanks in advance for your consideration. let as_bytes bits = match (bits mod 8) with | 0 -> (bits / 8) | _ -> failwith "as_bytes: bits must be multiple of 8" let as_bits bytes = bytes * 8 let k = [| 0x428a2f98l; 0x71374491l; 0xb5c0fbcfl; 0xe9b5dba5l; 0x3956c25bl; 0x59f111f1l; 0x923f82a4l; 0xab1c5ed5l; 0xd807aa98l; 0x12835b01l; 0x243185bel; 0x550c7dc3l; 0x72be5d74l; 0x80deb1fel; 0x9bdc06a7l; 0xc19bf174l; 0xe49b69c1l; 0xefbe4786l; 0x0fc19dc6l; 0x240ca1ccl; 0x2de92c6fl; 0x4a7484aal; 0x5cb0a9dcl; 0x76f988dal; 0x983e5152l; 0xa831c66dl; 0xb00327c8l; 0xbf597fc7l; 0xc6e00bf3l; 0xd5a79147l; 0x06ca6351l; 0x14292967l; 0x27b70a85l; 0x2e1b2138l; 0x4d2c6dfcl; 0x53380d13l; 0x650a7354l; 0x766a0abbl; 0x81c2c92el; 0x92722c85l; 0xa2bfe8a1l; 0xa81a664bl; 0xc24b8b70l; 0xc76c51a3l; 0xd192e819l; 0xd6990624l; 0xf40e3585l; 0x106aa070l; 0x19a4c116l; 0x1e376c08l; 0x2748774cl; 0x34b0bcb5l; 0x391c0cb3l; 0x4ed8aa4al; 0x5b9cca4fl; 0x682e6ff3l; 0x748f82eel; 0x78a5636fl; 0x84c87814l; 0x8cc70208l; 0x90befffal; 0xa4506cebl; 0xbef9a3f7l; 0xc67178f2l |] let hash s = let add_int32 x y = Int32.add x y in let left_int32 x n = Int32.shift_left x n in let right_int32 x n = Int32.shift_right_logical x n in let or_int32 x y = Int32.logor x y in let xor_int32 x y = Int32.logxor x y in let and_int32 x y = Int32.logand x y in let not_int32 x = Int32.lognot x in let rotate x n = (or_int32 (right_int32 x n) (left_int32 x (32 - n))) in let shift x n = right_int32 x n in let ch x y z = xor_int32 (and_int32 x y) (and_int32 (not_int32 x) z) in let maj x y z = (xor_int32 (and_int32 x y) (xor_int32 (and_int32 x z) (and_int32 y z))) in let sum0 x = (xor_int32 (rotate x 2) (xor_int32 (rotate x 13) (rotate x 22))) in let sum1 x = (xor_int32 (rotate x 6) (xor_int32 (rotate x 11) (rotate x 25))) in let rh00 x = (xor_int32 (rotate x 7) (xor_int32 (rotate x 18) (shift x 3))) in let rh01 x = (xor_int32 (rotate x 17) (xor_int32 (rotate x 19) (shift x 10))) in let as_bytes bits = match (bits mod 8) with | 0 -> (bits / 8) | _ -> failwith "as_bytes: bits must be multiple of 8" in let as_bits bytes = bytes * 8 in let sha = [| 0x6a09e667l; 0xbb67ae85l; 0x3c6ef372l; 0xa54ff53al; 0x510e527fl; 0x9b05688cl; 0x1f83d9abl; 0x5be0cd19l |] in let message = Buffer.create (as_bytes 512) in (* smallest possible buffer is at least 512 bits *) begin Buffer.add_string message s; let original_length = as_bits (Buffer.length message) in Buffer.add_char message '\x80'; (* append '1' bit *) let pad_start = as_bits (Buffer.length message) in let pad_blocks = if (original_length mod 512) < 448 then 1 else 2 in let message_length = ((original_length / 512) + pad_blocks) * 512 in begin (* appending k bits of 0 (where message_length-64 is our k) *) for i = as_bytes pad_start to (as_bytes (message_length - (as_bytes 64)))-8 do Buffer.add_char message '\x00' done; Buffer.add_buffer message (Bin.pack64 (Int64.of_int original_length)) end end; let rec process_block i blocks = let array_of_block i = let boff = i*(as_bytes 512) in let to_int32 x = (Int32.of_int (int_of_char x)) in let w = Array.make (as_bytes 512) 0l in begin for t = 0 to 15 do w.(t) <- (or_int32 (left_int32 (to_int32 (Buffer.nth message (boff + (t*4 )))) 24) (or_int32 (left_int32 (to_int32 (Buffer.nth message (boff + (t*4+1)))) 16) (or_int32 (left_int32 (to_int32 (Buffer.nth message (boff + (t*4+2)))) 8) (to_int32 (Buffer.nth message (boff + (t*4+3)))) ))); done; for t = 16 to 63 do w.(t) <- add_int32 (add_int32 (rh01 w.(t-2)) w.(t-7)) (add_int32 (rh00 w.(t-15)) w.(t-16)) done; w end in if i = blocks then let sha256 = Buffer.create (as_bytes 256) in let rec pack_sha256 i = match i with | 8 -> Buffer.contents sha256 | _ -> begin Buffer.add_buffer sha256 (Bin.pack32 sha.(i)); pack_sha256 (i+1) end in pack_sha256 0 else begin let w = array_of_block i in let tem = [| 0l; 0l |] in begin let a = ref sha.(0) in let b = ref sha.(1) in let c = ref sha.(2) in let d = ref sha.(3) in let e = ref sha.(4) in let f = ref sha.(5) in let g = ref sha.(6) in let h = ref sha.(7) in for t = 0 to 63 do begin tem.(0) <- add_int32 (add_int32 !h (sum1 !e)) (add_int32 (ch !e !f !g) (add_int32 k.(t) w.(t))); tem.(1) <- add_int32 (sum0 !a) (maj !a !b !c); h := !g; g := !f; f := !e; e := add_int32 !d tem.(0); d := !c; c := !b; b := !a; a := add_int32 tem.(0) tem.(1); end done; sha.(0) <- add_int32 sha.(0) !a; sha.(1) <- add_int32 sha.(1) !b; sha.(2) <- add_int32 sha.(2) !c; sha.(3) <- add_int32 sha.(3) !d; sha.(4) <- add_int32 sha.(4) !e; sha.(5) <- add_int32 sha.(5) !f; sha.(6) <- add_int32 sha.(6) !g; sha.(7) <- add_int32 sha.(7) !h; (* good faith attempt to clear memory *) for i = 0 to 63 do w.(t) <- 0 done; tem.(0) <- 0; tem.(1) <- 0; a := 0; b := 0; c := 0; d := 0; e := 0; f := 0; g := 0; h := 0; end; process_block (i+1) blocks end in process_block 0 ((Buffer.length message) / (as_bytes 512)) let hexdigits s = let rec hexdigits_inner hx i = match i with | 32 -> hx | _ -> hexdigits_inner (hx ^ (Printf.sprintf "%02x" (int_of_char s.[i]))) (i+1) in hexdigits_inner "" 0 The pack functions, defined in a separate file, are thus: let pack64 x = let b = Buffer.create 8 in for i = 0 to 7 do let shft = (7-i)*8 in Buffer.add_char b (char_of_int (Int64.to_int (Int64.logand (Int64.shift_right x shft) 0xFFL))); done; b let pack x n = if (n mod 8) = 0 then let n' = n/8 in let b = Buffer.create n' in for i = 0 to n'-1 do let shft = ((n'-1)-i)*8 in Buffer.add_char b (char_of_int (Int32.to_int (Int32.logand (Int32.shift_right x shft) 0xFFl))); done; b else raise (Invalid_argument ("pack: " ^ (string_of_int n) ^ " is not a multiple of 8")) let pack32 x = pack x 32 let pack16 x = pack x 16 let pack8 x = pack x 8
0
[ 2, 25, 51, 13, 14977, 8184, 6123, 16, 4116, 16910, 523, 62, 60, 800, 3726, 3726, 31, 22, 79, 21, 21999, 13, 14977, 8184, 17968, 17, 289, 31, 83, 3814, 992, 77, 14, 855, 241, 34, 6314, 20, 8713, 21, 253, 5514, 93, 9083, 9, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Validating Crontab Entries w/ PHP === What is the best way to validate a crontab entry with PHP? Should I be using a regex, or an external library? I've got a PHP script that adds/removes entries from a crontab file, but want to have some way to verify that the time interval portion is in a valid format.
0
[ 2, 7394, 1880, 13, 19587, 15783, 11399, 619, 118, 13, 26120, 800, 3726, 3726, 98, 25, 14, 246, 161, 20, 7394, 1373, 21, 13, 19587, 15783, 2792, 29, 13, 26120, 60, 378, 31, 44, 568, 21, 7953, 1706, 15, 54, 40, 4886, 1248, 60, 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...
Hierarchical Queries in SQL Server 2005 === Way back when I was working in an Oracle shop I took the CONNECT_BY for granted. Now I'm stuck working with SQL Server 2005 and have some nasty object hierarchies. Specifically, we have a self referencing table where all child records have a column with their parent's id. Currently we have a view that maps children to levels in the hierarchy and a nasty query that does the heavy lifting to connect parents with their children. While this method works, it is far from elegant and reeks of taint. I'm just curious how other people retrieve hierarchical data from SQL Server 2005.
0
[ 2, 21376, 4272, 9386, 2829, 19, 4444, 255, 8128, 812, 800, 3726, 3726, 161, 97, 76, 31, 23, 638, 19, 40, 15759, 2546, 31, 199, 14, 6379, 1, 779, 26, 2743, 9, 130, 31, 22, 79, 4549, 638, 29, 4444, 255, 8128, 812, 17, 57, 109, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ASP.NET Container-Specific Master Pages for Safari or Chrome === Has anyone been able to create **Container-Specific Master Pages** for Safari or Chrome? I can't find any ".browser" files for either of these. How often is the %SystemRoot%\Microsoft.NET\Framework\version\CONFIG\Browsers directory updated? Thanks
0
[ 2, 28, 306, 9, 2328, 12147, 8, 9219, 1129, 4434, 26, 25055, 54, 13, 12985, 800, 3726, 3726, 63, 1276, 74, 777, 20, 1600, 13, 1409, 1126, 5851, 106, 8, 9219, 1129, 4434, 1409, 26, 25055, 54, 13, 12985, 60, 31, 92, 22, 38, 477, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it possible to squash all changes from a branch in TFS into one commit? === For personal projects I use Git for SCM, but at work we use TFS. One thing that I like about Git is that it allows a person to easily squash all the changes made in a branch when pulling the changes back into the master branch. The benefit of this is that if their is anything wrong with the changes they can easily be removed be reverting back to the version before the merge even if no tag was created. Is this. or the equivalent possible in TFS? Is this where shelving changes fits into the equation? Thanks.
0
[ 2, 25, 32, 938, 20, 17998, 65, 1693, 37, 21, 1686, 19, 13, 11720, 18, 77, 53, 9686, 60, 800, 3726, 3726, 26, 1319, 2314, 31, 275, 13, 10404, 26, 4729, 79, 15, 47, 35, 170, 95, 275, 13, 11720, 18, 9, 53, 584, 30, 31, 101, 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...
Randomly show elements? === Using jQuery, how would you `show()` every `div.foo` on a page in a random order, with a new one appearing every X milliseconds?
0
[ 2, 21324, 298, 2065, 60, 800, 3726, 3726, 568, 487, 8190, 93, 15, 184, 83, 42, 13, 1, 9303, 5, 6, 1, 352, 13, 1, 12916, 9, 4120, 111, 1, 27, 21, 2478, 19, 21, 5477, 389, 15, 29, 21, 78, 53, 4870, 352, 993, 13436, 5007, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How do I stop bots from incrementing my file download counter in PHP? === When a user clicks a link to download a file on my website, they go to [this PHP file][1] which increments a download counter for that file and then header()-redirects them to the actual file. I suspect that bots are following the download link, however, so the number of downloads is inaccurate. * How do I let bots know that they shouldn't follow the link? * Is there a way to detect most bots? * Is there a better way to count the number of downloads a file gets? [1]: http://viewsourcecode.org/viewsource/homebrew.php
0
[ 2, 184, 107, 31, 747, 11012, 18, 37, 13, 28461, 68, 51, 3893, 7121, 2105, 19, 13, 26120, 60, 800, 3726, 3726, 76, 21, 4155, 10840, 18, 21, 3508, 20, 7121, 21, 3893, 27, 51, 2271, 15, 59, 162, 20, 636, 1565, 13, 26120, 3893, 50...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 detect low memory situations within the java virtual machine? === I've been getting some OutOfMemory errors lately in my application. Is it possible to detect ahead of time when the virtual machine is running low on memory? In other words to preemptively deal with OutOfMemory errors before they actually occur?
0
[ 2, 184, 107, 42, 9092, 708, 1912, 8329, 363, 14, 8247, 6599, 1940, 60, 800, 3726, 3726, 31, 22, 195, 74, 1017, 109, 70, 1041, 790, 5171, 93, 11908, 10434, 19, 51, 3010, 9, 25, 32, 938, 20, 9092, 2173, 16, 85, 76, 14, 6599, 194...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Identifying the right candidate === I've spent quite a lot of time searching for the "right" candidate for a particular position. It's a very high-stress, high-visibility environment with changing priorities and tight deadlines. The associated responsibilities have been somewhat neglected for several years, so the position requires a significant amount of back-filling without letting current tasks slide. The bottom line is that choosing the "wrong" candidate will be worse--much worse--than simply leaving the position open. Have you ever been in this sort of hiring position, and if so, was there a candidate who was **clearly** the "right" person? Can you identify *specifically* how you knew? Thanks for your insights.
0
[ 2, 13785, 14, 193, 2316, 800, 3726, 3726, 31, 22, 195, 1111, 1450, 21, 865, 16, 85, 5792, 26, 14, 13, 7, 4183, 7, 2316, 26, 21, 1498, 649, 9, 32, 22, 18, 21, 253, 183, 8, 16437, 15, 183, 8, 3762, 14264, 2307, 29, 4226, 20872...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it possible to throw a MessageQueueException? === I am using a mock object in RhinoMocks to represent a class that makes calls to MessageQueue.GetPublicQueues. I want to simulate the exception thrown when message queueing is operating in workgroup mode, which is a MessageQueueException to ensure that I am catching the exception correctly The MessageQueueException has no public constructor, only the standard protected constructor for an exception. Is there an appropriate way to mock this exception being thrown?
0
[ 2, 25, 32, 938, 20, 3814, 21, 2802, 2005, 4185, 10066, 872, 60, 800, 3726, 3726, 31, 589, 568, 21, 10506, 3095, 19, 18642, 79, 5668, 18, 20, 3501, 21, 718, 30, 1364, 3029, 20, 2802, 2005, 4185, 9, 3060, 12259, 2005, 4185, 18, 9,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can the overall implementation of a component be divided in two objects? === I've seen with Microsoft COM and XPCOM, at least from what I've read and gathered so far, that the implementations of interfaces in a component have to essentially be in the single class that derives all the virtual interfaces. Is this correct? What am I missing? Is there a way to have multiple objects (possibly in separate DLL's) each provide their functionality and still be able to freely transition between them using QueryIterface? What I'm looking for is to have a component with some functionality, but still allow external client code to create new extensions of the component with (possibly) new interfaces. Ideally this should happen without divulging the current source of the component and its implementation.
0
[ 2, 92, 14, 1677, 6123, 16, 21, 5912, 44, 2350, 19, 81, 3916, 60, 800, 3726, 3726, 31, 22, 195, 541, 29, 7099, 13, 960, 17, 23045, 960, 15, 35, 639, 37, 98, 31, 22, 195, 1302, 17, 4744, 86, 463, 15, 30, 14, 6123, 18, 16, 65...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Good books on QT and Boost libraries === I`d like you to advice me some fine books on Boost and QT libraries. I`ve been learning C++ for more than a year, I`ve learn syntax and language basics, it`s gotchas, few development features and gotcha`s.I haven`t big experience in development. Read Eckel (thinking in c++), meyers.
4
[ 2, 254, 964, 27, 2593, 38, 17, 10419, 8649, 800, 3726, 3726, 31, 1, 43, 101, 42, 20, 4978, 55, 109, 1123, 964, 27, 10419, 17, 2593, 38, 8649, 9, 31, 1, 195, 74, 2477, 272, 20512, 26, 91, 119, 21, 159, 15, 31, 1, 195, 2484, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Overwite Line in File with PHP === What is the best way to overwrite a specific line in a file? I basically want to search a file for the string '@parsethis' and overwrite the rest of that line with something else.
0
[ 2, 84, 499, 2119, 293, 19, 3893, 29, 13, 26120, 800, 3726, 3726, 98, 25, 14, 246, 161, 20, 84, 23716, 21, 1903, 293, 19, 21, 3893, 60, 31, 11374, 259, 20, 2122, 21, 3893, 26, 14, 3724, 13, 22, 1, 3574, 870, 1565, 22, 17, 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, 0, 0, 0, 0, 0, 0...
What is the best way to print columns from different tables on the same row using the Axapta reporting tool? === It seems like each body section in an axapta report can only print columns from a single table(consistantly). For instance: I have a report that has the following tables: SalesLine, InventTable and CustTable. Then I would like to print columns from each of this tables on the same row. It seems like I can do this when placing the fields in programmable sections but not when I place them in body sections. I have found a few workaround that are either ugly or non-performant. There has to be a nice clean way to do this?
0
[ 2, 98, 25, 14, 246, 161, 20, 4793, 7498, 37, 421, 7484, 27, 14, 205, 3131, 568, 14, 21, 6791, 21741, 6670, 5607, 60, 800, 3726, 3726, 32, 2206, 101, 206, 358, 1050, 19, 40, 21, 6791, 21741, 1330, 92, 104, 4793, 7498, 37, 21, 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...
What's the best way to send a lot of checkboxes to the client in ASP.Net? === I have the following situation: A user will define a certain filter on a page, and on postback I will query the database using that filter and return a bunch of matching records to the user, each with a checkbox next to it, so he can choose whether to act on each of those records. In Classic ASP / PHP I can generate a lot of controls named "chk__*" and then on postback go through all the $_POST entries looking for the ones prefixed "chk_". What is the best way to do this in ASP.Net 2.0? I can do it easily by implementing a Repeater with a Template containing the checkbox, bind the Repeater to a Dataset, and then on the second Postback, I just do: For Each it As RepeaterItem In repContacts.Items Dim chkTemp As CheckBox = DirectCast(it.FindControl("cbSelect"), CheckBox) If chkTemp.Checked Then End If Next However this has the *slight* disadvantage of giving me a HUGE Viewstate, which is really bad because the client will need to re-upload the whole viewstate to the server, and these people will probably be using my site over a crappy connection. Any other ideas? (I can also create the controls dynamically and iterate through Request.Form as in the old days, however, I was looking for a cleaner
0
[ 2, 98, 22, 18, 14, 246, 161, 20, 2660, 21, 865, 16, 2631, 5309, 160, 20, 14, 6819, 19, 28, 306, 9, 2328, 60, 800, 3726, 3726, 31, 57, 14, 249, 1858, 45, 21, 4155, 129, 9267, 21, 1200, 11945, 27, 21, 2478, 15, 17, 27, 678, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 handle one-off requests from customers? === Often, customers will request specific functionality that doesn't really fit into the existing system and probably will only get used by the specific customer. For example, there is a web application that functions as a portal for many different organizations. Say there are 15 organizations that all use the same underlying code, but have different accounts that display a customized logo and css template for each organization. A 16th organization wants a new portal, but they have a few requests for their home page that don't fit with the existing system. Say it's an extra legal disclaimer or a picture of their founder on the left side of the page. Something specific to that organization that probably won't be reused by any other organizations. How do you handle those kinds of situations without creating a huge mess of conditionals or specific code for one customer?
2
[ 2, 184, 107, 42, 3053, 53, 8, 1299, 12279, 37, 5279, 60, 800, 3726, 3726, 478, 15, 5279, 129, 3772, 1903, 18548, 30, 1437, 22, 38, 510, 2742, 77, 14, 3149, 329, 17, 910, 129, 104, 164, 147, 34, 14, 1903, 7705, 9, 26, 823, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Multiple definitions of a function template === Suppose a header file defines a function template. Now suppose two implementation files `#include` this header, and each of them has a call to the function template. In both implementation files the function template is instantiated with the same type. // header.hh template <typename T> void f(const T& o) { // ... } // impl1.cc #include "header.hh" void fimpl1() { f(42); } // impl2.cc #include "header.hh" void fimpl2() { f(24); } One may expect the linker would complain about multiple definitions of `f()`. Specifically, if `f()` wouldn't be a template then that would indeed be the case. How come the linker doesn't complain about multiple definitions of `f()`?
0
[ 2, 1886, 18544, 16, 21, 1990, 22894, 800, 3726, 3726, 5787, 21, 157, 106, 3893, 13110, 21, 1990, 22894, 9, 130, 5787, 81, 6123, 6488, 13, 1, 5910, 22640, 1, 48, 157, 106, 15, 17, 206, 16, 105, 63, 21, 645, 20, 14, 1990, 22894, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Spatial Data Structures for moving objects? === I was wondering what is the best data structure to deal with a lot of moving objects(spheres, triangles, boxes, points, etc)? I'm trying to answer two questions, Nearest Neighbor and Collsion detection. I do realize that traditionally, data structures like R trees are used for nearest neighbor queries and Oct/Kd/BSP are used for collision detection problems dealing with static objects, or with very few moving objects. I'm just hoping that there is something else out there that is better. I appreciate all the help.
0
[ 2, 14472, 1054, 3815, 26, 1219, 3916, 60, 800, 3726, 3726, 31, 23, 5712, 98, 25, 14, 246, 1054, 1411, 20, 1183, 29, 21, 865, 16, 1219, 3916, 5, 14079, 18, 15, 8676, 18, 15, 8120, 15, 819, 15, 2722, 6, 60, 31, 22, 79, 749, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a concise catalog of variable naming-conventions? === There are many different styles of variable names that I've come across over the years. The current wikipedia entry on naming conventions is fairly light... I'd love to see a concise catalog of variable naming-conventions, identifying it by a name/description, and some examples. If a convention is particularly favored by a certain platform community, that would be worth noting, too. I'm turning this into a community wiki, so please create an answer for each convention, and edit as needed.
0
[ 2, 25, 80, 21, 29455, 10594, 16, 7612, 10929, 8, 1126, 6645, 5757, 60, 800, 3726, 3726, 80, 50, 151, 421, 6443, 16, 7612, 1817, 30, 31, 22, 195, 340, 464, 84, 14, 122, 9, 14, 866, 20169, 2792, 27, 10929, 15117, 25, 6647, 471, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Substitute member of variable within string in Powershell === I have the following string expression in a PowerShell script: "select count(*) cnt from ${schema}.${table} where ${col.column_name} is null" The schema and table resolve to the values of $schema and $table, respectively. However, an empty string is supplied for ${col.column_name}. How can I dot into the member of a variable as part of a string substitution?
0
[ 2, 6558, 322, 16, 7612, 363, 3724, 19, 414, 15984, 800, 3726, 3726, 31, 57, 14, 249, 3724, 1803, 19, 21, 414, 15984, 3884, 45, 13, 7, 18, 16964, 2468, 5, 2483, 6, 272, 2877, 37, 5579, 1, 7526, 540, 1, 9, 4403, 1, 5924, 1, 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...
How to use std::signaling_nan? === After looking at another question on SO ([Using NaN in C++][1]) I became curious about `std::numeric_limits<double>::signaling_NaN()`. I could not get signaling_NaN to throw an exception. I thought perhaps by signaling it really meant a signal so I tried catching SIGFPE but nope... Here is my code: double my_nan = numeric_limits<double>::signaling_NaN(); num++; num += 5; num = num / 10; num = 15 / num; cout << num << endl; `numeric_limits<double>::has_signaling_NaN` evaluates to true, so it is implemented on my system. Any ideas? I am using ms visual studio .net 2003's C++ compiler. I want to test it on another when I get home. Thanks! [1]: http://stackoverflow.com/questions/235386/using-nan-in-c
0
[ 2, 184, 20, 275, 354, 43, 45, 45, 11255, 192, 68, 1, 3198, 60, 800, 3726, 3726, 75, 699, 35, 226, 1301, 27, 86, 13, 5, 2558, 12655, 5884, 19, 272, 20512, 500, 2558, 165, 500, 6, 31, 178, 7686, 88, 13, 1, 384, 43, 45, 45, 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...
Is there a possible "race condition" when using Asp.Net MVC TempData across a redirect? === When using TempData, my understanding is that it will keep whatever you put in it around for only one request. So when using TempData to retain data across a redirect (in order to use the Post-Request-Get pattern), isn't it possible that some other request from the user could come into the server in between the response sending the redirect and the user's browser requesting the redirected-to page? In which case the get would no longer have the TempData available, correct? Now, I understand that something like that happening would be very rare, but taking into consideration that the user might have another page open in another tab, and there might be either ajax or timed callback requests occuring on that page, it suddenly doesn't seem all that impossible to me. Is it just generally considered to be too remote to worry about, or am I misunderstanding something?
0
[ 2, 25, 80, 21, 938, 13, 7, 7367, 2874, 7, 76, 568, 28, 306, 9, 2328, 307, 8990, 13, 9577, 18768, 464, 21, 302, 14706, 60, 800, 3726, 3726, 76, 568, 13, 9577, 18768, 15, 51, 3260, 25, 30, 32, 129, 643, 2099, 42, 442, 19, 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...
how do I add a font in gVim on windows system === I wanted to add a UTF-8 font in Gvim but I could not find out how to do this. I tried to follow the step on this manual but it still did not work. http://www.inter-locale.com/whitepaper/learn/learn_to_type.html (vim section halfway the page) Can anyone tell me how to add a font in Vim so I can have Japanese characters displayed ?
0
[ 2, 184, 107, 31, 3547, 21, 9978, 19, 13, 23896, 1660, 27, 1936, 329, 800, 3726, 3726, 31, 417, 20, 3547, 21, 287, 11720, 8, 457, 9978, 19, 13, 23896, 1660, 47, 31, 110, 52, 477, 70, 184, 20, 107, 48, 9, 31, 794, 20, 1740, 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...
What is the java signal dispatcher thread? === I was looking through a thread dump of a java process, and notice some threads blocked by signal dispatcher. What is signal dispatcher? What does it do?
0
[ 2, 98, 25, 14, 8247, 2800, 14226, 106, 9322, 60, 800, 3726, 3726, 31, 23, 699, 120, 21, 9322, 11424, 16, 21, 8247, 953, 15, 17, 3551, 109, 20396, 8388, 34, 2800, 14226, 106, 9, 98, 25, 2800, 14226, 106, 60, 98, 630, 32, 107, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Is it possible to change SQL user-defined data type? === I have a bunch of tables using user-defined data type for PK column. Is it possible to change this type Using SQL Server 2005?
0
[ 2, 25, 32, 938, 20, 753, 4444, 255, 4155, 8, 13439, 1054, 1001, 60, 800, 3726, 3726, 31, 57, 21, 7653, 16, 7484, 568, 4155, 8, 13439, 1054, 1001, 26, 13, 17244, 4698, 9, 25, 32, 938, 20, 753, 48, 1001, 568, 4444, 255, 8128, 81...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
How to configure IIS 6.0 to use both default content page and wildcard application maps === In the filesystem I have <pre> /file.aspx /directory/default.aspx </pre> I want to configure IIS so that it returns the appropriate file (add the aspx extension) or directory (default content page) as follows: <pre> /file -> /file.aspx /directory -> /directory/default.aspx /directory/ -> /directory/default.aspx </pre> I have configured the Wildcard application mapping set to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll. When the "Verify that file exists" is unchecked, the the file request works but not the directory request (returns 404). When the "Verify that file exists" is checked, the directory request works but not the file request. How can I configure it so that both the file and directory requests will work?
0
[ 2, 184, 20, 1065, 15951, 595, 18, 400, 9, 387, 20, 275, 156, 12838, 2331, 2478, 17, 23003, 3010, 6867, 800, 3726, 3726, 19, 14, 3893, 10724, 31, 57, 13, 1, 3515, 1, 13, 118, 16877, 9, 472, 306, 396, 13, 118, 10197, 93, 118, 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...
Convert jquery slide effect to mootools === I have a script that slides a div down from behind the menu, when people click on the tab. However its in jquery and I want to use mootools (lots of reasons I wont go into here). However im stuck with mootools 1.1 at present. But for some reason my attempt is not working :( The html print("code sample"); <div id="panel"> <form action=""> < form here > </form> </div> <div class="slide"> <p class="sl"><a href="#" class="btn-slide" id="toggle"><span></span></a></p> Div id panel holds the form which slides down, div class slide and the P tag is replaced by a tab/button which hangs down via css, clicking on this slides the tab down. The jquery (which works fine) print("code sample"); <script type="text/javascript"> $j(document).ready(function(){ $j(".btn-slide").click(function(){ $j("#panel").slideToggle("slow"); $j(this).toggleClass("active"); return false; }); }); </script> My moo attempt print("code sample"); <script type="text/javascript"> window.addEvent('domready', function(){ var mySlide = new Fx.Slide('panel'); $('toggle').addEvent('click', function(e){ e = new Event(e); mySlide.toggle(); e.stop(); }); }); </script> Like I said above I am restricted to moo 1.1 at present, but if there is a answer that will work with both 1.1 and 1.2 or if its a similar change I would be grateful to hear, as it will be updated at some point.
0
[ 2, 8406, 487, 8190, 93, 6464, 1590, 20, 13, 8765, 20799, 18, 800, 3726, 3726, 31, 57, 21, 3884, 30, 18066, 21, 13, 12916, 125, 37, 439, 14, 11379, 15, 76, 148, 10840, 27, 14, 6523, 9, 207, 82, 19, 487, 8190, 93, 17, 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...
System.Windows.Forms.WebBrowser.Refresh showing previous page === My WinForms application has a tab with a <code>System.Windows.Forms.WebBrowser</code> control. There are several controls that set the WebBrowser's <code>.Url</code> property, and when the form repaints it calls the WebBrowser's <code>.Refresh(WebBrowserRefreshOption.Completely)</code> method. Occasionally, however, the form gets repainted and the WebBrowser content doesn't change. I break on the <code>.Refresh( )</code>, and the <code>.Url</code> is the previous Url. What's going on? According to <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.url.aspx">MSDN</a>: <blockquote>If you set the value of this property and then immediately retrieve it again, the value retrieved may be different than the value set if the WebBrowser control has not had time to load the new document.</blockquote> Well isn't that special? Why doesn't <code>.Refresh( )</code> wait until the control has "had time to load the new document" before it redraws? Is there any way to force this to happen?
0
[ 2, 329, 9, 27508, 18, 9, 4190, 18, 9, 14113, 25699, 4104, 9, 99, 22373, 3187, 1158, 2478, 800, 3726, 3726, 51, 628, 4190, 18, 3010, 63, 21, 6523, 29, 21, 13, 1, 9375, 1, 10724, 9, 27508, 18, 9, 4190, 18, 9, 14113, 25699, 4104,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Which merge tool should I use with Mercurial in Windows? === I'm just starting with Mercurial and one of the things that I should do is select a merge tool. I was thinking to use WinMerge for that purpose, but I can't find the way to select this in particular. There are references for all the other merge tools around, but not for WinMerge. So, should I use WinMerge or there's a better tool for that job (remember, I'm using Windows). Thanks for your time. Best regards.
0
[ 2, 56, 12666, 5607, 378, 31, 275, 29, 9046, 3594, 192, 19, 1936, 60, 800, 3726, 3726, 31, 22, 79, 114, 1422, 29, 9046, 3594, 192, 17, 53, 16, 14, 564, 30, 31, 378, 107, 25, 5407, 21, 12666, 5607, 9, 31, 23, 1440, 20, 275, 62...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Do we need to became craftmen instead of engineer? === In the ending conference of Agiles 2008 (Buenos Aires, Argentina) some of the lectures talk about becaming craftman instead of engineer. What do you think about that?
0
[ 2, 107, 95, 376, 20, 178, 6508, 755, 700, 16, 2335, 60, 800, 3726, 3726, 19, 14, 3119, 1199, 16, 27475, 18, 570, 13, 5, 2345, 8625, 18, 9283, 15, 4491, 6, 109, 16, 14, 8947, 930, 88, 44, 8760, 68, 6508, 177, 700, 16, 2335, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Opening an RSA private key from Ruby === I *think* I know how to create custom encrypted RSA keys, but how can I read one encrypted like ssh-keygen does? I know I can do this: OpenSSL::PKey::RSA.new(File.read('private_key')) But then OpenSSL asks me for the passphrase... How can I pass it to OpenSSL as a parameter? And, how can I create one compatible to the ones generated by ssh-keygen? I do something like this to create private encrypted keys: pass = '123456' key = OpenSSL::PKey::RSA.new(1024) key = "0000000000000000#{key.to_der}" c = OpenSSL::Cipher::Cipher.new('aes-256-cbc') c.encrypt c.key = Digest::SHA1.hexdigest(pass).unpack('a2' * 32).map {|x| x.hex}.pack('c' * 32) c.iv = iv encrypted_key = c.update(key) encrypted_key << c.final Also, keys generated by OpenSSL::PKey::RSA.new(1024) (without encryption), don't work when I try password-less logins (i.e., I copy the public key to the server and use the private one to login). Also, when I open an ssh-keygen file via OpenSSL and then check its contents, it appears to have additional characters at the beginning and end of the key. Is this normal? I don't really understand some of this security stuff, but I'm trying to learn. What is it that I'm doing wrong?
0
[ 2, 1214, 40, 13, 22038, 932, 1246, 37, 10811, 800, 3726, 3726, 31, 1637, 10550, 2483, 31, 143, 184, 20, 1600, 5816, 29403, 13, 22038, 5534, 15, 47, 184, 92, 31, 1302, 53, 29403, 101, 13, 18, 1635, 8, 4237, 1863, 630, 60, 31, 143...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 throttle the bandwidth of a socket connection in C? === I'm writing a client-server app using BSD sockets. It needs to run in the background, continuously transferring data, but cannot hog the bandwidth of the network interface from normal use. Depending on the speed of the interface, I need to throttle this connection to a certain max transfer rate. What is the best way to achieve this, programmatically?
0
[ 2, 184, 107, 42, 23997, 14, 23392, 16, 21, 18482, 2760, 19, 272, 60, 800, 3726, 3726, 31, 22, 79, 1174, 21, 6819, 8, 10321, 106, 4865, 568, 334, 18, 43, 18482, 18, 9, 32, 2274, 20, 485, 19, 14, 2395, 15, 11738, 15798, 1054, 15...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Cancel libcurl easy handle === Is there an easy way to cancel a curl_easy_perform from another thread?
0
[ 2, 14815, 13, 8326, 4734, 255, 2010, 3053, 800, 3726, 3726, 25, 80, 40, 2010, 161, 20, 14815, 21, 14320, 1, 18385, 1, 1432, 4190, 37, 226, 9322, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
i want a java editor with embedded compiler and work under linux and did not require a a big amount of ram. === i want a java editor with embedded compiler and work under linux and did not require a a big amount of ram. i hava a 256 MB of ram
0
[ 2, 31, 259, 21, 8247, 1835, 29, 12138, 21486, 17, 170, 131, 13024, 17, 144, 52, 4077, 21, 21, 580, 2006, 16, 2843, 9, 800, 3726, 3726, 31, 259, 21, 8247, 1835, 29, 12138, 21486, 17, 170, 131, 13024, 17, 144, 52, 4077, 21, 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, 0, 0, 0, 0...
Advanced .Net Programming Course === I'm looking for an advanced programming course, preferably with a c# flair. Ideally, I'd like it to be boot-camp style where you focus intensely for a week. I've looked at some college courses and they seem too drawn out and I haven't found one with the content that I've liked. I am not looking for a conference such as PDC or TechEd or anything like that. I'd like it to be a little more structured than a bunch of hour long lectures about this or that. Here are some things I'm looking for in the course: <ul> <li>Best Practice Programming <li>Design Patterns <li>Advanced Object Oriented Techniques <li>Effective Unit Testing Strategies <li>Domain Driven Design <li>Dependency Injection/Inversion of Control </ul> It doesn't have to include all of that, but that's primarily what I'm looking to get better at. I've seen some of the courses on <a link="http://www.learningtree.com/courses/511.htm">Learning Tree</a> and <a href="http://www.globalknowledge.com/training/course.asp?pageid=9&courseid=9406&catid=195&country=United+States">Global Knowledge</a> and think they might fit the bill. I'm also really intrigued by <a href="http://www.jpboodhoo.com/Home.oo">Jean Paul's Nothin But .Net</a> course but I'd like to ask the community what they think where any good courses are.
0
[ 2, 2255, 13, 9, 2328, 3143, 674, 800, 3726, 3726, 31, 22, 79, 699, 26, 40, 2255, 3143, 674, 15, 6369, 4801, 29, 21, 272, 5910, 24037, 9, 5628, 102, 15, 31, 22, 43, 101, 32, 20, 44, 6801, 8, 8789, 1034, 113, 42, 1776, 22900, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
When deciding on a feature, what do you do? === Do you primarily think of reasons TO implement it, or reasons NOT TO implement it? What are the advantages of each?
4
[ 2, 76, 11211, 27, 21, 1580, 15, 98, 107, 42, 107, 60, 800, 3726, 3726, 107, 42, 2257, 277, 16, 2932, 20, 8713, 32, 15, 54, 2932, 52, 20, 8713, 32, 60, 98, 50, 14, 14683, 16, 206, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How often are you handed a "spec" before writing code? === I've pretty much never worked from a spec. Almost all assignments came from uber-vague descriptions. So... How often are you handed a spec before writing code? How often are the specs "good"? (not just vague buzzwords from business development) Cheers!
4
[ 2, 184, 478, 50, 42, 3988, 21, 13, 7, 18, 12610, 7, 115, 1174, 1797, 60, 800, 3726, 3726, 31, 22, 195, 1772, 212, 243, 577, 37, 21, 12737, 9, 557, 65, 16898, 281, 37, 13, 8866, 8, 1385, 3982, 15740, 9, 86, 9, 9, 9, 184, 47...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Vbscript detect whether UAC-elevated === I think the title says it all. How can my vbscript detect whether or not it is running in a UAC elevated context? I have no problem detecting the user, and seeing if the user is within the Administrators group. But this still doesn't answer the question of whether the process has elevated privs or not, when running under Vista or Windows 2008. Please note, I need only to *detect* this status; not attempt to elevate or (err ..) de-elevate. Thanks for any thoughts you can add!
0
[ 2, 13, 20468, 8741, 9092, 1472, 287, 1738, 8, 62, 9109, 1669, 800, 3726, 3726, 31, 277, 14, 581, 898, 32, 65, 9, 184, 92, 51, 13, 20468, 8741, 9092, 1472, 54, 52, 32, 25, 946, 19, 21, 287, 1738, 8052, 4141, 60, 31, 57, 90, 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...
Learning about low-level graphics programming === I'm interesting in learning about the different layers of abstraction available for making graphical applications. I see a lot of terms thrown around: At the highest level of abstraction, I hear about things like C#, .NET, pyglet and pygame. Further down, I hear about DirectX and OpenGL. Then there's DirectDraw, SDL, the Win32 API, and still other multi-platform libraries like WxWidgets. How can I get a good sense of where one of these layers ends and where the next one begins? What is the "lowest possible level" way of creating a window in Windows, in C? What about C++? (A code sample would be divine.) What about in X11? Are the Windows implementations of OpenGL and DirectX built on top of the Win32 API? Where can I begin to learn about these things? There's another question on SO where [Programming Windows][1] is suggested. What about for Linux? Is there an equivalent such book? I'm aware that this is very low-level, and that there are many friendlier tools available, but I would like to at least learn the basics of what's going on beneath the surface. As much as I'd like to begin slinging windows and vectors right off the bat, starting with something like pygame is too high-level for me; I really need to make the full conceptual circuit of *how you draw stuff on a computer*. I will certainly appreciate suggestions for books and resources, but I think it would be stupendously cool if the answers to this question filled up with lots of different ways to get to "Hello world" with different approaches to graphics programming. C? C++? Using OpenGL? Using DirectX? On Windows XP? On Ubuntu? Maybe I ask for too much. [1]: http://www.charlespetzold.com/pw5/
0
[ 2, 2477, 88, 708, 8, 3906, 8351, 3143, 800, 3726, 3726, 31, 22, 79, 4883, 19, 2477, 88, 14, 421, 9124, 16, 23907, 904, 26, 544, 21755, 3767, 9, 31, 196, 21, 865, 16, 1663, 6027, 140, 45, 35, 14, 1554, 662, 16, 23907, 15, 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...
How do I indent multiple lines quickly in vi? === Should be trivial, and it might even be in the help, but I can't figure out how to navigate it. Thanks in advance.
0
[ 2, 184, 107, 31, 19, 817, 38, 1886, 1560, 976, 19, 1790, 60, 800, 3726, 3726, 378, 44, 13, 19712, 15, 17, 32, 530, 166, 44, 19, 14, 448, 15, 47, 31, 92, 22, 38, 1465, 70, 184, 20, 20782, 32, 9, 3669, 19, 3612, 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, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Using itext to convert HTML to PDF === Does anyone know if it is possible to convert a HTML page (url) to a PDF using itext? If the answer is 'no' than that is OK as well since I will stop wasting my time trying to work it out and just spend some money on one of a number of components which I know can :) Thanks in advance for your responses!
0
[ 2, 568, 31, 11969, 20, 8406, 13, 15895, 20, 13, 11124, 800, 3726, 3726, 630, 1276, 143, 100, 32, 25, 938, 20, 8406, 21, 13, 15895, 2478, 13, 5, 911, 255, 6, 20, 21, 13, 11124, 568, 31, 11969, 60, 100, 14, 1623, 25, 13, 22, 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...
How do I stretch a background image to cover the entire HTML element? === I'm trying to get a background image of a HTML element (body, div, etc.) to stretch its entire width and height. Not having much luck. Is it even possible or do I have to do it some other way besides it being a background image? My current css is: body { background-position: left top; background-image: url(_images/home.jpg); background-repeat: no-repeat; } Thanks in advance.
0
[ 2, 184, 107, 31, 6363, 21, 2395, 1961, 20, 1227, 14, 1078, 13, 15895, 4520, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 164, 21, 2395, 1961, 16, 21, 13, 15895, 4520, 13, 5, 9760, 15, 13, 12916, 15, 2722, 9, 6, 20, 6363, 82, 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...
iterative version of recursive algorithm to make a binary tree === Given this algorithm, I would like to know if there exists (and which can be) an iterative version. Also, I want to know if the iterative version can be faster. This some kind of pseudo-python... the algorithm returns a reference to root of the tree make_tree(array a) if len(a) == 0 return None; node = pick a random point from the array calculate distances of the point against the others calculate median of such distances node.left = make_tree(subset of the array, such that the distance of points is lower to the median of distances) node.right = make_tree(subset, such the distance is greater or equal to the median) return node
0
[ 2, 32, 106, 3366, 615, 16, 302, 24244, 9083, 20, 233, 21, 14171, 1541, 800, 3726, 3726, 504, 48, 9083, 15, 31, 83, 101, 20, 143, 100, 80, 5636, 13, 5, 290, 56, 92, 44, 6, 40, 32, 106, 3366, 615, 9, 67, 15, 31, 259, 20, 143...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Document/Image Database Repository Design Question === Question: Should I write my application to directly access a database Image Repository or write a middleware piece to handle document requests. Background: I have a custom Document Imaging and Workflow application that currently stores about 15 million documents/document images (90%+ single page, group 4 tiffs, the rest PDF, Word and Excel documents). The image repository is a commercial, 3rd party application that is very expensive and frankly has too much overhead. I just need a system to store and retrieve document images. I'm considering moving the imaging directly into a SQL Server 2005 database. The indexing information is very limited - basically 2 index fields. It's a life insurance policy administration system so I index images with a policy number and a system wide unique id number. There are other index values, but they're stored and maintained separately from the image data. Those index values give me the ability to look-up the unique id value for individual image retrieval. The database server is a dual-quad core windows 2003 box with SAN drives hosting the DB files. The current image repository size is about 650GB. I haven't done any testing to see how large the converted database will be. I'm not really asking about the database design - I'm working with our DBAs on that aspect. If that changes, I'll be back :-) The current system to be replaced is obviously a middleware application, but it's a very heavyweight system spread across 3 windows servers. If I go this route, it would be a single server system. My primary concerns are scalabity and performace - heavily weighted toward performance. I have about 100 users, and usage growth will probably be slow for the next few years. Most users are primarily read users - they don't add images to the system very often. We have a department that handles scanning and otherwise adding images to the repository. We also have a few other applications that receive documents (via ftp) and they insert them into the repository automatically as they are received, either will full index information or as "batches" that a user reviews and indexes. Most (90%+) of the documents/images are very small, < 100K, probably < 50K, so I believe that storage of the images in the database file will be the most efficient rather than getting SQL 2008 and using a filestream.
0
[ 2, 4492, 118, 22039, 6018, 24869, 704, 1301, 800, 3726, 3726, 1301, 45, 378, 31, 2757, 51, 3010, 20, 1703, 1381, 21, 6018, 1961, 24869, 54, 2757, 21, 772, 5011, 1855, 20, 3053, 4492, 12279, 9, 2395, 45, 31, 57, 21, 5816, 4492, 130...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
VC6 and odd WINVER message during compile === I get the following message in a vc6 project compile: OTE: WINVER has been defined as 0x0500 or greater which enables Windows NT 5.0 and Windows 98 features. When these headers were released, Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions. For this release when WINVER is defined as 0x0500 or greater, you can only build beta or test applications. To build a retail application, set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk to see if retail Windows NT 5.0 or Windows 98 headers are available. See the SDK release notes for more information. Any idea what is going on? It builds and links fine. I have VC6, VS2005 and 2008 on my XP machine. perhaps my platform SDK is not up to date?
0
[ 2, 13, 8990, 379, 17, 4210, 628, 2304, 2802, 112, 26561, 800, 3726, 3726, 31, 164, 14, 249, 2802, 19, 21, 13, 8990, 379, 669, 26561, 45, 13, 10417, 45, 628, 2304, 63, 74, 2811, 28, 713, 396, 387, 6000, 54, 1894, 56, 14645, 1936,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Software that "Phones Home"; good? bad? Evil? What notice does one give? How to? === **PHONE HOME** Everybody wants to now and then. ...What about software when it grows up and becomes a mature product? Shouldn't it be an adult and live in its new home quietly? Or, should it show some affection from whence it came?... I've heard some say they'd rip out from the platters any bits that try and communicate without their say so. I've also noticed a large number of products that now routinely ask for permission to send statistical use information. And there are many levels in between. I'm sitting on the fence. There’s a long paragraphs explanation of how this question came to me, but for all our sakes, I wrote then deleted it. Suffice to say, I’m Chief Scientist, an officer of the company *and* head of our development efforts; this is a really big deal and I’m looking for insight from the programming community as I'm not getting any useful feedback here... The biggest argument for **PHONE HOME** is that some involved fear there is likely to be serious attempts to cheat the contract(s) and if the software occasionally phoned home it would help detect cheating (for which there are penalties). Other pro arguments are that it can provide usage statistics and perhaps detect when updates are appropriate. The biggest argument against is that it’s offensive. I also haven’t a clue how I would architect this. Clearly, everything calling home all the time is not going to fly. There are a half dozen major products and some will run 24 X 7 X 365.24 and some will be up and down like a frigen yo-yo, yet some data on all of them would be nice - Local repository? Then there’s connection strategy – a mail message, while convenient, may be a bad call because it can be more obtrusive (perhaps). Then, a simple TCP ssh call may not be so great, either. So, how about it? If you’re pro, please tell me why. If you’re against, why also. Examples of "doing it right?" Contractual text you like somewhere - or hate? Next, IF we decide to do it, how should we do it – how would YOU do it? Why? Frankly, I’m *profoundly* torn. I hate such things in general, but as an officer of the company, I have to acknowledge above my own feelings, there’s potentially a lot of money on the table here, and being offended may not be a good argument. Thanks for your thoughts.
0
[ 2, 2306, 30, 13, 7, 7709, 18, 213, 7, 73, 254, 60, 896, 60, 3215, 60, 98, 3551, 630, 53, 590, 60, 184, 20, 60, 800, 3726, 3726, 13, 1409, 7709, 213, 1409, 8903, 2846, 20, 130, 17, 94, 9, 13, 9, 9, 9, 608, 88, 2306, 76, 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...
Declarative and programmatic SWFLoaders === What's the difference in terms of security between declarative and programmatic SWFLoaders? In the ff. code, loader1 throws a security exception while loader2 does not. public someFunction(source:String):void { var loader1:SWFLoader = new SWFLoader(); loader1.load(source); loader2.source = source; } ... <mx:SWFLoader id="loader2"/>
0
[ 2, 121, 12078, 3366, 17, 625, 6732, 13, 18, 15263, 8294, 445, 800, 3726, 3726, 98, 22, 18, 14, 2841, 19, 1663, 16, 1221, 128, 121, 12078, 3366, 17, 625, 6732, 13, 18, 15263, 8294, 445, 60, 19, 14, 13, 2460, 9, 1797, 15, 6305, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Has Object Prevalance (Prevayler, Madeleine) been used in a Production System? === Has Object Prevalance mechanisms been used in an actual Production system? I'm referring to something like [Prevayler][1] or [Madeleine][2] The only thing I've found is [Instiki][3], a wiki engine. But since they started they've switched to SQLite. (The actual [instiki][4] page is down) [1]: http://www.prevayler.org/wiki/ [2]: http://madeleine.rubyforge.org/ [3]: http://en.wikipedia.org/wiki/Instiki [4]: http://www.instiki.org/
0
[ 2, 63, 3095, 782, 3377, 2416, 13, 5, 3515, 24105, 1252, 15, 117, 413, 1149, 6, 74, 147, 19, 21, 637, 329, 60, 800, 3726, 3726, 63, 3095, 782, 3377, 2416, 11626, 74, 147, 19, 40, 3463, 637, 329, 60, 31, 22, 79, 7378, 20, 301, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 AllowPartiallyTrustedCallers not the default? === For a .NET assembly to allow anything other than fully trusted callers the assembly must be signed and attributed with [AllowPartiallyTrustedCallers][1]. But even with this in place the CLR still (fortunately) checks code rights to ensure that the partially trusted caller can execute the desired code. So my question is, why is the AllowPartiallyTrustedCallers attribute not assumed for all assemblies? Why not have the opposite where those who really don't want partially trusted callers have to use some attribute like DenyPartiallyTrustedCallers? [1]: http://msdn.microsoft.com/en-us/library/system.security.allowpartiallytrustedcallersattribute.aspx
0
[ 2, 483, 25, 1655, 3091, 49, 1326, 11592, 69, 9200, 445, 52, 14, 12838, 60, 800, 3726, 3726, 26, 21, 13, 9, 2328, 1475, 20, 1655, 602, 89, 119, 2337, 9968, 21326, 18, 14, 1475, 491, 44, 908, 17, 6270, 29, 636, 17976, 3091, 49, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Interpreting Visual Studio 2005 Threads Window === I created a simple windows application in Visual Studio 2005 and on just entering the main form load event my threads window is as in the following image: [http://img519.imageshack.us/my.php?image=threadshh4.jpg][1] My questions are 1)Why are there so many threads in the first place when I haven't started any(apart from my application's 'Main Thread') 2)What does this thread named '.Net SystemEvents' do? 3)Why are the entries under the column 'Location' for all threads except the Main Thread empty? [1]: http://img519.imageshack.us/my.php?image=threadshh4.jpg
0
[ 2, 11584, 68, 3458, 1120, 812, 20396, 1463, 800, 3726, 3726, 31, 679, 21, 1935, 1936, 3010, 19, 3458, 1120, 812, 17, 27, 114, 4604, 14, 407, 505, 6305, 807, 51, 20396, 1463, 25, 28, 19, 14, 249, 1961, 45, 636, 21127, 6903, 1660, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 lookup django session for a particular user? === I am writing an application where I will be accessing the database from django and from a stand alone application. Both need to do session verification and the session should be the same for both of them. Django has a built in authentication/session verification, which is what I am using, now I need to figure out how to reuse the same session for my stand alone application. My question is how can I look up a session_key for a particular user? From what it looks there is nothing that ties together auth_user and django_session
0
[ 2, 184, 20, 361, 576, 3857, 14541, 3723, 26, 21, 1498, 4155, 60, 800, 3726, 3726, 31, 589, 1174, 40, 3010, 113, 31, 129, 44, 1381, 68, 14, 6018, 37, 3857, 14541, 17, 37, 21, 1261, 1056, 3010, 9, 156, 376, 20, 107, 3723, 25056, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Linq DataContext class not accessible in my MVC after I save the dbml === I just downloaded MVC and I am going through a tutorial. Everything goes fine until I try to declare a DataContext object. My dbml is named **db.dbml** (tried another on named test.dbml) and when I try this: public dbDataContext db = new dbDataContext(); I get: > The type or namespace name > 'dbDataContext' could not be found ... Am I missing something? In webforms this is all I had to do, and in the tutorial that is all that is shown. I downloaded the newest MVC today... Thank you.
0
[ 2, 6294, 1251, 1054, 1126, 11969, 718, 52, 7342, 19, 51, 307, 8990, 75, 31, 2079, 14, 13, 9007, 8184, 800, 3726, 3726, 31, 114, 23887, 307, 8990, 17, 31, 589, 228, 120, 21, 29724, 9, 796, 1852, 1123, 163, 31, 1131, 20, 10123, 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...
Are you an agile/pragmatic developer in a waterfall organization? === If so, how do you deal with things that just don't "feel" right such as: * not writing unit tests * not having a continuous build * not refactoring * not having a team coding standard * not pair programming * not doing iterations * no daily standups * no retrospectives Now, some agile organizations do leave out some of these practices, but most successful ones incorporate most of them. What do you do to deal with the seeming chaos of the traditional development processes?
0
[ 2, 50, 42, 40, 27475, 118, 7310, 263, 6732, 10058, 19, 21, 12927, 1165, 60, 800, 3726, 3726, 100, 86, 15, 184, 107, 42, 1183, 29, 564, 30, 114, 221, 22, 38, 13, 7, 16963, 7, 193, 145, 28, 45, 1637, 52, 1174, 1237, 4894, 1637, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
OnMenuItemClick without ViewState? === I have a (derived) Menu control, that displays a rather large list of items from a custom data source. I need to disable ViewState on the menu to avoid the very annoying "Can't select a disabled or unselectable menu item" when some other control causes the current selection to change on a postback. Unfortunately, when ViewState is disabled for the Menu, the postbacks generated *by* the menu aren't raising any events. If I enable ViewState, the OnMenuItemClick event is raised. If I disable ViewState, OnMenuItemClick is not raised. I'm perplexed. I need to leave ViewState off for the menu, so how can I handle postbacks from the actual menu? At this point I'm leaning towards using the Menu's Load event, parsing the __EVENTTARGET to see if it's the Menu, and going from there. This would technically process the postback event before it would normally but that's ok, I guess. Any better ideas?
0
[ 2, 27, 755, 291, 2119, 4829, 10129, 366, 1418, 3859, 60, 800, 3726, 3726, 31, 57, 21, 13, 5, 25891, 6, 11379, 569, 15, 30, 9412, 21, 864, 370, 968, 16, 3755, 37, 21, 5816, 1054, 1267, 9, 31, 376, 20, 1460, 579, 1418, 3859, 27,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
VistaDB Connection Issue Programmatically using SQLConnection and ConnectionString === I'm getting an error connecting to a VistaDB using a connection string in the web.config file. It works fine using a SQLDataSource AFTER I specified the ProviderName. On another page I'm only connecting in code and *Here is the code for the connection string:* Public Function CreateConnection() As SqlConnection _connectionString = ConfigurationManager.ConnectionStrings("ConnectionString").ToString() Return New SqlConnection(_connectionString) End Function *Here is the error:* > A network-related or instance-specific > error occurred while establishing a > connection to SQL Server. The server > was not found or was not accessible. > Verify that the instance name is > correct and that SQL Server is > configured to allow remote > connections. (provider: SQL Network > Interfaces, error: 26 - Error Locating > Server/Instance Specified) **How can I resolve this error?**
0
[ 2, 13520, 9007, 2760, 1513, 625, 6732, 1326, 568, 4444, 255, 25996, 872, 17, 2760, 11130, 800, 3726, 3726, 31, 22, 79, 1017, 40, 7019, 6440, 20, 21, 13520, 9007, 568, 21, 2760, 3724, 19, 14, 2741, 9, 14093, 2816, 3893, 9, 32, 693,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Calling a jQuery function inside html return from an AJAX call === I am working on a web page that is using jQuery. I have an ajax call that gets data from the server an updates a div. Inside that data there is a jQuery function; however, the function is not being called after the data is loaded into the page. I have the proper js files include in the page already. This is what is returned from the ajax call and placed into a div: <script type="text/javascript"> $(function() { $('input').myFunction('param'); }); </script> <p> other html </p> How do I get the returned javascript to run after the html is inserted into the page? (I am using Rails with the jRails plugin )
0
[ 2, 2555, 21, 487, 8190, 93, 1990, 572, 13, 15895, 788, 37, 40, 20624, 645, 800, 3726, 3726, 31, 589, 638, 27, 21, 2741, 2478, 30, 25, 568, 487, 8190, 93, 9, 31, 57, 40, 20624, 645, 30, 3049, 1054, 37, 14, 8128, 40, 16779, 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...
Copy and Modify selected text in different application. === I have a windows application running at the backend. I have functions in this applications mapped to hot keys. Like if i put a message box into this function and give hot key as Alt+Ctl+D. then on pressing Alt, Ctrl and D together the message box comes up. My application is working fine till this point. Now i want to write a code inside this function so that when i am using another appilcation like note pad, i select a particular line of text and press the hot key Alt + Ctrl + D it is supposed to copy the selected text append it with "_copied" and paste it back to notepad. Anyone who has tried a similar application please help me with your valuable inputs. Thanks
0
[ 2, 4344, 17, 17579, 1704, 1854, 19, 421, 3010, 9, 800, 3726, 3726, 31, 57, 21, 1936, 3010, 946, 35, 14, 97, 2451, 9, 31, 57, 3719, 19, 48, 3767, 20877, 20, 1047, 5534, 9, 101, 100, 31, 442, 21, 2802, 1649, 77, 48, 1990, 17, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How Code Color is Set in StackOverflow? === The most favorite feature of StackOverflow for me is that it can automatically detect code in post and set appropriate color to the code. I'm wondering how the color is set. When I do a Ctrl+F5 on a page, the code seems first be black text, then change to be colorful at a glance. Is it be done by jQuery?
0
[ 2, 184, 1797, 1665, 25, 309, 19, 7566, 2549, 9990, 60, 800, 3726, 3726, 14, 127, 3839, 1580, 16, 7566, 2549, 9990, 26, 55, 25, 30, 32, 92, 7499, 9092, 1797, 19, 678, 17, 309, 4593, 1665, 20, 14, 1797, 9, 31, 22, 79, 5712, 184,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
The Halting Problem in the Field === When have you ever personally come upon the <b>halting problem</b> in the field? This can be when a co-worker / boss suggested a solution which would violate the fundamental limits of computation, or when you realized yourself that a problem you were trying to solve was, in fact, impossible to solve. The most recent time I came up with it was when studying type checkers. Our class realized that it would be impossible to write a perfect type checker (one that would accept all programs that would run without type errors, and reject all programs that would run with type errors) because this would, in fact, solve the halting problem. Another was when we realized, in the same class, that it would be impossible to determine whether a division would ever occur by zero, in the type-checking stage, because checking whether a number, at run-time, is zero, is also a version of the halting problem.
0
[ 2, 14, 7278, 68, 1448, 19, 14, 575, 800, 3726, 3726, 76, 57, 42, 462, 7200, 340, 685, 14, 13, 1, 220, 1, 4937, 1203, 1448, 1, 118, 220, 1, 19, 14, 575, 60, 48, 92, 44, 76, 21, 326, 8, 22560, 13, 118, 4054, 2347, 21, 4295, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What's a Turing machine? === What is a Turing machine and why do people keep mentioning it? My IBM PC is all I need to do my computation! Why does anyone care about these machines?
0
[ 2, 98, 22, 18, 21, 6205, 68, 1940, 60, 800, 3726, 3726, 98, 25, 21, 6205, 68, 1940, 17, 483, 107, 148, 643, 21215, 32, 60, 51, 10233, 5168, 25, 65, 31, 376, 20, 107, 51, 21683, 187, 483, 630, 1276, 781, 88, 158, 6035, 60, 3,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
UNIX vs Windows memory deallocation === My understanding is that in unix, when memory is freed, the memory doesn't get returned back to the operating system, it stays in the process to be used again for the next call to malloc. On windows, I understand that the memory actually gets returned to the operating system. Is there any big difference between these two ways of doing things or are they just two different ways of doing the same thing? And if there are any pros/cons to these two methods, what are they?
0
[ 2, 22540, 4611, 1936, 1912, 1183, 19032, 800, 3726, 3726, 51, 3260, 25, 30, 19, 22540, 15, 76, 1912, 25, 9292, 15, 14, 1912, 1437, 22, 38, 164, 587, 97, 20, 14, 2455, 329, 15, 32, 16192, 19, 14, 953, 20, 44, 147, 188, 26, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to realiaze diff function? === how to realiaze diff function? such as stackoverflow's history for question.
0
[ 2, 184, 20, 683, 549, 1734, 20811, 1990, 60, 800, 3726, 3726, 184, 20, 683, 549, 1734, 20811, 1990, 60, 145, 28, 7566, 2549, 9990, 22, 18, 447, 26, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Unmanaged DLLs in C++ === I've been reading many a tutorial/article on unmanaged DLLs in C++. For the life of me, however, I cannot seem to grasp the concept. I'm easily confused by the seeming disagreement about whether it needs a header file, how to export it, whether I need a .lib file and what have you. So, let's assume I have just a function like so: public int calculateSquare(int num) { return num*num; } Ignoring the actual code, what do I require to make this simple function, by itself, into a DLL which I can then call? Do I just add __dllexport or whatever it is to the first line or do I require a header? I am perplexed by all of this.
0
[ 2, 367, 177, 8030, 13, 43, 211, 18, 19, 272, 20512, 800, 3726, 3726, 31, 22, 195, 74, 1876, 151, 21, 29724, 118, 20360, 27, 367, 177, 8030, 13, 43, 211, 18, 19, 272, 20512, 9, 26, 14, 201, 16, 55, 15, 207, 15, 31, 1967, 2260...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Context information in Tomcat5.5 === I am facing this peculiar problem. My webapp, works fine on my localhost. Its a JSP/Struts-Tomcat-MySQL app. However, when I host it on hostjava.net (shared tomcat), it is unable to connect to the database. After some debugging, I have identified the problem, to be with JNDI lookup for datasource. If you want, you can take a look at the log at http://rohitesh.hostjava.net/MapsDummyLog.htm Some details on the context information location : /META-INF/context.xml contains : <Context path="" docBase="" debug="5" reloadable="true" crossContext="true" override="true"> <Resource name="jdbc/ConnectionPooling" auth="Container" type="javax.sql.DataSource" maxActive="10" maxIdle="5" username="[username]" password="[password]" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/[db name]?autoReconnect=true" /> </Context> Can anyone help me find out, where am going wrong, please? Cheers, Rohitesh.
0
[ 2, 4141, 676, 19, 2067, 5782, 264, 9, 264, 800, 3726, 3726, 31, 589, 4325, 48, 13193, 1448, 9, 51, 2741, 7753, 15, 693, 1123, 27, 51, 375, 11694, 9, 82, 21, 487, 3401, 118, 11602, 38, 18, 8, 6015, 5782, 8, 915, 18, 22402, 4865...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Code documentation for delphi similar to javadoc or c# xml doc === I need a code documentation tool similar to javadoc or c# xml doc for delphi code. What is the best tool? I prefer a technology, which is in the future compatible to the Microsoft sandcastle project.
0
[ 2, 1797, 13945, 26, 23030, 835, 20, 8247, 13799, 54, 272, 5910, 23504, 9765, 800, 3726, 3726, 31, 376, 21, 1797, 13945, 5607, 835, 20, 8247, 13799, 54, 272, 5910, 23504, 9765, 26, 23030, 1797, 9, 98, 25, 14, 246, 5607, 60, 31, 636...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
PHP Version Checking === How can I check the version of my script against an online file to see if it's the latest version?
0
[ 2, 13, 26120, 615, 9886, 800, 3726, 3726, 184, 92, 31, 2631, 14, 615, 16, 51, 3884, 149, 40, 2087, 3893, 20, 196, 100, 32, 22, 18, 14, 5736, 615, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Why split the <script> tag when writing it with document.write()? === Why do some sites (or advertisers that give clients javascript code) employ a technique of splitting the &lt;script> and/or &lt;/script> tags up within document.write() calls? I noticed that Amazon does this as well, for example: <script type='text/javascript'> if (typeof window['jQuery'] == 'undefined') document.write('<scr'+'ipt type="text/javascript" src="http://z-ecx.images-amazon.com/images/G/01/javascripts/lib/jquery/jquery-1.2.6.pack._V265113567_.js"></sc'+'ript>'); </script>
0
[ 2, 483, 2132, 14, 13, 1, 8741, 1, 3383, 76, 1174, 32, 29, 4492, 9, 23716, 5, 6, 60, 800, 3726, 3726, 483, 107, 109, 3259, 13, 5, 248, 22732, 18, 30, 590, 7421, 8247, 8741, 1797, 6, 13125, 21, 4873, 16, 17282, 14, 279, 255, 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...
Parsing C++ to generate unit test stubs === I've recently been trying to create units tests for some legacy code. I've been taking the approach of using the linker to show me which functions cause link errors, greping the source to find the definition and creating a stub from that. Is there an easier way? Is there some kind of C++ parser that can give me class definitions, in some easy to use form, from which I can generate stubs?
0
[ 2, 2017, 18, 68, 272, 20512, 20, 7920, 1237, 1289, 21354, 18, 800, 3726, 3726, 31, 22, 195, 1989, 74, 749, 20, 1600, 1398, 4894, 26, 109, 7780, 1797, 9, 31, 22, 195, 74, 741, 14, 2141, 16, 568, 14, 3508, 106, 20, 298, 55, 56, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What online collaboration sites do you know? === Basically I need a hosted solution, where one can create an account for a project and the distributed team members can interact through that site during the project implementation. I know a lot of such software but not a hosted one.
0
[ 2, 98, 2087, 4004, 3259, 107, 42, 143, 60, 800, 3726, 3726, 11374, 31, 376, 21, 2812, 4295, 15, 113, 53, 92, 1600, 40, 2176, 26, 21, 669, 17, 14, 4387, 173, 443, 92, 10001, 120, 30, 689, 112, 14, 669, 6123, 9, 31, 143, 21, 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, 0, 0, 0, 0, 0, 0, 0...
Developing an integrated product for the Microsoft Office suite === I have a product idea that require integration into the Microsoft Office suite. Are there any licensing/limitation issues to be aware of for me to proceed?
0
[ 2, 3561, 40, 5547, 2374, 26, 14, 7099, 488, 6160, 800, 3726, 3726, 31, 57, 21, 2374, 882, 30, 4077, 8078, 77, 14, 7099, 488, 6160, 9, 50, 80, 186, 15038, 118, 20565, 857, 1549, 20, 44, 3854, 16, 26, 55, 20, 11158, 60, 3, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
What videos are out there? === You have the <a href=http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/> Sussman lectures </a> ( replicated at <a href=http://www.archive.org/details/MIT_Structure_of_Computer_Programs_1986>wayback</a> ) also the classes at <a href=http://www.aduni.org/courses/> Aduni </a> as well as the videos that is in some of the courses at <a href=http://ocw.mit.edu/OcwWeb/web/home/home/index.htm> MIT's OCW site </a>. So does anyone know any videos courses out there. I mean serious courses, not simply things like Google Tech Talks ( which are nice too but not what I'm looking for ).
0
[ 2, 98, 6610, 50, 70, 80, 60, 800, 3726, 3726, 42, 57, 14, 13, 1, 58, 746, 14057, 3726, 21127, 6903, 8024, 18, 9, 150, 18921, 9, 5130, 9, 69, 291, 118, 6893, 118, 1898, 160, 118, 379, 9, 18951, 118, 19564, 528, 8, 18, 267, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What power do i have over my license === Say for example, i've written some code under GPL 3. My company wants to use that code for a commercial product. Am i allowed to then say to them that they can use it under LGPL/MIT or any other license? If so, would i then have to change the included header at the top of each file? If so, what is stopping someone else from changing the license on my code?
0
[ 2, 98, 414, 107, 31, 57, 84, 51, 3962, 800, 3726, 3726, 395, 26, 823, 15, 31, 22, 195, 642, 109, 1797, 131, 489, 5727, 203, 9, 51, 237, 2846, 20, 275, 30, 1797, 26, 21, 1439, 2374, 9, 589, 31, 1159, 20, 94, 395, 20, 105, 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...
Receiving MessageQueue msgs without reading them from the receiving Queue? === I am using the **System.Messaging.MessageQueue** to send and receive multicast **System.Messaging.Messag**e’s on my LAN – this works fine. However, I have a requirement to receive the msgs without using a message queue. As the **MessageQueue** uses the PGM protocol (113) to send messages I am trying to build a type that listens on PGM (protocol 113) using a socket (e.g. new **Socket(AddressFamily.InterNetwork, SocketType.Rdm, (ProtocolType)113);**). The type is receiving message data but it is in a text format (with a soap formatter section -see example this example on msdn [http://msdn.microsoft.com/en-us/library/cc219170.aspx][1]) I obviously want binary data so i can cast it into a **System.Messaging.Message** and get at the real data. Any ideas on how i can do this are greatly appreciated . [1]: http://msdn.microsoft.com/en-us/library/cc219170.aspx
0
[ 2, 3396, 2802, 2005, 4185, 4235, 5447, 366, 1876, 105, 37, 14, 3396, 22521, 60, 800, 3726, 3726, 31, 589, 568, 14, 13, 1409, 10724, 9, 3845, 18, 7426, 9, 3845, 18, 1303, 2005, 4185, 1409, 20, 2660, 17, 2588, 1889, 6146, 13, 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 convert (not neccessarily programatically) between Windows' wchar_t and GCC/Linux one? === Suppose I have this Windows wchar_t string: L"\x4f60\x597d" and L"\x00e4\x00a0\x597d" and would like to convert it (not neccessarily programatically; it will be a one-time thing) to GCC/Linux wchar_t format, which is UTF-32 AFAIK. How do I do it? (a general explanation would be nice, but example based on this concrete case would be helpful as well) *Please don't direct me to character conversion sites. I would like to convert from L"\x(something)" form and not "end character" form.*
0
[ 2, 184, 20, 8406, 13, 5, 1270, 19724, 5052, 18, 18966, 625, 721, 8438, 6, 128, 1936, 22, 619, 5433, 1, 38, 17, 489, 3384, 118, 1226, 7147, 53, 60, 800, 3726, 3726, 5787, 31, 57, 48, 1936, 619, 5433, 1, 38, 3724, 45, 644, 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...
C++: How to split a string? === What's the most elegant way to split a string in C++? The string can be assumed to be composed of words separated by whitespace. (Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.) The best solution I have right now is: #include <iostream> #include <sstream> #include <string> using namespace std; int main() { string s("Somewhere down the road"); istringstream iss(s); do { string subs; iss >> subs; cout << "Substring: " << substr << endl; } while (iss); return 0; }
0
[ 2, 272, 20512, 45, 184, 20, 2132, 21, 3724, 60, 800, 3726, 3726, 98, 22, 18, 14, 127, 11614, 161, 20, 2132, 21, 3724, 19, 272, 20512, 60, 14, 3724, 92, 44, 3632, 20, 44, 1869, 16, 715, 4196, 34, 359, 5582, 9, 13, 5, 10280, 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...
"Cannot add array to BooleanQuery" error with ferret on rails === I'm trying to get a simple search form working in my RoR site. I've got the following code: (in note_controller.rb) def search @results = Note.find_with_ferret(params[:term]).sort_by(&:ferret_rank) respond_to do |format| format.html format.xml { render :xml => @nootes } end end (in note.rb) class Note < ActiveRecord::Base acts_as_ferret :fields => [ :title, :body ] end (in index.html.erb) <%= form_tag :action => 'search'%> <%= text_field 'term', nil %> <%= submit_tag 'Search' %> </form> (in search.html.erb) <h1><%= pluralize(@results.size, 'result') %></h1> <ul> <% for result in @results %> <li><%= result.ferret_score %>: <%= link_to result.tile, result %></li> <% end %> </ul> As you can hopefully see from the above I've got a model which I've told to acts_as_ferret. I've then got a search action in my controller, which tries to render to the search.html.erb view. I've got a form in the index view which does a search. However, when I run this I get the following error: > Cannot add Array to a BooleanQuery I guess I'm doing something wrong with my form so that ferret is getting the wrong data somehow. Is the form_tag thing I've done the right way to do it? Any help would be much appreciated.
0
[ 2, 13, 7, 1245, 1270, 3547, 7718, 20, 9827, 413, 210, 8190, 93, 7, 7019, 29, 29229, 27, 2240, 18, 800, 3726, 3726, 31, 22, 79, 749, 20, 164, 21, 1935, 2122, 505, 638, 19, 51, 761, 248, 689, 9, 31, 22, 195, 330, 14, 249, 1797...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 best to resize images off-server === I have a site that users upload images to. Those images are resized to various dimensions. I currently do that on my server, but was thinking of processing that on AWS or something similar. Is that a good idea?
0
[ 2, 184, 246, 20, 302, 10454, 3502, 168, 8, 10321, 106, 800, 3726, 3726, 31, 57, 21, 689, 30, 3878, 71, 8294, 3502, 20, 9, 273, 3502, 50, 302, 6560, 20, 617, 9913, 9, 31, 871, 107, 30, 27, 51, 8128, 15, 47, 23, 1440, 16, 5511...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Best practices for using version-controlling on Cocoa projects === I recently started using Git as my version control system for some Cocoa projects I'm working on and wondered if there are best practices for working with version control systems on Cocoa projects. There is the obvious "build" directory which I exclude from versioning as it's not important and can change quite a bit when debugging some code and then there are those .pbxuser and .perspectivev3 which change ever time I open the project in Xcode but I don't really know if they are "important" enough to be checked in. Is there a commonly used configuration for excluding unimportant files? Thanks in advance
0
[ 2, 246, 5242, 26, 568, 615, 8, 12898, 802, 27, 24507, 2314, 800, 3726, 3726, 31, 1989, 373, 568, 13, 10404, 28, 51, 615, 569, 329, 26, 109, 24507, 2314, 31, 22, 79, 638, 27, 17, 3519, 100, 80, 50, 246, 5242, 26, 638, 29, 615, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 get the current directory in a web service === I am using System.IO.Directory.GetCurrentDirectory() to get the current directory in my web service, but that does not give me the current directory. Hows to I get the current directory in a web service thanks Stuart
0
[ 2, 184, 107, 31, 164, 14, 866, 16755, 19, 21, 2741, 365, 800, 3726, 3726, 31, 589, 568, 329, 9, 1963, 9, 10197, 93, 9, 3060, 17657, 10197, 93, 5, 6, 20, 164, 14, 866, 16755, 19, 51, 2741, 365, 15, 47, 30, 630, 52, 590, 55, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
.NET Does NOT Have Reliable Asynchronouos Socket Communication? === I once wrote a Crawler in .NET. In order to improve its scalability, I tried to take advantage of asynchronous API of .NET. The System.Net.HttpWebRequest has asynchronous API BeginGetResponse/EndGetResponse. However, this pair of API is just to get a HTTP response headers and a Stream instance from which we can extract HTTP response content. So, my strategy is to use BeginGetResponse/EndGetResponse to asynchronously get the response Stream, then use BeginRead/EndRead to asynchronously get bytes from the response Stream instance. Everything seems perfect until the Crawler goes to stress test. Under stress test, the Crawler suffers from high memory usage. I checked the memory with WinDbg+SoS and fount out that lots of byte arrays are pined by System.Threading.OverlappedData instances. After some searching in internet, I found this KB [http://support.microsoft.com/kb/947862][1] from microsoft. According to the KB, the number of asynchronous I/O should have a "upper bound", but it doesn't tell a "suggested" bound value. So, in my eye, this KB helps nothing. This is obviously a .NET bug. Finally, I have to drop the idea to do asynchronous extracting bytes from response Stream, and just do it in synchronous way. > The .NET library that allows > Asynchronous IO with dot net sockets > (Socket.BeginSend / > Socket.BeginReceive / > NetworkStream.BeginRead / > NetworkStream.BeginWrite) must have an > upper bound on the amount of buffers > outstanding (either send or receive) > with their asynchronous IO. > > The network application should have an > upper bound on the number of > *outstanding* asynchronous IO that it posts. [1]: http://support.microsoft.com/kb/947862
0
[ 2, 13, 9, 2328, 630, 52, 57, 11398, 21, 16023, 2655, 759, 18482, 3291, 60, 800, 3726, 3726, 31, 382, 738, 21, 12392, 106, 19, 13, 9, 2328, 9, 19, 389, 20, 3545, 82, 18957, 4091, 15, 31, 794, 20, 247, 3314, 16, 21, 16023, 1291,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 sort a std::vector by the values of a different std::vector? === I have several std::vector, all of the same length. I want to sort one of these vectors, and apply the same transformation to all of the other vectors. Is there a neat way of doing this? (preferably using the STL or Boost)? Some of the vectors hold ints and some of them std::strings. Pseudo code: std::vector<int> Index = { 3, 1, 2 }; std::vector<std::string> Values = { "Third", "First", "Second" }; Transformation = sort(Index); Index is now { 1, 2, 3}; ... magic happens as Tranformation is applied to Values ... Values is now { "First", "Second", "Third" };
0
[ 2, 184, 107, 31, 2058, 21, 354, 43, 45, 45, 28033, 34, 14, 4070, 16, 21, 421, 354, 43, 45, 45, 28033, 60, 800, 3726, 3726, 31, 57, 238, 354, 43, 45, 45, 28033, 15, 65, 16, 14, 205, 1476, 9, 31, 259, 20, 2058, 53, 16, 158, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
LZH Compression Libraries === i'm looking for a LHarc de/compressing librarie, with source if possible.
0
[ 2, 644, 7860, 14864, 8649, 800, 3726, 3726, 31, 22, 79, 699, 26, 21, 13, 19285, 5453, 121, 118, 960, 5890, 68, 2093, 2559, 3272, 15, 29, 1267, 100, 938, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How do I put preformatted text into a FitNesse fixture table cell? === I want to be able to put preformatted text (i.e. containing line breaks) into a single cell of a FitNesse fixture table. Is there a way to manipulate the FitNesse wiki markup to do this?
0
[ 2, 184, 107, 31, 442, 782, 29850, 1854, 77, 21, 11331, 62, 16564, 859, 1667, 60, 800, 3726, 3726, 31, 259, 20, 44, 777, 20, 442, 782, 29850, 1854, 13, 5, 49, 9, 62, 9, 3503, 293, 7947, 6, 77, 21, 345, 1667, 16, 21, 11331, 62...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Windows Mobile - Compact Framework program as a service ? === What is the best way to have my C# Compact Framework program running in the background on a Windows Mobile device ? I need to respond to different events, such as a text message arriving with a specific content. I would like not to start up any UI when the process is started, but just run in the background until UI is needed. How can this be done ?
0
[ 2, 1936, 3241, 13, 8, 8285, 6596, 625, 28, 21, 365, 13, 60, 800, 3726, 3726, 98, 25, 14, 246, 161, 20, 57, 51, 272, 5910, 8285, 6596, 625, 946, 19, 14, 2395, 27, 21, 1936, 3241, 3646, 13, 60, 31, 376, 20, 4590, 20, 421, 963,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 web server control that generates HTML and Excel === I am developing a web application that contains a great deal of reporting. The reports are fairly basic, but some have multiple datasets or embedded charts. One of the key requirements is that each report can be exported to Excel. The Excel version of the report is disconnected and should look the same (or very similar) to the web report. That includes formmating of values, cell styles, number of rows/columns, charts, etc. The problem I've encountered is that the ASP.Net reporting tools I've looked at do a great job in creating the report, but the export to Excel is not as robust as I'd like. The ASP.Net spreadsheet tools do a great job generating an Excel sheet, but they don't offer a way to view the information in a browser without downloading them locally and viewing them in Excel. Any suggestions? Thanks!
0
[ 2, 28, 306, 9, 2328, 2741, 8128, 569, 30, 7920, 18, 13, 15895, 17, 20700, 800, 3726, 3726, 31, 589, 3561, 21, 2741, 3010, 30, 1588, 21, 374, 1183, 16, 6670, 9, 14, 2813, 50, 6647, 2125, 15, 47, 109, 57, 1886, 1054, 3554, 18, 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...
Curve-fitting a histogram distribution === Someone asked me a question via e-mail about integer partitions the other day (as I had released a Perl module, Integer::Partition, to generate them), that I was unable to answer. Background: here are all the integer partitions of 7 (the sum of each row equals 7). 7 6 1 5 2 5 1 1 4 3 4 2 1 4 1 1 1 3 3 1 3 2 2 3 2 1 1 3 1 1 1 1 2 2 2 1 2 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 Now if we look at the lengths of each partition and count how many there are of each length: 1 1 2 3 3 4 4 3 5 2 6 1 7 1 ... we see one partition has a length of 1 (7), one has a length of 7 (1 1 1 1 1 1 1). There are 4 partitions that have a length of 3: (5 1 1), (4 2 1), (3 3 1), (3 2 2). For larger numbers of N, if you graph the distribution of partition lengths, an asymetric curve emerges, skewed towards the origin. If you're curious, graph the following partition length counts for N=40. 1 20 133 478 1115 1945 2738 3319 3589 3590 3370 3036 2637 2241 1861 1530 1236 995 790 627 490 385 297 231 176 135 101 77 56 42 30 22 15 11 7 5 3 2 1 1 If you're interested in generating these distribution counts, here's the code I used: #! /usr/local/bin/perl use strict; use warnings; use Integer::Partition; my $n = shift || 1; while (1) { my $start = time; my $i = Integer::Partition->new($n); my %size; while (my $p = $i->next) { $size{scalar @$p}++; } open my $out, '>>', "bucket-count.out"; for my $s (sort {$a <=> $b} keys %size) { print $out "$n\t$s\t$size{$s}\n"; } close $out; my $delta = time - $start; print "$n\t$delta secs\n"; ++$n; } (note: on my computer, N=90 takes about 10 minutes to generate). So my question is: what equation can be used to match the observed distribution curve? Is it a Gauss (can a Gaussian distribution be asymetric?) or Poisson distribution, or something else? How do I solve it for N? If I remember my maths from high-school, I can determine the peak by solving when the derivative intersects 0. How do I produce the derivative? I've searched the web but all I get back are abstruse mathematical papers. I just need some code :)
0
[ 2, 7101, 8, 23483, 21, 33, 38, 20476, 2523, 800, 3726, 3726, 737, 411, 55, 21, 1301, 1197, 13, 62, 8, 8079, 88, 13820, 10711, 18, 14, 89, 208, 13, 5, 472, 31, 41, 261, 21, 416, 255, 12613, 15, 13820, 45, 45, 3091, 9861, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Syntax coloring a file with a non-standard extension in Visual Studio 2008 === I'm probably missing something very obvious here. I have files with the extension .st that contain (mostly) C++ code. I want the C++ in there to be highlighted when I open it with Visual Studio. I go to Tools->Options->Text Editor->File Extension. I type 'st' in the 'extension' box and select 'Microsoft Visual C++' as the editor (I also tried 'source code editor' but that didn't help). But I still don't get syntax coloring. Is there another way?
0
[ 2, 22649, 1665, 68, 21, 3893, 29, 21, 538, 8, 15566, 3896, 19, 3458, 1120, 570, 800, 3726, 3726, 31, 22, 79, 910, 2863, 301, 253, 4674, 235, 9, 31, 57, 6488, 29, 14, 3896, 13, 9, 384, 30, 3717, 13, 5, 18397, 6, 272, 20512, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why does a h1 tag display different in a div, when a doctype is set? === I have a div with a `<h1>` tag in a div, with no margins. If I define any doctype, a white space appears above the div. If I remove the `<h1>` tags, or remove the doctype definition, there is no space (as there should be. Why? Example HTML: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <style> body{ margin:0 } #thediv{ background-color:green } </style> </head> <body> <div id="thediv"> <h1>test</h1> </div> </body> </html> The problem is the space above the green div, remove the DOCTYPE and the space disappears, change the `<h1>` tag to `<b>` and the space also disappears. Happens in almost all browsers (Using <http://browsershots.org>). Amusingly, the only browser that seems to display it correctly was Internet Explorer 6.0..
0
[ 2, 483, 630, 21, 746, 165, 3383, 3042, 421, 19, 21, 13, 12916, 15, 76, 21, 9765, 4474, 25, 309, 60, 800, 3726, 3726, 31, 57, 21, 13, 12916, 29, 21, 13, 1, 252, 165, 1, 3383, 19, 21, 13, 12916, 15, 29, 90, 5440, 18, 9, 100,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Are there any web based email clients written in python? === I need to integrate a email client in my current python web app. Anything available?
0
[ 2, 50, 80, 186, 2741, 432, 8517, 7421, 642, 19, 20059, 60, 800, 3726, 3726, 31, 376, 20, 18399, 21, 8517, 6819, 19, 51, 866, 20059, 2741, 4865, 9, 602, 904, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Java - Abstract class to contain variables? === Is it good practice to let abstract classes defind instance variables? public abstract class ExternalScript extends Script { String source; public abstract void setSource(String file); public abstract String getSource(); } The sub class, ExternalJavaScript.class, would then automatically get the source variable but I feel it's easier to read the code if all the sub classes themselves define the source, instead of from inheritance. What is your advice? /Adam
0
[ 2, 8247, 13, 8, 8502, 718, 20, 3717, 12157, 60, 800, 3726, 3726, 25, 32, 254, 1345, 20, 408, 8502, 2684, 121, 19811, 4851, 12157, 60, 317, 8502, 718, 4886, 8741, 9073, 3884, 13, 1, 3724, 1267, 73, 317, 8502, 11364, 309, 12097, 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...