unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
What is the difference between a method and a function === I am a long-time Applescript user and new shell scripter who wants to learn a more general scripting language like Javascript or Python for performance reasons. I am having trouble getting my head around concepts like object orientation, classes and instantiation. If someone could point me to a **pithy** explanation of **methods vs. functions** it might help me get over the "hump". The explanations I found using google are just *barely* over my head. Thanks.
0
[ 2, 98, 25, 14, 2841, 128, 21, 2109, 17, 21, 1990, 800, 3726, 3726, 31, 589, 21, 175, 8, 891, 4037, 8741, 4155, 17, 78, 3593, 3884, 106, 72, 2846, 20, 2484, 21, 91, 297, 3884, 68, 816, 101, 8247, 8741, 54, 20059, 26, 956, 2932,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 specify the exit code of a console application in .net? === I have a trivial console app in .net. It's just a test part of a larger application. I'd like to specify the "exit code" of my console app. How do I do this? Thanks!
0
[ 2, 184, 107, 31, 19077, 14, 4350, 1797, 16, 21, 8650, 3010, 19, 13, 9, 2328, 60, 800, 3726, 3726, 31, 57, 21, 13, 19712, 8650, 4865, 19, 13, 9, 2328, 9, 32, 22, 18, 114, 21, 1289, 141, 16, 21, 1662, 3010, 9, 31, 22, 43, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it reasonable to assume my visitors have javascript enabled? === I understand that server-side validation is an absolute must to prevent malicious users (or simply users who choose to disable javascript) from bypassing client-side validation. But that's mainly to protect your application, not to provide value for those who are running browsers with javascript disabled. Is it reasonable to assume visitors have javascript enabled and simply have an unusable site for those who don't?
0
[ 2, 25, 32, 9954, 20, 7158, 51, 4531, 57, 8247, 8741, 9338, 60, 800, 3726, 3726, 31, 1369, 30, 8128, 8, 1416, 27999, 25, 40, 7070, 491, 20, 2501, 24231, 3878, 13, 5, 248, 1659, 3878, 72, 3538, 20, 1460, 579, 8247, 8741, 6, 37, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Circle coordinates to array in Javascript === What's the best way to add the coordinates of a circle to an array in JavaScript? So far I've only been able to do a half circle, but I need a formula that returns the whole circle to two different arrays: xValues and yValues. (I'm trying to get the coordinates so I can animate an object along a path.) Here's what I have so far: circle: function(radius, steps, centerX, centerY){ var xValues = [centerX]; var yValues = [centerY]; for (var i = 1; i < steps; i++) { xValues[i] = (centerX + radius * Math.cos(Math.PI * i / steps-Math.PI/2)); yValues[i] = (centerY + radius * Math.sin(Math.PI * i / steps-Math.PI/2)); } }
0
[ 2, 2775, 13714, 20, 7718, 19, 8247, 8741, 800, 3726, 3726, 98, 22, 18, 14, 246, 161, 20, 3547, 14, 13714, 16, 21, 2775, 20, 40, 7718, 19, 8247, 8741, 60, 86, 463, 31, 22, 195, 104, 74, 777, 20, 107, 21, 519, 2775, 15, 47, 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...
Database schema to track random settings in website for marketing === I have Flex based consumer [website][1] where I would like to change various look and feel type settings based on random and other criteria, and then track these through to what results in the most sales. For instance I might completely switch out the homepage, show different things depending upon where people come from. I might show or hide certain features, or change certain text. The things i might change are as yet undefined and will likely become quite complicated. I want to design the most flexible database schema but it must be efficient and easy to search. Currently I have a 'SiteVisit' table which contains information about each distinct visitor. I want to find the right balance between a single table with columns for each setting, and a table containing just key value pairs. Any suggestions? [1]: http://www.rollingrazor.com
0
[ 2, 6018, 23874, 20, 792, 5477, 12410, 19, 2271, 26, 4743, 800, 3726, 3726, 31, 57, 14409, 432, 6461, 636, 14113, 9097, 500, 2558, 165, 500, 113, 31, 83, 101, 20, 753, 617, 361, 17, 583, 1001, 12410, 432, 27, 5477, 17, 89, 9157, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Invert 4x4 matrix - Numerical most stable solution needed. === I want to invert a 4x4 matrix. My numbers are stored in fixed-point format (1.15.16 to be exact). With floating-point arithmetic I usually just build the adjoint matrix and divide by the determinant (e.g. brute force the solution). That worked for me so far, but when dealing with fixed point numbers I get an unacceptable precision loss due to all of the multiplications used. Note: In fixed point arithmetic I always throw away some of the least significant bits of immediate results. So - What's the most numerical stable way to invert a matrix? I don't mind much about the performance, but simply going to floating-point would be to slow on my target architecture.
0
[ 2, 19, 8122, 268, 396, 300, 8187, 13, 8, 16010, 127, 4521, 4295, 851, 9, 800, 3726, 3726, 31, 259, 20, 19, 8122, 21, 268, 396, 300, 8187, 9, 51, 2116, 50, 8214, 19, 3535, 8, 3132, 2595, 13, 5, 165, 9, 1193, 9, 1091, 20, 44, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Starting Graphics & Games Programming (Java and maybe C++) === I've always had an interest in creating my own games, and now at university I have the opportunity to create some 2D and 3D games using Java and C++ for those who are that way inclined. I've never really programmed a game before, let alone graphics, so I'm completely new to the area. After a quick trip to the library today I came across very little information on starting 2D game development or even graphics programming in Java or C++. I can program in Java at a reasonable level, but I have never touched C++. 1. Can someone recommend any good books on starting Graphics Programming in Java or C++? 2. I have no C++ experience, but I've programmed in C and Java and feel reasonably comfortable in both. Should I take the jump and dive into C++ when important marks are at stake? I hear a lot of good things about C++ as far as Games Programming goes so I'm unsure as to what is the best option for me. 3. I'm looking to write a 2D game in my own time for a bit of fun before I start getting into the heavy work at university. Can anyone recommend some good resources for those interested in writing their own games using OpenGL and Java/C++. I apologise if my questions seem a bit vague, as I'm a complete newbie when it comes to a lot of these topics. Any help you could provide would be much appreciated.
0
[ 2, 1422, 8351, 279, 466, 3143, 13, 5, 1004, 1385, 17, 913, 272, 20512, 6, 800, 3726, 3726, 31, 22, 195, 550, 41, 40, 1163, 19, 2936, 51, 258, 466, 15, 17, 130, 35, 155, 31, 57, 14, 2893, 20, 1600, 109, 172, 43, 17, 203, 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...
Displaying whitespace in HTML when pulling from MySQL TEXT column === I have saved input from a textarea element to a TEXT column in MySQL. I'm using PHP to pull that data out of the database and want to display it in a p element while still showing the whitespace that the user entered (e.g. multiple spaces and newlines). I've tried a pre tag but it doesn't obey the width set in the containing div element. Other than creating a PHP function to convert spaces to &nbsp and new lines to br tags, what are my options? I'd prefer a clean HTML/CSS solution, but any input is welcome! Thanks!
0
[ 2, 17418, 359, 5582, 19, 13, 15895, 76, 3303, 37, 51, 18, 22402, 1854, 4698, 800, 3726, 3726, 31, 57, 4377, 6367, 37, 21, 1854, 17760, 4520, 20, 21, 1854, 4698, 19, 51, 18, 22402, 9, 31, 22, 79, 568, 13, 26120, 20, 2201, 30, 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...
I need a LINQ expression to find an XElement where the element name and attributes match an input node. === I need to replace the contents of a node in an XElement hierarchy when the element name and all the attribute names and values match an input element. (If there is no match, the new element can be added.) For example, if my data looks like this: <root> <thing1 a1="a" a2="b">one</thing1> <thing2 a1="a" a2="a">two</thing2> <thing2 a1="a" a3="b">three</thing2> <thing2 a1="a">four</thing2> <thing2 a1="a" a2="b">five</thing2> <root> I want to find the last element when I call a method with this input: <thing2 a1="a" a2="b">new value</thing2>
0
[ 2, 31, 376, 21, 6294, 1251, 1803, 20, 477, 40, 993, 27567, 113, 14, 4520, 204, 17, 13422, 730, 40, 6367, 15421, 9, 800, 3726, 3726, 31, 376, 20, 3934, 14, 8478, 16, 21, 15421, 19, 40, 993, 27567, 14417, 76, 14, 4520, 204, 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...
ChangeServiceConfig problem setting logon credentials === I've got this weird problem - I'm calling `ChangeServiceConfig` on a newly installed service (I `CreateService` it myself) to supply the logon credentials, but while the function succeeds (returns TRUE), if I try to start the service, it fails with a 1069 (logon failed). If I go into the service manager and modify credentials by hand (I can see the user name is correct, but of course can't see the password), then it's all ok and it starts ok. The call itself is trivial: `ChangeServiceConfig(hService, SERVICE_NO_CHANGE, SERVICE_NO_CHANGE, SERVICE_NO_CHANGE, NULL, NULL, NULL, NULL, strUser, strPassword, NULL);` Any ideas on where I should be looking and what could be wrong? Thanks in advance.
0
[ 2, 753, 11449, 14093, 2816, 1448, 2697, 6449, 103, 5059, 43, 10107, 18, 800, 3726, 3726, 31, 22, 195, 330, 48, 5455, 1448, 13, 8, 31, 22, 79, 2555, 13, 1, 16229, 11449, 14093, 2816, 1, 27, 21, 2771, 4066, 365, 13, 5, 49, 13, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What are good tools/frameworks for i18n of a php codebase? === I have been looking at a few options for enabling localization and internationalization of a dynamic php application. There appears to be a variety of tools available such as gettext and Yahoo's R3 and I am interested in hearing from both developers and translators about which tools are good to use and what functionality is important in easing the task of implementation and translation.
0
[ 2, 98, 50, 254, 4672, 118, 8361, 7684, 26, 31, 1087, 103, 16, 21, 13, 26120, 1797, 8436, 60, 800, 3726, 3726, 31, 57, 74, 699, 35, 21, 310, 6368, 26, 13168, 375, 1829, 17, 294, 1829, 16, 21, 7782, 13, 26120, 3010, 9, 80, 1780,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 visually "break out" of a Container in Flex? === Here's my problem - I have some code like this: <mx:Canvas width="300" height="300"> <mx:Button x="800" /> </mx:Canvas> So the problem is that the Button inside the canvas has an x property way in excess of the Canvas's width - since it's a child of the Canvas, the Canvas masks it and creates some scrollbars for me to scroll over to the button. What I'd like is to display the button - 800 pixels to the left of the Canvas without the scrollbars while still leaving the button as a child of the Canvas. How do I do that?
0
[ 2, 184, 107, 31, 20747, 13, 7, 12008, 70, 7, 16, 21, 12147, 19, 14409, 60, 800, 3726, 3726, 235, 22, 18, 51, 1448, 13, 8, 31, 57, 109, 1797, 101, 48, 45, 13, 1, 79, 396, 45, 1245, 8471, 9456, 3726, 7, 6571, 7, 2947, 3726, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best practices for internationalizing web applications? === Internationalizing web apps always seems to be a chore. No matter how much you plan ahead for pluggable languages, there's always issues with encoding, funky phrasing that doesn't fit your templates, and other problems. I think it would be useful to get the SO community's input for a set of things that programmers should look out for when deciding to internationalize their web apps.
0
[ 2, 246, 5242, 26, 294, 3335, 2741, 3767, 60, 800, 3726, 3726, 294, 3335, 2741, 4865, 18, 550, 2206, 20, 44, 21, 4430, 99, 9, 90, 1161, 184, 212, 42, 944, 2173, 26, 10922, 263, 579, 2556, 15, 80, 22, 18, 550, 1549, 29, 19608, 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...
Fast way to search for particular string (or byte array) in another process memory in C#? === Please post a working source code example (or link) of how to search string in another process memory and getting offset of match if found. The similar way its done in game cheating utils which search for values in game memory using ReadProcessMemory.
0
[ 2, 1512, 161, 20, 2122, 26, 1498, 3724, 13, 5, 248, 34, 591, 7718, 6, 19, 226, 953, 1912, 19, 272, 5910, 60, 800, 3726, 3726, 2247, 678, 21, 638, 1267, 1797, 823, 13, 5, 248, 3508, 6, 16, 184, 20, 2122, 3724, 19, 226, 953, 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...
qt/wxwidgets third party components? === I'm used to working in a Delphi and C# environment which seem to have a rich set of third party components available. I'm currently wanting to do cross-platform programming in C++ using either qt or wxwidgets. Is there a large market for third party components? I was looking at sourceforge and that doesn't seem to show much that is useful (how the hell do you find out what components or features are in a project without downloading the source?). I'm thinking carousel/coverflow components, rich datagrids (like the sort DevExpress provide). Or is this, write your own territory?
0
[ 2, 2593, 38, 118, 499, 396, 3976, 43, 3060, 18, 422, 346, 5090, 60, 800, 3726, 3726, 31, 22, 79, 147, 20, 638, 19, 21, 23030, 17, 272, 5910, 2307, 56, 2260, 20, 57, 21, 2042, 309, 16, 422, 346, 5090, 904, 9, 31, 22, 79, 871,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a difference between (local), '.' and localhost? === I've used all three of these when making local programmatic connections to databases. Is there any real differences between them?
0
[ 2, 25, 80, 21, 2841, 128, 13, 5, 15580, 6, 15, 13, 22, 9, 22, 17, 375, 11694, 60, 800, 3726, 3726, 31, 22, 195, 147, 65, 132, 16, 158, 76, 544, 375, 625, 6732, 6760, 20, 6018, 18, 9, 25, 80, 186, 683, 4921, 128, 105, 60, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Detecting Unsaved Changes using JavaScript === I have a requirement to implement an "Unsaved Changes" prompt in an ASP .Net application. If a user modifies controls on a web form, and attempts to navigate away before saving, a prompt should appear warning them that they have unsaved changes, and give them the option to cancel and stay on the current page. The prompt should not display if the hasn't touched any of the controls. Ideally I'd like to implement this in JavaScript, but before I go down the path of rolling my own code, are there any existing frameworks or recommended design patterns for achieving this? Ideally I'd like something that can easily be reused across multiple pages with minimal changes.
0
[ 2, 9092, 68, 367, 19863, 43, 1693, 568, 8247, 8741, 800, 3726, 3726, 31, 57, 21, 8981, 20, 8713, 40, 13, 7, 1020, 19863, 43, 1693, 7, 11443, 4417, 19, 40, 28, 306, 13, 9, 2328, 3010, 9, 100, 21, 4155, 7226, 12970, 8671, 27, 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...
Remote print module in Java === I am working on an application that will sport a web-based point of sale interface. The point of sale PC (I am not sure as of now whether it will run on Linux or Windows) must have a fiscal printer attached to it, but like any web app, it is the server which processes all stuff. I must send the sale data in real time, and via the fiscal printer which uses the serial port, so printing a PDF or even a web page is not an option. I've been told I could have a little app listening on web services on the client, which in turn talks to the printer instead of the server or the browser, but don't have a clue how to do it. Any ideas?
0
[ 2, 5388, 4793, 12613, 19, 8247, 800, 3726, 3726, 31, 589, 638, 27, 40, 3010, 30, 129, 2440, 21, 2741, 8, 1281, 454, 16, 3299, 6573, 9, 14, 454, 16, 3299, 5168, 13, 5, 49, 589, 52, 562, 28, 16, 130, 1472, 32, 129, 485, 27, 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...
Provider model in .net === When the .net 2.0 framework first came out, the provider model was all the rage. 2.0 even shipped with a bunch of default providers (Membership, sitemap, role). Since the release of 2.0, the hype has died down, and whilst I still use providers day to day, it seems to get far less press. I was wondering if this is because people are using something other than providers and they've been supersceded, or is it simply because the take up wasn't as big as other IoC methods?
0
[ 2, 11747, 1061, 19, 13, 9, 2328, 800, 3726, 3726, 76, 14, 13, 9, 2328, 172, 9, 387, 6596, 64, 281, 70, 15, 14, 11747, 1061, 23, 65, 14, 6283, 9, 172, 9, 387, 166, 12991, 29, 21, 7653, 16, 12838, 13488, 13, 5, 6990, 2418, 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...
Checking for and not printing javascript in generated data? === In my php web app, suppose I want to go the extra mile and in addition to going gangbusters and being anal-retentive about sanitizing my inputs, I also want to ensure that no javascript is being output in strings I am inserting into templated html. Is there a standard way to make sure I don't put javascript in the generated html content?
0
[ 2, 9886, 26, 17, 52, 7312, 8247, 8741, 19, 6756, 1054, 60, 800, 3726, 3726, 19, 51, 13, 26120, 2741, 4865, 15, 5787, 31, 259, 20, 162, 14, 2230, 2037, 17, 19, 848, 20, 228, 3285, 3822, 6052, 17, 142, 40, 192, 8, 99, 1316, 6142...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best C++ Resource === Java has it's own (self-documented) <a href="http://www.javadoconline.com/">Javadoc</a>, PHP has <a href="http://www.php.net">PHP.net</a>, all the MS documenation can be found at the <a href="http://msdn.microsoft.com/en-us/library/aa139615.aspx">MS Developers Network</a>, but whenever it comes to throwing together some C++ my first stop is always Google. To all the C++ developers out there, what's your one-stop-shop?
0
[ 2, 246, 272, 20512, 6577, 800, 3726, 3726, 8247, 63, 32, 22, 18, 258, 13, 5, 8411, 8, 28132, 69, 6, 13, 1, 58, 746, 14057, 3726, 7, 21127, 6903, 6483, 9, 1004, 1385, 537, 1126, 1143, 9, 960, 118, 7, 1, 1004, 1385, 13799, 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...
Safehandle in C# === What is SafeHandle? how does it differ from IntPtr? When should I use one? What are its advantages?
0
[ 2, 1834, 3203, 413, 19, 272, 5910, 800, 3726, 3726, 98, 25, 1834, 3203, 413, 60, 184, 630, 32, 11394, 37, 19, 13726, 6384, 60, 76, 378, 31, 275, 53, 60, 98, 50, 82, 14683, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Advice on C# Expression Trees === I'm working on a method that accepts an expression tree as a parameter, along with a type (or instance) of a class. The basic idea is that this method will add certain things to a collection that will be used for validation. public interface ITestInterface { //Specify stuff here. } private static void DoSomething<T>(Expression<Func<T, object>> expression, params IMyInterface[] rule) { // Stuff is done here. } The method is called as follows: class TestClass { public int MyProperty { get; set; } } class OtherTestClass : ITestInterface { // Blah Blah Blah. } static void Main(string[] args) { DoSomething<TestClass>(t => t.MyProperty, new OtherTestClass()); } I'm doing it this way because I'd like for the property names that are passed in to be strong typed. A couple of things I'm struggling with.. 1. Within DoSomething<T>, I'd like to get a `PropertyInfo` type of T and add it to a collection along with rule (rule is actually `params IMyInterface[]`) Currently, I'm thinking about using expression.Body and removing [propertyname] from "Convert.([propertyname])" and using reflection to get what I need. This seems cumbersome and wrong. Is there a better way? 2. Is this a specific pattern I'm using? 3. Lastly, any suggestions or clarifications as to my misunderstanding of what I'm doing are appreciated and / or resources or good info on C# expression trees are appreciated as well. Thanks! Ian
0
[ 2, 4978, 27, 272, 5910, 1803, 1913, 800, 3726, 3726, 31, 22, 79, 638, 27, 21, 2109, 30, 16548, 40, 1803, 1541, 28, 21, 18906, 15, 303, 29, 21, 1001, 13, 5, 248, 4851, 6, 16, 21, 718, 9, 14, 2125, 882, 25, 30, 48, 2109, 129, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rhino Mocks: How to mock ADO.NET's DataRow? === ADO.NET has the notorious DataRow class which you cannot instantiate using new. This is a problem now that I find a need to mock it using Rhino Mocks. Does anyone have any ideas how I could get around this problem?
0
[ 2, 18642, 10506, 18, 45, 184, 20, 10506, 21, 537, 9, 2328, 22, 18, 1054, 5417, 60, 800, 3726, 3726, 21, 537, 9, 2328, 63, 14, 11904, 1054, 5417, 718, 56, 42, 1967, 6322, 15882, 568, 78, 9, 48, 25, 21, 1448, 130, 30, 31, 477, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I configure visual studio to use the code view as the default view for Webservices? === When you double click on a class (in 'solution explorer')... if that class happens to be a webservice... then you get this... > To add components to your class, drag > them from the <u>Toolbox</u> and use > the Properties window to set their > properties. To create methods and > events for your class, <u>click here > to switch to code view</u>. ...it's a 'visual design surface' for webservices. (Who actually uses that surface to write webservices?) So what I want to know, how do I configure visual studio to never show me that design view? Or at least, to show me the code view by default?
0
[ 2, 184, 107, 31, 1065, 15951, 3458, 1120, 20, 275, 14, 1797, 1418, 28, 14, 12838, 1418, 26, 2741, 11449, 18, 60, 800, 3726, 3726, 76, 42, 1494, 10840, 27, 21, 718, 13, 5, 108, 13, 22, 18, 18687, 3309, 8520, 22, 6, 9, 9, 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...
Programmatically focusing a hippo.CanvasEntry? === Consider this Python program which uses PyGtk and Hippo Canvas to display a clickable text label. Clicking the text label replaces it with a Hippo CanvasEntry widget which contains the text of the label. import pygtk pygtk.require('2.0') import gtk, hippo def textClicked(text, event, row): input = hippo.CanvasEntry() input.set_property('text', text.get_property('text')) parent = text.get_parent() parent.insert_after(input, text) parent.remove(text) def main(): canvas = hippo.Canvas() root = hippo.CanvasBox() canvas.set_root(root) text = hippo.CanvasText(text=u'Some text') text.connect('button-press-event', textClicked, text) root.append(text) window = gtk.Window() window.connect('destroy', lambda ignored: gtk.main_quit()) window.add(canvas) canvas.show() window.show() gtk.main() if __name__ == '__main__': main() How can the CanvasEntry created when the text label is clicked be automatically focused at creation time?
0
[ 2, 625, 6732, 1326, 7796, 21, 16710, 9, 1245, 8471, 18195, 60, 800, 3726, 3726, 3563, 48, 20059, 625, 56, 2027, 13, 28860, 38, 197, 17, 16710, 9696, 20, 3042, 21, 10840, 579, 1854, 1899, 9, 25590, 14, 1854, 1899, 3934, 18, 32, 29,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Getting an error when filling a datatable from a data adapter === I am getting this error but only very occasionally. 99.9% of the time it works fine: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. Does anyone have any idea on what the cause could be? I only use that datatable for viewing and not updating so is it possible to easily turn off all constraints somehow?
0
[ 2, 1017, 40, 7019, 76, 7702, 21, 1054, 5924, 37, 21, 1054, 9924, 106, 800, 3726, 3726, 31, 589, 1017, 48, 7019, 47, 104, 253, 4533, 9, 7787, 9, 2621, 16, 14, 85, 32, 693, 1123, 45, 1702, 20, 9240, 16747, 9, 53, 54, 91, 11295, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 reference MS office interops in c# === I am trying to access Outlook 2007 from C#. I have installed the PIA msi after following the directions found on msdn. After a successful install nothing shows up in Visual Studio's references under the .net tab.
0
[ 2, 184, 107, 42, 2801, 4235, 488, 1480, 11314, 19, 272, 5910, 800, 3726, 3726, 31, 589, 749, 20, 1381, 19837, 624, 37, 272, 5910, 9, 31, 57, 4066, 14, 13009, 4235, 49, 75, 249, 14, 7876, 216, 27, 4235, 43, 103, 9, 75, 21, 1300...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Design time serialization in C# === I have created a non-visual component in C# which is designed as a placeholder for meta-data on a form.<br> The component has a property which is a collection of custom objects, this object is marked as Serializable and implements the GetObjectData for serilizing and public constuctor for deserilizing.<br> In the resx file for the form it will generate binary data for storing the collection, however any time I make a change to the serialized class I get designer errors and need to delete the data manually out of the resx file and then recreate this data. I have tried changing the constuctor to have a try / catch block around each property in the class try { _Name = info.GetString("Name"); } catch (SerializationException) { this._Name = string.Empty; } but it still crashes. The last error I got was that I had to implement IConvertible.<br> I would prefer to use xml serialization because I can at least see it, is this possible for use by the designer?<br> Is there a way to make the serialization more stable and less resistant to changes?
0
[ 2, 704, 85, 5956, 1829, 19, 272, 5910, 800, 3726, 3726, 31, 57, 679, 21, 538, 8, 20893, 5912, 19, 272, 5910, 56, 25, 1006, 28, 21, 209, 12427, 26, 7618, 8, 18768, 27, 21, 505, 9, 1, 5145, 1, 14, 5912, 63, 21, 1354, 56, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ASP.NET MVC - Problem passing parameters to the controller === I have a controller with an action method as follows: public class InventoryController : Controller { public ActionResult ViewStockNext(int firstItem) { // Do some stuff } } And when I run it I get an error stating: > The parameters dictionary does not contain a valid value of type 'System.Int32' for parameter 'firstItem'. To make a parameter optional its type should either be a reference type or a Nullable type. I had it working at one point and I decided to try the function without parameters. Finding out that the controller was not persistant I put the parameter back in, now it refuses to recognise the parameter when I call the method. I'm using this url syntax to call the action: > http://localhost:2316/Inventory/ViewStockNext/11 Any ideas why I would get this error and what I need to do to fix it? I've tried adding another method that takes an integer to the class it it also fails with the same reason. I've tried adding one that takes a string, and the string is set to null. I've tried adding one without parameters and that works fine, but of course it won't suit my needs. Any help would be appreciated. Thanks Daniel
0
[ 2, 28, 306, 9, 2328, 307, 8990, 13, 8, 1448, 2848, 12905, 20, 14, 9919, 800, 3726, 3726, 31, 57, 21, 9919, 29, 40, 1028, 2109, 28, 2415, 45, 317, 718, 13875, 12898, 1252, 13, 45, 9919, 13, 1, 317, 1028, 29955, 1418, 7576, 20021,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Anyone have issues going from ColdFusion's serializeJSON method to PHP's json_decode? === The Interwebs are no help on this one. We're encoding data in ColdFusion using `serializeJSON` and trying to decode it in PHP using `json_decode`. Most of the time, this is working fine, but in some cases, `json_decode` returns `NULL`. We've looked for the obvious culprits, but `serializeJSON` seems to be formatting things as expected. What else could be the problem?
0
[ 2, 1276, 57, 1549, 228, 37, 1191, 9818, 22, 18, 5956, 2952, 728, 528, 2109, 20, 13, 26120, 22, 18, 487, 528, 1, 546, 9375, 60, 800, 3726, 3726, 14, 1480, 14113, 18, 50, 90, 448, 27, 48, 53, 9, 95, 22, 99, 19608, 1054, 19, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I declare an impicitly typed variable in VB inline in an ASP.Net page? === I want to do the following but in VB: <%=var t = ViewData.Model%>
0
[ 2, 184, 107, 31, 10123, 40, 5420, 596, 242, 102, 1001, 43, 7612, 19, 13, 20468, 19, 1143, 19, 40, 28, 306, 9, 2328, 2478, 60, 800, 3726, 3726, 31, 259, 20, 107, 14, 249, 47, 19, 13, 20468, 45, 13, 1, 11881, 3726, 3311, 13, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
MyClass in VB.Net === What is a realistic use for VB.Net's MyClass keyword?
0
[ 2, 51, 1898, 19, 13, 20468, 9, 2328, 800, 3726, 3726, 98, 25, 21, 12786, 275, 26, 13, 20468, 9, 2328, 22, 18, 51, 1898, 1246, 9587, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How do you rename a Verity collection in ColdFusion? === Can't seem to rename an existing Verity collection in ColdFusion without deleting, recreating, and rebuilding the collection. Problem is, I have some very large collections I'd rather not have to delete and rebuild from scratch. Any one have a handy trick for this conundrum?
0
[ 2, 184, 107, 42, 302, 7259, 21, 24995, 1206, 19, 1191, 9818, 60, 800, 3726, 3726, 92, 22, 38, 2260, 20, 302, 7259, 40, 3149, 24995, 1206, 19, 1191, 9818, 366, 121, 1336, 68, 15, 6042, 99, 1880, 15, 17, 16633, 14, 1206, 9, 1448, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Unicode URL decoding === The usual method of URL-encoding a unicode character is to split it into 2 %HH codes. (**\u4161** => **%41%61**) But, how is unicode distinguished when decoding? How do you know that **%41%61** is **\u4161** vs. **\x41\x61** ("Aa")? Are 8-bit characters, that require encoding, preceded by **%00**? Or, is the point that unicode characters are supposed to be lost/split?
0
[ 2, 28010, 287, 6362, 121, 15458, 800, 3726, 3726, 14, 3820, 2109, 16, 287, 6362, 8, 219, 15458, 21, 28010, 925, 25, 20, 2132, 32, 77, 172, 13, 11881, 10681, 11358, 9, 13, 5, 1409, 1, 291, 300, 15225, 1409, 800, 1, 13, 1409, 1188...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 detect number of context switches that occurred while running C# code? === From C#, is it possible to detect the number of context switches that occurred while executing a block of code on a particular thread? Ideally, I'd like to know how many times and what CPU my thread code was scheduled on. I know I can use tools like [Event Tracing for Windows](http://msdn.microsoft.com/en-us/magazine/cc163437.aspx) and the associated viewers, but this seemed a bit complicated to get the data I wanted. **Background**: I'm trying to test the actual performance of a low level lock primitive in .NET (as a result of some comments on a recent [blog post](http://www.moserware.com/2008/09/how-do-locks-lock.html) I made.
0
[ 2, 184, 20, 9092, 234, 16, 4141, 18114, 30, 2437, 133, 946, 272, 5910, 1797, 60, 800, 3726, 3726, 37, 272, 5910, 15, 25, 32, 938, 20, 9092, 14, 234, 16, 4141, 18114, 30, 2437, 133, 25836, 21, 1921, 16, 1797, 27, 21, 1498, 9322, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Creating A Private Photo Gallery Using Asp.Net MVC === I need to create a photo gallery service that is managed by users. I've done this a million times using just Asp.net but I was wondering if there are any special considerations that I need to make when using Asp.net MVC. Basically, I will be storing the actual images on the filesystem and storing the locations in a database linking the images to a specific user. The images in a user's gallery should **NOT** be accessible by anyone except registered users. Meaning, I need to somehow prevent users from sharing the url of an image from a gallery with someone who is not a user of the site. In the past I did this using some generic handlers which authenticated that the request is allowed to access the image resource. Can I use the same pattern but using Controllers instead? I was thinking of perhaps creating a Photo Controller and just a simple Get action. Would this require that I have a View just for displaying an Image? Am I on the right track or are there better ways of doing this? (Besides storing images in the DB)
0
[ 2, 2936, 21, 932, 3056, 2246, 568, 28, 306, 9, 2328, 307, 8990, 800, 3726, 3726, 31, 376, 20, 1600, 21, 3056, 2246, 365, 30, 25, 1471, 34, 3878, 9, 31, 22, 195, 677, 48, 21, 507, 436, 568, 114, 28, 306, 9, 2328, 47, 31, 23, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the easiest way to start tomcat in embedded mode from the cargo-maven2-plugin? === I have defined tomcat:catalina:5.5.23 as a dependency to the cargo plugin, however I still get the following exception: java.lang.ClassNotFoundException: org.apache.catalina.Connector at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:316) at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195) at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255) at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274) at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.codehaus.cargo.container.tomcat.internal.Tomcat5xEmbedded.preloadEmbedded(Tomcat5xEmbedded.java:232) It looks like the RealmClassLoader is not finding the class, possibly due to java.security.AccessController.doPrivileged denying access. Has anyone got tomcat to run in embedded mode from within maven?
0
[ 2, 98, 25, 14, 27237, 161, 20, 799, 2067, 5782, 19, 12138, 3740, 37, 14, 5570, 8, 540, 3124, 135, 8, 18527, 5831, 60, 800, 3726, 3726, 31, 57, 2811, 2067, 5782, 45, 9709, 9356, 45, 264, 9, 264, 9, 2001, 28, 21, 26835, 20, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you handle unit/regression tests which are expected to fail during development? === During software development, there may be bugs in the codebase which are known issues. These bugs will cause the regression/unit tests to fail, if the tests have been written well. There is constant debate in our teams about how failing tests should be managed: 1. Comment out failing test cases with a REVISIT or TODO comment. - **Advantage**: We will always know when a *new* defect has been introduced, and not one we are already aware of. - **Disadvantage**: May forget to REVISIT the commented-out test case, meaning that the defect could slip through the cracks. 2. Leave the test cases failing. - **Advantage**: Will not forget to fix the defects, as the script failures will constantly reminding you that a defect is present. - **Disadvantage**: Difficult to detect when a *new* defect is introduced, due to failure noise. I'd like to explore what the best practices are in this regard. Personally, I think a tri-state solution is the best for determining whether a script is passing. For example when you run a script, you could see the following: * Percentage passed: 75% * Percentage failed (expected): 20% * Percentage failed (unexpected): 5% You would basically mark any test cases which you *expect* to fail (due to some defect) with some metadata. This ensures you still see the failure result at the end of the test, but immediately know if there is a *new* failure which you weren't expecting. This appears to take the best parts of the 2 proposals above. Does anyone have any best practices for managing this?
0
[ 2, 184, 107, 42, 3053, 1237, 118, 99, 13026, 872, 4894, 56, 50, 1727, 20, 7476, 112, 522, 60, 800, 3726, 3726, 112, 2306, 522, 15, 80, 123, 44, 13925, 19, 14, 1797, 8436, 56, 50, 167, 1549, 9, 158, 13925, 129, 1679, 14, 27369, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 throw a XmlSchemaException on XML Schema validation errors? === Calling `Validate()` on an **XmlDocument** requires passing in a `ValidationEventHandler` delegate. That event function gets a `ValidationEventArgs` parameter which in turn has an `Exception` property of the type `XmlSchemaException`. Whew! My current code looks like this: ValidationEventHandler onValidationError = delegate(object sender, ValidationEventArgs args) { throw(args.Exception); } doc.Validate(onValidationError); Is there some other method I'm overlooking which simply *throws* the `XmlSchemaException` if validation fails (warnings ignored entirely)?
0
[ 2, 184, 20, 3814, 21, 23504, 7526, 540, 10066, 872, 27, 23504, 23874, 27999, 11908, 60, 800, 3726, 3726, 2555, 13, 1, 18506, 8209, 5, 6, 1, 27, 40, 13, 1409, 396, 8184, 28132, 1409, 4781, 2848, 19, 21, 13, 1, 18506, 43, 857, 494...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Business Entity Loading Pattern === The project I'm working is using n-tier architecture. Our layers are as follows: - Data Access - Business Logic - Business Entities - Presentation The Business Logic calls down into the data access layer, and the Presentation layer calls down into the Business Logic layer, and the Business entities are referenced by all of them. Our business entities essentially match our data model 1-1. For every table, we have a class. Initially when the framework was designed, there was no consideration for managing master-detail or child-parent relationships. So all of the Business logic, data access, and business entities, only referenced a single table in the database. Once we started developing the application it quickly became apparent that not having these relationships in our object model was severely hurting us. All of your layers (including the database) are all generated from an in-house metadata-database which we use to drive our home-grown code generator. The question is what is the best way to load or lazy load the relationships in our entities. For instance Let's say we have a person class that has a master-child relationship to an address table. This shows up in the business entity as a collection property of Addresses on the Person object. If we have a one-to-one relationship then this would show up as a single entity property. What is the best approach for filling and saving the relationship objects? Our Business entities have no knowledge of the Business Logic layer, so it can't be done internally when the property get's called. I'm sure there is some sort of standard patter out there for doing this. Any suggestions? Also, one caveat is that the DataAcess layer uses reflection to build our entities. The stored procedures return one result selt based on one table, and using reflection we populate our business object by matching the names of the properties with the names of the columns. So doing joins would be difficult.
0
[ 2, 508, 9252, 12797, 3732, 800, 3726, 3726, 14, 669, 31, 22, 79, 638, 25, 568, 13, 103, 8, 5259, 2607, 9, 318, 9124, 50, 28, 2415, 45, 13, 8, 1054, 1381, 13, 8, 508, 7085, 13, 8, 508, 12549, 13, 8, 6364, 14, 508, 7085, 3029,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PHP Session data not being saved === I have one of those "I swear I didn't touch the server" situations. I honestly didn't touch any of php scripts. The problem I am having is that php data is not being saved across different pages or page refreshes. I know a new session is being created correctly because I can set a session variable (e.g. $_SESSION['foo'] = "foo" and print it back out on the same page just fine. But when I try to use that same variable on another page and it is not set! Is there any php functions or information I can on my hosts server to see what is going on? Here is an example script that does not work on my hosts' server as of right now: <?php session_start(); if(isset($_SESSION['views'])) $_SESSION['views'] = $_SESSION['views']+ 1; else $_SESSION['views'] = 1; echo "views = ". $_SESSION['views']; echo '<p><a href="page1.php">Refresh</a></p>'; ?> The 'views' variable never gets incremented after doing a page refresh. I thinking this is a problem on their side, but I wanted to make sure I'm not a complete idiot first.
0
[ 2, 13, 26120, 3723, 1054, 52, 142, 4377, 800, 3726, 3726, 31, 57, 53, 16, 273, 13, 7, 49, 6688, 31, 223, 22, 38, 1723, 14, 8128, 7, 8329, 9, 31, 10971, 223, 22, 38, 1723, 186, 16, 13, 26120, 17505, 9, 14, 1448, 31, 589, 452,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Launch web page from my application in Linux === I have an application that launches a webpage in the "current" browser when the user selects it. This part of my app works fine in the Windows version but I can't figure out how to do this in Linux build. Right now the Linux version is hardcoded for Firefox in a specific directory and runs a new instance of it each time and doesn't show the URL that I pass in. I would like it to NOT launch a new version each time but just open a new page in the current open one if it is already running. For windows I use: ShellExecute(NULL,"open",filename,NULL,NULL,SW_SHOWNORMAL); For Linux I currently use: pid_t pid; char *args[2]; char *prog=0; char firefox[]={"/usr/bin/firefox"}; if(strstri(filename,".html")) prog=firefox; if(prog) { args[0]=(char *)filename; args[1]=0; pid=fork(); if(!pid) execvp(prog,args); }
0
[ 2, 3394, 2741, 2478, 37, 51, 3010, 19, 13024, 800, 3726, 3726, 31, 57, 40, 3010, 30, 22933, 21, 2741, 6486, 19, 14, 13, 7, 17657, 7, 16495, 76, 14, 4155, 5407, 18, 32, 9, 48, 141, 16, 51, 4865, 693, 1123, 19, 14, 1936, 615, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you loop through each line in a text file using a windows batch file? === I would like to know how to loop through each line in a text file using a Windows batch file and process each line of text in succession. thx
0
[ 2, 184, 107, 42, 5293, 120, 206, 293, 19, 21, 1854, 3893, 568, 21, 1936, 13064, 3893, 60, 800, 3726, 3726, 31, 83, 101, 20, 143, 184, 20, 5293, 120, 206, 293, 19, 21, 1854, 3893, 568, 21, 1936, 13064, 3893, 17, 953, 206, 293, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Linux tool for search-replace === What Linux command-line tool would I use for performing a search and replace on a file. Can the search text, and replacement, be specified in a regex format?
0
[ 2, 13024, 5607, 26, 2122, 8, 99, 5119, 800, 3726, 3726, 98, 13024, 1202, 8, 1143, 5607, 83, 31, 275, 26, 2955, 21, 2122, 17, 3934, 27, 21, 3893, 9, 92, 14, 2122, 1854, 15, 17, 4610, 15, 44, 9931, 19, 21, 7953, 1706, 2595, 60, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Do you design/sketch/draw a development solution first and then develop it? If so how? === I work alot with decision makers looking to use technology better in their businesses. I have found that **a picture is worth a thousand words** and prototyping a system in a diagram of some sorts always lends alot to a discussion. I have used Visio, UML (somewhat), Mind Maps, Flow Charts and Mocked Up WinForms to start the vision for these sponsors to ensure that everyone is on the same page. I always seem to be looking for that common process can be used to knit the business vision to the development process so that we all end up at the same end, "**Something functional that solves a problem**". I am looking for suggestions or Cliff notes on how to approach the design process such that it works for applications that may only take a week to develop, but can also be used to emcompass larger projects as well. I know that this delves into the area of UML, but I have found that I have a hard time finding a guide to appropriately us the various diagram types, let alone help business users understand the diagrams and relate to them. What do you use to capture a vision of a system/application to then present to the sponsors of a project? (all before you write a single line of code)...
0
[ 2, 107, 42, 704, 118, 5835, 9744, 118, 43, 12404, 21, 522, 4295, 64, 17, 94, 2803, 32, 60, 100, 86, 184, 60, 800, 3726, 3726, 31, 170, 21, 5639, 29, 1401, 13, 7293, 699, 20, 275, 1099, 574, 19, 66, 4426, 9, 31, 57, 216, 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...
OleDbException System Resources Exceeded === The following code executes a simple insert command. If it is called 2,000 times consecutively (to insert 2,000 rows) an OleDbException with message = "System Resources Exceeded" is thrown. Is there something else I should be doing to free up resources? using (OleDbConnection conn = new OleDbConnection(connectionString)) using (OleDbCommand cmd = new OleDbCommand(commandText, conn)) { conn.Open(); cmd.ExecuteNonQuery(); }
0
[ 2, 12116, 9007, 10066, 872, 329, 2566, 17365, 800, 3726, 3726, 14, 249, 1797, 15644, 18, 21, 1935, 14692, 1202, 9, 100, 32, 25, 227, 8819, 436, 4195, 102, 13, 5, 262, 14692, 8819, 11295, 6, 40, 12116, 9007, 10066, 872, 29, 2802, 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...
What are best practices that you use when writing Objective-C and Cocoa? === I know about the HIG (which is quite handy!), but what programming practices do you use when writing Objective-C, and more specifically when using Cocoa (or CocoaTouch).
4
[ 2, 98, 50, 246, 5242, 30, 42, 275, 76, 1174, 7038, 8, 150, 17, 24507, 60, 800, 3726, 3726, 31, 143, 88, 14, 4148, 263, 13, 5, 2140, 25, 1450, 20277, 187, 6, 15, 47, 98, 3143, 5242, 107, 42, 275, 76, 1174, 7038, 8, 150, 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, 0, 0, 0...
jQuery match multiple attributes === I have the following markup, and I want to make the 'All' radio button checked. <ul> <li><input type="radio" value="All" name="Foo" />All</li> <li><input type="radio" value="New" name="Foo" />New</li> <li><input type="radio" value="Removed" name="Foo" />Removed</li> <li><input type="radio" value="Updated" name="Foo" />Updated</li> </ul> I'd like to do it via attribute match, but I need to match on 2 attributes, @name='Foo' and also @value='All' Something like this, (although it doesn't work): $("input[@name='Foo' @value='all']).attr('checked','checked'); Can someone show how this can be done?
0
[ 2, 487, 8190, 93, 730, 1886, 13422, 800, 3726, 3726, 31, 57, 14, 249, 943, 576, 15, 17, 31, 259, 20, 233, 14, 13, 22, 1233, 22, 603, 5167, 6505, 9, 13, 1, 1287, 1, 13, 1, 1210, 1, 108, 4881, 1001, 3726, 7, 11129, 7, 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...
VB.Net MessageBox.Show() moves my form to the back === I have an MDI application. When I show a message box using MessageBox.Show(), the entire application disappears behind all of my open windows when I dismiss the message box. The code is not doing anything special. In fact, here is the line that invokes the message box from within an MDI Child form: MessageBox.Show(String.Format("{0} saved successfully.", Me.BusinessUnitTypeName), "Save Successful", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) Me.BusinessUnitTypeName() is a read only property getter that returns a string, depending upon the value of a member variable. There are no side effects in this property. Any ideas?
0
[ 2, 13, 20468, 9, 2328, 2802, 5309, 9, 9303, 5, 6, 4927, 51, 505, 20, 14, 97, 800, 3726, 3726, 31, 57, 40, 8138, 49, 3010, 9, 76, 31, 298, 21, 2802, 1649, 568, 2802, 5309, 9, 9303, 5, 6, 15, 14, 1078, 3010, 20341, 439, 65, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I assign an event to a timer at runtime in vb.net? === Given this: Public Sub timReminder_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) If DateTime.Now() > g_RemindTime Then Reminders.ShowDialog() timReminder.Enabled = False End If End Sub I want to be able to say this (as I would in Delphi): timReminder.Tick = timReminder_Tick But I get errors when I try it. Does anyone know how I can assign a custom event to a timer's on-tick event at runtime in VB.NET?
0
[ 2, 184, 92, 31, 13952, 40, 807, 20, 21, 85, 139, 35, 485, 891, 19, 13, 20468, 9, 2328, 60, 800, 3726, 3726, 504, 48, 45, 317, 972, 2574, 99, 79, 19720, 1, 38, 7030, 5, 779, 3377, 2660, 106, 28, 329, 9, 23793, 15, 34, 3377, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Protecting internal view layer template pages in servlet applications === I have a very basic question about MVC web applications in Java. Since the olden days of raw JSP up until current technologies like Seam, a very basic pattern has always been the internal dispatch from the controller that initially accepted the request to the view layer that creates the output to be sent to the client. This internal dispatch is generally done (although the mechanism may be hidden through an extra layer of configuration) by asking the servlet container for a new resource using a URL. The mapping of these URL are done by the same web.xml that also defines the "real" URL to the outside. Unless special measures are taken, it is often possible to directly access the view layer directly. Witness the Seam "registration" demo, where you can bypass "register.seam" and directly go to "registered.xhtml". This is a potential security problem. At the very least, it leaks view template source code. I am aware that this is only a basic sample application, but it is also strange that any extra measures should need to be taken to declare these internal resources invisible to the outside. What is the easiest way to restrict URL entry points? Is there maybe something like the "WEB-INF" directory, a magic URL path component that can only be accessed by internal requests?
0
[ 2, 8718, 3117, 1418, 5385, 22894, 4434, 19, 13, 10321, 1336, 3767, 800, 3726, 3726, 31, 57, 21, 253, 2125, 1301, 88, 307, 8990, 2741, 3767, 19, 8247, 9, 179, 14, 315, 219, 509, 16, 4333, 487, 3401, 71, 163, 866, 5740, 101, 13927, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it possible to rename an SQL Server 2005 instance === I would like to change the name of my SQL Server instance. Is there a simple way of doing this or is a significant effort required? Note, this is a named instance - not the default instance.
0
[ 2, 25, 32, 938, 20, 302, 7259, 40, 4444, 255, 8128, 812, 4851, 800, 3726, 3726, 31, 83, 101, 20, 753, 14, 204, 16, 51, 4444, 255, 8128, 4851, 9, 25, 80, 21, 1935, 161, 16, 845, 48, 54, 25, 21, 1505, 2150, 1390, 60, 1945, 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, 0, 0, 0, 0...
Perl: Grabbing the nth and mth delimited words from each line in a file === Because of the more tedious way of adding hosts to be monitored in Nagios (it requires defining a host object, as opposed to the previous program which only required the IP and hostname), I figured it'd be best to automate this, and it'd be a great time to learn Perl, because all I know at the moment is C/C++ and Java. The file I read from looks like this: xxx.xxx.xxx.xxx hostname #comments. i.dont. care. about All I want are the first 2 bunches of characters. These are obviously space delimited, but for the sake of generality, it might as well be anything. To make it more general, why not the first and third, or fourth and tenth? Surely there must be some regex action involved, but I'll leave that tag off for the moment, just in case.
0
[ 2, 416, 255, 45, 9910, 14, 13, 103, 96, 17, 307, 96, 121, 23012, 715, 37, 206, 293, 19, 21, 3893, 800, 3726, 3726, 185, 16, 14, 91, 7859, 5907, 161, 16, 4721, 5397, 20, 44, 20575, 19, 9277, 7760, 13, 5, 242, 4781, 14684, 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...
Haskell Syntax case expression in a do block === I can't quite figure out this syntax problem with a **case** expression in a **do** block. What is the correct syntax? If you could **correct my example** and **explain it** that would be the best. Thanks module Main where main = do putStrLn "This is a test" s <- foo putStrLn s foo = do args <- getArgs return case args of [] -> "No Args" [s]-> "Some Args"
0
[ 2, 63, 16507, 22649, 610, 1803, 19, 21, 107, 1921, 800, 3726, 3726, 31, 92, 22, 38, 1450, 1465, 70, 48, 22649, 1448, 29, 21, 13, 1409, 10325, 1409, 1803, 19, 21, 13, 1409, 537, 1409, 1921, 9, 98, 25, 14, 4456, 22649, 60, 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...
MySQL commercial license costs === We are building a commercial product that is using MySQL as the back-end. The product will not be open source (at least not initially). We have had a very hard time getting any costing information from MySQL, they seem to want a percentage of the list price of the product, but no clarity is given on what that percentage is. Has anyone sold a commercial product based on MySQL and successfully worked out a commercial arrangement with them? I'd be interested to hear your story and any numbers along with it.
0
[ 2, 51, 18, 22402, 1439, 3962, 4227, 800, 3726, 3726, 95, 50, 353, 21, 1439, 2374, 30, 25, 568, 51, 18, 22402, 28, 14, 97, 8, 2451, 9, 14, 2374, 129, 52, 44, 368, 1267, 13, 5, 721, 639, 52, 1537, 6, 9, 95, 57, 41, 21, 253, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Dates, which are actually timestamps === Java & Oracle both have a *timestamp* type called Date. Developers tend to manipulate these as if they were *calendar* dates, which I've seen cause nasty one-off bugs. > For a basic date quantity you can simply chop off the time portion upon input, i.e., reduce the precision. But if you do that with a date range, (e.g.: **9/29-9/30**), the difference between these two values is 1 day, rather than 2. Also, range comparisons require either 1) a truncate operation: `start < trunc(now) <= end`, or 2) arithmetic: `start < now < (end + 24hrs)`. Not horrible, but not [DRY](http://www.artima.com/intv/dry.html). > An alternative is to use true timestamps: **9/29** 00:00:00 - **10/1** 00:00:00. (midnight-to-midnight, so does not include any part of Oct). Now durations are intrinsically correct, and range comparisons are simpler: `start < now < end`. Certainly cleaner for internal processing, however end dates do need to be converted upon initial input (+1), and for output (-1), presuming a calendar date metaphor at the user level. How do you handle dates on your project? Are there other alternatives? I am particularly interested in how you handle this on both the Java and the Oracle sides of the equation.
0
[ 2, 184, 107, 42, 1718, 4076, 15, 56, 50, 1121, 436, 4919, 1919, 800, 3726, 3726, 8247, 279, 15759, 156, 57, 21, 1637, 891, 384, 10158, 2483, 1001, 227, 1231, 9, 10168, 5480, 20, 18468, 158, 28, 100, 59, 46, 1637, 3430, 219, 2542, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 you limit a TFS Check-In notes to a custom path? === You can limit "Check-In Policy" rules via the "Custom Paths" policy. But the "Check-in Notes" tab doesn't seem to fit in to the same system. Why isn't "Check-In notes" just another "Check-In policy"?? I'm using Team Foundation Server 2008 SP1
0
[ 2, 184, 92, 42, 4496, 21, 13, 11720, 18, 2631, 8, 108, 2434, 20, 21, 5816, 2013, 60, 800, 3726, 3726, 42, 92, 4496, 13, 7, 12542, 8, 108, 1486, 7, 1761, 1197, 14, 13, 7, 4636, 6015, 12074, 7, 1486, 9, 47, 14, 13, 7, 12542, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 manage database revisions on a medium sized project with branches? === At work we have 4 people working together on a few different projects. For each project we each have a local copy we work on and then there is a development, staging, and live deployment, along with any branches we have (we use subversion). Our database is MySQL. So my question is, what is a good way to manage which revisions to the database have been made to each deployment (and for the developers their local copies). Right now each change goes into a text file that is timestamped in the name and put into a folder under the project. This isn't working very well to be honest.. I need a solution that will help keep track of what has been applied where.
0
[ 2, 184, 107, 42, 4705, 6018, 11323, 18, 27, 21, 4152, 13, 6560, 669, 29, 4395, 60, 800, 3726, 3726, 35, 170, 95, 57, 268, 148, 638, 429, 27, 21, 310, 421, 2314, 9, 26, 206, 669, 95, 206, 57, 21, 375, 4344, 95, 170, 27, 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...
Show a Form without stealing focus (in C#) === i'm using a Form to show notifications (it appears at the bottom right of the screen) but the problem that i'm having is that when I show this form it steals the main form focus. Is there a way to show this "notification" form without stealing focus? Thanks for your time. Cheers.
0
[ 2, 298, 21, 505, 366, 12222, 1776, 13, 5, 108, 272, 5910, 6, 800, 3726, 3726, 31, 22, 79, 568, 21, 505, 20, 298, 52, 4634, 18, 13, 5, 242, 1780, 35, 14, 2129, 193, 16, 14, 2324, 6, 47, 14, 1448, 30, 31, 22, 79, 452, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Update viewstate after populating a list with ASP.NET AJAX === I've got a dropdown list that is being populated via a webservice using ASP>NET AJAX. On the success callback of the method in javascript, I'm populating the dropdown via a loop: function populateDropDown(dropdownId, list, enable, showCount) { var dropdown = $get(dropdownId); dropdown.options.length = 1; for (var i = 0; i < list.length; i++) { var opt = document.createElement("option"); if (showCount) { opt.text = list[i].Name + ' (' + list[i].ChildCount + ')'; } else { opt.text = list[i].Name; } opt.value = list[i].Name; dropdown.options.add(opt); } dropdown.disabled = !enable; } However when I submit the form that this control is on, the control's list is always empty on postback. How do I get the populated lists data to persist over postback?
0
[ 2, 11100, 1418, 3859, 75, 1675, 10038, 21, 968, 29, 28, 306, 9, 2328, 20624, 800, 3726, 3726, 31, 22, 195, 330, 21, 2804, 2968, 968, 30, 25, 142, 11111, 1197, 21, 2741, 11449, 568, 28, 306, 1, 2328, 20624, 9, 27, 14, 1280, 645, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 screen scrapers work? === I here people writing these programs all the time and I know what they do, but how do they actually do it? I'm looking for general concepts.
0
[ 2, 184, 107, 2324, 10241, 445, 170, 60, 800, 3726, 3726, 31, 235, 148, 1174, 158, 1726, 65, 14, 85, 17, 31, 143, 98, 59, 107, 15, 47, 184, 107, 59, 1121, 107, 32, 60, 31, 22, 79, 699, 26, 297, 8700, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Sorting text (adVarChar) ADO recordset field as numeric === Using VBA (in Project 2003 and Excel 2003) i have a set of functions that return an `ADODB.Recordset` object (referencing **Microsoft ActiveX DataObject 2.8 Library**) The functions are part of a generic tool that creates all the columns as `adVarChar`. Unfortunately this means numerics get sorted as text. So 1,7,16,22 becomes 1,16,22,7 Is there any methods that can sort numerics as text columns without resorting to changing the type of the column? Sub TestSortVarChar() Dim strBefore, strAfter As String Dim r As ADODB.RecordSet Set r = New ADODB.RecordSet r.Fields.Append "ID", adVarChar, 100 r.Fields.Append "Field1", adVarChar, 100 r.Open r.AddNew r.Fields("ID") = "1" r.Fields("Field1") = "A" r.AddNew r.Fields("ID") = "7" r.Fields("Field1") = "B" r.AddNew r.Fields("ID") = "16" r.Fields("Field1") = "C" r.AddNew r.Fields("ID") = "22" r.Fields("Field1") = "D" r.MoveFirst Do Until r.EOF strBefore = strBefore & r.Fields("ID") & " " & r.Fields("Field1") & vbCrLf r.MoveNext Loop r.Sort = "[ID] ASC" r.MoveFirst Do Until r.EOF strAfter = strAfter & r.Fields("ID") & " " & r.Fields("Field1") & vbCrLf r.MoveNext Loop MsgBox strBefore & vbCrLf & vbCrLf & strAfter End Sub
0
[ 2, 2058, 68, 1854, 13, 5, 1283, 3311, 5433, 6, 21, 537, 742, 1198, 575, 28, 15764, 596, 800, 3726, 3726, 568, 566, 969, 13, 5, 108, 669, 973, 17, 20700, 973, 6, 31, 57, 21, 309, 16, 3719, 30, 788, 40, 13, 1, 5672, 9007, 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...
Silverlight 2.0 DataGrid How to remove mouseover effect === I am just starting with SL and WPF. I am using the DataGrid control and I need to remove the mouseover effect (I actually will need to do more customizations than that). How do I do this. I think I need to do it with a control template but not sure how. I'm researching and reading right now. Any help would be appreciated.
0
[ 2, 1172, 3130, 172, 9, 387, 1054, 16375, 184, 20, 4681, 7567, 2549, 1590, 800, 3726, 3726, 31, 589, 114, 1422, 29, 13718, 17, 619, 7721, 9, 31, 589, 568, 14, 1054, 16375, 569, 17, 31, 376, 20, 4681, 14, 7567, 2549, 1590, 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...
LinqToSql and abstract base classes === I have some linq entities that inherit something like this: public abstract class EntityBase { public int Identifier { get; } } public interface IDeviceEntity { int DeviceId { get; set; } } public abstract class DeviceEntityBase : EntityBase, IDeviceEntity { public abstract int DeviceId { get; set; } } public partial class ActualLinqGeneratedEntity : DeviceEntityBase { } In a generic method I am querying DeviceEnityBase derived entities with: return unitOfWork.GetRepository<TEntity>().FindOne(x => x.DeviceId == evt.DeviceId); where TEntity has a contraint that is it a DeviceEntityBase. This query is always failing with an InvalidOperationException with the message "Class member DeviceEntityBase.DeviceId is unmapped". Even if I add some mapping info in the abstract base class with [Column(Storage = "_DeviceId", DbType = "Int", Name = "DeviceId", IsDbGenerated = false, UpdateCheck = UpdateCheck.Never)]
0
[ 2, 6294, 1251, 262, 18, 22402, 17, 8502, 1000, 2684, 800, 3726, 3726, 31, 57, 109, 6294, 1251, 12549, 30, 17569, 301, 101, 48, 45, 317, 8502, 718, 9252, 8436, 13, 1, 317, 19, 38, 25570, 13, 1, 164, 73, 13, 1, 13, 1, 317, 6573,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best way to get result count before LIMIT was applied in PHP/postgres === When paging through data that comes from a DB, you need to know how many pages there will be to render the page jump controls. Currently I do that by running the query twice, once wrapped in a count() to determine the total results, and a second time with a limit applied to get back just the results I need for the current page. This seems inefficient. Is there a better way to determine how many results would have been returned before the limit was applied? I am using PHP and Postgres.
0
[ 2, 246, 161, 20, 164, 829, 2468, 115, 4496, 23, 2435, 19, 13, 26120, 118, 6962, 6879, 18, 800, 3726, 3726, 76, 19006, 68, 120, 1054, 30, 1624, 37, 21, 13, 9007, 15, 42, 376, 20, 143, 184, 151, 4434, 80, 129, 44, 20, 16535, 14,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What's the CSS Filter alternative for Firefox? === I'm using CSS Filters to modify images on the fly within the browser. These work perfectly in Internet Explorer, but aren't supported in Firefox. Does anyone know what the CSS Filter equivalent for these is for Firefox? An answer that would work cross browser (Safari, WebKit, Firefox, etc.) would be preferred. <style type="text/css"> .CSSClassName {filter:Invert;} .CSSClassName {filter:Xray;} .CSSClassName {filter:Gray;} .CSSClassName {filter:FlipV;} </style>
0
[ 2, 98, 22, 18, 14, 272, 18, 18, 11945, 2676, 26, 535, 18219, 60, 800, 3726, 3726, 31, 22, 79, 568, 272, 18, 18, 21062, 20, 17579, 3502, 27, 14, 2855, 363, 14, 16495, 9, 158, 170, 5759, 19, 2620, 8520, 15, 47, 4847, 22, 38, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Source code management strategies - branching, tagging, forking, etc. - for web apps === This posting here (http://stackoverflow.com/questions/156044/how-do-you-manage-database-revisions-on-a-medium-sized-project-with-branches) got me wondering how best to work on a web project using branching and deploying to dev, staging, and production (along with local copies). We don't have "releases" per se: if a feature is big enough to be noticeable, we push it live (after requisite testing/etc.), otherwise we batch a few up and, when it feels "comfortable", push those live. The goal is to never have a deploy more than once or twice a month or so because a constantly shifting site tends to make the users a bit uneasy. Here's how we do it, and it feels sort of brittle (currently using svn but considering a switch to git): 0) Two "branches" - DEV and STAGE with a given release of STAGE marked as TRUNK 1) Developer checks out a copy of TRUNK for every change and creates a branch for it 2) Developer works locally, checking in code frequently (just like voting: early and often) 3) When Developer is comfortable it isn't totally broken, merge the branch with DEV and deploy to the development site. 4) Repeat 2-3 as necessary until the change is "finished" 5) Merge change branch with STAGING, deploy to stage site. Do expected final testing. 6) After some period of time, mark a given revision of STAGE as the TRUNK, and push trunk live 7) Merge TRUNK changes back down to DEV to keep it in sync Now, some of these steps have significant complexity hand-waved away and in practice are very difficult to do (TRUNK -> DEV always breaks) so I have to imagine there's a better way. Thoughts?
0
[ 2, 1267, 1797, 1097, 10272, 13, 8, 1686, 68, 15, 3383, 2762, 15, 26, 1581, 15, 2722, 9, 13, 8, 26, 2741, 4865, 18, 800, 3726, 3726, 48, 15669, 235, 13, 5, 21127, 6903, 25325, 2549, 9990, 9, 960, 118, 24652, 18, 118, 13097, 3277,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Loading XHTML fragments over AJAX with jQuery === I'm trying to load fragments of XHTML markup using jQuery's `$.fn.load` function, but it raises an error trying to add the new markup into the DOM. I've narrowed this down to the XML declaration (`<?xml...?>`) -- the view works if I return static text without the declaration. I don't understand why this would cause failure, or if the blame lies in jQuery, Firefox, or my code. How should I insert XHTML fragments into the DOM using jQuery?
0
[ 2, 12797, 993, 15895, 10837, 84, 20624, 29, 487, 8190, 93, 800, 3726, 3726, 31, 22, 79, 749, 20, 6305, 10837, 16, 993, 15895, 943, 576, 568, 487, 8190, 93, 22, 18, 13, 1, 4403, 9, 19035, 9, 8294, 1, 1990, 15, 47, 32, 15303, 40...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
CoreImage for Win32 === For those not familiar with Core Image, here's a good description of it: http://developer.apple.com/macosx/coreimage.html Is there something equivalent to Apple's CoreImage/CoreVideo for Windows? I looked around and found the DirectX/Direct3D stuff, which has all the underlying pieces, but there doesn't appear to be any high level API to work with, unless you're willing to use .NET *AND* use WPF, neither of which really interest me. The basic idea would be create/load an image, attach any number of filters that can be chained together, forming a graph, and then render the image to an HDC, using the GPU to do most of the hard work. DirectX/Direct3D has these pieces, but you have to jump through a lot of hoops (or so it appears) to use it.
0
[ 2, 2884, 22039, 26, 628, 3125, 800, 3726, 3726, 26, 273, 52, 3694, 29, 2884, 1961, 15, 235, 22, 18, 21, 254, 5318, 16, 32, 45, 7775, 6903, 26051, 106, 9, 24212, 9, 960, 118, 6893, 759, 396, 118, 10375, 22039, 9, 15895, 25, 80, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best way to render hand-drawn figures === I guess I'll illustrate with an example: In [this game][1] you are able to draw 2D shapes using the mouse and what you draw is rendered to the screen in real-time. I want to know what the best ways are to render this type of drawing using hardware acceleration (OpenGL). I had two ideas: - Create a screen-size texture when drawing is started, update this when drawing, and blit this to the screen - Create a series of line segments to represent the drawing, and render these using either lines or thin polygons Are there any other ideas? Which of these methods is likely to be best/most efficient/easiest? Any suggestions are welcome. [1]: http://www.kloonigames.com/blog/games/crayon
0
[ 2, 246, 161, 20, 16535, 224, 8, 19950, 2957, 800, 3726, 3726, 31, 2321, 31, 22, 211, 15620, 29, 40, 823, 45, 19, 636, 1565, 250, 500, 2558, 165, 500, 42, 50, 777, 20, 2003, 172, 43, 12129, 568, 14, 7567, 17, 98, 42, 2003, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you measure if an interface change improved or reduced usability? === For an ecommerce website how do you measure if a change to your site actually improved usability? What kind of measurements should you gather and how would you set up a framework for making this testing part of development?
0
[ 2, 184, 107, 42, 4058, 100, 40, 6573, 753, 3999, 54, 2736, 182, 4091, 60, 800, 3726, 3726, 26, 40, 13, 62, 26470, 2271, 184, 107, 42, 4058, 100, 21, 753, 20, 154, 689, 1121, 3999, 182, 4091, 60, 98, 825, 16, 12776, 378, 42, 74...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
How do you update an object with Linq 2 SQL without rowversion or timestamp? === I'm trying to take a POCO object and update it with Linq2SQL using an XML mapping file... This what what I have: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Business.Objects { public class AchievementType { public int Id { get; set; } public string Name { get; set; } } } <?xml version="1.0" encoding="utf-8" ?> <Database Name="Name" xmlns="http://schemas.microsoft.com/linqtosql/mapping/2007"> <Table Name="dbo.AchievementTypes" Member="Business.Objects.AchievementType"> <Type Name="Business.Objects.AchievementType"> <Column Name="Id" Member="Id" IsDbGenerated="true" IsPrimaryKey="true" /> <Column Name="Name" Member="Name" /> </Type> </Table> </Database> CREATE TABLE AchievementTypes ( Id INTEGER IDENTITY NOT NULL, Name NVARCHAR(255) NOT NULL, CONSTRAINT PK_AchievevementTypes PRIMARY KEY (Id), CONSTRAINT UQ_AchievementTypes UNIQUE (Name) ) and i'm doing the following to update it: var type_repo = new BaseRepository<AchievementType>(); var t1 = new AchievementType { Name = "Foo" }; type_repo.Insert(t1); t1.Name = "Baz"; type_repo.Save(t1, "Id"); and my repository Save is just doing: public void Update(TData entity) { using (var ctx = MyDataContext()) { ctx.GetTable<TData>().Attach(entity); ctx.SubmitChanges(); } } The update doesn't fail or anything, but the data in the database has not changed.
0
[ 2, 184, 107, 42, 11100, 40, 3095, 29, 6294, 1251, 172, 4444, 255, 366, 3131, 10898, 54, 436, 38, 10158, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 247, 21, 2353, 716, 3095, 17, 11100, 32, 29, 6294, 1251, 135, 18, 22402, 568, 40, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a way to retrieve only a portion of a matched string using regex in Javascript? === Say I've got a string, "foo (123) bar", and I want to retrieve all numbers surrounded by the delimiters "(" and ")". If I use `varname.match(/\([0-9]+\)/)`, my delimeters are included in the response, and I get "(123)" when what I really want is "123". Is there a way I can retrieve only a portion of the matched string without following it up with `varname.replace()`?
0
[ 2, 25, 80, 21, 161, 20, 11917, 104, 21, 2980, 16, 21, 11265, 3724, 568, 7953, 1706, 19, 8247, 8741, 60, 800, 3726, 3726, 395, 31, 22, 195, 330, 21, 3724, 15, 13, 7, 4120, 111, 13, 5, 918, 240, 6, 748, 7, 15, 17, 31, 259, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you add recommendations to your ecommerce site? === Every ecommerce website would love to have a full featured recommendation engine like Amazon but how do you get one started? I found one open source project ([Taste](http://taste.sourceforge.net/)) but what other resources would you recommend for education and code.
0
[ 2, 184, 107, 42, 3547, 12121, 20, 154, 13, 62, 26470, 689, 60, 800, 3726, 3726, 352, 13, 62, 26470, 2271, 83, 339, 20, 57, 21, 503, 1070, 14066, 1406, 101, 8059, 47, 184, 107, 42, 164, 53, 373, 60, 31, 216, 53, 368, 1267, 669,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Reorder PDF Page Order === Is it possible to reorder an already generated PDF file programmatically, and using as little resources as possible, as this will need to be ran on ~8000 PDFs every month or so? We are currently using iTextSharp to merge the PDF’s in to larger PDF’s, but iTextsharp’s Documentation does not really explain much.
0
[ 2, 302, 7861, 13, 11124, 2478, 389, 800, 3726, 3726, 25, 32, 938, 20, 302, 7861, 40, 614, 6756, 13, 11124, 3893, 625, 6732, 1326, 15, 17, 568, 28, 265, 2566, 28, 938, 15, 28, 48, 129, 376, 20, 44, 717, 27, 13, 1, 28064, 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...
Asking for help: What is a decent beginner graph problem? === I'm trying to get more acquainted with problems that require Graphs to be solved (are are best solved by graphs). If someone has an old ACM Programming Competition problem that utilized graphs, or have another problem that they found particularly enlightening as they worked it out I would appreciate it. I want to familiarize myself with graphs, identifying graph-type problems easily and be able to utilize basic graph traversal algorithmns. Anyone have a sweet problem they can send my way?
0
[ 2, 3379, 26, 448, 45, 98, 25, 21, 12238, 26931, 7210, 1448, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 164, 91, 21771, 29, 1716, 30, 4077, 7210, 18, 20, 44, 15091, 13, 5, 1509, 50, 246, 15091, 34, 7210, 18, 6, 9, 100, 737, 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...
What are the open source code search engines you know about? === I know of google code search http://www.google.com/codesearch and koders http://www.koders.com/ . These two sites help me find usage of some of the libraries, where official documentation of the libraries would go only so far. If you know of some other tools/tips for using these search tools/other tips for finding library usage examples, please share.
0
[ 2, 98, 50, 14, 368, 1267, 1797, 2122, 4016, 42, 143, 88, 60, 800, 3726, 3726, 31, 143, 16, 8144, 1797, 2122, 7775, 6903, 6483, 9, 16111, 4875, 9, 960, 118, 9375, 25136, 17, 1584, 1157, 18, 7775, 6903, 6483, 9, 921, 1157, 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...
Python Dependency Injection Framework === Is there a framework equivalent to Guice (http://code.google.com/p/google-guice) for Python?
0
[ 2, 20059, 26835, 13646, 6596, 800, 3726, 3726, 25, 80, 21, 6596, 4602, 20, 9457, 1105, 13, 5, 21127, 6903, 9375, 9, 16111, 4875, 9, 960, 118, 306, 118, 16111, 4875, 8, 7215, 1105, 6, 26, 20059, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Asp.net MVC View Testing? === With more and more code pushed to the Views in Asp.Net MVC (i.e. AJAX, JQuery, etc...), how do you maintain the 'testability'? - How do you test your Views? - How do you test your views with client-side jscript code? - How do you test your Views with Async behavior? It seems that most examples on the testability of MVC deal with controllers. What about Views?
0
[ 2, 28, 306, 9, 2328, 307, 8990, 1418, 4431, 60, 800, 3726, 3726, 29, 91, 17, 91, 1797, 2007, 20, 14, 4146, 19, 28, 306, 9, 2328, 307, 8990, 13, 5, 49, 9, 62, 9, 20624, 15, 487, 8190, 93, 15, 2722, 9, 9, 9, 6, 15, 184, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Object allocate and init in Objective C === What is the difference between the following 2 ways to allocate and init an object? AController *tempAController = [[AController alloc] init]; self.aController = tempAController; [tempAController release]; and self.aController= [[AController alloc] init];
0
[ 2, 3095, 65, 111, 9530, 17, 19, 242, 19, 7038, 272, 800, 3726, 3726, 98, 25, 14, 2841, 128, 14, 249, 172, 2847, 20, 65, 111, 9530, 17, 19, 242, 40, 3095, 60, 21, 12898, 1252, 1637, 9577, 58, 12898, 1252, 800, 636, 2558, 58, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Notification of object destruction in Ruby === I have written a custom Rails model. This model is backed by an actually server not by a database table (so it does not inherit from `ActiveRecord::Base`). In order to get the requested information from the server I open a SSH connection to it. Because rails does not reuse object a new object, as well as a new SSH connection to the server, will be created for ever request that is received. To reduce server stress I want to close the SSH connection before the model object gets garbage collected. I am wondering does ruby provide a notification mechanism to inform the object that it will be destroyed? If so I could use this notification to know when to close the SSH connections. If not I will need to do it manual when I know I am finished with the object.
0
[ 2, 52, 4634, 16, 3095, 5203, 19, 10811, 800, 3726, 3726, 31, 57, 642, 21, 5816, 2240, 18, 1061, 9, 48, 1061, 25, 6334, 34, 40, 1121, 8128, 52, 34, 21, 6018, 859, 13, 5, 656, 32, 630, 52, 17569, 37, 13, 1, 7889, 14953, 45, 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...
AI Applications in C++: How costly are virtual functions? What are the possible optimizations? === In an AI application I am writing in C++, 1. there is not much numerical computation 2. there are lot of structures for which run-time polymorphism is needed 3. very often, several polymorphic structures interact during computation In such a situation, are there any optimization techniques? While I won't care to optimize the application just now, one aspect of selecting C++ over Java for the project was to enable more leverage to optimize and to be able to use non-object oriented methods (templates, procedures, overloading). In particular, what are the optimization techniques related to virtual functions? Virtual functions are implemented through virtual tables in memory. Is there some way to pre-fetch these virtual tables onto L2 cache (the cost of fetching from memory/L2 cache is increasing)? Apart from this, are there good references for data locality techniques in C++? These techniques would reduce the wait time for data fetch into L2 cache needed for computation.
0
[ 2, 21, 49, 3767, 19, 272, 20512, 45, 184, 20035, 50, 6599, 3719, 60, 98, 50, 14, 938, 21597, 18, 60, 800, 3726, 3726, 19, 40, 21, 49, 3010, 31, 589, 1174, 19, 272, 20512, 15, 137, 9, 80, 25, 52, 212, 16010, 21683, 172, 9, 80...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 equivalent of the C++ Pair<L,R> in Java? === Is there a good reason why there is no Pair<L,R> in Java? What would be the equivalent of this C++ construct? I would rather avoid reimplementing my own. It seems that 1.6 is providing something similar (AbstractMap.SimpleEntry<K,V>), but this looks quite convoluted.
0
[ 2, 98, 25, 14, 4602, 16, 14, 272, 20512, 2146, 1, 255, 15, 139, 1, 19, 8247, 60, 800, 3726, 3726, 25, 80, 21, 254, 1215, 483, 80, 25, 90, 2146, 1, 255, 15, 139, 1, 19, 8247, 60, 98, 83, 44, 14, 4602, 16, 48, 272, 20512, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Does setbuf() affect cout? === Yet again, my teacher was unable to answer my question. I knew who may be able to... So, I've never really learned C. In C++, I would, obviously, use a cout statement all of the time. In a recent assignment, my teacher told us to make sure to put setbuf( stdout , NULL ); at the top of main() in order to get an unbuffered output, thus allowing us to see the output properly. My question is this: will this statement affect a cout statement, or simply a printf() statement that I call? Thanks in advance!
0
[ 2, 630, 309, 2345, 410, 5, 6, 6245, 272, 1320, 60, 800, 3726, 3726, 768, 188, 15, 51, 2197, 23, 2343, 20, 1623, 51, 1301, 9, 31, 404, 72, 123, 44, 777, 20, 9, 9, 9, 86, 15, 31, 22, 195, 243, 510, 2691, 272, 9, 19, 272, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to import a SQL Server .bak file into MySQL? === The title is self explanatory. Is there a way of directly doing such kind of importing?
0
[ 2, 184, 20, 9010, 21, 4444, 255, 8128, 13, 9, 13344, 3893, 77, 51, 18, 22402, 60, 800, 3726, 3726, 14, 581, 25, 1119, 1396, 9863, 7496, 9, 25, 80, 21, 161, 16, 1703, 845, 145, 825, 16, 9010, 68, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Using Mercurial, is there an easy way to diff my working copy with the tip file in the default remote repository === When using mercurial, I'd like to be able to diff the working copy of a file with the tip file in my default remote repository. Is there an easy way to do this? I know I can do an "hg incoming -p" to see the patch sets of changes coming in, but it'd be nice to just directly see the actual changes for a particular file that I'd get if I do a pull of the latest stuff (or what I might be about put push out). The easiest thing I can think of right now is to create a little script that takes a look at the default location in .hg/hgrc and downloads the file using curl (if it's over http, otherwise scp it over ssh, or just do a direct diff if it's on the local file system) and then to diff the working copy or the tip against that temporary copy. I'm trying to sell mercurial to my team, and one of my team members brought this up today as something that they're able to do easily in SVN with their GUI tools.
0
[ 2, 568, 9046, 3594, 192, 15, 25, 80, 40, 2010, 161, 20, 20811, 51, 638, 4344, 29, 14, 4265, 3893, 19, 14, 12838, 5388, 24869, 800, 3726, 3726, 76, 568, 9046, 3594, 192, 15, 31, 22, 43, 101, 20, 44, 777, 20, 20811, 14, 638, 434...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 should I order my ctor parameters for DI/IOC? === I'm a bit of a DI newbie, so forgive me if this is the wrong approach or a silly question. Let's say I have a form which creates/updates an order, and I know it's going to need to retrieve a list of products and customers to display. I want to pass in the Order object that it's editing, but I also want to inject the ProductsService and CustomersService as dependencies. So I will want my IoC container (whichever one I go with) to supply the services, but it'll be up to the calling code to supply the Order object to edit. Should I declare the constructor as taking the Order object as the first parameter and the ProductsService and CustomersService after that, eg: public OrderForm(Order order, ProductsService prodsSvc, CustomersService custsSvc) ... or should the dependencies come first and the Order object last, eg: public OrderForm(ProductsService prodsSvc, CustomersService custsSvc, Order order) Does it matter? Does it depend on which IoC container I use? Or is there a "better" way?
0
[ 2, 184, 378, 31, 389, 51, 272, 2153, 12905, 26, 926, 118, 49, 2499, 60, 800, 3726, 3726, 31, 22, 79, 21, 1142, 16, 21, 926, 78, 5893, 15, 86, 8591, 55, 100, 48, 25, 14, 1389, 2141, 54, 21, 10752, 1301, 9, 408, 22, 18, 395, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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# Attributes On Fields === How do I set an attribute on a field anywhere in my assembly, then reflect on those field attributes in my entire assembly and get/set the field values that the attribute is attached too?
0
[ 2, 272, 5910, 13422, 27, 2861, 800, 3726, 3726, 184, 107, 31, 309, 40, 35, 14755, 27, 21, 575, 4922, 19, 51, 1475, 15, 94, 6907, 27, 273, 575, 13422, 19, 51, 1078, 1475, 17, 164, 118, 3554, 14, 575, 4070, 30, 14, 35, 14755, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Mask redirect to temporary domain with mod_rewrite === We are putting up a company blog at companyname.com/blog but for now the blog is a Wordpress installation that lives on a different server (blog.companyname.com). The intention is to have the blog and web site both on the same server in a month or two, but that leaves a problem in the interim. At the moment I am using mod_rewrite to do the following: http://companyname.com/blog/article-name redirects to http://blog.companyname.com/article-name Can I somehow keep the address bar displaying companyname.com/blog even though the content is coming from the latter blog.companyname.com? I can see how to do this if it is on the same server and vhost, but not across a different server? Thanks
0
[ 2, 5983, 302, 14706, 20, 4700, 4603, 29, 7226, 1, 99, 23716, 800, 3726, 3726, 95, 50, 3873, 71, 21, 237, 8146, 35, 237, 7259, 9, 960, 118, 220, 5567, 47, 26, 130, 14, 8146, 25, 21, 833, 5890, 7758, 30, 1551, 27, 21, 421, 8128,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 people think of the fossil DVCS? === fossil <http:\\www.fossil-scm.org> I found this recently and have started using it for my home projects. I want to hear what other people think of this VCS. What is missing in my mind, is IDE support. Hopefully it will come, but I use the command line just fine. My favorite things about fossil: single executable with built in web server wiki and bug tracking. The repository is just one SQLite (<http://www.sqlite.org>) databas file, easy to do backups on. I also like that I can run fossil from and keep the repository on my thumb drive. This means my software development has become completely portable. Tell me what you think....
0
[ 2, 98, 107, 148, 277, 16, 14, 9981, 13, 43, 8990, 18, 60, 800, 3726, 3726, 9981, 13, 1, 21127, 45, 1, 6483, 9, 15912, 947, 8, 18, 9095, 9, 5583, 1, 31, 216, 48, 1989, 17, 57, 373, 568, 32, 26, 51, 213, 2314, 9, 31, 259, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a standard encoding for NEEDED entries in ELF? === I'm trying to make some of my code a bit more friendly to non-pure-ascii systems and was wondering if there was a particular character encoding used for NEEDED entries in ELF binaries, or is it rather unstandard and based on the creating system's filesystem encoding (or even just directly the bytes that were passed to whatever created the binary) (if so is there any place in the binary that specifies the encoding? assuming the current systems encoding wouldn't work very well for my usage I think), are non-ascii names pretty much banned or something else?
0
[ 2, 25, 80, 21, 1236, 19608, 26, 851, 11399, 19, 15704, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 233, 109, 16, 51, 1797, 21, 1142, 91, 4753, 20, 538, 8, 21059, 8, 472, 1892, 49, 1242, 17, 23, 5712, 100, 80, 23, 21, 1498, 925...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
unwanted leading blank space on oracle number format === I need to pad numbers with leading zeros (total 8 digits) for display. I'm using oracle. select to_char(1011,'00000000') OPE_NO from dual; select length(to_char(1011,'00000000')) OPE_NO from dual; Instead of '00001011' I get ' 00001011'. Why do I get an extra leading blank space? What is the correct number formatting string to accomplish this? P.S. I realise I can just use `trim()`, but I want to understand number formatting better.
0
[ 2, 21095, 1005, 6463, 726, 27, 15759, 234, 2595, 800, 3726, 3726, 31, 376, 20, 4432, 2116, 29, 1005, 4606, 18, 13, 5, 20148, 469, 19076, 6, 26, 3042, 9, 31, 22, 79, 568, 15759, 9, 5407, 20, 1, 5433, 5, 1036, 1306, 15, 22, 2190...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 timer ticks in Python === I'm just trying to time a piece of code. The pseudocode looks like: start = get_ticks() do_long_code() print "It took " + (get_ticks() - start) + " seconds." How does this look in Python?
0
[ 2, 164, 85, 139, 8809, 18, 19, 20059, 800, 3726, 3726, 31, 22, 79, 114, 749, 20, 85, 21, 1855, 16, 1797, 9, 14, 8452, 9375, 1879, 101, 45, 799, 800, 164, 1, 1786, 4020, 5, 6, 107, 1, 2701, 1, 9375, 5, 6, 4793, 13, 7, 242, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Wouldn't MS Access(.mdb) file size reduce after deleting the content of database? === I was inserting data into a MS Access database using JDBC-ODBC driver. The blank mdb file was 2KB. After populating this database, the size grew to 155MB. Then I was deleting the data. But I found the size of mdb remains the same as 155MB. I don't get any errors. But is it normal this way? I would expect the file size reduces. If it is designed in this way, what is the idea behind it? Thanks
0
[ 2, 1265, 22, 38, 4235, 1381, 5, 9, 79, 9007, 6, 3893, 1072, 4136, 75, 121, 1336, 68, 14, 2331, 16, 6018, 60, 800, 3726, 3726, 31, 23, 14692, 68, 1054, 77, 21, 4235, 1381, 6018, 568, 487, 43, 7229, 8, 5648, 7229, 2425, 9, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Does a (.net) COM+ assembly need to be installed in the GAC? === I have a .net assembly that has a COM+ ServicedCopmonent in it and at the moment I install it into the GAC to get everything working. This means that I need to have every assembly that it references in the GAC as well. During development it is quite painful to make changes to thes assemblies, re-install them to the GAC and then test. Is it possible to maintain the COM+ component but not have everything in the GAC?
0
[ 2, 630, 21, 13, 5, 9, 2328, 6, 13, 960, 2430, 1475, 376, 20, 44, 4066, 19, 14, 4369, 150, 60, 800, 3726, 3726, 31, 57, 21, 13, 9, 2328, 1475, 30, 63, 21, 13, 960, 2430, 365, 43, 9734, 2111, 2291, 19, 32, 17, 35, 14, 688, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 all items from thread Queue === I have one thread that writes results into a Queue. In another thread (GUI), I periodically (in the IDLE event) check if there are results in the queue, like this: def queue_get_all(q): items = [] while 1: try: items.append(q.get_nowait()) except Empty, e: break return items Is this a good way to do it ? I'm asking because sometimes the waiting thread gets stuck for a few seconds without taking out new results.
0
[ 2, 164, 65, 3755, 37, 9322, 22521, 800, 3726, 3726, 31, 57, 53, 9322, 30, 6215, 1736, 77, 21, 22521, 9, 19, 226, 9322, 13, 5, 7215, 6, 15, 31, 19886, 13, 5, 108, 14, 18652, 807, 6, 2631, 100, 80, 50, 1736, 19, 14, 22521, 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 is the difference between include and extend in Ruby? === Just getting my head around Ruby metaprogramming... the mixin/modules always manage confuse me everytime. - **include** : mixes in specified module methods as **instance methods** in the target class - **extend** : mixes in specified module methods as **class methods** in the target class *So is the major difference just this or is a bigger dragon lurking?* e.g. module ReusableModule def module_method puts "Module Method: Hi there!" end end class ClassThatIncludes include ReusableModule end class ClassThatExtends extend ReusableModule end puts "Include" ClassThatIncludes.new.module_method # "Module Method: Hi there!" puts "Extend" ClassThatExtends.module_method # "Module Method: Hi there!"
0
[ 2, 98, 25, 14, 2841, 128, 468, 17, 7206, 19, 10811, 60, 800, 3726, 3726, 114, 1017, 51, 157, 140, 10811, 7618, 19746, 3863, 9, 9, 9, 14, 2917, 108, 118, 19673, 160, 550, 4705, 26465, 55, 352, 891, 9, 13, 8, 13, 1409, 22640, 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...
Which languages support *recursive* function literals / anonymous functions? === It seems quite a few mainstream languages support [function literals][1] these days. They are also called [anonymous functions][2], but I don't care if they have a name. The important thing is that a function literal is an expression which yields a function which hasn't already been defined elsewhere, so for example in C, `&printf` doesn't count. I'm curious which languages let you write function literals which are *recursive*. Wikipedia's "[anonymous recursion][3]" article doesn't give any programming examples. Let's use the recursive factorial function as the example. Here are the ones I know: - JavaScript / ECMAScript can do it with `callee`: function(n){if (n<2) {return 1;} else {return n * arguments.callee(n-1);}} - it's easy in languages with `letrec`, eg Haskell (which calls it `let`): > `let fac x = if x<2 then 1 else fac (x-1) * x in fac` and there are equivalents in Lisp and Scheme. Note that the binding of `fac` is local to the expression, so the whole expression is in fact an anonymous function. Are there any others? [1]: http://en.wikipedia.org/wiki/First-class_function [2]: http://en.wikipedia.org/wiki/Anonymous_function [3]: http://en.wikipedia.org/wiki/Anonymous_recursion
0
[ 2, 56, 2556, 555, 1637, 99, 24244, 2483, 1990, 20665, 18, 13, 118, 10364, 3719, 60, 800, 3726, 3726, 32, 2206, 1450, 21, 310, 7469, 2556, 555, 636, 22359, 20665, 18, 500, 2558, 165, 500, 158, 509, 9, 59, 50, 67, 227, 636, 210, 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...
in-house projects: to stable release or not? === Suppose you work at a medium-to-large software company with many independently-developed projects (independent coders) but which rely on each other (dependent code). If it were up to you, would you make sure each project produced stable branches so that the other projects could more reliably use those branches, or would you encourage projects to directly use the latest-available code from other projects? The advantage of a stable release is clear to me - a higher probability that your dependencies will work as advertized. Yet I can also see some good points to avoiding stable releases - each project has a little less work to do, and you can react very quickly to bugs that affect everyone, since your code is sort-of auto-updating all the time. For example, imagine there's a subtle security flaw at timestamp X in one in-house library - it might not be noticed until that code is widely used. If you're using stable release branches, you'll have to get every other project to modify their dependencies to effect the security fix. Without release branches, the fix is picked up immediately in the next build of all other projects. I'm especially interested if anyone has industry experience with both alternatives.
0
[ 2, 19, 8, 1682, 2314, 45, 20, 4521, 830, 54, 52, 60, 800, 3726, 3726, 5787, 42, 170, 35, 21, 4152, 8, 262, 8, 11312, 2306, 237, 29, 151, 9029, 8, 20102, 2314, 13, 5, 17390, 1797, 1224, 6, 47, 56, 12139, 27, 206, 89, 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...