unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
What is the aspnet_client folder for under the IIS structure? === I notice that there's frequently an aspnet_client folder under the standard IIS web folder structure. What is this used for? Is it needed?
0
[ 2, 98, 25, 14, 28, 306, 2328, 1, 150, 18513, 38, 19294, 26, 131, 14, 595, 18, 1411, 60, 800, 3726, 3726, 31, 3551, 30, 80, 22, 18, 3086, 40, 28, 306, 2328, 1, 150, 18513, 38, 19294, 131, 14, 1236, 595, 18, 2741, 19294, 1411, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
What is the best way for a client app to find a server on a local network in C#? === The client connects to the server using GenuineChannels (we are considering switching to DotNetRemoting). What I mean by find is obtain the IP and port number of a server to connect to. It seems like a brute-force approach would be try every IP on the network try the active ports (not even sure if that's possible) but there must be a better way.
0
[ 2, 98, 25, 14, 246, 161, 26, 21, 6819, 4865, 20, 477, 21, 8128, 27, 21, 375, 982, 19, 272, 5910, 60, 800, 3726, 3726, 14, 6819, 8534, 20, 14, 8128, 568, 10701, 10928, 18, 13, 5, 458, 50, 5154, 13027, 20, 14123, 2328, 99, 7662,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
YAWS fronting Tomcat === Is there currently any easy way to set up a YAWS web server in front of Apache Tomcat Servlet container, similar to popular Apache httpd + Tomcat set up?
0
[ 2, 2167, 10268, 431, 68, 2067, 5782, 800, 3726, 3726, 25, 80, 871, 186, 2010, 161, 20, 309, 71, 21, 2167, 10268, 2741, 8128, 19, 431, 16, 17140, 2067, 5782, 13, 10321, 1336, 12147, 15, 835, 20, 844, 17140, 7775, 43, 2754, 2067, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Best practice for getting app name/id === What's the best way for a common library to know what context - a.k.a. the calling app - it is in? I'm in a very controlled enterprise environment... is there a better way for the library to know what application it is getting called from than reading a setting in the config file? What do you use for this type of thing? `//the rest of the story`<br /> I work on the Intranet team for a Fortune 500 manufacturing company. I have created a common library that all of our new .Net applications will make use of. It queries a common database for information about the application and a bunch of other things that are irrelevant to the question. As you can imagine, the common library needs to know what application is calling it. I could just force every application to set a property on some static class or something, but instead I wanted to make it a little more behind the scenes. Currently it requires the developer to put a setting in the app.config or web.config with a key of ApplicationName and a value of - you guessed it - the application name (which is a unique non changing id for us). It then uses `Currently it uses `ConfigurationManager.AppSettings["ApplicationName"]` to pull this in.
0
[ 2, 246, 1345, 26, 1017, 4865, 204, 118, 1340, 800, 3726, 3726, 98, 22, 18, 14, 246, 161, 26, 21, 757, 1248, 20, 143, 98, 4141, 13, 8, 21, 9, 197, 9, 58, 9, 14, 2555, 4865, 13, 8, 32, 25, 19, 60, 31, 22, 79, 19, 21, 253, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Try to describe polymorphism as easy as you can === we can find a lot of information about the subject on the internet and books http://en.wikipedia.org/wiki/Type_polymorphism but lets try to make it as simple as we can .
0
[ 2, 1131, 20, 4996, 3446, 13348, 28, 2010, 28, 42, 92, 800, 3726, 3726, 95, 92, 477, 21, 865, 16, 676, 88, 14, 1550, 27, 14, 2620, 17, 964, 7775, 6903, 219, 9, 17375, 26132, 9, 5583, 118, 17375, 118, 4474, 1, 17108, 13348, 47, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
Distributing a stand-alone Python web-based application to non-technical users === I'm writing a web application in Python, intended for use by teachers and pupils in a classroom. It'll run from a hosted website, but I also want people to be able to download a self-contained application they can install locally if they want more performance or they simply won't have an Internet connection available in the classroom. The users aren't going to be able to manage instructions like "first install Python, then install dependencies, download the .tar.gz archive and type these commands into the command line...". I need to be able to create an all-in-one type installer that can potentially install Python, dependencies (Python-LDAP), some Python code, and register a Python-based web server as a Windows Service. I've had a look through previous questions, but none quite seem relevant. I'm not concerned about the security of source code (my application will be open source, I'll sell content to go with it), I just need non-technical Windows users to be able to download and use my application with no fuss. My current thoughts are to use [NSIS][1] to create an installer that includes Python and Python-LDAP as MSIs, then registers my own simple Python-based web server as a Windows service and puts a shortcut in the start menu / on the desktop linking to http://localhost. Is this doable with NSIS - can NSIS check for currently installed copies of Python, for instance? Is there a better way of doing this - is there a handy framework available that lets me shove my code in a folder and bundle it up to make an installer? [1]: http://nsis.sourceforge.net/Main_Page
0
[ 2, 23125, 21, 1261, 8, 17979, 20059, 2741, 8, 1281, 3010, 20, 538, 8, 22307, 3878, 800, 3726, 3726, 31, 22, 79, 1174, 21, 2741, 3010, 19, 20059, 15, 2081, 26, 275, 34, 3714, 17, 6806, 19, 21, 10188, 9, 32, 22, 211, 485, 37, 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...
Countering crappy JavaScript IntelliSense in Visual Studio 2008 === With the release of Visual Studio 2008, Microsoft implemented code-completion and IntelliSense support for JavaScript. Unfortunately the support for JavaScript is shady at best--one of the major hassles being that when referencing external JavaScript files, the developer has to open and close JavaScript files to force Visual Studio to update it's definitions. Is there a way to get around this?
0
[ 2, 2105, 68, 9192, 6448, 8247, 8741, 14635, 3159, 6498, 19, 3458, 1120, 570, 800, 3726, 3726, 29, 14, 830, 16, 3458, 1120, 570, 15, 7099, 6807, 1797, 8, 11103, 1336, 872, 17, 14635, 3159, 6498, 555, 26, 8247, 8741, 9, 6200, 14, 55...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
QR decoder that works on mac? === Anyone know a QR decoder that works on mac? or that might be online? just need to decode one single image :S
0
[ 2, 2593, 139, 12015, 1157, 30, 693, 27, 1572, 60, 800, 3726, 3726, 1276, 143, 21, 2593, 139, 12015, 1157, 30, 693, 27, 1572, 60, 54, 30, 530, 44, 2087, 60, 114, 376, 20, 121, 9375, 53, 345, 1961, 13, 45, 18, 3, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Remove repetitive, hard coded loops and conditions in PHP === I saw this question asked about C# I would like an answer for PHP. I have some old code that has 4 pages of foreach loops and conditions which just makes it hard to read and follow. How would I make this more OO? I was thinking of using SPL Functions but don't fully understand whats involved yet.
0
[ 2, 4681, 24935, 15, 552, 13, 22254, 19661, 17, 2039, 19, 13, 26120, 800, 3726, 3726, 31, 441, 48, 1301, 411, 88, 272, 5910, 31, 83, 101, 40, 1623, 26, 13, 26120, 9, 31, 57, 109, 315, 1797, 30, 63, 268, 4434, 16, 26, 14322, 196...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 secure are CGI based web apps? === A very well known major drawback of using CGI is poor webserver performance. But how secure are CGI (mainly C/C++) based applications? Are there any major security holes in CGI architecture built on C/C++? I would like to know some real life implementations of CGI based web apps/web sites. One that I know of is javaranch.com.
0
[ 2, 184, 4315, 50, 272, 2234, 432, 2741, 4865, 18, 60, 800, 3726, 3726, 21, 253, 134, 167, 394, 2003, 1958, 16, 568, 272, 2234, 25, 1696, 2741, 10321, 106, 956, 9, 47, 184, 4315, 50, 272, 2234, 13, 5, 6232, 102, 272, 118, 150, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Protected Pages in MediaWiki === I am currently using MediaWiki as a documentation website, with login authenticated by LDAP. However, we have hit a snag. Certain pages contain sensitive information for example a link saying "click here to log in". I would like to be able to protect certain pages from being edited by just anyone. How do I set up page protection in MediaWiki (if it is possible)?
0
[ 2, 3803, 4434, 19, 941, 17375, 800, 3726, 3726, 31, 589, 871, 568, 941, 17375, 28, 21, 13945, 2271, 15, 29, 6738, 108, 14351, 1669, 34, 644, 20472, 9, 207, 15, 95, 57, 770, 21, 28755, 9, 1200, 4434, 3717, 7830, 676, 26, 823, 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...
SQL Server, need script to check for all constraints === I continue to get this error: Object '%s' cannot be renamed because the object participates in enforced dependencies I need to find a script that will help me to find all the dependencies that there is with this table. I will need to drop them, rename, then bring them back. Thanks.
0
[ 2, 4444, 255, 8128, 15, 376, 3884, 20, 2631, 26, 65, 16747, 800, 3726, 3726, 31, 1816, 20, 164, 48, 7019, 45, 3095, 13, 22, 11881, 18, 22, 1967, 44, 2433, 185, 14, 3095, 3705, 18, 19, 18501, 29411, 31, 376, 20, 477, 21, 3884, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Tracking automatic variable lifetime? === This may not be possible, but I figured I'd ask... Is there any way anyone can think of to track whether or not an automatic variable has been deleted without modifying the class of the variable itself? For example, consider this code: const char* pStringBuffer; { std::string sString( "foo" ); pStringBuffer = sString.c_str(); } Obviously, after the block, pStringBuffer is a dangling pointer which may or may not be valid. What I would like is a way to have a wrapper class which contains pStringBuffer (with a casting operator for const char*), but asserts that the variable it's referencing is still valid. By changing the type of the referenced variable I can certainly do it (boost shared_ptr/weak_ptr, for example), but I would like to be able to do it without imposing restrictions on the referenced type. Some thoughts: - I'll probably need to change the assignment syntax to include the referenced variable (which is fine) - I might be able to look at the stack pointer to detect if my wrapper class was allocated "later" than the referenced class, but this seems hacky and not standard (C++ doesn't define stack behavior). It could work, though. Thoughts / brilliant solutions?
0
[ 2, 10353, 6715, 7612, 5277, 60, 800, 3726, 3726, 48, 123, 52, 44, 938, 15, 47, 31, 5700, 31, 22, 43, 1349, 9, 9, 9, 25, 80, 186, 161, 1276, 92, 277, 16, 20, 792, 1472, 54, 52, 40, 6715, 7612, 63, 74, 19584, 366, 17579, 68, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Safe PHP Template Engines === What are some PHP template engines that offer a simple, short syntax? What we're looking for is: 1. Conditionals (if/else) 2. Foreach loops 3. Variable replacements 4. Able to create custom tags (i.e., for URL generators) We need it to be secure because the applications are being run on our own servers, but we still want people to be able to edit the way things look. This is why we're disregarding the pure PHP-based systems. I love how Django's engine works, but the only PHP implementation I've seen ([Calypso][1]) is not very mature and doesn't look like it's going anywhere. A newish project called [Dwoo][2] looks interesting but it's taking a bit of work to get it working the way we need it to. Basically we have to get templates from a database and then cache the "compiled" version to memcached, but Dwoo doesn't offer a very simple way to switch template providers/caching mechanisms. It's tied to the filesystem and filesystem-like behaviors. It is possible, but we're looking for other options. We may just end up using Smarty. But I'm not sure of the future of this project, it seems a bit dead. [1]: http://www.beberlei.de/calypso/ [2]: http://dwoo.org/
0
[ 2, 1834, 13, 26120, 22894, 4016, 800, 3726, 3726, 98, 50, 109, 13, 26120, 22894, 4016, 30, 1994, 21, 1935, 15, 502, 22649, 60, 98, 95, 22, 99, 699, 26, 25, 45, 137, 9, 21206, 18, 13, 5, 821, 118, 6798, 62, 6, 172, 9, 26, 143...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Ordering numbers that are stored as strings in the database === I have a bunch of records in several tables in a database that have a "process number" field, that's basically a number, but I have to store it as a string both because of some legacy data that has stuff like "89a" as a number and some numbering system that requires that process numbers be represented as number/year. The problem arises when I try to order the processes by number. I get stuff like: - 1 - 10 - 11 - 12 And the other problem is when I need to add a new process. The new process' number should be the biggest existing number incremented by one, and for that I would need a way to order the existing records by number. Any suggestions?
0
[ 2, 15775, 2116, 30, 50, 8214, 28, 7887, 19, 14, 6018, 800, 3726, 3726, 31, 57, 21, 7653, 16, 742, 19, 238, 7484, 19, 21, 6018, 30, 57, 21, 13, 7, 16835, 234, 7, 575, 15, 30, 22, 18, 11374, 21, 234, 15, 47, 31, 57, 20, 1718...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
POST request in namespaced resource controller going to index action instead of create === I have a namespaced controller for some admin functionality. My create form does not work -- it ends up routing the request to the index action instead of the create action. Why isn't the POST getting routed to the create action as it should (being RESTful)? routes.rb: map.namespace :admin do |admin| admin.resources :events end rake routes: admin_events GET /admin/events {:action=>"index", :controller=>"admin/events"} formatted_admin_events GET /admin/events.:format {:action=>"index", :controller=>"admin/events"} POST /admin/events {:action=>"create", :controller=>"admin/events"} POST /admin/events.:format {:action=>"create", :controller=>"admin/events"} new_admin_event GET /admin/events/new {:action=>"new", :controller=>"admin/events"} formatted_new_admin_event GET /admin/events/new.:format {:action=>"new", :controller=>"admin/events"} edit_admin_event GET /admin/events/:id/edit {:action=>"edit", :controller=>"admin/events"} formatted_edit_admin_event GET /admin/events/:id/edit.:format {:action=>"edit", :controller=>"admin/events"} admin_event GET /admin/events/:id {:action=>"show", :controller=>"admin/events"} formatted_admin_event GET /admin/events/:id.:format {:action=>"show", :controller=>"admin/events"} PUT /admin/events/:id {:action=>"update", :controller=>"admin/events"} PUT /admin/events/:id.:format {:action=>"update", :controller=>"admin/events"} DELETE /admin/events/:id {:action=>"destroy", :controller=>"admin/events"} DELETE /admin/events/:id.:format {:action=>"destroy", :controller=>"admin/events"} app/views/admin/events/new.html.erb: <h1>New event</h1> <% form_for([:admin, @event]) do |f| %> <%= f.error_messages %> ... app/controllers/admin/event_controller.rb: class Admin::EventsController < ApplicationController def index @events = Event.find(:all) ... end def create @event = Event.new(params[:event]) ... end ... end And finally, a bit of a log file where you can see it is indeed POSTing: Processing Admin::EventsController#index (for 127.0.0.1 at 2008-10-16 18:12:47) [POST] Session ID: ... Parameters: {"commit"=>"Create", "authenticity_token"=>"...", "action"=>"index", "controller"=>"admin/events", "event"=>{"location"=>""}} Event Load (0.000273) SELECT * FROM `events` Rendering template within layouts/application Rendering admin/events/index Completed in 0.00757 (132 reqs/sec) | Rendering: 0.00118 (15%) | DB: 0.00027 (3%) | 200 OK [http://localhost/admin/events]
0
[ 2, 678, 3772, 19, 1817, 15265, 6577, 9919, 228, 20, 4348, 1028, 700, 16, 1600, 800, 3726, 3726, 31, 57, 21, 1817, 15265, 9919, 26, 109, 21, 43, 2160, 18548, 9, 51, 1600, 505, 630, 52, 170, 13, 8, 8, 32, 3451, 71, 19880, 14, 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...
sql statement to delete records older than XXX as long as there are more than YY rows === Assume a table with the following columns: pri\_id, item\_id, comment, date What I want to have is a SQL query that will delete any records, for a specific item\_id that are older than a given date, BUT only as long as there are more than 15 rows for that item\_id. This will be used to purge out comment records older than 1 year for the items but I still want to keep at least 15 records at any given time. This way if I had one comment for 10 years it would never get deleted but if I had 100 comments over the last 5 days I'd only keep the newest 15 records. These are of course arbitrary record counts and date timeframes for this example. I'd like to find a very generic way of doing this that would work in mysql, oracle, postgres etc. I'm using phps adodb library for DB abstraction so I'd like it to work well with that if possible.
0
[ 2, 4444, 255, 3331, 20, 27448, 742, 1234, 119, 13, 13290, 28, 175, 28, 80, 50, 91, 119, 13, 93, 93, 11295, 800, 3726, 3726, 7158, 21, 859, 29, 14, 249, 7498, 45, 4566, 1, 1340, 15, 9101, 1, 1340, 15, 6484, 15, 1231, 98, 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...
Regex multi word search === What do I use to search for multiple words in a string? I would like the logical operation to be AND so that all the words are in the string somewhere. I have a bunch of nonsense paragraphs and one plain English paragraph, and I'd like to narrow it down by specifying a couple common words like, "the" and "and", but would like it match all words I specify.
0
[ 2, 7953, 1706, 1889, 833, 2122, 800, 3726, 3726, 98, 107, 31, 275, 20, 2122, 26, 1886, 715, 19, 21, 3724, 60, 31, 83, 101, 14, 11545, 1453, 20, 44, 17, 86, 30, 65, 14, 715, 50, 19, 14, 3724, 3493, 9, 31, 57, 21, 7653, 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...
Displaying Japanese fonts in source code using Visual Studio === I have some source files that have comments written in Japanese. When I open these files in Visual Studio they appear like this: à–¾FNCAP‰¹—p‚̃XƒŒƒbƒh I am using the English version of WinXP, but is there a way to get Visual Studio to display the actual Japanese characters rather than the random jibberish it currently is?
0
[ 2, 17418, 1095, 9978, 18, 19, 1267, 1797, 568, 3458, 1120, 800, 3726, 3726, 31, 57, 109, 1267, 6488, 30, 57, 7534, 642, 19, 1095, 9, 76, 31, 368, 158, 6488, 19, 3458, 1120, 59, 1893, 101, 48, 45, 13, 1, 58, 10, 240, 1, 300, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
visual studio enable assert === I am trying to add assert statements to a project but they keep being skiped is there an option I need to enable somewhere. The assert statement is: Debug.Assert(false, "Deserialization failed", "Deserialization failed"); and I am running in debug mode. I could be doing something silly not sure.
0
[ 2, 3458, 1120, 9240, 10908, 800, 3726, 3726, 31, 589, 749, 20, 3547, 10908, 9015, 20, 21, 669, 47, 59, 643, 142, 12532, 69, 25, 80, 40, 4255, 31, 376, 20, 9240, 3493, 9, 14, 10908, 3331, 25, 45, 121, 16254, 9, 22220, 38, 5, 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...
PDO Prepared Statements === Is there a way to get the raw SQL string executed when calling PDOStatement::execute() on a prepared statement? For debugging purposes this would be extremely useful.
0
[ 2, 351, 537, 3268, 9015, 800, 3726, 3726, 25, 80, 21, 161, 20, 164, 14, 4333, 4444, 255, 3724, 5557, 76, 2555, 351, 537, 3859, 1130, 45, 45, 1706, 17194, 591, 5, 6, 27, 21, 3268, 3331, 60, 26, 121, 16254, 2762, 4612, 48, 83, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Package structure for a Java project? === Whats the best practice for setting up package structures in a Java Web Application? How would you setup your src, unit test code, etc?
0
[ 2, 6030, 1411, 26, 21, 8247, 669, 60, 800, 3726, 3726, 98, 18, 14, 246, 1345, 26, 2697, 71, 6030, 3815, 19, 21, 8247, 2741, 3010, 60, 184, 83, 42, 18161, 154, 13, 18, 5453, 15, 1237, 1289, 1797, 15, 2722, 60, 3, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Why does scanf() need "%lf" for doubles, when printf() is okay with just "%f"? === Why is it that scanf() needs the L in "%lf" when reading a double, when printf() can use "%f" regardless of whether its argument is a double or a regular-precision float? Example code: double d; scanf("%lf", &d); printf ("%f", d);
0
[ 2, 483, 630, 8313, 410, 5, 6, 376, 13, 7, 11881, 9641, 7, 26, 7784, 15, 76, 4793, 410, 5, 6, 25, 1705, 29, 114, 13, 7, 11881, 410, 7, 60, 800, 3726, 3726, 483, 25, 32, 30, 8313, 410, 5, 6, 2274, 14, 644, 19, 13, 7, 11881...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to release resources of a process === Hiya! I am invoking an external process by using System.Diagonistics.Process and passing two filenames as parameters. Now some time this process terminates due to exceptions and it seems that files handle are not being released by the process. Can i ask how can i release the resources occupied by the process.
0
[ 2, 184, 20, 830, 2566, 16, 21, 953, 800, 3726, 3726, 13, 25796, 187, 31, 589, 19, 2625, 1581, 40, 4886, 953, 34, 568, 329, 9, 4286, 4099, 3771, 18, 9, 16835, 17, 2848, 81, 3893, 7259, 18, 28, 12905, 9, 130, 109, 85, 48, 953, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Suggestions for a C# custom tabcontrol? === Has anybody got any suggestions for a custom tabcontrol implemented in C# and which adheres to these criteria: - Allows the tabs to be placed along the side of the control. - Tab text must read horizontally. - Allow custom colouring. - Open source or no cost. I prefer not to get my hands dirty with *ownerdrawing* if a solution already exists.
0
[ 2, 18389, 26, 21, 272, 5910, 5816, 6523, 12898, 60, 800, 3726, 3726, 63, 11181, 330, 186, 18389, 26, 21, 5816, 6523, 12898, 6807, 19, 272, 5910, 17, 56, 17982, 18, 20, 158, 9157, 45, 13, 8, 2965, 14, 6523, 18, 20, 44, 1037, 303,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Accessing a property of derived class from the base class in C# === In C#, was is the best way to access a property of the derived class when the generic list contains just the base class. public class ClassA : BaseClass { public object PropertyA { get; set; } } public class ClassB: BaseClass { public object PropertyB { get; set; } } public class BaseClass { } public void Main { List<BaseClass> MyList = new List<BaseClass>(); ClassA a = new ClassA(); ClassB b = new ClassB(); MyList.Add(a); MyList.Add(b); for(int i = 0; i < MyList.Count; i++) { //I would like to access PropertyA abd PropertyB from the derived classes } }
0
[ 2, 1381, 68, 21, 1354, 16, 3981, 718, 37, 14, 1000, 718, 19, 272, 5910, 800, 3726, 3726, 19, 272, 5910, 15, 23, 25, 14, 246, 161, 20, 1381, 21, 1354, 16, 14, 3981, 718, 76, 14, 12733, 968, 1588, 114, 14, 1000, 718, 9, 317, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Exact time between 2 DateTime? === I would like to know many minutes between 2 dates? Example : Now - tommorow at the exact time would return me 1440.
0
[ 2, 5340, 85, 128, 172, 1231, 891, 60, 800, 3726, 3726, 31, 83, 101, 20, 143, 151, 902, 128, 172, 4076, 60, 823, 13, 45, 130, 13, 8, 2067, 1293, 5417, 35, 14, 5340, 85, 83, 788, 55, 513, 2602, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
C++ Constructor === I'm reading this C++ open source code and I came to a constructor but I don't get it ( basically because I don't know C++ :P ) I understand C and Java very well. TransparentObject::TransparentObject( int w, int x, int y, int z ) : _someMethod( 0 ), _someOtherMethod( 0 ), _someOtherOtherMethod( 0 ), _someMethodX( 0 ) { int bla; int bla; } As far I can "deduce" The first line only declares the construtor name, the "::" sounds like "belongs to" to me. And the code between {} is the constructor body it self. I "think" what's after the paremeters and the first "{" are like methods default parameters or something, but I don't find a reasonable explanation on the web. Most of the C++ constructors that I found in the examples are almost identical to those in Java. I'm I right in my assumptions? "::" is like belongs to, and the list after params and body are like "default args" or something?
0
[ 2, 272, 20512, 6960, 248, 800, 3726, 3726, 31, 22, 79, 1876, 48, 272, 20512, 368, 1267, 1797, 17, 31, 281, 20, 21, 6960, 248, 47, 31, 221, 22, 38, 164, 32, 13, 5, 11374, 185, 31, 221, 22, 38, 143, 272, 20512, 13, 45, 306, 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...
ASP.NET HTTP handlers and global variables === I have created HTTP handlers. How do I create global variables for these handlers like I can with ASP.net web pages in global.asax?
0
[ 2, 28, 306, 9, 2328, 7775, 24641, 18, 17, 2062, 12157, 800, 3726, 3726, 31, 57, 679, 7775, 24641, 18, 9, 184, 107, 31, 1600, 2062, 12157, 26, 158, 24641, 18, 101, 31, 92, 29, 28, 306, 9, 2328, 2741, 4434, 19, 2062, 9, 8588, 39...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Python: unsigned 32 bit arithmetic === Trying to answer to another post whose solution deals with IP addresses and netmasks, I got stuck with plain bitwise arithmetic. Is there a common way, in Python, to carry on bitwise AND, bitwise OR and bitwise NOT operations assuming that the inputs are "32 bit" (maybe negative) integers or longs, and that the result must be a long in the range [0, 2**32]? In other words, I need a working Python counterpart to the C bitwise operations between unsigned longs.
0
[ 2, 20059, 45, 28839, 2512, 1142, 21211, 800, 3726, 3726, 749, 20, 1623, 20, 226, 678, 1196, 4295, 10342, 29, 15735, 12636, 17, 4275, 23265, 18, 15, 31, 330, 4549, 29, 3748, 1142, 10474, 21211, 9, 25, 80, 21, 757, 161, 15, 19, 2005...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
add menu item to default context menu === I'd like to add a menu item to the default ContextMenu of a RichTextBox. I can create a new context menu but then I loose the spell check suggestions that show up in the default menu. Is there a way to add an item without re-implementing everything?
0
[ 2, 3547, 11379, 9101, 20, 12838, 4141, 11379, 800, 3726, 3726, 31, 22, 43, 101, 20, 3547, 21, 11379, 9101, 20, 14, 12838, 4141, 755, 291, 16, 21, 2042, 11969, 5309, 9, 31, 92, 1600, 21, 78, 4141, 11379, 47, 94, 31, 4675, 14, 476...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Teacher time schedule algorithm === This is a problem I've had on my mind for a long time. Being the son of a teacher and a programmer, it occurred to me early on... So this is the problem. One needs to create a time schedule for a school, using some constraints. These are generally divided in two categories: **Sanity Checks** - A teacher cannot teach two classes at the same time - A student cannot follow two lessons at the same time - Some teachers must have at least one day off during the week - All the days of the week should be covered by the time table - Subject X must have exactly so-and-so hours each week - ... **Preferences** - Each teacher's schedule should be as compact as possible (i.e. the teacher should work all hours for the day in a row with no pauses if possible) - Teachers that have days off should be able to express a preference on which day - Teachers that work part-time should be able to express a preference whether to work in the beginning or the end of the school day. - ... Now, after a few years of not finding a solution (and learning a thing or two in the meanwhile...), this smells like a NP-hard problem. Has this kinds of problem been studied before? Is it officially NP-hard? Does anyone have an idea on how to crack this thing? Looking at [this][1] question made me think about this problem, and whether genetic algorithms would be usable in this case. However it would be pretty hard to mutate possibilities while maintaining the sanity check rules. Also it's not clear to me how to distinguish incompatible requirements. Thanks in advance for any contribution on this. [1]: http://stackoverflow.com/questions/184195/seating-plan-software-recommendations-does-such-a-beast-even-exist
0
[ 2, 2197, 85, 4345, 9083, 800, 3726, 3726, 48, 25, 21, 1448, 31, 22, 195, 41, 27, 51, 594, 26, 21, 175, 85, 9, 142, 14, 433, 16, 21, 2197, 17, 21, 17968, 15, 32, 2437, 20, 55, 274, 27, 9, 9, 9, 86, 48, 25, 14, 1448, 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...
jQuery Thickbox or similar to show iFrame? === I have been looking at [jQUery thickbox][1] for showing modal dialogs with images, it is great. But now I have the need to display a hidden div of content that contains an iFrame in a similar fashion, with a link to open the content. So I'd have something like this. <a href="">Open window in Modal Dialog</a> <div id="myContent"> <h1>Look at me!</h1> <iframe src="http://www.google.com" /> </div> And need to show it in the dialog. Is it possible? [1]: http://jquery.com/demo/thickbox/
0
[ 2, 487, 8190, 93, 2318, 5309, 54, 835, 20, 298, 31, 8361, 60, 800, 3726, 3726, 31, 57, 74, 699, 35, 636, 728, 8190, 93, 2318, 5309, 500, 2558, 165, 500, 26, 3187, 13, 20756, 28223, 18, 29, 3502, 15, 32, 25, 374, 9, 47, 130, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I limit CreateWindowEx to alphanumeric input only? === I know that ES_NUMBER exists to limit CreateWindowEx to numeric input only, is there a similar mechanism for limiting it to only alphanumeric (a-z,0-9) input? Or another way to do something similar. I know I can check after the fact, but I would like to limit it as the user types. Thanks.
0
[ 2, 184, 92, 31, 4496, 1600, 27508, 1706, 20, 5705, 6336, 14744, 6367, 104, 60, 800, 3726, 3726, 31, 143, 30, 13, 160, 1, 16299, 5636, 20, 4496, 1600, 27508, 1706, 20, 15764, 596, 6367, 104, 15, 25, 80, 21, 835, 6534, 26, 17567, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 JavaScript can I make a "click" event fire programmatically? === I'd like to make a click event fire on an `<input type="file">` tag programmatically. Just calling click() doesn't seem to do anything or at least it doesn't pop up a file selection dialog. I've been experimenting with capturing events using listeners and redirecting the event, but I haven't been able to get that to actually perform the event like someone clicked on it.
0
[ 2, 19, 8247, 8741, 92, 31, 233, 21, 13, 7, 150, 10129, 7, 807, 535, 625, 6732, 1326, 60, 800, 3726, 3726, 31, 22, 43, 101, 20, 233, 21, 10840, 807, 535, 27, 40, 13, 1, 108, 4881, 1001, 3726, 7, 16877, 7, 1, 3383, 625, 6732, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Restricting file downloads === I'm currently creating a website for a client that will basically involve selling various files. This is obviously a really common thing to do, which is making me feel kind of foolish for not thinking of a method for doing it. Once the purchase has been made the customer should be taken to a page containing the download link, as well as receiving emails that contain a download link and an email with information about an account that will be created for them (they will also be able to download from their account's control panel). What I'm trying to figure out is how I can hide/obscure the file's location on my server so that one person who buys it can't simply copy and paste the direct link to the file elsewhere. Even if I make the request to download a file a link of the format http://example.com/blah/download/454643, a URL which does not correspond to the actual location of the file, I think it might still be possible to locate the file on the server? I don't really understand too much about how permissions work on my server, which is why I ask. Thanks in advance :)
0
[ 2, 15436, 68, 3893, 7121, 18, 800, 3726, 3726, 31, 22, 79, 871, 2936, 21, 2271, 26, 21, 6819, 30, 129, 11374, 8847, 4355, 617, 6488, 9, 48, 25, 4409, 21, 510, 757, 584, 20, 107, 15, 56, 25, 544, 55, 583, 825, 16, 12596, 26, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Possible to view simplified or optimized SQL query for a database? === Given an ugly and probably long, inefficient, redundant and complicated looking query, is there a tool that can simplify that for a target database? If not, since the database optimizes queries anyway, is it possible to see the optimized query that the database will use? I'm not interested in the actual query plan but rather the optimized and/or simplified query. Is that possible? I'm interested in answers for any of these databases: MySQL, SQL Server, Postgres, SQLite.
0
[ 2, 938, 20, 1418, 13, 11268, 54, 22864, 43, 4444, 255, 25597, 26, 21, 6018, 60, 800, 3726, 3726, 504, 40, 9212, 17, 910, 175, 15, 19, 23702, 15, 24295, 17, 8343, 699, 25597, 15, 25, 80, 21, 5607, 30, 92, 28257, 30, 26, 21, 293...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using Proguard with Android without obfuscation === I am getting an error "Conversion to Dalvik format failed with error 1" when using the -dontobfuscate flag. Otherwise my app exports fine. I don't want to obfuscate because I am using BugSense for error tracking and they charge $99 a month if you need to de-obfuscate your stack traces. I still want to get the file size and optimization benefits of proguard. If I comment out -dontobfuscate every thing works great. Except for the unreadable stack traces. my progaurd.cfg file: -dontobfuscate -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* -keep public class * extends android.app.Activity -keep public class * extends android.app.Application -keep public class * extends android.app.Service -keep public class * extends android.content.BroadcastReceiver -keep public class * extends android.content.ContentProvider -keep public class * extends android.app.backup.BackupAgentHelper -keep public class * extends android.preference.Preference -keep public class com.android.vending.licensing.ILicensingService -keepclasseswithmembernames class * { native <methods>; } -keepclasseswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet); } -keepclasseswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet, int); } -keepclassmembers class * extends android.app.Activity { public void *(android.view.View); } -keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); } -keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; }
0
[ 2, 568, 895, 9499, 29, 13005, 366, 5122, 13735, 16893, 800, 3726, 3726, 31, 589, 1017, 40, 7019, 13, 7, 1126, 10898, 20, 6868, 8280, 2595, 1702, 29, 7019, 137, 7, 76, 568, 14, 13, 8, 804, 262, 220, 13735, 9530, 3157, 9, 3190, 51...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Multi-user Rails blogging-type site - which CMS / solution? === I apologize if the question seems a bit too general, but I have spent some time thinking on how to model this kind of site and I guess some input would be really helpful. I need to create a multiuser site with blog functionality - people uploading media, social component. It was fairly easy to prototype the thing with paperclip and minimal functionality, but when it comes to storing more content number of solutions is growing.. Would that be a generally good idea to use something like RefineryCMS (seems to be most up-to-date with current Rails) with access to dashboard granted to users that create pages. Would users be able to manage separate pages through RefineryCMS? What if there are several types of pages (like blog / portfolio), that have different functionality - would one CMS be able to handle the variation?
0
[ 2, 1889, 8, 16704, 2240, 18, 334, 13919, 8, 4474, 689, 13, 8, 56, 2390, 18, 13, 118, 4295, 60, 800, 3726, 3726, 31, 12059, 100, 14, 1301, 2206, 21, 1142, 266, 297, 15, 47, 31, 57, 1111, 109, 85, 1440, 27, 184, 20, 1061, 48, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
sql to get events that your friends are attending === I've got a few tables User (UserId) Event (EventId) AttendingEvent (UserId,EventId) Friends (UserId,UserId) I want to write a query that can return events where a specific user that I know the id of beforehand has friends that are going to it ordered by the event with the most friends attending.
1
[ 2, 4444, 255, 20, 164, 963, 30, 154, 954, 50, 6237, 800, 3726, 3726, 31, 22, 195, 330, 21, 310, 7484, 4155, 13, 5, 3699, 5175, 6, 807, 13, 5, 4943, 13647, 6, 6237, 4943, 38, 13, 5, 3699, 5175, 15, 4943, 13647, 6, 954, 13, 5,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
when use inject (@EJB) or lookup for referencing an ejb? === i have a @Singleton Bean that i want to use in another @stateless Bean, is that correct or doable? and can i reference the stateless bean using @EJB? in [this thread][1] i read that i can't. thanks. [1]: http://stackoverflow.com/a/3632136/1026897
0
[ 2, 76, 275, 20316, 13, 5, 1, 10022, 220, 6, 54, 361, 576, 26, 13, 29254, 40, 13, 10022, 220, 60, 800, 3726, 3726, 31, 57, 21, 13, 1, 14031, 444, 15322, 30, 31, 259, 20, 275, 19, 226, 13, 1, 3859, 923, 15322, 15, 25, 30, 44...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Modeling a database with UML: Relationships === I am learning UML to model a database for a class project. Essentially the database is for a social network. The tables are user, friends, profile, status, wall_posts, and comments. I'm having some trouble nailing down the exact relationships. At first glance it appears that all tables have the composition relationship (of varying multiplicity); a user "has a" profile(1-1), a user "has" friends(1-0..*), wall_posts (1-0..*), and a wall_post "has" comments(1-0..*). If the user is removed, the effect cascades and should remove any records that have that user id. The user table has info like the uid's name (which is not replicated in the wall_posts table), so something like a message record would have to be removed. Is there a flaw in my logic?
0
[ 2, 12807, 21, 6018, 29, 13, 723, 255, 45, 5833, 800, 3726, 3726, 31, 589, 2477, 13, 723, 255, 20, 1061, 21, 6018, 26, 21, 718, 669, 9, 7398, 14, 6018, 25, 26, 21, 668, 982, 9, 14, 7484, 50, 4155, 15, 954, 15, 5296, 15, 1782,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 form validation - Check if emails are the same === I am trying to create a jQuery form validator for my website. My code is in [this fiddle][1]. The question is, what do I need to do, so that I can check if the email is the same as the email confirmation when both fields have valid email addresses? Also, since I'm currently learning javascript/jQuery, feel free to point out any mistakes|bad practices on my code. [1]: http://jsfiddle.net/EPu3D/2/
0
[ 2, 487, 8190, 93, 505, 27999, 13, 8, 2631, 100, 8517, 18, 50, 14, 205, 800, 3726, 3726, 31, 589, 749, 20, 1600, 21, 487, 8190, 93, 505, 7394, 3457, 26, 51, 2271, 9, 51, 1797, 25, 19, 636, 1565, 12759, 500, 2558, 165, 500, 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...
Looping through a lot of rows === I'm having a time issue with looping through like 1 million potential rows from a database. I basically pull the rows into a DataTable and loop through them, but it is getting slow. What is the alternative out there? I can split this rows into chunks like 20,000 a piece. Can I use parallel processing in C#? Basically the code loops through every potential record that matches a certain query and tries to figure out if it is a legitimate entry. That is why every record needs to be individually visited. A record for a one object could reach 10 million rows. Approaches seem like parallel processing in multiple computers or PP in single machine with multiple cores, or some kind of data structure/approach change? Any opinions, thoughts and guesses are helpful to make this fast and reasonable?
0
[ 2, 5293, 68, 120, 21, 865, 16, 11295, 800, 3726, 3726, 31, 22, 79, 452, 21, 85, 1513, 29, 5293, 68, 120, 101, 137, 507, 2222, 11295, 37, 21, 6018, 9, 31, 11374, 2201, 14, 11295, 77, 21, 1054, 5924, 17, 5293, 120, 105, 15, 47, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can't detect when Windows Font Size has changed C++ MFC === I'm trying to determine how I can detect when the user changes the Windows Font Size from Normal to Extra Large Fonts, the font size is selected by executing the following steps on a Windows XP machine: 1. Right-click on the desktop and select Properties. 2. Click on the Appearance Tab. 3. Select the Font Size: Normal/Large Fonts/Extra Large Fonts My understanding is that the font size change results in a DPI change, so here is what I've tried so far. --------- My Goal: --------- I want to detect when the Font Size has changed and take some actions based on that font size change. --------- What I've tried so far: --------- I receive several messages including: WM_SETTINGCHANGE, WM_NCCALCSIZE, WM_NCPAINT, etc... but none of these messages are unique to the situation when the font size changes, in other words, when I receive the WM_SETTINGSCHANGE message I want to know what changed. In theory when I define the OnSettingChange and Windows calls it, the lpszSection should tell me what the changing section is, and that works fine, but then I check the given section by calling SystemParametersInfo and I pass in the action SPI_GETNONCLIENTMETRICS, and I step through the debugger and I make sure that I watch the data in the returned NONCLIENTMETRICS for any font changes, but none occur. Even if that didn't work, I should still be able to check the DPI when the Settings change. I really wouldn't care about the other details, every time I get the WM_SETTINGCHANGE message, I would just check the DPI and perform the actions I'm interested in performing, but I'm not able to get the system DPI either. I have tried to get the DPI by invoking the method GetSystemMetrics, also for each DC: Dekstop DC->GetDeviceCaps LOGPIXELSX/LOGPIXELSY Window DC->GetDeviceCaps LOGPIXELSX/LOGPIXELSY Current DC->GetDeviceCaps LOGPIXELSX/LOGPIXELSY Even if I change the DPI in the Graphic Properties Window these values don't return anything different, they always show 96. Could anybody help me figure this out please? What should I be looking for? Where should I be looking at?
0
[ 2, 92, 22, 38, 9092, 76, 1936, 9978, 1072, 63, 1015, 272, 20512, 307, 7061, 800, 3726, 3726, 31, 22, 79, 749, 20, 3746, 184, 31, 92, 9092, 76, 14, 4155, 1693, 14, 1936, 9978, 1072, 37, 1826, 20, 2230, 370, 9978, 18, 15, 14, 99...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Validate image from file in C# === I'm loading an image from a file, and I want to know how to validate the image before it is fully read from the file. string filePath = "image.jpg"; Image newImage = Image.FromFile(filePath); The problem occurs when image.jpg isn't really a jpg. For example, if I create an empty text file and rename it to image.jpg, an OutOfMemory Exception will be thrown when image.jpg is loaded. I'm looking for a function that will validate an image given a stream or a file path of the image. Example function prototype bool IsValidImage(string fileName); bool IsValidImage(Stream imageStream);
0
[ 2, 7394, 1373, 1961, 37, 3893, 19, 272, 5910, 800, 3726, 3726, 31, 22, 79, 12797, 40, 1961, 37, 21, 3893, 15, 17, 31, 259, 20, 143, 184, 20, 7394, 1373, 14, 1961, 115, 32, 25, 2337, 1302, 37, 14, 3893, 9, 3724, 3893, 8353, 800...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JSP: How can I still get the code on my error page to run, even if I can't display it? === I've defined an error-page in my web.xml: <error-page> <exception-type>java.lang.Exception</exception-type> <location>/error.jsp</location> </error-page> In that error page, I have a custom tag that I created. The tag handler for this tag e-mails me the stacktrace of whatever error occurred. For the most part this works great. Where it doesn't work great is if the output has already begun being sent to the client at the time the error occurs. In that case, we get this: SEVERE: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/error.jsp] java.lang.IllegalStateException I believe this error happens because we can't redirect a request to the error page after output has already started. The work-around I've used is to increase the buffer size on particularly large JSP pages. But I'm trying to write a generic error handler that I can apply to existing applications, and I'm not sure it's feasible to go through hundreds of JSP pages making sure their buffers are big enough. Is there a way to still allow my stack trace e-mail code to execute in this case, even if I can't actually display the error page to the client?
0
[ 2, 487, 3401, 45, 184, 92, 31, 174, 164, 14, 1797, 27, 51, 7019, 2478, 20, 485, 15, 166, 100, 31, 92, 22, 38, 3042, 32, 60, 800, 3726, 3726, 31, 22, 195, 2811, 40, 7019, 8, 6486, 19, 51, 2741, 9, 396, 8184, 45, 13, 1, 2999...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 an Actionscript component listen to its own propertyChange events? === I have a CircleButton class in Actionscript. I want to know when someone externally has changed the 'on' property. I try listening to 'onChange' but it never hits that event handler. I know I can write the 'on' property as a get/setter but I like the simplicity of just using [Bindable] Can an object not listen to its own events? public class CircleButton extends UIComponent { [Bindable] public var on:Boolean; public function CircleButton() { this.width = 20; this.height = 20; graphics.beginFill(0xff6600, 1); graphics.drawCircle(width/2, height/2, width/2); graphics.endFill(); this.addEventListener(MouseEvent.ROLL_OVER, rollover); this.addEventListener(MouseEvent.ROLL_OUT, rollout); this.addEventListener('onChange', onOnChange); } private function onOnChange(event:PropertyChangeEvent):void {
0
[ 2, 92, 40, 1028, 8741, 5912, 3834, 20, 82, 258, 1354, 16229, 963, 60, 800, 3726, 3726, 31, 57, 21, 2775, 811, 444, 718, 19, 1028, 8741, 9, 31, 259, 20, 143, 76, 737, 4886, 102, 63, 1015, 14, 13, 22, 218, 22, 1354, 9, 31, 113...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Readings on writing high-performance server in Java === Could anyone please introduce books/papers/articles that I should read If I want to write a high-performance server in Java, which handles large number of concurrent connections(C10K or over), is fault-tolerant, can be scaled out, and maintains high throughput? Thanks!
0
[ 2, 1876, 18, 27, 1174, 183, 8, 22528, 8128, 19, 8247, 800, 3726, 3726, 110, 1276, 2247, 8500, 964, 118, 17945, 18, 118, 20360, 18, 30, 31, 378, 1302, 100, 31, 259, 20, 2757, 21, 183, 8, 22528, 8128, 19, 8247, 15, 56, 3053, 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...
Managing users with Postgresql === In our current project, a system that will run on a local network with no more then 50 clients that connects to the same local server, we are creating a DB user for each client, to take advantage of the postgresql privilege system. I have some questions about this situation: 1) Analyzing the "performance", its OK to have ~ 50 DB users instead of reimplementing a custom system? 2) How can the user check (what SQL statement) what permission he has in a table? Example: Bob logins to the system, and the user interface needs to update itself to show only the modules that bob have "UPDATE" permission. I prefer to not reimplement the system, since a good security system isn't trivial to implement.
0
[ 2, 5616, 3878, 29, 678, 6879, 18, 22402, 800, 3726, 3726, 19, 318, 866, 669, 15, 21, 329, 30, 129, 485, 27, 21, 375, 982, 29, 90, 91, 94, 1222, 7421, 30, 8534, 20, 14, 205, 375, 8128, 15, 95, 50, 2936, 21, 13, 9007, 4155, 26...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Image equivalent of ActionLink in ASP.NET MVC === In ASP.NET MVC (preview 5) is there an equivalent of the Html.ActionLink helper for Img tags? I have a controller action that outputs a dynamically generated JPEG and I wanted to use the same Lambda expressions to link to it as I do HREFs using ActionLink. Alternatively, a helper that just gives the URL to a route (again specified using Lambdas) would also be acceptable.
0
[ 2, 1961, 4602, 16, 1028, 6258, 19, 28, 306, 9, 2328, 307, 8990, 800, 3726, 3726, 19, 28, 306, 9, 2328, 307, 8990, 13, 5, 3515, 4725, 331, 6, 25, 80, 40, 4602, 16, 14, 13, 15895, 9, 8645, 6258, 448, 106, 26, 797, 263, 3383, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the best way to center a div on the screen using jQuery? === The title says it all really.
0
[ 2, 98, 25, 14, 246, 161, 20, 459, 21, 13, 12916, 27, 14, 2324, 568, 487, 8190, 93, 60, 800, 3726, 3726, 14, 581, 898, 32, 65, 510, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Can you override the formatter for a specific log in log.properties === I am using log.properties to configure logging for a Java app. Each class gets its own logger named after itself (e.g. com.company.program.ClassX). I want to set a custom formatter for just one log, and leave the handler with the SimpleFormatter. Is this possible? I am not interested in using log4j or another of the other logging suites. I am well aware of them. Nor am I interested in configuring a customer formatter for the logger through code, although if that is the only way to do it, it would be nice to know. Google isn't helping, and I am having problems testing this myself.
0
[ 2, 92, 42, 84, 11891, 14, 26, 24700, 26, 21, 1903, 6738, 19, 6738, 9, 10890, 106, 3915, 800, 3726, 3726, 31, 589, 568, 6738, 9, 10890, 106, 3915, 20, 1065, 15951, 13, 13919, 26, 21, 8247, 4865, 9, 206, 718, 3049, 82, 258, 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...
LINQ DataContext.Translate and properties with name different than the source. === I am working with some tables where I want the C# class to have a different property name than the underlying table column. However, when I use the Translate method to read the results, the properties that don't match the source name never get populated. Even when I use Linq to generate the SQL. For instance, my table is defined in the DB like this: CREATE TABLE User_Entry ( UserId int IDENTITY (1, 1) NOT NULL, Login_Id varchar (50) NOT NULL, Active char(1) NOT NULL, PASSWORD varchar(75) NULL ) Here's the class it maps to (generated by the LINQ designer...LINQ attributes and other stuff left out for brevity): public partial class User { int UserId; string Login; string Active, string Pwd } When I do the following, the Login and Pwd properties are not populated but the UserId and the Active properties are. Data.DbContext db = new Data.DbContext(); IQueryable query = db.Users.Where(usr => usr.Login == request.LoginString); SqlCommand cmd = (SqlCommand)data.GetCommand(query); ... execute the command (asynchronously) ... User user = db.Translate<User>( dataReaderResult ).FirstOrDefault(); !At this point, I inspect the user object and I can see that the Login and Pwd columns are not populated! Here is the sql that was generated: exec sp_executesql N'SELECT [t0].[UserID] AS [UserId], [t0].[Login_ID] AS [Login], [t0].[Active], [t0].[PASSWORD] AS [Pwd] FROM [dbo].[User_Entry] AS [t0] WHERE [t0].[Login_ID] = @p0', N'@p0 varchar(13)', @p0 = 'test_user' Originally, when the UserId column had a different property name I was getting an exception "The required column [UserId] does not exist in the results". I looked around and I saw a response from some MSFT people that said it was a bug. Is this related? Was it ever fixed? Does anyone know when it will be fixed? Thanks, wizlb
0
[ 2, 6294, 1251, 1054, 1126, 11969, 9, 7028, 6554, 17, 3704, 29, 204, 421, 119, 14, 1267, 9, 800, 3726, 3726, 31, 589, 638, 29, 109, 7484, 113, 31, 259, 14, 272, 5910, 718, 20, 57, 21, 421, 1354, 204, 119, 14, 10974, 859, 4698, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 access a nested model from rhtml? === I have a drop down like this on my page: <p> <%= f.label :episode_id %><br /> <%= f.collection_select(:episode_id, @episodes, :id, :show) %> </p> An episode has an id and `belongs_to` to a show which has a name. In the dropdown, I'd like to display the show name. `:show.name` doesn't work to display the name. How do I do this?
0
[ 2, 184, 107, 31, 1381, 21, 5618, 69, 1061, 37, 761, 15895, 60, 800, 3726, 3726, 31, 57, 21, 2804, 125, 101, 48, 27, 51, 2478, 45, 13, 1, 306, 1, 13, 1, 11881, 3726, 398, 9, 21018, 13, 45, 13397, 1, 1340, 13, 11881, 1, 5145, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Data structure for non-overlapping ranges within a single dimension === I need a data structure that can store non-overlapping ranges within a single dimension. The entire range of the dimension need not be completely covered. An example would be a conference room scheduler. The dimension is time. No two schedules may overlap. The conference room isn't always scheduled. In other words, for a given time there can be at most one schedule. A quick solution is for a range to store the start and end times. Range { Date start Date end } This is non-normalized and requires the container to enforce no overlapping. For two adjacent ranges, the previous' end will be redundant with the next's start. Another scheme might involve storing one boundary value with each range. But for a contiguous sequence of ranges, there will always be one more boundary values than ranges. To get around this the sequence could be represented as alternating boundary values and ranges: B = boundary value, r = range > B-r-B-r-B The data structure might look like: Boundary { Date value Range prev Range next } Range { Boundary start Boundary end } In essence it's a doubly linked list with alternating types. Ultimately, whatever data structure I use will be represented in both memory (application code) and a relational database. I'm curious what academic or industry tried solutions exists.
0
[ 2, 1054, 1411, 26, 538, 8, 2549, 531, 5574, 9230, 363, 21, 345, 9547, 800, 3726, 3726, 31, 376, 21, 1054, 1411, 30, 92, 1718, 538, 8, 2549, 531, 5574, 9230, 363, 21, 345, 9547, 9, 14, 1078, 978, 16, 14, 9547, 376, 52, 44, 1524...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
GPGPU VM's: Any open source projects to port virtual machines onto graphics processing units? === nVidia released their CUDA API allowing developers to utilize their graphics cards, taking advantage of the massively parallel architecture and vectorized operations. Libraries such as pyCUDA were created to allow developers of scripting languages to send selected code to the GPU. And there has been a growing effort to design multi-lingual virtual machines, such as Parrot, on top of strongly-typed concurrency-friendly languages like Erlang. So I wonder, are there any open source projects to code a virtual machine environment tailored to take full benefit of the GPU? I would imagine that having a strongly-typed, monadically-secured concurrent environment for running major scripting languages able to take advantage of all the GPU has to offer, would be an extremely interesting field. But so far, I haven't found anything on Google. Is anyone working on this?
0
[ 2, 10538, 263, 4201, 13, 20147, 22, 18, 45, 186, 368, 1267, 2314, 20, 1295, 6599, 6035, 1204, 8351, 5511, 1398, 60, 800, 3726, 3726, 13, 20763, 18175, 261, 66, 272, 5729, 21, 2159, 2719, 10168, 20, 13151, 66, 8351, 4092, 15, 741, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[NSPredicateRowEditorTemplate templatesWithAttributeKeyPaths:inEntityDescription:] for to-many key? === In my Core Data managed object model, I have an entity Foo with a to-many relationship (with a to-many inverse) to entity Baz named baz. Baz has a string property named "tag". When I use `[NSPredicateRowEditorTemplate templatesWithAttributeKeyPaths:[NSArray arrayWithObject:@"baz.tag"] inEntityDescription:FooDescription]` to create the row editors for an NSPredicateEditor, the result contains (as expected) a row template like [Popup: baz.tag] [Popup: Contains|is|is not|...] [TextField] When I select "Contains" from the popup, a query with the predicate works as expected. If I choose any of the other popups (e.g. "is"), I get the following error: "to-many key not allowed here". Can I use `[NSPredicateRowEditorTemplate templatesWithAttributeKeyPaths:inEntityDescription:]` or do I have to build the row editor manually?
0
[ 2, 636, 2172, 3515, 4673, 1373, 5417, 13401, 9577, 6554, 22894, 18, 1410, 721, 14755, 4237, 8353, 18, 45, 108, 2291, 856, 546, 8741, 872, 45, 500, 26, 20, 8, 14842, 1246, 60, 800, 3726, 3726, 19, 51, 2884, 1054, 1471, 3095, 1061, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
networking in .net/C# === Could somebody please point me in the right direction for learning how to do networking in C#/.net 3.5? Code samples and explanations are welcome. Basically I am looking for how to do asynchronous/multithreaded server/client models. I am fairly comfortable with the basics in how to accomplish this in C++ with WinSock but though all of my research cannot seem to grasp this concept in C#. Thanks for any assistance you can provide :)
0
[ 2, 16230, 19, 13, 9, 2328, 118, 150, 5910, 800, 3726, 3726, 110, 8861, 2247, 454, 55, 19, 14, 193, 1400, 26, 2477, 184, 20, 107, 16230, 19, 272, 5910, 118, 9, 2328, 203, 9, 264, 60, 1797, 7855, 17, 5764, 18, 50, 5575, 9, 11374...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
NSDatePickerElementFlags for NSDatePicker row editor returned from [NSPredicateRowEditorTemplate templatesWithAttributeKeyPaths:inEntityDescription:] === How can I modify the `NSDatePickerElementFlags` for the `NSDatePicker` in row templates for `NSDate` properties returned by `[NSPredicateRowEditorTemplate templatesWithAttributeKeyPaths:inEntityDescription:]`? I would like the `NSDatePicker` to show hrs:minutes as well as the date.
0
[ 2, 13, 2172, 8209, 16855, 106, 27567, 22868, 18, 26, 13, 2172, 8209, 16855, 106, 3131, 1835, 587, 37, 636, 2172, 3515, 4673, 1373, 5417, 13401, 9577, 6554, 22894, 18, 1410, 721, 14755, 4237, 8353, 18, 45, 108, 2291, 856, 546, 8741, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Asp.Net: Javascript Modal Window === I would like to create a javascript modal pop up window to get some values from a user in a ASP.Net 2.0 webpage. The basic idea is this. When a user clicks a button, a modal window will come up and ask 3 or 4 questions. The asp.net page will not be able to be changed while this window is up. Once the questions have been answered I need to grab the values from this window so the asp.net page has access to them and can handle them in the code behind. Can I please get some examples on how you would implement this scenario.
0
[ 2, 28, 306, 9, 2328, 45, 8247, 8741, 13, 20756, 1463, 800, 3726, 3726, 31, 83, 101, 20, 1600, 21, 8247, 8741, 13, 20756, 1675, 71, 1463, 20, 164, 109, 4070, 37, 21, 4155, 19, 21, 28, 306, 9, 2328, 172, 9, 387, 2741, 6486, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why would WaitForSingleObject return WAIT_FAILED === MSDN says > If the function fails, the return value is WAIT_FAILED. To get extended error information, call GetLastError. The code is: HANDLE m_mutex_handle; /**< m_mutex_handle. The handle to the created mutex. */ m_mutex_handle = ::CreateMutex( 0, false, NULL ); ::WaitForSingleObject( m_mutex_handle, INFINITE ); But what are the reasons that could happen?
0
[ 2, 483, 83, 1760, 1106, 14031, 23793, 788, 1760, 1, 24910, 69, 800, 3726, 3726, 4235, 43, 103, 898, 13, 1, 100, 14, 1990, 13614, 15, 14, 788, 1923, 25, 1760, 1, 24910, 69, 9, 20, 164, 1984, 7019, 676, 15, 645, 164, 8558, 29992, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Filtering JSON Data on the Browser/Client === Here's the scenario-- you've got a JSON object on the browser, and let's say it has a boolean property, called "Active". We want to create a new JSON object that contains only items that have Active = True. Is there an easy way to do this, other than looping through the entire JSON object? I'm basically trying to use ASP.Net AJAX Templates to show a list of items that can either be active or inactive, based on a dropdown the user selects.
0
[ 2, 25272, 487, 528, 1054, 27, 14, 16495, 118, 150, 18513, 38, 800, 3726, 3726, 235, 22, 18, 14, 12705, 8, 8, 42, 22, 195, 330, 21, 487, 528, 3095, 27, 14, 16495, 15, 17, 408, 22, 18, 395, 32, 63, 21, 9827, 413, 210, 1354, 15...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to auto select an input field and the text in it on page load === Upon page load I want to move the cursor to a particular field. No problem. But I also need to select and highlight the default value that is placed in that text field.
0
[ 2, 184, 20, 3108, 5407, 40, 6367, 575, 17, 14, 1854, 19, 32, 27, 2478, 6305, 800, 3726, 3726, 685, 2478, 6305, 31, 259, 20, 780, 14, 29588, 20, 21, 1498, 575, 9, 90, 1448, 9, 47, 31, 67, 376, 20, 5407, 17, 14373, 14, 12838, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
What data type do you use for storing IDs? === Why is there a minimum character count for posting questions? o.O Anyway, my question is as clear as can be from the title. Do you use int, bigint, tinyint, whatever. It seems like a small thing I guess, I was just wondering what the usual practice is.
0
[ 2, 98, 1054, 1001, 107, 42, 275, 26, 25615, 13, 9178, 60, 800, 3726, 3726, 483, 25, 80, 21, 5187, 925, 2468, 26, 15669, 2346, 60, 635, 9, 111, 2774, 15, 51, 1301, 25, 28, 1207, 28, 92, 44, 37, 14, 581, 9, 107, 42, 275, 19, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why does firefox say "connection partially encrypted" on this page? === Here's the page: [https://www.testmasters.net/test/ssltest2.aspx][1] When I go to it (in firefox or chrome), it says "connection partially encrypted". But all references to objects are https and not http as far as I can tell. What's odd is that if you remove the RequiredFieldValidator, the page works fine. Here's the source (ASP.NET 3.5): <%@ Page Language="C#" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>SSL Test</title> </head> <body> <form id="form1" runat="server"> <div> SSL Test #1 <asp:TextBox runat='server' ID='textDude' /> <asp:RequiredFieldValidator runat='server' ID='requiredDude' ControlToValidate='textDude' Display='Dynamic' /> </div> </form> </body> </html> [1]: https://www.testmasters.net/test/ssltest2.aspx
0
[ 2, 483, 630, 535, 18219, 395, 13, 7, 25996, 872, 5933, 29403, 7, 27, 48, 2478, 60, 800, 3726, 3726, 235, 22, 18, 14, 2478, 45, 636, 21127, 18, 6903, 6483, 9, 10543, 4594, 18, 9, 2328, 118, 10543, 118, 18, 18, 255, 10543, 135, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Pragmatic Information Security Textbooks === I am currently enrolled in an information security class and have, thus far, been unimpressed by our assigned textbook. After doing a quick check at Amazon for other security texts, a common complaint amongst reviewers was that their books offer a cursory, entirely theoretical look at hacking and defense with no real world examples. I'd like to find a text that discusses both the offensive and defensive aspects of security. As it stands, I have a very vague concept of how an actual attack is executed and how an attentive programmer could have avoided that security hole. Does anyone have any suggestions?
0
[ 2, 28443, 676, 1221, 21926, 800, 3726, 3726, 31, 589, 871, 7846, 19, 40, 676, 1221, 718, 17, 57, 15, 1086, 463, 15, 74, 367, 1660, 5890, 69, 34, 318, 2467, 19059, 9, 75, 845, 21, 2231, 2631, 35, 8059, 26, 89, 1221, 6381, 15, 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...
Best method to check the empty child nodes in XML? === I have a xml which is max 3 levels deep. Now by using C# or Xpath what the best method to check the whether all the child nodes under a parent node are empty. Thanks in Advance.
0
[ 2, 246, 2109, 20, 2631, 14, 2424, 850, 16272, 19, 23504, 60, 800, 3726, 3726, 31, 57, 21, 23504, 56, 25, 2049, 203, 2216, 855, 9, 130, 34, 568, 272, 5910, 54, 993, 8353, 98, 14, 246, 2109, 20, 2631, 14, 1472, 65, 14, 850, 1627...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 to test persistent connexion in a HTTP server? === While building a small experimental HTTP server, I need to implement the persistent connexion feature of HTTP 1.1 (and the pipelining feature). How do I test it? Using a browser like firefox gives me little or no control, and it's hard to check. Any ideas? Thanks
0
[ 2, 184, 20, 1289, 15348, 15201, 1706, 872, 19, 21, 7775, 8128, 60, 800, 3726, 3726, 133, 353, 21, 284, 5174, 7775, 8128, 15, 31, 376, 20, 8713, 14, 15348, 15201, 1706, 872, 1580, 16, 7775, 137, 9, 165, 13, 5, 290, 14, 7642, 8930...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Good Resources For Emacs. === So to give a bit of pretext, I'm a programmer and my work has me constantly switching between my laptop (Mac OS X) and Linux/Windows machines. I really would love to find a good text-editor for all of these, I've tried vi and it's a great editor for my basic tasks but since I'm doing programming I wanted something a bit more geared towards that so I started using emacs. I'm enjoying using emacs, but feel like I'm not getting the full benefit of it's power, especially on the Elisp side. Can anyone recommend a good resource for learning emacs and elisp, whether it's a book or an online document. Thanks in advance.
0
[ 2, 254, 2566, 26, 13, 62, 6893, 18, 9, 800, 3726, 3726, 86, 20, 590, 21, 1142, 16, 28850, 15, 31, 22, 79, 21, 17968, 17, 51, 170, 63, 55, 7545, 13027, 128, 51, 12294, 13, 5, 6893, 13, 759, 993, 6, 17, 13024, 118, 27508, 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...
How can you tell whether a file is being cached in memory in linux? === Essentially my question is, does anyone know of a utility for inspecting the **buffer cache** in linux?
0
[ 2, 184, 92, 42, 494, 1472, 21, 3893, 25, 142, 16522, 43, 19, 1912, 19, 13024, 60, 800, 3726, 3726, 7398, 51, 1301, 25, 15, 630, 1276, 143, 16, 21, 10082, 26, 19, 7350, 68, 14, 13, 1409, 2345, 6866, 16522, 1409, 19, 13024, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Can you find the web security issue here? === I have a webpage that redirects to another webpage like this: http://www.myOtherServer.com/Sponsor.php?RedirectPage=http://mylink.com/whereIwasgoingtogo.html Then the Sponsor.php page displays an ad with a link saying "Continue to your page" that links to the passed in RedirectPage. Are there security/spoofing issues that could come from this? What is the best way to handle this? (note that the user is not logged in to either site)
0
[ 2, 92, 42, 477, 14, 2741, 1221, 1513, 235, 60, 800, 3726, 3726, 31, 57, 21, 2741, 6486, 30, 302, 14706, 18, 20, 226, 2741, 6486, 101, 48, 45, 7775, 6903, 6483, 9, 915, 9539, 10321, 106, 9, 960, 118, 18, 8782, 18, 248, 9, 26120...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Giving (brief) control back to the browser during instensive javascript processing === I have read the post [here][1] about using setTimeout() during intensive DOM processing (using javascript), but how can I integrate this function with the below code? The below code works fine for a small number of options, but when the number of options gets too big my "please wait" gif freezes while the local javascript is processing. Thanks function appendToSelect() { $("#mySelect").children().remove() ; $("#mySelect").html('<option selected value="' + obj.data[0].value + '">' + obj.data[0].name + '</option>'); var j = 1 ; for (var i = 1; i < obj.data.length; i++) { $("#mySelect").append('<option value="' + obj.data[i].value + '">' + obj.data[i].name + '</option>'); } [1]: http://www.julienlecomte.net/blog/2007/10/28/
0
[ 2, 1438, 13, 5, 28641, 6, 569, 97, 20, 14, 16495, 112, 19, 18, 8710, 1284, 8247, 8741, 5511, 800, 3726, 3726, 31, 57, 1302, 14, 678, 636, 6836, 500, 2558, 165, 500, 88, 568, 309, 891, 1320, 5, 6, 112, 13633, 11859, 5511, 13, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Assembly "is not signed correctly." Warning === I have a mobile .NET solution and decided to sign the assemblies. Compilation completes without errors but gives the warning **'CompactUI.Business.PocketPC.asmmeta, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not signed correctly.** The application is working fine but I can't open the designer for forms using this assembly anymore. Again the designer says **'CompactUI.Business.PocketPC.asmmeta, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not signed correctly.** with the stack information: at Microsoft.CompactFramework.Build.AsmmetaBindingService.GetAsmmetaAssembly(String sourceAssemblyPath, Boolean verify) at Microsoft.CompactFramework.Build.AsmmetaBindingService.LoadAsmMetaAssembly(Assembly sourceAssembly, String hintPath, IDeviceTypeResolutionService resolver) at Microsoft.CompactFramework.Build.MetadataService.GetAsmmetaType(Type sourceType) at Microsoft.CompactFramework.Build.MetadataService.GetTypeAttributes(Type desktopType) at Microsoft.CompactFramework.Design.DeviceCustomTypeDescriptor.GetAttributes() ... What is causing this?
0
[ 2, 1475, 13, 7, 403, 52, 908, 12044, 9, 7, 3590, 800, 3726, 3726, 31, 57, 21, 3241, 13, 9, 2328, 4295, 17, 868, 20, 1676, 14, 21066, 9, 4868, 1279, 18, 366, 11908, 47, 2352, 14, 3590, 13, 1409, 22, 18415, 13105, 49, 9, 18717, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 wait on console input in c# for 15 seconds or so. === I need to ask for input in console and wait for few sec may be a min after that I need to default to some value. How can basically time our on console input in c# and proceed with default settings? If you have sample code that would be great.
0
[ 2, 184, 107, 31, 1760, 27, 8650, 6367, 19, 272, 5910, 26, 357, 2582, 54, 86, 9, 800, 3726, 3726, 31, 376, 20, 1349, 26, 6367, 19, 8650, 17, 1760, 26, 310, 9265, 123, 44, 21, 4232, 75, 30, 31, 376, 20, 12838, 20, 109, 1923, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is an NP-complete problem? === What is an NP-complete problem? Why is it such an important topic in computer science?
0
[ 2, 98, 25, 40, 13, 8157, 8, 15990, 1448, 60, 800, 3726, 3726, 98, 25, 40, 13, 8157, 8, 15990, 1448, 60, 483, 25, 32, 145, 40, 681, 8303, 19, 1428, 762, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
How do I secure a SQL Server 2005 database? === I have a database for a web application that is home to some personal information about my users. What should I do to make sure the data is secure? Encrypting the data makes sense, of course... but what about stopping somebody from getting on the machine to begin with? What do I do about the developers that need access to the data, to make fixes, etc...? Is there a document or best practice site that I can use as a guide?
0
[ 2, 184, 107, 31, 4315, 21, 4444, 255, 8128, 812, 6018, 60, 800, 3726, 3726, 31, 57, 21, 6018, 26, 21, 2741, 3010, 30, 25, 213, 20, 109, 1319, 676, 88, 51, 3878, 9, 98, 378, 31, 107, 20, 233, 562, 14, 1054, 25, 4315, 60, 1957...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 referential transparency? === What does the term <b>referential transparency</b> mean? I've heard it described as "it means you can replace equals with equals" but this seems like an inadequate explanation.
0
[ 2, 98, 25, 5017, 10107, 19668, 60, 800, 3726, 3726, 98, 630, 14, 981, 13, 1, 220, 1, 99, 2407, 10107, 19668, 1, 118, 220, 1, 884, 60, 31, 22, 195, 752, 32, 745, 28, 13, 7, 242, 1108, 42, 92, 3934, 2747, 18, 29, 2747, 18, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
stdcall over-ride by visual studio ? === In xp 32bit this line compiles with not problem however in vista 64bit this line: m_FuncAddr = ::GetProcAddress (somthing); gives the following error > error C2440: '=' : cannot convert from > 'FARPROC' to 'int (__cdecl *)(void)' GetProcAddress is defined as WINBASEAPI FARPROC WINAPI GetProcAddress (somthing) And m_FuncAddr as int (WINAPI *m_FuncAddr)(); From what I understand both are stdcall's. To avoid the error I had to put m_FuncAddr = (int (__cdecl *)(void))::GetProcAddress(somthing); My Question: If both m_FuncAddr and GetProcAddress have the stdcall calling convention why do I have to 'recall' it with cdecl ? Is it possible that the VS project setting 'default calling convention (which is set to cdecl) over-rides the assignemet statment above ? Thanks in advanced!
0
[ 2, 354, 43, 9200, 84, 8, 11891, 34, 3458, 1120, 13, 60, 800, 3726, 3726, 19, 23045, 2512, 3326, 48, 293, 26561, 18, 29, 52, 1448, 207, 19, 13520, 4384, 3326, 48, 293, 45, 307, 1, 16638, 13489, 3807, 800, 13, 45, 45, 3060, 15617,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Sharing State Amongst TestMethods in MSTest === How do I share state amongst TestMethods in MSTest. These tests would be run as Ordered Tests and in sequence. <code> private TestContext testContext; public TestContext TestContext { get { return this.testContext; } set { this.testContext = value;} } [TestMethod] public void Subscribe() { bool subscribed = true; TestContext.Properties.Add("subscribed", subscribed); Assert.IsTrue(subscribed == true, string.Format("Subscribed...{0}", this.GetHashCode())); } [TestMethod] public void GenerateEvent() { bool subscribed = (bool)TestContext.Properties["subscribed"]; Assert.IsTrue(subscribed == true, string.Format("Subscribed...{0}", this.GetHashCode())); } </code> Thanks in advance.
0
[ 2, 6126, 146, 4667, 1289, 5909, 1807, 43, 18, 19, 4235, 10543, 800, 3726, 3726, 184, 107, 31, 1891, 146, 4667, 1289, 5909, 1807, 43, 18, 19, 4235, 10543, 9, 158, 4894, 83, 44, 485, 28, 1905, 4894, 17, 19, 4030, 9, 13, 1, 9375, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 KML placemarks in a Google Maps overlay via Javascript? === I have a KML file overlay on an embedded Google Map using the GGeoXml object. I'd like to be able to access specific placemarks in the KML file from Javascript (for example to highlight a selected polygon on the map in response to user action). Ideally what I'd like to do is something like this (pseudo-code): geoXml.getPlacemarkByName('Foo').focus(); Unforunately the [Google Maps API](http://code.google.com/apis/maps/documentation/reference.html#GGeoXml) doesn't seem to expose the placemarks or any other internals of the KML overlay. Does anyone have any thoughts as to how I might accomplish this? I don't know anything about how the overlays are implemented internally, but it seems like there might be a hack that would let me do this. I'm also using jQuery FWIW.
0
[ 2, 1381, 401, 255, 209, 4527, 18, 19, 21, 8144, 6867, 84, 4414, 1197, 8247, 8741, 60, 800, 3726, 3726, 31, 57, 21, 401, 255, 3893, 84, 4414, 27, 40, 12138, 8144, 2942, 568, 14, 489, 834, 6326, 8184, 3095, 9, 31, 22, 43, 101, 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...
What are some best practices for querying binary data from a database? === I'm being asked to add queryability to a database (Oracle) filled with mostly binary data. So I need to be able to query binary ranges within a blobs of a few kilobytes. I've never done this before, so I'm wondering what are some good practices and pitfalls to consider when starting a project like this. Thanks
0
[ 2, 98, 50, 109, 246, 5242, 26, 25597, 68, 14171, 1054, 37, 21, 6018, 60, 800, 3726, 3726, 31, 22, 79, 142, 411, 20, 3547, 25597, 4091, 20, 21, 6018, 13, 5, 6055, 5615, 6, 1943, 29, 1555, 14171, 1054, 9, 86, 31, 376, 20, 44, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
WP-Contact Form 7 -- PHP Question === I don't know how much information you need for this, but WP-ContactForm-7 is a contact form for WordPress. By default it has one server response message for all forms on the website. I have multiple forms and would like a different server response messages for each one. function message($status) { switch ($status) { case 'mail_sent_ok': return __('Your message was sent successfully. Thanks.', 'wpcf7'); case 'mail_sent_ng': return __('Failed to send your message. Please try later or contact administrator by other way.', 'wpcf7'); case 'validation_error': return __('Validation errors occurred. Please confirm the fields and submit it again.', 'wpcf7'); case 'accept_terms': return __('Please accept the terms to proceed.', 'wpcf7'); case 'invalid_email': return __('Email address seems invalid.', 'wpcf7'); case 'invalid_required': return __('Please fill the required field.', 'wpcf7'); case 'captcha_not_match': return __('Your entered code is incorrect.', 'wpcf7'); } } If this is not enough info then you can download the file from [here][1] and look at the whole source code. [1]: http://downloads.wordpress.org/plugin/contact-form-7.1.8.0.3.zip
0
[ 2, 13, 13790, 8, 29912, 505, 453, 13, 8, 8, 13, 26120, 1301, 800, 3726, 3726, 31, 221, 22, 38, 143, 184, 212, 676, 42, 376, 26, 48, 15, 47, 13, 13790, 8, 29912, 4190, 8, 465, 25, 21, 2203, 505, 26, 833, 5890, 9, 34, 12838, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you scale HTTP server like Google? === I often marvel at how I can go to www.google.com, from anywhere in the world at any time, and get the returned page so fast. Sure, they compress their output and keep to a minimal design - that helps. But they must have *millions* of simultaneous hits to the box sitting on the web that DNS lists as "www.google.com". All of you who have set up Apache or other web servers know that things are great and super fast until you start getting a few thousand simultaneous connections, let alone *millions*! So, how do they do it? I guess they have a whole farm of server machines, but you'd never know it. When I went to Verizon just now the url was www22.verizon.com. You never see "www22.google.com", *never*. Any ideas what specific technologies they use, or what technologies us non-Google mortals can use to do the same thing? Thanks!
0
[ 2, 184, 107, 42, 3464, 7775, 8128, 101, 8144, 60, 800, 3726, 3726, 31, 478, 6549, 35, 184, 31, 92, 162, 20, 13, 6483, 9, 16111, 4875, 9, 960, 15, 37, 4922, 19, 14, 126, 35, 186, 85, 15, 17, 164, 14, 587, 2478, 86, 1512, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I email CSV files to specific emails? === I have a table (volunteers_2009) that has all the volunteers stored within, then I have a table (venues) that list all the different venues a volunteer could work (volunteers are assigned to one venue each, and that is stored within volunteers_2009.venue_id, which equals venues.id) The venues table also has a column for emails, each email is for the chairman of each venue. What I want to do is be able to automatically send each chairman an email with a CSV file of the volunteers table (volunteers_2009), and during that process, I want it to match up volunteers_2009.venue_id with venues.id and send the CSV with only the volunteers assigned to that chairman's venue, so the chairman only receives a CSV of the volunteers that were assigned to their venue. I would run thru the venues table, start at the beginning, match the venues.id to volunteers_2009.venue_id, then run the CSV export function to pull all the data WHERE venue_id = #, then attach it into the email and the recipient would be venues.chair_email. I already have a export CSV function, I could just pass it the venue_id to pull the appropriate volunteers, and I have a working email function as well, so I can pass it the attachment and recipient.
0
[ 2, 184, 107, 31, 8517, 272, 18, 710, 6488, 20, 1903, 8517, 18, 60, 800, 3726, 3726, 31, 57, 21, 859, 13, 5, 16261, 103, 591, 445, 1, 2849, 6, 30, 63, 65, 14, 6592, 8214, 363, 15, 94, 31, 57, 21, 859, 13, 5, 3124, 4185, 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...
How do I get an animated gif to work in WPF? === What control type should I use - Image, MediaElement, etc??
0
[ 2, 184, 107, 31, 164, 40, 5784, 489, 821, 20, 170, 19, 619, 7721, 60, 800, 3726, 3726, 98, 569, 1001, 378, 31, 275, 13, 8, 1961, 15, 941, 27567, 15, 2722, 60, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
How do you remove a file from being version controlled without deleting the file in subversion? === I accidentally added a binary file to SVN with the add command, and now I want to remove it from being version controlled, but not delete the file. How do I do this?
0
[ 2, 184, 107, 42, 4681, 21, 3893, 37, 142, 615, 3959, 366, 121, 1336, 68, 14, 3893, 19, 972, 10898, 60, 800, 3726, 3726, 31, 9746, 905, 21, 14171, 3893, 20, 13, 18, 16578, 29, 14, 3547, 1202, 15, 17, 130, 31, 259, 20, 4681, 32,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Better Way To Use C++ Named Parameter Idiom? === I've been developing a GUI library for Windows (as a personal side project, no aspirations of usefulness). For my main window class, I've set up a hierarchy of option classes (using the [Named Parameter Idiom][1]), because some options are shared and others are specific to particular types of windows (like dialogs). The way the Named Parameter Idiom works, the functions of the parameter class have to return the object they're called on. The problem is that, in the hierarchy, each one has to be a *different* class -- the `createWindowOpts` class for standard windows, the `createDialogOpts` class for dialogs, and the like. I've dealt with that by making all the option classes templates. Here's an example: template <class T> class _sharedWindowOpts: public detail::_baseCreateWindowOpts { public: /////////////////////////////////////////////////////////////// // No required parameters in this case. _sharedWindowOpts() { }; typedef T optType; // Commonly used options optType& at(int x, int y) { mX=x; mY=y; return static_cast<optType&>(*this); }; // Where to put the upper-left corner of the window; if not specified, the system sets it to a default position optType& at(int x, int y, int width, int height) { mX=x; mY=y; mWidth=width; mHeight=height; return static_cast<optType&>(*this); }; // Sets the position and size of the window in a single call optType& background(HBRUSH b) { mBackground=b; return static_cast<optType&>(*this); }; // Sets the default background to this brush optType& background(INT_PTR b) { mBackground=HBRUSH(b+1); return static_cast<optType&>(*this); }; // Sets the default background to one of the COLOR_* colors; defaults to COLOR_WINDOW optType& cursor(HCURSOR c) { mCursor=c; return static_cast<optType&>(*this); }; // Sets the default mouse cursor for this window; defaults to the standard arrow optType& hidden() { mStyle&=~WS_VISIBLE; return static_cast<optType&>(*this); }; // Windows are visible by default optType& icon(HICON iconLarge, HICON iconSmall=0) { mIcon=iconLarge; mSmallIcon=iconSmall; return static_cast<optType&>(*this); }; // Specifies the icon, and optionally a small icon // ...Many others removed... }; template <class T> class _createWindowOpts: public _sharedWindowOpts<T> { public: /////////////////////////////////////////////////////////////// _createWindowOpts() { }; // These can't be used with child windows, or aren't needed optType& menu(HMENU m) { mMenuOrId=m; return static_cast<optType&>(*this); }; // Gives the window a menu optType& owner(HWND hwnd) { mParentOrOwner=hwnd; return static_cast<optType&>(*this); }; // Sets the optional parent/owner }; class createWindowOpts: public _createWindowOpts<createWindowOpts> { public: /////////////////////////////////////////////////////////////// createWindowOpts() { }; }; It works, but as you can see, it requires a noticeable amount of extra work: a type-cast on the return type for each function, extra template classes, etcetera. My question is, is there an easier way to implement the Named Parameter Idiom in this case, one that doesn't require all the extra stuff? [1]: http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.18
0
[ 2, 574, 161, 20, 275, 272, 20512, 377, 18906, 28380, 60, 800, 3726, 3726, 31, 22, 195, 74, 3561, 21, 9457, 1248, 26, 1936, 13, 5, 472, 21, 1319, 270, 669, 15, 90, 19426, 18, 16, 4811, 720, 6, 9, 26, 51, 407, 1463, 718, 15, 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...
C non-standard libraries === I'm, quite new to programming, and I was wondering: isn't there a good source to find good, well programmed non-standard C code/libraries? I Googled and didn't find anything (!) I was a bit surprised by this, especially because I used to search for many python examples or libraries and never had trouble finding anything. I already use standard libraries such as stdio.c or stdlib.c or math.c, but I'd want to use some more specific C modules .For example: a graph processing library, etc. (I don't really need this one, but a collection of C [not C++ or C#] resources and examples) I hope this question is aproppiate, and sorry for my pre-historic english. Thanks for your time! Manuel
0
[ 2, 272, 538, 8, 15566, 8649, 800, 3726, 3726, 31, 22, 79, 15, 1450, 78, 20, 3143, 15, 17, 31, 23, 5712, 45, 2532, 22, 38, 80, 21, 254, 1267, 20, 477, 254, 15, 134, 2866, 43, 538, 8, 15566, 272, 1797, 118, 1210, 2559, 2829, 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...
c# winforms: determine first run of program === I need to present a wizard once, the first time my windows forms application is run after install. I could use a user setting like firstrun = false I suppose. But I also need handle the case where the program is uninstalled, then reinstalled. How will that user setting be reset? It's already present in the config file in ...\Users\--user--\AppData\Roaming\... for that user. I need the wizard to run after any reinstalls so I need to reset that setting. Do I need to do this with a custom installer action?
0
[ 2, 272, 5910, 628, 4190, 18, 45, 3746, 64, 485, 16, 625, 800, 3726, 3726, 31, 376, 20, 734, 21, 10276, 382, 15, 14, 64, 85, 51, 1936, 1997, 3010, 25, 485, 75, 16146, 9, 31, 110, 275, 21, 4155, 2697, 101, 64, 3169, 800, 4997, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 would be a globally accepted regular expression to match e-mail addresses === I have seen many examples, with many 'no, you missed something' comments. What is the right way to match an e-mail address? For Sanity sake, only fully-qualified domain names, no @localhost allowed. (or, both ways) Subdomains must be allowed (issac@deptartment.company.museum)
0
[ 2, 98, 83, 44, 21, 18861, 2217, 1290, 1803, 20, 730, 13, 62, 8, 8079, 12636, 800, 3726, 3726, 31, 57, 541, 151, 3770, 15, 29, 151, 13, 22, 251, 15, 42, 3238, 301, 22, 7534, 9, 98, 25, 14, 193, 161, 20, 730, 40, 13, 62, 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...
Using os.execvp in Python === I have a question about using <code>os.execvp</code> in Python. I have the following bit of code that's used to create a list of arguments: <pre> args = [ "java" , classpath , "-Djava.library.path=" + lib_path() , ea , "-Xmx1000m" , "-server" , "code_swarm" , params ] </pre> When I output a string using <code>" ".join(args)</code> and paste that into my shell prompt, the JVM launches fine, and everything works. Everything works if I use <code>os.system(" ".join(args))</code> in my Python script, too. <em>But</em> the following bit of code does not work: <pre>os.execvp("java", args)</pre> I get the following error: <pre> Unrecognized option: -classpath [and then the classpath I created, which looks okay] Could not create the Java virtual machine. </pre> So what gives? Why does copying/pasting into the shell or using <code>os.system()</code> work, but not <code>os.execvp()</code>?
0
[ 2, 568, 13, 759, 9, 1706, 3319, 10924, 19, 20059, 800, 3726, 3726, 31, 57, 21, 1301, 88, 568, 13, 1, 9375, 1, 759, 9, 1706, 3319, 10924, 1, 118, 9375, 1, 19, 20059, 9, 31, 57, 14, 249, 1142, 16, 1797, 30, 22, 18, 147, 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...
When to separate files to save bandwidth === I'm doing some optimising for my site and am trying to figure out just how big some inline code can be before it can justify having it's own file instead of being written inline. My guess on how to measure it would be that the amount of code (CSS or JS in this case) would need to be bigger than the HTTP packets sent and received to get a 304 response. Please ignore the fact that it's a good practice to keep styles and javascript out of the HTML page and think only in terms of browser performance. :)
0
[ 2, 76, 20, 1725, 6488, 20, 2079, 23392, 800, 3726, 3726, 31, 22, 79, 845, 109, 19259, 7552, 26, 51, 689, 17, 589, 749, 20, 1465, 70, 114, 184, 580, 109, 19, 1143, 1797, 92, 44, 115, 32, 92, 17829, 452, 32, 22, 18, 258, 3893, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you retrieve the directory of an ASP.NET MVC application? === Newbie question... If I have a file that is in the root of the web app. How do I programmaticaly query the path of that file? ie, what directory it is in?
0
[ 2, 184, 107, 42, 11917, 14, 16755, 16, 40, 28, 306, 9, 2328, 307, 8990, 3010, 60, 800, 3726, 3726, 78, 5893, 1301, 9, 9, 9, 100, 31, 57, 21, 3893, 30, 25, 19, 14, 5900, 16, 14, 2741, 4865, 9, 184, 107, 31, 625, 6732, 58, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the best way to initialize a bean? === In spring you can initialize a bean by having the applicationContext.xml invoke a constructor, or you can set properties on the bean. What are the trade offs between the two approaches? Is it better to have a constructor (which enforces the contract of having everything it needs in one method) or is it better to have all properties (which gives you flexibility to only inject selectively for example when unit testing.) What are the trade offs (between writing a bean that uses a constructor to establish it's initial state, or using properties and perhaps an afterProperties() method) ?
0
[ 2, 98, 25, 14, 246, 161, 20, 2104, 2952, 21, 15322, 60, 800, 3726, 3726, 19, 1573, 42, 92, 2104, 2952, 21, 15322, 34, 452, 14, 3010, 1126, 11969, 9, 396, 8184, 28371, 21, 6960, 248, 15, 54, 42, 92, 309, 3704, 27, 14, 15322, 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...
Canvas3D not appearing in Swing window === I am attempting to insert a Canvas3D object inside a Swing JPanel, but the code doesn't seem to be working (i.e. nothing happens): <pre> Canvas3D canvas = new Canvas3D(SimpleUniverse.getPreferredConfiguration()); SimpleUniverse universe = new SimpleUniverse(canvas); BranchGroup root = new BranchGroup(); root.addChild(new ColorCube()); universe.addBranchGraph(root); universe.getViewingPlatform().setNominalViewingTransform(); canvasPanel.add(canvas); </pre> What am I missing? The JPanel was created using NetBean's Visual Editor.
0
[ 2, 9696, 240, 43, 52, 4870, 19, 5587, 1463, 800, 3726, 3726, 31, 589, 6314, 20, 14692, 21, 9696, 240, 43, 3095, 572, 21, 5587, 487, 3206, 532, 15, 47, 14, 1797, 1437, 22, 38, 2260, 20, 44, 638, 13, 5, 49, 9, 62, 9, 626, 5531...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
easiest way to prevent the back button of your browser from showing secure data after a user logs out? === In a normal web app w/ login and secure data, what is an easy way to secure that data and prevent it from being seen by using the browser's back button, once a user logs out?
0
[ 2, 27237, 161, 20, 2501, 14, 97, 5167, 16, 154, 16495, 37, 3187, 4315, 1054, 75, 21, 4155, 18893, 70, 60, 800, 3726, 3726, 19, 21, 1826, 2741, 4865, 619, 118, 6738, 108, 17, 4315, 1054, 15, 98, 25, 40, 2010, 161, 20, 4315, 30, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the best free cross-platform OpenGL GUI library for a video game? === It must come with source. I've looked at these which look semi-promising: [glgooey][1], [guichan][2], and [cegui][3]. I've come across others that look more Windows-y than game-y, but that's not the direction I am looking to go in. I would like some simple functionality of typical controls (lists, dropdown box, etc.) but with support for graphical widgets that you would normally find in game frontends. Mouse clicking, dragging, dropping, etc. and sound effect hooks would be nice. (These libs often leave hooks for the external system to tell it when/where mouse events are occurring.) It would get rendered on top of what my own 3D engine is rendering for the game, so it must be able to play nicely with rendering code outside of the lib. The best criteria is whether or not a reasonable 2D game could be implemented just with the GUI library and minimal glue code. (By glue code, I mean init code, hooking up the mouse, and game logic.) I am creating a 3D game, but this criteria gives a pretty solid idea of what level of interactivity I would like in the GUI. [1]: http://glgooey.sourceforge.net [2]: http://guichan.sourceforge.net/wiki/index.php/Main_Page [3]: http://www.cegui.org.uk
0
[ 2, 98, 25, 14, 246, 551, 919, 8, 27035, 368, 8430, 9457, 1248, 26, 21, 763, 250, 60, 800, 3726, 3726, 32, 491, 340, 29, 1267, 9, 31, 22, 195, 292, 35, 158, 56, 361, 1922, 8, 2740, 5858, 68, 45, 636, 8430, 16111, 1436, 500, 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...
git svn rebase: Incomplete data: Delta source ended unexpectedly === I have been maintaining [the git mirror](http://github.com/Pistos/watir-mirror) of [the watir project](http://wtr.rubyforge.org/). Some time a couple weeks ago, we had someone ready to submit their first git-based patch. Unfortunately, we ran into some issues regarding line endings (CRLF vs. LF, etc.) because of the multi-platform nature of the project. I tried what I could to set [the autocrlf option](http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html) (to 'input'), and do some --hard resets. However, a few days later, the daily update (git svn rebase) is spewing this error: Incomplete data: Delta source ended unexpectedly I've tried googling around for what to do, but even removing the autocrlf setting in the .git/config hasn't helped. I fear the working copy is corrupt, but I hope it is not unrecoverable. Obviously, a possible course of action is to just re-import from svn and start a fresh mirror, but I hope we don't have to do that, since the current watir-mirror has already been forked, and people have developed new code in their forks. Thanks in advance for any help.
0
[ 2, 13, 10404, 13, 18, 16578, 302, 8436, 45, 14011, 1054, 45, 6395, 1267, 1272, 16044, 800, 3726, 3726, 31, 57, 74, 8215, 636, 124, 13, 10404, 3402, 500, 5, 21127, 6903, 10404, 20926, 9, 960, 118, 8954, 262, 18, 118, 12801, 1523, 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...
Storing the state of a complex object with Memento pattern (and Command) === I'm working on a small UML editor project, in Java, that I started a couple of months ago. After a few weeks, I got a working copy for a UML class diagram editor. But now, I'm redesigning it completely to support other types of diagrams, such a sequence, state, class, etc. This is done by implementing a graph construction framework (I'm greatly inspired by Cay Horstmann work on the subject with the Violet UML editor). Redesign was going smoothly until one of my friends told me that I forgot to add a Do/Undo functionnality to the project, which, in my opinion, is vital. Remembering object oriented design courses, I immediately thought of Memento and Command pattern. Here's the deal. I have a abstract class, AbstractDiagram, that contains two ArrayLists : one for storing nodes (called Elements in my project) and the other for storing Edges (called Links in my projects). The diagram will probably keep a stack of commands that can be Undoed/Redoed. Pretty standard. How can I execute these commands in a efficient way? Say, for example, that I want to move a node (the node will be an interface type named INode, and there will be concrete nodes derived from it (ClassNode, InterfaceNode, NoteNode, etc.)). The position information is held as an attribute in the node, so by modying that attribute in the node itself, the state is changed. When the display will be refreshed, the node will have moved. This is the Memento part of the pattern (I think), with the difference that the object is the state itself. Moreover, if I keep a clone of the original node (before it moved), I can get back to its old version. The same technique applies for the information contained in the node (the class or interface name, the text for a note node, the attributes name, and so on). The thing is, how do I replace, in the diagram, the node with its clone upon undo/redo operation? If I clone the original object that is referenced by the diagram (being in the node list), the clone isn't reference in the diagram, and the only thing that points to is the Command itself! Shoud I include mechanisms in the diagram for finding a node according to an ID (for example) so I can replace, in the diagram, the node by its clone (and vice-versa) ? Is it up to the Memento and Command patterns to do that ? What about links? They should be movable too but I don't want to create a command just for links (and one just for nodes), and I should be able to modify the right list (nodes or links) according to the type of the object the command is referring to. How would you proceed? In short, I am having trouble representing the state of an object in a command/memento pattern so that it can be efficiently recovered and the original object restored in the diagram list, and depending on the object type (node or link). Thanks a lot! Guillaume. P.S.: if I'm not clear, tell me and I will clarify my message (as always!).
0
[ 2, 25615, 14, 146, 16, 21, 1502, 3095, 29, 55, 1130, 111, 3732, 13, 5, 290, 1202, 6, 800, 3726, 3726, 31, 22, 79, 638, 27, 21, 284, 13, 723, 255, 1835, 669, 15, 19, 8247, 15, 30, 31, 373, 21, 1335, 16, 818, 1464, 9, 75, 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...