unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
How Can I Get Touch Events in an iPhone App's Hidden Status Bar's Area? === I have an iPhone app that hides the status bar. However, my main view doesn't get any touch events when I tap in the status bar area. Is there something I can do to fix this? Here are a few details of my app's setup (in case it matters): - It's an OpenGL-based application. - The app launches in landscape mode. However, the touch events are missing when I tap in the area near the "top" of the portrait-mode area. (In other words, I don't get touch events on the left edge when I have the device held in landscape orientation.) - The main view has exclusiveTouch set to YES. - The view's touchesBegan:withEvent method is called when I tap anywhere else on the screen. (Please refrain from whining about the NDA. Thank you.)
0
[ 2, 184, 92, 31, 164, 1723, 963, 19, 40, 21024, 4865, 22, 18, 3689, 1782, 748, 22, 18, 217, 60, 800, 3726, 3726, 31, 57, 40, 21024, 4865, 30, 3077, 18, 14, 1782, 748, 9, 207, 15, 51, 407, 1418, 1437, 22, 38, 164, 186, 1723, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What do you use for fixed point representation in C++? === I'm looking for a fixed-point standard to use for financial data, do you know any that is worth trying? Do you have any experience on the performance of that hand-made fixed-point classes?
0
[ 2, 98, 107, 42, 275, 26, 3535, 454, 5442, 19, 272, 20512, 60, 800, 3726, 3726, 31, 22, 79, 699, 26, 21, 3535, 8, 3132, 1236, 20, 275, 26, 1553, 1054, 15, 107, 42, 143, 186, 30, 25, 2715, 749, 60, 107, 42, 57, 186, 1496, 27, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
Best way to search in a table and get results and number of results (MySQL) === I have a table of "items", and a table of "itemkeywords". When a user searches for a keyword, I want to give him one page of results plus the total number of results. What I'm doing currently is (for a user that searches "a b c": SELECT DISTINCT {fields I want} FROM itemkeywords JOIN items WHERE (keyword = 'a' or keyword='b' or keyword='c' ORDER BY "my magic criteria" LIMIT 20.10 and then I do the same query with a count SELECT COUNT(*) FROM itemkeywords JOIN items WHERE (keyword = 'a' or keyword='b' or keyword='c' This may get to get a fairly large table, and I consider this solution suck enormously... But I can't think of anything much better. The obvious alternative to avoid hitting MySQL twice , which is doing the first query only, without the LIMIT clause, and then navigating to the correct record to show the corresponding page, and then to the end of the recordset in order to count the result seems even worse... Any ideas?
0
[ 2, 246, 161, 20, 2122, 19, 21, 859, 17, 164, 1736, 17, 234, 16, 1736, 13, 5, 915, 18, 22402, 6, 800, 3726, 3726, 31, 57, 21, 859, 16, 13, 7, 2119, 79, 18, 7, 15, 17, 21, 859, 16, 13, 7, 2119, 79, 4237, 12827, 7, 9, 76, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
nant: Can I extract the last directory in a path? === In Nant, I would like to be able to extract the last name of the directory in a path. For example, we have the path 'c:\my\_proj\source\test.my\_dll\' I would like to pass in that path and extract 'test.my\_dll' Is there a way to easily do this?
0
[ 2, 13, 11028, 45, 92, 31, 10962, 14, 236, 16755, 19, 21, 2013, 60, 800, 3726, 3726, 19, 13, 11028, 15, 31, 83, 101, 20, 44, 777, 20, 10962, 14, 236, 204, 16, 14, 16755, 19, 21, 2013, 9, 26, 823, 15, 95, 57, 14, 2013, 13, 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...
Push or Pull? Turning keypresses into velocity for in-game vehicles. === Should I push keypresses to vehicles when they're pressed, or should vehicles pull keys pressed from the engine? I have a vehicle object, which has location, velocity and accelleration members (among other things) and an update method, during which it updates its location based on its velocity, and its vevlocity based on its accelleration. I have a game object which contains the game loop, which calls the update method on the vehicle. If the player controls the vehicle with the arrow keys, should a keypress set the accelleration (push) and a key-release clear the velocity, or should the vehicle ask the game-engine if the accellerate key is pressed (pull)? I think a push would mean that the keyboard control module would need to know about vehicles, whereas pull would mean a vehicle needs to know specific keyboard controls. I think a related question would be something like: should all objects know about all other objects, or should there be a strict hierarchy, so objects can ask things / tell things to other objects up the tree, but not down (or vice-versa)?
0
[ 2, 3250, 54, 2201, 60, 2101, 1246, 5890, 160, 77, 10700, 26, 19, 8, 5128, 3128, 9, 800, 3726, 3726, 378, 31, 3250, 1246, 5890, 160, 20, 3128, 76, 59, 22, 99, 2931, 15, 54, 378, 3128, 2201, 5534, 2931, 37, 14, 1406, 60, 31, 57,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Which chatrooms do developers/hackers hang out in? === As a hacker/developers, which chatroom do you goto to interact with other hacker/developers? eg irc.freenode.net etc
2
[ 2, 56, 6615, 4447, 18, 107, 10168, 118, 22983, 445, 4546, 70, 19, 60, 800, 3726, 3726, 28, 21, 20395, 118, 26051, 445, 15, 56, 6615, 4447, 107, 42, 330, 111, 20, 10001, 29, 89, 20395, 118, 26051, 445, 60, 12369, 31, 5453, 9, 463...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Change WPF DataTemplate for ListBox item if selected === I need to change the DataTemplate for items in a ListBox depending on whether the item is selected or not (displaying different/more information when selected). I don't get a GotFocus/LostFocus event on the top-most element in the DataTemplate (a StackPanel) when clicking the ListBox item in question (only through tabbing), and I'm out of ideas. Thanks in advance.
0
[ 2, 753, 619, 7721, 1054, 9577, 6554, 26, 968, 5309, 9101, 100, 1704, 800, 3726, 3726, 31, 376, 20, 753, 14, 1054, 9577, 6554, 26, 3755, 19, 21, 968, 5309, 4758, 27, 1472, 14, 9101, 25, 1704, 54, 52, 13, 5, 2906, 10630, 421, 118,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What you think about explicit defining pass-by-reference on C++? === I mean, in every function or method that you declare you have to explicit write that the object will be sent by reference prefixing the reference operator on it. I wish sometimes that every non-POD types would be automatically sent by reference, because I use that a lot. Do you know any compiler directive that would change that behavior? I know it would be no standard, but from: <pre> class a { public: int b(b &param); int c(c &param); void do_nothing_on_x(x &param); }; </pre> To: <pre> class a { public: int b(b param); int c(c param); void do_nothing_on_x(x param); }; </pre> Would be interesting at least for me, feels much more clear, and also if you *know* that I believe the mistakes would be the same that if you had to explicit declare it. Another point of view, from someone coming from C, the reference operator seems to me a way to get the variable *address*, that's the way I used for getting pointers. I mean, it is the same operator but with different semantic on different contexts, doesn't that feel a little bit wrong for you too?
0
[ 2, 98, 42, 277, 88, 14990, 14684, 1477, 8, 779, 8, 28018, 27, 272, 20512, 60, 800, 3726, 3726, 31, 884, 15, 19, 352, 1990, 54, 2109, 30, 42, 10123, 42, 57, 20, 14990, 2757, 30, 14, 3095, 129, 44, 795, 34, 2801, 14315, 68, 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...
Function pointer to template class member functions === I have a templated class defined (in part) as template <class T> MyClass { public: void DoSomething(){} }; If I want to call DoSomething from another class, but be able to do this for multiple 'T' types in the same place, I am stuck for an idea as method functions pointers are uniquely constrained to the class type. Of course, each MyClass<T> is a different type, so I can not store function pointers to MyClass<T>DoSomething() in a 'polymorphic' way. My use-case is I want to store, in a holding class, a vector of function pointers to 'DoSomething' such that I can issue a call to all stored classes from one place. Has anyone any suggestions?
0
[ 2, 1990, 454, 106, 20, 22894, 718, 322, 3719, 800, 3726, 3726, 31, 57, 21, 22894, 43, 718, 2811, 13, 5, 108, 141, 6, 28, 22894, 13, 1, 1898, 13, 38, 1, 51, 1898, 13, 1, 317, 45, 11364, 107, 9099, 5, 6, 1, 13, 1, 73, 100, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Manpage scandir() prototype weirdness === I have a problem with **scandir()**: The manpage contains this as prototype: int scandir(const char *dir, struct dirent ***namelist, int (*filter)(const struct dirent *), int (*compar)(const struct dirent **, const struct dirent **)); Therefore I have this: static inline int RubyCompare(const struct dirent **a, const struct dirent **b) { return(strcmp((*a)->d_name, (*b)->d_name)); } And here's the call: num = scandir(buf, &entries, NULL, RubyCompare); Finally the compiler says this: warning: passing argument 4 of ‘scandir’ from incompatible pointer type Compiler is **gcc-4.3.2**, my CFLAGS are following: -Wall -Wpointer-arith -Wstrict-prototypes -Wunused -Wshadow -std=gnu99 What is the meaning of this warning? The declaration of RubyCompare looks correct for me and besides the warning the code works completely.
0
[ 2, 169, 6486, 8313, 9035, 5, 6, 7063, 5455, 720, 800, 3726, 3726, 31, 57, 21, 1448, 29, 13, 1409, 18, 1245, 9035, 5, 6, 1409, 45, 14, 169, 6486, 1588, 48, 28, 7063, 45, 19, 38, 8313, 9035, 5, 12124, 38, 4892, 1637, 9035, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What are those little Xcode tips & tricks you wish you knew about 2 years ago? === With a huge influx of newbies to Xcode I'm sure there are lots of Xcode tips and tricks to be shared. What are yours?
0
[ 2, 98, 50, 273, 265, 993, 9375, 11034, 279, 13747, 42, 2536, 42, 404, 88, 172, 122, 1464, 60, 800, 3726, 3726, 29, 21, 2329, 20211, 16, 78, 5893, 18, 20, 993, 9375, 31, 22, 79, 562, 80, 50, 7503, 16, 993, 9375, 11034, 17, 1374...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Organizing classes into namespaces. === Are there some principles of organizing classes into namespaces? For example is it OK if classes from namespace N depends on classes from N.X? And if classes from N.X depends on classes from N?
0
[ 2, 11725, 2684, 77, 204, 5582, 18, 9, 800, 3726, 3726, 50, 80, 109, 5624, 16, 11725, 2684, 77, 204, 5582, 18, 60, 26, 823, 25, 32, 5854, 100, 2684, 37, 204, 5582, 13, 103, 9597, 27, 2684, 37, 13, 103, 9, 396, 60, 17, 100, 26...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
Ideal number of classes per namespace branch === What number of classes do you think is ideal per one namespace "branch"? At which point would one decide to break one namespace into multiple ones? Let's not discuss the logical grouping of classes (assume they are logically grouped properly), I am, at this point, focused on the maintainable vs. not maintainable number of classes.
0
[ 2, 5628, 234, 16, 2684, 416, 204, 5582, 1686, 800, 3726, 3726, 98, 234, 16, 2684, 107, 42, 277, 25, 5628, 416, 53, 204, 5582, 13, 7, 23014, 7, 60, 35, 56, 454, 83, 53, 4073, 20, 1442, 53, 204, 5582, 77, 1886, 53, 18, 60, 408...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Enhancing Performance in Real-Time Systems === First, I'd like to establish the acceptable end-to-end latency for a real-time system in the financial world is less than 200ms. Okay, here's what I'm after. In the design of real-time systems, there are "design patterns" (or techniques) that will increase the performance (i.e. reduce processing time, improve scalability, etc). An example of what I'm after is, the use of GUIDs instead of sequential numbers for allocation of primary keys. Rationale for GUIDs is that handlers have their own primary key generators without "consulting" each other. This allows for parallel processing to occur and permits scaling. Here're some more. I'll try and add to the list when able to. - The use of [event driven architecture (EDA)][1]. - Use of messaging queues to support EDA. [1]: http://en.wikipedia.org/wiki/Event_Driven_Architecture I bow to the collective wisdom of the community. Thanks heaps!
0
[ 2, 13, 23267, 956, 19, 683, 8, 891, 1242, 800, 3726, 3726, 64, 15, 31, 22, 43, 101, 20, 4088, 14, 12513, 241, 8, 262, 8, 2451, 456, 14386, 26, 21, 683, 8, 891, 329, 19, 14, 1553, 126, 25, 787, 119, 2327, 79, 18, 9, 1705, 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...
Snippets for C++ in VS2008 === Does someone know of any port to VS2008 of the support for snippets for C++? VS2005 had a nice enhancement pack: [Microsoft Visual Studio 2005 IDE Enhancements][1] But the snippets for C++ feature is not supported in VS2008. I already tryed to use the SDK to reimplement it but gave up out of lack of time since are a huge number of Language details to know in Babel. I find hard to believe nowone has needed this and implemented it as snippets can be one of the most effective production accelerators when used correctly. [1]: http://www.microsoft.com/downloads/details.aspx?FamilyID=cd7c6e48-e41b-48e3-881e-a0e6e97f9534&DisplayLang=en
0
[ 2, 13, 29061, 18, 26, 272, 20512, 19, 4611, 2753, 800, 3726, 3726, 630, 737, 143, 16, 186, 1295, 20, 4611, 2753, 16, 14, 555, 26, 13, 29061, 18, 26, 272, 20512, 60, 4611, 2835, 41, 21, 2210, 19415, 3607, 45, 636, 22019, 12980, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the worst 'gotcha' you've experienced? === From wikipedia: "In programming, a gotcha is a feature of a system, a program or a programming language that works in the way it is documented but is counter-intuitive and almost invites mistakes because it is both enticingly easy to invoke and completely unexpected and/or unreasonable in its outcome." So, what are some of the worst offenders that you've experienced?
4
[ 2, 98, 25, 14, 4126, 13, 22, 7597, 1651, 22, 42, 22, 195, 3882, 60, 800, 3726, 3726, 37, 20169, 45, 13, 7, 108, 3143, 15, 21, 330, 1651, 25, 21, 1580, 16, 21, 329, 15, 21, 625, 54, 21, 3143, 816, 30, 693, 19, 14, 161, 32, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Setting PHP variables in httpd.conf? === I'd like to automatically change my database connection settings on a per-vhost basis, so that I don't have to edit any PHP code as it moves from staging to live and yet access different databases. This is on a single dedicated server. So I was wondering, can I set a PHP variable or constant in httpd.conf as part of the vhost definition that the site can then use to point itself to a testing database automatically? $database = 'live'; if (some staging environment variable is true) { $database = 'testing'; // and not live } If this isn't possible, I guess in this case I can safely examine the hostname I'm running on to tell, but I'd like something a little less fragile Hope this makes sense many thanks Ian
0
[ 2, 2697, 13, 26120, 12157, 19, 7775, 43, 9, 14093, 60, 800, 3726, 3726, 31, 22, 43, 101, 20, 7499, 753, 51, 6018, 2760, 12410, 27, 21, 416, 8, 710, 11694, 2239, 15, 86, 30, 31, 221, 22, 38, 57, 20, 9392, 186, 13, 26120, 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...
Efficiently merge string arrays in .NET, keeping distinct values === I'm using .NET 3.5. I have two string arrays, which may share one or more values: string[] list1 = new string[] { "apple", "orange", "banana" }; string[] list2 = new string[] { "banana", "pear", "grape" }; I'd like a way to merge them into one array with no duplicate values: { "apple", "orange", "banana", "pear", "grape" } I can do this with LINQ: string[] result = list1.Concat(list2).Distinct(); but I imagine that's not very efficient for large arrays. Is there a better way?
0
[ 2, 20519, 12666, 3724, 7718, 18, 19, 13, 9, 2328, 15, 2882, 4421, 4070, 800, 3726, 3726, 31, 22, 79, 568, 13, 9, 2328, 203, 9, 264, 9, 31, 57, 81, 3724, 7718, 18, 15, 56, 123, 1891, 53, 54, 91, 4070, 45, 3724, 2558, 500, 968...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Python scope === I am trying to figure out this: c = 1 def f(n): print c + n def g(n): c = c + n f(1) => 2 g(1) => UnboundLocalError: local variable 'c' referenced before assignment Thanks!
0
[ 2, 20059, 9914, 800, 3726, 3726, 31, 589, 749, 20, 1465, 70, 48, 45, 272, 800, 137, 6312, 398, 5, 103, 6, 45, 4793, 272, 2754, 13, 103, 6312, 489, 5, 103, 6, 45, 272, 800, 272, 2754, 13, 103, 398, 5, 165, 6, 800, 1, 172, 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 your smallish web development company setup? === I work for a small web development company (only 2 to 3 developers) that work on a wide range of projects for different customers (everything from CMS's to eCommerce sites). Usually we work on our own projects but occasionally we need to work together on one. We use subversion as our source control software and sites are developed in .NET using VS 2008 and SQL 2005. After reading through plenty of posts regarding unit testing and other "enterprise" level coding practices I was wondering what other developers do for small projects that only require minimal maintenance and have short development times? I am thinking in particular of things like is unit testing necessary, etc.
0
[ 2, 98, 25, 154, 284, 1595, 2741, 522, 237, 18161, 60, 800, 3726, 3726, 31, 170, 26, 21, 284, 2741, 522, 237, 13, 5, 4965, 172, 20, 203, 10168, 6, 30, 170, 27, 21, 1051, 978, 16, 2314, 26, 421, 5279, 13, 5, 13224, 37, 2390, 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...
Asp.Net MVC: How do I get Html.ActionLink to render integer values properly? === I have an asp.net mvc application with a route similar to: routes.MapRoute("Blog", "{controller}/{action}/{year}/{month}/{day}/{friendlyName}", new { controller = "Blog", action = "Index", id = "", friendlyName="" }, new { controller = @"[^\.]*", year = @"\d{4}", month = @"\d{2}", day = @"\d{2}" } ); My controller action method signature looks like: public ActionResult Detail(int year, int month, int day, string friendlyName) { // Implementation... } In my view, I'm doing something like: <%= Html.ActionLink<BlogController>(item => item.Detail(blog.PostedOn.Year, blog.PostedOn.Month, blog.PostedOn.Day, blog.Slug), blog.Title) %> While the url that is generated with ActionLink works, it uses query string variables rather than URL rewriting. For example, it would produce /blog/detail/my-slug?year=2008&month=7&day=5 instead of /blog/detail/2008/07/05/my-slug Is there a way to get the generic version of ActionLink to properly pad the integer values so that the url comes out as expected? Thanks Jim
0
[ 2, 28, 306, 9, 2328, 307, 8990, 45, 184, 107, 31, 164, 13, 15895, 9, 8645, 6258, 20, 16535, 13820, 4070, 7428, 60, 800, 3726, 3726, 31, 57, 40, 28, 306, 9, 2328, 307, 8990, 3010, 29, 21, 858, 835, 20, 45, 5050, 9, 15022, 20179...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Unable to run assembly program === I have just started reading Introduction to 80x86 Assembly Language and Computer Architecture.I am trying to use NASM, to run the first example shown in chapter 3 ,but unsuccessfully.Has anyone read the book,and run the examples?
0
[ 2, 2343, 20, 485, 1475, 625, 800, 3726, 3726, 31, 57, 114, 373, 1876, 3445, 20, 2972, 396, 3274, 1475, 816, 17, 1428, 2607, 9, 49, 589, 749, 20, 275, 7938, 79, 15, 20, 485, 14, 64, 823, 1721, 19, 1260, 203, 13, 15, 811, 12194,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Visual Studio support for new C / C++ standards? === I keep reading about C99 and C++0x and all these totally sweet things that are getting added to the language standard that might be nice to use someday. However, we currently languish in the land of writing C++ in Visual Studio. Will any of the new stuff in the standard ever get added to visual studio, or are microsoft more interested in adding new C# variants to do that? Thanks!
0
[ 2, 3458, 1120, 555, 26, 78, 272, 13, 118, 272, 20512, 3364, 60, 800, 3726, 3726, 31, 643, 1876, 88, 272, 3483, 17, 272, 20512, 387, 396, 17, 65, 158, 5139, 2092, 564, 30, 50, 1017, 905, 20, 14, 816, 1236, 30, 530, 44, 2210, 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...
What good user groups are out there in London? === Just a quick question - what good user groups are there in London? I really want to up my game as a developer and it'd be nice to meet some other passionate developers in person. I'm interested in:- - .net - C# - F# - Ruby - Scheme/Lisp - Compilers - Linux - Anything geeky really!!
0
[ 2, 98, 254, 4155, 1170, 50, 70, 80, 19, 479, 60, 800, 3726, 3726, 114, 21, 2231, 1301, 13, 8, 98, 254, 4155, 1170, 50, 80, 19, 479, 60, 31, 510, 259, 20, 71, 51, 250, 28, 21, 10058, 17, 32, 22, 43, 44, 2210, 20, 1255, 109,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Server cert and Client Truststore === I am trying to call a webservice using ssl. How do i get the relevant server cert so that i can import it into my truststore? I know about the use of property com.ibm.ssl.enableSignerExchangePrompt from a main method but i would add the server cert to my truststore manually. I dont want this property set in any of my servlets Any help is greatly appreciated Thanks Damien
0
[ 2, 8128, 13, 17580, 17, 6819, 1527, 16828, 800, 3726, 3726, 31, 589, 749, 20, 645, 21, 2741, 11449, 568, 13, 18, 18, 255, 9, 184, 107, 31, 164, 14, 7480, 8128, 13, 17580, 86, 30, 31, 92, 9010, 32, 77, 51, 1527, 16828, 60, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the best way to produce random double on POSIX? === I'd like to get **uniform distribution** in range [0.0, 1.0) If possible, please let the implementation make use of random bytes from **/dev/urandom.** It would also be nice if your solution was **thread-safe**. If you're not sure, please indicate that.
0
[ 2, 98, 25, 14, 246, 161, 20, 2213, 5477, 1494, 27, 2353, 6742, 60, 800, 3726, 3726, 31, 22, 43, 101, 20, 164, 13, 1409, 1020, 13537, 2523, 1409, 19, 978, 636, 387, 9, 387, 15, 137, 9, 387, 6, 100, 938, 15, 2247, 408, 14, 612...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 a good search engine for embedding in a web site. === I am thinking of changing my web site's homegrown search engine. Before I break out Visual Studio, I wondered if anyone can suggest an alternative that gives me what I need. This being: - Works with an ASP.NET site - Creates a file-based index - Fast search across hundreds or thousands of pages - Performs word-stemming to find variations upon words - Gives full control over the output styles - Is cheap (or better still, free!)
0
[ 2, 98, 25, 21, 254, 2122, 1406, 26, 11911, 69, 3258, 19, 21, 2741, 689, 9, 800, 3726, 3726, 31, 589, 1440, 16, 4226, 51, 2741, 689, 22, 18, 213, 16347, 2122, 1406, 9, 115, 31, 1442, 70, 3458, 1120, 15, 31, 3519, 100, 1276, 92,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Defect-free Software === About ten years ago, a "Terry Colligan" published a buncha interesting pages on defect-free software. He noticed that a woman who worked for him produced code with lots fewer bugs and his company expanded on this --- even advertising "automatic QA". At least some of his web pages are still up: http://www.tenberry.com/nodefect.htm What ever happened to him? Were any of the ideas any good? How about automated QA? Regards, Bill Drissel Grand Priarie, TX
0
[ 2, 18929, 8, 4639, 2306, 800, 3726, 3726, 88, 652, 122, 1464, 15, 21, 13, 7, 815, 622, 19830, 2342, 7, 467, 21, 7653, 58, 4883, 4434, 27, 18929, 8, 4639, 2306, 9, 24, 2711, 30, 21, 524, 72, 577, 26, 61, 671, 1797, 29, 7503, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Java printf functionality for collections or arrays === In python you can use a tuple in a formatted print statement and the tuple values are used at the indicated positions in the formatted string. For example: >>> a = (1,"Hello",7.2) >>> print "these are the values %d, %s, %f" % a these are the values 1, Hello, 7.200000 Is there some way to use any array or collection in a java printf statement in a similar way? I've looked at the [documentation][1] and it appears to have built in support for some types like Calendar, but I don't see anything for collections. If this isn't provided in java, is there any java idiom that would be used in a case like this where you are populating collections and then printing the values from many collections using one format string (other than just nested looping)? [1]: http://java.sun.com/javase/6/docs/api/java/util/Formatter.html#syntax
0
[ 2, 8247, 4793, 410, 18548, 26, 5721, 54, 7718, 18, 800, 3726, 3726, 19, 20059, 42, 92, 275, 21, 2289, 5106, 19, 21, 13, 29850, 4793, 3331, 17, 14, 2289, 5106, 4070, 50, 147, 35, 14, 4151, 3062, 19, 14, 13, 29850, 3724, 9, 26, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Annotations on Interfaces? === I can't for the life of me figure out a use case for being able to annotate interfaces in Java. Maybe someone smarter than I am could give me an example?
0
[ 2, 40, 1270, 7504, 27, 6573, 18, 60, 800, 3726, 3726, 31, 92, 22, 38, 26, 14, 201, 16, 55, 1465, 70, 21, 275, 610, 26, 142, 777, 20, 40, 1270, 1373, 6573, 18, 19, 8247, 9, 913, 737, 3978, 106, 119, 31, 589, 110, 590, 55, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How do I sort a file in place using bash shell? === I have a file temp.txt, that I want to sort with the "sort" command in bash. I want the sorted results to replace the original file. This doesn't work for example (I get an empty file). sortx temp.txt > temp.txt Can this be done in one line without resorting to copying to temporary files?
0
[ 2, 184, 107, 31, 2058, 21, 3893, 19, 209, 568, 13158, 3593, 60, 800, 3726, 3726, 31, 57, 21, 3893, 13, 9577, 9, 38, 396, 38, 15, 30, 31, 259, 20, 2058, 29, 14, 13, 7, 22843, 7, 1202, 19, 13158, 9, 31, 259, 14, 22554, 1736, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Way to stop a program from starting up using c#? === Here's the idea, I'd like to make a service? that will look for a certain program starting up and dissallow it unless certain conditions are met. Let's say I have a game I want to stop myself from playing during the week. So if I start it up on any day other than Friday/Saturday/Sunday, it will intercept and cancel. Is this possible with C#? Main thing I am looking for is how to catch a program starting up, rest should be easy.
0
[ 2, 161, 20, 747, 21, 625, 37, 1422, 71, 568, 272, 5910, 60, 800, 3726, 3726, 235, 22, 18, 14, 882, 15, 31, 22, 43, 101, 20, 233, 21, 365, 60, 30, 129, 361, 26, 21, 1200, 625, 1422, 71, 17, 1460, 18, 17976, 32, 4003, 1200, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 POD types in C++? === I've been following SO for a bit now, and I've come across this term POD-type a few times... what does it mean?
0
[ 2, 98, 50, 8848, 2551, 19, 272, 20512, 60, 800, 3726, 3726, 31, 22, 195, 74, 249, 86, 26, 21, 1142, 130, 15, 17, 31, 22, 195, 340, 464, 48, 981, 8848, 8, 4474, 21, 310, 436, 9, 9, 9, 98, 630, 32, 884, 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, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Tutorials for Wii programming === I have a Nintendo Wii, and I've got [devkitpro][1] working to load some simple programs. The example source code that I've been able to find is very simplistic, such as drawing and rotating a simple shape. I've been looking for more in depth tutorials, and I haven't been able to find much. Most of the applications available on [wiibrew][2] are open source, so I could look through those. However, I'd rather have something that's a little more geared towards teaching certain techniques, rather than have to browse through someone else's code to find the answer. Does anybody know of any good tutorials? Currently I'm stuck at just getting alpha (translucent) colours to work, but I'm also interested in getting lighting and other more advanced graphics techniques working. [1]: http://www.devkitpro.org/ [2]: http://www.wiibrew.org
0
[ 2, 29724, 18, 26, 18238, 3143, 800, 3726, 3726, 31, 57, 21, 10562, 18238, 15, 17, 31, 22, 195, 330, 636, 14438, 13703, 2740, 500, 2558, 165, 500, 638, 20, 6305, 109, 1935, 1726, 9, 14, 823, 1267, 1797, 30, 31, 22, 195, 74, 777, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 resolution of the main monitor in Mac OS X in C++? === I have a graphical app that needs to test the resolution of the display it is starting up on in Mac OS X to ensure it is not larger than the resolution. This is done before the window itself is initialized. If there is more than one display, it needs to be the primary display. This is the display that hardware accelerated (OpenGL) apps will start up on in Full Screen, and is typically the display that has the menu bar at the top. In Windows, I can successfully use GetSystemMetrics(). How can I do this on OS X?
0
[ 2, 184, 107, 31, 164, 14, 4302, 16, 14, 407, 7626, 19, 1572, 13, 759, 993, 19, 272, 20512, 60, 800, 3726, 3726, 31, 57, 21, 21755, 4865, 30, 2274, 20, 1289, 14, 4302, 16, 14, 3042, 32, 25, 1422, 71, 27, 19, 1572, 13, 759, 99...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 windows API to change Screen refresh rate? === Can some one specify the windows API, one need to use inorder to be able to change programmatically the screen refresh rate? Thanks :) Ariel
0
[ 2, 98, 25, 14, 1936, 21, 2159, 20, 753, 2324, 24905, 1684, 60, 800, 3726, 3726, 92, 109, 53, 19077, 14, 1936, 21, 2159, 15, 53, 376, 20, 275, 19, 7861, 20, 44, 777, 20, 753, 625, 6732, 1326, 14, 2324, 24905, 1684, 60, 3669, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
What are the quintessential tools and resources for hosting Rails applications on Amazon's EC2? === I'm looking for documentation, blogs, books, ready-to-use images, services, even commercial third-party wrappers, anything that would make it easier to start using and maintain EC2 to host a Rails application.
0
[ 2, 98, 50, 14, 11663, 24219, 4672, 17, 2566, 26, 10637, 2240, 18, 3767, 27, 8059, 22, 18, 6695, 135, 60, 800, 3726, 3726, 31, 22, 79, 699, 26, 13945, 15, 8146, 18, 15, 964, 15, 1451, 8, 262, 8, 3699, 3502, 15, 687, 15, 166, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JTable column spanning === I am trying to make a JTable that has column spans available. Specifically, I am looking to nest a JTable inside another JTable, and when the user clicks to view the nested table, it should expand to push down the rows below and fill the empty space. This is similar to what you see in MS Access where you can nest tables, and clicking the expand button on a row will show you the corresponding entries in the nested table. If someone knows of a way to perform a column span with JTable, can you please point me in the right direction? Or if you know of an alternative way to do this, I am open to suggestions. The application is being built with Swing. Elements in the table, both high level and low level, have to be editable in any solution. Using nested JTables this won't be a problem, and any other solution would have to take this into consideration as well.
0
[ 2, 487, 5924, 4698, 16092, 800, 3726, 3726, 31, 589, 749, 20, 233, 21, 487, 5924, 30, 63, 4698, 16967, 904, 9, 3524, 15, 31, 589, 699, 20, 5618, 21, 487, 5924, 572, 226, 487, 5924, 15, 17, 76, 14, 4155, 10840, 18, 20, 1418, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to conditionnally display a field on Infopath === I'm trying to do the following on infopath: I have to choose between 2 options (with bullets), and depending on this, if we choose Option1, I need to display a text field to enter more details, but if Option2 is chosen, I don't need this additional field. I'm not sure about how to enter a Rule to define this :-(<br> Anyone could help?<br> Thx!
0
[ 2, 184, 20, 2874, 103, 1326, 3042, 21, 575, 27, 15404, 8353, 800, 3726, 3726, 31, 22, 79, 749, 20, 107, 14, 249, 27, 15404, 8353, 45, 31, 57, 20, 3538, 128, 172, 6368, 13, 5, 1410, 11366, 6, 15, 17, 4758, 27, 48, 15, 100, 95...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can someone recommend a reliable CVS or SVN hosting service? === I want to use CVS or SVN as my source control mechanisms on several side projects I am working on. Instead of hosting the server myself, I was wondering if anyone had any recommendations on CVS or SVN hosts. My concerns in order are: reliability, uptime, and price. When responding, please give details on your recommendation. Also, if someone has had a bad experience with a CVS host, please explain that as well so we know who to stay away from.
2
[ 2, 92, 737, 12360, 21, 11398, 13, 12732, 18, 54, 13, 18, 16578, 10637, 365, 60, 800, 3726, 3726, 31, 259, 20, 275, 13, 12732, 18, 54, 13, 18, 16578, 28, 51, 1267, 569, 11626, 27, 238, 270, 2314, 31, 589, 638, 27, 9, 700, 16, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to simulate XP's "Windows Security" start menu option on Windows 2000 === I'm trying to find a way to invoke the Ctrl+Alt+Delete dialog on a Windows 2000 computer that I'm connected to via Remote Desktop. Windows XP and 2003 include a new start menu command called "Windows Security" that does this, but Windows 2000 has no such option. It appears that Ctrl+Alt+End will do this, but it only goes to the outermost RDP window, so if you're several connections deep, it doesn't help. In this scenario, I'm on computer A, connected to computer B. From computer B, I connect to computer C. Pressing Ctrl+Alt+End opens the Ctrl+Alt+Delete dialog on computer B, not computer C. The goal here is to allow users connecting to computer C to change their own passwords. The users are not administrators on the computer, so they can't access the various tools that an admin might use to accomplish this.
0
[ 2, 184, 20, 24969, 23045, 22, 18, 13, 7, 27508, 18, 1221, 7, 799, 11379, 4255, 27, 1936, 824, 800, 3726, 3726, 31, 22, 79, 749, 20, 477, 21, 161, 20, 28371, 14, 13, 4812, 6362, 2430, 192, 38, 2430, 24249, 591, 28223, 27, 21, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I successfully pass a function reference to Django’s reverse() function? === I’ve got a brand new Django project. I’ve added one minimal view function to `views.py`, and one URL pattern to `urls.py`, passing the view by function reference instead of a string: <http://dpaste.com/81084/> I’m trying to use `reverse()` to get the URL, by passing it a function reference. But I’m not getting a match, despite confirming that the view function I’m passing to reverse is the exact same view function I put in the URL pattern: <http://dpaste.com/81082/> As far as I can tell from the documentation, function references should be fine in both the URL pattern and `reverse()`. - [URL patterns with function references](http://docs.djangoproject.com/en/dev/topics/http/urls/#passing-callable-objects-instead-of-strings) - [`reverse` with function references](http://docs.djangoproject.com/en/dev/topics/http/urls/?from=olddocs#reverse) I’m using the Django trunk, revision 9092.
0
[ 2, 184, 107, 31, 3673, 1477, 21, 1990, 2801, 20, 3857, 14541, 1, 18, 7006, 5, 6, 1990, 60, 800, 3726, 3726, 31, 1, 195, 330, 21, 2209, 78, 3857, 14541, 669, 9, 31, 1, 195, 905, 53, 8663, 1418, 1990, 20, 13, 1, 4725, 18, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the fastest way to get to documentation for Ruby? === Say I'm writing some ruby code and I want to use the standard Date type to get the current date. Instead of using a search engine, is there a faster way to find the documentation for this class? I know I can get the methods for Date by typing `Date.methods`, but as far as I know this doesn't provide details about argument types or return value. Editor-specific answers are welcomed. My editor of choice is Emacs.
0
[ 2, 98, 25, 14, 7518, 161, 20, 164, 20, 13945, 26, 10811, 60, 800, 3726, 3726, 395, 31, 22, 79, 1174, 109, 10811, 1797, 17, 31, 259, 20, 275, 14, 1236, 1231, 1001, 20, 164, 14, 866, 1231, 9, 700, 16, 568, 21, 2122, 1406, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MySQL: Delete all but the 50 newest rows === I have a SQL table with news stories and Unix timestamps. I'd like to only keep the 50 newest stories. How would I write an SQL statement to delete any amount of older stories?
0
[ 2, 51, 18, 22402, 45, 27448, 65, 47, 14, 1222, 17175, 11295, 800, 3726, 3726, 31, 57, 21, 4444, 255, 859, 29, 996, 1650, 17, 22540, 436, 4919, 1919, 9, 31, 22, 43, 101, 20, 104, 643, 14, 1222, 17175, 1650, 9, 184, 83, 31, 2757...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
What is the best way to version control my SQL server stored procedures? === What is the best way to version control my database objects? I'm using Visual studio 2005/2008 and SQL server 2005. I would prefer a solution which can be used with SVN.
0
[ 2, 98, 25, 14, 246, 161, 20, 615, 569, 51, 4444, 255, 8128, 8214, 8876, 60, 800, 3726, 3726, 98, 25, 14, 246, 161, 20, 615, 569, 51, 6018, 3916, 60, 31, 22, 79, 568, 3458, 1120, 812, 118, 2753, 17, 4444, 255, 8128, 812, 9, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
Do you use the "global" statement in Python ? === I was reading a question about the Python *global* statement ( ["Python scope"][1] ) and I was remembering about how often I used this statement when I was a Python beginner (I used *global* a lot) and how, nowadays, years later, I don't use it at all, ever. I even consider it a bit "un-pythonic".<br> Do you use this statement in Python ? Has your usage of it changed with time ? [1]: http://stackoverflow.com/questions/146359/python-scope
0
[ 2, 107, 42, 275, 14, 13, 7, 26763, 7, 3331, 19, 20059, 13, 60, 800, 3726, 3726, 31, 23, 1876, 21, 1301, 88, 14, 20059, 1637, 26763, 2483, 3331, 13, 5, 636, 7, 6448, 11570, 9914, 7, 500, 2558, 165, 500, 13, 6, 17, 31, 23, 111...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Crafting .webloc file === I'm writing a program (for Mac OS X, using Objective-C) and I need to create a bunch of .webloc files programmatically. The .webloc file is simply file which is created after you drag-n-drop an URL from Safari's location bar to some folder. Generally speaking, I need an approach to create items in a filesystem which point to some location in the Web. As I understand .webloc files should be used for this on Mac OS X. So, is it possible to craft a .webloc file having a valid url and some title for it?
0
[ 2, 6508, 68, 13, 9, 14113, 10799, 3893, 800, 3726, 3726, 31, 22, 79, 1174, 21, 625, 13, 5, 1106, 1572, 13, 759, 993, 15, 568, 7038, 8, 150, 6, 17, 31, 376, 20, 1600, 21, 7653, 16, 13, 9, 14113, 10799, 6488, 625, 6732, 1326, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 the Java main method is static? === The method signature of a Java main method is: public static void main(String[] args){ ... } There is a reason for this method to be static?
0
[ 2, 483, 14, 8247, 407, 2109, 25, 12038, 60, 800, 3726, 3726, 14, 2109, 7810, 16, 21, 8247, 407, 2109, 25, 45, 317, 12038, 11364, 407, 5, 11130, 2558, 500, 13, 10663, 18, 6, 1, 13, 9, 9, 9, 13, 1, 80, 25, 21, 1215, 26, 48, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Upgrading DOS Batch files for Windows === Has anyone had any recent requirements for programming automated DOS Batch style tasks on a Windows box? I've got some automation to do and I'd rather not sit and write a pile of .BAT files in Notepad if there is a better way of automating these tasks: mainly moving of files under certain date and time conditions, as well as triggering Windows applications before and after moving the files. I am thinking along the lines of an IDE that has all the DOS commands 'available' to the editor with the correct parameter syntax checking. Is there anything like this out there, or should I be solving this problem with something other than .BAT files?
0
[ 2, 26939, 107, 18, 13064, 6488, 26, 1936, 800, 3726, 3726, 63, 1276, 41, 186, 1764, 4786, 26, 3143, 14904, 107, 18, 13064, 1034, 8674, 27, 21, 1936, 1649, 60, 31, 22, 195, 330, 109, 23217, 20, 107, 17, 31, 22, 43, 864, 52, 2066,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 isn't my NHibernate bag collection setting the 'parent id' of the children dynamically? === I have a new object with a collection of new objects within it on some property as an IList<T>. I see through sql profiler two insert queries being executed.. one for the parent, which has the new guid id, and one for the child, however, the foreign-key on the child that references the parent, is an empty guid. Here is my mapping on the parent: <id name="BackerId"> <generator class="guid" /> </id> <property name="Name" /> <property name="PostCardSizeId" /> <property name="ItemNumber" /> <bag name="BackerEntries" table="BackerEntry" cascade="all" lazy="false" order-by="Priority"> <key column="BackerId" /> <one-to-many class="BackerEntry" /> </bag> On the Backer.cs class, I defined BackerEntries property as IList<BackerEntry> When I try to SaveOrUpdate the passed in entity I get the following results in sql profiler: exec sp_executesql N'INSERT INTO Backer (Name, PostCardSizeId, ItemNumber, BackerId) VALUES (@p0, @p1, @p2, @p3)',N'@p0 nvarchar(3),@p1 uniqueidentifier,@p2 nvarchar(3),@p3 uniqueidentifier',@p0=N'qaa',@p1='BC95E7EB-5EE8-44B2-82FF30F5176684D',@p2=N'qaa',@p3='18FBF8CE-FD22-4D08-A3B1-63D6DFF426E5' exec sp_executesql N'INSERT INTO BackerEntry (BackerId, BackerEntryTypeId, Name, Description, MaxLength, IsRequired, Priority, BackerEntryId) VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7)',N'@p0 uniqueidentifier,@p1 uniqueidentifier,@p2 nvarchar(5),@p3 nvarchar(5),@p4 int,@p5 bit,@p6 int,@p7 uniqueidentifier',@p0='00000000-0000-0000-0000-000000000000',@p1='2C5BDD33-5DD3-42EC-AA0E-F1E548A5F6E4',@p2=N'qaadf',@p3=N'wasdf',@p4=0,@p5=1,@p6=0,@p7='FE9C4A35-6211-4E17-A75A-60CCB526F1CA' As you can see, its not resetting the empty guid for BackerId on the child to the new real guid of the parent. Finally, the exception throw is: "NHibernate.Exceptions.GenericADOException: could not insert: [CB.ThePostcardCompany.MiddleTier.BackerEntry][SQL: INSERT INTO BackerEntry (BackerId, BackerEntryTypeId, Name, Description, MaxLength, IsRequired, Priority, BackerEntryId) VALUES (?, ?, ?, ?, ?, ?, ?, ?)] ---\u003e System.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint EDIT: Just a lil more information, I tried the same with a list instead of a bag, and I get the same results.
0
[ 2, 483, 2532, 22, 38, 51, 12109, 15191, 8820, 1910, 1206, 2697, 14, 13, 22, 18908, 4924, 22, 16, 14, 391, 7782, 1326, 60, 800, 3726, 3726, 31, 57, 21, 78, 3095, 29, 21, 1206, 16, 78, 3916, 363, 32, 27, 109, 1354, 28, 40, 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...
I'm using Python regexes in a criminally inefficient manner === My goal here is to create a very simple template language. At the moment, I'm working on replacing a variable with a value, like this: This input: ><%"TITLE"="This Is A Test Variable"%>The Web <%"TITLE"%> Should produce this output: >The Web This Is A Test Variable I've got it working. But looking at my code, I'm running multiple identical regexes on the same strings -- that just offends my sense of efficiency. There's got to be a better, more Pythonic way. (It's the two "while" loops that really offend.) This does pass the unit tests, so if this is silly premature optimization, tell me -- I'm willing to let this go. There may be dozens of these variable definitions and uses in a document, but not hundreds. But I suspect there's obvious (to other people) ways of improving this, and I'm curious what the StackOverflow crowd will come up with. def stripMatchedQuotes(item): MatchedSingleQuotes = re.compile(r"'(.*)'", re.LOCALE) MatchedDoubleQuotes = re.compile(r'"(.*)"', re.LOCALE) item = MatchedSingleQuotes.sub(r'\1', item, 1) item = MatchedDoubleQuotes.sub(r'\1', item, 1) return item def processVariables(item): VariableDefinition = re.compile(r'<%(.*?)=(.*?)%>', re.LOCALE) VariableUse = re.compile(r'<%(.*?)%>', re.LOCALE) Variables={} while VariableDefinition.search(item): VarName, VarDef = VariableDefinition.search(item).groups() VarName = stripMatchedQuotes(VarName).upper().strip() VarDef = stripMatchedQuotes(VarDef.strip()) Variables[VarName] = VarDef item = VariableDefinition.sub('', item, 1) while VariableUse.search(item): VarName = stripMatchedQuotes(VariableUse.search(item).group(1).upper()).strip() item = VariableUse.sub(Variables[VarName], item, 1) return item
0
[ 2, 31, 22, 79, 568, 20059, 7953, 1706, 160, 19, 21, 2977, 102, 19, 23702, 3832, 800, 3726, 3726, 51, 1195, 235, 25, 20, 1600, 21, 253, 1935, 22894, 816, 9, 35, 14, 688, 15, 31, 22, 79, 638, 27, 5496, 21, 7612, 29, 21, 1923, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Sieve of Eratosthenes in Erlang === I'm in the process of learning Erlang. As an exercise I picked up the [Sieve of Eratosthenes][1] algorithm of generating prime numbers. Here is my code: -module(seed2). -export([get/1]). get(N) -> WorkList = lists:duplicate(N, empty), get(2, N, WorkList, []). get(thats_the_end, _N, _WorkList, ResultList) -> lists:reverse(ResultList); get(CurrentPrime, N, WorkList, ResultList) -> ModWorkList = markAsPrime(CurrentPrime, N, WorkList), NextPrime = findNextPrime(CurrentPrime + 1, N, WorkList), get(NextPrime, N, ModWorkList, [CurrentPrime|ResultList]). markAsPrime(CurrentPrime, N, WorkList) when CurrentPrime =< N -> WorkListMod = replace(CurrentPrime, WorkList, prime), markAllMultiples(CurrentPrime, N, 2*CurrentPrime, WorkListMod). markAllMultiples(_ThePrime, N, TheCurentMark, WorkList) when TheCurentMark > N -> WorkList; markAllMultiples(ThePrime, N, TheCurrentMark, WorkList) -> WorkListMod = replace(TheCurrentMark, WorkList, marked), markAllMultiples(ThePrime, N, TheCurrentMark + ThePrime, WorkListMod). findNextPrime(Iterator, N, _WorkList) when Iterator > N -> thats_the_end; findNextPrime(Iterator, N, WorkList) -> I = lists:nth(Iterator, WorkList), if I =:= empty -> Iterator; true -> findNextPrime(Iterator + 1, N, WorkList) end. replace(N, L, New)-> {L1, [_H|L2]} = lists:split(N - 1, L), lists:append(L1, [New|L2]). This code actually works :) . The problem is that I have this feeling that it is not the best possible implementation. My question is what would be the "erlangish" way of implementing the "Sieve of Eratosthenes" [1]: http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
0
[ 2, 13, 4157, 195, 16, 2047, 262, 18, 124, 2696, 19, 13, 106, 9949, 800, 3726, 3726, 31, 22, 79, 19, 14, 953, 16, 2477, 13, 106, 9949, 9, 28, 40, 5935, 31, 2114, 71, 14, 636, 4157, 195, 16, 2047, 262, 18, 124, 2696, 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 I get a floating footer to stick to the bottom of the viewport in IE 6? === I know this would be easy with position:fixed, but unfortanately I'm stuck with supporting IE 6. How can I do this? I would rather use CSS to be clean, but if I have to use Javascript, that's not the end of the world. In my current implementation I have a "floating footer" that floats above the main content area and is positioned with Javascript. The implementation I have right now is not particular elegant even with the Javascript, so my questions are: (1) Is there a way to do this without Javascript? (2) If I have to use Javascript, are there any "nice" solutions to this floating footer problem? By "nice" I mean something that will work across browsers, doesn't overload the browser's resources (since it will have to recalculate often), and is elegant/easy to use (i.e. it would be nice to write something like new FloatingFooter("floatingDiv")). I'm going to guess there is no super easy solution that has everything above, but something I can build off of would be great. Finally, just a more general question. I know this problem is a big pain to solve, so what are other UI alternatives rather than having footer content at the bottom of every page? On my particular site, I use it to show transitions between steps. Are there other ways I could do this?
0
[ 2, 184, 107, 31, 164, 21, 8319, 1749, 106, 20, 5258, 20, 14, 2129, 16, 14, 1418, 1993, 19, 13, 660, 400, 60, 800, 3726, 3726, 31, 143, 48, 83, 44, 2010, 29, 649, 45, 18594, 69, 15, 47, 367, 6469, 210, 1373, 102, 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 can I build an Adobe Air project with Maven? === Has anyone successfully built an Adobe Air application with Maven? If so, what are the steps to get it working? I have been trying to use [flex-mojos][1] to build an Air applications. When I set the packaging type to "aswf", as suggested in the [DashboardSamplePom][2], Maven complains that aswf is an unknown packaging type. I also found their [air-super-pom][3], but could not figure out how to reference it as the parent of my POM. [1]: http://code.google.com/p/flex-mojos/ [2]: http://code.google.com/p/flex-mojos/wiki/DashboardSamplePom [3]: http://svn.sonatype.org/flexmojos/repository/info/flex-mojos/air-super-pom/2.0-alpha4/air-super-pom-2.0-alpha4.pom
0
[ 2, 184, 92, 31, 1895, 40, 20299, 282, 669, 29, 1216, 3124, 60, 800, 3726, 3726, 63, 1276, 3673, 392, 40, 20299, 282, 3010, 29, 1216, 3124, 60, 100, 86, 15, 98, 50, 14, 2382, 20, 164, 32, 638, 60, 31, 57, 74, 749, 20, 275, 63...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I parse a number from a String that may have a leading zero? === In ruby I am parsing a date in the following format: 24092008. I want to convert each section (year, month, date) into a number. I have split them up using a regex and am passing each substring into the Integer constructor. date =~ /^([\d]{2})([\d]{2})([\d]{4})/ year = Integer($3) month = Integer($2) day = Integer($1) When it hits the month line it crashes as follows: `Integer': invalid value for Integer: "09" (ArgumentError) It took me a while to realise that it's interpreting the leading zero as Octal and 09 is not a valid Octal number (it works fine with "07"). Is there an elegant solution to this or should I just test for numbers less than 10 and remove the zero first? Thanks.
0
[ 2, 184, 107, 31, 2017, 870, 21, 234, 37, 21, 3724, 30, 123, 57, 21, 1005, 4606, 60, 800, 3726, 3726, 19, 10811, 31, 589, 2017, 18, 68, 21, 1231, 19, 14, 249, 2595, 45, 937, 2545, 2753, 9, 31, 259, 20, 8406, 206, 1050, 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...
Glassfish: Deploying application in domain failed; Error loading deployment descriptors - invalid bit length repeat === I'm trying to deploy a .war trough the server's web interface. Getting the same error when deploying it as an exploded directory with IDEA. What is the solution to this problem?
0
[ 2, 1350, 4934, 45, 17617, 68, 3010, 19, 4603, 1702, 73, 7019, 12797, 10475, 121, 8741, 248, 18, 13, 8, 16671, 1142, 1476, 6830, 800, 3726, 3726, 31, 22, 79, 749, 20, 17617, 21, 13, 9, 1885, 22032, 14, 8128, 22, 18, 2741, 6573, 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...
Is _VERSION the only global variable left in Lua 5.1? === Puzzled by the Lua 5.0 documentation references to things like \_LOADED, LUA_PATH, \_ALERT and so on (that I could not use in Lua 5.1), I discovered all of those have been removed and the functionality put elsewhere. Am I right in thinking that the only one global variable left in Lua 5.1 is _VERSION?
0
[ 2, 25, 13, 1, 10898, 14, 104, 2062, 7612, 225, 19, 1612, 58, 331, 9, 165, 60, 800, 3726, 3726, 17033, 34, 14, 1612, 58, 331, 9, 387, 13945, 7231, 20, 564, 101, 13, 1, 22546, 15, 1612, 58, 1, 8353, 15, 13, 1, 192, 6767, 17, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Use the serialVersionUID or supress warnings? === first thing to note is the serialVersionUID of a class implementing Interface Serializable is not in question. What if we create a class that for example extends HttpServlet? It also should have a serialVersionUID. If someone knows that this object will never be serialized should he define it or add an annotation to supress those warnings? What would you do and why? Thanks for sharing your thoughts. Okami
0
[ 2, 275, 14, 5956, 10898, 5661, 43, 54, 2538, 5890, 3590, 18, 60, 800, 3726, 3726, 64, 584, 20, 1945, 25, 14, 5956, 10898, 5661, 43, 16, 21, 718, 17333, 6573, 5956, 3186, 579, 25, 52, 19, 1301, 9, 98, 100, 95, 1600, 21, 718, 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...
Development with a tablet, not a mouse === Lifehacker had a post a couple days ago asking people about [the best mouse you've ever had](http://lifehacker.com/5054519/) and it appears some people have traded their mouse for a tablet. I'm curious if anyone here has traded their mouse in for a tablet? Does it work well for development? Looking for pros and cons from people who have tried it or are using it. Thanks.
4
[ 2, 522, 29, 21, 16394, 15, 52, 21, 7567, 800, 3726, 3726, 201, 22983, 106, 41, 21, 678, 21, 1335, 509, 1464, 3379, 148, 88, 636, 124, 246, 7567, 42, 22, 195, 462, 41, 500, 5, 21127, 6903, 4102, 22983, 106, 9, 960, 118, 26373, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SSIS read flat file, write to DB or C# app,mutli thread read/write? === Within SQL Server Integration Services (SSIS) there is the ability to setup a connection to a flat file that can hold millions of records and have that data pushed to a SQL DB. Furthermore, this process can be called from a C# app by referencing and using the Microsoft.SqlServer.Dts.Runtime namespace. Would a flat file with millions of records best be ran with SSIS, or would the collective "you" prefer a c# app with multiple worker threads(one to read and add the row to variable, one to write from that variable to the DB), and a "mother" class that manages those threads? (the dev box has two cpu's) I have seen this data (<a href="http://weblogs.sqlteam.com/mladenp/articles/10631.aspx">sql team blog</a>) stating that for a flat file with a million lines, SSIS is the fastest: 1. SSIS - FastParse ON = 7322 ms 2. SSIS - FastParse OFF = 8387 ms 3. Bulk Insert = 10534 ms 4. OpenRowset = 10687 ms 5. BCP = 14922 ms What are your thoughts?
0
[ 2, 13, 18, 4557, 1302, 1844, 3893, 15, 2757, 20, 13, 9007, 54, 272, 5910, 4865, 15, 7903, 1210, 9322, 1302, 118, 23716, 60, 800, 3726, 3726, 363, 4444, 255, 8128, 8078, 687, 13, 5, 18, 4557, 6, 80, 25, 14, 2165, 20, 18161, 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...
Closures in PHP... what, precisely, are they and when would you need to use them? === So I'm programming along in a nice, up to date, object oriented fashion. I regularly make use of the various aspects of OO programming that PHP implements but I am wondering when might I need to use closures. Any experts out there that can shed some light on when it would be useful to implement closures?
0
[ 2, 7790, 18, 19, 13, 26120, 9, 9, 9, 98, 15, 11628, 15, 50, 59, 17, 76, 83, 42, 376, 20, 275, 105, 60, 800, 3726, 3726, 86, 31, 22, 79, 3143, 303, 19, 21, 2210, 15, 71, 20, 1231, 15, 3095, 13, 6800, 3161, 9, 31, 4217, 23...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
programmatically cycle a router? === I have the need to be able to cycle my linksys router via a program, reason I want to do this is complex, so lets just assume there is no better option. Is there anyway to do this? I think it is because when i isntall a firmware update to the router via the admin console, it cycles the router.
0
[ 2, 625, 6732, 1326, 4150, 21, 858, 139, 60, 800, 3726, 3726, 31, 57, 14, 376, 20, 44, 777, 20, 4150, 51, 6271, 93, 18, 858, 139, 1197, 21, 625, 15, 1215, 31, 259, 20, 107, 48, 25, 1502, 15, 86, 6884, 114, 7158, 80, 25, 90, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 store an Integer and Boolean key value pair in an un-ordered collection? === I need to store a list of key value pairs of (integer, boolean) in .NET When I use a dictionary it re-orders them. Is there a built in collection that will handle this.
0
[ 2, 184, 107, 42, 1718, 40, 13820, 17, 9827, 413, 210, 1246, 1923, 2146, 19, 40, 367, 8, 7861, 69, 1206, 60, 800, 3726, 3726, 31, 376, 20, 1718, 21, 968, 16, 1246, 1923, 7473, 16, 13, 5, 6391, 13699, 15, 9827, 413, 210, 6, 19, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why are user created namespaces not being recognized by Visual Studio 2008? === For some reason when I create a new namespace in Visual Studio 2008 its not being recognized. I'm using asp.net mvc, I don't know if that has anything to do with it. Has anyone come across this before?...and how do you fix it? Also is there a way to force Visual Studio to maybe re-examine new namespaces?
0
[ 2, 483, 50, 4155, 679, 204, 5582, 18, 52, 142, 2124, 34, 3458, 1120, 570, 60, 800, 3726, 3726, 26, 109, 1215, 76, 31, 1600, 21, 78, 204, 5582, 19, 3458, 1120, 570, 82, 52, 142, 2124, 9, 31, 22, 79, 568, 28, 306, 9, 2328, 307...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Any reason to have SQL Server 2005 and 2008 installed on same machine? === I'm setting up a new development server and want to install the latest version of SQL Server 2008 Express. Will our existing sql2005 databases work with 2008 without modification? If so is there any reason to install both versions on the same server?
0
[ 2, 186, 1215, 20, 57, 4444, 255, 8128, 812, 17, 570, 4066, 27, 205, 1940, 60, 800, 3726, 3726, 31, 22, 79, 2697, 71, 21, 78, 522, 8128, 17, 259, 20, 16146, 14, 5736, 615, 16, 4444, 255, 8128, 570, 2999, 9, 129, 318, 3149, 4444...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the best SNMP library to use with .NET? === What are the best SNMP libraries to use with .NET? Specifically for listening for traps or sending set or get requests.
4
[ 2, 98, 25, 14, 246, 8912, 2554, 1248, 20, 275, 29, 13, 9, 2328, 60, 800, 3726, 3726, 98, 50, 14, 246, 8912, 2554, 8649, 20, 275, 29, 13, 9, 2328, 60, 3524, 26, 4948, 26, 5585, 18, 54, 4907, 309, 54, 164, 12279, 9, 3, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
In what namespace should you put interfaces relative to their implementors? === Specifically, when you create an interface/implementor pair, and there is no overriding organizational concern (such as the interface should go in a different assembly ie, as recommended by the s# architecture) do you have a default way of organizing them in your namespace/naming scheme? This is obviously a more opinion based question but I think some people have thought about this more and we can all benefit from their conclusions.
0
[ 2, 19, 98, 204, 5582, 378, 42, 442, 6573, 18, 4543, 20, 66, 8713, 248, 18, 60, 800, 3726, 3726, 3524, 15, 76, 42, 1600, 40, 6573, 118, 8983, 413, 1130, 248, 2146, 15, 17, 80, 25, 90, 84, 5175, 68, 14823, 3630, 13, 5, 4289, 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...
In Django, where is the best place to put short snippets of HTML-formatted data? === This question is related to (but perhaps not quite the same as): http://stackoverflow.com/questions/61451/does-django-have-html-helpers My problem is this: In Django, I am constantly reproducing the basic formatting for low-level database objects. Here's an example: I have two classes, Person and Address. There are multiple Addresses for each Person, setup likeso (in their respective **models.py**) class Person(models.Model): ... class Address(models.Model): contact = models.ForeignKey(Person) Now, whenever I look at a Person, I want to see all their Addresses. **Persons/views.py** has something likeso: def detail(request, person_id): person = get_object_or_404( Person, pk=person_id ) return render_to_response('persons/details.html', { 'title' : unicode(person), 'addresses': person.address_set.all() } ) And, I have a template, **persons/details.html**, with code, for example, like-so: {% extends "base.html" %} {% for address in addresses %} <b>{{ address.name }}</b> {{ address.type }} <br> {{ address.street_1 }}<br> {{ address.street_2 }}<br> {{ address.city }} {{ address.stateprov }} {{ address.postalcode }}<br> {{ address.country }} <hr> {{ endfor }} I am repeating this code quite a bit. Often, there are minor variations, such when it's in a table, and then < br > must be substituted by < /td >< td >. Other times, I don't want a street_2 to display. The < hr > is only necessary where there is more than one address. All to say, there is fundamental logic that I want to express, that I am even more loath to tote around with block-and-copy! What I want is a **persons/details.html** with, for example, the following: {% extends "base.html" %} {% for address in addresses %} {% address.as_html4 %} {% endfor %} And if I want inline table, something likeso (I guess!): {% extends "base.html" %} <table><tr> {% for address in addresses %} <tr><td> {% address.as_html4 </td><td> %} </td></tr> {% endfor %} </table> The question is, then: Where is the best place to put the formatting? The logic? I've thought about the following: 1. Create custom tags with the formatting & logic 2. Create custom tags with the formatting, but defer the logic to something in addresses/views.py 3. Create a custom class, such as addresses/xhtml.py that handles the logic/formatting Help / insight much appreciated!
0
[ 2, 19, 3857, 14541, 15, 113, 25, 14, 246, 209, 20, 442, 502, 13, 29061, 18, 16, 13, 15895, 8, 29850, 1054, 60, 800, 3726, 3726, 48, 1301, 25, 1597, 20, 13, 5, 811, 1774, 52, 1450, 14, 205, 28, 6, 45, 7775, 6903, 25325, 2549, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Any way to un-register a WPF dependecy property? === I'm running into an unusual problem in my unit tests. The class I'm testing creates a dependency property dynamically at runtime and the type of that dependency property can vary depending on the circumstances. While writing my unit tests, I need to create the dependency property with different types and that leads to errors because you can't redefine an existing dependency property. So is there any way to either un-register a dependency property or to change the type of an existing dependency property? Thanks!
0
[ 2, 186, 161, 20, 367, 8, 12463, 9959, 21, 619, 7721, 12547, 62, 2731, 1354, 60, 800, 3726, 3726, 31, 22, 79, 946, 77, 40, 4706, 1448, 19, 51, 1237, 4894, 9, 14, 718, 31, 22, 79, 4431, 9695, 21, 26835, 1354, 7782, 1326, 35, 485...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to read config file entries from an INI file === I can't use the `Get*Profile` functions because I'm using an older version of the windows CE platform SDK which doesn't have those. It doesn't have to be too general. [section] name = some string I just need to open the file, check for the existance of "section", and the the value associated with "name". Standard C++ preferred.
0
[ 2, 184, 20, 1302, 13, 14093, 2816, 3893, 11399, 37, 40, 19, 49, 3893, 800, 3726, 3726, 31, 92, 22, 38, 275, 14, 13, 1, 3060, 2483, 14503, 1, 3719, 185, 31, 22, 79, 568, 40, 1234, 615, 16, 14, 1936, 4000, 2452, 13, 18, 43, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I rename a SharePoint virtual machine === It is hard to rename a virtual machine with SharePoint running it. I have many errors afterwards.
0
[ 2, 184, 107, 31, 302, 7259, 21, 1891, 3132, 6599, 1940, 800, 3726, 3726, 32, 25, 552, 20, 302, 7259, 21, 6599, 1940, 29, 1891, 3132, 946, 32, 9, 31, 57, 151, 11908, 4601, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Googlebot + IFrames ? === How does googlebot treat iframes? Does it follow the src attribute like a link? Is the iframe content analyzed as if it was part of the page where it is included?
2
[ 2, 8144, 6813, 2754, 31, 8361, 18, 13, 60, 800, 3726, 3726, 184, 630, 8144, 6813, 5752, 31, 8361, 18, 60, 630, 32, 1740, 14, 13, 18, 5453, 35, 14755, 101, 21, 3508, 60, 25, 14, 31, 8361, 2331, 19214, 28, 100, 32, 23, 141, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How can I tell what type of computer's are in a Coffee Shop. === This is more a though experiment than anything. I'm wondering what it would take to detect everything I legally can about the laptops in a Hot-Spot. My first thought was to grab every mac address I can and extract the maker from the first 24bit. The question is would the be illegal and what else could I legally scavenge, preferably passively. P.s. This constituent a pattern-recognition problem so it IS programming... I think.
0
[ 2, 184, 92, 31, 494, 98, 1001, 16, 1428, 22, 18, 50, 19, 21, 2364, 2546, 9, 800, 3726, 3726, 48, 25, 91, 21, 362, 5737, 119, 602, 9, 31, 22, 79, 5712, 98, 32, 83, 247, 20, 9092, 796, 31, 10524, 92, 88, 14, 12294, 18, 19, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Struts2 Annotation Validators === While using Struts2, I am using several annotations to do my validations inside the Model class, in the `set()` methods, like: @RequiredStringValidator(message = "Name is required") @StringLengthFieldValidator(message = "Name must be between 5 and 60 characters", minLength = "5", maxLength = "60") public void setName(String name) { this.name = name; } But I would like how to put a validation do avoid Strange characters, like `!`, `?`, `#`, `$` and etc... Thanks in advance
0
[ 2, 18316, 18, 135, 40, 1270, 857, 7394, 9922, 800, 3726, 3726, 133, 568, 18316, 18, 135, 15, 31, 589, 568, 238, 40, 1270, 7504, 20, 107, 51, 27999, 18, 572, 14, 1061, 718, 15, 19, 14, 13, 1, 3554, 5, 6, 1, 3195, 15, 101, 45,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Comprehensive server-side validation === I currently have a fairly robust server-side validation system in place, but I'm looking for some feedback to make sure I've covered all angles. Here is a brief outline of what I'm doing at the moment: - Ensure the input is not empty, or is too long - Escape query strings to prevent SQL injection - Using regular expressions to reject invalid characters (this depends on what's being submitted) - Encoding certain html tags, like &lt;script&gt; Is there anything I'm missing? Code samples or regular expressions welcome.
0
[ 2, 7041, 8128, 8, 1416, 27999, 800, 3726, 3726, 31, 871, 57, 21, 6647, 15313, 8128, 8, 1416, 27999, 329, 19, 209, 15, 47, 31, 22, 79, 699, 26, 109, 13111, 20, 233, 562, 31, 22, 195, 1363, 65, 13280, 9, 235, 25, 21, 2698, 11160...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 language should students start with? === What language should students start with? I started with C++ and think that it is the basis of my current habits and concerns. I tend to keep in mind machine resources when i code. I recently found out that many schools have dropped C++ for Java and VB as an initiation language and I must admit that I am a bit concerned because these languages live in managed environments.
0
[ 2, 98, 816, 378, 573, 799, 29, 60, 800, 3726, 3726, 98, 816, 378, 573, 799, 29, 60, 31, 373, 29, 272, 20512, 17, 277, 30, 32, 25, 14, 2239, 16, 51, 866, 16760, 17, 4823, 9, 31, 5480, 20, 643, 19, 594, 1940, 2566, 76, 31, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why does my Out of the Box SharePoint Navigation look like it is leaking memory === My site has quite a deep navigation structure and quite often it looks like the out of the box navigation is leaking memory structures. The log message looks like > Potentially excessive number of SPRequest objects (14) currently unreleased on thread 5. Ensure that this object or its parent (such as an SPWeb or SPSite) is being properly disposed.
0
[ 2, 483, 630, 51, 70, 16, 14, 1649, 1891, 3132, 8368, 361, 101, 32, 25, 26334, 1912, 800, 3726, 3726, 51, 689, 63, 1450, 21, 855, 8368, 1411, 17, 1450, 478, 32, 1879, 101, 14, 70, 16, 14, 1649, 8368, 25, 26334, 1912, 3815, 9, 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...
C++ versus D === Is the [D language](http://www.digitalmars.com/d/) a credible alternative to Java and C++? What will it take to become a credible alternative? Should I bother learning it? Does it deserve evangelizing? The main reason I ask is that with the new c++ standard (c++0x) almost here, its clear to me that the language has gone well past the point of no return with respect to anyone ever understanding it. I know that c/c++ will never die but at some point we need to move on. Even COBOL had its day and Java has in many respects undone c++. So what's next? Does D fill the bill?
0
[ 2, 272, 20512, 5706, 13, 43, 800, 3726, 3726, 25, 14, 636, 43, 816, 500, 5, 21127, 6903, 6483, 9, 24123, 1615, 18, 9, 960, 118, 43, 118, 6, 21, 26222, 2676, 20, 8247, 17, 272, 20512, 60, 98, 129, 32, 247, 20, 533, 21, 26222, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
python XML-RPC sending a list of parameters to the server === I am trying to send a list( specifically numpy or python's list) of numbers and get the sum of them using xml-rpc, to be familiar with the environment. I get an error always in the client side. <Fault 1: "<type 'exceptions.TypeError'>:unsupported operand type(s) for +: 'int' and 'list'"> Server side code: from SimpleXMLRPCServer import SimpleXMLRPCServer def calculateOutput(*w): return sum(w); server = SimpleXMLRPCServer(("localhost", 8000)) print "Listening on port 8000..." server.register_function(calculateOutput,"calculateOutput"); server.serve_forever() Client side code: import xmlrpclib proxy = xmlrpclib.ServerProxy("http://localhost:8000/") print(proxy.calculateOutput([1,2,100]); Does anyone know how to fix this problem?
0
[ 2, 20059, 23504, 8, 139, 5779, 4907, 21, 968, 16, 12905, 20, 14, 8128, 800, 3726, 3726, 31, 589, 749, 20, 2660, 21, 968, 5, 3524, 13, 6336, 6448, 54, 20059, 22, 18, 968, 6, 16, 2116, 17, 164, 14, 3907, 16, 105, 568, 23504, 8, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to blend colors in CAShapeLayer? === I want to develop an iOS app, which could draw lines and if any of the lines collide blend their colors to each other like in the following link: http://www.youtube.com/watch?v=FBjlE3oTSyQ Any ideas?
1
[ 2, 184, 20, 11138, 5268, 19, 1658, 25096, 15187, 60, 800, 3726, 3726, 31, 259, 20, 2803, 40, 13, 7760, 4865, 15, 56, 110, 2003, 1560, 17, 100, 186, 16, 14, 1560, 26508, 11138, 66, 5268, 20, 206, 89, 101, 19, 14, 249, 3508, 45, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
iphone/ipad Scroller functionality in flex4 === i am prepairing a flex AIR application which is a touch screen application. and i want to just add the iphone/ipad scroller functionality in my application i.e when we swipe down the content the scrollbar is also go down and when we swipe up the content the scrollbar is go up means both will need to move in a same direction. Thanks in advance.
0
[ 2, 21024, 118, 49, 8240, 12159, 106, 18548, 19, 14409, 300, 800, 3726, 3726, 31, 589, 15884, 2642, 68, 21, 14409, 282, 3010, 56, 25, 21, 1723, 2324, 3010, 9, 17, 31, 259, 20, 114, 3547, 14, 21024, 118, 49, 8240, 12159, 106, 18548,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Extracting data from JSON issue === I am trying to get some information about YouTube channel's from the YouTube API. This is an example the output (using Google's channel), http://gdata.youtube.com/feeds/api/users/Google?alt=json I am getting the JSON using this: $json = file_get_contents("http://gdata.youtube.com/feeds/api/users/Google?alt=json"); $data = json_decode($json, true); I uploaded the output of `var_dump($data);` to pastebin: http://pastebin.com/CWA7YYGi What I want to get is `totalUploadViews` from `yt$statistics`. What I have tried so far is: echo $data['yt$statistics']['totalUploadViews']; But this gives me an error: `Notice: Undefined index: yt$statistics` Not sure what I am doing wrong, would appreciate the help.
0
[ 2, 10962, 68, 1054, 37, 487, 528, 1513, 800, 3726, 3726, 31, 589, 749, 20, 164, 109, 676, 88, 7330, 1318, 22, 18, 37, 14, 7330, 21, 2159, 9, 48, 25, 40, 823, 14, 5196, 13, 5, 12655, 8144, 22, 18, 1318, 6, 15, 7775, 6903, 263...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Get the value of a cell in gridview === I ve a gridview with checkbox in my aspx page. The gridview is bound using typed dataset. How do I retrieve the value in the first cell of gridview? Any help is appreciated.
0
[ 2, 164, 14, 1923, 16, 21, 1667, 19, 7354, 4725, 800, 3726, 3726, 31, 13, 195, 21, 7354, 4725, 29, 2631, 5309, 19, 51, 28, 306, 396, 2478, 9, 14, 7354, 4725, 25, 4138, 568, 1001, 43, 1054, 3554, 9, 184, 107, 31, 11917, 14, 1923...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
android, ProgressBar in new Thread, widget === I have a widget and it includes new thread. In xml layout file I have view of a progressbar <ProgressBar android:id="@+id/widgetProgressBar" android:layout_width="30dip" android:layout_height="30dip"/> When new Thread() is finished i want to hide the progressbar but when I call RemoteViews updateViews = new RemoteViews(this.getPackageName(),R.layout.widget_layout); updateViews.setViewVisibility(R.id.widgetProgressBar, View.GONE); I get info on the widget "Problem loading widget". How to dismiss progressbar? When i set setViewVisibility for different layouts' element it works.
0
[ 2, 13005, 15, 3455, 1850, 19, 78, 9322, 15, 4807, 43, 3060, 800, 3726, 3726, 31, 57, 21, 4807, 43, 3060, 17, 32, 1103, 78, 9322, 9, 19, 23504, 9106, 3893, 31, 57, 1418, 16, 21, 3455, 1850, 13, 1, 2740, 13026, 1850, 13005, 45, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SYNTAX ERROR , t_variable === tell me //whats wrong in this ? iam trying to upload directly an image from a distant server to fb servers but there is an error syntax error in line 7 tell me what wrong with it <?php require_once("facebook.php"); $config = array(); $config[‘appId’] = 'xxxxxxxxxxxxx'; $config[‘secret’] = 'xxxxxxxxxxxxxxxxxxx'; $config[‘fileUpload’] = true/ optional $facebook = new Facebook($config); $attachment = array('message' => 'Want an Amazing Cover for your profile then checkout the link below. ', 'name' =>'xxxxx', 'caption' => "xxxxxxx", 'link' => 'http://apps.facebook.com/xxxxxxxxx/', 'description' => 'xxxxxxxxxxxxxx', //blah blah 'picture' => 'http://xxxxxxxxxxxxxx.com/wp-content/uploads/2012/02/under-construction-fb-cover1.jpg'.$Picturetoupload, 'method'=>'stream.publish', 'actions' => array(array('name' => 'xxxxxxxxxxxxx', 'link' => 'http://apps.facebook.com/axxxxxx/'))); $uid=$fbme['id']; // id of the user $result = $facebook->api('/'.$uid.'/feed/','post',$attachment); ?>
0
[ 2, 22649, 7019, 13, 15, 13, 38, 1, 8220, 579, 800, 3726, 3726, 494, 55, 12894, 608, 18, 1389, 19, 48, 13, 60, 31, 765, 749, 20, 71, 8294, 1703, 40, 1961, 37, 21, 5590, 8128, 20, 13, 13478, 17595, 47, 80, 25, 40, 7019, 22649, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 always return null when call the method IQueryable.FirstOrDefault()? === public class CellValue { double? Max; double? Min; string Value; string Annotation; } public T GetOne(Expression<Func<T, bool>> predicate) { IQueryable<T> query = this.context.Set<T>(); return query.FirstOrDefault(predicate); } public class Steel: CellValue{} CellValue cell = new CellValue{Max = 0.8, Min = 0.1, Value="test"}; Steel steel = service.GetOne(t=>t.Max == cell.Max && t.Min == cell.Min && t.Value ==cell.Value && t.Annotation == cell.Annotation); //but the object steel is always null. Jush Why? I checked my database, but i dont know it's always null.Expression Tree and Lamda Expression may be the problem.
0
[ 2, 483, 550, 788, 16203, 76, 645, 14, 2109, 13, 5312, 622, 579, 9, 3552, 248, 13862, 9708, 5, 6, 60, 800, 3726, 3726, 317, 718, 1667, 15165, 13, 1, 1494, 60, 2049, 73, 1494, 60, 4232, 73, 3724, 1923, 73, 3724, 40, 1270, 857, 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 does the UTF-8 support of TinyXML work === I'm using TinyXML (http://www.grinninglizard.com/tinyxml/) to parse/build XML files. Now according to the documentation (http://www.grinninglizard.com/tinyxmldocs/) this library supports multibyte character sets through UTF-8. So far so good I think. But, the only API that the library provides (for getting/setting element names, attribute names and values, ... everything where a string is used) is through std::string or const char*. This has me doubting my own understanding of multibyte character set support. How can a string that only supports 8-bit characters contain a 16 bit character (unless it uses a code page, which would negate the 'supports unicode' claim)? I understand that you could theoretically take a 16-bit code point and split it over 2 chars in a std::string, but that wouldn't transform the std::string to a 'unicode' string, it would make it invalid for most purposes and would maybe accidentally work when written to a file and read in by another program. So, can somebody explain to me how a library can offer an '8-bit interface' (std::string/const char*) and still support 'unicode' strings? (I probably mixed up some unicode-terminology here, sorry about any confusion coming from that).
0
[ 2, 184, 630, 14, 287, 11720, 8, 457, 555, 16, 3228, 396, 8184, 170, 800, 3726, 3726, 31, 22, 79, 568, 3228, 396, 8184, 13, 5, 21127, 6903, 6483, 9, 23244, 2981, 1210, 7351, 43, 9, 960, 118, 2864, 93, 396, 8184, 118, 6, 20, 201...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Tips for speeding up build time on Linux using ANT, Javacc, JUnit and compiling Java classes === We have a large codebase that takes approx 12 minutes on the developer machines to auto-generate some Java classes using JavaCC and then compiles all the classes as well as running the units test. What tips are there for reducing this build time? Thanks
0
[ 2, 11034, 26, 1362, 68, 71, 1895, 85, 27, 13024, 568, 40, 38, 15, 8247, 3384, 15, 7446, 242, 17, 24378, 8247, 2684, 800, 3726, 3726, 95, 57, 21, 370, 1797, 8436, 30, 1384, 13, 19896, 390, 902, 27, 14, 10058, 6035, 20, 3108, 8, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Anyone successfully using Commission Junction API ? === Is anyone successfully using the CJ web services? I just keep getting `java.lang.NullPointerException`s even though my app is .net (clearly their errors). CJ support doesn't even know what a web service is. I googled and found many people getting this or other errors. Question is: is it a temporary problem or am I doomed to parse manually downloaded reports for eternity?
0
[ 2, 1276, 3673, 568, 1312, 3423, 21, 2159, 13, 60, 800, 3726, 3726, 25, 1276, 3673, 568, 14, 23396, 2741, 687, 60, 31, 114, 643, 1017, 13, 1, 1004, 1385, 9, 9949, 9, 4215, 211, 3132, 106, 10066, 872, 1, 18, 166, 362, 51, 4865, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Key concepts to learn in Assembly === I am a firm believer in the idea that one of the most important things you get from learning a new language is not how to use a new language, but the knowledge of concepts that you get from it. I am not asking how important or useful you think Assembly is, nor do I care if I never use it in any of my real projects. What I want to know is what concepts of Assembly do you think are most important for any general programmer to know? It doesn't have to be directly related to Assembly - it can also be something that you feel the typical programmer who spends all their time in higher-level languages would not understand or takes for granted, such as the CPU cache.
0
[ 2, 1246, 8700, 20, 2484, 19, 1475, 800, 3726, 3726, 31, 589, 21, 1904, 985, 139, 19, 14, 882, 30, 53, 16, 14, 127, 681, 564, 42, 164, 37, 2477, 21, 78, 816, 25, 52, 184, 20, 275, 21, 78, 816, 15, 47, 14, 1918, 16, 8700, 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...
How to access UserId in ASP.NET Membership withous using Membership.GetUser() ? === How can I access UserId in ASP.NET Membership without using Membership.GetUser(username) in ASP.NET Web Application Project ? Can UserId be included in Profile namespace next to UserName (System.Web.Profile.ProfileBase). Thanks in advance
0
[ 2, 184, 20, 1381, 275, 5175, 19, 28, 306, 9, 2328, 4363, 29, 1291, 568, 4363, 9, 3060, 16704, 5, 6, 13, 60, 800, 3726, 3726, 184, 92, 31, 1381, 275, 5175, 19, 28, 306, 9, 2328, 4363, 366, 568, 4363, 9, 3060, 16704, 5, 16704, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PDO (MySQL) errors in PHP === This is a bit of a weird one, and I could well be coding this completely wrong - hence why I've hit the same error twice in two days, in completely different parts of a script. The code I'm using is below: <pre><code> public function findAll( $constraints = array() ) { // Select all records $SQL = 'SELECT * FROM ' . $this->tableName; // See if there's any constraints if( count( $constraints ) > 0 ) { $SQL .= ' WHERE '; foreach( $constraints as $field => $value ) { $SQL .= $field . ' = :' . $field . ' AND '; } } // Remove the final AND and prepare the statement $SQL = substr( $SQL, 0, -5 ); $PDOStatement = $this->PDO->prepare( $SQL ); // Loop through constraints and bind parameters foreach( $constraints as $field => $value ) { print 'Binding ' . $field . ' to ' . $value . ' <br />'; $PDOStatement->bindParam( $field, $value ); } $PDOStatement->execute(); var_dump($PDOStatement); while ( $results = $PDOStatement->fetch( PDO::FETCH_ASSOC ) ) { var_dump($results); } } </code></pre> I'm pretty new to using PDO, but basically I'm attempting to pass an array of constraints e.g. <pre><code>array( 'active' => 1, 'name' => 'James' )</code></pre> and return all rows from the table <pre><code>WHERE active = 1 AND name = 'James'</code></pre> If I use this array, the SQL executed from the first <pre><code>var_dump( )</code></pre> is <pre><code>SELECT * FROM {table} WHERE active = :active AND name = 'James'</code></pre> - exactly as I expect. The bound parameters prints 'Binding active to 1' and 'Binding name to James' - exactly as expected. The rows exist in the database, and yet the second <pre><code>var_dump()</code></pre> call for $results outputs nothing - i.e. no rows are returned. If I pass an array of a single constraint, e.g. <pre><code>array( 'active' => 1 )</code></pre>, this works perfectly fine. It appears to be whenever multiple constraints are passed that it stops working.
0
[ 2, 351, 537, 13, 5, 915, 18, 22402, 6, 11908, 19, 13, 26120, 800, 3726, 3726, 48, 25, 21, 1142, 16, 21, 5455, 53, 15, 17, 31, 110, 134, 44, 13, 15458, 48, 1524, 1389, 13, 8, 5796, 483, 31, 22, 195, 770, 14, 205, 7019, 2088, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 correctly write dynamic files to an FTP server? === I'm using C# and i have written a locally installed application that dynamically generates files which need to be on an FTP server. Do i generate them to disk then upload them to the FTP server? or is there a way to open a stream to an FTP server and write the files directly?
0
[ 2, 184, 20, 12044, 2757, 7782, 6488, 20, 40, 1187, 306, 8128, 60, 800, 3726, 3726, 31, 22, 79, 568, 272, 5910, 17, 31, 57, 642, 21, 6680, 4066, 3010, 30, 7782, 1326, 7920, 18, 6488, 56, 376, 20, 44, 27, 40, 1187, 306, 8128, 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...
Top & httpd - demystifying what is actually running === I often use the "top" command to see what is taking up resources. Mostly it comes up with a long list of Apache httpd processes, which is not very useful. Is there any way to see a similar list, but such that I could see which PHP scripts etc. those httpd processes are actually running?
0
[ 2, 371, 279, 7775, 43, 13, 8, 121, 915, 384, 10874, 98, 25, 1121, 946, 800, 3726, 3726, 31, 478, 275, 14, 13, 7, 3880, 7, 1202, 20, 196, 98, 25, 741, 71, 2566, 9, 1555, 32, 1624, 71, 29, 21, 175, 968, 16, 17140, 7775, 43, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is mysql mostly doing? === Is there any way to see an overview of what kind of queries are spent the most time on every day on mysql?
0
[ 2, 98, 25, 51, 18, 22402, 1555, 845, 60, 800, 3726, 3726, 25, 80, 186, 161, 20, 196, 40, 21598, 16, 98, 825, 16, 9386, 2829, 50, 1111, 14, 127, 85, 27, 352, 208, 27, 51, 18, 22402, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Javascript Events: Getting notified of changes in an <input> control value === I have the following problem: I have an HTML textbox (`<input type="text">`) whose contents are modified by a script I cannot touch (it is my page, but i'm using external components). I want to be notified in my script every time the value of that textbox changes, so I can react to it. I've tried this: txtStartDate.observe('change', function() { alert('change' + txtStartDate.value) }); which (predictably) doesn't work. It only gets executed if I myself change the textbox value with the keyboard and then move the focus elsewhere, but it doesn't get executed if the script changes the value. Is there another event I can listen to, that i'm not aware of? <br /><br /> I'm using the Prototype library, and in case it's relevant, the external component modifying the textbox value is Basic Date Picker (www.basicdatepicker.com)
0
[ 2, 8247, 8741, 963, 45, 1017, 22904, 16, 1693, 19, 40, 13, 1, 108, 4881, 1, 569, 1923, 800, 3726, 3726, 31, 57, 14, 249, 1448, 45, 31, 57, 40, 13, 15895, 1854, 5309, 13, 5, 1, 108, 4881, 1001, 3726, 7, 11969, 7, 1, 6, 1196, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 a given path is a directory or a file? (C/C++) === I'm using C and sometimes i have to handle paths like C:\Whatever, C:\Whatever\ or C:\Whatever\Somefile Is there a way to check if a given path is a directory or a given path is a file? :O
0
[ 2, 184, 92, 31, 494, 100, 21, 504, 2013, 25, 21, 16755, 54, 21, 3893, 60, 13, 5, 150, 118, 150, 20512, 6, 800, 3726, 3726, 31, 22, 79, 568, 272, 17, 1030, 31, 57, 20, 3053, 12074, 101, 272, 45, 1, 13515, 15, 272, 45, 1, 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...
Should I not subclass by type of object if there are many types? === I am working with a log of events where there are about 60 different "types" of events. Each event shares about 10 properties, and then there are subcategories of events that share various extra properties. How I work with these events does depend on their type or what categorical interfaces they implement. But it seems to be leading to code bloat. I have a lot of redundancy in the subclass methods because they implement some of the same interfaces. Is it more appropriate to use a single event class with a "type" property and write logic that checks type and maintain some organization of categories of types (e.g. a list of event types that are category a, a second list that are category b, etc)? Or is the subclass design more appropriate in this case? First Approach: public interface Category1 {} public interface Category2 {} public abstract class Event { private base properties...; } public class EventType1 extends Event implements Category1, Category2 { private extra properties ...; } public class EventType2 extends Event implements Category3, Category4 { private extra properties ...; } Second Approach: public enum EventType {TYPE1, TYPE2, TYPE3, ...} public class Event { private union of all possible properties; private EventType type; } My personal opinion is that it seems like a single event object is what is appropriate, because, if I am thinking about it correctly, there is no need for using inheritance to represent the model because it is really only the behavior and my conditions that alter based on the type. I need to have code that does stuff like: if(event instanceof Category1) { ... } This works well in the first approach in that instead of instanceof I can just call the method on the event and implement "the same code" in each of the appropriate subclasses. But the second approach is so much more concise. Then I write stuff like: if(CATEGORY1_TYPES.contains(event.getEventType()) { ... } And all my "processing logic" can be organized into a single class and none of it is redundantly spread out among the subclasses. So is this a case where although OO appears more appropriate, it would be better not too?
0
[ 2, 378, 31, 52, 972, 1898, 34, 1001, 16, 3095, 100, 80, 50, 151, 2551, 60, 800, 3726, 3726, 31, 589, 638, 29, 21, 6738, 16, 963, 113, 80, 50, 88, 2083, 421, 13, 7, 4474, 18, 7, 16, 963, 9, 206, 807, 5945, 88, 332, 3704, 15...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What can you do to a legacy codebase that will have the greatest impact? === As you work in a legacy codebase what will have the greatest impact over time that will improve the codebase? - Remove unused code - Remove duplicated code - Add unit tests to improve test coverage where coverage is low - Create consistent formatting across files - Update 3rd party software - Reduce warnings generated by static analysis tools The codebase has been written by many developers with varying levels of expertise.
0
[ 2, 98, 92, 42, 107, 20, 21, 7780, 1797, 8436, 30, 129, 57, 14, 3023, 2261, 60, 800, 3726, 3726, 28, 42, 170, 19, 21, 7780, 1797, 8436, 98, 129, 57, 14, 3023, 2261, 84, 85, 30, 129, 3545, 14, 1797, 8436, 60, 13, 8, 4681, 1892...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
NHibernate + JSON/Ajax Parent/Child Relationships? Why no workie? === I have a typical parent/child relationship. Writing news in .NET and adding children works fine, NHibernate plays nice and adds the correct relationships. However, when passing a JSON object from the client to some method that serializes my JSON into the .NET representation, NHibernate seems to get confused. It comes up with the correct query to add the parent (and assigns a new guid for Id), however, it doesn't associate that parent id to the children objects in the sql it tries to execute. I came up with a quick and dirty hack, which I list below - But I was wondering, is there something I'm missing here? IList<BackerEntry> backersTemp = new List<BackerEntry>(); foreach (BackerEntry backerEntry in jsonBackerEntity.BackerEntries) { backersTemp.Add(backerEntry); } jsonBackerEntity.BackerEntries.Clear(); foreach (BackerEntry backerEntry in backersTemp) { jsonBackerEntity.AddChild(backerEntry); } Doing it that way is the only way I can seem to get NHibernate to see that these children really belong to this parent. Inside my AddChild method looks like this: public virtual void AddChild(BackerEntry backerEntry) { if (backerEntry.Backer != null) { backerEntry.Backer.BackerEntries.Remove(backerEntry); } backerEntry.Backer = this; this.BackerEntries.Add(backerEntry); } EDIT: I think I may have just realized why - Probably because I am not sending back the Parent property of the child in the JSON. I'm not even sure if that'd be possible, due to the circular nature of the two. Child has a parent (who in json has a child who is the original child who has a parent, etc)... Any ideas?
0
[ 2, 12109, 15191, 8820, 2754, 487, 528, 118, 6881, 7522, 4766, 118, 11287, 5833, 60, 483, 90, 170, 660, 60, 800, 3726, 3726, 31, 57, 21, 3874, 4766, 118, 11287, 1429, 9, 1174, 996, 19, 13, 9, 2328, 17, 4721, 391, 693, 1123, 15, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...