unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Best way to receive file through webservice === I have an API consisting of ASP.NET webservices callable through GET/POST/SOAP. A new functionality will require me to accept files through this webservice. Basically I'm allowing users to upload files to a file archive through the API, which they'd otherwise do by logging into our browser based administration system. The API needs to be as easily consumed as possible. I'm thinking of dropping SOAP support since our PHP clients mainly use the GET/POST methods, and the .NET clients don't mind either way. With that as a prerequisite, I'm thinking of simply creating an UploadFile(fileName) method, and the requiring the user to send the file through POST as a normal file upload. However, I will not be able to specify the file field as a parameter to the method, right? So if I simply state in the documentation "file should be sent in POST field called 'File'", would that pose any problems when I need to read the file? All files are in binary format, PDF's, various image formats, FLV and so forth. Also, file sizes will mainly be in the 2-20MB vicinity, but given the above solution, would I have any troubles accepting files in the 250MB area? Receiving a file this way would result in the file being loaded completely into memory, before I write it to disk - is there any way around this, besides letting the service receive a Stream and thus disabling me from accepting other parameters, and hindering the easy usage of the service?
0
[ 2, 246, 161, 20, 2588, 3893, 120, 2741, 11449, 800, 3726, 3726, 31, 57, 40, 21, 2159, 4160, 16, 28, 306, 9, 2328, 2741, 11449, 18, 645, 579, 120, 164, 118, 6962, 118, 656, 2552, 9, 21, 78, 18548, 129, 4077, 55, 20, 3440, 6488, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 .odt files with C#.NET? === *Note: I found this ["Creating a Word Doc in C#.NET"](http://stackoverflow.com/questions/10412/creating-a-word-doc-in-cnet), but that is not what I want.* Do you know how to create a **.odt** to create file from C# .NET? Is there a .NET component or wrapper for an OpenOffice.org library to do this? Thanks!
0
[ 2, 184, 20, 1600, 13, 9, 5648, 38, 6488, 29, 272, 5910, 9, 2328, 60, 800, 3726, 3726, 1637, 10280, 45, 31, 216, 48, 636, 7, 6037, 1880, 21, 833, 9765, 19, 272, 5910, 9, 2328, 7, 500, 5, 21127, 6903, 25325, 2549, 9990, 9, 960, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it possible to install Kohana libraries without using the entire framework? === In a previous question, I asked about various ORM libraries. It turns out Kohana looks very clean yet functional for the purposes of ORM. I already have an MVC framework that I am working in though. If I don't want to run it as a framework, what is the right fileset to include to just give me the DB and ORM base class files?
0
[ 2, 25, 32, 938, 20, 16146, 1584, 7285, 8649, 366, 568, 14, 1078, 6596, 60, 800, 3726, 3726, 19, 21, 1158, 1301, 15, 31, 411, 88, 617, 54, 79, 8649, 9, 32, 2844, 70, 1584, 7285, 1879, 253, 2745, 768, 7652, 26, 14, 4612, 16, 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...
Merge Primary Keys - Cascade Update === Is there a way to merge two primary keys into one and then cascade update all affected relationships? Here's the scenario: Customers (idCustomer int PK, Company varchar(50), etc) CustomerContacts (idCustomerContact int PK, idCustomer int FK, Name varchar(50), etc) CustomerNotes (idCustomerNote int PK, idCustomer int FK, Note Text, etc) Sometimes customers need to be merged into one. For example, you have a customer with the id of 1 and another with the id of 2. You want to merge both, so that everything that was 2 is now 1. I know I could write a script that updates all affected tables one by one, but I'd like to make it more future proof by using the cascade rules, so I don't have to update the script every time there is a new relationship added. Any ideas?
0
[ 2, 12666, 1256, 5534, 13, 8, 13542, 11100, 800, 3726, 3726, 25, 80, 21, 161, 20, 12666, 81, 1256, 5534, 77, 53, 17, 94, 13542, 11100, 65, 4114, 5833, 60, 235, 22, 18, 14, 12705, 45, 5279, 13, 5, 1340, 4636, 262, 1263, 19, 38, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I relax PHP's open_basedir restriction? === [open_basedir][1] limits the files that can be opened by PHP within a directory-tree. I am storing several class libraries and configuration files outside of my web root directory. This way the web server does not make them publicly accessible. However when I try to include them from my application I get an open_basedir restriction error. My web root is here: /var/www/vhosts/domain.tld/httpdocs My libraries and configuration directory is here: /var/www/vhosts/domain.tld/zend What would be the best workaround to relax the open_basedir restriction so that the the directory tree under the domain folder becomes available? I have a number of domains that I want to do this with. I also have root ssh access to the server. I'm also obviously wary of creating security vulnerabilities. [1]: http://www.php.net/features.safe-mode
0
[ 2, 184, 92, 31, 9738, 13, 26120, 22, 18, 368, 1, 1281, 1523, 18732, 60, 800, 3726, 3726, 636, 10157, 1, 1281, 1523, 500, 2558, 165, 500, 5887, 14, 6488, 30, 92, 44, 520, 34, 13, 26120, 363, 21, 16755, 8, 8101, 9, 31, 589, 2561...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Checking registrations against a CSV file === I am new to MySQL and PHP(as you can probably tell) and I was wondering if anybody knew an easy way to import a CSV file into a MySQL table. > "There are any number of ways to input > csv into mysql depending in what kind > of access you have, if you can use the > mysql client directly there is a > command to load delimited data, > something like that could basically be > entered directly in cron and keep > itself up to date. Otherwise there are > various php scripts to do that sort of > thing." That is something a friend told me to do, is that the easiest/best way to do it? If it is would someone mind explaining it to me? Thank you
0
[ 2, 9886, 8587, 18, 149, 21, 272, 18, 710, 3893, 800, 3726, 3726, 31, 589, 78, 20, 51, 18, 22402, 17, 13, 26120, 5, 472, 42, 92, 910, 494, 6, 17, 31, 23, 5712, 100, 11181, 404, 40, 2010, 161, 20, 9010, 21, 272, 18, 710, 3893,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Indexes for has_many :through === Suppose you have two models, User and City, joined by a third model CityPermission: class CityPermission < ActiveRecord::Base belongs_to :city belongs_to :user end class City < ActiveRecord::Base has_many :city_permissions has_many :users, :through => :city_permissions end class User < ActiveRecord::Base has_many :city_permissions has_many :cities, :through => :city_permissions end Currently, I create the join table, and the index for the table, using the following migration code snippet: create_table :city_permissions do |t| t.integer :user_id, :city_id t.other_fields ... end add_index(:city_permissions, :user_id) add_index(:city_permissions, :city_id) Are these the optimal indexes to create? Will these indexes allow quick access back and forth through the join table, as well as quick lookups within the table itself, or is there some other better way? To restate this a bit differently, will these indexes, given `city` and `user` are instance variables of class City and User, allow `city.users`, `city.city_permissions`, `user.cities`, and `user.city_permissions` to all perform equally well?
0
[ 2, 4348, 160, 26, 63, 1, 14842, 13, 45, 11639, 800, 3726, 3726, 5787, 42, 57, 81, 2761, 15, 4155, 17, 136, 15, 670, 34, 21, 422, 1061, 136, 1432, 12385, 45, 718, 136, 1432, 12385, 13, 1, 1348, 14953, 45, 45, 8436, 7034, 1, 262...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 and modern practices/examples in Linux === I'm looking for programs/projects that are small to moderate size that show good modern practices for developing applications in C on Linux. I'd like to learn by example and curious how things are done out in the real world.
0
[ 2, 272, 17, 773, 5242, 118, 29041, 18, 19, 13024, 800, 3726, 3726, 31, 22, 79, 699, 26, 1726, 118, 21011, 18, 30, 50, 284, 20, 8063, 1072, 30, 298, 254, 773, 5242, 26, 3561, 3767, 19, 272, 27, 13024, 9, 31, 22, 43, 101, 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, 0, 0...
How to salvage referential integrity with mutiple databases === I am in the middle of designing a system that will be used to feed several production sites around the country (all information is in one site) with the potential to add more. Initially I thought that I could get away with only using one database. I am now re-thinking my original design and leaning toward a more scalable solution. Keeping down the size of each database / tables is also important. There will be a "master" database that has information that spans the notion of a site and then a separate database for each site with site-specific information in it. My struggle is where to separate the data. The data is all fairly related. No matter where I do it I will lose some referential integrity. Everything I've read says to avoid this at all costs for what I think are very good reasons, but I don't see a way around it. I have looked into triggers, but I don't think that they work if the databases are on separate servers (not sure though - I think Oracle does this). I am limited to an open source solution so it'll be MySQL or postgre if that helps at all. Does anybody have some suggestions to mitigate this problem or have another design suggestion?
0
[ 2, 184, 20, 15862, 5017, 10107, 11961, 29, 22072, 5106, 6018, 18, 800, 3726, 3726, 31, 589, 19, 14, 772, 16, 15026, 21, 329, 30, 129, 44, 147, 20, 4063, 238, 637, 3259, 140, 14, 475, 13, 5, 1233, 676, 25, 19, 53, 689, 6, 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...
How much JavaScript do you let Rails generate? === Ruby on Rails has a lot of ways to generate JavaScript. Particularly when it comes to Ajax. Unfortunately, there are a few problems that I often see with the JavaScript that it generates. * Rails typically uses inline event handling. > <code>`<a onclick="somejavascript(); return false;" />`</code> This is generally frowned upon, as it's mixing behavior in with the XHTML. * The generated JavaScript also relies heavily on Prototype. Personally, I prefer jQuery. * In my experience, the attitude with a lot of Rails developers has been to write as much of the code in Ruby as possible. The final step being to generate some very procedural and repetitive JavaScript. Often, this code ends up being very inflexible and difficult to debug. So, my question is: how much JavaScript do you write manually for your projects and how much of it is generated server side with Rails/Ruby? Or is there a happy medium where you get the benefits of both? With a subquestion: if you write a lot of the JavaScript manually, what techniques do you use to fit it into the MVC model?
0
[ 2, 184, 212, 8247, 8741, 107, 42, 408, 2240, 18, 7920, 60, 800, 3726, 3726, 10811, 27, 2240, 18, 63, 21, 865, 16, 2847, 20, 7920, 8247, 8741, 9, 1653, 76, 32, 1624, 20, 20624, 9, 6200, 15, 80, 50, 21, 310, 1716, 30, 31, 478, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Low Cost Technical Architecture for a Website Backend === I'm looking at opening up a website in the near future and aside from the standard domain registration costs, I'm unsure of how to proceed. I'm expecting the volume of data to be quite significant and looking at many webhosts it seems that while they might offer extreme bandwidth caps, I've been told they often suspend accounts before you reach that monthly limit. Are there are any ways I can offload the bandwidth intensive components to a separate host that specialises in extremely heavy data consumption, and just keep the website elements hosted on a standard account. While I realise having my own set of server's would be best, I'm trying to find a relatively cost efficient way to do it at the start.
0
[ 2, 708, 1516, 2447, 2607, 26, 21, 2271, 97, 2451, 800, 3726, 3726, 31, 22, 79, 699, 35, 1214, 71, 21, 2271, 19, 14, 424, 1022, 17, 3841, 37, 14, 1236, 4603, 8587, 4227, 15, 31, 22, 79, 13815, 16, 184, 20, 11158, 9, 31, 22, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Check a string to see if all characters are hexadecimal values === What is the most efficient way in C# 2.0 to check each character in a string and return true if they are all valid hexadecimal characters and false otherwise. Example void Test() { OnlyHexInString("123ABC"); // returns true OnlyHexInString("123def"); // returns true OnlyHexInString("123g"); // returns false } bool OnlyHexInString(string text) { // Most efficient algorithm to check each digit in C# 2.0 goes here }
0
[ 2, 2631, 21, 3724, 20, 196, 100, 65, 1766, 50, 24, 6791, 9522, 49, 3482, 4070, 800, 3726, 3726, 98, 25, 14, 127, 8243, 161, 19, 272, 5910, 172, 9, 387, 20, 2631, 206, 925, 19, 21, 3724, 17, 788, 1151, 100, 59, 50, 65, 7394, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
@media not working in Firefox 3.0.3 === This is what I have, which works in IE7, but not in Firefox: @media screen { @import 'screen.css'; } It works outside of the @media block in Firefox: @import 'screen.css'; What am I missing?
0
[ 2, 13, 1, 8260, 52, 638, 19, 535, 18219, 203, 9, 387, 9, 240, 800, 3726, 3726, 48, 25, 98, 31, 57, 15, 56, 693, 19, 13, 660, 465, 15, 47, 52, 19, 535, 18219, 45, 13, 1, 8260, 2324, 13, 1, 13, 1, 1660, 1993, 13, 22, 7187,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
History of VB.NET Nullable syntax === I can't find a definitive answer. Since C# 2.0 you've been able to declare int? i = 125; as shorthand for Nullable<int> i = Nullable<int>(123); I recall reading somewhere that VB.NET did not allow this shortcut. But low and behold, I tried it in VS 2008 today and it works. Does anyone know whether it's been this way since .NET 2.0 or was this added later?
0
[ 2, 447, 16, 13, 20468, 9, 2328, 16203, 579, 22649, 800, 3726, 3726, 31, 92, 22, 38, 477, 21, 15676, 1623, 9, 179, 272, 5910, 172, 9, 387, 42, 22, 195, 74, 777, 20, 10123, 19, 38, 60, 31, 800, 9917, 73, 28, 502, 3203, 26, 162...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Elegant structured text file parsing === I need to parse a transcript of a live chat conversation. My first thought on seeing the file was to throw regular expressions at the problem but I was wondering what other approaches people have used. I put elegant in the title as i've previously found that this type of task has a danger of getting hard to maintain just relying on regular expressions. The transcripts are being generated by www.providesupport.com and emailed to an account, I then extract a plain text transcript attachment from the email. The reason for parsing the file is to extract the conversation text for later but also to identify visitors and operators names so that the information can be made available via a CRM. Here is an example of a transcript file: Chat Transcript Visitor: Random Website Visitor Operator: Milton Company: Initech Started: 16 Oct 2008 9:13:58 Finished: 16 Oct 2008 9:45:44 Random Website Visitor: Where do i get the cover sheet for the TPS report? * There are no operators available at the moment. If you would like to leave a message, please type it in the input field below and click "Send" button * Call accepted by operator Milton. Currently in room: Milton, Random Website Visitor. Milton: Y-- Excuse me. You-- I believe you have my stapler? Random Website Visitor: I really just need the cover sheet, okay? Milton: it's not okay because if they take my stapler then I'll, I'll, I'll set the building on fire... Random Website Visitor: oh i found it, thanks anyway. * Random Website Visitor is now off-line and may not reply. Currently in room: Milton. Milton: Well, Ok. But… that's the last straw. * Milton has left the conversation. Currently in room: room is empty. Visitor Details --------------- Your Name: Random Website Visitor Your Question: Where do i get the cover sheet for the TPS report? IP Address: 255.255.255.255 Host Name: 255.255.255.255 Referrer: Unknown Browser/OS: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727)
0
[ 2, 11614, 17784, 1854, 3893, 2017, 18, 68, 800, 3726, 3726, 31, 376, 20, 2017, 870, 21, 18413, 16, 21, 515, 6615, 2735, 9, 51, 64, 289, 27, 2078, 14, 3893, 23, 20, 3814, 1290, 13832, 35, 14, 1448, 47, 31, 23, 5712, 98, 89, 750...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Logging in Eclipse/OSGi plugins === I am starting to develop an Eclipse plugin (technically, an OSGi plugin) and one of the first problems I've run into is that I can't seem to control the commons-logging output as I normally would. I've included the commons-logging package in the plugin dependencies, and indeed, when I log something (at INFO or higher severity) it is logged to the console. However, I can't seem to log at any lower level (such as DEBUG or TRACE). I have specified a log4j.properties file, and it is on the classpath (for the runtime, just as the commons-logging package is) but none of the settings in that properties file have any impact on the behavior of the logger. Here's the log4j.properties file: # Log4j Logging levels, in order of decreasing importance are: # FATAL, ERROR, WARN, INFO, DEBUG, TRACE # # Root logger option log4j.rootLogger=ERROR,stdout #,LOGFILE # Direct log messages to stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target=System.out log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %r (%l) %t%n - %m%n What do I need to do so that I can actually control the output of the logger? Here are some sample output messages, in the hopes that the formatting may coincide with a default for java.util.logging, or provide other hints to someone: Oct 21, 2008 11:01:23 PM com.stottlerhenke.sentinel.client.Activator start SEVERE: fatal_message Oct 21, 2008 11:01:23 PM com.stottlerhenke.sentinel.client.Activator start WARNING: warn_message Oct 21, 2008 11:01:23 PM com.stottlerhenke.sentinel.client.Activator start INFO: info_message
0
[ 2, 13, 13919, 19, 11652, 118, 759, 2234, 10922, 108, 18, 800, 3726, 3726, 31, 589, 1422, 20, 2803, 40, 11652, 10922, 108, 13, 5, 22307, 102, 15, 40, 13, 759, 2234, 10922, 108, 6, 17, 53, 16, 14, 64, 1716, 31, 22, 195, 485, 77,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 avoid duplicated code in my tests and avoid mocking on self? === In my question [As a “mockist” TDD practitioner, should I mock other methods in the same class as the method under test?](http://stackoverflow.com/questions/184729/as-a-mockist-tdd-practitioner-should-i-mock-other-methods-in-the-same-class-as), [Avdi](http://stackoverflow.com/users/20487/avdi) answered "Personally I think that mocking on self is almost always a code smell. It's testing the implementation rather than the behavior." He may be right, but often I can't distinguish between the implementation and the behavior. I have another example (in Python-style pseudo-code) that may lead to helpful answers: class Consumer: def spec_dirpath: client = VCS.get_connection(self.vcs_client_name) client.sync() return client.dirpath() def spec_filepath: filepath = os.path.join(spec_dirpath(), self.spec_filename) if not os.path.exists(filepath): raise ConsumerException return filepath def get_components: return Components.get_components_from_spec_file(self.spec_filepath()) The idea here is that the get\_components method calls the spec\_filepath method in order to get a path to a file that the get\_components\_from\_spec\_file Components class method will read a list of components from. The spec\_filepath method in turn calls spec\_dirpath, which syncs the directory containing the spec file from the VCS system and returns the path to that directory. (Try not to look for bugs in this code--it's pseudo-code, after all.) I'm looking for advise on how to test these methods... Testing spec\_dirpath should be quite straightforward. I can mock the VCS class and have it return a mock object and confirm the appropriate methods are called (and that the spec\_dirpath method returns what the mock's dirpath method returns). But if I don't mock spec\_dirpath while testing spec\_filepath, how do I avoid duplicating the same test code from the spec\_dirpath code in the spec\_filepath test? And if I don't mock spec\_filepath while testing get\_components, how do I avoid duplicating the test code from both spec\_filepath *and* spec\_dirpath?
0
[ 2, 184, 107, 31, 2658, 19429, 43, 1797, 19, 51, 4894, 17, 2658, 18446, 27, 1119, 60, 800, 3726, 3726, 19, 51, 1301, 636, 472, 21, 13, 1, 79, 5668, 702, 1, 15596, 43, 21103, 15, 378, 31, 10506, 89, 3195, 19, 14, 205, 718, 28, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
opengl rotation using gldrawpixels === My team is currently limited to drawing images on an opengl 1.4 platform, which means that we can't use any nifty texture mapping to draw an image (yes, we're confined to using the intel integrated graphics platform, it's very annoying). So far, we're able to draw, scale, and flip an image, but the guy doing the graphics claims that rotation via glRotate can't be done while using glDrawPixels, that we'd have to go to textures and so forth, which don't work on the Intel platform. I've bet him lunch that there is a rotation function, like glRotate, that will work for straight bitmaps. Does such a function exist? Would glRotate work? I'm a bit of a novice to this graphics thing, but it seems ludicrous that the library wouldn't allow for bitmap rotation except via texture rotation. Thanks.
0
[ 2, 368, 8430, 9431, 568, 13, 8430, 43, 12404, 18321, 6798, 800, 3726, 3726, 51, 173, 25, 871, 1317, 20, 3533, 3502, 27, 40, 368, 8430, 137, 9, 300, 2452, 15, 56, 1108, 30, 95, 92, 22, 38, 275, 186, 1781, 3072, 93, 12714, 13305, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 configure Apache on Windows for SSL? === Apache just fails to start with NO error message when we try to reboot it after enabling the code for the ssl module. NOTE: I was able to use OpenSSL to generate a request and have a legit wildcard certificate in place and referenced in the httpd.conf
0
[ 2, 184, 107, 42, 1065, 15951, 17140, 27, 1936, 26, 13, 18, 18, 255, 60, 800, 3726, 3726, 17140, 114, 13614, 20, 799, 29, 90, 7019, 2802, 76, 95, 1131, 20, 25312, 32, 75, 13168, 14, 1797, 26, 14, 13, 18, 18, 255, 12613, 9, 1945...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 deal with "super" generics in java? === Take the following generics example import java.util.List; import java.util.ArrayList; public class GenericsTest { private List<Animal> myList; public static void main(String args[]) { new GenericsTest(new ArrayList<Animal>()).add(new Dog()); } public GenericsTest(List<Animal> list) { myList = list; } public void add(Animal a) { myList.add(a); } public interface Animal {} public static class Dog implements Animal {} public static class Cat implements Animal {} } It works fine. But as you know, you cannot construct it with new GenericsTest(new ArrayList<Dog>()); because, as you know, the add(Animal) would make possible to add `Cat`s. The *suggested* way of solving this problem, i.e. wildcarding does not work either, because, yes, you can change every `List<Animal>` in `List<? extends Animal>` but it has the same problem: you can create the `GenericsTest` with `List<Cat>` and then add `Dog`s. So my question is: is there a convenient way to write this class once, and then use it for all the possible `Animals`? Of course it should solve straightforwardly the above mentioned problem.
0
[ 2, 184, 107, 42, 1183, 29, 13, 7, 8542, 7, 12733, 18, 19, 8247, 60, 800, 3726, 3726, 247, 14, 249, 12733, 18, 823, 9010, 8247, 9, 14255, 9, 5739, 73, 9010, 8247, 9, 14255, 9, 8576, 93, 5739, 73, 317, 718, 12733, 18, 10543, 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...
How do you survive in a corporate coding environment? === I work for a smallish software shop with a mix of internal products, and external consulting. For the last few years I've been working on in house apps at the office with a bunch of other geeks. Fairly laid back and productive. Pretty much perfect coding conditions: - good equipment - quiet, focused team rooms with a few developers who are all on the same project - freedom to use whatever tools we wanted - agile processes - everyone is a developer (even the bosses) - clear requirements with real scope - enthusiastic, passionate people who are really onto it However recently I've changed projects and moved into an external consulting team embedded at a big corporate site with all the resulting bureaucratic BS and overhead that goes with it: - Constant interruptions - loud open-plan cubicle environment - slow equipment - heavy, burdensome process (even though they call it "agile") - restrictive IT environment - slow, overly complicated, limited tools - vague requirements. No one seems to know what is going on - cynical teams. Mix of average and mediocre client contacts to rely on And it's driving me nuts. So what does everyone else who is in this boat do to keep their sanity?
0
[ 2, 184, 107, 42, 4563, 19, 21, 4871, 13, 15458, 2307, 60, 800, 3726, 3726, 31, 170, 26, 21, 284, 1595, 2306, 2546, 29, 21, 2917, 16, 3117, 1985, 15, 17, 4886, 11146, 9, 26, 14, 236, 310, 122, 31, 22, 195, 74, 638, 27, 19, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Java: Efficient Equivalent to Removing while Iterating a Collection === We all know you can't do this: for (Object i : l) if (condition(i)) l.remove(i); `ConcurrentModificationException` etc... this apparently works sometimes, but not always. Here's some specific code: public static void main(String[] args) { Collection<Integer> l = new ArrayList<Integer>(); for (int i=0; i < 10; ++i) { l.add(new Integer(4)); l.add(new Integer(5)); l.add(new Integer(6)); } for (Integer i : l) { if (i.intValue() == 5) l.remove(i); } System.out.println(l); } This, of course, results in: Exception in thread "main" java.util.ConcurrentModificationException ...even though multiple threads aren't doing it... Anyway. What's the best solution to this problem? "Best" here means most time and space efficient (I realize you can't always have both!) I'm also using an arbitrary `Collection` here, not necessarily an `ArrayList`, so you can't rely on `get`.
0
[ 2, 8247, 45, 8243, 4602, 20, 9096, 133, 32, 106, 1880, 21, 1206, 800, 3726, 3726, 95, 65, 143, 42, 92, 22, 38, 107, 48, 45, 26, 13, 5, 23793, 31, 13, 45, 644, 6, 100, 13, 5, 22141, 5, 49, 6, 6, 644, 9, 99, 16598, 5, 49, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Having trouble linking a static library C++ === I've figured out how to set VC++ to compile code into a .lib file instead of a .exe, but I'm having trouble getting a lib to link together with my other .obj files. Here is how I have the library and application folders set up. (I'm not sure if this is right) AppFolder App.sln App.ncb *.h *.cpp Debug *.obj App.exe and somewhere else on the hard drive... LibraryFolder lib Library.lib include LibrarySolutionFolder Library.sln Library.ncb *.h *.cpp Debug *.obj Library.lib I've been #including the library *.h files from my app's cpp files, and everything compiles fine. It's just when it links I get a list of all the .lib files that are being searched, and Library.lib isn't on there even though I have it listed in VC++ directories. How can I get this to link? (And am I structuring the library folders c
0
[ 2, 452, 2572, 12585, 21, 12038, 1248, 272, 20512, 800, 3726, 3726, 31, 22, 195, 5700, 70, 184, 20, 309, 13, 8990, 20512, 20, 26561, 1797, 77, 21, 13, 9, 8326, 3893, 700, 16, 21, 13, 9, 1706, 62, 15, 47, 31, 22, 79, 452, 2572, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Will Pro*C work with MSVC 6? === How do you get Pro*c to work within MSVC 6? In otherwords compile a .pc file into a .cpp file.
0
[ 2, 129, 895, 2483, 150, 170, 29, 4235, 8990, 400, 60, 800, 3726, 3726, 184, 107, 42, 164, 895, 2483, 150, 20, 170, 363, 4235, 8990, 400, 60, 19, 89, 12827, 26561, 21, 13, 9, 5779, 3893, 77, 21, 13, 9, 150, 3421, 3893, 9, 3, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
LINQ to SQL entity and data-context classes: business object encapsulation === What are your favorite ways to encapsulate LINQ to SQL entity classes and data-context classes into business objects? What have you found to work in a given situation? Have you invented or taken to any specific patterns?
0
[ 2, 6294, 1251, 20, 4444, 255, 9252, 17, 1054, 8, 1126, 11969, 2684, 45, 508, 3095, 1957, 4666, 18, 11123, 800, 3726, 3726, 98, 50, 154, 3839, 2847, 20, 1957, 4666, 18, 12383, 6294, 1251, 20, 4444, 255, 9252, 2684, 17, 1054, 8, 112...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Inline Disabling of Firefox Spellcheck? === I researched this a while ago and can't remember how to do it. I want to be able to prevent Firefox from running it's spell-checking functionality on certain input fields from within the page. I know it's possible but can't remember how to set it up.
0
[ 2, 19, 1143, 1460, 58, 8599, 16, 535, 18219, 4762, 12542, 60, 800, 3726, 3726, 31, 527, 69, 48, 21, 133, 1464, 17, 92, 22, 38, 1518, 184, 20, 107, 32, 9, 31, 259, 20, 44, 777, 20, 2501, 535, 18219, 37, 946, 32, 22, 18, 4762,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Update columns in one LINQ object with another LINQ object. === I have two LINQ objects which have exactly the same columns and I would like to be able to update one with the fields from the other. I first create a new object from some data in a file, then I query the database for an existing item with the same ID. What I would like to be able to do is update the existing objects details with the newly created objects details. So far the way I have been doing it is to list all the columns and update them manually but as you can see this can cause maintenance headaches. With OldCaller .ADDRESS = NewCaller.ADDRESS .COMPANY = NewCaller.COMPANY .CONTACT_HOURS = NewCaller.CONTACT_HOURS .CONTACT_NAME = NewCaller.CONTACT_NAME .CUSTOMER_ID = NewCaller.CUSTOMER_ID .EMAIL_ADDRESS = NewCaller.EMAIL_ADDRESS .FAX_NUMBER = NewCaller.FAX_NUMBER .FAX_TYPE = NewCaller.FAX_TYPE .MOBILE = NewCaller.MOBILE .POSTCODE = NewCaller.POSTCODE .PUBLIC_ADDRESS = NewCaller.PUBLIC_ADDRESS .PUBLIC_TELEPHONE = NewCaller.PUBLIC_TELEPHONE .STATE = NewCaller.STATE .SUBURB = NewCaller.SUBURB .TELEPHONE = NewCaller.TELEPHONE End With I would like to be able to find a way to clean this up a bit. Does anyone know of a better way to do what I need. Thanks.
0
[ 2, 11100, 7498, 19, 53, 6294, 1251, 3095, 29, 226, 6294, 1251, 3095, 9, 800, 3726, 3726, 31, 57, 81, 6294, 1251, 3916, 56, 57, 1890, 14, 205, 7498, 17, 31, 83, 101, 20, 44, 777, 20, 11100, 53, 29, 14, 2861, 37, 14, 89, 9, 31...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
c# create an instance of a class from a string === Is there a way to create an instance of a class based on the fact I know the name of the class at runtime. Basically I would have the name of the class in a string.
0
[ 2, 272, 5910, 1600, 40, 4851, 16, 21, 718, 37, 21, 3724, 800, 3726, 3726, 25, 80, 21, 161, 20, 1600, 40, 4851, 16, 21, 718, 432, 27, 14, 837, 31, 143, 14, 204, 16, 14, 718, 35, 485, 891, 9, 11374, 31, 83, 57, 14, 204, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How do I configure cocoon to use a database as a store for quartz jobs and triggers === I'm using Cocoon and want to store the jobs and triggers for the quartz scheduler in the database so they are persisted. I can see where I need to make the change in `cocoon.xconf` but I can't find much on how to configure the datasource etc. How do I configure this to use our existing (postgres) database?
0
[ 2, 184, 107, 31, 1065, 15951, 28152, 20, 275, 21, 6018, 28, 21, 1718, 26, 20913, 4844, 17, 7286, 18, 800, 3726, 3726, 31, 22, 79, 568, 28152, 17, 259, 20, 1718, 14, 4844, 17, 7286, 18, 26, 14, 20913, 4345, 139, 19, 14, 6018, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What's a good way to bind from a shared utility window and the frontmost document window? === I have an application which allows for multiple NSDocuments to be open. In this application is a single utility window that contains some functionality that I want to apply to the frontmost document. I am trying to use bindings here, so the trick is how to cleanly bind the user interface of the utility window to the frontmost document. The goal is that then switching the frontmost document window will update the view in the utility window; controls that are bound to properties of the frontmost document's model would be updated appropriately when state changes in the document's model, etc. For sending actions from such a window, it's easy to just use first responder; the document object can intercept actions via the responder chain. But I want more than this, and of course you can't bind to the first responder. A few ideas that I have: * put an object controller in my nib for the shared window. When a document window changes frontmost status, change the content of that binding. A disadvantage of this is that if I were to have another kind of utility window, I'd have to remember to hook up the bindings from the document window to that utility window too! * Make an accessor in the application delegate that gets the frontmost document window by traversing the window list. My utility window would just bind through the application delegate's method. A disadvantage here is that it's not KVO compliant * Have a getter and setter in the application delegate to determine (and perhaps set to be KVO-compliant? would that make sense?) the frontmost document. Perhaps use window notifications set an ivar to the appropriate value when a window loses main status. None of these seem quite right. Is there a better way to do this that I'm missing?
0
[ 2, 98, 22, 18, 21, 254, 161, 20, 10193, 37, 21, 2592, 10082, 1463, 17, 14, 431, 4630, 4492, 1463, 60, 800, 3726, 3726, 31, 57, 40, 3010, 56, 2965, 26, 1886, 13, 2172, 28132, 18, 20, 44, 368, 9, 19, 48, 3010, 25, 21, 345, 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...
How to generate spectrum color palettes === Is there an easy way to convert between color models in Java (RGB, HSV and Lab). Assuming RGB color model: * How do I calculate black body spectrum color palette? I want to use it for a heatmap chart. * How about single-wavelenght spectrum?
0
[ 2, 184, 20, 7920, 8815, 1665, 27349, 18, 800, 3726, 3726, 25, 80, 40, 2010, 161, 20, 8406, 128, 1665, 2761, 19, 8247, 13, 5, 139, 11400, 15, 746, 18, 710, 17, 4343, 6, 9, 11704, 761, 11400, 1665, 1061, 45, 1637, 184, 107, 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...
SML comparing files at the bit level === I am attempting to compare files in a directory using SML. Using the TextIO library is fairly easy but I need to compare the files at the bit level. That is, a binary compare. I am using a function similar to this: fun listDir (s) = let fun loop (ds) = (case OS.FileSys.readDir (ds) of "" => [] before OS.FileSys.closeDir (ds) | file => file::loop (ds)) val ds = OS.FileSys.openDir (s) in loop (ds) handle e => (OS.FileSys.closeDir (ds); raise (e)) end to list all the files in a given directory. But now, I need to look at the bits in each file. Any suggestions?
0
[ 2, 13, 18, 8184, 15047, 6488, 35, 14, 1142, 662, 800, 3726, 3726, 31, 589, 6314, 20, 11590, 6488, 19, 21, 16755, 568, 13, 18, 8184, 9, 568, 14, 1854, 1963, 1248, 25, 6647, 2010, 47, 31, 376, 20, 11590, 14, 6488, 35, 14, 1142, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Business logic invading UI in a large winforms app === I have seen this theme present itself more than once now. I am hoping that people here who are currently in similar situations or have been in the past can offer some insightful advice. It might be useful if you share your past experiences as well. So there is this huge windows forms application > 100K LOC approx that has been developed over the years. Though the development team has tried to separate business logic from the UI, it hasn’t quite happened and there are numerous areas of the code where the business logic is hard-wired to the UI. In fact remnants of previous attempts to adopt MVP architecture can be seen at a lot of places. There are unit-tests too but with a relatively low degree of code coverage. There are some hot spots however – areas which everyone knows have gotten more complicated that they necessarily need to be. A lot of times bugs which could have possibly been caught earlier are only found once Testers grab their torch lights and really start looking for bugs which is unfortunately too late, expensive, and risky. Engineering, testers and PMs - all realize that something needs to be done. What would be the most practical way to address the situation altogether, or improve the situation? Since it is going to be a long task, what would be the best way to measure the progress towards the goal? How would the goal be defined in objective terms to begin with?
0
[ 2, 508, 7085, 19939, 13, 5661, 19, 21, 370, 628, 4190, 18, 4865, 800, 3726, 3726, 31, 57, 541, 48, 3184, 734, 1145, 91, 119, 382, 130, 9, 31, 589, 3935, 30, 148, 235, 72, 50, 871, 19, 835, 8329, 54, 57, 74, 19, 14, 640, 92, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Automatic method to set the tabindex using form helpers. === Is there an easy way to have the form helpers set the tabindex parameter automatically when using form helpers in Rails? Basically, I don't want to have to manually set the tab index on every form element when building forms (I keep forgetting to update them when I change things). The majority of the forms I write are basically a list of fields. The tab index should be in the order they are defined. Ideally, I would set the initial index in the <code>form_for</code> call and everything else would be handled for me. Does anyone know how to do this?
0
[ 2, 6715, 2109, 20, 309, 14, 6523, 25671, 568, 505, 448, 445, 9, 800, 3726, 3726, 25, 80, 40, 2010, 161, 20, 57, 14, 505, 448, 445, 309, 14, 6523, 25671, 18906, 7499, 76, 568, 505, 448, 445, 19, 2240, 18, 60, 11374, 15, 31, 221...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 perform query filtering in django templates === I need to perform a filtered query from within a django template, to get a set of objects equivalent to python code within a view: queryset = Modelclass.objects.filter(somekey=foo) In my template I would like to do {% for object in data.somekey_set.FILTER %} but I just can't seem to find out how to write FILTER.
0
[ 2, 184, 107, 31, 2985, 25597, 25272, 19, 3857, 14541, 22894, 18, 800, 3726, 3726, 31, 376, 20, 2985, 21, 25090, 25597, 37, 363, 21, 3857, 14541, 22894, 15, 20, 164, 21, 309, 16, 3916, 4602, 20, 20059, 1797, 363, 21, 1418, 45, 2559...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 get the window object that an HTML node belongs to using JavaScript? === Because of several iframes, XUL browser elements, and so forth, I have a number of window objects in my XULRunner application. I'm looking for the best way to find the window object that a specified node belongs to using JavaScript.
0
[ 2, 184, 92, 31, 164, 14, 1463, 3095, 30, 40, 13, 15895, 15421, 7034, 20, 568, 8247, 8741, 60, 800, 3726, 3726, 185, 16, 238, 31, 8361, 18, 15, 993, 1287, 16495, 2065, 15, 17, 86, 5882, 15, 31, 57, 21, 234, 16, 1463, 3916, 19, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you debug SugarCRM problems/learn how SugarCRM works? === I'm in the process of trying to move our company from SalesForce to SugarCRM, but I've run in to a nasty bug (the moment I add a custom field to Accounts, all accounts stop showing up). We've paid for support from the SugarCRM people, but they only have take-forever-then-get-a-worthless-response-level tech support for the open-source version (and we avoid proprietary software like the plague). Oh, and did I mention our Salesforce contract expires at the end of the week? So, long story short, I'm stuck debugging the SugarCRM app myself. I'm an decently experienced programmer, and I have baseline PHP competency, but I don't even know where to being trying to solve this issue. Can any Sugar developers out there recommend any kind of process for debugging Sugar? Are there any resources out there that would help me to understand what the different PHP files do, or how the Sugar system works overall? Just as an example of the sort of thing I'm talking about: I figured out how to get sugar to print stack traces, and by following several I noticed a pattern with all the problem lines involving <pre>$this->_tpl_vars</pre> I'd love to try and figure out why that method call isn't working, but I don't know: A) what `_tpl_vars` is supposed to do<br/> B) where `_tpl_vars` is defined<br/> C) what `$this` is supposed to be<br/> D) where in the framework `$this` gets set<br/> etc. So if anyone can help explain how/where I would start finding answers to these questions, I'd be incredibly grateful.
0
[ 2, 184, 107, 42, 121, 16254, 4200, 6711, 79, 1716, 118, 413, 10818, 184, 4200, 6711, 79, 693, 60, 800, 3726, 3726, 31, 22, 79, 19, 14, 953, 16, 749, 20, 780, 318, 237, 37, 2598, 8774, 20, 4200, 6711, 79, 15, 47, 31, 22, 195, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 manage session variables in a web cluster? === Session variables are normally keept in the web server RAM memory. In a cluster, each request made by a client can be handled by a different cluster node. right?! So, in this case... - What happens with session variables? Aren't they stored in the nodes RAM memory? - How the other nodes will handled my request correctly if it doesn't has my session variables, or at least all of it? - This issue is treated by the web server (Apache, IIS) or by the language runtime (PHP, ASP.NET, Ruby, etc..)?
0
[ 2, 184, 20, 4705, 3723, 12157, 19, 21, 2741, 7460, 60, 800, 3726, 3726, 3723, 12157, 50, 4147, 643, 38, 19, 14, 2741, 8128, 2843, 1912, 9, 19, 21, 7460, 15, 206, 3772, 117, 34, 21, 6819, 92, 44, 9006, 34, 21, 421, 7460, 15421, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Javascript style field methods unpythonic? === I've started to use constructs like these: class DictObj(object): def __init__(self): self.d = {} def __getattr__(self, m): return self.d.get(m, None) def __setattr__(self, m, v): super.__setattr__(self, m, v) class AutoEnum(object): def __init__(self): self.counter = 0 self.d = {} def __getattr__(self, c): if c not in self.d: self.d[c] = self.counter self.counter += 1 return self.d[c] where DictObj is a dictionary that can be accessed via dot notation: d = DictObj() d.something = 'one' The only reason to use this is I find it more aesthetically pleasing than <code>d['something']</code>. AutoEnum is an auto-incrementing Enum, used like this: CMD = AutoEnum() cmds = { "peek": CMD.PEEK, "look": CMD.PEEK, "help": CMD.HELP, "poke": CMD.POKE, "modify": CMD.POKE, } Both are working well for me, but I'm feeling unpythonic about them. Are these in fact bad constructs?
0
[ 2, 8247, 8741, 1034, 575, 3195, 367, 6448, 96, 11151, 60, 800, 3726, 3726, 31, 22, 195, 373, 20, 275, 6960, 18, 101, 158, 45, 718, 13, 4673, 262, 11741, 5, 23793, 6, 45, 6312, 13, 1, 108, 242, 1, 5, 8411, 6, 45, 1119, 9, 43,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
C Shell: How to execute a program with non-command line arguments? === My $SHELL is tcsh. I want to run a c shell script that will call a program many times with some arguments changed each time. The program I need to call is in Fortran; I don't want to edit it. The program only takes arguments once the it is executed, but not on the command line. Upon calling the program in the script the program takes control (this is where I am stuck currently, I can never get out because the script will not execute anything untill after the program process stops), at this point I need to pass it some variables, then after several iterations I will need to ctrl-c out of the program and continue with the script. How?
0
[ 2, 272, 3593, 45, 184, 20, 15644, 21, 625, 29, 538, 8, 16239, 293, 10553, 60, 800, 3726, 3726, 51, 5579, 15984, 25, 13, 6668, 1635, 9, 31, 259, 20, 485, 21, 272, 3593, 3884, 30, 129, 645, 21, 625, 151, 436, 29, 109, 10553, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Which solution is better for storing ASP.Net session variables? StateServer or SQLServer? === **StateServer or SQLServer?** - Which solution is better for storing ASP.Net session variables? - What are the pros and cons of each? - Are one better then other in any particular situation?
0
[ 2, 56, 4295, 25, 574, 26, 25615, 28, 306, 9, 2328, 3723, 12157, 60, 202, 106, 2304, 54, 4444, 255, 10321, 106, 60, 800, 3726, 3726, 13, 1409, 3859, 10321, 106, 54, 4444, 255, 10321, 106, 60, 1409, 13, 8, 56, 4295, 25, 574, 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...
Timer in a win32 service === Can someone please point me to the easiest way to have a timer in a Win32 service? I suppose I could create a dummy window for this purpose or have a second thread do tick counts, but what's best? Is there a more elegant way? Thanks in advance.
0
[ 2, 85, 139, 19, 21, 628, 3125, 365, 800, 3726, 3726, 92, 737, 2247, 454, 55, 20, 14, 27237, 161, 20, 57, 21, 85, 139, 19, 21, 628, 3125, 365, 60, 31, 5787, 31, 110, 1600, 21, 26660, 1463, 26, 48, 2131, 54, 57, 21, 153, 9322,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Need ActiveX control to embed Excel into a dialog === I'm building an "import from Excel" function. It has to be in a DLL, called from a non-MFC app. Has to provide an image of the spreadsheet that users can drag a select box around (to select cells), then click an IMPORT button, and have the right thing happen. Having trouble getting the spreadsheet up, having a button adjacent to it, and having it happen in a DLL. I went the route of an MFC dialog inside a DLL, but was blocked in trying to bring up an OLE client for excel on a window on the dialog. Only support I found for showing Excel using OLE required an SDI. I was able to get the automation functions to work, and I could read the cells and paint a "fake image" of them on my dialog... but I'm afraid that's going to be in non-compliance with my requirements. So I tried creating an SDI. I was able to create an SDI that brought up Excel as an OLE Client. I was able to handle the "selection change" event, and go the cell data I needed. I was foiled at this point by 2 items: 1. Could not make this SDI work in an MFC DLL. Crash in CWinApp constructor, asserting that the AfxGetThread wasn't null. Moved "theApp" to be locally scoped within the single exported DLL function, but still couldn't get it to work, but with different symptoms: crashed when added AFX_MANAGE_STATE(AfxGetStaticModuleState( )); to exported DLL function, if I didn't use that, the OnInitInstance never was entered. Tried adding a call to the app's Run() function, but that didn't help. I can post this code if someone thinks they have an idea what the problem is. 2. Could not present a toolbar while the Excel client item was active. I could put my "import" (and other options) on the menubar at the top, but that's not evident enough. Even a floating toolbar was closed. It makes sense that it would do this, since it would be confusing to have a toolbar present that couldn't take actions on the currently active item... but in my case, it's a problem. So now I'm thinking I need to go back to the dialog approach, and embed an ActiveX control that brings up an excel spreadsheet file to import. Must either allow me to handle the selection change event, or must allow me to find what cells are selected (or were most recently selected if clicking the "import" button on my dialog causes the selected cells to become unselected). It must also come with reasonable licensing terms, as this will be used in a commercial application that is widely-available to the public. If anyone knows of a "quick fix" to either of the approaches I had been trying, that would be useful too. Hope someone can help me!
0
[ 2, 376, 1348, 396, 569, 20, 11911, 69, 20700, 77, 21, 28223, 800, 3726, 3726, 31, 22, 79, 353, 40, 13, 7, 1660, 1993, 37, 20700, 7, 1990, 9, 32, 63, 20, 44, 19, 21, 13, 43, 211, 15, 227, 37, 21, 538, 8, 79, 7061, 4865, 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...
SQL Server Stored Proc Argument Type Conversion === Suppose I have a bunch of varchar(6000) fields in a table and want to change those to text fields. What are the ramifications of the stored procedures whose arguments are of type varchar(6000). Does each stored procedure also need those argument data types changed?
0
[ 2, 4444, 255, 8128, 8214, 13, 15617, 5476, 1001, 6263, 800, 3726, 3726, 5787, 31, 57, 21, 7653, 16, 4033, 5433, 5, 379, 3993, 6, 2861, 19, 21, 859, 17, 259, 20, 753, 273, 20, 1854, 2861, 9, 98, 50, 14, 2843, 4634, 18, 16, 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...
Isn't CSRF a browser security issue? === Regarding CSRF attacks, if cookies are most used authentication method, why do web browsers allow sending cookies of some domain (and to that domain) from a page generated from another domain? Isn't CSRF easily preventable in browser by disallowing such behavior? As far as I know, this kind of security check isn't implemented in web browsers, but I don't understand why. Did I get something wrong? About CSRF: <a href="http://en.wikipedia.org/wiki/Csrf">On wikipedia</a> <a href="http://www.codinghorror.com/blog/archives/001171.html">On coding horror</a>
0
[ 2, 2532, 22, 38, 272, 18, 8291, 21, 16495, 1221, 1513, 60, 800, 3726, 3726, 3467, 272, 18, 8291, 3080, 15, 100, 19396, 50, 127, 147, 27963, 2109, 15, 483, 107, 2741, 16495, 18, 1655, 4907, 19396, 16, 109, 4603, 13, 5, 290, 20, 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...
Distributed Random Number Generation === I was wondering if there is a way for a network of N participants to agree that a number from 1 to M was chosen at random. (e.g. not influenced by any of the participants) This has been solved for values of n=2 and m=2 by the <a href="http://everything2.com/title/Coin%2520tossing%2520protocol">coin tossing protocol</a>. Does anyone know of any solutions that can work for arbitrary values of N and M?
0
[ 2, 4387, 5477, 234, 2782, 800, 3726, 3726, 31, 23, 5712, 100, 80, 25, 21, 161, 26, 21, 982, 16, 13, 103, 5889, 20, 4524, 30, 21, 234, 37, 137, 20, 307, 23, 2519, 35, 5477, 9, 13, 5, 62, 9, 263, 9, 52, 3927, 34, 186, 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...
Do your loops test at the top or bottom? === When I was taking CS in college (mid 80's), one of the ideas that was constantly repeated was to always write loops which test at the top (while...) rather than at the bottom (do ... while) of the loop. These notions were often backed up with references to studies which showed that loops which tested at the top were statistically much more likely to be correct than their bottom-testing counterparts. As a result, I almost always write loops which test at the top. I don't do it if it introduces extra complexity in the code, but that case seems rare. I notice that some programmers tend to almost exclusively write loops that test at the bottom. When I see constructs like: if (condition) { do { ... } while (same condition); } or the inverse (`if` inside the `while`), it makes me wonder if they actually wrote it that way or if they added the `if` statement when they realized the loop didn't handle the null case. I've done some googling, but haven't been able to find any literature on this subject. How do you guys (and gals) write your loops?
0
[ 2, 107, 154, 19661, 1289, 35, 14, 371, 54, 2129, 60, 800, 3726, 3726, 76, 31, 23, 741, 272, 18, 19, 314, 13, 5, 7825, 2972, 22, 18, 6, 15, 53, 16, 14, 3478, 30, 23, 7545, 4251, 23, 20, 550, 2757, 19661, 56, 1289, 35, 14, 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...
Is the Open Source Jalopy Eclipse plugin compatible with Ganymede? === After much searching, I found the download for the [eclipse version of jalopy][1]. Is this compatible with Eclipse 3.4? It's dated 2006. I've copied the extracted folder to my plugins directory and run `eclipse -clean`, but I can't find anything matching 'jalopy' in preferences. If it's not compatible, are there any (free) alternatives? [1]: http://sourceforge.net/project/showfiles.php?group_id=45216
0
[ 2, 25, 14, 368, 1267, 3009, 11362, 93, 11652, 10922, 108, 14961, 29, 7890, 93, 4688, 62, 60, 800, 3726, 3726, 75, 212, 5792, 15, 31, 216, 14, 7121, 26, 14, 636, 3319, 6013, 870, 615, 16, 3009, 11362, 93, 500, 2558, 165, 500, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to programatically detect a browser print event? === Is there a way to do so? So far it seems like no. I am trying to hide some divs before the user prints this giant form, then display the divs again afterward. Thus I want to ignore the rest of the page, and only print the form itself. Sure I *could* open a separate page when the user clicks the print button. The only thing is that the form is really long and it would be quite tedious to do that.
0
[ 2, 184, 20, 625, 721, 8438, 9092, 21, 16495, 4793, 807, 60, 800, 3726, 3726, 25, 80, 21, 161, 20, 107, 86, 60, 86, 463, 32, 2206, 101, 90, 9, 31, 589, 749, 20, 3077, 109, 13, 12916, 18, 115, 14, 4155, 12202, 48, 3558, 505, 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 this a bug in gdb ? Does someone know how to fix it ? === I am currently running gdb version 6.7.1 on Ubuntu Linux, and working in a C++ project. Surprisingly I was trying to debug a constructor and I have found that local variables declared within the scope of the constructor are not followed or noticed by gdb. Is this a bug ? Thanks for any information ..
0
[ 2, 25, 48, 21, 6256, 19, 489, 9007, 13, 60, 630, 737, 143, 184, 20, 6098, 32, 13, 60, 800, 3726, 3726, 31, 589, 871, 946, 489, 9007, 615, 400, 9, 465, 9, 165, 27, 287, 12968, 2473, 13024, 15, 17, 638, 19, 21, 272, 20512, 669...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Appending to an array variable in a parent class in PHP === How do I extend my parent's options array for child classes in PHP? I have something like this: class ParentClass { public $options = array( 'option1'=>'setting1' ); //The rest of the functions would follow } I would like to append to that options array in a child class without erasing any of the parent options. I've tried doing something like this, but haven't quite got it to work yet: class ChildClass extends ParentClass { public $options = parent::options + array( 'option2'=>'setting2' ); //The rest of the functions would follow } What would be the best way to do something like this?
0
[ 2, 4865, 7601, 20, 40, 7718, 7612, 19, 21, 4766, 718, 19, 13, 26120, 800, 3726, 3726, 184, 107, 31, 7206, 51, 4766, 22, 18, 6368, 7718, 26, 850, 2684, 19, 13, 26120, 60, 31, 57, 301, 101, 48, 45, 718, 4766, 1898, 13, 1, 317, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
QuickBooks Item Query help needed. === I'm sure this is going to be a long shot, but I need help with a query involving QuickBooks Items. I need to query for all QuickBooks Items that are linked to an Income account. Is there an easy way to do this, or do I need to make 2 queries (one for items ans one for accounts) and then check the account reference? albeit not much, I have this: <pre> <code> IItemQuery query = MsgSetRequest.AppendItemQueryRq(); </code> </pre> any ideas would be appreciated. Thanks.
0
[ 2, 2231, 13828, 9101, 25597, 448, 851, 9, 800, 3726, 3726, 31, 22, 79, 562, 48, 25, 228, 20, 44, 21, 175, 999, 15, 47, 31, 376, 448, 29, 21, 25597, 4838, 2231, 13828, 3755, 9, 31, 376, 20, 25597, 26, 65, 2231, 13828, 3755, 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...
Infinite loops - top or bottom? === In the spirit of questions like <a href="http://stackoverflow.com/questions/224059/do-your-loops-test-at-the-top-or-bottom">Do your loops test at the top or bottom?</a>: Which style do you use for an *infinite* loop, and why? - while (true) { } - do { } while (true); - for (;;) { } - label: ... goto label;
0
[ 2, 9698, 19661, 13, 8, 371, 54, 2129, 60, 800, 3726, 3726, 19, 14, 2659, 16, 2346, 101, 13, 1, 58, 746, 14057, 3726, 7, 21127, 6903, 25325, 2549, 9990, 9, 960, 118, 24652, 18, 15718, 10609, 3902, 118, 537, 8, 4314, 8, 18786, 18,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
When Clearing an ObservableCollection, There are No Items in e.OldItems === I have something here that is really catching me off guard. I have an ObservableCollection of T that is filled with items. I also have an event handler attached to the CollectionChanged event. When you **Clear** the collection it causes an CollectionChanged event with e.Action set to NotifyCollectionChangedAction.Reset. Ok, that's normal. But what is weird is that neither e.OldItems or e.NewItems has anything in it. **I would expect e.OldItems to be filled with all items that were removed from the collection.** Has anyone else seen this? Some background: I am using the CollectionChanged event to attach and detach from another event and thus if I don't get any items in e.OldItems ... I won't be able to detach from that event. Below is the sample code if you wish to reproduce it yourself. First off the xaml: <Window x:Class="ObservableCollection.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300" > <StackPanel> <Button x:Name="addButton" Content="Add" Width="100" Height="25" Margin="10" Click="addButton_Click"/> <Button x:Name="moveButton" Content="Move" Width="100" Height="25" Margin="10" Click="moveButton_Click"/> <Button x:Name="removeButton" Content="Remove" Width="100" Height="25" Margin="10" Click="removeButton_Click"/> <Button x:Name="replaceButton" Content="Replace" Width="100" Height="25" Margin="10" Click="replaceButton_Click"/> <Button x:Name="resetButton" Content="Reset" Width="100" Height="25" Margin="10" Click="resetButton_Click"/> </StackPanel> </Window> Next, the code behind: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using System.Collections.ObjectModel; namespace ObservableCollection { /// <summary> /// Interaction logic for Window1.xaml /// </summary> public partial class Window1 : Window { public Window1() { InitializeComponent(); _integerObservableCollection.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(_integerObservableCollection_CollectionChanged); } private void _integerObservableCollection_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { switch (e.Action) { case System.Collections.Specialized.NotifyCollectionChangedAction.Add: break; case System.Collections.Specialized.NotifyCollectionChangedAction.Move: break; case System.Collections.Specialized.NotifyCollectionChangedAction.Remove: break; case System.Collections.Specialized.NotifyCollectionChangedAction.Replace: break; case System.Collections.Specialized.NotifyCollectionChangedAction.Reset: break; default: break; } } private void addButton_Click(object sender, RoutedEventArgs e) { _integerObservableCollection.Add(25); } private void moveButton_Click(object sender, RoutedEventArgs e) { _integerObservableCollection.Move(0, 19); } private void removeButton_Click(object sender, RoutedEventArgs e) { _integerObservableCollection.RemoveAt(0); } private void replaceButton_Click(object sender, RoutedEventArgs e) { _integerObservableCollection[0] = 50; } private void resetButton_Click(object sender, RoutedEventArgs e) { _integerObservableCollection.Clear(); } private ObservableCollection<int> _integerObservableCollection = new ObservableCollection<int> { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }; } }
0
[ 2, 76, 8130, 40, 5122, 10321, 579, 15015, 872, 15, 80, 50, 90, 3755, 19, 13, 62, 9, 1218, 2119, 79, 18, 800, 3726, 3726, 31, 57, 301, 235, 30, 25, 510, 9436, 55, 168, 1611, 9, 31, 57, 40, 5122, 10321, 579, 15015, 872, 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...
Formula based pricing. Storage in RDBMS and use in application layer. === I'm about to enter the 1st phases of designing a commodities trading application. A major function of this application is the capture and evaluation of pricing information. Pricing in this market is not fixed. It is usually a market benchmark +/- a premium. For example: (A and B are market benchmarks) - Price = A + $1 - Price = A + .5(A-B) The final price of the deal is calculated using the pricing formula applied over an agreed time. For example; The final price might be the average of A + $1 over the week prior and week subsequent to loading the commodity. At present the traders are capturing this detail in Excel which allows them the flexibility to setup the formulas required, but this information never makes it into our accounting systems and the spreadsheets are not connected to live predictions of the market benchmarks making price forecasting a manual and slow task. **I'm looking for input as to what tools / techniques I can use to enter, store and evaluate formulas in an application.** We will be using SQL Server or Oracle as the database and the client platform is not fixed yet, but you can assume WinForms/WPF, ASP.NET or a Java webapp. I know this is a pretty broad question, but we're not far enough along to be more specific as to what technologies will be used. Thanks
0
[ 2, 3729, 432, 24318, 9, 4326, 19, 13, 897, 13178, 18, 17, 275, 19, 3010, 5385, 9, 800, 3726, 3726, 31, 22, 79, 88, 20, 2830, 14, 137, 384, 14795, 16, 15026, 21, 24181, 5205, 3010, 9, 21, 394, 1990, 16, 48, 3010, 25, 14, 3683, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Capturing R6025 pure virtual call === I currently caputre MiniDumps of unhandled exceptions using <Code>SetUnhandledExceptionFilter</Code> however at times I am getting "R6025: pure virtual function". I understand how a pure virtual function call happens I am just wondering if it is possible to capture them so I can create a MiniDump at that point.
0
[ 2, 12859, 761, 3374, 1811, 4267, 6599, 645, 800, 3726, 3726, 31, 871, 2605, 1982, 99, 4236, 43, 11134, 18, 16, 367, 3203, 1294, 13392, 568, 13, 1, 9375, 1, 3554, 1020, 3203, 1294, 10066, 872, 11924, 815, 1, 118, 9375, 1, 207, 35, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 PHP variables on multiple pages === Is it possible to use a variable from one page in a piece of code on another? e.g. submit a form on one page and on the second page use a PHP script to add the data from the form to a MySQL table Thanks for all the help
0
[ 2, 568, 13, 26120, 12157, 27, 1886, 4434, 800, 3726, 3726, 25, 32, 938, 20, 275, 21, 7612, 37, 53, 2478, 19, 21, 1855, 16, 1797, 27, 226, 60, 13, 62, 9, 263, 9, 12298, 21, 505, 27, 53, 2478, 17, 27, 14, 153, 2478, 275, 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...
.NET - Microsoft.Office.Interop.Excel and Interop.Excel DLL === When I add a reference to **Microsoft.Office.Interop.Excel** on my computer, Visual Studio adds this to the project file: <COMReference Include="Excel"> <Guid>{00020813-0000-0000-C000-000000000046}</Guid> <VersionMajor>1</VersionMajor> <VersionMinor>5</VersionMinor> <Lcid>0</Lcid> <WrapperTool>primary</WrapperTool> <Isolated>False</Isolated> </COMReference> There is another developer on the team who says this creates errors. He needs to add a DLL file to the project called Interop.Excel.dll, and replaces the code above with this in the project file: <Reference Include="Interop.Excel, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>My Project\Interop.Excel.dll</HintPath> </Reference> This does work on my computer. Could you please explain the differences between the two methods, which is best, and how to get the first one working on other computers? Thanks!
0
[ 2, 13, 9, 2328, 13, 8, 7099, 9, 17047, 9, 6280, 2594, 9, 1706, 11040, 17, 1480, 2594, 9, 1706, 11040, 13, 43, 211, 800, 3726, 3726, 76, 31, 3547, 21, 2801, 20, 13, 1409, 22019, 12980, 9, 17047, 9, 6280, 2594, 9, 1706, 11040, 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 update a column value incrementally === I'm experimenting with a personal finance application, and I'm thinking about what approach to take to update running balances when entering a transaction in an account. Currently the way I'm using involves retrieving all records more recent than the inserted/modified one, and go one by one incrementing their running balance. For example, given the following transactions: t1 date = 2008-10-21, amount = 500, running balance = 1000 t2 date = 2008-10-22, amount = 300, running balance = 1300 t3 date = 2008-10-23, amount = 100, running balance = 1400 ... Now suppose I insert a transaction between t1 and t2, then t2 and all subsequent transactions would need their running balances adjusted. Hehe, now that I wrote this question, I think I know the answer... so I'll leave it here in case it helps someone else (or maybe there's even a better approach?) First, I get the running balance from the previous transaction, in this case, t1. Then I update all following transactions (which would include the new one): UPDATE transactions SET running_balance = running_balance + <AMOUNT> WHERE date > <t1.date> The only issue I see is that now instead of storing only a date, I'll have to store a time too. Although, what would happen if two transactions had the exact same date/time? PS: I'd prefer solutions not involving propietary features, as I'm using both PostgreSQL and SQLite... Although a Postgre-only solution would be helpful too.
0
[ 2, 184, 20, 11100, 21, 4698, 1923, 29977, 102, 800, 3726, 3726, 31, 22, 79, 5737, 68, 29, 21, 1319, 3711, 3010, 15, 17, 31, 22, 79, 1440, 88, 98, 2141, 20, 247, 20, 11100, 946, 4468, 18, 76, 4604, 21, 12799, 19, 40, 2176, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why use infinite loops? === Another poster asked about preferred syntax for infinite loops. A follow-up question: <i>Why</i> do you use infinite loops in your code? I typically see a construct like this: for (;;) { int scoped_variable = getSomeValue(); if (scoped_variable == some_value) { break; } } Which lets you get around not being able to see the value of scoped_variable in the `for` or `while` clause. What are some other uses for "infinite" loops?
0
[ 2, 483, 275, 9698, 19661, 60, 800, 3726, 3726, 226, 13021, 411, 88, 5981, 22649, 26, 9698, 19661, 9, 21, 1740, 8, 576, 1301, 45, 13, 1, 49, 1, 2256, 1, 118, 49, 1, 107, 42, 275, 9698, 19661, 19, 154, 1797, 60, 31, 2442, 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...
Create An Application Without A Window === How to program a C/C++ application that could run without opening a window or command line?
0
[ 2, 1600, 40, 3010, 366, 21, 1463, 800, 3726, 3726, 184, 20, 625, 21, 272, 118, 150, 20512, 3010, 30, 110, 485, 366, 1214, 21, 1463, 54, 1202, 293, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
What is the "cost" of reflection? === I am currently in a programming mentality that Reflection is my best friend. I use it a lot for dynamic loading of content that allows "loose implementation" rather than strict interfaces, as well as a lot of custom attributes. The question I have is, what is the "real" cost to using reflection? Is it worth the effort for frequently reflected types to have cached reflection, such as our own pre-Linq DAL object code on all the properties to table definitions? Would the caching memory footprint outwieght the reflection cpu usage? Thanks!
0
[ 2, 98, 25, 14, 13, 7, 15155, 7, 16, 9138, 60, 800, 3726, 3726, 31, 589, 871, 19, 21, 3143, 3584, 856, 30, 9138, 25, 51, 246, 860, 9, 31, 275, 32, 21, 865, 26, 7782, 12797, 16, 2331, 30, 2965, 13, 7, 1415, 6641, 6123, 7, 86...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a way to check if an istream was opened in binary mode? === I'm using an istream which could be stringstream, ifstream or a user-defined stream type and I need to know if, in the case of an ifstream, it was not opened in binary mode (so I can throw an exception). I have tried the following method: if ((_is.flags() & ios::binary) == 0) throw exception(...) but no exception is ever thrown. The test fails in this case because _is.flags() returns 0x201 and ios::binary is 0x20. Is there a way to find out if a stream was opened in text mode?
0
[ 2, 25, 80, 21, 161, 20, 2631, 100, 40, 31, 11260, 23, 520, 19, 14171, 3740, 60, 800, 3726, 3726, 31, 22, 79, 568, 40, 31, 11260, 56, 110, 44, 3724, 11260, 15, 100, 11260, 54, 21, 4155, 8, 13439, 3766, 1001, 17, 31, 376, 20, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Building websites that will be localized === Does anyone have some guidelines or links to articles when designing a website that needs to be localized in 20+ lanaguages? The initial translation isn't so much the problem, rather ongoing maintenance (i.e. when an update is made on the English site, how are people notified that new translations are required). Thanks in advance!
0
[ 2, 353, 13931, 30, 129, 44, 24821, 800, 3726, 3726, 630, 1276, 57, 109, 12629, 54, 6271, 20, 3376, 76, 15026, 21, 2271, 30, 2274, 20, 44, 24821, 19, 434, 2430, 6178, 13438, 5133, 60, 14, 2104, 4064, 2532, 22, 38, 86, 212, 14, 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...
Adding new line in string in C# === I am having a string of this kind "fkdfdsfdflkdkfk@dfsdfjk72388389@kdkfkdfkkl@jkdjkfjd@jjjk@" I need to add a new line after at every occurence of @ symbol in the string. My Output should be like this fkdfdsfdflkdkfk@ dfsdfjk72388389@ kdkfkdfkkl@ jkdjkfjd@ jjjk@ Please let me know how to do this in C#.
0
[ 2, 4721, 78, 293, 19, 3724, 19, 272, 5910, 800, 3726, 3726, 31, 589, 452, 21, 3724, 16, 48, 825, 13, 7, 410, 197, 8736, 43, 18, 410, 8736, 9093, 43, 197, 410, 197, 1, 8736, 18, 8736, 16455, 4009, 3665, 4736, 3877, 1, 197, 43, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What's the best way to write a short[] array to a file in C#? === I have an array of shorts (short[]) that I need to write out to a file. What's the quickest way to do this?
0
[ 2, 98, 22, 18, 14, 246, 161, 20, 2757, 21, 502, 2558, 500, 7718, 20, 21, 3893, 19, 272, 5910, 60, 800, 3726, 3726, 31, 57, 40, 7718, 16, 12789, 13, 5, 10849, 2558, 500, 6, 30, 31, 376, 20, 2757, 70, 20, 21, 3893, 9, 98, 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, 0, 0, 0, 0, 0, 0...
What is the difference between iPod touch and iPod touch 2nd generation? === When submitting an app to the app store what is the real difference between iPod Touch and iPod Touch 2nd generation?
0
[ 2, 98, 25, 14, 2841, 128, 31, 10670, 1723, 17, 31, 10670, 1723, 172, 706, 2782, 60, 800, 3726, 3726, 76, 28848, 40, 4865, 20, 14, 4865, 1718, 98, 25, 14, 683, 2841, 128, 31, 10670, 1723, 17, 31, 10670, 1723, 172, 706, 2782, 60, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Change order of XML using XDocument === I want to change the order of XML using XDocument <root> <one>1</one> <two>2</two> </root> I want to change the order so that <two>2</two> appears before <one>1</one>. Is this capability baked in or do I have to do it myself. For example, remove <two> then AddBeforeSelf()? Thanks
0
[ 2, 753, 389, 16, 23504, 568, 993, 28132, 800, 3726, 3726, 31, 259, 20, 753, 14, 389, 16, 23504, 568, 993, 28132, 13, 1, 14032, 1, 13, 1, 849, 1, 165, 1, 118, 849, 1, 13, 1, 3734, 1, 135, 1, 118, 3734, 1, 13, 1, 118, 14032,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can I use selectRowAtIndexPath (or anything else) on a UITableView to trigger delegated didSelectRowAtIndexPath method? === I have a UITableView set up as a navigation controller type deal (like the default in xcode). I have added an "Add" button which adds an element to the UITableView. When I call selectRowAtIndexPath on this new row I just added, it will highlight the row, but the next view is not pushed onto the stack. I assume this is because selectRowAtIndexPath does not trigger the didSelectRowAtIndexPath. Is there a way to push the next view onto the stack programmatically?
0
[ 2, 92, 31, 275, 5407, 5417, 721, 25671, 8353, 13, 5, 248, 602, 962, 6, 27, 21, 13, 11193, 579, 4725, 20, 7286, 11300, 43, 144, 18, 25538, 12801, 25671, 8353, 2109, 60, 800, 3726, 3726, 31, 57, 21, 13, 11193, 579, 4725, 309, 71, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why are there multiple different hashing algorithm providers in System.Security.Cryptopgraphy? === As documented by the MSDN [here][1], there are several providers for many of the different hashing algorithms (e.g. MD5, SHA, RIPE). For each of the algorithms, any available implementation seems to fall into 1 of 3 categories: - [Algo]**Cng** - [Algo]**CryptoServiceProvider** - [Algo]**Managed** Why are their multiple implementations of any of these hashing algorithms? What are the differences between the implementations? What are the practical differences when choosing which implementation to utilize in an application? References: [http://msdn.microsoft.com/en-us/library/system.security.cryptography.aspx][1] [1]: http://msdn.microsoft.com/en-us/library/system.security.cryptography.aspx
0
[ 2, 483, 50, 80, 1886, 421, 19170, 68, 9083, 13488, 19, 329, 9, 17749, 9, 11435, 2594, 15438, 60, 800, 3726, 3726, 28, 8926, 34, 14, 4235, 43, 103, 636, 6836, 500, 2558, 165, 500, 15, 80, 50, 238, 13488, 26, 151, 16, 14, 421, 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...
jQuery datepicker - Restrict dates from server side (ASP.NET) === I have a jQuery datepicker that I want to restrict non work days - weekends, public holidays etc. I have seen examples on how to do this from the client side (javascript), but is there a way to restrict the dates from server side ASP.NET code? I figure you could do using Page.RegisterClientScriptBlock, but was wondering is there a neater way?
0
[ 2, 487, 8190, 93, 1231, 16855, 106, 13, 8, 15436, 4076, 37, 8128, 270, 13, 5, 472, 306, 9, 2328, 6, 800, 3726, 3726, 31, 57, 21, 487, 8190, 93, 1231, 16855, 106, 30, 31, 259, 20, 15436, 538, 170, 509, 13, 8, 16303, 15, 317, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 count of duplicated values and join the table to retrieve each value's name? === I have two tables, one that contains volunteers, and one that contains venues. **Volunteers are assigned one venue each**. The id of the venues table (venues.id) is placed within the volunteers table in the venue_id column (volunteers.venue_id). I know I could get a count of how many matching values are in the volunteers.venue_id column by SELECT venue_id, COUNT(*) FROM volunteers GROUP BY venue_id Why I want to do this: so the user can go in and see how many volunteers are assigned to each venue. table: volunteers -- columns: id, name, venue_id table: venues -- columns: id, venue_name volunteers.venue_id = venues.id I know this would be a join statement of some sort so it will get a count of each venue, then match up volunteers.venue_id to venues.id and print out the venues.venue_name along with the count. How would I go about joining the two tables to print out the venue name and next to it, list the count of each volunteer with that venue_id?
0
[ 2, 184, 107, 31, 164, 2468, 16, 19429, 43, 4070, 17, 1865, 14, 859, 20, 11917, 206, 1923, 22, 18, 204, 60, 800, 3726, 3726, 31, 57, 81, 7484, 15, 53, 30, 1588, 6592, 15, 17, 53, 30, 1588, 9771, 9, 13, 1409, 16261, 103, 591, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
In Ruby on Rails, how do I make a polymorphic model associate to a namespaced model? === I have the following models. # app/models/domain/domain_object.rb class Domain::DomainObject < ActiveRecord::Base has_many :links_from, :class_name => "Link", :as => :from, :dependent => :destroy end # app/models/link.rb class Link < ActiveRecord::Base belongs_to :from, :polymorphic => true belongs_to :object_value, :polymorphic => true end Problem is, when I do the following, the from_type doesn't prefix the Domain namespace to the model e.g. Domain::DomainObject.all(:include=> :links_from ) That causes the following SELECT: SELECT `links`.* FROM `links` WHERE (`links`.`from_id` IN (5,6,12,13,18,24,25,27,29,30,31,32,34,35,39) and `links`.`from_type` = 'DomainObject') The query should be: SELECT `links`.* FROM `links` WHERE (`links`.`from_id` IN (5,6,12,13,18,24,25,27,29,30,31,32,34,35,39) and `links`.`from_type` = 'Domain::DomainObject') because Rails automatically saves the model with the namespace. I've seen a few recommendations on Rails sites about doing something like this: belongs_to :from, :polymorphic => true, :class_name => "Domain::DomainObject" However, that doesn't appear to work either. So, is there a better way to do this? Or is this not supported?
0
[ 2, 19, 10811, 27, 2240, 18, 15, 184, 107, 31, 233, 21, 3446, 12498, 596, 1061, 4169, 20, 21, 1817, 15265, 1061, 60, 800, 3726, 3726, 31, 57, 14, 249, 2761, 9, 6926, 4865, 118, 13998, 18, 118, 537, 6232, 118, 537, 6232, 1, 23793,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Are there benefits to a case sensitive database? === We have just 'migrated' an SQL Server 2005 database from DEVEL into TEST. Somehow during the migration process the DB was changed from case insensitive to sensitive - so most SQL queries broke spectacularly. What I would like to know, is - are there any clear benefits to having a case sensitive schema? NOTE: By this I mean table names, column names, stored proc names etc. I am NOT referring to the actually data being stored in the tables. At first inspection, I cannot find a valid reason that offers benefits over case insensitivity.
0
[ 2, 50, 80, 5800, 20, 21, 610, 7830, 6018, 60, 800, 3726, 3726, 95, 57, 114, 13, 22, 10183, 7432, 22, 40, 4444, 255, 8128, 812, 6018, 37, 121, 6532, 77, 1289, 9, 3625, 112, 14, 8443, 953, 14, 13, 9007, 23, 1015, 37, 610, 19, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Exporting an MS Excel 2003 workbook to PDF via VBA === I have an Excel 2003 workbook that contains a macro to copy certain of its sheets across to a new workbook, then save and close the new workbook. It does this several dozen times, with slightly different sheet selections each time. I would like to add an extra step to the macro to export the secondary workbooks' spreadsheets to PDF. The obvious way to do this would be to use a PDF printer and Excel's built in Print function, but most PDF printers give you a "Save As..." dialogue box before they finish. Obviously, typing this in individually for seventy-odd occasions lacks appeal - so I'd like something that allows me to set it ahead of time (probably "Use the filename of the file I'm printing minus its extension") then just select the default options. Any ideas for a free PDF printer that does this? Or a suitable alternative?
0
[ 2, 7487, 68, 40, 4235, 20700, 973, 170, 5199, 20, 13, 11124, 1197, 566, 969, 800, 3726, 3726, 31, 57, 40, 20700, 973, 170, 5199, 30, 1588, 21, 9069, 20, 4344, 1200, 16, 82, 8801, 464, 20, 21, 78, 170, 5199, 15, 94, 2079, 17, 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...
Java EAR File Deployment : Could not find physical destination : null === Anyone know what does this mean exactly? And how to resolve it? ]: Exception in creating message-driven bean container: [com.sun.enterprise.connectors.ConnectorRuntimeException: Could not find physical destination : null]|#] [#|2008-10-22T01:03:08.460+0800|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.ejb.mdb|_ThreadID=13;|com.sun.enterprise.connectors.ConnectorRuntimeException com.sun.enterprise.connectors.ConnectorRuntimeException: Could not find physical destination : null
1
[ 2, 8247, 2330, 3893, 10475, 13, 45, 110, 52, 477, 1825, 6970, 13, 45, 16203, 800, 3726, 3726, 1276, 143, 98, 630, 48, 884, 1890, 60, 17, 184, 20, 9854, 32, 60, 13, 500, 45, 5391, 19, 2936, 2802, 8, 14489, 15322, 12147, 45, 636, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Web Development Tools Question - Automatic File Upload === This should a quick question for some easy rep. I'm doing some PHP Website development, decided to check out and play around with jQuery as well. I don't want to install and manage a local PHP server/service, but I would like a quick one click method for automatically uploading the PHP file I'm working on to my hosting service so I can test it live. I'm looking into some different editors like Komodo Edit, Notepad++ but I'm wondering what tool has the ability to one click FTP for me? Thanks in advance, Chris
0
[ 2, 2741, 522, 4672, 1301, 13, 8, 6715, 3893, 71, 8294, 800, 3726, 3726, 48, 378, 21, 2231, 1301, 26, 109, 2010, 9411, 9, 31, 22, 79, 845, 109, 13, 26120, 2271, 522, 15, 868, 20, 2631, 70, 17, 418, 140, 29, 487, 8190, 93, 28, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
United States State shapes for Office === I want to create visuals along the lines of CNN's "red-state, blue-state" shadings of the states in the U.S. for my project. I'm planning to do something fancier than just shading the state's shape in a color. Are there open source libraries of state shapes/polygons (or - if not open source - others) that I can import into Word, Excel, etc. that I can use to show complicated graphs based on states? I have Map Point, but haven't been able to figure out how to shade the states in a complex way.
0
[ 2, 181, 202, 146, 12129, 26, 488, 800, 3726, 3726, 31, 259, 20, 1600, 3458, 18, 303, 14, 1560, 16, 14429, 22, 18, 13, 7, 2095, 8, 3859, 15, 705, 8, 3859, 7, 17363, 68, 18, 16, 14, 202, 19, 14, 287, 9, 18, 9, 26, 51, 669, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Alternatives to a wizard === I'm making a program that fits the wizard concept ideally; the user is walked through the steps to create a character for a game. However, I'm realizing that the limitations of the wizard are making it difficult to design "elegant" logic flow. For example, because all pages of the wizard are initalized at the same time, I can't have the values entered in one page available to the next one. I have to put a button on each page to get the values from a previous page rather than simply having fields auto-populated. I've thought about alternatives to using the wizard. I think the best idea is to have some buttons on one panel that change the information on another panel, e.g. a splitter window. However, I can't find any documentation in wxPython on how to dynamically change the panel. Everything I've found so far is really pretty static, hence the use of the wizard. Even the "wxPython in Action" book doesn't mention it. Are there any tutorials for making "dynamic panels" or better management of a wizard?
0
[ 2, 2676, 18, 20, 21, 10276, 800, 3726, 3726, 31, 22, 79, 544, 21, 625, 30, 2742, 18, 14, 10276, 2420, 5628, 102, 73, 14, 4155, 25, 1067, 120, 14, 2382, 20, 1600, 21, 925, 26, 21, 250, 9, 207, 15, 31, 22, 79, 9308, 30, 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...
I just need my DTS to survise which edition of SQL Server 2005 should I buy? === I heard about SSIS a new replacement of the old DTS I believe it got the same functionality which I used to perform; now like any other product from Microsoft you got mess up with 10 different choice for a single package. I would like to get your opinion of which edition of sql server 2005 should I buy to ensure that I can replicate data between my host server and the local data store just the way DTS work?
0
[ 2, 31, 114, 376, 51, 13, 43, 38, 18, 20, 3645, 3762, 62, 56, 1322, 16, 4444, 255, 8128, 812, 378, 31, 3034, 60, 800, 3726, 3726, 31, 752, 88, 13, 18, 4557, 21, 78, 4610, 16, 14, 315, 13, 43, 38, 18, 31, 985, 32, 330, 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 there a "right" way to do inheritance in JavaScript? If so, what is it? === I have been trying to learn how to add testing to existing code -- currently reading reading [Working Effectively With Legacy Code][1]. I have been trying to apply some of the principles in JavaScript, and now I'm trying to extract an interface. In searching for creating interfaces in JavaScript, I can't find a lot -- and what I find about inheritance seems like their are several different ways. (Some people create their own base classes to provide helpful methods to make it easier to do inheritance, some use functions, some use prototypes). What's the right way? Got a simple example for extracting an interface in JavaScript? [1]: http://www.amazon.com/Working-Effectively-Legacy-Robert-Martin/dp/0131177052
0
[ 2, 25, 80, 21, 13, 7, 4183, 7, 161, 20, 107, 13852, 19, 8247, 8741, 60, 100, 86, 15, 98, 25, 32, 60, 800, 3726, 3726, 31, 57, 74, 749, 20, 2484, 184, 20, 3547, 4431, 20, 3149, 1797, 13, 8, 8, 871, 1876, 1876, 636, 14120, 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...
Why does my floated <input> control in a floated element in IE7 slide over to the right when it doesn't in Firefox? === Hopefully a picture is worth a thousand lines of code because I don't want to have to strip down all of the ASP.Net code, HTML, JavaScript, and CSS to provide an example (but I'll supply what I can upon request if someone doesn't say "Oh, I've seen that before! Try this..."). Here is a portion of a page being displayed in Firefox: ![alt text][1] The blue boxes are temporary stylings of a `<label>` tag and the orange lines are temporary border styles of the `<div>` tags. The `<label>`'s are styled to `float: left` as are the `<div`'s on the right. In addition, the descendant controls of the `<div>` are also `float:left` purely so they will line up on the top of the `<div>` (since there are some taller controls like multiline textboxes down below). The radio buttons are generated by an ASP control, so they are wrapped in a `<span>` - also floated left since it is a descendant of the `<div>`. Here is the same portion of the screen rendered in IE7: ![alt text][2] There are a few minor rendering differences, but the big one that's driving me crazy is the extra white space beside the `<input>` controls! Note that the `<span>`'s around the radio buttons and checkboxes line up correctly. As far as I can tell, IE genuinely thinks the textboxes are floated as far left as they can. If I set a `margin-left: -2em` on the descendant controls, the `<span>`'s slide over to the left, but the textboxes don't move at all. Although they aren't shown, the same thing happens with drop-down lists and list boxes. I've tried several of the IE7 workarounds for box issues and I've edited the CSS until I'm in pure voodoo mode (i.e., making random changes hoping something works). Like I said, I hope someone will look at this and say, "I've seen that before! Try this..." Anyone? [1]: http://farm4.static.flickr.com/3191/2963487384_2c996e0bb6_o.png [2]: http://farm4.static.flickr.com/3272/2963487410_1dc4acd4b9_o.png
0
[ 2, 483, 630, 51, 15400, 13, 1, 108, 4881, 1, 569, 19, 21, 15400, 4520, 19, 13, 660, 465, 6464, 84, 20, 14, 193, 76, 32, 1437, 22, 38, 19, 535, 18219, 60, 800, 3726, 3726, 13416, 21, 2151, 25, 2715, 21, 2996, 1560, 16, 1797, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Open Source Competition or Collaboration === I always have found the open source space interesting but have never actually participated in any projects. I recently had what I thought was a great a idea that was different from other projects I had seen in the area (in case it matters it was a .NET DI framework). My question is if I have a funky idea should I join an existing project and share my ideas or create a competing project with exactly what I want. There are a few projects in the space the are similar to what I was thinking but they don't quite capture the same ideals.
0
[ 2, 368, 1267, 1076, 54, 4004, 800, 3726, 3726, 31, 550, 57, 216, 14, 368, 1267, 726, 4883, 47, 57, 243, 1121, 2471, 19, 186, 2314, 9, 31, 1989, 41, 98, 31, 289, 23, 21, 374, 21, 882, 30, 23, 421, 37, 89, 2314, 31, 41, 541, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 delete a record in linq === What is the best way to delete a database record using LINQ when I have the primary key? I have been selecting the record then deleting it but that seems really inefficient.
0
[ 2, 184, 20, 27448, 21, 571, 19, 6294, 1251, 800, 3726, 3726, 98, 25, 14, 246, 161, 20, 27448, 21, 6018, 571, 568, 6294, 1251, 76, 31, 57, 14, 1256, 1246, 60, 31, 57, 74, 20764, 14, 571, 94, 121, 1336, 68, 32, 47, 30, 2206, 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...
What is the lowest SQL 2K5 edition support SSIS? === thanks in advance.
0
[ 2, 98, 25, 14, 6543, 4444, 255, 172, 197, 264, 1322, 555, 13, 18, 4557, 60, 800, 3726, 3726, 3669, 19, 3612, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 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, 0, 0...
Handling unconventional source directory for a web project in maven === I've inherited a web project (Servlets) which is currently build inside eclipse. I want to add maven around it. But the project's source directory is not following the maven convention. Instead of being inside src/main/java, it's src/package/name/... I don't want to change anything right now because they are working at full speed towards a milestone. Can I configure maven to accept src/ as the java source directory ? Thanks
0
[ 2, 7988, 25769, 1267, 16755, 26, 21, 2741, 669, 19, 1216, 3124, 800, 3726, 3726, 31, 22, 195, 7179, 21, 2741, 669, 13, 5, 10321, 11045, 6, 56, 25, 871, 1895, 572, 11652, 9, 31, 259, 20, 3547, 1216, 3124, 140, 32, 9, 47, 14, 66...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Any issues running a daemon via XSP2? === We want to run a daemon that exposes itself via ASMX, using Mono 2.0 (or later). Instead of dealing with the ASP.NET hosting APIs, we're thinking about just starting a daemon thread in the Application_Start event. XSP2 shouldn't restart the appdomain, so our daemon will be safe. Are there any downsides to this (besides being a bit odd)? Any other approaches that allow us to have our code running in the same appdomain as the ASMX requests?
0
[ 2, 186, 1549, 946, 21, 13127, 1197, 993, 3401, 135, 60, 800, 3726, 3726, 95, 259, 20, 485, 21, 13127, 30, 13833, 18, 1145, 1197, 28, 79, 396, 15, 568, 4129, 172, 9, 387, 13, 5, 248, 138, 6, 9, 700, 16, 5746, 29, 14, 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...
What does __FILE__ mean in Ruby? === I see this all the time in ruby: require File.dirname(__FILE__) + "/../../config/environment" What I am wondering is what does the \_\_File\_\_ mean?
0
[ 2, 98, 630, 13, 1, 16877, 1, 884, 19, 10811, 60, 800, 3726, 3726, 31, 196, 48, 65, 14, 85, 19, 10811, 45, 4077, 3893, 9, 9035, 7259, 5, 1, 16877, 1, 6, 2754, 13, 7, 118, 9, 9, 118, 9, 9, 118, 14093, 2816, 118, 28976, 7, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
Best source control package === Within the last year I have become addicted to subversion. I am an only developer and I also work on a few of my own projects. With SVN its really easy to manage everything - and because it is hosted on an online server though HTTPS I can access my code from anywhere. It also is great for deploying code to our production/development servers. My point is that it does everything that I need it to do and has never failed me. My question is that is there anything better? Am I missing some feature in another product that I could be using to make my life easier? I am always all about using the best software out there and have no problem migrating to new technologies. I have heard of GIT and have done some research. I plan on giving that a try but while I am messing with that, are there another other source control systems that are considered "industry standard" and do they do things better then SVN? Sorry if this is a duplicate question; but I did search beforehand.
0
[ 2, 246, 1267, 569, 6030, 800, 3726, 3726, 363, 14, 236, 159, 31, 57, 533, 16906, 69, 20, 972, 10898, 9, 31, 589, 40, 104, 10058, 17, 31, 67, 170, 27, 21, 310, 16, 51, 258, 2314, 9, 29, 13, 18, 16578, 82, 510, 2010, 20, 4705,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 do people use __(double underscore) so much in C++ === I was having a look through some open source C++ code and notice a lot of double under scores where used in the code, mainly at the start of variable names. return __CYGWIN__; if __name__ == "__main__": Just wondering is there a reason for this, or is it just some people code styles? I would think that I makes it hard to read.
0
[ 2, 483, 107, 148, 275, 13, 1, 5, 14368, 131, 15077, 6, 86, 212, 19, 272, 20512, 800, 3726, 3726, 31, 23, 452, 21, 361, 120, 109, 368, 1267, 272, 20512, 1797, 17, 3551, 21, 865, 16, 1494, 131, 7369, 113, 147, 19, 14, 1797, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Return total number of files within a folder using PHP. === Is there a better/simpler way to find the number of images in a directory and output them to a variable? function dirCount($dir) { $x = 0; while (($file = readdir($dir)) !== false) { if (isImage($file)) {$x = $x + 1} } return $x; } This seems like such a long way of doing this, is there no simpler way? **Note:** The isImage() function returns true if the file is an image.
0
[ 2, 788, 600, 234, 16, 6488, 363, 21, 19294, 568, 13, 26120, 9, 800, 3726, 3726, 25, 80, 21, 574, 118, 24629, 139, 161, 20, 477, 14, 234, 16, 3502, 19, 21, 16755, 17, 5196, 105, 20, 21, 7612, 60, 1990, 13, 9035, 16549, 5, 4403,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
log4net with ASP.NET 3.5 problems === I'm having some trouble getting log4net to work from ASP.NET 3.5. This is the first time I've tried to use log4net, I feel like I'm missing a piece of the puzzle. My project references the log4net assembly, and as far as I can tell, it is being deployed successfully on my server. My web.config contains the following: <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler , log4net" requirePermission="false"/> </configSections> <log4net> <appender name="InfoAppender" type="log4net.Appender.FileAppender"> <file value="..\..\logs\\InfoLog.html" /> <appendToFile value="true" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%d [%t] %-5p %c [%x] - %m%n" /> </layout> </appender> <logger name="_Default"> <level value="INFO" /> <appender-ref ref="InfoAppender" /> </logger> </log4net> I'm using the following code to test the logger: using log4net; using log4net.Config; public partial class _Default : System.Web.UI.Page { private static readonly ILog log = LogManager.GetLogger("_Default"); protected void Page_Load(object sender, EventArgs e) { log.Info("Hello logging world!"); } } In my Global.asax, I'm doing the following: void Application_Start(object sender, EventArgs e) { log4net.Config.XmlConfigurator.Configure(); } At this point, I can't think of what else I might be doing wrong. The directory I'm trying to store the log in is writable, and even if I try different directories I get the same result: no file, no logs. Any suggestions? :-) Edit: I've tried several different formats for the path & name of the log file, some of which include "..\\..\\InfoLog.html", "InfoLog.html", "logs\\InfoLog.html", etc, just in case someone is wondering if that's the problem.
0
[ 2, 6738, 300, 2328, 29, 28, 306, 9, 2328, 203, 9, 264, 1716, 800, 3726, 3726, 31, 22, 79, 452, 109, 2572, 1017, 6738, 300, 2328, 20, 170, 37, 28, 306, 9, 2328, 203, 9, 264, 9, 48, 25, 14, 64, 85, 31, 22, 195, 794, 20, 275,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PHP + WSDL + SOAP - how do I display a webservice result on screen === I'm just starting out in PHP and would like some advice as to how to get a webservice result to display in an array. For example I would like to print the currency codes into an array from the following WSDL $wsdl="http://www.webservicex.com/CurrencyConvertor.asmx?WSDL This is what I have so far but nothing really happens: <?php $proxyhost="proxy.cpit.ac.nz"; $proxyport = 8080; $wsdl="http://www.webservicex.com/CurrencyConvertor.asmx?WSDL"; $client = new SoapClient($wsdl, array('proxy_host' => "$proxyhost",'proxy_port' => 8080, 'trace' => 1)); $country=array(); $result = $client->ConversionRate($country); print_r($result); ?>
0
[ 2, 13, 26120, 2754, 619, 18, 8643, 2754, 6447, 13, 8, 184, 107, 31, 3042, 21, 2741, 11449, 829, 27, 2324, 800, 3726, 3726, 31, 22, 79, 114, 1422, 70, 19, 13, 26120, 17, 83, 101, 109, 4978, 28, 20, 184, 20, 164, 21, 2741, 11449...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Constant value in conditional expression === In a <a href="http://stackoverflow.com/questions/224138/infinite-loops-top-or-bottom">coding style question about infinite loops</a>, some people mentioned they prefer the for(;;) style because the while(true) style gives warning messages on MSVC about a conditional expression being constant. This surprised me greatly, since the use of constant values in conditional expressions is a useful way of avoiding #ifdef hell. For instance, you can have in your header: #ifdef CONFIG_FOO extern int foo_enabled; #else #define foo_enabled 0 #endif And the code can simply use a conditional and trust the compiler to elide the dead code when CONFIG\_FOO isn't defined: if (foo_enabled) { ... } Instead of having to test for CONFIG\_FOO every time foo_enabled is used: #ifdef CONFIG_FOO if (foo_enabled) { ... } #endif This design pattern is used all the time in the Linux kernel (for instance, include/linux/cpumask.h defines several macros to 1 or 0 when SMP is disabled and to a function call when SMP is enabled). What is the reason for that MSVC warning? Additionally, is there a better way to avoid #ifdef hell without having to disable that warning? Or is it an overly broad warning which should not be enabled in general?
0
[ 2, 3587, 1923, 19, 21206, 1803, 800, 3726, 3726, 19, 21, 13, 1, 58, 746, 14057, 3726, 7, 21127, 6903, 25325, 2549, 9990, 9, 960, 118, 24652, 18, 118, 19236, 13993, 118, 23025, 591, 8, 18786, 18, 8, 3880, 8, 248, 8, 22389, 7, 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...
Loading a remote swf into the SecurityDomain.currentDomain (child ApplicationDomain)? === Is it possible for my AIR application to load a remote swf file into the application's `SecurityDomain`? Specifically, I'd like to load it in an `ApplicationDomain` which is a child or sibling of the app's `ApplicationDomain`. I've spent a resonable amount of time researching, and the answer seems to be 'no'. I need to load a remote swf into a child `ApplicationDomain` so that some of our framework classes can eclipse their stub equivalents (which are defined in the external swf file). When loading a swf file from the app sandbox, this has the effect of implementing various base classes, but this technique fails for remote content because I can't get it loaded into the same `SecurityDomain`, let alone the same `ApplicationDomain`. I notice that the `LoaderContext` object has a `securityDomain` property, but Flash security prohibits 'local swfs' from touching it (it throws a `SecurityError` or similar). Flex's `SWFLoader` has a `trustContent` property that looks promising, but I'm inclined to assume that it has the same restrictions as setting the `SecurityDomain` in the `Loader`'s `LoaderContext`. If I can't solve this or find a workaround I'll need to re-design the architecture of my app, which won't be much fun, so... Any thoughts? At all?
0
[ 2, 12797, 21, 5388, 13, 18, 15263, 77, 14, 1221, 537, 6232, 9, 17657, 537, 6232, 13, 5, 11287, 3010, 537, 6232, 6, 60, 800, 3726, 3726, 25, 32, 938, 26, 51, 282, 3010, 20, 6305, 21, 5388, 13, 18, 15263, 3893, 77, 14, 3010, 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...
xcopy ASP.NET deployment of a Subversion-managed project === I'm currently using Subversion to manage my ASP.NET website. I'm finding that whenever I go to upload my website to my server, I'm copying a large number of hidden .svn folders and whatever contents may lie within them. Does anyone have any suggestions for avoiding this? I don't particularly want those hidden .svn folders on the production server, but short of manually deleting each .svn folder before I upload my website, I'm at a loss for how to have a .svn-folder-free production environment.
0
[ 2, 993, 19625, 28, 306, 9, 2328, 10475, 16, 21, 972, 10898, 8, 177, 8030, 669, 800, 3726, 3726, 31, 22, 79, 871, 568, 972, 10898, 20, 4705, 51, 28, 306, 9, 2328, 2271, 9, 31, 22, 79, 3007, 30, 6634, 31, 162, 20, 71, 8294, 51...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Where are ASP.NET MVC docs? === I am very impressed with the ASP.NET MVC stuff--and I've seen the various blogs and am quite anxious to dig in. But where are the docs? I can't find any docs on the System.Web.Mvc namespace, or any of its related namespaces. Google searches limited to msdn.microsoft.com don't turn up anything, nor does just googling. I know there are a ton of great blog articles, but I'm not talking about the straight up docs. Where are they? Am I missing something? Thank you, rp
0
[ 2, 113, 50, 28, 306, 9, 2328, 307, 8990, 9765, 18, 60, 800, 3726, 3726, 31, 589, 253, 7059, 29, 14, 28, 306, 9, 2328, 307, 8990, 3217, 8, 8, 290, 31, 22, 195, 541, 14, 617, 8146, 18, 17, 589, 1450, 12323, 20, 6131, 19, 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...
Decrypt PHP encrypted string in C# === I have a string encrypted in PHP that I would like to decrypt in C#. I used the tutorial below to do the encryption, but am having problems decrypting. Can anyone post an example on how to do this? [http://www.sanity-free.org/131/triple_des_between_php_and_csharp.html][1] [1]: http://www.sanity-free.org/131/triple_des_between_php_and_csharp.html
0
[ 2, 121, 11435, 13, 26120, 29403, 3724, 19, 272, 5910, 800, 3726, 3726, 31, 57, 21, 3724, 29403, 19, 13, 26120, 30, 31, 83, 101, 20, 121, 11435, 19, 272, 5910, 9, 31, 147, 14, 29724, 1021, 20, 107, 14, 24420, 15, 47, 589, 452, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Checkout from TFS with MSBuild === What's the easiest way to checkout a file from our TFS with MSBUILD. From what I can see it's to shell out to TF.EXE and manually call the checkout command. Is there really no built in command?!
0
[ 2, 2631, 1320, 37, 13, 11720, 18, 29, 4235, 29361, 800, 3726, 3726, 98, 22, 18, 14, 27237, 161, 20, 2631, 1320, 21, 3893, 37, 318, 13, 11720, 18, 29, 4235, 29361, 9, 37, 98, 31, 92, 196, 32, 22, 18, 20, 3593, 70, 20, 13, 117...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 money in a decimal column - what precision and scale? === I'm using a decimal column to store money values on a database, and today I was wondering what precision and scale to use. Since supposedly char columns of a fixed width are more efficient, I was thinking the same could be true for decimal columns. Is it? And what precision and scale should I use? I was thinking precision 24/8. Is that overkill, not enough or ok?
0
[ 2, 25615, 875, 19, 21, 26380, 4698, 13, 8, 98, 13133, 17, 3464, 60, 800, 3726, 3726, 31, 22, 79, 568, 21, 26380, 4698, 20, 1718, 875, 4070, 27, 21, 6018, 15, 17, 786, 31, 23, 5712, 98, 13133, 17, 3464, 20, 275, 9, 179, 11731, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...