unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
How can I define an accesskey for an invisible control
===
I have a `<button>` with an accesskey assgined to it. The accesskey works fine as long as the button is visible, but when I set `display: none` or `visibility: hidden`, the accesskey no longer works.
Also tried without success:
- Use a different element type: a, input (various types, even typeless).
- Assign the accesskey to a label that wraps the invisible control.
Note, I'm not sure if this is the standard behavior, but prior to Firefox 3 the accesskey seemed to worked regardless of visibility. | 0 | [
2,
184,
92,
31,
9267,
40,
1381,
4237,
26,
40,
8874,
569,
800,
3726,
3726,
31,
57,
21,
13,
1,
811,
444,
1,
29,
40,
1381,
4237,
28,
18,
5831,
69,
20,
32,
9,
14,
1381,
4237,
693,
1123,
28,
175,
28,
14,
5167,
25,
4560,
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... |
ASP.NET Session Scope: where can it be accessed from?
===
This seems trivial, but I've never had to worry about it before and my Google skills are failing me. How far-reaching is the in-process session bucket for ASP.NET/IIS6, in the sense that you can call Session["whatever"] and get the same value back? Obviously it can't stretch across different servers or application pools (I think). What about different web sites in the same application pool? Can those two see each other's session variables for a user? What about two different virtual directories each with their own web.config?
Thanks! | 0 | [
2,
28,
306,
9,
2328,
3723,
9914,
45,
113,
92,
32,
44,
12904,
37,
60,
800,
3726,
3726,
48,
2206,
13,
19712,
15,
47,
31,
22,
195,
243,
41,
20,
3189,
88,
32,
115,
17,
51,
8144,
3207,
50,
7250,
55,
9,
184,
463,
8,
18700,
68,
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... |
What's wrong with this Delphi unit?
===
Delphi 2009 complains with an E2283 error: [DCC Error] outputcode.pas(466): E2283 Too many local constants. Use shorter procedures
Delphi 2007 compiles just fine. I can't find an abundance of local constants, it's a short (500 line) unit. Do you see any abundance of constants or literals I can address?
unit outputcode;
{$IFDEF VER150}
{$WARN UNSAFE_TYPE OFF}
{$WARN UNSAFE_CODE OFF}
{$WARN UNSAFE_CAST OFF}
{$WARN SYMBOL_PLATFORM OFF}
{$WARN UNIT_PLATFORM OFF}
{$ENDIF}
interface
uses
{$IFDEF WIN32}
Windows,
Messages,
Graphics,
Controls,
Forms,
Dialogs,
StdCtrls,
ComCtrls,
Buttons,
ExtCtrls,
SyntaxEd,
SynParse,
WinUtils,
SafeRichEdit,
{$ENDIF}
{$IFDEF LINUX}
QGraphics,
QControls,
QForms,
QDialogs,
QStdCtrls,
QComCtrls,
QButtons,
QExtCtrls,
drmrichedit,
linutil,
{$ENDIF}
SysUtils,
Classes,
drmreg,
DB,
adsdata,
adsfunc,
adstable,
adscnnct,
ace,
adsset;
type
TCodeType = ( ctPascal, ctCPP, ctSQL );
TOutputCodeForm = class(TForm)
drmReg1: TdrmReg;
dlgSave: TSaveDialog;
CodeTable: TAdsTable;
CodeConnection: TAdsConnection;
Panel1: TPanel;
Panel2: TPanel;
StatusBar1: TStatusBar;
Panel3: TPanel;
btnSQLWindow: TBitBtn;
Panel4: TPanel;
btnHeader: TButton;
SaveAsButton: TButton;
CloseButton: TButton;
procedure SaveAsButtonClick(Sender: TObject);
procedure CloseButtonClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure btnHeaderClick(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure btnSQLWindowClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
poCode : TStringList;
poHeader : TStringList;
CodeType : TCodeType;
public
poCodeOutput : TSyntaxMemo;
cppParser : TSyntaxMemoParser;
SQLParser : TSyntaxMemoParser;
pasParser : TSyntaxMemoParser;
constructor Create( AOwner : TComponent;
ctType : TCodeType;
poCode : TStringList;
poHeader : TStringList ); reintroduce;
end;
var
OutputCodeForm: TOutputCodeForm;
const
giTableName : integer = 0;
giPath : integer = 1;
giTableType : integer = 2;
giIndexes : integer = 3;
implementation
uses
{$IFDEF WIN32}
TableToCode,
{$ENDIF}
main,
vistafuncs;
{$R *.dfm}
procedure TOutputCodeForm.SaveAsButtonClick(Sender: TObject);
var
iPos : integer;
iFilePos : integer;
strFileName : string;
begin
if ( CodeType = ctPascal ) then
begin
dlgSave.Filter := 'Pascal files (*.pas)|*.PAS|All Files (*.*)| *.*';
dlgSave.InitialDir := drmReg1.GetItem('OutDir',
varString,
ExtractFilePath(Application.exeName));
if dlgSave.Execute then
begin
drmReg1.PutItem( 'OutDir', ExtractFileDir( dlgSave.FileName ) );
{* The Unit name needs to be the same as the FileName in Delpi, so
check to see if the developer has changed the name. If the name
has been changed by the developer it is their problem to make sure
that the unit name and file name is correct; however, if the
unit name has not been edited the name will be changed. *}
iFilePos := poCodeOutput.Lines.IndexOf( 'unit CreateTables;' );
if( iFilePos <> -1 ) then
begin
strFileName := ExtractFileName( dlgSave.FileName );
{* The file extension needs to be removed from the filename.
Determine the position of the extension in the string and
then use the delete function *}
iPos := pos( ExtractFileExt( strFileName ), strFileName );
if( iPos <> 0 ) then
Delete( strFileName, iPos, 4 );
poCodeOutput.Lines.Delete( iFilePos );
poCodeOutput.Lines.Insert( iFilePos, 'unit ' + strFileName + ';' );
end;
{* If the developer doesnt type in the .pas extension, it will
still be added, if the FilterIndex is still on *.pas *}
if( dlgSave.FilterIndex = 1 ) then
begin
if CompareText(ExtractFileExt( dlgSave.FileName ), '.pas') <> 0 then
dlgSave.FileName := dlgSave.FileName + '.pas';
end;
poCodeOutput.Lines.SaveToFile( dlgSave.FileName );
end
end
else
if( CodeType = ctCPP ) then
begin
dlgSave.Filter := 'C++ Source File (*.cpp)|*.CPP|All Files (*.*)| *.*';
dlgSave.InitialDir := drmReg1.GetItem('OutDir',
varString,
ExtractFilePath(Application.exeName));
if dlgSave.Execute then
begin
{* Make sure the most recent changes to the TMemoField are
saved to the TStringLists for the CPP and header files. *}
if( btnHeader.Caption = '&View Header' ) then
begin
poCode.Clear;
poCode.AddStrings( poCodeOutput.Lines );
end
else
begin
poHeader.Clear;
poHeader.AddStrings( poCodeOutput.Lines );
end;
drmReg1.PutItem( 'OutDir', ExtractFileDir( dlgSave.FileName ) );
{* If the developer doesn't type in the .cpp extension it will
still be added if the FilterIndex is still on *.cpp *}
if( dlgSave.FilterIndex = 1 ) then
begin
if CompareText(ExtractFileExt( dlgSave.FileName ), '.cpp') <> 0 then
dlgSave.FileName := dlgSave.FileName + '.cpp';
end;
{* Before we save the cpp file, we need to put the correct header
* name in the "include" statement, using the name they just
* entered. *}
iFilePos := poCode.IndexOf( '#include "CreateTables.h"' );
if( iFilePos <> -1 ) then
begin
strFileName := ExtractFileName( dlgSave.FileName );
{* The file extension needs to be removed from the filename.
Determine the position of the extension in the string and
then use the delete function *}
iPos := pos( ExtractFileExt( strFileName ), strFileName );
if( iPos <> 0 ) then
Delete( strFileName, iPos, 4 );
poCode.Delete( iFilePos );
poCode.Insert( iFilePos, '#include "' + strFileName + '.h"' );
end;
poCode.SaveToFile( dlgSave.FileName );
strFileName := dlgSave.FileName;
{* The file extension needs to be removed from the filename.
Determine the position of the extension in the string and
then use the delete function *}
iPos := pos( ExtractFileExt( strFileName ), strFileName );
if( iPos <> 0 ) then
Delete( strFileName, iPos, 4 );
poHeader.SaveToFile( strFileName + '.h' );
end;
end
else
begin
dlgSave.Filter := 'SQL Script (*.sql)|*.SQL|All Files (*.*)| *.*';
dlgSave.InitialDir := drmReg1.GetItem('OutDir',
varString,
ExtractFilePath(Application.exeName));
if dlgSave.Execute then
begin
drmReg1.PutItem( 'OutDir', ExtractFileDir( dlgSave.FileName ) );
{* If the developer doesnt type in the .sql extension it will *}
{* still be added if the FilterIndex is still on *.sql *}
if( dlgSave.FilterIndex = 1 ) then
begin
if CompareText(ExtractFileExt( dlgSave.FileName ), '.sql') <> 0 then
dlgSave.FileName := dlgSave.FileName + '.sql';
end;
poCodeOutput.Lines.SaveToFile( dlgSave.FileName );
end;
end;
end;
procedure TOutputCodeForm.CloseButtonClick(Sender: TObject);
begin
Close();
end;
procedure TOutputCodeForm.FormShow(Sender: TObject);
begin
{$IFDEF WIN32}
if( TableToCodeForm.CodeTypeGroup1.ItemIndex = 1 ) then
begin
btnHeader.Enabled := True;
btnHeader.Visible := True;
end;
{$ENDIF}
{* Get memo styles from the registry. *}
SQLParser.StylesFromRegistry( TRUE, '' );
end;
procedure TOutputCodeForm.btnHeaderClick(Sender: TObject);
begin
{* The CPP is currently being viewed by the developer the btnHeader caption
will read view the Header File. *}
if( btnHeader.Caption = '&View Header' ) then
begin
{* To save what changes have been made by the developer clear out the
old code and replace it with the current code in the TMemoField. *}
poCode.Clear;
poCode.AddStrings( poCodeOutput.Lines );
{* Clear out the TMemoField now and display the contents of the Header File *}
poCodeOutput.Clear;
poCodeOutput.Lines.AddStrings( poHeader );
{* Change the caption fo the button to read view the CPP file *}
btnHeader.Caption := '&View CPP';
end
else
begin
{* To save what changes have been made by the developer clear out the
old code and replace it with the current code in the TMemoField. *}
poHeader.Clear;
poHeader.AddStrings( poCodeOutput.Lines );
{* Clear out the TMemoField now and display the contents of the CPP File *}
poCodeOutput.Clear;
poCodeOutput.Lines.AddStrings( poCode );
{* Change the caption fo the button to read view the Header file *}
btnHeader.Caption := '&View Header';
end;
end;
procedure TOutputCodeForm.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if ( Key = VK_ESCAPE ) then
self.Close();
end;
procedure TOutputCodeForm.btnSQLWindowClick(Sender: TObject);
begin
mainform.SQLNATIVE1Click( Sender );
gpoLastSQLWindowOpened.Editor.ActiveMemo.Lines.Assign( poCodeOutput.Lines );
close;
end;
procedure TOutputCodeForm.FormCreate(Sender: TObject);
var
poParser : TStringStream;
begin
if ( IsWindowsVista() ) then
begin
SetVistaFonts( self );
end;
poParser := TStringStream.Create( gstrSQLParser );
SQLParser := TSyntaxMemoParser.Create( self );
SQLParser.RegistryKey := '\Software\Advantage Data Architect\SQLSyntaxMemo';
SQLParser.UseRegistry := True;
SQLParser.CompileFromStream( poParser );
FreeAndNil( poParser );
poParser := TStringStream.Create( gstrCPPParser );
cppParser := TSyntaxMemoParser.Create( self );
cppParser.RegistryKey := '\Software\Advantage Data Architect\SQLSyntaxMemo';
cppParser.UseRegistry := True;
cppParser.CompileFromStream( poParser );
FreeAndNil( poParser );
poParser := TStringStream.Create( gstrPasParser );
pasParser := TSyntaxMemoParser.Create( self );
pasParser.RegistryKey := '\Software\Advantage Data Architect\SQLSyntaxMemo';
pasParser.Script := ExtractFilePath( Application.ExeName ) + 'pasScript.txt';
pasParser.CompileFromStream( poParser );
{* Free the stream since we are finished with it. *}
FreeAndNil( poParser );
poCodeOutput := TSyntaxMemo.Create( self );
poCodeOutput.Parent := Panel1;
poCodeOutput.Left := 8;
poCodeOutput.Top := 8;
poCodeOutput.Width := Panel1.Width - 16;
poCodeOutput.Height := Panel1.Height - 16;
poCodeOutput.ClipCopyFormats := [smTEXT, smRTF];
poCodeOutput.Font.Charset := ANSI_CHARSET;
poCodeOutput.Font.Color := clWindowText;
poCodeOutput.Font.Height := -11;
poCodeOutput.Font.Name := 'Courier New';
poCodeOutput.Font.Style := [];
poCodeOutput.GutterFont.Charset := DEFAULT_CHARSET;
poCodeOutput.GutterFont.Color := clWindowText;
poCodeOutput.GutterFont.Height := -11;
poCodeOutput.GutterFont.Name := 'MS Sans Serif';
poCodeOutput.GutterFont.Style := [];
poCodeOutput.HyperCursor := crDefault;
poCodeOutput.IndentStep := 1;
poCodeOutput.Margin := 2;
poCodeOutput.Modified := False;
poCodeOutput.MonoPrint := True;
poCodeOutput.Options := [smoSyntaxHighlight, smoPrintWrap, smoPrintLineNos, smoPrintFilename, smoPrintDate, smoPrintPageNos, smoAutoIndent, smoTabToColumn, smoWordSelect, smoShowRMargin, smoShowGutter, smoShowWrapColumn, smoTitleAsFilename, smoProcessDroppedFiles, smoBlockOverwriteCursor, smoShowWrapGlyph, smoColumnTrack, smoUseTAB, smoSmartFill, smoOLEDragSource];
poCodeOutput.ReadOnly := False;
poCodeOutput.RightMargin := 80;
poCodeOutput.SaveFormat := sfTEXT;
poCodeOutput.ScrollBars := ssBoth;
poCodeOutput.SelLineStyle := lsCRLF;
poCodeOutput.SelStart := 3;
poCodeOutput.SelLength := 0;
poCodeOutput.SelTextColor := clWhite;
poCodeOutput.SelTextBack := clBlack;
poCodeOutput.TabDefault := 4;
poCodeOutput.TabOrder := 0;
poCodeOutput.VisiblePropEdPages := [ppOPTIONS, ppHIGHLIGHTING, ppKEYS, ppAUTOCORRECT, ppTEMPLATES];
poCodeOutput.WrapAtColumn := 0;
poCodeOutput.OnKeyDown := FormKeyDown;
poCodeOutput.ActiveParser := 3;
poCodeOutput.Anchors := [akLeft, akTop, akRight, akBottom];
poCodeOutput.Parser1 := pasParser;
poCodeOutput.Parser2 := cppParser;
poCodeOutput.Parser3 := SQLParser;
SQLParser.AttachEditor( poCodeOutput );
cppParser.AttachEditor( poCodeOutput );
pasParser.AttachEditor( poCodeOutput );
poCodeOutput.Lines.AddStrings( poCode );
if ( CodeType = ctCPP ) then
poCodeOutput.ActiveParser := 2
else if ( CodeType = ctPascal ) then
poCodeOutput.ActiveParser := 1
else
poCodeOutput.ActiveParser := 3;
MainForm.AdjustFormSize( self, 0.95, 0.75 );
end;
constructor TOutputCodeForm.Create( AOwner : TComponent;
ctType : TCodeType;
poCode : TStringList;
poHeader : TStringList);
begin
inherited Create( AOwner );
self.poCode := TStringList.Create;
if ( not Assigned( poCode ) ) then
Exception.Create( 'No code to display.' )
else
self.poCode.AddStrings( poCode );
if ( not Assigned( poHeader ) ) then
begin
if ( ctType = ctCPP ) then
Exception.Create( 'No Header to display.' )
else
self.poHeader := nil;
end
else
begin
self.poHeader := TStringList.Create;
self.poHeader.AddStrings( poHeader );
end;
CodeType := ctType;
if ( CodeType = ctSQL ) then
begin
btnSQLWindow.Visible := True;
btnSQLWindow.Enabled := True;
end
else
begin
btnSQLWindow.Visible := False;
btnSQLWindow.Enabled := False;
end;
end;
procedure TOutputCodeForm.FormDestroy(Sender: TObject);
begin
if ( Assigned( poHeader ) ) then
FreeAndNil( poHeader );
if ( Assigned( poCode ) ) then
FreeAndNil( poCode );
end;
{*******************************************************************************
* Module: TOutputCodeForm.FormClose
* Date: 06-Jan-2004
* Input: Sender : Object that called the event.
* Output: Action : TCloseAction to take when the form is closed
* Description: Forces the form to be closed.
*******************************************************************************}
procedure TOutputCodeForm.FormClose( Sender : TObject;
var Action : TCloseAction);
begin
Action := caFree;
end;
end.
| 0 | [
2,
98,
22,
18,
1389,
29,
48,
23030,
1237,
60,
800,
3726,
3726,
23030,
588,
15310,
18,
29,
40,
13,
62,
135,
24867,
7019,
45,
636,
43,
3384,
7019,
500,
5196,
9375,
9,
11722,
5,
300,
3526,
6,
45,
13,
62,
135,
24867,
266,
151,
375... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Improve oracle query performance without indexing
===
What are some things I can do to improve query performance of an oracle query without creating indexes?
Here is the query I'm trying to run faster:
SELECT c.ClaimNumber, a.ItemDate, c.DTN, b.FilePath
FROM items a,
itempages b,
keygroupdata c
WHERE a.ItemType IN (112,115,189,241)
AND a.ItemNum = b.ItemNum
AND b.ItemNum = c.ItemNum
ORDER BY a.DateStored DESC
None of these columns are indexed and each of the tables contains millions of records. Needless to say, it takes over 3 and half minutes for the query to execute. This is a third party database in a production environment and I'm not allowed to create any indexes so any performance improvements would have to be made to the query itself.
Thanks! | 0 | [
2,
3545,
15759,
25597,
956,
366,
4348,
68,
800,
3726,
3726,
98,
50,
109,
564,
31,
92,
107,
20,
3545,
25597,
956,
16,
40,
15759,
25597,
366,
2936,
4348,
160,
60,
235,
25,
14,
25597,
31,
22,
79,
749,
20,
485,
4233,
45,
5407,
272,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Recording Returns
===
I have an application that records the caller speaking. The system needs to record for 120 seconds then play a message and hangup. I set a maximum length of 120 seconds and a minimum length of 1 second. I didn't want any input to disrupt the recording, so I checked "Discard Earlier User Input", "Tone Input Stops Recording" (with keys that stop recording = ""), and "Discard the Key".
I also added "VCE.RECORD.beeptime = 0" to the cta.cfg file to the remove the beep before the recording. To the cta file I also added "VCE.RECORD.gain = 2" to increase the volume of the recordings and "VCE.RECORD.silencetime = 120000" to allow up to 120 seconds of silence if the user doesn't say anything to be recorded.
These settings all worked fine in my testing in that the only way I was able to get a file shorter than 120 seconds was to hangup early. Now that we have gone live though, customers seem to have found a way to get a file consistently five seconds long. We have about 120 recordings a day and about 10 a day are exactly five seconds long. The exception returned is "Voice Msg Too Short".
My question is how is this happening and what can I do (if anything) to prevent it? | 0 | [
2,
1576,
4815,
800,
3726,
3726,
31,
57,
40,
3010,
30,
742,
14,
21326,
3324,
9,
14,
329,
2274,
20,
571,
26,
6029,
2582,
94,
418,
21,
2802,
17,
4546,
576,
9,
31,
309,
21,
2979,
1476,
16,
6029,
2582,
17,
21,
5187,
1476,
16,
137,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Strange error when creating Excel files with Spreadsheet_Excel_Writer
===
Here's the code. Not much to it. Create a new workbook, add a blank worksheet to it, dump it to the browser.
<?php
include("Spreadsheet/Excel/Writer.php");
$xls = new Spreadsheet_Excel_Writer();
$sheet = $xls->addWorksheet('Test');
$colHeadingFormat = $xls->addFormat();
$colHeadingFormat->setBold();
$colHeadingFormat->setSize(8);
$colNames = array('Foo');
$sheet->writeRow(0, 0, $colNames, $colHeadingFormat);
header ("Expires: " . gmdate("D,d M Y H:i:s") . " GMT");
header ("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT");
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
$xls->send("test.xls");
$xls->close();
?>
The issue is that I get the following error when I actually open the file with Excel:
File error: data may have been lost.
Even stranger is the fact that, despite the error, the file seems fine. Any data I happen to be writing is there.
Any ideas on how to get rid of this error? | 0 | [
2,
2578,
7019,
76,
2936,
20700,
6488,
29,
1789,
17627,
1,
1706,
11040,
1,
9657,
800,
3726,
3726,
235,
22,
18,
14,
1797,
9,
52,
212,
20,
32,
9,
1600,
21,
78,
170,
5199,
15,
3547,
21,
6463,
170,
17627,
20,
32,
15,
11424,
32,
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... |
Building a temp table /map
===
I'm working on a stored procedure in SQL Server 2000 with a temp table defined like this:
<pre>CREATE TABLE #MapTable (Category varchar(40), Code char(5))</pre>
After creating the table I want to insert some standard records (which will then be supplemented dynamically in the procedure). Each category (about 10) will have several codes (typically 3-5), and I'd like to express the insert operation for each category in one statement.
Any idea how to do that? The best idea I've had so far is to keep a real table in the db as a template, but I'd really like to avoid that if possible. | 0 | [
2,
353,
21,
13,
9577,
859,
13,
118,
15022,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
8214,
7004,
19,
4444,
255,
8128,
824,
29,
21,
13,
9577,
859,
2811,
101,
48,
45,
13,
1,
3515,
1,
6037,
1373,
859,
6926,
15022,
5924,
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... |
Using RegEx to get Poker Hand score
===
I'm developing a poker game in C#. At the moment I'm trying to get the players hand score using RegEx. I search the string (composed of the cards suit and number) and look for suits or numbers to match the RegEx. If i get 2 matches then the player has a pair, 3 matches he has 3 of a kind.
Is this a good idea or should I do it another way? | 0 | [
2,
568,
7953,
1706,
20,
164,
12453,
224,
1618,
800,
3726,
3726,
31,
22,
79,
3561,
21,
12453,
250,
19,
272,
5910,
9,
35,
14,
688,
31,
22,
79,
749,
20,
164,
14,
1007,
224,
1618,
568,
7953,
1706,
9,
31,
2122,
14,
3724,
13,
5,
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 do I tokenize input using Java's Scanner class and regular expressions?
===
Just for my own purposes, I'm trying to build a tokenizer in Java where I can define a regular grammar and have it tokenize input based on that. The StringTokenizer class is depracated, and I've found a couple functions in Scanner that hint towards what I want to do, but no luck yet. Anyone know a good way of going about this? | 0 | [
2,
184,
107,
31,
20,
2853,
2952,
6367,
568,
8247,
22,
18,
23195,
718,
17,
1290,
13832,
60,
800,
3726,
3726,
114,
26,
51,
258,
4612,
15,
31,
22,
79,
749,
20,
1895,
21,
20,
2853,
11907,
19,
8247,
113,
31,
92,
9267,
21,
1290,
720... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Data Driven Unit Tests
===
What is the best practice for testing an API that depends on data from the database?
What are the issues I need to watch out for in a "Continuous Integration" environment that runs Unit Tests as part of the build process? I mean would you deploy your database as part of the build scripts (may be run your installer) or should I go for hardcoded data [use MSTest Data Driven Unit Tests with XML]?
I understand I can mock the data layer for Business Logic layer but what if I had issues in my SQL statements in DAL? I do need to hit the database, right?
Well... that's a torrent of questions :)... Thoughts? | 0 | [
2,
1054,
5355,
1237,
4894,
800,
3726,
3726,
98,
25,
14,
246,
1345,
26,
4431,
40,
21,
2159,
30,
9597,
27,
1054,
37,
14,
6018,
60,
98,
50,
14,
1549,
31,
376,
20,
1455,
70,
26,
19,
21,
13,
7,
13391,
9627,
8078,
7,
2307,
30,
146... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Library that subverts java access control and lets me access private member variables ?
===
Can anoyne recommend a good library that will let me easily read/write private member fields of a class? I was looking through apache commons, but couldnt see it. I must be getting blind ? | 0 | [
2,
1248,
30,
972,
8122,
18,
8247,
1381,
569,
17,
6884,
55,
1381,
932,
322,
12157,
13,
60,
800,
3726,
3726,
92,
21,
251,
5685,
12360,
21,
254,
1248,
30,
129,
408,
55,
2351,
1302,
118,
23716,
932,
322,
2861,
16,
21,
718,
60,
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... |
SQL Pivot using an XML column
===
Does anyone have an example of a pivot using a table with an XML column in it - specifically turning some of the elements in the xml column into a column in the pivot table? I'm trying to build one, but the syntax is killing me; xml in sql is damn hard to work with, compared to xml in C#. I suspect this is impossible, but it wouldn't hurt to check :) | 0 | [
2,
4444,
255,
20670,
568,
40,
23504,
4698,
800,
3726,
3726,
630,
1276,
57,
40,
823,
16,
21,
20670,
568,
21,
859,
29,
40,
23504,
4698,
19,
32,
13,
8,
3524,
2101,
109,
16,
14,
2065,
19,
14,
23504,
4698,
77,
21,
4698,
19,
14,
206... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 capture the final HTML output from a JSP page(s) but before it is displayed to user?
===
I need to capture the HTML and do some post processing on the HTML data before it is finally output to the user. The final HTML document is actually composed of many JSP includes (12 or so), so there is some existing logic actually in the JSP. But I need the HTML that is generated. This has to be done on the server-side.
I have only thought of 2 options.
1. Use a JSP tag library and capture the output through some kind of body capture or something. But the JSPs are kind of a mess with so much code that ideally I was trying to avoid modifying any of the JSP pages.
2. Use the URL/Net libraries and connect to this page through a http request. But that is also kind of messy. | 0 | [
2,
184,
20,
3683,
14,
426,
13,
15895,
5196,
37,
21,
487,
3401,
2478,
5,
18,
6,
47,
115,
32,
25,
6115,
20,
4155,
60,
800,
3726,
3726,
31,
376,
20,
3683,
14,
13,
15895,
17,
107,
109,
678,
5511,
27,
14,
13,
15895,
1054,
115,
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... |
Does silverlight code need protection?
===
I don't quite understand how Silverlight code works within the browser. Are the assemblies downloaded to the client machine? Is there any chance of the code getting decompiled using Reflector or some similar tool? If so, what options does one have to protect such code? Do .net obfuscators work with Silverlight? | 0 | [
2,
630,
1172,
3130,
1797,
376,
2057,
60,
800,
3726,
3726,
31,
221,
22,
38,
1450,
1369,
184,
1172,
3130,
1797,
693,
363,
14,
16495,
9,
50,
14,
21066,
23887,
20,
14,
6819,
1940,
60,
25,
80,
186,
1504,
16,
14,
1797,
1017,
121,
1110... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Get a List from a List
===
public class Item
{
...
}
public class Order
{
public List<Item> Items
...
}
public class Customer
{
public List<Order> Orders
...
}
Now, using LINQ I need to get all items that a customer bought. How can I?
I tried something like var items = from o in cust.Orders select o.Items; but result is IEnuberable<List<Item>> and I wanna just one IEnumerable<Item>.
I'm asking here to try to avoid coding 2 loops.
| 0 | [
2,
164,
21,
968,
37,
21,
968,
800,
3726,
3726,
317,
718,
9101,
13,
1,
13,
9,
9,
9,
13,
1,
317,
718,
389,
13,
1,
317,
968,
1,
2119,
79,
1,
3755,
13,
9,
9,
9,
13,
1,
317,
718,
7705,
13,
1,
317,
968,
1,
7861,
1,
3204,
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... |
With Lua and Python embeddable, is there a place for Basic?
===
I started off programming in Basic on the ZX-81, then BASICA, gwbasic, and QBasic. I moved on to C (Ah, Turbo C 3.1, I hardly knew ye...)
When I got started in microcontrollers I regressed with the Basic Stamp from Parallax. However, Basic is/was awesome because it was so easy to understand and so hard to make a mistake. I moved on to assembly and C eventually because I needed the additional power (speed, capacity, resources, etc), but I know that if the bar was much higher many people would never get into programming microcontrollers.
I keep getting an itch to make my own on-chip Basic interpretor, but I wonder if there's need for basic now that lua and python are easily embeddable, and just as approachable as basic.
- What, if any, are the advantages Basic has over other languages?
- Why is it still around?
- If I decide to make a general purpose microcontroller board with an interpretor, is there any reason to make a basic version?
Plenty of other languages are considered dead, but basic just keeps hanging on.
-Adam | 0 | [
2,
29,
1612,
58,
17,
20059,
11911,
69,
43,
579,
15,
25,
80,
21,
209,
26,
2125,
60,
800,
3726,
3726,
31,
373,
168,
3143,
19,
2125,
27,
14,
2052,
396,
8,
3980,
15,
94,
2125,
58,
15,
14094,
26467,
15,
17,
2593,
26467,
9,
31,
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... |
How do you handle escaping invalid attribute characters?
===
I've got to get a quick and dirty configuration editor up and running. The flow goes something like this:
configuration (POCOs on server) -> Xml (serialized, transferred as XElements to website) -> text (edit in place in web page)
(make changes)
text editor -> XElement (Parse submitted form value) -> Configuration
The problem is that serialization doesn't escape any of the strings. But when I try to parse it back into xml, I can't figure out how to get the string into an XElement without it throwing an exception.
For example, let's say I have an object that has a regex. This would be the fragment that would be in the editor:
<Validator Expression="[^<]" />
But, on the return trip, I can't get this back into XElement form because the attribute has an illegal character.
I can't figure out how to instruct the serializer to escape characters, and I can't figure out how to get the parser to ignore them on the way back in.
The only way I can see around this is doing some really sketchy regex replacements against the XML, which I'm almost completely guaranteed to screw up in some corner case or another.
Is there another way?
| 0 | [
2,
184,
107,
42,
3053,
14700,
16671,
35,
14755,
1766,
60,
800,
3726,
3726,
31,
22,
195,
330,
20,
164,
21,
2231,
17,
6121,
8091,
1835,
71,
17,
946,
9,
14,
3312,
1852,
301,
101,
48,
45,
8091,
13,
5,
1638,
10460,
27,
8128,
6,
13,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Display accurate local time on web site?
===
I've been asked to display the 'correct' time on our website which I frankly feel is rather pointless as 'correct' can be interpretted in such a variety of ways.
Our current method definately results in an inaccurate time as it uses a server control rendering JavaScript that runs onload using the datetime from the server as a parameter to create a clock object in JavaScript that finally renders on the page and then starts incrementing the clock. Between the server processing, network latency and client-side performance (there's plenty other stuff running onload) the clock ends up way off the actual server time and who knows compared to the client PC.
So to get the 'correct' time shown I could;
- Use local PC time and pass new Date() to the JavaScript clock object. Pros: Should be as close to the PC clock as possible. Cons: Not sure how accurate the PC clock is let alone in which timezone.
- Use web service for TCP request to NTP server to update clock on web page. Pros: If local PC also sync'd to NTP will be accurate and best possible match. Cons: Will have to handle all the timezone adjustments relative to our servers. If PC clock is out will still have mismatch.
Do I implement my own web service or use something like; [Earth Tools][1] or [World Time Web Service][2]
Here's a blog post from [Jon Galloway on Atomic Clock Web Service][3] which is pretty old and yet ranks high when I google and he doesn't reach a conclusion.
Hoepfully I can win the argument with management why syncing to our server clock (GMT) doesn't makes sense if your not in that timezone and why we even need to match a local PC.
Any angles on this I'm missing?
[1]: http://www.earthtools.org/webservices.htm
[2]: http://www.quantumsoftware.com.au/ProductsServices/WorldTimeWebService.aspx
[3]: http://weblogs.asp.net/jgalloway/archive/2004/04/08/110029.aspx | 0 | [
2,
3042,
8137,
375,
85,
27,
2741,
689,
60,
800,
3726,
3726,
31,
22,
195,
74,
411,
20,
3042,
14,
13,
22,
25345,
22,
85,
27,
318,
2271,
56,
31,
22662,
583,
25,
864,
454,
923,
28,
13,
22,
25345,
22,
92,
44,
11584,
1427,
19,
145... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 override HttpApplication.User.Identity.Name on a local environment?
===
I have a site that requires Windows Authentication the application obtains the credential from the Security.Prinicipal once the user is autenticated the problem is that my credentials on my local environment are different that the ones stored in the DB and the user preferences cannot be obtain. i am doing the following workaround in order to deal with this issue.
#if DEBUG
var myUser = userBL.GetSingle(@"desiredDomain\otherUserName");
#else
var myUser = userBL.GetSingle(HttpApplication.User.Identity.Name);
#endif
Session.Add("User",myUser);
is there any other way rather than impersonating or the above mentioned workaorund to change the the value of HttpApplication.User.Identity.Name this is beacuse I have to change my code everytime I need to commit into repository or deploy the App | 0 | [
2,
184,
20,
84,
11891,
7775,
2552,
20669,
9,
16704,
9,
13384,
856,
9,
7259,
27,
21,
375,
2307,
60,
800,
3726,
3726,
31,
57,
21,
689,
30,
4781,
1936,
27963,
14,
3010,
5545,
18,
14,
5059,
43,
10107,
37,
14,
1221,
9,
6944,
4796,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
The number of ways of reading an xml file from another server in PHP?
===
I am trying to read an XML-file from another server. However the the company that's hosting me seems to have turned of the file_get_contents function from retrieving files for files from other servers (and their support are not very bright and takes forever to answer). So I need a work around in some way.
This is my current code
$url = urldecode( $object_list_url );
$xmlstr = file_get_contents ( $url );
$obj = new SimpleXMLElement ( $xmlstr, LIBXML_NOCDATA );
| 0 | [
2,
14,
234,
16,
2847,
16,
1876,
40,
23504,
3893,
37,
226,
8128,
19,
13,
26120,
60,
800,
3726,
3726,
31,
589,
749,
20,
1302,
40,
23504,
8,
16877,
37,
226,
8128,
9,
207,
14,
14,
237,
30,
22,
18,
10637,
55,
2206,
20,
57,
412,
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... |
Paid support for web-frameworks
===
This may sound strange but sometimes when your ASP.NET webapp isn't working and you can't tell why, you call Microsoft, pay them something like $300 and get about 1-3 weeks of 1-3 people looking at your configuration, memory dumps, sometimes code... but usually not the db, and with a fairly good percentage they help you fix your mistakes, without necessarily up-selling you.
I found that Novell would like to [offer that for Mono][1]. Everyone knows MySQL offers it for their clients, because it was part of the reason they got a truck of money to swing by one day to change the name-plate on the door.
I'm curious if anyone has found people for the support of these, and how they'd rate their experience:
* Django
* Rails
* Grails
* JRuby
* Mono [ratings]
* add your own.
[1]: http://www.mono-project.com/Kickstart | 0 | [
2,
2192,
555,
26,
2741,
8,
8361,
7684,
800,
3726,
3726,
48,
123,
646,
2578,
47,
1030,
76,
154,
28,
306,
9,
2328,
2741,
7753,
2532,
22,
38,
638,
17,
42,
92,
22,
38,
494,
483,
15,
42,
645,
7099,
15,
1372,
105,
301,
101,
5341,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Resize an image in Java - Any Open Source Library ?
===
I need to resize PNG, JPeg and Gif files. Are there good java open source libraries to do that ? | 0 | [
2,
302,
10454,
40,
1961,
19,
8247,
13,
8,
186,
368,
1267,
1248,
13,
60,
800,
3726,
3726,
31,
376,
20,
302,
10454,
351,
2723,
15,
487,
20427,
17,
489,
821,
6488,
9,
50,
80,
254,
8247,
368,
1267,
8649,
20,
107,
30,
13,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Are there open source CAPTCHA solutions available?
===
I'm in the process of adding CAPTCHA validation to one of my websites and need to know what open source solutions exist. Please note strengths and weaknesses and what platform they work with. I'm primarily interested in ASP.NET solutions but feel free to include PHP, Java, etc. | 0 | [
2,
50,
80,
368,
1267,
13960,
1651,
6776,
904,
60,
800,
3726,
3726,
31,
22,
79,
19,
14,
953,
16,
4721,
13960,
1651,
27999,
20,
53,
16,
51,
13931,
17,
376,
20,
143,
98,
368,
1267,
6776,
3182,
9,
2247,
1945,
2169,
18,
17,
23732,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
"File Not Found" in MSBuild Community Tasks -- Which File?
===
I'm trying to use the VssGet task of the MSBuild Community Tasks, and the error message "File or project not found" is beating me with a stick. I can't figure out what in particular the error message is referring to. Here's the task:
<LocalFilePath Include="C:\Documents and Settings\michaelc\My Documents\Visual Studio 2005\Projects\Astronom\Astronom.sln" />
<VssGet DatabasePath="\\ofmapoly003\Individual\michaelc\VSS\Astronom_VSS\srcsafe.ini"
Path="$/Astronom_VSS"
LocalPath="@(LocalFilePath)"
UserName="build" Password="build"
Recursive="True" />
If I write a Streamreader to read to either the database path or the local path, it succeeds fine. So the path to everything appears to be accessible. Any ideas?
| 0 | [
2,
13,
7,
16877,
52,
216,
7,
19,
4235,
29361,
514,
8674,
13,
8,
8,
56,
3893,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
275,
14,
4611,
18,
3060,
3005,
16,
14,
4235,
29361,
514,
8674,
15,
17,
14,
7019,
2802,
13,
7,
16877,
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... |
How to display a loading screen while site content loads
===
I'm working on a site which contains a whole bunch of mp3s and images, and i'd like to display a loading gif while all the content loads. I have no idea how to achieve this, but I do have the animated gif I want to use. any help?
Thanks! | 0 | [
2,
184,
20,
3042,
21,
12797,
2324,
133,
689,
2331,
19069,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
689,
56,
1588,
21,
979,
7653,
16,
4628,
240,
18,
17,
3502,
15,
17,
31,
22,
43,
101,
20,
3042,
21,
12797,
489,
821,
133,
65,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 causes Excel export from SQL Server Reporting Services to produce an abnormally large file?
===
We have are relatively simple Reporting Services report that our users commonly export to Excel. I've noticed that the files produced by the Excel export seem unusually large. If I open one of these files and just click save, without making any changes, the file size reduces to about half of it's previous size. Has anyone else run into this and is there a known workaround? | 0 | [
2,
98,
4047,
20700,
7487,
37,
4444,
255,
8128,
6670,
687,
20,
2213,
40,
17804,
102,
370,
3893,
60,
800,
3726,
3726,
95,
57,
50,
3109,
1935,
6670,
687,
1330,
30,
318,
3878,
2524,
7487,
20,
20700,
9,
31,
22,
195,
2711,
30,
14,
648... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 delete excel rows in SSIS?
===
Is it possible to delete rows in an excel worksheet from SSIS? | 0 | [
2,
184,
107,
31,
27448,
20700,
11295,
19,
13,
18,
4557,
60,
800,
3726,
3726,
25,
32,
938,
20,
27448,
11295,
19,
40,
20700,
170,
17627,
37,
13,
18,
4557,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
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... |
What are your thoughts on method scoped constants?
===
For example:
public void doSomething() {
final double MIN_INTEREST = 0.0;
// ...
}
Personally, I would rather see these substitution constants declared statically at the class level.
I suppose I'm looking for an "industry viewpoint" on the matter.
| 0 | [
2,
98,
50,
154,
3064,
27,
2109,
9914,
43,
3587,
18,
60,
800,
3726,
3726,
26,
823,
45,
317,
11364,
107,
9099,
5,
6,
13,
1,
426,
1494,
4232,
1,
16208,
800,
713,
9,
387,
73,
12894,
13,
9,
9,
9,
13,
1,
7200,
15,
31,
83,
864,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 can I use "or", "and" in C# Regex?
===
I have a pattern to match with the string:
string pattern = @"<something here>asc"
I am checking the SQL SELECT query for right syntax, semantics, ...
I need to say that in the end of the query string I can have "asc" or "desc".
How can it be written in C#? | 0 | [
2,
184,
92,
31,
275,
13,
7,
248,
7,
15,
13,
7,
290,
7,
19,
272,
5910,
7953,
1706,
60,
800,
3726,
3726,
31,
57,
21,
3732,
20,
730,
29,
14,
3724,
45,
3724,
3732,
800,
13,
1,
7,
1,
9099,
235,
1,
472,
150,
7,
31,
589,
9886,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
MySQL COUNT(DISTINCT()) unexpected results
===
I'm using MySQL 5.0.45 on CentOS 5.1.
<code>SELECT DISTINCT(email) FROM newsletter</code>
Returns 217259 rows
<code>SELECT COUNT(DISTINCT(email)) FROM newsletter</code>
Returns 180698 for the count.
<code>SELECT COUNT(*) FROM (SELECT DISTINCT(email) FROM newsletter) AS foo</code>
Returns 180698 for the count.
Shouldn't all 3 queries return the same value?
Here is the schema of the newsletter table
<pre>
CREATE TABLE `newsletter` (
`newsID` int(11) NOT NULL auto_increment,
`email` varchar(128) NOT NULL default '',
`newsletter` varchar(8) NOT NULL default '',
PRIMARY KEY (`newsID`)
) ENGINE=MyISAM;
</pre> | 0 | [
2,
51,
18,
22402,
2468,
5,
25911,
5,
6,
6,
9380,
1736,
800,
3726,
3726,
31,
22,
79,
568,
51,
18,
22402,
331,
9,
387,
9,
2520,
27,
5802,
759,
331,
9,
165,
9,
13,
1,
9375,
1,
18,
16964,
4421,
5,
62,
8079,
6,
37,
17782,
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... |
Submit multiple forms on one page ( ASP )
===
I have a table where each row will represent a form. There could be over 25 rows in the table.
I need to post the rows that have a checkbox checked and get the results and display success of fail. I am posting to a site that I do not have any control over and they take one rows worth of data.
I tried this using IFrames and it seemed to work ok but not in IE7 without browser config changes which is not possible in my case.
I have figured out enough to get all the forms to submit but then how do I get the results. | 0 | [
2,
12298,
1886,
1997,
27,
53,
2478,
13,
5,
28,
306,
13,
6,
800,
3726,
3726,
31,
57,
21,
859,
113,
206,
3131,
129,
3501,
21,
505,
9,
80,
110,
44,
84,
771,
11295,
19,
14,
859,
9,
31,
376,
20,
678,
14,
11295,
30,
57,
21,
2631... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Sort List<DateTime> Descending
===
In c# (3.0 or 3.5, so we can use lambdas), is there an elegant way of sorting a list of dates in descending order? I know I can do a straight sort and then reverse the whole thing,
docs.Sort((x, y) => x.StoredDate.CompareTo(y.StoredDate));
docs.Reverse();
but is there a lambda expression to do it one step?
In the above example, StoredDate is a property typed as a DateTime. | 0 | [
2,
2058,
968,
1,
8209,
891,
1,
16526,
800,
3726,
3726,
19,
272,
5910,
13,
5,
240,
9,
387,
54,
203,
9,
264,
15,
86,
95,
92,
275,
13,
24187,
18,
6,
15,
25,
80,
40,
11614,
161,
16,
2058,
68,
21,
968,
16,
4076,
19,
16526,
389,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 have an indexed view in MySQL?
===
I found [a posting on the MySQL forums from 2005][1], but nothing more recent than that. Based on that, it's not possible. But a lot can change in 3-4 years.
What I'm looking for is a way to have an index over a view but have the table that is viewed remain unindexed. Indexing hurts the writing process and this table is written to quite frequently (to the point where indexing slows everything to a crawl). However, this lack of an index makes my queries painfully slow.
[1]: http://forums.mysql.com/read.php?100,22967,22967 | 0 | [
2,
25,
32,
938,
20,
57,
40,
4348,
69,
1418,
19,
51,
18,
22402,
60,
800,
3726,
3726,
31,
216,
636,
58,
15669,
27,
14,
51,
18,
22402,
5691,
18,
37,
812,
500,
2558,
165,
500,
15,
47,
626,
91,
1764,
119,
30,
9,
432,
27,
30,
15... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 causes duplicate requests to occur using spring,tomcat and hibernate
===
I'm working on a project in Java using the spring framework, hibernate and tomcat.
Background:
I have a form page which takes data, validates, processes it and ultimately persists the data using hibernate. In processing the data I do some special command (model)
manipulation prior to persisting using hibernate.
Problem:
For some reason my onSubmit method is being called twice, the first time through things
are processed properly. However the second time through they are not; and the incorrect
information is being persisted.
I've also noticed that on other pages which are simply pulling information from the data
base and displaying on screen; Double requests are happening there too.
Is there something misconfigured, am I not using spring properly..any help on this would
be great! | 0 | [
2,
98,
4047,
19429,
12279,
20,
3744,
568,
1573,
15,
6015,
5782,
17,
4148,
2102,
8820,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
669,
19,
8247,
568,
14,
1573,
6596,
15,
4148,
2102,
8820,
17,
2067,
5782,
9,
2395,
45,
31,
57,
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 create a WPF Shape Editor ?
===
I'm trying to create a WPF Shape (PolyLine) editor, which is a control that I want to use to, edit shapes in a canvas.
What the editor needs to do is to be able to display the points and lines of the shape and to move those around.
Can anyone provide me with a idea of how I can accomplish this, or a starting point? I haven't found anything related to how I could do this, so far. | 0 | [
2,
184,
20,
1600,
21,
619,
7721,
2539,
1835,
13,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
21,
619,
7721,
2539,
13,
5,
17108,
1143,
6,
1835,
15,
56,
25,
21,
569,
30,
31,
259,
20,
275,
20,
15,
9392,
12129,
19,
21,
9696,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 reset postgres' primary key index when it falls out of sync?
===
I ran into the problem that my primary key index was not in sync with my table rows.
It seems to be caused by import/restores not maintaining the index properly, possibly a postgres bug. | 0 | [
2,
184,
20,
23422,
678,
6879,
18,
22,
1256,
1246,
4348,
76,
32,
2564,
70,
16,
6063,
150,
60,
800,
3726,
3726,
31,
717,
77,
14,
1448,
30,
51,
1256,
1246,
4348,
23,
52,
19,
6063,
150,
29,
51,
859,
11295,
9,
32,
2206,
20,
44,
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... |
C#: Alias a class name?
===
Some existing code depends on the presence of a static class:
public static class ColorScheme
{
...
}
This color scheme is the Outlook 2003 color scheme. i want to introduce an Outlook 2007 color scheme, while retaining the Outlook 2003 color scheme:
public static class Outlook2003ColorScheme
{
...
}
public static class Outlook2007ColorScheme
{
...
}
But i'm still faced with the fact that the code depends on the presence of a static class called ColorScheme. My first thought was to create a ColorScheme class that i will descend from either Outlook2003 or Outlook2007:
public static class ColorScheme : Outlook2007ColorScheme
{
}
but you cannot descend from a static class.
My next thought was to create the static ColorScheme class, but make Outlook2003ColorScheme and Outlook2007ColorScheme classes non-static. Then a static variable in the static ColorScheme class can point to either "true" color scheme:
public static class ColorScheme
{
private static CustomColorScheme = new Outlook2007ColorScheme();
...
}
private class CustomColorScheme
{
...
}
private class Outlook2008ColorScheme : CustomColorScheme
{
...
}
private class Outlook2003ColorScheme : CustomColorScheme
{
...
}
but that would require me to convert a class composed entirly of readonly static Colors into overridable properties, and then my ColorScheme class would need to have the 30 different property getters thunk down into the contained object.
That's just too much typing.
So my next thought was to alias the class:
public static ColorScheme = Outlook2007ColorScheme;
But that doesn't compile.
How can i alias a static class into another name? | 0 | [
2,
272,
5910,
45,
15794,
21,
718,
204,
60,
800,
3726,
3726,
109,
3149,
1797,
9597,
27,
14,
1970,
16,
21,
12038,
718,
45,
317,
12038,
718,
5268,
17660,
62,
13,
1,
13,
9,
9,
9,
13,
1,
48,
1665,
4276,
25,
14,
19837,
973,
1665,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
A good reference card / cheat sheet with the basic sort algorithms in C?
===
I've been looking (without great luck) for the perfect reference card with all the basic sorting algos in C (or maybe in pseudo code). Wikipedia is a terrific source of info but this time I'm looking for something definitely more portable. Any suggestion would be much appreciated! | 0 | [
2,
21,
254,
2801,
2056,
13,
118,
18585,
6125,
29,
14,
2125,
2058,
15935,
19,
272,
60,
800,
3726,
3726,
31,
22,
195,
74,
699,
13,
5,
14506,
374,
5419,
6,
26,
14,
2107,
2801,
2056,
29,
65,
14,
2125,
2058,
68,
493,
839,
18,
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... |
Writing a parser - In the need of guides and research papers.
===
My knowledge about implementing a parser is a bit rusty.
I have no idea about the current state of research in the area, and could need some links regarding recent advances and their impact on performance.
General resources about writing a parser are also welcome, (tutorials, guides etc.) since much of what I had learned at college I have already forgotten :)
I have the Dragon book, but that's about it.
And does anyone have input on parser generators like ANTLR and their performance? (ie. comparison with other generators) | 0 | [
2,
1174,
21,
2017,
4104,
13,
8,
19,
14,
376,
16,
14838,
17,
527,
3747,
9,
800,
3726,
3726,
51,
1918,
88,
17333,
21,
2017,
4104,
25,
21,
1142,
15395,
9,
31,
57,
90,
882,
88,
14,
866,
146,
16,
527,
19,
14,
217,
15,
17,
110,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Clearcase Config Spec with Private Branch
===
I have a somewhat complicated branching structure at work (at least for me). It is something like this:
<pre>
Main
|
1
|
2
| \
3 \
Ver2
|
1
| \
2 \
| ProjectA
3 |
1
</pre>
There are 2 branches off of main. "Ver2" which has everyone's changes for the next version, and "ProjectA" which is my work.
My question is: Is there a way to create a config spec that knows what has been merged so I get:
1. Anything from ProjectA that has not been merged
2. If the LATEST from ProjectA has been merged to Ver2, then get the LATEST from Ver2 branch
3. If there is not a ProjectA branch, get from Ver2
4. If there is no Ver2, get from MAIN
For example, in the above case, if I merged version 1 from ProjectA to version 2 in Ver2 branch, then I would want to see version 3 on Ver2. However, if I have not yet merged those files, I would want version 1 from ProjectA in my view. | 0 | [
2,
1207,
10325,
13,
14093,
2816,
12737,
29,
932,
1686,
800,
3726,
3726,
31,
57,
21,
4131,
8343,
1686,
68,
1411,
35,
170,
13,
5,
721,
639,
26,
55,
6,
9,
32,
25,
301,
101,
48,
45,
13,
1,
3515,
1,
407,
13,
1,
137,
13,
1,
172,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Where to practice Lambda function?
===
I am currently trying to learn all new features of C#3.0. I have found a very nice collection of [sample to practice LINQ][1] but I can't find something similar for Lambda.
Do you have a place that I could practice Lambda function?
[1]: http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx | 0 | [
2,
113,
20,
1345,
13,
24187,
1990,
60,
800,
3726,
3726,
31,
589,
871,
749,
20,
2484,
65,
78,
967,
16,
272,
5910,
240,
9,
387,
9,
31,
57,
216,
21,
253,
2210,
1206,
16,
636,
6101,
5106,
20,
1345,
6294,
1251,
500,
2558,
165,
500,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 rid of "Failed to determine definition for Feature with ID"
===
My event logs on my production front end servers are getting filled with error messages:
"Failed to determine definition for Feature with ID"
Now, I've found the offending feature on one of the development servers - it is an InfoPath form with some code behind. But, it is nowhere to be found on the production servers.
I've tried running the following command on the production servers:
stsadm -o uninstallfeature -id (your GUID) -force
There was no change - the error is still being generated.
How do I get rid of the error?
| 0 | [
2,
184,
20,
164,
6681,
16,
13,
7,
24910,
69,
20,
3746,
5465,
26,
1580,
29,
4924,
7,
800,
3726,
3726,
51,
807,
18893,
27,
51,
637,
431,
241,
17595,
50,
1017,
1943,
29,
7019,
7561,
45,
13,
7,
24910,
69,
20,
3746,
5465,
26,
1580,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Loading an xml file from outside the swf file in Flash
===
A website I'm working on (using AS2 because it's oldschool) has a larger index .swf file that loads sub-swfs using `loadMovie("foo1.swf", placeToShowSwf)`. There's `foo1.swf` through 4, which is silly because the only thing that's different between them is a single number in the address of an xml file that tells it what content to load. So I want to reduce this to one file, with a simple function that the index file calls to load the xml file, as seen here.
function setFooNum(i:Number) {
fooNum = i;
my_xml = new XML();
my_xml.load("foo"+fooNum+".xml");
};
However, for some reason, the xml file won't load. It loads properly outside the function, but that doesn't do me much good. It changes fooNum properly, but that doesn't do me any good if the wrong xml file is already loading. As far as I can tell, the code behaves as though the `my_xml.load("foo"+fooNum+".xml")` isn't there at all.
Is this some sort of security measure I don't know about, and is there any way around it? | 0 | [
2,
12797,
40,
23504,
3893,
37,
719,
14,
13,
18,
15263,
3893,
19,
4433,
800,
3726,
3726,
21,
2271,
31,
22,
79,
638,
27,
13,
5,
12655,
28,
135,
185,
32,
22,
18,
315,
7535,
6,
63,
21,
1662,
4348,
13,
9,
18,
15263,
3893,
30,
190... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Creating a System.Web.Cachcing.Cache object in a unit test
===
I'm trying to implement a unit test for a function in a project that doesn't have unit tests and this function requires a System.Web.Caching.Cache object as a parameter. I've been trying to create this object by using code such as...
System.Web.Caching.Cache cache = new System.Web.Caching.Cache();
cache.Add(...);
...and then passing the 'cache' in as a parameter but the Add() function is causing a NullReferenceException. My best guess so far is that I can't create this cache object in a unit test and need to retrieve it from the HttpContext.Current.Cache which I obviously don't have access to in a unit test.
How do you unit test a function that requires a System.Web.Caching.Cache object as a parameter?
| 0 | [
2,
2936,
21,
329,
9,
14113,
9,
793,
673,
6302,
9,
793,
2569,
3095,
19,
21,
1237,
1289,
800,
3726,
3726,
31,
22,
79,
749,
20,
8713,
21,
1237,
1289,
26,
21,
1990,
19,
21,
669,
30,
1437,
22,
38,
57,
1237,
4894,
17,
48,
1990,
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... |
Jar security
===
I have a standalone Java app that has some licensing code that I want to secure, i.e., prevent users from changing my software to circumvent the licensing. What is the best way to do this?
I've looked at obfuscation, but that entails all sorts of problems: reflection, serialization, messed-up stack traces, etc. Perhaps jar signing could be a solution? But how do I verify the jar at runtime? And how do I ensure that the user doesn't change the jar verification code? | 0 | [
2,
5112,
1221,
800,
3726,
3726,
31,
57,
21,
26986,
8247,
4865,
30,
63,
109,
15038,
1797,
30,
31,
259,
20,
4315,
15,
31,
9,
62,
9,
15,
2501,
3878,
37,
4226,
51,
2306,
20,
28986,
14,
15038,
9,
98,
25,
14,
246,
161,
20,
107,
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... |
Problem with illegal characters in attribute values in serialized objects
===
I've got to get a quick and dirty configuration editor up and running. The flow goes something like this:
configuration (POCOs on server) -> Xml (serialized, transferred as XElements to website) -> text (edit in place in web page)
(make changes)
text editor -> XElement (Parse submitted form value) -> Configuration
The problem is that serialization doesn't escape any of the strings. But when I try to parse it back into xml, I can't figure out how to get the string into an XElement without it throwing an exception.
For example, let's say I have an object that has a regex. This would be the fragment that would be in the editor:
<Validator Expression="[^<]" />
But, on the return trip, I can't get this back into XElement form because the attribute has an illegal character.
I can't figure out how to instruct the serializer to escape characters, and I can't figure out how to get the parser to ignore them on the way back in.
The only way I can see around this is doing some really sketchy regex replacements against the XML, which I'm almost completely guaranteed to screw up in some corner case or another.
Is there another way?
| 0 | [
2,
1448,
29,
5143,
1766,
19,
35,
14755,
4070,
19,
27877,
3916,
800,
3726,
3726,
31,
22,
195,
330,
20,
164,
21,
2231,
17,
6121,
8091,
1835,
71,
17,
946,
9,
14,
3312,
1852,
301,
101,
48,
45,
8091,
13,
5,
1638,
10460,
27,
8128,
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... |
Subsonic: Comparing two columns instead of an input parameter
===
s it possible to do the following in subsonic.
SELECT * FROM TABLE1
WHERE Column1 > Column2 or Column1 < Colum3
All examples that I've seen assume you now a value to pass to the where clause. I'm trying to do this without creating a view.
Thanks | 0 | [
2,
972,
17766,
45,
15047,
81,
7498,
700,
16,
40,
6367,
18906,
800,
3726,
3726,
13,
18,
32,
938,
20,
107,
14,
249,
19,
972,
17766,
9,
5407,
1637,
37,
859,
165,
113,
4698,
165,
13,
1,
4698,
135,
54,
4698,
165,
13,
1,
326,
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... |
DataGridViewCheckBoxCell is broken for ->Value result
===
I'm using a DataGridViewCheckBoxCell but I can't figure out how to have the ->Value property working "correctly".
for (int i = this->dgvConfigs->Rows->Count - 1; i >= 0 ; i --){
DataGridViewCheckBoxCell^ dgvcbc = (DataGridViewCheckBoxCell^) this->dgvConfigs->Rows[i]->Cells[2];
// This is truely a weird behavior of the DataGridViewCheckBoxCell
if (dgvcbc->Value->ToString() == "True"){
// Do stuff
}
}
Right now I can't figure out what ->Value could be. When I test
dgvcbc->Value == true
it never triggers, or
dgvcbc->Value == dgvcbc->TrueValue
When I look at those values in the debugger both are "{true}" but equality is never evaluated to true
I even tried
dgvcbc->TrueValue = true;
dgvcbc->Value == dgvcbc->TrueValue
again, both show up as "{true}" but the //Do Stuff is never matched
| 0 | [
2,
1054,
16375,
4725,
12542,
5309,
9725,
25,
2023,
26,
13,
8,
1,
15165,
829,
800,
3726,
3726,
31,
22,
79,
568,
21,
1054,
16375,
4725,
12542,
5309,
9725,
47,
31,
92,
22,
38,
1465,
70,
184,
20,
57,
14,
13,
8,
1,
15165,
1354,
638... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Reader/Writer Locks in C++
===
I'm looking for a good reader/writer lock in C++. We have a use case of a single infrequent writer and many frequent readers and would like to optimize for this. Preferable I would like a cross-platform solution, however a Windows only one would be acceptable. | 0 | [
2,
7765,
118,
9657,
12941,
19,
272,
20512,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
254,
7765,
118,
9657,
3991,
19,
272,
20512,
9,
95,
57,
21,
275,
610,
16,
21,
345,
19,
22840,
1462,
17,
151,
5408,
7807,
17,
83,
101,
20,
2286... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 access the content of a server control?
===
I was wondering if it is possible to do something like this:
<uc1:TestControl ID="TestControl1" runat="server">
<div>More random HTML, etc...</div>
</uc1:TestControl>
I got an error of "Type 'System.Web.UI.UserControl' does not have a public property named 'div'.". Doing a little research, I found I could add the following property to the server control:
[ParseChildren(false)]
public partial class TestControl : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
Is it possible to read the content from an ASP.NET server control?
| 0 | [
2,
184,
107,
42,
1381,
14,
2331,
16,
21,
8128,
569,
60,
800,
3726,
3726,
31,
23,
5712,
100,
32,
25,
938,
20,
107,
301,
101,
48,
45,
13,
1,
6335,
165,
45,
10543,
12898,
4924,
3726,
7,
10543,
12898,
165,
7,
485,
721,
3726,
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... |
Threading issues in a Java HashMap
===
Something happened that I'm not sure should be possible. Obviously it is, because I've seen it, but I need to find the root cause & I was hoping you all could help.
We have a system that looks up latitude & longitude for a zipcode. Rather than access it every time, we cache the results in a cheap in-memory HashTable cache, since the lat & long of a zip code tend to change less often than we release.
Anyway, the hash is surrounded by a class that has a "get" and "add" method that are both synchronized. We access this class as a singleton.
I'm not claiming this is the best setup, but it's where we're at. (I plan to change to wrap the Map in a Collections.synchronizedMap() call ASAP.)
We use this cache in a multi-threaded environment, where we thread 2 calls for 2 zips (so we can calculate the distance between the two). These sometimes happen at very nearly the same time, so its very possible that both calls access the map at the same time.
Just recently we had an incident where two different zip codes returned the same value. Assuming that the initial values were actually different, is there any way that writing the values into the Map would cause the same value to be written for two different keys? Or, is there any way that 2 "gets" could cross wires and accidentally return the same value?
The only other explanation I have is that the initial data was corrupt (wrong values), but it seems very unlikely.
Any ideas would be appreciated.
Thanks,
Peter
(PS: Let me know if you need more info, code, etc.) | 0 | [
2,
9322,
68,
1549,
19,
21,
8247,
19170,
15022,
800,
3726,
3726,
301,
1190,
30,
31,
22,
79,
52,
562,
378,
44,
938,
9,
4409,
32,
25,
15,
185,
31,
22,
195,
541,
32,
15,
47,
31,
376,
20,
477,
14,
5900,
1679,
279,
31,
23,
3935,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
A Possible Threading/COM/UI problem
===
I am writing a toolbar for IE(6+). I have used the various sample bars from
codeproject.com (http://www.codeproject.com/KB/dotnet/IE_toolbar.aspx), and have a toolbar that works, registers unregisters etc. What I want the toolbar to do is to highlight divs within an html page as the users' mouse moves over that div. So far the highlighting code works, but I would like to display the name of the div (if it exists) in a label on the toolbar (changing as the mouse moves etc).
I cannot for the life of me get this to happen and trying to debug it is a nightmare. As the assembly is hosted in IE, I suspect that I am causing an exception (in IE) by trying to update the text on the label from a thread that didn't create that control, but because that exception is happening in IE, I don't see it.
Is the solution to try to update the control in a thread-safe way using Invoke? If so how?
Here is the event code:
private void Explorer_MouseOverEvent(mshtml.IHTMLEventObj e)
{
mshtml.IHTMLDocument2 doc = this.Explorer.Document as IHTMLDocument2;
element = doc.elementFromPoint(e.clientX, e.clientY);
if (element.tagName.Equals("DIV", StringComparison.InvariantCultureIgnoreCase))
{
element.style.border = "thin solid blue;";
if (element.className != null)
{
UpdateToolstrip(element.className);
}
}
e.returnValue = false;
}
and here is an attempt at thread-safe update of the toolbar:
delegate void UpdateToolstripDelegate(string text);
public void UpdateToolstrip(string text)
{
if (this.toolStripLabel1.InvokeRequired == false)
{
this.toolStripLabel1.Text = text;
}
else
{
this.Invoke(new UpdateToolstripDelegate(UpdateToolstrip), new object[] { text });
}
}
Any suggestions much appreciated.
| 0 | [
2,
21,
938,
9322,
68,
118,
960,
118,
5661,
1448,
800,
3726,
3726,
31,
589,
1174,
21,
5607,
1850,
26,
13,
660,
5,
379,
2430,
6,
9,
31,
57,
147,
14,
617,
5717,
6062,
37,
1797,
21011,
9,
960,
13,
5,
21127,
6903,
6483,
9,
9375,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 back up a huge file with Bacula?
===
It currently is 700MB but it's conceivable that it'll grow beyond the 1GB. Normally I just copy this file to another location (for the curious, it's the database of a Zope instance,
a ZODB file).
This file changes little from day to day, but I understand Bacula can't do inside-the-file subdivision for incremental backups. Anyway, it doesn't matter. What I want to do is a full backup daily and keep two of them and a full backup weekly and also keep two of them. So
at any given time I can get yesterday, the day before yesterday, a week
ago and two weeks ago. Would you think that's a good idea?
I suppose I should make two schedules, daily and weekly. But which numbers should I have on the volumes and the pools to achieve this? Two volumes of 1.5GB? Any hints or guidance is welcome, I'm not a sysadmin and my experience with Bacula is very limited. | 0 | [
2,
184,
20,
97,
71,
21,
2329,
3893,
29,
11099,
3743,
60,
800,
3726,
3726,
32,
871,
25,
10954,
5024,
47,
32,
22,
18,
23998,
3757,
579,
30,
32,
22,
211,
3213,
1701,
14,
137,
11400,
9,
4147,
31,
114,
4344,
48,
3893,
20,
226,
1474... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 unit test a unit test?
===
I was watching Rob Connerys webcasts on the MVCStoreFront App, and I noticed he was unit testing even the most mundane things, things like:
public Decimal DiscountPrice
{
get
{
return this.Price - this.Discount;
}
}
Would have a test like:
[TestMethod]
public void Test_DiscountPrice
{
Product p = new Product();
p.Price = 100;
p.Discount = 20;
Assert.IsEqual(p.DiscountPrice,80);
}
While, I am all for unit testing, I sometimes wonder if this form of test first development is really beneficial, for example, in a real process, you have 3-4 layers above your code (Business Request, Requirements Document, Architecture Document), where the actual defined business rule (Discount Price is Price - Discount) could be misdefined.
If thats the situation, your unit test means nothing to you.
Additionally, your unit test is another point of failure:
[TestMethod]
public void Test_DiscountPrice
{
Product p = new Product();
p.Price = 100;
p.Discount = 20;
Assert.IsEqual(p.DiscountPrice,90);
}
Now the test is flawed. Obviously it in a simple test, its no big deal, but say we were testing a complicated business rule. What do we gain here?
Fast forward two years into the applications life, when maintenance developers are maintaining it. Now the business changes its rule, and the test breaks again, some rookie developer then fixes the test incorrectly...we now have another point of failure.
All I see is more possible points of failure, with no real beneficial return, if the discount price is wrong, the test team will still find the issue, how did unit testing save any work?
What am I missing here? Please teach me to love TDD, as I'm having a hard time accepting it as useful so far. I want too, because I want to stay progressive, but it just doesn't make sense to me. | 0 | [
2,
184,
107,
42,
1237,
1289,
21,
1237,
1289,
60,
800,
3726,
3726,
31,
23,
1953,
3830,
18384,
93,
18,
2741,
6146,
18,
27,
14,
307,
8990,
16828,
8068,
4865,
15,
17,
31,
2711,
24,
23,
1237,
4431,
166,
14,
127,
25843,
564,
15,
564,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
using C# regex. question is how to use "="
===
I`m parsing SQL query with C# Regex.
I need also to make my pattern to understand "=", for example:
string pattern = @"...something...(where)*\s*\w*\s*(order by)*...something else...";
the following query should match my pattern:
<p><b>select fieldslist from mytable where fieldvalue=someint order by specialfield</b></p>
how can I change the interval of char (I mean "\w*") to make pattern understand my SELECT correctly? | 0 | [
2,
568,
272,
5910,
7953,
1706,
9,
1301,
25,
184,
20,
275,
13,
7,
3726,
7,
800,
3726,
3726,
31,
1,
79,
2017,
18,
68,
4444,
255,
25597,
29,
272,
5910,
7953,
1706,
9,
31,
376,
67,
20,
233,
51,
3732,
20,
1369,
13,
7,
3726,
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... |
C# 3.5 - Connecting named pipe across network
===
What is the correct way to setup a named pipe in C# 3.5 across a network?
Currently I have two machines, 'client' and 'server'.
Server sets up its pipe in the following manner:
NamedPipeServerStream pipeServer = new NamedPipeServerStream(
"pipe",
PipeDirection.InOut,
10,
PipeTransmissionMode.Byte,
PipeOptions.Asynchronous)
pipeServer.WaitForConnection();
//... Read some data from the pipe
The client sets up its connection in the following manner:
NamedPipeClientStream pipeClient = new NamedPipeClientStream(
"server",
"pipe",
PipeDirection.InOut);
pipeClient.Connect();
//... Write some data to the pipe
The 'server' machine can be accessed on the network by going to "\\\\server".
Whenever I run the program, I get a System.UnauthorizedAccessException that says "Access to the path is denied." The code works fine when I run the server and client on my local machine and attempt to connect to "." with the client. | 0 | [
2,
272,
5910,
203,
9,
264,
13,
8,
6440,
377,
7642,
464,
982,
800,
3726,
3726,
98,
25,
14,
4456,
161,
20,
18161,
21,
377,
7642,
19,
272,
5910,
203,
9,
264,
464,
21,
982,
60,
871,
31,
57,
81,
6035,
15,
13,
22,
150,
18513,
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... |
Playing small sounds in Java game
===
For the computer game I'm making, I obviously want to play sound. So far, I've been using AudioClip to play WAV files. While this approach works fine, the WAV files tend to be gigantic. A few seconds of sound end up being hundreds of kB. I'm faced with having a game download that's 95% audio!
The obvious option here would be to use MP3 or Ogg Vorbis. But I've had limited success with this - I can play MP3 using JLayer (but it plays in the same thread). As for Ogg, I've had no luck at all. Worse, JLayer's legal status is a bit on the dubious side.
So my question is to both Java developers and generally people who actually know something about sound: What do I do? Can I somehow "trim the fat" off my WAVs? Is there some way of playing Ogg in Java? Is there some other sound format I should use instead? | 0 | [
2,
791,
284,
2795,
19,
8247,
250,
800,
3726,
3726,
26,
14,
1428,
250,
31,
22,
79,
544,
15,
31,
4409,
259,
20,
418,
646,
9,
86,
463,
15,
31,
22,
195,
74,
568,
4023,
150,
6013,
20,
418,
3142,
710,
6488,
9,
133,
48,
2141,
693,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Query antivirus definitions date?
===
Is it possible at all to query (WMI?) the virus defnintions date of definitions installed on remote computers? I'd like to start specificially with Symantec Endpoint Protection, and then branch out to other antivirus products.
This is a WinForms, .NET project. | 0 | [
2,
25597,
1082,
14792,
18544,
1231,
60,
800,
3726,
3726,
25,
32,
938,
35,
65,
20,
25597,
13,
5,
499,
1435,
60,
6,
14,
6231,
6312,
5703,
3309,
18,
1231,
16,
18544,
4066,
27,
5388,
7774,
60,
31,
22,
43,
101,
20,
799,
1903,
49,
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... |
Hibernate transaction problem
===
We are using Hibernate Spring MVC with OpenSessionInView filter.
Here is a problem we are running into (pseudo code)
transaction 1
load object foo
transaction 1 end
update foo's properties (not calling session.save or session.update but only foo's setters)
validate foo (using hibernate validator)
if validation fails ?
go back to edit screen
transaction 2 (read only)
load form backing objects from db
transaction 2 end
go to view
else
transaction 3
session.update(foo)
transaction 3 end
the problem we have is if the validation fails
foo is marked "dirty" in the hibernate session (since we use OpenSessionInView we only have one session throughout the http request), when we load the form backing objects (like a list of some entities using an HQL query), hibernate before performing the query checks if there are dirty objects in the session, it sees that foo is and flushes it, when transaction 2 is committed the updates are written to the database.
The problem is that even though it is a read only transaction and even though foo wasn't updated in transaction 2 hibernate doesn't have knowledge of which object was updated in which transaction and doesn't flush only objects from that transaction.
Any suggestions? did somebody ran into similar problem before
| 0 | [
2,
4148,
2102,
8820,
12799,
1448,
800,
3726,
3726,
95,
50,
568,
4148,
2102,
8820,
1573,
307,
8990,
29,
8965,
160,
5991,
108,
4725,
11945,
9,
235,
25,
21,
1448,
95,
50,
946,
77,
13,
5,
1919,
62,
18601,
1797,
6,
12799,
137,
6305,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 fork without having child inherit the parent's file descriptors?
===
I'm trying to run a shell command using the backtick operators, but the fact that the child process inherits php's open file descriptors is problematic. Is there a way to keep this from happening?
I'm running PHP 5.1.2 | 0 | [
2,
13,
26120,
8777,
366,
452,
850,
17569,
14,
4766,
22,
18,
3893,
121,
8741,
248,
18,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
485,
21,
3593,
1202,
568,
14,
97,
38,
7030,
9475,
15,
47,
14,
837,
30,
14,
850,
953,
17569,
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... |
What is the proper syntax for a cross-table SQL query?
===
Right now, I have `SELECT gp_id FROM gp.keywords WHERE keyword_id = 15 AND (SELECT practice_link FROM gp.practices WHERE practice_link IS NOT NULL AND id = gp_id)`. This does not provide a syntax error, however for values where it should return row(s), it just returns 0 rows.
What I'm trying to do is get the gp_id from gp.keywords where the the keywords table keyword_id column is a specific value and the practice_link is the practices table corresponds to the gp_id that I have, which is stored in the id column of that table. | 0 | [
2,
98,
25,
14,
4119,
22649,
26,
21,
919,
8,
5924,
4444,
255,
25597,
60,
800,
3726,
3726,
193,
130,
15,
31,
57,
13,
1,
18,
16964,
10538,
1,
1340,
37,
10538,
9,
4237,
12827,
113,
1246,
9587,
1,
1340,
800,
357,
17,
13,
5,
18,
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... |
How to check if program is running in local console?
===
In Windows Server 2003, how I can check if my program is running in local console ("on the screen of the server machine") instead of remote session?
I'm using Delphi Win32, so any Windows API based method should work.. | 0 | [
2,
184,
20,
2631,
100,
625,
25,
946,
19,
375,
8650,
60,
800,
3726,
3726,
19,
1936,
8128,
973,
15,
184,
31,
92,
2631,
100,
51,
625,
25,
946,
19,
375,
8650,
13,
5,
7,
218,
14,
2324,
16,
14,
8128,
1940,
7,
6,
700,
16,
5388,
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... |
app GUI similar to Control Panel in Vista
===
I was playing a bit with Windows Vista (still using XP) and I liked how the standard Control Panel worked. Do you think this design is good also for normal applications?
I like the idea of showing main topics with large fonts + icons. Details within each main topic are displayed using a small font and are immediatelly accessible without the need to browse the menu. Probably everybody knows Vista, but anyway, [here][1] is the Control Panel layout.
Compared to a classic layout of icons for main topics and menu for minor topics, the Control Panel GUI seems to be good at first sight.
I haven't seen any app using this kind of GUI, so I don't know if I should rather use the common approach with icons and menu for a common application? Maybe this Control Panel GUI is suitable only for setting some options, other than working with any data?
Thanks,
Petr
[1]: http://www.computerperformance.co.uk/images/Vista/control_panel2.jpg | 0 | [
2,
4865,
9457,
835,
20,
569,
4113,
19,
13520,
800,
3726,
3726,
31,
23,
791,
21,
1142,
29,
1936,
13520,
13,
5,
8073,
568,
23045,
6,
17,
31,
3345,
184,
14,
1236,
569,
4113,
577,
9,
107,
42,
277,
48,
704,
25,
254,
67,
26,
1826,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Deleting items from one collection in another collection
===
I've got two collections (generic Lists), let's call them ListA and ListB.
In ListA I've got a few items. In ListB I've got the same items plus many more. I want to remove all the items from ListB that are in ListA. What's the best way of doing this? Is Linq to objects a nice fit? What algorithm would you use?
Example
ListA: Item1, Item2
ListB: Item1, Item2, Item3, Item4
Thus I want Item1 & Item2 to be removed from ListB, so that it only contains Item3 and Item4 when done, and ListA still contains Item1 & Item2. | 0 | [
2,
121,
1336,
68,
3755,
37,
53,
1206,
19,
226,
1206,
800,
3726,
3726,
31,
22,
195,
330,
81,
5721,
13,
5,
17083,
596,
7227,
6,
15,
408,
22,
18,
645,
105,
968,
58,
17,
968,
220,
9,
19,
968,
58,
31,
22,
195,
330,
21,
310,
375... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Best examples of data visualisation
===
I love data visualisation and to spread that love I thought we could share our favourite examples of data visualisation:
**Chess moves** http://turbulence.org/spotlight/thinking/chess.html
**Chris Harrison's Visualisations** http://www.chrisharrison.net/projects/visualization.html
I especially like the bible and wikipedia visualisations.
----------
If you're interested in creating your own visualisations a good place to start would be to check out processing.js (http://ejohn.org/blog/processingjs/). | 0 | [
2,
246,
3770,
16,
1054,
3458,
4330,
800,
3726,
3726,
31,
339,
1054,
3458,
4330,
17,
20,
1789,
30,
339,
31,
289,
95,
110,
1891,
318,
7740,
3770,
16,
1054,
3458,
4330,
45,
13,
1409,
5370,
18,
4927,
1409,
7775,
6903,
2517,
9077,
2940... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Best way to track changes and make changes from Mysql -> MSSQL
===
So I need to track changes that happen on a Mysql table. I was thinking of using triggers to log all the changes made to it and then save these changes in another table. Then I will have a cron script get all these changes and propagate the changes into the Mssql database.
I really dont expect a lot of information to be proporgated, but the data is very time sensitive. Ideally the MSSQL will see these changes within a minute, but I know that this requirement may be too high.
I was wondering if anyone had a better solution.
I have the bulk of the site written in .net but use vbulletin as the forums (sorry but there are no .net forums as powerful or feature rich like vbulletin) | 0 | [
2,
246,
161,
20,
792,
1693,
17,
233,
1693,
37,
51,
18,
22402,
13,
8,
1,
4235,
18,
22402,
800,
3726,
3726,
86,
31,
376,
20,
792,
1693,
30,
2384,
27,
21,
51,
18,
22402,
859,
9,
31,
23,
1440,
16,
568,
7286,
18,
20,
6738,
65,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
get image from scanner
===
How do you get a image from the scanner using .NET (C#) on Vista?
Preferably to have the possibility to set the DPI.
There are a few controls on the market that do this, but they don't seem to work very well. | 0 | [
2,
164,
1961,
37,
23195,
800,
3726,
3726,
184,
107,
42,
164,
21,
1961,
37,
14,
23195,
568,
13,
9,
2328,
13,
5,
150,
5910,
6,
27,
13520,
60,
6369,
4801,
20,
57,
14,
4813,
20,
309,
14,
13,
43,
2159,
9,
80,
50,
21,
310,
8671,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
If I have two assemblies with the same name in the GAC, how do I tell .Net which to use?
===
I have to assemblies with the same name in the GLobal Assembly cache, but with different version numbers. How do I tell my program which version to reference?
For the record, this is a VB.Net page in an ASP.Net web site. | 0 | [
2,
100,
31,
57,
81,
21066,
29,
14,
205,
204,
19,
14,
4369,
150,
15,
184,
107,
31,
494,
13,
9,
2328,
56,
20,
275,
60,
800,
3726,
3726,
31,
57,
20,
21066,
29,
14,
205,
204,
19,
14,
2062,
1475,
16522,
15,
47,
29,
421,
615,
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... |
Map two lists into one single list of dictionaries
===
Imagine I have these python lists:
keys = ['name', 'age']
values = ['Monty', 42, 'Matt', 28, 'Frank', 33]
Is there a direct or at least a simple way to produce the following list of dictionaries ?
[
{'name' : 'Monty', 'age' : 42},
{'name' : 'Matt', 'age', 28},
{'name' : 'Frank', 'age', 33},
}
| 0 | [
2,
2942,
81,
7227,
77,
53,
345,
968,
16,
29783,
800,
3726,
3726,
4382,
31,
57,
158,
20059,
7227,
45,
5534,
800,
636,
22,
7259,
22,
15,
13,
22,
1303,
22,
500,
4070,
800,
636,
22,
3984,
93,
22,
15,
4162,
15,
13,
22,
21965,
22,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 and concurrent development branches
===
You have several maintenance branches for existing releases of your software. Some developers are making direct changes in the maintenance branches, and merging periodically into the trunk. Now comes an extensive refactoring in the trunk codeline, scheduled for an upcoming major release. But this makes the maintenance branches fundamentally incompatible with the code in the trunk, as they might depend on code that does not exist anymore, for example.
How do you deal with this situation in practise?
| 0 | [
2,
302,
17455,
68,
17,
19513,
522,
4395,
800,
3726,
3726,
42,
57,
238,
5010,
4395,
26,
3149,
7073,
16,
154,
2306,
9,
109,
10168,
50,
544,
1744,
1693,
19,
14,
5010,
4395,
15,
17,
18842,
19886,
77,
14,
6436,
9,
130,
1624,
40,
3386... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Best refactoring for the dreaded While (True) loop
===
If, like me, you shiver at the site of a While (True) loop, then you too must have thought long and hard about the best way to refactor it away. I've seen several different implementations, none really better than any other, such as the timer & delegate combination.
So what's the best way you've come up with or seen to refactor the dreaded While (True) loop? | 0 | [
2,
246,
302,
17455,
68,
26,
14,
10743,
69,
133,
13,
5,
13398,
6,
5293,
800,
3726,
3726,
100,
15,
101,
55,
15,
42,
11928,
35,
14,
689,
16,
21,
133,
13,
5,
13398,
6,
5293,
15,
94,
42,
266,
491,
57,
289,
175,
17,
552,
88,
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... |
What are the best resources for getting better with SQL?
===
I can write basic queries in MySQL, PostgreSQL, and MSSQL, but that's about it (as you can see from some of my questions here). But as soon as you get anything more advanced than a basic query, I fall apart. So what are some good resources to read to improve my SQL skills? I'm looking for books, websites, PDFs...anything. Free would be best, but I'm willing to look at anything. | 0 | [
2,
98,
50,
14,
246,
2566,
26,
1017,
574,
29,
4444,
255,
60,
800,
3726,
3726,
31,
92,
2757,
2125,
9386,
2829,
19,
51,
18,
22402,
15,
678,
6879,
18,
22402,
15,
17,
4235,
18,
22402,
15,
47,
30,
22,
18,
88,
32,
13,
5,
472,
42,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 an Efficient algorithm to find Area of Overlapping Rectangles
===
My situation
============
* Input: a set of rectangles
* each rect is comprised of 4 doubles like this: (x0,y1,x1,y1)
* they are not "rotated" at any angle, all they are "normal" rectangles that go "up/down" and "left/right" with respect to the screen
* they are randomly placed - they may be touching at the edges, overlapping , or not have any contact
* I will have several hundred rectangles
* this is implemented in C#
I need to find
============
* The area that is formed by their overlap
* I don't need the geometry of the overlap - just the area (example: 4 sq inches)
| 0 | [
2,
98,
25,
40,
8243,
9083,
20,
477,
217,
16,
23854,
27181,
18,
800,
3726,
3726,
51,
1858,
800,
3726,
3726,
3726,
3726,
3726,
3726,
3726,
3726,
3726,
3726,
3726,
1637,
6367,
45,
21,
309,
16,
27181,
18,
1637,
206,
6042,
38,
25,
1265... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Best documentation for Boost:asio ?
===
The documentation available on the [boost website][1] is... limited.
From what I've been able to read, the general consensus is that it is simply difficult to find good documentation on the boost::asio library.
Is this really the case? If so, why?
Notes:
- I have already found the (non-boost) [Asio website][2] - and the documentation looks to be identical to that on the boost website.
- I know that Boost::asio is new! I'm looking for solutions not excuses.
[1]: http://www.boost.org/doc/libs/1_36_0/doc/html/boost_asio.html
[2]: http://tenermerx.com/Asio/WebHome | 0 | [
2,
246,
13945,
26,
10419,
45,
58,
11076,
13,
60,
800,
3726,
3726,
14,
13945,
904,
27,
14,
636,
10858,
384,
2271,
500,
2558,
165,
500,
25,
9,
9,
9,
1317,
9,
37,
98,
31,
22,
195,
74,
777,
20,
1302,
15,
14,
297,
11205,
25,
30,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
UML standards guide / Best Practices
===
Does anyone know of a decent UML standards guide?
My company currently relies on UML 2.0 (rightly or wrongly) to do the majority (read *all*) of their design work. I have been asked to come up with a draft 'best practice' guide to help other developers develop better models. The main problem I face is that Im slightly biased against UML... I feel that: if a diagram takes more than 5 mins to draw then its too complicated! Im looking for advice predominantly on what sort of standards I should be looking at. Also Im looking for an external source of information that can be used to balence out my irrational loathing of UML-heavy design and act as a 'sanitizer' for my suggestions.
Most of all Im looking to write a useful document rather than one that will sit moulding away in some obscure network directory.
Any ideas? | 0 | [
2,
13,
723,
255,
3364,
3378,
13,
118,
246,
5242,
800,
3726,
3726,
630,
1276,
143,
16,
21,
12238,
13,
723,
255,
3364,
3378,
60,
51,
237,
871,
19272,
27,
13,
723,
255,
172,
9,
387,
13,
5,
4183,
102,
54,
1389,
102,
6,
20,
107,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 prevent Java-classloaders from loading different class-objects?
===
Developing a heavily XML-based Java-application, I recently encountered an interesting problem on Ubuntu Linux.
My application, using the <a href="http://jpf.sourceforge.net/">Java Plugin Framework</a>, appears unable to convert a <a href="http://www.dom4j.org/">dom4j</a>-created XML document to <a href="http://xmlgraphics.apache.org/batik/">Batik's</a> implementation of the SVG specification.
On the console, I learn that an exception occurs:
<pre>
Exception in thread "AWT-EventQueue-0" java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.apache.batik.dom.svg.SVGOMDocument.createAttribute(Ljava/lang/String;)Lorg/w3c/dom/Attr;" the class loader (instance of org/java/plugin/standard/StandardPluginClassLoader) of the current class, org/apache/batik/dom/svg/SVGOMDocument, and the class loader (instance of <bootloader>) for interface org/w3c/dom/Document have different Class objects for the type org/w3c/dom/Attr used in the signature
at org.apache.batik.dom.svg.SVGDOMImplementation.createDocument(SVGDOMImplementation.java:149)
at org.dom4j.io.DOMWriter.createDomDocument(DOMWriter.java:361)
at org.dom4j.io.DOMWriter.write(DOMWriter.java:138)
</pre>
Has one of you encountered such a problem and has any idea how to fix it or at least get to the core of the issue? | 0 | [
2,
184,
20,
2501,
8247,
8,
1898,
8294,
445,
37,
12797,
421,
718,
8,
23793,
18,
60,
800,
3726,
3726,
3561,
21,
2991,
23504,
8,
1281,
8247,
8,
2552,
20669,
15,
31,
1989,
8208,
40,
4883,
1448,
27,
287,
12968,
2473,
13024,
9,
51,
30... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 sort a CArray of a user defined type?
===
Is there a built-in way to sort a CArray in C++?
| 0 | [
2,
184,
107,
31,
2058,
21,
349,
2787,
16,
21,
4155,
2811,
1001,
60,
800,
3726,
3726,
25,
80,
21,
392,
8,
108,
161,
20,
2058,
21,
349,
2787,
19,
272,
20512,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
MFC Panel and window handle
===
Is there something like a panel that I can use in a MFC application. This is to overlay the default window in MFC (a dialog application). Then to paint the panel black and paint some random stuff on top of it. Something like a view port.
is there a better option than this to achieve the same effect ? | 0 | [
2,
307,
7061,
4113,
17,
1463,
3053,
800,
3726,
3726,
25,
80,
301,
101,
21,
4113,
30,
31,
92,
275,
19,
21,
307,
7061,
3010,
9,
48,
25,
20,
84,
4414,
14,
12838,
1463,
19,
307,
7061,
13,
5,
58,
28223,
3010,
6,
9,
94,
20,
5107,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Homemade vs. Java Serialization
===
I have a certain POJO which needs to be persisted on a database, current design specifies its field as a single string column, and adding additional fields to the table is not an option.
Meaning, the objects need to be serialized in some way. So just for the basic implementation I went and designed my own serialized form of the object which meant concatenating all it's fields into one nice string, separated by a delimiter I chose. But this is rather ugly, and can cause problems, say if one of the fields contains my delimiter.
So I tried basic Java serialization, but from a basic test I conducted, this somehow becomes a very costly operation (building a ByteArrayOutputStream, an ObjectOutputStream, and so on, same for the deserialization).
So what are my options? What is the preferred way for serializing objects to go on a database? | 0 | [
2,
27269,
4611,
9,
8247,
5956,
1829,
800,
3726,
3726,
31,
57,
21,
1200,
2353,
1636,
56,
2274,
20,
44,
22125,
27,
21,
6018,
15,
866,
704,
27669,
82,
575,
28,
21,
345,
3724,
4698,
15,
17,
4721,
1351,
2861,
20,
14,
859,
25,
52,
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... |
Best messaging medium for real-time SOA applications?
===
I'm working on a real time application implemented using in a SOA-style (read loosely coupled components connected via some messaging protocol - JMS, MQ or HTTP).
The architect who designed this system opted to use JMS to connect the components. This system is real time so there no need to queue up messages should one component fail (the transaction will simply time out). Further, there is no need for guaranteed delivery or rollback.
In this instance, is there any benefit to using JMS over something like an HTTP web service (speed, resource footprint, etc)?
One thing that I'm thinking is since the JMS approach requires us to set a thread pool size (the number of components listening to a JMS topic/queue), wouldn't a HTTP service be a better fit since this additional configuration is not needed (a new thread is created for each HTTP request making the application scalable to an "unlimited" number of requests until the server runs out of resources).
Am I missing something? | 0 | [
2,
246,
26437,
4152,
26,
683,
8,
891,
86,
58,
3767,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
683,
85,
3010,
6807,
568,
19,
21,
86,
58,
8,
4381,
13,
5,
10647,
13166,
13420,
5090,
2587,
1197,
109,
26437,
8494,
13,
8,
487,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 does OS X define 'nil'
===
At least the libsigc++2 project is hit by OS X headers defining `nil` on the preprocessor level, outside of namespaces etc. At least 10.5.5 and XCode 3.1 have this. Note that it is in effect not only in Objective-C sources but C++ as well.
Short question: why?
http://ardour.sourcearchive.com/documentation/2.5/functor__trait_8h-source.html
| 0 | [
2,
483,
630,
13,
759,
993,
9267,
13,
22,
103,
947,
22,
800,
3726,
3726,
35,
639,
14,
13,
8326,
18,
2816,
150,
20512,
135,
669,
25,
770,
34,
13,
759,
993,
157,
445,
14684,
13,
1,
103,
947,
1,
27,
14,
782,
16835,
248,
662,
15,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Preserve mapped drive letter information during UAC elevation
===
We have an application that needs to know the path that it is executed from (which is always a network path).
We set up part of our configuration based on the path that the application is launched from, and we really want that configuration to use mapped network drive paths instead of the UNC path to the resource.
What we've found is that when we launch our application without UAC elevation, we are able to get the directory that the application launched from using
GetModuleFileName(NULL, buf, sizeof(buf));
But when we launch elevated (which we actually need to do), the buffer returned gives us a UNC based path instead of a drive letter based path.
Note that we always launch from Windows Explorer by navigating into the folder tree of the mapped drive letter.
Does anyone have any suggestions on how to get the drive letter based path of the EXE from a process that is running elevated?
| 0 | [
2,
6224,
20877,
1493,
1748,
676,
112,
287,
1738,
4960,
800,
3726,
3726,
95,
57,
40,
3010,
30,
2274,
20,
143,
14,
2013,
30,
32,
25,
5557,
37,
13,
5,
2140,
25,
550,
21,
982,
2013,
6,
9,
95,
309,
71,
141,
16,
318,
8091,
432,
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... |
How do I check for valid (not dead) links programatically using PHP?
===
Given a list of urls, I would like to check that each url:
- Returns a 200 OK status code
- Returns a response within X amount of time
The end goal is a system that is capable of flagging urls as potentially broken so that an administrator can review them.
The script will be written in PHP and will most likely run on a daily basis via cron.
The script will be processing approximately 1000 urls at a go.
Question has two parts:
- Are there any bigtime gotchas with an operation like this, what issues have you run into?
- What is the best method for checking the status of a url in PHP considering both accuracy and performance?
Thanks very much for taking the time. | 0 | [
2,
184,
107,
31,
2631,
26,
7394,
13,
5,
1270,
828,
6,
6271,
625,
721,
8438,
568,
13,
26120,
60,
800,
3726,
3726,
504,
21,
968,
16,
13,
911,
7532,
15,
31,
83,
101,
20,
2631,
30,
206,
287,
6362,
45,
13,
8,
4815,
21,
2327,
5854... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 the standard way to determine the number for a primary key?
===
I'm planning to make a very simple program using php and mySQL. The main page will take information and make a new row in the database with that information. However, I need a number to put in for the primary key. Unfortunately, I have no idea about the normal way to determine what umber to use. Preferably, if I delete a row, that row's key won't ever be reused.
A preliminary search has turned up the AUTOINCREMENT keyword in mySQL. However, I'd still like to know if that will work for what I want and what the common solution to this issue is. | 0 | [
2,
98,
22,
18,
14,
1236,
161,
20,
3746,
14,
234,
26,
21,
1256,
1246,
60,
800,
3726,
3726,
31,
22,
79,
2334,
20,
233,
21,
253,
1935,
625,
568,
13,
26120,
17,
51,
18,
22402,
9,
14,
407,
2478,
129,
247,
676,
17,
233,
21,
78,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Where is a reliable registry key to find install location of Excel 2007?
===
Where is a reliable registry key to find install location of Excel 2007? | 0 | [
2,
113,
25,
21,
11398,
18269,
1246,
20,
477,
16146,
1474,
16,
20700,
624,
60,
800,
3726,
3726,
113,
25,
21,
11398,
18269,
1246,
20,
477,
16146,
1474,
16,
20700,
624,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Embedded browser with iframe
===
I am writing a touch screen kiosk application based on Firefox 3. A few of the use cases I have need an embedded browser, which I'm tackling with the help of an `<iframe>`. I need back/forward buttons for the embedded home page.
I've managed to access the history object of the iframe with
var w = document.getElementById('embeddedBrowser').contentWindow;
w.history.back();
The `history` of the embedded window is the same as that of the parent window. Therefore for a newly loaded `<iframe>`, this call will go back to the previous page of the system.
Is there any way to avoid this or a more correct way of solving this? | 0 | [
2,
12138,
16495,
29,
31,
8361,
800,
3726,
3726,
31,
589,
1174,
21,
1723,
2324,
28092,
3010,
432,
27,
535,
18219,
203,
9,
21,
310,
16,
14,
275,
1871,
31,
57,
376,
40,
12138,
16495,
15,
56,
31,
22,
79,
15586,
802,
29,
14,
448,
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... |
Is there an alternate to string.Replace that is Case insensitive?
===
I need to search a string and replace all occurances of %FirstName% and %PolicyAmount% with a value pulled from a database. The problem is the capitalization of FirstName varies. That prevents me from using the String.Replace() method. I've seen web pages on the subject that suggest
Regex.Replace(strInput, strToken, strReplaceWith, RegexOptions.IgnoreCase);
However for some reason when I try and replace %PolicyAmount% with $0, the replacement never takes place. I assume that it has something to do with the dollar sign being a reserved character in regex.
Is there another method I can use that doesn't involve sanitizing the input to deal with regex special characters? | 0 | [
2,
25,
80,
40,
4912,
20,
3724,
9,
99,
5119,
30,
25,
610,
19,
19435,
60,
800,
3726,
3726,
31,
376,
20,
2122,
21,
3724,
17,
3934,
65,
3744,
2416,
18,
16,
13,
11881,
3552,
7259,
11881,
17,
13,
11881,
8147,
2731,
58,
9780,
11881,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Multiselect listbox binded to database in Delphi 6.
===
I'm using Delphi 6, and I want a database binded list box with multiselect. I found three types of List boxes: TListBox, TDBListBox and TDBLookupListBox.
As far as i can understand, TListbox is not binded to database. TDBListBox and TDBLookupListBox can't be multiselected.
Is there a way to get a multiselect listbox binded to database? | 0 | [
2,
1889,
18,
16964,
968,
5309,
10193,
69,
20,
6018,
19,
23030,
400,
9,
800,
3726,
3726,
31,
22,
79,
568,
23030,
400,
15,
17,
31,
259,
21,
6018,
10193,
69,
968,
1649,
29,
1889,
18,
16964,
9,
31,
216,
132,
2551,
16,
968,
8120,
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... |
How many users will choose Paypal on an average ecommerce site given a choice?
===
Want to know how valuable Paypal is on an ecommerce site ($20-$80 average orders).
Anybody want to run
SELECT COUNT(*), PaymentMethod FROM Orders GROUP BY PaymentMethod
for me?
Any thoughts on what pecentage of orders we might *lose* if we dont have Paypal. My instinct is to say 'a lot of people will probably not order if they have to give their credit card' but I'd really be interested to hear anyones experience in this field. | 2 | [
2,
184,
151,
3878,
129,
3538,
1372,
6720,
27,
40,
862,
13,
62,
26470,
689,
504,
21,
1837,
60,
800,
3726,
3726,
259,
20,
143,
184,
5940,
1372,
6720,
25,
27,
40,
13,
62,
26470,
689,
13,
5,
4403,
1323,
8,
4403,
2887,
862,
3204,
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... |
create object from xml string in ruby
===
I am trying to deserialize an object from xml in ruby. Something simple like
<pre>
u = User.new({:client_key => "Bar"})
v = User.new(u.to_xml)
</pre>
I get an error <b>NoMethodError: undefined method `stringify_keys!' for #String:0x20fc7cc></b>. I'm not sure what I have to do in order to get the string from xml to an object. | 0 | [
2,
1600,
3095,
37,
23504,
3724,
19,
10811,
800,
3726,
3726,
31,
589,
749,
20,
1746,
106,
2815,
2952,
40,
3095,
37,
23504,
19,
10811,
9,
301,
1935,
101,
13,
1,
3515,
1,
287,
800,
4155,
9,
2681,
5,
1,
45,
150,
18513,
38,
1,
4237... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Adding to multiple tables in rails
===
I'm sure this is a relatively simple question, and there must be a good sensible rails way of doing it, but I'm not sure what it is.
Basically I'm adding books to a database, and I want to store the Author in a separate table. So I have a table called authors which is referenced by the table books.
I want to create a rails form for adding a book, and I'd like it to be just a simple form for Author, Title, Publisher etc, and if it finds the author already in the authors table then it should just reference that record, and if it isn't in the authors table then it should add a new record and reference it.
I'm sure there's an easy way of doing this in rails - but I can't seem to find it.
Cheers,
Robin | 0 | [
2,
4721,
20,
1886,
7484,
19,
2240,
18,
800,
3726,
3726,
31,
22,
79,
562,
48,
25,
21,
3109,
1935,
1301,
15,
17,
80,
491,
44,
21,
254,
24599,
2240,
18,
161,
16,
845,
32,
15,
47,
31,
22,
79,
52,
562,
98,
32,
25,
9,
11374,
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... |
What are the best options available for a rich UI in an ASP.NET MVC application?
===
So far I've found the following components for building ASP.NET MVC views:
- [Yahoo UI (YUI)][2]
- [Ext JS][3]
- [Flexgrid][1] (grid only)
What are the other options that are currently available which inlcude a nice grid component?
[1]: http://www.webplicity.net/flexigrid/
[2]: http://developer.yahoo.com/yui/
[3]: http://extjs.com/products/extjs/ | 0 | [
2,
98,
50,
14,
246,
6368,
904,
26,
21,
2042,
13,
5661,
19,
40,
28,
306,
9,
2328,
307,
8990,
3010,
60,
800,
3726,
3726,
86,
463,
31,
22,
195,
216,
14,
249,
5090,
26,
353,
28,
306,
9,
2328,
307,
8990,
4146,
45,
13,
8,
636,
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... |
Is parentViewController always a Navigation controller?
===
I was kind of scratching my head at this a week ago, and now with a little bit more Cocoa experience under my belt I feel like I have an inkling as to what might be going on.
I'm making an application that is driven by a UINavigationController. In the AppDelegate, I create an instance of this class, using "page 1" as the Root View Controller.
UINavigationController *aNavigationController = [[UINavigationController alloc]
initWithRootViewController:page1ViewController];
Now here's where I'm having the problem. From "page 1" I'd like to use a modal view controller that slides over the interface and then disappears once the user has made an edit. I do that using code like this, inside of Page1ViewController:
[self presentModalViewController:myModalViewController animated:YES];
When the Modal View Controller is gone, I want a value on "Page 1" to change based on what the user entered in the Modal View Controller. So, I wrote some code like this, which resides in the Modal View Controller:
[self.parentViewController dismissModalViewControllerAnimated:YES];
[self.parentViewController doSomethingPleaseWithSomeData:someData];
The update to page 1 wasn't happening, and it took me a long time to realize that the "doSomethingPleaseWithSomeData" message was not being sent to Page1ViewController, but the Navigation Controller.
Is this always to be expected when using Navigation Controllers? Did I perhaps configure something improperly? Is there an easy way to get at the View Controller that I want (in this case, Page1ViewController). | 0 | [
2,
25,
4766,
4725,
12898,
1252,
550,
21,
8368,
9919,
60,
800,
3726,
3726,
31,
23,
825,
16,
22202,
51,
157,
35,
48,
21,
877,
1464,
15,
17,
130,
29,
21,
265,
1142,
91,
24507,
1496,
131,
51,
3373,
31,
583,
101,
31,
57,
40,
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... |
Why am I getting this error:"Cross-thread operation not valid: Control lbFolders accessed from a thread other than the thread it was created on."?
===
This is baffling me, maybe somebody can shine the light of education on my ignorance. This is in a C# windows app. I am accessing the contents of a listbox from a thread. When I try to access it like this<pre><code>prgAll.Maximum = lbFolders.SelectedItems.Count;</code></pre>
I get the error. However, here is the part I don't get. If I comment out that line, the very next line<pre><code>foreach (string dir in lbFolders.SelectedItems)</code></pre>
executes just fine.
| 0 | [
2,
483,
589,
31,
1017,
48,
7019,
45,
7,
7703,
8,
96,
10647,
1453,
52,
7394,
45,
569,
4480,
8814,
445,
12904,
37,
21,
9322,
89,
119,
14,
9322,
32,
23,
679,
27,
9,
7,
60,
800,
3726,
3726,
48,
25,
334,
6752,
802,
55,
15,
913,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Display JSON/YAML hierarchy as a tree in HTML?
===
I have YAML data that looks sort of like this, but ~150k of it:
---
all:
foo: 1025
bar:
baz: 37628
quux:
a: 179
b: 7
...or the same thing in JSON:
{"all":{"bar":{"baz":"37628","quux":{"a":"179","b":"7"}},"foo":"1025"}}
I want to present this content in an HTML tree view to make it easier to explore. How do I do this?
I guess what I really want to figure out is how to take arbitrary JSON data, and automatically display it as a tree (with hash keys sorted alphabetically). So far, I've been tussling with [YUI's tree view](http://developer.yahoo.com/yui/treeview/), but it doesn't accept straight JSON, and my feeble attempts to massage the data into something useful don't seem to be working.
Thanks for any help. | 0 | [
2,
3042,
487,
528,
118,
8580,
255,
14417,
28,
21,
1541,
19,
13,
15895,
60,
800,
3726,
3726,
31,
57,
2167,
8184,
1054,
30,
1879,
2058,
16,
101,
48,
15,
47,
13,
1,
9839,
197,
16,
32,
45,
13,
8,
8,
8,
65,
45,
4310,
111,
45,
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 I retreive relevance value for ThinkingSphinx search results?
===
Is there any way to retrieve relevance values with results with the array returned by ThinkingSphinx?
Percentages, points or whatever, just something I can work with? | 0 | [
2,
184,
107,
31,
13,
6239,
99,
1284,
24144,
1923,
26,
1440,
18,
19931,
396,
2122,
1736,
60,
800,
3726,
3726,
25,
80,
186,
161,
20,
11917,
24144,
4070,
29,
1736,
29,
14,
7718,
587,
34,
1440,
18,
19931,
396,
60,
5780,
18,
15,
819,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
How would you design a tree view that collapses around an arbitrary middle element?
===
I've got an project management web application where any Project can be the child of zero or one other Project. Our director uses this function to group projects into Service Offerings, and our project managers use this to break projects down into tasks... but from the database's point of view, they're all in the Projects table. So the hierarchy can be arbitrarily deep, although in practice it hasn't gone deeper than 4 levels (yet).
When you're looking at one project's detail page, I want to have some kind of interactive widget that summarizes the whole family into the tightest space possible when you're not interacting with it, but expands gracefully to show as much detail as necessary to navigate around. I think the way file folders are displayed in Windows Explorer is a pretty good metaphor, and I know how to implement that with the YUI TreeView library.
The problem case, I expect, is going to be when I'm looking at one project with dozens of siblings and dozens of children. If I build the whole tree, then expand it enough to show the Project I'm looking at, it's also going to have expanded all my siblings, even though it could hide my children.
Can anyone point me to an interface example that looks like "You are Here. Children exist, click this affordance to show them. You have a parent, click that affordance to show it." ? JavaScript required is ok, Flash would be less popular so it would have to be darn cool. ;) | 0 | [
2,
184,
83,
42,
704,
21,
1541,
1418,
30,
6529,
18,
140,
40,
17237,
772,
4520,
60,
800,
3726,
3726,
31,
22,
195,
330,
40,
669,
1097,
2741,
3010,
113,
186,
669,
92,
44,
14,
850,
16,
4606,
54,
53,
89,
669,
9,
318,
559,
2027,
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... |
duplicate spring configruations being loaded?
===
I'm loooking at the output from spring being loaded up by tomcat and there's something very strange...Everything is duplicated. What would cause this? Whatever it is, it's causing my application to run in odd ways.
Example debug output:
[DEBUG,DefaultFilterInvocationDefinitionSource,main] Added URL pattern: /`**`; attributes: [REQUIRES_SECURE_CHANNEL]
[DEBUG,DefaultFilterInvocationDefinitionSource,main] Added URL pattern: /`**`; attributes: [REQUIRES_SECURE_CHANNEL]
[DEBUG,DefaultFilterInvocationDefinitionSource,main] Added URL pattern: /`**`; attributes: [ROLE_READ, ROLE_UPDATE]
[DEBUG,DefaultFilterInvocationDefinitionSource,main] Added URL pattern: /`**`; attributes: [ROLE_READ, ROLE_UPDATE]
[DEBUG,AbstractFallbackMethodDefinitionSource,main] Adding security method [CacheKey[com.service.impl.FooServiceImpl; public abstract java.lang.Boolean com.service.IFooService.saveOrUpdateFoo(com.model.Foo2,java.lang.String) throws org.springframework.dao.DataAccessException]] with attribute [[ROLE_UPDATE]]
[DEBUG,AbstractFallbackMethodDefinitionSource,main] Adding security method [CacheKey[com.service.impl.FooServiceImpl; public abstract java.lang.Boolean com.service.IFooService.saveOrUpdateFoo(com.model.Foo2,java.lang.String) throws org.springframework.dao.DataAccessException]] with attribute [[ROLE_UPDATE]]
[INFO,AbstractSecurityInterceptor,main] Validated configuration attributes
[INFO,AbstractSecurityInterceptor,main] Validated configuration attributes
... | 0 | [
2,
19429,
1573,
1065,
1707,
15244,
7504,
142,
8572,
60,
800,
3726,
3726,
31,
22,
79,
2205,
15393,
68,
35,
14,
5196,
37,
1573,
142,
8572,
71,
34,
2067,
5782,
17,
80,
22,
18,
301,
253,
2578,
9,
9,
9,
13224,
25,
19429,
43,
9,
98,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
structuring large web application for multiple developers
===
I've got several developers about to start working on an jquery-based web application. How can we structure the application so that we aren't constantly editing the same files (and having to merge the differences)? | 0 | [
2,
13,
10346,
10450,
370,
2741,
3010,
26,
1886,
10168,
800,
3726,
3726,
31,
22,
195,
330,
238,
10168,
88,
20,
799,
638,
27,
40,
487,
8190,
93,
8,
1281,
2741,
3010,
9,
184,
92,
95,
1411,
14,
3010,
86,
30,
95,
4847,
22,
38,
7545... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
How do you remove two digits in smallmoney with tsql?
===
sigh. my tsql kungfu suck. I have data for small money when i import it into sql from MS Access that column represent fee but it was stored as text for example "00000328" mean $3.28. when i import into ms sql i change the data type to smallmoney and now it show 328. how do i make all the values on that column to move the "." two digits over to the left. | 0 | [
2,
184,
107,
42,
4681,
81,
19076,
19,
284,
22520,
29,
13,
38,
18,
22402,
60,
800,
3726,
3726,
4858,
9,
51,
13,
38,
18,
22402,
19952,
4096,
8466,
9,
31,
57,
1054,
26,
284,
875,
76,
31,
9010,
32,
77,
4444,
255,
37,
4235,
1381,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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.