text
stringlengths
8
267k
meta
dict
Q: How Can I add HTML And CSS Into PDF I have an HTML (not XHTML) document that renders fine in Firefox 3 and IE 7. It uses fairly basic CSS to style it and renders fine in HTML. I'm now after a way of converting it to PDF. I have tried: * *DOMPDF: it had huge problems with tables. I factored out my large nested ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1715" }
Q: Class with a static function to be made abstract base class in C++ Have a use case where Class foo { public: static std::string make(std::string a) { .. } } I want to make foo an abstract base class but obviously make cannot be in this abstract base since virtual functions cannot be static. Like this Class f...
{ "language": "en", "url": "https://stackoverflow.com/questions/391006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Install a 3rd party framework using AppleScript from a package My application depends on another third-party framework and I need to make sure the framework is installed before my application runs. I am using AppleScript to check whether the framework is installed or not. I am packaging my application using PackageM...
{ "language": "en", "url": "https://stackoverflow.com/questions/391011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Local WideString variable debug error "Int3 DbgBreakPoint" In C++Builder, I wrote the following code (in Button1Click handler), When I run in debug mode, I get the "Int3 DbgBreakPoint" (Stack corrupted?). This doesn't happen for AnsiSting (Maybe reference counting). WideString boshluq; boshluq=L" "; Is this normal?...
{ "language": "en", "url": "https://stackoverflow.com/questions/391022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Make NameValueCollection accessible to LINQ Query How to make NameValueCollection accessible to LINQ query operator such as where, join, groupby? I tried the below: private NameValueCollection RequestFields() { NameValueCollection nvc = new NameValueCollection() { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "66" }
Q: combine 2 resultset is there a way to add the results of 2 different queries to a resultset? something like that: ResultSet rs ; i=0; while(i<=l) ResultSet rs1 = select * from tablei; rs = rs + rs1; i++; } I know that I can do it with union, but I have a lot queries and if I use UNION the query is too ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Fast/easy renaming of filenames in TFS (CodePlex) I host a project on CodePlex, but a bunch (200+) files need to have their extension changed. What is the easiest, least painful way to do this? I cant see myself doing them one by one in the IDE. Update: I know I can just remove and change them via the commandline/...
{ "language": "en", "url": "https://stackoverflow.com/questions/391032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I cut a large Rails application into smaller applications that work together? I have worked a bit with Django and I quite like its project/applications model : you can build a Django project by assembling one or more Django applications. These applications can be autonomous, or some applications can be buil...
{ "language": "en", "url": "https://stackoverflow.com/questions/391033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Oracle: How can I programmatically arrange to have my current connection killed? For testing exception handling in the case of a broken connection it is useful to be able to programmatically request the database to kill a connection. What's the best way to do that? A: Here are a couple of bits of code to handle tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/391036", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is meant by authoring in workflow Foundation I need to what is meant by authoring in workflow foundation and what are it's types. A: Authoring basically means creating new or modifying existing worklfows. There are two basic types, the sequential and the state machine workflow. A: Finally i found out. Authori...
{ "language": "en", "url": "https://stackoverflow.com/questions/391038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Does flash support MP3 audio format natively? I was of the idea that flash (more specifically Adobe's flash player browser plugin) probably uses some installed MP3 codecs (on the client machine) using OS APIs. I heard someone say that Flash supports MP3 natively. is that true? I guess flash has it's own video and au...
{ "language": "en", "url": "https://stackoverflow.com/questions/391041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Unicode appnames in Django I live in Norway, and when i make Django apps i would like to be able to name my apps with characters like "æøå", these characters work fine in unicode, but when i try to use these characters in app names, or in fields display text i get an error. Even better, i would like to name my apps ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391054", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: UrlEncoding Plus(+) in URL in ASP.Net I'm encrypting and Base64 a string. Everything works great, until I retrieve the encrypted string from the QueryString collection. The Encrypted text contains a plus symbol. When I retrieve the encrypted string, where a plus once was there is now a space. As you can imagine this...
{ "language": "en", "url": "https://stackoverflow.com/questions/391057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Which hash method do you use (MD5, SHA1, other?) This Wikipedia page has an extensive list of hashing methods As you can see, both MD5 and Sha1 have been broken (in Cryptography, "broken" means there's an attack less complex than the brute force attack. In other words, if you need 1 million year to find a collision ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Work on a VS 2005 solution in VS 2008 I have no desire to install 2005 on my laptop, but I do often like to work at home. I am formulating a process to enable me to check out the 2005 project, back up the solution and project files - these are all that change - and convert the solution to 2008. I then back up the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391081", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ArrayList vs List I saw this reply from Jon on Initialize generic object with unknown type: If you want a single collection to contain multiple unrelated types of values, however, you will have to use List<object> I'm not comparing ArrayList vs List<>, but ArrayList vs List<object>, as both will be exposing ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: Can you mix Fluent NHibernate and Traditional hbm.xml We have some mapping already done in hbm.xml and I'd rather not have to map these programatically can you mix them in same sessionfactory until we have the time to repay the debt? A: Yep. It is absolutely possible to mix them. I'm doing it on my current project...
{ "language": "en", "url": "https://stackoverflow.com/questions/391101", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I find out how much free memory is left in GNU C++ on Linux I'm writing a C++ program (compiled with gcc and running on RedHat Linux). The program needs to know at runtime how much space is left on the stack and how much is left in the heap. I realize there may not be a definite answer to this question (abo...
{ "language": "en", "url": "https://stackoverflow.com/questions/391107", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is the best code location to define table relationship methods using Zend Framework models? I'm creating a simple tag system that allows me to link a tag to almost everything in my application. In order to facilitate this, I created a table called "objects", referenced by my model "Object". I've got three model...
{ "language": "en", "url": "https://stackoverflow.com/questions/391111", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SQL Server 2005 varchar loses decimal places converting to a decimal Declare @BadDecimal varchar(5) Set @BadDecimal = '4.5' Declare @GoodDecimal Decimal Set @GoodDecimal = @BadDecimal Select @GoodDecimal --Outputs 5 Why? A: Try Declare @GoodDecimal Decimal(2,1) edit: changed to (2,1) after request. A: Coentjie...
{ "language": "en", "url": "https://stackoverflow.com/questions/391117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to change pane text of status bar from a thread in MFC? I have a dialog in MFC with a CStatusBar. In a separate thread, I want to change the pane text of status bar. However MFC complains with asserts? How is it done? An example code would be great. A: You could post a private message to the main frame window a...
{ "language": "en", "url": "https://stackoverflow.com/questions/391125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Meaning of serial port parameters in Java? I'm a beginner in Java. I'm reading data from the serial port. I got serialPort.setSerialPortParams( 9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); What is the meaning of 9600, DATABITS_8,STOPBITS_1 and PARITY_NONE? A: When you say yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/391127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What is an HttpHandler in ASP.NET What is an HttpHandler in ASP.NET? Why and how is it used? A: In the simplest terms, an ASP.NET HttpHandler is a class that implements the System.Web.IHttpHandler interface. ASP.NET HTTPHandlers are responsible for intercepting requests made to your ASP.NET web application server....
{ "language": "en", "url": "https://stackoverflow.com/questions/391130", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: Stress testing web services - best approach I have several web services I need to create for them some testing mechanism and to use it as a tool for stress testing. What's the best way to tackle this? A: Use a tool for the purpose, like The Grinder A: JMeter is also a great solution, as is SoapUI I prefer SoapUI d...
{ "language": "en", "url": "https://stackoverflow.com/questions/391133", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP SQL Server character inconsistencies A very strange thing happens to me when I try to insert Non-Latin characters (e.g. Hebrew, Arabic etc. using N'string to insert') using PHP. This thing happens with all the extensions I've tried: mssql, odbc and native driver. When inserting through PHP code, only when select...
{ "language": "en", "url": "https://stackoverflow.com/questions/391137", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET advertisement website I am currently working on a website that is an advertisement portal for businesses. Advertisers can create an account, select various options for listing (State, caregory, etc) and upload a graphic is measured in a multiples of an "unit". An "unit" is an image or a flash file that is 18...
{ "language": "en", "url": "https://stackoverflow.com/questions/391139", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to get the IP address of a WCF remote endpoint? Is there a way to get the remote IP Address of a WCF connection? I guess the reason why it's not built-in into the WCF framework is that WCF can work with non TCP/IP bindings, so the IP Address is not always meaningful. However, the information would make sense for...
{ "language": "en", "url": "https://stackoverflow.com/questions/391142", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Colour of Text in a Javascript Alert Is there any way to change style of text, format the text inside a Javascript Alert box. e.g. changing its colour, making it bold, etc.? Also, if there an Alert avalaible with a 'Yes', 'No' button instead of an 'OK'/'Cancel' one? A: The best you can do for formatting is the new ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is there Any Off-The-Shelf Json Serialization helper class in .NET BCL? I need to serialize/de-serialize some objects into/from string and transfer them as just opaque data. I can use XmlSerializer to do it, but generated string looks clumsy and long. So, is there any concise Serializer available in .NET? The first ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Settings Page on First Load I have an application thats going to use Active Directory for Authentication. This will be used in mnay locaitons, so I want the user to be able to input their AD domain into a settings file. So, the first time they run this app, they won't be able to login, because they haven't entered t...
{ "language": "en", "url": "https://stackoverflow.com/questions/391194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: php: Calling Static Classes through a variable Is there a way to call Static Classes / Methods by name? Example: $name = 'StaticClass'; ($name)::foo(); I have classes which I keep all static methods in and I'd like to call them this way. A: You can do something like this using the call_user_func function it would ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391195", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to detect filename dyanamically in SSIS? I need to convert a flat file to DB using MS SSIS. I need a way to look into a particular folder to fetch the (only) flat file, filename is of the format "FileName-CCYYMMDD.txt". Please help me if there is way to add a file from the folder OR Get a file name of the form...
{ "language": "en", "url": "https://stackoverflow.com/questions/391199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is it possible to programmatically distinguish between versions of SQL Server? Basically, is it possible to identify if some-one hooks up my program to SQL server Compact or Express Edition? I want to be able to restrict different versions of my product to different versions of SQL Server. A: After connection to a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391200", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Display content of shared memory section in WinDbg? I've got a couple of programs that communicate using a named memory section. Is there any way that I can view the contents of this shared memory section from WinDBG, either in user mode or kernel mode? I don't have a pointer to it, but I do know the name. A: Just ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to solve this focus problem with a dual monitor application? We have an application that uses a dual monitor setup - User A will work with Monitor 1, and user B will work with Monitor 2 simultaneously. Monitor 2 is a touch screen device. Now, the problem is, when User A types something in his screen, if User B t...
{ "language": "en", "url": "https://stackoverflow.com/questions/391224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I translate Perl's Convert::ASN1 to Ruby code? Can somebody advise me what this code does and how can I convert it to Ruby in most simple way? #!perl use Convert::ASN1; my $asn1 = Convert::ASN1->new(encoding => 'DER'); $asn1->prepare(q< Algorithm ::= SEQUENCE { oid OBJEC...
{ "language": "en", "url": "https://stackoverflow.com/questions/391227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to Fill GridView using more than one DataSource? Using Multiple DataSource fill same GridView i.e I need to fill data in GridView using more than one DataSource. Please provide Code snippet if possible... More Details:- Tables with same schema are present in two different Databases. I need to get the data from b...
{ "language": "en", "url": "https://stackoverflow.com/questions/391232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: pyGTK Radio Button Alright, I'll preface this with the fact that I'm a GTK and Python newb, but I haven't been able to dig up the information I needed. Basically what I have is a list of Radio Buttons, and based on which one is checked, I need to connect a button to a different function. I tried creating all my radi...
{ "language": "en", "url": "https://stackoverflow.com/questions/391237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Unit testing on code that uses the Database I'm interested to know what approach people are taking in developing automated unit tests that exercise the database Do you Install a QA database (known-starting point) before the test suite is run. OR Do you build database stub that stand-in whenever a database call occu...
{ "language": "en", "url": "https://stackoverflow.com/questions/391249", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: Modeling Messages between Users I want to model messages between users, here is the requirement: * *User has received and sent messages, and should be retrieved by user.received_messages and user.sent_messages *Message has sender and receiver, and should be retrieved by message.sender and message.receiver. I hav...
{ "language": "en", "url": "https://stackoverflow.com/questions/391252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Resources for Development Using DirectX in C#? Could some one provide me some good resources for development using DirectX in C#? A: There is an old port of DirectX on C# in DirectX SDK from MS. Also there is an open-source framework called SlimDX: http://code.google.com/p/slimdx/ A: Microsoft's XNA uses DirectX, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Logging user actions The customer wants us to "log" the "actions" that a user performs on our system: creation, deletion and update, mostly. I already have an aspect that logs the trace, but that works at a pretty low level logging every method call. So if a user clicked on the button "open medical file" the log wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/391269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: DrScheme versus mzscheme: treatment of definitions One long term project I have is working through all the exercises of SICP. I noticed something a bit odd with the most recent exercise. I am testing a Huffman encoding tree. When I execute the following code in DrScheme I get the expected result: (a d a b b c a) Ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/391272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: SharePoint permission on Macs we are using SharePoint Server (MOSS 2007) with Windows Integrated Security. A few computers in the company (managers) are using Apple Macs. These people can't run the application on their machines! I think the problem is due the windows integrated security. How can we solve this prob...
{ "language": "en", "url": "https://stackoverflow.com/questions/391284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C# Remoting / WCF Client Server app what comms technology to use? I am after so advice really. I have been thinking about a client server project for a while and am going to be using .NET. Originally is was just going to use 2.0 but recently got VS2008 and thought I should really explore 3.5 as well. The applicati...
{ "language": "en", "url": "https://stackoverflow.com/questions/391286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I remove Word markup crap when inserting to a form? I'm building a CMS in PHP and one dread I have is that the users will have to fill the data in from existing Word (and Excel, but nevermind that) documents. Now, I've seen what happens when they carelessly copy and paste from Word to a textarea: the database...
{ "language": "en", "url": "https://stackoverflow.com/questions/391291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: oracle 10G shrink datafiles how do i shrink datafiles in oracle 10G? A: Caveat: I am not an Oracle system administrator, other than for personal installs. Take everything I say with a large grain of salt. I'm assuming that you created the datafiles with auto-extend, and they've been extended past what you feel the...
{ "language": "en", "url": "https://stackoverflow.com/questions/391292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Unicode strings in process memory What is the most preferred format of unicode strings in memory when they are being processed? And why? I am implementing a programming language by producing an executable file image for it. Obviously a working programming language implementation requires a protocol for processing st...
{ "language": "en", "url": "https://stackoverflow.com/questions/391295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: WCF Pub/Sub with subscriber caching Problem: how to provide a distributed, scalable and disaster resistant pub/sub service with WCF. Details: Note that this approach is being considered in addition to messaging/middleware solutions such as Tibco EMS. I've been looking into WCF, particularly how it may be used to off...
{ "language": "en", "url": "https://stackoverflow.com/questions/391296", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: JavaScript function from PHP I have a JavaScript function, pop_item. I have to call this from PHP, so my PHP code is the following: echo '<a href="javascript:pop_item('.$_code.',1)">Link </a>'; It provides no error, but pop_item is not functioning, The HTML output for the above is: <a href="javascript:pop_item('ABC...
{ "language": "en", "url": "https://stackoverflow.com/questions/391306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: jQuery insertAt I'm trying to insert an li element into a specific index on a ul element using jQuery. I only seem to be able to insert an element on the end of the list. I am very new to jQuery, so I may just not be thinking properly. A: Similar to Dreas's answer, but slightly different and possibly more efficient...
{ "language": "en", "url": "https://stackoverflow.com/questions/391314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Access Denied to all SVN Directories I'm trying to delete several working copy directories, but I get an Access Denied on all the SVN files, running as admin or normal user. I've killed the Tortoise cache process, and cannot figure what is wrong. Any suggestions? A: Download Microsoft's Process Explorer and see ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Table comment length in MySQL According to MySQL manual, table comments are limited to 60 characters. I'm designing the schema in MySQL Workbench, which does not enforce this limit, so I end up with writing more than 60 symbols quite often, and this causes the SQL script to fail. To tell the truth I would be quite h...
{ "language": "en", "url": "https://stackoverflow.com/questions/391323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: What is Tuplizer in NHibernate I came across a post that mentioned Tuplizer in NHibernate, can anybody provide a good definition or reference for Tuplizer? A: From ITuplizer's source code: A tuplizer defines the contract for things which know how to manage a particular representation of a piece of data, given that...
{ "language": "en", "url": "https://stackoverflow.com/questions/391332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to make sure that there is one instance of the application is running I want to check when the user double click on applictaion icon that no another instance of this application is already running. I read about My.Application but i still don't know what to do. A: This is something I've used... (C# on .NET 2.0) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What can I expect to be difference when I transition from C & C# to C++? Here's a simple question. I've done plenty of work using both C & C# (2.0) but never anything in C++. What can I expect to be different when learning C++? Will there be any big gotcha's or hurdles I should pay attention too? Does anyone go...
{ "language": "en", "url": "https://stackoverflow.com/questions/391346", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: String truncation error in Delphi DBExpress/Firebird paramatised queries I have a query in Delphi using DBExpress TSQLQuery that looks like so ActiveSQL.sql.add('SELECT * FROM MYTABLE where MYFIELD=(:AMYFIELD) '); ActiveSQL.ParamByName('AMYFIELD').AsString := 'Some random string that is to long for the field'; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why XAML Width="Auto" does not work for me? I started maintenance on some poorly written XAMLs. I am relatively new to XAML. One thing I need is - grid columns should automatically adjust their width per the text contents. The MSDN documentation on GridViewColumn.Width says - set it to Auto to enable auto-sizing be...
{ "language": "en", "url": "https://stackoverflow.com/questions/391363", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: phpunit warning on an utilitary class I use phpUnit on a integration server to run all tests and if I launch phpunit command from the command line, I receive: PHPUnit 3.2.18 by Sebastian Bergmann. F..III..I......I.IIII... Time: 6 seconds There was 1 failure: 1) Warning(PHPUnit_Framework_Warning) No tests found in c...
{ "language": "en", "url": "https://stackoverflow.com/questions/391390", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Castle Windsor to Unity - can you auto-configure in Unity the same way you can in CW? I don't know if this is too specific a question, if that is possible, but I'm having to port an app that uses Castle Windsor to Unity so that there isn't a reliance on non-microsoft approved libraries. I know I know but what are yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/391391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Mocking GetEnumerator() method of an IEnumerable types The following test case fails in rhino mocks: [TestFixture] public class EnumeratorTest { [Test] public void Should_be_able_to_use_enumerator_more_than_once() { var numbers = MockRepository.GenerateStub<INumbers>...
{ "language": "en", "url": "https://stackoverflow.com/questions/391411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Form Resizing and Maximizing I am preventing the user from resizing the form. How do I also remove the maximize button? A: If it is winforms (.net) you are talking about, then right click on the form in the designer and choose properties. Make sure the "MaximizeBox" is turned off in the list of properties. If it i...
{ "language": "en", "url": "https://stackoverflow.com/questions/391413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Developing a simple parser My day job includes working to develop a Pascal-like compiler. I've been working all along on optimizations and code generation. I would also like to start learning to build a simple parser for the same language. I'm however, not really sure how to go about this. Flex and Bison seem to be...
{ "language": "en", "url": "https://stackoverflow.com/questions/391432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Would you use this ASP.NET MVC view syntax? I proposed what I think is a better syntax for ASP.NET MVC views in this question. Since that question has been answered, I think my answer will generate little feedback, so I am posting it as its own question here. A: You're using markup to represent code. My opinion is:...
{ "language": "en", "url": "https://stackoverflow.com/questions/391438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to make resizeable? Is there a way to make a <div> container resizeable with drag & drop? A: The best method would be to use CSS3. It supported by at least Webkit and Gecko. According to the w3c spec: div.my_class { resize:both; overflow:auto; /* something other than visible */ } Webkit and Firefox do...
{ "language": "en", "url": "https://stackoverflow.com/questions/391440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: ASP.NET GridView sorting on a calculated field I have a DataBound GridView. However I have one column where the value comes from a calculation in the code behind - it is displayed within a TemplateField. How can a sort my grid based on this calculated value ? A: Put your initial returned data into a DATASET or a D...
{ "language": "en", "url": "https://stackoverflow.com/questions/391450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: In C# when is the var keyword different from typing it out? C# 3.0 introduced the var keyword. And when compiled, the compiler will insert the right types for you. This means that it will even work on a 2.0 runtime. So far so good. But the other day I found a case where, the var keyword would be replaced with just o...
{ "language": "en", "url": "https://stackoverflow.com/questions/391462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the difference between an abstract method and a virtual method? What is the difference between an abstract method and a virtual method? In which cases is it recommended to use abstract or virtual methods? Which one is the best approach? A: Abstract methods are always virtual. They cannot have an implementat...
{ "language": "en", "url": "https://stackoverflow.com/questions/391483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1709" }
Q: Warning: Page Has Expired I've added the following code to my masterpage (Page_Load) so once a user logs out they will not be able to use the back button to see the page they were previously at. Response.Buffer = true; Response.ExpiresAbsolute = DateTime.Now.AddDays(-1); Response.Expires = -1; Response.CacheCont...
{ "language": "en", "url": "https://stackoverflow.com/questions/391485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Would you use LINQ to SQL for new projects? I've been investigating what data layer to use for a new web-based project I'm designing and I'm very keen to look at incorporating LINQ to SQL. Its apparent simplicity, flexibility and designer support really appeals and the implicit tie-in to SQL Server is fine. However,...
{ "language": "en", "url": "https://stackoverflow.com/questions/391486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to create a Paragraph () using HtmlGenericControl in ASP.NET? How to create a pragraph <p> tag in ASP.NET using the HtmlGenericControl class? A: I know, maybe is not the fastest way to implement, but I used to write "missing" html controls to be reusable later, via code, without messing around with html tags. P...
{ "language": "en", "url": "https://stackoverflow.com/questions/391498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: When mousing over any control in this user control, the text of every label turns red I have a custom user control that contains asp:ValidationSummary. It is placed on a page along with other controls that display data. When I try to save the page and the validation fires, I get the following, strange behavior: If I...
{ "language": "en", "url": "https://stackoverflow.com/questions/391499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: if (condition) continue; OR if (!condition) { ... }? (style preference) I know this is a matter of style, hence the subjective tag. I have a small piece of code, with two nested conditions. I could code it in two ways, and I'd like to see how more experienced developers think it should look like. Style 1: while (!St...
{ "language": "en", "url": "https://stackoverflow.com/questions/391503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Moving .xaml and .xaml.vb files to a new Silverlight project breaks xaml compilation When I move .xaml and .xaml.vb files to a new Silverlight project, the generated .g files no longer include members for the x:Name attributes defined in the xaml file. This means the code-behind files can't refer to those members a...
{ "language": "en", "url": "https://stackoverflow.com/questions/391506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Anonymous Type vs Dynamic Type What are the real differences between anonymous type(var) in c# 3.0 and dynamic type(dynamic) that is coming in c# 4.0? A: There's three times, with three actors - one in each time. * *Design-time - programmer *Compile-time - c# compiler *Run-time - .net runtime Anonymous types...
{ "language": "en", "url": "https://stackoverflow.com/questions/391529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "46" }
Q: Send HTTP request from VC++ file I am trying to send an HTTP request with the contents of a file set as the body of the HTTP request and want to get the response from a server using VC++. Any help is appreciated. Thanks. I think I was not very clear with what I wanted to do or I misunderstood the answers. Neways, wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/391532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Problem With Database Design For MVC - 1 Table Per Model My biggest hurdle with getting started with an MVC framework has to do with with the 1 model to 1 DB table concept. To me it's overly simplistic and unrealistic for anything beyond a simple app. Yet, MVC is in use everywhere, including this awesome StackOverfl...
{ "language": "en", "url": "https://stackoverflow.com/questions/391549", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Javascript Prototypal Inheritance? I'been doing some inheritance in js in order to understand it better, and I found something that confuses me. I know that when you call an 'constructor function' with the new keyword, you get a new object with a reference to that function's prototype. I also know that in order to m...
{ "language": "en", "url": "https://stackoverflow.com/questions/391550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Is there any cheatsheet available for C++? What do you like to have in the C++ cheat sheet? A: I found this one that seems to be detailed enough. It covers basics of templates, inheritance, operators, exceptions, etc. It has a lot of information in a very small space. A: The O'Reilly book C++ Pocket Reference woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/391553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is every abstract function virtual in C#, in general? I was looking at Stack Overflow question What is the difference between abstract function and virtual function?, and I was wondering whether every abstract function should be considered to be a virtual function in C# or in general? I was a bit puzzled by the "you...
{ "language": "en", "url": "https://stackoverflow.com/questions/391557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: multiple occurences of HandleCreated for a single control I’m using control that needs to be register to asynchronous events. The events will be raised in the UI thread using the ISynchronizeInvoke interface implemented by WinForms controls I can’t register to the event at the constructor because it will allow calli...
{ "language": "en", "url": "https://stackoverflow.com/questions/391581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Documentation for creating a custom SQL Server "Data Source" data provider I'd like to write an import driver that will allow my proprietary file type to show up in the import wizard "Data Source" dropdown for SQL Server 2005 (or any version of SQL Server, for that matter). I see other vendors who've added their for...
{ "language": "en", "url": "https://stackoverflow.com/questions/391585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: When is it OK to throw an exception from a destructor in C++? I know the rule is to NEVER throw one during a destructor, and I understand why. I would not dare do it. But even the C++ Faq Lite says that this rule is good 99% of the time. What is the other 1% that they fail to delve into? Link to the C++ Faq Lite bul...
{ "language": "en", "url": "https://stackoverflow.com/questions/391595", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: System design: Preventing/detecting vote fraud In light of the recent vote fraud incident here, I was wondering if anyone out there is familiar with building systems for preventing or detecting undesirable voting behavior. I imagine the technology is widely used in search engines, online advertising (e.g. click frau...
{ "language": "en", "url": "https://stackoverflow.com/questions/391600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: rebuild indexes oracle 10G When i need run process for rebuild indexes and how i can know what indexes i need to rebuild ? A: Read here http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2913600659112 about rebuilding indexes. Rebuilding bitmap indexes is ok, but btree indexes not so. A: In genera...
{ "language": "en", "url": "https://stackoverflow.com/questions/391618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Compare using Thread.Sleep and Timer for delayed execution I have a method which should be delayed from running for a specified amount of time. Should I use Thread thread = new Thread(() => { Thread.Sleep(millisecond); action(); }); thread.IsBackground = true; thread.Start(); Or Timer timer = new Timer(o =>...
{ "language": "en", "url": "https://stackoverflow.com/questions/391621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "64" }
Q: Why does MySQL not use an index on a int field that's being used as a boolean? select * from myTable where myInt will not show any possible_keys when explaining the query even though there is an index on myInt field. Edit: The index in question is not unique. A: For MySQL to use the index, you have to explicitly ...
{ "language": "en", "url": "https://stackoverflow.com/questions/391637", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: LPHANDLE vs. HANDLE While browsing some code I found a call to OpenPrinter(). The code compiles and works fine. But, we are passing a HANDLE instead of LPHANDLE (as specified in MSDN). I found out that in windef.h the following declaration exists: typedef HANDLE FAR *LPHANDLE; What does LP stand for? Shoul...
{ "language": "en", "url": "https://stackoverflow.com/questions/391649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ASP.Net 1.1 with Wildcard Mapping gives 404 on default documents I have an application where it was requested that a friendly url be made for a dynamic page that uses a lot of query string values. After some research on the Internet, I found that I needed to create either an HttpModule or HttpHandler to do the rout...
{ "language": "en", "url": "https://stackoverflow.com/questions/391661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: interpolate a terrain surface from scattered data using heat equation This is my first question in this forum, so please bear with me and I hope I'm not violating any rules. I am looking at different ways to model scattered 3d data as a gridded function (over xy support, z=z(x,y)). Answering another question, coryan...
{ "language": "en", "url": "https://stackoverflow.com/questions/391673", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Strange DLL + InterropServices problem I'm trying to learn the basics of tying up unmanaged C++ and .NET. So, I've got the DLL compiled and callable from C#. Great. Now I run into this weird problem: Here's my C++ file, Main.cpp: #include <stdio.h> extern "C" __declspec(dllexport) void DisplayHelloFromDLL() { p...
{ "language": "en", "url": "https://stackoverflow.com/questions/391693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Problem with VisualVM-when connecting to remote host I am new to Java Development and using the VisualVm for the first time. I am facing some problem in Connecting a Remote Host from the VisualVm interface. I have JDK 1.6 running in the remote host and also started jstatd server on the same. When I am connecting th...
{ "language": "en", "url": "https://stackoverflow.com/questions/391708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: In Vim, what is the simplest way to join all lines in a file into a single line? I want to join all lines in a file into a single line. What is the simplest way of doing this? I've had poor luck trying to use substitution (\r\n or \n doesn't seem to get picked up correctly in the case of s/\r\n// on Windows). Usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/391710", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "64" }
Q: how can I search an svn repository for the existence of files in any revision How can I search if a file named foo.txt was ever committed to my svn repository (in any revision)? A: Use Subversion 1.8+ client and new --search and --search-and options become available for svn log command. These options do not allow p...
{ "language": "en", "url": "https://stackoverflow.com/questions/391718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Set a model attribute in the background, based on another attribute? I have an Auction model with several attributes, two of which are current_auction:boolean and scheduled_start:datetime. How can I make the boolean (false by default) become true when the scheduled_start becomes the current time? Please tell me if...
{ "language": "en", "url": "https://stackoverflow.com/questions/391725", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's the feasibility of running Perl on Rails? Rails is a great platform, but it just doesn't have the history that Perl does, so I thought it might be an interesting idea to put them together. Anybody with lots of Rails experience see any problems with this? A: The BBC actually went down a similar path and creat...
{ "language": "en", "url": "https://stackoverflow.com/questions/391726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Show home in breadcrumb navgation in Document Library in My Site in SharePoint The breadcrumb in the document library in My Sites shows: user name > Document Library name Is it possible to change it to "Home > User name > Document Library name" or "Home > Document Library Name" What is the easiest way to achieve thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/391728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you make a window to fill the entire screen? Can someone give me a pointer on how to make a window in Shoes to fill the entire screen? I am looking to have a window that is akin to Writeroom. Thanks. A: It doesn't seem to be possible right now, sadly.
{ "language": "en", "url": "https://stackoverflow.com/questions/391731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you know if your WPF control is being rendered? I have 2 tab items. In tab No.1 I have a control which corresponds to window resize event and need to call PointToScreen(). The problem is Tab no 2 is active and I resize the window, the control in tab no.1 reacts and fail because its' visual is not being render...
{ "language": "en", "url": "https://stackoverflow.com/questions/391732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Retrieving data on separate sql servers We have a situation where our application calls some stored procedures on a sql 2000 server. Now we must get some of the data from another sql 2000 box connected by a vpn. What would the syntax look like for performing CRUD operations from one sql server to another sql server?...
{ "language": "en", "url": "https://stackoverflow.com/questions/391744", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }