text
string
meta
dict
Q: Unicode block of a character in python Is there a way to get the Unicode Block of a character in python? The unicodedata module doesn't seem to have what I need, and I couldn't find an external library for it. Basically, I need the same functionality as Character.UnicodeBlock.of() in java. A: pip install unicodeblo...
{ "language": "en", "url": "https://stackoverflow.com/questions/243831", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How to copy all properties of an object to another object, in Python? Is there a library method to copy all the properties between two (already present) instances of the same class, in Python? I mean, something like Apache Commons' PropertyUtilsBean.copyProperties() A: Try destination.__dict__.update(source.__dict_...
{ "language": "en", "url": "https://stackoverflow.com/questions/243836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "64" }
Q: Need help configuring IIS to serve 2.0 web services I am attempting to deploy an ASP.NET 2.0 Web service application on an IIS server that currently serves a large .NET 1.0 web application. I have set up an appropriate virtual directory and have set the ASP.NET version for the virtual directory to 2.0, when I attem...
{ "language": "en", "url": "https://stackoverflow.com/questions/243837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Visual Studio 2005 extensions for .NET Framework 3.0 (WPF) Did Microsoft abandon support for Windows Presentation Foundation (WPF) on Visual Studio 2005? There was the a Community Technology Preview (CTP) for the WPF and WCF, but it's no longer available for download. There are released extensions for Windows Workfl...
{ "language": "en", "url": "https://stackoverflow.com/questions/243843", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: programmatic login with .net membership provider I'm trying to unit test a piece of code that needs a currently logged in user in the test. Using the .Net 2.0 Membership Provider, how can I programmatically log in as a user for this test? A: I've found it most convenient to create a disposable class that handles se...
{ "language": "en", "url": "https://stackoverflow.com/questions/243851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Need help configuring IIS to serve 2.0 web services I am attempting to deploy an ASP.NET 2.0 Web service application on an IIS server that currently serves a large .NET 1.0 web application. I have set up an appropriate virtual directory and have set the ASP.NET version for the virtual directory to 2.0, when I attem...
{ "language": "en", "url": "https://stackoverflow.com/questions/243852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the OCaml idiom equivalent to Python's range function? I want to create a list of integers from 1 to n. I can do this in Python using range(1, n+1), and in Haskell using: take n (iterate (1+) 1). What is the right OCaml idiom for this? A: If you intend to emulate the lazy behavior of range, I would actually...
{ "language": "en", "url": "https://stackoverflow.com/questions/243864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: How do I merge two python iterators? I have two iterators, a list and an itertools.count object (i.e. an infinite value generator). I would like to merge these two into a resulting iterator that will alternate yield values between the two: >>> import itertools >>> c = itertools.count(1) >>> items = ['foo', 'bar'] >>...
{ "language": "en", "url": "https://stackoverflow.com/questions/243865", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: WordPress Plugin Development Besides the CODEX what resources do you recommend to help a person new to creating plugins help create a WordPress plugin. I have an idea, but need a bit better explanation than what is in the CODEX to get started. UPDATE: Is there a book that I could buy to help me out with this? A: Ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/243873", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: VB.NET Importing Classes Edit: This was accidentally posted twice. Original: VB.NET Importing Classes I've seen some code where a Class is imported, instead of a namespace, making all the static members/methods of that class available. Is this a feature of VB? Or do other languages do this as well? TestClass.vb pu...
{ "language": "en", "url": "https://stackoverflow.com/questions/243878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Need help configuring IIS to serve 2.0 web services I am attempting to deploy an ASP.NET 2.0 Web service application on an IIS server that currently serves a large .NET 1.0 web application. I have set up an appropriate virtual directory and have set the ASP.NET version for the virtual directory to 2.0, when I attem...
{ "language": "en", "url": "https://stackoverflow.com/questions/243886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Unexpected behavior of window.onback in JavaScript? I'm using window.onback = history.forward(); to prevent users from resubmitting data. I know it's a hack and I don't like it either, but that's not what this question is about. The problem is that the code prevents other pages from going back to the page with the c...
{ "language": "en", "url": "https://stackoverflow.com/questions/243887", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Rolling out entire site, or only changed pages/elements? (ASP.NET) We use ASP.NET, C# When making an update to one of our websites, we roll out the entire site rather than updating just the pages or sections that have changed. This scares me. Is this a good idea? Should I roll out only the changes? Should I break m...
{ "language": "en", "url": "https://stackoverflow.com/questions/243893", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: javascript closures and function placement Does the placement of a function have an effect on the performance of closures within scope? If so, where is the optimal place to put these functions? If not, is the implied association by closure enough reason to place a function in another place logically? For instance,...
{ "language": "en", "url": "https://stackoverflow.com/questions/243894", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: PHP: Right way to declare variable before use in loop I have a variable that is built in loop. Something like: $str = ""; for($i = 0; $i < 10; $i++) $str .= "something"; If $str = "" is ommitted, I get undefined variable notice, but I thought php auto-declare a variable the first time it sees undeclared one? How do...
{ "language": "en", "url": "https://stackoverflow.com/questions/243897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Large custom survey / reporting applications - best practice The situation When you study social sciences, you are frequently confronted with the need for online surveys (scientific data collection online). That's one of the main reasons why I started with PHP in the first place. Recently these survey applications h...
{ "language": "en", "url": "https://stackoverflow.com/questions/243898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: VB.NET Importing Classes I've seen some code where a Class is imported, instead of a namespace, making all the static members/methods of that class available. Is this a feature of VB? Or do other languages do this as well? TestClass.vb public class TestClass public shared function Somefunc() as Boolean ...
{ "language": "en", "url": "https://stackoverflow.com/questions/243900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Smalltalk and IoC I see a lot of IoC frameworks for .Net and Java. Does anyone know why there are no equivalent frameworks for Smalltalk. This is more a philosophy question than anything else. I'm wondering if there is something in the Smalltalk way of doing things that precludes the necessity of having an IoC fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/243905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: GZip HttpResponse using XSL Transformer I have the following code below in my Servlet, but when IE hits the page, it returns a blank html page. If I use the response.getOutputStream() directly in the StreamResult constructor, the page loads fine. What am I missing? response is an instance of HttpServletResponse an...
{ "language": "en", "url": "https://stackoverflow.com/questions/243912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: List View C# stay selected I have a list view that after a double click, a record opens a new form to show the details, but the record in the list view lost the "selection".... How do I know which record was clicked ??? Thanks Maria João A: Try setting the HideSelection property on the list view to false. It's ena...
{ "language": "en", "url": "https://stackoverflow.com/questions/243914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to use SVN to rollout ASP.NET websites? We use ASP.NET / C#. We work locally, test locally, check in our code and binaries through SVN. On our server, we checkout the latest 'build' from SVN directly into our IIS web directory. Is this a good practice, or is there something else we should be doing for rollouts? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/243918", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Sanitizing bad XML in Java I'm using a third-party library that returns "XML" that is not valid, because it contains invalid characters, as well as non-declared entities. I need to use a Java XML parser to parse this XML, but it's choking. Is there a generic way to sanitize this XML so that it becomes valid? A: I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/243919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Best way to store static reference arrays/dicts in Cocoa touch I have several arrays of arrays or arrays of dicts that I would like to store in my iPhone app. This lists are static and won't be modified by the app or users. Occasionally they may be displayed but more likely they'll be iterated over and compared to...
{ "language": "en", "url": "https://stackoverflow.com/questions/243929", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Calculating a 2D Vector's Cross Product From wikipedia: the cross product is a binary operation on two vectors in a three-dimensional Euclidean space that results in another vector which is perpendicular to the plane containing the two input vectors. Given that the definition is only defined in three (or seven, o...
{ "language": "en", "url": "https://stackoverflow.com/questions/243945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "109" }
Q: Stop text from wrapping with NSLayoutManager Given any arbitrary, one-line string, my goal is to render it into a bitmap representation. However, I have no means of finding out its dimensions beforehand, so I am reduced to getting the glyph range's bounding rect and resizing my canvas if it's not large enough. Unf...
{ "language": "en", "url": "https://stackoverflow.com/questions/243947", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Setting background image in silverlight I currently have a silverlight application which rotates through several graphs of live data. Each page has two user controls though: one for an info box at the top and another for the graph to display. I have tried to add a background image to the master page that they are di...
{ "language": "en", "url": "https://stackoverflow.com/questions/243956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best practices for login pages? I am working on a single sign-on login page using Shibboleth that will be used for a variety of web applications. Obviously we would like to make this page as secure and usable as possible while limiting the effects of phishing scams. What are the best practices to keep in mind when d...
{ "language": "en", "url": "https://stackoverflow.com/questions/243957", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How can I get ASP.NET AJAX to send its JSON repsonse with GZip compression? I have compression enabled within IIS7 and it works as expected on all responses except for those constructed by ASP.NET AJAX. I have a web service that provides data to the client. When the web service is called directly, it is properly c...
{ "language": "en", "url": "https://stackoverflow.com/questions/243959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Which Eclipse package should I download for PyDev? Which Eclipse package should I choose for Python development with PyDev? Nothing on the Eclipse homepage tells me what to choose, and the PyDev documentation assumes I already have Eclipse installed. Does it matter which Eclipse package I choose? A: PyDev was acqui...
{ "language": "en", "url": "https://stackoverflow.com/questions/243962", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: How to specify the reply-to address using sp_send_dbmail in SQL Server I need to send an email to someone and want them to be able to simply reply to the email without having to specify the email address. Using sp_send_dbmail sets the reply-to address as the name of the profile that it was sent from. Can this be cha...
{ "language": "en", "url": "https://stackoverflow.com/questions/243966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Do you consider this technique "BAD"? Sometimes you need to skip execution of part of a method under certain non-critical error conditions. You can use exceptions for that, but exceptions generally are not recommended in normal application logic, only for abnormal situations. So I do a trick like this: do { bool ...
{ "language": "en", "url": "https://stackoverflow.com/questions/243967", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Function point to kloc ratio as a software metric... the "Name That Tune" metric? What do you think of using a metric of function point to lines of code as a metric? It makes me think of the old game show "Name That Tune". "I can name that tune in three notes!" I can write that functionality in 0.1 klocs! Is this...
{ "language": "en", "url": "https://stackoverflow.com/questions/243971", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SSAS custom group by query My fact table looks like this yesterday a yesterday a yesterday a yesterday b yesterday b yesterday c today a today a today b today b tommorow a tommorow a tommorow c tommorow d In the end I need an Excel report like this repetition count ...
{ "language": "en", "url": "https://stackoverflow.com/questions/243985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How long do you cache resources client side? A website of mine will host the usual images, javascript and CSS stylesheets in the database. Since these are unlikely to change each day, I am going to use some client caching on these to reduce the server load. How long do you cache these? A few days? More? I'm probably...
{ "language": "en", "url": "https://stackoverflow.com/questions/243989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to split a huge zip file into multiple volumes? When I create a zip Archive via java.util.zip.*, is there a way to split the resulting archive in multiple volumes? Let's say my overall archive has a filesize of 24 MB and I want to split it into 3 files on a limit of 10 MB per file. Is there a zip API which has...
{ "language": "en", "url": "https://stackoverflow.com/questions/243992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Setting Folder permissions on Vista I am trying to set the permissions of a folder and all of it's children on a vista computer. The code I have so far is this. public static void SetPermissions(string dir) { DirectoryInfo info = new DirectoryInfo(dir); DirectorySecurity ds = info.Ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/243995", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Apache Abdera Client - Posting/Putting Looking for help using the Apache Abdera Atom Client. I am trying to post and put files to a feed but I am getting a 400 error saying that the content type must be application/x-www-form-urlencoded or multipart/form-data A: You need to check where you are posting too. Abdera ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244000", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: T-Sql cursor not proceeding on fetch I know that cursors are frowned upon and I try to avoid their use as much as possible, but there may be some legitimate reasons to use them. I have one and I am trying to use a pair of cursors: one for the primary table and one for the secondary table. The primary table cursor it...
{ "language": "en", "url": "https://stackoverflow.com/questions/244001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: VB.net (desktop) context menu assigned to multiple controls owner problem I have two different grid controls on the same form. They share the same context menu. I am having trouble determining which control is the owner when I select the context menu item. A: SourceControl property on the ContextMenuStrip class wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/244002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I maintain PHP sessions across multiple domains on the same server? I am looking for a way to maintain PHP sessions across multiple domains on the same server. I am going to be integrating my sites with a Simple Machines Forum so I will need to use MySQL based sessions. Thanks! A: Depending upon your preferr...
{ "language": "en", "url": "https://stackoverflow.com/questions/244008", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I add multiple should_receive expectations on an object using RSpec? In my Rails controller, I'm creating multiple instances of the same model class. I want to add some RSpec expectations so I can test that it is creating the correct number with the correct parameters. So, here's what I have in my spec: B...
{ "language": "en", "url": "https://stackoverflow.com/questions/244009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: ExternalInterface Performance: Looking for Some Best-Practices/Tips I'm using Flex 3 in the UI of a Windows app (Flash player as an embedded ActiveX control), and passing data between them with ExternalInterface (primarily into the Flex app, as opposed to out). I'm finding, though, that the performance is pretty awf...
{ "language": "en", "url": "https://stackoverflow.com/questions/244018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: HttpWebRequest over SSL? I've used HttpWebRequests to post data to HTTPS websites before, and I've never had todo anything different than a regular HTTP Post. Does anyone know if there are any tricks involved that I missed to ensure that this is done properly? A: After a little searching, it looks like you don't ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/244019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: SqlDateTime overflow Exception I am trying to insert a time only value, but get the following error * *ex {"SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM."} System.Exception From the front end, the time is selected using the "TimeEdit" control, with the up and dow...
{ "language": "en", "url": "https://stackoverflow.com/questions/244029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Writing RegEx expression Wanna write a RegEx to validate a driving license. if it doesn't start with (US, CA, CN) then it has to be followed with XX and after that with any number of Alpha numeric letters. So for example if the driving license starts with GB then it has to be followed with XX GBXX12345363 However ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I define an accesskey for an invisible HTML element I have a <button> with an accesskey assgined to it. The accesskey works fine as long as the button is visible, but when I set display: none or visibility: hidden, the accesskey no longer works. Also tried without success: * *Use a different element type:...
{ "language": "en", "url": "https://stackoverflow.com/questions/244063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET Session Scope: where can it be accessed from? This seems trivial, but I've never had to worry about it before and my Google skills are failing me. How far-reaching is the in-process session bucket for ASP.NET/IIS6, in the sense that you can call Session["whatever"] and get the same value back? Obviously it c...
{ "language": "en", "url": "https://stackoverflow.com/questions/244084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why do I get a "Too many local constants" error? Delphi 2009 complains with an E2283 error: [DCC Error] outputcode.pas(466): E2283 Too many local constants. Use shorter procedures Delphi 2007 compiles just fine. I can't find an abundance of local constants, it's a short (500 line) unit. Do you see any abundance of c...
{ "language": "en", "url": "https://stackoverflow.com/questions/244085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Improve oracle query performance without indexing What are some things I can do to improve query performance of an oracle query without creating indexes? Here is the query I'm trying to run faster: SELECT c.ClaimNumber, a.ItemDate, c.DTN, b.FilePath FROM items a, itempages b, keygroupdata c WHERE a.ItemType IN (112,...
{ "language": "en", "url": "https://stackoverflow.com/questions/244087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Recording Returns - Voice Msg Too Short I have an Electronic Workforce (EWF) application that records the caller speaking. The system needs to record for 120 seconds then play a message and hangup. I set a maximum length of 120 seconds and a minimum length of 1 second. I didn't want any input to disrupt the recor...
{ "language": "en", "url": "https://stackoverflow.com/questions/244091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Strange error when creating Excel files with Spreadsheet_Excel_Writer Here's the code. Not much to it. <?php include("Spreadsheet/Excel/Writer.php"); $xls = new Spreadsheet_Excel_Writer(); $sheet = $xls->addWorksheet('At a Glance'); $colNames = array('Foo', 'Bar'); $sheet->writeRow(0, 0, $colNames, $colHeadingFo...
{ "language": "en", "url": "https://stackoverflow.com/questions/244110", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Building a temp table /map I'm working on a stored procedure in SQL Server 2000 with a temp table defined like this: CREATE TABLE #MapTable (Category varchar(40), Code char(5)) After creating the table I want to insert some standard records (which will then be supplemented dynamically in the procedure). Each catego...
{ "language": "en", "url": "https://stackoverflow.com/questions/244113", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using RegEx to get Poker Hand score I'm developing a poker game in C#. At the moment I'm trying to get the players hand score using RegEx. I search the string (composed of the cards suit and number) and look for suits or numbers to match the RegEx. If i get 2 matches then the player has a pair, 3 matches he has 3 of...
{ "language": "en", "url": "https://stackoverflow.com/questions/244114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I tokenize input using Java's Scanner class and regular expressions? Just for my own purposes, I'm trying to build a tokenizer in Java where I can define a regular grammar and have it tokenize input based on that. The StringTokenizer class is deprecated, and I've found a couple functions in Scanner that hint ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Data Driven Unit Tests What is the best practice for testing an API that depends on data from the database? What are the issues I need to watch out for in a "Continuous Integration" environment that runs Unit Tests as part of the build process? I mean would you deploy your database as part of the build scripts (may ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Library that subverts java access control and lets me access private member variables? Can anoyne recommend a good library that will let me easily read/write private member fields of a class? I was looking through apache commons, but couldnt see it. I must be getting blind ? Edit: Asking questions on the border of l...
{ "language": "en", "url": "https://stackoverflow.com/questions/244119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SQL Pivot using an XML column Does anyone have an example of a pivot using a table with an XML column in it - specifically turning some of the elements in the xml column into a column in the pivot table? I'm trying to build one, but the syntax is killing me; xml in sql is damn hard to work with, compared to xml in C...
{ "language": "en", "url": "https://stackoverflow.com/questions/244122", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to capture the final HTML output from a JSP page(s) but before it is displayed to user? I need to capture the HTML and do some post processing on the HTML data before it is finally output to the user. The final HTML document is actually composed of many JSP includes (12 or so), so there is some existing logic ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does silverlight code need protection? I don't quite understand how Silverlight code works within the browser. Are the assemblies downloaded to the client machine? Is there any chance of the code getting decompiled using Reflector or some similar tool? If so, what options does one have to protect the code? Do .net o...
{ "language": "en", "url": "https://stackoverflow.com/questions/244130", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Get a IEnumerable from a IEnumerable> public class Item { ... } public class Order { public List<Item> Items ... } public class Customer { public List<Order> Orders ... } Now, using LINQ I need to get all items that a customer bought. How can I? I tried something like var items = fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/244135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: With Lua and Python embeddable, is there a place for Basic? I started off programming in Basic on the ZX81, then BASICA, GW-BASIC, and QBasic. I moved on to C (Ah, Turbo C 3.1, I hardly knew ye...) When I got started in microcontrollers I regressed with the BASIC Stamp from Parallax. However, BASIC is/was awesome ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do you handle escaping invalid attribute characters? I've got to get a quick and dirty configuration editor up and running. The flow goes something like this: configuration (POCOs on server) -> Xml (serialized, transferred as XElements to website) -> text (edit in place in web page) (make changes) text editor -...
{ "language": "en", "url": "https://stackoverflow.com/questions/244145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Display accurate local time on web site? I've been asked to display the 'correct' time on our website which I frankly feel is rather pointless as 'correct' can be interpretted in such a variety of ways. Our current method definately results in an inaccurate time as it uses a server control rendering JavaScript that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to change HttpApplication.User.Identity.Name on a local environment? I have a site that requires Windows Authentication the application obtains the credential from the Security.Prinicipal once the user is autenticated the problem is that my credentials on my local environment are different that the ones stored i...
{ "language": "en", "url": "https://stackoverflow.com/questions/244152", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: The number of ways of reading an xml file from another server in PHP? I am trying to read an XML-file from another server. However the the company that's hosting me seems to have turned of the file_get_contents function from retrieving files for files from other servers (and their support is not very bright and it t...
{ "language": "en", "url": "https://stackoverflow.com/questions/244157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Paid support for web-frameworks This may sound strange but sometimes when your ASP.NET webapp isn't working and you can't tell why, you call Microsoft, pay them something like $300 and get about 1-3 weeks of 1-3 people looking at your configuration, memory dumps, sometimes code... but usually not the db, and with a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I resize an image using Java? I need to resize PNG, JPEG and GIF files. How can I do this using Java? A: After loading the image you can try: BufferedImage createResizedCopy(Image originalImage, int scaledWidth, int scaledHeight, boolean preserveAlpha) { System.out.prin...
{ "language": "en", "url": "https://stackoverflow.com/questions/244164", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "131" }
Q: Are there open source CAPTCHA solutions available? I'm in the process of adding CAPTCHA validation to one of my websites and need to know what open source solutions exist. Please note strengths and weaknesses and what platform they work with. I'm primarily interested in ASP.NET solutions but feel free to include P...
{ "language": "en", "url": "https://stackoverflow.com/questions/244179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: "File Not Found" in MSBuild Community Tasks -- Which File? I'm trying to use the VssGet task of the MSBuild Community Tasks, and the error message "File or project not found" is beating me with a stick. I can't figure out what in particular the error message is referring to. Here's the task: <LocalFilePath Include...
{ "language": "en", "url": "https://stackoverflow.com/questions/244181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to display a loading screen while site content loads I'm working on a site which contains a whole bunch of mp3s and images, and I'd like to display a loading gif while all the content loads. I have no idea how to achieve this, but I do have the animated gif I want to use. Any suggestions? A: How about with jQ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: What causes Excel export from SQL Server Reporting Services to produce an abnormally large file? We have are relatively simple Reporting Services report that our users commonly export to Excel. I've noticed that the files produced by the Excel export seem unusually large. If I open one of these files and just click ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I delete excel rows in SSIS? Is it possible to delete rows in an excel worksheet from SSIS? A: From forum * *create a file system task in control flow, deleting the file. *create a sql task, excel connection type, i used my previous excel connection for this, then used a create table script as my sql sta...
{ "language": "en", "url": "https://stackoverflow.com/questions/244185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What are your thoughts on method scoped constants? For example: public void doSomething() { final double MIN_INTEREST = 0.0; // ... } Personally, I would rather see these substitution constants declared statically at the class level. I suppose I'm looking for an "industry viewpoint" on the matter. A: I...
{ "language": "en", "url": "https://stackoverflow.com/questions/244191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: How can I use "or", "and" in C# Regex? I have a pattern to match with the string: string pattern = @"asc" I am checking the SQL SELECT query for right syntax, semantics, ... I need to say that in the end of the query string I can have "asc" or "desc". How can it be written in C#? A: That'd look like new Regex("asc...
{ "language": "en", "url": "https://stackoverflow.com/questions/244192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MySQL COUNT(DISTINCT()) unexpected results I'm using MySQL 5.0.45 on CentOS 5.1. SELECT DISTINCT(email) FROM newsletter Returns 217259 rows SELECT COUNT(DISTINCT(email)) FROM newsletter Returns 180698 for the count. SELECT COUNT(*) FROM (SELECT DISTINCT(email) FROM newsletter) AS foo Returns 180698 for the count. Sh...
{ "language": "en", "url": "https://stackoverflow.com/questions/244208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Sort List Descending In c# (3.0 or 3.5, so we can use lambdas), is there an elegant way of sorting a list of dates in descending order? I know I can do a straight sort and then reverse the whole thing, docs.Sort((x, y) => x.StoredDate.CompareTo(y.StoredDate)); docs.Reverse(); but is there a lambda expression to do...
{ "language": "en", "url": "https://stackoverflow.com/questions/244219", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: How can I get ASP.NET AJAX to send its JSON response with GZip compression? I have compression enabled within IIS7 and it works as expected on all responses except for those constructed by ASP.NET AJAX. I have a web service that provides data to the client. When the web service is called directly, it is properly c...
{ "language": "en", "url": "https://stackoverflow.com/questions/244222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Is it possible to have an indexed view in MySQL? I found a posting on the MySQL forums from 2005, but nothing more recent than that. Based on that, it's not possible. But a lot can change in 3-4 years. What I'm looking for is a way to have an index over a view but have the table that is viewed remain unindexed. Inde...
{ "language": "en", "url": "https://stackoverflow.com/questions/244226", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: What causes duplicate requests to occur using spring,tomcat and hibernate I'm working on a project in Java using the spring framework, hibernate and tomcat. Background: I have a form page which takes data, validates, processes it and ultimately persists the data using hibernate. In processing the data I do some spe...
{ "language": "en", "url": "https://stackoverflow.com/questions/244234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to create a WPF Shape Editor? I'm trying to create a WPF Shape (PolyLine) editor, which is a control that I want to use to, edit shapes in a canvas. What the editor needs to do is to be able to display the points and lines of the shape and to move those around. Can anyone provide me with a idea of how I can acco...
{ "language": "en", "url": "https://stackoverflow.com/questions/244235", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to reset Postgres' primary key sequence when it falls out of sync? I ran into the problem that my primary key sequence is not in sync with my table rows. That is, when I insert a new row I get a duplicate key error because the sequence implied in the serial datatype returns a number that already exists. It seem...
{ "language": "en", "url": "https://stackoverflow.com/questions/244243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "688" }
Q: How do I alias a class name in C#, without having to add a line of code to every file that uses the class? I want to create an alias for a class name. The following syntax would be perfect: public class LongClassNameOrOneThatContainsVersionsOrDomainSpecificName { ... } public class MyName = LongClassNameOrOneTha...
{ "language": "en", "url": "https://stackoverflow.com/questions/244246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "112" }
Q: A good reference card / cheat sheet with the basic sort algorithms in C? I've been looking (without great luck) for the perfect reference card with all the basic sorting algos in C (or maybe in pseudo code). Wikipedia is a terrific source of info but this time I'm looking for something definitely more portable (pock...
{ "language": "en", "url": "https://stackoverflow.com/questions/244252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Writing a parser - In the need of guides and research papers My knowledge about implementing a parser is a bit rusty. I have no idea about the current state of research in the area, and could need some links regarding recent advances and their impact on performance. General resources about writing a parser are also...
{ "language": "en", "url": "https://stackoverflow.com/questions/244253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Clearcase Config Spec with Private Branch I have a somewhat complicated branching structure at work (at least for me). It is something like this: Main | 1 | 2 | \ 3 \ Ver2 | 1 | \ 2 \ | ProjectA 3 | 1 There are 2 branches off of main. "Ver2"...
{ "language": "en", "url": "https://stackoverflow.com/questions/244261", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Where to practice Lambda function? I am currently trying to learn all new features of C#3.0. I have found a very nice collection of sample to practice LINQ but I can't find something similar for Lambda. Do you have a place that I could practice Lambda function? Update LINQpad is great to learn Linq (thx for the one ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to get rid of "Failed to determine definition for Feature with ID" My event logs on my production front end servers are getting filled with error messages: "Failed to determine definition for Feature with ID" Now, I've found the offending feature on one of the development servers - it is an InfoPath form with so...
{ "language": "en", "url": "https://stackoverflow.com/questions/244271", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Loading an xml file from outside the swf file in Flash A website I'm working on (using AS2 because it's oldschool) has a larger index .swf file that loads sub-swfs using loadMovie("foo1.swf", placeToShowSwf). There's foo1.swf through 4, which is silly because the only thing that's different between them is a single ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Creating a System.Web.Caching.Cache object in a unit test I'm trying to implement a unit test for a function in a project that doesn't have unit tests and this function requires a System.Web.Caching.Cache object as a parameter. I've been trying to create this object by using code such as... System.Web.Caching.Cache ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Jar security I have a standalone Java app that has some licensing code that I want to secure, i.e., prevent users from changing my software to circumvent the licensing. What is the best way to do this? I've looked at obfuscation, but that entails all sorts of problems: reflection, serialization, messed-up stack t...
{ "language": "en", "url": "https://stackoverflow.com/questions/244283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How the heck can you edit valid XML in a webpage? I've got to get a quick and dirty configuration editor up and running. The flow goes something like this: configuration (POCOs on server) are serialized to XML. The XML is well formed at this point. The configuration is sent to the web server in XElements. On the we...
{ "language": "en", "url": "https://stackoverflow.com/questions/244285", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Subsonic: Comparing two columns instead of an input parameter s it possible to do the following in subsonic. SELECT * FROM TABLE1 WHERE Column1 > Column2 or Column1 < Colum3 All examples that I've seen assume you now a value to pass to the where clause. I'm trying to do this without creating a view. Thanks A: If it...
{ "language": "en", "url": "https://stackoverflow.com/questions/244295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: DataGridViewCheckBoxCell is broken for ->Value result I'm using a DataGridViewCheckBoxCell but I can't figure out how to have the ->Value property working "correctly". for (int i = this->dgvConfigs->Rows->Count - 1; i >= 0 ; i --){ DataGridViewCheckBoxCell^ dgvcbc = (DataGridViewCheckBoxCell^) this->dgvConfigs->Ro...
{ "language": "en", "url": "https://stackoverflow.com/questions/244303", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Reader/Writer Locks in C++ I'm looking for a good reader/writer lock in C++. We have a use case of a single infrequent writer and many frequent readers and would like to optimize for this. Preferable I would like a cross-platform solution, however a Windows only one would be acceptable. A: Since C++ 17 (VS2015) yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/244316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "81" }
Q: How do you access the content of a ASP.NET control? I was wondering if it is possible to do something like this: <uc1:TestControl ID="TestControl1" runat="server"> <div>More random HTML, etc...</div> </uc1:TestControl> I got an error of "Type 'System.Web.UI.UserControl' does not have a public proper...
{ "language": "en", "url": "https://stackoverflow.com/questions/244326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Threading issues in a Java HashMap Something happened that I'm not sure should be possible. Obviously it is, because I've seen it, but I need to find the root cause & I was hoping you all could help. We have a system that looks up latitude & longitude for a zipcode. Rather than access it every time, we cache the r...
{ "language": "en", "url": "https://stackoverflow.com/questions/244329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: A Possible Threading/COM/UI problem I am writing a toolbar for IE(6+). I have used the various sample bars from codeproject.com (http://www.codeproject.com/KB/dotnet/IE_toolbar.aspx), and have a toolbar that works, registers unregisters etc. What I want the toolbar to do is to highlight divs within an html page as ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to back up a huge file with Bacula? It currently is 700MB but it's conceivable that it'll grow beyond the 1GB. Normally I just copy this file to another location (for the curious, it's the database of a Zope instance, a ZODB file). This file changes little from day to day, but I understand Bacula can't do inside...
{ "language": "en", "url": "https://stackoverflow.com/questions/244337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: wxPython wxDC object from win32gui.GetDC I am getting a DC for a window handle of an object in another program using win32gui.GetDC which returns an int/long. I need to blit this DC into a memory DC in python. The only thing I can't figure out how to do is get a wxDC derived object from the int/long that win32gui ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244340", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you unit test a unit test? I was watching Rob Connerys webcasts on the MVCStoreFront App, and I noticed he was unit testing even the most mundane things, things like: public Decimal DiscountPrice { get { return this.Price - this.Discount; } } Would have a test like: [TestMethod] public void T...
{ "language": "en", "url": "https://stackoverflow.com/questions/244345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "89" }