instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
How does selenium work? Can you explain the internal working of it.
| stackexchange/codereview |
Ideally I'd like a way to enable the mouse wheel for scrolling in old compiled java runtime apps, but java code to explicitly utilise it for an individual app would suffice.
| stackexchange/codereview |
Folks, we all know that IP blacklisting doesn't work - spammers can come in through a proxy, plus, legitimate users might get affected... That said, blacklisting seems to me to be an efficient mechanism to stop a persistent attacker, given that the actual list of IP's is determined dynamically, based on application's f... | stackexchange/codereview |
I'm about to put a beta version of the site I'm working on up on the web. It needs to have a beta code to restrict access. The site is written in django.
I don't want to change the fundamental Auth system to accommodate a beta code, and I don't care particularly that the security of the beta code is iron-clad, just tha... | stackexchange/codereview |
When I am in a list and I press a letter to jump to the first entry that starts with that letter why does it leave that entry on the bottom of the visible entries? It should make the entry the top visable entry so that many entries that start with that letter can be seen.
In more concrete terms if I am selecting a stat... | stackexchange/codereview |
What is the most efficient way given to raise an integer to the power of another integer in C?
// 2^3
pow(2,3) == 8
// 5^5
pow(5,5) == 3125
| stackexchange/codereview |
Im running a ASP.NET Site where I have problems to find some JavaScript Errors just with manual testing.
Is there a possibility to catch all JavaScript Errors on the Clientside and log them on the Server i.e. in the EventLog (via Webservice or something like that)?
| stackexchange/codereview |
I have the following piece of code in my jsp :
<% pageContext.setAttribute("warnings",Globals.WARNING_MESSAGES); %>
<c:choose>
<c:when test="${requestScope[pageScope.warnings] or sessionScope[pageScope.warnings]}">
<html:errors header="warnings.header" footer="warnings.footer" prefix="warnings.prefix" suffi... | stackexchange/codereview |
I've got an XML document containing news stories, and the body element of a news story contains p tags amongst the plain text. When I use XSL to retrieve the body, e.g.
<xsl:value-of select="body" />
the p tags seem to get stripped out. I'm using Visual Studio 2005's implementation of XSL.
Does anyone have any ideas h... | stackexchange/codereview |
How can I consistently get the absolute, fully-qualified root or base url of the site regardless of whether the site is in a virtual directory and regardless of where my code is in the directory structure? I've tried every variable and function I can think of and haven't found a good way.
I want to be able to get the u... | stackexchange/codereview |
I was reading a MS Excel help article about pivotcache and wonder what they mean by OLE DB and ODBC sources
...You should use the CommandText
property instead of the SQL property,
which now exists primarily for
compatibility with earlier versions of
Microsoft Excel. If you use both
properties, the CommandTex... | stackexchange/codereview |
I am encountering very infrequent yet annoying SQL deadlocks on a .NET 2.0 webapp running on top of MS SQL Server 2005. In the past, we have been dealing with the SQL deadlocks in the very empirical way - basically tweaking the queries until it work.
Yet, I found this approach very unsatisfactory: time consuming and un... | stackexchange/codereview |
in Javascript, the following:
var test = '"the quick" "brown fox" "jumps over" "the lazy dog"';
var result = test.match(/".*?"/g);
alert(result);
yields "the quick","brown fox","jumps over","the lazy dog"
I want each matched element to be unquoted: the quick,brown fox,jumps over,the lazy dog
what regexp will do this?
| stackexchange/codereview |
Does anyone know of a Django 1.0 + postgresql + apache + mod_python VMware appliance? A "vanilla" Django 1.0 appliance where postgresql can be installed manually would also do.
| stackexchange/codereview |
Users of my web app need to edit and "save as" their reports and then execute and export them to PDF or Excel files.
I need to know if there is a designer (web) for simple reports (open source would be better). Reports are not complex: just data fields, master-detail, labels, simple formulas, lines, static images...
Is... | stackexchange/codereview |
I'm trying to get a sampling of what people think are the best sign-up forms. Good design, usability. Smart engineering. Helpful feedback.
| stackexchange/codereview |
I'm guessing I need to implement an NVelocityViewEngine and NVelocityView - but before I do I wanted to check to see if anyone has already done this.
I can't see anything in the trunk for MVCContrib.
I've already seen the post below - I'm looking specifically for something which works with Preview 5:
Testing ScottGu: ... | stackexchange/codereview |
In case you don't know of Phoenix, it's a compiler framework from Microsoft that's apparantly going to be the foundation of all their new compilers. It can read in code from CIL, x86, x64, and IA64; and emit code in x86, x64, IA64, or CIL.
Can I use it to transform a pure .Net app into a pure native app? By which I mea... | stackexchange/codereview |
I work in a Microsoft environment, so I can use my C# hammer on any nails I come across. That being said, what languages (compiled, interpreted, scripting, functional, any types!) complement knowing C#, and for what purposes? For example, I've moved a lot of script functionality away from compiled console apps and into... | stackexchange/codereview |
What is the difference between a method decorated with @staticmethod and one decorated with @classmethod?
| stackexchange/codereview |
Browsing to a dynamic web page built using Grails version 1.0.3 the console log shows the following errors for each page request:
[Fatal Error] :-1:-1: Premature end of file.
How do I stop this error from appearing for each request?
| stackexchange/codereview |
I have an existing Windows C++ application that links to ATL. I need to open an existing Excel file and access some properties. One of the things I need to do is determine if the user is currently viewing the Excel file.
We can assume that the user has Excel installed, although not sure which version.
What is the C++... | stackexchange/codereview |
What level of CPU usage should be considered high for SQL Server? ie 80% 90% 100%?
| stackexchange/codereview |
I am trying to get Haml to work with my Ruby on Rails project. I am new to Ruby on Rails and I really like it. However, when I attempt to add an aplication.html.haml or index.html.haml for a view, I just receive errors.
I am using NetBeans as my IDE.
| stackexchange/codereview |
Under what circumstances will the Win32 API function OleGetClipboard() fail and return CLIPBRD_E_CANT_OPEN?
More background: I am assisting with a Firefox bug fix. Details here:
bug 444800 - cannot retrieve image data from clipboard in lossless format
In the automated test that I helped write, we see that OleGetClipb... | stackexchange/codereview |
In SQL SERVER Is it possible to store data with carriage return in a table and then retrieve it back again with carriage return.
Eg:
insert into table values ('test1
test2
test3
test4');
When I retrieve it, I get the message in a line
test1 test2 test3 test4
The carriage return is treated as a single character... | stackexchange/codereview |
Supposing you have a form that collects and submits sensitive information and you want to ensure it is never accessed via insecure (non-HTTPS) means, how might you best go about enforcing that policy?
| stackexchange/codereview |
Is there ever a circumstance in which I would not want to use the AndAlso operator rather than the And operator? …or in which I would not want to use the OrElse operator rather than the Or operator?
| stackexchange/codereview |
Our server application is listening on a port, and after a period of time it no longer accepts incoming connections. (And while I'd love to solve this issue, it's not what I'm asking about here;)
The strange this is that when our app stops accepting connections on port 44044, so does IIS (on port 8080). Killing our a... | stackexchange/codereview |
What does it indicate to see a query that has a low cost in the explain plan but a high consistent gets count in autotrace? In this case the cost was in the 100's and the CR's were in the millions.
| stackexchange/codereview |
Since I'm not a huge fan of any of the current solutions for managing the resources and knowledge that I have, I was thinking about making my own solution, which will involve custom code as well as possible integration of FOSS solutions. I would start development on my local machine, but if I like it, how difficult wou... | stackexchange/codereview |
First off, let me start off that I am not a .net developer. The reason why I am asking this question is that we rolled out our REST-API and one of our first integration partners is a .net shop.
So basically we assumed that .net would provide some sort of wrapper to create JSON, but the developer in question created the... | stackexchange/codereview |
Is there a way to add assembly attributes to a Managed C++ assembly? In a typical C# project, there is usually a line of code in the AssemblyInfo.cs file like the following one:
[assembly: AssemblyTitle("Some Assembly")]
I have a private assembly attribute that I want to add (not one of the version attributes that coul... | stackexchange/codereview |
what is a good way to select a random element from a map? C++. It is my understanding that maps don't have random access iterators. The key is a long long and the map is sparsely populated.
| stackexchange/codereview |
I'm pulling my hair out on what should be an insanely simple problem. We are running WebSphere IHS (Apache) through an F5 BigIP. BigIP is doing the https translation for us. Our url (changed for web, not valid) is https://superniftyserver.com/lawson/portal.
When someone types in just that without the slash after por... | stackexchange/codereview |
I want to use modal pop-up windows in our web app in Ruby on Rails. Note that I don't want to create a new browser window, but a sub-window inside the existing webpage. We've tried things like TinyBox, but there are issues with returning error information from inside the controller. Any good method or tool that work... | stackexchange/codereview |
Does anyone know of any methods to create a file upload progress bar in PHP? I have often heard that it's impossible.
I have one idea, but not sure if it would work: have a normal file upload, but instead submit to an iframe. When this is submitted, store the file information (size and temp location) in the session. At... | stackexchange/codereview |
I want to log on to a server inside my program using Windows authentication of the current user logged in. I thought that perhaps I could use
System.Security.Principal.WindowsIdentity.GetCurrent().Name
but while that does give a name, I do not see how I can find out the password of the user to enter it.
| stackexchange/codereview |
LEt's say I want to have a subfolder called- http://www.foo.com/news/ but I actually want that news folder on a different server. I realize it can be done easily with subdomains, but I was really hoping for the subfolder thing.
Is it possible? How?
| stackexchange/codereview |
Does IPsec in Windows XP Sp3 support AES-256 encryption?
Update:
Windows IPsec FAQ says that it's not supported in Windows XP, but maybe they changed it in Service Pack 3?
http://www.microsoft.com/technet/network/ipsec/ipsecfaq.mspx
Question: Is Advanced Encryption Standard (AES) encryption supported?
origamigumby,... | stackexchange/codereview |
I saw this over on slashdot and realized if I could program in dns control into some of my apps it would make life a lot easier. Someone over there recommended dynect which apparently had a wonderful api. Unfortunately not a lot else was recomended. I don't know anything about managing dns servers I mostly work with th... | stackexchange/codereview |
Is there a way to have a file that is modified / touched whenever the WC is updated to a new revision? Or, as the second-best option, whenever svn update is executed?
Here's the motivation: I want to have the SVN revision number inside my executable. So I have to run SubWCRev as part of the build. The output file of Su... | stackexchange/codereview |
I'm looking to start developing for the web using Java - I have some basic Java knowledge, so that's not a problem, but I'm at a loss when it comes to deciphering the various technologies for use in web applications.
What options are available to me? How do they work? Are there any frameworks similar to Django/Ruby on ... | stackexchange/codereview |
What's the best way, using SQL, to check the maximum number of connections that is allowed for an Oracle database? In the end, I would like to show the current number of sessions and the total number allowed, e.g. "Currently, 23 out of 80 connections are used".
| stackexchange/codereview |
I've read and followed YUI's tutorial for subscribing to Menu events. I also looked through the API and bits of the code for Menu, MenuBar, and Custom Events, but the following refuses to work
// oMenuBar is a MenuBar instance with submenus
var buyMenu = oMenuBar.getSubmenus()[1];
// this works
buyMenu.subscribe('sho... | stackexchange/codereview |
I'm looking for the single biggest reason you are glad that you've already made the jump from SQL2000 to SQL2005.
| stackexchange/codereview |
What would be the best practice way to handle the caching of images using PHP.
The filename is currently stored in a MySQL database which is renamed to a GUID on upload, along with the original filename and alt tag.
When the image is put into the HTML pages it is done so using a url such as '/images/get/200x200/{guid}.... | stackexchange/codereview |
How do you enumerate the fields of a certificate help in a store. Specifically, I am trying to enumerate the fields of personal certificates issued to the logged on user.
| stackexchange/codereview |
I figured someone can answer the question generally but if anyone wants to get specific I am trying to use:
using System.Web.Security.SingleSignOn;
using System.Web.Security.SingleSignOn.Authorization;
I've googled my brains out and this is the closest answer I found:
"We discussed this offline, but it looks like the A... | stackexchange/codereview |
I know I can specify one for each form, or for the root form and then it'll cascade through to all of the children forms, but I'd like to have a way of overriding the default Java Coffee Cup for all forms even those I might forget.
Any suggestions?
| stackexchange/codereview |
We have a system where we want to prevent the same credit card number being registered for two different accounts. As we don't store the credit card number internally - just the last four digits and expiration date - we cannot simply compare credit card numbers and expiration dates.
Our current idea is to store a hash ... | stackexchange/codereview |
I'm writing an application which reads large arrays of floats and performs some simple operations with them. I'm using floats, because I thought it'd be faster than doubles, but after doing some research I've found that there's some confusion about this topic. Can anyone elaborate on this?
| stackexchange/codereview |
How do I limit the types of HTML that a user can input into a textbox? I'm running a small forum using some custom software that I'm beta testing, but I need to know how to limit the HTML input. Any suggestions?
| stackexchange/codereview |
What needs to be done to have your .NET application show up in Window's system tray as icon?
And how do you handle mousebutton clicks on said icon?
| stackexchange/codereview |
I can't make td "Date" to have fixed height. If there is less in Body section td Date element is bigger than it should be - even if I set Date height to 10% and Body height to 90%. Any suggestions?
<tr>
<td class="Author" rowspan="2">
<a href="#">Claude</a><br />
<a href="#"><img src="Users/4/Avatar.jpeg" sty... | stackexchange/codereview |
How would I upload a file to a webserver using c++ and MFC. We are not using .Net. Would I need to open a socket and do everything myself? If so, where is a good reference to follow?
| stackexchange/codereview |
Why isn't Visual Studio 2005 generating a serialization setting when I set the project setting "Generate Serialization Assembly" to "On"?
| stackexchange/codereview |
I am wanting to use the Facebox plugin for JQuery but am having a few issues getting it running how I want. The div that houses the facebox content is created outside of the tag so even though I am loading up some web controls none of them are firing back to the server.
Has anyone dealt with this that can give me som... | stackexchange/codereview |
I've got some code that resizes an image so I can get a scaled chunk of the center of the image - I use this to take a UIImage and return a small, square representation of an image, similar to what's seen in the album view of the Photos app. (I know I could use a UIImageView and adjust the crop mode to achieve the same... | stackexchange/codereview |
Can someone suggest some good automated test suite framework for Perl?
| stackexchange/codereview |
Our team has been experiencing a recurring problem with velocity templates. Upon rendering, some throw a RuntimeException with the message "Template.merge() failure - Unable to render Velocity Template, '/template.vm'". We have not been able to reproduce the problem and the documentation on the web is pretty insufficie... | stackexchange/codereview |
How can I check if an application is running from a batch (well cmd) file?
I need to not launch another instance if a program is already running. (I can't change the app to make it single instance only.)
Also the application could be running as any user.
| stackexchange/codereview |
While generating charts using RS 2008 betas, RC0 and such., I never specified any fonts for axis labels, legends etc. They were all rendered with the Arial font by default, which looked awesome. But as soon as we switched to RS 2008 final, the fonts got all messed up - they are rendered in some kind of bold console fon... | stackexchange/codereview |
I would like to replay soap message against my server. I've recorded a few messages and i've tampered with Timestamps, soapbodies etc and now I would like to see that my SecurityAssertions lites up like xmastrees. The deployed server will use clientcertificates and servercertifivcates for authentisation, and the whole ... | stackexchange/codereview |
I must admit that I am incredibly jealous of those developers who happen to live near active user groups (e.g. the ALT.NET guys in Austin). I often read blog posts and listen to podcasts that reference these in-person meetings and find myself wishing that I could sit in and participate as well. But it just isn't real... | stackexchange/codereview |
How do you show your clients/employers that you understood their requirements?
What do you recommend to use? Use-Case diagrams? Flow-Charts? Data-Flow-Diagrams? Decision Trees?
I'm not really asking for a very detailed answer. Just something simple to help me communicate with the person who wrote the requirements and t... | stackexchange/codereview |
Is it possible to call a JavaScript function from the IMG SRC tag to get an image url?
Like this:
<IMG SRC="GetImage()" />
<script language="javascript">
function GetImage() {return "imageName/imagePath.jpg"}
</script>
This is using .NET 2.0.
| stackexchange/codereview |
I have a database full of customer data. It's so big that it's really cumbersome to operate on, and I'd rather just slim it down to 10% of the customers, which is plenty for development. I have an awful lot of tables and I don't want to alter them all with "ON DELETE CASCADE", especially because this is a one-time de... | stackexchange/codereview |
I have a series of macros and toolbars that I developed for Word 2003. Now that my office is upgrading to Word 2007, I need to migrate them. The macros themselves migrate with zero effort, but the toolbars are a different issue. A random subset of the toolbars show up in the "Add-Ins" ribbon tab, but I haven't found... | stackexchange/codereview |
I have an array of characters that are Points and I want to take any character and be able to loop through that array and find the top 3 closest (using Point.distance) neighbors. Could anyone give me an idea of how to do this?
| stackexchange/codereview |
I need to parse a string like "February 12, 1981" as a Date. I use SimpleDateFormat. But if I do:
new SimpleDateFormat("MMMMM dd, yyyy").parse("February 12, 1981")
I get java.text.ParseException.
I tried to reduce it to see where the problem is. First:
new SimpleDateFormat("MMMMM").parse("February")
works. Then:
new ... | stackexchange/codereview |
After you start tracking the source of a bunch of open source software, how do you keep your code in sync? Run svn update every time you want to look at or play with the code?
It strikes me that it would be better to essentially start mirroring the code with (say) a cron job every night. Have people set up workflows to... | stackexchange/codereview |
I recently installed vim-enhanced , but I can't find any article/tutorial related to it.All I could find is a page that briefly describes it's new features , along with several RPM's to download .
What exactly does it have to offer to scripting languages that regular vi/vim can't ?
Thanks
| stackexchange/codereview |
What should I type on the Mac OS X terminal to run a script as root?
| stackexchange/codereview |
Is it possible to reset the alternate buffer in a vim session to what it was previously?
By alternate buffer, I mean the one that is referred to by #, i.e. the one that is displayed when you enter cntl-^.
Say I've got two files open main.c and other.c and :ls gives me:
1 %a "main.c" lines 27
2 # "... | stackexchange/codereview |
How can I to generate an RSS feed of Team Foundation Server commit messages?
In Visual Studio's Source Control Explorer, the "View History" option produces a nice GUI view. Likewise, the command line
tf history /recursive /stopafter:40 .
produces a nice GUI view. I'd like an RSS feed that would supply the same, or... | stackexchange/codereview |
I know that services like my.yahoo.com allow you to add content from RSS feeds to your personal page, but in general they are links which draw the user to the site which provided the feed. What are the legalities and implications of using RSS feeds as a data source for a site which repackages the data so as to be unre... | stackexchange/codereview |
I'm dealing with huge glassfish log files (in windows, eek!) and well ... Wordpad isn't cutting it.
Are there any tools out there that can handle these log files in a more intelligent manner? Functionality that would be welcome:
View all lines of a certain log level (info, warning, severe)
Show logs between two times... | stackexchange/codereview |
The maintenance problems that uninitialised locals cause (particularly pointers) will be obvious to anyone who has done a bit of c/c++ maintenance or enhancement, but I still see them and occasionally hear performance implications given as their justification.
It's easy to demonstrate in c that redundant initialisation... | stackexchange/codereview |
What are the key differences between Flash and Flex? I have over five years experience with flash and feel very comfortable developing with it and ActionScript3. I find myself more and more curious about Flex and want to know when it is best to use flash or flex. Also, is everything that can be done with MXML, able ... | stackexchange/codereview |
I recently inherited a small Java program that takes information from a large database, does some processing and produces a detailed image regarding the information. The original author wrote the code using a single thread, then later modified it to allow it to use multiple threads.
In the code he defines a constant;
... | stackexchange/codereview |
I'm thinking floats. For the record I'm also using NHibernate.
| stackexchange/codereview |
Could someone explain to me in simple terms the easiest way to change the indentation behavior of Vim based on the file type? For instance, if I open a Python file it should indent with 2 spaces, but if I open a Powershell script it should use 4 spaces.
| stackexchange/codereview |
I'd really like to get into some D3D coding, but I don't have the time lately to learn C++ for what will amount to a hobby project.
| stackexchange/codereview |
How can I know what encoding will be used by PHP when sending data to the browser? I.e. with the Cotent-Type header, for instance: iso-8859-1.
| stackexchange/codereview |
I'm making a request from an UpdatePanel that takes more then 90 seconds. I'm getting this timeout error:
Microsoft JScript runtime error:
Sys.WebForms.PageRequestManagerTimeoutException: The server request
timed out.
Does anyone know if there is a way to increase the amount of time before the call times out?
| stackexchange/codereview |
I am very new to the entity framework, so please bear with me...
How can I relate two objects from different contexts together?
The example below throws the following exception:
System.InvalidOperationException: The
relationship between the two objects
cannot be defined because they are
attached to different Obj... | stackexchange/codereview |
Probably a very stupid question but I can't figure how to rename an object in PowerPoint.. For example, all my Graphs are called by default "Graph 1" etc.
Could someone help me on that?
Thanks!
| stackexchange/codereview |
I need to, preferably in C# - but c++ will do, find a way to filter the list of printers in the windows print dialog for any windows printing.
I have come across WinAPIOverride and have figured I am going to have to write my own dll which overrides the method to get the printers list, then filter it and return it. I wo... | stackexchange/codereview |
I have compiled a CSS swf file which includes embedded skins for my Flex application. In our download product, this CSS works fine. On the web, a non-Flex container is loading the Flex application, and the CSS fails silently.
When the application is debugged, the following runtime error can be seen in the trace outpu... | stackexchange/codereview |
I have a LinkedList, where Entry has a member called id. I want to remove the Entry from the list where id matches a search value. What's the best way to do this? I don't want to use Remove(), because Entry.Equals will compare other members, and I only want to match on id. I'm hoping to do something kind of like th... | stackexchange/codereview |
What's the best way to write a simple frame-based expert system, which determines if object is relative to some group? It's a kind of lab work for Intelligent Systems course in university. Or are there any OpenSource projects to study it's realization?
| stackexchange/codereview |
How can I reset the @@FETCH_STATUS variable or set it to 0 in a stored procedure?
Also, can you bind FETCH_STATUS to a particular cursor?
| stackexchange/codereview |
I know how to generally move around in command mode, specifically, jumping to lines, etc. But what is the command to jump to the end of the line that I am currently on?
| stackexchange/codereview |
In this code I am debugging, I have this code snipit:
ddlExpYear.SelectedItem.Value.Substring(2).PadLeft(2, '0');
What does this return? I really can't run this too much as it is part of a live credit card application. The DropDownList as you could imagine from the name contains the 4-digit year.
UPDATE: Thanks everyo... | stackexchange/codereview |
I have seen a lot of C/C++ based solutions to this problem where we have to write a program that upon execution prints its own source.
some solutions --
http://www.cprogramming.com/challenges/solutions/self_print.html
Quine Page solution in many languages
There are many more solutions on the net, each different from t... | stackexchange/codereview |
How do I use the softkeys with a CDialog based application in windows mobile 6 via MFC?
I have a CDialog based Windows Mobile 6 (touchscreen) Professional app that I am workign on.
The default behavior of a CDialog based app in WM6 Professional is to not use any softkeys by default... I want to map the softkeys to "Can... | stackexchange/codereview |
I have a basic ActiveRecord model in which i have two fields that i would like to validate. The requirement is that at least one of the fields must have a value. Both can have values, but at least one needs a value.
How do i express this with
validates_presence_of
statements? For example:
validates_presence_of :main... | stackexchange/codereview |
How can I convert a Char[] (of any length) to a List ?
| stackexchange/codereview |
I've been using Remote Desktop Connection to get into a workstation. But in this environment, I cannot use the power options in Start Menu. I need an alternative way to shutdown or restart.
How do I control my computer's power state through the command line?
| stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.