instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
When running a Jasper report in which the SQL is embedded in the report file (.jrxml), is it possible to see the SQL that is executed? Ideally, I'd also like to see the values that are substituted for each of the $P{} placeholders.
Cheers,
Don
| stackexchange/codereview |
How can I bring a console application window to front in C# (especially when running the Visual Studio debugger)?
| stackexchange/codereview |
I am looking for a python webserver which is multithreaded instead of being multi-process (as in case of mod_python for apache). I want it to be multithreaded because I want to have an in memory object cache that will be used by various http threads. My webserver does a lot of expensive stuff and computes some large ar... | stackexchange/codereview |
I'm new to jQuery so hopefully there is an easy answer to this.
I have html similar to:
<table id="dataTable">
<tr> <!-- I want this row -->
<td>...</td>
<tr>
<tr>
<td>
<table>
<tr> <!-- I do not want this row -->
<td>...</td>
</tr>... | stackexchange/codereview |
I have a CSV file that holds about 200,000 - 300,000 records. Most of the records can be separated and inserted into a MySQL database with a simple
$line = explode("\n", $fileData);
and then the values separated with
$lineValues = explode(',', $line);
and then inserted into the database using the proper data type i.... | stackexchange/codereview |
Using MSBuild, how can I filter out unwanted extensions in my project (and folders potentially)?
Extensions like .cs, .resx files etc.
| stackexchange/codereview |
We've recently completed phase 1 of a ASP.Net website in English and French. We went with using resource files to store language specific strings, but because the site used ASP.Net AJAX and javascript heavily we rigged up a solution to pass the right files through the ASP.Net pipeline where we could catch "tokens" and ... | stackexchange/codereview |
What are the main differences between XHTML and HTML? Which one is better in your opinion, and why? Do most browsers support both?
| stackexchange/codereview |
I want to capture as a bitmap the system cursor on Windows OSes as accurately as possible.
The provided API for this is to my knowledge GetCursorInfo, DrawIconEx.
The simple chain of actions is:
Get cursor by using GetCursorInfo
Paint the cursor in a memory DC by using DrawIconEx.
Here is how the code looks roughly.
... | stackexchange/codereview |
I'm trying to save some XML-Data in my UserSettings (Properties.Settings.Default.UserSettings) in a .NET Winforms Project. Is there a Possibility to do that or would it be better to save this Data in a seperated File?
Thanks for your Answers!
| stackexchange/codereview |
I have Visual Studio 2005 Professional ENU installed and want to create GUIDs using its Create GUIDs utility. However, I cannot find it under the Tools menu. What should I do to get this utility? Thanks
| stackexchange/codereview |
I'm planning on doing my next project in c# rather than c++ (using SlimDX).
All of directX uses floats, however System.Math uses doubles. This means constantly converting between floats and doubles.
So ideally I'd like to write all the code using floats, since I'm not getting any added precision converting to floats fr... | stackexchange/codereview |
I'm new to Spring Security. How do I add an event listener which will be called as a user logs in successfully? Also I need to get some kind of unique session ID in this listener which should be available further on. I need this ID to synchronize with another server.
| stackexchange/codereview |
Which Template-Engine and Ajax-Framework/-Toolkit is able to load template information from JAR-Files?
| stackexchange/codereview |
So Google Analytics does not have an API that we can use to get our data, so is there an efficient way to programaticly fetch the data collected by Google, without logging it locally?
Edit:
I would prefer a Python or PHP solution but anything will work.
| stackexchange/codereview |
I'm trying to call the SQL statement below but get the following error:
System.Data.SqlClient.SqlException: Conversion failed when converting
the varchar value '+@buildingIDs+' to data type int.
@"SELECT id, startDateTime, endDateTime
FROM tb_bookings
WHERE buildingID IN ('+@buildingIDs+')
AND startD... | stackexchange/codereview |
Is there a way to programmatically find the location of the current user's Outlook .pst file(s) through an API call or registry entry?
| stackexchange/codereview |
What are the basic differences between a semaphore & spin-lock?
When would we use a semaphore over a spin-lock?
| stackexchange/codereview |
We know that code coverage is a poor metric to use when gauging the quality of test code. We also know that testing the language/framework is a waste of time.
On the other hand, what metrics can we use to identify quality tests? Are there any best practices or rules of thumbs that you've learned to help you identify... | stackexchange/codereview |
I know I can cycle through my tabs using cmd+{ or cmd+}, but is it possible to select a specific tab (i.e. cmd+3 for the third tab in iTerm) in Leopards' Terminal.app?
| stackexchange/codereview |
I'm trying to get something very subtle to work, it looks pretty awful right now. I'm trying to paint the background of a TGroupBox which I have overloaded the paint function of so that the corners are show through to their parent object. I've got a bunch of nested group boxes that look very decent without XPThemes.
... | stackexchange/codereview |
From the first days the .NET framework came out there was a minimum OS support:
.NET 1.0 - Windows NT or higher (Windows 98/ME are also supported)
.NET 2.0 - Windows 2000 or higher (Windows 98/ME are also supported)
.NET 3.0 - Windows XP or higher
.NET 3.5 - Windows XP or higher
This minimum OS support made possible ... | stackexchange/codereview |
I want to use Phing as a build tool and I was wondering if there any (web) interface for generating build files.
Any recommendations on alternative methods to writing those by hand would be appreciated as well.
| stackexchange/codereview |
I want to do something like the following in spring:
<beans>
...
<bean id="bean1" ... />
<bean id="bean2">
<property name="propName" value="bean1.foo" />
...
I would think that this would access the getFoo() method of bean1 and call the setPropName() method of bean2, but this doesn't seem to work.
| stackexchange/codereview |
We are currently researching ways of enhancing image quality prior to submission to OCR. The OCR engine we are currently utilizing is the Scansoft API from Nuance (v15). We were researching the Lead Tools but have since decided to look elsewhere. The licensing costs associated with Lead Tools is just too great. To ... | stackexchange/codereview |
I'm trying to get either CreateProcess or CreateProcessW to execute a process with a name < MAX_PATH characters but in a path that's greater than MAX_PATH characters. According to the docs at: http://msdn.microsoft.com/en-us/library/ms682425.aspx, I need to make sure lpApplicationName isn't NULL and then lpCommandLine... | stackexchange/codereview |
ModRewrite can easily handle stripping the www off the front of my domain.
In .htaccess:
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301... | stackexchange/codereview |
Note that I am not asking which to choose (MVC or MVP), but rather if one of the two should be used for a web application.
I realize that it might be too much work to convert an older application from its current design to a MVC or MVP pattern. However, what about for a new app? It appears these are the most popular ar... | stackexchange/codereview |
I am writing an application with a hand-crafted domain model (classes) and a hand-crafted data model (tables/relationships), and letting NHibernate take care of the mapping.
Is it best to tell the database to perform cascading updates or deletes or to tell NHibernate to do it (cascade="all-delete-orphan")? Can they bot... | stackexchange/codereview |
I have noticed that some apps like Safari and Mail show a loading indicator in the status bar (the bar at the very top of the phone) when they are accessing the network. Is there a way to do the same thing in SDK apps, or is this an Apple only thing?
| stackexchange/codereview |
I've got problems installating the VMWARE ESXi Server.
The Installation finishes without any error messages and prompts me to reboot.
After pressing Enter the System reboots. While booting through the yellow loading-screen it switches to black and displays the following Error-Message:
PANIC: Failed to find HD boot part... | stackexchange/codereview |
Currently all our files are stored on a Windows network drive and with 15 members of staff and 3 external workers, file control is beginning to become a bit of a nightmare. Even though we have a policy in place, people still seem to save file to their PCs, make changes, and copy them back without notifying anyone, send... | stackexchange/codereview |
Background
I am trying to create a copy of a business object I have created in VB.NET. I have implemented the ICloneable interface and in the Clone function, I create a copy of the object by serializing it with a BinaryFormatter and then de-serializing straight back out into another object which I return from the func... | stackexchange/codereview |
any bit of info will be helpful here. or does anybody else huge do something interesting here too?
| stackexchange/codereview |
I get the following warning when using java.net.URLEncoder.encode:
warning: [deprecation] encode(java.lang.String)
in java.net.URLEncoder has been deprecated
What should I be using instead?
| stackexchange/codereview |
What are the main reasons personal projects (software apps etc) never get to the level of competing with your salary?
To me one big problem is "on-the-fly" feature expansion, with this problem, the end only gets further and further away!
| stackexchange/codereview |
Is it possible to pass a App setting "string" in the web.config to a Common C# class?
| stackexchange/codereview |
How do you concatenate bits in VHDL? I'm trying to use the following code:
Case b0 & b1 & b2 & b3 is
...
and it throws an error
Thanks
| stackexchange/codereview |
I could use some help trying to track down an intermittent error that I've been having with our ASP.Net project for quite some time.
Intermittently when building the solution, the build will fail with the error "/: Build (web): Object reference not set to an instance of an object." The error has no associated file, lin... | stackexchange/codereview |
How would I go about implementing dynamic/docking splitter panes in a vb.net app similar to visual studio?
| stackexchange/codereview |
I currently do my textfile manipulation through a bunch of badly remembered AWK, sed, Bash and a tiny bit of Perl.
I've seen mentioned a few places that python is good for this kind of thing. How can I use Python to replace shell scripting, AWK, sed and friends?
| stackexchange/codereview |
How do I generate a random number between 0 and n?
| stackexchange/codereview |
Whenever I use the signal/slot editor dialog box, I have to choose from the existing list of slots. So the question is how do I create a custom named slot?
| stackexchange/codereview |
I have a Python application in a strange state. I don't want to do live debugging of the process. Can I dump it to a file and examine its state later? I know I've restored corefiles of C programs in gdb later, but I don't know how to examine a Python application in a useful way from gdb.
(This is a variation on my q... | stackexchange/codereview |
There are some updates with .NET 3.0 concerning how to create and use add-ins for your own applications. I read about some "pipeline" you have to create for the communication between add-in and host-application but couldn't find further information about it.
How would you made an add-in functionality in an application ... | stackexchange/codereview |
Would a C++ CLI compiler be able to compile some large sets of C++ classes without modifications?
Is C++ CLI a superset of C++?
| stackexchange/codereview |
What is the most memory efficient way to search within a string in ANSI C? (put the code up)
An example where this is needed is in embedded devices that are very short on available memory but nowadays have reasonable clock cycles.
| stackexchange/codereview |
If I have a resource that a requesting client doesn't have access to but I want to notify them about an alternate resource for which they do have access, should I send them a 403 Forbidden with the alternate resource's URI in the header or content? Or should I just send a 303 See Other redirect to the resource to which... | stackexchange/codereview |
I have a swf that is run from C:/ in the browser instead of a server (long story) and that swf loads a video that it located at ../../videos/video in relation to that swf.
Problem is, When I run it in Flex, everything is cool. Running locally, it can't find the file (not a security error) and is throwing a connectionE... | stackexchange/codereview |
I know I'll get a thousand "Depends on what you're trying to do" answers, but seriously, there really is no solid information about this online yet. Here are my assumptions - I think they're similar for alot of people right now:
It is now October 2008. I want to start writing an application for January 2009. I am w... | stackexchange/codereview |
I know the name of the table I want to find. I'm using Microsoft SQL Server Management Studio 2005, and I want to search all databases in the database server that I'm attached to in the studio. Is this possible? Do I need to query the system tables?
| stackexchange/codereview |
I have a string that I would like to print . Is it possible to center it when printing ?
| stackexchange/codereview |
My MySQL database contains several tables using different storage engines
(specifically myisam and innodb). How can I find out which tables are
using which engine?
| stackexchange/codereview |
The default chart object in the SQL Server (2005) Business Intelligence Development Studio doesn't seem to some have formatting options like :
specifying the text direction of labels in the x and y axis
adding a trendline to a bar chart
arbitrarily resizing items in a chart - for example, if I resize the chart object,... | stackexchange/codereview |
What is the one most common mistake you make while writing unit tests? Coupling? Lack of cohesion? Try to test too much functionality at once? Not testing enough functionality?
Post some example code if you have an example of that mistake
| stackexchange/codereview |
Hopefully I haven't misunderstood the meaning of "duck typing", but from what I've read, it means that I should write code based on how an object responds to methods rather than what type/class it is.
Here's the code:
def convert_hash(hash)
if hash.keys.all? { |k| k.is_a?(Integer) }
return hash
elsif hash.keys.... | stackexchange/codereview |
Python, through it's readline bindings allows for great command-line autocompletion (as described in here).
But, the completion only seems to work at the beginning of strings. If you want to match the middle or end of a string readline doesn't work.
I would like to autocomplete strings, in a command-line python progra... | stackexchange/codereview |
Since length is a JavaScript property, does it matter whether I use
for( var i = 0; i < myArray.length; i++ )
OR
var myArrayLength = myArray.length;
for( var i = 0; i < myArrayLength ; i++ )
| stackexchange/codereview |
Greetings.
I'm trying to implement some multithreaded code in an application. The purpose of this code is to validate items that the database gives it. Validation can take quite a while (a few hundred ms to a few seconds), so this process needs to be forked off into its own thread for each item.
The database may give i... | stackexchange/codereview |
I have a log file being written by another process which I want to watch for changes. Each time a change occurs I'd like to read the new data in to do some processing on it.
What's the best way to do this? I was hoping there'd be some sort of hook from the PyWin32 library. I've found the win32file.FindNextChangeNotific... | stackexchange/codereview |
Is there a standard way to see how much stack space your app has and what the highest watermark for stack usage is during a run?
Also in the dreaded case of actual overflow what happens?
Does it crash, trigger an exception or signal? Is there a standard or is it different on all systems and compilers?
I'm looking spec... | stackexchange/codereview |
Note: This question was asked at a time when C# did not yet support optional parameters (i.e. before C# 4).
We're building a web API that's programmatically generated from a C# class. The class has method GetFooBar(int a, int b) and the API has a method GetFooBar taking query params like &a=foo &b=bar.
The classes nee... | stackexchange/codereview |
Backstory: I have a PKCS#12 (p12) certificate with a symmetric cipher (password) that I used OpenSSL to convert to a PEM; opening that as text I see it contains both a BEGIN/END CERTIFICATE section as well as BEGIN/END RSA PRIVATE KEY. The .NET Framework X509Certificate class only supports the "ASN.1 DER" format, so I... | stackexchange/codereview |
I would like to experiment with ideas about distributed file synchronization/replication. To make it efficient when the user is working, I would like to implement some kind of daemon to monitor changes in some directory (e.g. /home/user/dirToBeMonitored or c:\docs and setts\user\dirToBeMonitored). So, I could be able t... | stackexchange/codereview |
How would you manually trigger additional team builds from a team build? For example, when we were in CC.Net other builds would trigger if certain builds were successful. The second build could either be projects that use this component or additional, long running test libraries for the same component.
| stackexchange/codereview |
Which is better (for the user, for longevity, for performance, for whatever) to have:
http://{site}/{login} e.g. http://wildobs.com/adam_jack
or
http://{site}/user/{login}
Pros of former:
User feels more special.
URLs are shorter.
Cons of former:
Cannot have users w/ logins matching keywords, and keywords likely gro... | stackexchange/codereview |
I have a form using multiple <cfinput type="datefield" ...>. They are positioned in such a way that the pop-up CSS calendar should appear over the field for others. However, the text fields for the other dates end up in front of the calendar.
This is only an IE issue as Firefox and Safari work just fine.
Is there a sim... | stackexchange/codereview |
I inherited this gigantic legacy Java web app using Struts 1.2.4. I have a specific question regarding ActionForms. Some of them have only String properties (even for numbers), some of them use the seemingly appropriate types (Integer, Date, String, etc). What's the best practice here?
Also, it seems that if a property... | stackexchange/codereview |
I am looking for a concise way to check a value to see if it is nil or zero. Currently I am doing something like:
if (!val || val == 0)
# Is nil or zero
end
But this seems very clumsy.
| stackexchange/codereview |
I have written an Excel VBA macro which imports data from a HTML file (stored locally) before performing calculations on the data.
At the moment the HTML file is referred to with an absolute path:
Workbooks.Open FileName:="C:\Documents and Settings\Senior Caterer\My Documents\Endurance Calculation\TRICATEndurance Summa... | stackexchange/codereview |
I'd like to run a script to populate my database. I'd like to access it through the Django database API.
The only problem is that I don't know what I would need to import to gain access to this.
How can this be achieved?
| stackexchange/codereview |
Is there a way in Visio VBA to see if there is a shape in front of or behind a shape in Visio?
I imagine I could write something that checks the bounding box of each shape in a page to see if it occupies the same space as my shape.
I'd rather use something built-in since checking each shape could take a long time as a ... | stackexchange/codereview |
I am having trouble getting Team Build to execute my MbUnit unit tests. I have tried to edit TFSBuild.proj and added the following parts:
<Project ...>
<UsingTask TaskName="MbUnit.MSBuild.Tasks.MbUnit" AssemblyFile="path_to_MbUnit.MSBuild.Tasks.dll" />
...
...
<ItemGroup>
<TestAssemblies Include="$(OutDir)\... | stackexchange/codereview |
I am trying to recreate a Perl script in C# but have a problem creating a checksum value that a target system needs.
In Perl this checksum is calculated using the unpack function:
while (<PACKAGE>) {
$checksum += unpack("%32C*", $_);
}
$checksum %= 32767;
close(PACKAGE);
where PACKAGE is the .tar file input stream... | stackexchange/codereview |
I love Python because it comes batteries included, and I use built-in functions, a lot, to do the dirty job for me.
I have always been using happily the os.path module to deal with file path but recently I ended up with unexpected results on Python 2.5 under Ubuntu linux, while dealing with string that represent window... | stackexchange/codereview |
I have a multi-user application that keeps a centralized logfile for activity. Right now, that logging is going into text files to the tune of about 10MB-50MB / day. The text files are rotated daily by the logger, and we keep the past 4 or 5 days worth. Older than that is of no interest to us.
They're read rarely: e... | stackexchange/codereview |
My question is the following.
I have xml that is versioned by a namespace. I want to serialize this received xml into the appropriate object, but the only way I know to do this means I have to process the xml two times. First to discover the namespace, and then in order to serialize to the object of the proper type b... | stackexchange/codereview |
I need to have multiple forms in the same webpage, all of them POSTing to itself and then performing different actions depending on the type of form.
What's the best way to achieve this?
To be more specific, the page shows the details of an event, with a form to subscribe (a drop-down box) and another form for each of ... | stackexchange/codereview |
Is OpenID a secure method of authentication users on a website?
And, if not, what are the security risks associated with OpenID?
| stackexchange/codereview |
Using Oracle, if a column value can be 'YES' or 'NO' is it possible to constrain a table so that only one row can have a 'YES' value?
I would rather redesign the table structure but this is not possible.
[UDPATE] Sadly, null values are not allowed in this table.
| stackexchange/codereview |
I am using Symphony framework and I have the default sandbox inside the Eclipse IDE. When I double click schema.yml instead of open in Eclipse it requests Windows to select a program to choose. I am a Visual Studio guy and I do not understand why it doesn't open in Eclipse, what should I do?
| stackexchange/codereview |
Instead of using the <input type="file"> tag I'd like to have a button that launches a file browser dialog.
My first thought was to have a hidden file input tag and a button. I'd use the button click on the button to fire the onclick of the hidden file input, but I haven't been able to get this working properly.
So th... | stackexchange/codereview |
How do I convert a hex string to an integer?
"0xffff" ⟶ 65535
"ffff" ⟶ 65535
| stackexchange/codereview |
How can I modify a SharePoint site so that versioning is turned on by default in Document Libraries?
| stackexchange/codereview |
I'm looking for an open-source library for editing AAC metadata in M4A files (as appearing in iTunes). Specifically, I need to be able to add an album art tag. It should be something similar to id3lib, which works with ID3 tags on MP3 files.
| stackexchange/codereview |
I would like to be able to write a Java class in one package which can access non-public methods of a class in another package without having to make it a subclass of the other class. Is this possible?
| stackexchange/codereview |
I've always had a thing for C++/CLI. Maybe because not many developers use it... or just because it's different.
Suppose Microsoft fully supported C++/CLI as they do VB.NET and C# (ie. LINQ, WPF, etc.). Would you use it?
If not, why?
| stackexchange/codereview |
I am trying to retrieve the attribute name and type that exist in an entity, Dynamic Entity to be precise. I have the following code.
DynamicEntity contactEntity = new DynamicEntity();
contactEntity.Name = EntityName.contact.ToString();
Property t = null;
foreach (Property prop_Test in contactEntity.Properties)
{
... | stackexchange/codereview |
I've searched around a bit, but haven't found a satisfactory answer, so I'd like to hear your opinions on this.
I have a couple of tools which I have to update and deploy to a few servers every now and then. The source is managed in a SVN repository.
To save myself the bother of copying the binaries to the production s... | stackexchange/codereview |
I've seen a number of 'code metrics' related questions on SO lately, and have to wonder what the fascination is? Here are some recent examples:
what code metrics convince you that provided code is crappy
when if ever is number of lines of code a useful metric
writing quality tests
In my mind, no metric can substitute... | stackexchange/codereview |
I inherited this gigantic legacy Java web app using Struts 1.2.4. I have a specific question regarding Actions. Most of the pages have exactly one Action, and the processExecute() methods are hideous monsters (very long and tons of nested if statements based on request parameters).
Given that Actions are an implementat... | stackexchange/codereview |
I'm trying to retrieve an XML stream from a URL. For most URLs my code below works fine. But, I have a couple URLs that timeout. The URLs in question do work from Internet Explorer.
$webclient=New-Object "System.Net.WebClient"
[xml]$data=$webclient.DownloadString($url)
So, I went searching for a way to increase the ti... | stackexchange/codereview |
How would I drag and drop something into a static control? It looks like I need to create a sub class of COleDropTarget and include that as a member variable in a custom CStatic. That doesn't appear to be working though. When I try and drag something onto the Static control I get the drop denied cursor.
| stackexchange/codereview |
I am currently using Net::HTTP in a Ruby script to post files to a website via a multipart form post. It works great for small files, but I frequently have to send very large files using this script, and HTTP#post only seems to accept post data as a String object, which means that the file I'm sending has to be read i... | stackexchange/codereview |
I'm looking for all the current standard header values a web server would generally receive. An example would be things like "what will the header look like when coming from a Mac running OS X Leopard and Camino installed?" or "what will the header look like when coming from Fedora 9 running Firefox 3.0.1 versus SuSe ... | stackexchange/codereview |
In Oracle, I can re-create a view with a single statement, as shown here:
CREATE OR REPLACE VIEW MY_VIEW AS
SELECT SOME_FIELD
FROM SOME_TABLE
WHERE SOME_CONDITIONS
As the syntax implies, this will drop the old view and re-create it with whatever definition I've given.
Is there an equivalent in MSSQL (SQL Server 2005 o... | stackexchange/codereview |
I have two different ways of displaying items in a WPF application. The first uses a WrapPanel and the second a vertical StackPanel. I can switch between the two ways of displaying my items by switching the host panel between the two types. This does work but you get an instance change in layout.
Instead I want the ch... | stackexchange/codereview |
Every time I start Emacs I see a page of help text and a bunch of messages suggesting that I try the tutorial. How do I stop this from happening?
| stackexchange/codereview |
I was reading this answer previously and it got me interested in purchasing a Nintendo DS Lite for learning to program embedded devices. Before I go out and splurge on a DS I had a few questions:
Are there any restrictions on what you can program? The post I indicated earlier seemed to say there weren't, but clarific... | stackexchange/codereview |
I've got a Visual Basic App that tends to get severely messed up if the installation runs more than once. It seems the occasionally client mistakes the installer for the shortcut to it later on down the road, runs the installer again and it messes everything up. I can't for the life of me figure out why so I decided ... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.