instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
What's the best way to get an array of all elements in an html document with a specific CSS class using javascript?
No javascript frameworks like jQuery allowed here right now, and I could loop all the elements and check them manually myself. I'm hoping for something a little more elegant.
| stackexchange/codereview |
If I have a VB.Net function that returns an Int32, but uses an unsigned int (UInt32) for calculations, etc. How can I convert a variable "MyUintVar32" with a value of say "3392918397 into a standard Int32 in VB.Net?
In c# if I just do a "return (int)(MyUintVar32);", I get -902048899, not an error.
I've tried several... | stackexchange/codereview |
I need to deal with Affiliate Tracking on our website.
In our .htaccess we have:
RewriteCond %{QUERY_STRING} affiliate=(.*)
RewriteRule ^(.*)$ $1? [NC,R,L,co=AFFID:%1:%{HTTP:Host}:7200:/]
Which creates a COOKIE called AFFID with the value of the URL Parameter affiliate.
But the Cookie is not for the whole domain, i.e... | stackexchange/codereview |
HI, I am new to the scrum methodology and looking for some help to get comfortable with the environment and wondering if there needs to be a bucket to track Developers and QA hours spent on deployments and bug fixes and retests. Seems like it could have major impact on the graph.
| stackexchange/codereview |
I have a program I've written in VB.NET 2005, it saves statistics in an XML file.
I use this program on multiple computers. I'd like to set up a webserver where I can upload my XML file, or just the data, and add it to the server ignoring duplicate entries already on the server.
What do I need for to learn for th... | stackexchange/codereview |
There are some fairly powerful tools like SIMBL or Airfoil/Instant Hijack which use code injection.
As far as I understand this, these tools inject their own code in other programs. This idea sounds dangerous to me as this seems to have the potential to make perfectly stable software fragile and "buggy". Also this seem... | stackexchange/codereview |
I am creating an installer for an ASP.Net website using WiX. How do you set the ASP.Net version in IIS using WiX?
| stackexchange/codereview |
I can do this:
$ find .
.
./b
./b/foo
./c
./c/foo
And this:
$ find . -type f -exec cat {} \;
This is in b.
This is in c.
But not this:
$ find . -type f -exec cat > out.txt {} \;
Why not?
| stackexchange/codereview |
Can anyone recommend a framework or basic technology to use to host a web service on a basic hosted web server?
I have data in a mySQL database that will be accessed by the web service.
| stackexchange/codereview |
Scrum is quite popular dev.process these days and often Project Manager suddenly gets new title (Scrum Master). However it should be not just a new title, but new habits and new paradigm. What are the bad habits of your Scrum master?
| stackexchange/codereview |
I am creating some build scripts that interact with Perforce and I would like to mark for delete a few files. What exactly is the P4 syntax using the command line?
| stackexchange/codereview |
When an Event is triggered by a user in IE, it is set to the window.event object. The only way to see what triggered the event is by accessing the window.event object (as far as I know)
This causes a problem in ASP.NET validators if an event is triggered programmatically, like when triggering an event through jQuery. I... | stackexchange/codereview |
At work we have 4 people working together on a few different projects. For each project we each have a local copy we work on and then there is a development, staging, and live deployment, along with any branches we have (we use subversion). Our database is MySQL.
So my question is, what is a good way to manage which re... | stackexchange/codereview |
I'm using a Form to show notifications (it appears at the bottom right of the screen), but when I show this form it steals the focus from the main Form. Is there a way to show this "notification" form without stealing focus?
| stackexchange/codereview |
I was just wondering if anyone knew of a good way that I could parse the file at the bottom of the post.
I have a database setup with the correct tables for each section eg Refferal Table,Caller Table,Location Table. Each table has the same columns that are show in the file below
I would really like something that is f... | stackexchange/codereview |
I'm pretty sure most of us are familiar with the concept of a project's requirements changing after it starts, this becomes more and more of an issue the less the client knows about how things work and the closer you work with them.
How then can I design a system (specifically a website but general advice will probably... | stackexchange/codereview |
I am writing an application in VB.NET 2008 that manages software deployment and I want to display a "deployment overview" grid.
The grid will be populated with the names of each application (top row) and the name of each workstation (1st column). The remaining cells will be populated according to whether the correspond... | stackexchange/codereview |
I have a Java client that calls a web service at the moment using the Http protocol.
When i try to use the Https protocol i keep getting this error
java.io.IOException: DerInputStream.getLength(): lengthTag=127, too big.
Any ideas what could be up?
Thanks
Damien
| stackexchange/codereview |
I have a client who is using one TFS project just for source control only and now wants to manage work items in a totally different TFS project, using a different process template, and intends to link changesets to work items across TFS projects.
I know that this is possible in TFS, but don't know what the limitations ... | stackexchange/codereview |
I have a VB 6 application and we are starting to port it over to C#. We have finished one of the screens and wanted to see if there was an incremental way of hosting the winform within VB to start to have the existing users get used to new screens. This is a migration strategy..
Any thoughts.
| stackexchange/codereview |
I want to get other process' argv like ps.
I'm using Mac OS X 10.4.11 running on Intel or PowerPC.
First, I read code of ps and man kvm, then I wrote some C code.
#include <kvm.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/sysctl.h>
#include <paths.h>
int
main(void) {
char errbuf[1024]... | stackexchange/codereview |
I want to return top 10 records from each section in one query. Can anyone help with how to do it? Section is one of the columns in the table.
Database is SQL Server 2005. I want to return the top 10 by date entered. Sections are business, local, and feature. For one particular date I want only the top (10) business... | stackexchange/codereview |
I've been looking for the answer for how to use BSWAP for lower 32-bit sub-register of 64-bit register. For example, 0x0123456789abcdef is inside RAX register, and I want to change it to 0x01234567efcdab89 with a single instruction (because of performance).
So I tried following inline function:
#define BSWAP(T) { \
... | stackexchange/codereview |
I'm using javax naming to connect to an LDAP database.
Is there a good way to check if a connection is still valid?
I'm looking for something really efficient here because it may need to be done often.
After some web searching all I have found is a suggestion to do a quick search, is there any more lightweight way?
/ma... | stackexchange/codereview |
I have two keyboards connected to my PC, is there any way to know what keyboard a key was pressed on in any language or framework?
| stackexchange/codereview |
In C# there is a method SetApartmentState in the class Thread.
How do I do the same thing in C++?
| stackexchange/codereview |
How can I find out the folder where the windows service .exe file is installed dynamically?
Path.GetFullPath(relativePath);
returns a path based on C:\WINDOWS\system32 directory.
However, the XmlDocument.Load(string filename) method appears to be working against relative path inside the directory where the service .ex... | stackexchange/codereview |
Is the F# is the future of programming languages? Is it right time to learn F# ? Any other languages in the market which is equivalent to F#?
| stackexchange/codereview |
The gcc -S option will generate assembly code in AT&T syntax, is there a way to generate files in Intel syntax? Or is there a way to convert between the two?
| stackexchange/codereview |
What implementations of the Prototype Pattern exist on the Java platform?
A prototype pattern is a creational design pattern used in software development when the type of objects to create is determined by a prototypical instance, which is cloned to produce new objects.
Prototype based programming:
Prototype-based ... | stackexchange/codereview |
I sometimes get the following exception for a custom control of mine:
XamlParseException occurred Unknown attribute Points in element SectionClickableArea [Line: 10 Position 16]
The stack trace:
{System.Windows.Markup.XamlParseException: Unknown attribute Points on element SectionClickableArea. [Line: 10 Position: 16]
... | stackexchange/codereview |
I'm working on designing the kernel (which I'm going to actually call the "core" just to be different, but its basically the same) for an OS I'm working on. The specifics of the OS itself are irrelevant if I can't get multi-tasking, memory management, and other basic things up and running, so I need to work on that fir... | stackexchange/codereview |
With the asp.net MVC framework the blogs of the team members (Rob Conery, Phil Haack etc) really helped me on my way and made me feel comfortable the development was going in the right direction.
Is there something similar for Silverlight?
-Edit:
I would like to mention that I would like to find members of the dev team... | stackexchange/codereview |
I have the following html
<div id="menu">
<ul class="horizMenu">
<li id="active"><a href="#" id="current">About</a></li>
<li><a href="#">Archive</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">Item four</a></li>
<li><a href="#">... | stackexchange/codereview |
I've a WEB application (with pure Java servlet) that have some heavy computational work, with database access, that can be done in asynchronous mode.
I'm planning to use a dedicated server to execute such batch jobs and I'm wondering which tools/techniques/protocols to use for communication between servlets in the WEB ... | stackexchange/codereview |
This question is related to another question which I asked yesterday!
List all links in web site
I think renaming all the .html files to .asp and changing the links is not good for SEP purposes. Some one told me that isapi plug-in can be used to redirect(301) all .html files to .asp files.
Can any one explain this fo... | stackexchange/codereview |
I sometimes have difficulties with other people who wish to solve a problem when they wish to skip the official interfaces and access underlying implementation details directly.
They argue that doing so will allow them to solve the problem more quickly. I argue that doing so will cause our architecture to become more ... | stackexchange/codereview |
I have an issue with trying to keep AR finders DRY in my application. I have created a blogging application which fetches all the related pages,posts,links,tags and categories for a blog when a user first views it. A sample show action for the Blog controller is shown below:
def show
#find blog by user name
@us... | stackexchange/codereview |
I mostly develop on Linux and meld is indispensable for me. However, when I'm on the road I use a MacBook (leopard) and I want to use the same set of tools as on my main development box, meld being one of them.
Although you shoud be able to install meld, I could not succeed with it. So... are there any alternatives tha... | stackexchange/codereview |
How can i map a date from a java object to a database with Hibernate? I try different approaches, but i am not happy with them. Why? Let me explain my issue. I have the following class [1] including the main method i invoke and with the following mapping [2]. The issue about this approach you can see, when you look at ... | stackexchange/codereview |
I just forgot the password. Can anyone help me how to get back the password.
| stackexchange/codereview |
Simple question that keeps bugging me.
Should I HTML encode user input right away and store the encoded contents in the database, or should I store the raw values and HTML encode when displaying?
Storing encoded data greatly reduces the risk of a developer forgetting to encode the data when it's being displayed. Howeve... | stackexchange/codereview |
My company requires me to use Outlook for my E-mail. Outlook does virtually nothing the way I want to do it and it frustrates me greatly. (I'm not trying to start a flame war here, it must do exactly what thousands of CEO's want it to do, but I'm not a CEO.)
I would like to be able to automatically extract the thousa... | stackexchange/codereview |
<div>
<h1>Title</h1>
<table>
...
</table>
</div>
Now, the
<h1>
has a margin: 0;
so it is at the top of the div. The height of the div is 300px.
However I'd like the table to be placed at the bottom of the div, eg. valign="bottom" but for the whole table.
| stackexchange/codereview |
I am just learning about app.config in respect of creating custom sections. I have that part working, it compiles and gets the information out as required but I get warnings about it could not find the schema information.
I have done a bit of googling and could not find a simple explanation of this situation.
The appr... | stackexchange/codereview |
Is it possible to somehow mark a System.Array as immutable. When put behind a public-get/private-set they can't be added to, since it requires re-allocation and re-assignment, but a consumer can still set any subscript they wish:
public class Immy
{
public string[] { get; private set; }
}
I thought the readonly k... | stackexchange/codereview |
I find print_r in PHP extremely useful, but wonder if there is anything remotely equivalent in Perl?
| stackexchange/codereview |
As far as I know Hibernate let's you configure entities and collections to be stored in a second-level cache.
When does Hibernate try to read these cached entities from the second-level cache and when does it hit the DB? Does Hibernate only read from the second-level cache when loading entities by calling Sesssion.get... | stackexchange/codereview |
Is there a way to Invoke an overloaded method using reflection in .NET (2.0). I have an application that dynamically instantiates classes that have been derived from a common base class. For compatibility purposes, this base class contains 2 methods of the same name, one with parameters, and one without. I need to c... | stackexchange/codereview |
I work with a lot of web applications that are driven by databases of varying complexity on the backend. Typically, there's an ORM layer separate from the business and presentation logic. This makes unit-testing the business logic fairly straightforward; things can be implemented in discrete modules and any data needed... | stackexchange/codereview |
Why do I need to specify various driver info when I call a remote EJB?
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=localhost:1099
Shouldn't we only need to specify the url/port and the EJB container should... | stackexchange/codereview |
In windows XP "FileInfo.LastWriteTime" will return the date a picture is taken - regardless of how many times the file is moved around in the filesystem.
In Vista it instead returns the date that the picture is copied from the camera.
How can I find out when a picture is taken in Vista? In windows explorer this field i... | stackexchange/codereview |
Right now, I have a SQL Query like this one:
SELECT X, Y FROM POINTS
It returns results like so:
X Y
----------
12 3
15 2
18 12
20 29
I'd like to return results all in one row, like this (suitable for using in an HTML <AREA> tag):
XYLIST
----------
12,3,15,2,18,12,20,29
Is there a way to do this using jus... | stackexchange/codereview |
Using groovy, would you expect better performance in terms of speed and memory overhead to read and query JSON vs XML?
| stackexchange/codereview |
I notice that there's frequently an aspnet_client folder under the standard IIS web folder structure. What is this used for? Is it needed?
| stackexchange/codereview |
Is there any way you can reset the visited status on links?
The scenario is this: On an intranet-site which naturally has a lot of links we want a link to have the status of "visited" for a set period of time only. I am therefore looking for a way to manipulate the visited status of links.
Is this doable? It should be ... | stackexchange/codereview |
In Model-View-Presenter pattern where should we write validations of user input.
| stackexchange/codereview |
Is there a way to take a backup file from SQL Server Express Edition and restore it into a standard SQL Server database? I tried to do it from Management Studio but it didn't recognize the file format.
| stackexchange/codereview |
In implementing my first significant script using jquery I needed to find a specific web-control on the page. Since I work with DotNetNuke, there is no guaranteeing the controls ClientID since the container control may change from site to site. I ended up using an attribute selector that looks for an ID that ends wit... | stackexchange/codereview |
I'm trying to debug an MSBuild task, and I know there is some way to write to the MSBuild log from within a custom task but I forget how.
| stackexchange/codereview |
I am debugging with breakpoints and I realize the assert call? I thought it was only for unit tests. What does it do more than breakpoint? Since I can breakpoint, why should I use Assert?
| stackexchange/codereview |
I am a new to the prefuse visualization toolkit and have a couple of general questions. For my purpose, I would like to perform an initial visualization using prefuse (graphview / graphml). Once rendered, upon a user click of a node, I would like to completely reload a new xml file for a new visualization. I want to... | stackexchange/codereview |
I am trying to learn CodeIgniter to use for a shopping site, but I am not having luck with the official doc. Does anyone know of anything that will help?
| stackexchange/codereview |
What exactly does null do performance and storage (space) wise in MySQL?
For example:
TINYINT: 1 Byte
TINYINT w/NULL 1 byte + somehow stores NULL?
| stackexchange/codereview |
I've been trying for a while now to write a unit test for a UserViewControl in ASP.NET MVC. I'd like to get to code that looks something like this:
[TestMethod]
public void HaveControlToDisplayThings()
{
var listControl = new ControlUnderTest();
var viewData = new ViewDataDictionary<IList<string>>(this.repo.Get... | stackexchange/codereview |
The client connects to the server using GenuineChannels (we are considering switching to DotNetRemoting). What I mean by find is obtain the IP and port number of a server to connect to.
It seems like a brute-force approach would be try every IP on the network try the active ports (not even sure if that's possible) but... | stackexchange/codereview |
Is there currently any easy way to set up a YAWS web server in front of Apache Tomcat Servlet container, similar to popular Apache httpd + Tomcat set up?
| stackexchange/codereview |
What's the best way for a common library to know what context - a.k.a. the calling app - it is in? I'm in a very controlled enterprise environment... is there a better way for the library to know what application it is getting called from than reading a setting in the config file? What do you use for this type of thing... | stackexchange/codereview |
How can polymorphism be described in an easy-to-understand way?
We can find a lot of information about the subject on the Internet and books, like in Type polymorphism. But let's try to make it as simple as we can.
| stackexchange/codereview |
I'm writing a web application in Python, intended for use by teachers and pupils in a classroom. It'll run from a hosted website, but I also want people to be able to download a self-contained application they can install locally if they want more performance or they simply won't have an Internet connection available i... | stackexchange/codereview |
I would like to know if there is a way to disable automatic loading of child records in nHibernate ( for one:many relationships ).
We can easily switch off lazy loading on properties but what I want is to disable any kind of automatic loading ( lazy and non lazy both ). I only want to load data via query ( i.e. HQL or ... | stackexchange/codereview |
I've been researching memory mapped files for a project and would appreciate any thoughts from people who have either used them before, or decided against using them, and why?
In particular, I am concerned about the following, in order of importance:
concurrency
random access
performance
ease of use
portability
| stackexchange/codereview |
How to sort list of values using only one variable?
| stackexchange/codereview |
In Eclipse PDT, Ctrl-Shift-F reformats code. However, it doesn't modify comments at all. Is there some way to reformat ragged multi-line comments to 80 characters per line (or whatever)?
i.e. convert
// We took a breezy excursion and
// gathered Jonquils from the river slopes. Sweet Marjoram grew
// in luxuriant
... | stackexchange/codereview |
I'm creating a UI that allows the user the select a date range, and tick or un-tick the days of the week that apply within the date range.
The date range controls are DateTimePickers, and the Days of the Week are CheckBoxes
Here's a mock-up of the UI:
From Date: (dtpDateFrom)
To Date: (dtpDateTo)
[y] Monday, [n] Tu... | stackexchange/codereview |
With the release of Visual Studio 2008, Microsoft implemented code-completion and IntelliSense support for JavaScript.
Unfortunately the support for JavaScript is shady at best--one of the major hassles being that when referencing external JavaScript files, the developer has to open and close JavaScript files to force ... | stackexchange/codereview |
There are a few tutorials on the web that describe consuming a Web Service using SQL Server 2005's CLR integration. For the most, the process seems pretty convoluted. I've run into several issues including the need to change my database's trust level, and using the sgen tool to create a static XmlSerializer assembly; a... | stackexchange/codereview |
Anyone know a QR decoder that works on mac or that might be online? I just need to decode one single image.
| stackexchange/codereview |
I saw this question asked about C# I would like an answer for PHP. I have some old code that has 4 pages of foreach loops and conditions which just makes it hard to read and follow. How would I make this more OO? I was thinking of using SPL Functions but don't fully understand whats involved yet.
| stackexchange/codereview |
I'm passing /file:c:\myfile.doc and I'm getting back "/file:c:\myfile.doc" instead of "C:\myfile.doc", could someone please advise where I am going wrong?
if (entry.ToUpper().IndexOf("FILE") != -1)
{
//override default log location
MyFileLocation = entry.Split(new... | stackexchange/codereview |
I'm looking for an easy to use, reasonably complete form validation solution for php. I recall using one years ago that used a few tags on the HMTL side then captured the OB to replace them with some pretty serious code. This feels slightly like overkill me, yet I'm not REALLY wanting to go nuts with my own right now... | stackexchange/codereview |
I have a form with a progress bar and a cancel button which is displayed as a process runs. The buttons "Cancel" property is set to true so pressing escape, cancels the process.
But, as the button is the only control on the form capable of taking the focus, should the user inadvertently press enter (or space bar) while... | stackexchange/codereview |
I would really like to use SpringSource dm Server, but our customer requires us to run our apps on their application server (Websphere). Is there a way to integrate SpringSource dm Server with other application servers? At least dm Server is build on OSGi, and many other application servers (including Websphere) are ba... | stackexchange/codereview |
I have a table that looks like that:
The rows are sorted by CLNDR_DATE DESC.
I need to find a CLNDR_DATE that corresponds to the highlighted row, in other words:
Find the topmost group of rows WHERE EFFECTIVE_DATE IS NOT NULL,
and return the CLNR_DATE of a last row of that group.
Normally I would open a cursor and cyc... | stackexchange/codereview |
I have a VB6.0 project with MDI parent and child form. Now I need to check spelling and grammar in few text boxes on that child form.
Please help with code example.
| stackexchange/codereview |
I need to ensure that any number of websites and services haven't bitten the dust. At the moment I rely on a simple 5 minute cronjob which uses curl and a file of urls to check that all the responses are correct (200 or rarely 301).
It all works on a basic level, I'm interested in more sophisticated open-source tools (... | stackexchange/codereview |
How do I limit os.walk to only return files in the directory I provide it?
def _dir_list(self, dir_name, whitelist):
outputList = []
for root, dirs, files in os.walk(dir_name):
for f in files:
if os.path.splitext(f)[1] in whitelist:
outputList.append(os.path.join(root, f))
... | stackexchange/codereview |
A very well known major drawback of using CGI is poor webserver performance. But how secure are CGI (mainly C/C++) based applications? Are there any major security holes in CGI architecture built on C/C++?
I would like to know some real life implementations of CGI based web apps/web sites. One that I know of is javara... | stackexchange/codereview |
For a right triangle specified by an equation aX + bY <= c on integers
I want to plot each pixel(*) in the triangle once and only once, in a pseudo-random order, and without storing a list of previously hit points.
I know how to do this with a line segment between 0 and x
pick a random point'o' along the line,
... | stackexchange/codereview |
Which of theese two alternatives do you find yourself using most often, and which is more "idiomatic"?
f arg (obj.DoStuff())
f arg <| obj.DoStuff()
| stackexchange/codereview |
I have the problem, that getting a ressource from my archive failed with a MalformedURLException: unknown protocol: jndi
The archive is a war file and is deployed into Websphere successfully.
When I try to access some files inside the archive via
jndi://server/context/filename
I get the MalformedURLException.
| stackexchange/codereview |
I would like to do remote deployment from my build machine onto a server. The remoting can be done via ssh commands from a script, but I would rather use phing and a deploy.xml file that would do the automation.
What alternatives do I have to do ssh (and also scp) tasks from within a phing build file?
| stackexchange/codereview |
I have some code which needs to ensure some data is in a mysql enum prior to insertion in the database. The cleanest way I've found of doing this is the following code:
sub enum_values {
my ( $self, $schema, $table, $column ) = @_;
# don't eval to let the error bubble up
my $columns = $schema->storage->db... | stackexchange/codereview |
I am writing some JNI code in C that I wish to test using cunit. In order to call the JNI functions, I need to create a valid JNIEnv struct.
Does anyone know if there is a mocking framework for such a purpose, or who can give me some pointers on how to create a mock JNIEnv struct myself?
| stackexchange/codereview |
I have an app with a large ListView which is terribly slow so I'm implementing VirtualMode. MSDN does not seem to cover how I would add and delete new items in the middle of the listview.
For example, the ListView has 1000 items (representing files on disk) and after the initial population of the ListView (by the Retri... | stackexchange/codereview |
There are multiple values I have been storing in ASP.NET configSections sections for each "module". I have been wondering if they even belong in these files at all.
The background stands at: These are multiple instances of the web application deployed. All use the same database but have their own settings.
I'm sure tha... | stackexchange/codereview |
On the client machine I need to be able to somehow detect which sites the current user are looking at right now.
I know the base URL of the sharepoint app, say sharepoint.thecompany.net but how the hack do I get the last requested url from the server?
I have hit a dead stop when trying to iterate the current processes ... | stackexchange/codereview |
I am currently using MediaWiki as a documentation website, with login authenticated by LDAP.
However, we have hit a snag. Certain pages contain sensitive information. For example links that say "click here to log in". I would like to be able to protect certain pages from being edited by just anyone. I would like to ... | stackexchange/codereview |
I continue to get this error:
Object '%s' cannot be renamed because the object participates in enforced dependencies
I need to find a script that will help me to find all the dependencies that there is with this table. I will need to drop them, rename, then bring them back.
SQL Server 2005
| stackexchange/codereview |
Is it quicker to make one trip to the database and bring back 3000+ plus rows, then manipulate them in .net & LINQ or quicker to make 6 calls bringing back a couple of 100 rows at a time?
| stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.