text stringlengths 8 267k | meta dict |
|---|---|
Q: c# Pre-processor directive scope I'm looking to use:
#define
and
#if
to allow me to simulate potentially absent hardware during unit tests. What are the rules for using the #define statements?
i.e. what is its default scope? can I change the scope of the directive?
A: From MSDN, its scope is the file
A: As Chr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295110",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: PHP SimpleXML. How to get the last item? How would I get the last item (or any specific item for that matter) in a simplexml object? Assume you don't know how many nodes there will be.
ex.
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/xsl.xml"?>
<obj
href="http://xml.foo.com/"
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295112",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: SVN Working Copies on Network Share Ok, I'm getting my version control processes in order for my web team.
I know ideally each user would have a full working copy of their code on their local machine.
Unfortunately for a lot of our web apps they have additional server specific DB or other system integration requirem... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295114",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How can I mark a C++ class method as deprecated? I have a method in a C++ interface that I want to deprecate, with portable code.
When I Googled for this all I got was a Microsoft specific solution; #pragma deprecated and __declspec(deprecated).
If a general or fully-portable deprecation solution is not available, I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295120",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "169"
} |
Q: What is a good Very-High level UI framework for JavaScript? I need to write a temporary Web-based graphical front-end for a custom server system. In this case performance and scalability aren't issues, since at most 10 people may check the system simultaneously. Also it should be PHP or Python (server) & JavaScript ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295123",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: Using versioned .Net assemblies In our processing software we are moving from one version of an external assembly to a newer version. While the overall task that the assembly performs are the same, the API is radically different and no backwards compatibility have been maintained. The API is responsible for extracti... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295124",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: LINQ: Get attribute with any namespace but specific name I need to be able get a single specific attribute from an element with a specific local name but any namespace (if you are familiar with XMPP you will understand why). Apart from writing my own (enumerator or single select) extension methods, any ideas?
I have... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295125",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: C# Best practice: Centralised event controller or not I have an app which consists of several different assemblies, one of which holds the various interfaces which the classes obey, and by which the classes communicate across assembly boundaries. There are several classes firing events, and several which are interes... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295128",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Turn a string into a valid filename? I have a string that I want to use as a filename, so I want to remove all characters that wouldn't be allowed in filenames, using Python.
I'd rather be strict than otherwise, so let's say I want to retain only letters, digits, and a small set of other characters like "_-.() ". Wh... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295135",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "410"
} |
Q: How to deploy multiple projects in a single MSI? I have 3 projects in my solution that I want to deploy. Is there a nice and quick way of using Visual Studio's setup projects to deploy all three apps using one MSI and letting the user decide which apps he wants to install during the install process?
I have setup pr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295138",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: asp.Net GridView bind custom object with nested List I have a List of custom object, which consist of a custom list.
class person{
string name;
int age;
List<friend> allMyFriends;
}
class friend{
string name;
string address;
}
I'trying to bind a list of these objects to a GridView and the Grid should cre... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295141",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: ASP.NET Security Best Practices What are others ASP.NET Security Best Practices?
So far identified are listed here:
*
*Always generate new encryption keys and admin passwords whenever you are moving an application to production.
*Never store passwords directly or in encrypted form. Always stored one way hashed p... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295156",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "28"
} |
Q: How to avoid FileNotFoundException if .NET 3.5 is not installed? If you try to launch a .NET 3.5 application on a Windows computer which does not have this version of the .NET framework installed, you get a FileNotFoundException for some system assemblies (for example System.Core 3.5.0.0).
Is it possible to catch th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295161",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to set a SecurityManager for this thread and not for System? I have a program that is running a basic RMISecurityManager in all its threads. But I would like to do more control to several threads and set another SecurityManager specially for these threads.
How can I do that ? ...if this is possible !?
thank you ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295163",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How can I determine new & previous cell value on SheetChange event in Excel? I have some special cells in my Excel workbooks which are managed by my Excel Add-in. I want to prevent users from changing content of those cells, but I also want to know, what value users wanted to enter to those cells. On the SheetChange... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295165",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What are the practical differences between C compilers on Windows? A program written in Visual C/C++ 2005/2008 might not compile with another compiler such as GNU C/C++ or vice-versa. For example when trying to reuse code, which uses windows.h, written for a particular compiler with another, what are the differences... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295169",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: What Java FTP client library should I use? Since I received no positives answers to my last question. I will try to write a Java FTP upload applet myself.
My question is: "Can you recommend a Java FTP client library for me to use?"
I want it to be:
*
*stable
*able to handle passive and active modes
*able to pro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295178",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "93"
} |
Q: Producer consumer pattern when many products I have a producer-consumer pattern working for one product. What is the best implementation when the producer produce many products? For example a DataBaseEvent, GuiEvent and ControlEvent that the consumer shall consume. The code below shows the pattern for one product (a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295182",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How can I play with databinding to a desktop application like in web-based application I've a form and I'm doing databinding of my datagridview in the event "form load", the problem is, that the form takes a little (or a lot depends on the size of information) to load, because my data has a lot of binary information... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295192",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I add a directory with a colon to PYTHONPATH? The problem is simple:
Using bash, I want to add a directory to my PYTHONPATH for ease of script execution. Unfortunately, the directory I want to use has a : in it. So I try each of the following
export PYTHONPATH=${PYTHONPATH}:/home/shane/mywebsite.com:3344/
exp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295195",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How to pass an unpersisted modified object from view back to controller without a form? Short: how does modelbinding pass objects from view to controller?
Long:
First, based on the parameters given by the user through a search form, some objects are retrieved from the database.
These objects are given meta data that... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295200",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Vim reflow paragraph adds unwanted indentation When I use `gqap' command to reflow a paragraph in vim, vim seems to try to be smart and adds indentation automatically, e.g.
*
*When a line ends with a ',':
We protect your rights with two steps: (1) copyright the software, and (2),
offer you this license whic... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295201",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: execute caspol from within vbscript I'd like to call caspol from within a script inside a custom action in
an msi (setup project). I'd prefer a standard msi to ClickOnce,
because with a standard msi I can install drivers & associate
filetypes with our application whereas with ClickOnce I can't.
When I execute the ca... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295209",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How can I achieve uploading same files as a batch using jQuery? When uploading some image/audio/video files in the same batch I want the file selected in the one field should not get accepted in the other buttons. How can I achieve this?
A: I think you are asking how to make it so no two files in a list of file upl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295210",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Keyboard shortcut to move away from a full-screen remote desktop session Using remote desktop in full-screen, what is the shortest way to move to another app?
(Without using the mouse, of course. I hate mice).
I currently use one of the following:
ctrl-alt-del, alt-t (get to local machine's taskmgr), alt-tab (move t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295211",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: My Facebook application's Javascript doesn't work in Google Chrome My Facebook application contains Javascript that works in Firefox and IE, but aborts in Chrome.
In the Javascript console it gives several errors.including:
Uncaught TypeError: Object onloadhooks has no method 'replace'
There are similar errors comp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295216",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: What are major differences between C# and Java? I just want to clarify one thing. This is not a question on which one is better, that part I leave to someone else to discuss. I don't care about it.
I've been asked this question on my job interview and I thought it might be useful to learn a bit more.
These are the o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295224",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "209"
} |
Q: Must use in Sun App Server 8.2? I use ${...} instead of <c:out value="${...}"/> in JSPs; in tomcat 6.0.10, it can parse it successfully. But in SunOne Application Server 8.2, it doesn't support this kind of usage
A: Bare EL expressions without c:out were introduced with JSP 2.0, so it should work because 'Applicat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295227",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to make a SQL query "you are better than XX percent of other users" for MSSQL2000 I have a large table with list of scores like this, one score per user:
user,score
------
matt,10
john,20
bill,30
I want to make a query that answers to question:
"John, you are faster than xx percent of others"
How to make ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295232",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What restrictions does public/private have in actionscript functions? I'm currently maintaining some flex code and noticed very many functions which are declared like:
private function exampleFunc():void {
....
}
These functions are in the global scope, and aren't part of any specific class, so it's a bit uncle... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295234",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Getting notified when the datetime changes in c# Recently I was trying to make a calendar application that will display the current year-month-date to the user. The problem is, if the user is gonna keep my application running even for the next day, how do I get notified ?? How shall I change the date displayed ? I d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295235",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Client Rendering Problem after 'page.' calls I have tried, 'PreviousPage', 'PreviousPage.IsCrossPagePostBack' 'Page.previousPage', page.title
It causes the client to stop rendering the page after this line.
simple example
protected void Page_Load(object sender, EventArgs e)
{
response.write("I can see this");
string... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295251",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I implement a cancelable event? In System.ComponentModel, there's a class called CancelEventArgs which contains a Cancel member that can be set in event listeners. The documentation on MSDN explains how to use that to cancel events from within a listener, but how do I use it to implement my own cancelable ev... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295254",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How to search for specific value in Registry keys How can I search for specific value in the registry keys?
For example I want to search for XXX in
HKEY_CLASSES_ROOT\Installer\Products
any code sample in C# will be appreciated,
thanks
A: This method will search a specified registry key for the first subkey that c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295257",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Cross-application drag-and-drop in Delphi I would like to create a Delphi application for Windows XP which allows dropping of files dragged from Windows Explorer (the Desktop or folder windows) or other applications which support this operation (such as Total Commander). What about vice-versa? When the user drags an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295259",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Full text catalog/index search for %book% I'm trying to wrap my head around how to search for something that appears in the middle of a word / expression - something like searching for "LIKE %book% " - but in SQL Server (2005) full text catalog.
How can I do that? It almost appears as if both CONTAINS and FREETEXT... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295266",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: What is the fastest way to get the 4 least significant bits in a byte (C++)? I'm talking about this:
If we have the letter 'A' which is 77 in decimal and 4D in Hex.
I am looking for the fastest way to get D.
I thought about two ways:
Given x is a byte.
*
*x << 4; x >> 4
*x %= 16
Any other ways? Which one is fast... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295279",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Steps to compile darwin for arm on ubuntu gcc Has anyone got the steps to compile darwin libraries on gcc for arm on ubuntu?
A: There is a site that provides patches for and arm darwin kernel.
Darwin on ARM develops and provides patches for the Apple Darwin-xnu kernel sources so that it can be cross-compiled to ru... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295285",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How can I prevent a public class that provides extension methods from appearing in Intellisense? Is there any way to 'hide' the name of a class, whose sole purpose is to provide extension methods, from Intellisense?
I would like to remove the class name from the Intellisense list but need the extension methods of t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295287",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Programming pattern using typed datasets in VS 2008 I'm currently doing the following to use typed datasets in vs2008:
Right click on "app_code" add new dataset, name it tableDS.
Open tableDS, right click, add "table adapter"
In the wizard, choose a pre defined connection string, "use SQL statements"
select * from ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295291",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Are SQL Server timeouts logged? Are SQL Server timeouts (SELECT queries, in particular) logged in the ERRORLOG file?
Background is a customer with a web site having occasional "Request timeout" messages, looking to me assuming that the timeout is caused by a database timeout. There are no timeout errors in the ERRO... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295299",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: CommonAppData in vbscript A customer's application "AppName" has its configuration files stored in CommonAppData.
*
*Under Windows XP that is C:\Documents and Settings\All Users\Application Data\AppName
*Under Windows Vista that is C:\ProgramData\AppName
How do I get the correct foldername with VBScript?
A: Co... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295303",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Handling an open file when trying File.Move() Is this the best way to handle file moving in a windows service? we have many files that get matched and moved, but an end user may have the file opened at the time of moving.
This is what the code currently says:
Do While IO.File.Exists(OriginalFilePath)
Try
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295307",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Modelbinding with SelectList I create a DropDown with the Html.DropDownList(string NameSelectListInViewData) method.
This generates a valid Select input with the correct values. And all is well.
Upon submit however, the value in the source SelectList is not bound.
Case:
ViewData.SearchBag.FamilyCodes:
public Selec... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295313",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Eclipse 3.4 ant task hangs When I launch an ant script from Eclipse 3.4.x it prints the output to console until certain stage. After that it often hangs (wait forever). Last lines that I see at the screen (console) - partial output from my obfuscator.
Under Eclipse 3.3.2 everything works fine (the same project, work... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295314",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Trying To Show A DIV In jQuery I have this java code:
<script src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1.2.6");
$("a#more").click(function() {
$("#info_box").show("blind", { direction: "vertical" }, 800);
});
</script>
And this link:
<a href="#" id="more"... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295315",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: In Vim, is there a way to copy the current line number into a buffer? When using gdb and Vim, often I want to stop on a particular line. Normally in Vim I copy-paste the line number showing on the rule area to the gdb session. It'd save me a lot of hassle if I could use something like "+<magic-incantation> to copy t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295321",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Not using e-mail address in a custom MembershipProvider? I'm writing a custom MembershipProvider for a legacy database. Users are authenticated by login and password, there is no e-mail attribute attached. What is the best way to "short-cycle" the FindUsersByEmail() and GetUserNameByEmail() methods? My naive approac... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295325",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Javascript onkeypress delete or dot Is there any way to find out if the user pressed the delete key or dot? It has the same keycode in FireFox.
A: Here is a nice overview regarding browser behavior when it comes to keyboard events:
JavaScript Madness: Keyboard Events (it's quite recent, too: July 7, 2008)
Scroll do... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295329",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: NSAlert without bouncing dock icon If you put up an NSAlert while your app is in the background your dock icon starts bouncing and keeps on bouncing until you switch back.
I find this annoying.
Does anyone know how disable that for a single app?
A: Create your own subclass of NSApplication, and implement somethi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295333",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Calculating a moving average in F# I'm still working on groking the F# thing - trying to work out how to 'think' in F# rather than just translating from other languages I know.
I've recently been thinking about the cases where you don't have a 1:1 map between before and after. Cases where List.map falls down.
One ex... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295336",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Applying PixelShaders on offscreen Bitmaps i'm currently experimenting using PixelShaders introduced with .net 3.5 sp1 to improve image processing performance. everything is much faster , but til yet i just had effects applied to some elements in my wpf forms, that i actually want to avoid.
we have a bunch of image ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295337",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Repcached for Win32 - has anyone built it? I have finally got the green light to use Memcached in our project (after months of lobbying against a database-based caching solution - just don't ask...), however we will need to use Repcached as well to have backup copies of our data. Has anyone built this for Win32? W... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295339",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to encrypt small data block with only RSA public key using Microsoft ECSP? I need to encrypt a small block of data (16 bytes) using 512 bit RSA public key -- quite an easy task for most cryptography libraries known to me, except for MS CSP API, as it seems.
Documentation for CryptEncrypt function states that
Th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295345",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to monitor Windows services I'm looking for a way to monitor certain Windows services (on Windows Server 2003) and restart if necessary. The services are on different servers and include mainly SQL Server services (e.g. SQL Server Agent), but also some proprietary services.
Email alerts sent out if a service has... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295348",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "40"
} |
Q: Save multiple objects to single field in a table I want to save a set of email addresses collected from a text field (separated by commas) into a single field in a table. I am trying to use serialize but I'm getting SerializationTypeMismatch error. How can I do this?
This is my model:
class Crew < ActiveRecord::Base... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295358",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Delphi: Delete visual component references from inherited forms When I delete a visual component in a base form, and forget any references in inherited forms, my application only breaks in runtime.
What I normally do is to use a search tool to find references in .DFM, but I'm not completely satisfied with this metho... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295383",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Syntax highlighting in Visual Web Developer 2008 Express ed How can I see which file extensions are related to which kind of syntax highlighting? Unfortunately, Tools -> Options -> Text Editor -> File Extensions lists only those entered manually, no default ones. And I didn't manage to find it on my own via Google o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295384",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Are there any tools for finding memory leaks in my Perl program? I am using ActiveState Perl 5.6 on a Windows 2003 Server, and am having some memory leak issues. Are there any good tools (or even bad tools which would give a clue) which I would be able to use to help find them.
A: Devel::Gladiator will show you a ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295385",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: How to run a PHP file in a scheduled task (Windows Task Scheduler) How can I create a scheduled task to run a PHP file?
Yes, I filled out everything in the scheduled task, but it still doesn't work.
Run: "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\WEB\4w_website\save.php"
Start in: "C:\Program Fil... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295386",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "46"
} |
Q: How to run another process at debug mode? I am writing a windows service. This service runs another process I've developed through Process class methods, but I want to run this process on debug mode also, using breakpoints, for instance.
How can I do this?
A: When debugging a service, DebugBreak() is very nice. You... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295387",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Run time used by JQuery Is it correct to assume that JQuery is not actually an implementation of ECMA spec but rather some kind of framework?
If that is true, what run time does it use? For example in IE, does it finally end up with the javascript engine in IE?
thanks
Sesh
A: jQuery is written entirely in Javascr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295399",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Single Multi-User Checkout in Subversion - Possible? In our organization, we have the following problem. We want to have our web tree revision-controlled, but many of us want to be able to alter (and check in) any file of that tree. We would also like there to be only a single check-out for all this because the tree... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295402",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to generate Websphere MQ script? Many times I use 'mqsc' for create MQ queue manager from script files but I don't know how to generate script files.
Thanks
A: There is a SupportPac that installs a program called "saveqmgr.exe".
Here's a link to the download of the Pac: http://shrinkster.com/17kc
IBM seems to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295403",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How do I tell if my application is running in an RDP session I have a .net winforms app which has a few animation effects, fade ins and scroll animations etc. These work fine however if I'm in a Remote Desktop Protocol session the animations start to grate.
Can someone suggest a way of determining whether or not an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295415",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: Format integer to string with 5 digits I need to have a string, based on an integer, which should always have 5 digits.
Example:
myInteger = 999
formatedInteger = "00999"
What is the best way of doing this in classic ASP?
A: You can use string manipulation functions for this.
This assumes classic ASP with VBScript... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295417",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Compressed backups in SQL Server 2005 What is the best free way to get your maintenance plan-generated backups compressed?
I know there are non-free tools that will compress the backups, but I'm not interested in them.
Options:
*
*Have a T-SQL task after the backups that will run a script through xp_cmdshell that... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295419",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to add more than one test object from testobject map to the script Test which I have to automate: In an applicationmy I have to create 1000 objects. Then I have to go to each object and I have to put some value.
Using script I created one object and then going to this object and putting value.
Now in object crea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295423",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Can you specify the folder VS will use when debugging mobile apps? Hitting debug will deploy the application to \program files\AppNamespace\AppName.exe and attach to it. However, my app runs on the storage card \SD-MMC Card.
This means I'm debugging and running in different places, so I have a slight maintenance hea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295425",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Java/JCE: Decrypting "long" message encrypted with RSA I've got a message contained in an byte[], encrypted with "RSA/ECB/PKCS1Padding". To decrypt it I create a Cipher c and initiate it with
c = Cipher.getInstance("RSA/ECB/PKCS1Padding");
Untill now I have only decrypted small messages, using the doFinal() method,... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295436",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How can one mock/stub python module like urllib I need to test a function that needs to query a page on an external server using urllib.urlopen (it also uses urllib.urlencode). The server could be down, the page could change; I can't rely on it for a test.
What is the best way to control what urllib.urlopen returns?... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295438",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "75"
} |
Q: Sharepoint: How do I filter a document library view to show the contents of a subfolder? A number of business areas I work with use a folder structure to organise their Sharepoint housed documents (not ideal I know, but we're stuck with it).
I would like to use a web part page to present a number of views of their... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295448",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: How do we do a DBMS OUTPUT line in db2 (like you can in oracle) In Oracle we can print output by dbms_output.put_line() but I don't know to do the same thing in DB2.
I currently use signal for printing some messages when I debug.
A: You could store a row in a permanent debug table or in a declared global temporary ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295455",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Pretty print in Clojure Is there a pretty printing function in Clojure that would output data-structures like lists and structs in a human-readable way?
A: A pretty printer for Clojure is available here.
A: There was a post on the Clojure mailing list yesterday, where a few people posted some trial implementations... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295458",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: How do I use subprocess.Popen to connect multiple processes by pipes? How do I execute the following shell command using the Python subprocess module?
echo "input data" | awk -f script.awk | sort > outfile.txt
The input data will come from a string, so I don't actually need echo. I've got this far, can anyone expl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295459",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "72"
} |
Q: How do I remove the BOM character from my xml file I am using xsl to control the output of my xml file, but the BOM character is being added.
A: just need to add this in your xslt file:
<xsl:output method="text"
encoding="ASCII"/>
A: # vim file.xml
:set nobomb
:wq
A: Just strip first two bytes using any... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295472",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "68"
} |
Q: How can I fix my HTTP handlers and different host headers using ASP.NET? When a site is used with URL test.com handlers are not fired. Whereas if the site is used with www.test.com the handlers work properly? The site is behind an ISA firewall. How should I fix this?
A: There is an extensive discussion on URL rewri... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295476",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: T4 Templates - suitable for generating C++ code? Are there any issues which might make MS's T4 Template code-generation system unsuitable for generating C++ code?
A: A bit lengthy answer yet I think some might find it interesting
I would say T4 is excellent to generate C++ with
Some might retort that C++ already ha... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295506",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How to set a GUID as ADO query parameters from Delphi? MS Access allows the numeric type GUID (in German it's called 'Replikations-ID', so I guess in English that would be 'replication id') which is stored as a 16 byte binary field in the database.
I found how to access these fields in Delphi with TADOQuery/TADOTabl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295511",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: A PHP hash function with a long output length? Inside my code I'm generating hashes of URLs, (which are practically of unbounded length). I'm currently using sha1(), which I know has a tiny chance of a collision, but I have up to 255 bytes to store the hash in so feel that I might as well use that available space t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295515",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: MySQL max_allowed_packet param whats the catch? I need to increase the max_allowed_packet param, to fit some theoretically very large items. If I set this param to say 10M, what price if any am I paying compared to setting it to 1M or 4M.
Thanks for any input!
Tomas
A: I found this explanation: http://www.astahost.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295523",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Website image manager with copy/paste? (Flash?) I'm looking for a web based upload manager, with good support for images. It should be as easy as possible for novice users to "add images to a website". I could use such a thing for two use cases:
*
*A CMS for external use, needs proper image support (1-file upload... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295524",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Tournament graph question(s) Is a tournament graph the same thing as a directed complete graph? And, do all vertices in a tournament graph have the same number of edges?
A: Unless I'm missing something obvious then the answer to both your questions is "yes"
A tournament graph is defined as a complete graph with a d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295531",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Wrapping boost::signal to C# delegates say I have an asynchronous library, written in native C++, with an interface similar to this:
class connection {
public:
boost::signal< void() > sig_connection_made;
boost::signal< void(const std::string&) > sig_error;
void connect(const std::string& host, const st... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295533",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to provide user name and password when connecting to a network share When connecting to a network share for which the current user (in my case, a network enabled service user) has no rights, name and password have to be provided.
I know how to do this with Win32 functions (the WNet* family from mpr.dll), but wou... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295538",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "219"
} |
Q: MS Web Browser on Pocket PC I'm trying to create a custom web browser for on a pocket pc in C++ MFC. When I add the Microsoft Web Browser activeX control and run the app on the pocket pc (emulator) then this error pops up:
"Debug assertion failed. occcont.cpp line: 916"
When I look in the debug window of VS2005:
"Co... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295556",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: C#: Downloading a URL with timeout What's the best way to do it in .NET?
I always forget what I need to Dispose() (or wrap with using).
EDIT: after a long time using WebRequest, I found out about customizing WebClient. Much better.
A: Following Thomas Levesque's comment here, there's a simpler and more generic solu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295557",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Enable/disable windows-update from a vbscript I need to disable windows-update service from my installation. I already use vbscript to do some stuff so I would like to do it in vbscript.
My knowledge of vbscript (or any other script language) is very limited so...can anybody help me out with that? I'll really apprec... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295563",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Sanitize/Rewrite HTML on the Client Side I need to display external resources loaded via cross domain requests and make sure to only display "safe" content.
Could use Prototype's String#stripScripts to remove script blocks. But handlers such as onclick or onerror are still there.
Is there any library which can at l... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295566",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "84"
} |
Q: Unit Test to verify object getting deallocated What I am looking for is a way to programmatically verify a target object has been deallocated. Currently I have an NSLog statement in the dealloc methods of the objects I wish to observe.
The unit testing framework is from the Google Toolbox for the mac, and it workin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295569",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Creating a long string from a result set I have a result set in MS-SQL within a stored procedure, and lets say it has one VARCHAR column, but many rows. I want to create a comma separated string conataining all these values, Is there an easy way of doing this, or am I going to have to step through each result and bu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295575",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How do I get the TotalRowCount from a LinqDataSource into a Literal? I have a LinqDataSource that I use to calculate the number of rows in a table. I would like to update the value of literal with the number, with the following code, taken from MSDN (linqdatasourcestatuseventargs.totalrowcount.aspx):
protected void ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295576",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: WPF GroupBox hide/show with an expander button? Is there a control like System.Windows.Controls.GroupBox that can hide its contents and show only the name and an expander button?
A: Check out the Expander control.
| {
"language": "en",
"url": "https://stackoverflow.com/questions/295578",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Fastest way to determine if an integer's square root is an integer I'm looking for the fastest way to determine if a long value is a perfect square (i.e. its square root is another integer):
*
*I've done it the easy way, by using the built-in Math.sqrt()
function, but I'm wondering if there is a way to do it fas... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295579",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1594"
} |
Q: What resources, outside of the Microsoft site(s), are available for learning about Form and MVC web applications? I've found a few pages (some that even link to a number of other pages) on the Microsoft website that I bookmarked last night for reading today, but I'm curious as to other good non-Microsoft resources f... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295584",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Linq query built in foreach loop always takes parameter value from last iteration I have a List containing several keywords.
I foreach through them building my linq query with them like so (boiled down to remove the code noise):
List<string> keys = FillKeys()
foreach (string key in keys){
q = q.Where(c => c.Comp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295593",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: Get SQL Server database folder of selected instance by using vbscript Assume that you have a running SQL Server Express instance named (local)\SQLEXPRESS. Its database folder is c:\program files\Microsoft SQL Server\MSSQL.1\MSSQL\Data.
How can VBScript be used to retrieve that folder?
Maybe by using SMO? And if so... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295600",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Connecting to SQLServer using JDBC-ODBC Bridge I'm writing an applicationt hat was prototyped on MySQL and is now connecting to an Oracle database.
All I had to do to connect to the oracle database (having built up the table structure) was change the connection string.
What is the format to connect to a SQL Server D... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295603",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: ASP.NET - Hierarchical grid view Any ideas on how I can acheive 'Hierarchical' gridview?
Basically I want when the user clicks on the '+', i "expand" and insert new rows without a full page post back.
Does this sound like a lot of AJAX stuff? Or should I read on ASP.NET MVC
Please point me in right direction
A: An... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295607",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: CSS float and HTML questions I have some questions about basic CSS that I was unable to understand or find an answer for.
First, I tried placing 3 div tags within another div tag. The first main div tag containing the 3 other tags had nothing set for it except a size, which was 400px by 400px. Of the other 3 divs in... | {
"language": "en",
"url": "https://stackoverflow.com/questions/295611",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.