unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Interpreting newlines with XSLT xsl:text? === I have an XSL stylesheet with content in an ``xsl:text`` node like this: <pre> &lt;xsl:text> foo bar baz &lt;/xsl:text> </pre> The stylesheet itself is a text file with "unix-style" newline line terminators. When I run this stylesheet on Windows the output has carriage return/newline pairs for everything *except* the contents of the ``xsl:text`` node. **Can I instruct the XSLT processor to translate the newline characters in the content of the ``xsl:text`` node into platform specific end-of-lines?** More context: I'm invoking the stylesheet from the [Apache Ant 1.7.1 XSLT task](http://ant.apache.org/manual/CoreTasks/style.html) like this: <pre> &lt;xslt in="in.xml" out="out.xml" style="stylesheet.xsl"/> </pre> The top of the stylesheet currently looks like this: <pre> &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xslt" exclude-result-prefixes="xalan"> </pre>
0
[ 2, 11584, 68, 78, 7939, 29, 993, 18, 255, 38, 993, 18, 255, 45, 11969, 60, 800, 3726, 3726, 31, 57, 40, 993, 18, 255, 1034, 17627, 29, 2331, 19, 40, 13, 7, 396, 18, 255, 45, 11969, 7, 15421, 101, 48, 45, 13, 1, 3515, 1, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SQL Date Range Split === Data (sample data with a date range and possibly other columns): Col1 FromDate ToDate 1. 1 1/1/2008 31/12/2010 2. 1 1/1/2009 31/12/2012 3. 1 1/1/2009 31/12/2014 Output: Col1 From Date ToDate 1. 1 1/1/2008 31/12/2008 (from row 1 above) 2. 1 1/1/2009 31/12/2010 (from rows 1,2 and 3 above) 3. 1 1/1/2011 31/12/2012 (from rows 2 and 3 above) 4. 1 1/1/2013 31/12/2014 (from row 3 above) Thx.
0
[ 2, 4444, 255, 1231, 978, 2132, 800, 3726, 3726, 1054, 13, 5, 6101, 5106, 1054, 29, 21, 1231, 978, 17, 2879, 89, 7498, 6, 45, 3313, 165, 37, 8209, 20, 8209, 137, 9, 137, 13, 8197, 8197, 2753, 1538, 11698, 9298, 2751, 172, 9, 137,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Striping out a link in jquery === I have a bit of html like so: <a href="#somthing" id="a1"><img src="something" /></a> <a href="#somthing" id="a2"><img src="something" /></a> I need to strip off the links so I'm just left with a couple of image tags. What would be the most efficient way to do this with jQuery?
0
[ 2, 4998, 68, 70, 21, 3508, 19, 487, 8190, 93, 800, 3726, 3726, 31, 57, 21, 1142, 16, 13, 15895, 101, 86, 45, 13, 1, 58, 746, 14057, 3726, 7, 5910, 10723, 96, 68, 7, 4924, 3726, 7, 58, 165, 7, 1, 1660, 263, 13, 18, 5453, 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...
How do I 'use' a perl module in a different directory? === I have a module in the parent directory of my script and I would like to 'use' it. If I do use '../Foo.pm'; I get syntax errors. I tried to do: push @INC, '..'; use EPMS; and .. apparently doesn't show up in @INC I'm going crazy! What's wrong here?
0
[ 2, 184, 107, 31, 13, 22, 3699, 22, 21, 416, 255, 12613, 19, 21, 421, 16755, 60, 800, 3726, 3726, 31, 57, 21, 12613, 19, 14, 4766, 16755, 16, 51, 3884, 17, 31, 83, 101, 20, 13, 22, 3699, 22, 32, 9, 100, 31, 107, 275, 13, 22...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[.NET , C#] How to avoid screen flickering when a control must be constantly repainted? === I have a simple panel that is used as a drawing surface. The goal here is to draw a 4 pixel wide outline around a child ListView under certain circumstances. I would like to make the outline pulsate when something can be dragged into it. I am just drawing a simple rectangle around the ListView and updating the opacity of the rectangle inside of a timer tick event. When the opacity is changed, the border is re-drawn. I am double-buffering the painting at this point. I am also only allowing a redraw every 15 ticks or so (the timer interval is 20 ms). After all of this, the drawing process still flickers a bit. This is not acceptable, so I need some guidance on how I could avoid this. I don't see a way around painting the control quite often. There needs to be a smooth transition from opaque to solid and back again. When I lower the tick interval enough (down to about 300 -500 ms), the flashing stops, but the refresh rate is too slow. I am open to any and all ideas. Perhaps the way I am approaching this is just plain wrong, or perhaps one of you have already created a glow effect and know what to do. Thanks for any help in advance.
0
[ 2, 636, 9, 2328, 13, 15, 272, 5910, 500, 184, 20, 2658, 2324, 22399, 76, 21, 569, 491, 44, 7545, 302, 19545, 60, 800, 3726, 3726, 31, 57, 21, 1935, 4113, 30, 25, 147, 28, 21, 3533, 1490, 9, 14, 1195, 235, 25, 20, 2003, 21, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why does this remote script cause IE6 to hang? === Please take a look at the html listed below and let me know why IE6 freezes when trying to load the remote script (located at 'http://code.katzenbach.com/Default.aspx'). The script returns JSONP and executes the 'callbackFunction' listed in the header. When it runs correctly, you'll see a pop-up alert showing numbers 1-500. This works fine in FF3 and IE7. I can't understand why it fails in Internet Explorer 6 -the processor gets pegged and everything hangs. Run it yourself and let me know if you experience the same problem. I've been staring at this problem all day. Thanks for your help. Andrew <html> <head> <script type="text/javascript"> function callbackFunction(Result) { alert(Result) ; } </script> <script type="text/javascript" src="http://code.katzenbach.com/Default.aspx?callback=callbackFunction&test=true&c=500"></script> </head> <body> Here </body> </html>
0
[ 2, 483, 630, 48, 5388, 3884, 1679, 13, 660, 379, 20, 4546, 60, 800, 3726, 3726, 2247, 247, 21, 361, 35, 14, 13, 15895, 1510, 1021, 17, 408, 55, 143, 483, 13, 660, 379, 11551, 18, 76, 749, 20, 6305, 14, 5388, 3884, 13, 5, 18215...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Copy protection and licensing tools. === I'm new to stackoverflow.com after hearing about it from Jon Skeet on DotNetRocks.This seems like the perfect place to ask this question. I am in the middle of trying to find a 3rd party Copy protection and licensing tool. The company that I work with have 4 products that need to be protected. We want to supply a Trail license (with extensions). A single user license and a floating license (where the client purchases a number to run over a network). We also want to be able to supply both the Single and Floating license as a subscription license. I have trialled DeployLX and although it seems to give everything that we need, and they are quick to answer emails, their documentation is truly awful with NO examples of how to achieve results. Has anyone any experience with DeployLX and if so, would you recommend it? Could you point me in the direction to find some real help on it? Finally, would anyone have any recommendations of a 3rd party licensing tool to use for very quick development. Thank you so much,
4
[ 2, 4344, 2057, 17, 15038, 4672, 9, 800, 3726, 3726, 31, 22, 79, 78, 20, 7566, 2549, 9990, 9, 960, 75, 3229, 88, 32, 37, 3938, 13, 5835, 1198, 27, 14123, 2328, 4651, 18, 9, 1565, 2206, 101, 14, 2107, 209, 20, 1349, 48, 1301, 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...
Navigation on validation failure in Seam/JSF === I've been playing with [Seam][1] (2.0.2.SP1) for a few weeks, and I have most of the basics nailed down, but I haven't come up with a decent solution to the following. Suppose I have a form at `/foo.xhtml`, with a rewrite rule such that URLs like `/foo.seam?id=<fooId>` are converted to `/foo/<fooId>`. There's a `commandButton` on the form with an action of `#{fooHome.update}`. I also have a navigation rule in `/foo.page.xml` that redirects back to a nice, bookmark-friendly GET after a successful POST: <navigation from-action="#{fooHome.update}"> <rule if-outcome="updated"> <redirect view-id="/foo.xhtml"> <param name="id" value="#{fooHome.instance.id}"/> </redirect> </rule> </navigation> The problem is when a validation error occurs, at which point the navigation rules get skipped, and I end up at `/foo` after the POST. **My question: Is there a way to redirect on validation errors, so the URL stays at `/foo/<fooId>`?** I tried rolling my own validation methods in `fooHome`, returning a "failed" outcome, but I don't really want invalid data getting past the validation phase (and thus into the current conversation). [1]: http://www.seamframework.org/
0
[ 2, 8368, 27, 27999, 2990, 19, 13927, 118, 728, 18, 410, 800, 3726, 3726, 31, 22, 195, 74, 791, 29, 636, 6858, 79, 500, 2558, 165, 500, 13, 5, 135, 9, 387, 9, 135, 9, 3401, 165, 6, 26, 21, 310, 1342, 15, 17, 31, 57, 127, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Alternative to libraries of static classes === I have a large collection of static 'Utility' classes that contain very generic static methods. For example, I have a CollectionUtility class that has useful methods like: public static void RemoveDuplicates<T>(ICollection<T> collection)... etc With C# 3.5 I've been converting these to extension methods. Now, I've heard some talk that in an 'enterprise level' application it is often considered best practice to avoid large libraries of these static classes and methods. I imagine that it could get quite hard to maintain. A question for those of you who work on large enterprise projects for large companies - do you maintain libraries of utility classes like these or not? What do you?
0
[ 2, 2676, 20, 8649, 16, 12038, 2684, 800, 3726, 3726, 31, 57, 21, 370, 1206, 16, 12038, 13, 22, 14255, 856, 22, 2684, 30, 3717, 253, 12733, 12038, 3195, 9, 26, 823, 15, 31, 57, 21, 1206, 14255, 856, 718, 30, 63, 4811, 3195, 101, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to make Publisher Policy file redirect assembly request === I have created a common library at work, and it is installed in the GAC on our test server. I've recently updated it and I want all of our applications to be using the update. I created a publisher policy assembly and installed it in the GAC along with the update, but when a web app loads Leggett.Common, 1.0.0.0, it isn't redirected to Leggett.Common, 1.1.0.0. I have the common assembly (there are actually five, but lets keep it simple) on a network drive, I created the publisher policy xml file there next to it and then used al.exe to create the publisher policy assembly in the same folder. After that I put the updated assembly in the GAC and then put the publisher policy assembly in the GAC. The common assembly is 'Leggett.Common.dll', the publisher policy file is '1.1.Leggett.Common.policy', and the publisher policy assembly is 'policy.1.1.Leggett.Common.dll'. What am I doing wrong?
0
[ 2, 184, 20, 233, 5916, 1486, 3893, 302, 14706, 1475, 3772, 800, 3726, 3726, 31, 57, 679, 21, 757, 1248, 35, 170, 15, 17, 32, 25, 4066, 19, 14, 4369, 150, 27, 318, 1289, 8128, 9, 31, 22, 195, 1989, 6372, 32, 17, 31, 259, 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...
CSS and lack of constants/variables issue === Given a stylesheet with a fully qualified reference to an image resource on another server, is there a good way to handle promotions through different environments that require a different base URL? > background-image: url > (evironmentSpecificURL/resourceName.foo); The environmentSpecificURL will vary from environment to environment and I don't want this file to be modified as it progresses from development, qa, staging, production, etc. I have ideas, but am interested in how others have dealt with this -- I'll post one of my ideas.
0
[ 2, 272, 18, 18, 17, 1792, 16, 3587, 18, 118, 8220, 579, 18, 1513, 800, 3726, 3726, 504, 21, 1034, 17627, 29, 21, 2337, 3135, 2801, 20, 40, 1961, 6577, 27, 226, 8128, 15, 25, 80, 21, 254, 161, 20, 3053, 2733, 18, 120, 421, 1124...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 determine whether an e-mail reaches its destination? === I have a PHP script that sends out critical e-mails that needs to reach its destination. I know how to check whether the e-mail sent successfully, the only issue is knowing whether it actually got to its recipient. Any suggestions? If there is no way of knowing, how would you handle this situation?
0
[ 2, 25, 80, 21, 161, 20, 3746, 1472, 40, 13, 62, 8, 8079, 5539, 82, 6970, 60, 800, 3726, 3726, 31, 57, 21, 13, 26120, 3884, 30, 11350, 70, 2507, 13, 62, 8, 8079, 18, 30, 2274, 20, 1470, 82, 6970, 9, 31, 143, 184, 20, 2631, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I get and set Environment variables in C#? === How can I get Environnement variables and if something is missing set the value?
0
[ 2, 184, 107, 31, 164, 17, 309, 2307, 12157, 19, 272, 5910, 60, 800, 3726, 3726, 184, 92, 31, 164, 21314, 2075, 556, 1130, 12157, 17, 100, 301, 25, 2863, 309, 14, 1923, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
What are some best practices for handling sensitive information? === I'm currently creating an application for a customer that will allow them to automatically bill their customers credit cards. I'm curious as to what are some **best practices** to safely store and access the credit card information, and for that matter, any other sensitive information, like social security numbers, account numbers and so on. I'm **assuming** encryption of some type will be employed, but before I dig in too deep I wanted to see how others are handling these types of requirements. Not that it matters, but we are designing the software using Microsoft SQL Server for the database, and using C# and ASP.NET.
0
[ 2, 98, 50, 109, 246, 5242, 26, 7988, 7830, 676, 60, 800, 3726, 3726, 31, 22, 79, 871, 2936, 40, 3010, 26, 21, 7705, 30, 129, 1655, 105, 20, 7499, 1071, 66, 5279, 3251, 4092, 9, 31, 22, 79, 7686, 28, 20, 98, 50, 109, 13, 1409...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
jquery tabs - getting newly selected index === I've previously used jquery's tabs extension to load page fragments via ajax, and to conceal or reveal hidden divs within a page. Both of these methods are well documented, and I've had no problems there. Now, however, I want to do something different with tabs. When the user selects a tab, it should reload the page entirely - the reason for this is that the contents of each tabbed section are somewhat expensive to render, so I don't want to just send them all at once and use the normal method of toggling 'display:none' to reveal them. My plan is to intercept the tabs' "select" event, and have that function reload the page with by manipulating document.location. How, in the 'select' handler, can I get the newly selected tab index and the html LI object it corresponds to? <pre> $('#edit_tabs').tabs( { selected: 2, // which tab to start on when page loads select: function(e, ui) { var t = $(e.target); // alert("data is " + t.data('load.tabs')); // undef // alert("data is " + ui.data('load.tabs')); // undef // This gives a numeric index... alert( "selected is " + t.data('selected.tabs') ) // ... but it's the index of the PREVIOUSLY selected tab, not the // one the user is now choosing. return true; // eventual goal is: // ... document.location= extract-url-from(something); return false; } }); </pre> Is there an attribute of the event or ui object that I can read that will give the index, id, or object of the newly selected tab or the anchor tag within it? Or is there a better way altogether to use tabs to reload the entire page?
0
[ 2, 487, 8190, 93, 6523, 18, 13, 8, 1017, 2771, 1704, 4348, 800, 3726, 3726, 31, 22, 195, 1343, 147, 487, 8190, 93, 22, 18, 6523, 18, 3896, 20, 6305, 2478, 10837, 1197, 20624, 15, 17, 20, 15195, 54, 6820, 3689, 13, 12916, 18, 363...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 tell if someone's faking a filetype? (PHP) === I'm programming something that allows users to store documents and pictures on a webserver, to be stored and retrieved later. When users upload files to my server, PHP tells me what filetype it is based on the extension. However, I'm afraid that users could rename a zip file as somezipfile.png and store it, thus keeping a zip file on my server. Is there any reasonable way to open an uploaded file and "check" to see if it truly is of the said filetype?
0
[ 2, 184, 107, 31, 494, 100, 737, 22, 18, 1399, 1581, 21, 3893, 4474, 60, 13, 5, 26120, 6, 800, 3726, 3726, 31, 22, 79, 3143, 301, 30, 2965, 3878, 20, 1718, 4374, 17, 3104, 27, 21, 2741, 10321, 106, 15, 20, 44, 8214, 17, 3685, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Loading text while doing a WebRequest === I have a button on my webform. Clicking this button will do an HttpWebRequest during the onclick event handler. After the request we copy the response from the request into HttpContext.Current.Response and send that to the client. This web request can take a while (up to 5 seconds, since it's generating a report). During this time the user has no indication that anything is going on, except for the browser progress bar and the spinning IE icon (if they're using IE). So I need a loading indicator while this is happening. I've tried using javascript that fires during the button's onclick event (using OnClientClick) and while that works, I don't know how to find out when the web request is finished. Since we just send the response to the client, a full postback doesn't happen. I've tried wrapping the button in an UpdatePanel and using the UpdateProgress, but when we send the response to HttpContext.Current.Response and call Response.End(), we get an error in the javascript, since the response isn't well formed (we're sending back an excel sheet for the user to download). Any ideas here?
0
[ 2, 17418, 12797, 1854, 133, 845, 21, 2741, 99, 10351, 800, 3726, 3726, 31, 57, 21, 5167, 27, 51, 2741, 4190, 9, 25590, 48, 5167, 129, 107, 40, 7775, 458, 3692, 10351, 112, 14, 27, 150, 10129, 807, 24641, 9, 75, 14, 3772, 95, 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...
Uninitialized string offset error from PHP import script === I have an import-from-excel script as part of a CMS that previously ran without issue. My shared-hosting provider has recently upgraded their infrastructure, including PHP from 5.1 to 5.2.6, and the script now returns "Uninitialized string offset: -XXX in /path/scriptname.php on line 27" (XXX being a decreasing number from 512) and /path/scriptname.php of course being the full path to script in question). It returns this error for every line of the excel file. Line 27 is just a return from within a function that is the first point at which the imported data is being processed: function GetInt4d($data, $pos) { return ord($data[$pos]) | (ord($data[$pos+1]) << 8) | (ord($data[$pos+2]) << 16) | (ord($data[$pos+3]) << 24); } It finally implodes with a "Fatal error: Allowed memory size of 47185920 bytes exhausted (tried to allocate 71 bytes) in /path/scriptname.php on line 133". There's nothing useful in Apache error logs. I am stumped. Anyone have any ideas of at least where to look? Even knowing if it's likely to be something within my script or something to do with upgrade would be useful. I had another issue with a different site on same provider that (after upgrade) couldn't write sessions to tmp directory (since resolved), but am pretty sure it's not that (?).
0
[ 2, 367, 27313, 1333, 3724, 17493, 7019, 37, 13, 26120, 9010, 3884, 800, 3726, 3726, 31, 57, 40, 9010, 8, 2665, 8, 1706, 11040, 3884, 28, 141, 16, 21, 2390, 18, 30, 1343, 717, 366, 1513, 9, 51, 2592, 8, 11694, 68, 11747, 63, 1989...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 see the hex values of a string in a VS2008 watch window? === I have a string in a watch window in VS2008 and want to see the hex representation of each character. If I right click there's a hexadecimal option but this doesn't appear to do anything. Anybody know how to view the string as a series of hex values?
0
[ 2, 184, 107, 31, 196, 14, 24, 396, 4070, 16, 21, 3724, 19, 21, 4611, 2753, 1455, 1463, 60, 800, 3726, 3726, 31, 57, 21, 3724, 19, 21, 1455, 1463, 19, 4611, 2753, 17, 259, 20, 196, 14, 24, 396, 5442, 16, 206, 925, 9, 100, 31,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Optimizing Flex when multiple modules are used === I have a Flex application where load time is extremely important (consumer site). i want to be able to get something up on screen and then allow additional modules to be loaded as necessary. The issue I'm facing is that the sum total of all the modules is much larger than if i were to include all the components in a single .swf file. Its pretty obvious why. For instance the classes needed for web service access seem to take about 100kb. If I dont use those classes in my main.swf then they'll be included in EVERY module that uses them. So if I have 5 modules thats an extra 500kB wasted. In theory I want 3 levels main.swf - minimum possible layout / style / font / framework type stuff common.swf - additional classes needed by module 1 + module 2 (such as web services) module1.swf - module 1 in site module2.swf - module 2 in site I dont know if this is even possible. I'm wondering if I can load swz/swf files for portions of the framework instead of the entire framework. I really need to get my main app size down to 200Kb. It grows to 450kb when I add web services and basic datagrid functionality. Any lessons learned would be appreciated.
0
[ 2, 19259, 3335, 14409, 76, 1886, 17113, 50, 147, 800, 3726, 3726, 31, 57, 21, 14409, 3010, 113, 6305, 85, 25, 3898, 681, 13, 5, 12124, 723, 106, 689, 6, 9, 31, 259, 20, 44, 777, 20, 164, 301, 71, 27, 2324, 17, 94, 1655, 1351, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 a Win32 process get the pid of its parent? === I'm currently passing the pid on the command line to the child, but is there a way to do this in the Win32 API? Alternatively, can someone alleviate my fear that the pid I'm passed might belong to another process after some time if the parent has died?
0
[ 2, 184, 92, 21, 628, 3125, 953, 164, 14, 13, 11031, 16, 82, 4766, 60, 800, 3726, 3726, 31, 22, 79, 871, 2848, 14, 13, 11031, 27, 14, 1202, 293, 20, 14, 850, 15, 47, 25, 80, 21, 161, 20, 107, 48, 19, 14, 628, 3125, 21, 2159...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How does your company do "Enterprise" Password Management? === We've talked about <b>personal</b> password management <a href=http://stackoverflow.com/questions/11362/what-is-your-favorite-password-storage-tool>here</a> but how do you guys manage your passwords at a company wide level?
0
[ 2, 184, 630, 154, 237, 107, 13, 7, 13679, 15839, 62, 7, 20884, 1097, 60, 800, 3726, 3726, 95, 22, 195, 4599, 88, 13, 1, 220, 1, 18160, 1, 118, 220, 1, 20884, 1097, 13, 1, 58, 746, 14057, 3726, 21127, 6903, 25325, 2549, 9990, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I make a class global to the entire application? === I would like to access a class everywhere in my application, how can I do this?
0
[ 2, 184, 92, 31, 233, 21, 718, 2062, 20, 14, 1078, 3010, 60, 800, 3726, 3726, 31, 83, 101, 20, 1381, 21, 718, 6417, 19, 51, 3010, 15, 184, 92, 31, 107, 48, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Best way to design for localization of strings === This is kinda a general question, open for opinions. I've been trying to come up with a good way to design for localization of string resources for a Windows MFC application and related utilities. My wishlist is: - Must preserve string literals in code (as opposed to replacing with macro #define resource ID's), so that the messages are still readable inline - Must allow localized string resources (duh) - Must not impose additional run-time environment restrictions (eg: dependency on .NET, etc.) - Should have minimal obtrusion into existing code (the less modification the better) - Should be debuggable - Should generate resource files which are editable by common tools (ie: common format) - Should not use copy/paste comment blocks to preserve literal strings in code, or anything else which creates the potential for de-synchronization - Would be nice to allow static (compile-time) checking that every "notated" string is in the resource file(s) - Would be nice to allow cross-language resource string pooling (for components in various languages, eg: native C++ and .NET) I have a way which fulfills all my wishlist to some extent except for static checking, but I have had to develop a bit of custom code to achieve it (and it has limitations). I'm wondering if anyone has solved this problem in a particularly good way.
0
[ 2, 246, 161, 20, 704, 26, 375, 1829, 16, 7887, 800, 3726, 3726, 48, 25, 21096, 21, 297, 1301, 15, 368, 26, 11900, 9, 31, 22, 195, 74, 749, 20, 340, 71, 29, 21, 254, 161, 20, 704, 26, 375, 1829, 16, 3724, 2566, 26, 21, 1936, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
IIS Recycling too often === We run a .NET 1.1 application on W2k3 server. The app pool is configured to recycle at 512MB. However, a week ago it started to recycle every 2 minutes. Since we run a web farm, the anonymous user we run IIS with is a domain account. About a week ago, that user account expired, and we have to re-enable it. Could that have caused any problems? Maybe that user lost some permissions, or was left out of the IIS_WPG group. Any advice will be greatly appreciated.
0
[ 2, 595, 18, 20777, 266, 478, 800, 3726, 3726, 95, 485, 21, 13, 9, 2328, 137, 9, 165, 3010, 27, 619, 135, 197, 240, 8128, 9, 14, 4865, 3067, 25, 28895, 20, 302, 12467, 35, 331, 918, 5024, 9, 207, 15, 21, 877, 1464, 32, 373, 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...
Silverlight 2.0 RC Drag and drop ordering of a ListBox === I am trying to give a ListBox drag and drop ordering functionality and I have hit a wall. I got it to work when I specify the list box items in xaml but it does not work when I bind to a list it no longer works because the items are no longer of a listboxitem type. I found this code http://blog.dobaginski.com/josh/?p=52 that allows me to get the underlying ListBoxItem but I can't get the mouse move event to fire. I have went through other tutorials but have not been able to find one that deals with a ListBox. Has anyone done this with a ListBox.
0
[ 2, 1172, 3130, 172, 9, 387, 16462, 5501, 17, 2804, 15775, 16, 21, 968, 5309, 800, 3726, 3726, 31, 589, 749, 20, 590, 21, 968, 5309, 5501, 17, 2804, 15775, 18548, 17, 31, 57, 770, 21, 769, 9, 31, 330, 32, 20, 170, 76, 31, 19077...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Open source projects with great Java/C# code - any suggestions? === Does anyone have any suggestions of large open source projects with high quality code that would be good to study.
0
[ 2, 368, 1267, 2314, 29, 374, 8247, 118, 150, 5910, 1797, 13, 8, 186, 18389, 60, 800, 3726, 3726, 630, 1276, 57, 186, 18389, 16, 370, 368, 1267, 2314, 29, 183, 2190, 1797, 30, 83, 44, 254, 20, 949, 9, 3, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
To be nor not to be with duplicate models === In my new assignment, I have inherited this legacy chunk, which I had to redesign and refactor. The scope was initially restricted to the Presentation tier, which happened to be the bulkiest of all. During the course of analysis, it was realised that the application was built over a period of time with various modules using different classes to depict the same model. These models are actually used to bind information into both view and db tier (Code reuse somebody?). The binding logic is a complex routine and was stabilised after multiple rounds of testing. Now I have this dilema of whether to retain these semantically duplicate but syntactically inconsistent models or to start with a clean slate. The second option would mean revamping the whole application and the schedules don't allow for that, but I have a bad inkling. Can you guys share some inside thoughts (pros & cons) and any unforeseen problems I may face in future.
0
[ 2, 20, 44, 2127, 52, 20, 44, 29, 19429, 2761, 800, 3726, 3726, 19, 51, 78, 8427, 15, 31, 57, 7179, 48, 7780, 15009, 15, 56, 31, 41, 20, 23903, 17, 302, 17455, 9, 14, 9914, 23, 1537, 7079, 20, 14, 6364, 7197, 15, 56, 1190, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What happens if I don't close a System.Diagnostics.Process in my C# console app? === I have a C# app which uses a System.Diagnostics.Process to run another exe. I ran into some example code where the process is started in a try block and closed in a finally block. I also saw example code where the process is not closed. What happens when the process is not closed? Are the resources used by the process reclaimed when the console app that created the process is closed? Is it bad to open lots of processes and not close any of them in a console app that's open for long periods of time? Cheers!
0
[ 2, 98, 5531, 100, 31, 221, 22, 38, 543, 21, 329, 9, 4286, 21944, 18, 9, 16835, 19, 51, 272, 5910, 8650, 4865, 60, 800, 3726, 3726, 31, 57, 21, 272, 5910, 4865, 56, 2027, 21, 329, 9, 4286, 21944, 18, 9, 16835, 20, 485, 226, 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...
Virtual Desktop Software - Best practices === I've tried various virtual desktops and they seem to do what they advertise. However, my problem is coming up with a good set of rules, like which set of windows should I keep on each desktop. I typically have programs like these running: VS.NET, Explorer, Browser/mail, Task manager, command windows etc. **So the question is: How do you split your windows between virtual desktops (as to minimize hunting for lost windows and maximizing benefits of virtual desktops)?**
0
[ 2, 6599, 17404, 2306, 13, 8, 246, 5242, 800, 3726, 3726, 31, 22, 195, 794, 617, 6599, 17404, 18, 17, 59, 2260, 20, 107, 98, 59, 28490, 9, 207, 15, 51, 1448, 25, 880, 71, 29, 21, 254, 309, 16, 1761, 15, 101, 56, 309, 16, 1936...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can I specify a generic type in XAML? === In XAML I can declare a DataTemplate so that the template is used whenever a specific type is displayed. For example, this DataTemplate will use a TextBlock to display the name of a customer: <DataTemplate DataType="{x:Type my:Customer}"> <TextBlock Text="{Binding Name}" /> </DataTemplate> I'm wondering if it's possible to define a DataTemplate that will be used any time an IList&lt;Customer&gt; is displayed. So if a ContentControl's Content is, say, an ObservableCollection&lt;Customer&gt; it would use that template. Is it possible to declare a generic type like IList<Customer> in XAML using the {x:Type} Markup Extension?
0
[ 2, 92, 31, 19077, 21, 12733, 1001, 19, 13, 6791, 8184, 60, 800, 3726, 3726, 19, 13, 6791, 8184, 31, 92, 10123, 21, 1054, 9577, 6554, 86, 30, 14, 22894, 25, 147, 6634, 21, 1903, 1001, 25, 6115, 9, 26, 823, 15, 48, 1054, 9577, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Simple PHP ORM === I'm looking for an ORM (Object-Relational Mapper) for PHP. I want something simple that I can get started with quickly. I'm used to ActiveRecord in Rails, but I don't need a full framework. My partner knows PHP, but is not really a programmer, and learning a framework would take more time than the project. Thanks, Craig
0
[ 2, 1935, 13, 26120, 54, 79, 800, 3726, 3726, 31, 22, 79, 699, 26, 40, 54, 79, 13, 5, 23793, 8, 99, 10832, 192, 2942, 1432, 6, 26, 13, 26120, 9, 31, 259, 301, 1935, 30, 31, 92, 164, 373, 29, 976, 9, 31, 22, 79, 147, 20, 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...
Deciding what functionality to implement in your Database Server === RDBMS packages today offer a tremendous amount of functionality beyond standard data storage and retrieval. SQL Server for example can send emails, expose web service methods, and execute CLR methods amongst other things. However, I have always tried to limit the amount of processing my database server does to just data storage and retrieval as much as possible, for the following reasons: - A database server is harder to scale than web servers - In a lot of projects I've worked on, the DB server is a lot busier than the web servers, and thus has less spare capacity - It potentially exposes your database server to a security attack (web services for example) My question is, are there a set of known best practices for what functionality should and should not be implemented by a database server? What recommendations do you have for people starting new projects?
0
[ 2, 11211, 98, 18548, 20, 8713, 19, 154, 6018, 8128, 800, 3726, 3726, 13, 897, 13178, 18, 16875, 786, 1994, 21, 14622, 2006, 16, 18548, 1701, 1236, 1054, 4326, 17, 28419, 9, 4444, 255, 8128, 26, 823, 92, 2660, 8517, 18, 15, 13833, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Regular expression to match start of filename and filename extension === What is the regex to match filenames that start with 'Run' and have a filename extension of '.py'? It should match any of the following: RunFoo.py RunBar.py Run42.py It should not match: myRunFoo.py RunBar.py1 Run42.txt *(I am a regex novice and am more familiar with sql wildcards so the equivalent of what I am searching for would be "..LIKE 'Run%.py'...")*
0
[ 2, 1290, 1803, 20, 730, 799, 16, 3893, 7259, 17, 3893, 7259, 3896, 800, 3726, 3726, 98, 25, 14, 7953, 1706, 20, 730, 3893, 7259, 18, 30, 799, 29, 13, 22, 3169, 22, 17, 57, 21, 3893, 7259, 3896, 16, 13, 22, 9, 6448, 22, 60, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I programmatically use the "using" keyword in C#? === I have some System.Diagnotics.Processes to run. I'd like to call the close method on them automatically. Apparently the "using" keyword does this for me. Is this the way to use the using keyword? foreach(string command in S) // command is something like "c:\a.exe" { try { using(p = Process.Start(command)) { // I literally put nothing in here. } } catch (Exception e) { // notify of process failure } } I'd like to start multiple processes to run concurrently.
0
[ 2, 184, 107, 31, 625, 6732, 1326, 275, 14, 13, 7, 12655, 7, 1246, 9587, 19, 272, 5910, 60, 800, 3726, 3726, 31, 57, 109, 329, 9, 1115, 21887, 11677, 9, 16835, 160, 20, 485, 9, 31, 22, 43, 101, 20, 645, 14, 543, 2109, 27, 105...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
order of static constructors/initializers in C# === While working on a C# app I just noticed that in several places static initializers have dependencies on each other like this: static private List<int> a = new List<int>() { 0 }; static private List<int> b = new List<int>() { a[0] }; Without doing anything special that worked. Is that just luck? Does C# have rules to resolve this? In looking I tried a cyclical dependency like this: static private List<int> a = new List<int>() { b[0] }; static private List<int> b = new List<int>() { a[0] }; and the program didn't run the same (the test suit failed across the board and I didn't look further).
0
[ 2, 389, 16, 12038, 6960, 248, 18, 118, 27313, 11907, 18, 19, 272, 5910, 800, 3726, 3726, 133, 638, 27, 21, 272, 5910, 4865, 31, 114, 2711, 30, 19, 238, 1489, 12038, 2104, 11907, 18, 57, 29411, 27, 206, 89, 101, 48, 45, 12038, 93...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MVC model structure in Python === I'm having problems structuring classes in the Model part of an MVC pattern in my Python app. No matter how I turn things, I keep running into circular imports. Here's what I have: **Model/__init__p.y** - should hold all Model class names so I can do a "from Model import User" e.g. from a Controller or a unit test case **Model/Database.py** - holds Database class - needs to import all Model classes to do ORM - initialization should be performed on first module import, i.e. no extra init calls or instantiations (all methods on Database class are @classmethods) **Model/User.py** - contains User model class - needs access to Database class to do queries - should inherit from base class common to all Model classes to share functionality (database persistency methods, parameter validation code etc.) I have yet to see a real world Python app employing MVC, so my approach is probably un-Pythonic (and possibly a language-agnostic mess on top of that...) - any suggestions on how to solve this? Thanks, Simon
0
[ 2, 307, 8990, 1061, 1411, 19, 20059, 800, 3726, 3726, 31, 22, 79, 452, 1716, 13, 10346, 10450, 2684, 19, 14, 1061, 141, 16, 40, 307, 8990, 3732, 19, 51, 20059, 4865, 9, 90, 1161, 184, 31, 805, 564, 15, 31, 643, 946, 77, 8155, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Issues with client consuming a .net web service upgraded from .NET 1.1 to 3,5 === I am working on a web application that was recently converted from Visual Studio 2003 to Visual Studio 2008. The application contained some web services that were written using the .NET 1.1 Framework and Web Service Enhancements 2.0. They were converted to the .NET 3.5 framework using the VS 2008 Conversion Wizard Tool. A client application which is still written using the .NET 1.1 framework has a reference to the updated web service and try to consume the web service and received the following error: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: (web service URI) The URL Behavior is set to static for the reference and the proxy class inheritance was changed from System.Web.Services.Protocols.SoapHttpClientProtocol namespace to Microsoft.Web.Services2.WebServicesExtension namespace If you need additional information or need to see some source code, please let me know.
0
[ 2, 1549, 29, 6819, 13, 17601, 21, 13, 9, 2328, 2741, 365, 9958, 37, 13, 9, 2328, 137, 9, 165, 20, 203, 15, 264, 800, 3726, 3726, 31, 589, 638, 27, 21, 2741, 3010, 30, 23, 1989, 3494, 37, 3458, 1120, 973, 20, 3458, 1120, 570, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 open a link in the default web browser from an HTA? === I'm working on an application that is implemented as an HTA. I have a series of links that I would like to have open in the system's default web browser. Using `<a href="url" target="_new">` opens the link in IE regardless of the default browser. Is there a way to use the default browser? Using JavaScript is an option.
0
[ 2, 184, 92, 31, 368, 21, 3508, 19, 14, 12838, 2741, 16495, 37, 40, 13, 17134, 60, 800, 3726, 3726, 31, 22, 79, 638, 27, 40, 3010, 30, 25, 6807, 28, 40, 13, 17134, 9, 31, 57, 21, 231, 16, 6271, 30, 31, 83, 101, 20, 57, 368,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why is Eclipse deleting my files and putting them in 'Local History'! === Several times now I've had Eclipse delete files for me seemingly randomly - then they appear under the 'Local History' option. What is going on! I'm definitely not just deleting things by mistake. Most recently it deleted my template files under `html-template` which are quite important! I have an AIR project and a web project that references the `src` directory inside the AIR project. Usually I close one project while working on the other. FYI: Currently my backup solution is `Windows Home Server` which means I have to go home to find a file if its lost in some other fashion and not in history. Yes I do plan to rectify that!
0
[ 2, 483, 25, 11652, 121, 1336, 68, 51, 6488, 17, 3873, 105, 19, 13, 22, 15580, 447, 22, 187, 800, 3726, 3726, 238, 436, 130, 31, 22, 195, 41, 11652, 27448, 6488, 26, 55, 9688, 21324, 13, 8, 94, 59, 1893, 131, 14, 13, 22, 15580,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why is MPI considered harder than shared memory and Erlang considered easier, when they are both message-passing? === There's a lot of interest these days in Erlang as a language for writing parallel programs on multicore. I've heard people argue that Erlang's message-passing model is easier to program than the dominant shared-memory models such as threads. Conversely, in the high-performance computing community the dominant parallel programming model has been MPI, which also implements a message-passing model. But in the HPC world, this message-passing model is generally considered very difficult to program in, and people argue that shared memory models such as OpenMP or UPC are easier to program in. Does anybody know why there is such a difference in the perception of message-passing vs. shared memory in the IT and HPC worlds? Is it due to some fundamental difference in how Erlang and MPI implement message passing that makes Erlang-style message-passing much easier than MPI? Or is there some other reason?
0
[ 2, 483, 25, 4628, 49, 724, 5229, 119, 2592, 1912, 17, 13, 106, 9949, 724, 4950, 15, 76, 59, 50, 156, 2802, 8, 6201, 68, 60, 800, 3726, 3726, 80, 22, 18, 21, 865, 16, 1163, 158, 509, 19, 13, 106, 9949, 28, 21, 816, 26, 1174, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
FileLoadException on windows 2003 for managed c++ dll === My company has login integration with GroupWise, and Exchange 5.5/2000+. The Exchange 5.5/GroupWise logic is done using wldap32.dll (win32), and so the login code is in a managed c++ class. When the configuration tool (or the backend service) tries to load the dll built off this managed c++ project on my XP development box, it works fine. On QA/Customer Windows 2003 boxes, a FileLoadException is thrown. First off, this used to work fine. Secondly, I've validated the same working code on my box fails on the qa box. How can I track down the cause of this exception?
0
[ 2, 3893, 8294, 10066, 872, 27, 1936, 973, 26, 1471, 272, 20512, 13, 43, 211, 800, 3726, 3726, 51, 237, 63, 6738, 108, 8078, 29, 214, 10474, 15, 17, 1950, 331, 9, 10551, 3050, 2430, 9, 14, 1950, 331, 9, 10551, 8024, 10474, 7085, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Should I just move the file or create a class which moves it? === Okay, I got this small program which tags (as in ID3v2.4 etc.) some music files. Now I want the user to have the option to move and/or rename those tagged files if he/she wishes to. Considering that I am trying to keep a fairly clean and loosely coupled design in this system (even though extensibility is not really important here, it's just fun), would you just call `someFileInfoObject.Move(someWhere)` where `someWhere` is the applied pattern or would it be wise to implement some classes - maybe MoveFileStrategy, RenameFileStrategy (I know that moving/renaming can be considered the same in some systems, but I want them to be enabled separately) - which figure out the destination and whether the strategy should be applied when an `Apply(FileInfo file)` method or so is called. If you think that some strategy classes may be useful, do you have any suggestion on a good implementation strategy? As already said, over-engineering is not really an issue here, because it is a fun project mainly targeted at getting some programming and engineering practice. :)
0
[ 2, 378, 31, 114, 780, 14, 3893, 54, 1600, 21, 718, 56, 4927, 32, 60, 800, 3726, 3726, 1705, 15, 31, 330, 48, 284, 625, 56, 3383, 18, 13, 5, 472, 19, 4924, 240, 710, 135, 9, 300, 2722, 9, 6, 109, 232, 6488, 9, 130, 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...
Would you consider this a singleton? === Imagine in the Global.asax.cs file I had an instance class as a private field, lets say like this: private MyClass _myClass = new MyClass(); and I had on Global a static method called GetMyClass() that gets the current HttpApplication and returns that instance. public static MyClass GetMyClass() { return ((Global)HttpContext.Current.ApplicationInstance)._myClass; } So I could get the instance on the current requests httpapplication by calling Global.GetMyClass(). Keep in mind that there is more than 1 (Global)HttpApplication. There is an HttpApplication for each request and they are pooled/shared, so in the truest sense it is not a real singleton. But it does follow the pattern to a degree. So as the question asked, would you consider this a Singleton, or at the very least the singleton pattern. Would you say it should not be used? Would you discourage its use? Would you say its bad practice like a true singleton. Or would you say its not a true singleton so its ok, and not bad practice. Would you recommend this as a semi quasi singleton where an instance per request is required? If not what other pattern/suggestion would you use/give? Have you ever used anything such as this? I have used this on past projects but I am unsure if its a practice I should stay away from. I have never had any issues in the past though. Please give me your thoughts and opinions on this.
0
[ 2, 83, 42, 3563, 48, 21, 345, 444, 60, 800, 3726, 3726, 4382, 19, 14, 2062, 9, 8588, 396, 9, 6824, 3893, 31, 41, 40, 4851, 718, 28, 21, 932, 575, 15, 6884, 395, 101, 48, 45, 932, 51, 1898, 13, 1, 915, 1898, 800, 78, 51, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Quick-and-dirty way to ensure only one instance of a shell script is running at a time === What's a quick-and-dirty way to make sure that only one instance of a shell script is running at a given time?
0
[ 2, 2231, 8, 290, 8, 28067, 161, 20, 4062, 104, 53, 4851, 16, 21, 3593, 3884, 25, 946, 35, 21, 85, 800, 3726, 3726, 98, 22, 18, 21, 2231, 8, 290, 8, 28067, 161, 20, 233, 562, 30, 104, 53, 4851, 16, 21, 3593, 3884, 25, 946, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
What's the best way to handle landscape/portrait differences in IB? === I have a view that supports landscape and portrait viewing, with the controls all moving around when you switch from one to the other. I'm currently doing this by setting the .center of each one of my controls when the user rotates the phone. The problem is that this is tedious, and requires a lot of code, and seems to defeat the purpose of using Interface Builder in the first place. My question is: is there a way in Interface Builder for one view to support multiple looks (one for landscape one for portrait)? If not how do other people do this with IB? Do you set up 2 views?
0
[ 2, 98, 22, 18, 14, 246, 161, 20, 3053, 4453, 118, 26423, 4921, 19, 13, 4598, 60, 800, 3726, 3726, 31, 57, 21, 1418, 30, 6747, 4453, 17, 5548, 11244, 15, 29, 14, 8671, 65, 1219, 140, 76, 42, 5521, 37, 53, 20, 14, 89, 9, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
C# Retrieving correct DbConnection object by connection string === I have a connection string being passed to a function, and I need to create a DbConnection based object (i.e. SQLConnection, OracleConnection, OLEDbConnection etc) based on this string. Is there any inbuilt functionality to do this, or any 3rd party libraries to assist. We are not necessarily building this connection string, so we cannot rely on a format the string is written in to determine its type, and I would *prefer* not to have to code up all combinations and permutations of possible connection strings
0
[ 2, 272, 5910, 13, 6239, 3272, 8397, 4456, 13, 9007, 25996, 872, 3095, 34, 2760, 3724, 800, 3726, 3726, 31, 57, 21, 2760, 3724, 142, 1100, 20, 21, 1990, 15, 17, 31, 376, 20, 1600, 21, 13, 9007, 25996, 872, 432, 3095, 13, 5, 49, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Determine if swf is in a "debug" player or mode === Is there a way using Flash (CS3+AS3) to determine if the published swf is running in a debug player or in Flash's debug mode? I'm aware that Flex provides the ability to setup different build targets (release/debug) and that you can use something like `CONFIG::debug` for `#ifdef` style inclusion of code at compile time. I'm imagining something like `System.isDebug()` but can't find anything. I want to use this because there's debug functionality in my app that I _definitely_ don't want to be available in a production environment.
0
[ 2, 3746, 100, 13, 18, 15263, 25, 19, 21, 13, 7, 546, 16254, 7, 517, 54, 3740, 800, 3726, 3726, 25, 80, 21, 161, 568, 4433, 13, 5, 6824, 240, 2430, 472, 240, 6, 20, 3746, 100, 14, 467, 13, 18, 15263, 25, 946, 19, 21, 121, 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...
Actionscript 3 Caching framework/library === Anyone know of a good caching library/framework for Actionscript 3? Extra points for being compatible with Flash CS3, and being free (as in beer).
0
[ 2, 1028, 8741, 203, 1658, 7192, 6596, 118, 1210, 2559, 622, 800, 3726, 3726, 1276, 143, 16, 21, 254, 1658, 7192, 1248, 118, 8361, 3783, 26, 1028, 8741, 203, 60, 2230, 819, 26, 142, 14961, 29, 4433, 272, 18, 240, 15, 17, 142, 551, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Prevent direct access to a PHP page. === How do I prevent my users from accessing directly pages meant for ajax calls only? Passing a key during ajax call seems like a solution, whereas access without the key will not be processed. But it is also easy to fabricate the key, no? Curse of View Source... p/s: Using Apache as webserver.
0
[ 2, 2501, 1744, 1381, 20, 21, 13, 26120, 2478, 9, 800, 3726, 3726, 184, 107, 31, 2501, 51, 3878, 37, 1381, 68, 1703, 4434, 1380, 26, 20624, 3029, 104, 60, 2848, 21, 1246, 112, 20624, 645, 2206, 101, 21, 4295, 15, 5142, 1381, 366, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Eclipse Subversion plugin should I use? === <a href="http://subclipse.tigris.org/">Subclipse</a>, <a href="http://www.eclipse.org/subversive/">Subversive</a>, or <a href="http://www.google.com/search?hl=en&safe=off&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=svn+eclipse&spell=1">something else</a>? There's a bit of <a href="http://www.google.com/search?source=ig&hl=en&rlz=&q=subclipse+vs+subversive&btnG=Google+Search&meta=">debate</a> around the topic, can we come to some conclusion here?
0
[ 2, 56, 11652, 972, 10898, 10922, 108, 378, 31, 275, 60, 800, 3726, 3726, 13, 1, 58, 746, 14057, 3726, 7, 21127, 6903, 7563, 150, 6013, 870, 9, 8407, 2777, 9, 5583, 118, 7, 1, 7563, 150, 6013, 870, 1, 118, 58, 1, 15, 13, 1, 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...
Return values from different tables based on a priority === Assuming I have three tables : TableA (key, value) TableB (key, value) TableC (key, value) and I want to return a value for all keys. If the key exists in TableC return that value else if the key exists in B return that value else return the value from table A The best I have come up with so far is SELECT key,Value FROM TableA WHERE key NOT IN (SELECT key FROM TableB) AND key NOT IN (SELECT key FROM TableC) UNION SELECT key,Value FROM TableB WHERE key NOT IN (SELECT key FROM TableC) UNION SELECT key,Value FROM TableC But this seems pretty brute force. Anyone know a better way?
0
[ 2, 788, 4070, 37, 421, 7484, 432, 27, 21, 9857, 800, 3726, 3726, 11704, 31, 57, 132, 7484, 13, 45, 859, 58, 13, 5, 4237, 15, 1923, 6, 859, 220, 13, 5, 4237, 15, 1923, 6, 859, 150, 13, 5, 4237, 15, 1923, 6, 17, 31, 259, 20,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Concatenate regex literal in javascript === Is it possible to do something like this? var pattern = /some regex segment/ + /* comment here */ /another segment/; Or do I have to use new RegExp() syntax and concatenate a string? I'd prefer to use the literal as the code is both more self-evident and concise.
0
[ 2, 1065, 9530, 8820, 7953, 1706, 20665, 19, 8247, 8741, 800, 3726, 3726, 25, 32, 938, 20, 107, 301, 101, 48, 60, 4033, 3732, 800, 13, 118, 3220, 7953, 1706, 5631, 118, 2754, 13, 118, 2483, 6484, 235, 1637, 118, 13, 118, 14945, 563...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Convert Month Number to Month Name Function in SQL === I have months stored in SQL Server as 1,2,3,4,...12. I would like to display them as January,February etc. Is there a function in SQL Server like MonthName(1) = January? I am trying to avoid a CASE statement, if possible. Thanks
0
[ 2, 8406, 1617, 234, 20, 1617, 204, 1990, 19, 4444, 255, 800, 3726, 3726, 31, 57, 818, 8214, 19, 4444, 255, 8128, 28, 13, 15793, 15, 240, 15, 300, 15, 9, 9, 9, 918, 9, 31, 83, 101, 20, 3042, 105, 28, 320, 15, 9513, 2722, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What other objects are accessible inside <%# %> tags in aspx? === I run into similar codes like this all the time in aspx pages: <asp:CheckBox Runat="server" ID="myid" Checked='<%# DataBinder.Eval(Container.DataItem, "column").Equals(1) %>'> I was wondering what other objects I have access to inside of that <%# %> tag. How come DataBinder.Eval() and Container.DataItem are not visible anywhere inside .CS code?
0
[ 2, 98, 89, 3916, 50, 7342, 572, 13, 1, 11881, 5910, 13, 11881, 1, 3383, 18, 19, 28, 306, 396, 60, 800, 3726, 3726, 31, 485, 77, 835, 11358, 101, 48, 65, 14, 85, 19, 28, 306, 396, 4434, 45, 13, 1, 472, 306, 45, 12542, 5309, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Actionscript3 E4X XML and CSS: Do I really have to use CDATA? === When working with CSS inside of XML such as <span class="IwuvAS3"></span> when parsed in flash, if I don't use CDATA like the following: <![CDATA[<span class="IwuvAS3"></span>]]> then the parsed data drops down a line for every "<" character it sees. When parsing the data into a single-line text field, nothing was shown because it was actually down a line. Soon as I wrap it inside of <code>CDATA</code> it works great. I have played with <code>prettyIndent</code>, and as I understand <code>ignoreWhite</code> is true by default. Is there a way to parse the data without the use of <code>CDATA</code> and keep the implied line breaks out?
0
[ 2, 1028, 8741, 240, 13, 62, 300, 396, 23504, 17, 272, 18, 18, 45, 107, 31, 510, 57, 20, 275, 1745, 4375, 60, 800, 3726, 3726, 76, 638, 29, 272, 18, 18, 572, 16, 23504, 145, 28, 13, 1, 18, 3206, 718, 3726, 7, 49, 9921, 8471, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Generate View for iPhone application using interface builder.? === I wanted to generate one fix view using interface builder, but the size of that view is exceeding the size of iphone screen,and I am not able to maximize screen. I wanted to show table view in that screen. I did enabled scrolling but that didn't work, Thanks in advance.
0
[ 2, 7920, 1418, 26, 21024, 3010, 568, 6573, 14960, 9, 60, 800, 3726, 3726, 31, 417, 20, 7920, 53, 6098, 1418, 568, 6573, 14960, 15, 47, 14, 1072, 16, 30, 1418, 25, 15491, 14, 1072, 16, 21024, 2324, 15, 290, 31, 589, 52, 777, 20, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Building MFC Automation example (to access Excel using OLE automation). Can't compile === I'm trying to build the example described at http://support.microsoft.com/kb/178749/EN-US/ in order to build an application that programatically accesses Excel using Automation. I have Visual C++ 2005/Visual Studio 2005. Some of the instructions don't exactly match up (classwizard, mostly), but the general idea seems to be the same. Problems: I don't end up with an excel.h file after using the "new class" to create my wrapper classes. So I can' t #include that file as it specifies in step 13. I do get a excel.tlh and an excel.tli in my windebug directory, but that doesn't seem to work. I tried all orders for #include "stdafx.h" #include "debug/excel.tli" #include "debug/excel.tlh" ... including leaving one of those files out of the compile, but I still end up with a ton of compile errors. Here's the top 5 compile errors with the above #includes: 1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C2653: 'Adjustments' : is not a class or namespace name 1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C2146: syntax error : missing ';' before identifier 'GetParent' 1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C2433: 'IDispatchPtr' : 'inline' not permitted on data declarations 1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(16) : error C3861: 'get_Parent': identifier not found Here's the top 5 errors with these includes: #include "stdafx.h" #include "debug/excel.tlh" 1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tlh(550) : error C3121: cannot change GUID for class 'IFilter' 1> c:\program files\microsoft sdks\windows\v6.0\include\comdef.h(483) : see declaration of 'IFilter' 1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tlh(1541) : error C2786: 'BOOL (__stdcall *)(HDC,int,int,int,int)' : invalid operand for __uuidof 1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tlh(1541) : error C2923: '_com_IIID' : 'Rectangle' is not a valid template type argument for parameter '_Interface' 1> c:\program files\microsoft sdks\windows\v6.0\include\wingdi.h(3667) : see declaration of 'Rectangle' 1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tlh(1541) : error C3203: '_com_IIID' : unspecialized class template can't be used as a template argument for template parameter '_IIID', expected a real type Here's the top 5 errors with these includes: #include "stdafx.h" #include "debug/excel.tli" 1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C2653: 'Adjustments' : is not a class or namespace name 1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C2146: syntax error : missing ';' before identifier 'GetParent' 1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C2433: 'IDispatchPtr' : 'inline' not permitted on data declarations 1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Thanks in advance.
0
[ 2, 353, 307, 7061, 23217, 823, 13, 5, 262, 1381, 20700, 568, 12116, 23217, 6, 9, 92, 22, 38, 26561, 800, 3726, 3726, 31, 22, 79, 749, 20, 1895, 14, 823, 745, 35, 7775, 6903, 24168, 9, 22019, 12980, 9, 960, 118, 18167, 118, 10374...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Implementation Details of the Java AWT on Solaris === ###Can anyone give an overview as to the way AWT interacts with the graphics on a Solaris? ###ie: What native libraries, if any, is it dependent on.
0
[ 2, 6123, 3289, 16, 14, 8247, 13, 3885, 38, 27, 4535, 403, 800, 3726, 3726, 6926, 5910, 5910, 1245, 1276, 590, 40, 21598, 28, 20, 14, 161, 13, 3885, 38, 10001, 18, 29, 14, 8351, 27, 21, 4535, 403, 60, 6926, 5910, 5910, 660, 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, 0, 0, 0, 0, 0, 0...
How does the DropBox Mac client work? === I've been looking at the [DropBox][1] Mac client and I'm currently researching implementing a similar interface for a different service. How exactly do they interface with finder like this? I highly doubt these objects represented in the folder are actual documents downloaded on every load? They must dynamically download as they are needed. So how can you display these items in finder without having actual file system objects? **Does anyone know how this is achieved in Mac OS X?** Or any pointer's to Apple API's or other open source projects that have a similar integration with finder? [1]: http://www.getdropbox.com/install?os=mac
0
[ 2, 184, 630, 14, 2804, 5309, 1572, 6819, 170, 60, 800, 3726, 3726, 31, 22, 195, 74, 699, 35, 14, 636, 12361, 5309, 500, 2558, 165, 500, 1572, 6819, 17, 31, 22, 79, 871, 527, 68, 17333, 21, 835, 6573, 26, 21, 421, 365, 9, 184, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Largest Heap used in a managed environment? (.net/java) === What is the largest heap you have personally used in a managed environment such as Java or .NET? What were some of the performance issues you ran into, and did you end up getting a diminishing returns the larger the heap was?
0
[ 2, 1075, 15414, 147, 19, 21, 1471, 2307, 60, 13, 5, 9, 2328, 118, 1004, 1385, 6, 800, 3726, 3726, 98, 25, 14, 1075, 15414, 42, 57, 7200, 147, 19, 21, 1471, 2307, 145, 28, 8247, 54, 13, 9, 2328, 60, 98, 46, 109, 16, 14, 956, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 openGL, how can you get items to draw back to front? === By default it seems that objects are drawn front to back. I am drawing a 2-D UI object and would like to create it back to front. For example I could create a white square first then create a slightly smaller black square on top of it thus creating a black pane with a white border. [This post][1] had some discussion on it and described this order as the "Painter's Algorithm" but ultimately the example they gave simply rendered the objects in reverse order to get the desired effect. I figure back to front (first objects go in back, subsequent objects get draw on top) rendering can be achieved via some transformation (gOrtho?) ? I will also mention that I am not interested in a solution using a wrapper library such as GLUT. I have also found that the default behavior on the Mac using the Cocoa NSOpenGLView appears to draw back to front, where as in windows I cannot get this behavior. The setup code in windows I am using is this: glViewport (0, 0, wd, ht); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho (0.0f, wd, ht, 0.0f, -1.0f, 1.0f); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); [1]: http://gpwiki.org/index.php/OpenGL:Tutorials:Tutorial_Framework:Ortho_and_Alpha
0
[ 2, 19, 368, 8430, 15, 184, 92, 42, 164, 3755, 20, 2003, 97, 20, 431, 60, 800, 3726, 3726, 34, 12838, 32, 2206, 30, 3916, 50, 3160, 431, 20, 97, 9, 31, 589, 3533, 21, 172, 8, 43, 13, 5661, 3095, 17, 83, 101, 20, 1600, 32, 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...
C# logging framework === In java world you have log4j and a a pretty decent logging framework, is there anything like that for C#/.NET?
4
[ 2, 272, 5910, 13, 13919, 6596, 800, 3726, 3726, 19, 8247, 126, 42, 57, 6738, 300, 728, 17, 21, 21, 1772, 12238, 13, 13919, 6596, 15, 25, 80, 602, 101, 30, 26, 272, 5910, 118, 9, 2328, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Remove domain information from login id in C# === I would like to remove the domain/computer information from a login id in C#. So, I would like to make either "Domain\\me" or "Domain\me" just "me". I could always check for the existence of either, and use that as the index to start the substring...but I am looking for something more elegant and compact. Worse case scenario: int startIndex = 0; int indexOfSlashesSingle = ResourceLoginName.IndexOf("\"); int indexOfSlashesDouble = ResourceLoginName.IndexOf("\\"); if (indexOfSlashesSingle != -1) startIndex = indexOfSlashesSingle; else startIndex = indexOfSlashesDouble; string shortName = ResourceLoginName.Substring(startIndex, ResourceLoginName.Length-1); Thanks in advance.
0
[ 2, 4681, 4603, 676, 37, 6738, 108, 4924, 19, 272, 5910, 800, 3726, 3726, 31, 83, 101, 20, 4681, 14, 4603, 118, 18448, 676, 37, 21, 6738, 108, 4924, 19, 272, 5910, 9, 86, 15, 31, 83, 101, 20, 233, 694, 13, 7, 537, 6232, 1, 79...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Updating OpenLDAP using a Java class === I need to be able to update an attribute on OpenLDAP using a Java class.
0
[ 2, 71, 43, 1880, 368, 255, 20472, 568, 21, 8247, 718, 800, 3726, 3726, 31, 376, 20, 44, 777, 20, 11100, 40, 35, 14755, 27, 368, 255, 20472, 568, 21, 8247, 718, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
What is mattr_accessor in a Rails module? === I couldn't really find this in Rails documentation but it seems like **'mattr_accessor'** is the **Module** corollary for **'attr_accessor'** (getter & setter) in a normal Ruby **class**. Eg. in a class class User attr_accessor :name def set_fullname @name = "#{self.first_name} #{self.last_name}" end end Eg. in a module module Authentication mattr_accessor :current_user def login @current_user = session[:user_id] || nil end end This helper method is provided by **ActiveSupport**.
0
[ 2, 98, 25, 2315, 139, 1, 20604, 248, 19, 21, 2240, 18, 12613, 60, 800, 3726, 3726, 31, 711, 22, 38, 510, 477, 48, 19, 2240, 18, 13945, 47, 32, 2206, 101, 13, 1409, 22, 21965, 139, 1, 20604, 248, 22, 1409, 25, 14, 13, 1409, 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...
Powershell equivalent of bash ampersand (&) for forking/running background processes === In bash the ampersand (&) can be used to run a command in the background and return interactive control to the user before the command has finished running. Is there an equivalent method of doing this in Powershell? Example of usage in bash: sleep 30 &
0
[ 2, 414, 15984, 4602, 16, 13158, 589, 7490, 290, 13, 5, 1569, 6, 26, 26, 1581, 118, 11325, 2395, 5102, 800, 3726, 3726, 19, 13158, 14, 589, 7490, 290, 13, 5, 1569, 6, 92, 44, 147, 20, 485, 21, 1202, 19, 14, 2395, 17, 788, 9194,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
?? Dynamic ?? Lexical analyzer === Does there exist a lexical analyzer that generates an AST/parse tree at runtime? Kind of like a library that would accept a string of EBNF grammar or something analogous and spit out a data structure? - I'm aware of antlr, jlex and their ilk. They generate source code which could do this. (like to skip the compile step) - I'm aware of Boost::Spirit, which uses some black magic with C++ syntax to generate such things at execution time (definitely much closer to what I want, but I'm a wuss when it comes to C++. And it's still somewhat limiting, because your grammar is hardcoded) - I'm not aware of anything in python or ruby, although a compiler compiler might very well be effective in such a language... - And that's the extent of my knowledge. <br/><br/> Is that coherent?
0
[ 2, 13, 60, 60, 7782, 13, 60, 60, 29180, 16051, 139, 800, 3726, 3726, 630, 80, 3182, 21, 29180, 16051, 139, 30, 7920, 18, 40, 28, 38, 118, 3574, 870, 1541, 35, 485, 891, 60, 825, 16, 101, 21, 1248, 30, 83, 3440, 21, 3724, 16, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Java Generics Syntax for arrays === How would you describe the structure implied by the following declaration? List<ArrayList>[] myArray; I would think that it means an array where each element is a List (perhaps a LinkedList) of ArrayList objects. My reasoning: List<String> someList; // A List of String objects List<ArrayList> someList; // A List of ArrayList objects List<ArrayList>[] someListArray; // An array of List of ArrayList objects After running some tests, I determined the declaration means an array where each element is an ArrayList object. What am I missing?
0
[ 2, 8247, 12733, 18, 22649, 26, 7718, 18, 800, 3726, 3726, 184, 83, 42, 4996, 14, 1411, 14719, 34, 14, 249, 7098, 60, 968, 1, 8576, 93, 5739, 1, 2558, 500, 51, 8576, 93, 73, 31, 83, 277, 30, 32, 1108, 40, 7718, 113, 206, 4520, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Insert array into database in a single row === I wonder if this would be doable ? To insert an array into one field in the database. For instance I have a title, I want to have that title with only one id, but it's going to be bilingually used on the website. It feels a bit unnecessary to make another table to have their global ids and then another table with the actual titles linked to the table with the global id. I just want to have something like this ID TITLE 1 Array("english title", "nederlandse titel"); I'm using PHP/MSYQL, so if it would be doable could you please explain in these languages. Oh yeah I figured that I could format it funky and use the split function to turn it into an array again. But I wonder if I could just store it as an array right away, I case the user might type something with the same formatting (one out of a million)
0
[ 2, 14692, 7718, 77, 6018, 19, 21, 345, 3131, 800, 3726, 3726, 31, 2666, 100, 48, 83, 44, 107, 579, 13, 60, 20, 14692, 40, 7718, 77, 53, 575, 19, 14, 6018, 9, 26, 4851, 31, 57, 21, 581, 15, 31, 259, 20, 57, 30, 581, 29, 104...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
page Preinit, Init, load === I am having a doubt in page_init, page preinit, load. I need to know when we use this also where we need to call our objects in different stages of our life cycle. Please let me know how they will process for each events raised
0
[ 2, 2478, 782, 108, 242, 15, 19, 242, 15, 6305, 800, 3726, 3726, 31, 589, 452, 21, 3063, 19, 2478, 1, 108, 242, 15, 2478, 782, 108, 242, 15, 6305, 9, 31, 376, 20, 143, 76, 95, 275, 48, 67, 113, 95, 376, 20, 645, 318, 3916, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SharePoint and Enterprise Library 4.0 === Has anybody been successful in integrating the Enterprise Library v4.0 with SharePoint WSS 3.0? I created a very simple .ASPX page. It's only purpose will to be to connect to an Oracle database and display some values in a DropDownList. But right now, all it does is displays Hello World. I've added the necessary references and everything compiles fine. When I test the page, it displays Hello World. But once I add the using Microsoft.Practices.EnterprisesLibrary.Data, the page no longer works. I just get the standard Unknown Error message. Is there a log file I can check? I'm looking for any steps or tips that I can use to get this up and running. I use this Enterprise Library in all my ASP.NET applications and it works great. Trying to get this to work in SharePoint seems like a natural fit. But why does it seem so difficult? And why does there seem to be a lack of information? Anyways, thank you so much for any information anybody can provide.
0
[ 2, 1891, 3132, 17, 6002, 1248, 268, 9, 387, 800, 3726, 3726, 63, 11181, 74, 1300, 19, 24529, 14, 6002, 1248, 566, 300, 9, 387, 29, 1891, 3132, 619, 18, 18, 203, 9, 387, 60, 31, 679, 21, 253, 1935, 13, 9, 472, 306, 396, 2478, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
static variables in an inlined function === I have a function that is declared and defined in a header file. This is a problem all by itself. When that function is not inlined, every translation unit that uses that header gets a copy of the function, and when they are linked together there are duplicated. I "fixed" that by making the function inline, but I'm afraid that this is a fragile solution because as far as I know, the compiler doesn't guarantee inlining, even when you specify the "inline" keyword. If this is not true, please correct me. Anyways, the real question is, what happens to static variables inside this function? How many copies do I end up with?
0
[ 2, 12038, 12157, 19, 40, 19, 15875, 1990, 800, 3726, 3726, 31, 57, 21, 1990, 30, 25, 2482, 17, 2811, 19, 21, 157, 106, 3893, 9, 48, 25, 21, 1448, 65, 34, 1145, 9, 76, 30, 1990, 25, 52, 19, 15875, 15, 352, 4064, 1237, 30, 202...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Query Analyzer VS. Query Profiler Reads, Writes, and Duration Discrepencies === I'm using MS Sql Server 2000, and for many queries when I run a query in Query Analyzer, with the statistics turned on, the numbers reported in the statistics tab are extremely different from the values shown in the Query Profiler. When the profiler and the analyzer are running at the same time, some queries report 200 reads in Analyzer, while the Profiler reports that the query preforms 14000 reads. Based on query performance, it appears to me that the Profiler is right. However, why is there such a large discrepancy between the two? Does anybody else have experience with the same thing occuring?
0
[ 2, 25597, 16051, 139, 4611, 9, 25597, 5296, 139, 11137, 15, 6215, 15, 17, 9403, 3626, 99, 306, 22851, 800, 3726, 3726, 31, 22, 79, 568, 4235, 4444, 255, 8128, 824, 15, 17, 26, 151, 9386, 2829, 76, 31, 485, 21, 25597, 19, 25597, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Optimizations for a Write heavy Oracle application? === What are some useful Oracle optimizations one can use for an Application that mostly writes (updates) to an Oracle database? The general usage pattern here is not web-serving or logging, as is most cases, but instead to persist complex state of a system, so the only times reading is needed is when the system starts up, after that its update and create all the way. Thus right now the Write to Read ratio is over 9 to 1, in this case what database tuning could improve performance?
0
[ 2, 21597, 18, 26, 21, 2757, 1278, 15759, 3010, 60, 800, 3726, 3726, 98, 50, 109, 4811, 15759, 21597, 18, 53, 92, 275, 26, 40, 3010, 30, 1555, 6215, 13, 5, 576, 8209, 18, 6, 20, 40, 15759, 6018, 60, 14, 297, 7514, 3732, 235, 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...
Dispose of Image in WPF in Listbox (memory leak). === I have a ListBox with a bunch of images in it (done through a datatemplate). The images are created by setting the items source: <Image x:Name="ItemImage" Source="{Binding ImageUrl}"/> and then they are cleared by using the listbox's Items.Clear() method. New Images are added by using the Items.Add method of the listbox. However, memory usage just starts moving up and up and up. It is the same 300 or so small images that are getting displayed, but the memory never seems to get freed. The App starts using about 40Megs, and quickly climbs up to 700Megs. How do I free up the memory that all these images are using?
0
[ 2, 17913, 16, 1961, 19, 619, 7721, 19, 968, 5309, 13, 5, 790, 5171, 93, 11724, 6, 9, 800, 3726, 3726, 31, 57, 21, 968, 5309, 29, 21, 7653, 16, 3502, 19, 32, 13, 5, 43, 849, 120, 21, 1054, 9577, 6554, 6, 9, 14, 3502, 50, 67...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 scale a UIImageView proportionally ? === It is a very simple scenario. I have a UIImageView and the objective is to scale it down proportionally by giving it a height or width. The scaling work but somehow the image got shifted down. UIImage *image = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3092/2915896504_a88b69c9de.jpg"]]]; UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; [self.view addSubview:imageView]; imageView.contentMode = UIViewContentModeScaleAspectFit; CGRect frame = imageView.frame; frame.size.width = 100; imageView.frame = frame; The image gets resized but the position is not at the top left. What is the best approach to scaling image/imageView and how do I correct the position?
0
[ 2, 184, 20, 3464, 21, 13, 5661, 22039, 4725, 13822, 102, 13, 60, 800, 3726, 3726, 32, 25, 21, 253, 1935, 12705, 9, 31, 57, 21, 13, 5661, 22039, 4725, 17, 14, 7038, 25, 20, 3464, 32, 125, 13822, 102, 34, 1438, 32, 21, 2947, 54,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
RFC timestamp in Flash/AS3 === I'd like to know if Flash/AS3 has any nice way to convert an AS3 'Date' object to/from rfc-850 timestamp format (as used by HTTP date and last-modified). This question is very similar to [this question about rfc 3339](http://stackoverflow.com/questions/17017/how-do-i-parse-and-convert-datetimes-to-the-rfc-3339-date-time-format), except it's specific to AS3 and rfc-850.
0
[ 2, 17492, 436, 38, 10158, 19, 4433, 118, 472, 240, 800, 3726, 3726, 31, 22, 43, 101, 20, 143, 100, 4433, 118, 472, 240, 63, 186, 2210, 161, 20, 8406, 40, 28, 240, 13, 22, 8209, 22, 3095, 20, 118, 2665, 17492, 8, 17043, 436, 38...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Templated Asp.NET User Control === I'm trying to create a user control that allows users to make something like the following: <uc1:MyControl id="controlThing" runat="server"> <uc1:BoundColumn id="column1" Column="Name" runat="server" /> <uc1:CheckBoxBoundColumn id="column2" Column="Selector" runat="server" /> <uc1:BoundColumn id="column3" Column="Description" runat="server" /> ...etc </uc1:MyControl> There are only certain controls I would allow, in addition to the fact that you can have many of any type. I can picture this in XSD but I'm not entirely sure for Asp.NET. My Asp.NET voodoo is drawing a blank right now.. any thoughts?
0
[ 2, 22894, 43, 28, 306, 9, 2328, 4155, 569, 800, 3726, 3726, 31, 22, 79, 749, 20, 1600, 21, 4155, 569, 30, 2965, 3878, 20, 233, 301, 101, 14, 249, 45, 13, 1, 6335, 165, 45, 915, 12898, 4924, 3726, 7, 12898, 96, 68, 7, 485, 72...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Logparser (Microsoft's one) or similar for Unix? === I've been looking for quite some time for an application that fills the same role as <a href="http://www.microsoft.com/technet/scriptcenter/tools/logparser/default.mspx">Logparser</a>, an awesome piece of technology, but for Unix. Does anyone know of something this? (I've looked at Splunk but its an overkill, a simple command line is all I really need) Note: Being able to make SQL queries on random logs, is great and much more efficient than grepping and its kin (because you can apply SQL based relational logic to the filtering) and SQL is much more legible than Grep for maintenance purposes when handing off a project to other teams.
0
[ 2, 6738, 3574, 4104, 13, 5, 22019, 12980, 22, 18, 53, 6, 54, 835, 26, 22540, 60, 800, 3726, 3726, 31, 22, 195, 74, 699, 26, 1450, 109, 85, 26, 40, 3010, 30, 3509, 18, 14, 205, 597, 28, 13, 1, 58, 746, 14057, 3726, 7, 21127, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
User Persistence: asp.net caching: === I'm working with caching and persistence for the first time. I have a user object that handles all my user data. Persisting this from page to page I'm planning on using a cookie with a token that then returns the user-object from the cache. What's the best way to implement this. The two ideas/solutions that appear to me are: 1) Cache a Dictionary<string,object> where the token is the key and the user object is the value. Pull the token from the cookie and retrieve the user-value. 2) Cache each user value independently with the token as the cache id. I'm sure there are lots of other ways to do this. Let me know which of the above is best practice, or suggest an alternative and explain why. Thanks! (Most of my experience is with Windows development, almost none of that for the web so I'm trying to figure out a few things.) language: c#.Net (3.5)
0
[ 2, 4155, 28584, 45, 28, 306, 9, 2328, 1658, 7192, 45, 800, 3726, 3726, 31, 22, 79, 638, 29, 1658, 7192, 17, 28584, 26, 14, 64, 85, 9, 31, 57, 21, 4155, 3095, 30, 3053, 18, 65, 51, 4155, 1054, 9, 22084, 68, 48, 37, 2478, 20, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
DOM Parsing === Anyone know how parse the DOM and determine what row is selected in an ASP.NET ListView? I'm able to interact with the DOM via the HtmlElement in Silverlight, but I've not been able to locate a property indicating the row is selected. For reference, this managed method works fine for an ASP.NET ListBox var elm = HtmlPage.Document.GetElementById(ListBoxId); foreach (var childElm in elm.Children) { if (!((bool)childElm.GetProperty("Selected"))) { continue; } }
0
[ 2, 11859, 2017, 18, 68, 800, 3726, 3726, 1276, 143, 184, 2017, 870, 14, 11859, 17, 3746, 98, 3131, 25, 1704, 19, 40, 28, 306, 9, 2328, 968, 4725, 60, 31, 22, 79, 777, 20, 10001, 29, 14, 11859, 1197, 14, 13, 15895, 27567, 19, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to inflate a file with zlib.NET? === I'm using the [zlib.NET][1] library to try and inflate files that are compressed by zlib (on a Linux box, perhaps). Here's what I'm doing: zlib.ZInputStream zinput = new zlib.ZInputStream(File.Open(path, FileMode.Open, FileAccess.Read)); while (stopByte != (data = zinput.ReadByte())) { // check data here } zinput.Close(); The data bytes match the compressed data bytes, so I must be doing something wrong. [1]: http://www.componentace.com/zlib_.NET.htm
0
[ 2, 184, 20, 19, 13830, 62, 21, 3893, 29, 2052, 8326, 9, 2328, 60, 800, 3726, 3726, 31, 22, 79, 568, 14, 636, 380, 8326, 9, 2328, 500, 2558, 165, 500, 1248, 20, 1131, 17, 19, 13830, 62, 6488, 30, 50, 18472, 34, 2052, 8326, 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...
The Most Efficient Way To Find Top K Frequent Words In A Big Word Sequence === The question can be described as: Input: A positive integer K and a big text. The text can actually be viewed as word sequence. So we don't have to worry about how to break down it into word sequence. Output: The most frequent K words in the text. My thinking is like this. 1) use a Hash table to record all words' frequency while traverse the whole word sequence. In this phase, the key is "word" and the value is "word-frequency". This takes O(n) time. 2) sore the (word, word-frequency) pair; and the key is "word-frequency". This takes O(n*lg(n)) time with normal sorting algorithm. 3) After sorting, we just take the first K words. This takes O(K) time. To summarize, the total time is O(n+n*lg(n)+K), Since K is surely smaller than N, so it is actually O(n*lg(n)). We can improve this. Actually, we just want top K words. Other words' frequency is not concern for us. So, we can use "partial Heap sorting". For step 2) and 3), we don't just do sorting. Instead, we change it to be 2') build a heap of (word, word-frequency) pair with "word-frequency" as key. It takes O(n) time to build a heap; 3') extract top K words from the heap. Each extraction is O(lg(n)). So, total time is O(k*lg(n)). To summarize, this solution cost time O(n+k*lg(n)). This is just my thought. I haven't find out way to improve step 1). I Hope some Information Retrieval experts can shed more light on this question. Thanks.
0
[ 2, 14, 127, 8243, 161, 20, 477, 371, 680, 5408, 715, 19, 21, 580, 833, 4030, 800, 3726, 3726, 14, 1301, 92, 44, 745, 28, 45, 6367, 45, 21, 2221, 13820, 680, 17, 21, 580, 1854, 9, 14, 1854, 92, 1121, 44, 6084, 28, 833, 4030, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 copy files using Windows Batch? === I have a driectory with several subdirectories with files.<br> How can I copy all files in the subdirectories to a new location?
0
[ 2, 184, 107, 31, 4344, 6488, 568, 1936, 13064, 60, 800, 3726, 3726, 31, 57, 21, 744, 17658, 14599, 29, 238, 972, 10197, 1596, 29, 6488, 9, 1, 5145, 1, 184, 92, 31, 4344, 65, 6488, 19, 14, 972, 10197, 1596, 20, 21, 78, 1474, 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...
Winform Caching === Is there a Winform caching library out there? I need to pass a few datasets aroung in a Winform Application, and probably persist to storage upon close. I've seen some samples around via Google, using System.Web. What's the recommendation and where can I get some details. I am using VS 2008 for 2.0. 3.0 Framework. Thanks
0
[ 2, 628, 4190, 1658, 7192, 800, 3726, 3726, 25, 80, 21, 628, 4190, 1658, 7192, 1248, 70, 80, 60, 31, 376, 20, 1477, 21, 310, 1054, 3554, 18, 21, 661, 2373, 19, 21, 628, 4190, 3010, 15, 17, 910, 22084, 20, 4326, 685, 543, 9, 31,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
IE Chopping off left of DIV === In IE6 the left of the `#right-content` DIV is cut off. I've been playing with it and can't get it to display properly. [http://philzit.com/services][1] [1]: http://philzit.com/services
0
[ 2, 13, 660, 272, 21181, 168, 225, 16, 13, 12916, 800, 3726, 3726, 19, 13, 660, 379, 14, 225, 16, 14, 13, 1, 5910, 4183, 8, 25424, 1, 13, 12916, 25, 1077, 168, 9, 31, 22, 195, 74, 791, 29, 32, 17, 92, 22, 38, 164, 32, 20, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Would you architect the control API of the next-gen Mars rover to be RESTful instead of an RPC? === Forgive me if this verges on being a "discussion" question, but I really would appreciate a yes/no answer, with an appropriate explanation. Suppose you have to design and implement a control API for a robot, say the next generation Mars Rover. Do you architect this API according to RESTful principles, or do you use a classic RPC, such as XMLRPC? I ask this because I have to do something similar, though the "robot" is a collection of virtual machines. I'm being urged by one rather persuasive engineer, a well known REST advocate, to make the API RESTful. I've never used REST principles, and I'm struggling to see how they fit in designing low-level inter-process APIs. REST seems infused with the theme of interacting with a modifiable data repository, usually many hops away. What I'm trying to do feels more like closely controlling a robot. I can see how one could argue that the robot is, in the abstract, just a data repository -- "PUT left turn", "PUT travel 100 meters", "GET outside temperature". But this seems to be a rather contrived model. I certainly will receive no benefit from caching or a proxy ("Hello, JPL? This is the Akamai co-lo in Canberra. We're taking over the Rover now, ok?") So, is a RESTful architecture useful here? Is it still superior to RPC even when the interaction is so narrowly focused?
0
[ 2, 83, 42, 3338, 14, 569, 21, 2159, 16, 14, 328, 8, 1863, 5291, 14148, 20, 44, 760, 1566, 700, 16, 40, 761, 5779, 60, 800, 3726, 3726, 8591, 55, 100, 48, 15574, 18, 27, 142, 21, 13, 7, 43, 20563, 5991, 7, 1301, 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...
Is BitmapSource the only type can be used in Image Source? === We can use Bitmapsource object as the content of a Image control, However if I only have Bitmap object, can I use it directly, if I convert Bitmap to Bitmapsouce using the following method: Bitmap bitmap = imageObjToBeConvert; IntPtr HBitmap = bitmap.GetHbitmap(); result = Imaging.CreateBitmapSourceFromHBitmap (HBitmap, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); DeleteObject(HBitmap); bitmap.Dispose(); It take some time. Is there any way to use Bitmap directly? And I found BitmapSource seems can't be released directly, Is there a sample method to release the memory immediately, after the Bitmapsouce is not used again.
0
[ 2, 25, 1142, 15022, 12097, 14, 104, 1001, 92, 44, 147, 19, 1961, 1267, 60, 800, 3726, 3726, 95, 92, 275, 1142, 15022, 12097, 3095, 28, 14, 2331, 16, 21, 1961, 569, 15, 207, 100, 31, 104, 57, 1142, 15022, 3095, 15, 92, 31, 275, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Beginner practical programming problems? === Where can I find lists of practical programming problems for a novice? Something similar to http://www.projecteuler.net, but for practical problems. I am asking for problems even less complex than [this question][application problem] [application problem]: http://stackoverflow.com/questions/106510/what-is-a-good-application-programming-problem-to-solve-for-beginners)
2
[ 2, 26931, 5713, 3143, 1716, 60, 800, 3726, 3726, 113, 92, 31, 477, 7227, 16, 5713, 3143, 1716, 26, 21, 21999, 60, 301, 835, 20, 7775, 6903, 6483, 9, 21011, 5770, 1252, 9, 2328, 15, 47, 26, 5713, 1716, 9, 31, 589, 3379, 26, 1716,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 turn an int into three bytes in Java? === I am trying to convert an <code>int</code> into three <code>bytes</code> representing that <code>int</code> (big endian). I'm sure it has something to do with bit-wise and and bit shifting. But I have no idea how to go about doing it. For example: int myInt; // some code byte b1, b2 , b3; // b1 is most significant, then b2 then b3.
0
[ 2, 184, 92, 31, 805, 40, 19, 38, 77, 132, 34, 3231, 19, 8247, 60, 800, 3726, 3726, 31, 589, 749, 20, 8406, 40, 13, 1, 9375, 1, 6391, 1, 118, 9375, 1, 77, 132, 13, 1, 9375, 1, 23246, 18, 1, 118, 9375, 1, 3793, 30, 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...
Access HTTP response headers in for flash.net.URLLoader object? === Is there a way to access the response headers from an HTTP result when using Flash/Flex's `URLLoader`? Setting the _request_ headers is possible, as is accessing the _response code_, but getting a hold of the actual response headers seems to be conspicuously lacking... Specifically, I would like to get a hold of the `Last-Modified` response header.
0
[ 2, 1381, 7775, 1627, 157, 445, 19, 26, 4433, 9, 2328, 9, 911, 255, 8294, 106, 3095, 60, 800, 3726, 3726, 25, 80, 21, 161, 20, 1381, 14, 1627, 157, 445, 37, 40, 7775, 829, 76, 568, 4433, 118, 19752, 22, 18, 13, 1, 911, 255, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to get proper line number when using trigger_error in PHP? === I am using trigger\_error to "throw" errors in a custom class. My problem is that trigger\_error prints out the line number where trigger_error was called. For example, given the following code: 1 <?php 2 function test() { 3 trigger_error("Custom error", E_USER_WARNING); 4 } 5 6 test(); 7 ?> PHP will print out the following: > **Warning:** Custom error in **test.php** on line **3** How would you make PHP return the line where the test() function was called as follows? > **Warning:** Custom error in **test.php** on line **6**
0
[ 2, 184, 20, 164, 4119, 293, 234, 76, 568, 7286, 1, 29992, 19, 13, 26120, 60, 800, 3726, 3726, 31, 589, 568, 7286, 1, 29992, 20, 13, 7, 21440, 7, 11908, 19, 21, 5816, 718, 9, 51, 1448, 25, 30, 7286, 1, 29992, 12202, 70, 14, 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...
Modifying NSDate to represent 1 month from today === I'm adding repeating events to a Cocoa app I'm working on. I have repeat every day and week fine because I can define these mathematically (3600*24*7 = 1 week). I use the following code to modify the date: [NSDate dateWithTimeIntervalSinceNow:(3600*24*7*(weeks))] I know how many months have passed since the event was repeated but I can't figure out how to make an NSDate object that represents 1 month/3 months/6 months/9 months into the future. Ideally I want the user to say repeat monthly starting Oct. 14 and it will repeat the 14th of every month.
0
[ 2, 17579, 68, 13, 2172, 8209, 20, 3501, 137, 1617, 37, 786, 800, 3726, 3726, 31, 22, 79, 4721, 17389, 963, 20, 21, 24507, 4865, 31, 22, 79, 638, 27, 9, 31, 57, 6830, 352, 208, 17, 877, 1123, 185, 31, 92, 9267, 158, 7046, 102, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Finding the LCM of a range of numbers === I read an interesting DailyWTF post today, ["Out of All The Possible Answers..."](http://thedailywtf.com/Articles/Out-of-All-the-Possible-Answers.aspx) and it interested me enough to dig up the original [forum post](http://forums.thedailywtf.com/forums/t/10030.aspx) where it was submitted. This got me thinking how I would solve this interesting problem - the original question is posed on [Project Euler](http://projecteuler.net/index.php?section=problems&id=5) as: > 2520 is the smallest number that can be divided by each of the > numbers from 1 to 10 without any remainder. > > What is the smallest number that is evenly divisible by all of > the numbers from 1 to 20? To reform this as a programming question, **how would you create a function that can find the Least Common Multiple for an arbitrary list of numbers?** I'm incredibly bad with pure math, despite my interest in programming, but I was able to solve this after a little Googling and some experimenting. I'm curious what other approaches SO users might take. If you're so inclined, post some code below, hopefully along with an explanation. Note that while I'm sure libraries exist to compute the GCD and LCM in various languages, I'm more interested in something that displays the logic more directly than calling a library function :-) I'm most familiar with Python, C, C++, and Perl, but any language you prefer is welcome. Bonus points for explaining the logic for other mathematically-challenged folks out there like myself. **EDIT**: After submitting I did find this similar question <http://stackoverflow.com/questions/147515/> but it was answered with the same basic code I already figured out and there's no real explanation, so I felt this was different enough to leave open.
0
[ 2, 3007, 14, 13, 6109, 79, 16, 21, 978, 16, 2116, 800, 3726, 3726, 31, 1302, 40, 4883, 1954, 499, 11720, 678, 786, 15, 636, 7, 1320, 16, 65, 14, 938, 6709, 9, 9, 9, 7, 500, 5, 21127, 6903, 124, 9394, 102, 499, 11720, 9, 960,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Apache: Caching a DEFLATE'd file. === It seems redundant to have zlib compress a web page during every request. It is also the bottleneck of my files' response times. Is there a way to cache the zlib'd file so that it is compressed only once at each modification? Or should I just keep wishing?
0
[ 2, 17140, 45, 1658, 7192, 21, 6312, 6554, 22, 43, 3893, 9, 800, 3726, 3726, 32, 2206, 24295, 20, 57, 2052, 8326, 26060, 21, 2741, 2478, 112, 352, 3772, 9, 32, 25, 67, 14, 4040, 9870, 16, 51, 6488, 22, 1627, 436, 9, 25, 80, 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...
How can I make the Visual Studio debugger stop breaking at data breakpoints which are set to run a macro and continue? === I'm running into an odd problem with Visual Studio 2005: I have a data breakpoint that's set to run a macro and continue (that is, I select a macro and check Continue Execution.) Now, instead of silently running the macro when the value in the data breakpoint (tracepoint, really) changes, I first get a message box informing me that the breakpoint was hit, and the macro runs only after I hit OK. The code I'm debugging is timing sensitive, so this makes it impossible to debug. Is there a way to disable the message box that pops up?
0
[ 2, 184, 92, 31, 233, 14, 3458, 1120, 121, 2345, 11356, 747, 3892, 35, 1054, 1442, 3132, 18, 56, 50, 309, 20, 485, 21, 9069, 17, 1816, 60, 800, 3726, 3726, 31, 22, 79, 946, 77, 40, 4210, 1448, 29, 3458, 1120, 18228, 31, 57, 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...
1720 - Imminent Hard Disk Failure === I am upgrading an old compaq presario 2800 harddrive to a bigger one. When I phisically install the new drive and try to boot the following error appears: 1720 - SMART Hard Drive detects imminent failure. Your hard disk drive is detecting an imminent failure. To ensure no data loss, backup contents and replace this hard disk. Attribute Failed: #1 What can be causing the problem?
2
[ 2, 25382, 13, 8, 20068, 552, 8582, 2990, 800, 3726, 3726, 31, 589, 26939, 40, 315, 6479, 9105, 782, 18, 8756, 172, 8464, 552, 14573, 20, 21, 6197, 53, 9, 76, 31, 13424, 18, 8438, 16146, 14, 78, 1493, 17, 1131, 20, 6801, 14, 249,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 single most important project vital sign to track that will help evaluate project health? === Just like human beings have vital signs (e.g. temperature, heart rate, blood pressure, and breathing function); what vital signs are essential to collect and track to aid in the evaluation of the overall health of a project?
0
[ 2, 98, 25, 14, 345, 127, 681, 669, 6411, 1676, 20, 792, 30, 129, 448, 13, 15599, 669, 853, 60, 800, 3726, 3726, 114, 101, 585, 142, 18, 57, 6411, 4832, 13, 5, 62, 9, 263, 9, 3348, 15, 582, 1684, 15, 696, 1859, 15, 17, 4418, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 control the font DPI in .NET WinForms app === I created an app for a small business. Some of the employees in the office can not see the form correctly. The reason is they have their DPI setting set to above 96dpi. Does anybody know of a way to control this? For all of you who have experience with winforms apps, how do you control your form layout so that DPI does not affect the look of the application?
0
[ 2, 184, 20, 569, 14, 9978, 13, 43, 2159, 19, 13, 9, 2328, 628, 4190, 18, 4865, 800, 3726, 3726, 31, 679, 40, 4865, 26, 21, 284, 508, 9, 109, 16, 14, 3716, 19, 14, 488, 92, 52, 196, 14, 505, 12044, 9, 14, 1215, 25, 59, 57, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...