text
stringlengths
8
267k
meta
dict
Q: How do C and C++ store large objects on the stack? I am trying to figure out how C and C++ store large objects on the stack. Usually, the stack is the size of an integer, so I don't understand how larger objects are stored there. Do they simply take up multiple stack "slots"? A: Push and pop instructions usually ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/429995", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Loading untrusted assemblies My application has a plug-in model that allows third-party developers to write assemblies that will execute in the main application. Up until now, the practical use has been to allow only trusted developers to provide add-ins. I'd like to expose the framework to untrusted developers. To ...
{ "language": "en", "url": "https://stackoverflow.com/questions/429998", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: regular expression for extracting options inside select tag I need to extract options in ``particular select tag. Is it possible to accomplish using one regex or I'll have to capture the inner html of select first and then the options? Here is an example of html: <select id="select_id"> <option selected value="">S...
{ "language": "en", "url": "https://stackoverflow.com/questions/429999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SQL Exclude LIKE items from table I'm trying to figure out how to exclude items from a select statement from table A using an exclusion list from table B. The catch is that I'm excluding based on the prefix of a field. So a field value maybe "FORD Muffler" and to exclude it from a basic query I would do: SELECT Fiel...
{ "language": "en", "url": "https://stackoverflow.com/questions/430000", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: XML Diff and Merge I think i have a rather unique problem to solve. Well, i cant find enough information using Google. So here it goes, I work on a Java EE SOA application which stores XML documents as XML using Oracle XML DB. Whenever the XML changes, i increment the version and throw the previous version into a di...
{ "language": "en", "url": "https://stackoverflow.com/questions/430001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Grails Domain Class without ID field or with partially NULL composite field Per an answer to a previous question (answer here: SQL/Database Views in Grails), I have tried to use a domain class to represent a view in my database. This works wonderfully in most cases, however: I have a view with no single unique key. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How would you store possibly recurring times? I need to store whether something happens once, daily, weekdays, weekly, some days of the week, some days of the month, which may be numerical or symbolic, like first Monday of each month, and so on. Any recommendations? Any code, data structure or schema to look at? A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/430012", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Firefox 3 Centering Bug (any CSS Hacks or Fixes?) I'm having issues with centered items in Firefox 3. (I searched and couldn't find this answered -- hopefully not a re-post) I stripped the code down to just two elements to demonstrate this -- you can see it here: http://prwmusic.com/misc/csstest/home-sample-fix.html...
{ "language": "en", "url": "https://stackoverflow.com/questions/430028", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Regular expression: replace the suffix of a string ending in '.js' but not 'min.js' Assume infile is a variable holding the name of an input file, and similarly outfile for output file. If infile ends in .js, I'd like to replace with .min.js and that's easy enough (I think). outfile = re.sub(r'\b.js$', '.min.js', i...
{ "language": "en", "url": "https://stackoverflow.com/questions/430047", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Dynamic AddressOf What is the best way of referencing a dynamic delegate. I'd like to do the following with method names returned from a configuration database. AddressOf "MethodName" A: Via Reflection (specifically Type.GetMethod). A: Use the classes in the System.Reflection namespace. A: AddressOf doesn't wor...
{ "language": "en", "url": "https://stackoverflow.com/questions/430056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Doing Forms With Just Windows SharePoint Services 3.0? For the most part my organization is happy with WSS 3.0 (no upgrading to MOSS) with one exception, there is really just one form we'd like to put up somehow. It's fairly big form (basically change requests for IT services, on paper it's easily 2 full 8.5 by 11...
{ "language": "en", "url": "https://stackoverflow.com/questions/430071", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to use nested Functions in Objects Suppose you use the following structure: var Args = new Object(); Args.Age = '10'; Args.Weight = '10'; Args.GetAge = function() { return 'I am ' + Age + ' years old'; } Args.GetWeight = function() { return 'I weigh ' + Weight + ' pounds'; } That works great. But is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Shell script templates What would be your suggestions for a good bash/ksh script template to use as a standard for all newly created scripts? I usually start (after the #! line) with a commented-out header with a filename, synopsis, usage, return values, author(s), changelog and would fit into 80-char lines. All doc...
{ "language": "en", "url": "https://stackoverflow.com/questions/430078", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: How to split strings into text and number? I'd like to split strings like these 'foofo21' 'bar432' 'foobar12345' into ['foofo', '21'] ['bar', '432'] ['foobar', '12345'] Does somebody know an easy and simple way to do this in python? A: here is a simple function to seperate multiple words and numbers from a string...
{ "language": "en", "url": "https://stackoverflow.com/questions/430079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "83" }
Q: In Java, can Class.forName ever return null? In Java, can Class.forName ever return null, or will it always throw a ClassNotFoundException or NoClassDefFoundError if the class can't be located? A: Since null is not mentioned anywhere in the documentation for this method and because there doesn't seem to be any sit...
{ "language": "en", "url": "https://stackoverflow.com/questions/430089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Open Source Syslog Daemon for Windows Can anyone recommend an open source Syslog Daemon for Windows (specifically Windows 2008 64bit). Thanks A: Here is one written in C# that logs to SQL Server. Only the source is available for download, but it has a ton of potential. A: Kiwi Syslog, or Star Syslog daemon lite - ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430107", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: The process that must occur between the client and servers, Kerberos authentication Im trying to learn and understand Kerberos, i need to understand the process that must occur between the client and server — Windows and non-Windows platforms — to enable Kerberos authentication. looking for some help to explain the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the difference between a C# Reference and a Pointer? I do not quite understand the difference between a C# reference and a pointer. They both point to a place in memory don't they? The only difference I can figure out is that pointers are not as clever, cannot point to anything on the heap, are exempt from g...
{ "language": "en", "url": "https://stackoverflow.com/questions/430112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "93" }
Q: How do I enable the PostgreSQL function profiler? This took me a while to figure out and I found the answer on a foreign-language wiki a number of weeks ago, and it was very helpful, so I thought I would share. A: On PostgreSQL 8.3 on Win32, the profiling plugin is installed by default, but not loaded. Just execut...
{ "language": "en", "url": "https://stackoverflow.com/questions/430123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How would you implement?: Lots of rules over a tree in C# I have a data structure that represents C# code like this: class Namespace: string Name; List<Class> Classes; class Class: string Name; List<Property> Properties; List<Method> Methods; List<Method> Constructors; List<Field> Fields...
{ "language": "en", "url": "https://stackoverflow.com/questions/430125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Use PowerShell to stop 'Default Web Site' in IIS6 I've done several Google searches and can't find a good sample to stop/start the 'Default Web Site' (in II6) using PowerShell. This... $server = "localhost" $siteName = "default web site" $iis = [ADSI]"IIS://$server/W3SVC" $site = $iis.psbase.children | where { $_....
{ "language": "en", "url": "https://stackoverflow.com/questions/430127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Ok to use Google Code to host javascript apps for end users? I am working on a javascript app that users load via a configurable script tag. I have it hosted on its own Google Code project since its open source. Is it ok to have the url that loads the app pointed at the file download link on its Code site? For examp...
{ "language": "en", "url": "https://stackoverflow.com/questions/430128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Categorising EC2 instances Is there a way to distinguish between sets of EC2 instances? My use case is that I have a bunch of web tier machines and a bunch of search tier machines; currently the only way to track what each instance is doing is in a roll-your-own asset directory, like LDAP or a database. Ideally, I'd...
{ "language": "en", "url": "https://stackoverflow.com/questions/430141", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What algorithms compute directions from point A to point B on a map? How do map providers (such as Google or Yahoo! Maps) suggest directions? I mean, they probably have real-world data in some form, certainly including distances but also perhaps things like driving speeds, presence of sidewalks, train schedules, etc...
{ "language": "en", "url": "https://stackoverflow.com/questions/430142", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "566" }
Q: How can I reverse code around an equal sign in Visual Studio? After writing code to populate textboxes from an object, such as: txtFirstName.Text = customer.FirstName; txtLastName.Text = customer.LastName; txtAddress.Text = customer.Address; txtCity.Text = customer.City; is there way in Visual Studio (or even somet...
{ "language": "en", "url": "https://stackoverflow.com/questions/430145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Setting a multi-valued parameter in javascript When I submit a form in HTML, I can pass a parameter multiple times, e.g. <input type="hidden" name="id" value="2"> <input type="hidden" name="id" value="4"> Then in struts I can have a bean with property String[] id, and it'll populate the array correctly. My question...
{ "language": "en", "url": "https://stackoverflow.com/questions/430161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why does malloc allocate a different number of bytes than requested? I have this piece of code #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> int main(){ void *a, *b; a = malloc(16); b = malloc(16); printf("\n block size (for a): %p-%p : %li", b, a, b-a); a = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Execute several programs at the same time in an initialisation/bash script Hello I am working with a simulator that uses rcS scripts to boot, this is my script cd /tests ./test1 & ./test2 & ./test3 & ./test4 exit What I want is run all the test at the same time and that the exit command is executed only when all t...
{ "language": "en", "url": "https://stackoverflow.com/questions/430176", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is C strongly typed? To quote Wikipedia: Two commonly used languages that support many kinds of implicit conversion are C and C++, and it is sometimes claimed that these are weakly typed languages. However, others argue that these languages place enough restrictions on how operands of different types ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430182", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "96" }
Q: Trying to design/model simple database app I'm trying to learn more about db interactions which has me developing a local app to get started. Well, basically, what I've done so far has had some mixed results and I've changed so much stuff I'm not even sure what I've change at this point, lol. I'm not quite sure one ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can you statically compile Microsoft .NET code? I saw this Ars Article about .NET Mono version being used to statically compiled and not have the JIT or CLR for the iPhone & Wii. I'm assuming you can also do this for PC's w/o .NET installed. The articles seem to imply this can only be done w/ Mono, but does ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I programmatically read server logs from HLDS? How does one go about reading and parsing server logs sent remotely from HLDS (Half-Life Dedicated Server)? My understanding is that you can specify where the server delivers logs using the command log_address. After this, the server is supposed to deliver the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best way to poll a web service (eg, for a twitter app) I need to poll a web service, in this case twitter's API, and I'm wondering what the conventional wisdom is on this topic. I'm not sure whether this is important, but I've always found feedback useful in the past. A couple scenarios I've come up with: * *The ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430226", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is it possible to use JS to open an HTML select to show its option list? Is it possible to use JavaScript to open an HTML select to show its option list? A: After trying to solve this issue for some time, I managed to come with a working solution that is also valid: var event = new MouseEvent('mousedown'); element....
{ "language": "en", "url": "https://stackoverflow.com/questions/430237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "156" }
Q: Does multipart/x-mixed-replace wait for client requests? I'm trying to figure out if it's possible to slow down the server when it's sending multipart/xmixed-replace responses. I want my client to try to rate limit a motion jpeg stream. I've found a lot of documentation about what the server sends in an HTTP respo...
{ "language": "en", "url": "https://stackoverflow.com/questions/430254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: how could I write as a static page in php dynamic content? I have certain user information that they are willing to make public and searchable. I'm thinking ala LinkedIn these should be generated static-pages that reside on our server with a fixed URL. What, technically, is the recommended way to do this? Here is t...
{ "language": "en", "url": "https://stackoverflow.com/questions/430255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How do I determine whether the filesystem is case-sensitive in .net? Does .net have a way to determine whether the local filesystem is case-sensitive? A: Keep in mind that you might have multiple file systems with different casing rules. For example, the root filesystem could be case-sensitive, but you can have a c...
{ "language": "en", "url": "https://stackoverflow.com/questions/430256", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: In Rails, how do you use RESTful controllers with Haml? I'm getting started on figuring out how to use RESTful design. I have this action: # GET /feedback_messages # GET /feedback_messages.xml def index page = params[:page] page ||= 1 @feedback_messages = FeedbackMessage.paginate( :all, :page => page, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430259", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Next or previous enum Given an enum that has assigned values, what is the best way to get the next or previous enum given a value. For example, consider this enum: public enum TimeframeType { None = 0, [Description("1 month")] Now = 30, [Description("1-3 months")] Short = 90, [Description("3-...
{ "language": "en", "url": "https://stackoverflow.com/questions/430264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Oracle: What does `(+)` do in a WHERE clause? Found the following in an Oracle-based application that we're migrating (generalized): SELECT Table1.Category1, Table1.Category2, count(*) as Total, count(Tab2.Stat) AS Stat FROM Table1, Table2 WHERE (Table1.PrimaryKey = Table2.ForeignKey(+)) GROUP BY Tab...
{ "language": "en", "url": "https://stackoverflow.com/questions/430274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "70" }
Q: Render PDF in iTextSharp from HTML with CSS Any idea how to render a PDF using iTextSharp so that it renders the page using CSS. The css can either be embedded in the HTML or passed in separately, I don't really care, just want it to work. Specific code examples would be greatly appreciated. Also, I would really ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: A Captive Portal to Handle My Needs I am looking into captive portals for my organization. I see a lot of them out there that will allow a user to pass once they a.)enter credentials or b.)pay money. What I'm looking for is a bit different. Let me go into some basics about my system, I am running a windows based ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I add two projects. Visual Studio 2008 I just created a project so my Solution Explorer looks like this: (source: kalleload.net) But I want to add another project which is related to this project but it's going to be a class library and it's going to output a DLL that I could use in any other project. So h...
{ "language": "en", "url": "https://stackoverflow.com/questions/430295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How does Microsoft's Entity Framework inhibit test driven development? MS's entity framework is considered among developers in the agile community to inhibit test driven development. It was famously attacked by an influential group of .Net developers for not being a true reflection of the principles of the agile mo...
{ "language": "en", "url": "https://stackoverflow.com/questions/430300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Opening .sln files in Windows Vista This one seems to be quite ridiculous but how can I open a VS solution file in Windows Vista double-clicking on it? Every time I do I got a strange error that the file doesn't exist. I'm pretty sure this is a Vista configuration but I couldn't find any relevant information. It's r...
{ "language": "en", "url": "https://stackoverflow.com/questions/430302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: explanation needed for exceptions/classes Consider the following snippet: using System; using System.Collections.Generic; using System.Linq; using System.Net; namespace ForumLogins { public class VBULLETIN { HttpWebRequest request; public void ForumLogins(string url) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430313", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: G-mail style form submission on table data I have table rows of data in html being filled from a CGI application. I want each row to have a check box next to it so I can delete multiple rows, just like in gmail. I figured out the basic text form and was able to send it to the CGI program to delete the row, but I d...
{ "language": "en", "url": "https://stackoverflow.com/questions/430314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Closures and Context Free Grammars I'm looking over my syllabus for my theoretical computer science class and within the heading of Context Free Grammars it lists "closure properties". I have looked through my textbook on this subject and found quite little. The little it does have is a bit above my head at the mome...
{ "language": "en", "url": "https://stackoverflow.com/questions/430324", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: PHP: Holding two matching items in an array of data from MySQL $story_query = "SELECT table_name, id FROM planning WHERE parent = '$novelnum'"; $story_result = db_query($story_query); while($story_row = db_fetch_array($story_result)) { $taleTable_Name = $story_row['table_name']; $postid[] = $story_row['id'];...
{ "language": "en", "url": "https://stackoverflow.com/questions/430326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to you inspect or look for .NET attributes? I have an enumeration for Status for a Task. Some of the statuses are considered obsolete, and I have marked them as obsolete, as seen below: public enum TaskStatus { [Description("")] NotSet = 0, Pending = 1, Ready = 2, Open = 3, Completed = 4...
{ "language": "en", "url": "https://stackoverflow.com/questions/430330", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Application version or milestone Naming Schemes I'm looking for "schemes" for application version or milestone naming. I'd like to find a naming scheme that suits my current project but I think we should gather here the more interesting schemes to share knowledge and ideas on the subject. You also should provide the...
{ "language": "en", "url": "https://stackoverflow.com/questions/430338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Apostrophes replacing quotation marks in script tag in input field I have this input in a form: <input type="text" value="<script src='/js/script.js' type='text/javascript'></script>" name="embed"/> The quotations in general have to be double, so I put single-quotes within the value property. However, when I do th...
{ "language": "en", "url": "https://stackoverflow.com/questions/430339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why doesn't Java support unsigned ints? Why doesn't Java include support for unsigned integers? It seems to me to be an odd omission, given that they allow one to write code that is less likely to produce overflows on unexpectedly large input. Furthermore, using unsigned integers can be a form of self-documentat...
{ "language": "en", "url": "https://stackoverflow.com/questions/430346", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "396" }
Q: Do I need to worry about concurrency issues in my Flex/AIR code? I have a situation where I'm starting a number of objects that, when they are ready to handle some input data, call a handler. That handler gets a dataset from an ArrayCollection of pending requests, assigns it to the object, and removes the dataset fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/430347", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What does the browser do when the source of iframe is javascript When the source of an iframe is: javascript:''; as in: <iframe id="SpControlFrame1" name="SpControlFrame1" src="javascript:'';" path_src="index.php?cmd=YYY" ></iframe> What is going on? What does the src="javascript:'';" tell the browser to do? what ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430349", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Basic php form help - referer title I now have it set up so that when people go to a "thank you" page after filling out a form, they go to a page that says: thanks for coming <a href="<?php echo $_SERVER['HTTP_REFERER'] ?>here's a link back to where you came from</a> What I want is for it to say: thanks for ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430358", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Where to get started with APIs I have never worked with APIs before (and have very little programming experience outside of HTML and CSS) and I am struggling to find any clear tutorials or explanations. Do APIs all work in the same way? Can you use any programming language or only a specific language or does that d...
{ "language": "en", "url": "https://stackoverflow.com/questions/430374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Batch files, vista x64, if and parenthesis Some batch files on Windows use an IF syntax with multiple lines, as below: if var==rule ( some comands ) else ( else commands ) Now, Windows Vista x64 decided to put all 32 bits files under "C:\Program Files (x86)". Unfortunately, whenever you use an environment varia...
{ "language": "en", "url": "https://stackoverflow.com/questions/430376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Draw rounded corners on photo with PIL My site is full of rounded corners on every box and picture, except for the thumbnails of user uploaded photos. How can I use the Python Imaging Library to 'draw' white or transparent rounded corners onto each thumbnail? A: From Fredrik Lundh: create a mask image with round co...
{ "language": "en", "url": "https://stackoverflow.com/questions/430379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C# is probably not the best choice for a security application? I have stumbled in this phrase in the web: C# is probably not the best choice for a system-level application like this. I believe plain C++ is much better here as you will need to do lots of low-level API calls. I was searching about security progr...
{ "language": "en", "url": "https://stackoverflow.com/questions/430386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Feasibility of VPN connection using VB6 and RAS API We have a modem terminal application written in VB6. It works great for what we need it to do, but there is a new requirement to initiate a VPN connection when dialing a particular provider. I've looked over some related posts and it looks like this may be possible...
{ "language": "en", "url": "https://stackoverflow.com/questions/430388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C++ Standard and Global Symbol Removal Anyone have a link to what the C++ standard says regarding a compiler removing global and static symbols? I thought you weren't guaranteed that the compiler will remove global symbols if they're not referenced. A colleague of mine asserts that if your global symbols are includ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Display ñ on a C# .NET application I have a localization issue. One of my industrious coworkers has replaced all the strings throughout our application with constants that are contained in a dictionary. That dictionary gets various strings placed in it once the user selects a language (English by default, but targe...
{ "language": "en", "url": "https://stackoverflow.com/questions/430403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: VC++ compile errors when including gl.h Compiling a file that uses OpenGL with Visual C++, when I try to include the gl.h header file I get about 150 unhelpful compile errors: error C2144: syntax error : 'void' should be preceded by ';' error C4430: missing type specifier - int assumed. Note: C++ does not support de...
{ "language": "en", "url": "https://stackoverflow.com/questions/430413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Are there any macros to determine if my code is being compiled to Windows? I would like to detect whether the OS I'm compiling on is Windows. Is there a simple macro I can check to verify that? A: The MSVC++ compiler (not windows.h) defines _WIN32 for all builds, so it is a safer macro to check. The MinGW gcc comp...
{ "language": "en", "url": "https://stackoverflow.com/questions/430424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: PHP Pull Image And Display I have a PHP file which I have used mod rewrite to make a .jpg extension. I want to grab an image from a url example: http://msn.com/lol.gif take the data and then display it in my .jpg with jpeg headers, so as far as the user is concerned it is a normal image. Is this possible and if so c...
{ "language": "en", "url": "https://stackoverflow.com/questions/430439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Eclipse configuration docs to link and edit an existing web app I have been trying to learn how to use eclipse for J2ee web development and have heard alot of great things about it. I have had a lot of success my self When starting a project from scratch and building everything within the eclipse work space. This wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/430446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to format an int as currency in C#? I want to format an int as a currency in C#, but with no fractions. For example, 100000 should be "$100,000", instead of "$100,000.00" (which 100000.ToString("C") gives). I know I can do this with 100000.ToString("$#,0"), but that's $-specific. Is there a way to do it with t...
{ "language": "en", "url": "https://stackoverflow.com/questions/430458", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How do I use an equivalent to C++ reference parameters in Java? Suppose I have this in C++: void test(int &i, int &j) { ++i; ++j; } The values are altered inside the function and then used outside. How could I write a code that does the same in Java? I imagine I could return a class that encapsulates both v...
{ "language": "en", "url": "https://stackoverflow.com/questions/430479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: IE CSS bug: table border showing div with visibility: hidden, position: absolute The issue I have a <div> on a page which is initially hidden with a visibility: hidden; position: absolute. The issue is that if a <div> hidden this way contains a table which uses border-collapse: collapse and has a border set on it ce...
{ "language": "en", "url": "https://stackoverflow.com/questions/430485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Flex DisplayObject in fullscreen mode I would like to make a display object fullscreen in my Flex application. I understand it is easy to make the complete Stage fullscreen in flex (example). But I have two charts on my Stage and I would like to make one of the charts full screen on clicking a button (or on double c...
{ "language": "en", "url": "https://stackoverflow.com/questions/430499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you get rid of all scrollbars in an iframe in Safari/webkit? I've tried scrolling="no" and overflow:hidden; Nothing seems to make the vertical scrollbar go away in iframes on Safari/webkit. Anyone know? A: Use overflow:hidden on the included body. A: Yeah, and it's a bug. See the W3C for expected behaviour....
{ "language": "en", "url": "https://stackoverflow.com/questions/430503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Flash AS2 Command Line compiler capablities Although the MTASC command-line compiler can compile ActionScript class files into an SWF, I need specific insights into its capabilities, via the command-line switches. * *Configure which Flash Player version you're targeting, 6 / 7 / 8 -version n : specify SWF versio...
{ "language": "en", "url": "https://stackoverflow.com/questions/430508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Embedded Software Programming Resources (Microcontrollers, EPROM) Does anyone know any good online embedded software programming with C or assembler resources? Google's not really helping out with its search. A: Microchip has free (student version) compilers, and lots of app notes. Embedded System Programming magaz...
{ "language": "en", "url": "https://stackoverflow.com/questions/430512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Where's the HXML docs? I've looked all over the Haxe Flash Command-line compiler website but was unable to find any detailed documentation of the HXML files (scroll down to the "Changing SWF properties" section) which describe the compile. Anybody know of a reference source? Found HXML: * *-swf MyApp.swf .... Co...
{ "language": "en", "url": "https://stackoverflow.com/questions/430525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Setting the editing style on a UITableViewCell I'm trying to set the editing style property of a UITableViewCell in a Cocoa Touch (iPhone) app. For an example of what this looks like, check out the Contacts app, where you can see the little green plus sign to the left of some of the cells. The UITableViewCell insp...
{ "language": "en", "url": "https://stackoverflow.com/questions/430538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Ruby on Rails: hash.each {} issues Here is my code: records_hash = records[:id].inject({}) { |result,h| if result.has_key?(h) result[h] += 1 else result[h] = 1 end result } @test2 = records_hash.each{|key,value| puts "#{key} is #{value}"} My output should look like this: bozo is 3 bubba is 4 bonker...
{ "language": "en", "url": "https://stackoverflow.com/questions/430548", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: VIM How do I search for a single byte representation When I cut and paste from a Word document into VIM, quotes get translated into a-circumflex followed by <99>, where the <99> is a single byte representation. (Which I know because when I move to it, typing a single 'l' moves me right to the over all four characte...
{ "language": "en", "url": "https://stackoverflow.com/questions/430554", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: When are VBOs faster than "simple" OpenGL primitives (glBegin())? After many years of hearing about Vertex Buffer Objects (VBOs), I finally decided to experiment with them (my stuff isn't normally performance critical, obviously...) I'll describe my experiment below, but to make a long story short, I'm seeing indist...
{ "language": "en", "url": "https://stackoverflow.com/questions/430555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: ASP.NET: Does implementing a custom MembershipProvider class needs you to implement a custom Membership class too? I have this question: "Does implementing a custom MembershipProvider class needs you to implement a custom Membership class too?" I am a bit confused about implementing a custom membership framework on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Hide an ASP.NET Menu Item I have an ASP.NET webforms application with a Menu control. How does one hide a particular menu item via code? I've seen a few articles pointing out how to do it with ASP.Net membership/roles-based security, but this particular use case has nothing to do with that. I simply need a way to pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/430573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Sending an SMS to a Cellphone using Django I am building an application, where I have this little survey module, which sends out a simple sms to the phone number I give and has to collect the response(if the user fires it) and show it to me. I am using to django build my project. I have tried django-sms google code ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Open Source HTML to PDF Renderer with Full CSS Support I asked about getting iTextSharp to render a PDF from HTML and a CSS sheet before here but it seems like that may not be possible... So I guess I will have to try something else. Is there an open source .NET/C# library out there that can take HTML and CSS as in...
{ "language": "en", "url": "https://stackoverflow.com/questions/430590", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: Django-Admin: CharField as TextArea I have class Cab(models.Model): name = models.CharField( max_length=20 ) descr = models.CharField( max_length=2000 ) class Cab_Admin(admin.ModelAdmin): ordering = ('name',) list_display = ('name','descr', ) # what to write here to make descr using TextAr...
{ "language": "en", "url": "https://stackoverflow.com/questions/430592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "105" }
Q: Good panel interface component for C#? Any nice Paneled user interface component COM/ActiveX/Source-code for C#/VB? Like what VS has internally: * *Dock to screen edges *Slide open/close (unpinned) *Pin open *Group in tabs And if possible, open-source/free. Well, because otherwise I'd have to develop an inte...
{ "language": "en", "url": "https://stackoverflow.com/questions/430593", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Registered alert script called on BrowserBack I have a small class that displays an alert via Javascript. I am using this class on a page that checks if the user entered valid zip code. If a valid zip code is not entered, an alert is displayed, and the page is posted back to the same page so they can change it. If t...
{ "language": "en", "url": "https://stackoverflow.com/questions/430598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: signedXml.CheckSignature always returns false I am struggling with getting this encryption decryption to work right. I am using this class provided by Wolfwyrd and this instructions. Below is the code: RSACryptoServiceProvider rsaKey = EncryptionUtils.GetRSAFromSnkFile(@"c\:a.snk"); XmlDocument xmlDoc = new XmlDocu...
{ "language": "en", "url": "https://stackoverflow.com/questions/430599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: TClientDataset - XML mapping I'm trying to save data in a TClientDataSet to an XML file, but it doesn't like some of my fields. The helpfile says to create a definition, in one of two ways: either with the xmlmapper.exe file in my \bin folder or with an IDOMDocument interface. Problem is, xmlmapper.exe isn't there,...
{ "language": "en", "url": "https://stackoverflow.com/questions/430601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Hyperlink works - Html Form with a Submit button doesn't I have a PHP script that pushes the headers to allow a file to download. This script works fine when it called via a hyperlink or through the browser using link. This is how it looks like: <a href="download.php?file=test.mp3&properFilename=Testing File">Downlo...
{ "language": "en", "url": "https://stackoverflow.com/questions/430602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Performance benefit when SQL query is limited vs calling entire row? How much of a performance benefit is there by selecting only required field in query instead of querying the entire row? For example, if I have a row of 10 fields but only need 5 fields in the display, is it worth querying only those 5? what is the...
{ "language": "en", "url": "https://stackoverflow.com/questions/430605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is a fast way to render a log view in WPF? I'm writing an application that needs a log-like view, (similar to how an IM client displays messages in the conversation), with potentially many updates per second. Speed is an issue here; the application locking up due to a large number of incoming events is a possib...
{ "language": "en", "url": "https://stackoverflow.com/questions/430609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Get Firefox URL? How can I get the url from a running instance of firefox using .NET 2.0 windows/console app? C# or VB codes will do. Thanks! A: Building on Rob Kennedy's answer and using NDde using NDde.Client; class Test { public static string GetFirefoxURL() { DdeClient dde = new Dde...
{ "language": "en", "url": "https://stackoverflow.com/questions/430614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Code to create CAPTCHA code in ASP.NET? I want to create a CAPTCHA similar to http://www.gigbooks.com/getcaptcha.php this one. But its in PHP an anyone provide me the code to create the same in ASP.NET ? I am using ASP.NET 2.0 (C#) Thanks, A: For a programmatic API to reCAPTCHA, start at the recapture home page. If...
{ "language": "en", "url": "https://stackoverflow.com/questions/430615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: MFC vs. CLR? In a visual studio C++ project, would MFC be faster than using the CLR? I'd specificily be using 2008. Oh and the reason I ask is because I have experience with .NET but not so much with MFC. I understand what MFC is but have never really used it much. A: If you're referring to dev time, if you have ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/430616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the most efficient way to give the active page's menu item a "selected" id to change the CSS? Lets say I have 5 pages: A, B, C, D, and E. I also have a horizontal menu, and each item has a light gray background. Each menu item has a:hover that gives it a medium-gray background, but I want the active page to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Pointer container class which can't be copied by value I need a smart pointer for my project which can be send to several methods as parameter. I have checked auto_ptr and shared_ptr from boost. But IMO, that is not suitable for my requirements. Following are my findings auto_ptr : When passed to another method, own...
{ "language": "en", "url": "https://stackoverflow.com/questions/430672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why is the third parameter to pcap_next_ex an incompatible pointer type? Disclaimer: This is for a homework assignment, but the question is not regarding the assignment, just about general syntax weirdness. I'm trying to use libpcap in the context of a much larger program, but when I try to get the packet header and...
{ "language": "en", "url": "https://stackoverflow.com/questions/430678", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MVC Repository Pattern: Creating Model Classes Reviewing Conery's storefront, and I dont understand why he used Linqs auto-generated classes (ie Order class) and then he has another Order class defined that is not a partial class. WHen using repository pattern should one manually create the classes, and disregard ...
{ "language": "en", "url": "https://stackoverflow.com/questions/430681", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Bandwidth throttling for Apache<2.2 on Windows (mod_throttle?) Does anyone know of a windows build of mod_throttle for Apache 2.2 or lower? Or perhaps another means by which to throttle bandwidth. I need to throttle as low as 64k for a local speed test demonstration Preferably Apache rather than a browser plug-in to...
{ "language": "en", "url": "https://stackoverflow.com/questions/430687", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How Do I Import CSS With Safari and Opera When Using CSS Hacks? I have a tough one here, but I think the benefit will be great... I'm using the following CSS hack with PHP. The U variable in the file below is a constant, previously defined (before I include this file) as the URL such as http://example.com/. The P co...
{ "language": "en", "url": "https://stackoverflow.com/questions/430689", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }