instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
What are you using for binding XML to Java? JAXB, Castor, and XMLBeans are some of the available choices. The comparisons that I've seen are all three or four years old. I'm open to other suggestions. Marshalling / unmarshalling performance and ease of use are of particular interest. Clarification: I'd like to see not ...
stackexchange/codereview
We are creating custom WPF controls (not user controls) for an XBAP application and we would like to add a storyboard animation to scale the control to be 110% of its original size when the mouse hovers over it. We've used Blend to create the storyboard and it compiles just fine...however, when we run, it does not ani...
stackexchange/codereview
I'm using a std::map (VC++ implementation) and it's a little slow for lookups via the map's find method. The key type is std::string. Can I increase the performance of this std::map lookup via a custom key compare override for the map? For example, maybe std::string < compare doesn't take into consideration a simple s...
stackexchange/codereview
Is there a connection limit on Sql Server 2005 Developers Edition. We have many threads grabbing connections, and I know ADO.NET does connection pooling, but I get OutOfMemory exceptions. We take out the db connections and it works fine.
stackexchange/codereview
Is it generally better to run functions on the webserver, or in the database? Example: INSERT INTO example (hash) VALUE (MD5('hello')) or INSERT INTO example (hash) VALUE ('5d41402abc4b2a76b9719d911017c592') Ok so that's a really trivial example, but for scalability when a site grows to multiple websites or database ...
stackexchange/codereview
I've been working on a project that can't be described as 'small' anymore (40+ months), with a team that can't be defined as 'small' anymore (~30 people). We've been using Agile/Scrum (1) practices all along, and a healthy dose of TDD. I'm not sure if I picked this up from Agile or TDD, more likely a combination of the...
stackexchange/codereview
I've created a DeskBand toolbar and I want to display a button on the toolbar that has the style visual style as a taskbar button. In .NET you can use the VisualStyleRenderer to render the Taskbar BACKGROUND, but there's way to render a button. Are there any Win32 API's I can use to draw the button using Visual Styles ...
stackexchange/codereview
I am using the code below to display all the files from a directory in a drop down menu. Does anyone know how to make this alphabetical? I presume it has something to do with the sort function, I just can't figure out how! <?php $dirname = "images/"; $images = scandir($dirname); $dh = opendir($dirname); while ($file =...
stackexchange/codereview
I have an iphone app where I call these three functions in appDidFinishLaunching: glMatrixMode(GL_PROJECTION); glOrthof(0, rect.size.width, 0, rect.size.height, -1, 1); glMatrixMode(GL_MODELVIEW); When stepping through with the debugger I get EXC BAD ACCESS when I execute the first line. Any ideas why this is happeni...
stackexchange/codereview
The thing I've found about TDD is that its takes time to get your tests set up and being naturally lazy I always want to write as little code as possible. The first thing I seem do is test my constructor has set all the properties but is this overkill? My question is to what level of granularity do you write you unit ...
stackexchange/codereview
I have an MS SQL database and have a varchar field that I would like to do queries like where name like '%searchTerm%'. But right now it is too slow, even with SQL enterprise's full text indexing. Can someone explain how Lucene .Net might help my situation? How does the indexer work? How do queries work? What is ...
stackexchange/codereview
I have a list of stores, departments within the stores, and sales for each department, like so (created using max(sales) in a subquery, but that's not terribly important here I don't think): toronto baskets 500 vancouver baskets 350 halifax baskets 100 toronto noodles 275 vancouver noodles 390 halifax noo...
stackexchange/codereview
I'm writing a lightweight XML editor, and in cases where the user's input is not well formed, I would like to indicate to the user where the problem is, or at least where the first problem is. Does anyone know of an existing algorithm for this? If looking at code helps, if I could fill in the FindIndexOfInvalidXml me...
stackexchange/codereview
How can i generate bytecode (Byte[]) from a String at runtime, without using a "javac" process or something of this sort? is there a simple way of calling the compiler like that? later addition: I chose to accept the solution that actually best fits my situation. my application is a hobby-project still in design sketch...
stackexchange/codereview
Why is Oracle's to_char() function adding spaces? select length('012'), length(to_char('012')), length(to_char('12', '000')) from dual; 3, 3, 4
stackexchange/codereview
I'm trying to create Excel 2007 Documents programmatically. Now, there are two ways I've found: Manually creating the XML, as outlined in this post Using a Third Party Library like ExcelPackage. Currently, I use ExcelPackage, which has some really serious drawbacks and issues. As I do not need to create overly comple...
stackexchange/codereview
I know you cannot use a alias column in the where clause for T-SQL; however, has Microsoft provided some kind of workaround for this? Related Questions: Unknown Column In Where Clause Can you use an alias in the WHERE clause in mysql? “Invalid column name” error on SQL statement from OpenQuery results
stackexchange/codereview
Short version If I split my users into shards, how do I offer a "user search"? Obviously, I don't want every search to hit every shard. Long version By shard, I mean have multiple databases where each contains a fraction of the total data. For (a naive) example, the databases UserA, UserB, etc. might contain users wh...
stackexchange/codereview
I am using System.IO.Directory.GetCurrentDirectory() to get the current directory in my web service, but that does not give me the current directory. How do I get the current directory in a web service? Thanks Stuart
stackexchange/codereview
I have noticed that my particular instance of Trac is not running quickly and has big lags. This is at the very onset of a project, so not much is in Trac (except for plugins and code loaded into SVN). Setup Info: This is via a SELinux system hosted by WebFaction. It is behind Apache, and connections are over SSL. C...
stackexchange/codereview
Does anyone know of a good tool or plugin that enables Microsoft Word or OpenOffice Writer to add code snippets to a document in a clean manner? I'm not sure if such a plug-in even exists, so redirecting me to any other tool that can help me would be appreciated.
stackexchange/codereview
I have a HTML file that has code similar to the following. <table> <tr> <td id="MyCell">Hello World</td> </tr> </table> I am using javascript like the following to get the value document.getElementById(cell2.Element.id).innerText This returns the text "Hello World" with only 1 space between hello and wor...
stackexchange/codereview
I have a C program with an embedded Perl interpreter. I want to be able to precompile some Perl code from within the program. How do I do that? Rationale (if anyone is interested) is to be able to compile it once, store the parse tree, and execute many times (as long as the compiled code does not change). Thanks! Madhu...
stackexchange/codereview
To present user specific data, where do I store the userID of the user currently logged in? the Session?
stackexchange/codereview
I have an Access form where each record has some info that is computed on the fly. I'm using the Form_Current() event; each time a record is selected, I compute some information and change some form controls to reflect it, based on the record's ID. I want to print a bunch of these records. However, in this situation th...
stackexchange/codereview
We've been fighting with HAProxy for a few days now in Amazon EC2; the experience has so far been great, but we're stuck on squeezing more performance out of the software load balancer. We're not exactly Linux networking whizzes (we're a .NET shop, normally), but we've so far held our own, attempting to set proper ulim...
stackexchange/codereview
I noticed that writing to a file, closing it and moving it to destination place randomly fails on Vista. Specifically, MoveFileEx() would return ERROR_ACCESS_DENIED for no apparent reason. This happens on Vista SP1 at least (32 bit). Does not happen on XP SP3. Found this thread on the internets about exactly the same p...
stackexchange/codereview
What software do you use to manage Scrum software development ? We've tried Tackle and VersionOne (both free) so far and they are good except for the fact that it's difficult to track work in progress. For example, if I have a task that I estimate will take me 8 hours to complete, I've done 4 hours of work with 4 ho...
stackexchange/codereview
This is a problem that is affecting me. Although this description wasn´t written by me (seen at www.experts-exchange.com (1), one of the kind of sites stackoverflow was created because of) it applies 95% to the problem I´m having. Next time I won´t follow MS advice, The domain was working until I tried the suggested so...
stackexchange/codereview
In C and C++ you can tell the compiler that a number is a 'long' by putting an 'l' at the end of the number. e.g long x = 0l; How can I tell the C# compiler that a number is a byte?
stackexchange/codereview
I am trying to use a StreamReader to read a file, but it is always in use by another process so I get this error: The process cannot access the file '\arfjwknasgmed17\C$\FLAG CONDITION\CP-ARFJN-FLAG.XLS' because it is being used by another process. Is there a way I can read this without copying it? Or is that ...
stackexchange/codereview
The explorer control in Windows Vista is very handy and I would like to be able to incorporate it in an application written in WPF. I've been unable to find a stock control that is part of the Framework. This application is being specifically developed for Windows Vista and therefore, having the same look and feel as t...
stackexchange/codereview
How can one programmatically sort a union query when pulling data from two tables? For example, SELECT table1.field1 FROM table1 ORDER BY table1.field1 UNION SELECT table2.field1 FROM table2 ORDER BY table2.field1 Throws an exception Note: this is being attempted on MS Access Jet database engine
stackexchange/codereview
I have a file with fields separated by pipe characters and I want to print only the second field. This attempt fails: $ cat file | awk -F| '{print $2}' awk: syntax error near line 1 awk: bailing out near line 1 bash: {print $2}: command not found Is there a way to do this?
stackexchange/codereview
We have seen the following exceptions very frequently on IBM AIX when attempting to make an SSL connection to our server: java.net.SocketException: Socket closed at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275(Compiled Code)) at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275(Compiled Code)) at...
stackexchange/codereview
NOTE: I mention the next couple of paragraphs as background. If you just want a TL;DR, feel free to skip down to the numbered questions as they are only indirectly related to this info. I'm currently writing a python script that does some stuff with POSIX dates (among other things). Unit testing these seems a little...
stackexchange/codereview
What are the characteristics of a good UI designer? How much does one have to have graphical design abilities these days as opposed to interaction design abilities. I see this of growing importance with the advent of WPF and Silverlight. I personally consider myself good at interaction design, but would like to strengt...
stackexchange/codereview
I'm looking for suggestions on possible IPC mechanisms that I can implement in my self-made OS for an AVR32 board. My current choice is implementing the massage passing mechanism described in the books written by Tanenbaum. Is this a good choice? Are there easier way to implement IPC? Thanks
stackexchange/codereview
Found this article and a similar question was aked on stackoverflow.com as well http://www.codeproject.com/KB/miscctrl/AppControl.aspx I figured a way to communicate between the control and the exe that it is hosting would be to use the link below http://boycook.wordpress.com/2008/07/29/c-win32-messaging-with-sendmessa...
stackexchange/codereview
I'm kind of new to C++ and have some questions, this is one of them. Is there ANY reason when you are using a function that takes in one or several parameters, parameters of which you know will always be stored in a variable before the function call, to pass a copy of the variable, rather than a pointer to the variable...
stackexchange/codereview
I am building a FAQ module for my site and I want to be able to control single elements on the page even though they all have the same class. I believe this comes under siblings which I am not yet familiar with. Basically I want the user to be able to click the question div and then when they click it the answer div wi...
stackexchange/codereview
I'm reading input in a C++ program. First some integers, then a string. When I try reading the string with getline(cin,stringname);, it doesn't read the line that the user types: instead, I get an empty line, from when the user pressed Enter after typing the integers. cin>>track.day; //Int cin>>track.seriesday; //Int g...
stackexchange/codereview
The .NET coding standards PDF from SubMain that have started showing up in the "Sponsored By" area seems to indicate that properties are only appropriate for logical data members (see pages 34-35 of the document). Methods are deemed appropriate in the following cases: The operation is a conversion, such as Object.ToS...
stackexchange/codereview
I'd like to make sure that a thread is moved to a specific CPU core and can never be moved from it by the scheduler. There's a SetThreadAffinityMask() call but there's no GetThreadAffinityMask(). The reason I need this is because high resolution timers will get messed up if the scheduler moves that thread to another CP...
stackexchange/codereview
I'm considering the best way to design a permissions system for an "admin" web application. The application is likely to have many users, each of whom could be assigned a certain role; some of these users could be permitted to perform specific tasks outside the role. I can think of two ways to design this: one, with a ...
stackexchange/codereview
Is there an algorithm that is more time efficient than O(n^2) for detecting cycles within a directed graph? I have a directed graph representing a schedule of jobs that need to be executed, a job being a node and a dependency being an edge. I need to detect the error case of a cycle within this graph leading to cyclic ...
stackexchange/codereview
I went to school for programming years ago and when I got out I found a job in system administration and that is the direction my career took. I'd like to get back into development of some sort and have been 'playing' with C# and ASP.NET, but I've been hearing lots of buzz for other 'new' languages (by new I mean that ...
stackexchange/codereview
I have implemented a simple file upload-download mechanism. When a user clicks a file name, the file is downloaded with these HTTP headers: HTTP/1.1 200 OK Date: Tue, 30 Sep 2008 14:00:39 GMT Server: Microsoft-IIS/6.0 Content-Disposition: attachment; filename=filename.doc; Content-Type: application/octet-stream Content...
stackexchange/codereview
I'm writing a CESetup.dll for a Windows Mobile app. It must be unmanaged, which I have little experience with. So I'm unsure of whether I should free the memory I allocate and how I do it. Here's the function I've written: Uninstall_Init( HWND hwndParent, LPCTSTR pszInstallDir ) { LPTSTR fold...
stackexchange/codereview
I've got a DOMNode object that has some attributes. $Node->attributes is a DOMNamedNodeMap, which has no methods for removing one of the entries in the map. The DOMNode class also has no methods for removing attributes from an element. I've looked through a number of the other related classes and none of them seem to ...
stackexchange/codereview
I have the following method in my unit test project: [TestMethod] [HostType("ASP.NET")] [UrlToTest("http://localhost:3418/Web/SysCoord/ChooseEPA.aspx")] [AspNetDevelopmentServerHost("%PathToWebRoot%")] public void TestMethod1() { Page page = TestContext.RequestedPage; Assert.IsTr...
stackexchange/codereview
If anyone has done this, please let me know. I don't know anything about lucene.net. I have never used it, but I heard about it. I was wondering how something like that would integrate with the Linq entity framework?
stackexchange/codereview
I have a question at SO asking how to wire a middle tier to a DataSet. I put up an answer showing what I had come up with, but I am not happy with the tight coupling. I have just started to get into testing and find it a good goal for my code. How would this code be de-coupled to allow for unit testing? Thank you, K...
stackexchange/codereview
Is there an animation format supported in Qt (using v4.4) that will support a full alpha channel? GIF only has one-bit transparency, and I don't think Qt supports APNG. Update: MNG seems to be supported, but that's even less popular than APNG! Maybe SVG is my best bet.
stackexchange/codereview
I have a form with multiple fields that I'm validating (some with methods added for custom validation) with Jörn Zaeffere's excellent jQuery Validation plugin. How do you circumvent validation with specified submit controls (in other words, fire validation with some submit inputs, but do not fire validation with others...
stackexchange/codereview
I have a mature MFC C++ application that displays on screen and prints using CDC wrappings on the Win32 GDI. While it has been optimized over the years, I would like to replace it with something a bit faster. The graphics included rendered triangular surface models, complex polylines and polygons, and lots of text. ...
stackexchange/codereview
Having recently produced an HTML/CSS/Javascript based report from various word and excel files sent to me I'm trying to work out how to do this better in future, ideally enabling non-technical users in the office to do many of the tasks currently handed to me. There are a range of HTML editors out there but none of the...
stackexchange/codereview
The code-complete feature in Visual Studio is very useful, and it still works for C# and C++ code - but no longer works for XAML (XML) editing. Is there a setting somewhere that can re-enable this? My co-workers still have it working.
stackexchange/codereview
Does anyone have an example of using of populating a YUI DataTable with a .NET webservice? Thanks in advance. :)
stackexchange/codereview
I need to make changes to an in-use production database. Just adding a few columns. I've made the changes to the dev database with migrations. What is the best way to update the production database while preserving the existing data and not disrupting operation too much? It's MYSQL and I will be needing to add data ...
stackexchange/codereview
For my C# RichTextBox, I want to programmatically do the same thing as clicking the up arrow at the top of a vertical scroll bar, which moves the RichTextBox display up by one line. What is the code for this? Thanks!
stackexchange/codereview
I have a database with DateTime fields that are currently stored in local time. An upcoming project will require all these dates to be converted to universal time. Rather than writing a c# app to convert these times to universal time, I'd rather use available sqlserver/sql features to accurately convert these dates t...
stackexchange/codereview
What are some good toolsets for graphing/charting in a web application? Preferably open-source/freeware, and particularly looking at developing with ASP.NET MVC or Silverlight 2.0.
stackexchange/codereview
This declaration causes an overflow in VBA: Const OVERFLOWS As Long = 10 * 60 * 60 whereas setting the value directly is fine: Const COMPILES_OK As Long = 36000 How do you persuade VBA to treat literal integers as longs? Thanks
stackexchange/codereview
Disclaimer: the following is a sin against XML. That's why I'm trying to change it with XSLT :) My XML currently looks like this: <root> <object name="blarg" property1="shablarg" property2="werg".../> <object name="yetanotherobject" .../> </root> Yes, I'm putting all the textual data in attributes. I'm hopin...
stackexchange/codereview
How to get the values of the radiobuttonlist which will be selected in nested datalist to use it in multi insert later. I want to get all the values of the controls of the radiobuttonlist to use them in multi insert statement in my code.
stackexchange/codereview
I'm currently writing a C# application that does a lot of digital signal processing, which involves a lot of small fine-tuned memory xfer operations. I wrote these routines using unsafe pointers and they seem to perform much better than I first thought. However, I want the app to be as fast as possible. Would I get any...
stackexchange/codereview
How can I dock a CControlBar derived window to the middle of a splitter window (CSplitterWnd)? I would like the bar to be repositioned whenever the splitter is moved. To make it a little clearer as to what I'm after, imagine the vertical ruler in the Dialog Editor in Visual Studio (MFC only). It gets repositioned whe...
stackexchange/codereview
In C# Is there a way of getting a finer granularity with SQL exceptions? I'm aware that an aweful lot can go wrong but I want to deal with certain cases differently and parsing the Error message doesn't seem to be very elegant. Also Are the error messages created by the framework or are they db specific? For example If...
stackexchange/codereview
I once wrote a Crawler in .NET. In order to improve its scalability, I tried to take advantage of asynchronous API of .NET. The System.Net.HttpWebRequest has asynchronous API BeginGetResponse/EndGetResponse. However, this pair of API is just to get a HTTP response headers and a Stream instance from which we can extract...
stackexchange/codereview
I have several std::vector, all of the same length. I want to sort one of these vectors, and apply the same transformation to all of the other vectors. Is there a neat way of doing this? (preferably using the STL or Boost)? Some of the vectors hold ints and some of them std::strings. Pseudo code: std::vector<int> Ind...
stackexchange/codereview
This code always works, even in different browsers: function fooCheck() { alert(internalFoo()); // We are using internalFoo() here... return internalFoo(); // And here, even though it has not been defined... function internalFoo() { return true; } //...until here! } fooCheck(); I could not find a single refer...
stackexchange/codereview
I need to hide a Windows form from the taskbar but I can't use WS_EX_TOOLWINDOW because I need the system menu and min/max buttons on the form's title bar. If I switch the form to a tool window at runtime the form skinning is stuffed up. From searching on the Web I see that VB has a ShowInTaskbar property and I'm wond...
stackexchange/codereview
I have a XML schema that I will need to create Java classes for. It is not a particularly large schema, I'd say it will result in around 20 classes. I am trying to weigh up whether to use an automatic binding program (like the one supplied in JAXB or JiBX) or whether to manually write my own classes and use something l...
stackexchange/codereview
I am using DSL Tools for Visual Studio 2005. I have a DSL where at a certain point I would like to create a new Diagram using custom code. So far, I was able to create a new Diagram by overwriting the current, already opened diagram. Code follows: FEGeneratorDiagram diag = new FEGeneratorDiagram(ThisElem.Store); diag.A...
stackexchange/codereview
I currently have two text boxes which accept any number. I have a text block that takes the two numbers entered and calculates the average. I was wondering if there was a way I could bind this text block to both text boxes and utilize a custom converter to calculate the average? I currently am catching the text change...
stackexchange/codereview
In class, we are all 'studying' databases, and everyone is using Access. Bored with this, I am trying to do what the rest of the class is doing, but with raw SQL commands with MySQL instead of using Access. I have managed to create databases and tables, but now how do I make a relationship between two tables? If I have...
stackexchange/codereview
I'd like to set up a large linear programming model to solve an interesting problem. I would be most comfortable in Java. What tools/libraries are available?
stackexchange/codereview
Recently, someone asked about an algorithm for reversing a string in place in C. Most of the proposed solutions had troubles when dealing with non single-byte strings. So, I was wondering what could be a good algorithm for dealing specifically with utf-8 strings. I came up with some code, which I'm posting as an answer...
stackexchange/codereview
The company I work for currently uses "Go To Meeting" to share our desktops but it's quite expensive for what we use it for and we are looking for cheaper (or even free) alternatives. We have evaluated yuuguu and yugma but they aren't up to scratch. They are both slow and only allow the sharers to share the entire desk...
stackexchange/codereview
Has anybody been able to use CakePHP in Visual Studio using Phalanger
stackexchange/codereview
How does sharepoint identify a file type? For example, SharePoint will not allow you to upload executable files. Suppose if i rename a file extension from .exe to say, .doc, will the sharepoint allow the upload of this file?
stackexchange/codereview
How would I compile the latest version of GTK# for Windows without using cygwin? Any and All help would be appreciated.
stackexchange/codereview
I am trying to launch the ColdFusion Server Monitor on a Windows Server 2003 (Web Edition) machine running ColdFusion 8 (ver. 8,0,0,176276). It is running in stand-alone configuration. The pop-up window launches as http://www.mydomain.com/CFIDE/administrator/monitor/launch-monitor.cfm. However, I get a Flash dialogue ...
stackexchange/codereview
When hosting a WCF service on IIS you have an option of manually configuring the endpoint or declaratively by means of WebServiceHostFactory. It doesn't seem to be that difficult to manually create the endpoint so I figured I would ask. What are the benefits of using WebServiceHostFactory? Are there any performance i...
stackexchange/codereview
Is it possible to replace the standard broken image via CSS or using another technique? All my images are the same size and my have transparency. I've tried to wrap all images with a div's background: <div class="no_broken"> <img src="http://www.web.com/found.gif"/> </div> <div class="no_broken"> <img src="http://...
stackexchange/codereview
I am using ehCache to store larges amount of data. This cache is accessed about 3 times every second and must be kept up to date. I have a thread that runs which retrieves all the data i need for the cache from the database every minute into a different cache(different cachemanager also). What i want to do is copy the ...
stackexchange/codereview
I need to get the File version information from an exe file originally written in C++ from a C# program. Using Assembly.LoadFile(fullpath).GetName().Version results in a BadImageFormatException. Can anyone help? Cheers, Dan
stackexchange/codereview
I am getting the following error when I try to call a stored procedure that contains a SELECT Statement: The operation is not valid for the state of the transaction Here is the structure of my calls: public void MyAddUpdateMethod() { using (TransactionScope Scope = new TransactionScope(TransactionScopeOption.Req...
stackexchange/codereview
SQL Server (2005/2008) Each of the below statements have the same result. Does anyone know if one outperforms the other? insert into SOMETABLE values ('FieldOneValue','FieldTwoValue',3,4.55,'10/10/2008 16:42:00.000') insert into SOMETABLE select 'FieldOneValue','FieldTwoValue',3,4.55,'10/10/2008 16:42:00.000' i...
stackexchange/codereview
I am trying to rewrite URLs using mod_rewrite. It is enabled in httpd.conf and url rewriting works if the lines are in the httpd.conf file. However, I would like the rules to be in the .htaccess file. It doesn't appear that .htaccess is being processed at all by Apache on Win2k. I have ReWriteLogging turned all the w...
stackexchange/codereview
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy? Desirable features are ease of maintenance, IDE-friendliness, suitability for source control branching/merging, and easy generation of install packages. In p...
stackexchange/codereview
I am developing a piece of software in Python that will be distributed to my employer's customers. My employer wants to limit the usage of the software with a time-restricted license file. If we distribute the .py files or even .pyc files it will be easy to (decompile and) remove the code that checks the license file. ...
stackexchange/codereview
I'm developing an application which has a lot of text and also different modules which can be included or not in every build. For each saved project we generate automatically a report with all the details (i.e. description of algorithms used in that project and so on). Currently we embed all text as strings in the sour...
stackexchange/codereview
I have a list of tuples like this: [ ('a', 1), ('a', 2), ('a', 3), ('b', 1), ('b', 2), ('c', 1), ] I want to iterate through this keying by the first item, so, for example, I could print something like this: a 1 2 3 b 1 2 c 1 How would I go about doing this without keeping an item to track whether the first item is t...
stackexchange/codereview
We have a service that handles authorization based on a User Name and Password. Instead of making the username and password part of the call, we place it in the SOAP header. In a typical scenario, a Web Service calls the Authorization service at the start of execution to check that the caller is allowed to call it. ...
stackexchange/codereview
I have a class Animal and an interface it inherits from IAnimal. @MappedSuperclass public class Animal implements Serializable, IAnimal{...}. @Entity public class Jaguar extends Animal{...} My first question is, do I need to annotate the interface? I asked this because I am getting this error when I run my tests: Er...
stackexchange/codereview
I've got a workspace with multiple RCP plugin projects. We've set the target platform, so we can build against a standard set of plugins, but are not able to see source code and Javadoc for all the platform plugins. The Windows -> Preferences -> Plug-in Development -> Target Platform -> Source Code Locations page doesn...
stackexchange/codereview
I was recently working with a DateTime object, and wrote something like this: DateTime dt = DateTime.Now; dt.AddDays(1); return dt; // still today's date! WTF? The intellisense documentation for AddDays() says it adds a day to the date, which it doesn't - it actually returns a date with a day added to it, so you have ...
stackexchange/codereview
I have a TreeView windows forms control with an ImageList, and I want some of the nodes to display images, but the others to not have images. I don't want a blank space where the image should be. I don't want an image that looks like the lines that the TreeView would draw if it didn't have an ImageList. How do I get ...
stackexchange/codereview