unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Excel built-in dialogs === Does anybody know how to call the import data built-in dialog excel from a macro (vba). I've tried Application.Dialogs.Item(...).Show but I can´t find the right dialog. Thanks in advance.
0
[ 2, 20700, 392, 8, 108, 28223, 18, 800, 3726, 3726, 630, 11181, 143, 184, 20, 645, 14, 9010, 1054, 392, 8, 108, 28223, 20700, 37, 21, 9069, 13, 5, 710, 969, 6, 9, 31, 22, 195, 794, 3010, 9, 4286, 5567, 18, 9, 2119, 79, 5, 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...
IQueryable<T> vs IEnumerable<T> with Lambda, which to choose? === I do more and more exercise with Lambda but I do not figure out why sometime example use <code>.AsQueryable();</code> that use the IQueryable and sometime it omit the <code>.AsQueryable();</code> and use the IEnumerable. I have read the [MSDN][1] but I do no see how "executing an expression tree" is an advantage over not. Anyone can explain it to me? [1]: http://msdn.microsoft.com/en-us/library/bb351562.aspx
0
[ 2, 13, 5312, 622, 579, 1, 38, 1, 4611, 13, 660, 6336, 106, 579, 1, 38, 1, 29, 13, 24187, 15, 56, 20, 3538, 60, 800, 3726, 3726, 31, 107, 91, 17, 91, 5935, 29, 13, 24187, 47, 31, 107, 52, 1465, 70, 483, 8530, 823, 275, 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...
Regex to match sloppy fractions / mixed numbers === I have a series of text that contains mixed numbers (ie: a whole part and a fractional part). The problem is that the text is full of human-coded sloppiness: 1. The whole part may or may not exist (ex: "10") 1. The fractional part may or may not exist (ex: "1/3") 1. The two parts may be separated by spaces and/or a hyphens (ex: "10 1/3", "10-1/3", "10 - 1/3"). 1. The fraction itself may or may not have spaces between the number and the slash (ex: "1 /3", "1/ 3", "1 / 3"). 1. There may be other text after the fraction that needs to be ignored I need a regex that can parse these elements so that I can create a proper number out of this mess.
0
[ 2, 7953, 1706, 20, 730, 28582, 10885, 18, 13, 118, 2198, 2116, 800, 3726, 3726, 31, 57, 21, 231, 16, 1854, 30, 1588, 2198, 2116, 13, 5, 660, 45, 21, 979, 141, 17, 21, 10885, 192, 141, 6, 9, 14, 1448, 25, 30, 14, 1854, 25, 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 to stretch the image size in iphone UIImage or UIImageView === Hi I'd like to show the image in iphone, but the image too big. I'd like to stretch it to fit the iphone screen, I can't find any class to handle it. Any suggestion? Thanks.
0
[ 2, 184, 20, 6363, 14, 1961, 1072, 19, 21024, 13, 5661, 22039, 54, 13, 5661, 22039, 4725, 800, 3726, 3726, 4148, 31, 22, 43, 101, 20, 298, 14, 1961, 19, 21024, 15, 47, 14, 1961, 266, 580, 9, 31, 22, 43, 101, 20, 6363, 32, 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...
Indexing into a String in C# as an L-Value === I have the following intentionally trivial function: void ReplaceSome(ref string text) { StringBuilder sb = new StringBuilder(text); sb[5] = 'a'; text = sb.ToString(); } It appears to be inefficient to convert this to a StringBuilder to index into and replace some of the characters only to copy it back to the ref'd param. Is it possible to index directly into the text param as an L-Value? Or how else can I improve this?
0
[ 2, 4348, 68, 77, 21, 3724, 19, 272, 5910, 28, 40, 644, 8, 15165, 800, 3726, 3726, 31, 57, 14, 249, 18140, 13, 19712, 1990, 45, 11364, 3934, 3220, 5, 14057, 3724, 1854, 6, 13, 1, 3724, 20904, 13, 18, 220, 800, 78, 3724, 20904, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Where & How Castle Windsor sets up logging facility === I'm fairly new to Castle Windsor and am looking into the in's and out's of the logging facility. It seems fairly impressive but the only thing i can't work out is where Windsor sets the Logger property on my classes. As in the following code will set Logger to the nullLogger if the class hasn't been setup yet but when Resolve is finished running the Logger property is set. private ILogger logger; public ILogger Logger { get { if (logger == null) logger = NullLogger.Instance; return logger; } set { logger = value; } } So what I am wondering is how and where windsor sets my Logger property. Cheers Anthony
0
[ 2, 113, 279, 184, 1339, 10784, 3415, 71, 13, 13919, 2646, 800, 3726, 3726, 31, 22, 79, 6647, 78, 20, 1339, 10784, 17, 589, 699, 77, 14, 19, 22, 18, 17, 70, 22, 18, 16, 14, 13, 13919, 2646, 9, 32, 2206, 6647, 7408, 47, 14, 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...
How can I tell if my page is set as the user's homepage? === Is there any way I can detect when my page has been set as the user's homepage in their browser? I'm most interested in something in javascript, but I'd be happy to hear about other approaches as well.
0
[ 2, 184, 92, 31, 494, 100, 51, 2478, 25, 309, 28, 14, 4155, 22, 18, 213, 6486, 60, 800, 3726, 3726, 25, 80, 186, 161, 31, 92, 9092, 76, 51, 2478, 63, 74, 309, 28, 14, 4155, 22, 18, 213, 6486, 19, 66, 16495, 60, 31, 22, 79, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I get an array of repeated characters from a string using LINQ? === If I have the following string: string s = "abcdefghab"; Then how do I get a string (or char[]) that has just the characters that are repeated in the original string using C# and LINQ. In my example I want to end up with "ab". Although not necessary, I was trying to do this in a single line of LINQ and had so far come up with: s.ToCharArray().OrderBy(a => a)...
0
[ 2, 184, 107, 31, 164, 40, 7718, 16, 4251, 1766, 37, 21, 3724, 568, 6294, 1251, 60, 800, 3726, 3726, 100, 31, 57, 14, 249, 3724, 45, 3724, 13, 18, 800, 13, 7, 21880, 13862, 263, 9075, 7, 73, 94, 184, 107, 31, 164, 21, 3724, 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...
Interact with a running Flash process? === Is it possible to write a program that interacts with a running instance of Flash? In recent versions of Java, there is a notion of "attaching" your own process to a running JVM. By writing some somewhat ugly code using Reflection and the like, you can dig around, grab a reference to an object, print the value of a variable, call a method, etc.. Obviously Flash is not Java (duh), but is it possible to achieve something similar? A couple of things I've already looked at are the various SWF decompilers (related of course, but not the same thing as attaching a process) and ptrace (which seems do-able, but quite low level). Anyone got other ideas/suggestions on how this can be done? Anything goes as far as language, OS, etc.. Thanks!
0
[ 2, 10001, 29, 21, 946, 4433, 953, 60, 800, 3726, 3726, 25, 32, 938, 20, 2757, 21, 625, 30, 10001, 18, 29, 21, 946, 4851, 16, 4433, 60, 19, 1764, 3281, 16, 8247, 15, 80, 25, 21, 7834, 16, 13, 7, 14986, 7192, 7, 154, 258, 953,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Help! Visual Studio 2008 just stopped stepping during debugging! === Big problem. I'm not sure what it was that I did, but it seems that I can no longer debug into functions. It happens in no particular place, just all throughout the code. I set a breakpoint, and then try to "step over" in order to go to the next like of code. Now, the debugger seems to interpret that as "continue". Even better! If I set a breakpoint right after that, the debugger ignores the breakpoint and just continues. Any ideas as to what could be causing this? Debugging has become more or less useless to me at this point-- I'd consider this a catastrophic failure. I've completely deleted my project and synced to source, so it's not a local user configuration issue. I've checked the debugger options, (Options-> Debugger) and I don't have anything unusual checked). Any help is appreciated...
0
[ 2, 448, 187, 3458, 1120, 570, 114, 1175, 9451, 112, 121, 16254, 2762, 187, 800, 3726, 3726, 580, 1448, 9, 31, 22, 79, 52, 562, 98, 32, 23, 30, 31, 144, 15, 47, 32, 2206, 30, 31, 92, 90, 1045, 121, 16254, 77, 3719, 9, 32, 553...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Underused features of DOS batch files === I think everyone agrees that DOS batch scripting is lame. Nonetheless there are many situations where it is expedient, or you must maintain existing scripts. Guidelines: - One feature per answer - Give both a short **description** of the feature and an **example**, not just a link to documentation - Limit answers to **native funtionality**, i.e., does not require additional software, like the *Windows Resource Kit*
0
[ 2, 131, 8795, 967, 16, 107, 18, 13064, 6488, 800, 3726, 3726, 31, 277, 1266, 11043, 30, 107, 18, 13064, 3884, 68, 25, 17182, 9, 9964, 80, 50, 151, 8329, 113, 32, 25, 13, 6899, 69, 49, 2291, 15, 54, 42, 491, 4027, 3149, 17505, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 properties of an object using reflection? === I know I can do this foreach (PropertyInfo property in myobject.GetType().GetProperties()) { if (property.DeclaringType.ToString() == myobject.GetType().ToString()) { // only have my object properties here // and not parent of my object properties } } But how can I **just** get the properties of myobject and not those of the parent as well? ie not have to do that extra if statement.
0
[ 2, 184, 107, 31, 164, 14, 3704, 16, 40, 3095, 568, 9138, 60, 800, 3726, 3726, 31, 143, 31, 92, 107, 48, 26, 14322, 13, 5, 10890, 106, 1084, 108, 4120, 1354, 19, 51, 23793, 9, 3060, 4474, 5, 6, 9, 3060, 10890, 106, 3915, 5, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I delete a bash function? === I have done this: bash $ z() { echo 'hello world'; } How do I get rid of it?
0
[ 2, 184, 107, 31, 27448, 21, 13158, 1990, 60, 800, 3726, 3726, 31, 57, 677, 48, 45, 13158, 5579, 2052, 5, 6, 13, 1, 8117, 13, 22, 11515, 126, 22, 73, 13, 1, 184, 107, 31, 164, 6681, 16, 32, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
dimensions of loaded swf's stage === Here's the situation - I've got a shell that loads an external .swf. Now, that .swf is 800x600, but it's an animation piece, and there are elements that extends off the stage. When I load the .swf into the shell and call its width attribute, it returns 1200 - because it's including the elements that break out of the stage. This isn't what I want - ideally, there would be two properties, one to return the 'calculated width' and one to return the 'default width'. Do these properties exist, and if not, what's the best workaround?
0
[ 2, 9913, 16, 8572, 13, 18, 15263, 22, 18, 876, 800, 3726, 3726, 235, 22, 18, 14, 1858, 13, 8, 31, 22, 195, 330, 21, 3593, 30, 19069, 40, 4886, 13, 9, 18, 15263, 9, 130, 15, 30, 13, 9, 18, 15263, 25, 7993, 396, 7664, 15, 47...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What's the best way to check for errors before leaving a row in a DataGridView === As far as I can tell, the best way to do this is do it in the DataTable.RowChanging event. But what if I want to cancel the action? There is no EventArgs.Cancel option...
0
[ 2, 98, 22, 18, 14, 246, 161, 20, 2631, 26, 11908, 115, 1107, 21, 3131, 19, 21, 1054, 16375, 4725, 800, 3726, 3726, 28, 463, 28, 31, 92, 494, 15, 14, 246, 161, 20, 107, 48, 25, 107, 32, 19, 14, 1054, 5924, 9, 5417, 22211, 807...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 does XUL (specifically firefox) statusbar positioning work? === When I go to create my status bar overlay, I note that I can include a position attribute. I want to be able to dynamically change this attribute. Near as I can tell, just using JavaScript to find the element and change the position attribute doesn't move the status bar panel around on the status bar. Any suggestions as to how to accomplish this? Thanks, Nathan
0
[ 2, 184, 630, 993, 1287, 13, 5, 9219, 1326, 535, 18219, 6, 1782, 1850, 649, 68, 170, 60, 800, 3726, 3726, 76, 31, 162, 20, 1600, 51, 1782, 748, 84, 4414, 15, 31, 1945, 30, 31, 92, 468, 21, 649, 35, 14755, 9, 31, 259, 20, 44, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Add DataSource Property to a Custom WinForms Control === I want to add complex databinding to my custom winforms control. So I can do the following: myControl.DisplayMember = "Name"; myControl.ValueMember = "Name"; myControl.DataSource = new List<someObject>(); does anyone know what interfaces etc have to be implemented to achieve this? I've had a look into it and all I can find is IBindableComponent, but that seems to be for Simple Binding rather than Complex Binding.
0
[ 2, 3547, 1054, 12097, 1354, 20, 21, 5816, 628, 4190, 18, 569, 800, 3726, 3726, 31, 259, 20, 3547, 1502, 1054, 22260, 20, 51, 5816, 628, 4190, 18, 569, 9, 86, 31, 92, 107, 14, 249, 45, 51, 12898, 9, 2906, 5438, 6990, 800, 13, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I draw text at an angle using python's PIL? === Using Python I want to be able to draw text at different angles using PIL. For example, imagine you were drawing the number around the face of a clock. The number **3** would appear as expected whereas **12** would we drawn rotated counter-clockwise 90 degrees. Therefore, I need to be able to draw many different strings at many different angles.
0
[ 2, 184, 107, 31, 2003, 1854, 35, 40, 5334, 568, 20059, 22, 18, 8483, 60, 800, 3726, 3726, 568, 20059, 31, 259, 20, 44, 777, 20, 2003, 1854, 35, 421, 13280, 568, 8483, 9, 26, 823, 15, 4382, 42, 46, 3533, 14, 234, 140, 14, 276, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Refactor this recursive method? === I'm pretty new to the idea of recursion and this is actually my first attempt at writing a recursive method. I tried to implement a recursive function Max that passes an array, along with a variable that holds the array's size in order to print the largest element. It works, but it just doesn't *feel* right! I have also noticed that I seem to use the static modifier much more than my classmates in general... Can anybody please provide any general tips as well as feedback as to how I can improve my code? public class RecursiveTry{ static int[] n = new int[] {1,2,4,3,3,32,100}; static int current = 0; static int maxValue = 0; static int SIZE = n.length; public static void main(String[] args){ System.out.println(Max(n, SIZE)); } public static int Max(int[] n, int SIZE) { if(current <= SIZE - 1){ if (maxValue <= n[current]) { maxValue = n[current]; current++; Max(n, SIZE); } else { current++; Max(n, SIZE); } } return maxValue; } }
0
[ 2, 302, 17455, 48, 302, 24244, 2109, 60, 800, 3726, 3726, 31, 22, 79, 1772, 78, 20, 14, 882, 16, 26604, 5991, 17, 48, 25, 1121, 51, 64, 1735, 35, 1174, 21, 302, 24244, 2109, 9, 31, 794, 20, 8713, 21, 302, 24244, 1990, 2049, 30...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Get the ASP.NET form name === I'm looking for a way to get the name of the main HTML form so I can submit it from JavaScript. The reason I can just set the name of the form is because the JavaScript is on a User Control that could get added to many different sites with different form names. Thanks.
0
[ 2, 164, 14, 28, 306, 9, 2328, 505, 204, 800, 3726, 3726, 31, 22, 79, 699, 26, 21, 161, 20, 164, 14, 204, 16, 14, 407, 13, 15895, 505, 86, 31, 92, 12298, 32, 37, 8247, 8741, 9, 14, 1215, 31, 92, 114, 309, 14, 204, 16, 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 do I create a generic std::vector deconstructor? === Having a vector containing pointers to objects then using the clear function doesn't call the deconstructors for the objects in the vector. I made a function to do this manually but I don't know how to make this a generic function for any kind of objects that might be in the vector. void buttonVectorCleanup(vector<Button *> dVector){ Button* tmpClass; for(int i = 0; i < (int)dVector.size(); i++){ tmpClass = dVector[i]; delete tmpClass; } } This is the function I have that works fine for a specific type of object in the vector but I'd like a single function that could take any kind of vector with object pointers.
0
[ 2, 184, 107, 31, 1600, 21, 12733, 354, 43, 45, 45, 28033, 121, 1126, 10346, 248, 60, 800, 3726, 3726, 452, 21, 7497, 3503, 454, 445, 20, 3916, 94, 568, 14, 1207, 1990, 1437, 22, 38, 645, 14, 121, 1126, 10346, 248, 18, 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...
asp.net mvc post to different views in same form === I'm an asp.net MVC newbie - very use to webforms! I have form area in my view. If I click button A I want to submit to /Books/1, but if I click button B I want to submit to /Books/2 How do I go about achieving this with MVC? Thanks in advance Nick
0
[ 2, 28, 306, 9, 2328, 307, 8990, 678, 20, 421, 4146, 19, 205, 505, 800, 3726, 3726, 31, 22, 79, 40, 28, 306, 9, 2328, 307, 8990, 78, 5893, 13, 8, 253, 275, 20, 2741, 4190, 18, 187, 31, 57, 505, 217, 19, 51, 1418, 9, 100, 31...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best resource for learning about prefetching a buffer in C on Intel/AMD 64 bit === I am interested in mastering prefetch-related functions such as _mm\_prefetch(...) so when I perform operations that loop over arrays, the memory bandwidth is fully utilized. What are the best resources for learning about this? I am doing this work in C using GCC 4 series on an intel linux platform. Thanks, Setjmp
0
[ 2, 246, 6577, 26, 2477, 88, 782, 19813, 7192, 21, 17497, 19, 272, 27, 14635, 118, 765, 43, 4384, 1142, 800, 3726, 3726, 31, 589, 3158, 19, 12754, 782, 410, 19913, 8, 6203, 3719, 145, 28, 13, 1, 3363, 1, 3515, 410, 19913, 5, 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...
How do you display styles in a HTML textarea === I am trying to add different styles within a textarea eg bold, different colors etc WYSIWYG editors (eg tinyMCE) used in web pages typically do this but I am having trouble working out how they do it. You cannot do this: ![alt text][1] So how do they achieve it? [1]: http://www.yart.com.au/test/html.gif
0
[ 2, 184, 107, 42, 3042, 6443, 19, 21, 13, 15895, 1854, 17760, 800, 3726, 3726, 31, 589, 749, 20, 3547, 421, 6443, 363, 21, 1854, 17760, 12369, 5657, 15, 421, 5268, 2722, 5809, 18, 49, 7913, 263, 12149, 13, 5, 5431, 3228, 79, 1105, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Algorithm to tell if two arrays have identical members. === What's the best algorithm for comparing two arrays to see if they have the same members? Assume there are no duplicates, the members can be in any order, and that neither is sorted. compare( [a, b, c, d], [b, a, d, c] ) ==> true compare( [a, b, e], [a, b, c] ) ==> false compare( [a, b, c], [a, b] ) ==> false
0
[ 2, 9083, 20, 494, 100, 81, 7718, 18, 57, 6323, 443, 9, 800, 3726, 3726, 98, 22, 18, 14, 246, 9083, 26, 15047, 81, 7718, 18, 20, 196, 100, 59, 57, 14, 205, 443, 60, 7158, 80, 50, 90, 19429, 18, 15, 14, 443, 92, 44, 19, 186,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 does a website build popularity? === So, my question is how do people get the word out that their website or blog exists? Do blogger invest in ads? Is is just through word of mouth? Or searching Google? I'm just curious how does a website build it's popularity. Do you just put your website up on the web and hope people find it? I know you can make your site SEO friendly, create sitemaps and such but what other techniques are used? Thanks, John
0
[ 2, 184, 630, 21, 2271, 1895, 5178, 60, 800, 3726, 3726, 86, 15, 51, 1301, 25, 184, 107, 148, 164, 14, 833, 70, 30, 66, 2271, 54, 8146, 5636, 60, 107, 24350, 15032, 19, 16236, 60, 25, 25, 114, 120, 833, 16, 725, 60, 54, 5792, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Algorithm to find if two sets intersect === Let's say I have two arrays: >int ArrayA[] = {5, 17, 150, 230, 285}; >int ArrayB[] = {7, 11, 57, 110, 230, 250}; Both arrays are sorted and can be any size. I am looking for an efficient algorithm to find if the arrays contain any duplicated elements between them. I just want a true/false answer, I don't care which element is shared or how many. The naive solution is to loop through each item in ArrayA, and do a [binary search][1] for it in ArrayB. I believe this complexity is O(N log N), where N is the number of items in each array (assuming for a minute that they are the same size). Please correct me if I'm wrong. Because both arrays are sorted, it seems like there should be a more efficient algorithm. I would also like a generic solution that doesn't assume that the arrays hold numbers (i.e. the solution should also work for strings). However, the comparison operators are well defined and both arrays are sorted from least to greatest. Thanks! [1]: http://en.wikipedia.org/wiki/Binary_search
0
[ 2, 9083, 20, 477, 100, 81, 3415, 17822, 800, 3726, 3726, 408, 22, 18, 395, 31, 57, 81, 7718, 18, 45, 13, 1, 6391, 7718, 58, 2558, 500, 800, 13, 1, 264, 15, 369, 15, 4354, 15, 13, 10946, 15, 13, 21917, 1, 73, 13, 1, 6391, 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...
What's a good analogy to explain the concept of wicked problems? === Most developers understand the concept of <a href="http://en.wikipedia.org/wiki/Wicked_problem">wicked problems</a>. What's a good analogy to use when explaining this concept to project managers?
0
[ 2, 98, 22, 18, 21, 254, 25928, 20, 3271, 14, 2420, 16, 9840, 1716, 60, 800, 3726, 3726, 127, 10168, 1369, 14, 2420, 16, 13, 1, 58, 746, 14057, 3726, 7, 21127, 6903, 219, 9, 17375, 26132, 9, 5583, 118, 17375, 118, 3602, 69, 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...
.net Compact Framework 4.0 === Will their be a new release of the compact framework with VS2010 and .net 4.0 and if so what new features will it include? WPF? linq to SQL? etc
0
[ 2, 13, 9, 2328, 8285, 6596, 268, 9, 387, 800, 3726, 3726, 129, 66, 44, 21, 78, 830, 16, 14, 8285, 6596, 29, 4611, 2751, 17, 13, 9, 2328, 268, 9, 387, 17, 100, 86, 98, 78, 967, 129, 32, 468, 60, 619, 7721, 60, 6294, 1251, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Security with QueryString values in Asp.net MVC === How do you properly ensure that a user isnt tampering with querystring values or action url values? For example, you might have a Delete Comment action on your CommentController which takes a CommentID. The action url might look like /Comments/Delete/3 to delete the comment with the id 3. Now obviously you dont want anyone to be able to delete comment 3. Normally on the owner of the comment or an admin has permission to do so. Ive seen this security enforced different ways and would like to know how some of you do it. Do you make multiple Database calls to retrieve the comment and check that the author of the comment matches the user invoking the delete action? Do you instead pass the CommentID and the UserID down to the stored procedure who does the delete and do a Delete where UserID and CommentID equal the values passed in? Is it better to encrypt the query string values?
0
[ 2, 1221, 29, 25597, 11130, 4070, 19, 28, 306, 9, 2328, 307, 8990, 800, 3726, 3726, 184, 107, 42, 7428, 4062, 30, 21, 4155, 8441, 21023, 7882, 29, 25597, 11130, 4070, 54, 1028, 287, 6362, 4070, 60, 26, 823, 15, 42, 530, 57, 21, 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...
D Templates: Coolest Hack === What is the coolest **somewhat practical** metaprogramming hack you've done or seen done in the D programming language? Somewhat practical means excluding, for example, the compile-time raytracer.
0
[ 2, 13, 43, 22894, 18, 45, 2700, 1430, 11835, 800, 3726, 3726, 98, 25, 14, 2700, 1430, 13, 1409, 3220, 608, 5713, 1409, 7618, 19746, 3863, 11835, 42, 22, 195, 677, 54, 541, 677, 19, 14, 13, 43, 3143, 816, 60, 4131, 5713, 1108, 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, 0, 0, 0, 0, 0...
Why can you have a column named ORDER in DB2? === In DB2, you can name a column ORDER and write SQL like SELECT ORDER FROM tblWHATEVER ORDER BY ORDER without even needing to put any special characters around the column name. This is causing me pain that I won't get into, but my question is: why do databases allow the use of SQL keywords for object names? Surely it would make more sense to just not allow this?
0
[ 2, 483, 92, 42, 57, 21, 4698, 377, 389, 19, 13, 9007, 135, 60, 800, 3726, 3726, 19, 13, 9007, 135, 15, 42, 92, 204, 21, 4698, 389, 17, 2757, 4444, 255, 101, 5407, 389, 37, 13, 38, 6287, 13515, 389, 34, 389, 366, 166, 12210, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Drill down charts in ASP.NET === I'm trying to get a set of reports running in an (VB) ASP.NET project and as part of that I'd like to display some charts visualising the data. I'm able to get charts generated, and have used Flotr, Plotr, Google Charts, and some CSS techniques at various times as I've experimented with this. Ideally, what I'm trying to achieve is having the individual elements (slices in a pie chart, or bars in a bar graph) be clickable, to drill-down to a lower level of data using that parent element as a filter. The closest I've seen is some tutorials on doing this with the ReportViewer control but only linking through text elements, which I've already achieved on my own. Is this something I'd have to turn to Flash for, as I'd prefer to avoid that where possible. If it's the only solution though, then I may need to resign myself to it. It's probably warranting a mention that all the data is stored in a database, so any chart generation is done dynamically.
0
[ 2, 10495, 125, 5158, 19, 28, 306, 9, 2328, 800, 3726, 3726, 31, 22, 79, 749, 20, 164, 21, 309, 16, 2813, 946, 19, 40, 13, 5, 20468, 6, 28, 306, 9, 2328, 669, 17, 28, 141, 16, 30, 31, 22, 43, 101, 20, 3042, 109, 5158, 3458,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using a Single system() Call to Execute Multiple Commands in C === In an information security lab I'm working on, I've been tasked with executing multiple commands with a single call to "system()" (written in C, running on Fedora). What is the syntax that will allow me to execute more than command through system()? (The idea being you could execute arbitrary commands through a program running on a remote computer, if the program interacts with the OS through the system() call.) I.e.: char command[] = "????? \r\n"; system(command); Any tips would be great! Thanks.
0
[ 2, 568, 21, 345, 329, 5, 6, 645, 20, 15644, 1886, 14294, 19, 272, 800, 3726, 3726, 19, 40, 676, 1221, 4343, 31, 22, 79, 638, 27, 15, 31, 22, 195, 74, 14605, 29, 25836, 1886, 14294, 29, 21, 345, 645, 20, 13, 7, 10724, 5, 6, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How does C# 4.0 Generic Covariance & Contra-variance Implmeneted? === I didn't attend PDC 2008, but I heard some news that C# 4.0 is announced to support Generic covariance and contra-variance. That is, List<string> can be assigned to List<object>. How could that be? In Jon Skeet's book ***C# in Depth***, it is explained why C# generics doesn't support covariance and contra-variance. It is mainly for writing secure code. Now, C# 4.0 changed to support them. Would it bring chaos? Anybody know the details about C# 4.0 can give some explanation?
0
[ 2, 184, 630, 272, 5910, 268, 9, 387, 12733, 326, 8220, 2416, 279, 11805, 8, 8220, 2416, 5420, 255, 22055, 1427, 60, 800, 3726, 3726, 31, 223, 22, 38, 3702, 351, 7201, 570, 15, 47, 31, 752, 109, 996, 30, 272, 5910, 268, 9, 387, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What to do about @p LINQtoSQL parameters? === Okay still fighting with doing some SqlCacheDependecy in my Asp.net MVC application I got this piece of code from Microsoft to cache LINQtoSQL, basically what it does is it gets the SqlCommand text from the LINQ query and executes that via the System.Data.SqlClient.SqlCommand which SqlDependecy needs... However there is one slight problem with this and that is whenever you do a where clause in LINQ the SQL generated is like so SELECT [t0].[MemberID], [t0].[Aspnetusername], [t0].[Aspnetpassword], [t0].[EmailAddr], [t0].[DateCreated], [t0].[Location], [t0].[DaimokuGoal], [t0].[PreviewImageID], [t0].[LastDaimoku] AS [LastDaimoku], [t0].[LastNotefied] AS [LastNotefied], [t0].[LastActivityDate] AS [LastActivityDate], [t0].[IsActivated] FROM [dbo].[Members] AS [t0] INNER JOIN [dbo].[MemberStats] AS [t1] ON [t0].[MemberID] = [t1].[MemberID] WHERE [t1].[TotalDeterminations] > @p0 Notice the where [t1].[TotalDeterminations] > @p0, the SqlCommand yells at me because it wants me to declare a scalar variable of @p0... which obviously I can't So how the heck does Microsoft which provides this code to cache Linq queries expect people to use where clauses? Anyone have any ideas around this?
0
[ 2, 98, 20, 107, 88, 13, 1, 306, 6294, 1251, 262, 18, 22402, 12905, 60, 800, 3726, 3726, 1705, 174, 1849, 29, 845, 109, 4444, 6109, 9616, 19038, 62, 2731, 19, 51, 28, 306, 9, 2328, 307, 8990, 3010, 31, 330, 48, 1855, 16, 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...
Best Facebook Library for Android === I have checked the official Facebook Library, I do not want to use it, I want to know if there are any alternatives or rather the best alternatives.
1
[ 2, 246, 9090, 1248, 26, 13005, 800, 3726, 3726, 31, 57, 6505, 14, 989, 9090, 1248, 15, 31, 107, 52, 259, 20, 275, 32, 15, 31, 259, 20, 143, 100, 80, 50, 186, 2676, 18, 54, 864, 14, 246, 2676, 18, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
How can I get the first parameter (this) to a method obtained by System.Diagnostics.StackFrame? === **The Framework Callback:** I'm debugging a WPF binding which is triggered by a PropertyChanged event. This then calls back into the proprety through some intermediate framework calls. **The Debugging:** I set a breakpoint in my property getter. In the immediate window, I setup a `StackTrace` and find a `StackFrame` associated with the `BindingExpression`. **The Missing Instance:** I want to be able to get the `this` parameter from the stack at the method I obtain from the `GetMethod` call on the `StackFrame` that I'm interested in. How can I get this object reference?
0
[ 2, 184, 92, 31, 164, 14, 64, 18906, 13, 5, 1565, 6, 20, 21, 2109, 3048, 34, 329, 9, 4286, 21944, 18, 9, 25325, 8361, 60, 800, 3726, 3726, 13, 1409, 124, 6596, 645, 1958, 45, 1409, 31, 22, 79, 121, 16254, 2762, 21, 619, 7721, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can I reference a complete Ruby Net::HTTP request as a string before sending? === I'm using `Net::HTTP` in Ruby 1.9.2p290 to handle some, obviously, networking calls. I now have a need to see the complete request that is sent to the server (as one long big String conforming to HTTP 1.0/1.1. In other words, I want `Net::HTTP` to handle the heavy lifting of generating the HTTP standard-compliant request+body, but I want to send the string with a custom delivery mechanism. `Net::HTTPRequest` doesn't seem to have any helpful methods here -- do I need to go lower down the stack and hijack something? Does anyone know of a good library, maybe other than Net::HTTP, that could help?
0
[ 2, 92, 31, 2801, 21, 1279, 10811, 4275, 45, 45, 21127, 3772, 28, 21, 3724, 115, 4907, 60, 800, 3726, 3726, 31, 22, 79, 568, 13, 1, 2328, 45, 45, 21127, 1, 19, 10811, 137, 9, 518, 9, 135, 306, 17830, 20, 3053, 109, 15, 4409, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to add a sticky note in my application on an iPhone === I want to add a function that allow users to write something down when they using my app. It is something like the sticky note tool on a Mac. Users can click a button, and the note view will appear and people can type text on it, and then save it. You can click the button again to hide the note view. Also, users could drag it as they like. My idea is to definite my own class inherit from the UIWindow, and add the UITextview to the UIWindow. But I didn't write my own class before. Can anyone tell me how to begin? I am new to IOS development.
0
[ 2, 184, 20, 3547, 21, 19087, 1945, 19, 51, 3010, 27, 40, 21024, 800, 3726, 3726, 31, 259, 20, 3547, 21, 1990, 30, 1655, 3878, 20, 2757, 301, 125, 76, 59, 568, 51, 4865, 9, 32, 25, 301, 101, 14, 19087, 1945, 5607, 27, 21, 1572,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
finally method with try in java === public class DaemonThread extends Thread { public void run() { System.out.println("Entering run method"); try { System.out.println("In run Method: currentThread() is" + Thread.currentThread()); while (true) { try { Thread.sleep(500); } catch (InterruptedException x) { System.out.println("hi"); } //System.out.println("In run method: woke up again"); finally { System.out.println("Leaving run1 Method"); } } } finally { System.out.println("Leaving run Method"); } } public static void main(String[] args) { System.out.println("Entering main Method"); DaemonThread t = new DaemonThread(); t.setDaemon(true); t.start(); try { Thread.sleep(900); } catch (InterruptedException x) { } System.out.println("Leaving main method"); } } why second finally method not run...as i know finally method must have have to run whatever the condition is ..but in this case only first finally method, why not second finally run.
0
[ 2, 722, 2109, 29, 1131, 19, 8247, 800, 3726, 3726, 317, 718, 13127, 96, 10647, 9073, 9322, 13, 1, 317, 11364, 485, 5, 6, 13, 1, 329, 9, 1320, 9, 10299, 16600, 5, 7, 13679, 68, 485, 2109, 7, 6, 73, 1131, 13, 1, 329, 9, 1320, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
reading a json file and selecting values with dojo === I'm trying to read a json file and select a value in the file, but my googling skills have failed me. I've come across dojo.xhrGet & ItemFileReadStore, but I'm not sure which is the correct one to use. Or are neither correct? Any help or wave of a flashlight in the right direction would be greatly appreciated.
0
[ 2, 1876, 21, 487, 528, 3893, 17, 20764, 4070, 29, 107, 1636, 800, 3726, 3726, 31, 22, 79, 749, 20, 1302, 21, 487, 528, 3893, 17, 5407, 21, 1923, 19, 14, 3893, 15, 47, 51, 162, 5598, 802, 3207, 57, 1702, 55, 9, 31, 22, 195, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to access computed properties === I have a Ember.Object like: App.HelpVideoInfo = Ember.Object.extend({ MyAccount: ['FAe8w0cUCJ0', 'How-to: Change "My Account"'], StoreInformation: ['UddOjEG-hXw', 'How-to: Change Store Information'], getSecondAccount:function() { return this.get('MyAccount')[1]; } .property('MyAccount'), }); I want to binding from my Ember.View to getSecondAccount (computed property). I used: App.IconMeaningDialogView = Ember.View.extend({ accountBinding: 'App.HelpVideoInfo.getSecondAccount'; }); But it doesn't work. Thanks.
0
[ 2, 184, 20, 1381, 26331, 3704, 800, 3726, 3726, 31, 57, 21, 13, 19603, 9, 23793, 101, 45, 4865, 9, 14593, 14785, 108, 4120, 800, 13, 19603, 9, 23793, 9, 1706, 1316, 43, 5, 1, 51, 29148, 45, 636, 22, 1473, 62, 457, 499, 387, 39...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Slightly confused: fastcgi / scgi / wsgi / rack / mod_whatever === I'm no web guru. However, I thought I knew the difference between all these things. But now that I actually have real need to know, I'm not so sure because I keep getting told different things by different people. Bottom line, I'm doing web stuff in Django or Rails (doesn't matter which), but that's just the front end web stuff. I'm also coding up backend apps - think CGI, but of course I won't use CGI. I had presumed that the right way to connect to these backend apps from the server (Django/Rails) was either with fastcgi or SCGI (or similar). But now I'm being told other things. 1) "Why are you considering any of that dude? Mod_whatever was made to get away from all that stuff. So use mod_whatever." But I thought mod_whatever was a way to get php/ruby/python etc. into a webserver in order to script it, build simplish web apps, build frameworks, etc? (And sure, I also know it avoids overhead of CGI) 2) "Get with the times, dude! Use WSGI/Rack! Fastcgi is so yesterday!" But I thought WSGI/Rack was a way to implement middleware for a stack, not implement whole entire backend software applications? Can someone definitively set me straight here?
0
[ 2, 1847, 4230, 45, 1512, 150, 2234, 13, 118, 4729, 2234, 13, 118, 619, 18, 2234, 13, 118, 10257, 13, 118, 7226, 1, 13515, 800, 3726, 3726, 31, 22, 79, 90, 2741, 10334, 9, 207, 15, 31, 289, 31, 404, 14, 2841, 128, 65, 158, 564,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Gridview not updating all fields === I have a gridview that is filled correctly from 3 tables. When I update it, it will only update one field (Kommentar) but only the first time. <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID,Erledigt,Kommentar" DataSourceID="ArtikelDataSource"> <Columns> <asp:CommandField ShowEditButton="True" /> <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" ReadOnly="True" > <ControlStyle Width="150px" /> </asp:BoundField> <asp:BoundField DataField="Beschreibung" HeaderText="Beschreibung" SortExpression="Beschreibung" ReadOnly="True" > <ControlStyle Width="200px" /> </asp:BoundField> <asp:BoundField DataField="Datum" HeaderText="Datum" SortExpression="Datum" ReadOnly="True" > <ControlStyle Width="100px" /> </asp:BoundField> <asp:BoundField DataField="Erledigt" HeaderText="Erledigt" SortExpression="Erledigt" > <ControlStyle Width="50px" /> </asp:BoundField> <asp:BoundField DataField="Kommentar" HeaderText="Kommentar" SortExpression="Kommentar" > <ControlStyle Width="200px" /> </asp:BoundField> <asp:BoundField DataField="LastUpdate" HeaderText="LastUpdate" SortExpression="LastUpdate" ReadOnly="True" /> <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" Visible="False" /> </Columns> </asp:GridView> <asp:SqlDataSource ID="ArtikelDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnectionString %>" SelectCommand="SELECT ci.Name, ci.Beschreibung, ca.ChkItemID, ca.ChkUserID, ca.Datum, ca.Erledigt, ca.Kommentar, ca.LastUpdate, ca.ID FROM ChecklistActions AS ca INNER JOIN ChecklistItems AS ci ON ca.ChkItemID = ci.ID INNER JOIN ChecklistUsers AS cu ON ca.ChkUserID = cu.ID WHERE (ca.Datum = @datum) AND (cu.Login = @userlogin)" UpdateCommand="UPDATE ChecklistActions SET Kommentar = @Kommentar, LastUpdate = GETDATE() WHERE (ID = @ID)" OnSelecting="_data_Selecting" > <SelectParameters> <asp:Parameter Name="userlogin"/> <asp:Parameter Name="datum"/> </SelectParameters> <UpdateParameters> <asp:Parameter Name="Kommentar" Type="string"/> <asp:Parameter Name="ID" /> </UpdateParameters> </asp:SqlDataSource> I have first an empty field "Kommentar", then it is filled, but when I try to change the value again, only the GETDATE() changes value, the content of Kommentar is the same as before. When I try to change the value of "Erledigt" via SQL UpdateCommand="UPDATE ChecklistActions SET Erledigt = @Erledigt Kommentar = @Kommentar, LastUpdate = GETDATE() WHERE (ID = @ID)" ... <asp:Parameter Name="Erledigt" Type="Int32"/> nothing (except the Getdate()) is updated at all - not even the field Kommentar at the fist time It seems that the gridview is sending the old values to the update command (only the first update will receive the new Kommentar-value) which is really irritating ?
0
[ 2, 7354, 4725, 52, 71, 43, 1880, 65, 2861, 800, 3726, 3726, 31, 57, 21, 7354, 4725, 30, 25, 1943, 12044, 37, 203, 7484, 9, 76, 31, 11100, 32, 15, 32, 129, 104, 11100, 53, 575, 13, 5, 11207, 1130, 512, 6, 47, 104, 14, 64, 85,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Howto initialise char array style string in constructor === I have a class which I'm serialising to send over a unix socket and it has to have a string which I've stored as a char array. Can I initialise it in the constructor differently to how I've done it here? typedef struct SerialFunctionStatus_t { SerialFunctionStatus_t() : serial_rx_count(0), serial_tx_count(0), socket_rx_count(0), socket_tx_count(0) { port[0] = '\0'; } uint32_t serial_rx_count; uint32_t serial_tx_count; uint32_t socket_rx_count; uint32_t socket_tx_count; char port[20]; } SerialFunctionStatus_t;
0
[ 2, 184, 262, 2104, 2628, 4892, 7718, 1034, 3724, 19, 6960, 248, 800, 3726, 3726, 31, 57, 21, 718, 56, 31, 22, 79, 5956, 7552, 20, 2660, 84, 21, 22540, 18482, 17, 32, 63, 20, 57, 21, 3724, 56, 31, 22, 195, 8214, 28, 21, 4892, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Detecting CPU architecture (32bit / 64bit ) in scons? === Are there any 'standard' plugins for detecting the CPU architecture in **scons**? BTW, this question was asked already [here][1] in a more general form... just wondering if anyone has already taken the time to incorporate this information into scons. [1]: http://stackoverflow.com/questions/152016/detecting-cpu-architecture-compile-time
0
[ 2, 9092, 68, 17578, 2607, 13, 5, 3125, 3326, 13, 118, 4384, 3326, 13, 6, 19, 13, 18, 12124, 60, 800, 3726, 3726, 50, 80, 186, 13, 22, 15566, 22, 10922, 108, 18, 26, 9092, 68, 14, 17578, 2607, 19, 13, 1409, 18, 12124, 1409, 60,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
C++ Binary Search Tree Recursive search function === template <class T> bool BST<T>::search(const T& x, int& len) const { return search(BT<T>::root, x); } template <class T> bool BST<T>::search(struct Node<T>*& root, const T& x) { if (root == NULL) return false; else { if (root->data == x) return true; else if(root->data < x) search(root->left, x); else search(root->right, x); } } So this is my search function for my BST class with a T node. x is the data being searched for within the tree, len is just the amount of nodes it has to travel to come up with the matching node if it exists. I have not implented that yet, I'm just incrementally developing my assignment. I'm calling it by doing this: if(t.search(v[1], len) == true) cout << endl << "true"; v is just a vector I had to create to compare it to, and so this is just supplying it with an int. The error I'm getting is there is no matching function call to BST<int>::search(node<int>* const &, const int&) const So I'm not sure what I'm doing wrong or where I'm doing wrong. Probably something silly and small :\
0
[ 2, 272, 20512, 14171, 2122, 1541, 302, 24244, 2122, 1990, 800, 3726, 3726, 22894, 13, 1, 1898, 13, 38, 1, 1607, 1823, 334, 384, 1, 38, 1, 45, 45, 25136, 5, 12124, 38, 13, 38, 1569, 993, 15, 19, 38, 1569, 10655, 6, 11608, 38, 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...
Ajax using Prototype.js in OFBiz === I need to make an Ajax call inside OFBiz framework using prototype.js. I am doing that from a ftl file. I am confused of how to handle the server side - through java event or java service. What is the best practice? And also i am having problem making the framework recognize prototype.js file. There is some issue with the path name in the script tag. It has to be some peculiar naming as per OFBiz framework standards. I searched google but I only found links on how to use prototype but no where prototype + OFBiz. If anybody has done anything in OFBiz like this, please help. Thanks, Kaushik
0
[ 2, 20624, 568, 7063, 9, 728, 18, 19, 16, 220, 3186, 800, 3726, 3726, 31, 376, 20, 233, 40, 20624, 645, 572, 16, 220, 3186, 6596, 568, 7063, 9, 728, 18, 9, 31, 589, 845, 30, 37, 21, 1187, 255, 3893, 9, 31, 589, 4230, 16, 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...
How to parse, persist and retrieve a string with tags separated by spaces? === My database consists of 3 tables (one for storing all items, one for the tags, and one for the relation between the two): Table: Post Columns: PostID, Name, Desc Table: Tag Columns: TagID, Name Table: PostTag Columns: PostID, TagID What is the best way to persist a space separated string (e.g. "smart funny wonderful") into the database? Furthermore, how would I retrieve the tags and display it as a string again. Note I'm using Grails / Groovy. Thanks!
0
[ 2, 184, 20, 2017, 870, 15, 22084, 17, 11917, 21, 3724, 29, 3383, 18, 4196, 34, 7644, 60, 800, 3726, 3726, 51, 6018, 2043, 16, 203, 7484, 13, 5, 849, 26, 25615, 65, 3755, 15, 53, 26, 14, 3383, 18, 15, 17, 53, 26, 14, 5827, 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...
2D Cel-Shading in JavaFX === I am writing a pretty simple 2D game in JavaFX, and although its only in preview release at the moment, I am looking to try to implement (even basically) some sort of Cel-Shading onto my game objects. Does anyone know if there are reference implementations of cel-shading out there that I could use, or perhaps, some advice for me in this field? I guess it doesnt have to be JavaFX specific, but that would help. I don't have much experience with graphics programming, however, I'm an experienced java/c# programmer.
0
[ 2, 172, 43, 11692, 8, 3162, 3258, 19, 8247, 16488, 800, 3726, 3726, 31, 589, 1174, 21, 1772, 1935, 172, 43, 250, 19, 8247, 16488, 15, 17, 419, 82, 104, 19, 16121, 830, 35, 14, 688, 15, 31, 589, 699, 20, 1131, 20, 8713, 13, 5, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Not keyword vs = False when checking for false boolean condition === When I'm using an If statement and I want to check if a boolean is false should I use the "Not" keyword or just = false, like so If (Not myboolean) then vs If (myboolean = False) then Which is better practice and more readable?
0
[ 2, 52, 1246, 9587, 4611, 800, 4997, 76, 9886, 26, 4997, 9827, 413, 210, 2874, 800, 3726, 3726, 76, 31, 22, 79, 568, 40, 100, 3331, 17, 31, 259, 20, 2631, 100, 21, 9827, 413, 210, 25, 4997, 378, 31, 275, 14, 13, 7, 1270, 7, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What are some things that you've used Scheme macros for? === Many examples of macros seem to be about hiding lambdas, e.g. with-open-file in CL. I'm looking for some more exotic uses of macros, particularly in PLT Scheme. I'd like to get a feel for when to consider using a macro vs. using functions.
0
[ 2, 98, 50, 109, 564, 30, 42, 22, 195, 147, 4276, 9069, 18, 26, 60, 800, 3726, 3726, 151, 3770, 16, 9069, 18, 2260, 20, 44, 88, 5314, 13, 24187, 18, 15, 13, 62, 9, 263, 9, 29, 8, 10157, 8, 16877, 19, 10842, 9, 31, 22, 79, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Managing reference paths between x86 and x64 workstations in a team === I would like to know how .NET teams out there are handling assembly reference paths when not everybody can immediately upgrade to a x64 operating system. The key issue right now is x64 versions of Windows will plant 32-bit installations into C:\Program Files (x86)\ instead of the regular C:\Program Files\. This means many extra components and frameworks from 3rd parties end up in C:\Program Files (x86)\. So when one downloads source projects created/modified in a x86 workstation onto a x64 workstation, there is some modification work required to get the reference paths correct. Quite typically, x64 users may save the modification and commit their "preferences" back into the version control repository, breaking the rhythm of the x86 users. What are some good approaches to maintain harmony in a varied team?
0
[ 2, 5616, 2801, 12074, 128, 993, 3274, 17, 993, 3470, 170, 10839, 18, 19, 21, 173, 800, 3726, 3726, 31, 83, 101, 20, 143, 184, 13, 9, 2328, 952, 70, 80, 50, 7988, 1475, 2801, 12074, 76, 52, 8903, 92, 1375, 9483, 20, 21, 993, 34...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
List files recursively in linux with path relative to the current directory === This is similar to [this question][1], but I want to include the path relative to the current directory in nix. If can do the following: ls -LR | grep .txt But it doesn't include the full paths. For example, I have the follow dir structure: test1/file.txt test2/file1.txt test2/file2.txt The code above will return: file.txt file1.txt file2.txt How can I get it to include the paths relative to the current directory using standard nix commands? [1]: http://stackoverflow.com/questions/105212/linux-recursively-list-all-files-in-a-directory-including-files-in-symlink-dire
0
[ 2, 968, 6488, 302, 24244, 102, 19, 13024, 29, 2013, 4543, 20, 14, 866, 16755, 800, 3726, 3726, 48, 25, 835, 20, 636, 1565, 1301, 500, 2558, 165, 500, 15, 47, 31, 259, 20, 468, 14, 2013, 4543, 20, 14, 866, 16755, 19, 13, 14064, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 fix, GRUB error 17 problem on laptop without working CD Reader === I broke the laptop. how did I break it? I remember feeling happy about wubi. now I feel bad about wubi and everything that I did. I used the partition editor within Windows (System Tools - administration) and removed my 11 GB partition of ubuntu. This was how my laptop has been partitioned EVER since I dual booted it three or so years ago. Now. This is what my LCD just says <pre style="color:white;background:black"> GRUB 1.5 Loading GRUB Error 17 </pre> I shall fix my laptop next weekend, when I have time. I actually don't know if I should fix the CD, or try booting from a USB (Damn small linux on USB seems to run then it went blank as well), or get the hard drive swapped out, install linux through a computer which has a working CD Drive, re-insert it into the computer. Any suggestions? I want the easiest answers.
0
[ 2, 184, 20, 6098, 15, 8961, 220, 7019, 369, 1448, 27, 12294, 366, 638, 1745, 7765, 800, 3726, 3726, 31, 1842, 14, 12294, 9, 184, 144, 31, 1442, 32, 60, 31, 1518, 1249, 1700, 88, 619, 12439, 9, 130, 31, 583, 896, 88, 619, 12439, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 proper name for an email address used as a login or user name? === I'm trying to decide what to put in a dialog box that tells the user their login doesn't work, there is probably a duplicate. The system uses email addresses as user names, then requires a password. Right now, I'm using "Email Login" but that just sounds stupid. For instance: 1) Application Starts, recognizes that it has never been run. 2) Prompts user to create a new account. 3) User puts in an email address and password to use as their new credentials. 4) Well, looks like they've already got an account probably. (This is the most likely case the account creation would fail but I'm using an API and I can't be 100% this is why it failed) 5) I ask them to try again with a different "email login". Could not create account - try a different email login ! After I check with the API provider, I'll probably try to detect that it is in fact a duplicate account and ask them to try to authenticate that account with a password.
0
[ 2, 98, 22, 18, 14, 4119, 204, 26, 40, 8517, 3218, 147, 28, 21, 6738, 108, 54, 4155, 204, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 4073, 98, 20, 442, 19, 21, 28223, 1649, 30, 2609, 14, 4155, 66, 6738, 108, 1437, 22, 38, 170,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PHP: Error in my_thread_global_end(): 1 threads didn't exit === When running PHP in CLI mode, *most* of the time (not always), the script will hang at the end of execution for about 5 seconds and then output this: > `Error in my_thread_global_end(): 1 threads didn't exit` It doesn't seem to actually have any effect on the script itself. Some web searches turned up blogs which suggest replacing the php_mysql.dll with a different version, however this has not solved the issue for me, and I suspect the info from those blogs is now out of date. My setup: - PHP Version 5.2.4 - Apache/2.2.4 (Win32) - Windows Vista Home Premium SP1
0
[ 2, 13, 26120, 45, 7019, 19, 51, 1, 96, 10647, 1, 26763, 1, 2451, 5, 6, 45, 137, 20396, 223, 22, 38, 4350, 800, 3726, 3726, 76, 946, 13, 26120, 19, 19391, 3740, 15, 1637, 4630, 2483, 16, 14, 85, 13, 5, 1270, 550, 6, 15, 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 will it take to add Objective-C support to the .NET common language runtime? === Is it possible for the .NET CLR to support Objective-C? Are there any reasons (either from a legal or implementational) standpoint why this wouldn't be possible? In the spirit of cross-platform application development, it would be nice to be able to write and run Objective-c applications on Windows machines. At least i think it would.
0
[ 2, 98, 129, 32, 247, 20, 3547, 7038, 8, 150, 555, 20, 14, 13, 9, 2328, 757, 816, 485, 891, 60, 800, 3726, 3726, 25, 32, 938, 26, 14, 13, 9, 2328, 10842, 139, 20, 555, 7038, 8, 150, 60, 50, 80, 186, 2932, 13, 5, 18840, 37, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
what are your favorite database-related discussion forum? === For sure stackoverflow is gaining loads of momentum! Do you chaps want to share your other favorites? I understand there are different natures of DB forums though. To name a few: * vendor specific * programming specific * administration specific * business nature specific and so on... would appreciate if you could mention what verticals your favorites are strong at. Cheers!
0
[ 2, 98, 50, 154, 3839, 6018, 8, 6203, 5460, 5691, 60, 800, 3726, 3726, 26, 562, 7566, 2549, 9990, 25, 8299, 19069, 16, 12380, 187, 107, 42, 13724, 18, 259, 20, 1891, 154, 89, 3839, 18, 60, 31, 1369, 80, 50, 421, 1444, 18, 16, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How JPA (Hibernate) deal with transaction when fetching Object from database === I'm currently developping an application in java using Hibernate as a persistence manager and JPA as an abstraction of the persistence manage hibernate. I'd like to know the impact of wrapping a result query around a transaction. I know the entity manager must stay open for lazily fetched field bug what about transaction in all this ? Here is a code example with transaction activation/desactivation ability. public List<Exportdata> get(Integer max, EntityManager em, Boolean withTransaction) { EntityTransaction tx = null; try { if (withTransaction) { tx = em.getTransaction(); tx.begin(); } Query query = em.createQuery("from Exportdata"); query.setMaxResults(10); List<Exportdata> list = query.getResultList(); if (withTransaction) tx.commit(); return list; } catch (RuntimeException re) { if (withTransaction) if (tx != null && tx.isActive()) tx.rollback(); throw re; } } Thanks all, Fred
0
[ 2, 184, 487, 1060, 13, 5, 8630, 106, 8820, 6, 1183, 29, 12799, 76, 18312, 68, 3095, 37, 6018, 800, 3726, 3726, 31, 22, 79, 871, 2803, 3181, 40, 3010, 19, 8247, 568, 4148, 2102, 8820, 28, 21, 28584, 1382, 17, 487, 1060, 28, 40, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Upload a file in Django and then send it somewhere else through REST? === I am building a simple Django app that will use scribd to display documents. I would like to have a page where the administrator can upload documents to scribd through the website, since I need to know a few things about it before it gets to scribd. What is the best/easiest way to do this, display an upload page and then take the file that is uploaded and send it to scribd through the [docs.upload][1] method of their api? I'm a little new at this Python/Django/REST API thing, so sorry if this is too many questions at once. [1]: http://www.scribd.com/publisher/api?method_name=docs.upload
0
[ 2, 71, 8294, 21, 3893, 19, 3857, 14541, 17, 94, 2660, 32, 3493, 962, 120, 760, 60, 800, 3726, 3726, 31, 589, 353, 21, 1935, 3857, 14541, 4865, 30, 129, 275, 15879, 4598, 43, 20, 3042, 4374, 9, 31, 83, 101, 20, 57, 21, 2478, 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...
IIS Worker Process using a LOT of memory? === I have one website on my server, and my IIS Worker Process is using 4GB RAM consistently. What should I be checking? c:\windows\system32\inetsrv\w3wp.exe
0
[ 2, 595, 18, 7444, 953, 568, 21, 865, 16, 1912, 60, 800, 3726, 3726, 31, 57, 53, 2271, 27, 51, 8128, 15, 17, 51, 595, 18, 7444, 953, 25, 568, 268, 11400, 2843, 11852, 9, 98, 378, 31, 44, 9886, 60, 272, 45, 1, 27508, 18, 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, 0, 0, 0...
Using jquery in Rails === I am planning to use jquery in Rails instead of prototype. I am not sure to use jRails or to use plain jquery and stay away from RJS. What do you think about this?
0
[ 2, 568, 487, 8190, 93, 19, 2240, 18, 800, 3726, 3726, 31, 589, 2334, 20, 275, 487, 8190, 93, 19, 2240, 18, 700, 16, 7063, 9, 31, 589, 52, 562, 20, 275, 487, 7301, 18, 54, 20, 275, 3748, 487, 8190, 93, 17, 1179, 229, 37, 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, 0, 0, 0, 0, 0, 0...
Adjacent number algorithm grouper === By which I mean this: Given the input set of numbers: 1,2,3,4,5 becomes "1-5". 1,2,3,5,7,9,10,11,12,14 becomes "1-3, 5, 7, 9-12, 14" This is the best I managed to come up with: [C#] *Which feels a little sloppy to me, so the question is, is there somehow more readable and/or elegant solution to this?* public static string[] FormatInts(int[] ints) { if (ints == null) throw new ArgumentNullException("ints"); // hey what are you doing? if (ints.Length == 0) return new string[] { "" }; // nothing to process if (ints.Length == 1) return new string[] { ints[0].ToString() }; // nothing to process Array.Sort<int>(ints); // need to sort these lil' babies List<string> values = new List<string>(); int lastNumber = ints[0]; // start with the first number int firstNumber = ints[0]; // same as above for (int i = 1; i < ints.Length; i++) { int current = ints[i]; int difference = (lastNumber - current ); // compute difference between last number and current number if (difference == -1) // the numbers are adjacent { if (firstNumber == 0) // this is the first of the adjacent numbers { firstNumber = lastNumber; } else // we're somehow in the middle or at the end of the adjacent number set { lastNumber = current; continue; } } else { if (firstNumber > 0 && firstNumber != lastNumber) // get ready to print a set of numbers { values.Add(string.Format("{0}-{1}", firstNumber, lastNumber)); firstNumber = 0; // reset } else // print a single value { values.Add(string.Format("{0}", lastNumber)); } } lastNumber = current; } if (firstNumber > 0) // if theres anything left, print it out { values.Add(string.Format("{0}-{1}", firstNumber, lastNumber)); } return values.ToArray(); }
0
[ 2, 4209, 234, 9083, 214, 106, 800, 3726, 3726, 34, 56, 31, 884, 48, 45, 504, 14, 6367, 309, 16, 2116, 45, 13, 15793, 15, 240, 15, 300, 15, 264, 2633, 13, 7, 165, 8, 264, 7, 9, 13, 15793, 15, 240, 15, 264, 15, 465, 15, 518,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 variables should I typecast when doing math operations in C/C++? === For example, when I'm dividing two ints and want a float returned, I superstitiously write something like this: int a = 2, b = 3; float c = (float)a / (float)b; If I do not cast `a` and `b` to floats, it'll do integer division and return an int. Similarly, if I want to multiply a signed 8-bit number with an unsigned 8-bit number, I will cast them to signed 16-bit numbers before multiplying for fear of overflow: u8 a = 255; s8 b = -127; s16 = (s16)a * (s16)b; How exactly does the compiler behave in these situations when not casting at all or when only casting one of the variables? Do I really need to explicitly cast all of the variables, or just the one on the left, or the one on the right?
0
[ 2, 56, 12157, 378, 31, 1001, 6146, 76, 845, 5057, 1311, 19, 272, 118, 150, 20512, 60, 800, 3726, 3726, 26, 823, 15, 76, 31, 22, 79, 18542, 81, 19, 38, 18, 17, 259, 21, 11510, 587, 15, 31, 1026, 384, 242, 18190, 2757, 301, 101,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Examples of good gotos in C or C++ === In this thread, we look at examples of good uses of `goto` in C or C++. It's inspired by [an answer][1] which people voted up because they thought I was joking. Summary (label changed from original to make intent even clearer): infinite_loop: // code goes here goto infinite_loop; Why it's better than the alternatives: - It's specific. `goto` is the language construct which causes an unconditional branch. Alternatives depend on using structures supporting conditional branches, with a degenerate always-true condition. - The label documents the intent without extra comments. - The reader doesn't have to scan the intervening code for early `break`s (although it's still possible for an unprincipled hacker to simulate `continue` with an early `goto`). **Rules:** - Pretend that the gotophobes didn't win. It's understood that the above can't be used in real code because it goes against established idiom. - Assume that we have all heard of 'Goto considered harmful' and know that goto can be used to write spaghetti code. - If you disagree with an example, criticize it on technical merit alone ('Because people don't like goto' is not a technical reason). Let's see if we can talk about this like grown ups. [1]: http://stackoverflow.com/questions/244445/best-refactoring-for-the-dreaded-while-true-loop#244644
0
[ 2, 3770, 16, 254, 330, 759, 19, 272, 54, 272, 20512, 800, 3726, 3726, 19, 48, 9322, 15, 95, 361, 35, 3770, 16, 254, 2027, 16, 13, 1, 839, 262, 1, 19, 272, 54, 272, 20512, 9, 32, 22, 18, 3054, 34, 636, 210, 1623, 500, 2558, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 count the rows in a SQL query which alredy used count, group by, and having before? === For example, using the answer for this question: http://stackoverflow.com/questions/152024/how-to-select-all-users-who-made-more-than-10-submissions "How to select all users who made more than 10 submissions." select userId from submission group by userId having count(submissionGuid) > 10 Let's say now I want to know many rows this sql statement outputted. How scalable is the solution for counting the rows of counting the rows?
0
[ 2, 184, 107, 42, 2468, 14, 11295, 19, 21, 4444, 255, 25597, 56, 493, 99, 1851, 147, 2468, 15, 214, 34, 15, 17, 452, 115, 60, 800, 3726, 3726, 26, 823, 15, 568, 14, 1623, 26, 48, 1301, 45, 7775, 6903, 25325, 2549, 9990, 9, 960,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 happens in the server when a page load is cancelled in the browser? === In a fictitious web application ... 1. The user clicks a link 2. The server starts to prepare the response, but it takes several seconds 3. The user cancels the page load What happens to the request? Does the server continue to prepare the response? Does the response arrive to the browser?
0
[ 2, 98, 5531, 19, 14, 8128, 76, 21, 2478, 6305, 25, 7404, 19, 14, 16495, 60, 800, 3726, 3726, 19, 21, 24596, 2741, 3010, 13, 9, 9, 9, 137, 9, 14, 4155, 10840, 18, 21, 3508, 172, 9, 14, 8128, 3244, 20, 5723, 14, 1627, 15, 47, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the best way of adjusting the window for expanding elements? === What I want to do is scroll down the window when I expand elements in my page. The effect I am trying to achieve is like the Stack Overflow comments. If it expands beyond the page, it scrolls down to fit all the comments in the window. What is the best way of doing this?
0
[ 2, 98, 25, 14, 246, 161, 16, 22209, 14, 1463, 26, 9393, 2065, 60, 800, 3726, 3726, 98, 31, 259, 20, 107, 25, 12159, 125, 14, 1463, 76, 31, 6073, 2065, 19, 51, 2478, 9, 14, 1590, 31, 589, 749, 20, 4689, 25, 101, 14, 7566, 202...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Direct3D MDI Project: MFC or .NET? === I'm looking at a new project where both Native and Managed approaches sound like a good idea. This is a Windows desktop application which should support an MDI interface. The client area will make extensive use of Direct3D. The developers on the project are equally skilled on C#, C++/CLI and MFC. MFC Advantages: - Doc/View Architecture - Most Direct3D online resources still use C++ Managed Code Advantages: - The .NET Framework - C# What more can I add to the lists above? Don't flame this. Two lists. Just add to them. Note: I have very good reasons (to do with the IDE and debugging) not to use mixed mode. So count that out.
0
[ 2, 1744, 240, 43, 8138, 49, 669, 45, 307, 7061, 54, 13, 9, 2328, 60, 800, 3726, 3726, 31, 22, 79, 699, 35, 21, 78, 669, 113, 156, 1275, 17, 1471, 7501, 646, 101, 21, 254, 882, 9, 48, 25, 21, 1936, 17404, 3010, 56, 378, 555, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 good example of a (web) user interface for a graph structure (in the CS sense of graph, nodes, edges)? === Like, let's say I had a tree structure, then I would use, naturally a tree control, since that GUI element maps perfectly to the structure. But what I have is are graph, potentially to wide to fit in one web page. I can't think of examples of GUIs that really fit. Some ideas I have that don't quite fit are, the web itself, with hyperlinks, the browser back button, and the forward button. But that just shows you one node at a time. I would like to display as many nodes as I can, and allow navigation to a new area of the graph. Something like Google maps might be a good model, in that you have full freedom to scroll in any direction.
0
[ 2, 98, 22, 18, 21, 254, 823, 16, 21, 13, 5, 14113, 6, 4155, 6573, 26, 21, 7210, 1411, 13, 5, 108, 14, 272, 18, 1259, 16, 7210, 15, 16272, 15, 7840, 6, 60, 800, 3726, 3726, 101, 15, 408, 22, 18, 395, 31, 41, 21, 1541, 1411,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Jython - javaos.getenv() gives "Failed to get environment, environ will be empty" === I'm wondering if anyone ran into this problem. Whenever I run any jython program in Eclipse, I got the following error in the beginning of the output: > " Failed to > get environment, environ will be > empty: (0, 'Failed to execute command > ([\'sh\', \'-c\', \'env\']): > java.io.IOException: Cannot run > program "sh": Crea teProcess error=2, > The system cannot find the file > specified') First, my environment is: Windows 2008 JDK 1.6.0u10 jython 2.2.1 I did some digging, and I realized that this message is produced in the function javaos.getenv(). Whenever I call the javaos.getenv() function, it throws the following error: C:\jython2.2.1>java -jar jython.jar >>> import javaos >>> print javaos.getenv("user.name") > Failed to get environment, environ > will be empty: (0, 'Failed to execute > command ([\'sh\', \'-c\', \'env\']): > java.io.IOException: Cannot run > program "sh": Crea teProcess error=2, > The system cannot find the file > specified') This is strange, because I'm currently using a Windows machine, not an Unix. Any solutions/ideas? Thank you in advance.
0
[ 2, 487, 93, 11570, 13, 8, 8247, 759, 9, 3060, 219, 710, 5, 6, 2352, 13, 7, 24910, 69, 20, 164, 2307, 15, 21314, 2075, 129, 44, 2424, 7, 800, 3726, 3726, 31, 22, 79, 5712, 100, 1276, 717, 77, 48, 1448, 9, 6634, 31, 485, 186, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What are some important interview questions to ask prospective game testers? === I've been handed the task of interviewing a candidate for a position I don't know much about. Call it bad management, the fact is I need to do the best I can. The testing position doesn't require any technical ability besides entering bugs in a very intuitive bug tracker system. I don't know much about the process, but I'm sure qualities such as creativity and patience are important things to focus on. I have a whole list of general interview questions to find out if they can zip up their pants and be at work on time, but I'd like to ask some questions specific to the process of testing games for bugs. Unfortunately, I lack the experience in that area. Can anybody test a game for bugs? If not, how would you find out during an interview? Thanks in advance!
4
[ 2, 98, 50, 109, 681, 2421, 2346, 20, 1349, 20499, 250, 1289, 445, 60, 800, 3726, 3726, 31, 22, 195, 74, 3988, 14, 3005, 16, 2421, 68, 21, 2316, 26, 21, 649, 31, 221, 22, 38, 143, 212, 88, 9, 645, 32, 896, 1097, 15, 14, 837, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 is not a good time to use python generators? === This is rather the inverse of [What can you use Python generator functions for?][1]: python generators, generator expressions, and the `itertools` module are some of my favorite features of python these days. They're especially useful when setting up chains of operations to perform on a big pile of data--I often use them when processing DSV files. [1]: http://stackoverflow.com/questions/102535/what-can-you-use-python-generator-functions-for **So when is it *not* a good time to use a generator, or a generator expression, or an `itertools` function?** * When should I prefer `zip()` over `itertools.izip()`, or * `range()` over `xrange()`, or * `[x for x in foo]` over `(x for x in foo)`? Obviously, we eventually need to "resolve" a generator into actual data, usually by creating a list or iterating over it with a non-generator loop. Sometimes we just need to know the length. This isn't what I'm asking. We use generators so that we're not assigning new lists into memory for interim data. This especially makes sense for large datasets. Does it make sense for small datasets too? Is there a noticeable memory/cpu trade-off? I'm especially interested if anyone has done some profiling on this, in light of the eye-opening discussion of [list comprehension performance vs. map() and filter()][2]. [2]: http://mail.python.org/pipermail/python-list/2001-December/117130.html
0
[ 2, 76, 25, 52, 21, 254, 85, 20, 275, 20059, 20495, 60, 800, 3726, 3726, 48, 25, 864, 14, 19, 9453, 16, 636, 608, 92, 42, 275, 20059, 15286, 3719, 26, 60, 500, 2558, 165, 500, 45, 20059, 20495, 15, 15286, 13832, 15, 17, 14, 13,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SSH, screen and XDISPLAY === I use screen to persist my work session and connect to the same session from multiple machines. How can I setup SSH and screen such that the XDISPLAY variable *inside* my persistent screen session is always set to the machine I am currently connecting from? ie. I start the screen session at work and use gvim, which uses the X server running on my work machine. Later, I connect to the same session from home and also want to use gvim. But this time, I want gvim to use the X server on my home machine. I realize I could manually update XDISPLAY every time I connect from a different machine but I'd rather have an automated system. Bonus points if I can actually *move* gvim from my work machine to my home machine while it is running. I tried [xmove][1] but could never get it to play nice. [1]: http://manpages.ubuntu.com/manpages/hardy/man1/xmove.html
0
[ 2, 13, 18, 1635, 15, 2324, 17, 993, 2906, 5438, 800, 3726, 3726, 31, 275, 2324, 20, 22084, 51, 170, 3723, 17, 6379, 20, 14, 205, 3723, 37, 1886, 6035, 9, 184, 92, 31, 18161, 13, 18, 1635, 17, 2324, 145, 30, 14, 993, 2906, 5438...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Problems to use for Coding Tests during interviews === As a second interview I get people to sit down and write code...I try to make the problem really technology independent. My programming problems that I have don't really exercise peoples OO abilities. I tend to try and keep the coding problem solvable within 2 hours ish. So, I've struggled to find a problem small enough and involved enough that it exposes peoples OO design skills. Any suggestions?
0
[ 2, 1716, 20, 275, 26, 13, 15458, 4894, 112, 7450, 800, 3726, 3726, 28, 21, 153, 2421, 31, 164, 148, 20, 2066, 125, 17, 2757, 1797, 9, 9, 9, 49, 1131, 20, 233, 14, 1448, 510, 1099, 1124, 9, 51, 3143, 1716, 30, 31, 57, 221, 22...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Making fscanf Ignore Optional Parameter === I am using fscanf to read a file which has lines like Number <-whitespace-> string <-whitespace-> optional\_3rd\_column I wish to extract the number and string out of each column, but ignore the 3rd_column if it exists Example Data: 12 foo something 03 bar 24 something #randomcomment I would want to extract 12,foo; 03,bar; 24, something while ignoring "something" and "#randomcomment" I currently have something like while(scanf("%d %s %*s",&num,&word)>=2) { assign stuff } However this does not work with lines with no 3rd column. How can I make it ignore everything after the 2nd string?
0
[ 2, 544, 398, 18, 1245, 410, 7174, 12832, 18906, 800, 3726, 3726, 31, 589, 568, 398, 18, 1245, 410, 20, 1302, 21, 3893, 56, 63, 1560, 101, 234, 13, 1, 8, 5051, 5582, 8, 1, 3724, 13, 1, 8, 5051, 5582, 8, 1, 12832, 1, 240, 897,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JVM terminates when launching Eclipse MAT on Mac OS with J2SE 6.0 === I have recently discovered the incredibly useful [Eclipse Memory Analysis Tool][1], which makes quick work of finding memory leaks in Java applications. Unfortunately, after switching my JDK to 1.6 (under Mac OS 10.5), the JVM terminates immediately upon startup. All that appears is a dialog stating "JVM terminated" with "Exit code = -1". Anyone else encounter this one? Perhaps there is a way to configure it to use a different JDK? (such as 1.5: which it was shown to be compatible with) [1]: http://www.eclipse.org/mat/
0
[ 2, 487, 20147, 17952, 18, 76, 13762, 11652, 4277, 27, 1572, 13, 759, 29, 487, 135, 870, 400, 9, 387, 800, 3726, 3726, 31, 57, 1989, 1848, 14, 13003, 4811, 636, 3319, 6013, 870, 1912, 2495, 5607, 500, 2558, 165, 500, 15, 56, 1364, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What does InitializeComponent() do, and how does it work? (WPF) === What does InitializeComponent() do, and how does it work? (WPF) In general first, but I would especially be interested to know the gory details of order of construction, and what happens when there are AttachedProperties.
0
[ 2, 98, 630, 2104, 2952, 11103, 218, 2291, 5, 6, 107, 15, 17, 184, 630, 32, 170, 60, 13, 5, 499, 7721, 6, 800, 3726, 3726, 98, 630, 2104, 2952, 11103, 218, 2291, 5, 6, 107, 15, 17, 184, 630, 32, 170, 60, 13, 5, 499, 7721, 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...
ASP.NET WebPermission Security Exception === I usually hate posting these types of questions as normally I find that the best way to really learn is to figure out the answer yourself. However, I need an answer to this question really quickly as I have a client who can't run her business due to this problem. Yesterday my ASP.NET host provider moved my application from a server running .NET 1.1 to one running .NET 1.1 and 2.0. My problem is that when I test the move the main site page (Default.aspx) will not load **"Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.** **Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."** **[SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0 System.Security.CodeAccessPermission.Demand() +59 System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint) +147 System.Net.HttpRequestCreator.Create(Uri Uri) +26 System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase) +298 System.Net.WebRequest.Create(Uri requestUri) +28 System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri) +30 System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri) +12 System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri uri) +4 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +52 PilatesPlusDublin.PilatesPlusDublinws.PilatesPlus.InsertException(String sModuleName, String sException, Int32 iUserID) +97 PilatesPlusDublin.MainDefault.Page_Load(Object sender, EventArgs e) +144 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +47 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7350 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213 System.Web.UI.Page.ProcessRequest() +86 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18 System.Web.UI.Page.ProcessRequest(HttpContext context) +49 ASP.maindefault_aspx.ProcessRequest(HttpContext context) +4 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64"** If WebPermission isn't available at the hosting site, how do I configure my site to allow access to the page? Is there some tags that need to be put into the web.config? Note - we have no access to machine.config or any other IIS settings. I understand that people hate reading and answering these types of question but any help on what I, or my hosting site need to do to fix this would be appreciated enormously
0
[ 2, 28, 306, 9, 2328, 2741, 1432, 12385, 1221, 5391, 800, 3726, 3726, 31, 951, 3223, 15669, 158, 2551, 16, 2346, 28, 4147, 31, 477, 30, 14, 246, 161, 20, 510, 2484, 25, 20, 1465, 70, 14, 1623, 2834, 9, 207, 15, 31, 376, 40, 162...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 an already (basic) authenticated context to call a web service behind the same authentication? === I have a site behind basic authentication (IIS6). Part of this site calls a web service that is also part of the site and thus behind basic authentication as well. However, when this happens the calling code receives a 401 Authentication Error. I've tried a couple of things, with the general recommendation being code like this: Service.ServiceName s = new Service.ServiceName(); s.PreAuthenticate = true; s.Credentials = System.Net.CredentialCache.DefaultCredentials(); s.Method("Test"); However, this does not seem to resolve my problem. Any advice?
0
[ 2, 184, 107, 31, 164, 40, 614, 13, 5, 26467, 6, 14351, 1669, 4141, 20, 645, 21, 2741, 365, 439, 14, 205, 27963, 60, 800, 3726, 3726, 31, 57, 21, 689, 439, 2125, 27963, 13, 5, 2865, 18, 379, 6, 9, 141, 16, 48, 689, 3029, 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...
Binary Search Tree Deletion (Inorder Pred method) C++ === Recursive deletion method. Getting segmentation fault when calling on the remove function. This is using the inorder pred method of getting a new node after deletion. So I'm not sure if I'm deleting somewhere where I should not be deleting. BST is the class, T is the object, part of the Node class. Spacing out on any other information that might help. template <class T> void BST<T>::remove(const T& x) { remove(BT<T>::root, x); } template <class T> void BST<T>::remove(struct Node<T>*& root, const T& x) { if (root->data == x) { if (root->left == NULL) { Node<T> *temp = root; root = root->right; delete temp; } else if (root->right == NULL) { Node<T> *temp = root; root = root->left; delete temp; } else { Node<T> *temp = root->left; Node<T> *parent = root; while (temp->right != NULL) { parent = temp; temp = temp->right; } root->data = temp->data; if (parent->left == temp) remove(parent->left, temp->data); //Not sure if this is the right way to do it. else remove(parent->right, temp->data); } } else { if (root->data < x) remove(root->left, x); else remove(root->right, x); } }
0
[ 2, 14171, 2122, 1541, 28916, 13, 5, 108, 7861, 782, 43, 2109, 6, 272, 20512, 800, 3726, 3726, 302, 24244, 28916, 2109, 9, 1017, 5631, 857, 4173, 76, 2555, 27, 14, 4681, 1990, 9, 48, 25, 568, 14, 19, 7861, 782, 43, 2109, 16, 1017...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rename files in sub directories === Is there any way of batch renaming files in sub directories? Example: Rename *.html to *.htm in a folder which has directories and sub directories.
0
[ 2, 302, 7259, 6488, 19, 972, 559, 1596, 800, 3726, 3726, 25, 80, 186, 161, 16, 13064, 25934, 6488, 19, 972, 559, 1596, 60, 823, 45, 302, 7259, 1637, 9, 15895, 20, 1637, 9, 9020, 79, 19, 21, 19294, 56, 63, 559, 1596, 17, 972, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
When should I dispose my objects in .NET? === For general code, do I really need to dispose an object? Can I just ignore it for the most part or is it a good idea to always dispose an object when your 100% sure you don't need it anymroe?
0
[ 2, 76, 378, 31, 17913, 51, 3916, 19, 13, 9, 2328, 60, 800, 3726, 3726, 26, 297, 1797, 15, 107, 31, 510, 376, 20, 17913, 40, 3095, 60, 92, 31, 114, 7174, 32, 26, 14, 127, 141, 54, 25, 32, 21, 254, 882, 20, 550, 17913, 40, 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...
Tell if 'elapsed' event thread is still running? === Given a System.Timers.Timer, is there a way from the main thread to tell if the worker thread running the elapsed event code is still running? In other words, how can one make sure the code running in the worker thread is not currently running before stopping the timer or the main app/service thread the timer is running in? Is this a matter of ditching Timer for threading timer using state, or is it just time to use threads directly?
0
[ 2, 494, 100, 13, 22, 62, 17057, 43, 22, 807, 9322, 25, 174, 946, 60, 800, 3726, 3726, 504, 21, 329, 9, 891, 1224, 9, 891, 139, 15, 25, 80, 21, 161, 37, 14, 407, 9322, 20, 494, 100, 14, 7444, 9322, 946, 14, 13, 62, 17057, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the difference between the different methods of putting javascript in an <a> === I have seen the following methods of putting javascript in an `<a>` tag: function DoSomething() { ... return false; } 1: <a href="javascript:;" onClick="return DoSomething();">link</a> 2: <a href="javascript:return DoSomething();">link</a> 3: <a href="javascript:void(0);" onClick="return DoSomething();">link</a> 4: <a href="#" onClick="return DoSomething();">link</a> I understand the idea of trying to put a valid URL instead of just javascript, just incase the user doesn't have JavaScript enabled. But for the purpose of this discussion, I need to assume JS is enabled (they can't login without it). I personally like option 2 as it allows you to see what's going to be run&ndash;especially useful when debuging where there are parameters being passed to the function. I have used it quite a bit and haven't found browser issues. I have read that people recommend 4 because it gives the user a real link to follow, but really, # isn't "real". It will go absolutely no where. Is there one that isn't support or is really bad, when you know the user has JS enabled? [Related question][1] [1]: http://stackoverflow.com/questions/134845/href-for-javascript-links-or-javascriptvoid0
0
[ 2, 98, 25, 14, 2841, 128, 14, 421, 3195, 16, 3873, 8247, 8741, 19, 40, 13, 1, 58, 1, 800, 3726, 3726, 31, 57, 541, 14, 249, 3195, 16, 3873, 8247, 8741, 19, 40, 13, 1, 58, 1, 3383, 45, 1990, 107, 9099, 5, 6, 13, 1, 13, 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...
Why Use a Hash Table over a Trie (Prefix Tree)? === So if I have to choose between a hash table or a prefix tree what are the discriminating factors that would lead me to choose one over the other. From my own naive point of view it seems as though using a trie has some extra overhead since it isn't stored as an array but that in terms of run time (assuming the longest key is the longest english word) it can be essentially O(1) (in relation to the upper bound). Maybe the longest english word is 50 characters? Hash tables are instant look up *once you get the index*. Hashing the key to get the index however seems like it could easily take near 50 steps. Can someone provide me a more experienced perspective on this? Thanks!
0
[ 2, 483, 275, 21, 19170, 859, 84, 21, 2286, 62, 13, 5, 3515, 18594, 1541, 6, 60, 800, 3726, 3726, 86, 100, 31, 57, 20, 3538, 128, 21, 19170, 859, 54, 21, 14315, 1541, 98, 50, 14, 1460, 15797, 108, 1880, 4776, 30, 83, 672, 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...
How do you jump start yourself to do a task that you just despise doing? === When starting a programming project, how do you jump start yourself to do a task that you just despise doing?
2
[ 2, 184, 107, 42, 3936, 799, 2834, 20, 107, 21, 3005, 30, 42, 114, 20558, 845, 60, 800, 3726, 3726, 76, 1422, 21, 3143, 669, 15, 184, 107, 42, 3936, 799, 2834, 20, 107, 21, 3005, 30, 42, 114, 20558, 845, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Delivery of .Net 3.5 SP1 === If I were to include .Net Framework setup file along with my apps (installation process is done by our own technician), to be install on a clean Windows (XP SP2/SP3 or Vista SP1) without prior installation of any framework, which of the .Net Framework setup do I need to install in sequence, to get to 3.5 SP1? Currently I have the setup file for: 1. .Net 2.0 2. .Net 2.0 SP1 3. .Net 3.0 4. .Net 3.5 5. .Net 3.5 SP1 All redistributable version.
0
[ 2, 6010, 16, 13, 9, 2328, 203, 9, 264, 3782, 165, 800, 3726, 3726, 100, 31, 46, 20, 468, 13, 9, 2328, 6596, 18161, 3893, 303, 29, 51, 4865, 18, 13, 5, 108, 21300, 857, 953, 25, 677, 34, 318, 258, 12664, 6, 15, 20, 44, 16146,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best way to extract mac address from ifconfig output ? === I want to know what is the best way to extract MAC Address from ifconfig output. bash-3.00# ifconfig eth0 eth0 Link encap:Ethernet HWaddr 1F:2E:19:10:3B:52 inet addr:127.0.0.66 Bcast:127.255.255.255 Mask:255.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 .... .... Should I use cut, awk or anything else, and what are the merits and demerits of one method over other. Thanks Aman Jain
0
[ 2, 246, 161, 20, 10962, 1572, 3218, 37, 100, 14093, 2816, 5196, 13, 60, 800, 3726, 3726, 31, 259, 20, 143, 98, 25, 14, 246, 161, 20, 10962, 1572, 3218, 37, 100, 14093, 2816, 5196, 9, 13158, 8, 240, 9, 2032, 5910, 100, 14093, 281...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Event-based async in C#; any generic refactoring possible? === Some APIs, like the WebClient, use the [Event-based Async pattern][1]. While this looks simple, and probably works well in a loosely coupled app (say, BackgroundWorker in a UI), it doesn't chain together very well. For instance, here's a program that's multithreaded so the async work doesn't block. (Imagine this is going in a server app and called hundreds of times -- you don't want to block your ThreadPool threads.) We get 3 local variables ("state"), then make 2 async calls, with the result of the first feeding into the second request (so they can't go parallel). State could mutate too (easy to add). Using WebClient, things end up like the following (or you end up creating a bunch of objects to act like closures): using System; using System.Net; class Program { static void onEx(Exception ex) { Console.WriteLine(ex.ToString()); } static void Main() { var url1 = new Uri(Console.ReadLine()); var url2 = new Uri(Console.ReadLine()); var someData = Console.ReadLine(); var webThingy = new WebClient(); DownloadDataCompletedEventHandler first = null; webThingy.DownloadDataCompleted += first = (o, res1) => { if (res1.Error != null) { onEx(res1.Error); return; } webThingy.DownloadDataCompleted -= first; webThingy.DownloadDataCompleted += (o2, res2) => { if (res2.Error != null) { onEx(res2.Error); return; } try { Console.WriteLine(someData + res2.Result); } catch (Exception ex) { onEx(ex); } }; try { webThingy.DownloadDataAsync(new Uri(url2.ToString() + "?data=" + res1.Result)); } catch (Exception ex) { onEx(ex); } }; try { webThingy.DownloadDataAsync(url1); } catch (Exception ex) { onEx(ex); } Console.WriteLine("Keeping process alive"); Console.ReadLine(); } } Is there an generic way to refactor this event-based async pattern? (I.e. not have to write detailed extension methods for each API thats like this?) BeginXXX and EndXXX make it easy, but this event way doesn't seem to offer any way. [1]: http://msdn.microsoft.com/en-us/library/wewwczdw.aspx
0
[ 2, 807, 8, 1281, 21, 9507, 150, 19, 272, 5910, 73, 186, 12733, 302, 17455, 68, 938, 60, 800, 3726, 3726, 109, 21, 8954, 15, 101, 14, 2741, 150, 18513, 38, 15, 275, 14, 636, 4943, 38, 8, 1281, 21, 9507, 150, 3732, 500, 2558, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SNMP payload address translation === I'm using `iptables` under linux to NAT SNMP traffic. Some of the SNMP packets have VARBINDs that contain the (real) IP addresses of the devices that generated them. This confuses standard management tools, which need to see the NATted addresses in the VARBINDs. So I need to translate the addresses in the *payload* in addition to those in the headers. The standard tool is the `nf_nat_snmp_basic.ko` kernel module, but the original version translates only the first octet of the address and the latest version simply corrupts the packets altogether. This is apparently "common knowledge" on the web (www.netfilter.org) and I've verified it on my own equipment. Before I dive into the kernel, has anyone else worked on this problem and come up with a suitable solution? For now, it's sufficient to translate only those VARBINDs whose OIDs specify their type as an IP address. In other words, I don't need to translate addresses that are embedded in string data, which would be far more difficult. Thanks for your suggestions!
0
[ 2, 8912, 2554, 18348, 3218, 4064, 800, 3726, 3726, 31, 22, 79, 568, 13, 1, 4307, 5924, 18, 1, 131, 13024, 20, 6285, 8912, 2554, 2227, 9, 109, 16, 14, 8912, 2554, 12795, 18, 57, 4033, 4772, 43, 18, 30, 3717, 14, 13, 5, 7467, 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 release a project which depends on a 3rd party SNAPSHOT project in maven === i would like to release a snapshot project 'foo-1.0-SNAPSHOT' using the maven release plugin. The project depends on a 3rd party module 'bar-1.0-SNAPSHOT' which is not released yet. I use the option 'allowTimestampedSnapshots' in my project's pom.xml to allow timestamped snapshots but i assume that the 3rd party module (bar) is not timestamped unless i build it myself as maven still complains about unresolved SNAPSHOT dependencies. Is there a way to release the project foo regardless of dependent SNAPSHOT projects and if not how could i add a timestamp to the 3rd party project?
0
[ 2, 184, 20, 830, 21, 669, 56, 9597, 27, 21, 203, 897, 346, 29946, 669, 19, 1216, 3124, 800, 3726, 3726, 31, 83, 101, 20, 830, 21, 29946, 669, 13, 22, 4120, 111, 8, 165, 9, 387, 8, 18, 325, 306, 7868, 22, 568, 14, 1216, 3124,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best Hardware Productivity Tool for aiding in Software Development === What hardware device do you use, that helps aid your software development productivity? The obvious would be a killer keyboard, mouse and multi-monitor rig... but what else do you use, that helps you out?
0
[ 2, 246, 7610, 18211, 5607, 26, 3096, 68, 19, 2306, 522, 800, 3726, 3726, 98, 7610, 3646, 107, 42, 275, 15, 30, 7778, 3096, 154, 2306, 522, 18211, 60, 14, 4674, 83, 44, 21, 5412, 8896, 15, 7567, 17, 1889, 8, 2111, 242, 248, 10960...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
What options are there for sharing data across subdomains? === I have `www.example.com` and also `store.example.com`. (Yes they are subdomains of the same parent domain) `store.example.com` is on ASP.NET 1.1 `www.example.com` is on ASP.NET 3.5 I want to know what options are available for sharing 'session' data between the two sites. I need some kind of shared login and also the abiltity to track user activity no matter which site they started on. * Obvously I could send a GUID when transitioning from one site to the other. * I also believe I can set a cookie which can be shared across subdomains. I've never tried this but it is most likely what I will do. I'm not yet clear if this is a true 'session' cookie or if I just set a low expiration date? Are these my best options or is there somethin else?
0
[ 2, 98, 6368, 50, 80, 26, 6126, 1054, 464, 972, 537, 6232, 18, 60, 800, 3726, 3726, 31, 57, 13, 1, 6483, 9, 29041, 9, 960, 1, 17, 67, 13, 1, 16828, 9, 29041, 9, 960, 1, 9, 13, 5, 1714, 59, 50, 972, 537, 6232, 18, 16, 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...
Find Unused Resources in a .Net Solution === How do you go about finding unused icons, images, strings in .resx files that may have become 'orphaned' and are no longer required?
0
[ 2, 477, 18927, 2566, 19, 21, 13, 9, 2328, 4295, 800, 3726, 3726, 184, 107, 42, 162, 88, 3007, 18927, 9801, 18, 15, 3502, 15, 7887, 19, 13, 9, 99, 18, 396, 6488, 30, 123, 57, 533, 13, 22, 248, 9944, 69, 22, 17, 50, 90, 1045, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
C++/CLI Reference Variable === void f(cli::array<PointF> ^points){ PointF& a = points[0]; // and so on... } Compile error at line 2. .\ndPanel.cpp(52) : error C2440: 'initializing' : cannot convert from 'System::Drawing::PointF' to 'System::Drawing::PointF &' An object from the gc heap (element of a managed array) cannot be converted to a native reference What is the managed way to declare a reference variable?
0
[ 2, 272, 20512, 118, 150, 1210, 2801, 7612, 800, 3726, 3726, 11364, 398, 5, 150, 1210, 45, 45, 8576, 93, 1, 3132, 410, 1, 13, 1, 3132, 18, 6, 1, 454, 410, 1569, 21, 800, 819, 2558, 387, 12660, 12894, 17, 86, 27, 9, 9, 9, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Find unused code === I have to refactor a large C# Application, and i found a lot of functions that are never used in the app. Is there a tool that can check for unused code, so i can remove all the unused functions?
0
[ 2, 477, 18927, 1797, 800, 3726, 3726, 31, 57, 20, 302, 17455, 21, 370, 272, 5910, 3010, 15, 17, 31, 216, 21, 865, 16, 3719, 30, 50, 243, 147, 19, 14, 4865, 9, 25, 80, 21, 5607, 30, 92, 2631, 26, 18927, 1797, 15, 86, 31, 92, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Considerations for updating a 'SiteVisit' row many times over a session === SQL Server 2005: I have a `SiteVisit` row which contains information about a users visit, for instance HttpRefer, whether or not they placed an order, browser, etc. Currently for reporting I am joining this table with `SiteEvent` which contains information about each 'section' visited. This then produces a view which shows statistics about how many sections each user visited. Obviously this is not a sustainable way to do this and now I'm doing some refactoring. I'd like to move the `SectionsVisited` column from my View to an actual column in `SiteVisit`. I'd then update it everytime a user went to that session. Now my actual question (!) : **What kind of considerations do I need to take into account when updating a row many times per session. Obviously I have an index on the row (currently indexed by a GUID to prevent most malicious tampering). ** **I just want to know what non-obvious things I should do (if any). Are there any specific thing I shoudl do to optimize the table or will SQL server 2005 pretty much take care of itself** NB: it is a flash site so please dont just recommend a tracking tool. I want to do some 'crazy' datamining and have developed the tracking as such. This is primarily intended to be a database question not a question about 'how to track'. Although *additional* information about tracking would be more than welcome if youre not the first responder :-)
0
[ 2, 20478, 26, 71, 43, 1880, 21, 13, 22, 9097, 3762, 242, 22, 3131, 151, 436, 84, 21, 3723, 800, 3726, 3726, 4444, 255, 8128, 18228, 31, 57, 21, 13, 1, 9097, 3762, 242, 1, 3131, 56, 1588, 676, 88, 21, 3878, 2139, 15, 26, 4851, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...