unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
.NET: Why do I need a SecureString? === I'm trying to grok the purpose of .NET's SecureString. From MSDN: > An instance of the System.String class is both immutable and, when no longer needed, cannot be programmatically scheduled for garbage collection; that is, the instance is read-only after it is created and it is not possible to predict when the instance will be deleted from computer memory. Consequently, if a String object contains sensitive information such as a password, credit card number, or personal data, there is a risk the information could be revealed after it is used because your application cannot delete the data from computer memory. >A SecureString object is similar to a String object in that it has a text value. However, the value of a SecureString object is automatically encrypted, can be modified until your application marks it as read-only, and can be deleted from computer memory by either your application or the .NET Framework garbage collector. >The value of an instance of SecureString is automatically encrypted when the instance is initialized or when the value is modified. Your application can render the instance immutable and prevent further modification by invoking the MakeReadOnly method. Is the automatic encryption the big payoff? And why can't I just say: SecureString password = new SecureString("password"); instead of SecureString pass = new SecureString(); foreach (char c in "password".ToCharArray()) pass.AppendChar(c); What aspect of SecureString am I missing?
0
[ 2, 13, 9, 2328, 45, 483, 107, 31, 376, 21, 4315, 11130, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 3452, 197, 14, 2131, 16, 13, 9, 2328, 22, 18, 4315, 11130, 9, 37, 4235, 43, 103, 45, 13, 1, 40, 4851, 16, 14, 329, 9, 11130,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the proper way to ensure a SQL connection is closed when an exception is thrown? === I use a pattern that looks something like this often. I'm wondering if this is alright or if there is a best practice that I am not applying here. Specifically I'm wondering; in the case that an exception is thrown is the code that I have in the finally block enough to ensure that the connection is closed appropriately? public class SomeDataClass : IDisposable { private SqlConnection _conn; //constructors and methods private DoSomethingWithTheSqlConnection() { //some code excluded for brevity try { using (SqlCommand cmd = new SqlCommand(SqlQuery.CountSomething, _SqlConnection)) { _SqlConnection.Open(); countOfSomething = Convert.ToInt32(cmd.ExecuteScalar()); } } finally { //is this the best way? if (_SqlConnection.State == ConnectionState.Closed) _SqlConnection.Close(); } //some code excluded for brevity } public Dispose() { _conn.Dispose(); } }
0
[ 2, 98, 25, 14, 4119, 161, 20, 4062, 21, 4444, 255, 2760, 25, 827, 76, 40, 5391, 25, 6027, 60, 800, 3726, 3726, 31, 275, 21, 3732, 30, 1879, 301, 101, 48, 478, 9, 31, 22, 79, 5712, 100, 48, 25, 11885, 54, 100, 80, 25, 21, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you pass parameters to called function using ASP.Net Ajax $addHandler === I am trying to use the $addHandler function to add a handler to a text box's click event var o=$get('myTextBox'); var f = Type.parse('funcWithArgs'); $addHandler(o, 'click', f); However I need to pass parameters to the called function. How do you do that? TIA
0
[ 2, 184, 107, 42, 1477, 12905, 20, 227, 1990, 568, 28, 306, 9, 2328, 20624, 5579, 14854, 3203, 1252, 800, 3726, 3726, 31, 589, 749, 20, 275, 14, 5579, 14854, 3203, 1252, 1990, 20, 3547, 21, 24641, 20, 21, 1854, 1649, 22, 18, 10840,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 have a LinkClicked event using an ArrayList of LinkLabels in .NET === I'm working on a form that will display links to open different types of reports. This system has different types of users, so the users should only be able to see the links to the types of reports they can access. Currently, the way I have this set up is that I have an ArrayList of LinkLabels, but the problem I'm having is how to have a LinkClicked event for each LinkLabel in the ArrayList so that it will bring up a form specific to each report.
0
[ 2, 184, 20, 57, 21, 3508, 150, 10129, 69, 807, 568, 40, 7718, 5739, 16, 3508, 21018, 18, 19, 13, 9, 2328, 800, 3726, 3726, 31, 22, 79, 638, 27, 21, 505, 30, 129, 3042, 6271, 20, 368, 421, 2551, 16, 2813, 9, 48, 329, 63, 421,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 many database indexes is too many? === I'm working on a project with a rather large Oracle database (although my question applies equally well to other databases). We have a web interface which allows users to search on almost any possible combination of fields. To make these searches go fast, we're adding indexes to the fields and combinations of fields on which we believe users will commonly search. However, since we don't really know how our customers will use this software, it's hard to tell which indexes to create. Space isn't a concern; we have a 4 terabyte RAID drive of which we are using only a small fraction. However, I'm worried about the possible performance penalties of having too many indexes. Because those indexes need to be updated every time a row is added, deleted, or modified, I imagine it'd be a bad idea to have dozens of indexes on a single table. So how many indexes is considered too many? 10? 25? 50? Or should I just cover the really, really common and obvious cases and ignore everything else?
0
[ 2, 184, 151, 6018, 4348, 160, 25, 266, 151, 60, 800, 3726, 3726, 31, 22, 79, 638, 27, 21, 669, 29, 21, 864, 370, 15759, 6018, 13, 5, 8655, 51, 1301, 13169, 7634, 134, 20, 89, 6018, 18, 6, 9, 95, 57, 21, 2741, 6573, 56, 2965,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Does java have a using clause? === I've seen reference in some C# posted questions to a "using" clause. Does java have the equivalent?
0
[ 2, 630, 8247, 57, 21, 568, 9040, 60, 800, 3726, 3726, 31, 22, 195, 541, 2801, 19, 109, 272, 5910, 6054, 2346, 20, 21, 13, 7, 12655, 7, 9040, 9, 630, 8247, 57, 14, 4602, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Exceptions vs Result Codes for a socket client class. === I have a class that encapsulates tcp socket communications with a server. For each command message sent to the server, the server will send back a response message that invariably contains a response code (OK, Fail). Using my class, each command can be executed either sync or async. There are basically two types of exceptions that can take place: A "fault" that is caused by a disconnect or some other non-recoverable error and an unexpected exception like "send buffer is full". In the event of a fault, no command can continue or try again or anything until the connection is re-established. In the event of a fail response or even an exception, the command can be tried again... So, right now my sync command methods return an enum that can have the following values: OK, Fail, Fault. If an exception occurs, it is simply raised to the calling thread (in a sync command). For async commands, the Result property enum value can contain an extra value: OK, Fail, Fault or Exception and the callback can access the actual exception object via the command object's Exception property. What do you think about this strategy? I am tempted to not raise exceptions at all for sync commands and just log the exception internally and return the 4th enum value instead because that's all I'll really do with exceptions in any given case anyway... Or, should I not be using result codes at all and just raise exceptions in all cases, even faults? Thanks.
0
[ 2, 13392, 4611, 829, 11358, 26, 21, 18482, 6819, 718, 9, 800, 3726, 3726, 31, 57, 21, 718, 30, 1957, 4666, 18, 12383, 18, 13, 38, 7439, 18482, 3380, 29, 21, 8128, 9, 26, 206, 1202, 2802, 795, 20, 14, 8128, 15, 14, 8128, 129, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Controlling property names on serialized ASP.Net Ajax Objects === To start, I know there are two "kinds" of JSON serialization currently built into ASP.Net: you can either use the JavaScriptSerializer class to serialize your object to JSON or the new DataContractJsonSerializer class to convert a object to JSON. If you use the JavaScriptSerializer() method, you must mark your class as Serializable() -- if you use the DataContractJsonSerializer method, you must mark your class as DataContract(), and mark your properties as DataMembers(). If you want, you can specify a NAME attribute for each DataMembers, so when the property gets serialized/deserialized, it uses that name. For my purposes, I see this as being useful to make the JSON not so "wordy". For example, instead of stating "UserID" as my property (and having it repeat throughout my JSON object), I'd like to simply use "u". Less data across the wire, etc. The two serialization engines render a bit different, and you can only use the JavaScriptSerializer with ASP.Net Web/Script Methods. Therein lies my problem. Is there a equivalent way of setting a property name to something else, strictly for the purposes of serialization/deserialization using the regular JavaScriptSerializer?
0
[ 2, 10106, 1354, 1817, 27, 27877, 28, 306, 9, 2328, 20624, 3916, 800, 3726, 3726, 20, 799, 15, 31, 143, 80, 50, 81, 13, 7, 11008, 18, 7, 16, 487, 528, 5956, 1829, 871, 392, 77, 28, 306, 9, 2328, 45, 42, 92, 694, 275, 14, 8247...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MATLAB Environment Tweaks === How have you tweaked the MATLAB environment to better suit your needs? One tweak per answer.
0
[ 2, 4277, 9086, 2307, 28769, 18, 800, 3726, 3726, 184, 57, 42, 28769, 69, 14, 4277, 9086, 2307, 20, 574, 2961, 154, 2274, 60, 53, 28769, 416, 1623, 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...
[ 1, 1, 1, 1, 1, 1, 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...
Supress ClientAbortException in struts2 VelocityResult class === I am getting the following stack trace in my log file and was wanting to supress just this error from displaying in the log: > ERROR 08-09-26 14:48:45.141 > http-80-215 > org.apache.struts2.dispatcher.VelocityResult: > Unable to render Velocity Template, > '/jsondata.vm' ClientAbortException: > java.net.SocketException: Broken pipe I understand what causes the error, and it is not really exceptional in this particular use case; I just want to supress the ClientAbortException from displaying in the log file, but display a debug level message instead. Thanks!
0
[ 2, 2538, 5890, 6819, 58, 6157, 38, 10066, 872, 19, 18316, 18, 135, 10700, 29955, 718, 800, 3726, 3726, 31, 589, 1017, 14, 249, 7566, 5565, 19, 51, 6738, 3893, 17, 23, 4638, 20, 2538, 5890, 114, 48, 7019, 37, 17418, 19, 14, 6738, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Stateless EJB question. === We have a stateless EJB that is behind a webservices (EJB3), this EJB also loads a EntityManager that is passed in calls that it makes. With that I have a question. Do simultaneous call to the webservice use the same EJB or is there different instances? I ask this especially concerning the use of the EntityManager, which is injected. Thanks
0
[ 2, 146, 923, 13, 10022, 220, 1301, 9, 800, 3726, 3726, 95, 57, 21, 146, 923, 13, 10022, 220, 30, 25, 439, 21, 2741, 11449, 18, 13, 5, 10022, 220, 240, 6, 15, 48, 13, 10022, 220, 67, 19069, 21, 9252, 22256, 30, 25, 1100, 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...
Hex offset === I downloaded Hex Workshop, and I was told to read a .dbc file, "It should contain 28,315 if you read offset 0x04 and 0x05" but I'm unsure how to do this? what doew 0x04 mean?
0
[ 2, 24, 396, 17493, 800, 3726, 3726, 31, 23887, 24, 396, 7873, 15, 17, 31, 23, 470, 20, 1302, 21, 13, 9, 43, 7229, 3893, 15, 13, 7, 242, 378, 3717, 1274, 15, 240, 1193, 100, 42, 1302, 17493, 713, 396, 3277, 17, 713, 396, 4071, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Subqueries vs joins === I refactored a slow section of an application we inherited from another company to use an inner join instead of a subquery like where id in (select id from ... ) **The refactored query runs about 100x faster.** (~50 seconds to ~0.3) I expected an improvement, but can anyone explain why it was so drastic? The columns used in the where clause were all indexed. Does SQL execute the query in the where clause once per row or something?
0
[ 2, 972, 2005, 2829, 4611, 10612, 800, 3726, 3726, 31, 302, 17455, 69, 21, 2276, 1050, 16, 40, 3010, 95, 7179, 37, 226, 237, 20, 275, 40, 3754, 1865, 700, 16, 21, 972, 8190, 93, 101, 113, 4924, 19, 13, 5, 18, 16964, 4924, 37, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What's the best way to count keywords in JavaScript? === What's the best and most efficient way to count keywords in JavaScript? Basically, I'd like to take a string and get the top N words or phrases that occur in the string, mainly for the use of suggesting tags. I'm looking more for conceptual hints or links to real-life examples than actual code, but I certainly wouldn't mind if you'd like to share code as well. If there are particular functions that would help, I'd also appreciate that. Right now I think I'm at using the split() function to separate the string by spaces and then cleaning punctuation out with a regular expression. I'd also want it to be case-insensitive.
0
[ 2, 98, 22, 18, 14, 246, 161, 20, 2468, 1246, 12827, 19, 8247, 8741, 60, 800, 3726, 3726, 98, 22, 18, 14, 246, 17, 127, 8243, 161, 20, 2468, 1246, 12827, 19, 8247, 8741, 60, 11374, 15, 31, 22, 43, 101, 20, 247, 21, 3724, 17, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
The difference between the Runnable and Callable interfaces in Java === What is the difference between using the Runnable and Callable interfaces when designing a concurrent thread in Java, why would you choose one over the other?
0
[ 2, 14, 2841, 128, 14, 485, 103, 579, 17, 645, 579, 6573, 18, 19, 8247, 800, 3726, 3726, 98, 25, 14, 2841, 128, 568, 14, 485, 103, 579, 17, 645, 579, 6573, 18, 76, 15026, 21, 19513, 9322, 19, 8247, 15, 483, 83, 42, 3538, 53, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Possible to use Flex Framework/Components without using MXML? === Is it possible to use the Flex Framework and Components, without using MXML? I know ActionScript pretty decently, and don't feel like messing around with some new XML language just to get some simple UI in there. Can anyone provide an example consisting of an .as file which can be compiled (ideally via FlashDevelop, though just telling how to do it with the Flex SDK is ok too) and uses the Flex Framework? For example, just showing a Flex button that pops open an Alert would be perfect. If it's not possible, can someone provide a minimal MXML file which will bootstrap a custom AS class which then has access to the Flex SDK?
0
[ 2, 938, 20, 275, 14409, 6596, 118, 11103, 849, 14128, 366, 568, 307, 396, 8184, 60, 800, 3726, 3726, 25, 32, 938, 20, 275, 14, 14409, 6596, 17, 5090, 15, 366, 568, 307, 396, 8184, 60, 31, 143, 1028, 8741, 1772, 12238, 102, 15, 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 list only top level directories in Python? === I want to be able to list only the directories inside some folder. This means I don't want filenames listed, nor do I want additional sub-folders. Let's see if an example helps. In the current directory we have: >>> os.listdir(os.getcwd()) ['cx_Oracle-doc', 'DLLs', 'Doc', 'include', 'Lib', 'libs', 'LICENSE.txt', 'mod_p ython-wininst.log', 'NEWS.txt', 'pymssql-wininst.log', 'python.exe', 'pythonw.ex e', 'README.txt', 'Removemod_python.exe', 'Removepymssql.exe', 'Scripts', 'tcl', 'Tools', 'w9xpopen.exe'] However, I don't want filenames listed. Nor do I want sub-folders such as \Lib\curses. Essentially what I want works with the following: >>> for root, dirnames, filenames in os.walk('.'): ... print dirnames ... break ... ['cx_Oracle-doc', 'DLLs', 'Doc', 'include', 'Lib', 'libs', 'Scripts', 'tcl', 'Tools'] However, I'm wondering if there's a simpler way of achieving the same results. I get the impression that using os.walk only to return the top level is inefficient/too much.
0
[ 2, 184, 20, 968, 104, 371, 662, 559, 1596, 19, 20059, 60, 800, 3726, 3726, 31, 259, 20, 44, 777, 20, 968, 104, 14, 559, 1596, 572, 109, 19294, 9, 48, 1108, 31, 221, 22, 38, 259, 3893, 7259, 18, 1510, 15, 2127, 107, 31, 259, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Checking File is Open in Delphi === Is there a way to check if a file has been opened by ReWrite in Delphi? Code would go something like this: AssignFile(textfile, 'somefile.txt'); if not textFile.IsOpen then Rewrite(textFile);
0
[ 2, 9886, 3893, 25, 368, 19, 23030, 800, 3726, 3726, 25, 80, 21, 161, 20, 2631, 100, 21, 3893, 63, 74, 520, 34, 27891, 19, 23030, 60, 1797, 83, 162, 301, 101, 48, 45, 13952, 16877, 5, 11969, 16877, 15, 13, 22, 3220, 16877, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Pronouncing dictionaries === Are there any alternatives to [The CMU Pronouncing Dictionary](http://www.speech.cs.cmu.edu/cgi-bin/cmudict), commercial or open source?
0
[ 2, 18362, 6302, 29783, 800, 3726, 3726, 50, 80, 186, 2676, 18, 20, 636, 124, 2390, 291, 18362, 6302, 9186, 500, 5, 21127, 6903, 6483, 9, 18, 1664, 7455, 9, 6824, 9, 150, 3677, 9, 69, 291, 118, 150, 2234, 8, 4772, 118, 150, 3677,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
php check for a valid date, wierd date conversions === Is there a way to check to see if a date/time is valid you would think these would be easy to check: $date = '0000-00-00'; $time = '00:00:00'; $dateTime = $date . ' ' . $time; if(strtotime($dateTime)) { // why is this valid? } what really gets me is this: echo date('Y-m-d', strtotime($date)); results in: "1999-11-30", huh? i went from 0000-00-00 to 1999-11-30 ??? I know i could do comparison to see if the date is either of those values is equal to the date i have but it isn't a very robust way to check. Is there a good way to check to see if i have a valid date? Anyone have a good function to check this?
0
[ 2, 13, 26120, 2631, 26, 21, 7394, 1231, 15, 11842, 897, 1231, 6263, 18, 800, 3726, 3726, 25, 80, 21, 161, 20, 2631, 20, 196, 100, 21, 1231, 118, 891, 25, 7394, 42, 83, 277, 158, 83, 44, 2010, 20, 2631, 45, 5579, 8209, 800, 13,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What's the difference between Phing and PHPUnderControl? === We currently use a hand-rolled setup and configuration script and a hand-rolled continuous integration script to build and deploy our application. I am looking at formalizing this somewhat with a third party system designed for these purposes. I have looked into Phing before, and I get that it's basically like Ant. But, my Ant experience is somewhat limited so that doesn't help me much. (Most of the Java work I have done was just deployed as a jar file). I have looked into Cruise Control before, and I understand that phpUnderControl is a plug-in for CC. But, Phing says it also works with CC. So I am not clear on the overlap here. Do I need both Phing and phpUnderControl to work with CruiseControl, or are they mutually exlclusive? What I need exactly is something that can: - Check out source from SVN - Install the database from SQL file - Generate some local configuration files from a series of templates and an ini file - Run all of our unit tests (currently ST, but easy to convert to PHPUnit) and send an email to the dev team if any tests break (with a stack trace of course) - Generate API documentation for the application and put it somewhere - Run a test coverage report Now, we have just about all of this in one form or another. But, it'd be nice to have it all automated and bundled together in one process.
0
[ 2, 98, 22, 18, 14, 2841, 128, 4145, 68, 17, 13, 26120, 4579, 12898, 60, 800, 3726, 3726, 95, 871, 275, 21, 224, 8, 8694, 69, 18161, 17, 8091, 3884, 17, 21, 224, 8, 8694, 69, 6357, 8078, 3884, 20, 1895, 17, 17617, 318, 3010, 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...
Perl - Win32 - How to do a non-blocking read of a filehandle from another process? === I'm writing some server code that talks to a client process via STDIN. I'm trying to write a snippet of perl code that asynchronously receives responses from the client's STDOUT. The blocking version of the code might look like this: sub _read_from_client { my ($file_handle) = @_; while (my $line = <$file_handle>) { print STDOUT $line; } return; } Importantly, the snippet needs to work in Win32 platform. There are many solutions for *nix platforms that I'm not interested in. I'm using ActivePerl 5.10.
0
[ 2, 416, 255, 13, 8, 628, 3125, 13, 8, 184, 20, 107, 21, 538, 8, 12048, 68, 1302, 16, 21, 3893, 3203, 413, 37, 226, 953, 60, 800, 3726, 3726, 31, 22, 79, 1174, 109, 8128, 1797, 30, 7837, 20, 21, 6819, 953, 1197, 354, 3653, 9,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
C++ STL: should I store entire objects, or pointers to objects? === Designing a new system from scratch. I'll be using the STL to store lists and maps of certain long-live objects. Question: Should I ensure my objects have copy constructors and store copies of objects within my STL containers, or is it generally better to manage the life & scope myself and just store the pointers to those objects in my STL containers? I realize this is somewhat short on details, but I'm looking for the "theoretical" better answer if it exists, since I know both of these solutions are possible. Two very obvious disadvantage to playing with pointers: 1) I must manage allocation/deallocation of these objects myself in a scope beyond the STL. 2) I cannot create a temp object on the stack and add it to my containers. Is there anything else I'm missing?
0
[ 2, 272, 20512, 354, 255, 45, 378, 31, 1718, 1078, 3916, 15, 54, 454, 445, 20, 3916, 60, 800, 3726, 3726, 15026, 21, 78, 329, 37, 12395, 9, 31, 22, 211, 44, 568, 14, 354, 255, 20, 1718, 7227, 17, 6867, 16, 1200, 175, 8, 5928, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 check if directory exists in %PATH%? === How does one check if a directory is already present in the PATH environment variable? Here's a start. All I've managed to do with the code belowcls , though, is echo the first directory in %PATH%. Since this is a FOR loop you'd think it would enumerate all the directories in %PATH%, but it only gets the first one. Is there a better way of doing this? Something like find or findstr operating on the %PATH% variable? I'd just like to check if a directory exists in the list of directories in %PATH%, to avoid adding something that might already be there. FOR /F "delims=;" %%P IN ("%PATH%") DO ( @ECHO %%~P )
0
[ 2, 184, 20, 2631, 100, 16755, 5636, 19, 13, 11881, 8353, 11881, 60, 800, 3726, 3726, 184, 630, 53, 2631, 100, 21, 16755, 25, 614, 734, 19, 14, 2013, 2307, 7612, 60, 235, 22, 18, 21, 799, 9, 65, 31, 22, 195, 1471, 20, 107, 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...
xsl scope help === I have a xsl file that is grabbing variables from xml and they seem to not be able to see each other. I know it is a scope issue, I just do not know what I am doing wrong. <xsl:template match="one"> <xsl:variable name="varOne" select="@count" /> </xsl:template> <xsl:template match="two"> <xsl:if test="$varOne = 'Y'"> <xsl:value-of select="varTwo"/> </xsl:if> </xsl:template> This has been simplified for here. Any help is appreciated.
0
[ 2, 993, 18, 255, 9914, 448, 800, 3726, 3726, 31, 57, 21, 993, 18, 255, 3893, 30, 25, 9910, 12157, 37, 23504, 17, 59, 2260, 20, 52, 44, 777, 20, 196, 206, 89, 9, 31, 143, 32, 25, 21, 9914, 1513, 15, 31, 114, 107, 52, 143, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the best way to parse a time into a Date object from user input in Javascript? === I am working on a form widget for users to enter a time of day into a text input (for a calendar application). Using JavaScript (we are using jQuery FWIW), I want to find the best way to parse the text that the user enters into a JavaScript `Date()` object so I can easily perform comparisons and other things on it. I tried the `parse()` method and it is a little too picky for my needs. I would expect it to be able to successfully parse the following example input times (in addition to other logically similar time formats) as the same `Date()` object: - 1:00 pm - 1:00 p.m. - 1:00 p - 1:00pm - 1:00p.m. - 1:00p - 1 pm - 1 p.m. - 1 p - 1pm - 1p.m. - 1p - 13:00 - 13 I am thinking that I might use regular expressions to split up the input and extract the information I want to use to create my `Date()` object. What is the best way to do this?
0
[ 2, 98, 25, 14, 246, 161, 20, 2017, 870, 21, 85, 77, 21, 1231, 3095, 37, 4155, 6367, 19, 8247, 8741, 60, 800, 3726, 3726, 31, 589, 638, 27, 21, 505, 4807, 43, 3060, 26, 3878, 20, 2830, 21, 85, 16, 208, 77, 21, 1854, 6367, 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 I find what is using memory in a Python process in a production system? === My production system occasionally exhibits a memory leak I have not been able to reproduce in a development environment. I've used a <a href="http://stackoverflow.com/questions/110259/python-memory-profiler">Python memory profiler</a> (specifically, Heapy) with some success in the development environment, but it can't help me with things I can't reproduce, and I'm reluctant to instrument our production system with Heapy because it takes a while to do its thing and its threaded remote interface does not work well in our server. What I think I want is a way to dump a snapshot of the production Python process, and then analyze it offline to see where it is using memory. How do I get a core dump of a python process like this? Once I have one, how do I do something useful with it?
0
[ 2, 184, 107, 31, 477, 98, 25, 568, 1912, 19, 21, 20059, 953, 19, 21, 637, 329, 60, 800, 3726, 3726, 51, 637, 329, 4533, 11549, 21, 1912, 11724, 31, 57, 52, 74, 777, 20, 21509, 19, 21, 522, 2307, 9, 31, 22, 195, 147, 21, 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...
Team Foundation Server - Use API to Sync to SVN === Has anyone out there used TFS's API to synchronize different types of repositories? I have a SVN repo that I want to sync with a TFS repo. More accurately, I just want to take everything latest from SVN occasionally (nightly) and dump it out to TFS as the latest version. Any advice?
0
[ 2, 173, 1304, 8128, 13, 8, 275, 21, 2159, 20, 6063, 150, 20, 13, 18, 16578, 800, 3726, 3726, 63, 1276, 70, 80, 147, 13, 11720, 18, 22, 18, 21, 2159, 20, 13, 16023, 2952, 421, 2551, 16, 302, 14882, 262, 2829, 60, 31, 57, 21, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Flex Post Event Screen Updates === I came across this topic today while investigating something very strange. Doing certain things in our Flex app can cause the number of frames rendered to rocket, from 12fps to ~30fps: loaded animations start playing at high speed and the GUI starts to lock up. Since everything I've read on Flex/Flash hammers home the point "the frame rate is capped at the fps set in the top level app", it seems the only way these extra renders can be happening is due to some events causing them (no programmatic changes to the stage's framerate are done anywhere). Since it only happens when I put my update logic in the ENTER_FRAME handler, I'm trying to figure out what might be happening which to apparently causing Flex to go render-crazy. Hypothesis: something in my update function is triggering an immediate screen update, this raises another ENTER_FRAME immediately, which means my update loop gets called, which triggers another immediate screen update, ... We have Flex components used in our GUI, if this is a factor. I don't really know where to go next on this.
0
[ 2, 14409, 678, 807, 2324, 16779, 800, 3726, 3726, 31, 281, 464, 48, 8303, 786, 133, 12490, 301, 253, 2578, 9, 845, 1200, 564, 19, 318, 14409, 4865, 92, 1679, 14, 234, 16, 12809, 10877, 20, 6598, 15, 37, 390, 12087, 18, 20, 13, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Calculating the elapsed working hours between 2 dates. === Given two dates. What is the best way to calculate the number of working hours between them. Considering the working hours are Mon 8 - 5.30, and Tue-Fri 8.30 - 5.30, and that potentially any day could be a public holiday. This is my effort, seem hideously inefficient, especially considering the IsWorkingDay method hits the DB to see if that day is a public holiday. Can anyone suggest any optimizations or alternatives. public decimal ElapsedWorkingHours(DateTime start, DateTime finish) { decimal counter = 0; while (start.CompareTo(finish) <= 0) { if (IsWorkingDay(start) && IsOfficeHours(start)) { start = start.AddMinutes(1); counter++; } else { start = start.AddMinutes(1); } } decimal hours; if (counter != 0) { hours = counter/60; } return hours; }
0
[ 2, 22937, 14, 13, 62, 17057, 43, 638, 974, 128, 172, 4076, 9, 800, 3726, 3726, 504, 81, 4076, 9, 98, 25, 14, 246, 161, 20, 18469, 14, 234, 16, 638, 974, 128, 105, 9, 5154, 14, 638, 974, 50, 3521, 469, 13, 8, 331, 9, 1762, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
INotifyPropertyChanged property name - hardcode vs reflection? === What is the best way to specify a property name when using INotifyPropertyChanged? Most examples hardcode the property name as an argument on the PropertyChanged Event. I was thinking about using MethodBase.GetCurrentMethod.Name.Substring(4) but am a little uneasy about the reflection overhead.
0
[ 2, 19, 2779, 8612, 10890, 106, 1084, 16229, 43, 1354, 204, 13, 8, 552, 9375, 4611, 9138, 60, 800, 3726, 3726, 98, 25, 14, 246, 161, 20, 19077, 21, 1354, 204, 76, 568, 19, 2779, 8612, 10890, 106, 1084, 16229, 43, 60, 127, 3770, 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...
Which Visual Studio Color Theme? === Which Visual Studio Color Theme do you use? Do you find that the darker themes work best for you? Do they help ease your eye strain? What is your favorite color theme & where can I get it?
4
[ 2, 56, 3458, 1120, 1665, 3184, 60, 800, 3726, 3726, 56, 3458, 1120, 1665, 3184, 107, 42, 275, 60, 107, 42, 477, 30, 14, 10393, 6876, 170, 246, 26, 42, 60, 107, 59, 448, 6378, 154, 1356, 8302, 60, 98, 25, 154, 3839, 1665, 3184, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
How to emulate Emacs’ transpose-words in Vim? === Emacs has a useful `transpose-words` command which lets one exchange the word before the cursor with the word after the cursor, preserving punctuation. For example, ‘`stack |overflow`’ + M-t = ‘`overflow stack|`’ (‘`|`’ is the cursor position). `<a>|<p>` becomes `<p><a|>`. Is it possible to emulate it in Vim? I know I can use `dwwP`, but it doesn’t work well with punctuation.
0
[ 2, 184, 20, 23804, 13, 62, 6893, 18, 1, 2982, 15690, 8, 12827, 19, 1790, 79, 60, 800, 3726, 3726, 13, 62, 6893, 18, 63, 21, 4811, 13, 1, 7028, 15690, 8, 12827, 1, 1202, 56, 6884, 53, 1950, 14, 833, 115, 14, 29588, 29, 14, 83...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Yahoo GeoPlanet & XPathNavigator C# === I am returning XML data from the Yahoo GeoPlanet web service using HttpWebRequest. I am loading the XML using XPathDocument doc = new XPathDocument(HttpWebResponse.GetResponseStream()) Next comes XPathNavigator nav = doc.CreateNavigator(); If I do nav.Select("places"); or nav.Select("/places"); or nav.Select("//places"); Nothing gets returned! But if I do nav.select("/*"); I get the node and doing node.Name returns "places"????
0
[ 2, 23553, 6389, 10207, 38, 279, 993, 8353, 16424, 15807, 272, 5910, 800, 3726, 3726, 31, 589, 2485, 23504, 1054, 37, 14, 23553, 6389, 10207, 38, 2741, 365, 568, 7775, 458, 3692, 10351, 9, 31, 589, 12797, 14, 23504, 568, 993, 8353, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I re-import a subreport into Crystal reports 9.0 without getting an Access Denied error? === I'm using Crystal Reports 9.0. It has a subreport which is shared by 2 master reports. I modified the subreport as a result of fixing one of the master reports. When I try to re-import that subreport into my 2nd Master report I'm getting the error: Access denied then Re-importing the subreport failed. Does anyone know what the problem might be? The 2 master reports and subreport are all "checked" out so it's not a ready only issue. Also when I first say re-import it tells me the file could not be found (pointing to a long dead file path) and I'm required to select it.
0
[ 2, 184, 107, 31, 302, 8, 1660, 1993, 21, 972, 17437, 77, 4282, 2813, 561, 9, 387, 366, 1017, 40, 1381, 5265, 7019, 60, 800, 3726, 3726, 31, 22, 79, 568, 4282, 2813, 561, 9, 387, 9, 32, 63, 21, 972, 17437, 56, 25, 2592, 34, 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...
Tomcat 6.0.18 service will not start on a windows server. === I installed Tomcat 6.0.18 on a windows server 2003 box and it will not start as a service. I'm running it with jdk 1.6.0_07. It runs when I start it with tomcat6.exe. I got a vague error in the System Event Log on Windows.
0
[ 2, 2067, 5782, 400, 9, 387, 9, 1087, 365, 129, 52, 799, 27, 21, 1936, 8128, 9, 800, 3726, 3726, 31, 4066, 2067, 5782, 400, 9, 387, 9, 1087, 27, 21, 1936, 8128, 973, 1649, 17, 32, 129, 52, 799, 28, 21, 365, 9, 31, 22, 79, 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...
Do examinations make good programmers? === Having just finished University I was just wondering if people think that exams are the best way to train people to write computer programs or should it be taught in a strictly practical, hands-on way.
0
[ 2, 107, 17725, 233, 254, 17968, 18, 60, 800, 3726, 3726, 452, 114, 842, 155, 31, 23, 114, 5712, 100, 148, 277, 30, 15954, 50, 14, 246, 161, 20, 1528, 148, 20, 2757, 1428, 1726, 54, 378, 32, 44, 2359, 19, 21, 10369, 5713, 15, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How can a transform a polynomial to another coordinate system? === Using assorted matrix math, I've solved a system of equations resulting in coefficients for a polynomial of degree 'n' Ax^(n-1) + Bx^(n-2) + ... + Z I then evaulate the polynomial over a given x range, essentially I'm rendering the polynomial curve. Now here's the catch. I've done this work in one coordinate system we'll call "data space". Now I need to present the same curve in another coordinate space. It is easy to transform input/output to and from the coordinate spaces, but the end user is only interested in the coefficients [A,B,....,Z] since they can reconstruct the polynomial on their own. How can I present a second set of coefficients [A',B',....,Z'] which represent the same shaped curve in a different coordinate system. If it helps, I'm working in 2D space. Plain old x's and y's. I also feel like this may involve multiplying the coefficients by a transformation matrix? Would it some incorporate the scale/translation factor between the coordinate systems? Would it be the inverse of this matrix? I feel like I'm headed in the right direction...
0
[ 2, 184, 92, 21, 8007, 21, 15039, 20, 226, 15154, 329, 60, 800, 3726, 3726, 568, 28542, 8187, 5057, 15, 31, 22, 195, 15091, 21, 329, 16, 12853, 2927, 19, 14612, 18, 26, 21, 15039, 16, 1168, 13, 22, 103, 22, 21, 396, 1, 5, 103, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
If I register for an event in c# while it's dispatching, am I guaranteed to not get called again during that dispatch? === In C#, I find myself occasionally wanting to register a method for an event in the middle of a dispatch of that same event. For example, if I have a class that transitions states based on successive dispatches of the same event, I might want the first state's handler to unregister itself and register the second handler. However, I don't want the second handler to be dispatched until the next time the event is fired. The good news is that it looks like the Microsoft implementation of C# behaves exactly this way. The event registration syntax sugar gets replaced with a call to System.Delegate.Combine, which just concatenates the current invocation list and the new method into a separate list and assigns it to the event property. This gives me exactly the behavior I want. So, my question is: is this guaranteed behavior by the language standard? I like to be able to run my C# code on other platforms under mono and generally want to make sure I'm not making assumptions about the language standard based on its implementation. I couldn't find any definitive information on MSDN. If you'd like a specific example of what I'm talking about, here's an example: delegate void TestDelegate(); static event TestDelegate TestEvent; static void Main (string[] args) { TestEvent += TestDelegateInstanceFirst; TestEvent(); TestEvent(); } static void TestDelegateInstanceFirst () { Console.WriteLine("First"); TestEvent += TestDelegateInstanceSecond; } static void TestDelegateInstanceSecond () { Console.WriteLine("Second"); } At least on Windows, the output is: First First Second
0
[ 2, 100, 31, 2243, 26, 40, 807, 19, 272, 5910, 133, 32, 22, 18, 14226, 68, 15, 589, 31, 13572, 20, 52, 164, 227, 188, 112, 30, 14226, 60, 800, 3726, 3726, 19, 272, 5910, 15, 31, 477, 992, 4533, 4638, 20, 2243, 21, 2109, 26, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Gracefully closing a frame (toolbar) around an iframe === I've created a tool that is used with a fairly popular music retailer. The tool provides an enhanced search feature (transparent last.fm results, no ads, no lameness, nothing creepy) and I've found the most useful and unobtrusive way to display the search is as a toolbar using the much maligned iframe. This allows users to load search without stealing the users focus. Not being a particularly big fan of iframes I thought it would be trivial to add a “close this frame” (ala Google image search) link allowing users to quickly and easily regain control of their browser. However unlike google, I doen't know what the location of the content in the iframe is (only where it started, via src). So now I find myself in world of XSS and all the security related concerns. Using Javascript I've added 'back' and 'forward' buttons with the history object called from links in the parent (when a user does a search the results load into the iframe, so the back button allows them to go back to the primary site after their done using/perusing the search results). Is there any way to call the current location within the iframe and reload the page (now sans frames) to that location? I've checked PHP $GLOBAL/$_SERVER variables to see I might get lucky. I understand that there are security concerns, but I don't see how this particular function would be any different then history.back() where the browser makes the call itself without 'notifying' my parent frame. I know I can retrieve the src location from the iframe itself, but of course that presumes the user doesn't navigate beyond this page, and if they do they don't mind losing their current location and being redirected back to page called initially by the frame (...ah...). It almost seems like frames are designed to steal windows with no means for gracefully 'breaking out' and preserving integrity of the users session. No wonder people hate them. :)
0
[ 2, 28138, 4239, 21, 3523, 13, 5, 20799, 1850, 6, 140, 40, 31, 8361, 800, 3726, 3726, 31, 22, 195, 679, 21, 5607, 30, 25, 147, 29, 21, 6647, 844, 232, 22943, 9, 14, 5607, 1927, 40, 10062, 2122, 1580, 13, 5, 7028, 18908, 236, 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...
Is there a standard implementation for Electronic Signatures on fill-in-form web applications? === I have a client who is interested in adding in electronic signature support to a long (40 question) seller application form. I'm a little stumped on whether there is an existing standard or process that's out there that folks in the financial world would expect to see? I could certainly add in a system where we generate a bunch of text based on their responses, have the applicant sign it with their private key and upload a public key- but that seems like a lot to ask of people. Do non-nerds even have PGP installed these days? Is there a standard approach to this out there? Anyone work in the financial world that's done this and had it work well? Thanks!
0
[ 2, 25, 80, 21, 1236, 6123, 26, 3253, 19506, 27, 3509, 8, 108, 8, 4190, 2741, 3767, 60, 800, 3726, 3726, 31, 57, 21, 6819, 72, 25, 3158, 19, 4721, 19, 3253, 7810, 555, 20, 21, 175, 13, 5, 2602, 1301, 6, 3344, 106, 3010, 505, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 create a status bar item with Cocoa and Python (PyObjC)? === I have created a brand new project in XCode and have the following in my AppDelegate.py file: from Foundation import * from AppKit import * class MyApplicationAppDelegate(NSObject): def applicationDidFinishLaunching_(self, sender): NSLog("Application did finish launching.") statusItem = NSStatusBar.systemStatusBar().statusItemWithLength_(NSVariableStatusItemLength) statusItem.setTitle_(u"12%") statusItem.setHighlightMode_(TRUE) statusItem.setEnabled_(TRUE) However, when I launch the application no status bar item shows up. All the other code in main.py and main.m is default.
0
[ 2, 184, 92, 31, 1600, 21, 1782, 748, 9101, 29, 24507, 17, 20059, 13, 5, 6448, 4995, 15864, 6, 60, 800, 3726, 3726, 31, 57, 679, 21, 2209, 78, 669, 19, 993, 9375, 17, 57, 14, 249, 19, 51, 4865, 24249, 3322, 9, 6448, 3893, 45, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Advantages of using MSBuild or NAnt versus running DevEnv.exe from command-line === Can anyone explain what advantages there are to using a tool like MSBuild (or NAnt) to build a collection of projects versus running DevEnv.exe from the command-line? A colleague I had worked with in the past had explained that (at least with older versions of Visual Studio) using DevEnv.exe was much slower than the other techniques, but I haven't read any evidence of that or if that is now a moot point now that VS 2008 uses MSBuild under the hood. I know one advantage of using MSBuild allows you to build your projects without requiring Visual Studio to be installed on the build machines, but I wasn't sure if there were others.
0
[ 2, 14683, 16, 568, 4235, 29361, 54, 13, 11028, 5706, 946, 121, 3124, 710, 9, 1706, 62, 37, 1202, 8, 1143, 800, 3726, 3726, 92, 1276, 3271, 98, 14683, 80, 50, 20, 568, 21, 5607, 101, 4235, 29361, 13, 5, 248, 13, 11028, 6, 20, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to switch the radio station with javascript === I am new to programming and trying to make this work. I want to offer the user the option of selection the radio station they want to listen to...this is what i have come up with, but dont work, any help is appreciated: <script language="javascript" type="text/javascript"> // You can place JavaScript like this document.getElementById("radiostations").selectedIndex = 0; document.getElementById("radiostations").onchange = resetStation; function resetStation(){ objPlayer = document.getElementById("mediaPlayer"); // obj.Settings.volume = 75 newStation = document.getElementById("radiostations"); objPlayer.URL=newStation.options[newStation.selectedIndex].value; // playback this file objPlayer.controls.play(); // play what ever file is loaded } </script> <form name="mediaPlay"> <select name="radiostations" size="1"> <option selected value="http://listen.radionomy.com/smoothmusicradio">Smooth Music</option> <option value="http://www.urbanhotradio.com/hiphop/music/stream.asx">Hip-Hop</option> <option value="http://www.orsradio.com/asx/rnbclassic.asx">R&B Soul</option> </select> <noscript> <input type="button" value="Play Now!" onClick="location=document.mediaPlay.radiostations.options [document.mediaPlay.radiostations.selectedIndex].value"> </noscript> </form> <OBJECT ID="MediaPlayer" WIDTH="100%" HEIGHT="100" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject"> <PARAM NAME="FileName" VALUE=newStation.options[newStation.selectedIndex].value> <PARAM name="ShowControls" VALUE="true"> <param name="ShowStatusBar" value="true"> <PARAM name="ShowDisplay" VALUE="false"> <PARAM name="autostart" VALUE="false"> <EMBED TYPE="application/x-mplayer2" SRC=newStation.options[newStation.selectedIndex].value NAME="MediaPlayer" WIDTH="100%" HEIGHT="100" ShowControls="1" ShowStatusBar="1" ShowDisplay="0" autostart="0"> </EMBED> </OBJECT>
0
[ 2, 184, 20, 5521, 14, 603, 312, 29, 8247, 8741, 800, 3726, 3726, 31, 589, 78, 20, 3143, 17, 749, 20, 233, 48, 170, 9, 31, 259, 20, 1994, 14, 4155, 14, 4255, 16, 3155, 14, 603, 312, 59, 259, 20, 3834, 20, 9, 9, 9, 1565, 25,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
(OpenGL 3.1 - 4.2) Objects take up all of the screen space === From what I know, everything about OpenGL changed since 3.1 and now I can't figure out how to re-size the rendering context. float positionData[] = { -0.8f, -0.8f, 0.0f, 0.8f, -0.8f, 0.0f, 0.0f, 0.8f, 0.0f }; Is there a setting that can fix this? Or do I have to incorporate the math into the shaders themselves. ![OpenGL pretends the window is actually 2.0f by 2.0f][1] [1]: http://i.stack.imgur.com/0qx8l.png
0
[ 2, 13, 5, 10157, 8430, 203, 9, 165, 13, 8, 268, 9, 135, 6, 3916, 247, 71, 65, 16, 14, 2324, 726, 800, 3726, 3726, 37, 98, 31, 143, 15, 796, 88, 368, 8430, 1015, 179, 203, 9, 165, 17, 130, 31, 92, 22, 38, 1465, 70, 184, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Remove Tax at Checkout for B2B customers in Magento === i need to dynamicaly remove tax during checkout for b2b customers in magento. I have a module which asks for vat id during checkout and checks it against the Euroean Online VAT-ID Validation Service. If the VAT ID is valid, the tax should be removed during checkout. The module already assigns new customers with valid vat id to the according b2b group in magento, but the problem is, that customers who order for the first time and create their account during first checkout, dont have an account yet, so the problem is, that at their first order, they get charged VAT (even with valid VAT-ID). I basically need to know, how this can be done, which methodes envolved, etc. thanks in advance!
0
[ 2, 4681, 2225, 35, 2631, 1320, 26, 334, 135, 220, 5279, 19, 4723, 17050, 800, 3726, 3726, 31, 376, 20, 7782, 58, 102, 4681, 2225, 112, 2631, 1320, 26, 334, 135, 220, 5279, 19, 4723, 17050, 9, 31, 57, 21, 12613, 56, 3913, 26, 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...
jQuery, undefined function if used in a different function === I'm writing a jquery plugin, which similar to this, $(this).each(function(){ $el = $(this).find('.el') $el.click(function(){ test(); }); function test() { console.log('test init'); } }); This works fine when $el is clicked but when i use the test() outside of $el.click like this $(this).each(function(){ $el = $(this).find('.el') test(); function test() { console.log('test init'); } }); I get type error undefined is not a function PS: I'm coding in coffee, syntax/spelling isn't an issue here
0
[ 2, 487, 8190, 93, 15, 367, 13439, 1990, 100, 147, 19, 21, 421, 1990, 800, 3726, 3726, 31, 22, 79, 1174, 21, 487, 8190, 93, 10922, 108, 15, 56, 835, 20, 48, 15, 5579, 5, 1565, 6, 9, 14322, 5, 22359, 5, 6, 1, 5579, 532, 800, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is a JavaScript try-catch ignoring an expected occasional error bad practice? === In JavaScript is it wrong to use a try-catch block and ignore the error rather than test many attributes in the block for null? try{ if(myInfo.person.name == newInfo.person.name && myInfo.person.address.street == newInfo.person.address.street && myInfo.person.address.zip == newInfo.person.address.zip) { this.setAddress(newInfo); } } catch(e) {} // ignore missing args
0
[ 2, 25, 21, 8247, 8741, 1131, 8, 18208, 9321, 40, 1727, 7713, 7019, 896, 1345, 60, 800, 3726, 3726, 19, 8247, 8741, 25, 32, 1389, 20, 275, 21, 1131, 8, 18208, 1921, 17, 7174, 14, 7019, 864, 119, 1289, 151, 13422, 19, 14, 1921, 26...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I wrap a string in a file in Python? === How do I create a file-like object (same duck time as File) with the contents of a string?
0
[ 2, 184, 107, 31, 8118, 21, 3724, 19, 21, 3893, 19, 20059, 60, 800, 3726, 3726, 184, 107, 31, 1600, 21, 3893, 8, 1403, 3095, 13, 5, 18, 8357, 7026, 85, 28, 3893, 6, 29, 14, 8478, 16, 21, 3724, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Javascript to detect whether the dropdown of a select element is visible === I have a select element in a form, and I want to display something only if the dropdown is not visible. Things I have tried: - Watching for click events, where odd clicks mean the dropdown is visible and even clicks mean the dropdown isn't. Misses other ways the dropdown could disappear (pressing escape, tabbing to another window), and I think this could be hard to get right cross-browser. - Change events, but these only are triggered when the select box's value changes. Ideas?
0
[ 2, 8247, 8741, 20, 9092, 1472, 14, 2804, 2968, 16, 21, 5407, 4520, 25, 4560, 800, 3726, 3726, 31, 57, 21, 5407, 4520, 19, 21, 505, 15, 17, 31, 259, 20, 3042, 301, 104, 100, 14, 2804, 2968, 25, 52, 4560, 9, 564, 31, 57, 794, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 purge expired items from cache? === I've got a nice little class built that acts as a cache. Each item has an expiration TimeSpan or DateTime. Each time an attempt to access an item in the cache is made, the item's expiration is checked, and if it's expired, the item is removed from the cache and nothing is returned. That's great for objects that are accessed frequently, but if an item is put in the cache and never accessed again, it's never removed, even though it's expired. What's a good methodology for expiring such items from the cache? Should I have a background thread enumerating every item in the cache to check if it's expired?
0
[ 2, 184, 20, 20722, 15524, 3755, 37, 16522, 60, 800, 3726, 3726, 31, 22, 195, 330, 21, 2210, 265, 718, 392, 30, 3167, 28, 21, 16522, 9, 206, 9101, 63, 40, 29529, 436, 3206, 54, 1231, 891, 9, 206, 85, 40, 1735, 20, 1381, 40, 910...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
jdbc driver for Microsoft SQL Server CE(Compact Edition) 3.5 === I want to be able to explore the contents of a DB for this version of the DB. I was thinking of using the Squirrel DB client (which needs a JDBC driver). Therefore, I'm looking for a JDBC type 4 driver for SQL SERVER 3.5. Can somone point me to a FREE OR open source or trial ware ? If no JDBC driver, how do MS developers explore a given .SDF file ? Thank you, BR,<BR> ~A
0
[ 2, 487, 43, 7229, 2425, 26, 7099, 4444, 255, 8128, 4000, 5, 11103, 5183, 1322, 6, 203, 9, 264, 800, 3726, 3726, 31, 259, 20, 44, 777, 20, 8594, 14, 8478, 16, 21, 13, 9007, 26, 48, 615, 16, 14, 13, 9007, 9, 31, 23, 1440, 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...
Recursive List Flattening === I could probably write this myself, but the specific way I'm trying to accomplish it is throwing me off. I'm trying to write a generic extension method similar to the others introduced in .NET 3.5 that will take a nested IEnumerable of IEnumerables (and so on) and flatten it into one IEnumerable. Anyone have any ideas?
0
[ 2, 302, 24244, 968, 1844, 1316, 68, 800, 3726, 3726, 31, 110, 910, 2757, 48, 992, 15, 47, 14, 1903, 161, 31, 22, 79, 749, 20, 14570, 32, 25, 6033, 55, 168, 9, 31, 22, 79, 749, 20, 2757, 21, 12733, 3896, 2109, 835, 20, 14, 65...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
WCF Configuration settings for REST w/ username/password + SSL === I'm looking to write a config file that allows for RESTful services in WCF, but I still want the ability to 'tap into' the membership provider for username/password authentication. The below is part of my current config using basicHttp binding or wsHttp w/out WS Security, how will this change w/ REST based services? <bindings> <wsHttpBinding> <binding name="wsHttp"> <security mode="TransportWithMessageCredential"> <transport/> <message clientCredentialType="UserName" negotiateServiceCredential="false" establishSecurityContext="false"/> </security> </binding> </wsHttpBinding> <basicHttpBinding> <binding name="basicHttp"> <security mode="TransportWithMessageCredential"> <transport/> <message clientCredentialType="UserName"/> </security> </binding> </basicHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="NorthwindBehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceAuthorization principalPermissionMode="UseAspNetRoles"/> <serviceCredentials> <userNameAuthentication userNamePasswordValidationMode="MembershipProvider"/> </serviceCredentials> </behavior> </serviceBehaviors> </behaviors>
0
[ 2, 11801, 410, 8091, 12410, 26, 760, 619, 118, 4155, 7259, 118, 6201, 9587, 2754, 13, 18, 18, 255, 800, 3726, 3726, 31, 22, 79, 699, 20, 2757, 21, 13, 14093, 2816, 3893, 30, 2965, 26, 760, 1566, 687, 19, 11801, 410, 15, 47, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there an easy way to populate SlugField from CharField? === class Foo(models.Model): title = models.CharField(max_length=20) slug = models.SlugField() Is there a built-in way to get the slug field to autopopulate based on the title? Perhaps in the Admin and outside of the Admin.
0
[ 2, 25, 80, 40, 2010, 161, 20, 1675, 12383, 15850, 1109, 37, 4892, 1109, 60, 800, 3726, 3726, 718, 4310, 111, 5, 13998, 18, 9, 13998, 6, 45, 581, 800, 2761, 9, 5433, 1109, 5, 8304, 1, 6325, 3726, 1323, 6, 15850, 800, 2761, 9, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What open source C++ static analysis tools are available? === Java has some very good open source static analysis tools such as [FindBugs][1], [Checkstyle][2] and [PMD][3]. Those tools are easy to use and very helpful. For C++, trying to find open source tools to do static analysis is difficult. Below is a short list of interesting tools that were found. - Oink, http://www.cubewano.org/oink/ - C++ Check, http://sourceforge.net/projects/cppcheck/ - C and C++ Code Counter, http://sourceforge.net/projects/cccc/ Here are pages that have links to some tools. - http://stackoverflow.com/questions/97454/c-static-code-analysis-tool-on-windows - http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis - http://www.chris-lott.org/resources/cmetrics/ What are some open source C++ static analysis tools that anyone knows of and can be recommended? [1]: http://findbugs.sf.net/ [2]: http://checkstyle.sf.net/ [3]: http://pmd.sf.net/
0
[ 2, 98, 368, 1267, 272, 20512, 12038, 2495, 4672, 50, 904, 60, 800, 3726, 3726, 8247, 63, 109, 253, 254, 368, 1267, 12038, 2495, 4672, 145, 28, 636, 19811, 16254, 18, 500, 2558, 165, 500, 15, 636, 12542, 4381, 500, 2558, 135, 500, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Java libraries out there that validate SQL syntax? === I'm not sure if this even exists or not, so I figured I would tap the wisdom of others.. I was wondering if there are any Java libraries out there that can be used to validate a SQL query's syntax. I know that there are many deviations from common SQL spec, so it would probably only work against something like SQL:2006, but that would certainly suffice. My goal is to use this for unit-testing purposes without needing to attempt the execution against the DB. I know it's of limited use, but it would still be useful. Thanks!
0
[ 2, 186, 8247, 8649, 70, 80, 30, 7394, 1373, 4444, 255, 22649, 60, 800, 3726, 3726, 31, 22, 79, 52, 562, 100, 48, 166, 5636, 54, 52, 15, 86, 31, 5700, 31, 83, 5526, 14, 10482, 16, 654, 9, 9, 31, 23, 5712, 100, 80, 50, 186, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Visual Studio 2008 source control for small teams === I work on a small web team where I am the only .NET developer currently using Visual Studio 2008 Professional to build and maintain a few web applications. I am about to start training another member of our team so we purchased him a copy of Visual Studio 2008 Professional. I've looked into Visual Source Safe, but I'm dubious. I don't like that is file system based. Ideally, the system would work with SQL Server 2005 and plug into Visual Studio. Windows based solutions are the best because of the IT environment of the US Governemnt agency I work for. What are my options for a source control system? (Forgive me if the answer exists in another thread.)
0
[ 2, 3458, 1120, 570, 1267, 569, 26, 284, 952, 800, 3726, 3726, 31, 170, 27, 21, 284, 2741, 173, 113, 31, 589, 14, 104, 13, 9, 2328, 10058, 871, 568, 3458, 1120, 570, 736, 20, 1895, 17, 4027, 21, 310, 2741, 3767, 9, 31, 589, 88,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 differentiates software engineering from any other engineering discipline? === Software engineering shares many of the same traits with other engineering disciplines (attention to detail, complexity to mastery). What do you think differentiates it? Please be specific and substantiate your answer.
2
[ 2, 98, 22144, 18, 2306, 1552, 37, 186, 89, 1552, 7927, 60, 800, 3726, 3726, 2306, 1552, 5945, 151, 16, 14, 205, 14756, 29, 89, 1552, 14469, 13, 5, 721, 1316, 3309, 20, 6110, 15, 12745, 20, 1129, 93, 6, 9, 98, 107, 42, 277, 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, 0, 0, 0...
when can we expect official release of Asp.net MVC ? === When do you think we can expect full release version of Asp.net MVC?
0
[ 2, 76, 92, 95, 4186, 989, 830, 16, 28, 306, 9, 2328, 307, 8990, 13, 60, 800, 3726, 3726, 76, 107, 42, 277, 95, 92, 4186, 503, 830, 615, 16, 28, 306, 9, 2328, 307, 8990, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Which php variable debuging function do you use? var_dump, print_r, var_export, other? === I personally use var_dump, but lots of people like print_r. What does everyone use? Pros and Cons? Does someone have a special home brew function of their own?
0
[ 2, 56, 13, 26120, 7612, 121, 16254, 68, 1990, 107, 42, 275, 60, 4033, 1, 43, 11134, 15, 4793, 1, 139, 15, 4033, 1, 1706, 1993, 15, 89, 60, 800, 3726, 3726, 31, 7200, 275, 4033, 1, 43, 11134, 15, 47, 7503, 16, 148, 101, 4793, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Windows clipboard CRLF/LF passing wrong for one user === We have a pair of applications. One is written in C# and uses something like: string s = "alpha\r\nbeta\r\ngamma\r\ndelta"; // Actually there's wrapper code here to make sure this works. System.Windows.Forms.Clipboard.SetDataObject(s, true); To put a list of items onto the clipboard. Another application (in WinBatch) then picks up the list using a ClipGet() function. (We use the clipboard functions to give people the option of editing the list in notepad or something, without having to actually cut-and-paste every time.) In this particular environment, we have many users on one system via Citrix. Many using these pairs of programs. Just *one* user is having the problem where the line delimiters in the text are getting switched from CRLF to LF somewhere between the SetDataObject() and the CLipGet(). I could explain this in a mixed Unix/Windows environment, but there is no Unix here. No unix-y utilities anywhere near this system either. Other users on the same server, no problems at all. It's like something in Windows/Citrix is being "helpful" when we really don't want it, but just for this one guy. Ideas?
0
[ 2, 1936, 12229, 2806, 6186, 9641, 118, 9641, 2848, 1389, 26, 53, 4155, 800, 3726, 3726, 95, 57, 21, 2146, 16, 3767, 9, 53, 25, 642, 19, 272, 5910, 17, 2027, 301, 101, 45, 3724, 13, 18, 800, 13, 7, 22480, 1, 139, 1, 103, 24398,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Absolute Beginner's Guide to Bit Shifting? === I've been attempting to learn C in my spare time, and other languages (C#, Java, etc.) have the same concept (and often the same operators) ... What I'm wondering is, at a core level, what does bit-shifting (<<, >>, <<<, >>>) do, what problems can it help solve, and what gotchas lurk around the bend? In other words, an absolute beginner's guide to bit shifting in all its goodness.
0
[ 2, 7070, 26931, 22, 18, 3378, 20, 1142, 10255, 60, 800, 3726, 3726, 31, 22, 195, 74, 6314, 20, 2484, 272, 19, 51, 8001, 85, 15, 17, 89, 2556, 13, 5, 150, 5910, 15, 8247, 15, 2722, 9, 6, 57, 14, 205, 2420, 13, 5, 290, 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...
MVC n-level route building === I want to create a productcatalog with N-Level Categories > e.g. > > /Catalog/Category1/Category2/../SubCategoryN/Product/{ProductActions}/{ID} > > And at the same time be able to > > /Catalog/Category1/Category2/../SubCategoryN/{CategoryActions} Is that possible and if Yes how?
0
[ 2, 307, 8990, 13, 103, 8, 3906, 858, 353, 800, 3726, 3726, 31, 259, 20, 1600, 21, 2374, 9709, 5567, 29, 13, 103, 8, 3906, 6422, 13, 1, 13, 62, 9, 263, 9, 13, 1, 13, 1, 13, 118, 9709, 5567, 118, 14375, 93, 8197, 14375, 93, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Potential Pitfalls of inserting millions of records into SQL Server 2005 from flat file === I am about to start on a journey writing a windows forms application that will open a txt file that is pipe delimited and about 230 mb in size. This app will then insert this data into a sql server 2005 database (obviously this needs to happen swiftly). I am using c# 3.0 and .net 3.5 for this project. I am not asking for the app, just some communal advise here and potential pitfalls advise. From the site I have gathered that SQL bulk copy is a prerequisite, is there anything I should think about (I think that just opening the txt file with a forms app will be a large endeavor; maybe break it into blob data?). Thank you, and I will edit the question for clarity if anyone needs it.
0
[ 2, 2222, 4175, 5660, 18, 16, 14692, 68, 11999, 16, 742, 77, 4444, 255, 8128, 812, 37, 1844, 3893, 800, 3726, 3726, 31, 589, 88, 20, 799, 27, 21, 2998, 1174, 21, 1936, 1997, 3010, 30, 129, 368, 21, 20225, 38, 3893, 30, 25, 7642, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Should try...catch go inside or outside a loop? === I have a loop that looks something like this: for(int i = 0; i < max; i++) { String myString = ...; float myNum = Float.parseFloat(myString); myFloats[i] = myNum; } This is the main content of a method whose sole purpose is to return the array of floats. I want this method to return null if there is an error, so I put the loop inside a try...catch block, like this: try { for(int i = 0; i < max; i++) { String myString = ...; float myNum = Float.parseFloat(myString); myFloats[i] = myNum; } } catch (NumberFormatException ex) { return null; } But then I also thought of putting the try...catch block inside the loop, like this: for(int i = 0; i < max; i++) { String myString = ...; try { float myNum = Float.parseFloat(myString); } catch (NumberFormatException ex) { return null; } myFloats[i] = myNum; } So my question is: is there any reason, performance or otherwise, to prefer one over the other?
0
[ 2, 378, 1131, 9, 9, 9, 18208, 162, 572, 54, 719, 21, 5293, 60, 800, 3726, 3726, 31, 57, 21, 5293, 30, 1879, 301, 101, 48, 45, 26, 5, 6391, 31, 800, 713, 73, 31, 13, 1, 2049, 73, 31, 20512, 6, 13, 1, 3724, 51, 11130, 800, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SQL to find the number of distinct values in a column === I can select all the distinct values in a column in the following ways: - `SELECT DISTINCT column_name FROM table_name;` - `SELECT column_name FROM table_name GROUP BY column_name;` But how do I get the row count from that query? Is a subquery required?
0
[ 2, 4444, 255, 20, 477, 14, 234, 16, 4421, 4070, 19, 21, 4698, 800, 3726, 3726, 31, 92, 5407, 65, 14, 4421, 4070, 19, 21, 4698, 19, 14, 249, 2847, 45, 13, 8, 13, 1, 18, 16964, 4421, 4698, 1, 7259, 37, 859, 1, 7259, 73, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Bulk time entry into timesprite / fogbugz === Is there a good way to import time data into either timesprite or fogbugz? Both seem to have very clunky interfaces for adding single items at a time. What I want is a spreadsheet-style format that I can enter a bunch of rows and suck them in. Noticed timesprite has an import on it, but it seems to only want timesprite formatted XML.
0
[ 2, 7238, 85, 2792, 77, 436, 306, 8011, 13, 118, 7486, 16254, 380, 800, 3726, 3726, 25, 80, 21, 254, 161, 20, 9010, 85, 1054, 77, 694, 436, 306, 8011, 54, 7486, 16254, 380, 60, 156, 2260, 20, 57, 253, 272, 22033, 93, 6573, 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...
Storing Relational Data in XML === I'm wondering what the best practices are for storing a relational data structure in XML. Particulary, I am wondering about best practices for enforcing node order. For example, say I have three objects: `School`, `Course`, and `Student`, which are defined as follows: class School { List<Course> Courses; List<Student> Students; } class Course { string Number; string Description; } class Student { string Name; List<Course> EnrolledIn; } I would store such a data structure in XML like so: <School> <Courses> <Course Number="ENGL 101" Description="English I" /> <Course Number="CHEM 102" Description="General Inorganic Chemistry" /> <Course Number="MATH 103" Description="Trigonometry" /> </Courses> <Students> <Student Name="Jack"> <EnrolledIn> <Course Number="CHEM 102" /> <Course Number="MATH 103" /> </EnrolledIn> </Student> <Student Name="Jill"> <EnrolledIn> <Course Number="ENGL 101" /> <Course Number="MATH 103" /> </EnrolledIn> </Student> </Students> </School> With the XML ordered this way, I can parse `Courses` first. Then, when I parse `Students`, I can look up each `Course` listed in `EnrolledIn` (by its `Number`) in the `School.Courses` list. This will give me an object reference to add to the `EnrolledIn` list in `Student`. If `Students`, however, comes *before* `Courses`, such a lookup to get a object reference is not possible. (Since `School.Courses` has not yet been populated.) So what are the best practices for storing relational data in XML? - Should I enforce that `Courses` must always come before `Students`? - Should I tolerate any ordering and create a stub `Course` object whenever I encounter one I have not yet seen? (To be expanded when the definition of the `Course` is eventually reached later.) - Is there some other way I should be persisting/loading my objects to/from XML? (I am currently implementing `Save` and `Load` methods on all my business objects and doing all this manually using `System.Xml.XmlDocument` and its associated classes.) I am used to working with relational data out of SQL, but this is my first experience trying to store a non-trivial relational data structure in XML. Any advice you can provide as to how I should proceed would be greatly appreciated.
0
[ 2, 25615, 5827, 192, 1054, 19, 23504, 800, 3726, 3726, 31, 22, 79, 5712, 98, 14, 246, 5242, 50, 26, 25615, 21, 5827, 192, 1054, 1411, 19, 23504, 9, 1498, 93, 15, 31, 589, 5712, 88, 246, 5242, 26, 29296, 15421, 389, 9, 26, 823, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 get a list of changes from a Subversion repository by date range? === What I would like is be able to generate a simple report that is the output of svn log for a certain date range. Specifically, all the changes since 'yesterday'. Is there an easy way to accomplish this in Subversion besides grep-ing the svn log output for the timestamp? Example: svn -v log -d 2008-9-23:2008-9:24 > report.txt
0
[ 2, 184, 107, 42, 164, 21, 968, 16, 1693, 37, 21, 972, 10898, 24869, 34, 1231, 978, 60, 800, 3726, 3726, 98, 31, 83, 101, 25, 44, 777, 20, 7920, 21, 1935, 1330, 30, 25, 14, 5196, 16, 13, 18, 16578, 6738, 26, 21, 1200, 1231, 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...
LINQ Syntext Sequence === The following SQL SELECT * FROM customers converted to this in LINQ var customers = from c in customers select c; Is their any good reasones why the from and select is swaped? The only logical reason I can think of is for intellisens? For the intellesens to get resolved, it needs to know what it is querying (scope)? Any other reasons why it was swaped?
0
[ 2, 6294, 1251, 6063, 11969, 4030, 800, 3726, 3726, 14, 249, 4444, 255, 5407, 1637, 37, 5279, 3494, 20, 48, 19, 6294, 1251, 4033, 5279, 800, 37, 272, 19, 5279, 5407, 272, 73, 25, 66, 186, 254, 1215, 160, 483, 14, 37, 17, 5407, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it legal way to get use GPL code in close-source application through plugin? === Consider following steps: 0) Release open source Mock Program and Mock Plugin which communicate by certain interface (I), exchanging complex data structures, sharing memory and calling each other. Apply all-permissive license to it. 1) Release Plugin designed for working with any program in the way defined by interface (I). This plugin uses third-party GPL covered code and so is GPL itself. It is originally developed and tested with Mock Program. It is distributed as any GPL program, with source code available. 2) Release closed source proprietary Program designed to communicate with any plugin in the way defined by interface (I). It is originally developed, tested and shipped with Mock Plugin. 3.1) Add installation script to the Program which downloads GPL Plugin and attaches it to installed program. 3.2) Instead of installation script add instructions how to download and attach GPL Plugin manually. So end user gets proprietary Program which benefits from GPL covered code in Plugin. Questions: 0) If it is legal, then is not it a legal way to get benefit of any GPL covered code in any proprietary program with rather small effort of developer? 1) If it is not legal then what part of GPLv* or anything prevents whom from doing which step? 2) Is there any legal difference between 3.1 and 3.2? 3) Is there any legal difference if Mock Program and Plugin, proprietary Program and GPL Plugin are developed by single person or defferent persons; intentionally or not? 4) What is your opinion - is it ethical enough? 5) Are there any existing samples of such strategy? 6) Are there any easier legal ways to achieve same result - release proprietary program which may and most likely will get benefit from GPL code?
0
[ 2, 25, 32, 1517, 161, 20, 164, 275, 489, 5727, 1797, 19, 543, 8, 12097, 3010, 120, 10922, 108, 60, 800, 3726, 3726, 3563, 249, 2382, 45, 713, 6, 830, 368, 1267, 10506, 625, 17, 10506, 10922, 108, 56, 8709, 34, 1200, 6573, 13, 5,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I hide content in a HTML file from search engines? === Say that I write an article or document about a certain topic, but the content is meant for readers with certain prior knowledge about the topic. To help people who don't have the "required" background information, I would like to add a note to the top of the page with an explanation and possibly a link to some reference material. Here's an example: <blockquote> <p><strong>Using The Best Product in the World to Create World Peace</strong></p> <p><em>Note: This article assumes you are already familiar with The Best Product in the World. To learn more about The Best Product in the World, please see the official web site.</em></p> <p> The Best Product in the World ... </p> </blockquote> Now, I don't want the note to show up in <strike>Google</strike> search engine results, only the title and the content that follows the note. Is there any way I can achieve this? Also, is it possible to do this without direct control over the entire HTML file and/or HTTP response, i.e. on blog hosted by a third party, like <a href="http://www.wordpress.com">Wordpress.com</a>?
0
[ 2, 184, 92, 31, 3077, 2331, 19, 21, 13, 15895, 3893, 37, 2122, 4016, 60, 800, 3726, 3726, 395, 30, 31, 2757, 40, 2002, 54, 4492, 88, 21, 1200, 8303, 15, 47, 14, 2331, 25, 1380, 26, 7807, 29, 1200, 1313, 1918, 88, 14, 8303, 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...
iterating over Enum constants in JSP === I have an Enum like this package com.example; public enum CoverageEnum { COUNTRY("country","Country"), REGIONAL("regional", "Regional"), COUNTY("county", "County"), } I would like to iterate over these constants in JSP without using scriptlet code. I know I can do it with scriptlet code like this: <c:forEach var="type" items="<%= com.example.CoverageEnum.values() %>"> ${type} </c:forEach> But can I achieve the same thing without scriptlets? Cheers, Don
0
[ 2, 32, 106, 1880, 84, 1957, 723, 3587, 18, 19, 487, 3401, 800, 3726, 3726, 31, 57, 40, 1957, 723, 101, 48, 6030, 13, 960, 9, 29041, 73, 317, 1957, 723, 5245, 219, 723, 13, 1, 475, 5, 7, 10741, 7, 15, 7, 10741, 7, 6, 15, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Database structure to track change history === I'm working on database designs for a project management system as personal project and I've hit a snag. I want to implement a ticket system and I want the tickets to look like the [tickets in Trac][1]. What structure would I use to replicate this system? (I have not had any success installing trac on any of my systems so I really can't see what it's doing) Note: I'm not interesting in trying to store or display the ticket at any version. I would only need a history of changes. I don't want to store extra data. Also, I have implemented a feature like this using a serialized array in a text field. I do not want to implement that as a solution ever again. [1]: http://trac.edgewall.org/ticket/6436
0
[ 2, 6018, 1411, 20, 792, 753, 447, 800, 3726, 3726, 31, 22, 79, 638, 27, 6018, 4748, 26, 21, 669, 1097, 329, 28, 1319, 669, 17, 31, 22, 195, 770, 21, 28755, 9, 31, 259, 20, 8713, 21, 6133, 329, 17, 31, 259, 14, 10309, 20, 361...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
RoR: Accessing models from with application.rb === i am working on a simple web app which has a user model and role model (among others), and an admin section that contains many controllers. i would like to use a before_filter to check that the user of the user in the session has a 'can_access_admin' flag. i have this code in the application.rb: def check_role @user = session[:user] if @user.role.can_access_admin.nil? || !@user.role.can_access_admin render :text => "your current role does not allow access to the administration area." return end end and then i have this code inside one of the admin controllers: class Admin::BlogsController < ApplicationController before_filter :check_role def list @blogList = Blog.find(:all) end end and when i try to view the list action i get this error: undefined method 'role' for user... anyone know what i have to do to get the role association to be recognized in the application.rb? (note that the associations are configured correctly and the @user.role is working fine everywhere else i've tried to use it)
0
[ 2, 761, 248, 45, 1381, 68, 2761, 37, 29, 3010, 9, 7549, 800, 3726, 3726, 31, 589, 638, 27, 21, 1935, 2741, 4865, 56, 63, 21, 4155, 1061, 17, 597, 1061, 13, 5, 21068, 654, 6, 15, 17, 40, 21, 43, 2160, 1050, 30, 1588, 151, 991...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 access PostData from WebBrowser.Navigating event handler? === I've got a windows form in Visual Studio 2008 using .NET 3.5 which has a WebBrowser control on it. I need to analyse the form's PostData in the Navigating event handler before the request is sent. Is there a way to get to it? The old win32 browser control had a Before_Navigate event which had PostData as one of its arguments. Not so with the new .NET WebBrowser control.
0
[ 2, 184, 92, 31, 1381, 678, 18768, 37, 10192, 5417, 4104, 9, 325, 13227, 1880, 807, 24641, 60, 800, 3726, 3726, 31, 22, 195, 330, 21, 1936, 505, 19, 3458, 1120, 570, 568, 13, 9, 2328, 203, 9, 264, 56, 63, 21, 10192, 5417, 4104, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Accessing "raw" clipboard data === If I drag and drop a selection of a webpage from Firefox to HTML-Kit, HTML-Kit asks me whether I want to paste as text or HTML. If I select "text," I get this: Version:0.9 StartHTML:00000147 EndHTML:00000516 StartFragment:00000181 EndFragment:00000480 SourceURL:http://en.wikipedia.org/wiki/Herodotus <html><body> <!--StartFragment-->Additional details have been garnered from the <i><a href="http://en.wikipedia.org/wiki/Suda" title="Suda">Suda</a></i>, an 11th-century encyclopaedia of the <a href="http://en.wikipedia.org/wiki/Byzantium" title="Byzantium">Byzantium</a> which likely took its information from traditional accounts.<!--EndFragment--> </body> </html> Is there any way to access this kind of detailed information (as opposed to just the plain clip fragment) in a webpage-to-webpage drag and drop operation? What about to a C# WinForms desktop application?
0
[ 2, 1381, 68, 13, 7, 12404, 7, 12229, 2806, 1054, 800, 3726, 3726, 100, 31, 5501, 17, 2804, 21, 3155, 16, 21, 2741, 6486, 37, 535, 18219, 20, 13, 15895, 8, 13703, 15, 13, 15895, 8, 13703, 3913, 55, 1472, 31, 259, 20, 640, 62, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Another JPA Question *rolls eyes* === I have this code: @PersistenceContext(name="persistence/monkey", unitName="deltaflow-pu") ... @Stateless public class GahBean implements GahRemote { But when I use this: try{ InitialContext ic = new InitialContext(); System.out.println("Pissing me off * " + ic.lookup("java:comp/env/persistent/monkey")); Iterator e = ic.getEnvironment().values().iterator(); while ( e.hasNext() ) System.out.println("rem - " + e.next()); }catch(Exception a){ a.printStackTrace();} I get this exception: javax.naming.NameNotFoundException: No object bound to name java:comp/env/persistent/monkey If I remove the lookup the iterator doesn't have anything close to it either. What could be the problem?
0
[ 2, 226, 487, 1060, 1301, 1637, 8694, 18, 194, 2483, 800, 3726, 3726, 31, 57, 48, 1797, 45, 13, 1, 7490, 702, 2940, 1126, 11969, 5, 7259, 3726, 7, 7490, 702, 2940, 118, 2111, 4237, 7, 15, 1237, 7259, 3726, 7, 3436, 536, 9990, 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...
Perl training for non-Perl developers === I've been working with Perl long enough that many of its idiosyncracies have become second nature to me. When new programmers join our group, they frequently have little to no experience with Perl, and it's usually my task to train them (to the extent necessary). I'd like to know what to focus on when training a programmer who is new to Perl but has experience with other languages (this question is meant to be language-agnostic, but most developers I've worked with have come from Java). A few things occur to me: - The proper use of sigils - Referencing/Dereferencing - Use of list functions like **map**, **grep**, **sort** Is there anything in particular that you've found it useful to focus on when helping a programmer to transition to Perl? Do you stress the similarities or the differences, or both in equal measure?
0
[ 2, 416, 255, 838, 26, 538, 8, 1432, 255, 10168, 800, 3726, 3726, 31, 22, 195, 74, 638, 29, 416, 255, 175, 511, 30, 151, 16, 82, 13, 20347, 9507, 7519, 10807, 57, 533, 153, 1444, 20, 55, 9, 76, 78, 17968, 18, 1865, 318, 214, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 limitations have closures in Python compared to language X closures? === Where X is any programming language (C#, Javascript, Lisp, Perl, Ruby, Scheme, etc) which supports some flavour of closures. Some limitations are mentioned in the [Closures in Python][1] (compared to Ruby's closures), but the article is old and many limitations do not exist in modern Python any more. Seeing a code example for a concrete limitation would be great. **Related questions**: * [Can you explain closures (as they relate to Python)?][2] * [What is a ‘Closure’?][3] * [How does a javascript closure work ?][4] [1]: http://ivan.truemesh.com/archives/000411.html [2]: http://stackoverflow.com/questions/13857/can-you-explain-closures-as-they-relate-to-python [3]: http://stackoverflow.com/questions/36636/what-is-a-closure [4]: http://stackoverflow.com/questions/111102/how-does-a-javascript-closure-work
0
[ 2, 98, 14070, 57, 7790, 18, 19, 20059, 2428, 20, 816, 993, 7790, 18, 60, 800, 3726, 3726, 113, 993, 25, 186, 3143, 816, 13, 5, 150, 5910, 15, 8247, 8741, 15, 2093, 3401, 15, 416, 255, 15, 10811, 15, 4276, 15, 2722, 6, 56, 6747...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Socket programming for mobile phones in Python === I've written code for communication between my phone and comp thru TCP sockets. When I type out the code line by line in the interactive console it works fine. However, when i try running the script directly through filebrowser.py it just wont work. I'm using Nokia N95. Is there anyway I can run this script directly without using filebrowser.py? Am new to Python for mobile phones, so any suggestions would be appreciated. Thanks
0
[ 2, 18482, 3143, 26, 3241, 14830, 19, 20059, 800, 3726, 3726, 31, 22, 195, 642, 1797, 26, 3291, 128, 51, 1132, 17, 6479, 19637, 13, 38, 7439, 18482, 18, 9, 76, 31, 1001, 70, 14, 1797, 293, 34, 293, 19, 14, 9194, 8650, 32, 693, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 make a generic memoize function in Haskell? === I've seen [the other post about this](http://stackoverflow.com/questions/129877/how-do-i-write-a-generic-memoize-function), but is there a clean way of doing this in Haskell? As a 2nd part, can it also be done without making the function monadic?
0
[ 2, 184, 107, 42, 233, 21, 12733, 22236, 2952, 1990, 19, 63, 16507, 60, 800, 3726, 3726, 31, 22, 195, 541, 636, 124, 89, 678, 88, 48, 500, 5, 21127, 6903, 25325, 2549, 9990, 9, 960, 118, 24652, 18, 118, 13320, 3730, 9816, 1544, 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...
Viewing the Visual SourceSafe log inside Visual Studio === Is there any way to view the activity log for the integrate SourceSafe inside Visual Studio 2005 Pro? I'd like to be able to quickly see the results of any Get Latest Version, Check In and Checkout actions, and I can't find a way to get that information without having to open the VSS client. Thanks.
0
[ 2, 11244, 14, 3458, 1267, 18166, 6738, 572, 3458, 1120, 800, 3726, 3726, 25, 80, 186, 161, 20, 1418, 14, 2358, 6738, 26, 14, 18399, 1267, 18166, 572, 3458, 1120, 812, 895, 60, 31, 22, 43, 101, 20, 44, 777, 20, 976, 196, 14, 1736...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Polyglot Programming: Is building applications with multiple languages a good practice? === I am considering building an application that is a blend of a dynamic language (python or ruby) and compiled language and need some help getting convincing myself that this is a good idea. My thought are that I can use a dynamic language to get a lot of code written quickly, and then dropping down to a compiled language like c/c++ to implement performance critical code. I can see a lot of benefits of this approach: 1. Increased Productivity by primarily coding in the dynamic language 2. Availability of libraries from both languages But there are also some downsides: 1. Maintaining a bridge between the two languages 2. Dependency on two languages and language/library bugs instead of one What are the other pros/cons of this approach? Does anybody know about any resources and/or best practices around this?
0
[ 2, 3446, 6725, 38, 3143, 45, 25, 353, 3767, 29, 1886, 2556, 21, 254, 1345, 60, 800, 3726, 3726, 31, 589, 5154, 353, 40, 3010, 30, 25, 21, 11138, 16, 21, 7782, 816, 13, 5, 6448, 11570, 54, 10811, 6, 17, 9316, 816, 17, 376, 109,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 find a default constraint using INFORMATION_SCHEMA? === I'm trying to test if a given default constraint exists. I don't want to use the sysbojects table, but the more standard INFORMATION_SCHEMA. I've used this to check for tables and primary key constraints before, but I don't see default constraints anywhere. Are they not there? (I'm using MS SQL Server 2000).
0
[ 2, 184, 107, 31, 477, 21, 12838, 28804, 568, 676, 1, 7526, 540, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 1289, 100, 21, 504, 12838, 28804, 5636, 9, 31, 221, 22, 38, 259, 20, 275, 14, 10315, 18, 1192, 17759, 18, 859, 15, 47, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Adding a flash after authentication with merb-auth === What's the best way to add a flash message, for successful or unsuccessful login when using the merb-auth slice (Other than overriding sessions create)?
0
[ 2, 4721, 21, 4433, 75, 27963, 29, 55, 7549, 8, 1346, 96, 800, 3726, 3726, 98, 22, 18, 14, 246, 161, 20, 3547, 21, 4433, 2802, 15, 26, 1300, 54, 7225, 6738, 108, 76, 568, 14, 55, 7549, 8, 1346, 96, 12982, 13, 5, 9539, 119, 84...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Java Web Deployment: build code, or deploy .war? === Two main ways to deploy a J2EE/Java Web app (in a very simplistic sense): ## Deploy assembled artifacts to production box ## Here, we create the `.war` (or whatever) elsewhere, configure it for production (possibly creating numerous artifacts for numerous boxes) and place the resulting artifacts on the production servers. * **Pros**: No dev tools on production boxes, can re-use artifacts from testing directly, staff doing deployment doesn't need knowledge of build process * **Cons**: two processes for creating and deploying artifacts; potentially complex configuration of pre-built artifacts could make process hard to script/automate; have to version binary artifacts ## Build the artifacts **on** the production box ## Here, the same process used day-to-day to build and deploy locally on developer boxes is used to deploy to production. * **Pros**: One process to maintain; and it's heavily tested/validated by frequent use. Potentially easier to customize configuration at artifact creation time rather than customize pre-built artifact afterword; no versioning of binary artifacts needed. * **Cons**: Potentially complex development tools needed on all production boxes; deployment staff needs to understand build process; you **aren't** deploying what you tested I've mostly used the second process, admittedly out of necessity (no time/priority for another deployment process). Personally I don't buy arguments like "the production box has to be clean of all compilers, etc.", but I **can** see the logic in deploying what you've tested (as opposed to building another artifact). However, Java Enterprise applications are so sensitive to configuration, it feels like asking for trouble having two processes for configuring artifacts. Thoughts?
0
[ 2, 8247, 2741, 10475, 45, 1895, 1797, 15, 54, 17617, 13, 9, 1885, 60, 800, 3726, 3726, 81, 407, 2847, 20, 17617, 21, 487, 135, 2851, 118, 1004, 1385, 2741, 4865, 13, 5, 108, 21, 253, 22862, 255, 3771, 1259, 6, 45, 6926, 5910, 17...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I use a shell command to tar a list of files and folders with exclusions === How do I tar a list of files and folders (all in the same directory) with the exclusion of a single directory (which contains a huge amount of data)
0
[ 2, 184, 107, 31, 275, 21, 3593, 1202, 20, 2475, 21, 968, 16, 6488, 17, 19294, 18, 29, 16232, 18, 800, 3726, 3726, 184, 107, 31, 2475, 21, 968, 16, 6488, 17, 19294, 18, 13, 5, 1233, 19, 14, 205, 16755, 6, 29, 14, 16232, 16, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
How to set cpu load on a RedHat linux box === I have a RHEL box that I need to put under a moderate and variable amount of cpu load (50%-75%). What is the best way to go about this? Is there a program that can do this that I am not aware of? I am happy to write some C code to make this happen, I just don't know what system calls will help.
0
[ 2, 184, 20, 309, 17578, 6305, 27, 21, 402, 6775, 13024, 1649, 800, 3726, 3726, 31, 57, 21, 9940, 255, 1649, 30, 31, 376, 20, 442, 131, 21, 8063, 17, 7612, 2006, 16, 17578, 6305, 13, 5, 21703, 8, 465, 1933, 6, 9, 98, 25, 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...
.NET Compact Framework 3.5 on Windows Mobile 2003 SE === Does .NET Compact Framework 3.5 work on Windows Mobile 2003 SE without limitations?
0
[ 2, 13, 9, 2328, 8285, 6596, 203, 9, 264, 27, 1936, 3241, 973, 1353, 800, 3726, 3726, 630, 13, 9, 2328, 8285, 6596, 203, 9, 264, 170, 27, 1936, 3241, 973, 1353, 366, 14070, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
SQL Server Temp Tables and Connection Pooling === I have a multi-user ASP.NET app running against SQL Server and want to have StoredProcA create a #temptable temp table - not a table variable - to insert some data, then branch to StoredProcB, StoredProcC, and StoredProcD to manipulate the data in #temptable per business rules. The web app uses connection pooling when talking to SQL. Will I get a new #temptable scratch area for each call of StoredProcA? Or will the connection pooling share the #temptable between users?
0
[ 2, 4444, 255, 8128, 13, 9577, 7484, 17, 2760, 3067, 68, 800, 3726, 3726, 31, 57, 21, 1889, 8, 16704, 28, 306, 9, 2328, 4865, 946, 149, 4444, 255, 8128, 17, 259, 20, 57, 8214, 15617, 58, 1600, 21, 6926, 9577, 5924, 13, 9577, 859,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 compare structs for equality in C? === How do you compare two instances of structs for equality in standard C?
0
[ 2, 184, 107, 42, 11590, 13, 10346, 18, 26, 10337, 19, 272, 60, 800, 3726, 3726, 184, 107, 42, 11590, 81, 13946, 16, 13, 10346, 18, 26, 10337, 19, 1236, 272, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
OC4J 10.1.3.4 problem with deploying multiple 2.1 EJBs === I am having troubles migrating from OC4J 10.1.2.3 to 10.1.3.4. The problem is for applications that have multiple EJBs (all are 2.1, no EJB 3.0). Jdeveloper will take the default ejb-jar.xml (the one required for Jdeveloper to run it on its stand-alone OC4J instance) and package it into each EJB JAR module NO MATTER what. This results in the app server drilling into each EJB JAR module when deploying, and find the same ejb-jar.xml file N times (where N = number of EJB Modules). This results in duplicate EJB references and will break any JNDI lookups such as: "java:comp/env/ejb/EJBName". Thus deploying an app that has 3 EJBs, EJB1, EJB2 and EJB3 causes the app server to register 9 EJBs instead of 3. **I need a best practices way, but in between the way 10.1.3.4 and JDeveloper are acting the situation is rather dire...** Side note: They will work if the web app's JNDI look-up code is refractored to just "ejb/EJBName". This is not desirable though.
0
[ 2, 13, 2499, 300, 728, 332, 9, 165, 9, 240, 9, 300, 1448, 29, 17617, 68, 1886, 172, 9, 165, 13, 10022, 4562, 800, 3726, 3726, 31, 589, 452, 16615, 28749, 37, 13, 2499, 300, 728, 332, 9, 165, 9, 135, 9, 240, 20, 332, 9, 165, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the default session timeout for a Java EE website? === If I do not specify the following in my web.xml file: <session-config> <session-timeout>600</session-timeout> </session-config> What will be my default session timeout?
0
[ 2, 98, 25, 14, 12838, 3723, 85, 1320, 26, 21, 8247, 13, 2851, 2271, 60, 800, 3726, 3726, 100, 31, 107, 52, 19077, 14, 249, 19, 51, 2741, 9, 396, 8184, 3893, 45, 13, 1, 7202, 5991, 8, 14093, 2816, 1, 13, 1, 7202, 5991, 8, 891...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Would you consider float values to behave differently across a release and debug builds to be a bug? === My application is generating different floating point values when I compile it in release mode and in debug mode. The only reason that I found out is I save a binary trace log and the one from the release build is ever so slightly off from the debug build, it looks like the bottom two bits of the 32 bit float values are different about 1/2 of the cases. Would you consider this "difference" to be a bug or would this type of difference be expected. Would this be a compiler bug or an internal library bug. For example: LEFTPOS and SPACING are defined floating point values. float def_x; int xpos; def_x = LEFTPOS + (xpos * (SPACING / 2)); The issue is in regards to the X360 compiler.
0
[ 2, 83, 42, 3563, 11510, 4070, 20, 14149, 12670, 464, 21, 830, 17, 121, 16254, 1895, 18, 20, 44, 21, 6256, 60, 800, 3726, 3726, 51, 3010, 25, 13500, 421, 8319, 454, 4070, 76, 31, 26561, 32, 19, 830, 3740, 17, 19, 121, 16254, 3740...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
GDI has been accelerated. Does anyone know when this happened? === To sketch the background of this question : at work we use Dell Precision workstations. My current one has got an NVidia Quadro FX1700. My team is developing the graphics components for a real time data acquisition system. So we are always looking out to see if the graphics operations don't use up too much CPU time. For quick checks, we have a couple of test programs that we run, which draw scenes at a specified rate ( e.g. 10 fps ) and we use plain old Task Manager to see where CPU usage is at. One of these programs is heavy on GDI DrawRectangle calls ( which are filled ). This program always used to consume about 40% CPU user-time, but since about a year or so ( just guessing here ) it only uses about 2-3 % kernel-time. So clearly some hardware acceleration is going on here. And indeed, if I turn HW-accell off, we're back to the original 40% user-time. All of this is of course good news, because we were already thinking about going to OpenGL. Year after year GDI never got the benefit of hardware acceleration. Until some time ago that is. Does anyone know anything more about this? Did Microsoft do this? Or is it gfx-card vendor specific?
3
[ 2, 489, 1115, 63, 74, 16878, 9, 630, 1276, 143, 76, 48, 1190, 60, 800, 3726, 3726, 20, 8998, 14, 2395, 16, 48, 1301, 13, 45, 35, 170, 95, 275, 13, 5491, 13133, 170, 10839, 18, 9, 51, 866, 53, 63, 330, 40, 13, 20763, 18175, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the best tool for creating user guides with screenshots on Windows? === I need to write some guides for my development team on how to get some software up and running and would like to include partial screenshots. Are there any tools that are particularly good at this? Word is *almost* there in that I can easily paste screenshots inline with text, but I need the ability to crop the images and Word image manipulation is really painful. I'm somewhat biased against screencasting as I hate having to go back to a screencast for reference and sit through a bunch of talking. Are MS OneNote or LiveWriter any good at this?
0
[ 2, 98, 25, 14, 246, 5607, 26, 2936, 4155, 14838, 29, 2324, 7868, 18, 27, 1936, 60, 800, 3726, 3726, 31, 376, 20, 2757, 109, 14838, 26, 51, 522, 173, 27, 184, 20, 164, 109, 2306, 71, 17, 946, 17, 83, 101, 20, 468, 7284, 2324, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 an alternative to conditional display:none === I inherited an application where display:none was used to control conditional display of input elements based the values of other input elements. The way this was handled is by running some pretty ugly code to evaluate field values and reset the display property in the during page load. Every time. Isn't there a better way?
0
[ 2, 25, 80, 40, 2676, 20, 21206, 3042, 45, 15746, 800, 3726, 3726, 31, 7179, 40, 3010, 113, 3042, 45, 15746, 23, 147, 20, 569, 21206, 3042, 16, 6367, 2065, 432, 14, 4070, 16, 89, 6367, 2065, 9, 14, 161, 48, 23, 9006, 25, 34, 94...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Solving the NP-complete problem in XKCD === The problem/comic in question: [http://xkcd.com/287/][1] ![General solutions get you a 50% tip][2] I'm not sure this is the best way to do it, but here's what I've come up with so far. I'm using CFML, but it should be readable by anyone. <cffunction name="testCombo" returntype="boolean"> <cfargument name="currentCombo" type="string" required="true" /> <cfargument name="currentTotal" type="numeric" required="true" /> <cfargument name="apps" type="array" required="true" /> <cfset var a = 0 /> <cfset var found = false /> <cfloop from="1" to="#arrayLen(arguments.apps)#" index="a"> <cfset arguments.currentCombo = listAppend(arguments.currentCombo, arguments.apps[a].name) /> <cfset arguments.currentTotal = arguments.currentTotal + arguments.apps[a].cost /> <cfif arguments.currentTotal eq 15.05> <!--- print current combo ---> <cfoutput><strong>#arguments.currentCombo# = 15.05</strong></cfoutput><br /> <cfreturn true /> <cfelseif arguments.currentTotal gt 15.05> <cfoutput>#arguments.currentCombo# > 15.05 (aborting)</cfoutput><br /> <cfreturn false /> <cfelse> <!--- less than 15.05 ---> <cfoutput>#arguments.currentCombo# < 15.05 (traversing)</cfoutput><br /> <cfset found = testCombo(arguments.currentCombo, arguments.currentTotal, arguments.apps) /> </cfif> </cfloop> </cffunction> <cfset mf = {name="Mixed Fruit", cost=2.15} /> <cfset ff = {name="French Fries", cost=2.75} /> <cfset ss = {name="side salad", cost=3.35} /> <cfset hw = {name="hot wings", cost=3.55} /> <cfset ms = {name="moz sticks", cost=4.20} /> <cfset sp = {name="sampler plate", cost=5.80} /> <cfset apps = [ mf, ff, ss, hw, ms, sp ] /> <cfloop from="1" to="6" index="b"> <cfoutput>#testCombo(apps[b].name, apps[b].cost, apps)#</cfoutput> </cfloop> The above code tells me that the only combination that adds up to $15.05 is 7 orders of Mixed Fruit, and it takes 232 executions of my testCombo function to complete. [1]:http://xkcd.com/287/ [2]: http://imgs.xkcd.com/comics/np_complete.png
0
[ 2, 17533, 14, 13, 8157, 8, 15990, 1448, 19, 993, 197, 6324, 800, 3726, 3726, 14, 1448, 118, 960, 596, 19, 1301, 45, 636, 21127, 6903, 396, 197, 6324, 9, 960, 118, 23114, 118, 500, 2558, 165, 500, 13, 187, 2558, 3661, 6776, 164, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...