text
string
meta
dict
Q: If the html says If it said "oneword", then I could write "#oneword", but what do I write when there is a space in the word? A: Change it to two-words. Like others said, you cannot use spaces for the id, but you can for the class. #two-words { font-family: arial; } .center { text-align: center; } .bold { font-weigh...
{ "language": "en", "url": "https://stackoverflow.com/questions/249878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: How to copy a structure of nodes from one xml to an other with a different namespace? I have two XML files with two different XSD schemas and different namespaces. They have both an identical substructure. And now i need to copy that node (and all childs) from one XML document to the other one. Clone would do, if t...
{ "language": "en", "url": "https://stackoverflow.com/questions/249883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Equivalent to webcontrols in other frameworks? What is the equivalent to web controls in frameworks other than ASP.Net? Specifically I'd like to know about Java, PHP and Ruby on Rails. What are the relative merits/faults of each of these frameworks for web development? I've had some exposure to ASP.Net and have been...
{ "language": "en", "url": "https://stackoverflow.com/questions/249901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I find the DNS servers in Android from a Java program? The java.net.InetAddress.GetByName(String host) method can only return A records so to lookup other record types I need to be able to send DNS queries using the dnsjava library. However that normally relies on being able to parse /etc/resolv.conf or simil...
{ "language": "en", "url": "https://stackoverflow.com/questions/249916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Passing Eval from ASPX to Javascript function as Parameter <a id="lblShowTimings" runat="server" title='<%# Eval("SHOW_Name") %>' onclick='PopulateTicketDiv(<%#Eval("SHOW_ID") %>)'> <-- this is the problem %#Eval("SHOW_Time") %> </a> Can Eval be passed as an argument to a javascript function? If s...
{ "language": "en", "url": "https://stackoverflow.com/questions/249926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Restarting (Recycling) an Application Pool How can I restart(recycle) IIS Application Pool from C# (.net 2)? Appreciate if you post sample code? A: Maybe this articles will help: * *Recycle current Application Pool programmatically (for IIS 6+) *Recycling Application Pools using WMI in IIS 6.0 *Recycling IIS 6...
{ "language": "en", "url": "https://stackoverflow.com/questions/249927", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "75" }
Q: Executable started by a windows service using the local system account cannot access network shares I have an executable that is started by a windows service, this program will be run on a customers machine and will need to connect to a remote share to perform a particular task. This share is specified by the custom...
{ "language": "en", "url": "https://stackoverflow.com/questions/249928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: PHP apache_request_headers() diagrees with reality (as confirmed by Firebug): why? I have written a web app in PHP which makes use of Ajax requests (made using YUI.util.Connect.asyncRequest). Most of the time, this works fine. The request is sent with an X-Requested-With value of XMLHttpRequest. My PHP controller ...
{ "language": "en", "url": "https://stackoverflow.com/questions/249968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Why are TDD 'Spikes' called 'Spikes? The test driven development guys refer to a quick, exploratory, investigation that involves coding something up to see if it works, a spike. Any ideas why they came up with that word? Update: The coinage by Kent Beck looks like the 'original' one to me, although his usage of the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/249969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: WPF: How to apply a GeneralTransform to a Geometry data and return the new geometry? Having some Geometry data and a Transform how can the transform be applied to the Geometry to get a new Geometry with it's data transformed ? Ex: I Have a Path object that has it's Path.Data set to a PathGeometry object, I want to t...
{ "language": "en", "url": "https://stackoverflow.com/questions/249971", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Whether const char * and strdup serve the same function when used with getopt in C? In the below code snippet can i replace char * to const char * and remove the strdup() function call and directly take the optarg value set by getopt()? I am advised to use const char * to skip the strdup function usage. Appreciate t...
{ "language": "en", "url": "https://stackoverflow.com/questions/249979", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Making Thrift calls from a C++ app in Windows As the title says, I have a Windows app written in C++ from which I need to make calls to remote Thrift services, and I'm a bit lost on the subject, to be honest. http://wiki.apache.org/thrift/ThriftInstallationWin32 states that "The Thrift C++ runtime library does not c...
{ "language": "en", "url": "https://stackoverflow.com/questions/249985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I seed the Bug number in Bugzilla? We'd like to start our bug numbers to something other than 1 for a new Bugzilla installation. Is there a way to do this? A: Based on the responses, the following MySQL command will do it: ALTER TABLE bugs AUTO_INCREMENT = 100; where 100 is the new seed number. Here's the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/249987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can I fetch the value of a non-standard CSS property via Javascript? I am trying to read a custom (non-standard) CSS property, set in a stylesheet (not the inline style attribute) and get its value. Take this CSS for example: #someElement { foo: 'bar'; } I have managed to get its value with the currentStyle prope...
{ "language": "en", "url": "https://stackoverflow.com/questions/249991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Windbg help -> how can I read the code at this callstack? I have a dump of a windows service i made. The exception is that my code can't move a file (for some reason). Now, in my code there's a number of places where i move files around the filesystem. So, using Windbg, i'm trying to see the code where the exception...
{ "language": "en", "url": "https://stackoverflow.com/questions/249994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: An alternative to alert/confirm/error dialogs? We all know that alerts are bad. If you didn't know it read this Alerts are used to communicate with the user. So if we don't use them what is a good alternative? I'd like to get a nice list of good alternatives to choose from when implementing something that requires ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250000", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: 'POCO' definition Can someone define what exactly 'POCO' means? I am encountering the term more and more often, and I'm wondering if it is only about plain classes or it means something more? A: To add the the other answers, the POxx terms all appear to stem from POTS (Plain old telephone services). The POX, used t...
{ "language": "en", "url": "https://stackoverflow.com/questions/250001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "278" }
Q: C++: ctors for structs? C++: Since a struct is a class with everything "public", are default -ctors created and called? The reason I ask is to understand the overhead, if any, that C++ may have over C, when structs are used. An opinion I have heard is that classes have some overhead that structs don't, in C++, but I...
{ "language": "en", "url": "https://stackoverflow.com/questions/250033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: GridView sorting: SortDirection always Ascending I have a gridview and I need to sort its elements when the user clicks on the header. Its datasource is a List object. The aspx is defined this way : <asp:GridView ID="grdHeader" AllowSorting="true" AllowPaging="false" AutoGenerateColumns="false" Width="780" runa...
{ "language": "en", "url": "https://stackoverflow.com/questions/250037", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "70" }
Q: How can I add post-install scripts to easy_install / setuptools / distutils? I would like to be able to add a hook to my setup.py that will be run post-install (either when easy_install'ing or when doing python setup.py install). In my project, PySmell, I have some support files for Vim and Emacs. When a user instal...
{ "language": "en", "url": "https://stackoverflow.com/questions/250038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Design pattern or code smell, denormalised data as a result of functional decomposition I'm a big fan of http://highscalability.com/ and have been looking in my current development to decompose my application along functional boundaries as a route to being able to scale out the server side, specifically the database...
{ "language": "en", "url": "https://stackoverflow.com/questions/250044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: UI diagram layout Wanted to generate a UI diagram (with nice layout) depicting relationships amongst network components. Which is the best Java based API to do such layouts with minimum fuss and light codebase. A: yWorks. http://www.yworks.com/en/index.html A: If you're logging for a Java API that can do layouts ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET: Warning on changed data closing windows I'd like to warn users when they try to close a browser window if they didn't save the changes they made in the web form. I'm using ASP.NET 3.5 (with ASP.NET Ajax). Is there a common solution which I could easily implement? EDIT: maybe my question wasn't clear: I am s...
{ "language": "en", "url": "https://stackoverflow.com/questions/250055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Flex - Remoting vs HTTPService - when to use what? I have been using Flex for a while and have not used remoting as of yet. Currently my apps use a webservice that generates xml that I use for databinding. What would be the benefit to using remoting over an xml webservice in this use case? Is there a general guidel...
{ "language": "en", "url": "https://stackoverflow.com/questions/250058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What is meant by the term "true" object orientation I have been hearing a lot about Ruby and possibly even Javascript being "true" object oriented languages as opposed to C++ and C# which are class oriented (or template based) languages. What is meant by true OO and what are the advantages of this over the class/tem...
{ "language": "en", "url": "https://stackoverflow.com/questions/250062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Web developers - Is it better to do development on your local machine or on a remote host? What are the pro/cons of doing web development on your local machine rather than on a centralized development server? For those that do dev on your local machine, how do you keep an updated db architecture for local developmen...
{ "language": "en", "url": "https://stackoverflow.com/questions/250063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: LINQ with SQLite (linqtosql) I have a small project that require a storage (I choose SQLite) and I got good result with the ADO DLL for .Net for Sqlite. After the Install, I noticed that it contain a SQLLinq.dll. Before investigating too much effort, and because I haven't see any good example on the web, I would lik...
{ "language": "en", "url": "https://stackoverflow.com/questions/250071", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: How to check a date in classic asp I have a variable last_login and want to output a message if the last login was yesterday, today or elsewise output the date. The last two cases are clear but how can I check if a given date in classic asp was yesterday? I'm blockheaded right now... A: dateadd("d",-1,currentDate) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250077", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to check if a file exists in a makefile I have a makefile template to compile a single DLL (for a plugin system). The makefile of the user looks like this: EXTRA_SRCS=file1 file2 include makefile.in In the makefile.in I have: plugin.dll: plugin.os $(patsubst %,%.os,$(EXTRA_SRCS)) Where plugin.os is the main C+...
{ "language": "en", "url": "https://stackoverflow.com/questions/250082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How to read arbitrary number of values using std::copy? I'm trying to code opposite action to this: std::ostream outs; // properly initialized of course std::set<int> my_set; // ditto outs << my_set.size(); std::copy( my_set.begin(), my_set.end(), std::ostream_iterator<int>( outs ) ); it should be something like t...
{ "language": "en", "url": "https://stackoverflow.com/questions/250096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: SQL Server Management Studio 2008 Intellisense I just installed SQL Server Express 2008 because of intellisense feature. It worked at first but than it stopped working. Looking for the option to check and later consulting Google I have found that it looks like Microsoft disabled intellisense if you connect to SQL S...
{ "language": "en", "url": "https://stackoverflow.com/questions/250127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Difference between two declarations involving a pointer and an array What is the difference between int *a[3] and int (*a)[3]? A: Alternatively, you can use cdecl, which outputs the meaning of variable declarations in English. cdecl> explain int*a[3] declare a as array 3 of pointer to int cdecl> explain int (*a) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Refactoring static method / static field for Testing I have the following legacy code: public class MyLegacyClass { private static final String jndiName = "java:comp/env/jdbc/LegacyDataSource" public static SomeLegacyClass doSomeLegacyStuff(SomeOtherLegacyClass legacyObj) { // do stuff using jndi...
{ "language": "en", "url": "https://stackoverflow.com/questions/250137", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Lua as a general-purpose scripting language? When I see Lua, the only thing I ever read is "great for embedding", "fast", "lightweight" and more often than anything else: "World of Warcraft" or in short "WoW". Why is it limited to embedding the whole thing into another application? Why not write general-purpose scri...
{ "language": "en", "url": "https://stackoverflow.com/questions/250151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: CrmImpersonator and IFD I have an asp.net page which works fine for internal calls to the services, however when used on an externally facing site I just cannot get it to function at all. The CRMImpersonator works ok when accessed internally but when using the IFD interface all I get is a message saying 'Microsoft.C...
{ "language": "en", "url": "https://stackoverflow.com/questions/250152", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Should members of an object be automatically set in the class? When you have a complex property, should you instantiate it or leave it to the user to instantiate it? For example (C#) A) class Xyz{ List<String> Names {get; set;} } When I try to use, I have to set it. ... Xyz xyz = new Xyz(); xyz.Name = new Li...
{ "language": "en", "url": "https://stackoverflow.com/questions/250157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: NoClassDefFoundError while trying to run my jar with java.exe -jar...what's wrong? I have an application that I'm trying to wrap into a jar for easier deployment. The application compiles and runs fine (in a Windows cmd window) when run as a set of classes reachable from the CLASSPATH. But when I jar up my classes...
{ "language": "en", "url": "https://stackoverflow.com/questions/250166", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "70" }
Q: Writing my own Auto Updater When writing my own auto updater, is there a general framework that I should be following? A while ago I was reading up on how one should create a 'boot strapper' that will load first before the main application (since a running appilation can't be updated due to file locks etc.) So any t...
{ "language": "en", "url": "https://stackoverflow.com/questions/250175", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Source control/management of implementation of an existing open source project I'm currently installing and configuring an open source project on a test server. I've been well trained to use source control, and I want to make sure everything I do is managed properly (both for me, the sole dev/admin, and for future m...
{ "language": "en", "url": "https://stackoverflow.com/questions/250189", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Integer math in c# I have a menu of product brands that I want to split over 4 columns. So if I have 39 brands, then I want the maximum item count for each column to be 10 (with a single gap in the last column. Here's how I'm calculating the item count for a column (using C#): int ItemCount = Convert.ToInt32(Math....
{ "language": "en", "url": "https://stackoverflow.com/questions/250191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: xsltproc command line parameters using stringparam I am attempting to compose a style sheet that, given an XML input (obviously) and a parameter that specifies a "target", will produce a list of commands that match that target. Here is the style sheet as written: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="htt...
{ "language": "en", "url": "https://stackoverflow.com/questions/250197", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Hosting the WCF Service in windows service How to host the WCF service in windows service? Thanks Sekar A: I thought this article did a pretty good job of covering the steps required: WCF Link To summarize: * *To start with you need to create a new visual studio project of the type "Windows Service". *Next to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I optimize this Google App Engine code? I'm relatively new to the Python world, but this seems very straight forward. Google is yelling at me that this code needs to be optimized: class AddLinks(webapp.RequestHandler): def post(self): # Hash the textarea input to generate pseudo-unique value ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Checking for LAN environment and Cancel check I am updating a VBA program (excel). At startup the program checks if it can find a directory which is on the office file server using: FileSystemObject.FolderExists("\\servername\path") If this is not found the program switches to offline mode and saves its output to t...
{ "language": "en", "url": "https://stackoverflow.com/questions/250214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Popup detection before user logs in Is there a good way to determine if a person has a popup blocker enabled? I need to maintain a web application that unfortunately has tons of popups throughout it and I need to check if the user has popup blockers enabled. The only way I've found to do this is to open a window fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/250216", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Are there any good professional associations for IT Managers/Programmers? Are there any good professional associations for IT Managers that I could join and network with other managers to share ideas and information? A: Association for Computing Machinery (ACM) A: Chartered IT Professional http://www.bcs.org/serve...
{ "language": "en", "url": "https://stackoverflow.com/questions/250218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to get function to fire when buttonless form is submitted I have a page with many forms on it. could be 1..200. None of these forms have buttons and they are built programatically. I am using jquery to submit all the forms that are checked. function FakeName() { $("input:checked").parent("form"...
{ "language": "en", "url": "https://stackoverflow.com/questions/250228", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: sending mail with php & escaping hotmails junk folder I have been trying to get PEAR::mail to successfully deliver emails to hotmail users without being flagged as SPAM and ending up in the junk folder, i have no problems with yahoo/gmail only with hotmail. google suggested that this is a common problem with hotmail...
{ "language": "en", "url": "https://stackoverflow.com/questions/250234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Collapsing a git repository's history We have a git project which has quite a big history. Specifically, early in the project there were quite a lot of binary resource files in the project, these have now been removed as they're effectively external resources. However, the size of our repository is >200MB (the total...
{ "language": "en", "url": "https://stackoverflow.com/questions/250238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "86" }
Q: C# 2.0 Threading Question (anonymous methods) I have a simple application with the following code: FileInfo[] files = (new DirectoryInfo(initialDirectory)).GetFiles(); List<Thread> threads = new List<Thread>(files.Length); foreach (FileInfo f in files) { Thread t = new Thread(delegate() { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250244", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: .NET base type cannot be serialized by WCF I'm writing a WCF service and want to expose some custom configuration elements (e.g. Custom ConfigurationSection and ConnectionStringSettings) so that I can modify the service's configuration. One of my custom configuration elements inherits from System.Configuration.Conf...
{ "language": "en", "url": "https://stackoverflow.com/questions/250255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: JavaScript switch statement I have problem in some JavaScript that I am writing where the Switch statement does not seem to be working as expected. switch (msg.ResultType) { case 0: $('#txtConsole').val("Some Val 0"); break; case 1: $('#txtConsole').val("Some Val 1"); break; case 2: $('#txt...
{ "language": "en", "url": "https://stackoverflow.com/questions/250256", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Python Regex - How to Get Positions and Values of Matches How can I get the start and end positions of all matches using the re module? For example given the pattern r'[a-z]' and the string 'a1b2c3d4' I'd want to get the positions where it finds each letter. Ideally, I'd like to get the text of the match back too. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250271", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "159" }
Q: How to scp in Python? What's the most pythonic way to scp a file in Python? The only route I'm aware of is os.system('scp "%s" "%s:%s"' % (localfile, remotehost, remotefile) ) which is a hack, and which doesn't work outside Linux-like systems, and which needs help from the Pexpect module to avoid password prompts...
{ "language": "en", "url": "https://stackoverflow.com/questions/250283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "208" }
Q: Best practices: Many small functions/methods, or bigger functions with logical process components inline? Is it better to write many small methods (or functions), or to simply write the logic/code of those small processes right into the place where you would have called the small method? What about breaking off cod...
{ "language": "en", "url": "https://stackoverflow.com/questions/250284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: When to create a new SQL Server Index? Obviously (methinks), creating an index on a BIT column is unnecessary. However, if you had a column that you need to search in which every value is likely unique, like BlogPost or StreetAddress or something, then an index seems appropriate (again, methinks). But what's the cut...
{ "language": "en", "url": "https://stackoverflow.com/questions/250289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Parsing HTML Fragments What's the best way to parse fragments of HTML in C#? For context, I've inherited an application that uses a great deal of composite controls, which is fine, but a good deal of the controls are rendered using a long sequence of literal controls, which is fairly terrifying. I'm trying to get th...
{ "language": "en", "url": "https://stackoverflow.com/questions/250292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Editing the Registry with VBScript on Vista A VBScript cannot edit the registry by default on Vista. How do I get elevation (even if the user has to do something when they run the script) so that the script can edit the registry? The error is: --------------------------- Windows Script Host ------------------------...
{ "language": "en", "url": "https://stackoverflow.com/questions/250304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I dynamically alter the Java LAF UIDefaults? I'm working on cusomizing a Swing application by dynamically altering the UIDefaults. The end goal is to alter many of them (colors, fonts, sizes, borders, etc) and save the result on a per user basis. While it may give the application some non-standard looks, the...
{ "language": "en", "url": "https://stackoverflow.com/questions/250313", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: use php to show mysql data I am wondering what the best way is using php to obtain a list of all the rows in the database, and when clicking on a row show the information in more detail, such as a related image etc. Should I use frames to do this? Are there good examples of this somewhere? Edit: I need much simpler ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250324", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: AutoUpdater: 56K dialup connection, what normally is the upload speed? I'm building a auto updater and I need to know what kind of upload speeds people get on a 56K modem? A: Theoretically 33.6 kbit/s upload = 4.2 kB/s[1]. From own experience, I would say half of that :) [1] http://en.wikipedia.org/wiki/ITU-T_V-Ser...
{ "language": "en", "url": "https://stackoverflow.com/questions/250332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using SPSite from 32bit application to access 64bit SharePoint I've created a batch job that running in 32bit mode as it using 32bit COM objectes, this need to connect to SharePoint to make updates to list. It works in my development environment as it is full 32bit. But in my test and prodution environment we use 64...
{ "language": "en", "url": "https://stackoverflow.com/questions/250335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Internet explorer creates horizontal scrollbar for vertical scrollbar's width A div, containing a table has the following CSS styling: #formulaAlts { float: right; height: 200px; overflow: auto; } This makes it so that when the table is >200px, a scrollbar appears only for the table and the other ele...
{ "language": "en", "url": "https://stackoverflow.com/questions/250353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: rearrange data If I have a list of data in a text file seperated by a new line, is there a way to append something to the start, then the data, then append something else then the data again? EG a field X would become new X = X; Can you do this with bash or sed or just unix tools like cut? EDIT: I am trying to get "...
{ "language": "en", "url": "https://stackoverflow.com/questions/250354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Query optimization techniques? How to optimize queries which are already written? A: Use EXPLAIN to see what's going on - what indexes are being used and so on. A: If you can not change the them: Indexes and statistics. So you don't optimize the query but their execution plan. A: If you can't change the query the...
{ "language": "en", "url": "https://stackoverflow.com/questions/250355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Truncate a string without ending in the middle of a word I am looking for a way to truncate a string in Python that will not cut off the string in the middle of a word. For example: Original: "This is really awesome." "Dumb" truncate: "This is real..." "Smart" truncate: "This is really..." I'm looking ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: What would you choose for your data layer today, Linq or Subsonic? We are ready to start a brand new project at work, no legacy code. We did use Subsonic in the past and we pretty happy with it. But that was before Linq. Has anyone had to face this same issue (Linq x Subsonic)? What was your decision? What were the...
{ "language": "en", "url": "https://stackoverflow.com/questions/250369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I control the amount of JavaScript Ajax Control Toolkit spits out? With the Ajax Control Toolkit, one can easily drag and drop all types of great extender onto controls, but they register a boatload of JavaScript to do it. * *How do I control this? *If the ScriptManager is in the MasterPage, is there a...
{ "language": "en", "url": "https://stackoverflow.com/questions/250374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: "is_logged_in" templatetag does not render for some reason, templatetags do not render in templates for django admin. with this snippet from: http://docs.djangoproject.com/en/dev/ref/templates/api/?from=olddocs#shortcut-for-simple-tags {% if is_logged_in %}Thanks for logging in!{% else %}Please log in.{% endif %} w...
{ "language": "en", "url": "https://stackoverflow.com/questions/250375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Are LINQ expression trees Turing complete? As they are in .Net 3.5. I know they are in 4.0, as that's what the DLR works with, but I'm interested in the version we have now. A: Without defining the thing that will execute the tree, we don't know. In the CLR's own interpretation (when you compile them into delegates...
{ "language": "en", "url": "https://stackoverflow.com/questions/250377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Can source code examples be kept in a SQL database while retaining all formatting? If so Can source code examples be kept in a SQL database while retaining all formatting (tabs, newlines, etc.)? If so what data type would be used? A: Yes, use a TEXT type (or MEDIUMTEXT or LONGTEXT - you get the idea) A: A BLOB ty...
{ "language": "en", "url": "https://stackoverflow.com/questions/250378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does anyone know of any C/C++/C# code libraries that do audio synthesizer emulation? I'm trying to write a software synthesizer that recreates the sounds made by classic synthesizers like the Moog and the DX7. Does anyone know of any code resources for something like this? Thanks. A: CCRMA at Stanford can be a go...
{ "language": "en", "url": "https://stackoverflow.com/questions/250394", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How to specify relations using SQLAlchemy declarative syntax? I can't find any proper documentation on how to specify relations using the declarative syntax of SQLAlchemy.. Is it unsupported? That is, should I use the "traditional" syntax? I am looking for a way to specify relations at a higher level, avoiding havin...
{ "language": "en", "url": "https://stackoverflow.com/questions/250398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Rules Engine - pros and cons I'm auditing a project that uses what is called a Rules Engine. In short, it's a way to externalize business logic from application code. This concept is entirely new to me and I'm pretty skeptical about it. After hearing people talk about Anemic Domain Models for the past few years, I'...
{ "language": "en", "url": "https://stackoverflow.com/questions/250403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "79" }
Q: Where does Console.WriteLine go in Debug? I found this question, but what I want to know is different - does the output from Console.WriteLine go anywhere when debugging? I know that for it to go to the output window I should should Debug.WriteLine() or other methods, but where does the standard Console.WriteLine() ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: How do I implement text fields with autocomplete for habtm fields? I tried the example from Rails Cookbook and managed to get it to work. However the text_field_with_auto_complete works only for one value. class Expense < ActiveRecord::Base has_and_belongs_to_many :categories end In the New Expense View rhtml <%=...
{ "language": "en", "url": "https://stackoverflow.com/questions/250408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is asp.net session information stored in a cookie? If I write Session["asdf"] = 234; In my asp.net web app, does this mean the client will have a cookie stored on their browser? A: Session variables are kept on the server, but the user will have a cookie that identifies his session. A: There is a SessionID stored ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250410", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Where can I write data to on Windows Vista using any account and be viewable from all other accounts? I need to write some registration data (unique computer number, and corresponding activation code). The Computer Number needs to be visible from other programs and all accounts ({Admin|Non Admin} with User Access Co...
{ "language": "en", "url": "https://stackoverflow.com/questions/250415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Visual Studio Macro - Code Gen Language I am writing a macro for Visual studio that will generate some code. I would like for the macro to generate for both C# and VB, is there a way to determine what language is being used in the active (current) document? A: Have you considered using T4? T4 is a code generator bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/250421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the correct naming notation for classes, functions, variables etc in c#? I'm a web developer with no formal computing background behind me, I've been writing code now some years now, but every time I need to create a new class / function / variable, I spend about two minutes just deciding on a name and then ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Should return values and arguments for public methods only be types from within the same assembly? I am wondering what are the best practices for public methods and their return values. Is it ok to return types from referenced assemblies or should I make sure that all the parameters as well as return values are all ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I load a COM oject from a JSP page? I am developing a JSP application and am being forced to load a COM object. Can such a thing can be done? If yes, how? A: It is possible using a COM bridge like JACOB. JACOB is a JAVA-COM Bridge that allows you to call COM Automation components from Java. It uses JNI to m...
{ "language": "en", "url": "https://stackoverflow.com/questions/250434", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Best practices for merging assemblies? I am wondering what are the heuristics when creating releases of libraries to be included in other projects in relation to dependencies and if I should include them or not. My problem is the following: I have a CommonUtilities library that provides as the name implies a set of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: ASP.NET Ajax: close window after Ajax call? I'm using ASP.NET Ajax. How can I tell the browser to close the current window after the server call finishes (server-side code)? I managed to do this using the ASP.NET Ajax's ScriptManager method "RegisterDataItem" in the server method (inside a button click handler): sm....
{ "language": "en", "url": "https://stackoverflow.com/questions/250450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Inversion of Control with .net It's rare that I hear someone using Inversion of Control (Ioc) principle with .Net. I have some friends that work with Java that use a lot more Ioc with Spring and PicoContainer. I understand the principle of removing dependencies from your code... but I have a doubt that it's so much ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to use variables in a JQuery call I am trying to function doRow(rowNum) { $.ajax({ url: "z.html", cache: false, success: function(html){ $('#result + rowNum + "'").append(html); } }); This does not seem to work. I also want to pass variables to data attribute when I get that far. A: Try this: f...
{ "language": "en", "url": "https://stackoverflow.com/questions/250463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Why call SqlClient.SqlDataReader Close() method anyway? Is the SqlClient.SqlDataReader a .NET managed object or not? Why do we have to call the Close() method explicitly close an open connection? Shouldn't running out of scope for such an object automatically close this? Shouldn't garbage collector clean it up anywa...
{ "language": "en", "url": "https://stackoverflow.com/questions/250468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Database Driven Front End Controller / Page Management Good or Bad? I am currently working within a custom framework that uses the database to setup a Page Object which contains the information about Module, View, Controller, etc which is used by a Front Controller to handle routing and the like within an MVC (obvio...
{ "language": "en", "url": "https://stackoverflow.com/questions/250469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Single instance Amazon EC2 We're running a lightweight web app on a single EC2 server instance, which is fine for our needs, but we're wondering about monitoring and restarting it if it goes down. We have a separate non-Amazon server we'd like to use to monitor the EC2 and start a fresh instance if necessary and shu...
{ "language": "en", "url": "https://stackoverflow.com/questions/250470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How does StackOverflow know when there are new answers to a question? If this question has already been asked I appologies, please point me in the right direction. I was wondering if anyone has any insight into how StackOverflow pops up the "n new answers have been posted, load new answers" thing at the top of a que...
{ "language": "en", "url": "https://stackoverflow.com/questions/250473", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: What the best way to access the database inside a class in PHP? I have a session class that needs to store session information in a MySQL database. Obviously I will need to query the database in the methods of this class. In general I may need to connect more than one database simultaneously and may or may not be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250491", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: VB.NET: Are events raised even if there are no event handlers? I have a class that downloads, examines and saves some large XML files. Sometimes I want the UI to tell me what's going on, but sometimes I will use the class and ignore the events. So I have placed lines of code like this in a dozen places: RaiseEvent R...
{ "language": "en", "url": "https://stackoverflow.com/questions/250494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Excel cannot enable references / missing functions I have a working excel workbook that has VBA code and macros to help in data input. I use a calendar to capture dates and read data out of cells. The application works 100% on my machine (application developed in 2007 but saved as a .XLS – 97/2000 for compatibility ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Besides URL rewriting, what options are available for maintaining sessions without using cookies? I've seen various options for URL rewriting here on Stack Overflow, and other places on the web, but was curious to see if there were other options. A: This is speculation, as Cookies and URL Rewriting are the big two,...
{ "language": "en", "url": "https://stackoverflow.com/questions/250501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best way to create a search function ASP.NET and SQL server I have an SQL database with multiple tables, and I am working on creating a searching feature. Other than having multiple queries for the different tables, is there a different way to go about said searching function? I should probably add that a lot of m...
{ "language": "en", "url": "https://stackoverflow.com/questions/250503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Implementing Dispose() with class derived from System.ComponentModel.Component I made a class that derives from Component: public class MyComponent: System.ComponentModel.Component { } I saw that Visual Studio put this code in for me: protected override void Dispose(bool disposing) { try { if (dis...
{ "language": "en", "url": "https://stackoverflow.com/questions/250506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: VBA SQL Query Table Error I am trying to pull data from an ACD call data system, Nortel Contact Center 6.0 to be exact, and if you use that particular system what I am trying to capture is the daily call by call data. However when I use this code (sCW is a common word string that equals eCallByCallStat and sDate i...
{ "language": "en", "url": "https://stackoverflow.com/questions/250508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I Suppress "PL/SQL procedure successfully completed" message in sqlplus? Is there a way that you can have SERVEROUTPUT set to ON in sqlplus but somehow repress the message "PL/SQL procedure successfully completed" that is automatically generated upon completed execution of a plsql procedure? A: Use the comma...
{ "language": "en", "url": "https://stackoverflow.com/questions/250509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Java SE 6 vs. JRE 1.6 vs. JDK 1.6 - What do these mean? I see many different Java terms floating around. I need to install the JDK 1.6. It was my understanding that Java 6 == Java 1.6. However, when I install Java SE 6, I get a JVM that reports as version 11.0! Who can solve the madness? A: When you type "java ...
{ "language": "en", "url": "https://stackoverflow.com/questions/250517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "203" }
Q: Windows Service or SQL Job? I have an archiving process that basically deletes archived records after a set number of days. Is it better to write a scheduled SQL job or a windows service to accomplish the deletion? The database is mssql2005. Update: To speak to some of the answers below, this question is regardi...
{ "language": "en", "url": "https://stackoverflow.com/questions/250518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }