text string | meta dict |
|---|---|
Q: python threadsafe object cache I have implemented a python webserver. Each http request spawns a new thread.
I have a requirement of caching objects in memory and since its a webserver, I want the cache to be thread safe. Is there a standard implementatin of a thread safe object cache in python? I found the followin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213455",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: Boost like libraries in C Can you recommend peer reviewed libraries that I can use in C environment (something like Boost for C++) ? Something that provides hash, thread, interprocess communications, lists, smart memory management...
The environment is embedded system, not a very minimal system, but also not a PC!
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213460",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "34"
} |
Q: What is the maximum length allowed for window.returnValue property? (JavaScript) Is there a maximum length when using window.returnValue (variant) in a modal?
I am calling a modal window using showModalDialog() and returning a comma delimited string. After selecting a group of users, I am putting them into a stri... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213461",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Separating client side logic from server side logic in a reusable way using MVC Before you answer, this question is complicated:
*
*We are developing in asp.net / asp.net mvc / jQuery but I'm open to solutions on any platform using any framework
*I think logic like sorting / hiding columns / re-arranging columns... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213465",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: "Pivoting" a Table in SQL (i.e. Cross tabulation / crosstabulation) I'm working on trying to generate a report from a couple of database tables. The simplified version looks like this
Campaign
----------
CampaignID
Source
-----------------------
Source_ID | Campaign_ID
Content
-------------------------------------... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213476",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: bring a console window to front in c# How can I bring a console application window to front in C# (especially when running the Visual Studio debugger)?
A: It's hacky, it's horrible, but it works for me (thanks, pinvoke.net!):
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213480",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: A good multithreaded python webserver? 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 ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213483",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: VMWARE ESXi PANIC: Failed to find HD boot partition 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 foll... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213486",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-8"
} |
Q: Good file management software 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 ba... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213493",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: how much does facebook denormalize their databases to break things up by network and therefore shrink the tables and speed the system? any bit of info will be helpful here. or does anybody else huge do something interesting here too?
A: You might want to read up on Database Sharding aka Shared-Nothing Architecture... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213505",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: java.net.URLEncoder.encode(String) is deprecated, what should I use instead? 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?
A: You should use:
URLEncoder.encode("NA... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213506",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "220"
} |
Q: Why do personal software projects fail? (i.e. projects with the goal of leading to fulltime income) 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 furth... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213508",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: Is it possible to pass a App setting in the web.config to a Common C# class Is it possible to pass a App setting "string" in the web.config to a Common C# class?
A: Of course it's possible - but the thing to keep in mind is that a properly designed class (unless it's explicitly designed for ASP.NET) shouldn't know ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213509",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Dynamic Splitter Panes How would I go about implementing dynamic/docking splitter panes in a vb.net app similar to visual studio?
A: Check out the following demo at ZettaCube, their WebDock component seems to have functionalities close to VS.NET, especially docking and auto-hide.
http://www.zettacube.com/
A: DockP... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213524",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Most memory efficient way for searching within a string in C 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.
A: It depends on what yo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213527",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: centering text in common lisp I have a string that I would like to print . Is it possible to center it when printing ?
A: Use the ~< formatting directive. This will return "hello there" centered within 70 columns.
(format nil "~70:@<~A~>" "hello there")
| {
"language": "en",
"url": "https://stackoverflow.com/questions/213538",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How can I check MySQL engine type for a specific table? 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?
A: mysqlshow -i <database_name>
will show the info for all tables of a specific database.
mysq... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213543",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "467"
} |
Q: What is the most common mistake you make while writing unit tests? 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
A: Testin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213544",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: How can I convert a SSL certificate from PEM to DER and keep the private key? 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. Th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213568",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Which is better for a rails site? /{login} or /user/{login} 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:
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213576",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Relative instead of Absolute paths in Excel VBA 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 Do... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213584",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "50"
} |
Q: Retrieving Attribute names of an Entity in MS CRM 4.0 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;
foreac... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213593",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Buffered Multipart Form Posts in Ruby 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 t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213613",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Best way to make it so an exe can only be run once 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... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213625",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Can the working set of a managed app be reduced by unloading unmanaged libraries with AfxFreeLibrary? I have a managed Windows application that loads a managed C++ component that uses AfxLoadLibrary to load a third party component if present on the client machine. Once detected, I'm unloading the component using Af... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213627",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to convert a C string (char array) into a Python string when there are non-ASCII characters in the string? I have embedded a Python interpreter in a C program. Suppose the C program reads some bytes from a file into a char array and learns (somehow) that the bytes represent text with a certain encoding (e.g., I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213628",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Where do I plug in into WCF to be notified when a message arrives? I'm writing a sample console service host and I want to plug into WCF stack to be able to print a message to console when new message arrives, even if it won't get processed by the service at the moment (because service is working on previous calls).... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213630",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Where is the best place to locate enum types? I have found that there is generally a singe type or namespace that takes in any particular enum as a parameter and as a result I have always defined those enums there. Recently though, I had a co-worker make a big deal about how that was a stupid thing to do, and you sh... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213637",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "43"
} |
Q: How do C# Events work behind the scenes? I'm using C#, .NET 3.5. I understand how to utilize events, how to declare them in my class, how to hook them from somewhere else, etc. A contrived example:
public class MyList
{
private List<string> m_Strings = new List<string>();
public EventHandler<EventArgs> Ele... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213638",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "42"
} |
Q: Decrypting the YSOD, techniques to the mayhem How many can relate do this?
Server Error in / Application
Object reference not set to an object
Description: Object reference not set to an object.
Exception Details: System.NullReferenceException: Object reference not set to an object.
Source Error:
Line 56: posts... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213644",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Should my unit tests be touching an API directly when testing a wrapper for that API? I have some written a number of unit tests that test a wrapper around a FTP server API.
Both the unit tests and the FTP server are on the same machine.
The wrapper API gets deployed to our platform and are used in both remoting and... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213646",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How do you specify a custom location for crossdomain.xml in actionscript? We are hosting the swf assets on a media hosting server and can't get a file to the root, anyone know what the code looks like to specify a custom location for crossdomain.xml? Sample code if you have it.
A: I hate to answer my own question b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213655",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to read CSV files line by line in VBScript I am using an ASP page where I have to read a CSV file and insert it into DB table "Employee". I am creating an object of TestReader. How can I write a loop to execute up to the number of rows/records of the CSV file which is being read?
A: Why not just insert the CSV?... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213657",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Can I get the behavior of setting my WinForms form's owner using an hwnd / NativeWindow? My application is a vb6 executable, but some newer forms in the system are written in C#. I would like to be able to set the C# form's Owner property using a handle to the main application window, so that the dialogs remain on ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213661",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Import legacy project (dated series of folders) into Subversion Does anyone know of an easy way to import a legacy project, whose "version control system" is a series of dated folders, into SVN, so that the history of the revisions is preserved?
The project I inherited was not under version control, and there are hu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213671",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Multiple rows with jcarousel I'm trying to use jcarousel to build a container with multiple rows, I've tried a few things but have had no luck. Can anyone make any suggestions on how to create it?
A: We have had to make a similar modifiaction. We do this by extending the default options, to include a rows value, a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213680",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: base64_encode weird behavior I'm doing something like the following:
SELECT * FROM table WHERE user='$user';
$myrow = fetchRow() // previously I inserted a pass to the db using base64_encode ex: WRM2gt3R=
$somepass = base64_encode($_POST['password']);
if($myrow[1] != $somepass) echo 'error';
else echo 'welcome';
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213683",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Cannot access a disposed object named "ParkingWindow" I intermittently get this in error in my .NET 1.1 C# Windows Forms application. Someone indicated that this is due to a bug in the 1.1 framework and suggests putting the following code into any custom controls.
protected override void OnParentChanged(EventArgs e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213691",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: SQL Server 2005 Pivot on Unknown Number of Columns I am working with a set of data that looks something like the following.
StudentName | AssignmentName | Grade
---------------------------------------
StudentA | Assignment 1 | 100
StudentA | Assignment 2 | 80
StudentA | Total | 180
Studen... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213702",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "23"
} |
Q: Does Visual Studio 2008 support Windows 98? We're looking at upgrading from Visual Studio 2005 to Visual Studio 2008. I discovered the following disturbing comment.
From Update WINVER and _WIN32_WINNT:
Beginning with Visual C++ 2008, Visual C++ does not support targeting Windows 95, Windows 98, Windows ME, or Windo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213711",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: How do you create a Visual Studio Solution File (.sln) in the same directory as the web project? I'm using VisualSVN client and server and one of the requirements for web projects to work as expected is to have the .sln in the same directory (root) as the other files.
I thought it was as simple as removing all the e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213719",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: Is there a plugin--omnicomplete or other-- that will suggest python modules to import? For example:
from datetime import <c-x><c-o>{list of modules inside datetime package}
A: I think the only plugin that claims support for it right now is pysmell.
A: I use pydiction to have omnicompletion for python modules.
| {
"language": "en",
"url": "https://stackoverflow.com/questions/213729",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Storing arrays in databases What is the most efficient way to store large arrays (10000x100) in a database, say, hsqldb? I need to do this for a certain math program that I'm writing in java. Please help.
The whole array will be retrieved and stored often (not so much individual elements). Also, some meta-data about... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213735",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Gradient colors in Internet Explorer I know that Internet Explorer has some proprietary extensions so that you can do things like create divs with a gradient background. I can't remember the element name or it's usage. Does anyone have some examples or links?
A: The code I use for all browser gradients:
backgroun... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213750",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "49"
} |
Q: What are some uses of template template parameters? I've seen some examples of C++ using template template parameters (that is templates which take templates as parameters) to do policy-based class design. What other uses does this technique have?
A: Here is a simple example taken from 'Modern C++ Design - Generic ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213761",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "306"
} |
Q: ASP.NET MVC running IIS7 deployment problem I am having trouble deploying an ASP.NET MVC app to IIS7.
I have an MVC project created with ASP.NET MVC Beta 1. It consists of nothing more than the default template unmodified.
The app runs just fine within VS2008, but when I publish it to a local IIS7 website (http://... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213774",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: In my codebehind class, how do I retrieve the authorized roles? I have the following in my web.config:
<location path="RestrictedPage.aspx">
<system.web>
<authorization>
<allow roles="Group1Admin, Group3Admin, Group7Admin"/>
<deny users="*"/>
</authorization>
</system.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213784",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Would Python make a good substitute for the Windows command-line/batch scripts? I've got some experience with Bash, which I don't mind, but now that I'm doing a lot of Windows development I'm needing to do basic stuff/write basic scripts using
the Windows command-line language. For some reason said language really ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213798",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "29"
} |
Q: SharePoint 2007 - SQL Query to find a list of documents in site collection I need to get a list of all documents in a site collection, which I believe I can do with either the alldocs table or the alluserdata table (MOSS 2007 SP1) but do not see how I can get the author information for the document. I do not need ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213801",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: What is the best way to store a reference to an AD group? I'm writing an intranet application for a client and I want to give them the ability to configure through an admin interface, which users and user groups can access certain areas. What I'd like to know is the best way of storing the reference to the user or g... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213814",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Regex for repeated words with punctuation I want to check for duplicated words right next to each other, but even if there is punctuation in between.
For example:
Vivamus Vivamus diam, diam, Vivamus Vivamus diam, diam Vivamus
There should be four distinct hits here.
I can't figure out why this isn't working. Why? W... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213816",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Which Eclipse version to install on Linux for PHP development I have Slackware 12.1 and wish to try out Eclipse for PHP/HTML/JavaScript development. However, it seems I'm facing myriad of possible options and I'd hate to miss the best thing and give up on Eclipse (I'm currently using Geany, but I'm missing some stuf... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213833",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to improve Trac's performance I have noticed that my particular instance of Trac is not running quickly and has big lags. This is at the very onset of a project, so not much is in Trac (except for plugins and code loaded into SVN).
Setup Info: This is via a SELinux system hosted by WebFaction. It is behind Apa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213838",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: A good Code snippet tool or plugin for Word documents? Does anyone know of a good tool or plugin that enables Microsoft Word or OpenOffice Writer to add code snippets to a document in a clean manner?
I'm not sure if such a plug-in even exists, so redirecting me to any other tool that can help me would be appreciate... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213840",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Javascript Removing Whitespace When It Shouldn't? I have a HTML file that has code similar to the following.
<table>
<tr>
<td id="MyCell">Hello World</td>
</tr>
</table>
I am using javascript like the following to get the value
document.getElementById(cell2.Element.id).innerText
This returns the text ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213845",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: SQL Query - Using Order By in UNION How can one programmatically sort a union query when pulling data from two tables? For example,
SELECT table1.field1 FROM table1 ORDER BY table1.field1
UNION
SELECT table2.field1 FROM table2 ORDER BY table2.field1
Throws an exception
Note: this is being attempted on MS Access Jet... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213851",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "86"
} |
Q: How do I print a field from a pipe-separated file? I have a file with fields separated by pipe characters and I want to print only the second field. This attempt fails:
$ cat file | awk -F| '{print $2}'
awk: syntax error near line 1
awk: bailing out near line 1
bash: {print $2}: command not found
Is there a way to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213855",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: AIX: IBM Java: java.net.SocketException: Connection timed out:could be due to invalid address We have seen the following exceptions very frequently on IBM AIX when attempting to make an SSL connection to our server:
java.net.SocketException: Socket closed
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275(Co... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213857",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Learning Java EE, jboss, etc I've been doing "plain old java objects" programming for 10 years now, with Swing and JDBC, and I consider myself pretty good at it. But I start a new job in two weeks where they use JBoss, and I'd like to get a heads up and start learning all this stuff before I start. What are good r... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213863",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: database autocommit - does it go directly to disk? So I know that autocommit commits every sql statement, but do updates to the database go directly to the disk or do they remain on cache until flushed?
I realize it's dependent on the database implementation.
Does auto-commit mean
a) every statement is a complete... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213869",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Forcing a TFS checkin of a file via C# How can I specify that I ALWAYS want the local file to replace the server copy even if the TFS copy is newer?
if (pendingChanges.GetUpperBound(0)>-1)
ChangeSetNumber = workspace.CheckIn(pendingChanges, filename);
I can see from the intelisense that I can specify checkinopt... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213873",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: vswprintf crashes using the Symbian S60 5th edition SDK released on October 2nd, I am compiling/running(on sim) the following code snippet:
void test(wchar_t *dest, int size, const wchar_t *fmt, ...) {
va_list vl;
va_start(vl, fmt);
vswprintf(dest, size, fmt, vl);
va_end(vl);
}
...
wchar_t str[1024... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213875",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Best Pattern for AllowUnsafeUpdates So far, in my research I have seen that it is unwise to set AllowUnsafeUpdates on GET request operation to avoid cross site scripting. But, if it is required to allow this, what is the proper way to handle the situation to mitigate any exposure?
Here is my best first guess on a r... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213882",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: passing variables to .load(html) in jQuery Say I have jquery code like this:
html += '<div class="index">' + item.index + '</div>';
// many more similar html += statements
// load items
$('div').append(html);
This html is getting too unmanageable, so I'd like to move it to an external file. What's the best way to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213898",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: In Perl, how do I process input as soon as it arrives, instead of waiting for newline? I'd like to run a subcommand from Perl (or pipe it into a Perl script) and have the script process the command's output immediately, rather than waiting for a timeout, a newline, or a certain number of blocks. For example, let's s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213901",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Modify Spotlight metadata for a file outside Spotlight importer? I would like to modify a Spotlight metadata attribute of a file within my application (i.e. not in a Spotlight importer) but I can't find any API for doing so. Is it possible? Pointers to the relevant docs would be ideal.
In case it's helpful, here's m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213906",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: "std::endl" vs "\n" Many C++ books contain example code like this...
std::cout << "Test line" << std::endl;
...so I've always done that too. But I've seen a lot of code from working developers like this instead:
std::cout << "Test line\n";
Is there a technical reason to prefer one over the other, or is it just a m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213907",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "686"
} |
Q: c# query ms access against sql server I have been asked to setup a course leaflet system for a college. For whatever reason in the past their current system is not linked to their actual course file, they wish to close this link so course leaflets are related to actual course codes. Unfortunately their course file i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213908",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Usage of inline closures / function delegates in Actionscript Why are inline closures so rarely used in Actionscript? They are very powerful and I think quite readable. I hardly ever see anyone using them so maybe I'm just looking at the wrong code. Google uses them in their Google Maps API for Flash samples, but I ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213912",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Javascript Postback in Grails Does anyone know how to initiate a POST request in a Grails applications using javascript. Specifically, I would like to be able to POST when a the selected item in a drop-down box is changed.
I've tried using jQuery and the $.post() method. It successfully calls my controller action, ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213939",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: how to change silverlight hosting from "test page" to "web project"? I have a project with two silverlight apps (foo1 and foo2) and an ASP.NET web service (foo.web). When I created foo1, I configured it to be hosted in my web app by selecting "Link this Silverlight control into an existing web site" and then choosi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213941",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: "error: 'struct udphdr' has no member named 'source'" ... huh? I'm trying to compile a program called ngrep, and when I ran configure, things seemed to go well, but when I run make, I get:
ngrep.c: In function ‘process’:
ngrep.c:544: error: ‘struct udphdr’ has no member named ‘source’
ngrep.c:545: error: ‘struct udp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213950",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Do c++ static libraries without mfc that are linked to an MFC project throw bad_alloc or CMemoryException*? I'm working on a large, aging code base for an MFC app. The code has been worked on by many developers over time, and as a result, we have three different ways throughout the code of dealing with the possibil... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213952",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Boost phoenix or lambda library problem: removing elements from a std::vector I recently ran into a problem that I thought boost::lambda or boost::phoenix could help be solve, but I was not able to get the syntax right and so I did it another way. What I wanted to do was remove all the elements in "strings" that wer... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213953",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: ClickOnce: getting MSVCRT C++ DLLs on user's machine I've been trying desperately to get my application (15 C# dlls and 1 C++/CLI dll with C++ Runtime DLL dependencies) to deploy with ClickOnce. I got it to work by just copying the Release folder, but ClickOnce refuses to copy the files (msvcm80.dll, msvcp80.dll and... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213957",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: New features in java 7 What new features in java 7 is going to be implemented?
And what are they doing now?
A: Java Programming Language Enhancements @ Java7
*
*Binary Literals
*Strings in switch Statement
*Try with Resources (How it works) or ARM (Automatic Resource Management)
*Multiple Exception Handling
*... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213958",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "96"
} |
Q: WCF Security error with VS 2008 Unit Test I was running my first Visual Studio 2008 Unit Test with a WCF Service and I received the following error:
Test method
UnitTest.ServiceUnitTest.TestMyService
threw exception:
System.ServiceModel.Security.MessageSecurityException:
The HTTP request is unauthorized wi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213978",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Is making an empty string constant worth it? I have a co-worker that swears by
//in a singleton "Constants" class
public static final String EMPTY_STRING = "";
in a constants class available throughout the project. That way, we can write something like
if (Constants.EMPTY_STRING.equals(otherString)) {
...
}
in... | {
"language": "en",
"url": "https://stackoverflow.com/questions/213985",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "32"
} |
Q: Need help with multicast udp server discovery in c# As kind of a followup to this question I've gotten a solution working on my local machine, but not on a machine on the network.
I don't know too much about sockets other than that basics, so bear with me. The goal is for a client to look for a server on a local ne... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214009",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Best table / enum driven method calling system Consider I'm interfacing with an external system that will send a message (DB table, message queue, web service) in some format. In the "message header" there is the "MessageType" that is a number from 1 to 20. The MessageType defines what to do with the rest of the m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214017",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to correctly use SetWindowsHookEx & CallNextHookEx I can correctly setup up a windows hook, but I get confused by the line in MSDN that says "Calling the CallNextHookEx function to chain to the next hook procedure is optional, but it is highly recommended; otherwise, other applications that have installed hooks ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214022",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Database denormalization opportunity I'm looking for a strategy in as far as stopping the repetitive problem of branching out tables. For example as a fictitious use case, say I have a table with users that contains their name, login, password and other meta data. In this particular scenario, say the user is restric... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214024",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Filter EntityDataSource on Association value I really like Entity Framework, but there are some key pieces that are a challenge to me. Can anyone tell me how to filter an EntityDataSource on an Association column? EF hides the FK values and instead has an Association property. Given an Entity, Person, with a PersonT... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214037",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Monkey patch flex framework when loaded as an RSL? I want to load the flex framework as an RSL (SWZ, using player caching) but I need to monkey patch a couple of bug fixes in the framework.
A number of forums suggest this is not possible. Has anyone gotten this to work?
A: Same thing as other answer to use frame1, ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214044",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Why specify primary/foreign key attributes in column names A couple of recent questions discuss strategies for naming columns, and I was rather surprised to discover the concept of embedding the notion of foreign and primary keys in column names. That is
select t1.col_a, t1.col_b, t2.col_z
from t1 inner join t2 on t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214045",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What do you use for web development and why you think it rocks? Here's my new project: an open canvas, right in front of me. In a few days, I will start to code a big web application. It will start small, with few modules, only myself as developer and engineer, but hopefully it will grow and grow.
Even though I am a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214057",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How can I write a wrapper around ngrep that highlights matches? I just learned about ngrep, a cool program that lets you easily sniff packets that match a particular string.
The only problem is that it can be hard to see the match in the big blob of output. I'd like to write a wrapper script to highlight these match... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214059",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Using XQuery in Linq To SQL? Let's say I have a table that has a column of XML type data. Within SQL, I can execute the following statement:
select top 10 *,
Content.value('(/root/item/value)[1]', 'float') as Value
from xmltabletest
where Content.value('(/root/item/MessageType)[1]', 'int') = 1
T... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214060",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: SEO for Ultraseek 5.7 We've got Ultraseek 5.7 indexing the content on our corporate intranet site, and we'd like to make sure our web pages are being optimized for it.
Which SEO techniques are useful for Ultraseek, and where can I find documentation about these features?
Features I've considered implementing:
*
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214061",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Capturing key press messages We're building some software for an in-house Kiosk. The software is a basic .net windows form with an embedded browser. The Kiosk is outfitted with a mat that the user steps on. When the user steps on the mat, it sends a key comination through the keyboard. When the user steps off the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214065",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Ext Js and Adobe Air Can anyone reccomend some good tutorials for ext js and adobe air? The ones I have seen seem to start with you knowing a lot or already having a lot of code in place.
What I am looking for is a simple step by step guide that takes you through the basics of Ext Js in use with adobe air, in fact i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214072",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: C# 3.0 Anonymous Types: Naming I was wondering if there is some way to name or rename a property on an Anonymous type to include a space in the property name. For example:
var resultSet = from customer in customerList
select new
{
FirstName = customer.firstName;
};
In this example I would like ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214077",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How can you get the names of method parameters? If I have a method such as:
public void MyMethod(int arg1, string arg2)
How would I go about getting the actual names of the arguments?
I can't seem to find anything in the MethodInfo which will actually give me the name of the parameter.
I would like to write a metho... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214086",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "42"
} |
Q: What is a mock and when should you use it? I just read the Wikipedia article on mock objects, but I'm still not entirely clear on their purpose. It appears they are objects that are created by a test framework when the actual object would be too complex or unpredictable (you know 100% sure what the values of the moc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214092",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "30"
} |
Q: Velocity #parse but assign it to a variable Say you have a standard template with included (parsed) header, body, footer templates.
In the body template a variable like $subject is defined and you want that also displayed in the header template.
In some other template languages like HTML::Mason(perl based) you would... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214094",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: .NET Framework 3.5 wont install on VISTA 32bit Running VISTA 32bit.
I am trying to install c# Visual Express 2008 - but it requires .NET 3.5. One of the prerequisites during the install is .NET 3.5 ... it attempts to install it but fails, with no real error message.
So I downloaded .NET 3.5 standalone from MS websit... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214099",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Displaying a Screensaver with an Away Message I'm looking for an application that would lock my computer and display a screensaver with an away message that I set when I lock it. The idea is that when I go off somewhere during work, my co-workers would know where I'm off to instead of puzzling over my empty desk.
D... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214103",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Debugging causing exceptions? I was getting bad data from an application I was writting using C++ in Visual Studio 2k3 so I decided to debug it. Then I found it was throwing an exception but one I can't track down.
Then I placed some try/catch blocks and low and behold, when I don't debug there is no exception. That... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214109",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: good php framework to run on a budget web host? I'd like to create some small websites using PHP as the programming language. I've looked at several frameworks but they all appear to be rather large and am not sure how well they will run in a shared hosting environment. I was wondering if anyone knew of frameworks t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214113",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Number of classes in large projects I'm just wondering about large projects - say an airlines reservation system, how many classes/objects it is likely to have.
Objects: customer, airplane, airport, route, ticket, order. That's about all I can think of. The project will probably be hundreds of thousands of lines... | {
"language": "en",
"url": "https://stackoverflow.com/questions/214115",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |