text
stringlengths
8
267k
meta
dict
Q: Will conditionals that are always false be removed by compiler in C# Say I have the following code snippet in c# static const bool DO_PERFORMANCE_CODE = false; if (DO_PERFORMANCE_CODE) { // performance monitoring code goes here } Will that code get removed by the compiler? This is the functionality I'd like. Ba...
{ "language": "en", "url": "https://stackoverflow.com/questions/443586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: NTLDR Technical Info I'm trying to figure out as much as I can about how NTLDR works. My biggest question is the following: 1) What kind of executable format does NTLDR use? I'm also curious about the following, but once I know the file format I bet these two will be easy to figure out. 2) Where in memory should NTL...
{ "language": "en", "url": "https://stackoverflow.com/questions/443587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Count Stored Procedures in Database? How can i count the number of stored procedures in my database and is it a bad practice to have too many stored procedures? A: Select count(1) from information_schema.routines where routine_type = 'PROCEDURE' A: you may want to exclude system stored procedures from your count ...
{ "language": "en", "url": "https://stackoverflow.com/questions/443588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to change the Keyboard layout on Solaris I am running a machine with SunOS and NO graphical enviroment. Does someone know how to change the keyboard layout from the console?? Thanks A: Select your layout Type the following command to select your layout from a list: kbd -s If your language isn't in the list, ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/443605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you insert a file (PDF) into a varbinary SQL Server column and later retrieve it? I'm looking to take the results of a report run (a PDF file from Crystal Reports), serialize it, stick it into a varbinary field, and then later be able to deserialize it and present it back to the user. For now I have to just p...
{ "language": "en", "url": "https://stackoverflow.com/questions/443635", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: HttpListener.Start() AccessDenied error on Vista Running this code as a regular user throws HttpListenerException (access denied). Snippet runs ok as an administator class Program { static void Main(string[] args) { HttpListener listener = new HttpListener(); listener.Prefixes.Add("http://my...
{ "language": "en", "url": "https://stackoverflow.com/questions/443640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What is the best unit testing tool for a mix of managed and unmanaged C++? I am going to start implementing some unit tests for a codebase that is a mix of managed and unmanaged C++. Can NUnit hack it with unmanaged code? Is there a better alternative? A: It's possible to use NUnit to test unmanaged code, example: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/443642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: PHP range() function in .NET? I need to generate a list of sequential numbers. I know Ruby you can do 1..10 or PHP you can do range(1, 10). Anything like that in .Net already, or do I have to write it? Thanks. A: In C# (with .NET 3.0 or higher) this should do the job: IEnumerable<int> myRange = Enumerable.Range...
{ "language": "en", "url": "https://stackoverflow.com/questions/443648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Django template ifequal comparison of decimals So, I have a decimalfield that can be 3 different values. In my view, I pass in a dictionary of values that contains the appropriate decimal values as keys. {% for item in booklist %} {% for key, value in numvec.items %} {{item.number}} {% ifeq...
{ "language": "en", "url": "https://stackoverflow.com/questions/443650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why is goto poor practise? This question is a duplicate of Goto Still Considered Harmful. If you wish to discuss this further please use the original question. Why exactly is GOTO poor programming practise? It makes sense on some occasions to use it. A: Note that Djkstra wrote "GOTO Considered Harmful", not "GOTO ...
{ "language": "en", "url": "https://stackoverflow.com/questions/443655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: string split based on char \ Got a bit of a mind freeze at the moment. I have the following syntax:- string[] repname = Thread.CurrentPrincipal.Identity.ToString().Split('\'); and I get an error on the split character. Can anyone advise on how I can do the split using the \ character as the delimiter? Cheer...
{ "language": "en", "url": "https://stackoverflow.com/questions/443662", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to create a method that takes any object and returns a name:value pair for all properties? For example I have a simple class like public class Person{ public int Age {get;set;} public string Name {get;set;} } I need to make a method that takes any class and spits out values of properties set in the ob...
{ "language": "en", "url": "https://stackoverflow.com/questions/443683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Why does C# disallow readonly local variables? Having a friendly debate with a co-worker about this. We have some thoughts about this, but wondering what the SO crowd thinks about this? A: I think it's a poor judgement on part of C# architects. readonly modifier on local variables helps maintain program correctnes...
{ "language": "en", "url": "https://stackoverflow.com/questions/443687", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "134" }
Q: Traversing a tree of objects in c# I have a tree that consists of several objects, where each object has a name (string), id (int) and possibly an array of children that are of the same type. How do I go through the entire tree and print out all of the ids and names? I'm new to programming and frankly, I'm having tr...
{ "language": "en", "url": "https://stackoverflow.com/questions/443695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: How do you uninstall in *nix? One of the things I still can't wrap my head around is rules of thumb to uninstall programs in *nix environments. Most of the time I'm happy to let the sleeping dogs lie and not uninstall software that I no longer need. But from time to time I end up with several Apaches, svn, etc. So ...
{ "language": "en", "url": "https://stackoverflow.com/questions/443699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Div with horizontal scrolling only I have a fixed width DIV containing a table with many columns, and need to allow the user to scroll the table horizontally within the DIV. This needs to work on IE6 and IE7 only (internal client application). The following works in IE7: overflow-x: scroll; Can anyone help with a s...
{ "language": "en", "url": "https://stackoverflow.com/questions/443700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "114" }
Q: Callback functions in Java Is there a way to pass a call back function in a Java method? The behavior I'm trying to mimic is a .Net Delegate being passed to a function. I've seen people suggesting creating a separate object but that seems overkill, however I am aware that sometimes overkill is the only way to do thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/443708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "203" }
Q: Algorithm to find subset within two sets of integers whose sums match I'm looking for an algorithm which can take two sets of integers (both positive and negative) and find subsets within each that have the same sum. The problem is similar to the subset sum problem except that I'm looking for subsets on both sides. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/443712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: get xpath from xsl variable I am trying to get some xpath from xsl variable using xsl ver 1.0 . That’s my variable: <xsl:variable name ="myVar"> <RefData RefTag="test1" bbb="false" /> <RefData RefTag="test2" bbb="false" /> <RefData RefTag="test3" bbb="false" /> <RefData RefTag="tes...
{ "language": "en", "url": "https://stackoverflow.com/questions/443724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Java toString() using reflection? I was writing a toString() for a class in Java the other day by manually writing out each element of the class to a String and it occurred to me that using reflection it might be possible to create a generic toString() method that could work on ALL classes. I.E. it would figure out ...
{ "language": "en", "url": "https://stackoverflow.com/questions/443730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "61" }
Q: How do I mount a remote Linux folder in Windows through SSH? I'm a blind student currently in a system admin/shell programming class. Although ssh works fine for executing commands like ls, pwd, etc editors do not work well with my screen reader and an ssh session. I was wondering if it is possible to mount a Linux ...
{ "language": "en", "url": "https://stackoverflow.com/questions/443732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "163" }
Q: C# Mono+Winforms MessageBox problem I have a file called hellowf.cs class MyFirstApp { static void Main() { System.Windows.Forms.MessageBox.Show("Hello, Mono+WinForms!"); } } On Ubuntu 8.10, I do the following gmcs hellowf.cs -r:System.Drawing.dll -r:System.Windows.Forms.dll mono hellowf.exe ... and it loo...
{ "language": "en", "url": "https://stackoverflow.com/questions/443737", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: error when trying to install MSMQ Have VS-2003, VS-2005, VS-2008 Tried enabling MSMQ in Add/Remove Windows Components and get this 'A local user is authenticated as an anonymous user and cannot access active directory. You need to log on as a domain user to access Active directory.' I am trying to do development on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/443740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there an inverse to Git's octopus merge? Git has a much-touted(?) octopus-merge capability that can merge many heads into one. But is there something that would do just the opposite, make several simultaneous branches out of one node? Let's assume that I have a bunch of code for a project, and I just started usin...
{ "language": "en", "url": "https://stackoverflow.com/questions/443745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I convert Excel OpenXML shared strings to inline strings? I have a large spreadsheet in Excel 2007 OpenXML format that I want to manipulate in xml programmatically. Excel saves it using the shared strings method which, while more efficient, complicates the process. Does anyone know if there is an option burie...
{ "language": "en", "url": "https://stackoverflow.com/questions/443772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Addressing instance name string in __init__(self) in Python I am doing something like this: class Class(object): def __init__(self): self.var=#new instance name string# How do I make the __ init __ method of my instance to use the instance name string for 'c'? Say in case: c=Class() I want c.var equ...
{ "language": "en", "url": "https://stackoverflow.com/questions/443775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Does Visual Inheritance work with User controls in VS2008 I have a base User Control. I place Ok and Cancel buttons on the bottom right of the control and anchor them Bottom and Right. I then create another user control that inherits from the base user control. I resize the inherited control (e.g. increase height or...
{ "language": "en", "url": "https://stackoverflow.com/questions/443777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Weekly period in Access 2007 Is there a way to define the weekly period I would like to use on a report, Currently Access has the week defined as sun through sat, I would like to use mon through sun. A: The Weekday function has an optional parameter to define the start day - is that any use?
{ "language": "en", "url": "https://stackoverflow.com/questions/443785", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why is selfregistration bad? Assuming self-registration is used to install components as part of a larger installer program, why is self-registration bad? E.g. self-registering vb custom controls or capicom or whatever. I acknowledge that self-registration is probably not as safe in the case of a dll you wrote your...
{ "language": "en", "url": "https://stackoverflow.com/questions/443789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Log4Net works in main thread but not in created thread In VS2008, C#, I've created a unit test (VS unit test) that calls some code which in turn calls Log4Net and logs some information. This works. If I create a thread in the unit test to call the same code I'm getting "Failed to parse config file" exception from Lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/443795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to know if a MFC message loop is already running? Is there any way to know whether a MFC message loop is already running? EDIT: Context: A library (with event handling) needs to know whether its event filtering has to attach to an existing MFC message loop or create its own message loop: in case a main message l...
{ "language": "en", "url": "https://stackoverflow.com/questions/443809", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: python, index errors I've got some code which draws data from an xml file but it seems to have randomly starting throwing; Traceback (most recent call last): File "C:\Users\mike\Documents\python\arl xml\turn 24 reader", line 52, in <module> unitCount = getText(evoNode.getElementsByTagName("count")[0].childNo...
{ "language": "en", "url": "https://stackoverflow.com/questions/443813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to host an asp.net mvc app on a domain that points to a subfolder? I have the folowing scenario: www.somedomain.com -> this points to a folder on a shared host, say /MyFolder1 www.otherdomain.com -> this points to another folder on the same shared host, say /MyFolder2 With asp.net mvc my urls get mapped to: www....
{ "language": "en", "url": "https://stackoverflow.com/questions/443830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How might I obtain a Snapshot or Thumbnail of a web page using PHP? I need to create Snapshots / Thumbshots / Site preview a-site.com. There are some site as thumbshot.org that meets with I need. But I do not want to use an external service, not to depend on others for my project (What would happen if they close the...
{ "language": "en", "url": "https://stackoverflow.com/questions/443837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Cons for defining logger non-static Comments for this answer How do you reduce Java logging boilerplate code? strongly suggest not to use loggers as instance member variables. I can think of two negative side-effects: 1) superclass logs with the subclass's logger 2) object cannot be serialized (unless marked transie...
{ "language": "en", "url": "https://stackoverflow.com/questions/443846", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Where can I find some sample WPF animations? As I am a programmer,and not an artist or animator and I am failing at showing off the best features of WPF in my application. Although I have samples for simple animations for buttons like growing, or having the color fade into something brighter on click but what I am ...
{ "language": "en", "url": "https://stackoverflow.com/questions/443847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Why won't my WebView display the URL I've specified? I'm working with a WebView. If I place this call in my -awakeFromNib: [myWebView setMainFrameURL:@"http://www.google.com"]; I get the behavior I want. Google's homepage displays in my WebView. But, I need to set the main frame's URL in another method from a mutab...
{ "language": "en", "url": "https://stackoverflow.com/questions/443854", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Crosstab in Cognos I have a set of data that needs to be displayed as a crosstab in Cognos. Example data includes ID, Month, Year, State 1, 10, 2008, 25 2, 10, 2008, 26 The problem is that in the crosstab, the month column is duplicated for each row instead of using the same column for the month. Examp...
{ "language": "en", "url": "https://stackoverflow.com/questions/443863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Store a number in an integer string and recall it in a later action I'm currently trying to get a UISlider to work. I'm trying to set the strings value as 8 to start off with on view load. Then when the slider changes value I want the string to update with that number, and then later on I can use the value in the st...
{ "language": "en", "url": "https://stackoverflow.com/questions/443864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Drawing Pixels in WPF how would I manage pixel-by-pixel rendering in WPF (like, say, for a raytracer)? My initial guess was to create a BitmapImage, modify the buffer, and display that in an Image control, but I couldn't figure out how to create one (the create method requires a block of unmanaged memory) A: You ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/443867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Download time remaning predictor Are there any widgets for predicting when a download (or any other process) will finish based on percent done history? The trivial version would just do a 2 point fit based on the start time, current time and percent done but better option are possible. A GUI widgest would be nice bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/443870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Thoughts on index creation for SQL Server for missing indexes I'm working on performance tuning my SQL Server 2008 database and am using the output from various DMVs to identify missing indexes, indexes that aren't being used, etc. I am mainly using these 3 scripts (from SQLServerCentral.com) that rely on DMV data t...
{ "language": "en", "url": "https://stackoverflow.com/questions/443881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Difference between {$_GET['id']} and '".$_GET['id']."'? Is the any difference between writing {$_GET['id']} and '".$_GET['id']."' in a sql statement? both works the same A: Its always a bad idea to put data from a get request directly into SQL, and there are many easy ways to prevent SQL injection. For the sim...
{ "language": "en", "url": "https://stackoverflow.com/questions/443883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Python: Callbacks, Delegates, ... ? What is common? Just want to know what's the common way to react on events in python. There are several ways in other languages like callback functions, delegates, listener-structures and so on. Is there a common way? Which default language concepts or additional modules are ther...
{ "language": "en", "url": "https://stackoverflow.com/questions/443885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Call Multiple Stored Procedures with the Zend Framework I'm using Zend Framework 1.7.2, MySQL and the MySQLi PDO adapter. I would like to call multiple stored procedures during a given action. I've found that on Windows there is a problem calling multiple stored procedures. If you try it you get the following err...
{ "language": "en", "url": "https://stackoverflow.com/questions/443895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Removing code from GitHub Is there a way to entirely remove a directory and its history from GitHub? A: If you are asking about deleting a project from GitHub, open your project, click the "Admin" tab (or browse directly to https://github.com/username/project_name/edit) and on the bottom of the page, click "Delete ...
{ "language": "en", "url": "https://stackoverflow.com/questions/443896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Locking a MySQL database so only one person at once can run a query? I am having a few issues when people are trying to access a MySQL database and they are trying to update tables with the same information. I have a webpage written using PHP. In this webpage is a query to check if certain data has been entered into...
{ "language": "en", "url": "https://stackoverflow.com/questions/443909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: where should I save a complex MVC application UI state? I've been having a look at several MVC frameworks (like rails, merb, cakephp, codeignitier, and similars...) All the samples I've seen are basically plain and simple CRUD pages, carrying all the infr needed in the querystring and the posted field values. I've g...
{ "language": "en", "url": "https://stackoverflow.com/questions/443910", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What database tests should I write so that refactoring database is easy Are there any guidelines on writing database tests so that you can refactor database "without fear" while doing evolutionary database design? What aspects of database should be put to test while developing it? Any example would be great.. A: I...
{ "language": "en", "url": "https://stackoverflow.com/questions/443912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: XSL/XPath Indentation What conventions (if any) do you use for indenting XSL code? * *how do you deal with really long, complicated XPaths *can you plug them into your XML editor of choice? *is there some open source code that does the job well? For some background, I use nxml-mode in Emacs. For the most par...
{ "language": "en", "url": "https://stackoverflow.com/questions/443914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Why don't Django admin "Today" and "Now" buttons show up in Safari? I'm developing a Django application that contains a model with a date/time field. On my local copy of the application, the admin page for that particular model shows this for the date/time field: alt text http://www.cs.wm.edu/~mpd/images/bugs/django...
{ "language": "en", "url": "https://stackoverflow.com/questions/443920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to autosize User control when it's shown I have a Winforms project with a bunch of User controls. I'd like the user control to move itself to be at the 1,1 position relative to its container (whether it's a form or a Panel control). And resize itself to be able to fit half the container. What event can I respo...
{ "language": "en", "url": "https://stackoverflow.com/questions/443921", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Different coloured fly out menu I'm creating a custom master page for a MOSS publishing site. The designers have come up with this idea for the fly out menu... alt text http://www.abbeylegal.com/Downloads/2009-01-06/gradient%20menu.jpg which uses graduated/different backgrond and text colours for each menu option. D...
{ "language": "en", "url": "https://stackoverflow.com/questions/443922", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Session Variable problems when storing an object in my Session I have a log in page where I valid my users and based on this validation I store their user info in a session variable so I can access it at any time. To do this I am trying to store an instance of one of my dbml generated classes "UserInfo". So I popu...
{ "language": "en", "url": "https://stackoverflow.com/questions/443929", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Arrays as result type and input for functions in delphi7 i have a function that i need to return a array as a result type b "function createsbox(key:tkey):array[0..255] of byte;" this is not allowed it is expecting a "identifyer expected but array found" is the error throw up. seems to work fine if i declare a recor...
{ "language": "en", "url": "https://stackoverflow.com/questions/443931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Indexing arrays with enums in C# I have a lot of fixed-size collections of numbers where each entry can be accessed with a constant. Naturally this seems to point to arrays and enums: enum StatType { Foo = 0, Bar // ... } float[] stats = new float[...]; stats[StatType.Foo] = 1.23f; The problem with thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/443935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Why is the Chars property of the StringBuilder class missing in Visual C# 2008 Express? That's pretty much the whole question. I've installed Visual C# 2008 Express on a clean Windows XP Pro SP3 machine, started a new Windows Forms project, double-clicked the form to create a Form1_Load method, then typed: StringBui...
{ "language": "en", "url": "https://stackoverflow.com/questions/443936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to Learn MS SQL Server 2005? I would like to start learning SQL Server 2005 on my own. Can anyone recommend good books or websites that will be a good start for me? A: Books: Inside Microsoft SQL Server 2005: T-SQL Querying Inside Microsoft SQL Server 2005: The Storage Engine Pro SQL Server 2005 Database Desi...
{ "language": "en", "url": "https://stackoverflow.com/questions/443942", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I remove illegal characters from an NSString? I am parsing a tab seperated list using a NSScanner based upon each line and the tabs. However for some reason the last field in the array (parsed from each row) contains a \r character. How can I strip this from the NSString that represents the line (or the field...
{ "language": "en", "url": "https://stackoverflow.com/questions/443945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Collections.max function for iterable in java The Java Collections.max takes only a collection of a sortable object. However since the collection is not necessarily sorted, I don't see any reason not to implement the same max function for iterable types. Is there a max method for Iterable<T extends Comparable<? supe...
{ "language": "en", "url": "https://stackoverflow.com/questions/443946", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How did dotnetkicks.com implement their ASP.NET paging? I know the dotnetkicks.com system is open source so I can view the code myself but I can't make sense of how they did their paging. It's hard to explain but if you goto dotnetkicks.com you can play with the paging on their front page. What I am specifically int...
{ "language": "en", "url": "https://stackoverflow.com/questions/443951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to use NGen with ClickOnce deployment? Is it possible to use NGen with ClickOnce deployment? A: No, you can not. See http://social.msdn.microsoft.com/Forums/en-US/clr/thread/a41b62c5-bdee-4bd5-9811-15a35c4a4add/. You need to create a regular installer file for that. A: Actually you can use NGEN and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/443955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Parameter Validation on Reports I'm new to SSRS, so I apologize if this question is too simple: I have a report which accepts a parameter called "Amount". I want to constrain valid inputs to currency values >= 0, and pop open an error message if the user enters improper values. I don't want to validate inputs in my ...
{ "language": "en", "url": "https://stackoverflow.com/questions/443958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to create python bytes object from long hex string? I have a long sequence of hex digits in a string, such as 000000000000484240FA063DE5D0B744ADBED63A81FAEA390000C8428640A43D5005BD44 only much longer, several kilobytes. Is there a builtin way to convert this to a bytes object in python 2.6/3? A: You can do ...
{ "language": "en", "url": "https://stackoverflow.com/questions/443967", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "121" }
Q: In .net, is there an opposite function to Server.HTMLEncode()? .Net's Server.HTMLEncode() is the very helpful function that takes an HTML string and replaces special characters with their entity equivalents - "<" becomes &lt ; and so forth. Is there a (built-in) function that does the reverse? There doesn't seem to...
{ "language": "en", "url": "https://stackoverflow.com/questions/443968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Adding global exception handling to ASP.NET I work on a rather large web site. We currently have 4 web servers and an active passive db cluster running ASP.NET 2.0 with C#. Currently our exception handling is not trapping the correct exception being thrown. I have heard it is because Server.GetLastError() is not thr...
{ "language": "en", "url": "https://stackoverflow.com/questions/443977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why can't enum's constructor access static fields? Why can't enum's constructor access static fields and methods? This is perfectly valid with a class, but is not allowed with an enum. What I'm trying to do is store my enum instances in a static Map. Consider this example code which allows lookup by abbreivation: pu...
{ "language": "en", "url": "https://stackoverflow.com/questions/443980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "125" }
Q: Can you have multiple grids on the same page with different themes? I have a master/detail setup using jqGrid and jQuery. Is it possible to have the detail grid use a different theme/skin than the master grid? I see a setting to change the images folder, but it looks to me like grid.css would have to be the same fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/443982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: simple authorisation / login capability in php I'm looking to implement user login onto my site for the first time. I'm happy to either build my own solution, or implement something open source, however no package has been an obvious choice in my search so far. Equally, I'm fully aware that as an intermediate php ...
{ "language": "en", "url": "https://stackoverflow.com/questions/443988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to parse rss-feeds / xml in a shell script I'd like to parse rss feeds and download podcasts on my ReadyNas which is running 24/7 anyway. So I'm thinking about having a shell script checking periodically the feeds and spawning wget to download the files. What is the best way to do the parsing? Thanks! A: Someti...
{ "language": "en", "url": "https://stackoverflow.com/questions/443991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Has anyone tracked down whether IronPython or IronRuby will support Attributes? I have scanned 'the Google' and have not found the definitive answer on whether the Iron* languages (any or all) will end up with Attribute support.. Anyone? Thanks - Jon A: There was some discussion about the plans in the ironpython ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/443996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the WCF equivalent of HttpContext.Current.Request.RawUrl? I've got some RESTful services running in a pure WCF context (i.e. ASP.NET compatibility is not enabled, and thus there is no HttpContext.Current object available). The URLs to the services are rewritten at the start of the request using an IHttpModul...
{ "language": "en", "url": "https://stackoverflow.com/questions/444010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: Powershell Remote Commands I'm trying to run the get-service command on a remote machine in powershell. After doing some research, it appears this is only possilbe n powershell 2 CTP, which I cannot use as I need to use the version of powershell installed with exchange, which is usualy 1. It seems the -computerName ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444012", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Reasons for using Ant Properties files over "Properties Tasks" I'm currently working with some developers who like to set up Ant tasks that define environment specific variables rather than using properties files. It seems they prefer to do this because it's easier to type: ant <environment task> dist Than it is t...
{ "language": "en", "url": "https://stackoverflow.com/questions/444016", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: sync cookies and sessions in different subdomains (asp.net) I am building a site in asp.net and have multiple subdomains. For example, one.cookies.com two.cookies.com I want my users to be able to login at either subdomain and be logged in for both websites. In addition, I'd like the sessions and cookies to be in sy...
{ "language": "en", "url": "https://stackoverflow.com/questions/444018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: .Net Master Page Performance I'm looking for some help on my discussion. We're discussing two solutions to a customization problem. One uses (nested) master-pages. One master page per customized page. Plus there is a standard master page for all pages. The second uses a standard page, which redirects to the cus...
{ "language": "en", "url": "https://stackoverflow.com/questions/444022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using StatusStrip in C# Consider System.Windows.Forms.StatusStrip. I have added a StatusStrip to my Windows Forms application, but I am having a few problems. I would like to have a label anchored at the left and a progressbar anchored on the right in the StatusStrip, but I can't find a way to set these properties. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Is it possible to host an ASPX web site on Linux? We are trying to convert a lot of things at work over to Linux Red hat. Recently Windows Server 2003 was installed. We are currently hosting an asp .net web site on the windows server machine, what I'm wondering is if there is any software that will allow you to ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/444055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I get a HTML web page from a Windows Mobile Application? I'm working with C#.net developing applications for windows mobile 6, and i need get the HTML code from a web page, i mean, i need download the page and then get the code or parse it to string. someone know how can i do it? I know there is the WebClie...
{ "language": "en", "url": "https://stackoverflow.com/questions/444056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: python - readable list of objects This is probably a kinda commonly asked question but I could do with help on this. I have a list of class objects and I'm trying to figure out how to make it print an item from that class but rather than desplaying in the; <__main__.evolutions instance at 0x01B8EA08> but instead to...
{ "language": "en", "url": "https://stackoverflow.com/questions/444058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Easiest way to validate and read an xml file in .net? What is the easiest/simplest/cleanest way to: * *Read an xml file from the filesystem *Validate the xml against an xsd *Read parts of the xml file into variables Using .net. A: Depending on the level of tolerance and error reporting you want to have, you ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: tcp/ip monitor in eclipse, i have a weblogic server running, and a j2ee application deployed to it. the application is serving on port 7001. i want to hook the monitor up to the application, i do not know what ports to use. i think i know what to put in for the Host Name (localhost:7001), but not sure of what to use...
{ "language": "en", "url": "https://stackoverflow.com/questions/444065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PPM - Project Portfolio Management What is your company solution for PPM (managing projects, demands, timesheets, etc)? And what is your experience with it? I'm trying to know about the tool prespective and not your company's particular business process. Regards for you all! A: Roadmap http://www.ppmroadmap.com/ ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/444066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: VarBinary vs Image SQL Server Data Type to Store Binary Data? I need to store binary files to the SQL Server Database. Which is the better Data Type out of Varbinary and Image? A: There is also the rather spiffy FileStream, introduced in SQL Server 2008. A: https://learn.microsoft.com/en-us/sql/t-sql/data-types/nt...
{ "language": "en", "url": "https://stackoverflow.com/questions/444072", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "95" }
Q: Is there a good resource for data on Ruby Enterprise Edition usage in the wild? We're having great results with the Phusion stack (Passenger and Ruby Enterprise Edition) in house, but I haven't been able to find much in the way of data on their use in the wild, particularly REE. I'd love something akin to WWR's High...
{ "language": "en", "url": "https://stackoverflow.com/questions/444077", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Do you recommend using semicolons after every statement in JavaScript? In many situations, JavaScript parsers will insert semicolons for you if you leave them out. My question is, do you leave them out? If you're unfamiliar with the rules, there's a description of semicolon insertion on the Mozilla site. Here's the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: Make GtkScrolledWindow display all children by default How do I initialize a GtkScrolledWindow to avoid scrollbars by growing as much as possible? By default it seems to be as small as possible. Demo code (Quit with SIGINT): #include <gtk/gtk.h> int main(int argc, char *argv[]) { GtkWidget* window; GtkWidge...
{ "language": "en", "url": "https://stackoverflow.com/questions/444085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are some optimization techniques for MySQL table with 300+ million records? I am looking at storing some JMX data from JVMs on many servers for about 90 days. This data would be statistics like heap size and thread count. This will mean that one of the tables will have around 388 million records. From this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: printing on screen and a text file I need to dump the certain things into a text file and same has needs to be displayed on screen. (I'm telling about a C program utiltiy) The menu option looks like following, 1. display AA parameters 2. display BB parameters 3. display CC parameters 4. dump all 5. Exit Select opti...
{ "language": "en", "url": "https://stackoverflow.com/questions/444111", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I encode URI parameter values? I want to send a URI as the value of a query/matrix parameter. Before I can append it to an existing URI, I need to encode it according to RFC 2396. For example, given the input: http://google.com/resource?key=value1 & value2 I expect the output: http%3a%2f%2fgoogle.com%2fresour...
{ "language": "en", "url": "https://stackoverflow.com/questions/444112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "57" }
Q: Read/write XML with C#/.NET What are the best functions, practices, and/or techniques to read/write XML with C#/.NET? A: If you are working with .NET 3.5, LINQ to XML is certainly a very good way to interact with XML. MSDN Link A: There are classes to read XML: * *XmlDocument is slow and memory-intensive: it pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/444116", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Using Google Docs from web app We have a requirement for people to be able to look at documents people have uploaded to us (mainly word, possibly some rtf) via our web app. We want the user to be able to open the docs inside the browser, but keep the original formatting and not have the need for another application ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: MS-SQL 2000: Turn off logging during stored procedure Here's my scenario: I have a simple stored procedure that removes a specific set of rows from a table (we'll say about 30k rows), and then inserts about the same amount of rows. This generally should only take a few seconds; however, the table has a trigger on i...
{ "language": "en", "url": "https://stackoverflow.com/questions/444120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to create Sql Synonym or "Alias" for Database Name? I'm using ms sql 2008 and trying to create a database name that references another database. For example 'Dev', 'Test', 'Demo' would be database names that i could reference from my multiple config files, but each name would point to another database such as 'd...
{ "language": "en", "url": "https://stackoverflow.com/questions/444139", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: How do I pull the clientID of an asp:button inside an asp:listview for use with jQuery? I'm attempting to do something which should be relatively simple. I'm using a ListView to show a number of items, using the ItemTemplate. Inside the ItemTemplate I have a div surrounding the full item, so that I can highlight o...
{ "language": "en", "url": "https://stackoverflow.com/questions/444151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Regex to Extract Update Columns from a Sql Statement I need a Regex Statement (run in c#) that will take a string containing a Sql Update statement as input, and will return a list of columns to be updated. It should be able to handle columns surrounded by brackets or not. // Example Sql Statement Update Employees ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444152", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: HttpWebRequest Cookie weirdness I'm sure I must be doing something wrong. But can't for the life of me figure out what is going on. I have a problem where it seems that the HttpWebRequest class in the framework is not correctly parsing the cookies from a web response. I'm using Fiddler to see what is going on and af...
{ "language": "en", "url": "https://stackoverflow.com/questions/444163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the best way to write a contract for CSS usage in Web Development? Our Dev team had been developing enterprise web page more than 2 years ago. We are curious to know what is the best way to write a contract for CSS usage. For example, if we have a COMP, how we agree on a contract so our developers and our ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444165", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Object Oriented questions in Javascript I've been using javascript for a while, but have never learned the language past the basics. I am reading John Resig's "Pro Javascript Techniques" - I'm coming up with some questions, but I'm not finding the answers to them in the book or on google, etc. John gives this examp...
{ "language": "en", "url": "https://stackoverflow.com/questions/444170", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: How can I set up different build configurations for ASP.Net web site projects? According to an earlier question about Visual Studio configurations, there's no way to use Visual Studio's configuration manager to create different configurations for an ASP.net web site project. For normal projects, we have #if direct...
{ "language": "en", "url": "https://stackoverflow.com/questions/444179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }