instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I want to setup my local development machine so that any requests for *.local are redirected to localhost. The idea is that as I develop multiple sites, I can just add vhosts to Apache called site1.local, site2.local etc, and have them all resolve to localhost, while Apache serves a different site accordingly.
I am on ... | stackexchange/codereview |
It's a part of larger code base, which forces -Werror on gcc. This warning is generated in a third party code that shouldn't be changed (and I actually know how to fix it), but I can disable specific warnings. This time man gcc failed me, so please, let some gcc master enlighten me. TIA.
| stackexchange/codereview |
I want to have my PHP application labeled with the revision number which it uses, but I don't want to use CruiseControl or update a file and upload it every time. How should I do it?
| stackexchange/codereview |
I am getting the following error when running a reporting services report.
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: XmlException
Exception message: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the Pr... | stackexchange/codereview |
Why does this javascript return 108 instead of 2008? it gets the day and month correct but not the year?
myDate = new Date();
year = myDate.getYear();
year = 108?
| stackexchange/codereview |
My domain (let's call it www.example.com) creates a cookie.
On another site (let's say, www.myspace.com), my domain is loaded within an iFrame.
On every browser (Firefox, Opera, Camino, Safari, etc...) except for Internet Explorer, I can access my own cookie. In IE, it doesn't give me access to the cookie from within t... | stackexchange/codereview |
What is the nest PHP thumbnailer/resizer class that preferably works on most shared hosts?
Clarification: I'm looking for a PHP class/wrapper (eg. phpThumb(), Asido), so I don't have to run GD or ImageMagick functions directly. I'm specifically looking for resizing and framing functions.
| stackexchange/codereview |
I know websphere does it, so there must be something that lets apache figure out what needs to go to the app server and what it can handle itself.
| stackexchange/codereview |
I am trying to write a cronjob controller, so I can call one website and have all modules cronjob.php executed. Now my problem is how do I do that?
Would curl be an option, so I also can count the errors and successes?
[Update]
I guess I have not explained it enough.
What I want to do is have one file which I can call... | stackexchange/codereview |
One title per answer.
| stackexchange/codereview |
I tried the Visual C# Kicks code for an alpha-blended form. This works (as soon as I remove the TransparencyKey property); that is, I can use the W3C's PNG alpha test image and see other windows underneath, but makes all controls on the form invisible. Presumably, they simply aren't painted, as OnPaint is overridden. I... | stackexchange/codereview |
I believe any programmer who has been dealing with database requests in a gui application has run into some or all of the following problems:
Your GUI freezes because you call
database layer from within the event
dispatch thread
When you have multiple windows/panels/jframes where user can start a db request your perfo... | stackexchange/codereview |
Like the title says: Can reflection give you the name of the currently executing method.
I'm inclined to guess not, because of the Heisenberg problem. How do you call a method that will tell you the current method without changing what the current method is? But I'm hoping someone can prove me wrong there.
Update:
... | stackexchange/codereview |
I'm considering supporting both Textile and Markdown on a current project. I would prefer not forcing users to choose one or the other. Is there a way to auto-detect which the user is using? How would you go about this? I'd like to find / develop both a JavaScript and a PHP solution so I can provide live previews as we... | stackexchange/codereview |
Anyone familiar with specific security issues in the current version of DotNetNuke?
(I've already checked out their site, securityfocus, etc...)
I've reopened the question, since my client developed their system using DotNetNuke - hence it is a programming question. I just need to know some issues regarding this platfo... | stackexchange/codereview |
I use several referenced tables with integer primary keys. Now I want to change ints to GUIDs leaving all references intact. What is the easiest way to do it?
Thank you!
Addition
I do understand the process in general, so I need more detailed advices, for example, how to fill new GUID column. Using default value newid(... | stackexchange/codereview |
For managing unit tests in Visual Studio, I use the Test List Editor. There's also a Test View which looks similar but more limited. When would I want to use the Test View as opposed to the Test List Editor or any of the other test windows?
| stackexchange/codereview |
My database is located in e.g. california.
My user table has all the user's timezone e.g. -0700 UTC
How can I adjust the time from my database server whenever I display a date to the user who lives in e.g. new york? UTC/GMT -4 hours
| stackexchange/codereview |
I've been impressed by the screencasts for Rails that demonstrate the built-in web server, and database to allow development and testing to occur on the local machine. How can I get an instance of Apache to execute a project directory as its DocumentRoot, and maybe serve up the files on port 8080 (or something similar)... | stackexchange/codereview |
I have a particular system on out network where we need to maintain a training installation. The system uses SQL Server 2000 as its database engine and I need to set up a system for refreshing the data in the training database with the data from the production database on a regular basis.
I want to use SSIS as we have ... | stackexchange/codereview |
I'm trying to get crawl to work on two separate farms I have but can't get it to work on either one. They both have two WFE's with an additional WFE configured as an Index server. There is one more server dedicated for Query and two clustered SQL 2005 back end servers for the database. I have unsuccessfully tried at... | stackexchange/codereview |
I'm building an installer for an application. The user gets to select a datasource they have configured and nominate what type of database it is. I want to confirm that the database type is indeed Oracle, and if possible, what version of Oracle they are running by sending a SQL statement to the datasource.
| stackexchange/codereview |
In the Flex framework a custom preloader can be used while the site is loading.
In the Adobe docs it specifies that 'the progress bar [preloader] is displayed if less than half of the application is downloaded after 700 milliseconds of downloading.'
However I ALWAYS want the preloader to appear instantly since I know t... | stackexchange/codereview |
How to encode video on the fly and send it trough the network from C#?
Can't find a suitable library. I need to encode in WMV and don't mind if the actual encoding is made in C++ as long as the library has a .NET assembly available.
Thanks
| stackexchange/codereview |
I'm generating a self-signed SSL certificate to protect my server's admin section, and I keep getting this message from OpenSSL:
unable to write 'random state'
What does this mean?
This is on an Ubuntu server. I have upgraded libssl to fix the recent security vulnerability.
| stackexchange/codereview |
I am trying to use the Google Maps API in a ColdFusion template that is a border type cflayoutarea container. However, the map simply doesn't show up:
<cfif isdefined("url.lat")>
<cfset lat="#url.lat#">
<cfset lng="#url.lng#">
</cfif>
<head>
<script src= "http://maps.google.com/maps?f... | stackexchange/codereview |
Are there any good tools to generate JavaScript? I remember in .NET, there was Script# - don't know its status today.
Anyone have experience with any tools?
| stackexchange/codereview |
I have a flash application running Flash 9 (CS3). Application is able to control the Softkeys when this flash application is loaded in the supported mobile device. But, the application doesn't have control when the same is embedded in HTML page and browsed via supported mobile device. Any ideas how to make this work... | stackexchange/codereview |
Simple question - I've got a bucketload of cruddy html pages to clean up and I'm looking for a open source or freeware script/utility to remove any junk and reformat them into nicely laid out consistent code. Any recommendations?
If it's relevant I generally manipulate HTML inside Dreamweaver - but by editing the code... | stackexchange/codereview |
I can get easily see what projects and dlls a single project references from within a Visual Studio .NET project.
Is there any application or use of reflection that can build me a full dependency tree that I can use to plot a graphical chart of dependencies?
| stackexchange/codereview |
In Sql Server 2000/2005, I have a few NT user groups that need to be granted access to hundreds of stored procedures.
Is there a nice easy way to do that?
| stackexchange/codereview |
I was writing a database handler class in PHP using the mysqli class and prepared statements. I was attempting to print out the result. It didn't work right off the bat so I decided to do some debugging. I tried to use the num_rows() method from the mysqli_statement class, but it kept returning 0. I decided to writ... | stackexchange/codereview |
I have an application that tracks high scores in a game.
I have a user_scores table that maps a user_id to a score.
I need to return the 5 highest scores, but only 1 high score for any specific user.
So if user X has the 5 highest scores on a purely numerical basis, I simply return the highest one and then the next 4 ... | stackexchange/codereview |
How do I capture the output of "%windir%/system32/pnputil.exe -e"?
(assume windows vista 32-bit)
Bonus for technical explanation of why the app normally writes output to the cmd shell, but when stdout and/or stderr are redirected then the app writes nothing to the console or to stdout/stderr?
C:\Windows\System32>PnPut... | stackexchange/codereview |
Does anyone know of a good example of how to expose a WCF service programatically without the use of a configuration file? I know the service object model is much richer now with WCF, so I know it's possible. I just have not seen an example of how to do so. Conversely, I would like to see how consuming without a config... | stackexchange/codereview |
In what scenarios is it better to use a struct vs a class in C++?
| stackexchange/codereview |
I have a windows laptop (thinkpad) and somewhat recently rediscovered emacs and the benefit that all those wacky shortcuts can be when the arrow keys are located somewhere near you right armpit.
I was discouraged after php-mode, css-mode, etc, under mmm-mode was inconsistent, buggy, and refused to properly interpret so... | stackexchange/codereview |
Let's suppose you deploy a network-attached appliances (small form factor PCs) in the field. You want to allow these to call home after being powered on, then be identified and activated by end users.
Our current plan involves the user entering the MAC address into an activation page on our web site. Later our software... | stackexchange/codereview |
A long time ago I had an apple ][ .
I remember the command call – 151
But I can not remember what it did ?
| stackexchange/codereview |
We are developing a Visual Basic 6.0 project. We have written a library, which we were testing using vbunit and vbmock. But soon found that the tests were not maintainable. So, we decided to write tests using MBunit. Now, we want to know the test coverage. How can we do it?
thanks
| stackexchange/codereview |
I've read in a couple of places that the desktop wallpaper can be set to an HTML document. Has anyone had any success changing it programmatically?
The following snippet of VB6 helps me set things up for BMPs but when I try to use it for HTML, I get a nice blue background and nothing else.
Dim reg As New StdRegistry
... | stackexchange/codereview |
By default data extracted by the GROUP BY clause is ordered as ascending.
How to change it to descending.
| stackexchange/codereview |
I would like to know where can I find the code which eclipse uses to display the forms in the plugin.xml file. In particular I am looking for the form layout used in the extension tab in the plugin.xml
| stackexchange/codereview |
I keep running into this problem when debugging JSP pages in OpenNMS. The Jetty wiki talks about keepGenerated (http://docs.codehaus.org/display/JETTY/KeepGenerated) in webdefault.xml but it seems unclear how this works in embedded setups.
| stackexchange/codereview |
Along the lines of my previous question, how can i join a list of strings into a string such that values get quoted cleanly. Something like:
['a', 'one "two" three', 'foo, bar', """both"'"""]
into:
a, 'one "two" three', "foo, bar", "both\"'"
I suspect that the csv module will come into play here, but i'm not sure how... | stackexchange/codereview |
In PostgreSQL, I can do something like this:
ALTER SEQUENCE serial RESTART WITH 0;
Is there an Oracle equivalent?
| stackexchange/codereview |
The system default polygon fill mode in current device context is ALTERNATE (as I've learned from the Petzold book on Windows programming) and this one is used in Polygon Win32 function unless you change the mode with SetPolyFillMode.
My question is:
Does the GDI+ Graphics::FillPolygon (without the FillMode parameter i... | stackexchange/codereview |
Why do we need an init() method in servlet? Can't we use the constructor to initialization?
| stackexchange/codereview |
I'm now in search for a Java Text to Speech (TTS) framework. During my investigations I've found several JSAPI1.0-(partially)-compatible frameworks listed on JSAPI Implementations page, as well as a pair of Java TTS frameworks which do not appear to follow JSAPI spec (Mary, Say-It-Now). I've also noted that currently n... | stackexchange/codereview |
How can I detect, using php, if the machine has oracle (oci8 and/or pdo_oci) installed?
I'm working on a PHP project where some developers, such as myself, have it installed, but there's little need for the themers to have it. How can I write a quick function to use in the code so that my themers are able to work on t... | stackexchange/codereview |
Here is the scenario:
I have a winforms application using NHibernate. When launched, I populate a DataGridView with the results of a NHibernate query. This part works fine. If I update a record in that list and flush the session, the update takes in the database. Upon closing the form after the update, I call a met... | stackexchange/codereview |
I'm using a lat/long SRID in my PostGIS database (-4326). I would like to find the nearest points to a given point in an efficient manner. I tried doing an
ORDER BY ST_Distance(point, ST_GeomFromText(?,-4326))
which gives me ok results in the lower 48 states, but up in Alaska it gives me garbage. Is there a way ... | stackexchange/codereview |
Microsoft has chosen to not release a 64-bit version of Jet, their database driver for Access. Does anyone know of a good alternative?
Here are the specific features that Jet supports that I need:
Multiple users can connect to database over a network.
Users can use Windows Explorer to copy the database while it is ope... | stackexchange/codereview |
I have a ASP.NET application running on a remote web server and I just started getting this error. I can't seem to reproduce it in my development environment:
Method not found: 'Void System.Collections.Generic.ICollection`1..ctor()'.
Could this be due to some misconfiguration of .NET Framework or IIS 6?
Update:
I dis... | stackexchange/codereview |
As per the title. For those who don't know, it's basically Ada for .Net.
| stackexchange/codereview |
One of the stated goals of the PureMVC framework is to avoid platform dependencies in order to be portable. Considering that because of language and API differences application code will always be heavily dependent on the platform, and that avoiding platform dependencies makes the framework reinvent the wheel and/or on... | stackexchange/codereview |
What are the differences in implementing interfaces implicitly and explicitly in C#?
When should you use implicit and when should you use explicit?
Are there any pros and/or cons to one or the other?
Microsoft's official guidelines (from first edition Framework Design Guidelines) states that using explicit implementat... | stackexchange/codereview |
Is it possible for a stand alone executable to generate a report and output it as PDF (or one of the other export options available from the report viewer) without displaying the ReportViewer control?
The report definition should be embedded in the executable and should not use the Reporting Services web service.
| stackexchange/codereview |
When retrieving a lookup code value from a table, some folks do this...
Dim dtLookupCode As New LookupCodeDataTable()
Dim taLookupCode AS New LookupCodeTableAdapter()
Dim strDescription As String
dtLookupCode = taLookupCode.GetDataByCodeAndValue("EmpStatus", "FULL")
strDescription = dtLookupCode.Item(0).Meaning
...ho... | stackexchange/codereview |
How do I preview a url using ajax? I have seen this done with search engine plug ins and would like to learn how to do this. Specifically, I would like to be able to mouse over a link and see the preview of the webpage using ajax.
| stackexchange/codereview |
I have video durations stored in HH:MM:SS format. I'd like to display it as HH hours, MM minutes, SS seconds. It shouldn't display hours if it's less than 1.
What would be the best approach?
| stackexchange/codereview |
Poppler is a classic example of something without documentation that you would prefer be documented. This question is language agnostic, just asking about the general idea..
In short, how do you make a PDF viewer control with poppler?
From what I can tell, you'd need to use poppler to render it to some surface, which s... | stackexchange/codereview |
I've been looking into report definition customization extensions (RDCE) in SQL2K8 recently and I've been at a loss to find much documentation or even chatter on the internet about it.
MSDN has a brief overview: http://msdn.microsoft.com/en-us/library/cc281022.aspx
And the sample report from this book http://www.amazon... | stackexchange/codereview |
I'm using a build script that calls Wise to create some install files. The problem is that the Wise license only allows it to be run under one particular user account, which is not the same account that my build script will run under. I know Windows has the runas command but this won't work for an automated script as t... | stackexchange/codereview |
I want to use the Django template engine in my (Python) code, but I'm not building a Django-based web site. How do I use it without having a settings.py file (and others) and having to set the DJANGO_SETTINGS_MODULE environment variable?
If I run the following code:
>>> import django.template
>>> from django.template ... | stackexchange/codereview |
Does anybody know a good tutorial about Squid plug-in development?
| stackexchange/codereview |
I am required to display a two dimensional numpy.array of int16 at 20fps or so. Using Matplotlib's imshow chokes on anything above 10fps. There obviously are some issues with scaling and interpolation. I should add that the dimensions of the array are not known, but will probably be around thirty by four hundred.
Thes... | stackexchange/codereview |
Inside a .NET 3.5 web app running impersonation I am trying to execute a process via:
var process = new Process
{ StartInfo =
{ CreateNoWindow = true,
FileName = "someFileName",
Domain = "someDomain",
Username = "som... | stackexchange/codereview |
I am 90% sure I saw this answer on stackoverflow before, in fact I had never seen the "int?" syntax before seeing it here, but no matter how I search I can't find the previous post, and it's driving me crazy.
It's possible that I've been eating the funny mushrooms by accident, but if I'm not, can someone please point o... | stackexchange/codereview |
Is it possible to throw an exception in a JSP without using scriptlet code?
| stackexchange/codereview |
I need your help in determining the best approach for analyzing industry-specific sentences (i.e. movie reviews) for "positive" vs "negative". I've seen libraries such as OpenNLP before, but it's too low-level - it just gives me the basic sentence composition; what I need is a higher-level structure:
- hopefully with w... | stackexchange/codereview |
Does anyone know how to modify an existing import specification in Microsoft Access 2007 or 2010? In older versions there used to be an Advanced button presented during the import wizard that allowed you to select and edit an existing specification. I no longer see this feature but hope that it still exists and has j... | stackexchange/codereview |
I need to consume an external web service from my VB6 program. I want to be able to deploy my program without the SOAP toolkit, if possible, but that's not a requirement. I do not have the web service source and I didn't create it. It is a vendor-provided service.
So outside of the SOAP toolkit, what is the best way to... | stackexchange/codereview |
After working with .NET's HttpWebRequest/Response objects, I'd rather shoot myself than use this to crawl through web sites. I'm looking for an existing .NET library that can fetch URLs, and give you the ability to follow links, extract/fill in/submit forms on the page, etc. Perl's LWP and WWW::Mechanize modules do t... | stackexchange/codereview |
I have an ASP.Net 2.0 web site, using the DotNetNuke framework (4.09), and it will not compile, but when I hit the site in a browser, it works. Even the parts that don't compile will work. How is IIS able to compile and run this site, when Visual Studio can't? Everything is the same in both places... I copied the entir... | stackexchange/codereview |
This is what my browser sent, when logging into some site:
POST http://www.some.site/login.php HTTP/1.0
User-Agent: Opera/8.26 (X2000; Linux i686; Z; en)
Host: www.some.site
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: en... | stackexchange/codereview |
I need to randomly fade my background images in and out.
It will be a timed function, like once every 5 seconds.
I need to do it with ASP.NET, Javascript, CSS or all three.
Please help me out here guys. Thank you.
| stackexchange/codereview |
How do you specify a target framework version for the csc.exe c# compiler via command-line invocation (e.g., no .csproj file and not going thru the MSBUILD engine)?
e.g, using the C# 3.0 csc.exe compiler, how do you compile to IL targeting the 2.0 .net framework?
| stackexchange/codereview |
We all know that commenting our code is an important part of coding style for making our code understandable to the next person who comes along, or even ourselves in 6 months or so.
However, sometimes a comment just doesn't cut the mustard. I'm not talking about obvious jokes or vented frustraton, I'm talking about co... | stackexchange/codereview |
For a project we're currently working on, we need a library of spoken words in many different languages.
Two options seem possible: text-to-speech or "real" recordings by native speakers. As the quality is important to us, we're thinking about going the latter path.
In order to create a prototype for our application,... | stackexchange/codereview |
Okay, so this probably sounds terribly nefarious, but I need such capabilities for my senior project. Essentially I'm tasked with writing something that will cut down outbound spam on a zombified pc through a system of packet interception and evaluation. We have a number of algorithms we'll use on the captured messages... | stackexchange/codereview |
My win32 C++ application frequently checks a file that normally resides on a network share [in our corporate network]. But if the computer isn't connected to a network, the application freezes for several minutes and the user usually has to end the process. How can I check if the file is accessible before I open it?
Ch... | stackexchange/codereview |
Does anyone know how to get the HTML out of an IFRAME I have tried several different ways:
document.getElementById('iframe01').contentDocument.body.innerHTML
document.frames['iframe01'].document.body.innerHTML
document.getElementById('iframe01').contentWindow.document.body.innerHTML
etc
| stackexchange/codereview |
I am building a java server that needs to scale. One of the servlets will be serving images stored in Amazon S3.
Recently under load, I ran out of memory in my VM and it was after I added the code to serve the images so I'm pretty sure that streaming larger servlet responses is causing my troubles.
My question is : is ... | stackexchange/codereview |
I am developing an application in using Ruby on Rails, mostly as an excuse to learn the language.
This is not intended to be a web-based application - and perhaps I have chosen the wrong language, but...
My understanding is, that in order to run an instance of this application on somebody else's computer, they would ne... | stackexchange/codereview |
In effect, if I have a class c and instances of $c1 and $c2
which might have different private variable amounts but all their public methods return the same values I would like to be able to check that $c1 == $c2?
Does anyone know an easy way to do this?
| stackexchange/codereview |
Is there a c# library which provides similar functionality to the Python PubSub library? I think it's kind of an Observer Pattern which allows me to subscribe for messages of a given topic instead of using events.
| stackexchange/codereview |
We are looking to do some heavy security requirements on our project, and we need to do a lot of encryption that is highly performant.
I think that I know that PKI is much slower and more complex than symmetric encryption, but I can't find the numbers to back up my feelings.
| stackexchange/codereview |
I am calling a WSDL web service from Python using SOAPpy. The call I need to make is to the method Auth_login. This has 2 arguments - the first, a string being the API key; the second, a custom type containing username and password. The custom type is called Auth_credentialsData which contains 2 values as stings - one ... | stackexchange/codereview |
From time to time I read that Fortran is or can be faster then C for heavy calculations. Is that really true? I must admit that I hardly know Fortran, but the Fortran code I have seen so far did not show that the language has features that C doesn't have.
If it is true, please tell me why. Please don't tell me what lan... | stackexchange/codereview |
Has anybody established a good naming convention for action in MVC? I was specifically looking at ASP.net MVC but it is a general question. For instance I have an action which displays the login screen (Login) and one which process the login request from that page (LoginTest). I'm not keen on the names and I have a ... | stackexchange/codereview |
I have an iPhone app that hides the status bar. However, my main view doesn't get any touch events when I tap in the status bar area. Is there something I can do to fix this?
Here are a few details of my app's setup (in case it matters):
It's an OpenGL-based application.
The app launches in landscape mode. However,... | stackexchange/codereview |
Sorry the title isn't more help. I have a database of media-file URLs that came from two sources:
(1) RSS feeds and (2) manual entries.
I want to find the ten most-recently added URLs, but a maximum of one from any feed. To simplify, table 'urls' has columns 'url, feed_id, timestamp'.
feed_id='' for any URL that was... | stackexchange/codereview |
Can anyone recommend a cheap and good RTF control for .Net 1.1 Windows development. It needs to be able to do print/preview and some basic text formatting, fonts etc but nothing too advanced.
Cheers
Andreas
| stackexchange/codereview |
What would be a good place to go to understand arrows? Ideally, I am just looking for some place with a concise definition with motivation from some good examples, something similar to Wadler's exposition on monads.
| stackexchange/codereview |
I've found the standard hashing function on VS2005 is painfully slow when trying to achieve high performance look ups. What are some good examples of fast and efficient hashing algorithms that should void most collisions?
| stackexchange/codereview |
Are there any good tools out there for automatically converting non-Java source code into Java source?
I'm not expecting something perfect, just to get the worst of the grunt work out of the way.
I guess there is a sliding scale of difficulty. C# should be relatively easy (so long as you ignore all the libraries). (wel... | stackexchange/codereview |
What all would be the requirements for the following scenario:
A GSM modem connected to a PC running
a web based (ASP.NET) application. In
the application the user selects a
phone number from a list of phone nos.
When he clicks on a button named the
PC should call the selected phone
number. When the person... | stackexchange/codereview |
After you've let the VS.NET (2008 in this case) wizard upgrade your solution, do you perform any manual steps to upgrade specific properties of your solution and projects? For instance, you have to go to each project and target a new version of the framework (from 2.0 to 3.5 in this case). Even after targeting a new ve... | stackexchange/codereview |
I'm not going to be too surprised if I get shot-down for asking a "non programming" question, but maybe somebody knows ...
I was zipping the contents of my subversion sandbox using WinXP's inbuilt "Send to Compressed (zipped) Folder" capability and was surprised to find that the .zip file created did not contain the .s... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.