unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Is there a better way to change a DOMElement->tagName property in php? === I just ran into this building a Textbox control for my MVC framework, where just before finalizing the whole document I call PreRender on everything that inherits from ServerTag (which in turn inherits from DOMElement). The only way i have found to change a DOMElement derived object's tagName is to replace it with a new one with all the attributes synced to the old one. This is how that looks in code: protected function PreRenderTextarea( WebPage $sender ) { $textarea = $sender->createElement( 'textarea' ); foreach( $this->attributes as $attribute ) { if ( $attribute->name == 'value' ) { $textarea->nodeValue = $attribute->value; } else { $textarea->setAttribute( $attribute->name, $attribute->value ); } } $this->parentNode->replaceChild( $textarea, $this ); } public function OnPreRender( WebPage $sender ) { parent::OnPreRender(); $this->setAttribute( 'value', $this->Value ); switch( $this->Mode ) { case 'normal' : $this->setAttribute( 'type', 'text' ); break; case 'password' : $this->setAttribute( 'type', 'password' ); break; case 'multiline' : $this->PreRenderTextarea( $sender ); return; break; } } Is that really the only way to do it? This way has the rather unwanted side effect of nulling all the logic behind the control.
0
[ 2, 25, 80, 21, 574, 161, 20, 753, 21, 11859, 27567, 8, 1, 8628, 7259, 1354, 19, 13, 26120, 60, 800, 3726, 3726, 31, 114, 717, 77, 48, 353, 21, 1854, 5309, 569, 26, 51, 307, 8990, 6596, 15, 113, 114, 115, 426, 3335, 14, 979, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Which portals do you recommend for the latest programming technology === For my area, I get the updates from - ww.asp.net - code.google.com - www.webmasterworld.com What others do you go to often?
4
[ 2, 56, 8281, 18, 107, 42, 12360, 26, 14, 5736, 3143, 1099, 800, 3726, 3726, 26, 51, 217, 15, 31, 164, 14, 16779, 37, 13, 8, 13, 14178, 9, 472, 306, 9, 2328, 13, 8, 1797, 9, 16111, 4875, 9, 960, 13, 8, 13, 6483, 9, 14113, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
WCF Bindings - so many! How do I choose one? === We have an <a href="http://www.r-project.org">R Server</a> (R is a programming language used in statistical analysis) that basically takes a script and a csv file, processes some data and returns results as text. I need to write a service on the R server so that .net clients (could be .Net Windows Forms, or ASP.Net) can connect to the R server, submit the script and CSV file, and get the results back. I'm confused by the many different bindings available to me and information on the web seems to be scarse/scattered about what one to choose. Also, is it best to run the service in IIS, or as a separate "command line" type listener service (the latter seems ugly compared to IIS and I have no idea why anyone would choose to do this if they could run it in IIS)?
0
[ 2, 11801, 410, 8728, 18, 13, 8, 86, 151, 187, 184, 107, 31, 3538, 53, 60, 800, 3726, 3726, 95, 57, 40, 13, 1, 58, 746, 14057, 3726, 7, 21127, 6903, 6483, 9, 139, 8, 21011, 9, 5583, 7, 1, 139, 8128, 1, 118, 58, 1, 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...
User-defined literals in C++0x, a much needed addition or making C++ even more bloated? === [C++0x](http://en.wikipedia.org/wiki/C++0x) will introduce [user-defined literals](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2378.pdf) which will allow the introduction of new literal syntax based on existing literals (int, hex, string, float) so that any type will be able to have a literal presentation. **Examples:** // imaginary numbers std::complex<double> operator "i"(double d) // cooked form { return std::complex(0, d); } auto val = 3.14i; // val = complex(0, 3.14) // binary values int operator "B"(const char*); // raw form int answer = 101010B; // answer = 42 // std::string std::string operator "s"(const char* str) { return std::string(str); } auto hi = "hello"s + " world"; // + works, "hello"s is a string not a pointer // units assert(1_kg == 2.2_lb); // give or take 0.00462262 pounds At first glance this looks very cool but I'm wondering how applicable it really is, when I tried to think of having the suffixes `AD` and `BC` create dates I found that it's problematic due to operator order. `1974/01/06AD` would first evaluate `1974/01` (as plain `int`s) and only later the `06AD` (to say nothing of August and September having to be written without the `0` for octal reasons). This can be worked around by having the syntax be `1974-1/6AD` so that the operator evaluation order works but it's clunky. So what my question boils down to is this, do you feel this feature will justify itself? What other literals would you like to define that will make your `C++` code more readable?
0
[ 2, 4155, 8, 13439, 20665, 18, 19, 272, 20512, 387, 396, 15, 21, 212, 851, 848, 54, 544, 272, 20512, 166, 91, 13, 7091, 1669, 60, 800, 3726, 3726, 636, 150, 20512, 387, 396, 500, 5, 21127, 6903, 219, 9, 17375, 26132, 9, 5583, 118...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MySQL encrypted columns === Say each row in a table has data pertaining to one particular user. The user has a password to access the system. How do I encrypt a column of data using InnoDB so that no one other than the user who's data it is can read the data ? I was thinking of something like using one of the MySQL encryption functions (say AES) with a key based on a hash calculated from the user's password. Does any one have any pointers to how I could do this ? Am I on the right track ?
0
[ 2, 51, 18, 22402, 29403, 7498, 800, 3726, 3726, 395, 206, 3131, 19, 21, 859, 63, 1054, 22561, 20, 53, 1498, 4155, 9, 14, 4155, 63, 21, 20884, 20, 1381, 14, 329, 9, 184, 107, 31, 1957, 11435, 21, 4698, 16, 1054, 568, 19, 251, 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 to embed AsciiMathML in Google Sites? === We would need to embed mathematical formulas through [AsciiMathML](http://www1.chapman.edu/~jipsen/asciimath.html) into [Google Sites](http://sites.google.com) pages (internal wiki for a research team). I am stuck with the limitation of Google Sites. Any idea how to do that?
0
[ 2, 184, 20, 11911, 69, 28, 1892, 5244, 96, 8184, 19, 8144, 3259, 60, 800, 3726, 3726, 95, 83, 376, 20, 11911, 69, 7046, 3729, 18, 120, 636, 472, 1892, 5244, 96, 8184, 500, 5, 21127, 6903, 6483, 165, 9, 20905, 177, 9, 69, 291, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 override a class in J2ME Polish binaries? === I am using a UI component from J2ME Polish. I found a simple bug in the code, and want to quickly fix it but cannot find any build scripts in the download package, although source-code is included. The problem cannot be solved by extending the class as it involves members with private access. How should I go about fixing it? Should I simply compile the class in question with Javac or should try to locate build script in their repository?
0
[ 2, 184, 92, 31, 84, 11891, 21, 718, 19, 487, 135, 790, 2283, 4511, 11301, 60, 800, 3726, 3726, 31, 589, 568, 21, 13, 5661, 5912, 37, 487, 135, 790, 2283, 9, 31, 216, 21, 1935, 6256, 19, 14, 1797, 15, 17, 259, 20, 976, 6098, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Flex cannot deserialize webservice element that contains only attributes === I'm seeing a very strange issue with a .NET webservice being consumed by Flex. I have a very simple class with nothing other than properties with [XmlAttribute('xxx')] attributes. public class OrderAddress { public OrderAddress() {} [XmlAttribute("firstName")] public string FirstName { get; set; } [XmlAttribute("lastName")] public string LastName { get; set; } [XmlAttribute("company")] public string Company { get; set; } [XmlAttribute("address1")] public string Address1 { get; set; } ... (more properties) } The problem is that in Flex when this object is deserialized EVERY SINGLE fields is null in the debugger. The instance of the OrderAddress class is not null, just all the fields. I an 100% sure my web service proxy layer is up to date and there is 100% definitely data going across the wire as shown by [Fiddler][1]. The very very wierd thing is that if I change one of these properties to serialize as an element (as opposed to XmlAttribute) and recompile ONLY my C# webservice then the data instantly can be recognized by Flex. If I add a completely unused field - like `public string Foo = "foo";` then that also suddenly works. I kind of remember seeing something like this before but don't remeber if I successfully fixed it or not. Its 3:30am for me and I need to postpone my hardcore troubleshooting, but throwing this out here in case its obvious to anyone reading. The code is in a module, which I know can sometimes cause some wierdness - but this seems to be very wierd. [1]: http://fiddlertool.com
0
[ 2, 14409, 1967, 1746, 106, 2815, 2952, 2741, 11449, 4520, 30, 1588, 104, 13422, 800, 3726, 3726, 31, 22, 79, 2078, 21, 253, 2578, 1513, 29, 21, 13, 9, 2328, 2741, 11449, 142, 10936, 34, 14409, 9, 31, 57, 21, 253, 1935, 718, 29, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Two way communication between server and client for WinForms === I have 50+ kiosk style computers that I want to be able to get a status update, from a single computer, on demand as opposed to an interval. These computers are on a LAN in respect to the computer requesting the status. I researched WCF however it looks like I'll need IIS installed and I would rather not install IIS on 50+ Windows XP boxes -- so I think that eliminates using a webservice unless it's possible to have a WinForm host a webservice? I also researched using System.Net.Sockets and even got a barely functional prototype going however I feel I'm not skilled enough to make it a solid and reliable system. Given this path, I would need to learn more about socket programming and threading. These boxes are running .NET 3.5 SP1, so I have complete flexibility in the .NET version however I'd like to stick to C#. What is the best way to implement this? Should I just bite the bullet and learn Sockets more or does .NET have a better way of handling this?
0
[ 2, 81, 161, 3291, 128, 8128, 17, 6819, 26, 628, 4190, 18, 800, 3726, 3726, 31, 57, 1222, 2430, 28092, 1034, 7774, 30, 31, 259, 20, 44, 777, 20, 164, 21, 1782, 11100, 15, 37, 21, 345, 1428, 15, 27, 3888, 28, 3499, 20, 40, 14422...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 LAMP setup for PHP development === I'm a very novice Linux user, and am in the market for a new (virtual) machine after my last (physical) server has annoyed me for the last time, and threatens to die at any moment taking years of hard work with it. I need a LAMP server for web-development (thus require LAMP + SVN + (Trac + Python) at a minimum). Having trawled around the interweb, it appears that Ubuntu 8.04 is the distro of choice (although I am aware a new version is due to be released within the next few days). I also managed to find <a href="http://www.cricava.com/blogs/index.php?blog=6&c=1&more=1&pb=1&tb=1&title=apache2-php5-mysql-xdebug-ssl-svn-python">a good guide</a> from Mariano Iglesias which I'll be following (but changing the various apps to the latest version, as that was written a couple of months ago) and hopefully that'll see me right. I plan to go with the desktop version, rather than the server version, because it seems to be the best way of getting my feet wet, and easiest way to get myself out of trouble should I find myself in trouble. Before I commit myself to this route, I was wondering if anyone else had any better suggestions, or even better guides? My ultimate aim of this exercise is as follows: <ul> <li>Replace my aging server which consumes too much electricity, is slow, and sounds like it's about to die, with a nice new virtual machine on my new(ish) desktop pc</li> <li>Learn how to administer linux (at the moment I rely soly on apt-get, which on my old Debian machine, won't install a newer version of SVN than 1.4.3 which is not ideal)</li> <li>Be in control of what (and what version of) software is installed on the server</li> </ul> Thanks in advance for your replies :-)
0
[ 2, 246, 6792, 18161, 26, 13, 26120, 522, 800, 3726, 3726, 31, 22, 79, 21, 253, 21999, 13024, 4155, 15, 17, 589, 19, 14, 1135, 26, 21, 78, 13, 5, 8145, 38, 6948, 6, 1940, 75, 51, 236, 13, 5, 23274, 6, 8128, 63, 13008, 55, 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...
How to host multiple webapps using only 2 Virtual Directories === my shared hosting only allows me to create 2 virtual directories. and i want to host multiple webapps... say an asp.net mvc blog, a forum, a personal site etc... isnt there any other way of doing this? cant i simply just ftp the blog folder to one of my virtual directories and then access it online??
0
[ 2, 184, 20, 2015, 1886, 2741, 7753, 18, 568, 104, 172, 6599, 559, 1596, 800, 3726, 3726, 51, 2592, 10637, 104, 2965, 55, 20, 1600, 172, 6599, 559, 1596, 9, 17, 31, 259, 20, 2015, 1886, 2741, 7753, 18, 9, 9, 9, 395, 40, 28, 306...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Formatting dict.items() for wxPython === I have a text box in wxPython that takes the output of dictionary.items() and displays it to the user as items are added to the dictionary. However, the raw data is very ugly, looking like [(u'BC',45) (u'CHM',25] I know dictionary.items() is a list of tuples, but I can't seem to figure out how to make a nice format that is also compatible with the SetValue() method of wxPython. I've tried iterating through the list and tuples. If I use a *print* statement, the output is fine. But when I replace the *print* statement with SetValue(), it only seems to get the last value of each tuple, rather than both items in the tuple. I've also tried creating a string and passing that string to SetValue() but, again, I can only get one item in the tuple or the other, not both. Any suggestions?
0
[ 2, 2595, 1203, 13, 16315, 9, 2119, 79, 18, 5, 6, 26, 619, 396, 6448, 11570, 800, 3726, 3726, 31, 57, 21, 1854, 1649, 19, 619, 396, 6448, 11570, 30, 1384, 14, 5196, 16, 9186, 9, 2119, 79, 18, 5, 6, 17, 9412, 32, 20, 14, 4155,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Refactoring "to hit" values for a game === I'm making a game and one of the methods calculates a character's base hit numbers based on skill values. The method currently calculates each value individually, since each skill can be used at short, medium, and long range. I originally thought I could combine the skills into a tuple and iterate over it, dynamically creating each hit number. But I don't know if it's actually possible, since I currently have each hit number assigned to it's own variable. I also thought about creating a method for each range, and passing the tuple as an argument. I could create a new tuple or list with the resulting values and then assign them to the individual variables, but I don't see how it would be any better than do it this way, except that it won't look so copy & pasted. Here's what I currently have: def calcBaseHitNumbers(self, dict): """Calculate character's base hit numbers depending on skill level.""" self.skill_dict = dict self.rifle = self.skill_dict.get('CRM', 0) self.pistol = self.skill_dict.get('PST', 0) self.big_gun = self.skill_dict.get('LCG', 0) self.heavy_weapon = self.skill_dict.get('HW', 0) self.bow = self.skill_dict.get('LB', 0) #self.skill_tuple = (self.rifle, self.pistol, self.big_gun, self.heavy_weapon, # self.bow) #---Short range ## for skill in self.skill_tuple: ## self.base_hit_short = skill * 0.6 self.charAttribs.bhCRM_short = self.rifle * 0.6 self.charAttribs.bhPST_short = self.pistol * 0.6 self.charAttribs.bhHW_short = self.heavy_weapon * 0.6 self.charAttribs.bhLCG_short = self.big_gun * 0.6 self.charAttribs.bhLB_short = self.bow * 0.6 #---Med range self.charAttribs.bhCRM_med = self.rifle * 0.3 self.charAttribs.bhPST_med = self.pistol * 0.3 self.charAttribs.bhHW_med = self.heavy_weapon * 0.3 self.charAttribs.bhLCG_med = self.big_gun * 0.3 self.charAttribs.bhLB_med = self.bow * 0.3 #---Long range self.charAttribs.bhCRM_long = self.rifle * 0.1 self.charAttribs.bhPST_long = self.pistol * 0.1 self.charAttribs.bhHW_long = self.heavy_weapon * 0.1 self.charAttribs.bhLCG_long = self.big_gun * 0.1 self.charAttribs.bhLB_long = self.bow * 0.1 How would you refactor this so it's more dynamic?
0
[ 2, 302, 17455, 68, 13, 7, 262, 770, 7, 4070, 26, 21, 250, 800, 3726, 3726, 31, 22, 79, 544, 21, 250, 17, 53, 16, 14, 3195, 18469, 18, 21, 925, 22, 18, 1000, 770, 2116, 432, 27, 6148, 4070, 9, 14, 2109, 871, 18469, 18, 206, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 draw a filled envelop like a cone on OpenGL (using GLUT)? === I am relatively new to OpenGL programming...currently involved in a project that uses freeglut for opengl rendering... I need to draw an envelop looking like a cone (2D) that has to be filled with some color and some transparency applied. Is the freeglut toolkit equipped with such an inbuilt functionality to draw filled geometries(or some trick)?? or is there some other api that has an inbuilt support for filled up geometries.. Thanks. Best Regards.
0
[ 2, 184, 20, 2003, 21, 1943, 29128, 101, 21, 11085, 27, 368, 8430, 13, 5, 12655, 21697, 6, 60, 800, 3726, 3726, 31, 589, 3109, 78, 20, 368, 8430, 3143, 9, 9, 9, 24947, 1013, 19, 21, 669, 30, 2027, 551, 13161, 38, 26, 368, 8430,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Differences between .NET versions (predominantly c#) === Ive recently been asked to recommend a .NET framework version to use in a (GUI based) project for an XP machine. Can anyone explain the differences between all the .NET versions? OR, Does anyone have a good reference to a site that details (briefly) the differences?
0
[ 2, 4921, 128, 13, 9, 2328, 3281, 13, 5, 3515, 5555, 108, 1830, 102, 272, 5910, 6, 800, 3726, 3726, 5568, 1989, 74, 411, 20, 12360, 21, 13, 9, 2328, 6596, 615, 20, 275, 19, 21, 13, 5, 7215, 432, 6, 669, 26, 40, 23045, 1940, 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...
RedirectStandardOutput is buffering lines instead of being instantaneous? === Ok, I am trying to use Tail to monitor a log file, but I cannot get the same behavior programatically as when I manually run it through cmd prompt using the same parameters. When run through cmd prompt it displays the new lines **instantly**. Programatically though, I have to wait for about **75+ new lines** in log file before the 'buffer' unleashes all the lines. Here's the code I have now. private const string tailExecutable = @"C:\tail.exe"; private const string logFile = @"C:\test.log"; private static void ReadStdOut() { var psi = new ProcessStartInfo { FileName = tailExecutable, Arguments = String.Format("-f \"{0}\"", logFile), UseShellExecute = false, RedirectStandardOutput = true }; // Running same exe -args through cmd.exe // works perfectly, but not programmatically. Console.WriteLine("{0} {1}", psi.FileName, psi.Arguments); var tail = new Process(); tail.StartInfo = psi; tail.OutputDataReceived += tail_OutputDataReceived; tail.Start(); tail.BeginOutputReadLine(); } static void tail_OutputDataReceived(object sender, DataReceivedEventArgs e) { Console.WriteLine(e.Data); } I have used the OutputDataReceived event before but never had these buffering/spamming problems. I am so confused with about right now.
0
[ 2, 302, 14706, 15566, 1320, 4881, 25, 17497, 68, 1560, 700, 16, 142, 28948, 60, 800, 3726, 3726, 5854, 15, 31, 589, 749, 20, 275, 3424, 20, 7626, 21, 6738, 3893, 15, 47, 31, 1967, 164, 14, 205, 3257, 625, 721, 8438, 28, 76, 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...
adding multiple views to view controller inside a tab controller === I have a tabview controller to which I added a UIViewController to each tab. I want to have multiple UIViews inside the UIViewController. So in the implementation of the UIViewController class I added [self.view addSubView:uiview1] and [self.view addSubView:uiview2]. The problem is that when I run the app, it crahes on load. However, if I only used a single UIView and did: self.view = UIView1 that would work fine. Does anyone know what is causing the problem? Or if I'm doing something fundamentally wrong?
0
[ 2, 4721, 1886, 4146, 20, 1418, 9919, 572, 21, 6523, 9919, 800, 3726, 3726, 31, 57, 21, 6523, 4725, 9919, 20, 56, 31, 905, 21, 13, 5661, 4725, 12898, 1252, 20, 206, 6523, 9, 31, 259, 20, 57, 1886, 13, 5661, 4725, 18, 572, 14, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to convert xsd to human readable documentation? === We have a few XML based interfaces that is quite well documented in XSD schemas. The interfaces are now going to be publicly available and we would like to create reference documentation for them. Is there a tool that can automatically convert XSD files into some more readable format?
0
[ 2, 184, 20, 8406, 993, 18, 43, 20, 585, 1302, 579, 13945, 60, 800, 3726, 3726, 95, 57, 21, 310, 23504, 432, 6573, 18, 30, 25, 1450, 134, 8926, 19, 993, 18, 43, 23874, 18, 9, 14, 6573, 18, 50, 130, 228, 20, 44, 6713, 904, 17,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I index and make available reusable code? === I have many small files containing code fragments, pseudo-code algorithms, classes, templates, SQL-samples, etc., and I obviously cannot put all these into libraries. I need a practical method to index all of them, and to be able to make this index available to others. 1. What must such an index contain to make searching easiest? 2. Are there any such repositories available on the web? (So I can test the techniques they use.) 3. Are there any applications already written that implement this that I can have a look at?
0
[ 2, 184, 107, 31, 4348, 17, 233, 904, 302, 267, 579, 1797, 60, 800, 3726, 3726, 31, 57, 151, 284, 6488, 3503, 1797, 10837, 15, 8452, 8, 9375, 15935, 15, 2684, 15, 22894, 18, 15, 4444, 255, 8, 6101, 18534, 15, 2722, 9, 15, 17, 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...
WPF BitmapImage Width/Height are always 1?! === I don't understand... BitmapImage img = new BitmapImage(myUri); Console.WriteLine("Width: {0}, Height: {1}", img.Width, img.Height); Output: "Width: 1, Height: 1". I've tried PixelWidth/PixelHeight, I've tried manually creating it with `BeginInit`/`EndInit` and also setting `PreservePixelFormat`... nothing works. (Except, even wierder: this is all part of a process where the user clicks a button and some images get downloaded. Well, the _second_ time that button is clicked, it _does_ have non-1 width/height.)
0
[ 2, 619, 7721, 1142, 15022, 22039, 9456, 118, 252, 7748, 50, 550, 137, 60, 187, 800, 3726, 3726, 31, 221, 22, 38, 1369, 9, 9, 9, 1142, 15022, 22039, 797, 263, 800, 78, 1142, 15022, 22039, 5, 915, 3594, 6, 73, 8650, 9, 23716, 1143...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 my dependenices inject using @Configurable in conjunction with readResolve() === The framework I am developing for my application relies very heavily on dynamically generated domain objects. I recently started using Spring WebFlow and now need to be able to serialize my domain objects that will be kept in flow scope. I have done a bit of research and figured out that I can use `writeReplace()` and `readResolve()`. The only catch is that I need to look-up a factory in the Spring context. I tried to use `@Configurable(preConstruction = true)` in conjunction with the BeanFactoryAware marker interface. But `beanFactory` is always `null` when I try to use it in my `createEntity()` method. Neither the default constructor nor the `setBeanFactory()` injector are called. Has anybody tried this or something similar? I have included relevant class below. Thanks in advance, Brian /* * Copyright 2008 Brian Thomas Matthews Limited. * All rights reserved, worldwide. * * This software and all information contained herein is the property of * Brian Thomas Matthews Limited. Any dissemination, disclosure, use, or * reproduction of this material for any reason inconsistent with the * express purpose for which it has been disclosed is strictly forbidden. */ package com.btmatthews.dmf.domain.impl.cglib; import java.io.InvalidObjectException; import java.io.ObjectStreamException; import java.io.Serializable; import java.lang.reflect.InvocationTargetException; import java.util.HashMap; import java.util.Map; import org.apache.commons.beanutils.PropertyUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.beans.factory.annotation.Configurable; import org.springframework.util.StringUtils; import com.btmatthews.dmf.domain.IEntity; import com.btmatthews.dmf.domain.IEntityFactory; import com.btmatthews.dmf.domain.IEntityID; import com.btmatthews.dmf.spring.IEntityDefinitionBean; /** * This class represents the serialized form of a domain object implemented * using CGLib. The readResolve() method recreates the actual domain object * after it has been deserialized into Serializable. You must define * &lt;spring-configured/&gt; in the application context. * * @param <S> * The interface that defines the properties of the base domain * object. * @param <T> * The interface that defines the properties of the derived domain * object. * @author <a href="mailto:brian@btmatthews.com">Brian Matthews</a> * @version 1.0 */ @Configurable(preConstruction = true) public final class SerializedCGLibEntity<S extends IEntity<S>, T extends S> implements Serializable, BeanFactoryAware { /** * Used for logging. */ private static final Logger LOG = LoggerFactory .getLogger(SerializedCGLibEntity.class); /** * The serialization version number. */ private static final long serialVersionUID = 3830830321957878319L; /** * The application context. Note this is not serialized. */ private transient BeanFactory beanFactory; /** * The domain object name. */ private String entityName; /** * The domain object identifier. */ private IEntityID<S> entityId; /** * The domain object version number. */ private long entityVersion; /** * The attributes of the domain object. */ private HashMap<?, ?> entityAttributes; /** * The default constructor. */ public SerializedCGLibEntity() { SerializedCGLibEntity.LOG .debug("Initializing with default constructor"); } /** * Initialise with the attributes to be serialised. * * @param name * The entity name. * @param id * The domain object identifier. * @param version * The entity version. * @param attributes * The entity attributes. */ public SerializedCGLibEntity(final String name, final IEntityID<S> id, final long version, final HashMap<?, ?> attributes) { SerializedCGLibEntity.LOG .debug("Initializing with parameterized constructor"); this.entityName = name; this.entityId = id; this.entityVersion = version; this.entityAttributes = attributes; } /** * Inject the bean factory. * * @param factory * The bean factory. */ public void setBeanFactory(final BeanFactory factory) { SerializedCGLibEntity.LOG.debug("Injected bean factory"); this.beanFactory = factory; } /** * Called after deserialisation. The corresponding entity factory is * retrieved from the bean application context and BeanUtils methods are * used to initialise the object. * * @return The initialised domain object. * @throws ObjectStreamException * If there was a problem creating or initialising the domain * object. */ public Object readResolve() throws ObjectStreamException { SerializedCGLibEntity.LOG.debug("Transforming deserialized object"); final T entity = this.createEntity(); entity.setId(this.entityId); try { PropertyUtils.setSimpleProperty(entity, "version", this.entityVersion); for (Map.Entry<?, ?> entry : this.entityAttributes.entrySet()) { PropertyUtils.setSimpleProperty(entity, entry.getKey() .toString(), entry.getValue()); } } catch (IllegalAccessException e) { throw new InvalidObjectException(e.getMessage()); } catch (InvocationTargetException e) { throw new InvalidObjectException(e.getMessage()); } catch (NoSuchMethodException e) { throw new InvalidObjectException(e.getMessage()); } return entity; } /** * Lookup the entity factory in the application context and create an * instance of the entity. The entity factory is located by getting the * entity definition bean and using the factory registered with it or * getting the entity factory. The name used for the definition bean lookup * is ${entityName}Definition while ${entityName} is used for the factory * lookup. * * @return The domain object instance. * @throws ObjectStreamException * If the entity definition bean or entity factory were not * available. */ @SuppressWarnings("unchecked") private T createEntity() throws ObjectStreamException { SerializedCGLibEntity.LOG.debug("Getting domain object factory"); // Try to use the entity definition bean final IEntityDefinitionBean<S, T> entityDefinition = (IEntityDefinitionBean<S, T>)this.beanFactory .getBean(StringUtils.uncapitalize(this.entityName) + "Definition", IEntityDefinitionBean.class); if (entityDefinition != null) { final IEntityFactory<S, T> entityFactory = entityDefinition .getFactory(); if (entityFactory != null) { SerializedCGLibEntity.LOG .debug("Domain object factory obtained via enity definition bean"); return entityFactory.create(); } } // Try to use the entity factory final IEntityFactory<S, T> entityFactory = (IEntityFactory<S, T>)this.beanFactory .getBean(StringUtils.uncapitalize(this.entityName) + "Factory", IEntityFactory.class); if (entityFactory != null) { SerializedCGLibEntity.LOG .debug("Domain object factory obtained via direct look-up"); return entityFactory.create(); } // Neither worked! SerializedCGLibEntity.LOG.warn("Cannot find domain object factory"); throw new InvalidObjectException( "No entity definition or factory found for " + this.entityName); } }
0
[ 2, 184, 107, 31, 164, 51, 12547, 22803, 160, 20316, 568, 13, 1, 1126, 13549, 579, 19, 9558, 29, 1302, 99, 5594, 195, 5, 6, 800, 3726, 3726, 14, 6596, 31, 589, 3561, 26, 51, 3010, 19272, 253, 2991, 27, 7782, 1326, 6756, 4603, 391...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Full-text search relevance is measured in? === I am making a quiz system, and when quizmakers insert questions into the Question Bank, I am to check the DB for duplicate / very highly similar questions. Testing MySQL's [MATCH() ... AGAINST()][1], the highest relevance I get is 30+, when I test against a 100% similar string. So what exactly is the relevance? To quote the [manual][2]: > Relevance values are non-negative floating-point numbers. Zero relevance means no similarity. Relevance is computed based on the number of words in the row, the number of unique words in that row, the total number of words in the collection, and the number of documents (rows) that contain a particular word. My problem is how to test the relevance value if a string is a duplicate. If it's 100% duplicate, prevent it from being inserter into Question Bank. But if it is only so similar, prompt the quizmaker to verify, insert or not. So how do I do that? 30+ for 100% identical string is not percentage, so I'm stump. Thanks in advance. [1]: http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html#function_match [2]: http://dev.mysql.com/doc/refman/5.0/en/fulltext-natural-language.html
0
[ 2, 503, 8, 11969, 2122, 24144, 25, 7160, 19, 60, 800, 3726, 3726, 31, 589, 544, 21, 17667, 329, 15, 17, 76, 17667, 7293, 14692, 2346, 77, 14, 1301, 965, 15, 31, 589, 20, 2631, 14, 13, 9007, 26, 19429, 13, 118, 253, 2157, 835, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ASP.Net MVC - redirecting to route gives Redirect Loop === This is probably one of those easy questions.. I'm trying to redirect the user after they've successfully authenticated, or return them back to the login page. But the Success page is on a different route and I can't get the redirection to work.. Here are my routes in Globals.asax: routes.MapRoute( _ "Default", _ "{controller}/{action}/{id}", _ New With {.controller = "Login", .action = "Index", .id = ""} _ ) routes.MapRoute( _ "Stuff", _ "{controller}/{action}/{id}", _ New With {.controller = "Stuff", .action = "Index", .id = ""} _ ) I've got 2 Controllers: `LoginController.vb` and `StuffController.vb`. The `Views/Login/Index.aspx` file contains a simple form with the code: <form method="post" action="/Login/Authenticate"> The `LoginController` contains the following code: Function Authenticate() As RedirectToRouteResult ' authentication code commented out ;o) Return RedirectToRoute("Stuff") End Function And the StuffController contains the following: Function Index() ' show stuff.. Return View() ' return /Views/Stuff/Index.aspx End Function Here's what I've tried so far: * Function Authenticate() * Function Authenticate() As ActionResult() * Function Authenticate() As RedirectToRouteResult() all of which cause a Redirect Loop timeout in the browser. What am I missing?!
0
[ 2, 28, 306, 9, 2328, 307, 8990, 13, 8, 302, 14706, 68, 20, 858, 2352, 302, 14706, 5293, 800, 3726, 3726, 48, 25, 910, 53, 16, 273, 2010, 2346, 9, 9, 31, 22, 79, 749, 20, 302, 14706, 14, 4155, 75, 59, 22, 195, 3673, 14351, 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...
What is std::safe_string? === An [answer to one of my questions](http://stackoverflow.com/questions/61278/quick-and-dirty-way-to-profile-your-code#231614) included the following line of code: label = std::safe_string(name); // label is a std::string The intent seems to be a wrapper around a string literal (so presumably no allocation takes place). I've never heard of `safe_string` and neither, apparently, has [google](http://www.google.com/search?q=%22std%3A%3Asafe_string%22) (nor could I find it in the 98 standard). Does anyone know what this is about?
0
[ 2, 98, 25, 354, 43, 45, 45, 18166, 1, 11130, 60, 800, 3726, 3726, 40, 636, 5950, 4662, 20, 53, 16, 51, 2346, 500, 5, 21127, 6903, 25325, 2549, 9990, 9, 960, 118, 24652, 18, 118, 25074, 4130, 118, 25865, 8, 290, 8, 28067, 8, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to change url for some sites automatically in Firefox 3 === I want some particular urls like "springer.com" to automatically convert to "springer.com.proxy1.mycollege.edu". The second url takes me to springer site through my college library gateway; I am able to access some parts that would otherwise be restricted. Is there some way to convert the url as above automatically in firefox 3?
0
[ 2, 184, 20, 753, 287, 6362, 26, 109, 3259, 7499, 19, 535, 18219, 203, 800, 3726, 3726, 31, 259, 109, 1498, 13, 911, 7532, 101, 13, 7, 15827, 106, 9, 960, 7, 20, 7499, 8406, 20, 13, 7, 15827, 106, 9, 960, 9, 4899, 9229, 165, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 code snippets in eclipse === I'm a recent semi-convert to Eclipse after 20 years of using vi and gvim. One of the things I miss about gvim is that I could cut a bunch of different snippets of code into named buffers, and paste them at will when doing something like repeating a common idiom. For instance I'd have it so `"ap` would paste DatabaseHandle handle = null; try { handle = DatabaseConnectionPool.newHandle(); and then `"bp` would paste handle.commit(); } finally { handle.rollback(); DatabaseConnectionPool.returnHandle(handle); } And I could repeat both of them over and over in the course of a day. In an answer to another question, somebody mentioned that you could "manage code snippets" in Eclipse, but didn't mention how. So now I'm asking: how do you manage code snippets in Eclipse?
0
[ 2, 25615, 1797, 13, 29061, 18, 19, 11652, 800, 3726, 3726, 31, 22, 79, 21, 1764, 1922, 8, 1126, 8122, 20, 11652, 75, 434, 122, 16, 568, 1790, 17, 13, 23896, 1660, 9, 53, 16, 14, 564, 31, 1501, 88, 13, 23896, 1660, 25, 30, 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...
Vertices and Lost Devices === I a Direct3D application (managed), should I recreate the vertex buffer every time I lose my device? The application I am developing is a windows CAD application. Not a game. I was thinking I could generate the vertex buffer when my 3D Model changes. But should I redo it when I lose my device or can I reuse the vertex buffer from the old device?
0
[ 2, 21235, 17, 529, 4690, 800, 3726, 3726, 31, 21, 1744, 240, 43, 3010, 13, 5, 177, 8030, 6, 15, 378, 31, 21119, 14, 22895, 17497, 352, 85, 31, 2926, 51, 3646, 60, 14, 3010, 31, 589, 3561, 25, 21, 1936, 8762, 3010, 9, 52, 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...
Replace Line Breaks in a String C# === How can I replace Line Breaks within a string in C#?
0
[ 2, 3934, 293, 7947, 19, 21, 3724, 272, 5910, 800, 3726, 3726, 184, 92, 31, 3934, 293, 7947, 363, 21, 3724, 19, 272, 5910, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Quickest way to setup this asp.net page against MS Access DB . . . === I have an access database with 3 tables. * People * Gifts * PeopleGifts Using VS 2008, what is the quickest way to get a page up and running which allows me to run queries against these tables and do basic inserts.
0
[ 2, 2231, 1430, 161, 20, 18161, 48, 28, 306, 9, 2328, 2478, 149, 4235, 1381, 13, 9007, 13, 9, 13, 9, 13, 9, 800, 3726, 3726, 31, 57, 40, 1381, 6018, 29, 203, 7484, 9, 1637, 148, 1637, 10339, 1637, 148, 2234, 3072, 18, 568, 4611...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Relative performance of std::vector vs. std::list vs. std::slist? === For a simple linked list in which random access to list elements is not a requirement, are there any significant advantages (performance or otherwise) to using <code>std::list</code> instead of <code>std::vector</code>? If backwards traversal is required, would it be more efficient to use <code>std::slist</code> and <code>reverse()</code> the list prior to iterating over its elements?
0
[ 2, 4543, 956, 16, 354, 43, 45, 45, 28033, 4611, 9, 354, 43, 45, 45, 5739, 4611, 9, 354, 43, 45, 45, 18, 5739, 60, 800, 3726, 3726, 26, 21, 1935, 4727, 968, 19, 56, 5477, 1381, 20, 968, 2065, 25, 52, 21, 8981, 15, 50, 80, 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...
Is anyone doing inline assembly on the IPhone? === Are people doing it? Has anyone blogged or publicized anything on the matter?
0
[ 2, 25, 1276, 845, 19, 1143, 1475, 27, 14, 21024, 60, 800, 3726, 3726, 50, 148, 845, 32, 60, 63, 1276, 334, 19287, 54, 317, 1333, 602, 27, 14, 1161, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 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...
Invoking windows batch file from Linux === I have an application running only on Windows and a batch file that launches it. I want to invoke this batch file from Linux, meaning something like Linux batch will launch the windows batch with parameters and this in its turn run my application. Can I do that? How?
0
[ 2, 19, 2625, 1581, 1936, 13064, 3893, 37, 13024, 800, 3726, 3726, 31, 57, 40, 3010, 946, 104, 27, 1936, 17, 21, 13064, 3893, 30, 22933, 32, 9, 31, 259, 20, 28371, 48, 13064, 3893, 37, 13024, 15, 1813, 301, 101, 13024, 13064, 129, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Peer to peer replication in SQL Server 2005/08 === Has anyone had any experience in setting up <a href="http://msdn.microsoft.com/en-us/library/ms151196.aspx">peer to peer replication</a> using SQL Server 2005 or 2008? Specifically, I'm interested in whether other options/alternatives where considered and why P2P replication was ultimately chosen. If you have used P2P replication: <li>Did you encounter any issues during synchronization and was it easy to monitor?</li> <li>How easy was/is it to do conflict resolution?</li> <li>Did you have to make schema changes (i.e. replace identity columns, etc)?</li> Alternatively, if you considered P2P replication and went with a different option, why did you rule it out?
0
[ 2, 7617, 20, 7617, 23841, 19, 4444, 255, 8128, 812, 118, 3099, 800, 3726, 3726, 63, 1276, 41, 186, 1496, 19, 2697, 71, 13, 1, 58, 746, 14057, 3726, 7, 21127, 6903, 79, 18, 43, 103, 9, 22019, 12980, 9, 960, 118, 219, 8, 267, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Java HTML Parsing === I'm working on an app which scrapes data from a website and I was wondering how I should go about getting the data. Specifically I need data contained in a number of div tags which use a specific CSS class - Currently (for testing purposes) I'm just checking for "div class = "classname"" in each line of HTML - This works, but I can't help but feel there is a better solution out there. Ie. - Is there any nice way where I could give a class a line of HTML and have some nice methods like: boolean usesClass(String CSSClassname); String getText(); String getLink(); Many many thanks!
4
[ 2, 8247, 13, 15895, 2017, 18, 68, 800, 3726, 3726, 31, 22, 79, 638, 27, 40, 4865, 56, 23855, 18, 1054, 37, 21, 2271, 17, 31, 23, 5712, 184, 31, 378, 162, 88, 1017, 14, 1054, 9, 3524, 31, 376, 1054, 3437, 19, 21, 234, 16, 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...
What artifacts to save for a released build? === So, I now know [what to save from might nightly builds][1]. What about when I give something to customers? For example, I probably want to save debugging information (e.g. PDB). What else? [1]: http://What artifacts to save for a nightly build?
0
[ 2, 98, 10996, 20, 2079, 26, 21, 261, 1895, 60, 800, 3726, 3726, 86, 15, 31, 130, 143, 636, 608, 20, 2079, 37, 530, 343, 102, 1895, 18, 500, 2558, 165, 500, 9, 98, 88, 76, 31, 590, 301, 20, 5279, 60, 26, 823, 15, 31, 910, 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...
Using SQL 2008 Geography types with nHibernate's CreateSQLQuery === I am trying to issue a SQL update statement with nHibernate (2.0.1GA) like this: sqlstring = string.Format("set nocount on;update myusers set geo=geography::Point({0}, {1}, 4326) where userid={2};", mlat, mlong, userid); _session.CreateSQLQuery(sqlstring).ExecuteUpdate(); However I receive the following error: 'geography@p0' is not a recognized built-in function name. I thought CreateSQLQuery would just pass the SQL I gave it and execute it...guess not. Any ideas on how I can do that within the context of nHibernate?
0
[ 2, 568, 4444, 255, 570, 11320, 2551, 29, 12109, 15191, 8820, 22, 18, 9695, 22402, 8190, 93, 800, 3726, 3726, 31, 589, 749, 20, 1513, 21, 4444, 255, 11100, 3331, 29, 12109, 15191, 8820, 13, 5, 135, 9, 387, 9, 165, 1136, 6, 101, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can an iPhone or iPod Touch communicate with another device in the same room? === I'm new to developing applications for the iPhone and iPod touch. Is it possible to communicate directly between 2 devices in the same room by using WiFi or perhaps even BlueTooth on the iPhone? I've seen a demo of a fire application where one iPhone "lights" other iPhone when they get close to each other. How is this accomplished? The point of all this is that I am exploring the option of developing a game that you can play with another person in the same room.
0
[ 2, 92, 40, 21024, 54, 31, 10670, 1723, 8709, 29, 226, 3646, 19, 14, 205, 337, 60, 800, 3726, 3726, 31, 22, 79, 78, 20, 3561, 3767, 26, 14, 21024, 17, 31, 10670, 1723, 9, 25, 32, 938, 20, 8709, 1703, 128, 172, 4690, 19, 14, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the simplest way to format a timestamp from sql in php? === What is the simplest, fastest way to complete the PHP code below such that the output is in a user-friendly format (e.g."October 27, 2006")? $result = mysql_query("SELECT my_timestamp FROM some_table WHERE id=42", $DB_CONN); $row = mysql_fetch_array($result); $formatted_date = ???($row['my_timestamp']); echo $formatted_date;
0
[ 2, 98, 25, 14, 24384, 161, 20, 2595, 21, 436, 38, 10158, 37, 4444, 255, 19, 13, 26120, 60, 800, 3726, 3726, 98, 25, 14, 24384, 15, 7518, 161, 20, 1279, 14, 13, 26120, 1797, 1021, 145, 30, 14, 5196, 25, 19, 21, 4155, 8, 15950, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to add a progress bar to a bash script? === When scripting in bash or any other shell in *NIX, while running a command that will take more than a few seconds, a prgress bar is needed. For example, copying a big file, opening a big tar file. What ways do you recommend to add progress bars to bash scripts?
0
[ 2, 184, 20, 3547, 21, 3455, 748, 20, 21, 13158, 3884, 60, 800, 3726, 3726, 76, 3884, 68, 19, 13158, 54, 186, 89, 3593, 19, 1637, 14064, 15, 133, 946, 21, 1202, 30, 129, 247, 91, 119, 21, 310, 2582, 15, 21, 5396, 13026, 748, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you log server errors on django sites === So, when playing with the development I can just set `settings.DEBUG` to `True` and if an error occures I can see it nicely formatted, with good stack trace and request information. But on kind of production site I'd rather use `DEBUG=False` and show visitors some standard error 500 page with information that I'm working on fixing this bug at this moment ;) At the same time I'd like to have some way of logging all those information (stack trace and request info) to a file on my server - so I can just output it to my console and watch errors scroll, email the log to me every hour or something like this. What logging solutions would you recomend for a django-site, that would meet those simple requirements? I have the application running as `fcgi` server and I'm using apache web server as frontend (although thinking of going to lighttpd).
0
[ 2, 184, 107, 42, 6738, 8128, 11908, 27, 3857, 14541, 3259, 800, 3726, 3726, 86, 15, 76, 791, 29, 14, 522, 31, 92, 114, 309, 13, 1, 19831, 18, 9, 546, 16254, 1, 20, 13, 1, 13398, 1, 17, 100, 40, 7019, 3744, 160, 31, 92, 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...
Pattern matching of lists in Python === I want to do some pattern matching on lists in Python. For example, in Haskell, I can do something like the following: fun (head : rest) = ... So when I pass in a list, `head` will be the first element, and `rest` will be the trailing elements. Likewise, in Python, I can automatically unpack tuples: (var1, var2) = func_that_returns_a_tuple() I want to do something similar with lists in Python. Right now, I have a function that returns a list, and a chunk of code that does the following: ls = my_func() (head, rest) = (ls[0], ls[1:]) I wondered if I could somehow do that in one line in Python, instead of two.
0
[ 2, 3732, 10120, 16, 7227, 19, 20059, 800, 3726, 3726, 31, 259, 20, 107, 109, 3732, 10120, 27, 7227, 19, 20059, 9, 26, 823, 15, 19, 63, 16507, 15, 31, 92, 107, 301, 101, 14, 249, 45, 2414, 13, 5, 1743, 13, 45, 760, 6, 800, 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...
Another Synergy issue: screen lock on Windows Server 2003 === I have set up Synergy on Unix systems with no problems, however when I set up a Synergy server on a Windows Server 2003 box using I get an error message that the mouse cursor is locked when trying to move to the client system. I use a Microsoft Natural keyboard in case that matters (seems Scroll Lock might be involved). Does anyone have experience with using Synergy on Windows systems that have reported mouse screen locking in the log when unable to mouse over to a client system?
0
[ 2, 226, 6063, 106, 2687, 1513, 45, 2324, 3991, 27, 1936, 8128, 973, 800, 3726, 3726, 31, 57, 309, 71, 6063, 106, 2687, 27, 22540, 1242, 29, 90, 1716, 15, 207, 76, 31, 309, 71, 21, 6063, 106, 2687, 8128, 27, 21, 1936, 8128, 973, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
help with Anonymous Types in a signature === I am trying to get the signature on the method below to work. As this is an Anonymous Type I have some trouble, any help would be great. When I looked at sortedGameList.ToList() in a QuickWatch window I get the signature "System.Collections.Generic.List<<>f__AnonymousType0<System.DateTime,System.Linq.IGrouping<System.DateTime,DC.FootballLeague.Web.Models.Game>>>" Many Thanks Donald public List<IGrouping<DateTime, Game>> getGamesList(int leagueID) { var sortedGameList = from g in Games group g by g.Date into s select new { Date = s.Key, Games = s }; return sortedGameList.ToList(); }
0
[ 2, 448, 29, 10364, 2551, 19, 21, 7810, 800, 3726, 3726, 31, 589, 749, 20, 164, 14, 7810, 27, 14, 2109, 1021, 20, 170, 9, 28, 48, 25, 40, 10364, 1001, 31, 57, 109, 2572, 15, 186, 448, 83, 44, 374, 9, 76, 31, 292, 35, 22554, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 practice for profiling a SharePoint application === When the SharePoint application you are working on has unsatisfactory response times how do you pinpoint the causes and in which sequence? So far I have not yet found any open source or commercial profiling tools specific for the SharePoint segment, so any pointer to tools or best practices will be appreciated. PS. I am aware of the profiling options for the web parts but I am looking for something that covers the entire application.
0
[ 2, 246, 1345, 26, 8721, 49, 802, 21, 1891, 3132, 3010, 800, 3726, 3726, 76, 14, 1891, 3132, 3010, 42, 50, 638, 27, 63, 367, 18, 5166, 18, 17455, 93, 1627, 436, 184, 107, 42, 27446, 14, 4047, 17, 19, 56, 4030, 60, 86, 463, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best Framework for PHP and creation of RESTful based web services === I'm looking to create a RESTful or pseudo-Restful based web service on a PHP/MySql stack. I'm wondering what some of the frameworks you suggest I look at? I've been looking at Zend with Zend_Rest, but I'm curious to other things out there. Ideally, there's be some form of ActiveRecord based object mapping to the exposed web service to make working with a MySQL database simpler. Also, doesn't have to be true REST, passing in a parameter to the url is perfectly acceptable for DELETES and PUTS. There will also be NO UI written in PHP with this, just pure XML POST/Response web service. Thanks
4
[ 2, 246, 6596, 26, 13, 26120, 17, 2502, 16, 760, 1566, 432, 2741, 687, 800, 3726, 3726, 31, 22, 79, 699, 20, 1600, 21, 760, 1566, 54, 8452, 8, 11466, 1566, 432, 2741, 365, 27, 21, 13, 26120, 118, 915, 18, 22402, 7566, 9, 31, 22...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a windows implementation to python libsvn? === Because windows is case-insensitive and because SVN is case-sensitive and because VS2005 tends to rename files giving them the lower-case form which messes my repositories' history, I've tried to add the pre-commit hook script from http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/case-insensitive.py. Sure enough, the script uses classes from python's libsvn ("from svn import repos, fs") which I fail to find compiled for Windows. Is there an alternative? To libsvn or to the hook script?
0
[ 2, 25, 80, 21, 1936, 6123, 20, 20059, 13, 8326, 18, 16578, 60, 800, 3726, 3726, 185, 1936, 25, 610, 8, 108, 19435, 17, 185, 13, 18, 16578, 25, 610, 8, 19435, 17, 185, 4611, 2835, 14261, 20, 302, 7259, 6488, 1438, 105, 14, 987, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Implementing a SQL Server 2008 User-defined function in managed code for geocoding === **The goal:** <br> To create a .NET dll i can reference from inside SQL Server where i can pass in an address & get back a geocode string that i can stick into a geography data type as a POINT using [STPointFromText()][1] in t-SQL. I'm using Virtual Earth, I signed up for a [developer account][2] which gave me access to virtual earth staging servers. I'm trying to create a user defined function in a similar way to the example shown [here][3] although using Visual Studio 2008 of course. I have code that I've written in ASP.NET that uses virtual earth to pass in an address & get back the latitude/logditude co-ordinates. **The problem:**<br> The only problem is that virtual earth requires you to 'add a service reference' for the [geocode service][4] and for some reason when i go to the project menu there's *Add Reference* and *Add Web Reference*, but no *Add Service Reference* which is what i need to be able to call *geocodeService.Geocode(geocodeRequest)* which does all the magic. Can someone tell me what am i doing wrong? why is it not possible to add a service reference to a SQL Server project in visual studio? [1]: http://msdn.microsoft.com/en-us/library/bb933979.aspx [2]: https://mappoint-css.live.com/mwssignup [3]: http://www.developer.com/net/csharp/article.php/10918_3399881_3 [4]: http://staging.dev.virtualearth.net/webservices/v1/geocodeservice/geocodeservice.svc
0
[ 2, 17333, 21, 4444, 255, 8128, 570, 4155, 8, 13439, 1990, 19, 1471, 1797, 26, 6389, 15458, 800, 3726, 3726, 13, 1409, 124, 1195, 45, 1409, 13, 1, 5145, 1, 20, 1600, 21, 13, 9, 2328, 13, 43, 211, 31, 92, 2801, 37, 572, 4444, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Worst Java practice found in your experience? === Similar to [this question][1]... What are the worst practices you actually found in Java code? Mine are: - using instance variables in servlets (it's not just bad practice but bug, actually) - using Collection implementations like HashMap, and not using the appropriate interfaces - using seemingly cryptic class names like SmsMaker (SmsFactory) or CommEnvironment (CommunicationContext) [1]: http://stackoverflow.com/questions/233030/worst-php-practice-found-in-your-experience
0
[ 2, 4126, 8247, 1345, 216, 19, 154, 1496, 60, 800, 3726, 3726, 835, 20, 636, 1565, 1301, 500, 2558, 165, 500, 9, 9, 9, 98, 50, 14, 4126, 5242, 42, 1121, 216, 19, 8247, 1797, 60, 1114, 50, 45, 13, 8, 568, 4851, 12157, 19, 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...
Cross-compiling with SBCL === I have SBCL running on a Ubuntu machine. I want to write a little program that I want to give to a friend who has only Windows running. What is the quickest way to cross-compile it on my machine into a "standalone" windows program (i.e. the usual runtime+core combination)?
0
[ 2, 919, 8, 11103, 49, 802, 29, 13, 18, 220, 5316, 800, 3726, 3726, 31, 57, 13, 18, 220, 5316, 946, 27, 21, 287, 12968, 2473, 1940, 9, 31, 259, 20, 2757, 21, 265, 625, 30, 31, 259, 20, 590, 20, 21, 860, 72, 63, 104, 1936, 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 to add "Select Data Source" to my Excel appliation? === I need the "Select Data Source" dialog added to my application so that the user can manually select a range (or ranges) in Excel and the range is pasted in my text box. This functionality is everywhere in Excel (most notably when selecting a range for a chart). How can I easily do this?
0
[ 2, 184, 20, 3547, 13, 7, 18, 16964, 1054, 1267, 7, 20, 51, 20700, 4865, 1210, 857, 60, 800, 3726, 3726, 31, 376, 14, 13, 7, 18, 16964, 1054, 1267, 7, 28223, 905, 20, 51, 3010, 86, 30, 14, 4155, 92, 23671, 5407, 21, 978, 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...
Is possible to change default diff tool in Mercurial? === Everytime that I do an 'hg diff file.ext' I end up using a console diff application. Is there a way to change that? I can't find a reference in Mercurial documentation (**I'm not talking about merge!**). I would like to use Kdiff3 or WinMerge (I'm using Windows). Thanks for your time. Best regards.
0
[ 2, 25, 938, 20, 753, 12838, 20811, 5607, 19, 9046, 3594, 192, 60, 800, 3726, 3726, 352, 891, 30, 31, 107, 40, 13, 22, 18187, 20811, 3893, 9, 1706, 38, 22, 31, 241, 71, 568, 21, 8650, 20811, 3010, 9, 25, 80, 21, 161, 20, 753, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Define an interface method that takes different parameters === My application uses measurement instruments that are connected to the PC. I want to make it possible to use similar instruments from different vendors. So I defined an interface: interface IMeasurementInterface { void Initialize(); void Close(); } So far so good. Before a measurement I need to setup the instrument and this means for different instruments very different parameters. So I want to define a method that takes parameters that can have different structures: interface IMeasurementInterface { void Initialize(); void Close(); void Setup(object Parameters); } I will then cast the object to whatever I need. Is this the way to go?
0
[ 2, 9267, 40, 6573, 2109, 30, 1384, 421, 12905, 800, 3726, 3726, 51, 3010, 2027, 11688, 4507, 30, 50, 2587, 20, 14, 5168, 9, 31, 259, 20, 233, 32, 938, 20, 275, 835, 4507, 37, 421, 19787, 9, 86, 31, 2811, 40, 6573, 45, 6573, 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...
How to bind Xml Attribute to Treeview nodes, while databinding XDocument to WPF Treeview === I have an XML that needs to be databound to a **WPF TreeView**. Here the XML can have different structure. The TreeView should be databound generic enough to load any permutation of hierarchy. However an **XAttribute** on the nodes (called **Title**) should be databound to the TreeViewItem's **header text** and **not the nodename**. XML to be bound: <Wizard> <Section Title="Home"> <Loop Title="Income Loop"> <Page Title="Employer Income"/> <Page Title="Parttime Job Income"/> <Page Title="Self employment Income"/> </Loop> </Section> <Section Title="Deductions"> <Loop Title="Deductions Loop"> <Page Title="Travel spending"/> <Page Title="Charity spending"/> <Page Title="Dependents"/> </Loop> </Section> </Wizard> XAML: <Window x:Class="Wpf.DataBinding.TreeViewer" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Wpf.DataBinding" Title="TreeViewer" Height="300" Width="300"> <Window.Resources> <HierarchicalDataTemplate ItemsSource="{Binding Path=Elements}" x:Key="TVTemplate"> <TreeViewItem Header="{Binding Path=Name}"/> </HierarchicalDataTemplate> </Window.Resources> <StackPanel> <TreeView x:Name="_treeView" Style="{StaticResource TVallExpanded}" ItemsSource="{Binding Path=Root.Elements}" ItemTemplate="{StaticResource TVTemplate}" /> </StackPanel> </Window> XAML's codebehind that loads XML to XDocument and binds it to TreeView public partial class TreeViewer : Window { public TreeViewer() { InitializeComponent(); XDocument doc = XDocument.Parse(File.ReadAllText(@"C:\MyWizard.xml")); _treeView.DataContext = doc; } } So in the XAML markup we are binding Name to TreeViewItem's header. <TreeViewItem Header="{Binding Path=Name}"/> However, I want to bind it to **Title** attribute of Section, Loop and Page in the Xml above. I read that it's not possible to use XPath while binding XDocument. But there has to be a way to bind the **Title** attribute to TreeViewItem's Header text. I tried using @Title, .[@Title] etc. But none seemed to work. This [thread on MSDN Forums][1] has a similar discussion. Any pointers would be greatly helpful. [1]: http://social.msdn.microsoft.com/forums/en-US/wpf/thread/edd843b7-b378-4c2d-926f-c053dbd7b340
0
[ 2, 184, 20, 10193, 23504, 35, 14755, 20, 1541, 4725, 16272, 15, 133, 1054, 22260, 993, 28132, 20, 619, 7721, 1541, 4725, 800, 3726, 3726, 31, 57, 40, 23504, 30, 2274, 20, 44, 1054, 7410, 20, 21, 13, 1409, 499, 7721, 1541, 4725, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to change Word.Range text without losing format === Anyone knows how can I change the text of a Word.Range object but still keeping it's format? For example if I have "this **text**" and I change it to "that **txt**", txt will still be in bold. Thanks.
0
[ 2, 184, 20, 753, 833, 9, 8366, 1854, 366, 2281, 2595, 800, 3726, 3726, 1276, 3620, 184, 92, 31, 753, 14, 1854, 16, 21, 833, 9, 8366, 3095, 47, 174, 2882, 32, 22, 18, 2595, 60, 26, 823, 100, 31, 57, 13, 7, 1565, 13, 1409, 119...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
HTML to PostScript Conversion === I'm searching for a free component or library that could convert HTML to PostScript ( .ps file format ). I'm using .Net framework 1.1. Any one have experience with situation like this ?
0
[ 2, 13, 15895, 20, 678, 8741, 6263, 800, 3726, 3726, 31, 22, 79, 5792, 26, 21, 551, 5912, 54, 1248, 30, 110, 8406, 13, 15895, 20, 678, 8741, 13, 5, 13, 9, 1919, 3893, 2595, 13, 6, 9, 31, 22, 79, 568, 13, 9, 2328, 6596, 137, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
Match unicode in ply's regexes === I'm matching identifiers, but now I have a problem: my identifiers are allowed to contain unicode characters. Therefore the old way to do things is not enough: t_IDENTIFIER = r"[A-Za-z](\\.|[A-Za-z_0-9])*" In [my markup language][1] parser I match unicode characters by allowing all the characters except those I explicitly use, because my markup language only has two or three of characters I need to escape that way. [1]: http://freehg.org/u/cheery/aml/ How do I match all unicode characters with python regexs and ply? Also is this a good idea at all? I'd want to let people use identifiers like Ω » « ° foo² väli π as an identifiers (variable names and such) in their programs. Heck! I want that people could write programs in their own language if it's practical! Anyway unicode is supported nowadays in wide variety of places, and it should spread.
0
[ 2, 730, 28010, 19, 351, 102, 22, 18, 7953, 1706, 160, 800, 3726, 3726, 31, 22, 79, 10120, 25570, 18, 15, 47, 130, 31, 57, 21, 1448, 45, 51, 25570, 18, 50, 1159, 20, 3717, 28010, 1766, 9, 1793, 14, 315, 161, 20, 107, 564, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What (programming related things) to pack for travelling? === Well, it has been a few years since I last travelled to a programmers conference. Back then, the power brick for my laptop was as heavy as the whole laptop is nowadays. So, the laptop was about the only thing I took with me into the conference. That means, I have no idea, if it makes sense to fill the space available in my bag with some other tools that might come in handy during a conference. Are materials still handed out on CDs, so that I should bring the external drive for viewing stuff from other talks? What tools are out there that might help during a presentation? (so far I have a bluetooth mouse for controlling powerpoint)
0
[ 2, 98, 13, 5, 19746, 3863, 1597, 564, 6, 20, 3607, 26, 9024, 60, 800, 3726, 3726, 134, 15, 32, 63, 74, 21, 310, 122, 179, 31, 236, 7295, 20, 21, 17968, 18, 1199, 9, 97, 94, 15, 14, 414, 3529, 26, 51, 12294, 23, 28, 1278, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to calculate the bounding box for a given lat/lng location? === I have given a location defined by latitude and longitude. Now i want to calculate a bounding box within e.g. 10 kilometers of that point. The bounding box should be defined as latmin, lngmin and latmax, lngmax. I need this stuff in order to use the panoramio API: http://www.panoramio.com/api/ Does someone know the formula of how to get thos points?
0
[ 2, 184, 20, 18469, 14, 4138, 68, 1649, 26, 21, 504, 14303, 118, 255, 2723, 1474, 60, 800, 3726, 3726, 31, 57, 504, 21, 1474, 2811, 34, 16337, 17, 22291, 9, 130, 31, 259, 20, 18469, 21, 4138, 68, 1649, 363, 13, 62, 9, 263, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you stay motivated on long projects? === We're in the middle of a fairly large-scale bespoke project for a Client. With almost a year gone, and another year at ahead before the final phase is pegged for delivery... well its a little difficult to stay motivated all the time. I try to alleviate it a couple of ways. - Pet Projects & [nixers][1] - Reading & Education & keeping up to speed on whats cutting edge - Trying out playpen projects with new stuff like .net MVC (my next todo) - Q&A Sites like SO to try & keep sharp **So what do you do to stay motivated on long-haul projects?** [1]: http://www.allwords.com/word-nixer.html
2
[ 2, 184, 107, 42, 1179, 14413, 27, 175, 2314, 60, 800, 3726, 3726, 95, 22, 99, 19, 14, 772, 16, 21, 6647, 370, 8, 5093, 44, 3401, 8416, 669, 26, 21, 6819, 9, 29, 557, 21, 159, 1042, 15, 17, 226, 159, 35, 2173, 115, 14, 426, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is your naming convention for stored procedures? === I have seen various rules for naming stored procedures. Some people prefix the sproc name with usp_, others with an abbreviation for the app name, and still others with an owner name. You shouldn't use sp_ in SQL Server unless you reall mean it. Some start the proc name with a verb (Get, Add, Save, Remove). Others emphasize the entity name(s). On a database with hundreds of sprocs, it can be very hard to scroll around and find a suitable sproc when you think one already exists. Naming conventions can make locating a sproc easier. Do you use a naming convention? Please describe it, and explain why you prefer it over other choices.
4
[ 2, 98, 25, 154, 10929, 3087, 26, 8214, 8876, 60, 800, 3726, 3726, 31, 57, 541, 617, 1761, 26, 10929, 8214, 8876, 9, 109, 148, 14315, 14, 13, 18, 15617, 204, 29, 182, 306, 1, 15, 654, 29, 40, 5941, 3692, 1755, 857, 26, 14, 4865...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What are some good resources for programming Aritificial Intelligence? === I am looking for good resources for AI programming (any language), both books and online stuff. I am particularly interested in neural networks implementations.
0
[ 2, 98, 50, 109, 254, 2566, 26, 3143, 21, 8352, 821, 49, 19034, 2872, 60, 800, 3726, 3726, 31, 589, 699, 26, 254, 2566, 26, 21, 49, 3143, 13, 5, 6001, 816, 6, 15, 156, 964, 17, 2087, 3217, 9, 31, 589, 1653, 3158, 19, 17371, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How to copy text programatically? === I'm building an Android app and I want to copy the text value of an EditText widget. It's possible for the user to press Menu+A then Menu+C to copy the value, but how would I do this programatically?
0
[ 2, 184, 20, 4344, 1854, 625, 721, 8438, 60, 800, 3726, 3726, 31, 22, 79, 353, 40, 13005, 4865, 17, 31, 259, 20, 4344, 14, 1854, 1923, 16, 40, 9392, 11969, 4807, 43, 3060, 9, 32, 22, 18, 938, 26, 14, 4155, 20, 901, 11379, 2430,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 have you used dynamic programming in the field? === When have you ever directly applied the concepts of [dynamic programming](http://en.wikipedia.org/wiki/Dynamic_programming) to solve a problem in the field? It's sometimes not evident how it can be applied when using it to solve a made-up instance of the [knapsack problem](http://en.wikipedia.org/wiki/Knapsack_problem).
0
[ 2, 76, 57, 42, 147, 7782, 3143, 19, 14, 575, 60, 800, 3726, 3726, 76, 57, 42, 462, 1703, 2435, 14, 8700, 16, 636, 20985, 3143, 500, 5, 21127, 6903, 219, 9, 17375, 26132, 9, 5583, 118, 17375, 118, 20985, 1, 19746, 3863, 6, 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...
question about java interfaces === Let's say I have the following ruby code : <pre><code> def use_object(object) puts object.some_method end </code></pre> and , this will work on any object that responds to <strong>some_method</strong>,right? Assuming that the following java interface exists : <pre><code> interface TestInterface { public String some_method() { return "test"; } } </code></pre> Am I right to presume that interfaces are java's way to achieving the same thing ( with the only difference that the parameter's type would be <strong>TestInterface</strong> ) ?
0
[ 2, 1301, 88, 8247, 6573, 18, 800, 3726, 3726, 408, 22, 18, 395, 31, 57, 14, 249, 10811, 1797, 13, 45, 13, 1, 3515, 1, 9375, 1, 6312, 275, 1, 23793, 5, 23793, 6, 11179, 3095, 9, 3220, 1, 5909, 1807, 43, 241, 13, 1, 118, 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...
ActionLink not working but RouteUrl does === I have a route // Sample URL: /Fixtures/Team/id routes.MapRoute( "Fixtures-by-TeamID", "Fixtures/Team/{teamId}", new { controller = "Fixtures", action = "GetByTeamID", }, new { teamId = @"\d{1,3}" } ); and I am trying to use ActionLink in ASP.net MVC p5. <%= Html.ActionLink(g.HomeTeam.TeamName, "Team", new { teamId = g.HomeTeam.TeamID })%> However it is not working and giving me <a href="/Fixtures/Team?teamId=118">Team A</a> If I use Url.RouteUrl i get the correct link. <a href="<%=Url.RouteUrl("Fixtures-by-TeamID", new { teamId = g.HomeTeam.TeamID })%>"><%=g.HomeTeam.TeamName%></a> <a href="/Fixtures/Team/118">Team A</a> Any help would be great? Will this change in ASP.net MVC beta? Thanks Donald
0
[ 2, 1028, 6258, 52, 638, 47, 858, 911, 255, 630, 800, 3726, 3726, 31, 57, 21, 858, 12894, 5717, 287, 6362, 45, 13, 118, 18594, 6418, 18, 118, 6575, 118, 1340, 5050, 9, 15022, 20179, 5, 13, 7, 18594, 6418, 18, 8, 779, 8, 6575, 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...
database : best way to model a spreadsheet === I am trying to figure out the best way to model a spreadsheet (from the database point of view), taking into account : - The spreadsheet can contain a variable number of rows. - The spreadsheet can contain a variable number of columns. - Each column can contain one single value, but its type is unknown (integer, date, string). - It has to be easy (and performant) to generate a CSV file containing the data. I am thinking about something like : class Cell(models.Model): column = models.ForeignKey(Column) row_number = models.IntegerField() value = models.CharField(max_length=100) class Column(models.Model): spreadsheet = models.ForeignKey(Spreadsheet) name = models.CharField(max_length=100) type = models.CharField(max_length=100) class Spreadsheet(models.Model): name = models.CharField(max_length=100) creation_date = models.DateField() Can you think about a better way to model a spreadsheet ? My approach allows to store the data as a String. I am worried about it being too slow to generate the CSV file.
0
[ 2, 6018, 13, 45, 246, 161, 20, 1061, 21, 1789, 17627, 800, 3726, 3726, 31, 589, 749, 20, 1465, 70, 14, 246, 161, 20, 1061, 21, 1789, 17627, 13, 5, 2665, 14, 6018, 454, 16, 1418, 6, 15, 741, 77, 2176, 13, 45, 13, 8, 14, 1789,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Algorithm/pattern for selecting sub-collections using LINQ and C# === I have a C# collection of strings. Each string is a sentence that can appear on a page. I also have a collection of page breaks which is a collection of int's. representing the index where the collection of strings are split to a new page. Example: Each 10 items in the string collection is a page so the collection of page breaks would be a collection of int's with the values of 10, 20, 30. ... So if there are 2 pages of strings then there will be 1 item in the page break collection and if there is 1 page then the page break collection would have zero items. I am trying to create the following function: List<string> GetPage(List<string> docList, List<int> pageBreakList, int pageNum) { // This function returns a subset of docList - just the page requested } I've taken a few stabs at writing this function and keep on coming up with complex if and switch statements to take into account single and two page documents and page numbers being requested outside the range (e.g. last page should be returned if page number is greater than number of pages and first page if page number is 0 or less). My struggle with this problem leads me to ask the question: Is there a well known pattern or algorithm to address this type of subset query?
0
[ 2, 9083, 118, 5972, 8766, 26, 20764, 972, 8, 15015, 5757, 568, 6294, 1251, 17, 272, 5910, 800, 3726, 3726, 31, 57, 21, 272, 5910, 1206, 16, 7887, 9, 206, 3724, 25, 21, 5123, 30, 92, 1893, 27, 21, 2478, 9, 31, 67, 57, 21, 1206,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 create an options screen similar to Office 2007 in .NET === I think the options screen in Office 2007 is much preferrable to the "traditional" fixed-size options dialog with multiple tabbed pages. What would be the best way to create a similar options screen for my own .NET application? Is there an existing control I can buy (or use for free) to do this? Would it be easier to do this in WPF? For those that haven't seen it, Office 2007 presents the options as a vertical list, divided into groups, that can be scrolled if the entire list doesn't fit in the window. One thing I'd like that isn't in Office is the ability to have a search box to do incremental searching/filtering of the options list.
0
[ 2, 184, 20, 1600, 40, 6368, 2324, 835, 20, 488, 624, 19, 13, 9, 2328, 800, 3726, 3726, 31, 277, 14, 6368, 2324, 19, 488, 624, 25, 212, 6369, 139, 579, 20, 14, 13, 7, 14781, 7, 3535, 8, 10454, 6368, 28223, 29, 1886, 6523, 4283,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Big number in C++ === Hey! I am trying to place a big number in a C++ variable. The number is 600851475143 I tried unsigned long long int but got an error saying it the constant was too big. I then tried a bigInt library called BigInt -> http://mattmccutchen.net/bigint/ The problem is I can't compile the code as I get many errors regarding the lib. undefined reference to `BigInteger::BigInteger(int)' <-- lot's of these. Here is my code so far: <pre> #include "string" #include "iostream" #include "bigint/NumberlikeArray.hh" #include "bigint/BigUnsigned.hh" #include "bigint/BigInteger.hh" #include "bigint/BigIntegerAlgorithms.hh" #include "bigint/BigUnsignedInABase.hh" #include "bigint/BigIntegerUtils.hh" using namespace std; int main() { //unsigned long int num = 13195; //unsigned long long int num = 600851475143; BigInteger num = 13195; int divider = 2; //num = 600851475143; while (1) { if ((num % divider) == 0) { cout << divider << '\n'; num /= divider; } else divider++; if (num == 1) break; } } If I put a smaller number and don't use the BigInt lib this program runs fine. Any help will be appreciated :D
0
[ 2, 580, 234, 19, 272, 20512, 800, 3726, 3726, 8409, 187, 31, 589, 749, 20, 209, 21, 580, 234, 19, 21, 272, 20512, 7612, 9, 14, 234, 25, 7316, 3058, 1419, 3283, 14954, 31, 794, 28839, 175, 175, 19, 38, 47, 330, 40, 7019, 1148, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Multiple Login pages Cake PHP === I'm trying to get authentication working to my liking in a cake php app and running into a snag. I want to let the user login from either the home page or from a dedicated login page. I'm using the Auth component to manage login and right now the login itself works. I am submitting the form on the home page to /Users/Login and it does log them in and create session. The problem is it then redirects the user back to the home page. I'd rather they redirect to the location specified in loginRedirect. If i login from /users/login directly it does forward to loginRedirect. I think the problem has something to do with posting the form from one page to another page instead of to itself, auth automatically thinks you want to go back to the previous page. Any thoughts?
0
[ 2, 1886, 6738, 108, 4434, 8390, 13, 26120, 800, 3726, 3726, 31, 22, 79, 749, 20, 164, 27963, 638, 20, 51, 19007, 19, 21, 8390, 13, 26120, 4865, 17, 946, 77, 21, 28755, 9, 31, 259, 20, 408, 14, 4155, 6738, 108, 37, 694, 14, 213...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
WCF variable lifetime/state === I'm hosting my first WCF service in IIS. I have two methods, 1 to set a string variable on the WCF Service, and the other to retrieve it. The interface used is: [OperationContract] string ReturnText(); [OperationContract] void SetText(string s); BasicHttpBinding is used. Stepping through the service with the debugger from the client reveals that the value of the string is set correctly using SetText, but when I immediately do a return text, the string is back to null. Probably a simple one I know, but I thought that all values on the WCF service were retained between opening the service connection and closing it. Why is the value lost between the Set and Gets?
0
[ 2, 11801, 410, 7612, 5277, 118, 3859, 800, 3726, 3726, 31, 22, 79, 10637, 51, 64, 11801, 410, 365, 19, 595, 18, 9, 31, 57, 81, 3195, 15, 137, 20, 309, 21, 3724, 7612, 27, 14, 11801, 410, 365, 15, 17, 14, 89, 20, 11917, 32, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Getting the first item out of a For loop === I am writing my own Joomla component (MVC), its based heavily on the newsflash module, because I want to display the latest 5 content items in a sliding tabbed interface, all the hard work is done, but I am having real difficult getting content out of the for loop. Here is the code I have so far default.php <ul id="handles" class="tabs"> <?php for ($i = 0, $n = count($list); $i < $n; $i ++) : modSankeSlideHelper::getTabs($list[$i]); endfor; ?> <li class="end"></li> </ul> helper.php function getTabs(&$item) { global $mainframe; $item->created = $item->created; list($year, $month, $day) = split("-", $item->created); $tabdate = date('d\/m\/y', mktime(0, 0, 0, $month, $day, $year)); require(JModuleHelper::getLayoutPath('mod_sankeslide', '_tab')); } _tab.php <li><a href="#tab"><span><?php echo 'Shout ' . $tabdate; ?></span><b></b></a></li> The first item needs to have different value and a class item added to the a: item, so I need to be able to identify which is the first item and do something during that loop. I tried to use if $i = 0 else statement in the default.php, but it resulted in a page timeout for some reason! Any ideas?
0
[ 2, 1017, 14, 64, 9101, 70, 16, 21, 26, 5293, 800, 3726, 3726, 31, 589, 1174, 51, 258, 2640, 2636, 531, 5912, 13, 5, 79, 8990, 6, 15, 82, 432, 2991, 27, 14, 996, 26694, 12613, 15, 185, 31, 259, 20, 3042, 14, 5736, 331, 2331, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Updating referenced columns in Postgres === When there are one of more columns that reference another, I'm struggling for the best way to update that column while maintaining referential integrity. For example, if I have a table of labels and descriptions and two entries: Label | Description ------------------------------------ read | This item has been read READ | You read this thing already Now, I don't want these duplicates. I want to add a constraint to the column that doesn't allow values that are case-insensitively duplicates, as in the example. However, I have several rows of several other tables referencing 'READ', the one I want to drop. I know Postgres knows which fields of other rows are referencing this, because I can't delete it as long as they are there. So, how could I get any field referencing this to update to 'read'? This is just an example, and I actually have a few places I want to do this. Another example is actually an int primary key for a few tables, where I want to add a new table as a sort of 'base table' that the existing ones extend and so they'll all need to have unique IDs now, which means updating the ones they have. I am open to recipes for functions I can add to do this, tools I can utilize, or anything else.
0
[ 2, 71, 43, 1880, 17571, 7498, 19, 678, 6879, 18, 800, 3726, 3726, 76, 80, 50, 53, 16, 91, 7498, 30, 2801, 226, 15, 31, 22, 79, 7587, 26, 14, 246, 161, 20, 11100, 30, 4698, 133, 8215, 5017, 10107, 11961, 9, 26, 823, 15, 100, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Downsampling and applying a lowpass filter to digital audio === I've got a 44Khz audio stream from a CD, represented as an array of 16 bit PCM samples. I'd like to cut it down to an 11KHz stream. How do I do that? From my days of engineering class many years ago, I know that the stream won't be able to describe anything over 5500Hz accurately anymore, so I assume I want to cut everything above that out too. Any ideas? Thanks.
0
[ 2, 125, 18, 10158, 802, 17, 11989, 21, 708, 6201, 11945, 20, 1888, 4023, 800, 3726, 3726, 31, 22, 195, 330, 21, 4576, 4278, 380, 4023, 3766, 37, 21, 1745, 15, 1622, 28, 40, 7718, 16, 347, 1142, 5168, 79, 7855, 9, 31, 22, 43, 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...
Using ActiveX objects in Javascript in Linux (in Firefox) === It's not quite a "programming" question, but I hope its related closely enough. Do you know if it is possible to configure the browser in Linux (e.g. Firefox) to use Wine to create ActiveX objects? I would like to handle web pages that use: var xmlDocument = new ActiveXObject( Msxml2.DOMDocument.4.0 ) etc. in Javascript.
0
[ 2, 568, 1348, 396, 3916, 19, 8247, 8741, 19, 13024, 13, 5, 108, 535, 18219, 6, 800, 3726, 3726, 32, 22, 18, 52, 1450, 21, 13, 7, 19746, 3863, 7, 1301, 15, 47, 31, 1376, 82, 1597, 3368, 511, 9, 107, 42, 143, 100, 32, 25, 938,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Subreport source in Crystal Reports for .Net === I am using several sub-reports in a Crystal Reports solution in .Net. I created a stand-alone report, then imported that report into several other reports as a sub-report. Changes to the stand-alone version are not incorporated into any of the reports leveraging it. Will I need to continually re-import the report in this manner, or is there a way to have Crystal Reports for .Net reference another ".rpt" file so that changes are automatically applied?
0
[ 2, 972, 17437, 1267, 19, 4282, 2813, 26, 13, 9, 2328, 800, 3726, 3726, 31, 589, 568, 238, 972, 8, 17437, 18, 19, 21, 4282, 2813, 4295, 19, 13, 9, 2328, 9, 31, 679, 21, 1261, 8, 17979, 1330, 15, 94, 11808, 30, 1330, 77, 238, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
java package for encryption === I want to ask a small question.. I need to write program that encrypt text with 32-bit algorithm using Java . so what is the appropriate package or library to do that ? thanks for all
0
[ 2, 8247, 6030, 26, 24420, 800, 3726, 3726, 31, 259, 20, 1349, 21, 284, 1301, 9, 9, 31, 376, 20, 2757, 625, 30, 1957, 11435, 1854, 29, 2512, 8, 3326, 9083, 568, 8247, 13, 9, 86, 98, 25, 14, 4593, 6030, 54, 1248, 20, 107, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Lambda Expression Tree Parsing === Thanks in advance guys. I am trying to use Lambda Expressions in a project to map to a third party query API. So, I'm writing parsing the Expression tree by hand. if I pass in a lambda expression like: p => p.Title == "title" everything works. however if my lambda expression looks like: p => p.Title == myaspdropdown.SelectedValue I don't see the actual value of that funciton. Instead i see something like: p => p.Title = (value(ASP.usercontrols_myaspusercontrol_ascx).myaspdropdown.SelectedValue) What gives? How do I get the actual value?? Thanks again!
0
[ 2, 13, 24187, 1803, 1541, 2017, 18, 68, 800, 3726, 3726, 3669, 19, 3612, 2776, 9, 31, 589, 749, 20, 275, 13, 24187, 13832, 19, 21, 669, 20, 2942, 20, 21, 422, 346, 25597, 21, 2159, 9, 86, 15, 31, 22, 79, 1174, 2017, 18, 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...
How do I pass multiple objects to ViewPage in ASP.NET MVC? === I think I know the answer, but I would like to bounce around some ideas. I would like to pass several (in this instance 2) somewhat different pieces of data to a View. My initial thought is simply to wrap-up the various objects into a containing object and pass them along that way. Then from the View, I'd have something like var objContainer = ViewData.Model; var thisObject = objContainer.ThisObject; var thatObject = objContainer.ThatObject; and these could be used independently in the Master Page and View Page. Is that the "best" way?
0
[ 2, 184, 107, 31, 1477, 1886, 3916, 20, 1418, 6486, 19, 28, 306, 9, 2328, 307, 8990, 60, 800, 3726, 3726, 31, 277, 31, 143, 14, 1623, 15, 47, 31, 83, 101, 20, 17625, 140, 109, 3478, 9, 31, 83, 101, 20, 1477, 238, 13, 5, 108, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 AuthorizeAttribute redirect to the login page for authentication and authorization failures? === In ASP.NET MVC, you can mark up a controller method with `AuthorizeAttribute`, like this: [Authorize(Roles = "CanDeleteTags")] public void Delete(string tagName) { // ... } This means that, if the currently logged-in user is not in the "CanDeleteTags" role, the controller method will never be called. Unfortunately, for failures, `AuthorizeAttribute` returns `HttpUnauthorizedResult`, which always returns HTTP status code 401. This causes a redirection to the login page. If the user isn't logged in, this makes perfect sense. However, if the user is _already_ logged in, but isn't in the required role, it's confusing to send them back to the login page. It seems that `AuthorizeAttribute` conflates authentication and authorization. This seems like a bit of an oversight in ASP.NET MVC, or am I missing something? I've had to cook up a `DemandRoleAttribute` that separates the two. When the user isn't authenticated, it returns HTTP 401, sending them to the login page. When the user is logged in, but isn't in the required role, it creates a `NotAuthorizedResult` instead. Currently this redirects to an error page. Surely I didn't have to do this?
0
[ 2, 483, 630, 1314, 2952, 721, 14755, 302, 14706, 20, 14, 6738, 108, 2478, 26, 27963, 17, 22677, 2990, 18, 60, 800, 3726, 3726, 19, 28, 306, 9, 2328, 307, 8990, 15, 42, 92, 943, 71, 21, 9919, 2109, 29, 13, 1, 10007, 2952, 721, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 a C compiler rearrange stack variables? === I have worked on projects for embedded systems in the past where we have rearranged the order of declaration of stack variables to decrease the size of the resulting executable. For instance, if we had: void func() { char c; int i; short s; ... We would reorder this to be: void func() { int i; short s; char c; ... Because of alignment issues the first one resulted in 12 bytes of stack space being used and the second one resulted in only 8 bytes. Is this standard behavior for C compilers or just a shortcoming of the compiler we were using? It seems to me that a compiler should be able to reorder stack variables to favor smaller executable size if it wanted to. It has been suggested to me that some aspect of the C standard prevents this, but I haven't been able to find a reputable source either way. As a bonus question, does this also apply to C++ compilers?
0
[ 2, 92, 21, 272, 21486, 2275, 8366, 7566, 12157, 60, 800, 3726, 3726, 31, 57, 577, 27, 2314, 26, 12138, 1242, 19, 14, 640, 113, 95, 57, 302, 23273, 14, 389, 16, 7098, 16, 7566, 12157, 20, 9826, 14, 1072, 16, 14, 2927, 1396, 17194...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I configure SQL Server 2005 Reporting Services (SSRS) to send via a remote SMTP server? === How do I configure SSRS/Windows Server 2003, so that I can setup email delivery via a remote SMTP server that requires username and password. I can configure SSRS with an SMTP address and other parameters, but nowhere is it possible to configure it with smtp username and password. I have hunted around, but can only find vague reference to setting up some sort of relay, to cover up the bizarre lack of smtp functionality that SSRS has out of the box. Any ideas?
0
[ 2, 184, 107, 31, 1065, 15951, 4444, 255, 8128, 812, 6670, 687, 13, 5, 18, 18, 1224, 6, 20, 2660, 1197, 21, 5388, 7613, 13726, 8128, 60, 800, 3726, 3726, 184, 107, 31, 1065, 15951, 22118, 18, 118, 27508, 18, 8128, 973, 15, 86, 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...
Help setting up php for Eclipse === I'm trying to set up Eclipse for php web development. What I would like to do is preview a php web page from within Eclipse, but I cannot figure out how to do this. Is there an integrated web server of some sort that allows this, or do I have to set up IIS/Apache to do it? If so, do I have to have my php files in the web servers path, or does Eclipse auto deploy the files to the local web server? Any information or links would be very much appreciated.
0
[ 2, 448, 2697, 71, 13, 26120, 26, 11652, 800, 3726, 3726, 31, 22, 79, 749, 20, 309, 71, 11652, 26, 13, 26120, 2741, 522, 9, 98, 31, 83, 101, 20, 107, 25, 16121, 21, 13, 26120, 2741, 2478, 37, 363, 11652, 15, 47, 31, 1967, 1465,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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++ RTTI Viable Examples === I am familiar with C++ RTTI, and find the concept interesting. Still there exist a lot of more ways to abuse it than to use it correctly (the RTTI-switch dread comes to mind). As a developer, I found (and used) only two viable uses for it (more exactly, one and a half). **Could you share some of the ways RTTI is a viable solution to a problem, with example code/pseudo-code included?** Note: The aim is to have a repository of viable examples a junior developer can consult, criticize and learn from.
0
[ 2, 272, 20512, 761, 5249, 17347, 3770, 800, 3726, 3726, 31, 589, 3694, 29, 272, 20512, 761, 5249, 15, 17, 477, 14, 2420, 4883, 9, 174, 80, 3182, 21, 865, 16, 91, 2847, 20, 5129, 32, 119, 20, 275, 32, 12044, 13, 5, 124, 761, 52...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ASP.NET MVC Beta 1: DefaultModelBinder wrongly persists parameter and validation state between unrelated requests === When I use the default model binding to bind form parameters to a complex object which is a parameter to an action, the framework remembers the values passed to the first request, meaning that any subsequent request to that action gets the same data as the first. The parameter values and validation state are persisted between unrelated web requests. Here is my controller code (`service` represents access to the back end of the app): [AcceptVerbs(HttpVerbs.Get)] public ActionResult Create() { return View(RunTime.Default); } [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create(RunTime newRunTime) { if (ModelState.IsValid) { service.CreateNewRun(newRunTime); TempData["Message"] = "New run created"; return RedirectToAction("index"); } return View(newRunTime); } My .aspx view (strongly typed as `ViewPage<RunTime`>) contains directives like: <%= Html.TextBox("newRunTime.Time", ViewData.Model.Time) %> This uses the `DefaultModelBinder` class, which is [meant to autobind my model's properties](http://weblogs.asp.net/scottgu/archive/2008/10/16/asp-net-mvc-beta-released.aspx#three). I hit the page, enter valid data (e.g. time = 1). The app correctly saves the new object with time = 1. I then hit it again, enter different valid data (e.g. time = 2). However the data that gets saved is the original (e.g. time = 1). This also affects validation, so if my original data was invalid, then all data I enter in the future is considered invalid. Restarting IIS or rebuilding my code flushes the persisted state. I can fix the problem by writing my own hard-coded model binder, a basic naive example of which is shown below. [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create([ModelBinder(typeof (RunTimeBinder))] RunTime newRunTime) { if (ModelState.IsValid) { service.CreateNewRun(newRunTime); TempData["Message"] = "New run created"; return RedirectToAction("index"); } return View(newRunTime); } internal class RunTimeBinder : DefaultModelBinder { public override ModelBinderResult BindModel(ModelBindingContext bindingContext) { // Without this line, failed validation state persists between requests bindingContext.ModelState.Clear(); double time = 0; try { time = Convert.ToDouble(bindingContext.HttpContext.Request[bindingContext.ModelName + ".Time"]); } catch (FormatException) { bindingContext.ModelState.AddModelError(bindingContext.ModelName + ".Time", bindingContext.HttpContext.Request[bindingContext.ModelName + ".Time"] + "is not a valid number"); } var model = new RunTime(time); return new ModelBinderResult(model); } } Am I missing something? I don't think it's a browser session problem as I can reproduce the problem if the first data is entered in one browser and the second in another.
0
[ 2, 28, 306, 9, 2328, 307, 8990, 8434, 6352, 12838, 13998, 24200, 1389, 102, 22084, 18, 18906, 17, 27999, 146, 128, 17379, 12279, 800, 3726, 3726, 76, 31, 275, 14, 12838, 1061, 8728, 20, 10193, 505, 12905, 20, 21, 1502, 3095, 56, 25,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Static or dynamic linking the CRT, MFC, ATL, etc. === Back in the 90s when I first started out with MFC I used to dynamically link my apps and shipped the relevant MFC DLLs. This caused me a few issues (DLL hell!) and I switched to statically linking instead - not just for MFC, but for the CRT and ATL. Other than larger EXE files, statically linking has never caused me any problems at all - so are there any downsides that other people have come across? Is there a good reason for revisiting dynamic linking again? My apps are mainly STL/Boost nowadays FWIW.
0
[ 2, 12038, 54, 7782, 12585, 14, 6186, 38, 15, 307, 7061, 15, 35, 255, 15, 2722, 9, 800, 3726, 3726, 97, 19, 14, 3151, 18, 76, 31, 64, 373, 70, 29, 307, 7061, 31, 147, 20, 7782, 1326, 3508, 51, 4865, 18, 17, 12991, 14, 7480, 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...
DataGridView combo box === How do you access the items collection of a combo box in a specific row in a DataGridView? I'm populating the combo as follows: Dim VATCombo As New DataGridViewComboBoxColumn With VATCombo .HeaderText = "VAT Rate" .Name = .HeaderText Dim VATCol As New JCVATRateCollection VATCol.LoadAll(EntitySpaces.Interfaces.esSqlAccessType.StoredProcedure) For Each Rate As JCVATRate In VATCol .Items.Add(Rate.str.VATRate) Next .Sorted = True VATCol = Nothing .ToolTipText = "Select VAT Rate" .AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells .CellTemplate.Style.BackColor = Color.Honeydew .DisplayIndex = 8 .AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill End With .Columns.Add(VATCombo) VATCombo = Nothing I want to be able to set a default value for each new line added to the grid, I also want to be able to change the values in the combo based on other business logic. I realise I can just set the cell value directly but I want to avoid hard-coding the values into the system and rely on the database to populate. I'm sure it must be straight-forward but it's eluding me.....
0
[ 2, 1054, 16375, 4725, 22621, 1649, 800, 3726, 3726, 184, 107, 42, 1381, 14, 3755, 1206, 16, 21, 22621, 1649, 19, 21, 1903, 3131, 19, 21, 1054, 16375, 4725, 60, 31, 22, 79, 1675, 10038, 14, 22621, 28, 2415, 45, 5937, 13, 8112, 960,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Simple iPhone question about UIViews. === I want to make a really simple iphone app: one screen with a single button... when the button is tapped a new screen appears. That's it. No animations, nothing, I've tried endlessly to make the NavBar sample project do this... and it works but only if I use a UINavigationController with a table that I can tap etc. I've tried all the skeleton projects in XCode too. I thought I was done when I did this: [[self navigationController] presentModalViewController:myViewController animated:YES]; But I couldn't do it without the UINavigationController. I just want a simple example. Thanks so much!
0
[ 2, 1935, 21024, 1301, 88, 13, 5661, 4725, 18, 9, 800, 3726, 3726, 31, 259, 20, 233, 21, 510, 1935, 21024, 4865, 45, 53, 2324, 29, 21, 345, 5167, 9, 9, 9, 76, 14, 5167, 25, 11218, 21, 78, 2324, 1780, 9, 30, 22, 18, 32, 9, 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 to configure C# Typed Datasets when calling OracleDataAdapter.Update() on Oracle Stored Procedures? === I am writing a C# Windows Forms application which calls Oracle stored procedures. I chose to use typed datasets in the application, these correctly populate various datagrids, but I am having trouble when invoking the UpdateCommand or the InsertCommand. I have manually coded these commands because a) I am using Oracle stored procedures and b) I don't trust CommandBuilder ;) I am using VS2008 and Oracle 9i I don't have trouble executing stored procedures in SQL Server or Oracle when simply calling them from the .ExecuteNonQuery command; neither do I have problems executing SQL statements directly and updating the database. The main error I am getting (after a lot of experimentation with increasingly simpler SPs finishing with just one int parameter) is "PLS-00306: wrong number or type of arguments in call to '<PROCNAME>'" I have tried prefxing the parameter with ':' and without. Suffice to say I am losing the will to live. Has anyone any more ideas I could try next? Thanks
0
[ 2, 184, 20, 1065, 15951, 272, 5910, 1001, 43, 1054, 3554, 18, 76, 2555, 15759, 18768, 27576, 106, 9, 576, 8209, 5, 6, 27, 15759, 8214, 8876, 60, 800, 3726, 3726, 31, 589, 1174, 21, 272, 5910, 1936, 1997, 3010, 56, 3029, 15759, 821...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
StackOverflowException caused by a linq query === I try to create a asp.net-mvc web application, and get a StackOverFlowException. A controller triggers the following command: public ActionResult ShowCountry(int id) { Country country = _gameService.GetCountry(id); return View(country); } The GameService handles it like this (WithCountryId is an extension): public Country GetCountry(int id) { return _gameRepository.GetCountries().WithCountryId(id).SingleOrDefault(); } The GameRepository handles it like this: public IQueryable<Country> GetCountries() { var countries = from c in _db.Countries select new Country { Id = c.Id, Name = c.Name, ShortDescription = c.ShortDescription, FlagImage = c.FlagImage, Game = GetGames().Where(g => g.Id == c.GameId).SingleOrDefault(), SubRegion = GetSubRegions().Where(sr => sr.Id == c.SubRegionId).SingleOrDefault(), }; return countries; } The GetGames() method causes the StackOverflowException: public IQueryable<Game> GetGames() { var games = from g in _db.Games select new Game { Id = g.Id, Name = g.Name }; return games; } My Business objects are different from the linq2sql classes, that's why I fill them with a select new. An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll **edit** I have found the culprit, it's the following method, it triggers the GetCountries() method which in return triggers the GetSubRegions() again, ad nauseam: public IQueryable<SubRegion> GetSubRegions() { return from sr in _db.SubRegions select new SubRegion { Id = sr.Id, Name = sr.Name, ShortDescription = sr.ShortDescription, Game = GetGames().Where(g => g.Id == sr.GameId).SingleOrDefault(), Region = GetRegions().Where(r => r.Id == sr.RegionId).SingleOrDefault(), Countries = new LazyList<Country>(GetCountries().Where(c => c.SubRegion.Id == sr.Id)) }; } Might have to think of something else here :)
0
[ 2, 7566, 2549, 9990, 10066, 872, 1497, 34, 21, 6294, 1251, 25597, 800, 3726, 3726, 31, 1131, 20, 1600, 21, 28, 306, 9, 2328, 8, 79, 8990, 2741, 3010, 15, 17, 164, 21, 7566, 2549, 9990, 10066, 872, 9, 21, 9919, 7286, 18, 14, 249,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I Limit calls for a wcf service within a time span? === I want to write a wcf service that can't run more than X times per hour. I want the service to suspended messages to a queue if the service was called more than x time in the last 60 minutes. Any ideas how can one limit the service? I am willing to write custom components in the wcf stack.
0
[ 2, 184, 92, 31, 4496, 3029, 26, 21, 11801, 410, 365, 363, 21, 85, 6289, 60, 800, 3726, 3726, 31, 259, 20, 2757, 21, 11801, 410, 365, 30, 92, 22, 38, 485, 91, 119, 993, 436, 416, 1671, 9, 31, 259, 14, 365, 20, 5692, 7561, 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...
Linq to Sql - Loading Child Entities Without Using DataLoadOptions? === Is it possible to load child entities in a single query without using DataLoadOptions? I am using a request scoped data context in an asp.net web application and trying to get around the linq to sql limitation of not being able to change dataloadoptions once a query has been executed. Thanks.
0
[ 2, 6294, 1251, 20, 4444, 255, 13, 8, 12797, 850, 12549, 366, 568, 1054, 8294, 25458, 4710, 60, 800, 3726, 3726, 25, 32, 938, 20, 6305, 850, 12549, 19, 21, 345, 25597, 366, 568, 1054, 8294, 25458, 4710, 60, 31, 589, 568, 21, 3772, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Do you have a special development method of asp.net mvc applications as a team? === I don't know if this has been discussed. And also I don't know if this is relevant but I wondered. Let's say you are in a three developer team. How would you share: - models - views - controllers - by controllers - by use cases - something else? Maybe someone says this has nothing related with asp.net mvc but I think it affects somehow.
0
[ 2, 107, 42, 57, 21, 621, 522, 2109, 16, 28, 306, 9, 2328, 307, 8990, 3767, 28, 21, 173, 60, 800, 3726, 3726, 31, 221, 22, 38, 143, 100, 48, 63, 74, 6078, 9, 17, 67, 31, 221, 22, 38, 143, 100, 48, 25, 7480, 47, 31, 3519, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What's a quick way to trace the entry and exit of functions in a Visual Studio 2005 c++ multithreaded program? === I have intermittent crashes occurring in my ActiveMQ libraries due to the way I'm using the activemq-cpp API. It'd be much easier to debug the issue if I could observe every function being called leading up to the crash. Are there any quick ways to trace the entry and exit of functions in a Visual Studio 2005 c++ multithreaded program? Thanks in advance!
0
[ 2, 98, 22, 18, 21, 2231, 161, 20, 5565, 14, 2792, 17, 4350, 16, 3719, 19, 21, 3458, 1120, 812, 272, 20512, 1889, 96, 10647, 69, 625, 60, 800, 3726, 3726, 31, 57, 19667, 21563, 10428, 19, 51, 1348, 79, 1251, 8649, 397, 20, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it possible to obtain warnings from javadoc when something missed in javadoc-comments? === Accidentally I may forget to describe some parameters or exception throwing (or something else) when documenting methods or classes, etc. Is it possible to run javadoc in such a way that it warns me about missing documentation items?
0
[ 2, 25, 32, 938, 20, 5545, 3590, 18, 37, 8247, 13799, 76, 301, 3238, 19, 8247, 13799, 8, 960, 6601, 60, 800, 3726, 3726, 9746, 31, 123, 3856, 20, 4996, 109, 12905, 54, 5391, 6033, 13, 5, 248, 301, 962, 6, 76, 4492, 68, 3195, 54...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Missing ant-javamail.jar file on Macintosh === I've been running the built-in [Ant][1] from the command line on a Macintosh (10.5.5) and have run into some trouble with the **Mail** task. Running the Mail task produces the following message: [mail] Failed to initialise MIME mail: org.apache.tools.ant.taskdefs.email.MimeMailer This is most likely due to a missing ant-javamail.jar file in the /usr/share/ant/lib directory. I see a "ant-javamail-1.7.0.pom" file in this directory but not the appropriate jar file. Anyone know why this jar file might be missing and what the best way to resolve the problem is? [1]: http://ant.apache.org/
0
[ 2, 2863, 40, 38, 8, 1004, 1385, 8079, 9, 6300, 3893, 27, 24024, 800, 3726, 3726, 31, 22, 195, 74, 946, 14, 392, 8, 108, 636, 1830, 500, 2558, 165, 500, 37, 14, 1202, 293, 27, 21, 24024, 13, 5, 1036, 9, 264, 9, 264, 6, 17, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the best report engine for Java === Most of our project we use the Jasper Reports, does anyone have experience with some other report engines, is there anything better? (We use JR for stock-exchange reports)
0
[ 2, 98, 25, 14, 246, 1330, 1406, 26, 8247, 800, 3726, 3726, 127, 16, 318, 669, 95, 275, 14, 16750, 2813, 15, 630, 1276, 57, 1496, 29, 109, 89, 1330, 4016, 15, 25, 80, 602, 574, 60, 13, 5, 458, 275, 2000, 26, 2070, 8, 1706, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
SimpleModal containerCSS not working in Firefox or Chrome === Good Afternoon, I tried to override the settings in the default stlyesheet that comes with the simplemodal jquery plugin with containerCSS which is working fine in IE7 but not Firefox or Chrome. Not sure if this is a bug or I am doing something wrong. jQuery: $(document).ready(function() { $("#ButtonPopup").click(function() { $("#addEditTask").modal({ onOpen: modalOpen, persist: true, containerCss: ({ width: "300", height: "200", marginLeft: "-150" }) }); return false; }); }); HTML: <button id="ButtonPopup">Popup</button> <div id="addEditTask" style="display:none;"> <p>Aliquam nonummy adipiscing augue. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna.</p> <button id="ButtonSave">Save</button> <button id="ButtonCancel">Cancel</button> </div> Please see http://beckelman.net/issues/simplemodalfirefoxproblem/default.aspx for a working demo and zip download of the code that you can test for yourself. Thanks for the help in advance. Bill
0
[ 2, 1935, 20756, 12147, 6824, 18, 52, 638, 19, 535, 18219, 54, 13, 12985, 800, 3726, 3726, 254, 3435, 15, 31, 794, 20, 84, 11891, 14, 12410, 19, 14, 12838, 354, 102, 62, 17627, 30, 1624, 29, 14, 1935, 20756, 487, 8190, 93, 10922, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 modeling tools are everyone using? === I am trying to get a sense of what tools people are using for system modeling? Right now I use: - Data Modeling - Erwin - System Architecture - Visio - UML - Visio I have been looking for a good freeware data modeling tool that can rival Erwin, but haven't found anything yet. I have always wondered if tools like Popkins System Architect are any good too.
0
[ 2, 98, 12807, 4672, 50, 1266, 568, 60, 800, 3726, 3726, 31, 589, 749, 20, 164, 21, 1259, 16, 98, 4672, 148, 50, 568, 26, 329, 12807, 60, 193, 130, 31, 275, 45, 13, 8, 1054, 12807, 13, 8, 24766, 13, 8, 329, 2607, 13, 8, 9060,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Programmaticaly Download a Webpage in Java === I would like to be able to fetch web pages and save to a local machine. How would I go about doing that using Java?
0
[ 2, 184, 107, 42, 625, 6732, 58, 102, 7121, 21, 2741, 6486, 19, 8247, 800, 3726, 3726, 31, 83, 101, 20, 44, 777, 20, 18312, 2741, 4434, 17, 2079, 20, 21, 375, 1940, 9, 184, 83, 31, 162, 88, 845, 30, 568, 8247, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...