text stringlengths 8 267k | meta dict |
|---|---|
Q: lambda expressions in vb.net I have something that is driving me absolutely crazy...
Public Function GetAccountGroups() As IList(Of AccountGroup)
Dim raw_account_groups As IList(Of AccountGroup)
raw_account_groups = _repository.GetAccountGroups().ToList()
Dim parents = (From ag In raw_acc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/67916",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Copying data from one DataTable to another What is the fastest way of transferring few thousand rows of data from one DataTable to another? Would be great to see some sample code snippets.
Edit: I need to explain a bit more. There is a filtering condition for copying the rows. So, a plain Copy() will not work.
A: Y... | {
"language": "en",
"url": "https://stackoverflow.com/questions/67929",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How can I import a raw RSS feed in C#? Does anyone know an easy way to import a raw, XML RSS feed into C#? Am looking for an easy way to get the XML as a string so I can parse it with a Regex.
Thanks,
-Greg
A: I would load the feed into an XmlDocument and use XPATH instead of regex, like so:
XmlDocument doc = new ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/67937",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: .NET XML serialization gotchas? I've run into a few gotchas when doing C# XML serialization
that I thought I'd share:
*
*You can't serialize items that are read-only (like KeyValuePairs)
*You can't serialize a generic dictionary. Instead, try this wrapper class (from http://weblogs.asp.net/pwelter34/archive/2006... | {
"language": "en",
"url": "https://stackoverflow.com/questions/67959",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "121"
} |
Q: How do I register a custom type converter in Spring? I need to pass a UUID instance via http request parameter. Spring needs a custom type converter (from String) to be registered. How do I register one?
A: Please see chapter 5 of the spring reference manual here: 5.4.2.1. Registering additional custom PropertyEdit... | {
"language": "en",
"url": "https://stackoverflow.com/questions/67980",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Simple free-or-cheap tool for rolling out Windows XP + standardized apps to a small computer lab? I manage a high-school computer lab with ~40 machines, have old PCs with varying hardware. I need to roll out Windows XP + a standard set of apps and settings for new machines, and to re-format older machines.
What too... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68006",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: I have an issue with inline vs included Javascript I am relatively new to JavaScript and am trying to understand how to use it correctly.
If I wrap JavaScript code in an anonymous function to avoid making variables public the functions within the JavaScript are not available from within the html that includes the Ja... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68012",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Folder with Extension I'm looking to have windows recognize that certain folders are associated to my application - maybe by naming the folder 'folder.myExt'.
Can this be done via the registry?
A bit more info
- This is for a x-platform app ( that's why I suggested the folder with an extension - mac can handle that ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68015",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: ResourceBundle from Java/Struts and replace expressions If I have a Resource bundle property file:
A.properties:
thekey={0} This is a test
And then I have java code that loads the resource bundle:
ResourceBundle labels = ResourceBundle.getBundle("A", currentLocale);
labels.getString("thekey");
How can I replace th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68018",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to solve error 122 from storage engine? Got this from some mysql queries, puzzled since error 122 is usually a 'out of space' error but there's plenty of space left on the server... any ideas?
A: The answer: for some reason Mysql had its tmp tables on the /tmp partition which was limited to 100M, and was filled... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68029",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How do I convert jstring to wchar_t * Let's say that on the C++ side my function takes a variable of type jstring named myString. I can convert it to an ANSI string as follows:
const char* ansiString = env->GetStringUTFChars(myString, 0);
is there a way of getting
const wchar_t* unicodeString = ...
A: JNI has a Ge... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68042",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: How To Generate A Javascript File From The Server I'm using BlogEngine.NET (a fine, fine tool) and I was playing with the TinyMCE editor and noticed that there's a place for me to create a list of external links, but it has to be a javascript file:
external_link_list_url : "example_link_list.js"
this is great, of co... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68067",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How would I host an external application in WPF? How can I host a (.Net, Java, VB6, MFC, etc) application in a WPF window ?.
I have a need to use WPF windows to wrap external applications and control the window size and location.
Does anyone have any ideas on how to accomplish this or a direction to research in?
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68072",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Switching from C# to C++. Any must-reads? I'm trying to find a least-resistance path from C# to C++, and while I feel I handle C# pretty well after two solid years, I'm still not sure I've gotten the "groove" of C++, despite numerous attempts.
Are there any particular books or websites that might be suitable for thi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68084",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: How do I copy image data to the clipboard in my XUL application? I have a XULRunner application that needs to copy image data to the clipboard. I have figured out how to handle copying text to the clipboard, and I can paste PNG data from the clipboard. What I can't figure out is how to get data from a data URL into ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68103",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Does Java save its runtime optimizations? My professor did an informal benchmark on a little program and the Java times were: 1.7 seconds for the first run, and 0.8 seconds for the runs thereafter.
*
*Is this due entirely to the loading of the runtime environment into the operating environment ?
OR
*Is it inf... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68109",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to create a windows service from java app I've just inherited a java application that needs to be installed as a service on XP and vista. It's been about 8 years since I've used windows in any form and I've never had to create a service, let alone from something like a java app (I've got a jar for the app and a ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68113",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "238"
} |
Q: Wildcards for resources in a Tomcat Servlet's context.xml I'm not overly familiar with Tomcat, but my team has inherited a complex project that revolves around a Java Servlet being hosted in Tomcat across many servers. Custom configuration management software is used to write out the server.xml, and various resource... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68120",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Plone-like search box in Django? Plone has a beautiful search box with a "Google suggest" like functionality for its site. It even indexes uploaded documents like PDFs. Does anyone know of a module that can provide this kind of functionality in a Django site?
A: Plone implements it's LiveSearch feature by maintai... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68136",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Using XmlRpc in C++ and Windows I need to use XmlRpc in C++ on a Windows platform. Despite the fact that my friends assure me that XmlRpc is a "widely available standard technology", there are not many libraries available for it. In fact I only found one library to do this on Windows, (plus another one that claims... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68144",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How Long Do You Keep Your Code? I took a data structures class in C++ last year, and consequently implemented all the major data structures in templated code. I saved it all on a flash drive because I have a feeling that at some point in my life, I'll use it again. I imagine something I end up programming will nee... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68150",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Doing away with Globals? I have a set of tree objects with a depth somewhere in the 20s. Each of the nodes in this tree needs access to its tree's root.
A couple of solutions:
*
*Each node can store a reference to the root directly (wastes memory)
*
*I can compute the root at runtime by "going up" (wastes cyc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68156",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Is it possible to get a core dump of a running process and its symbol table? Is it possible to get gdb or use some other tools to create a core dump of a running process and it's symbol table? It would be great if there's a way to do this without terminating the process.
If this is possible, what commands would y... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68160",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "72"
} |
Q: JavaScript to scroll long page to DIV I have a link on a long HTML page. When I click it, I wish a div on another part of the page to be visible in the window by scrolling into view.
A bit like EnsureVisible in other languages.
I've checked out scrollTop and scrollTo but they seem like red herrings.
Can anyone help... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68165",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "122"
} |
Q: What's the right way to branch with Visual Source Safe? What I currently do is I link the project to another location and give it the same name, then check the box where it says "Branch after share."
And then I would Check out the shared project and work off it. And finally merge with the original project.
This wor... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68169",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "34"
} |
Q: What is the best way to build an index to get the fastest read response? I need to index up to 500,000 entries for fastest read. The index needs to be rebuilt periodically , on disk. I am trying to decide between a simple file like a hash on disk or a single table in an embedded database. I have no need for an R... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68174",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Need a wiki where I can export to Word I'm looking for a wiki that I can use to track requirements for a project, but we would like to be able to export the wiki (with formatting) to Microsoft Word. Does anyone know of a wiki that does this?
A: Confluence does this. Also exports to PDF.
A: As tgamblin already me... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68178",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Microsoft Reporting Services WebServices and Java Has anyone successfully implemented a Java based solution that uses Microsoft SQL Server 2005 Reporting Services? Reporting Services comes with a set of Web Services that allow you to control the creation of a report, execution of a report, etc and I am just startin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68209",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: MVC Retrieve Model On Every Request Let’s say I'm developing a helpdesk application that will be used by multiple departments. Every URL in the application will include a key indicating the specific department. The key will always be the first parameter of every action in the system. For example
http://helpdesk/HR/M... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68234",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What's a good resource for starting to write a programming language, that's not context free? I'm looking to write a programming language for fun, however most of the resource I have seen are for writing a context free language, however I wish to write a language that, like python, uses indentation, which to my unde... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68243",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: What Causes Flash Error #2012 (Can't instantiate class)? I am new to ActionScript 3 and have run into a problem:
Using Flex Builder 3, I have a created a project with a few simple classes. If code in class A instantiates an object of class B (class B is in its own source file) then the code compiles fine, but I get ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68244",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: What is a good tool to aid in browsing/following C code? I sometimes need to modify OSS code or other peoples' code (usually C-based, but sometimes C++/Java) and find myself "grep"ing headers for types, function declarations etc. as I follow code flow and try to understand the system. Is there a good tool that exis... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68247",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Why do you need explicitly have the "self" argument in a Python method? When defining a method on a class in Python, it looks something like this:
class MyClass(object):
def __init__(self, x, y):
self.x = x
self.y = y
But in some other languages, such as C#, you have a reference to the object th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68282",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "217"
} |
Q: View/edit ID3 data for MP3 files What's a quick and easy way to view and edit ID3 tags (artist, album, etc.) using C#?
A: TagLib Sharp is pretty popular.
As a side note, if you wanted to take a quick and dirty peek at doing it yourself.. here is a C# snippet I found to read an mp3's tag info.
class MusicID3Tag
{
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68283",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "157"
} |
Q: A/B testing on a news site to improve relevance If you were running a news site that created a list of 10 top news stories, and you wanted to make tweaks to your algorithm and see if people liked the new top story mix better, how would you approach this?
Simple Click logging in the DB associated with the post entry... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68291",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Good Java Practices in Ubuntu Hey all, my Computational Science course this semester is entirely in Java. I was wondering if there was a good/preferred set of tools to use in ubuntu. Currently I use gedit with a terminal running in the bottom, but I'd like an API browser.
I've considered Eclipse, but it seems to bl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68298",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How can I make a shortcut start in a different directory when running it as an administrator on Windows Vista? I have a shortcut on my desktop which opens a command prompt with many arguments that I need. I set the 'start in' field to d:\ and it works as expected (the prompt starts in d:). When I choose Advanced -... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68307",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Does anyone have a good resource for mobile CSS templates that work on most phones/devices? More and more mobile devices are consuming content on my eCommerce sites. IPhones, Blackberries, PSPs, Windows Mobile, etc and I need some ideas how to handle repurposing my data using CSS templates for these devices. Any i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68312",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: What is the best way to implement soft deletion? Working on a project at the moment and we have to implement soft deletion for the majority of users (user roles). We decided to add an is_deleted='0' field on each table in the database and set it to '1' if particular user roles hit a delete button on a specific recor... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68323",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "56"
} |
Q: Change command Method for Tkinter Button in Python I create a new Button object but did not specify the command option upon creation. Is there a way in Tkinter to change the command (onclick) function after the object has been created?
A: Though Eli Courtwright's program will work fine¹, what you really seem to wan... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68327",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: How to copy a file to a remote server in Python using SCP or SSH? I have a text file on my local machine that is generated by a daily Python script run in cron.
I would like to add a bit of code to have that file sent securely to my server over SSH.
A: You can call the scp bash command (it copies files over SSH) w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68335",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "135"
} |
Q: What level of complexity requires a framework? At what level of complexity is it mandatory to switch to an existing framework for web development?
What measurement of complexity is practical for web development? Code length? Feature list? Database Size?
A: If you work on several different sites then by using a c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68340",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Implement symmetric difference in SQL Server? Here's a problem I've been trying to solve at work. I'm not a database expert, so that perhaps this is a bit sophomoric. All apologies.
I have a given database D, which has been duplicated on another machine (in a perhaps dubious manner), resulting in database D'. It ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68346",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: List comparison I use this question in interviews and I wonder what the best solution is.
Write a Perl sub that takes n lists, and then returns 2^n-1 lists telling you which items are in which lists; that is, which items are only in the first list, the second, list, both the first and second list, and all other comb... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68352",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What is your single most favorite command-line trick using Bash? We all know how to use <ctrl>-R to reverse search through history, but did you know you can use <ctrl>-S to forward search if you set stty stop ""? Also, have you ever tried running bind -p to see all of your keyboard shortcuts listed? There are over... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68372",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "156"
} |
Q: How to write a Rails mixin that spans across model, controller, and view In an effort to reduce code duplication in my little Rails app, I've been working on getting common code between my models into it's own separate module, so far so good.
The model stuff is fairly easy, I just have to include the module at the b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68391",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Comparing names Is there any simple algorithm to determine the likeliness of 2 names representing the same person?
I'm not asking for something of the level that Custom department might be using. Just a simple algorithm that would tell me if 'James T. Clark' is most likely the same name as 'J. Thomas Clark' or 'Jam... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68408",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Combinging SWFs and other resources into a single SWF file We have a program that produces several SWF files, some CSS and XML files, all of which need to be deployed for the thing to work.
Is there a program or technique out there for wrapping all these files together into a single SWF file?
A: If you use the Flex... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68444",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How can I change the main display via AppleScript? From the Displays pane in System Preferences, I can manually change the main monitor by dragging the menu bar from one display to the other. I'd like to automate this and make it part of an AppleScript.
A: The tool I wrote, displayplacer, does this.
Configure your ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68447",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: How to merge from branch to branch and back again (bidirectional merging) in SVN? Using the svnmerge.py tool it is possible to merge between branches, up and down. It is hard to find the details for doing this. Hopefully, v1.5 will have a neat method for doing this without using svnmerge.py - details requested!
A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68448",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Is anyone using the ASP.NET MVC Framework on live sites? Is it ready for that?
I've been playing with it for a short amount of time and it seems quite reasonable. Is anyone using it for live sites?
any issues to be aware of?
A: Yes, this one.
A: Well, stackoverflow.com is.
A: Yes, www.jobtree.com.au is. I also h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68456",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Refactoring and Source Control: How To? I am completely on board with the ideas behind TDD, Refactoring and Patterns however it does seem like there is a huge gaping whole in these ideas, mainly that they are great for dev teams of 1, but when you start refactoring code that 10 people are working on you start gettin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68459",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Send file using POST from a Python script Is there a way to send a file using POST from a Python script?
A: Looks like python requests does not handle extremely large multi-part files.
The documentation recommends you look into requests-toolbelt.
Here's the pertinent page from their documentation.
A: The only thin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68477",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "168"
} |
Q: How to show loading spinner in jQuery? In Prototype I can show a "loading..." image with this code:
var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars,
onLoading: showLoad, onComplete: showResponse} );
function showLoad () {
...
}
In jQuery, I can load a server page into an element with this... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68485",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "438"
} |
Q: how to get through spam filters? I sent 3 emails last week as replies from our website. None received them! One was yahoo, hotmail and an overseas domain. I am wondering if it's not a good idea to open a yahoo account with our domain name as the user just to reply to prospective buyers.
A: Your mail server's IP ma... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68495",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is inline code in your aspx pages a good practice? If I use the following code I lose the ability to right click on variables in the code behind and refactor (rename in this case) them
<a href='<%# "/Admin/Content/EditResource.aspx?ResourceId=" + Eval("Id").ToString() %>'>Edit</a>
I see this practice everywhere but... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68509",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Should I use EJB3 or Spring for my business layer? My team is developing a new service oriented product with a web front-end. In discussions about what technologies we will use we have settled on running a JBoss application server, and Flex frontend (with possible desktop deployment using Adobe AIR), and web servic... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68527",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "73"
} |
Q: Design problem regarding type slicing with many different subclasses A basic problem I run into quite often, but ever found a clean solution to, is one where you want to code behaviour for interaction between different objects of a common base class or interface. To make it a bit concrete, I'll throw in an example;
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68537",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: libxml2-p25 on OS X 10.5 needs sudo? When trying to use libxml2 as myself I get an error saying the package cannot be found. If I run as as super user I am able to import fine.
I have installed python25 and all libxml2 and libxml2-py25 related libraries via fink and own the entire path including the library. Any ide... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68541",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Best Practice for Creating Data Tables Without Controls in ASP.net So, I am kinda new to ASP.net development still, and I already don't like the stock ASP.net controls for displaying my database query results in table format. (I.e. I would much rather handle the HTML myself and so would the designer!)
So my question... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68543",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: "Winning" OO programming job interviews with sysadmin/Perl/Linux background? I'm a student in software engineering in Montreal. For the last 3 years I've had a few interships (once per year). The first two (in the same company) were mostly sysadmin jobs, but I did get to do a few Perl programs (mostly log file analy... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68548",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How do you stop a Visual Studio generated web service proxy class from encoding? I'm using a Visual Studio generated proxy class to access a web service (added the web service as a web reference to my project). The problem is that the function the web service exposes expects a CDATA element, i.e.:
<Function><![CDAT... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68555",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: VS2008 Setup Project always requires .NET 3.5 at install time but I don't need it! 1, Create and build a default Windows Forms project and look at the project properties. It says that the project is targetting .NET Framework 2.0.
2, Create a Setup project that installs just the single executable from the Windows Fo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68561",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: What XML parser do you use for PHP? I like the XMLReader class for it's simplicity and speed. But I like the xml_parse associated functions as it better allows for error recovery. It would be nice if the XMLReader class would throw exceptions for things like invalid entity refs instead of just issuinng a warning.
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68565",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: text watermark on website? how to do it? I am a C++/C# developer and never spent time working on web pages. I would like to put text (randomly and diagonally perhaps) in large letters across the background of some pages. I want to be able to read the foreground text and also be able to read the "watermark". I und... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68569",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: Fluent NHibernate Architecture Question I have a question that I may be over thinking at this point but here goes...
I have 2 classes Users and Groups. Users and groups have a many to many relationship and I was thinking that the join table group_users I wanted to have an IsAuthorized property (because some groups a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68572",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Multiple cases in switch statement Is there a way to fall through multiple case statements without stating case value: repeatedly?
I know this works:
switch (value)
{
case 1:
case 2:
case 3:
// Do some stuff
break;
case 4:
case 5:
case 6:
// Do some different stuff
break;
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68578",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "712"
} |
Q: foreach access the index or an associative array I have the following code snippet.
$items['A'] = "Test";
$items['B'] = "Test";
$items['C'] = "Test";
$items['D'] = "Test";
$index = 0;
foreach($items as $key => $value)
{
echo "$index is a $key containing $value\n";
$index++;
}
Expected output:
0 is a A cont... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68583",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Good ways to test a unit that communicates via HTTP Often, I find myself wanting to write a unit test for a portion of code that accesses HTTP resources as part of its normal function. Have you found any good ways to write these kinds of tests?
A: Extract the part that accesses the HTTP resources out of your main c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68592",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How do I drag and drop files into an application? I've seen this done in Borland's Turbo C++ environment, but I'm not sure how to go about it for a C# application I'm working on. Are there best practices or gotchas to look out for?
A: Another common gotcha is thinking you can ignore the Form DragOver (or DragEnter)... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68598",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "277"
} |
Q: Text Centering Using CSS not working in IE I am having problems getting text within a table to appear centered in IE.
In Firefox 2, 3 and Safari everything work fine, but for some reason, the text doesn't appear centered in IE 6 or 7.
I'm using:
h2 {
font: 300 12px "Helvetica", serif;
text-align: center;
t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68610",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Mixing EJB 2.x BMP entity beans with Hibernate 3.x I have a large application that uses EJB 2.x entity beans (BMP). This is well-known to be a horrible persistence strategy (I can elaborate if necessary).
I'd like to start migrating this application to use a much more expressive, transparent, and non-invasive persis... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68614",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Design question: does the Phone dial the PhoneNumber, or does the PhoneNumber dial itself on the Phone? This is re-posted from something I posted on the DDD Yahoo! group.
All things being equal, do you write phone.dial(phoneNumber) or phoneNumber.dialOn(phone)? Keep in mind possible future requirements (account numb... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68617",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How to parse a query string into a NameValueCollection in .NET I would like to parse a string such as p1=6&p2=7&p3=8 into a NameValueCollection.
What is the most elegant way of doing this when you don't have access to the Page.Request object?
A: To do this without System.Web, without writing it yourself, and withou... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68624",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "188"
} |
Q: Are tuples more efficient than lists in Python? Is there any performance difference between tuples and lists when it comes to instantiation and retrieval of elements?
A: You should also consider the array module in the standard library if all the items in your list or tuple are of the same C type. It will take les... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68630",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "307"
} |
Q: Regex that Will Match a Java Method Declaration I need a Regex that will match a java method declaration. I have come up with one that will match a method declaration, but it requires the opening bracket of the method to be on the same line as the declaration. If you have any suggestions to improve my regex or simpl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68633",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: Can you have a class in a struct? Is it possible in C# to have a Struct with a member variable which is a Class type? If so, where does the information get stored, on the Stack, the Heap, or both?
A: If one of the fields of a struct is a class type, that field will either hold the identity of a class object or els... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68640",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "31"
} |
Q: Class (static) variables and methods How do I create class (i.e. static) variables or methods in Python?
A: In regards to this answer, for a constant static variable, you can use a descriptor. Here's an example:
class ConstantAttribute(object):
'''You can initialize my value but not change it.'''
def __init... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68645",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2469"
} |
Q: Get PHP to stop replacing '.' characters in $_GET or $_POST arrays? If I pass PHP variables with . in their names via $_GET PHP auto-replaces them with _ characters. For example:
<?php
echo "url is ".$_SERVER['REQUEST_URI']."<p>";
echo "x.y is ".$_GET['x.y'].".<p>";
echo "x_y is ".$_GET['x_y'].".<p>";
... outputs t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68651",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "89"
} |
Q: Algorithm for finding characters in the same positions in a list of strings? Suppose I have:
*
*Toby
*Tiny
*Tory
*Tily
Is there an algorithm that can easily create a list of common characters in the same positions in all these strings? (in this case the common characters are 'T' at position 0 and 'y' at pos... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68664",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: CLIPBRD_E_CANT_OPEN error when setting the Clipboard from .NET Why does the following code sometimes causes an Exception with the contents "CLIPBRD_E_CANT_OPEN":
Clipboard.SetText(str);
This usually occurs the first time the Clipboard is used in the application and not after that.
A: This is caused by a bug/featur... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68666",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "62"
} |
Q: How can I print a binary value as hex in TSQL? I'm using SQL Server 2000 to print out some values from a table using PRINT. With most non-string data, I can cast to nvarchar to be able to print it, but binary values attempt to convert using the bit representation of characters. For example:
DECLARE @binvalue binar... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68677",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "40"
} |
Q: DefaultButton in ASP.NET forms What is the best solution of defaultButton and "Enter key pressed" for ASP.NET 2.0-3.5 forms?
A: Just add the "defaultbutton" attribute to the form and set it to the ID of the button you want to be the default.
<form defaultbutton="button1" runat="server">
<asp:textbox id="textbo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68688",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What's the best way to extract table content from a group of HTML files? After cleaning a folder full of HTML files with TIDY, how can the tables content be extracted for further processing?
A: I've used BeautifulSoup for such things in the past with great success.
A: Depends on what sort of processing you want to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68691",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: PHP: Can I reference a single member of an array that is returned by a function? any idea how if the following is possible in PHP as a single line ?:
<?php
$firstElement = functionThatReturnsAnArray()[0];
... It doesn't seem to 'take'. I need to do this as a 2-stepper:
<?php
$allElements = functionThatReturnsAnArra... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68711",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Good pattern or framework for adding auditing to an existing app? I have an existing J2EE enterprise application to which I need to add auditing, i.e. be able to record CRUD operations on several important domain types (Employee, AdministratorRights, etc.).
The application has a standard n-tier architecture:
*
*W... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68746",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Working with USB devices in .NET Using .Net (C#), how can you work with USB devices?
How can you detect USB events (connections/disconnections) and how do you communicate with devices (read/write).
Is there a native .Net solution to do this?
A: Go for LibUSBDotNet, a .NET wrapper for libusb library to access USB d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68749",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "49"
} |
Q: How do you write a C# Extension Method for a Generically Typed Class This should hopefully be a simple one.
I would like to add an extension method to the System.Web.Mvc.ViewPage< T > class.
How should this extension method look?
My first intuitive thought is something like this:
namespace System.Web.Mvc
{
publi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68750",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: How can you tell if viewstate in an ASP.Net application has been tampered with? During a discussion about security, a developer on my team asked if there was a way to tell if viewstate has been tampered with. I'm embarrassed to say that I didnt know the answer. I told him I would find out, but thought I would give s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68764",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Best way to open a socket in Python I want to open a TCP client socket in Python. Do I have to go through all the low-level BSD create-socket-handle / connect-socket stuff or is there a simpler one-line way?
A: Opening sockets in python is pretty simple. You really just need something like this:
import socket
sock ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68774",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "52"
} |
Q: How does your company manage credentials? This is a call for suggestions and even possible solutions. I haven't been at a company that really seemed to get credential management 'right'.
I've seen excel/word documents and even post-it note 'solutions'.
But my main question is what is the right way to do it?
I have i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68792",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Dynamically hiding columns in a NSTableView I want to dynamically hide/show some of the columns in a NSTableView, based on the data that is going to be displayed - basically, if a column is empty I'd like the column to be hidden. I'm currently populating the table with a controller class as the delegate for the tabl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68821",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Prevent Visual Studio from crashing (sometimes) How can I stop Visual Studio (both 2005 and 2008) from crashing (sometimes) when I select the "Close All But This" option?This does not happen all the time either.
A: First, check Windows Update and make sure both VS environments are up to date.
If that doesn't help, ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68832",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: Why don't we get a compile time error even if we don't include stdio.h in a C program? How does the compiler know the prototype of sleep function or even printf function, when I did not include any header file in the first place?
Moreover, if I specify sleep(1,1,"xyz") or any arbitrary number of arguments, the compi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68843",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Where am I supposed to see FirePHP output? I am trying out FirePHP.
I installed it and restarted Firefox, enabled Firebug for my localhost, moved the demo oo.php file that comes with the download into an IIS virtual directory, changed the include path, removed the apache_request_headers() call since I am running IIS... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68851",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Automatic Internationalization Testing For Web Does there exist a website service or set of scripts that will tell you whether your web page badly configured if your goal is to be internationally friendly?
To be more precise, I'm wondering if something like this exists:
Checking URL: http://www.example.com
GET / HTT... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68898",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do you measure the time a function takes to execute? How can you measure the amount of time a function will take to execute?
This is a relatively short function and the execution time would probably be in the millisecond range.
This particular question relates to an embedded system, programmed in C or C++.
A: ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68907",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to fix the endless printing loop bug in Nevrona Rave Nevrona Designs' Rave Reports is a Report Engine for use by Embarcadero's Delphi IDE.
This is what I call the Rave Endless Loop bug. In Rave Reports
version 6.5.0 (VCL10) that comes bundled with Delphi 2006, there is a
nortorious bug that plagues many Rave rep... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68929",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Given an unsigned int, what's the fastest way to get the "indexes" of the set bits? So for e.g. 0110 has bits 1 and 2 set, 1000 has bit 3 set 1111 has bits 0,1,2,3 set
A: If there are really only 4 bits, then the fastest method would certainly involve a lookup table. There are only 16 different possibilities after ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68964",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Anyone know of a scratch like program construction UI framework? I quite like the drag and drop pluggable programming blocks in scratch ( http://scratch.mit.edu/ )
I'd like to be able to get users to create their own mini scripts using the same kind of technique...
just wondering if anyone knows of anything simila... | {
"language": "en",
"url": "https://stackoverflow.com/questions/68976",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.