text
stringlengths
8
267k
meta
dict
Q: string to char* marshaling I wrote a managed C++ class that has the following function: void EndPointsMappingWrapper::GetLastError(char* strErrorMessage) { strErrorMessage = (char*) Marshal::StringToHGlobalAnsi(_managedObject->GetLastError()).ToPointer(); } As you can see, this is a simple method to copy the ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/269932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: sas one-liner Is there a way to run a one-liner in sas, or do I have to create a file? I'm looking for something like the -e flag in perl. A: My favourite is using the -stdio option Either: sas -stdio Then start typing. Or ... echo "proc options; run;" | sas -stdio A: The Unix version of SAS was ported from MV...
{ "language": "en", "url": "https://stackoverflow.com/questions/269944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Invalid characters in label_tag I'm constructing a simple form in ERB but the HTML produced by the text_field tag makes the for attribute in the label tag invalid. <div> <p><%= label_tag "email[name]", "Name" %></p> <%= text_field :email, :name, :class => "text_field" %> </div> Produces the HTML <div> <p><lab...
{ "language": "en", "url": "https://stackoverflow.com/questions/269946", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Strategies for moving to Team System Does anyone have any strategies/tips/traps for moving to Team System? Should it be done in baby steps, or all at once? Should we migrate our SourceSafe library over, or draw a line in the sand and move forward? Is it worth brining SharePoint into the mix? Any thoughts are appreci...
{ "language": "en", "url": "https://stackoverflow.com/questions/269966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to keep jQuery from parsing inserted HTML? Does anyone know how to stop jQuery fromparsing html you insert through before() and after()? Say I have an element: <div id='contentdiv'>bla content bla</div> and I want to wrap it in the following way: <div id='wrapperDiv'> <div id='beforeDiv'></div> <div i...
{ "language": "en", "url": "https://stackoverflow.com/questions/269974", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to count open db connections? I'm developing a web app using Java servlet to access Mysql db, how can I get the number of connections to my DB that is currently open ? Edit : I tried "show processlist", it showed me : 2695159, but that's not right, I'm just developing this new project, I'm the only user, couldn'...
{ "language": "en", "url": "https://stackoverflow.com/questions/269979", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: In VBScript I need to "Get Latest Version" from VSS 8 Our VSS setup is like this: We have a set of unique folders with 100s of files in them. I need to, from within VBScript, get the latest version of all files in a set of folders and put them into a local directory so that other operations can be performed on them....
{ "language": "en", "url": "https://stackoverflow.com/questions/269986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to invoke a function on parent thread in .NET? I have a .NET class library containing a class with a method that performs some lengthy operation. When a client calls this method it should perform the lengthy operation on a new thread in order to avoid blocking the caller. But once the method finishes it should e...
{ "language": "en", "url": "https://stackoverflow.com/questions/269988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: XPATH or XSL to match two node-sets using custom comparison EDIT: I also have access to ESXLT functions. I have two node sets of string tokens. One set contains values like these: /Geography/North America/California/San Francisco /Geography/Asia/Japan/Tokyo/Shinjuku The other set contains values like these: /Geogra...
{ "language": "en", "url": "https://stackoverflow.com/questions/269989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Set existing Web Service Extension to "Allow" using WiX In IIS Manager under Web Service Extensions, ASP.NET v2.0.50727 is set to "Prohibited" by default. I would like to set this to Allow during the install. I am currently using WiX Version 2. I have tried using: <Component Id="Allow_WebServiceExtension_ASP.NET_2....
{ "language": "en", "url": "https://stackoverflow.com/questions/269991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: JPEG or other lossy image compression library needed I've incorporated LIBPNG and ZLIB into my C software for a microcontroller project due to their nicely liberal license which permits such use without requiring me to disclose any of my code (it's very similar to BSD/MIT/APACHE, but with no attribution requirement)...
{ "language": "en", "url": "https://stackoverflow.com/questions/269996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I make log4j clear a log at startup? I want the log to roll over as long as the application is running, but I want the log to start fresh when the application is restarted. Updated: Based on erickson's feedback, my appender looks like this: <appender name="myRFA" class="org.apache.log4j.RollingFileAppender...
{ "language": "en", "url": "https://stackoverflow.com/questions/269999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Sql Server Management - Option to avoid scripting the collation? I have databases with different collations. I want to be able to script out tables from one database and create them in another. However, when I script out the tables, it includes the collation in the column definitions. Is there a way to exclude the...
{ "language": "en", "url": "https://stackoverflow.com/questions/270003", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: In the Visual Studio SQL editor, how do I get rid of the boxes? I usually create my SQL tables and stored procedures by writing a script inside Visual Studio. This works really well for me except for one simple annoyance: VS puts blue boxes around all the SQL queries and data-manipulation commands. The purpose of th...
{ "language": "en", "url": "https://stackoverflow.com/questions/270005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SetSecurityDescriptorSddlForm(string sddlForm) I dont find any usefull website according to this API. What's the format of the String? The content? Thanks A: The Security Descriptor String Format is defined here
{ "language": "en", "url": "https://stackoverflow.com/questions/270010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can anyone explain why this JavaScript causes memory leaks in IE7? The code is rather long yet simple: * *100 leaky JavaScript objects are created. *10 leaky elements are created from the JS objects. *1 element is removed and 1 is added 10000 times. I assume that the detachEvent call is not functioning properly...
{ "language": "en", "url": "https://stackoverflow.com/questions/270011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is it considered bad design to do lengthy operations in a constructor? I am implementing a class to compare directory trees (in C#). At first I implemented the actual comparison in the class's constructor. Like this: DirectoryComparer c = new DirectoryComparer("C:\\Dir1", "C:\\Dir2"); But it doesn't feel "right" to...
{ "language": "en", "url": "https://stackoverflow.com/questions/270029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Do comments affect Perl performance? I'm optimizing some frequently run Perl code (once per day per file). Do comments slow Perl scripts down? My experiments lean towards no: use Benchmark; timethese(20000000, { 'comments' => '$b=1; # comment ... (100 times) ', 'nocomments' => '$b=1;'}); Gives pretty much i...
{ "language": "en", "url": "https://stackoverflow.com/questions/270042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Flex - XML Serialization and De-Serialization of nested Object structures Our Flex app would like to work with requests and responses as object graphs (nothing unusual there) e.g. response becomes the model of some view, and would be a structure with several layers of nesting. ** Now, ideally we would like to use th...
{ "language": "en", "url": "https://stackoverflow.com/questions/270046", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java resource files I'm writing a small GUI app that contains some "editor" functionality, and something that I'd like to let users open a few sample text files to test things out quickly. The easiest way of doing this would be to package a separate zip with the appropriate sample files, and have them open them manu...
{ "language": "en", "url": "https://stackoverflow.com/questions/270048", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When should sizing grip (windows Forms) be used? Should it be used for all sizable forms, or only when it is not easy to guess that a form is sizable? Is there a GUI convention to use it? Any link to a documentation would be appreciated. A: According to the Vista User Experience Guidelines: Resizable windows no lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/270061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Hibernate/JPA Annotations -- Unknown Entity An application that has been working well for months has stopped picking up the JPA @Entity annotations that have been a part of it for months. As my integration tests run I see dozens of "org.hibernate.MappingException: Unknown entity: com.whatever.OrderSystem" type erro...
{ "language": "en", "url": "https://stackoverflow.com/questions/270074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Difference between a LinkedList and a Binary Search Tree What are the main differences between a Linked List and a BinarySearchTree? Is BST just a way of maintaining a LinkedList? My instructor talked about LinkedList and then BST but did't compare them or didn't say when to prefer one over another. This is probably...
{ "language": "en", "url": "https://stackoverflow.com/questions/270080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: Single instance form but not singleton I cannot understand how this is possible. Please help!! I have an app with a trayicon. I want a form to be show when the user double clicks the trayicon. I have a problem where it is possible to get 2 or more forms showing by quickly triple or quadruple clicking the trayicon. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/270091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it OK to use assignments in expressions? I came across this code and wanted others to provide their point of view... is it good or bad ? ;) Class ReportClass { public string ReportName {get; set;} } Then it was used as follows in code: displayReport(ReportClass.ReportName = cmbReportName.SelectedValue.ToString(...
{ "language": "en", "url": "https://stackoverflow.com/questions/270093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Calculating Months I have an application where the user selects the dates of a first statement and a last statement. Example, first statement = 1/1/08, last statement = 12/1/08, should equal 12 statements. However, when using the following code, the result is 11: numPayments = DateDiff(DateInterval.Month, CDate(.Fee...
{ "language": "en", "url": "https://stackoverflow.com/questions/270112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I stop sem_open() failing with ENOSYS? I have two Slackware Linux systems on which the POSIX semaphore sem_open() call fails with errno set to 38. Sample code to reproduce below (the code works fine on CentOS / RedHat). Are there any kernel or system configuration options that could cause this? Other suggesti...
{ "language": "en", "url": "https://stackoverflow.com/questions/270113", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can I tell Apache to do an internal redirect from PHP? Is there any way, from a PHP script called from mod_php with apache, to tell apache to do an INTERNAL redirect to some other file? I do not want to read/require this file from PHP and spit it out, I think it'd be more efficient to pass this off to Apache. I bel...
{ "language": "en", "url": "https://stackoverflow.com/questions/270117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Which is faster for a small amount of information, java file i/o or derby? I'm writing a small agent in java that will play a game against other agents. I want to keep a small amount of state (probably approx. 1kb at most) around between runs of the program so that I can try to tweak the performance of the agent bas...
{ "language": "en", "url": "https://stackoverflow.com/questions/270124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to pass parameters between rails applications? I have to pass parameters between two rails apps. In one side (sender) I have an array of hashes. I have a code like the following to send the data: http = Net::HTTP.new('localhost', '3030') result = http.post('/processar_lotes', my_array_of_hashes) Some ques...
{ "language": "en", "url": "https://stackoverflow.com/questions/270125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Connect to an Oracle database with SQL Server 2000 Reporting Services? I am trying to create a report in SSRS2000 that will query an ORACLE database and pass one parameter, I am getting the following error message: ORA-01036: illegal variable name/number But have been unable to find much help elsewhere on the web w...
{ "language": "en", "url": "https://stackoverflow.com/questions/270127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I draw lines using XNA? I've read a bunch of tutorials involving XNA (and it's various versions) and I still am a little confused on drawing primitives. Everything seems to be really convoluted. Can someone show me, using code, the simplest XNA implementation of drawing one or two lines on to the screen? Pe...
{ "language": "en", "url": "https://stackoverflow.com/questions/270138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: Deleting from a database map I have these 3 tables + data: items: itemId, itemName data: 1, my item one categories: catId, catName data: 1, my cat one. 2, my cat two map: mapId, itemId, catId When you include item "my item one" in category "my cat one", you insert [1, 1, 1] into the map. When you add "my item one" t...
{ "language": "en", "url": "https://stackoverflow.com/questions/270148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PortalSiteMapProvider causing excessive SPRequest objects We have a custom navigation webpart that uses the PortalSiteMapProvider of MOSS to build a menu navigation. It seems that the Provider is not managing it's objects. Any idea on how to manage the objects that are being created in the Provider? It is causing lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/270161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JQuery fadeIn fadeOut with setInterval working sporadically I have a bunch of images that need to rotate in and out one at a time every 2 seconds with fancy JQuery fadeIn and fadeOut. I have all the images in the HTML to pre-load them and a setInterval timer that fades the current image out, then fades the next ima...
{ "language": "en", "url": "https://stackoverflow.com/questions/270177", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can I initialize a C# attribute with an array or other variable number of arguments? Is it possible to create an attribute that can be initialized with a variable number of arguments? For example: [MyCustomAttribute(new int[3,4,5])] // this doesn't work public MyClass ... A: Yes, but you need to initialize the ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/270187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "120" }
Q: Finding Unique Table/Column Combinations Across SQL Databases I have 4 databases with similar schema's, and I'm trying to create a query to return just the table, column pairs that exist ONLY in database 1 and do not exist in database 2, 3, or 4. Currently I can return the symmetric difference between database 1 and...
{ "language": "en", "url": "https://stackoverflow.com/questions/270190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I force keywords to automatically capitalize in the VIM editor? Does anybody know how to edit a syntax file for VIM so that keywords are capitalized automatically? I need to do this to keep my coding style consistent with the rest of the developers in my team. I'm using VIm version 7.2 (actually gVIM) and the...
{ "language": "en", "url": "https://stackoverflow.com/questions/270192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Java in Eclipse: Where do I put files on the filesystem that I want to load using getResource? (e.g. images for an ImageIcon) I know the file needs to be where the getClass().getResource(filename) can find it, but I don't know where that is. I'm interested both in where to put the files on the filesystem itself, and...
{ "language": "en", "url": "https://stackoverflow.com/questions/270197", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: How can I switch on Intellisense and code hints in C++ Builder 2009? I've just installed CodeGear Studio 2009 and I didn`t find where I can put the Intellisense and code hints on. And, by the way, in Visual Studio we can indent selected blocks of code in the same way. How can I use similar functions in CodeGear? Any...
{ "language": "en", "url": "https://stackoverflow.com/questions/270218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I run Test projects with Visual Studio 2008 Standard Edition? I'm currently running Visual Studio 2008 Standard Edition and one of the items they cut out for that edition is the unit testing capability. As a result, when I open up example projects like the MVC commerce test, one of the projects just won't lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/270221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: <%# Eval("State") %> or <%# DataBinder.Eval(Container.DataItem, "state")%> What is the difference between having <%# Eval("State") %> in your aspx page, versus having <%# DataBinder.Eval(Container.DataItem, "State") %> in your aspx page? A: Eval("State") is a simplified form of the DataBinder.Eval(Container.DataI...
{ "language": "en", "url": "https://stackoverflow.com/questions/270230", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: Help getting QTP to identify a control We're trying to use QTP (QuickTest Professional) to auto-test a legacy C++ application. However, the main window for the app is composed of several IDENTICAL panels. Each panel has a unique title. If I view the window in Spy++ (comes with DevStudio), I see: + Window <hwnd> "Wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/270250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there some list of input's IDs or names of Form after the script was sent? Let's imagine I got this: index.php generates form with unpredictable number of inputs with certain IDs/Names and different values that can be edited by user and saved by script.php <form action="script.php" method="post"> <input id="1" na...
{ "language": "en", "url": "https://stackoverflow.com/questions/270260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Converting to int16, int32, int64 - how do you know which one to choose? I often have to convert a retreived value (usually as a string) - and then convert it to an int. But in C# (.Net) you have to choose either int16, int32 or int64 - how do you know which one to choose when you don't know how big your retrieved ...
{ "language": "en", "url": "https://stackoverflow.com/questions/270263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How get VS HTML editor to default to single quotes? Autocompletion in the Visual Studio HTML editor inserts double quotes (e.g. <input type="text"). Does anyone know if there's a setting that will change the default to automatically insert single quotes (e.g. <input type='text')? thanks, Michael A: There is no...
{ "language": "en", "url": "https://stackoverflow.com/questions/270264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to decompress a gzipped data in a byte array? I have a class which has a method that is receiving an object as a parameter. This method is invoked via RMI. public RMIClass extends Serializable { public RMIMethod(MyFile file){ // do stuff } } MyFile has a property called "body", which is a byte ...
{ "language": "en", "url": "https://stackoverflow.com/questions/270268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Updating from Jaxb 1 to Jaxb 2 I'm looking to update our project's jaxb version from 1 to 2. Has anyone tried doing this on their projects and are there any tips that anyone wanting to do this? I understand that each project is unique, I'm just looking for general tips. A: JAXB2 will generate enum classes for sim...
{ "language": "en", "url": "https://stackoverflow.com/questions/270282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to make part of a site on IIS only viewable from localhost? We've got a webserver running IIS. We'd like to run maybe a shared blog or something to keep track of information. Because of security issues, we'd like for that part to be only viewable from localhost so people have to remote in to use it. S...
{ "language": "en", "url": "https://stackoverflow.com/questions/270284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Editing Web.config programmatically What is a good way to edit a Web.config file programmatically? I looked into System.Xml but couldn't find any obvious answers. A: You can use the WebConfigurationManager to read specific configuration sections. This will return a ConfigurationSection object. You can use this to...
{ "language": "en", "url": "https://stackoverflow.com/questions/270287", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Can you enable HTTP compression in IIS 6 without restarting IIS? I'm currently optimizing the performance on my company's site; when it was taking 6-10 seconds to download 2MB+ of our homepage and assets (the site is mostly Flash with a lot of media, so it's not 2MB of HTML and viewstate). There are a lot of things ...
{ "language": "en", "url": "https://stackoverflow.com/questions/270288", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Locate the path of an Apache server on windows For a windows script I am writing, I need to detect if the machine has Apache 2.2 installed, and to find the application path. One solution I came up with is to wget http://localhost:8080/server-info and parse the root and the config file from it. This would fail if t...
{ "language": "en", "url": "https://stackoverflow.com/questions/270292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Blackberry Browser ASP.Net click event I've got a small little page that is going to be viewed from a BB. Here's my 2 questions: * *If I "click" on the link to submit the page, I get the following error: "JavaScript: An error occurred while executing a script." I can tell my BB to emulate a Microsoft IE browser a...
{ "language": "en", "url": "https://stackoverflow.com/questions/270294", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can I use a function for a default value in MySql? I want to do something like this: create table app_users ( app_user_id smallint(6) not null auto_increment primary key, api_key char(36) not null default uuid() ); However this results in a error, is there a way to call a function for a default value...
{ "language": "en", "url": "https://stackoverflow.com/questions/270309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "103" }
Q: How to Write a Query to Merge Two Accounts and their Activity Logs into One? We frequently have users that create multiple accounts and then end up storing the same lesson activity data more than once. Once they realize the error, then they contact us to merge the accounts into a single one that they can use. I've ...
{ "language": "en", "url": "https://stackoverflow.com/questions/270325", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using Visio (Dia) to Map Out Algorithms I was just wondering how many experienced programers out there actually map out their process or algorithms in a program like MS Visio or Gnome Dia? I am trying to code some complex PHP for my website and just seem to be missing something. Is a diagram program going to help...
{ "language": "en", "url": "https://stackoverflow.com/questions/270329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to generate an SSL client certificate from a disconnected network? I have a unique situation where I need to implement client certificate authentication over HTTPS between IE browser and IIS 6. The browser and IIS are separated by a firewall that only allows the browser to connect to IIS on the SSL port. We hav...
{ "language": "en", "url": "https://stackoverflow.com/questions/270333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: C# compiler throws invalid arguments error. Why? I have a class that contains two methods like these: public String getFoo(Int32 a) { return getBar(a, "b", null); } public String getBar(Int32 a, String b, Int32 c) { //do something return ""; } However when I compile my class I get two errors: * *The best ...
{ "language": "en", "url": "https://stackoverflow.com/questions/270334", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP.NET Refreshing one Window from another I have a page with a GridView on it that launches a popup, using Javascript. The user then selects an item, that updates the data connected to the GridView and closes the popup. How do I refresh the first (ie the Calling page) so that I can refresh the data shown in my Grid...
{ "language": "en", "url": "https://stackoverflow.com/questions/270337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Replacing auto_ptr in VC++ 8 std::auto_ptr is broken in VC++ 8 (which is what we use at work). My main gripe with it is that it allows auto_ptr<T> x = new T();, which of course leads to horrible crashes, while being simple to do by mistake. From an answer to another question here on stackoverflow: Note that the imp...
{ "language": "en", "url": "https://stackoverflow.com/questions/270347", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Lambda Expressions in Delphi Prism/Oxygene I have been experimenting with Lambda expressions in Oxygene. Very simple recursive lambda expression to calculate a fibonacci number : var fib : Func<int32, int32>; fib := n -> iif(n > 1, fib(n - 1) + fib(n - 2), n); fib(3); When I run this code I get a nullreferenceexcep...
{ "language": "en", "url": "https://stackoverflow.com/questions/270350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Where can I find free weather icons? Related to https://stackoverflow.com/questions/139944/where-can-one-find-free-software-icons-images I have a need for free weather-related icons. Specifically, I need icons that you might see in a ten-day forecast (clear day/night, rainy day/night, etc.) Where might I find such ...
{ "language": "en", "url": "https://stackoverflow.com/questions/270361", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: XML to Database in ASP.NET Using VB.NET, how do I add the values from an XML file into an SQL Server database with a similar schema? A: I don't know the methods off the top of my head but you ought to be able to load the file into a DataTable and then use ADO.net to get it into the database (look into the SqlBulkCo...
{ "language": "en", "url": "https://stackoverflow.com/questions/270364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What have you used Object.clone() for? A colleague recently asked me how to deep-clone a Map and I realized that I probably have never used the clone() method- which worries me. What are the most common scenarios you have found where you need to clone an object? A: Most commonly, when I have to return a mutable obj...
{ "language": "en", "url": "https://stackoverflow.com/questions/270369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: jquery round corners This probably sounds really stupid but I have noo idea how to implement jquery's rounded corners (http://www.methvin.com/jquery/jq-corner-demo.html). My javascript-fu is complete fail and I can't seem to get it to work on my page. Can anyone show me a simple example of the HTML and JavaScript yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/270380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: SQL Reporting Services cannot configure virtual directories I have an issue where we tried to upgrade our TFS 2005 server to 2008. During the install we encountered the error that it could not configure SQL Reporting Services. The log files showed that during the creation/configuration of the virtual directories for...
{ "language": "en", "url": "https://stackoverflow.com/questions/270382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Convert Web Form to Web Content Form after the fact. (.net) I have a site a few years old that contains about 30 aspx Web Form pages with code behind. I want to add a common master page to all these with the minimum amount of work. Essentially, I just need to add everything in the body tags to the Content Placehold...
{ "language": "en", "url": "https://stackoverflow.com/questions/270385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Overhead of using bignums I have hit upon this problem about whether to use bignums in my language as a default datatype when there's numbers involved. I've evaluated this myself and reduced it to a convenience&comfort vs. performance -question. The answer to that question depends about how large the performance hit...
{ "language": "en", "url": "https://stackoverflow.com/questions/270386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Any lightweight templating solutions in Java with support for conditional formatting? I'm using MessageFormat to format some addresses with a template like this: "{0}\n{1}\n{2}\n{3}, {4} {5}" where * *0 = street 1 *1 = street 2 *2 = street 3 *3 = city *4 = state *5 = zip Most of these fields are optional ...
{ "language": "en", "url": "https://stackoverflow.com/questions/270391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Could you overheat a monitor through simple C code? I was told by a professor that using C code one could heat a single pixel on an old monitor to the point that the monitor would overheat and smoke. Have any of you come across anything that would support this? I am having a debate in my office on whether this is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/270393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is Microsoft BizSpark a good deal for startups? I learned about Microsoft BizSpark the other day and started the sign up process. Has anyone else heard about it or had success with it? A: I can't speak for BizSpark specifically (it's so new), but Microsoft has had the similar Empower program in place for 5 or so y...
{ "language": "en", "url": "https://stackoverflow.com/questions/270407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Is it better in C++ to pass by value or pass by reference-to-const? Is it better in C++ to pass by value or pass by reference-to-const? I am wondering which is better practice. I realize that pass by reference-to-const should provide for better performance in the program because you are not making a copy of the var...
{ "language": "en", "url": "https://stackoverflow.com/questions/270408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "237" }
Q: How do I find the sample rate of microphone audio using Skype4Com? I am using the Skype4Com COM object to intercept audio from the microphone. I know that it is 16 bit mono, but how do I find out what its sample rate is? A: I know that it's possible to manually set input through a wav-file. The only rate that is al...
{ "language": "en", "url": "https://stackoverflow.com/questions/270411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Activator.GetObject - MarshalByRefObject In .Net Activator.GetObject(Type type, string url, object data) returns a proxy to the object. I guess that proxy inherits from MarshalByRefObject and can be sent across AppDomains. Am I right? In my app, I am creating an object in appdomain A and using it appdomain B. The ob...
{ "language": "en", "url": "https://stackoverflow.com/questions/270427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Custom code in Reporting Services report In Reporting Services I would like to add a parameter that contains data from a custom code block. Ideally, I would be able to run the following code (this is a simple testing example): Function GetPeriods() As String() Dim values As System.Collections.ArrayList = New ...
{ "language": "en", "url": "https://stackoverflow.com/questions/270434", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Where to download older versions of Visual C++ Express? Is there a way to download older versions of Visual C++ Express? I'm particularly interested in Visual C++ 2005 Express (PRIOR SP1) and Visual C++ Toolkit 2003. I tried googling for them, but all the sites linked to microsoft.com, from where microsoft (for some...
{ "language": "en", "url": "https://stackoverflow.com/questions/270437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to repaint the UI inside DoDragDrop I'm implementing my app as a drag source. When I call DoDragDrop (Win32 call, not MFC) it enters into a modal loop and I don't get repaint messages in my main window until DoDragDrop returns. Unfortunately if I do a drop in the shell (a file) and the filename is already there ...
{ "language": "en", "url": "https://stackoverflow.com/questions/270438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: SQL Deletion Cascading Help (Specific Question) I have two tables (renamed/refactored for illustrative purposes) with a Many-To-Many relationship in an HSQL database. I want everything to be wiped out when I delete from one side of a Many-to-Many relationship (without querying the table; this is performance critica...
{ "language": "en", "url": "https://stackoverflow.com/questions/270440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: javax.servlet.ServletException: bean [name] not found within scope I'm getting this error: javax.servlet.ServletException: bean not found within scope on a page with this at the top. <jsp:useBean id="bean" type="com.example.Bean" scope="request" /> The class exists in the classpath, it worked this morning, and I d...
{ "language": "en", "url": "https://stackoverflow.com/questions/270444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Maven compile with multiple src directories Is there a way to compile multiple java source directories in a single maven project? A: This also works with maven by defining the resources tag. You can name your src folder names whatever you like. <resources> <resource> <directory>src/main/jav...
{ "language": "en", "url": "https://stackoverflow.com/questions/270445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "213" }
Q: Using SSLv3 in IIS 6.0 I recently got a notification from a McAfee service (what used to be called HackerSafe) that my website is using SSLv2 and it should be using SSLv3. I don't know anything about the versions of SSL. My site is using IIS 6.0, is there a setting somewhere to turn on SSLv3 or do I need to install ...
{ "language": "en", "url": "https://stackoverflow.com/questions/270453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is it possible to program iPhone in C++ I'm all for language diversity, but Objective C is insane. So I'm curious: is it possible to code iPhone apps with C++ while using the Cocoa API, etc? A: Although Objective-C does indeed appear to be "insane" initially, I encourage you to stick with it. Once you have an "a-h...
{ "language": "en", "url": "https://stackoverflow.com/questions/270455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "127" }
Q: Cocoa/WebKit, having "window.open()" JavaScript links opening in an instance of Safari I am building a really basic Cocoa application using WebKit, to display a Flash/Silverlight application within it. Very basic, no intentions for it to be a browser itself. So far I have been able to get it to open basic html links...
{ "language": "en", "url": "https://stackoverflow.com/questions/270458", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: DTD Validation With Python? I was wondering which of the built in python libraries, support DTD validation. I've been looking around and haven't been able to get a straight answer. I know ElementTree does NOT Support DTD validation. Which ones do?
{ "language": "en", "url": "https://stackoverflow.com/questions/270460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Silent Installation of SQl Express 2005 Can anyone please let me know the procedure to perform silent installation of SQL Server Express 2005 and the way to specify the installation parameters. A: Get the MSI and do string InstallFile = "SSCERuntime-ENU-x86.msi" string LogFile = "C:\Install.log" Process proc; proc...
{ "language": "en", "url": "https://stackoverflow.com/questions/270468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Build Via NAnt vs Visual Studio - One dll Missing My solution includes these two projects: * *MyNamespace.Web.UI *MyNamespace.Web.Core UI references Core, and Core references Foobar.dll, which exists nowhere except my library. When I build from Visual Studio 2008 Foobar.dll is in the UI project's Bin folder a...
{ "language": "en", "url": "https://stackoverflow.com/questions/270479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is assert(false) ignored in release mode? I am using VC++. Is assert(false) ignored in release mode? A: IIRC, assert(x) is a macro that evaluates to nothing when NDEBUG is defined, which is the standard for Release builds in Visual Studio. A: The assert macro (at least it is typically a macro) is usually defined t...
{ "language": "en", "url": "https://stackoverflow.com/questions/270488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: How would you make two s overlap? I need two divs to look a bit like this: | | ---| LOGO |------------------------ | |_______________| LINKS | | CONTENT | What's the neatest/most elegant way of making them overlap neatly? The logo will...
{ "language": "en", "url": "https://stackoverflow.com/questions/270493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "166" }
Q: Enter button does not submit form (IE ONLY) ASP.NET I have a form with a textbox and a button. IE is the only browser that will not submit the form when Enter is pressed (works in FF, Opera, Safari, Chrome, etc.). I found this javascript function to try to coax IE into behaving; but no avail: function checkEnter(e)...
{ "language": "en", "url": "https://stackoverflow.com/questions/270494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to encrypt in VBScript using AES? I am looking to encrypt some data using Rijndael/AES in VBScript using a specific key and IV value. Are there any good function libraries or COM components that would be good to use? I looked at CAPICOM; it allows a passphrase only, and won't allow setting specific key and IV va...
{ "language": "en", "url": "https://stackoverflow.com/questions/270510", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: vb6 xcopy deployment Can any one tell me how to convert an legacy application which is vb6 ( COM dll's ocx and exes) to use Regfree COM . I tried opening the dlls in visual studio and created manifest file, but some of the dlls it is giving error. Is there any tools out there which will help me to do this process? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/270523", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Automatically create ASDF files for a Common Lisp project Are there any libraries out there that do this? Playing around with Common Lisp it seems like this would be one of the most useful things to lower barrier of entry for newcomers. ASDF seems mostly designed for deployment, not for rapid prototyping and develo...
{ "language": "en", "url": "https://stackoverflow.com/questions/270525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: ASSERT vs. ATLASSERT vs. assert I am refactoring some MFC code that is littered with ASSERT statements, and in preparation for a future Linux port I want to replace them with the standard assert. Are there any significant differences between the two implementations that people know of that could bite me on the back...
{ "language": "en", "url": "https://stackoverflow.com/questions/270527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I determine if a .NET assembly was built for x86 or x64? I've got an arbitrary list of .NET assemblies. I need to programmatically check if each DLL was built for x86 (as opposed to x64 or Any CPU). Is this possible? A: Try to use CorFlagsReader from this project at CodePlex. It has no references to other a...
{ "language": "en", "url": "https://stackoverflow.com/questions/270531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "365" }
Q: Embedding .Net Runtime Am I able to embed the .net runtime so that .net is not required on the host operating system? I was looking at doing this with Mono by looking here: http://mono-project.com/Embedding_Mono but seems to allude to using external modules to accomplish this. My goal is to have one single executab...
{ "language": "en", "url": "https://stackoverflow.com/questions/270533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: VB6: Interacting with an invisible form So, I have a form in VB which is visible except when the program is started silently, in which case the form is still loaded but the interactions are done programmatically. However, in a tiny number of cases I want forms created within the invisible form to be visible. What ...
{ "language": "en", "url": "https://stackoverflow.com/questions/270537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Recommended face detection tools/SDK/etc I'm looking for a quick way to detect faces in pictures (stored as JPG or any other popular image format). Code in any popular programming language will do (Python, C#, Java, Matlab, etc.). I'm also willing to implement an algorithm by myself, as long as it is proven to be a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/270539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Finding a pattern in a set What algorithms could i use to determine common characters in a set of strings? To make the example simple, I only care about 2+ characters in a row and if it shows up in 2 or more of the sample. For instance: * *0000abcde0000 *0000abcd00000 *000abc0000000 *00abc000de000 I'd li...
{ "language": "en", "url": "https://stackoverflow.com/questions/270541", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Testing for assert in the Boost Test framework I use the Boost Test framework to unit test my C++ code and wondered if it is possible to test if a function will assert? Yes, sounds a bit strange but bear with me! Many of my functions check the input parameters upon entry, asserting if they are invalid, and it woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/270542", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Is there step-by-step tutorial on setting up CruiseControl.NET? What to do automatic nightly build of .NET web application and upload to the test server. Or, if this tool is overkill, please suggest something else. A: The other answers are all great, but have you also looked at CI Factory? From the CI Factory sit...
{ "language": "en", "url": "https://stackoverflow.com/questions/270550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }