instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
Do you always use a second-level cache in Hibernate or do you first try it without and only use it when the performance goes down?
| stackexchange/codereview |
When we add a variable to ASP.NET Session, where are those variables actually stored on the client side?
| stackexchange/codereview |
I am just trying to generate the classes for linq to mysql with dbmetal / visual metal and keep running into the error:
"magma string must not be empty"...
I've googled, I've recompiled locally, checked the references etc. And I don't really want to start debugging this... anybody had the same issue before or knows ... | stackexchange/codereview |
When a RewriteRule is executed by MOD_Rewrite will all the MOD_Rewrite rules be executed again for the newly generated request? Specifically in the following example, will this cause a loop?
RewriteCond Host: (?:www\.)?mysite\.com
RewriteRule ^(.*)$ $1 [QSA,L]
| stackexchange/codereview |
I'm experimenting with generics and I'm trying to create structure similar to Dataset class.
I have following code
public struct Column<T>
{
T value;
T originalValue;
public bool HasChanges
{
get { return !value.Equals(originalValue); }
}
public void AcceptChanges()
{
origi... | stackexchange/codereview |
I'm searching a wsgi middleware which I can warp around a wsgi applications and which lets me monitor incoming and outgoing http requests and header fields.
Something like firefox live headers, but for the server side.
| stackexchange/codereview |
We have a web app that allows users to upload documents, create their own documents, and so on. Uploaded files are stored on Amazon S3, created information is stored in a MySQL database. What I'm looking for is some sort of search engine, where I feed it all of our text documents, each with a unique ID, and it builds a... | stackexchange/codereview |
In
https://bugs.java.com/bugdatabase/view_bug?bug_id=6525150
it says
Release Fixed 7(b14), 6u2(b01) (Bug ID:2147561)
What does 6u2 mean? (Am I right in assuming it as 1.6.0_02 ?)
| stackexchange/codereview |
Is it possible to use a CHECK constraint to prevent any date that falls on a Sunday? I don't want to use a trigger.
| stackexchange/codereview |
Modern UI's are starting to give their UI elments nice inertia when moving. Tabs slide in, page transitions, even some listboxes and scroll elments have nice inertia to them (the iphone for example). What is the best algorythm for this? It is more than just gravity as they speed up, and then slow down as they fall i... | stackexchange/codereview |
I haven't really done any Windows scripting at all, so I am at a loss on how to pull this one off. Anyway, basically what we want to do is have a script that will take an argument on which IIS AppPool to recycle. I have done some research on Google and haven't had much success on getting things to work.
Here is what ... | stackexchange/codereview |
I'm creating an alt-tab replacement for Vista but I have some problems listing all active programs.
I'm using EnumWindows to get a list of Windows, but this list is huge. It contains about 400 items when I only have 10 windows open. It seems to be a hwnd for every single control and a lot of other stuff.
So I have to f... | stackexchange/codereview |
This may not be possible, but I figured I'd ask...
Is there any way anyone can think of to track whether or not an automatic variable has been deleted without modifying the class of the variable itself? For example, consider this code:
const char* pStringBuffer;
{
std::string sString( "foo" );
pStringBuffer = s... | stackexchange/codereview |
I have a bunch of records in several tables in a database that have a "process number" field, that's basically a number, but I have to store it as a string both because of some legacy data that has stuff like "89a" as a number and some numbering system that requires that process numbers be represented as number/year.
T... | stackexchange/codereview |
Is it possible to check out subdirectories of a repository in Git?
Imagine I am setting up a new WordPress installation. I will create two new directories for my plugin and theme customization:
wordpress/wp-content/plugins/myplugins/
wordpress/wp-content/themes/mytheme/
I want to maintain these directories via Git. ... | stackexchange/codereview |
Is there a way to get the key (or id) value of a db.ReferenceProperty, without dereferencing the actual entity it points to? I have been digging around - it looks like the key is stored as the property name preceeded with an _, but I have been unable to get any code working. Examples would be much appreciated. Thank... | stackexchange/codereview |
How do the full text search systems of PostgreSQL and MySQL compare? Is any clearly better than the oder? In which way are they different?
| stackexchange/codereview |
There are some nice things about it (like it encapsulates the concept of Cyclomatic complexity), and I was wondering if anyone has used it in "real life". If so, what are your experiences? Is it a useful measure of size (as opposed to KLOC or Function Points)?
For those wondering what I'm smoking:
Here's a link to so... | stackexchange/codereview |
I'm writing a small application in VB.NET and I would like some of the classes to be able to write themselves out to XML to serve as a "save" feature. I have seen XSD files used to generate VB classes that can serialize themselves into and out of XML very easily. How would I do this if I do have any pre-existing XML ... | stackexchange/codereview |
I have code like this:
var newMsg = new Msg
{
Var1 = var1,
Var2 = var2
};
using (AppDataContext appDataContext = new AppDataContext(ConnectionString))
{
appDataContext.CClass.InsertOnSubmit(newMsg);
appDataContext.SubmitChanges();
}
After reading this post I believe that the same logic applies.
Does a... | stackexchange/codereview |
I'm having a problem understanding the shift/reduce confict for a grammar that I know has no ambiguity. The case is one of the if else type but it's not the 'dangling else' problem since I have mandatory END clauses delimiting code blocks.
Here is the grammar for gppg (Its a Bison like compiler compiler ... and that wa... | stackexchange/codereview |
I have several long running report type transactions that take 5-10 minutes. Would I see any performance increase by using stored procs? Would it be significant?
each query runs once a night.
| stackexchange/codereview |
I am using the ADONetAppender to (try) to log data via a stored procedure (so that I may inject logic into the logging routine).
My configuration settings are listed below. Can anybody tell what I'm doing wrong?
<appender name="ADONetAppender_SqlServer" type="log4net.Appender.ADONetAppender">
<bufferSize value="1" />... | stackexchange/codereview |
I have a namespaced controller for some admin functionality. My create form does not work -- it ends up routing the request to the index action instead of the create action.
Why isn't the POST getting routed to the create action as it should (being RESTful)?
routes.rb:
map.namespace :admin do |admin|
admin.res... | stackexchange/codereview |
What would be the disadvantages (if any) of automating business process for a Enterprise/organization?
| stackexchange/codereview |
Why should I choose to use one instead of the other and in which cases?
I mainly focus on desktop applications and personally speaking I do find the humble dialog box more easy and natural to use.
| stackexchange/codereview |
As title, I need that to run an import script generated by SQL Server DB Publishing Tool. Would that work on Sql2000 server too? Also I have seen ppl reporting missing library issues related to GAC, which libraries I precisely need to include if I am not controlling the deployment server?
To know how this thing works y... | stackexchange/codereview |
I'm using SqlServer for the first time, and in every single one of our create procedure scripts there is a block of code like below to remove the procedure if it already exists:
IF EXISTS (SELECT *
FROM information_schema.routines
WHERE routine_name = 'SomeProcedureName'
AND routine_typ... | stackexchange/codereview |
Assume a table with the following columns:
pri_id, item_id, comment, date
What I want to have is a SQL query that will delete any records, for a specific item_id that are older than a given date, BUT only as long as there are more than 15 rows for that item_id.
This will be used to purge out comment records older than ... | stackexchange/codereview |
What do I use to search for multiple words in a string? I would like the logical operation to be AND so that all the words are in the string somewhere. I have a bunch of nonsense paragraphs and one plain English paragraph, and I'd like to narrow it down by specifying a couple common words like, "the" and "and", but w... | stackexchange/codereview |
I've got a dropdown list that is being populated via a webservice using ASP>NET AJAX. On the success callback of the method in javascript, I'm populating the dropdown via a loop:
function populateDropDown(dropdownId, list, enable, showCount) {
var dropdown = $get(dropdownId);
dropdown.options.length = 1;
... | stackexchange/codereview |
I have a server application that receives information over a network and processes it.
The server is multi-threaded and handles multiple sockets at time, and threads are created without my control through BeginInvoke and EndInvoke style methods, which are chained by corresponding callback functions.
I'm trying to creat... | stackexchange/codereview |
Given the following HTML:
<select name="my_dropdown" id="my_dropdown">
<option value="1">displayed text 1</option>
</select>
How do I grab the string "displayed text 1" using Javascript/the DOM?
| stackexchange/codereview |
I am doing a BHO (extension for IE) that receives events on other thread. When I access the DOM from that other thread, IE crashes. Is it possible to make the DOM accessed from the same thread as the main BHO thread so that it does not crash?
It seems like a general COM multithreading problem, which I don't understand... | stackexchange/codereview |
I'm not a newbie since I've been programming on and off since 1983, but I only have real experience with scripting languages like Applescript, ARexx, HyperTalk and Bash.
I write scripts to automate data entry, batch process images and convert file formats. I dabble at Processing, Ruby and Python.
Most of the programs I... | stackexchange/codereview |
I'm building a code in which I'd like to be able to generate an event when the user changes the focus of the cursor from an Entry widget to anywhere, for example another entry widget, a button...
So far i only came out with the idea to bind to TAB and mouse click, although if i bind the mouse click to the Entry widget ... | stackexchange/codereview |
I'm trying to grab a div's ID in the code behind (C#) and set some css on it. Can I grab it from the DOM or do I have to use some kind of control?
<div id="formSpinner">
<img src="images/spinner.gif" />
<p>Saving...</p>
</div>
| stackexchange/codereview |
According to the MSDN, the BaseDirectory is where an AppDomain will look for DLLs to load, while ExecutablePath will provide the path to the original executable file (including file name). I know that one has the file name and the other does not. I know that if I create a new AppDomain I can give it a different path.... | stackexchange/codereview |
When setting up a rollover effect in HTML, are there any benefits (or pitfalls) to doing it in CSS vs. JavaScript? Are there any performance or code maintainability issues I should be aware of with either approach?
| stackexchange/codereview |
This is on iPhone 0S 2.0. Answers for 2.1 are fine too, though I am unaware of any differences regarding tables.
It feels like it should be possible to get text to wrap without creating a custom cell, since a UITableViewCell contains a UILabel by default. I know I can make it work if I create a custom cell, but that's ... | stackexchange/codereview |
How do I change Oracle from port 8080? My Eclipse is using 8080, so I can't use that.
| stackexchange/codereview |
Say you have a bunch of files.
Say you can store meta data to these files.
Say, one of these meta attributes were called "encryption"
Say everyone was allowed to look at these files, but since they are encrypted, only people who know how to decrypt them can actually read the contents.
Say, for every given value of "enc... | stackexchange/codereview |
Error message:
fatal: git checkout: updating paths is incompatible with switching branches/forcing
How to get past this Git checkout error?
| stackexchange/codereview |
If I create a Stored Procedure in SQL and call it (EXEC spStoredProcedure) within the BEGIN/END TRANSACTION, does this stored procedure also fall into the transaction?
I didn't know if it worked like try/catches in C#.
| stackexchange/codereview |
Examples could be Infragistics or DevExpress.
But I'm also looking for your opinions on other frameworks. It could even be WPF if that is your favorite.
| stackexchange/codereview |
I am looking for a solution or recommendation to a problem I am having. I have a bunch of ASPX pages that will be localized and have a bunch of text that needs to be supported in 6 languages.
The people doing the translation will not have access to Visual Studio and the likely easiest tool is Excel. If we use Excel o... | stackexchange/codereview |
Is there a way to manually increase / decrease the timeout of a specific aspx page?
| stackexchange/codereview |
Our company has thousands of PDF documents. How do we create a simple search engine using Lucene, Solr or Nutch? We'll provide a basic Java/JSP web page were people can type in words and perform basic and/or queries then show them the document links of all matching PDF's.
| stackexchange/codereview |
I am just starting a new ASP.NET project and using the MVP pattern. I did consider the MS MVC but it is not released yet and would be a big learning curve for some people on the team, so I opted for MVP now and possibly future projects MVC.
Anyway, it seems I will have a single Controller/Presenter class for every webf... | stackexchange/codereview |
If I do the following:
import subprocess
from cStringIO import StringIO
subprocess.Popen(['grep','f'],stdout=subprocess.PIPE,stdin=StringIO('one\ntwo\nthree\nfour\nfive\nsix\n')).communicate()[0]
I get:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/build/toolchain/mac32/python-2.4.3/lib/py... | stackexchange/codereview |
Is there a maximum number of characters that can be written to a file using a StreamWriter? Or is there a maximum number of characters that WriteLine() can output? I am trying to write some data to a file but all of the data does not seem to make it. This is the current state of my code:
StreamWriter sw = new StreamWri... | stackexchange/codereview |
I have a query that I use for charting in reporting services that looks something like:
(SELECT Alpha, Beta, Gamma, Delta, Epsilon, Zeta, Eta, Theta, Iota, Kappa, Lambda, Mu,Nu, Xi from tbl
WHERE
Alpha in (@Alphas) and
Beta in (@Betas) and
Gamma in (@Gammas) and
Delta in (@Deltas) and
Epsilon in (@Epsilons) and... | stackexchange/codereview |
I am searching for HF50(HF$HF) for example in "MyFile.txt" so that the extracted data must save to "save.txt". The data on "save.txt" now extracted again and fill the parameters and output on my table. But when I tried the code, I've got no output and "save.txt" is blank.?
Var $HF is not recognized whatever I type. Ple... | stackexchange/codereview |
I am working on a calendar application that outputs a list of events in hCalendar format. This includes an element that has a class of "description" which should be used for the event's description. My question is, what markup is allowed in my hCalendar event's description?
I found one example on the hCalendar website ... | stackexchange/codereview |
I have a .NET application that processes around 300,000 records in a batch import, and it takes a few seconds per record so I would like to parallelize this. In the following code, what's the difference between ProcessWithAnsycDelegates() and ProcessWithThreadPool()?
public class ResultNotification
{ public EventHandl... | stackexchange/codereview |
The scenario: 2 user controls (foo.ascx and fum.ascx)
foo has a method that would really like to access a property from fum. They live on the same page, but I can't find a very simple way to accomplish this sort of communication.
Any ideas?
| stackexchange/codereview |
Can I access spring bean that exposed using http invoker (server) from GWT application (client)?
If so is there any example / tutorial for that?
| stackexchange/codereview |
I have a simple page that has some iframe sections (to display RSS links). How can I apply the same CSS format from the main page to the page displayed in the iframe?
| stackexchange/codereview |
I've been using jQuery to do the whole AJAX magic in my web based applications.
But I came to a decision that I don’t need all these amazing features jQuery has, except its AJAX functions (like $.ajax(), $.get(), $.post, getJSON() and load();).
Can you recommend a lightweight crossbrowser AJAX library/framework (up to... | stackexchange/codereview |
Here's what I need to do, any ideas would be helpful.
I need to be able to change the Local IP address of a computer programmatically as a limited user in XP. Without giving Admin information to the users. I've played with runas, sanur, and autoit, but all either require giving up the Administrator password or is not... | stackexchange/codereview |
We are localizing our application and need to change the name displayed in the Start menu based on the current UI culture. We would like to do this using a Custom Action during the installation. We are using Windows Installer deployment projects and do not plan on using any third party deployment tools.
Thank you!
| stackexchange/codereview |
We have a Java codebase that is currently one Web-based Netbeans project. As our organization and codebase grows it seems obvious that we should partition the various independent pieces of our system into individual jars. So one Jar library for the data access layer, one for a general lib, one for a specialized knowled... | stackexchange/codereview |
I have a controller method that returns a list for a drop down that gets rendered in a partial, but depending on where the partial is being used, the RJS template needs to be different. Can I pass a parameter to the controller that will determine which RJS gets used?
Here is the controller method, it is very simple:
de... | stackexchange/codereview |
I have some source files that have comments written in Japanese. When I open these files in Visual Studio they appear like this:
à–¾FNCAP‰¹—p‚̃XƒŒƒbƒh
I am using the English version of WinXP, but is there a way to get Visual Studio to display the actual Japanese characters rather than the random jibberish it currentl... | stackexchange/codereview |
I am currently in the process of making a new ASP.net MVC website, and find myself using Html.Encode all over the place, which is good practice, but gets pretty messy. I think a good way to clean this up would be if I could overload an operator to automatically do Html encoding.
Previously:
<%= Html.Encode( ViewData['... | stackexchange/codereview |
My work just gave me a quad core computer, and WOW build times are fast! (What used to take 20+ minutes now takes 7 minutes).
Anyway, Visual Studio builds project in parallel (great for build times), but scrambles the output:
1>Performing Makefile project actions
3>arg.c
2>msg.c
3>log.c
4>test.c
(and so on....)
Is th... | stackexchange/codereview |
I am trying to add assert statements to a project, but they keep being skipped. Is there an option I need to enable somewhere?
The assert statement is:
Debug.Assert(false, "Deserialization failed", "Deserialization failed");
And I am running in debug mode. I could be doing something silly; I am not sure.
| stackexchange/codereview |
Is there a way to get the raw SQL string executed when calling PDOStatement::execute() on a prepared statement? For debugging purposes this would be extremely useful.
| stackexchange/codereview |
The project I'm working on uses a window.onerror event handler to report user problems. I've noticed a single user that just cannot seem to load the Google Analytics script. Our site doesn't see a lot of traffic so I'm not sure how widespread this is, but so far it seems to just effect one user.
His user agent is: ... | stackexchange/codereview |
How do I transfer the users of a vBulletin forum to a new installation of IceBB?
| stackexchange/codereview |
We use a lot of of python to do much of our deployment and would be handy to connect to our TFS server to get information on iteration paths, tickets etc. I can see the webservice but unable to find any documentation. Just wondering if anyone knew of anything?
| stackexchange/codereview |
I have a listbox that is databound to a Collection of objects. The listbox is configured to display an identifier property of each object. I would like to show a tooltip with information specific to the item within the listbox that is being hovered over rather than one tooltip for the listbox as a whole.
I am working... | stackexchange/codereview |
I would like to know how to write a macro that would send an email with attachment in excel with user's signature.
The same macro would be used by different users. So it should dynamically read any one (out of multiple html, rtf and txt files) signature file from user's location C:\Documents and Settings\" & Environ("... | stackexchange/codereview |
I am sequentially processing a large file and I'd like to keep a large chunk of it in memory, 16gb ram available on a 64 bit system.
A quick and dirty way is to do this, is simply wrap the input stream into a buffered input stream, unfortunately, this only gives me a 2gb buffer. I'd like to have more of it in memory, w... | stackexchange/codereview |
What aspects of the UpdatePanel are sensitive to time?
I have an UpdatePanel that works fine. If I leave the page for a few minutes and come back, the UpdatePanel doesn't work. Looking at firebug, I see that it sends the Request and gets a Response back. However, the page itself doesn't update. I'm not seeing any s... | stackexchange/codereview |
What exactly does the word patch mean when referring to 'submitting a patch'?
I've seen this used a lot, especially in the open source world. What what does it mean and what exactly is involved in submitting a patch?
| stackexchange/codereview |
Whats the best practice for setting up package structures in a Java Web Application?
How would you setup your src, unit test code, etc?
| stackexchange/codereview |
The expected probability of randomly selecting an element from a set of n elements is P=1.0/n .
Suppose I check P using an unbiased method sufficiently many times. What is the distribution type of P? It is clear that P is not normally distributed, since cannot be negative. Thus, may I correctly assume that P is gamma d... | stackexchange/codereview |
I have been reading the MSDN documentation on subclassing and I have been successful in handling events in a subclass
My issue is with passing messages back to the original WndProc.
As an example, if I have a window, with a sub-classed groupbox control and a button as a child of that groupbox, I want to handle the but... | stackexchange/codereview |
I've written a simple multi-threaded game server in python that creates a new thread for each client connection. I'm finding that every now and then, the server will crash because of a broken-pipe/SIGPIPE error. I'm pretty sure it is happening when the program tries to send a response back to a client that is no long... | stackexchange/codereview |
Why is it that scanf() needs the l in "%lf" when reading a double, when printf() can use "%f" regardless of whether its argument is a double or a float?
Example code:
double d;
scanf("%lf", &d);
printf("%f", d);
| stackexchange/codereview |
SqlDataReader is a faster way to process the stored procedure. What are some of the advantage/disadvantages of using SQLDataReader?
| stackexchange/codereview |
I am a college student at a school that teaches mainly in Java. One of the strong points of Java, which I quite enjoy, is the large collection of libraries. What makes these libraries especially useful is the extensive documentation and organization presented via JavaDoc. Are there any library collections for Common Li... | stackexchange/codereview |
I have a very large codebase (read: thousands of modules) that has code shared across numerous projects that all run on different operating systems with different C++ compilers. Needless to say, maintaining the build process can be quite a chore.
There are several places in the codebase where it would clean up the cod... | stackexchange/codereview |
I'm currently learning Haskell, Which language (F# or Haskell) do you prefer for programming general purpose applications?
Which do you think is the stronger language?
| stackexchange/codereview |
I am creating a "department picker" form that is going to serve as a modal popup form with many of my "primary" forms of a Winforms application. Ideally the user is going to click on an icon next to a text box that will pop up the form, they will select the department they need, and when they click OK, the dialog will ... | stackexchange/codereview |
I need to make some reflective method calls in Java. Those calls will include methods that have arguments that are primitive types (int, double, etc.). The way to specify such types when looking up the method reflectively is int.class, double.class, etc.
The challenge is that I am accepting input from an outside source... | stackexchange/codereview |
I am using some nested layouts in Ruby on Rails, and in one of the layouts i have a need to read in a string from a div and set that as the title of the document. What is correct way (if any) to set the title of the document?
<script type="text/javascript">
$(document).ready(function() {
// ???
});
</script>
| stackexchange/codereview |
I have an HTML wrapper that contains a Flex application, is there an Event that I can listen on, that is triggered when a user leaves the HTML wrapper either by navigation arrows or closing the browser?
Thanks.
| stackexchange/codereview |
Why is the following code "crashing" in PHP?
$normal_array = array();
$array_of_arrayrefs = array( &$normal_array );
end( $array_of_arrayrefs )["one"] = 1; // choking on this one
The expected result is that the final code line appends $normal_array with key one having value 1 but there is no output what so ever... | stackexchange/codereview |
I thought this would be really simple, but it's presenting some difficulties. If I have
std::string name = "John";
int age = 21;
How do I combine them to get a single string "John21"?
| stackexchange/codereview |
I am invoking an external process by using System.Diagonistics.Process and passing two filenames as parameters. Now some time this process terminates due to exceptions and it seems that files handle are not being released by the process. How can i release the resources occupied by the process.
| stackexchange/codereview |
I'm looking to utilize jQuery to handle a few very common requests we get for data tables of varying sizes: scrolling, sorting, and dynamic filtering.
I've handled scrolling in the past by having two separate tables with fixed width columns, along with associated div containers for the "actual" scrolling. However, thi... | stackexchange/codereview |
I am trying to get a list of rates for all available services from FedEx using 1 call, and having a tough time with their documentation. Anyone have some code snippets of how you interfaced with them? .Net code is preferable but anything will help more than their crapping code samples!
Thanks
| stackexchange/codereview |
How does one write a unit test that fails only if a function doesn't throw an expected exception?
| stackexchange/codereview |
I have an application I'm writing where I'm allowing the administrators to add aliases for pages, categories, etc, and I would like to use a different controller/action depending on the alias (without redirecting, and I've found that render doesn't actually call the method. I just renders the template). I have tried a ... | stackexchange/codereview |
My clients application exports and imports quite a few variables of type real through a text file using writeln and readln. I've tried to increase the width of the fields written so the code looks like:
writeln(file, exportRealvalue:30); //using excess width of field
....
readln(file, importRealvalue);
When I export... | stackexchange/codereview |
On the .Net WebBrowser control the only way I can see to load a page to it is to set the URL property. But I would like to instead give it some HTML code that I already have in memory without writing it out to a file first. Is there any way to do this? Or are there any controls that will do this?
| stackexchange/codereview |
I have a query that I'm executing from a .NET application to a SQL Server database and it seems to take quite a while to complete (5+ Minutes). I created a test app in c# to try to see what was talking so long (the query should return quickly).
As I was reconstructing the query by adding in elements to see which por... | stackexchange/codereview |
Very often when working on an ASP.NET web site, the options View Code and View Designer will be missing from the content menu in the code window, as well as missing from the View menu. They are only available in the context menu in Solution Explorer.
This happens when debugging and when not debugging. Anyone know wha... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.