unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Is there a way to get types/names of an unknown db query without executing it?
===
I have a web application where users enter arbitrary sql queries for later batch processing. We want to validate the syntax of the query without actually executing it. Some of the queries will take a long time, which is why we don't want to execute them. I'm using Oracle's dbms_sql.parse to do this.
However, I now have a situation where I need to know the number and type of the result set columns. Is there a way to do this without actually executing the query? That is, to have Oracle parse the query and tell me what the result datatypes/names will be returned when the query is actually executed? I'm using Oracle 10g and and it's a Java 1.5/Servlet 2.4 application. | 0 | [
2,
25,
80,
21,
161,
20,
164,
2551,
118,
7259,
18,
16,
40,
2562,
13,
9007,
25597,
366,
25836,
32,
60,
800,
3726,
3726,
31,
57,
21,
2741,
3010,
113,
3878,
2830,
17237,
4444,
255,
9386,
2829,
26,
138,
13064,
5511,
9,
95,
259,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Microsoft Access - Internal Foreign Key
===
Does MS Access 2007 support internal foreign keys within the same table?
| 0 | [
2,
7099,
1381,
13,
8,
3117,
1228,
1246,
800,
3726,
3726,
630,
4235,
1381,
624,
555,
3117,
1228,
5534,
363,
14,
205,
859,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Database Design Issues with relationships
===
I'm working on an upgrade for an existing database that was designed without any of the code to implement the design being considered. Now I've hit a brick wall in terms of implementing the database design in code. I'm certain whether its a problem with the design of the database or if I'm simply not seeing the correct solution on how to what needs to be done.
The basic logic stipulates the following:
<ol>
<li>Users access the online trainings by way of Seats. Users can have multiple Seats.</li>
<li>Seats are purchased by companies and have a many-to-many relationship with Products.</li>
<li>A Product has a many-to-many relationship with Modules.</li>
<li>A Module has a many-to-many relationship with Lessons.</li>
<li>Lessons are the end users access for their training.</li>
<li>To muddy the waters, for one reason or another some Users have multiple Seats that contain the same Products. </li>
<li>Certification takes place on a per Product basis, not on a per Seat basis.</li>
<li>Users have a many-to-many relationship with lessons that stores their current status or score for the lesson.</li>
<li>Users certify for a Product when they complete all of the Lessons in all of the Modules for the Product.</li>
<li>It is also significant to know when all Lessons for a particular Module are completed by a User.</li>
<li>Some Seats will be for ReCertification meaning that Users that previously certified for a Product can sign up and take a recertification exam.</li>
<li>Due to Rule 11, Users can and will have multiple Certification records.</li>
</ol>
The trouble that I keep running into with the current design and the business logic as I've more or less described it is that I can't find a way to effectively tie whether a user has certified for a particular product and seat vs when they have not. I keep hitting snags trying to establish which Products under which Seats have been certified for the User and which haven't. Part of the problem is because if they are currently registered for multiple of the same Product under different Seats, then I have to count the Product only once.
Below is a copy of the portion of the schema that's involved. Any suggestions on how to improve the design or draw the association in code would be appreciated. In case it matters, this site built on the LAMPP stack.
![alt text][1]
[1]: http://lpsoftware.com/problem_db_structure.png | 0 | [
2,
6018,
704,
1549,
29,
5833,
800,
3726,
3726,
31,
22,
79,
638,
27,
40,
9483,
26,
40,
3149,
6018,
30,
23,
1006,
366,
186,
16,
14,
1797,
20,
8713,
14,
704,
142,
724,
9,
130,
31,
22,
195,
770,
21,
3529,
769,
19,
1663,
16,
1733... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Enum inside a JSP
===
Is there a way to use Enum values inside a JSP without using scriptlets.
e.g.
package com.example;
public enum Direction {
ASC,
DESC
}
so in the JSP I want to do something like this
<c:if test="${foo.direction ==<% com.example.Direction.ASC %>}">...
| 0 | [
2,
1957,
723,
572,
21,
487,
3401,
800,
3726,
3726,
25,
80,
21,
161,
20,
275,
1957,
723,
4070,
572,
21,
487,
3401,
366,
568,
3884,
11045,
9,
13,
62,
9,
263,
9,
6030,
13,
960,
9,
29041,
73,
317,
1957,
723,
1400,
13,
1,
28,
150... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Embedded ASPX Plugin Problem
===
We’re developing a web-based application that allows administrators to upload plug-ins. All plug-ins are stored in a special folder outside the app root (say, C:\Plugins\) and are dynamically loaded via Assembly.LoadFrom(). This works just fine for the most part: WebControls in the plug-ins are instantiated and loaded, custom classes function as expected, etc.
We’re using a custom VirtualPathProvider to get resources out of these plug-ins. So, to get an embedded ASPX file, you’d simply do like, “/MySite/embeddedResource/?Assembly=MyPlugin&Resource=MyPage.aspx”. And that works fine, too: the embedded ASPX file compiles and is served up like a normal page.
The problem, however, comes in when an embedded .aspx file (inside of a dynamically loaded plugin) references a class inside that same plug-in assembly. We get compilation errors like, “cannot find type or assembly MyPlugin.” This is odd because, clearly, it’s pulling the .aspx file out of MyPlugin; so how can it not find it?
So, I’m hoping you can help me out with this. The plugin would look like this:
MyPlugin.dll:
- InternalHelperClass.cs
- MyPage.aspx (resource)
When MyPage.aspx contains something like, “<%= InternalHelperClass.WriteHelloWorld() %>”, the compilation fails.
How the heck to we get this to work??
| 0 | [
2,
12138,
28,
306,
396,
10922,
108,
1448,
800,
3726,
3726,
95,
1,
99,
3561,
21,
2741,
8,
1281,
3010,
30,
2965,
18618,
20,
71,
8294,
10922,
8,
108,
18,
9,
65,
10922,
8,
108,
18,
50,
8214,
19,
21,
621,
19294,
719,
14,
4865,
5900... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Printing to a pdf printer programatically
===
II am trying to print an existing file to PDF programmatically in Visual Basic 2008.
Our current relevant assets are:
Visual Studio 2008 Professional
Adobe Acrobat Professional 8.0
I thought about getting a sdk like ITextSharp, but it seem like overkill for what I am trying to do especially since we have the full version of Adobe.
Is there a relatively simple bit of code to print to a PDF printer (and of course assign it to print to a specific location) or will it require a the use of another library to print to pdf?
| 0 | [
2,
7312,
20,
21,
13,
11124,
12925,
625,
721,
8438,
800,
3726,
3726,
595,
589,
749,
20,
4793,
40,
3149,
3893,
20,
13,
11124,
625,
6732,
1326,
19,
3458,
2125,
570,
9,
318,
866,
7480,
6223,
50,
45,
3458,
1120,
570,
736,
20299,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Memory leak with pointers in a class, C++.
===
I am using Borland Builder C++. I have a memory leak and I know it must be because of this class I created, but I am not sure how to fix it. Please look at my code-- any ideas would be greatly appreciated!
Here's the .h file:
#ifndef HeaderH
#define HeaderH
#include <vcl.h>
#include <string>
using std::string;
class Header {
public:
//File Header
char FileTitle[30];
char OriginatorName[15];
//Image Header
char ImageDateTime[14];
char ImageCordsRep[1];
char ImageGeoLocation[60];
NitfHeader(double latitude, double longitude, double altitude, double heading);
~NitfHeader();
void SetHeader(char * date, char * time, double location[4][2]);
private:
void ConvertToDegMinSec (double angle, AnsiString & s, bool IsLongitude);
AnsiString ImageDate;
AnsiString ImageTime;
AnsiString Latitude_d;
AnsiString Longitude_d;
double Latitude;
double Longitude;
double Heading;
double Altitude;
};
And here is the .cpp file:
#pragma hdrstop
#include "NitfHeader.h"
#include "Corners.cpp"
#include <vcl.h>
#include <iostream>
#include <stdio.h>
#include <math.h>
#include <fstream>
#include <jpeg.hpp>
#include <io.h>
#include <string>
using std::string;
//---------------------------------------------------------------------------
#pragma package(smart_init)
Header::Header (double latitude, double longitude, double altitude, double heading){
Latitude = latitude;
Longitude = longitude;
Altitude = altitude;
Heading = heading;
if(Latitude < 0){
Latitude_d = 'S';
}else if(Latitude > 0){
Latitude_d = 'N';
}else Latitude_d = ' ';
if(Longitude < 0){
Longitude_d = 'W';
}else if(Longitude > 0){
Longitude_d = 'E';
}else Longitude_d = ' ';
}
Header::~Header(){
}
void Header::ConvertToDegMinSec (double angle, AnsiString & s, bool IsLongitude) //Assumes angle is nonnegative
{
AnsiString str;
AnsiString str2;
AnsiString zero;
AnsiString degrees;
AnsiString minutes;
AnsiString seconds;
int dms[3];
int dot;
dot = AnsiPos(".",str);
for (int i=0; i < 3; i++) {
str = AnsiString(angle);
dot = AnsiPos(".",str);
if (dot == 0) {
if (angle == 0) {
dms[i] = 0;
}else{
dms[i] = angle;
angle -= dms[i];
}
} else {
str2 = str.SubString(1,dot-1);
dms[i] = str2.ToInt();
angle -= dms[i];
angle *= 60;
}
}
if (dot!=0) {
AnsiString rounder = str.SubString(dot+1,1);
if (rounder.ToInt()>4)
{
dms[2]++;
}
}
//Fill in empty spots with zeros
if (IsLongitude == true){
if (dms[0] < 10) {
zero = "00";
} else if (dms[0] < 100){
zero = "0";
} else zero = "";
} else {
if (dms[0] < 10) {
zero = "0";
} else zero = "";
}
degrees = zero + AnsiString(dms[0]);
if(dms[1]< 10){
zero = "0";
} else zero = "";
minutes = zero + AnsiString(dms[1]);
if (dms[2]<10) {
zero = "0";
} else zero = "";
seconds = AnsiString(dms[2]) + zero;
s = degrees + minutes + seconds;
}
void Header::SetHeader(char * date, char * time, double location[4][2]){
//File Header
strcpy(FileTitle,"Cannon Powershot A640");
strcpy(OperatorName,"Camera Operator");
//Image Header
//Image Date and Time
ImageDate = AnsiString(date);
ImageTime = AnsiString(time);
AnsiString secstr = AnsiString(ImageTime.SubString(7,2));
AnsiString rounder = AnsiString(ImageDate.SubString(10,1));
int seconds = secstr.ToInt();
//Round off seconds - will this be necessary with format hh:mm:ss in text file?
if (rounder.ToInt() > 4) {
seconds++;
}
AnsiString dateTime = ImageDate.SubString(7,4)+ ImageDate.SubString(4,2) + ImageDate.SubString(1,2) + ImageTime.SubString(1,2)
+ ImageTime.SubString(4,2) + AnsiString(seconds);
strcpy(ImageDateTime,dateTime.c_str());
//Image Coordinates Representation
strcpy(ImageCordsRep,"G");
//Image Geographic Location
AnsiString lat;
AnsiString lon;
AnsiString locationlat_d;
AnsiString locationlon_d;
AnsiString corner;
for (int i = 0; i < 4; i++){
ConvertToDegMinSec(location[i][0],lat,false);
ConvertToDegMinSec(location[i][1],lon,true);
if(location[i][0] < 0){
locationlat_d = 'S';
ConvertToDegMinSec(-location[i][0],lat,false);
}else if(location[i][0] > 0){
locationlat_d = 'N';
}else locationlat_d = ' ';
if(location[i][1] < 0){
locationlon_d = 'W';
ConvertToDegMinSec(-location[i][1],lon,true);
}else if(location[i][1] > 0){
locationlon_d = 'E';
}else locationlon_d = ' ';
corner += lat + locationlat_d + lon + locationlon_d;
}
strcpy(ImageGeoLocation,corner.c_str());
}
Now when I use the class in main, basically I just create a pointer:
Header * header = new Header;
header->SetHeader(t[5],t[6],corners->location);
char * imageLocation = header->ImageGeoLocation;
Where corners->location is a string from another class, and t[5] and t[6] are both strings. The problem is that imageLocation doesn't contain what is expected, and often just garbage. I have read a lot about memory leaks and pointers, but I am still very new to programming and some of it is quite confusing. Any suggestions would be fabulous!!
| 0 | [
2,
1912,
11724,
29,
454,
445,
19,
21,
718,
15,
272,
20512,
9,
800,
3726,
3726,
31,
589,
568,
3895,
618,
14960,
272,
20512,
9,
31,
57,
21,
1912,
11724,
17,
31,
143,
32,
491,
44,
185,
16,
48,
718,
31,
679,
15,
47,
31,
589,
52,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Are nulls in a relational database okay?
===
There's a school of thought that null values should not be allowed in a relational database. That is, a table's attribute (column) should not allow null values. Coming from a software development background, I really don't understand this. It seems that if null is valid within the context of the attribute, then it should be allowed. This is very common in Java where object references are often null. Not having an extensive database experience, I wonder if I'm missing something here. | 0 | [
2,
50,
16203,
18,
19,
21,
5827,
192,
6018,
1705,
60,
800,
3726,
3726,
80,
22,
18,
21,
116,
16,
289,
30,
16203,
4070,
378,
52,
44,
1159,
19,
21,
5827,
192,
6018,
9,
30,
25,
15,
21,
859,
22,
18,
35,
14755,
13,
5,
716,
4404,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can I pass parameter from different page?
===
In PHP it is easy to pass parameter using $_GET[] and $_POST[]. Is there something like that in JavaScript? I hope I can pass parameter from address or form. | 0 | [
2,
92,
31,
1477,
18906,
37,
421,
2478,
60,
800,
3726,
3726,
19,
13,
26120,
32,
25,
2010,
20,
1477,
18906,
568,
5579,
1,
3060,
2558,
500,
17,
5579,
1,
6962,
2558,
500,
9,
25,
80,
301,
101,
30,
19,
8247,
8741,
60,
31,
1376,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Should Model make service calls to get data
===
We are build a website using MVC pattern. So far all the pages we built used models which had to operate on Reference data(which is cached when the website loads for the first time).
But now we have reached that stage of the flow where we have to deal with Transactional data (which is specific to that flow). Till now we created model classes by giving it all the data, since they were all cached already. But now that we have to deal with transactional data, should we do the same thing where we get all the data upfront and create a model object or should we make the model class get the data by making service calls. | 0 | [
2,
378,
1061,
233,
365,
3029,
20,
164,
1054,
800,
3726,
3726,
95,
50,
1895,
21,
2271,
568,
307,
8990,
3732,
9,
86,
463,
65,
14,
4434,
95,
392,
147,
2761,
56,
41,
20,
4055,
27,
2801,
1054,
5,
2140,
25,
16522,
43,
76,
14,
2271,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why doesn't my ListView display List or Details items?
===
Using C# .NET 2.0, I have an owner-drawn ListView where I'm overriding the OnDrawColumnHeader, OnDrawItem and OnDrawSubitem events. If I set the View property to Details at design-time, everything works beautifully and I can switch the View property and all view modes display as they should (I'm not using Tile view). However, if I start in any other View, both the List and Details views are blank.
I know you'll probably want to see code, but there's a lot of it, so I'm hesitant to post that much, but can if necessary. I'm more curious if someone has seen this before, and/or might have an inkling of how to fix it. The View property will be a user-saved setting, so I won't always be able to start in Details view by default. | 0 | [
2,
483,
1437,
22,
38,
51,
968,
4725,
3042,
968,
54,
3289,
3755,
60,
800,
3726,
3726,
568,
272,
5910,
13,
9,
2328,
172,
9,
387,
15,
31,
57,
40,
2410,
8,
19950,
968,
4725,
113,
31,
22,
79,
84,
5175,
68,
14,
27,
43,
12404,
716,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Free Alternative to WebCron?
===
A service I've been using for cheap web hosting servers without cron access is a free service called [webcron][1]. However I just got an email from them today sayign they'll no longer be free:
> The downside of this improvements is
> the free account that will no longer
> be available.
I was curious if anyone knows of any accetable alternatives? And if not, would this be worth me making a little web app for? I'm sure putting a few ads on there would pay for the hosting costs if enough people used it. Let me know your thoughts.
[1]: http://webcron.org/ | 0 | [
2,
551,
2676,
20,
2741,
19587,
60,
800,
3726,
3726,
21,
365,
31,
22,
195,
74,
568,
26,
9148,
2741,
10637,
17595,
366,
13,
19587,
1381,
25,
21,
551,
365,
227,
636,
14113,
19587,
500,
2558,
165,
500,
9,
207,
31,
114,
330,
40,
8517... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I handle MSVC++ debug errors from without GUI interaction?
===
Our cross-platform application has a nice suite of unit tests that are run on Windows/Mac/Linux. I've recently set up an automated-testing/continuous-integration system which builds, tests and packages our software across these three platforms.
The problem we're having is that any failed ASSERT statements on Windows cause the below debug message to appear and freeze the applications execution. I realise this is expected behaviour but it is running on a headless machine and means that the continuous-integration system doesn't register the build as passed or failed but simply hangs until someone clicks "Abort" in the below dialog.
This is really annoying so I'm wondering if there is a registry key or compiler flag I can use to prevent this message box from requesting user input whilst still allowing the test to fail under ASSERT.
**Basically, I want to do this without modifying any code, just changing compiler or Windows options.**
Thanks!
![Microsoft Visual C++ Debug Library ASSERT][1]
[1]: http://img519.imageshack.us/img519/853/snapshotbu1.png "Microsoft Visual C++ Debug Library ASSERT" | 0 | [
2,
184,
107,
31,
3053,
4235,
8990,
20512,
121,
16254,
11908,
37,
366,
9457,
7754,
60,
800,
3726,
3726,
318,
919,
8,
27035,
3010,
63,
21,
2210,
6160,
16,
1237,
4894,
30,
50,
485,
27,
1936,
118,
6893,
118,
1226,
7147,
9,
31,
22,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Generate a WSDL without a webserver
===
I would like to generate a WSDL file from a c++ atl webservice without using a web server. I would like to generate it as part of the visual studio build or as a post build event. I found a program (<a href="http://www.stephan-brenner.com/?page_id=82">CmdHelper</a>) that does this for .NET assemblies but it doesn't seem to work for what I need. Any ideas? | 0 | [
2,
7920,
21,
619,
18,
8643,
366,
21,
2741,
10321,
106,
800,
3726,
3726,
31,
83,
101,
20,
7920,
21,
619,
18,
8643,
3893,
37,
21,
272,
20512,
35,
255,
2741,
11449,
366,
568,
21,
2741,
8128,
9,
31,
83,
101,
20,
7920,
32,
28,
141,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
State and time transending logic and program flow?
===
Wondering if it would ever be useful to index every possible state of an application using some reference keys...
Meaning, say we have a program that starts, has only so many possible outcomes, say 8.
but if each outcome is attained through stepping through many more logic states, and in between each branch is considered to be a state and is mapped to a key.
It could take a lot of memory in large programs but if we could access a key directly (the key could be based on time or depth of logic), then we could instantly traverse through any of the possible situations without having to start the whole process over again with fresh data.
Think of it like a tree where the nodes with no children are final outcomes, and every branch between a node and it's parents or children is a 'state', each one keyed differently. So while there are only 8 leaves, or final outcomes of the process, there could be many 'states' depending on how deep the logic goes down the tree before running out of children.
Maybe for simulations, but it would take a ton of memory. | 0 | [
2,
146,
17,
85,
2982,
7601,
7085,
17,
625,
3312,
60,
800,
3726,
3726,
5712,
100,
32,
83,
462,
44,
4811,
20,
4348,
352,
938,
146,
16,
40,
3010,
568,
109,
2801,
5534,
9,
9,
9,
1813,
15,
395,
95,
57,
21,
625,
30,
3244,
15,
63,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Running a Ruby Program as a Windows Service?
===
Is it possible to run a ruby application as a Windows Service? I see that there is a related question which discusses running a [Java Application as a Windows Service][1], how can you do this with a Ruby application?
[1]: http://stackoverflow.com/questions/25530/best-method-to-run-a-java-application-as-a-nix-daemon-or-windows-service | 0 | [
2,
946,
21,
10811,
625,
28,
21,
1936,
365,
60,
800,
3726,
3726,
25,
32,
938,
20,
485,
21,
10811,
3010,
28,
21,
1936,
365,
60,
31,
196,
30,
80,
25,
21,
1597,
1301,
56,
18272,
946,
21,
636,
1004,
1385,
3010,
28,
21,
1936,
365,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C#, ASP.NET - NullReferenceException - Object reference not set to an instance of an object.
===
Definition of variables in use:
Guid fldProId = (Guid)ffdPro.GetProperty("FieldId");
string fldProValue = (string)ffdPro.GetProperty("FieldValue");
FormFieldDef fmProFldDef = new FormFieldDef();
fmProFldDef.Key = fldProId;
fmProFldDef.Retrieve();
string fldProName = (string)fmProFldDef.GetProperty("FieldName");
string fldProType = (string)fmProFldDef.GetProperty("FieldType");
Lines giving the problem (specifically line 4 (hTxtBox.Text = ...)):
if (fldProType.ToLower() == "textbox")
{
Label hTxtBox = (Label)findControl(fldProName);
hTxtBox.Text = fldProValue;
}
All data is gathered from the database correctly, however the label goes screwy. Any ideas? | 0 | [
2,
272,
5910,
15,
28,
306,
9,
2328,
13,
8,
16203,
28018,
10066,
872,
13,
8,
3095,
2801,
52,
309,
20,
40,
4851,
16,
40,
3095,
9,
800,
3726,
3726,
5465,
16,
12157,
19,
275,
45,
9457,
43,
8631,
7431,
18524,
800,
13,
5,
7215,
43,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Accounting Software Design Patterns
===
Are there any good resources for design patterns or other best practices for software that includes financial accounting features?
Specifically, I am looking for good information about handling stuff like the following:
- Internal representations of money
- Internal representations of accounts, journals, and other records
- Reconciling inconsistencies (either automatically or via user action)
- Designing UIs and printed financial reports that make sense to businesspeople | 0 | [
2,
10090,
2306,
704,
6282,
800,
3726,
3726,
50,
80,
186,
254,
2566,
26,
704,
6282,
54,
89,
246,
5242,
26,
2306,
30,
1103,
1553,
10090,
967,
60,
3524,
15,
31,
589,
699,
26,
254,
676,
88,
7988,
3217,
101,
14,
249,
45,
13,
8,
311... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Set ASP.Net version using WiX
===
I am creating an installer for an ASP.Net website using WiX. How do you set the ASP.Net version in IIS using WiX? | 0 | [
2,
309,
28,
306,
9,
2328,
615,
568,
4807,
396,
800,
3726,
3726,
31,
589,
2936,
40,
16146,
106,
26,
40,
28,
306,
9,
2328,
2271,
568,
4807,
396,
9,
184,
107,
42,
309,
14,
28,
306,
9,
2328,
615,
19,
595,
18,
568,
4807,
396,
60,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What is best method to find a ASP.Net control using jQuery?
===
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 with the control's server ID.
$("select[id$='cboPanes']")
This seems like it might not be the best method. Is there another way to do this? | 0 | [
2,
98,
25,
246,
2109,
20,
477,
21,
28,
306,
9,
2328,
569,
568,
487,
8190,
93,
60,
800,
3726,
3726,
19,
17333,
51,
64,
1505,
3884,
568,
487,
8190,
93,
31,
851,
20,
477,
21,
1903,
2741,
8,
12898,
27,
14,
2478,
9,
179,
31,
170,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I write output to the console from a custom MSBuild task?
===
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. | 0 | [
2,
184,
107,
31,
2757,
5196,
20,
14,
8650,
37,
21,
5816,
4235,
29361,
3005,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
121,
16254,
40,
4235,
29361,
3005,
15,
17,
31,
143,
80,
25,
109,
161,
20,
2757,
20,
14,
4235,
29361,
6738,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... |
C#.Net - What does assert() method do? Still useful?
===
I am debugging with breakpoint and I realize the assert call? I thought it was only for unit test... what does it do more than breakpoint? Since I can breakpoint, why should I use Assert? | 0 | [
2,
272,
5910,
9,
2328,
13,
8,
98,
630,
10908,
5,
6,
2109,
107,
60,
174,
4811,
60,
800,
3726,
3726,
31,
589,
121,
16254,
2762,
29,
1442,
3132,
17,
31,
4007,
14,
10908,
645,
60,
31,
289,
32,
23,
104,
26,
1237,
1289,
9,
9,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Python - How do I pass a string into subprocess.Popen (using the stdin argument)?
===
If I do the following:
import subprocess
from cStringIO import StringIO
subprocess.Popen(['grep','f'],stdout=subprocess.PIPE,stdin=StringIO('one\ntwo\nthree\nfour\nfive\nsix\n')).communicate()[0]
I get:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/build/toolchain/mac32/python-2.4.3/lib/python2.4/subprocess.py", line 533, in __init__
(p2cread, p2cwrite,
File "/build/toolchain/mac32/python-2.4.3/lib/python2.4/subprocess.py", line 830, in _get_handles
p2cread = stdin.fileno()
AttributeError: 'cStringIO.StringI' object has no attribute 'fileno'
Apparently a cStringIO.StringIO object doesn't quack close enough to a file duck to suit subprocess.Popen. How do I work around this?
| 0 | [
2,
20059,
13,
8,
184,
107,
31,
1477,
21,
3724,
77,
972,
16835,
9,
6057,
219,
13,
5,
12655,
14,
354,
3653,
5476,
6,
60,
800,
3726,
3726,
100,
31,
107,
14,
249,
45,
9010,
972,
16835,
37,
272,
11130,
1963,
9010,
3724,
1963,
972,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
StreamWriter: Max Write Length?
===
Is there a max length that a stream writer can write out to a file?
Or is there a max length that WriteLine() can output?
I am trying to write some data to a file but all of the data does not seem to make it.
Thank you for the help | 0 | [
2,
3766,
9657,
45,
2049,
2757,
1476,
60,
800,
3726,
3726,
25,
80,
21,
2049,
1476,
30,
21,
3766,
1462,
92,
2757,
70,
20,
21,
3893,
60,
54,
25,
80,
21,
2049,
1476,
30,
2757,
1143,
5,
6,
92,
5196,
60,
31,
589,
749,
20,
2757,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
JDK/JRE source code with matching JSSE (SSL) source code and matching runnable JDK / JRE?
===
I have seen [Where to find Java 6 JSSE/JCE Source Code?][1] and asked the question myself [How to get JRE/JDK with matching source?][2] but I don't either of these was specific enough to get the answer I was really after, so I'm going to try a way more specific version of the question.
Basically the problem that I am trying to solve is that I would like to be able to use my Eclipse debugger on Windows and step into the Java SSL classes (JSSE) to help me debug SSL issues as well as to just understand the SSL process better. BTW I am familiar with (and use) the javax.net.debug=ssl|all system property to get SSL tracing and, while this is very helpful, I'd still like to be able to step through that pesky code.
So what I think I specifically need is:
1. An executable JRE ? JDK implementation (not wanting to build one)...
2. That runs on my Windows platform (XP)...
3. That includes source...
4. And that source includes the SSL "bits" (JSSE, etc.)...
5. And ideally the SSL implementation is Sun's or the OpenJDK version.
I think the closest thing (as noted in PW's answer [StackOverflow: 87106][3]) is the OpenJDK source [openjdk-6-src-b12-28_aug_2008.tar.gz][4] found at [OpenJDK 6 Source Release][5], but I'm not sure there's a matching executable JDK ? JRE for that that would run on Windows.
[1]: http://stackoverflow.com/questions/87030/where-to-find-java-6-jssejce-source-code
[2]: http://stackoverflow.com/questions/150849/how-to-get-jrejdk-with-matching-source
[3]: http://stackoverflow.com/questions/87030/where-to-find-java-6-jssejce-source-code#87106
[4]: openjdk-6-src-b12-28_aug_2008.tar.gz
[5]: http://download.java.net/openjdk/jdk6/ | 0 | [
2,
487,
43,
197,
118,
728,
99,
1267,
1797,
29,
10120,
487,
9557,
13,
5,
18,
18,
255,
6,
1267,
1797,
17,
10120,
485,
103,
579,
487,
43,
197,
13,
118,
487,
99,
60,
800,
3726,
3726,
31,
57,
541,
636,
2798,
20,
477,
8247,
400,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What´s your favorite definition/citation of an Object (in general) in OOD? (from a book, a person (Meyer, Booch, Reenskaug, Wirfs-Brock etc..))
===
Their are quite some intersesting defintions of what an object in OO is? Please post your favorite definitions and quotes!
One of my favorites comes from Trygve Reenskaug:
"The object has three properties, which makes it a simple, yet powerful modul building block. It has sate so it can model memory. It has behaviour, so it can model dynamic processes. And it is encapsulated, so that it can hide complexity" | 0 | [
2,
98,
13,
18,
154,
3839,
5465,
118,
1892,
8593,
16,
40,
3095,
13,
5,
108,
297,
6,
19,
13,
17312,
60,
13,
5,
2665,
21,
360,
15,
21,
840,
13,
5,
16190,
15,
1607,
4550,
15,
302,
219,
2892,
5127,
15,
12701,
11754,
8,
220,
4651,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Wiki style text formatting
===
I'm looking for some kind of text-parser for ASP.NET that can make HTML from some style of text that uses a special format. Like in Wiki's there is some special syntax for headings and such. I have tried to look on google, but I did not found anything for .NET.
Do someone know about a library for .NET that can parse the text to HTML wiki-style? I't don't have to be the same syntax as a Wiki? If no, how whould be the best way to design such a system your self?
Thanks in advance | 0 | [
2,
13,
17375,
1034,
1854,
2595,
1203,
800,
3726,
3726,
31,
22,
79,
699,
26,
109,
825,
16,
1854,
8,
3574,
4104,
26,
28,
306,
9,
2328,
30,
92,
233,
13,
15895,
37,
109,
1034,
16,
1854,
30,
2027,
21,
621,
2595,
9,
101,
19,
13,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Javascript Date() constructor doesn't work.
===
I have an issue -
The javascript Date("mm-dd-yyyy") constructor doesn't work for FF. It works fine for IE.
IE : new Date("04-02-2008") => "Wed Apr 2 00:00:00 EDT 2008"
FF2 : new Date("04-02-2008") => Invalid Date
So lets try another constructor:
Trying this constructor Date("yyyy", "mm", "dd")
IE : new Date("2008", "04", "02"); => "Fri May 2 00:00:00 EDT 2008"
FF : new Date("2008", "04", "02"); => "Fri May 2 00:00:00 EDT 2008"
IE : new Date("2008", "03", "02"); => "Wed Apr 2 00:00:00 EDT 2008"
FF : new Date("2008", "03", "02"); => "Wed Apr 2 00:00:00 EDT 2008"
So the Date("yyyy", "mm", "dd") constructor uses an index of 0 to represent January.
Has anyone dealt with this?
There must be a better way than subtracting 1 from the months. | 0 | [
2,
8247,
8741,
1231,
5,
6,
6960,
248,
1437,
22,
38,
170,
9,
800,
3726,
3726,
31,
57,
40,
1513,
13,
8,
14,
8247,
8741,
1231,
5,
7,
3363,
8,
8096,
8,
93,
93,
93,
93,
7,
6,
6960,
248,
1437,
22,
38,
170,
26,
13,
2460,
9,
32,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best book or piece of documentation on Java Swing?
===
I am very likely to be starting a new project at work and will need to use the Java Swing library. I would like to get up to speed pretty quickly, preferably in the next two months. What do you consider to be the best documentation (either online or in book form) to help me get a solid grasp on the library? | 4 | [
2,
98,
25,
14,
246,
360,
54,
1855,
16,
13945,
27,
8247,
5587,
60,
800,
3726,
3726,
31,
589,
253,
1720,
20,
44,
1422,
21,
78,
669,
35,
170,
17,
129,
376,
20,
275,
14,
8247,
5587,
1248,
9,
31,
83,
101,
20,
164,
71,
20,
1362,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible to stop a ColdFusion Request?
===
I have a Flex application that calls a function which searches a large document collection. Depending on the search term, the user may want to stop the request from flex.
I’d like to not only stop the flex application from expecting the request, but also stop the CFC request. Is this possible? What’s the best approach for doing this?
| 0 | [
2,
25,
32,
938,
20,
747,
21,
1191,
9818,
3772,
60,
800,
3726,
3726,
31,
57,
21,
14409,
3010,
30,
3029,
21,
1990,
56,
19994,
21,
370,
4492,
1206,
9,
4758,
27,
14,
2122,
981,
15,
14,
4155,
123,
259,
20,
747,
14,
3772,
37,
14409,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Asp.net formatting lists of grouped data
===
I have a asp.net page where i query a list of url and the groups in the urls. In the code behind i loop through each group and create a group header and then list all of the links.
something like this:
<b>Group 1</b>
<li> Link 1
<li> Link 2
<li> Link 3
<b>Group 2</b>
<li> Link 1
<li> Link 2
<li> Link 3
Now that i have a lot of links, this create one long list on the page and you have to scroll down.
What are the best suggestions for formatting this data using multiple columns or other layout options so it looks better on a single page rather than one long list.
Any example code would be great . . . | 0 | [
2,
28,
306,
9,
2328,
2595,
1203,
7227,
16,
19511,
1054,
800,
3726,
3726,
31,
57,
21,
28,
306,
9,
2328,
2478,
113,
31,
25597,
21,
968,
16,
287,
6362,
17,
14,
1170,
19,
14,
13,
911,
7532,
9,
19,
14,
1797,
439,
31,
5293,
120,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to deploy minified Javascript files to a web server without changing the file's Timestamp?
===
We have several hundred javascript files in our app that are currently being served uncompressed. One piece of our solution to gain a little more client performance is to minify our javascript files. I've created an automated solution to do this on the build, however, when these new files are deployed, the files' timestamp that determines if it will be resent to the client will be changed. This means, that on every future release, all the javascript files will have a new timestamp. our clients will redownload ALL the minified javascript files again, and thus defeating the performance aspect of minification.
Is this an issue anyone else has encountered? What was your solution? Do you have seperate non-minified and minified javascript files used in your projects, and don't perform the minification on the build?
We have other solutions in mind (like only looking for the actual changed files in the source control repository), but this is one question for which I wanted to find out what others are doing. | 0 | [
2,
184,
20,
17617,
4232,
4462,
8247,
8741,
6488,
20,
21,
2741,
8128,
366,
4226,
14,
3893,
22,
18,
436,
38,
10158,
60,
800,
3726,
3726,
95,
57,
238,
1874,
8247,
8741,
6488,
19,
318,
4865,
30,
50,
871,
142,
423,
367,
960,
5890,
69... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to sell the benefits of "good code" to management?
===
I work for a very small company (~70 total w/ 10 actual programmers) with a relatively large (1M LOC in C++) application that is in need of some serious TLC. Because of the size of the company we are driven primarily by what we can sell to customers with literally no time given for maintenance of the code other than fixing the bugs that cause things to fail, and not always fixing them well. Apparently this is how the company has worked for the past 10 years!
How do I convince management that what they are doing is actually costing them money/time/productivity? What kinds of active maintenance strategies exist? Which are good for small companies with scarce resources? | 0 | [
2,
184,
20,
3344,
14,
5800,
16,
13,
7,
3264,
1797,
7,
20,
1097,
60,
800,
3726,
3726,
31,
170,
26,
21,
253,
284,
237,
13,
5,
1,
3318,
600,
619,
118,
332,
3463,
17968,
18,
6,
29,
21,
3109,
370,
13,
5,
165,
79,
13,
10799,
19,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Apache sockets not closing?
===
I have a web application written using CherryPy, which is run locally on <code>127.0.0.1:4321</code>. We use mod-rewrite and mod-proxy to have Apache act as a reverse proxy; Apache also handles our SSL encryption and may eventually be used to transfer all of our static content.
This all works just fine for small workloads. However, I recently used `urllib2` to write a stress-testing script that would simulate a workload of 100 clients. After some time, each client gets a 503 error from Apache, indicating that Apache cannot connect to `127.0.0.1:4321`. CherryPy is functioning properly, but my Apache error log reveals lines like the following:
`[Thu Oct 02 12:55:44 2008] [error] (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : proxy: HTTP: attempt to connect to 127.0.0.1:4321 (*) failed`
Googling for this error reveals that Apache has probably run out of socket file descriptors. Since I only have 100 clients running, this implies that the connections are not being closed, either between my `urllib2` connection and Apache (I am definitely calling `.close()` on the return value of `urlopen`), or between Apache and CherryPy.
I've confirmed that my `urllib2` request is sending an HTTP `Connection: close` header, although Apache is configured with `KeepAlive On` if that matters.
In case it matters, I'm using Python 2.5, Apache 2.2, CherryPy 3.1.0, and the server is running on Windows Server 2003.
So what's my next step to stop this problem? | 0 | [
2,
17140,
18482,
18,
52,
4239,
60,
800,
3726,
3726,
31,
57,
21,
2741,
3010,
642,
568,
9257,
6448,
15,
56,
25,
485,
6680,
27,
13,
1,
9375,
1,
11595,
9,
387,
9,
387,
9,
165,
21231,
1941,
1,
118,
9375,
1,
9,
95,
275,
7226,
8,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is RAND() brain damaged in MS SQL Server 2005?
===
I'm trying to select a random 10% sampling from a small table. I thought I'd just use the RAND() function and select those rows where the random number is less than 0.10:
SELECT * FROM SomeTable WHERE SomeColumn='SomeCondition' AND RAND() < 0.10
But I soon discovered that RAND() always returns the same number! Reminds me of this [xkcd cartoon](http://xkcd.com/221/).
<img src="http://imgs.xkcd.com/comics/random_number.png">
OK, no problem, the RAND function takes a seed value. I will be running this query periodically, and I want it to give different results if I run it on a different day, so I seed it with a combination of the date and a unique row ID:
SELECT * FROM SomeTable WHERE SomeColumn='SomeCondition' AND RAND(CAST(GETDATE) AS INTEGER) + RowID) < 0.10
I still don't get any results! When I show the random numbers returned by RAND, I discover that they're all within a narrow range. It appears that getting a random number from RAND requires you to use a random seed. If I had a random seed in the first place, I wouldn't need a random number!
I've seen the previous discussions related to this problem:
<http://stackoverflow.com/questions/52964/sql-server-random-sort>
<http://stackoverflow.com/questions/19412/how-to-request-a-random-row-in-sql>
They don't help me. TABLESAMPLE works at the page level, which is great for a big table but not for a small one, and it looks like it applies prior to the WHERE clause. TOP with NEWID doesn't work because I don't know ahead of time how many rows I want.
Anybody have a solution, or at least a hint? | 0 | [
2,
25,
11310,
5,
6,
1964,
4514,
19,
4235,
4444,
255,
8128,
812,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
5407,
21,
5477,
12476,
19030,
37,
21,
284,
859,
9,
31,
289,
31,
22,
43,
114,
275,
14,
11310,
5,
6,
1990,
17,
5407,
273... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
AJAX and the Browser Back Button
===
I run a browser based game at www.darknovagames.com. Recently, I've been working on reformatting the site with CSS, trying to get all of its pages to verify according to the HTML standard.
I've been toying with this idea of having the navigation menu on the left AJAX the pages in (rather than taking the user to a separate page each time, requiring a reload of the title and nav bar, which almost never change) and I know that if I do so, I will probably break the Forward/Back buttons in the browser. My question I guess is, should I go ahead and AJAX the site, thus requiring the user to use the sites navigation to play the game, or should I leave the site as it currently stands, and use standard hyperlinks and things for navigation?
The reason I ask I guess is that I built a forums system into the site, and a lot of times I would want to link say to a particular topic within the forums.
I'm also open to suggestions. Is there a standard (preferably without traditional frames) way to make only the body area of the site reload, while still changing the URL so that users can bookmark and forward/back, etc? That could potentially solve my problem as well. I'm just asking for the best solution here, not an answer to a specific question. ^_^
Thanks | 0 | [
2,
20624,
17,
14,
16495,
97,
5167,
800,
3726,
3726,
31,
485,
21,
16495,
432,
250,
35,
13,
6483,
9,
13754,
13413,
16648,
9,
960,
9,
1989,
15,
31,
22,
195,
74,
638,
27,
3202,
10303,
68,
14,
689,
29,
272,
18,
18,
15,
749,
20,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Changing the DefaultValue of a property on an inherited .net control
===
In .net, I have an inherited control:
public CustomComboBox : ComboBox
I simply want to change the default value of DropDownStyle property, to another value (ComboBoxStyle.DropDownList) besides the default one specified in the base class (ComboBoxStyle.DropDown).
One might think that you can just add the constructor:
public CustomComboBox()
{
this.DropDownStyle = ComboBoxStyle.DropDownList;
}
However, this approach will confuse the Visual Studio Designer. When designing the custom Control in Visual Studio, if you select ComboBoxStyle.DropDown for the DropDownStyle it thinks that the property you selected is still the default value (from the [DevaultValue()] in the base ComboBox class), so it doesn't add a customComboBox.DropDownStyle = ComboBoxStyle.DropDown line to the Designer.cs file. And confusingly enough, you find that the screen does not behave as intended once ran.
Well you can't override the DropDownStyle property since it is not virtual, but you could do:
[DefaultValue(typeof(ComboBoxStyle), "DropDownList")]
public new ComboBoxStyle DropDownStyle
{
set { base.DropDownStyle = value; }
get { return base.DropDownStyle; }
}
but then you will run into trouble from the nuances of using "new" declarations. I've tried it and it doesn't seem to work right as the visual studio designer gets confused from this approach also and forces ComboBoxStyle.DropDown (the default for the base class).
Is there any other way to do this? Sorry for the verbose question, it is hard to describe in detail.
| 0 | [
2,
4226,
14,
12838,
15165,
16,
21,
1354,
27,
40,
7179,
13,
9,
2328,
569,
800,
3726,
3726,
19,
13,
9,
2328,
15,
31,
57,
40,
7179,
569,
45,
317,
5816,
960,
1192,
5309,
13,
45,
22621,
5309,
31,
1659,
259,
20,
753,
14,
12838,
1923... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which SVG toolkit would you recommend to use in Java?
===
As a follow-up to another <a href="http://stackoverflow.com/questions/162991/selecting-proper-toolkit-for-a-2d-simulation-project-in-java">question</a>, I was wondering what would be the best way to use SVG in a Java project. | 0 | [
2,
56,
13,
18,
22955,
5607,
13703,
83,
42,
12360,
20,
275,
19,
8247,
60,
800,
3726,
3726,
28,
21,
1740,
8,
576,
20,
226,
13,
1,
58,
746,
14057,
3726,
7,
21127,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
118,
1091,
24968,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to get access to the Websphere 6.1 ant tasks from vanilla ant (not ws_ant)
===
I guess I need to know what I need in the classpath (what jar) in order to execute WebSphere 6.1 ant tasks. If someone can provide an example that would be perfect. | 0 | [
2,
184,
20,
164,
1381,
20,
14,
2741,
14079,
400,
9,
165,
40,
38,
8674,
37,
23704,
40,
38,
13,
5,
1270,
619,
18,
1,
1830,
6,
800,
3726,
3726,
31,
2321,
31,
376,
20,
143,
98,
31,
376,
19,
14,
718,
8353,
13,
5,
608,
5112,
6,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Lightweight .NET debugger?
===
I frequently need to debug .NET binaries on test machines (by test-machine, I mean that the machine doesn't have Visual Studio installed on it, it's frequently re-imaged, It's not the same machine that I do my development on, etc).
I love the Visual Studio debugger, but it's not practical for me to install visual studios on a freshly imaged test-machine just to debug an assertion or crash (the install takes way too long, the footprint is too large, etc).
I'd really like a quickly installed program that could break into a running process, let me specify the location of symbols/source code, and let me jump right into debugging. For native binaries, windbg works great, but I haven't found anything similiar for managed binaries. Any recommendations?
(as a side note, I am aware of visual studios remote debugging capabilities, but for some reason it never seems to work consistently for me... I often have connection issues)
| 0 | [
2,
13613,
13,
9,
2328,
121,
2345,
11356,
60,
800,
3726,
3726,
31,
3086,
376,
20,
121,
16254,
13,
9,
2328,
4511,
11301,
27,
1289,
6035,
13,
5,
779,
1289,
8,
20442,
15,
31,
884,
30,
14,
1940,
1437,
22,
38,
57,
3458,
1120,
4066,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are the best options for NAT port forwarding?
===
I'd like to make it easy for users to forward a port on their NAT to their local machine for my C++ app. I'd like to make this work on OSX & Windows. Linux would be a great bonus, but Linux users are probably more comfortable forwarding ports manually, so it is less of a concern. LGPL type code is OK, but I can't use anything that is straight GPL.
I'd love to hear any thoughts or experiences anyone has had in this area, but a few specific questions come to mind:
- Is there a recognized best library for UPNP? The [MiniUPNP][1] client looks like it might work, but is there anything else out there?
- What about [Bonjour][2]? Can I rely on it for OSX computers?
- All the big bittorrent apps have to deal with this, so is there an existing survey of how they do it? What about Skype?
[1]: http://miniupnp.free.fr/
[2]: http://en.wikipedia.org/wiki/Bonjour_(software) | 0 | [
2,
98,
50,
14,
246,
6368,
26,
6285,
1295,
917,
68,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
233,
32,
2010,
26,
3878,
20,
917,
21,
1295,
27,
66,
6285,
20,
66,
375,
1940,
26,
51,
272,
20512,
4865,
9,
31,
22,
43,
101,
20,
23... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Reading Comma Delimited File and Putting Data in ListView - C#
===
Alright, I'm trying to read a comma delimited file and then put that into a ListView (or any grid, really). I have the delimiting part of the job taken care of, with the fields of the file being put into a multidimensional string array. The problem is trying to get it into the ListView.
It appears that there isn't a real way of adding columns or items dynamically, since each column and item needs to be manually declared. This poses a problem, because I need the ListView to be as large as the file is, who's size isn't set. It could be huge one time, and small another.
Any help with this would be appreciated. | 0 | [
2,
1876,
11951,
58,
121,
23012,
3893,
17,
3873,
1054,
19,
968,
4725,
13,
8,
272,
5910,
800,
3726,
3726,
11885,
15,
31,
22,
79,
749,
20,
1302,
21,
11951,
58,
121,
23012,
3893,
17,
94,
442,
30,
77,
21,
968,
4725,
13,
5,
248,
186... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I change the default *.elog log file name for an interpreted Specman session?
===
I want to be able to specify the file name stem for the log file in a Specman test. I need to hard-code the main *.elog filename so that I don't get variance between tests and confuse the post-processing scripts. Is there a constraint or command line I can pass into Specman? | 0 | [
2,
184,
107,
31,
753,
14,
12838,
1637,
9,
62,
5567,
6738,
3893,
204,
26,
40,
10394,
12737,
177,
3723,
60,
800,
3726,
3726,
31,
259,
20,
44,
777,
20,
19077,
14,
3893,
204,
6940,
26,
14,
6738,
3893,
19,
21,
12737,
177,
1289,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which book would you recommend to learn SVG?
===
I am a complete beginner with SVG and I am looking for books that would help me get started. I am interesting in scripting, and animations. | 0 | [
2,
56,
360,
83,
42,
12360,
20,
2484,
13,
18,
22955,
60,
800,
3726,
3726,
31,
589,
21,
1279,
26931,
29,
13,
18,
22955,
17,
31,
589,
699,
26,
964,
30,
83,
448,
55,
164,
373,
9,
31,
589,
4883,
19,
3884,
68,
15,
17,
6236,
18,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Ajax versus Frames
===
In light of how ajax is actually used by most sites today; why is ajax embraced while frames are still regarded as a bad idea?
| 0 | [
2,
20624,
5706,
12809,
800,
3726,
3726,
19,
471,
16,
184,
20624,
25,
1121,
147,
34,
127,
3259,
786,
73,
483,
25,
20624,
15843,
133,
12809,
50,
174,
3950,
28,
21,
896,
882,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Where is the Attic in Subversion?
===
Whoops, I need some info from a file I deleted, a while ago. In CVS I would just go to the ATTIC to find it, how do I find a file in SVN without having to go back to a revision where it existed (especially annoying since I have no idea really when I deleted -- one week ago, two weeks ago...)
| 0 | [
2,
113,
25,
14,
14853,
19,
972,
10898,
60,
800,
3726,
3726,
72,
11314,
15,
31,
376,
109,
15404,
37,
21,
3893,
31,
19584,
15,
21,
133,
1464,
9,
19,
13,
12732,
18,
31,
83,
114,
162,
20,
14,
14853,
20,
477,
32,
15,
184,
107,
31... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which Java profiler is better: JProfiler or YourKit?
===
Which profiler is better for general purpose profiling and heap analysis? 90% of our apps are standalone command line programs. The other 10% are webapps/servlet container apps (with very little JSP and NO SCRIPLETS!). Target user would be Sr Software Engineer with 5-10 years of industry experience.
As of writing this question (2008-10-02), JProfiler was at 5.1.4 and YourKit was 7.5. Looks like YourKit 8.0 will be released soon. | 0 | [
2,
56,
8247,
5296,
139,
25,
574,
45,
487,
14503,
139,
54,
154,
13703,
60,
800,
3726,
3726,
56,
5296,
139,
25,
574,
26,
297,
2131,
8721,
49,
802,
17,
15414,
2495,
60,
16370,
16,
318,
4865,
18,
50,
26986,
1202,
293,
1726,
9,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Recommended .NET Class for a collection of unique integers?
===
What would you recommend for class that needs to keep a list of unique integers?
I'm going to want to Add() integers to the collection and also check for existence e.g. Contains().
Would be nice to also get them in a list as a string for display, ie. "1, 5, 10, 21". | 0 | [
2,
5773,
13,
9,
2328,
718,
26,
21,
1206,
16,
2619,
13820,
18,
60,
800,
3726,
3726,
98,
83,
42,
12360,
26,
718,
30,
2274,
20,
643,
21,
968,
16,
2619,
13820,
18,
60,
31,
22,
79,
228,
20,
259,
20,
3547,
5,
6,
13820,
18,
20,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASP.NET project size
===
Are there any known issues around how many "pages" are in an ASP.NET project?
Does the size of the DLL created by the project matter at all?
| 0 | [
2,
28,
306,
9,
2328,
669,
1072,
800,
3726,
3726,
50,
80,
186,
167,
1549,
140,
184,
151,
13,
7,
6486,
18,
7,
50,
19,
40,
28,
306,
9,
2328,
669,
60,
630,
14,
1072,
16,
14,
13,
43,
211,
679,
34,
14,
669,
1161,
35,
65,
60,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Autoconf test for JNI include dir
===
I'm working on a configuration script for a JNI wrapper. One of the configuration parameters is the path to `jni.h`. What's a good quick-and-dirty Autoconf test for whether this parameter is set correctly for C++ compilation? You can assume you're running on Linux and `g++` is available.
Alternatively, is there a way to get `javah` (or a supporting tool) to give me this path directly? | 0 | [
2,
3108,
14093,
1289,
26,
487,
889,
468,
13,
9035,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
8091,
3884,
26,
21,
487,
889,
28051,
9,
53,
16,
14,
8091,
12905,
25,
14,
2013,
20,
13,
1,
728,
889,
9,
252,
1,
9,
98,
22,
18,
21,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to use boost::bind in C++/CLI to bind a member of a managed class
===
I am using boost::signal in a native C++ class, and I now I am writing a .NET wrapper in C++/CLI, so that I can expose the native C++ callbacks as .NET events. When I try to use boost::bind to take the address of a member function of my managed class, I get compiler error 3374, saying I cannot take the address of a member function unless I am creating a delegate instance. Does anyone know how to bind a member function of a managed class using boost::bind? | 0 | [
2,
184,
20,
275,
10419,
45,
45,
4772,
43,
19,
272,
20512,
118,
150,
1210,
20,
10193,
21,
322,
16,
21,
1471,
718,
800,
3726,
3726,
31,
589,
568,
10419,
45,
45,
11255,
192,
19,
21,
1275,
272,
20512,
718,
15,
17,
31,
130,
31,
589... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Generic GDI+ Error
===
I have a Form being launched from another form on a different thread. Most of the time it works perfectly, but I get the below error from time to time. Can anyone help?
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
at System.Drawing.Icon.ToBitmap()
at System.Windows.Forms.ThreadExceptionDialog..ctor(Exception t)
at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
at System.Windows.Forms.Control.WndProcException(Exception e)
at System.Windows.Forms.Control.ControlNativeWindow.OnThreadException(Exception e)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog() | 0 | [
2,
12733,
489,
1115,
2430,
7019,
800,
3726,
3726,
31,
57,
21,
505,
142,
1601,
37,
226,
505,
27,
21,
421,
9322,
9,
127,
16,
14,
85,
32,
693,
5759,
15,
47,
31,
164,
14,
1021,
7019,
37,
85,
20,
85,
9,
92,
1276,
448,
60,
35,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SetURL method of QuickTime object undefined?
===
I have a hidden embedded QuickTime object on my page that I'm trying to control via JavaScript, but it's not working. The object looks like this:
<object id="myPlayer" data="" type="audio/mpeg" pluginspage="http://www.apple.com/quicktime/download" width="0" height="0">
<param name="autoPlay" value="false" />
<param name="controller" value="false" />
<param name="enablejavascript" value="true" />
</object>
There is nothing in the data parameter because at render time, I don't know the URL that's going to be loaded. I set it like this:
var player = document.getElementById("myPlayer");
player.SetURL(url);
The audio will later be played back with:
player.Play();
Firefox 3.0.3 produces no error in the JavaScript console, but no playback occurs when <code>Play()</code> is called. Safari 3.0.4 produces the following error in the console:
"Value undefined (result of expression player.SetURL) is not object."
Internet Explorer 7.0.5730.11 gives the following extremely helpful error message:
"Unspecified error."
I have QuickTime version 7.4 installed on my machine. <a href="http://developer.apple.com/documentation/QuickTime/Conceptual/QTScripting_JavaScript/bQTScripting_JavaScri_Document/chapter_1000_section_5.html">Apple's documentation</a> says that <code>SetURL()</code> is correct, so why does it not work? | 0 | [
2,
309,
911,
255,
2109,
16,
2231,
891,
3095,
367,
13439,
60,
800,
3726,
3726,
31,
57,
21,
3689,
12138,
2231,
891,
3095,
27,
51,
2478,
30,
31,
22,
79,
749,
20,
569,
1197,
8247,
8741,
15,
47,
32,
22,
18,
52,
638,
9,
14,
3095,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Should developers be given laptops or desktops?
===
I'm aware that a similar question has been asked [before here][1] but this is more of question of which is better of a departmental scale. At my last job Code monkeys were given desktops and project managers were given Laptops. The reasoning being that project managers went to more meetings so needed to take thier computers with them.
Because they wouldn't allow us to have the code on our personal machines in order to work from home, we had to remote desktop over a VPN into work in order to work from home.
At my new job I've been given a laptop and personally I love it, I plug into a monitor at work and use 2 screen, and I can work from home without having to deal with a crushingly slow vpn.
In general though accross a development team is it better to give developers laptops tor desktops?
Desktops have raw power and cost in thier favour, plus it's easier to get the holy 3 monitor setup on a desktop, but if you work from home or anywhere else you can't work on the same machine. Laptops can have an extra screen are obviously portable which allows you to work anywhere, but cost more and are likely to be less powerful.
What does everyone think?
[1]: http://stackoverflow.com/questions/5562/do-you-prefer-to-code-on-a-laptop-or-a-desktop-or-both | 0 | [
2,
378,
10168,
44,
504,
12294,
18,
54,
17404,
18,
60,
800,
3726,
3726,
31,
22,
79,
3854,
30,
21,
835,
1301,
63,
74,
411,
636,
12750,
235,
500,
2558,
165,
500,
47,
48,
25,
91,
16,
1301,
16,
56,
25,
574,
16,
21,
604,
192,
3464... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a good iTunes coverflow-type control for WPF?
===
I am currently using Telerik's carousel control, but it is lacking many features and is buggy. Is there a good control out there that looks the the coverflow control in itunes? | 0 | [
2,
25,
80,
21,
254,
12952,
1227,
9990,
8,
4474,
569,
26,
619,
7721,
60,
800,
3726,
3726,
31,
589,
871,
568,
4338,
6639,
22,
18,
27374,
569,
15,
47,
32,
25,
11690,
151,
967,
17,
25,
6256,
2687,
9,
25,
80,
21,
254,
569,
70,
80... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... |
Scrollable regions in ActionScript 3 Visualization
===
What is the best way to create several scrollable regions in an ActionScript 3 visualization that extends flash.display.Sprite and makes use of hierarchy of of low level DisplayObjects (Sprite'a, Shape's, TextField)?
I have tried to use three mx.containers.Canvas objects added as children of the main Sprite and have also tried converting the main Sprite to a Canvas but am unable to get anything to show up using either method. I have also tried adding my DisplayObjects using both Canvas.addChild and Canvas.rawChildren.addChild.
Is it necessary/possible to rewrite the whole thing to use mx.* components or is there a trick to displaying more primitive objects inside of a Canvas object? | 0 | [
2,
12159,
579,
3332,
19,
1028,
8741,
203,
28873,
800,
3726,
3726,
98,
25,
14,
246,
161,
20,
1600,
238,
12159,
579,
3332,
19,
40,
1028,
8741,
203,
28873,
30,
9073,
4433,
9,
2906,
5438,
9,
3401,
8011,
17,
1364,
275,
16,
14417,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Fast Text Search Over Logs
===
Here's the problem I'm having, I've got a set of logs that can grow fairly quickly. They're split into individual files every day, and the files can easily grow up to a gig in size. To help keep the size down, entries older that 30 days or so are cleared out.
The problem is when I want to search these files for a certain string. Right now, a Boyer-Moore search is unfeasibly slow. I know that applications like dtSearch can provide a really fast search using indexing, but I'm not really sure how to implement that without taking up twice the space a log already takes up.
Are there any resources I can check out that can help? I'm really looking for a standard algorithm that'll explain what I should do to build an index and use it to search. | 0 | [
2,
1512,
1854,
2122,
84,
18893,
800,
3726,
3726,
235,
22,
18,
14,
1448,
31,
22,
79,
452,
15,
31,
22,
195,
330,
21,
309,
16,
18893,
30,
92,
3213,
6647,
976,
9,
59,
22,
99,
2132,
77,
1359,
6488,
352,
208,
15,
17,
14,
6488,
92,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Program to analize a lot of XMLs
===
I have a lot of XML files and I'd like to generate a report from them. The report should provide information such as:
root 100%
a*1 90%
b*1 80%
c*5 40%
meaning that all documents have a root element, 90% have one a element in the root, 90% have one b element in the root, 40% have 5 c elements in b.
If fore example some documents have 4 c elements, some 5 and some 6, it should say something like:
c*4.3 4 6 40%
meaning that 40% have between 4 and 6 c elements there, and the average is 4.3.
I am looking for free software, if it doesn't exist I'll write it. I was about to do it, but I thought about checking it. I may not be the first one to have to analyze and get an structural overview of thousand of XML files. | 0 | [
2,
625,
20,
40,
192,
2952,
21,
865,
16,
23504,
18,
800,
3726,
3726,
31,
57,
21,
865,
16,
23504,
6488,
17,
31,
22,
43,
101,
20,
7920,
21,
1330,
37,
105,
9,
14,
1330,
378,
1181,
676,
145,
28,
45,
5900,
12849,
21,
2483,
165,
16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Tutorial for creating rails models and scaffolds with foreign key relationships
===
Where can I find a good Rails newbie-friendly reference about generating rails models with foreign key relationships?
I've found some pages indicating that you should add has`_`many and belongs`_`to to the relevant models to specify these relationships, but haven't seen any instructions for getting the scaffolds to generate the correct controller and view code that would reflect these relationships. | 0 | [
2,
29724,
26,
2936,
2240,
18,
2761,
17,
27322,
18,
29,
1228,
1246,
5833,
800,
3726,
3726,
113,
92,
31,
477,
21,
254,
2240,
18,
78,
5893,
8,
15950,
2801,
88,
13500,
2240,
18,
2761,
29,
1228,
1246,
5833,
60,
31,
22,
195,
216,
109,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I select a .Net application configuration file from a command line parameter?
===
I would like to override the use of the standard app.config by passing a command line parameter. How do I change the default application configuration file so that when I access ConfigurationMananger.AppSettings I am accessing the config file specified on the command line?
| 0 | [
2,
184,
107,
31,
5407,
21,
13,
9,
2328,
3010,
8091,
3893,
37,
21,
1202,
293,
18906,
60,
800,
3726,
3726,
31,
83,
101,
20,
84,
11891,
14,
275,
16,
14,
1236,
4865,
9,
14093,
2816,
34,
2848,
21,
1202,
293,
18906,
9,
184,
107,
31,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Smart pagination algorithm
===
I'm looking for an example algorithm of smart pagination. By smart, what I mean is that I only want to show, for example, 2 adjacent pages to the current page, so instead of ending up with a ridiculously long page list, I truncate it.
Here's a quick example to make it clearer... this is what I have now:
Pages: 1 2 3 4 [5] 6 7 8 9 10 11
This is what I want to end up with:
Pages: ... 3 4 [5] 6 7 ...
(In this example, I'm only showing 2 adjacent pages to the current page)
I'm implementing it in PHP/Mysql, and the "basic" pagination (no trucating) is already coded, I'm just looking for an example to optimize it... It can be an example in any language, as long as it gives me an idea as to how to implement it... | 0 | [
2,
3978,
19006,
108,
857,
9083,
800,
3726,
3726,
31,
22,
79,
699,
26,
40,
823,
9083,
16,
3978,
19006,
108,
857,
9,
34,
3978,
15,
98,
31,
884,
25,
30,
31,
104,
259,
20,
298,
15,
26,
823,
15,
172,
4209,
4434,
20,
14,
866,
2478... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can "list_display" in a Django ModelAdmin display attributes of ForeignKey fields?
===
I have a Person model that has a foreign key relationship to Book. Book has a number of fields, but I'm most concerned about "author" (a standard CharField).
With that being said, in my PersonAdmin model, I'd like to display "book.author" using "list_display". I've tried all of the obvious methods for doing so (see below), but nothing seems to work. Any suggestions?
class PersonAdmin(admin.ModelAdmin):
list_display = ['book.author',] | 0 | [
2,
92,
13,
7,
5739,
1,
2906,
5438,
7,
19,
21,
3857,
14541,
1061,
1283,
2160,
3042,
13422,
16,
1228,
4237,
2861,
60,
800,
3726,
3726,
31,
57,
21,
840,
1061,
30,
63,
21,
1228,
1246,
1429,
20,
360,
9,
360,
63,
21,
234,
16,
2861,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP templates - with PHP
===
What's the most elegant templating (preferably in pure PHP!) solution you've seen?
Specifically i'm interested in handling:
1. Detecting in a repeating block whether it's the first or last element
2. Easy handling of odd/even cases, like a zebra striped table, or similar
3. Other modulos logic, where you'd do something every n'th time.
I'm looking for something that makes this less of a pain:
<?php
$persons = array('John', 'Jack', 'Jill', 'Jason');
?>
<?php $i = 0; ?>
<?php if (isset($persons)): ?>
<ul>
<?php foreach ($persons as $name): ?>
<li class="<?= ($i++ % 2 === 0) ? 'odd' : 'even' ?>"><?= $name ?></li>
<?php endforeach ?>
</ul>
<?php endif ?>
Does it really take the mess above to create something like this below?
<ul>
<li class="odd">John</li>
<li class="even">Jack</li>
<li class="odd">Jill</li>
<li class="even">Jason</li>
</ul>
Is it only me that find the above near hideous?
All those starting and closing of php-tags makes me cringe.
| 0 | [
2,
13,
26120,
22894,
18,
13,
8,
29,
13,
26120,
800,
3726,
3726,
98,
22,
18,
14,
127,
11614,
13,
9577,
255,
1880,
13,
5,
3515,
2407,
4801,
19,
4267,
13,
26120,
187,
6,
4295,
42,
22,
195,
541,
60,
3524,
31,
22,
79,
3158,
19,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Refactoring Nicely with Version Control
===
A co worker of mine asked me to review some of my code and he sent me a diff file. I'm not new to diffs or version control in general but the diff file was very difficult to read because of the changes he made. Specifically, he used the "extract method" feature and reordered some methods. Conceptually, very easy to understand but looking at the diff, it was very hard to tell what he had done. It was much easier for me to checkout the previous revision and use Eclipse's "compare" feature, but it was still quite clunky.
Is there any version control system that stores metadata related to refactoring. Of course, it would be IDE and Programming Language specific, but we all use Eclipse and Java! Perhaps there might be some standard on which IDEs and version control implementations can play nicely? | 0 | [
2,
302,
17455,
68,
24050,
29,
615,
569,
800,
3726,
3726,
21,
326,
7444,
16,
1114,
411,
55,
20,
1487,
109,
16,
51,
1797,
17,
24,
795,
55,
21,
20811,
3893,
9,
31,
22,
79,
52,
78,
20,
20811,
18,
54,
615,
569,
19,
297,
47,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Limiting impact of credit card processing scripts/bots
===
I'm involved in building a donation form for non-profits. We recently got hit by a fast round of low dollar submissions. Many were invalid cards, but a few went through. Obviously someone wrote a script to check a bunch of card numbers for validity, possibly so they can sell them later.
Any ideas on how to prevent or limit the impact of this in the future?
We have control over all aspects of the system (code, webserver, etc). Yes the form runs over https. | 0 | [
2,
17567,
2261,
16,
3251,
2056,
5511,
17505,
118,
6813,
18,
800,
3726,
3726,
31,
22,
79,
1013,
19,
353,
21,
15390,
505,
26,
538,
8,
5888,
18,
9,
95,
1989,
330,
770,
34,
21,
1512,
560,
16,
708,
9311,
10923,
18,
9,
151,
46,
1667... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
WPF Alternative for python
===
Is there any alternative for WPF (windows presentation foundation) in python?
http://msdn.microsoft.com/en-us/library/aa970268.aspx#Programming_with_WPF
| 0 | [
2,
619,
7721,
2676,
26,
20059,
800,
3726,
3726,
25,
80,
186,
2676,
26,
619,
7721,
13,
5,
27508,
18,
6364,
1304,
6,
19,
20059,
60,
7775,
6903,
79,
18,
43,
103,
9,
22019,
12980,
9,
960,
118,
219,
8,
267,
118,
1210,
2559,
622,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... |
SQL query: Simulating an "AND" over several rows instead of sub-querying
===
Suppose I have a "tags" table with two columns: **tagid** and **contentid**. Each row represents a tag assigned to a piece of content. I want a query that will give me the contentid of every piece of content which is tagged with tagids 334, 338, and 342.
The "easy" way to do this would be (*pseudocode*):
select contentid from tags where tagid = 334 and contentid in (
select contentid from tags where tagid = 338 and contentid in (
select contentid from tags where tagid = 342
)
)
However, my gut tells me that there's a better, faster, more extensible way to do this. For example, what if I needed to find the intersection of 12 tags? This could quickly get horrendous. Any ideas? | 0 | [
2,
4444,
255,
25597,
45,
4861,
10038,
40,
13,
7,
290,
7,
84,
238,
11295,
700,
16,
972,
8,
8190,
8173,
800,
3726,
3726,
5787,
31,
57,
21,
13,
7,
8628,
18,
7,
859,
29,
81,
7498,
45,
13,
1409,
8628,
1340,
1409,
17,
13,
1409,
25... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Multiple H.264 video streams in one RTP session
===
I would like to dynamically switch the video source in a streaming video application. However, the different video sources have unique image dimensions. I can generate individual SDP files for each video source, but I would like to combine them into a single SDP file so that the viewing client could automatically resize the display window as the video source changed. Here are two example SDP files:
640x480.sdp:
<pre>
v=0
o=VideoServer 305419896 9876543210 IN IP4 192.168.0.2
s=VideoStream640x480
t=0 0
c=IN IP4 192.168.0.2
m=video 8000/2 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=0; profile-level-id=4D4033; sprop-parameter-sets=Z01AM5ZkBQHtCAAAAwAIAAADAYR4wZU=,aO48gJ==
a=control:trackID=1
</pre>
960x480.sdp:
<pre>
v=0
o=VideoServer 305419896 9876543210 IN IP4 192.168.0.2
s=VideoStream960x480
t=0 0
c=IN IP4 192.168.0.2
m=video 8000/2 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=0; profile-level-id=4D4033; sprop-parameter-sets=J01AM5WwPA9sBAIA,KO4G8gA=
a=control:trackID=1
</pre>
How can these individual files be combined into a single SDP file?
| 0 | [
2,
1886,
746,
9,
20470,
763,
9464,
19,
53,
761,
13726,
3723,
800,
3726,
3726,
31,
83,
101,
20,
7782,
1326,
5521,
14,
763,
1267,
19,
21,
11920,
763,
3010,
9,
207,
15,
14,
421,
763,
2662,
57,
2619,
1961,
9913,
9,
31,
92,
7920,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
HTML/Javascript app that runs on the filesystem, security issue
===
I'm putting together a little tool that some business people can run on their local filesystems, since we don't want to setup a host for it.
Basically, its just HTML + Javascript (using jQuery) to pull some reports using REST from a 3rd party.
The problem is, FF3 and IE don't allow the ajax call, I get:
Access to restricted URI denied" code: "1012
Obviously its an XSS issue...how do I work around it? The data returned is in XML format.
I was trying to do it this way:
$.get(productUrl, function (data)
{
alert (data);
}
); | 0 | [
2,
13,
15895,
118,
1004,
1385,
8741,
4865,
30,
1461,
27,
14,
3893,
10724,
15,
1221,
1513,
800,
3726,
3726,
31,
22,
79,
3873,
429,
21,
265,
5607,
30,
109,
508,
148,
92,
485,
27,
66,
375,
3893,
10724,
18,
15,
179,
95,
221,
22,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you decide if a project should be web-based or desktop-based?
===
I'm having trouble deciding if I want a project of mine to be web-based (as in a web-app), desktop-based (a desktop application), or a desktop application that can sync or connect to the cloud.
I don't know if anyone else would have an interest in this application, and it's only going to be for me, so I'm leaning toward desktop application. If, for some reason, I finish it, release it, and people actually like it, I might see about making it sync to the cloud as well (think v2). But I'm not sure how hard it is to make such a radical change, and I don't want to end up with something good that is useless because I made a poor choice before I even started the project.
Is there any sort of guidance for this? Any rules of thumb or best practices? Any personal experiences?
If the language matters, I'm thinking about Java simply because I'm most comfortable with it, and it would easily allow me to share it with my friends for testing and if I get stuck and need help from someone else in person. | 0 | [
2,
184,
107,
42,
4073,
100,
21,
669,
378,
44,
2741,
8,
1281,
54,
17404,
8,
1281,
60,
800,
3726,
3726,
31,
22,
79,
452,
2572,
11211,
100,
31,
259,
21,
669,
16,
1114,
20,
44,
2741,
8,
1281,
13,
5,
472,
19,
21,
2741,
8,
7753,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
OPTION(MAXDOP 1) in SQL Server
===
I have never clearly understood the usage of MAXDOP. I know it makes the query faster and thats the last that I can use in Query Optimization. But when and where it is best suited..
Thanks Guys!!! | 0 | [
2,
4255,
5,
8304,
43,
2594,
137,
6,
19,
4444,
255,
8128,
800,
3726,
3726,
31,
57,
243,
2885,
4014,
14,
7514,
16,
2049,
43,
2594,
9,
31,
143,
32,
1364,
14,
25597,
4233,
17,
30,
18,
14,
236,
30,
31,
92,
275,
19,
25597,
21597,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... |
Extracting Autocomplete Emails from Outlook 2007
===
I need to extract all the emails that show up as autocomplete entries in Outlook 2007. I mostly need to create a list of all the email addresses which I have sent emails to in the past and dump them into excel.
Should I be connecting to Outlook through COM somehow?
Thanks. | 0 | [
2,
10962,
68,
3108,
15990,
8517,
18,
37,
19837,
624,
800,
3726,
3726,
31,
376,
20,
10962,
65,
14,
8517,
18,
30,
298,
71,
28,
3108,
15990,
11399,
19,
19837,
624,
9,
31,
1555,
376,
20,
1600,
21,
968,
16,
65,
14,
8517,
12636,
56,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Methods for Geotagging or Geolabelling Text Content
===
What are some good algorithms for automatically labeling text with the city / region or origin? Are there packages that claim to do this with any degree of certainty?
I have looked at some tfidf based approaches, proper noun intersections, but so far, no spectacular successes, and I'd appreciate ideas! | 0 | [
2,
3195,
26,
6389,
8628,
2762,
54,
6389,
21018,
802,
1854,
2331,
800,
3726,
3726,
98,
50,
109,
254,
15935,
26,
7499,
1899,
68,
1854,
29,
14,
136,
13,
118,
632,
54,
2986,
60,
50,
80,
16875,
30,
2632,
20,
107,
48,
29,
186,
1168,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible to determine when a stored procedure was last modified in SQL Server 2003?
===
I know that you can do this in SQL Server 2005, but I'm at a loss for 2003. | 0 | [
2,
25,
32,
938,
20,
3746,
76,
21,
8214,
7004,
23,
236,
5372,
19,
4444,
255,
8128,
973,
60,
800,
3726,
3726,
31,
143,
30,
42,
92,
107,
48,
19,
4444,
255,
8128,
812,
15,
47,
31,
22,
79,
35,
21,
1526,
26,
973,
9,
3,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Switching from std::string to std::wstring for embedded applications?
===
Up until now I have been using std::string in my C++ applications for embedded system (routers, switches, telco gear, etc.).
For the next project, I am considering to switch from std::string to std::wstring for Unicode support. This would, for example, allow end-users to use Chinese characters in the command line interface (CLI).
What complications / headaches / surprises should I expect? What, for example, if I use a third-party library which still uses std::string?
Since support for international strings isn't that strong of a requirement for the type of embedded systems that I work on, I would only do it if it isn't going to cause major headaches. | 0 | [
2,
13027,
37,
354,
43,
45,
45,
11130,
20,
354,
43,
45,
45,
499,
11130,
26,
12138,
3767,
60,
800,
3726,
3726,
71,
163,
130,
31,
57,
74,
568,
354,
43,
45,
45,
11130,
19,
51,
272,
20512,
3767,
26,
12138,
329,
13,
5,
20179,
1224,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
.Net: Convert Generic List of Objects to DataSet
===
Does anyone have code to do this?
| 0 | [
2,
13,
9,
2328,
45,
8406,
12733,
968,
16,
3916,
20,
1054,
3554,
800,
3726,
3726,
630,
1276,
57,
1797,
20,
107,
48,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Best Source Control Solution for Oracle/ASP.NET Environment?
===
I am trying to plan a way for 5 developers to use Visual Studio 2005/2008 to collaboratively develop an ASP.NET web app on a development web server against an Oracle 8i(soon to be 10g) Database.
The developers are either on the local network or coming in over a vpn (not a very fast connection),
I evaluated the latest Visual SourceSafe, but ran into the following gotchas:
1) We can't use decentralized development because we can't replicate a development oracle database to all developers computers. Also, the vpn is too slow to let their local app instances connect to the database server.
2) Since VSS source code not on the file system, the only way to debug it is to build the app and run debugger, which only one developer can do at a time on a centralized development server. This is unacceptable. We tried using shadow folders so that every time a file is checked in it gets published to the app instance on the development server, but this failed for remote developers on the vpn.
3) Since the developers do a lot of web code, it is important for productivity reasons that when they SAVE a file, they should be able to immediately see the change working on the development server.
4) No easy way to implement a controlled process for pushing files to the production server.
Any suggestions on a source control solution that would work under these contraints?
Thanks in advance for any suggestions!
| 0 | [
2,
246,
1267,
569,
4295,
26,
15759,
118,
472,
306,
9,
2328,
2307,
60,
800,
3726,
3726,
31,
589,
749,
20,
944,
21,
161,
26,
331,
10168,
20,
275,
3458,
1120,
812,
118,
2753,
20,
12937,
102,
2803,
40,
28,
306,
9,
2328,
2741,
4865,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Converting a UNION query in MySQL
===
I have a very large table (8gb) with information about files, and i need to run a report against it that would would look something like this:
(select * from fs_walk_scan where file_path like '\\\\server1\\groot$\\%' order by file_size desc limit 0,30)
UNION ALL
(select * from fs_walk_scan where file_path like '\\\\server1\\hroot$\\%' order by file_size desc limit 0,30)
UNION ALL
(select * from fs_walk_scan where file_path like '\\\\server1\\iroot$\\%' order by file_size desc limit 0,30)
UNION ALL
(select * from fs_walk_scan where file_path like '\\\\server2\\froot$\\%' order by file_size desc limit 0,30)
UNION ALL
(select * from fs_walk_scan where file_path like '\\\\server2\\groot$\\%' order by file_size desc limit 0,30)
UNION ALL
(select * from fs_walk_scan where file_path like '\\\\server3\\hroot$\\%' order by file_size desc limit 0,30)
UNION ALL
(select * from fs_walk_scan where file_path like '\\\\server4\\iroot$\\%' order by file_size desc limit 0,30)
UNION ALL
(select * from fs_walk_scan where file_path like '\\\\server5\\iroot$\\%' order by file_size desc limit 0,30)
[...]
order by substring_index(file_path,'\\',4), file_size desc
This method accomplishes what I need to do: Get a list of the 30 biggest files for each volume. However, this is deathly slow, and the 'like' searches are hardcoded even though they are sitting in another table and can be gotten that way.
What I'm looking for is a way to do this without going through the huge table several times. Anyone have any ideas?
P.S. I cant change the structure of the huge source table in any way.
| 0 | [
2,
19583,
21,
667,
25597,
19,
51,
18,
22402,
800,
3726,
3726,
31,
57,
21,
253,
370,
859,
13,
5,
457,
11400,
6,
29,
676,
88,
6488,
15,
17,
31,
376,
20,
485,
21,
1330,
149,
32,
30,
83,
83,
361,
301,
101,
48,
45,
13,
5,
18,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Access denied when creating a virtual directory via Web Deployment Project
===
I’m trying to use a (VS 2008) Web Deployment project in a TFS solution to deploy the web site to the (TFS 2008) build server to run web based unit tests.
For some reason, that I can't yet figure out, it is failing to create the virtual directory:
Using "CreateVirtualDirectory" task from assembly "C:\Program Files\MSBuild\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.Tasks.dll".
Task "CreateVirtualDirectory"
Initializing IIS Web Server...
C:\Program Files\MSBuild\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets(667,5): error : Access is denied.
C:\Program Files\MSBuild\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets(667,5): error :
Failed to create virtual directory 'abc'.
Done executing task "CreateVirtualDirectory" -- FAILED.
The TFSService user certainly is in the Administrators group on the TFS Build machine (which is running Windows Server 2008). I don’t know what else could be wrong. I’ve checked the event log an there’s no clues there. I am able to manually create the virtual directory on that machine through the IIS console with no problem.
Any ideas what could be the problem or suggestions for how to diagnose this further?
| 0 | [
2,
1381,
5265,
76,
2936,
21,
6599,
16755,
1197,
2741,
10475,
669,
800,
3726,
3726,
31,
1,
79,
749,
20,
275,
21,
13,
5,
710,
18,
570,
6,
2741,
10475,
669,
19,
21,
13,
11720,
18,
4295,
20,
17617,
14,
2741,
689,
20,
14,
13,
5,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Classical set operations for java.util.Collection
===
Is there any built-in functionality for classical set operations on the java.util.Collection class? My specific implementation would be for ArrayList, but this sounds like something that should apply for all subclasses of Collection. I'm looking for something like:
ArrayList<Integer> setA ...
ArrayList<Integer> setB ...
ArrayList<Integer> setAintersectionB = setA.intersection(setB);
ArrayList<Integer> setAminusB = setA.subtract(setB);
After some searching, I was only able to find home-grown solutions. Also, I realize I may be confusing the idea of a "Set" with the idea of a "Collection", not allowing and allowing duplicates respectively. Perhaps this is really just functionality for the Set interface?
In the event that nobody knows of any built-in functionality, perhaps we could use this as a repository for standard practice Java set operation code? I imagine this wheel has been reinvented numerous times.
| 0 | [
2,
3089,
309,
1311,
26,
8247,
9,
14255,
9,
15015,
872,
800,
3726,
3726,
25,
80,
186,
392,
8,
108,
18548,
26,
3089,
309,
1311,
27,
14,
8247,
9,
14255,
9,
15015,
872,
718,
60,
51,
1903,
6123,
83,
44,
26,
7718,
5739,
15,
47,
48,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why is fread reaching the EOF early?
===
I am writing a C library that reads a file into memory. It skips the first 54 bytes of the file (header) and then reads the remainder as data. I use fseek to determine the length of the file, and then use fread to read in the file.
The loop runs once and then ends because the EOF is reached (no errors). At the end, bytesRead = 10624, ftell(stream) = 28726, and the buffer contains 28726 values. I expect fread to read 30,000 bytes and the file position to be 30054 when EOF is reached.
C is not my native language so I suspect I've got a dumb beginner mistake somewhere.
Code is as follows:
const size_t headerLen = 54;
FILE * stream;
errno_t ferrno = fopen_s( &stream, filename.c_str(), "r" );
if(ferrno!=0) {
return -1;
}
fseek( stream, 0L, SEEK_END );
size_t bytesTotal = (size_t)(ftell( stream )) - headerLen; //number of data bytes to read
size_t bytesRead = 0;
BYTE* localBuffer = new BYTE[bytesTotal];
fseek(stream,headerLen,SEEK_SET);
while(!feof(stream) && !ferror(stream)) {
size_t result = fread(localBuffer+bytesRead,sizeof(BYTE),bytesTotal-bytesRead,stream);
bytesRead+=result;
}
| 0 | [
2,
483,
25,
398,
10647,
2669,
14,
13,
62,
1041,
274,
60,
800,
3726,
3726,
31,
589,
1174,
21,
272,
1248,
30,
11137,
21,
3893,
77,
1912,
9,
32,
12532,
18,
14,
64,
5896,
34,
3231,
16,
14,
3893,
13,
5,
1743,
106,
6,
17,
94,
1113... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sql Server 2005 Connection Limit...
===
Is there a connection limit on Sql Server 2005 Developers Edition. We have many threads grabbing connections, and I know ADO.NET does connection pooling, but I get OutOfMemory exceptions. We take out the db connections and it works fine. | 0 | [
2,
4444,
255,
8128,
812,
2760,
4496,
9,
9,
9,
800,
3726,
3726,
25,
80,
21,
2760,
4496,
27,
4444,
255,
8128,
812,
10168,
1322,
9,
95,
57,
151,
20396,
9910,
6760,
15,
17,
31,
143,
21,
537,
9,
2328,
630,
2760,
3067,
68,
15,
47,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What guidelines are appropriate for determining when to implement a class member as a property versus a method?
===
The [.NET coding standards PDF from SubMain][1] that have started showing up in the "Sponsored By" area seems to indicate that properties are only appropriate for logical data members (see pages 34-35 of the document). Methods are deemed appropriate in the following cases:
<ul>
<li>The operation is a conversion, such as Object.ToString().
<li>The operation is expensive enough that you want to communicate to the user that they should consider caching the result.
<li>Obtaining a property value using the get accessor would have an observable side effect.
<li>Calling the member twice in succession produces different results.
<li>The order of execution is important.
<li>The member is static but returns a value that can be changed.
<li>The member returns an array.
</ul>
Do most developers agree on the properties vs. methods argument above? If so, why? If not, why not?
[1]: http://submain.com/landing/codeit.right/?utm_campaign=codeit.right&utm_medium=textad&utm_source=stackoverflow | 0 | [
2,
98,
12629,
50,
4593,
26,
13521,
76,
20,
8713,
21,
718,
322,
28,
21,
1354,
5706,
21,
2109,
60,
800,
3726,
3726,
14,
636,
9,
2328,
13,
15458,
3364,
13,
11124,
37,
972,
6232,
500,
2558,
165,
500,
30,
57,
373,
3187,
71,
19,
14,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
On Win32 how do you move a thread to another cpu core?
===
I'd like to make sure that a thread is moved to a specific cpu core & can never be moved from it by the scheduler.
There's a SetThreadAffinityMask() call but there's no GetThreadAffinityMask().
The reason I need this is because high resoultion timers will get messed up if the scheduler moves that thread to another cpu. | 0 | [
2,
27,
628,
3125,
184,
107,
42,
780,
21,
9322,
20,
226,
17578,
2884,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
233,
562,
30,
21,
9322,
25,
385,
20,
21,
1903,
17578,
2884,
279,
92,
243,
44,
385,
37,
32,
34,
14,
4345,
139,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
VMWare server vs ESXi - what't the difference?
===
I can't figure out what is the difference between these two programs.
Specifically, I'm interested in running a virtual server in the background, as a daemon (Linux host OS)
| 0 | [
2,
13,
20147,
5011,
8128,
4611,
13,
160,
5845,
13,
8,
98,
22,
38,
14,
2841,
60,
800,
3726,
3726,
31,
92,
22,
38,
1465,
70,
98,
25,
14,
2841,
128,
158,
81,
1726,
9,
3524,
15,
31,
22,
79,
3158,
19,
946,
21,
6599,
8128,
19,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... |
Docking a CControlBar derived window
===
How can I dock a CControlBar derived window to the middle of a splitter window (CSplitterWnd)? I would like the bar to be repositioned whenever the splitter is moved.
To make it a little clearer as to what I'm after, imagine the vertical ruler in the Dialog Editor in Visual Studio (MFC only). It gets repositioned whenever the tree view is resized. | 0 | [
2,
6120,
68,
21,
272,
12898,
1850,
3981,
1463,
800,
3726,
3726,
184,
92,
31,
6120,
21,
272,
12898,
1850,
3981,
1463,
20,
14,
772,
16,
21,
2132,
815,
1463,
13,
5,
150,
25603,
815,
6156,
43,
6,
60,
31,
83,
101,
14,
748,
20,
44,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Basic programming/algorithmic concepts
===
I'm about to start (with fellow programmers) a programming & algorithms club in my high school. The language of choice is C++ - sorry about that, I possibly can't change this. We can assume students have little to none experience in the aforementioned topics.
What do you think are the most basic concepts I should focus on?
I know that teaching something that's already obvious to me isn't an easy task. I realize that the very first meeting should be given an extreme attention - to not scare students away - hence I ask you.
Thanks you very much for replies. | 0 | [
2,
2125,
3143,
118,
192,
6979,
49,
96,
5410,
8700,
800,
3726,
3726,
31,
22,
79,
88,
20,
799,
13,
5,
1410,
1657,
17968,
18,
6,
21,
3143,
279,
15935,
288,
19,
51,
183,
116,
9,
14,
816,
16,
1837,
25,
272,
20512,
13,
8,
1875,
88... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Should log file streams be opened/closed on each write or kept open during a desktop application's lifetime?
===
Should log classes open/close a log file stream on each write to the log file or should it keep the log file stream open throughout the application's lifetime until all logging is complete?
I'm asking in context of a desktop application. I have seen people do it both ways and was wondering which approach yields the best all-around results for a logger. | 0 | [
2,
378,
6738,
3893,
9464,
44,
520,
118,
20372,
27,
206,
2757,
54,
1025,
368,
112,
21,
17404,
3010,
22,
18,
5277,
60,
800,
3726,
3726,
378,
6738,
2684,
368,
118,
14330,
21,
6738,
3893,
3766,
27,
206,
2757,
20,
14,
6738,
3893,
54,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Versioning a MySQL database when code base doesn't have a ORM
===
I've been thinking about this problem for a while and have yet to come up with any stable/elegant ideas.
I know with MyISAM tables, you can get the table def update time but thats not so true with InnoDB and I've found its not even reliable to look at the .frm file for an idea of when the definition might have been modified.... nevermind if the dataset has been changed.
I had an idea of every 30 minutes mysqldumping the contents of a schema, breaking that apart with an AWK script, then diffing that to the last version... but that seems a little excessive and could be a problem if the dataset involved is large. | 0 | [
2,
615,
68,
21,
51,
18,
22402,
6018,
76,
1797,
1000,
1437,
22,
38,
57,
21,
54,
79,
800,
3726,
3726,
31,
22,
195,
74,
1440,
88,
48,
1448,
26,
21,
133,
17,
57,
768,
20,
340,
71,
29,
186,
4521,
118,
532,
9652,
38,
3478,
9,
31... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Javascript callback when IFRAME is finished loading?
===
I need to execute a callback when an IFRAME has finished loading. I have no control over the content in the IFRAME, so I can't fire the callback from there.
This IFRAME is programmaticly created, and I need to pass its data as a variable in the callback, as well as destroy the iframe.
Any ideas? | 0 | [
2,
8247,
8741,
645,
1958,
76,
31,
8361,
25,
842,
12797,
60,
800,
3726,
3726,
31,
376,
20,
15644,
21,
645,
1958,
76,
40,
31,
8361,
63,
842,
12797,
9,
31,
57,
90,
569,
84,
14,
2331,
19,
14,
31,
8361,
15,
86,
31,
92,
22,
38,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Make your collections thread-safe?
===
When designing a collection class, is there any reason not to implement locking privately to make it thread safe? Or should I leave that responsibility up to the consumer of the collection? | 0 | [
2,
233,
154,
5721,
9322,
8,
18166,
60,
800,
3726,
3726,
76,
15026,
21,
1206,
718,
15,
25,
80,
186,
1215,
52,
20,
8713,
17538,
9326,
20,
233,
32,
9322,
1834,
60,
54,
378,
31,
767,
30,
4024,
71,
20,
14,
6461,
16,
14,
1206,
60,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Serialization of an long array (in C)
===
in a C program I have an long* that I want to serialize (thus converting to chars). A long doesn't fit in a single char, and the size varies depending of the processor (can be 4 bytes or 8 bytes).
Theres a good way to make the serialization and de-serialization? | 0 | [
2,
5956,
1829,
16,
40,
175,
7718,
13,
5,
108,
272,
6,
800,
3726,
3726,
19,
21,
272,
625,
31,
57,
40,
175,
2483,
30,
31,
259,
20,
5956,
2952,
13,
5,
11782,
19583,
20,
4892,
18,
6,
9,
21,
175,
1437,
22,
38,
2742,
19,
21,
345... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Need help improving a Ruby DSL for controlling an Arduino controlled drink dispenser (bar monkey)
===
I'm writing a DSL in Ruby to control an Arduino project I'm working on; Bardino. It's a bar monkey that will be software controlled to serve drinks. The Arduino takes commands via the serial port to tell the Arduino what pumps to turn on and for how long.
It currently reads a recipe (see below) and prints it back out. The code for serial communications still need to be worked in as well as some other ideas that I have mentioned below.
This is my first DSL and I'm working off of a previous example so it's very rough around the edges. Any critiques, code improvements (are there any good references for Ruby DSL best practices or idioms?) or any general comments.
I currently have a rough draft of the DSL so a drink recipe looks like the following ([Github link][1]):
desc "Simple glass of water"
recipe "water" do
ingredients(
"Water" => 2.ounces
)
end
This in turn is interpreted and currently results with the following ([Github link][2]):
[mwilliams@Danzig barduino-tender]$ ruby barduino-tender.rb examples/water.rb
Preparing: Simple glass of water
Ingredients:
Water: 2 ounces
This is a good start for the DSL, however, I do think it could be implemented a little bit better. Some ideas I had below:
1. Defining what "ingredients" are available using the name of the ingredient and the number pump that it's connected to. Maybe using a hash? ingredients = {"water" => 1, "vodka" => 2}. This way, when an ingredient is interpreted it can either a) send the pump number over the serial port followed by the number of ounces for the Arduino to dispense b) tell the user that ingredient does not exist and abort so nothing is dispensed c) easily have the capability to change or add new ingredients if they're changed.
2. Making the recipe look less code like, which is the main purpose of a DSL, maybe build a recipe builder? Using the available ingredients to prompt the user for a drink name, ingredients involved and how much?
The Github project is [here][3], feel free to fork and make pull requests, or post your code suggestions and examples here for other users to see. And if you're at all curious, the Arduino code, using the Ruby Arduino Development framework is [here][4].
[1]: http://github.com/mwilliams/barduino-tender/tree/571fb9128c02ce72b1f891d841930bf526f1432c/examples/water.rb
[2]: http://github.com/mwilliams/barduino-tender/tree/571fb9128c02ce72b1f891d841930bf526f1432c/barduino-tender.rb
[3]: http://github.com/mwilliams/barduino-tender/tree/master
[4]: http://github.com/mwilliams/barduino/tree/master | 0 | [
2,
376,
448,
9273,
21,
10811,
13,
43,
18,
255,
26,
10106,
40,
13,
1514,
291,
3252,
3959,
2610,
25494,
139,
13,
5,
1850,
11861,
6,
800,
3726,
3726,
31,
22,
79,
1174,
21,
13,
43,
18,
255,
19,
10811,
20,
569,
40,
13,
1514,
291,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
In c++, why does the compiler choose the non-const function when the const would work also?
===
For example, suppose I have a class:
class Foo
{
public:
std::string& Name()
{
m_maybe_modified = true;
return m_name;
}
const std::string& Name() const
{
return m_name;
}
protected:
std::string m_name;
bool m_maybe_modified;
};
And somewhere else in the code, I have something like this:
Foo *a;
// Do stuff...
std::string name = a->Name(); // <-- chooses the non-const version
Does anyone know why the compiler would choose the non-const version in this case?
This is a somewhat contrived example, but the actual problem we are trying to solve is periodically auto-saving an object if it has changed, and the pointer must be non-const because it might be changed at some point. | 0 | [
2,
19,
272,
20512,
15,
483,
630,
14,
21486,
3538,
14,
538,
8,
12124,
38,
1990,
76,
14,
11608,
38,
83,
170,
67,
60,
800,
3726,
3726,
26,
823,
15,
5787,
31,
57,
21,
718,
45,
718,
4310,
111,
13,
1,
317,
45,
354,
43,
45,
45,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Testing onbeforeunload events from Selenium
===
I'm trying to write a Selenium test for a web page that uses an onbeforeunload event to prompt the user before leaving. Selenium doesn't seem to recognize the confirmation dialog that comes up, or to provide a way to hit OK or Cancel. Is there any way to do this? I'm using the Java Selenium driver, if that's relevant. | 0 | [
2,
4431,
27,
12750,
1020,
8294,
963,
37,
23027,
14311,
800,
3726,
3726,
31,
22,
79,
749,
20,
2757,
21,
23027,
14311,
1289,
26,
21,
2741,
2478,
30,
2027,
40,
27,
12750,
1020,
8294,
807,
20,
11443,
4417,
14,
4155,
115,
1107,
9,
2302... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
RSS Item updates
===
I'm working on an RSS feed for a custom tasking system we use, and I'm still wrapping my head around how things should work. What I want to have is a feed for each user that shows tasks assigned to them, and additionally a feed for each task that shows updates for the task.
What I want to know right now concerns the user feed. When a case assigned to a user is updated, I currently have code to change the pubDate entry for that item and the lastBuildDate for the channel. I was hoping this would make the item appear as unread in readers so that the user would know to look at the item again, but this seems not to be the case. I could change the guid instead, but then it would be treated as a whole new item. Is there anything I'm missing? How can I solve this? | 0 | [
2,
13,
1224,
18,
9101,
16779,
800,
3726,
3726,
31,
22,
79,
638,
27,
40,
13,
1224,
18,
4063,
26,
21,
5816,
3005,
68,
329,
95,
275,
15,
17,
31,
22,
79,
174,
13437,
51,
157,
140,
184,
564,
378,
170,
9,
98,
31,
259,
20,
57,
25... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I deploy a python desktop application?
===
I have started on a personal python application that runs on the desktop. I am using wxpython as a GUI tolkit. Should there be a demad for this type of application, I would like to possibly commerialize it.
I have no knowledge about deploying "real-life" python applications. I have used py2exe in the past with off and on success...Also how would can I obfusticate the code, can I somehow deploy the bytecode only?
An ideal solution would not jeapordize my intellectual property (my source code), would not require a direct install of python (though i'm sure it will have to be some embedded interpreter), and would be cross-platform (windows, mac, linux). Does anyone know of any tools or resources in the area?
Thanks. | 0 | [
2,
184,
107,
31,
17617,
21,
20059,
17404,
3010,
60,
800,
3726,
3726,
31,
57,
373,
27,
21,
1319,
20059,
3010,
30,
1461,
27,
14,
17404,
9,
31,
589,
568,
619,
396,
6448,
11570,
28,
21,
9457,
20,
9093,
242,
9,
378,
80,
44,
21,
121... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
registers vs stacks
===
What exactly are the advantages and disadvantages to using a register-based virtual machine versus using a stack-based virtual machine?
To me, it would seem as though a register based machine would be more straight-forward to program and more efficient. So why is it that the JVM, the CLR, and the Python VM are all stack-based? | 0 | [
2,
2243,
18,
4611,
7566,
18,
800,
3726,
3726,
98,
1890,
50,
14,
14683,
17,
13387,
18,
20,
568,
21,
2243,
8,
1281,
6599,
1940,
5706,
568,
21,
7566,
8,
1281,
6599,
1940,
60,
20,
55,
15,
32,
83,
2260,
28,
362,
21,
2243,
432,
1940... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C#, how to compare two datatables A + B, how to show rows which are in B but not in A
===
OK so I have two datatables A and B. They are both produced from CSV files. I need to be able to check which rows exist in B that do not exist in A.
Is there a way to do some sort of query to show the different rows or would I have to iterate through each row on each DataTable to check if they are the same. The later option seems to be very intensive if the tables become large.
Thanks for the help. | 0 | [
2,
272,
5910,
15,
184,
20,
11590,
81,
1054,
5924,
18,
21,
2754,
334,
15,
184,
20,
298,
11295,
56,
50,
19,
334,
47,
52,
19,
21,
800,
3726,
3726,
5854,
86,
31,
57,
81,
1054,
5924,
18,
21,
17,
334,
9,
59,
50,
156,
671,
37,
27... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Character offset in an Internet Explorer TextRange
===
As far as I can tell there's no simple way of retrieving a character offset from a TextRange object in Internet Explorer. The W3C Range object has a node, and the offset into the text within that node. IE seems to just have pixel offsets. There are methods to create, extend and compare ranges, so it would be possible to write an algorithm to calculate the character offset, but I feel I must be missing something.
So, what's the easiest way to calculate the character offset of the start of an Internet Explorer TextRange? | 0 | [
2,
925,
17493,
19,
40,
2620,
8520,
1854,
8366,
800,
3726,
3726,
28,
463,
28,
31,
92,
494,
80,
22,
18,
90,
1935,
161,
16,
13,
6239,
3272,
8397,
21,
925,
17493,
37,
21,
1854,
8366,
3095,
19,
2620,
8520,
9,
14,
619,
240,
150,
978... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.