text
stringlengths
8
267k
meta
dict
Q: How do I clear the read-only flag from a file in Perl? I need to clear the read-only flag of a file in my Perl program that runs on Windows. I know system("attrib -r $filename") would work, but I was wondering if there is no built-in option in Perl to do it. chmod 777, $filename doesn't seem to work. Thanks, splinto...
{ "language": "en", "url": "https://stackoverflow.com/questions/445912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Deep xml serialize a struct Options I have the class and struct shown below. If I serialize the class as is using xmlserializer I get: < Test> < TestNumber1 >5< /TestNumber1 > < InnerTest / > < /Test > what is the easiest way to make InnerTest serialise properly (preferably using xmlserializer) with out giv...
{ "language": "en", "url": "https://stackoverflow.com/questions/445915", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: GridView paging on custom collecton I am using paging on a GridView that is tied to a List<Employee>. But this code does not work. What is the correct way? I am not using an ObjectDataSource. protected void myGV_PageIndexChanging(object sender, GridViewPageEventArgs e) { List<Employee> p = ReturnEmplColl(); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/445916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Visual Studio 2008 Professional Edition Im currently using vs2008 with asp.net mvc framework for web development. Im missing a feature/configuration: When I change to another .cs file I want the "class view" to automatically show me what methods the active .cs file contains. A: I'm not sure if you can set it up th...
{ "language": "en", "url": "https://stackoverflow.com/questions/445938", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: retrieving XMLHttpRequest parameters in python Client-side code submits an object (in the POST request body) or query string (if using GET method) via ajax request to a python cgi script. Please note that the object/query string parameters are not coming from a <form> or <isindex>. How can I retrieve these paramete...
{ "language": "en", "url": "https://stackoverflow.com/questions/445942", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is SQL the assembly for databases? Talking about hibernate and others ORMs, the ORMs evangelists talk about SQL like the assembly language for Databases. I think is soon to assert this, but I guess can be true on a near future, not sure. UPDATE: The analogy I was referring means SQL is to assembly what ORM is to C/J...
{ "language": "en", "url": "https://stackoverflow.com/questions/445950", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Modular php application development We are a small team of developers planing to develop a php application. (let's say a CRM system) Our main goal is to make it a plug-in-enabled application so that clients' developers can write plug-ins add new features to the system without changing the application's core code. Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/445951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Struts2 JSON Plugin not working with "lazy" data I have an Entity with a OneToOne relation that is fetched lazily: @Entity public class Person { @Id private Integer id; @Column(length=60) private String address; @OneToOne(fetch=FetchType.LAZY) @JoinColumn(name="idProvince") private Prov...
{ "language": "en", "url": "https://stackoverflow.com/questions/445956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Visual Studio plug-ins : where should I store my tool's window last size and position? I have written a small plug in for Visual Studio 2005. It displays the name and the shortcuts of the last command you have used (nice for learning seldom used command's shortcuts). I display this information in a window that I man...
{ "language": "en", "url": "https://stackoverflow.com/questions/445965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Change CSS classes from code It's easy to set CssClass in the code-behind, but this runs the risk of overwriting existing classes. I need to set certain elements to ReadOnly = true; and I'd like to apply a style as a visual cue that the item cannot be altered...easy enough: .CssClass += " ReadOnlyStyle"; But at tim...
{ "language": "en", "url": "https://stackoverflow.com/questions/445967", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Log4Net config in external file does not work We are using log4net and want to specify it's configuration in an external config file (as we have done with other sections). To do this we have changed the log4net section in the App.config to: ... <section name="log4net" type="log4net.Config.Log4NetConfigurationS...
{ "language": "en", "url": "https://stackoverflow.com/questions/445976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "94" }
Q: Is there an easy way to send SCSI passthrough on OSX using native python On Windows I am able to sent SCSI passthrough to devices using win32file.DeviceIOControl(..), on UN*X I can do it using fnctl.ioctl(...). I have been searching for something equivalent in OSX that would allow me to send the IOCTL commands using...
{ "language": "en", "url": "https://stackoverflow.com/questions/445980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Convert anonymous type to class I got an anonymous type inside a List anBook: var anBook=new []{ new {Code=10, Book ="Harry Potter"}, new {Code=11, Book="James Bond"} }; Is to possible to convert it to a List with the following definition of clearBook: public class ClearBook { int Code; string Book; } by usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/445984", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Linq to SQL: execution order when calling SubmitChanges() I have 2 related database tables which in simplified form look like this Product( product_id, name ) ProductSpecs( spec_id, product_id, name, value ) Foreign key is set via product_id field and ProductSpecs table has a unique constraint on (prod...
{ "language": "en", "url": "https://stackoverflow.com/questions/445985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How to force gcc preprocessor to preserve whitespace? For the code: int i; gcc preprocessor outputs: int i; How to force it to preserve whitespace? I call preprocessor with: gcc -E somefile.c command. A: Use it in traditional mode, ie '-traditional-cpp' as described here.
{ "language": "en", "url": "https://stackoverflow.com/questions/445986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What dlls from Gallio do I need to include for TeamCity to run the tests I'm using Gallio and MbUnit 3, and I have Team City 4 installed. I just put the whole bin directory of Gallio into Subversion since I didn't know what dlls I needed. Do you know which ones I need to keep, and what I don't need to put into SCM...
{ "language": "en", "url": "https://stackoverflow.com/questions/445987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Why is Long.valueOf(0).equals(Integer.valueOf(0)) false? This questions is prompted by strange HashMap.put() behaviour I think I understand why Map<K,V>.put takes a K but Map<K,V>.get takes an Object, it seems not doing so will break too much existing code. Now we get into a very error-prone scenario: java.util.Has...
{ "language": "en", "url": "https://stackoverflow.com/questions/445990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Using a variable in a query I am trying to set up a query for my dataset in C# using a variable for the filter. For example I am trying to only display a specific account number and his balance, with a local variable being the account number used as a filter for that exact one. Am I going about this the wrong way? I...
{ "language": "en", "url": "https://stackoverflow.com/questions/445993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Hosting website subfolder on separate domain We have 2 web applications what we want to be installed on different IIS servers. But we want what user can access one by address www.test.com and second by www.test.com/directory Is it possible? A: No, that's not possible, unless you have a front-end "reverse proxy" whi...
{ "language": "en", "url": "https://stackoverflow.com/questions/445995", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Resizing a Webbrowser control hosted by an Explorer Bar in IE I have a custom explorer bar (a band object) that hosts a webbrowser control. I can initialize the WebBrowser control properly and have it display web pages. However, I've noticed that when I resize the explorer bar, the webbrowser control doesn't resize ...
{ "language": "en", "url": "https://stackoverflow.com/questions/446000", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Beginner: Dynamically inserting a frame to a MovieClip in Haxe/ActionScript3 Let's say I have a resource file which exports mc1 with 4 frames in it. I would like to create a new MovieClip and insert frames like this: mc2:flash.display.MovieClip = new flash.display.MovieClip() mc1.gotoAndStop(2); mc2.gotoAndStop(1);...
{ "language": "en", "url": "https://stackoverflow.com/questions/446003", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: .Net CCW no events with registration-free COM! I have a COM Callable Wrapper that I'm using from a VB6 program, but the program won't receive COM events unless the CCW is registered. Otherwise, the CCW works fine, just no events until I remove the program's manifest file and register the CCW using "regasm /tlb /code...
{ "language": "en", "url": "https://stackoverflow.com/questions/446013", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I use aspnet_compiler from a bat file? I need to execute aspnet_compiler from a bat file that I maintain to automate the publishing of a ASP.NET application from within CruiseControl.NET. aspnet_compiler runs fine if I manually open the Visual Studio Command Prompt, but doesn't run if I open a normal cmd.exe...
{ "language": "en", "url": "https://stackoverflow.com/questions/446015", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Popular folder structure for build I am wondering what the popular or best way to organise your build assets and source code within a project is? A: for example, I use the following for my .Net style projects; /build/reports - reports and logs from the build process /build/artifacts - all output of the build proc...
{ "language": "en", "url": "https://stackoverflow.com/questions/446017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Tracing IO in java application? I am trying to find out why Apache CXF is running away doing "something" upon first-time initialization of a web-service. "Something" is probably some kind of IO, and I'm guessing it's trying to resolve an external address/schema/DTD of some sort. So I'm trying to find some kind of ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/446023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Django: how do you serve media / stylesheets and link to them within templates Variations of this question have been asked, but I'm still unable to get my stylesheets to load correctly when my templates are rendered. I'm attempting to serve static media from the Django process during development - which is strongly ...
{ "language": "en", "url": "https://stackoverflow.com/questions/446026", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: Can MySQL 5.0 Community Edition scale up to meet a large user base? I need to create a social-networking application that is going to attract quite a significant number of users for its use and is going to require high scalability capabilities. I would prefer an open source solution and had MySQL in mind. But I need...
{ "language": "en", "url": "https://stackoverflow.com/questions/446027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to get Visual Studio to automatically add a needed Import element in an .aspx file? I have a class "Message". In my .aspx file view (ASP.NET MVC), I am typing a line of code and use "Message". <h1>Messages</h1> <ul> <% foreach(Message %> </ul> I get a helpful bubble that says "The type or namespace Message ...
{ "language": "en", "url": "https://stackoverflow.com/questions/446029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: IoC/DI Container that supports Compact Framework Is their any IoC controllers available that will work on .NET Compact Framework? A: * *http://code.google.com/p/compactcontainer/ *http://ninject.org/ A: The OpenNETCF IoC framework supports the Compact Framework (as a first-class citizen), the full desktop framew...
{ "language": "en", "url": "https://stackoverflow.com/questions/446033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to validate a Datetime value in javascript? How to validate a date time value in javascript to ensure that the value entered for year, month , day , hour, minute and second compose a valid Datetime object? A: Perhaps something like that: function ValidateDate(y, mo, d, h, mi, s) { var date = new Date(y, mo - ...
{ "language": "en", "url": "https://stackoverflow.com/questions/446035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I check for Python version in a program that uses new language features? If I have a Python script that requires at least a particular version of Python, what is the correct way to fail gracefully when an earlier version of Python is used to launch the script? How do I get control early enough to issue an er...
{ "language": "en", "url": "https://stackoverflow.com/questions/446052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "249" }
Q: Can I use two different look and feels in the same Swing application? I'm using the Flamingo ribbon and the Substance Office 2007 look and feel. Of course now every control has this look and feel, even those on dialog boxes. What I want is something like in Office 2007, where the ribbons have their Office 2007 look,...
{ "language": "en", "url": "https://stackoverflow.com/questions/446056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: CSS two divs next to each other I want to put two <div>s next to each other. The right <div> is about 200px; and the left <div> must fill up the rest of the screen width? How can I do this? A: UPDATE If you need to place elements in a row, you can use Flex Layout. Here you have another Flex tutorial. It's a great C...
{ "language": "en", "url": "https://stackoverflow.com/questions/446060", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "262" }
Q: Letterpress in WPF How can I achieve the letterpress effect on a text in .NET WPF? A: Use bevel bitmapeffect on your text and container. A combination can achieve the letter press effect.
{ "language": "en", "url": "https://stackoverflow.com/questions/446063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Encoded character is used instead the correct one I have a little problem and I'm hopping that you can help me solve this annoying issue. I need to use an iFrame in an administration panel to let users use the selection service, and in the HTML I have: <iframe scrolling="yes" runat="server" title="Par Selection" id=...
{ "language": "en", "url": "https://stackoverflow.com/questions/446073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: iPhone Development - restrict user interaction with application and show a progress indicator I have a case where i pull information from a server. My application has both a tab bar and navigation buttons. I want the application to show a progress indicator and disable all other controls so that user can't jump arou...
{ "language": "en", "url": "https://stackoverflow.com/questions/446077", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Moving an arbitrary setting to a toolbar in Visual Studio I want to be able to modify a certain setting of Visual Studio right from the toolbar. Specifically, the number of parallel builds (Tools | Options | Projects and Solutions | Build and Run | maximum number of parallel project builds). It can be either an edi...
{ "language": "en", "url": "https://stackoverflow.com/questions/446080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What do I need to offset the performance setback induced by use of the Spring framework? I am using Spring with Hibernate to create an Enterprise application. Now, due to the abstractions given by the framework to the underlying J2EE architecture, there is obviously going to be a runtime performance hit on my app. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/446099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: multiple description coding How can I encode an h264 video to be MDC (multiple description coding) A: You can't (but...) It is not possible today to just check a box on existing software, stream video encoded as h264 MDC, decode it and play it back in a browser. There is no h264 MDC profile. (Without more details...
{ "language": "en", "url": "https://stackoverflow.com/questions/446100", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I get the widths of the borders drawn by ControlPaint? I'm drawing a border with System.Windows.ControlPaint.DrawBorder3D, and want to draw into the rectangle inside the border. How do I get the width of the border, so that I can find the rectangle inside it? UPDATE: With the default theme, the borders are 2...
{ "language": "en", "url": "https://stackoverflow.com/questions/446104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: regular expression for no blank space b/w text Please tell me how to check regular expression for no blank space b/w text. A: If you mean "What's the reqular expression to check there is no white space in a string", the following pattern will work: ^[\S]*$ This will find any string that only contains non-white sp...
{ "language": "en", "url": "https://stackoverflow.com/questions/446108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: LINQ to SQL Insert i'm using LINQ To SQL to perform an insert via db.table.InsertOnSubmit(). I'm wondering if there is a way to reproduce the T-SQL version of the 'where not exists (select etc etc) begin insert into etc etc end' as one single query? Thanks, Martin A: LINQ has an extension method called Contains whi...
{ "language": "en", "url": "https://stackoverflow.com/questions/446109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Manually generate ActiveX wrapper after TLBIMP-ed dlls? I have several ActiveX components that needed to be accessed from a C# project. I can import them via Visual Studio's add reference dialog, which will also automatically generate wrappers class. (i.e. ABCLib and AxABCLib) I know that I can generate the primary ...
{ "language": "en", "url": "https://stackoverflow.com/questions/446121", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to Do a Merge for XML files in Code Smith? I am using CodeSmith to Generate The Files in my Project. It has functionalities to Merge the C#/VB & SQL files using Insert Region & Preserve Region Strategies. How Can I extend these to merge the XML files I am creating?. Thanks A: Actually, CodeSmith supports merg...
{ "language": "en", "url": "https://stackoverflow.com/questions/446125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Regex match and grouping Here's a sample string which I want do a regex on 101-nocola_conte_-_fuoco_fatuo_(koop_remix) The first digit in "101" is the disc number and the next 2 digits are the track numbers. How do I match the track numbers and ignore the disc number (first digit)? A: Something like /^\d(\d\d)/ W...
{ "language": "en", "url": "https://stackoverflow.com/questions/446126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Default button hit in windows forms (trying to find the best solution) The question is: How to make default button be focused on form focus and response on "Enter" hit, but not focused when the caret is in textbox with multiline property set to true for example?..I know that i can do some exceptions in code, but may...
{ "language": "en", "url": "https://stackoverflow.com/questions/446147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Pure PHP rrdtool does anyone know a pure-php implementation of rrdtool? I googled this question, but only found answers about interfacing PHP & rrd... A: I think it probably defeats the purpose. While I see the attraction to having such a useful tool in a language you can tweak/edit, I think RRDtool's incredible us...
{ "language": "en", "url": "https://stackoverflow.com/questions/446148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Accessing ListBox values at Server after modifying it via Javascript ASP.Net I have a listBox whose values I am manipulating by javascript for e.g adding a new Item to list. Now when I am trying to access this listBox from Server its only showing me the values that were originally part of ListBox at PageLoad. The ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/446149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Generating Uniform Random Deviates within a given range I'd like to generate uniformly distributed random integers over a given range. The interpreted language I'm using has a builtin fast random number generator that returns a floating point number in the range 0 (inclusive) to 1 (inclusive). Unfortunately this mea...
{ "language": "en", "url": "https://stackoverflow.com/questions/446153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why can't ASP.NET MVC URL routing find my controller? In my Global.asax.cs file in RegisterRoutes method, I put routes.MapRoute("messages", "Message/{id}", new { controller = "Archive", action = "Message", id = 0 }); Then I created this controller: namespace TestingApp.Controllers { public class Arch...
{ "language": "en", "url": "https://stackoverflow.com/questions/446179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I do pagination in ASP.NET MVC? What is the most preferred and easiest way to do pagination in ASP.NET MVC? I.e. what is the easiest way to break up a list into several browsable pages. As an example lets say I get a list of elements from a database/gateway/repository like this: public ActionResult ListMyIte...
{ "language": "en", "url": "https://stackoverflow.com/questions/446196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "89" }
Q: Hiding columns when running a query I am looking at a macro which would hide columns for a particular range every time I run the query. For example: For the first time when I run the query, I would need Columns A to D to be hidden, like wise the next time I run the query, I would need columns E to H to be hidden. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/446198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I look at remote processes in C#? I want to know if a process is running in the current machine as a part of my application ,but my application is deployed in another machine. I'm using System.Diagnostics.Getprocessbyname but it looks for processes on the machine the application is deployed to. I want to know...
{ "language": "en", "url": "https://stackoverflow.com/questions/446204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can I continue to use an iterator after an item has been deleted from std::multimap<>? Can I continue to use an multimap iterator even after a call to multimap::erase()? For example: Blah::iterator iter; for ( iter = mm.begin(); iter != mm.end(); iter ++ ) { if ( iter->second == something ) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/446205", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Standalone Java Applications is there a way to compile java files into executable with high quality free software and without going through using executable JAR files? A: There are several ways to do it. But you should in general avoid making a java application executable on one platform just because you don't like...
{ "language": "en", "url": "https://stackoverflow.com/questions/446208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Possible values from sys.platform? What are the possible return values from the following command? import sys print sys.platform I know there is a lot of possibilities, so I'm mainly interested in the "main" ones (Windows, Linux, Mac OS) A: FreeBSD 7.0: freebsd7. FreeBSD8 but build performed on previous version, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/446209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "97" }
Q: Can I avoid JIT in .NET? Say if my code is always going to be run on a particular processor and if I have this information during installation - is there a chance I can avoid JIT? A: You don't have to avoid JIT if you have CPU information at installation. If you compile your modules using the /platform:[x86/x64/IA...
{ "language": "en", "url": "https://stackoverflow.com/questions/446211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: I need a background program C++ I have created this program: //Includes.... int main() { ifstream readfile("File.txt"); string str; while(1) { getline(readfile,str); system("cls"); Sleep(10000); } } It's just a program that reads every 10 seconds a line from the file "File.txt" I wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/446218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MS Workflow problem with custom activities member variable state I have a simple custom activity with a private member variable (integer). When i put it inside a sequence activity which is inside a while activity and start iterating i have a problem: My member variable is zeroed in each iteration even though i incre...
{ "language": "en", "url": "https://stackoverflow.com/questions/446219", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there any pattern or refactoring trick to split Enum and DBDictionary data duplicate We have a smelly code in our project. A lot of values which used in biz logic have 2 places where they stored: we have dictionary tables (used in FK relations) in DB where we stored values e.x. MessageDirectionInfo: 0|Unknown 1|...
{ "language": "en", "url": "https://stackoverflow.com/questions/446221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I reverse Unicode decomposition using Python? Using Python 2.5, I have some text in stored in a unicode object: Dinis e Isabel, uma difı´cil relac¸a˜o conjugal e polı´tica This appears to be decomposed Unicode. Is there a generic way in Python to reverse the decomposition, so I end up with: Dinis e Isabe...
{ "language": "en", "url": "https://stackoverflow.com/questions/446222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Binding IDataErrorInfo to window IsEnabled button property I have a WPF sub window with some input controls that the user has to correctly fill before pressing Ok button. I have already implemented the interface IDataErrorInfo to validate all properties bound to UI Controls. Now I would like that the IsEnabled prope...
{ "language": "en", "url": "https://stackoverflow.com/questions/446229", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Are CRLF lines ok in a Rails project deployed on Linux? I have a Git repository (originally CVS, then SVN, now Git) containing a Rails project that has been deployed on Linux for a while now. Everything seems to run fine. Now that I've converted to git, I see that many of my files in the repository contain CRLF lin...
{ "language": "en", "url": "https://stackoverflow.com/questions/446244", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Flex and AIR passing data between each other I’m looking for some samples/tutorials/general pointers in doing either of the following. 1) Create an AIR app that can load a live flex app and use that for testing. So we have a app which is live and if I could load that into a AIR app which can edit a config file a...
{ "language": "en", "url": "https://stackoverflow.com/questions/446253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: LINQ Sorting I am sorting a GridView bind to a ananymous type. protected void GridView1_Sorting(object sender, GridViewSortEventArgs e) { List<object> lb = (List<object>)ReturnAnony(); // Not working // ?? What to write here } object ReturnAnony() { var anony = // I create the ananymous type and return ...
{ "language": "en", "url": "https://stackoverflow.com/questions/446262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Visual Studio: Varying tab width/options by .VCPROJ or .SLN file? Some of our projects call for default Visual Studio tab options (width 4; keep tabs); some call for width 3; use spaces. Don't ask. Rather than set these globally, is there anyway in which I could set this on a per-solution or per-project or even (ema...
{ "language": "en", "url": "https://stackoverflow.com/questions/446268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Can I use SPACE as mapleader in VIM? From http://items.sjbach.com/319/configuring-vim-right (2009 archive from original) I got that you were supposed to be able to use Space as the mapleader in vim. I've tried but it does not seem to work. Is there anyone who made it work? Tried: let mapleader = <space> A: Maplead...
{ "language": "en", "url": "https://stackoverflow.com/questions/446269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "103" }
Q: Getting 'Invalid Argument' error in PL/SQL block The following PL/SQL will not execute and simply returns 'Invalid Argument' as an error. I've gone as far as commenting out eavery line one by one and I can vary the error I receive but I cannot get the proc to run as I cannot identify where the error lies and it ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/446272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a 'catch' with FastFormat? I just read about the FastFormat C++ i/o formatting library, and it seems too good to be true: Faster even than printf, typesafe, and with what I consider a pleasing interface: // prints: "This formats the remaining arguments based on their order - in this case we put 1 before zer...
{ "language": "en", "url": "https://stackoverflow.com/questions/446276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Need an overview of non-enterprise databases for .NET For smaller websites which are view-only or require light online-editing, SQL Server 2008, Oracle, and MySQL are overkill. In the PHP world, I used SQLite quite a bit which is a e.g. 100K file holding hundreds of records which you speak to with standard SQL. In t...
{ "language": "en", "url": "https://stackoverflow.com/questions/446282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Validate sprintf format from input field with regex I have an input field where both regular text and sprintf tags can be entered. Example: some text here. %1$s done %2$d times How do I validate the sprintf parts so its not possible them wrong like %$1s ? The text is utf-8 and as far as I know regex only match latin...
{ "language": "en", "url": "https://stackoverflow.com/questions/446285", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Sample Problems for Multithreading Practice I'm about to tackle what I see as a hard problem, I think. I need to multi-thread a pipeline of producers and consumers. So I want to start small. What are some practice problems, in varying levels of difficulty, that would be good for multi-threading practice? (And not...
{ "language": "en", "url": "https://stackoverflow.com/questions/446288", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Non-standard tag behavior in Opera I'm working with a publishing system that uses custom tags. These are interpreted on the server. The problem is, that they cause big problems with Opera, when viewed locally (custom tags are not interpreted). Opera is handling these tags differently from other browser. It looks lik...
{ "language": "en", "url": "https://stackoverflow.com/questions/446289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Personal Version Controller I'd like to know if there is any personal source controller, I'd like to have a repository on my machine without going through setting up a server, also I work with TeX files not any particular language and I'd like to have backups of my files the way sub version does A: i'm not sure wha...
{ "language": "en", "url": "https://stackoverflow.com/questions/446292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Where can I get a "useful" C++ binary search algorithm? I need a binary search algorithm that is compatible with the C++ STL containers, something like std::binary_search in the standard library's <algorithm> header, but I need it to return the iterator that points at the result, not a simple boolean telling me if t...
{ "language": "en", "url": "https://stackoverflow.com/questions/446296", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "120" }
Q: Help with linq orderby on class aggregate relationships I am getting a little confused and need some help please. Take these two classes public class Comment { public string Message {get; set;} public DateTime Created {get; set;} } public class Post { public int PostId {get; set;} public string C...
{ "language": "en", "url": "https://stackoverflow.com/questions/446303", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Which XPathAPI should I use in Java 1.5? I have been using com.sun.org.apache.xpath.internal.XPathAPI for some time and it seems to work ok. Recently I tried to use the TPTP profiler in Eclipse but it could not find the XPathAPI class. I haven't figured this problem yet but it did make me wonder whether I should be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/446315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Value padded with spaces when displayed in dbaware textfield I'm using ADO-components to connect to an access database. In a column defined as text with width 50, dataaware textfields always displays 50 characters even when the actual string value contains less characters. The value gets padded with spaces, and if t...
{ "language": "en", "url": "https://stackoverflow.com/questions/446316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# compiler and caching of local variables EDIT: Oops - as rightly pointed out, there'd be no way to know whether the constructor for the class in question is sensitive to when or how many times it is called, or whether the object's state is changed during the method, so it would have to be created from scratch each...
{ "language": "en", "url": "https://stackoverflow.com/questions/446320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Global resource vs. Local resource in ASP.NET We use resx files to localize our web applications. We usually create local resx files (that map to a specific page) when only one page uses a certain phrase, and a global resx file when more than one page needs the phrase. But the good thing about global resx files is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/446321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Sql Server Ignore update errors I have inherited a very old database that needs some data to be updated. Each row ha a column with a UniqueID that looks like C0042-45-39612. The last 3 numbers of the code are the category Id (in this case 612). I need to do an update that targets only certain categories and I'm usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/446322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Preventing Selection / Copy to Clipboard in Firefox I need to prevent user from selecting text (select all or select a portion of text) in the browser Mozilla Firefox, using java script. I have done this using Internet Explorer, but it seems doesn't work with Mozilla. Any hints? URL? Sample? TIA. EDIT: Actually, thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/446334", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Send files to Symantec AV Scan Engine from a C# Application We need to scan files as they are being uploaded using the Symantec AV Scan Engine from our .Net Application, which supports ICAP Any pointers on how to go about this would be very helpful. A: The SCAN Engine SDK which is bundled with the scan engine downl...
{ "language": "en", "url": "https://stackoverflow.com/questions/446335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best way to add summary tags to a generated webservice proxy class? Aloha I'm referencing an external webservice in my .NET 2.0 application. Adding a service reference generated a nice proxy class for me. I'd like to add ///<summary> style documentation to this. If the service reference is updated, all m...
{ "language": "en", "url": "https://stackoverflow.com/questions/446350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Dynamic Variables in XSLT I'm passing in a bunch of key-value pairs as parameters to a XSL (date -> "20th January", author -> "Dominic Rodger", ...). These are referenced in some XML I'm parsing - the XML looks like this: <element datasource="date" /> At present, I can't work out how to get 20th January out of thes...
{ "language": "en", "url": "https://stackoverflow.com/questions/446354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Storing a large number of images I'm thinking about developing my own PHP based gallery for storing lots of pictures, maybe in the tens of thousands. At the database I'll point to the url of the image, but here's the problem: I know is impractical to have all of them sitting at the same directory in the server as it...
{ "language": "en", "url": "https://stackoverflow.com/questions/446358", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: ASP.NET MVC project architecture I am pretty confused about the ASP.NET MVC project architecture. In ASP.NET WebForm I am normally for small to medium size project using following Project pattern DAL <-- communicate through DTO/reader/dataset -- > BL <--> UI I think in MVC application should be like DAL <-- commu...
{ "language": "en", "url": "https://stackoverflow.com/questions/446359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Struts html html:text does not close input type="text" tags I use struts-html to generate forms fields. For example: <%@ taglib prefix="html" uri="/WEB-INF/taglibs/struts-html.tld" %> <html:text property="email" styleId="email" size="44"/> generates: <input type="text" name="email" size="44" value="" id="email">...
{ "language": "en", "url": "https://stackoverflow.com/questions/446376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Delphi 2009 COM/ActiveX Type Library support stability Referring to TLB and maintenance issues ... My question to people (often) using the new COM/ActiveX type library support in Delphi 2009: How stable is the implementation? Especially, I'm interested in: adding/deleting classes, changing GUIDs, renaming methods/pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/446379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I replace the contents of an existing XML file in C#.NET? When trying to replace the content of an XML file in C#.NET with a snippet like this: string file = Path.GetTempFileName(); // pretend this is a real file string tmpFile = Path.GetTempFileName(); using (var writer = XmlWriter.Create(File.Create(tmpFil...
{ "language": "en", "url": "https://stackoverflow.com/questions/446380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to write eclipse rcp applications with scala? The Scala Eclipse plugin page says: * Support for Eclipse plugin and OSGi development including hyperlinking to Scala source from plugin.xml and manifest files. How does this support work? There's no wizards for making Scala plugins. I've found no documentation on ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/446389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How to detect IIS version using C#? How to detect IIS version using C#? Update: I meant from a winapp (actually the scenario is developing a custom installer that wants to check the version of the installed IIS to call the appropriate api's) A: U can find it in the registry. Up to IIS version 6 you can find it here...
{ "language": "en", "url": "https://stackoverflow.com/questions/446390", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: System.Net.Mail.MailMessage Raw Content / Spam Assassin What I am trying to do is pass the raw content of an outgoing email to spamassassin in order to calculate a spam score. I am stuck in how I might get the raw content of the email. My C# code currently just constructs the MailMessage and passes it the SmtpClient...
{ "language": "en", "url": "https://stackoverflow.com/questions/446393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: .NET resources hierarchy unrelated to culture I have some string resources, e.g. a user welcome string. By default it should be "Hello", but for customer X it should be "Greetings". I'd like to use .NET's resources implementation, and have the strings sit in constants or in files or wherever I like, plus the hierarc...
{ "language": "en", "url": "https://stackoverflow.com/questions/446396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Has jQuery taken a backwards approach to method chaining? Is it just me who find the following code intrinsically backwards? I am using this posting as a reference. // create the inner div var $inner = $("<div>inner</div>") // append it to a new outer div .appendTo("<div>outer</div>") // next change the j...
{ "language": "en", "url": "https://stackoverflow.com/questions/446399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Adjust UILabel height depending on the text Consider I have the following text in a UILabel (a long line of dynamic text): Since the alien army vastly outnumbers the team, players must use the post-apocalyptic world to their advantage, such as seeking cover behind dumpsters, pillars, cars, rubble, and other objects...
{ "language": "en", "url": "https://stackoverflow.com/questions/446405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "327" }
Q: remote procedure calls Does any one know a good way to do remote procedure calls in windows (non .net) environmental? I cant find much information on how to do it and the msdn only has the .net version. . Edit: Thanks for the answers so far. What i need it for is to communicate with a service on the same computer wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/446411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Create Out-Of-Process COM in C#/.Net? I need to create an out-of-process COM server (.exe) in C# that will be accessed by multiple other processes on the same box. The component has to be a single process because it will cache the information it provides to its consumers in memory. Note: the processes that will acce...
{ "language": "en", "url": "https://stackoverflow.com/questions/446417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Problems with Struts and AJAX Here is my problem, I'm bulding a modular aplication, and I'm using the SwitchAction in the struts-config.xml to change to another config file, eht problem is that when I change to the other module, and get back to the default config xml, I'm getting a error, because my page use a AJAX ...
{ "language": "en", "url": "https://stackoverflow.com/questions/446418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: dynamic property access for generated LINQ Classes How can I access dynamically properties from a generated LINQ class ? Cause I would like to be able to customize the displayed table columns where Partner is the LINQ Class generated from a SQL Server Database Table. <table class="grid"> <thead> <tr> <% fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/446422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }