PostId
int64
13
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
3
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-33
210k
OwnerUndeletedAnswerCountAtPostTime
int64
0
5.77k
Title
stringlengths
10
250
BodyMarkdown
stringlengths
12
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
47
30.1k
OpenStatus_id
int64
0
4
11,436,699
07/11/2012 16:00:09
1,283,562
03/21/2012 13:55:35
25
0
Sql error : Cannot insert duplicate id on inserting new data with existing one
I've a textbox on my modify page which holds the existing data from db.these datas are seperate rows in sql db but displayed as single row separated by comma in the textbox. for eg : sql table keyid name 101 ss 105 hh 109 tt In my webform it's displayed in a textbox like ss,hh,tt.there's a bridge table (Keysproducts) which holds the keyid and productid(product that's related to the keyid) My issue here is On adding more datas along with existing ones in my textbox i get this error msg saying duplicate values not be inserted and shows my existing id's.Below is my SP for it.I checking if the keyname exists if not insert otherwise update.Please guide me if my approach is wrong. create PROCEDURE [dbo].[modify] ( @keyName nvarchar(256), @productdbid uniqueidentifier ) AS Begin declare @productid uniqueidentifier, @keyid uniqueidentifier, @id uniqueidentifier; declare @keydata table (keyid uniqueidentifier); set @productid =(select ProductID from Products where ProductID = @productdbid ); Begin if not exists(select keyname from keys where KeyName = @keyName) begin insert into Keys(KeyId,KeyName) output inserted.KeyId into @keydata(keyid) values (newid(),@keyName); select @keyid = keyid from @keydata; insert into KeysProducts(KeyId,productId) values (@keyid,@productid); end else begin set @id = (select keyid from keys where KeyName = @keyName) update keywords set KeyId=@id, KeyName=@keyName where KeyName= @keyName; end if not exists(select * from Keysproducts where ProductID = @productid and KeyId= @id) begin insert into Keysproducts(KeyId,ProductID) values (@id,@productid); end else begin update Keysproducts set KeyId=@id,productID=@productid; end end end end
sql
sql-server-2008
null
null
null
null
open
Sql error : Cannot insert duplicate id on inserting new data with existing one === I've a textbox on my modify page which holds the existing data from db.these datas are seperate rows in sql db but displayed as single row separated by comma in the textbox. for eg : sql table keyid name 101 ss 105 hh 109 tt In my webform it's displayed in a textbox like ss,hh,tt.there's a bridge table (Keysproducts) which holds the keyid and productid(product that's related to the keyid) My issue here is On adding more datas along with existing ones in my textbox i get this error msg saying duplicate values not be inserted and shows my existing id's.Below is my SP for it.I checking if the keyname exists if not insert otherwise update.Please guide me if my approach is wrong. create PROCEDURE [dbo].[modify] ( @keyName nvarchar(256), @productdbid uniqueidentifier ) AS Begin declare @productid uniqueidentifier, @keyid uniqueidentifier, @id uniqueidentifier; declare @keydata table (keyid uniqueidentifier); set @productid =(select ProductID from Products where ProductID = @productdbid ); Begin if not exists(select keyname from keys where KeyName = @keyName) begin insert into Keys(KeyId,KeyName) output inserted.KeyId into @keydata(keyid) values (newid(),@keyName); select @keyid = keyid from @keydata; insert into KeysProducts(KeyId,productId) values (@keyid,@productid); end else begin set @id = (select keyid from keys where KeyName = @keyName) update keywords set KeyId=@id, KeyName=@keyName where KeyName= @keyName; end if not exists(select * from Keysproducts where ProductID = @productid and KeyId= @id) begin insert into Keysproducts(KeyId,ProductID) values (@id,@productid); end else begin update Keysproducts set KeyId=@id,productID=@productid; end end end end
0
5,847,406
05/01/2011 08:39:01
570,769
01/11/2011 04:23:18
55
3
C# soundplayer doesn't work in Win7 and Vista
In c#+VS2008+XP, I can play a wav file by calling System.Media.SoundPlayer sp = new System.Media.SoundPlayer(new FileInfo( newfile).FullName); sp.Play();//sp.PlaySync(); In year 2010 when I test it in Win7 and vista, I found it doesn't work at all. Do anyone know how to solve this problem? REF: http://msdn.microsoft.com/en-us/library/system.media.soundplayer.aspx#Y2800 Thanks in advanced Du Sijun
c#
windows-7
windows-vista
null
null
04/27/2012 16:21:09
too localized
C# soundplayer doesn't work in Win7 and Vista === In c#+VS2008+XP, I can play a wav file by calling System.Media.SoundPlayer sp = new System.Media.SoundPlayer(new FileInfo( newfile).FullName); sp.Play();//sp.PlaySync(); In year 2010 when I test it in Win7 and vista, I found it doesn't work at all. Do anyone know how to solve this problem? REF: http://msdn.microsoft.com/en-us/library/system.media.soundplayer.aspx#Y2800 Thanks in advanced Du Sijun
3
10,576,743
05/14/2012 01:56:06
1,022,672
10/31/2011 20:33:29
69
0
mysql wont start
When I try to start mysql I get ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) When I use sudo I get Starting MySQL . ERROR! The server quit without updating PID file (/usr/local/var/mysql/Victorias-MacBook-Pro.local.pid).
mysql
null
null
null
null
05/15/2012 15:33:11
off topic
mysql wont start === When I try to start mysql I get ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) When I use sudo I get Starting MySQL . ERROR! The server quit without updating PID file (/usr/local/var/mysql/Victorias-MacBook-Pro.local.pid).
2
11,453,103
07/12/2012 13:40:03
1,310,420
04/03/2012 12:32:06
93
7
Jquery loop function
i have an Ajax jquery function like so: $.ajax({ url: 'backend/notif.php', success: function(data) { $('.nolab').html(data); } }); I want it to repeat with a delay of 4 seconds until the page is closed, is there any way i could do that? Thanks,
php
jquery
mysql
ajax
null
null
open
Jquery loop function === i have an Ajax jquery function like so: $.ajax({ url: 'backend/notif.php', success: function(data) { $('.nolab').html(data); } }); I want it to repeat with a delay of 4 seconds until the page is closed, is there any way i could do that? Thanks,
0
10,285,931
04/23/2012 18:13:07
1,351,977
04/23/2012 18:01:39
1
0
game logic in js
i explain my probleme : i have a worm game like this [enter link description here][1] i have to go to the next level if i hit SUCCESSIVELY 10 worm i have 3 points live, if i dont hit a worm live = live -1, 0 live : game over in the 2nd level there 2 warms shown simultaneous, level 3 there are 3 shown .. i cant find a solution to count the 10 successive hits. can you tell me how to proceed? thank you. [1]: http://lh6.ggpht.com/_gJe8rAkRJzA/TLZ1mHhbUfI/AAAAAAAACJs/DpPetyluroI/image_thumb%5B4%5D.png
javascript
algorithm
null
null
null
04/25/2012 03:35:47
not a real question
game logic in js === i explain my probleme : i have a worm game like this [enter link description here][1] i have to go to the next level if i hit SUCCESSIVELY 10 worm i have 3 points live, if i dont hit a worm live = live -1, 0 live : game over in the 2nd level there 2 warms shown simultaneous, level 3 there are 3 shown .. i cant find a solution to count the 10 successive hits. can you tell me how to proceed? thank you. [1]: http://lh6.ggpht.com/_gJe8rAkRJzA/TLZ1mHhbUfI/AAAAAAAACJs/DpPetyluroI/image_thumb%5B4%5D.png
1
9,597,659
03/07/2012 07:54:32
231,957
12/15/2009 09:23:38
1,554
30
API with rails 3.2 and rabl
I'm developing an API with rails 3.2 and rabl. Basically I have a model "Asset", and a very simple associated controller: class AssetsController < ApplicationController respond_to :json # GET /assets.json def index @assets = Asset.all end # GET /assets/1.json def show @asset = Asset.find(params[:id]) end # GET /assets/1/edit def edit @asset = Asset.find(params[:id]) end # POST /assets.json def create @asset = Asset.new(params[:asset]) @asset.save end end For each action, I have a associated ACTION.json.rabl view. When I issue the following commands, the Asset object is created but with null values: curl -XPOST -d 'kind=house' 'http://localhost:3000/assets.json' Also, where is the mapping between POST/assets.json and "create" function specified ?
ruby-on-rails
ruby-on-rails-3
rabl
null
null
null
open
API with rails 3.2 and rabl === I'm developing an API with rails 3.2 and rabl. Basically I have a model "Asset", and a very simple associated controller: class AssetsController < ApplicationController respond_to :json # GET /assets.json def index @assets = Asset.all end # GET /assets/1.json def show @asset = Asset.find(params[:id]) end # GET /assets/1/edit def edit @asset = Asset.find(params[:id]) end # POST /assets.json def create @asset = Asset.new(params[:asset]) @asset.save end end For each action, I have a associated ACTION.json.rabl view. When I issue the following commands, the Asset object is created but with null values: curl -XPOST -d 'kind=house' 'http://localhost:3000/assets.json' Also, where is the mapping between POST/assets.json and "create" function specified ?
0
10,804,488
05/29/2012 18:15:10
646,276
03/05/2011 18:37:42
147
0
Jqgrid with autocomplete
Can someone please help me with sample code for adding autocomplete feature to Jqgrid when editing through inline and adding a row using form. Where I tried , got only code to add datepicker. Please help me with sample piece of code.
jquery
jquery-ui
jqgrid
null
null
05/29/2012 23:21:13
not a real question
Jqgrid with autocomplete === Can someone please help me with sample code for adding autocomplete feature to Jqgrid when editing through inline and adding a row using form. Where I tried , got only code to add datepicker. Please help me with sample piece of code.
1
2,604,806
04/09/2010 02:44:45
12,968
09/16/2008 16:26:24
843
33
VSPackage fails PLK verification on clean machine, but passes on Dev machine when /noVSIP is set
I think the title pretty much says everything. But just to be safe... I've got a VSPackage developed on my main machine that has the VS2008 SDK SP1 installed on it. When debugging in the experimental hive, all works fine. I got a PLK, applied it, and followed the directions for testing the PLK (i.e. pass in /noVSIP on the command line), and the package loads properly. I've now written an installer with WiX (since regpkg will spit out WiX XML) and trying to install the VSPackage on a Visual Studio 2008 Pro edition running in a VM. But I get PLK verification failures. The 4 important bits (CompanyName, ProductName, ProductVersion, VSVersion) in the registry match what I generated the PLK with. No whitespace, no hidden characters, etc. Those bits also match what's on the PLK attribute in code. Since /noVSIP works, I'm at a loss for how to debug this loading issue. Thoughts?
vsip
vspackage
null
null
null
null
open
VSPackage fails PLK verification on clean machine, but passes on Dev machine when /noVSIP is set === I think the title pretty much says everything. But just to be safe... I've got a VSPackage developed on my main machine that has the VS2008 SDK SP1 installed on it. When debugging in the experimental hive, all works fine. I got a PLK, applied it, and followed the directions for testing the PLK (i.e. pass in /noVSIP on the command line), and the package loads properly. I've now written an installer with WiX (since regpkg will spit out WiX XML) and trying to install the VSPackage on a Visual Studio 2008 Pro edition running in a VM. But I get PLK verification failures. The 4 important bits (CompanyName, ProductName, ProductVersion, VSVersion) in the registry match what I generated the PLK with. No whitespace, no hidden characters, etc. Those bits also match what's on the PLK attribute in code. Since /noVSIP works, I'm at a loss for how to debug this loading issue. Thoughts?
0
9,284,834
02/14/2012 22:02:11
1,210,082
02/14/2012 21:56:42
1
0
Gridview sorting is not working After casting Datatable to Gridview because Datatable is empty
GrideView Sorting is not working After casting Datatable to Gridview my Dt is empty please help me ? Dim dt As DataTable = TryCast(GirdView.DataSource, DataTable) Code : Protected Sub GirdView_Sorting(sender As Object, e As System.Web.UI.WebControls.GridViewSortEventArgs) Handles GirdView.Sorting 'If showImage = False Then ' showImage = True 'End If Dim dt As DataTable = TryCast(GirdView.DataSource, DataTable) If dt IsNot Nothing Then Alert.Show(e.SortExpression) Dim dv As New DataView dv = New DataView(dt) dv.Sort = e.SortExpression & " " & GetSortDirection() GirdView.DataSource = dv GirdView.DataBind() Else Alert.Show("Nothing") ' MsgBox("Nothing", MsgBoxStyle.OkOnly, "SA") End If End Sub Private Property GridViewSortDirection() As String Get Return If(TryCast(ViewState("SortDirection"), String), "DESC") End Get Set(value As String) ViewState("SortDirection") = value End Set End Property Private Function GetSortDirection() As String Select Case GridViewSortDirection Case "ASC" GridViewSortDirection = "DESC" Exit Select Case "DESC" GridViewSortDirection = "ASC" Exit Select End Select Return GridViewSortDirection End Function
asp.net
sql
vb.net
gridview
gridview-sorting
02/16/2012 16:15:46
not a real question
Gridview sorting is not working After casting Datatable to Gridview because Datatable is empty === GrideView Sorting is not working After casting Datatable to Gridview my Dt is empty please help me ? Dim dt As DataTable = TryCast(GirdView.DataSource, DataTable) Code : Protected Sub GirdView_Sorting(sender As Object, e As System.Web.UI.WebControls.GridViewSortEventArgs) Handles GirdView.Sorting 'If showImage = False Then ' showImage = True 'End If Dim dt As DataTable = TryCast(GirdView.DataSource, DataTable) If dt IsNot Nothing Then Alert.Show(e.SortExpression) Dim dv As New DataView dv = New DataView(dt) dv.Sort = e.SortExpression & " " & GetSortDirection() GirdView.DataSource = dv GirdView.DataBind() Else Alert.Show("Nothing") ' MsgBox("Nothing", MsgBoxStyle.OkOnly, "SA") End If End Sub Private Property GridViewSortDirection() As String Get Return If(TryCast(ViewState("SortDirection"), String), "DESC") End Get Set(value As String) ViewState("SortDirection") = value End Set End Property Private Function GetSortDirection() As String Select Case GridViewSortDirection Case "ASC" GridViewSortDirection = "DESC" Exit Select Case "DESC" GridViewSortDirection = "ASC" Exit Select End Select Return GridViewSortDirection End Function
1
5,661,094
04/14/2011 09:28:28
692,277
04/05/2011 05:43:34
1
0
sqlite database in iphone
how can i retain all the row from login table please help i retain only on row why not other my query is wrong please some one chek and give me solution my friend i suffer fro last 3 day here is my code #import "loginAppDelegate.h" #import "global.h" #import <sqlite3.h> #import "logincontroller.h" @implementation loginAppDelegate @synthesize window; @synthesize loginView; //databaseName=@"login.sqlite"; -(void) chekAndCreateDatabase { BOOL success; //sqlite3 *databaseName=@"login.sqlite"; NSFileManager *fileManager=[NSFileManager defaultManager]; NSArray *documentPaths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir =[documentPaths objectAtIndex:0]; NSString *databasePath=[documentsDir stringByAppendingPathComponent:@"login.sqlite"]; success=[fileManager fileExistsAtPath:databasePath]; if(success)return; NSString *databasePathFromApp=[[[NSBundle mainBundle]resourcePath]stringByAppendingPathComponent:@"login.sqlite"]; [fileManager copyItemAtPath:databasePathFromApp toPath:databasePath error:nil]; [fileManager release]; } -(void) Data { Gpass=@""; Guname=@""; sqlite3_stmt *detailStmt=nil; //sqlite3 *databaseName; NSArray *documentPaths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir =[documentPaths objectAtIndex:0]; NSString *databasePath=[documentsDir stringByAppendingPathComponent:@"login.sqlite"]; [self chekAndCreateDatabase]; sqlite3 *database; if (sqlite3_open([databasePath UTF8String],&database)==SQLITE_OK) { if (detailStmt==nil) { const char *sql= "select *from Loginchk where uname='%?'and password='%?'"; //NSString *sql = [[NSString alloc] initWithFormat:@"SELECT * FROM Loginchk WHERE uname ='%@' and password ='%@' ",Uname.text,Password.text]; if (sqlite3_prepare_v2(database,sql,-1,&detailStmt,NULL)==SQLITE_OK) { sqlite3_bind_text(detailStmt,1,[Gunameq UTF8String],-1,SQLITE_TRANSIENT); sqlite3_bind_text(detailStmt,2,[Gpassq UTF8String],-1,SQLITE_TRANSIENT); if (SQLITE_DONE!= sqlite3_step(detailStmt)) { Guname=[NSString stringWithUTF8String:(char*)sqlite3_column_text(detailStmt,0)]; Gpass =[NSString stringWithUTF8String:(char*)sqlite3_column_text(detailStmt,1)]; NSLog(@"'%@'",Guname); NSLog(@"'%@'",Gpass); } } sqlite3_finalize(detailStmt); } } sqlite3_close(database); }
iphone
objective-c
null
null
null
null
open
sqlite database in iphone === how can i retain all the row from login table please help i retain only on row why not other my query is wrong please some one chek and give me solution my friend i suffer fro last 3 day here is my code #import "loginAppDelegate.h" #import "global.h" #import <sqlite3.h> #import "logincontroller.h" @implementation loginAppDelegate @synthesize window; @synthesize loginView; //databaseName=@"login.sqlite"; -(void) chekAndCreateDatabase { BOOL success; //sqlite3 *databaseName=@"login.sqlite"; NSFileManager *fileManager=[NSFileManager defaultManager]; NSArray *documentPaths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir =[documentPaths objectAtIndex:0]; NSString *databasePath=[documentsDir stringByAppendingPathComponent:@"login.sqlite"]; success=[fileManager fileExistsAtPath:databasePath]; if(success)return; NSString *databasePathFromApp=[[[NSBundle mainBundle]resourcePath]stringByAppendingPathComponent:@"login.sqlite"]; [fileManager copyItemAtPath:databasePathFromApp toPath:databasePath error:nil]; [fileManager release]; } -(void) Data { Gpass=@""; Guname=@""; sqlite3_stmt *detailStmt=nil; //sqlite3 *databaseName; NSArray *documentPaths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir =[documentPaths objectAtIndex:0]; NSString *databasePath=[documentsDir stringByAppendingPathComponent:@"login.sqlite"]; [self chekAndCreateDatabase]; sqlite3 *database; if (sqlite3_open([databasePath UTF8String],&database)==SQLITE_OK) { if (detailStmt==nil) { const char *sql= "select *from Loginchk where uname='%?'and password='%?'"; //NSString *sql = [[NSString alloc] initWithFormat:@"SELECT * FROM Loginchk WHERE uname ='%@' and password ='%@' ",Uname.text,Password.text]; if (sqlite3_prepare_v2(database,sql,-1,&detailStmt,NULL)==SQLITE_OK) { sqlite3_bind_text(detailStmt,1,[Gunameq UTF8String],-1,SQLITE_TRANSIENT); sqlite3_bind_text(detailStmt,2,[Gpassq UTF8String],-1,SQLITE_TRANSIENT); if (SQLITE_DONE!= sqlite3_step(detailStmt)) { Guname=[NSString stringWithUTF8String:(char*)sqlite3_column_text(detailStmt,0)]; Gpass =[NSString stringWithUTF8String:(char*)sqlite3_column_text(detailStmt,1)]; NSLog(@"'%@'",Guname); NSLog(@"'%@'",Gpass); } } sqlite3_finalize(detailStmt); } } sqlite3_close(database); }
0
8,319,713
11/30/2011 00:35:44
146,780
07/29/2009 01:23:43
6,894
9
How does this Sudoku Solver Work?
I've found some code that solves a sudoku puzzle, but I only understand part of it. static boolean solve(int i, int j, int[][] cells) { if (i == 9) { i = 0; if (++j == 9) return true; } if (cells[i][j] != 0) // skip filled cells return solve(i+1,j,cells); for (int val = 1; val <= 9; ++val) { if (legal(i,j,val,cells)) { cells[i][j] = val; if (solve(i+1,j,cells)) return true; } } cells[i][j] = 0; // reset on backtrack return false; } static boolean legal(int i, int j, int val, int[][] cells) { for (int k = 0; k < 9; ++k) // row if (val == cells[k][j]) return false; for (int k = 0; k < 9; ++k) // col if (val == cells[i][k]) return false; int boxRowOffset = (i / 3)*3; int boxColOffset = (j / 3)*3; for (int k = 0; k < 3; ++k) // box for (int m = 0; m < 3; ++m) if (val == cells[boxRowOffset+k][boxColOffset+m]) return false; return true; // no violations, so it's legal } I understand the legal() method, it simply checks for duplicates which is not permitted. What is not so clear is how the recursion in solve() is doing its job. Could anyone provide insight on how that part works. I really want to understand it so I can implement one myself. Thanks
java
algorithm
null
null
null
11/30/2011 06:20:55
too localized
How does this Sudoku Solver Work? === I've found some code that solves a sudoku puzzle, but I only understand part of it. static boolean solve(int i, int j, int[][] cells) { if (i == 9) { i = 0; if (++j == 9) return true; } if (cells[i][j] != 0) // skip filled cells return solve(i+1,j,cells); for (int val = 1; val <= 9; ++val) { if (legal(i,j,val,cells)) { cells[i][j] = val; if (solve(i+1,j,cells)) return true; } } cells[i][j] = 0; // reset on backtrack return false; } static boolean legal(int i, int j, int val, int[][] cells) { for (int k = 0; k < 9; ++k) // row if (val == cells[k][j]) return false; for (int k = 0; k < 9; ++k) // col if (val == cells[i][k]) return false; int boxRowOffset = (i / 3)*3; int boxColOffset = (j / 3)*3; for (int k = 0; k < 3; ++k) // box for (int m = 0; m < 3; ++m) if (val == cells[boxRowOffset+k][boxColOffset+m]) return false; return true; // no violations, so it's legal } I understand the legal() method, it simply checks for duplicates which is not permitted. What is not so clear is how the recursion in solve() is doing its job. Could anyone provide insight on how that part works. I really want to understand it so I can implement one myself. Thanks
3
9,066,727
01/30/2012 15:58:31
1,097,386
12/14/2011 08:40:33
15
1
Need advice on database design
i have a web app that allows user to create stores and upload inventories. would it be better to create a table of inventories for each store created since each inventory uploaded by a store is around 40k items or more? thanks.
database-design
null
null
null
null
01/30/2012 21:48:34
not constructive
Need advice on database design === i have a web app that allows user to create stores and upload inventories. would it be better to create a table of inventories for each store created since each inventory uploaded by a store is around 40k items or more? thanks.
4
9,045,543
01/28/2012 13:20:57
1,165,430
01/23/2012 17:06:07
1
0
asciidoc macros
I use asciidoc for rendering text. I have difficulties to understand macros My goal is to have a simple macro processing (like in LaTeX) FOO should be replaced by "bar" MYTEXT(xyz) sould be replaced by: "This is my text zyz!" (perhaps with a different way to pass the parameter 'xyz') Example file abc.txt: text text text FOO text FOO text text text MYTEXT(jajaja) This should result in text text text bar text bar text text text This is my text jajaja! I would expect that the definiton of FOO and MYTEXT has to go into the file abc.conf; probabely into the secion [macro]. Additional question: Are there problems with the pattern matching, if FOO should be replace with 'bar' and FOOX with 'barbar'?
asciidoc
null
null
null
null
null
open
asciidoc macros === I use asciidoc for rendering text. I have difficulties to understand macros My goal is to have a simple macro processing (like in LaTeX) FOO should be replaced by "bar" MYTEXT(xyz) sould be replaced by: "This is my text zyz!" (perhaps with a different way to pass the parameter 'xyz') Example file abc.txt: text text text FOO text FOO text text text MYTEXT(jajaja) This should result in text text text bar text bar text text text This is my text jajaja! I would expect that the definiton of FOO and MYTEXT has to go into the file abc.conf; probabely into the secion [macro]. Additional question: Are there problems with the pattern matching, if FOO should be replace with 'bar' and FOOX with 'barbar'?
0
4,330,532
12/02/2010 00:23:08
178,033
09/23/2009 19:37:42
81
5
TCP representation for unacknowledged data in sender's buffer
What is the best way to keep unacknowledged data buffer (sender's buffer) in TCP? I am thinking between keeping data itself, and keeping packets(header + data)? It seems retransmission of packets would be hard if I keep just data bytes as opposed to keeping packets. Language: C
c
tcp
window
sliding
null
null
open
TCP representation for unacknowledged data in sender's buffer === What is the best way to keep unacknowledged data buffer (sender's buffer) in TCP? I am thinking between keeping data itself, and keeping packets(header + data)? It seems retransmission of packets would be hard if I keep just data bytes as opposed to keeping packets. Language: C
0
7,325,455
09/06/2011 20:01:10
931,474
09/06/2011 20:01:10
1
0
jQuery Drop Down Menu showing all ul.sub-menus on ul.menu hover
I found this jQuery drop-down menu on the interwebs and the problem i'm having with it is, when you hover over a ul.menu item, all subsequent ul.sub-menus show, not just the one directly following the ul.menu. When you mouse over that ul.sub-menu li item, it's ul.sub-menu folds up and down normally. Here is my code: $(function() { $("#nav-primary ul.menu ul").css({ display: 'none' }); $("#nav-primary ul.menu li").hover(function() { $(this).find('a').next('ul.sub-menu') .stop(true, true).delay(50).animate({ "height": "show", "opacity": "show" }, 200 ); }, function(){ $(this).find('a').next('ul.sub-menu') .stop(true, true).delay(50).animate({ "height": "hide", "opacity": "hide" }, 200 ); }); });
jquery
hover
drop-down-menu
null
null
null
open
jQuery Drop Down Menu showing all ul.sub-menus on ul.menu hover === I found this jQuery drop-down menu on the interwebs and the problem i'm having with it is, when you hover over a ul.menu item, all subsequent ul.sub-menus show, not just the one directly following the ul.menu. When you mouse over that ul.sub-menu li item, it's ul.sub-menu folds up and down normally. Here is my code: $(function() { $("#nav-primary ul.menu ul").css({ display: 'none' }); $("#nav-primary ul.menu li").hover(function() { $(this).find('a').next('ul.sub-menu') .stop(true, true).delay(50).animate({ "height": "show", "opacity": "show" }, 200 ); }, function(){ $(this).find('a').next('ul.sub-menu') .stop(true, true).delay(50).animate({ "height": "hide", "opacity": "hide" }, 200 ); }); });
0
11,005,904
06/12/2012 22:40:46
1,373,901
05/04/2012 00:55:27
22
0
How to make a button that, when hovered on, slides over and reveals links (JS)?
Could anyone guide me in created a simple app in JS? What the app is is this: There will be a button that says "Themes" and when you put your mouse over that button, it slides over to the left, revealing two links (the links will say "Light" and "Dark"). I'm not that experienced with JS, so could someone help me? Thanks!
javascript
button
slide
null
null
06/13/2012 13:39:58
not a real question
How to make a button that, when hovered on, slides over and reveals links (JS)? === Could anyone guide me in created a simple app in JS? What the app is is this: There will be a button that says "Themes" and when you put your mouse over that button, it slides over to the left, revealing two links (the links will say "Light" and "Dark"). I'm not that experienced with JS, so could someone help me? Thanks!
1
10,047,155
04/06/2012 17:47:48
1,317,984
04/06/2012 17:42:21
1
0
php images change
Hi I was wondering what php code I can use that would allow my page to contain more than one image that changes. I would like the php code to output the HTML <img> tag. Can anyone help me with this? Thanks!
php
html
null
null
null
null
open
php images change === Hi I was wondering what php code I can use that would allow my page to contain more than one image that changes. I would like the php code to output the HTML <img> tag. Can anyone help me with this? Thanks!
0
11,198,998
06/25/2012 23:50:51
149,002
08/01/2009 16:08:45
1,315
16
Scala Play 2, passing request to method
I have a `Play 2.0` app `TestController.scala` def foo(p1: String) = Action {implicit request => Ok(bar(p1)) } private def bar(p1: String) = { //access request parameter here } What's the syntax for passing `request` to `bar`
scala
playframework
null
null
null
null
open
Scala Play 2, passing request to method === I have a `Play 2.0` app `TestController.scala` def foo(p1: String) = Action {implicit request => Ok(bar(p1)) } private def bar(p1: String) = { //access request parameter here } What's the syntax for passing `request` to `bar`
0
9,046,328
01/28/2012 15:18:47
1,175,233
01/28/2012 13:33:48
1
0
Trying to correct Layout problems for IE7
Im currently working on a website for work experience and ran into a problem with the layout. The website has a navigation menu at the top with a drop down menu. The layout is fine in all browsers besides IE7. Instead of running horizontally it runs vertically. The link is below. Please note that I have not been able to get on to the server and upload the full site so everything is wonky on it but my problem is still there to see. http://www.cudedesign.co.uk/tester/header.php I would be grateful for your suggestions so I can solve this before I have to go back on monday. Thank You in advance.
css
layout
ie7-bug
null
null
02/06/2012 19:53:37
too localized
Trying to correct Layout problems for IE7 === Im currently working on a website for work experience and ran into a problem with the layout. The website has a navigation menu at the top with a drop down menu. The layout is fine in all browsers besides IE7. Instead of running horizontally it runs vertically. The link is below. Please note that I have not been able to get on to the server and upload the full site so everything is wonky on it but my problem is still there to see. http://www.cudedesign.co.uk/tester/header.php I would be grateful for your suggestions so I can solve this before I have to go back on monday. Thank You in advance.
3
11,733,275
07/31/2012 04:49:03
713,099
04/18/2011 09:10:35
97
2
create setup for an existent exe file
I want to create a setup for an existent .exe file. This file needs some .ocx and .dll files to run correctly. So this mentioned setup should paste these all files in a specified path and then run the .exe file. I have tried with installshield 2010 basic and InstallScript projects but i could not create some of dialogs in the format that i wanted. Is there any way to create this setup? Or any one may help me to work with installshield?
setup-project
installshield-2010
null
null
null
null
open
create setup for an existent exe file === I want to create a setup for an existent .exe file. This file needs some .ocx and .dll files to run correctly. So this mentioned setup should paste these all files in a specified path and then run the .exe file. I have tried with installshield 2010 basic and InstallScript projects but i could not create some of dialogs in the format that i wanted. Is there any way to create this setup? Or any one may help me to work with installshield?
0
9,829,305
03/22/2012 19:38:38
80,869
03/21/2009 14:38:18
4,476
130
Encrypt stack trace on a website, any library to do so?
I want to include sensitive (debug) information on the page in case of errors so that I can collect that information while checking the production app. It is easier to use than logs. To make this secure I can: - show the debug info only when a secret key is in cookies - encrypt the information on the page and decrypt it using JavaScript in the browser (via extension or just JavaScript included on the page) The second options looks a bit better as it: - makes it possible to ask user to send us the encrypted data with description of the bug - does not require https connection to be secure. The disadvantage of this approach is that you can have some performance issues if you collect debugging data so maybe the best would be to use a combination of both approaches... ###Actual questions: - Do you know any library / browser extension that implements such feature? - Do you know any better way of doing this? - What do you think about the second idea?
security
debugging
logging
null
null
03/23/2012 14:52:23
not constructive
Encrypt stack trace on a website, any library to do so? === I want to include sensitive (debug) information on the page in case of errors so that I can collect that information while checking the production app. It is easier to use than logs. To make this secure I can: - show the debug info only when a secret key is in cookies - encrypt the information on the page and decrypt it using JavaScript in the browser (via extension or just JavaScript included on the page) The second options looks a bit better as it: - makes it possible to ask user to send us the encrypted data with description of the bug - does not require https connection to be secure. The disadvantage of this approach is that you can have some performance issues if you collect debugging data so maybe the best would be to use a combination of both approaches... ###Actual questions: - Do you know any library / browser extension that implements such feature? - Do you know any better way of doing this? - What do you think about the second idea?
4
3,357,344
07/28/2010 20:45:19
466,534
04/21/2010 12:03:08
968
5
question about string to file
here is code #include <iostream> #include <fstream> #include <cstring> using namespace std; int main() { ofstream out("test", ios::out | ios::binary); if(!out) { cout << "Cannot open output file.\n"; return 1; } double num = 100.45; char str[] = "www.java2s.com"; out.write((char *) &num, sizeof(double)); out.write(str, strlen(str)); out.close(); return 0; } i dont understand only this out.write((char *) &num, sizeof(double)); why we need `(char *)&num?`or `sizeof(double)?`
c++
null
null
null
null
null
open
question about string to file === here is code #include <iostream> #include <fstream> #include <cstring> using namespace std; int main() { ofstream out("test", ios::out | ios::binary); if(!out) { cout << "Cannot open output file.\n"; return 1; } double num = 100.45; char str[] = "www.java2s.com"; out.write((char *) &num, sizeof(double)); out.write(str, strlen(str)); out.close(); return 0; } i dont understand only this out.write((char *) &num, sizeof(double)); why we need `(char *)&num?`or `sizeof(double)?`
0
1,540,001
10/08/2009 19:44:15
44,160
12/07/2008 23:29:13
463
6
Changing careers paths through after hour projects?
I currently work as an asp/vb .net IT programmer. I really enjoy iPhone programming and I'm also very interested in objective j and cappuccino. I've just kind of dabbed into these technologies and am fixing to release my first iPhone app. I'm really hoping that if I put out several iPhone apps or start creating projects with objective-j, cappuccino and atlas( when it comes out ) I will be able to one day land a job in that realm. Has anyone reading this ever successfully made a move like this before by just developing projects in their spare time with the technologies they enjoy? If so, what kind of advice can you give me?
career-development
null
null
null
null
02/06/2012 01:14:08
off topic
Changing careers paths through after hour projects? === I currently work as an asp/vb .net IT programmer. I really enjoy iPhone programming and I'm also very interested in objective j and cappuccino. I've just kind of dabbed into these technologies and am fixing to release my first iPhone app. I'm really hoping that if I put out several iPhone apps or start creating projects with objective-j, cappuccino and atlas( when it comes out ) I will be able to one day land a job in that realm. Has anyone reading this ever successfully made a move like this before by just developing projects in their spare time with the technologies they enjoy? If so, what kind of advice can you give me?
2
583,245
02/24/2009 19:41:00
48,172
12/21/2008 19:34:35
37
2
books or blogs?
I've got lots of technical books-- 'bricks' I call them since most of them are in the 700 page range. I love these tech books and I can generally read those 700 pages much quicker than I can a novel of the same length. Go figure… However, as much as I love them, it seems their shelf-life is getting shorter all the time and I find myself searching the web for information more and more frequently. I characterize web tid-bits, blogs and articles as points in a kind of connect-the-dots approach to building a mental picture of whatever thing you’re researching as opposed to a book that will bring you from A to Z (or most of the way anyway). So, as a reforming book-worm, I’m wondering am I the only one? And to those who ‘connect-the-dots’: do you have a system to store those dots so that there’s some coherent trace to go back to and review? Yes, of course there are ‘browser favorites’? Is there some other way that I don’t know about? Is this a new genre of software or has someone done this already?
books
blogs
null
null
null
09/18/2011 21:57:45
not constructive
books or blogs? === I've got lots of technical books-- 'bricks' I call them since most of them are in the 700 page range. I love these tech books and I can generally read those 700 pages much quicker than I can a novel of the same length. Go figure… However, as much as I love them, it seems their shelf-life is getting shorter all the time and I find myself searching the web for information more and more frequently. I characterize web tid-bits, blogs and articles as points in a kind of connect-the-dots approach to building a mental picture of whatever thing you’re researching as opposed to a book that will bring you from A to Z (or most of the way anyway). So, as a reforming book-worm, I’m wondering am I the only one? And to those who ‘connect-the-dots’: do you have a system to store those dots so that there’s some coherent trace to go back to and review? Yes, of course there are ‘browser favorites’? Is there some other way that I don’t know about? Is this a new genre of software or has someone done this already?
4
9,403,441
02/22/2012 21:36:10
1,226,918
02/22/2012 21:31:13
1
0
Drop down menu not working in IE
Still learning a lot.. But basically finally finished my website, but now I'm failing at getting it to work in all browsers, fine in Chrome and Firefox, also checking on Browser testing websites, seems fine in Opera as well, but as per usual, Internet Explorer refuses to play nice and the menu's just fail to load all together. Here is the Nav HTML; <div id="nav"> <ul id="topnav" class="sf-menu"> <li><a href="index.php" class="current">Home</a></li> <li><a href="?page_id=645">About</a> <ul> <li><a href="?page_id=645">Gemini Global</a></li> <li><a href="?page_id=647">Joe Davenport</a></li> </li> </ul> </li> <li><a href="?page_id=435">Services</a> <ul> <li><a href="?page_id=623">Implement & Marketing</a></li> <li><a href="?page_id=625">Analysis & Evaluation</a></li> <li><a href="?page_id=628">Bid Writing</a></li> </li> </ul> <li><a href="?page_id=38">News</a></li> <li><a href="?page_id=275">Contact</a></li> </ul><!-- #topnav --> </div><!-- #nav --> and here is the CSS; /*** TOP AREA & MENU ***/ #top{height:77px; clear:both} #topsearch{ float:right; padding:25px 0 0 0} #topsearch .inputbox{width:200px; padding:6px 5px; background:#fff url(../images/bg_searchtop.gif) repeat-x; border:solid 1px #fff; outline:solid 1px #eaeaea; color:#6e6e6e; font-size:12px; box-shadow: inset 0px 0px 0px #d3d3d3; -moz-box-shadow: inset 0px 0px #d3d3d3; -webkit-box-shadow: inset 0px 0px 0px #d3d3d3; } #nav{position:relative; z-index:100; clear:both; height:70px;} #topnav{ margin:0; padding:0; list-style-type:none; overflow:visible; position:relative; float:left; font-size:14px; font-family:"DroidSansRegular"; text-transform:uppercase; background:url(../images/nav_line.gif) repeat-y left top; } .sf-menu > li{background:url(../images/nav_line.gif) repeat-y right top; width:156.667px; text-align:center; margin:0; padding:0; height:54px; line-height:54px} .sf-menu a:hover{color:#f0b028;} .sfHover a, .sfHover a.sf-with-ul {color:#f0b028;} .sfHover li a.sf-with-ul { color:#303030!important; } .sf-menu ul li.sfHover > a { color:#303030; } .sf-menu a { color:#303030; text-decoration:none!important; display: block; position: relative; padding: 0 !important; text-decoration:none; font-weight:normal; } .sf-menu li a.current{color:#0062a7;} .sf-menu li li:last-child { border-bottom:1px solid #f4f5f5; } .sfHover{background:#ca0005;} /* Drop down menu */ .sf-menu ul a:hover { background:transparent; } .sf-menu li li { background:#f3f3f3 url(../images/bg_submenu.gif) repeat-x 0 -1px !important; border-top:1px solid #e4e4e4; text-align:left; line-height:20px; font-size:12px; margin:0; } .sf-menu, .sf-menu * { margin: 0; padding: 0; list-style: none; font-size:13px; } .sf-menu { line-height:100%; position:absolute; right:0; bottom:0; float:left; } .sf-menu ul { position: absolute; top: -999em; width: 27em; /* left offset of submenus need to match (see below) */ border:solid 1px #e4e4e4; border-top:0; } .sf-menu ul li { width: 100%; } .sf-menu li:hover { visibility: inherit; /* fixes IE7 'sticky bug' */ } .sf-menu li { float: left; position: relative; margin:0; } .sf-menu li li{margin:0px 0px;} .sf-menu li:hover ul, .sf-menu li.sfHover ul { left: -2px; top: 4.4em; /* match top ul list item height */ z-index: 99; } ul.sf-menu li:hover li ul, ul.sf-menu li.sfHover li ul { top: -999em; } ul.sf-menu li li:hover ul, ul.sf-menu li li.sfHover ul { left: 10em; /* match ul width */ top: -1px; margin-left: 0px; } ul.sf-menu li li:hover li ul, ul.sf-menu li li.sfHover li ul { top: -999em; } ul.sf-menu li li li:hover ul, ul.sf-menu li li li.sfHover ul { left: 10em; /* match ul width */ top: -1px; } .sf-menu ul li a{ font-size:11px; padding:10px 25px 10px 25px!important; color:#303030; } .sf-menu ul li a:hover{} .sf-menu li ul { padding:0px; } .sf-menu a.sf-with-ul { padding-right: 0px; min-width: 1px; /* trigger IE7 hasLayout so spans position accurately */ } .sf-sub-indicator { position: absolute; display: block; right: 10px; top: 1.05em; /* IE6 only */ width: 10px; height: 10px; text-indent: -999em; overflow: hidden; }
html
css
internet-explorer
drop
null
03/01/2012 19:56:31
too localized
Drop down menu not working in IE === Still learning a lot.. But basically finally finished my website, but now I'm failing at getting it to work in all browsers, fine in Chrome and Firefox, also checking on Browser testing websites, seems fine in Opera as well, but as per usual, Internet Explorer refuses to play nice and the menu's just fail to load all together. Here is the Nav HTML; <div id="nav"> <ul id="topnav" class="sf-menu"> <li><a href="index.php" class="current">Home</a></li> <li><a href="?page_id=645">About</a> <ul> <li><a href="?page_id=645">Gemini Global</a></li> <li><a href="?page_id=647">Joe Davenport</a></li> </li> </ul> </li> <li><a href="?page_id=435">Services</a> <ul> <li><a href="?page_id=623">Implement & Marketing</a></li> <li><a href="?page_id=625">Analysis & Evaluation</a></li> <li><a href="?page_id=628">Bid Writing</a></li> </li> </ul> <li><a href="?page_id=38">News</a></li> <li><a href="?page_id=275">Contact</a></li> </ul><!-- #topnav --> </div><!-- #nav --> and here is the CSS; /*** TOP AREA & MENU ***/ #top{height:77px; clear:both} #topsearch{ float:right; padding:25px 0 0 0} #topsearch .inputbox{width:200px; padding:6px 5px; background:#fff url(../images/bg_searchtop.gif) repeat-x; border:solid 1px #fff; outline:solid 1px #eaeaea; color:#6e6e6e; font-size:12px; box-shadow: inset 0px 0px 0px #d3d3d3; -moz-box-shadow: inset 0px 0px #d3d3d3; -webkit-box-shadow: inset 0px 0px 0px #d3d3d3; } #nav{position:relative; z-index:100; clear:both; height:70px;} #topnav{ margin:0; padding:0; list-style-type:none; overflow:visible; position:relative; float:left; font-size:14px; font-family:"DroidSansRegular"; text-transform:uppercase; background:url(../images/nav_line.gif) repeat-y left top; } .sf-menu > li{background:url(../images/nav_line.gif) repeat-y right top; width:156.667px; text-align:center; margin:0; padding:0; height:54px; line-height:54px} .sf-menu a:hover{color:#f0b028;} .sfHover a, .sfHover a.sf-with-ul {color:#f0b028;} .sfHover li a.sf-with-ul { color:#303030!important; } .sf-menu ul li.sfHover > a { color:#303030; } .sf-menu a { color:#303030; text-decoration:none!important; display: block; position: relative; padding: 0 !important; text-decoration:none; font-weight:normal; } .sf-menu li a.current{color:#0062a7;} .sf-menu li li:last-child { border-bottom:1px solid #f4f5f5; } .sfHover{background:#ca0005;} /* Drop down menu */ .sf-menu ul a:hover { background:transparent; } .sf-menu li li { background:#f3f3f3 url(../images/bg_submenu.gif) repeat-x 0 -1px !important; border-top:1px solid #e4e4e4; text-align:left; line-height:20px; font-size:12px; margin:0; } .sf-menu, .sf-menu * { margin: 0; padding: 0; list-style: none; font-size:13px; } .sf-menu { line-height:100%; position:absolute; right:0; bottom:0; float:left; } .sf-menu ul { position: absolute; top: -999em; width: 27em; /* left offset of submenus need to match (see below) */ border:solid 1px #e4e4e4; border-top:0; } .sf-menu ul li { width: 100%; } .sf-menu li:hover { visibility: inherit; /* fixes IE7 'sticky bug' */ } .sf-menu li { float: left; position: relative; margin:0; } .sf-menu li li{margin:0px 0px;} .sf-menu li:hover ul, .sf-menu li.sfHover ul { left: -2px; top: 4.4em; /* match top ul list item height */ z-index: 99; } ul.sf-menu li:hover li ul, ul.sf-menu li.sfHover li ul { top: -999em; } ul.sf-menu li li:hover ul, ul.sf-menu li li.sfHover ul { left: 10em; /* match ul width */ top: -1px; margin-left: 0px; } ul.sf-menu li li:hover li ul, ul.sf-menu li li.sfHover li ul { top: -999em; } ul.sf-menu li li li:hover ul, ul.sf-menu li li li.sfHover ul { left: 10em; /* match ul width */ top: -1px; } .sf-menu ul li a{ font-size:11px; padding:10px 25px 10px 25px!important; color:#303030; } .sf-menu ul li a:hover{} .sf-menu li ul { padding:0px; } .sf-menu a.sf-with-ul { padding-right: 0px; min-width: 1px; /* trigger IE7 hasLayout so spans position accurately */ } .sf-sub-indicator { position: absolute; display: block; right: 10px; top: 1.05em; /* IE6 only */ width: 10px; height: 10px; text-indent: -999em; overflow: hidden; }
3
11,620,204
07/23/2012 20:42:08
1,546,909
07/23/2012 20:33:18
1
0
Where should I place SDKs directories in Linux?
I'm installing the Android SDKs on my Ubuntu system, and I do not want to place everything in my home directory. For some reason, the LSB directory hierarchy is silent on where to place development kits. Is it more correct to create an /opt/sdks tree or /usr/local/sdks, or somewhere else entirely?
linux
ubuntu
sdk
directory
null
null
open
Where should I place SDKs directories in Linux? === I'm installing the Android SDKs on my Ubuntu system, and I do not want to place everything in my home directory. For some reason, the LSB directory hierarchy is silent on where to place development kits. Is it more correct to create an /opt/sdks tree or /usr/local/sdks, or somewhere else entirely?
0
10,373,769
04/29/2012 16:25:12
236,492
12/22/2009 01:25:41
24
2
Do you use Tab Stacking of Opera or Tab Panarama of Firefox
Recently I installed Firefox 13 Beta(http://www.mozilla.org/en-US/firefox/all-beta.html). It has the new feature, new tab page like Google Chrome. It's that I want and I wait for. It shows the pages that I visited recently. When lauching Firefox 4, I surprised at Tab Panorama. I used to be excited with it. But now, I don't use it. Opera Tab Stacking is also very interesting feature. But I don't use it now either. I wonder usage of them. Do they have unique value that other features can't provide?
firefox
tabs
opera
stacking
null
04/30/2012 16:41:14
off topic
Do you use Tab Stacking of Opera or Tab Panarama of Firefox === Recently I installed Firefox 13 Beta(http://www.mozilla.org/en-US/firefox/all-beta.html). It has the new feature, new tab page like Google Chrome. It's that I want and I wait for. It shows the pages that I visited recently. When lauching Firefox 4, I surprised at Tab Panorama. I used to be excited with it. But now, I don't use it. Opera Tab Stacking is also very interesting feature. But I don't use it now either. I wonder usage of them. Do they have unique value that other features can't provide?
2
9,687,352
03/13/2012 15:46:02
1,266,573
03/13/2012 13:28:33
1
0
Infinite file size loading as3
I'm trying to load a big xml feed within ActionScript3. The problem is that the progress event indicate that the bytesTotal is zero and this result in a infinite loading sequence. The complete handler is never triggered. This is what is do. loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadDone); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, dataAnalyzeProgress) loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, io_error); var urlRequest:URLRequest = new URLRequest(url); protected function io_error(event:IOErrorEvent):void { trace("IO ERROR") trace(event.text) } protected function loadDone(event:Event):void { trace('DATA COMPLETE') trace(event.target.content) } protected function dataAnalyzeProgress(e:ProgressEvent):void { trace((e.bytesLoaded / e.bytesTotal) *100+"%"); trace("Downloaded " + e.bytesLoaded + " out of " + e.bytesTotal + " bytes"); if(e.bytesTotal == 0) { loader.close(); } } Does somebody have a solution for this problem. I tried load it through curl i first, but still the same problem...
actionscript-3
null
null
null
null
null
open
Infinite file size loading as3 === I'm trying to load a big xml feed within ActionScript3. The problem is that the progress event indicate that the bytesTotal is zero and this result in a infinite loading sequence. The complete handler is never triggered. This is what is do. loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadDone); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, dataAnalyzeProgress) loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, io_error); var urlRequest:URLRequest = new URLRequest(url); protected function io_error(event:IOErrorEvent):void { trace("IO ERROR") trace(event.text) } protected function loadDone(event:Event):void { trace('DATA COMPLETE') trace(event.target.content) } protected function dataAnalyzeProgress(e:ProgressEvent):void { trace((e.bytesLoaded / e.bytesTotal) *100+"%"); trace("Downloaded " + e.bytesLoaded + " out of " + e.bytesTotal + " bytes"); if(e.bytesTotal == 0) { loader.close(); } } Does somebody have a solution for this problem. I tried load it through curl i first, but still the same problem...
0
2,996,807
06/08/2010 11:21:17
358,395
06/04/2010 11:37:55
6
0
Server Application Error
The server has encountered an error while loading an application during the processing of your request. Please refer to the event log for more detail information. Please contact the server administrator for assistance
asp.net
null
null
null
null
06/22/2010 10:23:47
not a real question
Server Application Error === The server has encountered an error while loading an application during the processing of your request. Please refer to the event log for more detail information. Please contact the server administrator for assistance
1
2,598,708
04/08/2010 09:18:38
169,477
09/07/2009 03:08:30
321
1
Export data as Excel file from ASP.NET
I have data like below AAAAAA BBBBBB CCCCCC DDDDDD EEEEEE Now there is button on the page,when I click the button, the browser would download a excel file with the data above, and stay current page. Is there any simple way to do it? The data is very simple. only one column, and not huge. Best Regards,
asp.net
c#
excel
null
null
null
open
Export data as Excel file from ASP.NET === I have data like below AAAAAA BBBBBB CCCCCC DDDDDD EEEEEE Now there is button on the page,when I click the button, the browser would download a excel file with the data above, and stay current page. Is there any simple way to do it? The data is very simple. only one column, and not huge. Best Regards,
0
428,691
01/09/2009 16:15:26
9,943
09/15/2008 20:32:03
16
1
How to encourage implementation of TDD?
In a consulting company where the general thought of TDD and automated testing as a whole is appreciated by the programmers but thought of as "been there, done that, doesn't work" by management, how would you convince the powers that be to approve the investment of time and resources to implement such an approach? So, to be specific, this is not a question on why is TDD good but how to *encourage* management to adopt the practice?
project-management
tdd
coercion
null
null
07/07/2012 02:31:54
not constructive
How to encourage implementation of TDD? === In a consulting company where the general thought of TDD and automated testing as a whole is appreciated by the programmers but thought of as "been there, done that, doesn't work" by management, how would you convince the powers that be to approve the investment of time and resources to implement such an approach? So, to be specific, this is not a question on why is TDD good but how to *encourage* management to adopt the practice?
4
11,226,878
06/27/2012 13:04:11
263,525
02/01/2010 13:30:50
8,170
446
Why do I need to escape unicode in java source files?
Please note that I'm not asking how but why. And I don't know if it's a RCP specific problem or if it's something inherent to java. My java source files are encoded in UTF-8. If I define my literal strings like this : new Language("fr", "Français"), new Language("zh", "中文") It works as I expect when I use the string in the application by launching it from Eclipse as a RAP application : ![enter image description here][1] But if fails when I launch the .exe built by the "Eclipse Product Export Wizard" : ![enter image description here][2] The solution I use is to escape the chars like this : new Language("fr", "Fran\u00e7ais"), // Français new Language("zh", "\u4e2d\u6587") // 中文 There is no problem in doing this (all my other strings are in properties files, only the languages names are hardcoded) but I'd like to understand. I thought the compiler had to convert the java literal strings when building [the bytecode](http://en.wikipedia.org/wiki/Java_class_file#The_constant_pool). So why is the unicode escaping necessary ? Is it wrong to use use high range unicode chars in java source files ? What happens exactly to those chars at compilation and in what it is different from the handling of escaped chars ? [1]: http://i.stack.imgur.com/5iMfZ.png [2]: http://i.stack.imgur.com/anwJs.png
java
unicode
eclipse-rcp
unicode-escapes
null
null
open
Why do I need to escape unicode in java source files? === Please note that I'm not asking how but why. And I don't know if it's a RCP specific problem or if it's something inherent to java. My java source files are encoded in UTF-8. If I define my literal strings like this : new Language("fr", "Français"), new Language("zh", "中文") It works as I expect when I use the string in the application by launching it from Eclipse as a RAP application : ![enter image description here][1] But if fails when I launch the .exe built by the "Eclipse Product Export Wizard" : ![enter image description here][2] The solution I use is to escape the chars like this : new Language("fr", "Fran\u00e7ais"), // Français new Language("zh", "\u4e2d\u6587") // 中文 There is no problem in doing this (all my other strings are in properties files, only the languages names are hardcoded) but I'd like to understand. I thought the compiler had to convert the java literal strings when building [the bytecode](http://en.wikipedia.org/wiki/Java_class_file#The_constant_pool). So why is the unicode escaping necessary ? Is it wrong to use use high range unicode chars in java source files ? What happens exactly to those chars at compilation and in what it is different from the handling of escaped chars ? [1]: http://i.stack.imgur.com/5iMfZ.png [2]: http://i.stack.imgur.com/anwJs.png
0
4,261,252
11/23/2010 21:42:02
450,442
09/17/2010 09:30:22
29
1
Fastest IPC in PHP
I wonder, which is the fastest way to send data from one process to other in PHP? The data is only a short string. Curretly I have a solution with AF_UNIX sockets developed, but benchmarks show that it takes 0.100 ms to pass the data from one process to other. I wonder, if shared memory can be any faster? However, I have no idea, how to make the other process check the shared memory regularly to detect, if there are any new data written? Current solution: $server = socket_create(AF_UNIX, SOCK_STREAM, 0); socket_bind($server, '/tmp/mysock'); socket_listen($server); while(true) { $r = $clients; if(socket_select($r, $w, $e, 5) > 0) { $client = socket_accept($server); $d = trim(socket_read($client, 256, PHP_NORMAL_READ)); echo (microtime(true)-$d)."\n"; socket_close($client); } flush(); } socket_close($server); And client: $d = microtime(true)."\n"; $socket = socket_create(AF_UNIX, SOCK_STREAM, 0); socket_connect($socket, '/tmp/mysock'); socket_write($socket, $d, strlen($d)); socket_close($socket); This solution works completely, fine, but the results are like this: 0.00019216537475586 9.5129013061523E-5 0.00011920928955078 0.00011801719665527 7.6055526733398E-5 Any ideas, how to make this script faster or to develop a faster (possibly shared memory) solution? Thanks in advance, Jonas
php
sockets
stream
ipc
shared-memory
null
open
Fastest IPC in PHP === I wonder, which is the fastest way to send data from one process to other in PHP? The data is only a short string. Curretly I have a solution with AF_UNIX sockets developed, but benchmarks show that it takes 0.100 ms to pass the data from one process to other. I wonder, if shared memory can be any faster? However, I have no idea, how to make the other process check the shared memory regularly to detect, if there are any new data written? Current solution: $server = socket_create(AF_UNIX, SOCK_STREAM, 0); socket_bind($server, '/tmp/mysock'); socket_listen($server); while(true) { $r = $clients; if(socket_select($r, $w, $e, 5) > 0) { $client = socket_accept($server); $d = trim(socket_read($client, 256, PHP_NORMAL_READ)); echo (microtime(true)-$d)."\n"; socket_close($client); } flush(); } socket_close($server); And client: $d = microtime(true)."\n"; $socket = socket_create(AF_UNIX, SOCK_STREAM, 0); socket_connect($socket, '/tmp/mysock'); socket_write($socket, $d, strlen($d)); socket_close($socket); This solution works completely, fine, but the results are like this: 0.00019216537475586 9.5129013061523E-5 0.00011920928955078 0.00011801719665527 7.6055526733398E-5 Any ideas, how to make this script faster or to develop a faster (possibly shared memory) solution? Thanks in advance, Jonas
0
10,957,101
06/08/2012 23:22:42
1,397,472
05/16/2012 01:06:25
3
0
HTTP Error 500 after server migration
I recently performed a server migration which is on a new domain, however it is using the same hosting provider (Hostgator), with a VPS on nearly identical configuration (CentOS LAMP stack with Plesk as admin panel, running Joomla 1.5). When going to the server IP address, I get a HTTP 500 error. I asked a friend who is a linux/unix admin and he pointed me in the right direction, but I need some more assistance to figure this out. Please help! Steps I took for migration: 1.Backed up the mysql database 2.Created .tar backup using vcf command in ssh - was in /var/www/vhosts/sitename.com (name removed - unfortunately, I didn't use -su beforehand, so I am pondering if this is a user rights issue) 2.unpackaged the files on the new server, and created blank database using same database name / user name/ pw, then imported the old database. 3. Tested site via server IP in browser - received HTTP 500 error Steps I took for resolution: 1. Checked httpd.conf file : port listen 80 was fine, noticed document root was DocumentRoot "/var/www/html" so checked old httpd.conf file and seemed to be the same, but tried putting in /var/www/vhosts/sitename.com (name removed) and restarted apache - still HTTP 500 error 2. Copied original httpd.conf file and replaced on new server. Restarted apache and still same problem 3. Checked apache logs - got some weird stuff in there, but I'm not good at making sense out of most of the data on there - here's some recent stuff on there: [Wed Jun 06 21:10:27 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:10:27 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:10:27 2012] [notice] Digest: done [Wed Jun 06 21:10:27 2012] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations [Wed Jun 06 21:11:10 2012] [error] [client 66.249.71.46] File does not exist: /var/www/html/robots.txt [Wed Jun 06 21:11:10 2012] [error] [client 66.249.71.46] File does not exist: /var/www/html/searchresultslist.php [Wed Jun 06 21:11:22 2012] [error] [client 66.249.71.46] File does not exist: /var/www/html/searchresultslist.php [Wed Jun 06 21:11:29 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:11:49 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:11:49 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:11:49 2012] [notice] Digest: done [Wed Jun 06 21:11:49 2012] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations [Wed Jun 06 21:12:32 2012] [error] [client 66.249.71.46] File does not exist: /var/www/html/id_17015_Bikini+Banger+3.html [Wed Jun 06 21:12:35 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:12:35 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:12:35 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:12:35 2012] [notice] Digest: done [Wed Jun 06 21:12:35 2012] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations [Wed Jun 06 21:13:55 2012] [error] [client 66.249.71.46] File does not exist: /var/www/html/id_16954_Oral+Antics+3.html [Wed Jun 06 21:13:56 2012] [error] [client 66.249.71.46] File does not exist: /var/www/html/searchresultslist.php [Wed Jun 06 21:14:08 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:14:08 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:14:08 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:14:08 2012] [notice] Digest: done [Wed Jun 06 21:14:08 2012] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. [Wed Jun 06 21:14:08 2012] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations [Wed Jun 06 21:14:20 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:14:57 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:14:57 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:14:57 2012] [notice] Digest: done [Wed Jun 06 21:14:57 2012] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. [Wed Jun 06 21:14:57 2012] [notice] Apache configured -- resuming normal operations [Wed Jun 06 21:15:18 2012] [error] [client 66.249.71.46] File does not exist: /var/www/html/id_16978_Honky+Tonk+Teens.html [Wed Jun 06 21:15:29 2012] [error] [client 66.249.71.46] script '/var/www/html/searchresultslist.php' not found or unable to stat [Wed Jun 06 21:16:26 2012] [error] [client 66.249.71.46] script '/var/www/html/searchresultslist.php' not found or unable to stat [Wed Jun 06 21:16:40 2012] [error] [client 66.249.71.46] File does not exist: /var/www/html/id_16936_Goddaughter+4.html [Wed Jun 06 21:17:47 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:18:25 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:18:25 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:18:25 2012] [notice] Digest: done [Wed Jun 06 21:18:26 2012] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. [Wed Jun 06 21:18:26 2012] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations [Wed Jun 06 21:18:27 2012] [error] [client 66.249.71.46] script '/var/www/html/searchresultslist.php' not found or unable to stat [Wed Jun 06 21:19:16 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:19:17 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:19:17 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:19:17 2012] [notice] Digest: done [Wed Jun 06 21:19:17 2012] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. [Wed Jun 06 21:19:17 2012] [notice] Apache configured -- resuming normal operations [Wed Jun 06 21:19:18 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:19:18 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:19:18 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:19:18 2012] [notice] Digest: done [Wed Jun 06 21:19:18 2012] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. [Wed Jun 06 21:19:18 2012] [notice] Apache configured -- resuming normal operations [Wed Jun 06 21:19:26 2012] [error] [client 66.249.71.46] script '/var/www/html/searchresultslist.php' not found or unable to stat [Wed Jun 06 21:19:34 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:19:36 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:19:36 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:19:36 2012] [notice] Digest: done [Wed Jun 06 21:19:36 2012] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. [Wed Jun 06 21:19:36 2012] [notice] Apache configured -- resuming normal operations [Wed Jun 06 21:20:27 2012] [error] [client 66.249.71.46] script '/var/www/html/searchresultslist.php' not found or unable to stat [Wed Jun 06 21:20:36 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:20:38 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:20:38 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:38 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:38 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:38 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:38 2012] [warn] Init: SSL server IP/port conflict: default-74_52_101_154:443 (/usr/local/psa/admin/conf/generated/13390356360.34519800_server.include:139) vs. horde.webmail:443 (/usr/local/psa/admin/conf/generated/13390356360.34519800_horde.include:96) [Wed Jun 06 21:20:38 2012] [warn] Init: SSL server IP/port conflict: default-74_52_101_XXX:443 (/usr/local/psa/admin/conf/generated/13390356360.34519800_server.include:105) vs. horde.webmail:443 (/usr/local/psa/admin/conf/generated/13390356360.34519800_horde.include:49) [Wed Jun 06 21:20:38 2012] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!! [Wed Jun 06 21:20:38 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:20:38 2012] [notice] Digest: done [Wed Jun 06 21:20:38 2012] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. [Wed Jun 06 21:20:38 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:38 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:38 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:38 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:38 2012] [warn] Init: SSL server IP/port conflict: default-74_52_101_154:443 (/usr/local/psa/admin/conf/generated/13390356360.34519800_server.include:139) vs. horde.webmail:443 (/usr/local/psa/admin/conf/generated/13390356360.34519800_horde.include:96) [Wed Jun 06 21:20:38 2012] [warn] Init: SSL server IP/port conflict: default-74_52_101_XXX:443 (/usr/local/psa/admin/conf/generated/13390356360.34519800_server.include:105) vs. horde.webmail:443 (/usr/local/psa/admin/conf/generated/13390356360.34519800_horde.include:49) [Wed Jun 06 21:20:38 2012] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!! [Wed Jun 06 21:20:38 2012] [notice] Apache configured -- resuming normal operations [Wed Jun 06 21:20:39 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:20:42 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:20:42 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:42 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:42 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:42 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:42 2012] [warn] Init: SSL server IP/port conflict: default-74_52_101_154:443 (/usr/local/psa/admin/conf/generated/13390356200.85030600_server.include:139) vs. horde.webmail:443 (/usr/local/psa/admin/conf/generated/13390356200.85030600_horde.include:96) [Wed Jun 06 21:20:42 2012] [warn] Init: SSL server IP/port conflict: default-74_52_101_XXX:443 (/usr/local/psa/admin/conf/generated/13390356200.85030600_server.include:105) vs. horde.webmail:443 (/usr/local/psa/admin/conf/generated/13390356200.85030600_horde.include:49) [Wed Jun 06 21:20:42 2012] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!! [Wed Jun 06 21:20:42 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:20:42 2012] [notice] Digest: done I could be wrong with this being an apache issue, but that seems like the first place to start. Any suggestions? Maybe issue with user rights? I'm not too good with that stuff - any help is appreciated!
apache
http-status-code-500
server-migration
null
null
06/11/2012 07:40:45
off topic
HTTP Error 500 after server migration === I recently performed a server migration which is on a new domain, however it is using the same hosting provider (Hostgator), with a VPS on nearly identical configuration (CentOS LAMP stack with Plesk as admin panel, running Joomla 1.5). When going to the server IP address, I get a HTTP 500 error. I asked a friend who is a linux/unix admin and he pointed me in the right direction, but I need some more assistance to figure this out. Please help! Steps I took for migration: 1.Backed up the mysql database 2.Created .tar backup using vcf command in ssh - was in /var/www/vhosts/sitename.com (name removed - unfortunately, I didn't use -su beforehand, so I am pondering if this is a user rights issue) 2.unpackaged the files on the new server, and created blank database using same database name / user name/ pw, then imported the old database. 3. Tested site via server IP in browser - received HTTP 500 error Steps I took for resolution: 1. Checked httpd.conf file : port listen 80 was fine, noticed document root was DocumentRoot "/var/www/html" so checked old httpd.conf file and seemed to be the same, but tried putting in /var/www/vhosts/sitename.com (name removed) and restarted apache - still HTTP 500 error 2. Copied original httpd.conf file and replaced on new server. Restarted apache and still same problem 3. Checked apache logs - got some weird stuff in there, but I'm not good at making sense out of most of the data on there - here's some recent stuff on there: [Wed Jun 06 21:10:27 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:10:27 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:10:27 2012] [notice] Digest: done [Wed Jun 06 21:10:27 2012] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations [Wed Jun 06 21:11:10 2012] [error] [client 66.249.71.46] File does not exist: /var/www/html/robots.txt [Wed Jun 06 21:11:10 2012] [error] [client 66.249.71.46] File does not exist: /var/www/html/searchresultslist.php [Wed Jun 06 21:11:22 2012] [error] [client 66.249.71.46] File does not exist: /var/www/html/searchresultslist.php [Wed Jun 06 21:11:29 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:11:49 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:11:49 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:11:49 2012] [notice] Digest: done [Wed Jun 06 21:11:49 2012] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations [Wed Jun 06 21:12:32 2012] [error] [client 66.249.71.46] File does not exist: /var/www/html/id_17015_Bikini+Banger+3.html [Wed Jun 06 21:12:35 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:12:35 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:12:35 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:12:35 2012] [notice] Digest: done [Wed Jun 06 21:12:35 2012] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations [Wed Jun 06 21:13:55 2012] [error] [client 66.249.71.46] File does not exist: /var/www/html/id_16954_Oral+Antics+3.html [Wed Jun 06 21:13:56 2012] [error] [client 66.249.71.46] File does not exist: /var/www/html/searchresultslist.php [Wed Jun 06 21:14:08 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:14:08 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:14:08 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:14:08 2012] [notice] Digest: done [Wed Jun 06 21:14:08 2012] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. [Wed Jun 06 21:14:08 2012] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations [Wed Jun 06 21:14:20 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:14:57 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:14:57 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:14:57 2012] [notice] Digest: done [Wed Jun 06 21:14:57 2012] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. [Wed Jun 06 21:14:57 2012] [notice] Apache configured -- resuming normal operations [Wed Jun 06 21:15:18 2012] [error] [client 66.249.71.46] File does not exist: /var/www/html/id_16978_Honky+Tonk+Teens.html [Wed Jun 06 21:15:29 2012] [error] [client 66.249.71.46] script '/var/www/html/searchresultslist.php' not found or unable to stat [Wed Jun 06 21:16:26 2012] [error] [client 66.249.71.46] script '/var/www/html/searchresultslist.php' not found or unable to stat [Wed Jun 06 21:16:40 2012] [error] [client 66.249.71.46] File does not exist: /var/www/html/id_16936_Goddaughter+4.html [Wed Jun 06 21:17:47 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:18:25 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:18:25 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:18:25 2012] [notice] Digest: done [Wed Jun 06 21:18:26 2012] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. [Wed Jun 06 21:18:26 2012] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations [Wed Jun 06 21:18:27 2012] [error] [client 66.249.71.46] script '/var/www/html/searchresultslist.php' not found or unable to stat [Wed Jun 06 21:19:16 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:19:17 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:19:17 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:19:17 2012] [notice] Digest: done [Wed Jun 06 21:19:17 2012] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. [Wed Jun 06 21:19:17 2012] [notice] Apache configured -- resuming normal operations [Wed Jun 06 21:19:18 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:19:18 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:19:18 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:19:18 2012] [notice] Digest: done [Wed Jun 06 21:19:18 2012] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. [Wed Jun 06 21:19:18 2012] [notice] Apache configured -- resuming normal operations [Wed Jun 06 21:19:26 2012] [error] [client 66.249.71.46] script '/var/www/html/searchresultslist.php' not found or unable to stat [Wed Jun 06 21:19:34 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:19:36 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:19:36 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:19:36 2012] [notice] Digest: done [Wed Jun 06 21:19:36 2012] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. [Wed Jun 06 21:19:36 2012] [notice] Apache configured -- resuming normal operations [Wed Jun 06 21:20:27 2012] [error] [client 66.249.71.46] script '/var/www/html/searchresultslist.php' not found or unable to stat [Wed Jun 06 21:20:36 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:20:38 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:20:38 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:38 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:38 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:38 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:38 2012] [warn] Init: SSL server IP/port conflict: default-74_52_101_154:443 (/usr/local/psa/admin/conf/generated/13390356360.34519800_server.include:139) vs. horde.webmail:443 (/usr/local/psa/admin/conf/generated/13390356360.34519800_horde.include:96) [Wed Jun 06 21:20:38 2012] [warn] Init: SSL server IP/port conflict: default-74_52_101_XXX:443 (/usr/local/psa/admin/conf/generated/13390356360.34519800_server.include:105) vs. horde.webmail:443 (/usr/local/psa/admin/conf/generated/13390356360.34519800_horde.include:49) [Wed Jun 06 21:20:38 2012] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!! [Wed Jun 06 21:20:38 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:20:38 2012] [notice] Digest: done [Wed Jun 06 21:20:38 2012] [notice] mod_python: Creating 4 session mutexes based on 10 max processes and 0 max threads. [Wed Jun 06 21:20:38 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:38 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:38 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:38 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:38 2012] [warn] Init: SSL server IP/port conflict: default-74_52_101_154:443 (/usr/local/psa/admin/conf/generated/13390356360.34519800_server.include:139) vs. horde.webmail:443 (/usr/local/psa/admin/conf/generated/13390356360.34519800_horde.include:96) [Wed Jun 06 21:20:38 2012] [warn] Init: SSL server IP/port conflict: default-74_52_101_XXX:443 (/usr/local/psa/admin/conf/generated/13390356360.34519800_server.include:105) vs. horde.webmail:443 (/usr/local/psa/admin/conf/generated/13390356360.34519800_horde.include:49) [Wed Jun 06 21:20:38 2012] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!! [Wed Jun 06 21:20:38 2012] [notice] Apache configured -- resuming normal operations [Wed Jun 06 21:20:39 2012] [notice] caught SIGTERM, shutting down [Wed Jun 06 21:20:42 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jun 06 21:20:42 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:42 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:42 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:42 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!? [Wed Jun 06 21:20:42 2012] [warn] Init: SSL server IP/port conflict: default-74_52_101_154:443 (/usr/local/psa/admin/conf/generated/13390356200.85030600_server.include:139) vs. horde.webmail:443 (/usr/local/psa/admin/conf/generated/13390356200.85030600_horde.include:96) [Wed Jun 06 21:20:42 2012] [warn] Init: SSL server IP/port conflict: default-74_52_101_XXX:443 (/usr/local/psa/admin/conf/generated/13390356200.85030600_server.include:105) vs. horde.webmail:443 (/usr/local/psa/admin/conf/generated/13390356200.85030600_horde.include:49) [Wed Jun 06 21:20:42 2012] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!! [Wed Jun 06 21:20:42 2012] [notice] Digest: generating secret for digest authentication ... [Wed Jun 06 21:20:42 2012] [notice] Digest: done I could be wrong with this being an apache issue, but that seems like the first place to start. Any suggestions? Maybe issue with user rights? I'm not too good with that stuff - any help is appreciated!
2
7,494,601
09/21/2011 04:25:19
955,522
09/20/2011 19:31:41
6
0
What is an easy way to save a set of arrays to a file and back in C++?
Dear all: I've been searching for an easy way on C++ to save a set of variables (in this case, a set of double arrays) to a file, and later load said file and get the set of variables. Most of the ways that I've read about imply to lump all of the variables into a single array, or (even worse) write a custom class that reads and writes character by character, manually, all of which is impractical since the arrays will have variable length. Is there a class or library that I could use? (The fact that I am asking this question means that, yes, it's one of the first times I have to deal with files)
c++
arrays
file-io
null
null
null
open
What is an easy way to save a set of arrays to a file and back in C++? === Dear all: I've been searching for an easy way on C++ to save a set of variables (in this case, a set of double arrays) to a file, and later load said file and get the set of variables. Most of the ways that I've read about imply to lump all of the variables into a single array, or (even worse) write a custom class that reads and writes character by character, manually, all of which is impractical since the arrays will have variable length. Is there a class or library that I could use? (The fact that I am asking this question means that, yes, it's one of the first times I have to deal with files)
0
8,809,102
01/10/2012 19:13:45
1,046,295
11/14/2011 20:09:17
18
0
Requirement to dynamically assign keyboard shortcuts by the end user
I have a requirement where the keybindings can be modified by the end user in a form. How do i accomplish this change ? As of now the keyboard shortcuts are static and i have handled them in the keydown event using a basic if condition like , if(key=='Z' & key=='Ctrl') //then undo this way . How do i accomplish this in C#
c#
winforms
keyboard
keyboard-shortcuts
null
null
open
Requirement to dynamically assign keyboard shortcuts by the end user === I have a requirement where the keybindings can be modified by the end user in a form. How do i accomplish this change ? As of now the keyboard shortcuts are static and i have handled them in the keydown event using a basic if condition like , if(key=='Z' & key=='Ctrl') //then undo this way . How do i accomplish this in C#
0
2,416,194
03/10/2010 10:45:40
92,040
04/17/2009 09:12:31
393
18
Dynamically creating a treeview in HTML with indent lines in ASP.Net
im quite new to HTML, and am trying to create a proffessional looking TreeView. I can not use the in built treeview in ASP.Net as i need to point the target of the selection to another frame (I have tried, and this doesn't seem possible). My treeview is built up as follows: <li><a>Folder1</a></li> <ul> <li>ChildOne</li> <li>ChildTwo</li> <li>ChildThree</li> </ul> <li>Folder2</li> <ul> <li>ChildOne</li> <li>ChildTwo</li> <li>ChildThree</li> </ul> I have the collapsing of the folders working, but would like to know how to format this treeview so it has dotted lines down to the child nodes (as most treeviews tend to have). How would i go about this? Cheers.
html
javascript
web-developement
asp.net
null
null
open
Dynamically creating a treeview in HTML with indent lines in ASP.Net === im quite new to HTML, and am trying to create a proffessional looking TreeView. I can not use the in built treeview in ASP.Net as i need to point the target of the selection to another frame (I have tried, and this doesn't seem possible). My treeview is built up as follows: <li><a>Folder1</a></li> <ul> <li>ChildOne</li> <li>ChildTwo</li> <li>ChildThree</li> </ul> <li>Folder2</li> <ul> <li>ChildOne</li> <li>ChildTwo</li> <li>ChildThree</li> </ul> I have the collapsing of the folders working, but would like to know how to format this treeview so it has dotted lines down to the child nodes (as most treeviews tend to have). How would i go about this? Cheers.
0
1,919,183
12/17/2009 02:53:17
11,688
09/16/2008 10:13:56
154
4
How to allocate and free aligned memory in C
How do you allocate memory that's aligned to a specific boundary in C (e.g., cache line boundary)? I'm looking for malloc/free like implementation that ideally would be as portable as possible --- at least between 32 and 64 bit architectures.
c
alignment
memory-alignment
memory-mapped-files
null
null
open
How to allocate and free aligned memory in C === How do you allocate memory that's aligned to a specific boundary in C (e.g., cache line boundary)? I'm looking for malloc/free like implementation that ideally would be as portable as possible --- at least between 32 and 64 bit architectures.
0
5,259,445
03/10/2011 12:13:01
302,533
03/26/2010 13:14:24
529
13
WordPress custom SQL
I have this function which contains some custom SQL: function user_comment_count_by_meta( $user_id, $meta_key ) { global $wpdb; $count = 0; $sql = "SELECT count(*) FROM $wpdb->comments comments INNER JOIN $wpdb->commentmeta meta ON comments.comment_ID = meta.comment_id WHERE comments.user_id = %d AND meta.meta_key = %s"; $count = $wpdb->get_var( $wpdb->prepare( $sql, $user_id, $meta_key ) ); return $count; } What it should be doing is counting all the comments for a user that have a particular meta value attached to them and returning that number. So for example if a user has made 20 comments and then 11 of those have the meta value 'accepted' attached to them then the number returned would be 11. I call the function like so: `<?php $count = user_comment_count_by_meta( get_the_author_meta('id'), 'accepted' ); ?>` However it doesn't return anything. Not sure where I have gone wrong? If any SQL geniuses could help or if anyone can spot a problem it'd be much appreciated. Thanks.
php
sql
wordpress
null
null
null
open
WordPress custom SQL === I have this function which contains some custom SQL: function user_comment_count_by_meta( $user_id, $meta_key ) { global $wpdb; $count = 0; $sql = "SELECT count(*) FROM $wpdb->comments comments INNER JOIN $wpdb->commentmeta meta ON comments.comment_ID = meta.comment_id WHERE comments.user_id = %d AND meta.meta_key = %s"; $count = $wpdb->get_var( $wpdb->prepare( $sql, $user_id, $meta_key ) ); return $count; } What it should be doing is counting all the comments for a user that have a particular meta value attached to them and returning that number. So for example if a user has made 20 comments and then 11 of those have the meta value 'accepted' attached to them then the number returned would be 11. I call the function like so: `<?php $count = user_comment_count_by_meta( get_the_author_meta('id'), 'accepted' ); ?>` However it doesn't return anything. Not sure where I have gone wrong? If any SQL geniuses could help or if anyone can spot a problem it'd be much appreciated. Thanks.
0
11,458,900
07/12/2012 19:08:18
671,339
03/22/2011 14:06:29
23
3
Drupal Commons vs Wordpress+BuddyPress for a social network
I lead a team of 4 PHP developers and we have been tasked with developing a custom social network site/portal. By social I mean Facebook-like social - activity streams, comments, popularity, various kinds of content, etc. We don't have years to develop it from scratch so I'm thinking about building on top of the existing CMS - either Wordpress with BuddyPress or Drupal. The choice between the two is a tough one for me. My team is very proficient in PHP but has no significant experience with neither of the CMSes. Both platforms provide similar end-user features but I wonder how easy it is to hack BuddyPress (if we need to, which is very likely) vs something (likely Commons modules) on Drupal. The problem with Drupal is that D7 is there but Commons modules haven't been portedto it yet. Developing on D6 doesn't make a lot of sense to me as I've read it will be problematic to migrate to D7 in the future. The social network site we have to develop is not really centered around a blog. What would you recommend?
php
wordpress
drupal
buddypress
null
07/13/2012 12:12:24
not constructive
Drupal Commons vs Wordpress+BuddyPress for a social network === I lead a team of 4 PHP developers and we have been tasked with developing a custom social network site/portal. By social I mean Facebook-like social - activity streams, comments, popularity, various kinds of content, etc. We don't have years to develop it from scratch so I'm thinking about building on top of the existing CMS - either Wordpress with BuddyPress or Drupal. The choice between the two is a tough one for me. My team is very proficient in PHP but has no significant experience with neither of the CMSes. Both platforms provide similar end-user features but I wonder how easy it is to hack BuddyPress (if we need to, which is very likely) vs something (likely Commons modules) on Drupal. The problem with Drupal is that D7 is there but Commons modules haven't been portedto it yet. Developing on D6 doesn't make a lot of sense to me as I've read it will be problematic to migrate to D7 in the future. The social network site we have to develop is not really centered around a blog. What would you recommend?
4
2,973,520
06/04/2010 11:09:44
112,500
05/26/2009 10:48:24
300
12
How to set index on the column which have datatype varchar(4096) in SQL Server 2005?
This is the query for creating index create index idx_ncl_2 on BFPRODATTRASSOCIATION (value,attributeid) include (productid) Table structure of BFPRODATTRASSOCIATION ProdAttrAssociationId bigint no 8 ProductId bigint no 8 AttributeId bigint no 8 Value varchar no 4096 I am getting this error: The maximum key length is 900 bytes. The index ‘idx_ncl_2’ has maximum length of 1237 bytes. I have to create a nonclustered index on this column. Is there any way i can create index for the column which have datatype of varchar and size is greater than 900. Please suggest.
sql-server-2005
index
nonclustered
null
null
null
open
How to set index on the column which have datatype varchar(4096) in SQL Server 2005? === This is the query for creating index create index idx_ncl_2 on BFPRODATTRASSOCIATION (value,attributeid) include (productid) Table structure of BFPRODATTRASSOCIATION ProdAttrAssociationId bigint no 8 ProductId bigint no 8 AttributeId bigint no 8 Value varchar no 4096 I am getting this error: The maximum key length is 900 bytes. The index ‘idx_ncl_2’ has maximum length of 1237 bytes. I have to create a nonclustered index on this column. Is there any way i can create index for the column which have datatype of varchar and size is greater than 900. Please suggest.
0
6,993,413
08/09/2011 08:35:30
106,228
05/13/2009 11:44:58
78
11
C# \ Exchange 2010 PS1 Script
I am trying to run a PS1 script using Exchange 2010 remote powershell and c#. I can connect and run the ps1 script but there are a few places in the script that use exchange cmdlets to update necessary user information. One cmdlet the script is using is update-recipient. The script runs fine until it trys to run this cmdlet and errors saying: The term 'update-recipient' is not recognized as the name of a cmdlet, function, script file, or operable program. Does anyone know if there are any restrictions on running cmdlets inside of PS1 scripts from c#? Thanks
c#
.net
powershell-remoting
exchange2010
null
null
open
C# \ Exchange 2010 PS1 Script === I am trying to run a PS1 script using Exchange 2010 remote powershell and c#. I can connect and run the ps1 script but there are a few places in the script that use exchange cmdlets to update necessary user information. One cmdlet the script is using is update-recipient. The script runs fine until it trys to run this cmdlet and errors saying: The term 'update-recipient' is not recognized as the name of a cmdlet, function, script file, or operable program. Does anyone know if there are any restrictions on running cmdlets inside of PS1 scripts from c#? Thanks
0
10,880,002
06/04/2012 10:44:33
516,175
11/22/2010 13:55:49
37
0
WP7 SQLCE query optimization
I have a SQL CE 3.5 database with a single table, Entities, with about 146,000 records, the following columns: Id (int, primary key), Gloss (nvarchar(4000)), GlossLen (int), Meaning (nvarchar(4000), and indices on Gloss and Glosslen. This is used by a cross platform application I am developing for Windows (WPF) and WP7.5. I then run the following query against the database using LINQ to SQL: (from d in Entities where d.Gloss.StartsWith("searchstring") orderby d.GlossLen ascending select new { Id = d.Id, WrittenForms = d.Gloss, MeaningsString = d.Meaning, MatchString = d.Gloss, MatchStringLen = d.GlossLen }).Take(200) The problem is am facing is that, while the query executes at reasonable speed (2 seconds or less) in Windows, it becomes painfully slow (6+ seconds) on on an actual WP7 device (the emulator is almost as fast as WPF). As far as I can see, the generated SQL seems reasonable: below is what LINQPad returns. SELECT TOP (200) [t0].[Id], [t0].[Gloss] AS [WrittenForms], [t0].[Meaning] AS [MeaningsString], [t0].[GlossLen] AS [MatchStringLen] FROM [Entities] AS [t0] WHERE [t0].[Gloss] LIKE @p0 ORDER BY [t0].[GlossLen] The query's execution plan as reported by Visual Studio is: Index Seek->Filter->Sort->Select, so I am not doing a table scan. I have also already tried using CompiledQuery.Compile on the LINQ query, storing the generated Func for re-use, but have seen no improvement. What am I doing wrong? The only difference between the WP7 and WPF code paths is that the WP7 database is opened from the installation folder as read only.
sql
windows-phone-7
linq-to-sql
sql-server-ce
null
null
open
WP7 SQLCE query optimization === I have a SQL CE 3.5 database with a single table, Entities, with about 146,000 records, the following columns: Id (int, primary key), Gloss (nvarchar(4000)), GlossLen (int), Meaning (nvarchar(4000), and indices on Gloss and Glosslen. This is used by a cross platform application I am developing for Windows (WPF) and WP7.5. I then run the following query against the database using LINQ to SQL: (from d in Entities where d.Gloss.StartsWith("searchstring") orderby d.GlossLen ascending select new { Id = d.Id, WrittenForms = d.Gloss, MeaningsString = d.Meaning, MatchString = d.Gloss, MatchStringLen = d.GlossLen }).Take(200) The problem is am facing is that, while the query executes at reasonable speed (2 seconds or less) in Windows, it becomes painfully slow (6+ seconds) on on an actual WP7 device (the emulator is almost as fast as WPF). As far as I can see, the generated SQL seems reasonable: below is what LINQPad returns. SELECT TOP (200) [t0].[Id], [t0].[Gloss] AS [WrittenForms], [t0].[Meaning] AS [MeaningsString], [t0].[GlossLen] AS [MatchStringLen] FROM [Entities] AS [t0] WHERE [t0].[Gloss] LIKE @p0 ORDER BY [t0].[GlossLen] The query's execution plan as reported by Visual Studio is: Index Seek->Filter->Sort->Select, so I am not doing a table scan. I have also already tried using CompiledQuery.Compile on the LINQ query, storing the generated Func for re-use, but have seen no improvement. What am I doing wrong? The only difference between the WP7 and WPF code paths is that the WP7 database is opened from the installation folder as read only.
0
10,881,750
06/04/2012 12:59:15
274,392
02/16/2010 13:34:19
603
12
Zend - changing image URL path for deployment
The title might be confusing as I'm not sure myself on how to explain this. I'm sure its a pretty simple solution. I'm moving all my static images,css,js to S3 - so now they can be accessed via Egs: <pre> http://files.xyz.com/images/logo.gif http://files.xyz.com/images/submit_button.gif http://files.xyz.com/style/style.css http://files.xyz.com/js/jquery.js </pre> files.xyz.com is a CNAME pointing to files.xyz.com.s3.amazonaws.com Now in my Zend layout and views - I'm accessing these with the full URL egs <code> &lt;img src="http://files.xyz.com/images/logo.gif"/> </code> My concern is when I'm testing on localhost - I dont want the data to be fetched from S3 but from my local hard disk So I want to do something like this. In my application.ini - I should be able to specify <pre> resources.frontController.imageUrl = http://localhost </pre> And when I'm deploying - simply change that to <pre> resources.frontController.imageUrl = http://files.xyz.com </pre> <pre> And access it in the view like &lt;img src="&lt;?php echo $this->imageUrl;?>/images/logo.gif"/> </pre>
zend-framework
php5
amazon-s3
zend-config
null
null
open
Zend - changing image URL path for deployment === The title might be confusing as I'm not sure myself on how to explain this. I'm sure its a pretty simple solution. I'm moving all my static images,css,js to S3 - so now they can be accessed via Egs: <pre> http://files.xyz.com/images/logo.gif http://files.xyz.com/images/submit_button.gif http://files.xyz.com/style/style.css http://files.xyz.com/js/jquery.js </pre> files.xyz.com is a CNAME pointing to files.xyz.com.s3.amazonaws.com Now in my Zend layout and views - I'm accessing these with the full URL egs <code> &lt;img src="http://files.xyz.com/images/logo.gif"/> </code> My concern is when I'm testing on localhost - I dont want the data to be fetched from S3 but from my local hard disk So I want to do something like this. In my application.ini - I should be able to specify <pre> resources.frontController.imageUrl = http://localhost </pre> And when I'm deploying - simply change that to <pre> resources.frontController.imageUrl = http://files.xyz.com </pre> <pre> And access it in the view like &lt;img src="&lt;?php echo $this->imageUrl;?>/images/logo.gif"/> </pre>
0
9,970,707
04/02/2012 03:54:02
1,244,102
03/02/2012 01:29:48
1
0
OpenID Python direct login script
I am using Python/Django-nonrel. I wish to created a website which can verify/login a user with a pair of OpenID url/password using a script (python code), not manually login. Is this doable? Thanks.
python
django
authentication
openid
null
null
open
OpenID Python direct login script === I am using Python/Django-nonrel. I wish to created a website which can verify/login a user with a pair of OpenID url/password using a script (python code), not manually login. Is this doable? Thanks.
0
8,196,842
11/19/2011 19:55:48
1,055,125
11/19/2011 09:15:48
1
0
Installed Wordpress on VPS. Did I compromise security doing it like this?
I've been trying to install wordpress on my VPS and have been running into weird permission and permalink issues. I have everything working now, but **did I compromise anything by using this process?** 1. Did a basic LAMP install (running Debian x86). 2. Set IP-based virtual host for multiple sites in "etc/apache2/sites-available/default/" 3. Installed wordpress in DocumentRoot and added .htaccess in there as well. 4. "chown -R www-data:www-data /var/www/wordpress_site/" 5. created rewrite.load in "/etc/apache2/mods-enabled/" and added the line "LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so" I have limited resources on the server, so **would there be a difference in the following?** I have done the latter at the moment and am concerned if anything is a security risk as I've messed with permissions and put my install in the DocumentRoot. A: Single wordpress install in "/usr/share/wordpress/" and creating a symlink to the DocumentRoot of all the sites I would want wordpress on. B. Putting the contents of the wordpress install in each DocumentRoot of the sites I want wordpress on. Here's a link to my virtual host file: http://www.heypasteit.com/clip/03C1
security
wordpress
debian
symlink
vps
11/19/2011 22:40:05
off topic
Installed Wordpress on VPS. Did I compromise security doing it like this? === I've been trying to install wordpress on my VPS and have been running into weird permission and permalink issues. I have everything working now, but **did I compromise anything by using this process?** 1. Did a basic LAMP install (running Debian x86). 2. Set IP-based virtual host for multiple sites in "etc/apache2/sites-available/default/" 3. Installed wordpress in DocumentRoot and added .htaccess in there as well. 4. "chown -R www-data:www-data /var/www/wordpress_site/" 5. created rewrite.load in "/etc/apache2/mods-enabled/" and added the line "LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so" I have limited resources on the server, so **would there be a difference in the following?** I have done the latter at the moment and am concerned if anything is a security risk as I've messed with permissions and put my install in the DocumentRoot. A: Single wordpress install in "/usr/share/wordpress/" and creating a symlink to the DocumentRoot of all the sites I would want wordpress on. B. Putting the contents of the wordpress install in each DocumentRoot of the sites I want wordpress on. Here's a link to my virtual host file: http://www.heypasteit.com/clip/03C1
2
6,265,533
06/07/2011 12:59:54
320,009
04/19/2010 04:59:58
305
24
Date validation in javascript
How to validate ddmmmyyyy and dd-mmm-yyyy date formats using single regex. Please provide solution if anyone have idea
javascript
null
null
null
null
06/09/2011 03:22:50
not a real question
Date validation in javascript === How to validate ddmmmyyyy and dd-mmm-yyyy date formats using single regex. Please provide solution if anyone have idea
1
9,145,066
02/04/2012 22:14:14
901,812
08/19/2011 05:01:09
77
1
C threads worth reusing?
Is it worth taking the time to write the code to reuse threads in C, or are they cheap to create and destroy? I'm rendering some CPU only 3D graphics and it was going pretty slow (looked like about 5 fps). I tried using threads to solve this. Using 4 threads, each rendering a strip of the screen, seemed to boost my frame rate to something very reasonable and smooth. I'm still worried about what will happen when I make my graphics more complicated. Would I get any appreciable speed boost by reusing my threads instead of creating and destroying them every frame? Edit: The operating system I'm working on is Windows.
c
multithreading
reuse
recycle
null
02/04/2012 22:23:36
not constructive
C threads worth reusing? === Is it worth taking the time to write the code to reuse threads in C, or are they cheap to create and destroy? I'm rendering some CPU only 3D graphics and it was going pretty slow (looked like about 5 fps). I tried using threads to solve this. Using 4 threads, each rendering a strip of the screen, seemed to boost my frame rate to something very reasonable and smooth. I'm still worried about what will happen when I make my graphics more complicated. Would I get any appreciable speed boost by reusing my threads instead of creating and destroying them every frame? Edit: The operating system I'm working on is Windows.
4
3,669,671
09/08/2010 16:03:09
300,829
03/24/2010 13:27:39
163
1
Suggest Language for my project
I am working on a project for which we have to decide for a language to work on. Requirements are as follows: 1. Client should work both as web browser based and standalone desktop application.Both will have same feature. 2. Gui should be rich in graphics but still light weighted.It should not use much memory for rendering views. 3. Response time of an event should be less. Initial loading of application can take time. 4. Server would be on unix/linux boxes. 5. Client will run on windows machine. Please suggest. Thanks, Abhishek Jain
programming-languages
language-features
null
null
null
09/08/2010 16:28:41
not a real question
Suggest Language for my project === I am working on a project for which we have to decide for a language to work on. Requirements are as follows: 1. Client should work both as web browser based and standalone desktop application.Both will have same feature. 2. Gui should be rich in graphics but still light weighted.It should not use much memory for rendering views. 3. Response time of an event should be less. Initial loading of application can take time. 4. Server would be on unix/linux boxes. 5. Client will run on windows machine. Please suggest. Thanks, Abhishek Jain
1
9,781,957
03/20/2012 05:53:59
524,987
11/30/2010 10:13:14
352
24
CSS width hack for IE8,FF
I have to apply width to a div. The width value is need to be varied across browser. I cant apply conditional css . So can there be any hack for doing this. FF .apply{ width: 720px; } IE8 .apply{ width: 690px; } Can these be combined using some hack so that the respective properties will be applied automaticaly as per the browser.
css
internet-explorer
null
null
null
null
open
CSS width hack for IE8,FF === I have to apply width to a div. The width value is need to be varied across browser. I cant apply conditional css . So can there be any hack for doing this. FF .apply{ width: 720px; } IE8 .apply{ width: 690px; } Can these be combined using some hack so that the respective properties will be applied automaticaly as per the browser.
0
9,146,894
02/05/2012 04:23:00
1,190,151
02/05/2012 03:08:21
1
0
Suggestions Needed for Web Template with Separate Core / Presentation Servers
I have several template designs I created for a particular industry using a certain CMS and I would like to start up a hosting / template service for that industry. I need some suggestions for how to set up the architecture so that each host account (cluster) is fed these templates from a central server. For instance, the central server would serve the templates to 200 host accounts. Here are some requirements: Each customer server (cluster) would would be hosted with their own ip address and their server would host the skeleton files for displaying the presentation layer of the website. Each customer server (cluster) would would be configured to connect to a database located on the central server. The central server would host all of the templates (images, css, php) core code. This way, when the CMS platform is updated/enhanced, it affects all hosted clients at once and I don't have to update the code in each hosted account. <ol>Questions: <li>What CMS would you suggest that best supports these requirements?</li> <li>How would central server pass the dynamic content to the customer's hosted account (cluster)?</li> <li>How would the admin settings be managed by the host account?</li> </ol> <ul>Possible solutions: <li>The dynamic content would best be passed using XML?</li> <li> Each hosted account would require a separate database on the central server and connect using a unique config file?</li> <li>Use CMS Made Simple so that the "skeleton files" on the hosted account would only contain only the config file and html files using the simple tags to get the dynamic content?</li> <li>The customer would access the admin panel through the central server?</li> </ul> Let me know what you think! Any suggestions are much appreciated!
architecture
web-hosting
cluster-computing
template-engine
centralized
02/05/2012 14:29:14
not a real question
Suggestions Needed for Web Template with Separate Core / Presentation Servers === I have several template designs I created for a particular industry using a certain CMS and I would like to start up a hosting / template service for that industry. I need some suggestions for how to set up the architecture so that each host account (cluster) is fed these templates from a central server. For instance, the central server would serve the templates to 200 host accounts. Here are some requirements: Each customer server (cluster) would would be hosted with their own ip address and their server would host the skeleton files for displaying the presentation layer of the website. Each customer server (cluster) would would be configured to connect to a database located on the central server. The central server would host all of the templates (images, css, php) core code. This way, when the CMS platform is updated/enhanced, it affects all hosted clients at once and I don't have to update the code in each hosted account. <ol>Questions: <li>What CMS would you suggest that best supports these requirements?</li> <li>How would central server pass the dynamic content to the customer's hosted account (cluster)?</li> <li>How would the admin settings be managed by the host account?</li> </ol> <ul>Possible solutions: <li>The dynamic content would best be passed using XML?</li> <li> Each hosted account would require a separate database on the central server and connect using a unique config file?</li> <li>Use CMS Made Simple so that the "skeleton files" on the hosted account would only contain only the config file and html files using the simple tags to get the dynamic content?</li> <li>The customer would access the admin panel through the central server?</li> </ul> Let me know what you think! Any suggestions are much appreciated!
1
7,125,543
08/19/2011 18:00:58
875,584
08/02/2011 22:40:08
73
1
how to access checked text view in a list view?
i have a checked text view inside of a listview and whenever I click an item in the list view a random checked text view will check (not neccessarily the one I pressed) Here is my code lv2.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { final CheckedTextView checkedTextView = (CheckedTextView) findViewById(R.id.checkedTextView1); checkedTextView.toggle(); } }); Where lv2 is my list view and checkedTextView1 is my check view inside each listview item. How do I call a specific checkedTextView. Is there an array format that I can call? eg `checkedTextView[1].toggle();`?
android
listview
checkedtextview
null
null
null
open
how to access checked text view in a list view? === i have a checked text view inside of a listview and whenever I click an item in the list view a random checked text view will check (not neccessarily the one I pressed) Here is my code lv2.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { final CheckedTextView checkedTextView = (CheckedTextView) findViewById(R.id.checkedTextView1); checkedTextView.toggle(); } }); Where lv2 is my list view and checkedTextView1 is my check view inside each listview item. How do I call a specific checkedTextView. Is there an array format that I can call? eg `checkedTextView[1].toggle();`?
0
6,124,905
05/25/2011 13:04:19
769,618
05/25/2011 13:04:19
1
0
time reduced by 1in .NET when retrieved from C++ class
When trying to retieve an input datetime from C++ structure and use it in C# code, I noticed the hours are reduced by 1 and then converted to GMT+2 time zone in .NET there are the modules I use to read time from C++: time.inl and wchar.h
c#
c++
time
null
null
05/27/2011 14:08:24
not a real question
time reduced by 1in .NET when retrieved from C++ class === When trying to retieve an input datetime from C++ structure and use it in C# code, I noticed the hours are reduced by 1 and then converted to GMT+2 time zone in .NET there are the modules I use to read time from C++: time.inl and wchar.h
1
11,379,027
07/07/2012 22:08:53
55,841
01/16/2009 13:57:37
296
12
Looking out for Php mvc framework with specific features
I am sure this question has been asked before, but it's not your general "what framework is best" kind of question. I have some specific things I would like this framework to have: - Use a db abstraction layer allowing me to change db abstraction library if needed(e.g. move from PDO to PHPAdoDB). - Have a way to change the javascript library if required(I like JQuery a lot) - Have roles management and some kind of abstracted(but usable) login system. - Use smarty. The latter is really one of the main requirements because it allows for real MVC even in the views, lets you define headers/footers externally, does straight HTML with ability to mingle where necessary, etc. True raw power for the taking. Suggestions please?
php
mvc
frameworks
smarty
null
07/08/2012 10:11:12
not constructive
Looking out for Php mvc framework with specific features === I am sure this question has been asked before, but it's not your general "what framework is best" kind of question. I have some specific things I would like this framework to have: - Use a db abstraction layer allowing me to change db abstraction library if needed(e.g. move from PDO to PHPAdoDB). - Have a way to change the javascript library if required(I like JQuery a lot) - Have roles management and some kind of abstracted(but usable) login system. - Use smarty. The latter is really one of the main requirements because it allows for real MVC even in the views, lets you define headers/footers externally, does straight HTML with ability to mingle where necessary, etc. True raw power for the taking. Suggestions please?
4
6,732,520
07/18/2011 11:55:53
335,105
05/07/2010 05:26:44
63
1
Problem reading cookie in Firefox
In my application im trying to read the cookie value but in firefox4 its reading it like PHPSESSID=6obpuf73q9l7oelqjp49vi4f57; __utmc=111872281; __utma=111872281.346828356.1310972579.1310977402.1310984221.3; __utmz=111872281.1310972579.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); plugins_pn=0; __utmb=111872281.100.10.1310984221; pages_pn=0; selection=contract-hire and in chrome its reading it like PHPSESSID=6obpuf73q9l7oelqjp49vi4f57; selection=contract-hire some times in FF4 it works fine but 99% of the time it fails, can somebody tell me how can i solve this problem Thanks.
php
jquery
cookies
null
null
null
open
Problem reading cookie in Firefox === In my application im trying to read the cookie value but in firefox4 its reading it like PHPSESSID=6obpuf73q9l7oelqjp49vi4f57; __utmc=111872281; __utma=111872281.346828356.1310972579.1310977402.1310984221.3; __utmz=111872281.1310972579.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); plugins_pn=0; __utmb=111872281.100.10.1310984221; pages_pn=0; selection=contract-hire and in chrome its reading it like PHPSESSID=6obpuf73q9l7oelqjp49vi4f57; selection=contract-hire some times in FF4 it works fine but 99% of the time it fails, can somebody tell me how can i solve this problem Thanks.
0
10,121,765
04/12/2012 10:26:23
1,194,750
02/07/2012 13:32:04
21
0
NullException error WP7
![NullException][1] [1]: http://i.stack.imgur.com/SrFrB.png I get this error in App.cs, any help, I try to clean and build again but nothing.
windows-phone-7
xaml
null
null
null
04/12/2012 16:43:33
not a real question
NullException error WP7 === ![NullException][1] [1]: http://i.stack.imgur.com/SrFrB.png I get this error in App.cs, any help, I try to clean and build again but nothing.
1
11,571,111
07/20/2012 00:09:57
1,534,942
07/18/2012 13:33:41
1
0
My profile image does not show in chat
I have set up a profile image for gmail chat and still my contacts can't see it in chat. What is going on? Thanks
gmail
null
null
null
null
07/21/2012 16:14:10
off topic
My profile image does not show in chat === I have set up a profile image for gmail chat and still my contacts can't see it in chat. What is going on? Thanks
2
6,674,035
07/13/2011 04:17:42
391,104
07/14/2010 01:45:37
2,561
1
Good books or resources for understanding OS, kernel and CPU architectures
I need to learn the basic knowledge of OS, kernel and CPU architectures since some jobs do require those background. Is there a good book or online resource that I can refer to.
operating-system
kernel
cpu-architecture
null
null
07/13/2011 05:31:06
off topic
Good books or resources for understanding OS, kernel and CPU architectures === I need to learn the basic knowledge of OS, kernel and CPU architectures since some jobs do require those background. Is there a good book or online resource that I can refer to.
2
4,704,670
01/16/2011 09:38:49
577,393
01/16/2011 09:38:49
1
0
UITableView only pushes to one controller
So I have my UITableView, with 2 sections and 1 cell in each, and if I click the first one, it works, then the second one, it goes to the first controller. RootViewController is a navigationController, trying to push to ViewControllers. Here's the code for the tableView: // Customize the number of sections in the table view. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 2; } // Customize the number of rows in the table view. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { if(section == 0) return 1; else return 1; } - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{ if(section == 0){ return @"Terminal/SSH Guides"; }else{ return @"Cydia Tutorials"; } } // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease]; } // Set up the cell... if(indexPath.section == 0){ cell.text = @"Changing Password for root"; } else { cell.text = @"Hiding Sections"; } return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { id newController; switch (indexPath.row) { case 0: newController = [[rootpassword alloc] initWithNibName:@"rootpassword" bundle:nil]; break; case 1: newController = [[hidingsections alloc] initWithNibName:@"hidingsections" bundle:nil]; break; default: break; } [self.navigationController pushViewController:newController animated:TRUE]; [tableView deselectRowAtIndexPath:indexPath animated:TRUE]; } I'm also having trouble adding more sections and rows/cells to sections. Thanks.
iphone
objective-c
uitableview
navigationcontroller
null
null
open
UITableView only pushes to one controller === So I have my UITableView, with 2 sections and 1 cell in each, and if I click the first one, it works, then the second one, it goes to the first controller. RootViewController is a navigationController, trying to push to ViewControllers. Here's the code for the tableView: // Customize the number of sections in the table view. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 2; } // Customize the number of rows in the table view. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { if(section == 0) return 1; else return 1; } - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{ if(section == 0){ return @"Terminal/SSH Guides"; }else{ return @"Cydia Tutorials"; } } // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease]; } // Set up the cell... if(indexPath.section == 0){ cell.text = @"Changing Password for root"; } else { cell.text = @"Hiding Sections"; } return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { id newController; switch (indexPath.row) { case 0: newController = [[rootpassword alloc] initWithNibName:@"rootpassword" bundle:nil]; break; case 1: newController = [[hidingsections alloc] initWithNibName:@"hidingsections" bundle:nil]; break; default: break; } [self.navigationController pushViewController:newController animated:TRUE]; [tableView deselectRowAtIndexPath:indexPath animated:TRUE]; } I'm also having trouble adding more sections and rows/cells to sections. Thanks.
0
9,155,980
02/06/2012 05:37:54
617,712
02/15/2011 12:03:15
1
0
confused on which flavor of linux to be installed
Am doing a project in image processing and I am using **OCTAVE**. Am using a software developed by http://www.robots.ox.ac.uk/~vgg/research/affine. So i need to install Linux platform with **kernel version 2.2.0**. How should i proceed with it.
linux
kernel
null
null
null
02/06/2012 15:37:28
off topic
confused on which flavor of linux to be installed === Am doing a project in image processing and I am using **OCTAVE**. Am using a software developed by http://www.robots.ox.ac.uk/~vgg/research/affine. So i need to install Linux platform with **kernel version 2.2.0**. How should i proceed with it.
2
5,377,273
03/21/2011 11:57:58
637,493
02/24/2011 19:45:02
37
6
text formating in ReportParameter
i have VS2008 and windows reports. I want to pass to my text field parameter that will be automatically formated as follows: hello <strong>you</strong> with something like ReportParameter ourRef = new ReportParameter("Message", "hello <strong>Mickey Mouse</strong>"); i know i can set data into pareameter, but how do i customise the display? pavel
c#
reporting-services
report
null
null
null
open
text formating in ReportParameter === i have VS2008 and windows reports. I want to pass to my text field parameter that will be automatically formated as follows: hello <strong>you</strong> with something like ReportParameter ourRef = new ReportParameter("Message", "hello <strong>Mickey Mouse</strong>"); i know i can set data into pareameter, but how do i customise the display? pavel
0
7,097,809
08/17/2011 18:44:05
552,659
12/23/2010 17:40:28
8
2
Print from batch with Microsoft Excel Viewer (XLVIEW.EXE)
Does anyone know how<br> can i print document with batch file with<br> Microsoft Excel Viewer (XLVIEW.EXE) ?
excel
printing
microsoft
viewer
null
08/17/2011 20:05:53
off topic
Print from batch with Microsoft Excel Viewer (XLVIEW.EXE) === Does anyone know how<br> can i print document with batch file with<br> Microsoft Excel Viewer (XLVIEW.EXE) ?
2
10,193,805
04/17/2012 15:04:59
614,249
01/12/2011 10:53:24
479
22
facebook messgaes getting sender name
i am using facebook fql to get users mailboxes. following query returns all the values. SELECT message_id, thread_id, author_id, body, created_time, attachment, viewer_id FROM message WHERE thread_id = <thread_id> I want to get the auther_name and viewer_name. right now i am using this trick to get names from ID's but its very slow, because first i have to get the messages and then parse the response to get the names. function getName($id) { $facebookUrl = "https://graph.facebook.com/".$id; $str = file_get_contents($facebookUrl); $result = json_decode($str); return $result->name; } Please help me how can i get the name when getting messages using FQL.
php5
facebook-graph-api
facebook-fql
null
null
null
open
facebook messgaes getting sender name === i am using facebook fql to get users mailboxes. following query returns all the values. SELECT message_id, thread_id, author_id, body, created_time, attachment, viewer_id FROM message WHERE thread_id = <thread_id> I want to get the auther_name and viewer_name. right now i am using this trick to get names from ID's but its very slow, because first i have to get the messages and then parse the response to get the names. function getName($id) { $facebookUrl = "https://graph.facebook.com/".$id; $str = file_get_contents($facebookUrl); $result = json_decode($str); return $result->name; } Please help me how can i get the name when getting messages using FQL.
0
7,654,275
10/04/2011 21:29:52
966,197
09/27/2011 03:21:09
23
1
How to build a User Account System
How do I build a user account system, like a sign in, sign out, profile, account information page? PHP isn't my cup of tea, but I need this for a project.
php
null
null
null
null
10/04/2011 21:36:09
not a real question
How to build a User Account System === How do I build a user account system, like a sign in, sign out, profile, account information page? PHP isn't my cup of tea, but I need this for a project.
1
8,051,891
11/08/2011 14:26:02
697,510
04/07/2011 20:01:03
1
0
architecture for a dictionary site
What's the best architecture for a "user-submitted definitions" dictionary (something like urbandictionary.com) if fast access is a priority? Would javascript, php, and MySql be all the technologies required to build a site that lets users update the dictionary/receive definitions quickly?
javascript
architecture
dictionary
website
null
11/08/2011 14:31:23
not constructive
architecture for a dictionary site === What's the best architecture for a "user-submitted definitions" dictionary (something like urbandictionary.com) if fast access is a priority? Would javascript, php, and MySql be all the technologies required to build a site that lets users update the dictionary/receive definitions quickly?
4
8,381,776
12/05/2011 06:35:24
849,840
07/18/2011 10:33:07
19
0
Dynamic Spring Security using SQL Query
Hello I want to make an intercept url pattern and access dynamically by using sql query in spring security. Generally we use this type of notation in XML and I want to take these values (/add-role and ROLE_ADMIN) from database. <intercept-url pattern="/add-role*" access="ROLE_ADMIN" /> Is it possible to do this dynamically?
spring
spring-mvc
spring-security
null
null
null
open
Dynamic Spring Security using SQL Query === Hello I want to make an intercept url pattern and access dynamically by using sql query in spring security. Generally we use this type of notation in XML and I want to take these values (/add-role and ROLE_ADMIN) from database. <intercept-url pattern="/add-role*" access="ROLE_ADMIN" /> Is it possible to do this dynamically?
0
324,334
11/27/2008 17:41:33
24,126
10/01/2008 13:10:17
717
54
Best asp.net calendar/schedule component?
I'm looking for the BEST asp.net calendar/schedule component that it out there. I like the look of google calendar, and it absolutely needs to be a native .net component, which can be customized. I don't mind if it is part of a bigger framework (like telerik, for example). Links to samples would be great.
asp.net
calendar
components
component
null
02/07/2012 15:00:50
not constructive
Best asp.net calendar/schedule component? === I'm looking for the BEST asp.net calendar/schedule component that it out there. I like the look of google calendar, and it absolutely needs to be a native .net component, which can be customized. I don't mind if it is part of a bigger framework (like telerik, for example). Links to samples would be great.
4
5,546,234
04/05/2011 01:36:50
217,345
11/23/2009 21:01:35
31
1
Rails 2.3.11 DateTime BigDecimal Precision
I currently have a project in Ruby on Rails running Ruby 1.8.7 and Rails 2.3.2 I have some unit tests that read data from a database, specifically a date time column for two consecutive items which are supposed to be 24 hours apart. In one test I am setting the datetime for item 2 equal to that of item 1. When I do an assert to make sure the two values are equal, the test works fine under rails 2.3.2. When I upgrade to rails 2.3.5, the tests fails showing that the difference between the two times to be off with the following error: <Thu, 01 Jan 2009 06:00:00 CST -06:00> expected but was <Thu, 01 Jan 2009 05:59:59 CST -06:00>. There seems to be an issue with floating point conversions in the two version of rails. How can I account for the floating point issue?
ruby-on-rails
ruby
null
null
null
null
open
Rails 2.3.11 DateTime BigDecimal Precision === I currently have a project in Ruby on Rails running Ruby 1.8.7 and Rails 2.3.2 I have some unit tests that read data from a database, specifically a date time column for two consecutive items which are supposed to be 24 hours apart. In one test I am setting the datetime for item 2 equal to that of item 1. When I do an assert to make sure the two values are equal, the test works fine under rails 2.3.2. When I upgrade to rails 2.3.5, the tests fails showing that the difference between the two times to be off with the following error: <Thu, 01 Jan 2009 06:00:00 CST -06:00> expected but was <Thu, 01 Jan 2009 05:59:59 CST -06:00>. There seems to be an issue with floating point conversions in the two version of rails. How can I account for the floating point issue?
0
2,594,359
04/07/2010 16:55:13
80,274
03/20/2009 00:41:25
371
22
Concatenating a string and byte array in to unmanaged memory.
This is a followup to my [last question][1]. I now have a `byte[]` of values for my bitmap image. Eventually I will be passing a string to the print spooler of the format `String.Format("GW{0},{1},{2},{3},", X, Y, stride, _Bitmap.Height) + my binary data;` I am using the `SendBytesToPrinter` command from [here][2]. Here is my code so far to send it to the printer public static bool SendStringPlusByteBlockToPrinter(string szPrinterName, string szString, byte[] bytes) { IntPtr pBytes; Int32 dwCount; // How many characters are in the string? dwCount = szString.Length; // Assume that the printer is expecting ANSI text, and then convert // the string to ANSI text. pBytes = Marshal.StringToCoTaskMemAnsi(szString); pBytes = Marshal.ReAllocCoTaskMem(pBytes, szString.Length + bytes.Length); Marshal.Copy(bytes,0, SOMTHING GOES HERE,bytes.Length); // this is the problem line // Send the converted ANSI string + the concatenated bytes to the printer. SendBytesToPrinter(szPrinterName, pBytes, dwCount); Marshal.FreeCoTaskMem(pBytes); return true; } My issue is I do not know how to make my data appended on to the end of the string. Any help would be greatly appreciated, and if I am doing this totally wrong I am fine in going a entirely different way (for example somehow getting the binary data concatenated on to the string before the move to unmanaged space. P.S. As a second question, will ReAllocCoTaskMem move the data that is sitting in it before the call to the new location? [1]: http://stackoverflow.com/questions/2593768/ [2]: http://support.microsoft.com/kb/322091
c#
unmanaged
memory
concatenation
null
null
open
Concatenating a string and byte array in to unmanaged memory. === This is a followup to my [last question][1]. I now have a `byte[]` of values for my bitmap image. Eventually I will be passing a string to the print spooler of the format `String.Format("GW{0},{1},{2},{3},", X, Y, stride, _Bitmap.Height) + my binary data;` I am using the `SendBytesToPrinter` command from [here][2]. Here is my code so far to send it to the printer public static bool SendStringPlusByteBlockToPrinter(string szPrinterName, string szString, byte[] bytes) { IntPtr pBytes; Int32 dwCount; // How many characters are in the string? dwCount = szString.Length; // Assume that the printer is expecting ANSI text, and then convert // the string to ANSI text. pBytes = Marshal.StringToCoTaskMemAnsi(szString); pBytes = Marshal.ReAllocCoTaskMem(pBytes, szString.Length + bytes.Length); Marshal.Copy(bytes,0, SOMTHING GOES HERE,bytes.Length); // this is the problem line // Send the converted ANSI string + the concatenated bytes to the printer. SendBytesToPrinter(szPrinterName, pBytes, dwCount); Marshal.FreeCoTaskMem(pBytes); return true; } My issue is I do not know how to make my data appended on to the end of the string. Any help would be greatly appreciated, and if I am doing this totally wrong I am fine in going a entirely different way (for example somehow getting the binary data concatenated on to the string before the move to unmanaged space. P.S. As a second question, will ReAllocCoTaskMem move the data that is sitting in it before the call to the new location? [1]: http://stackoverflow.com/questions/2593768/ [2]: http://support.microsoft.com/kb/322091
0
9,074,604
01/31/2012 04:55:41
969,074
09/28/2011 12:38:08
13
0
Interesting framerate issue
I have already figured out why my computer does this but I not figured out why it happens. Whenever my laptop dies from battery and I turn it back on and click on system resume it brings back all of the things that i was working on before the laptop died. Now If i do this and then play a game then my frame rate is terrible. If I do a normal bootup and do not do the system resume the my frame rate is as good as usual. I think this has something to do with all my data being dumped from hard disk to RAM once I system resume, but I am not sure. Does anyone know a concrete reason why this would be? Cheers
windows
hardware
ram
null
null
02/02/2012 03:34:58
off topic
Interesting framerate issue === I have already figured out why my computer does this but I not figured out why it happens. Whenever my laptop dies from battery and I turn it back on and click on system resume it brings back all of the things that i was working on before the laptop died. Now If i do this and then play a game then my frame rate is terrible. If I do a normal bootup and do not do the system resume the my frame rate is as good as usual. I think this has something to do with all my data being dumped from hard disk to RAM once I system resume, but I am not sure. Does anyone know a concrete reason why this would be? Cheers
2
8,088,626
11/11/2011 01:26:26
945,170
09/14/2011 17:15:49
134
0
Depth First and Adj Matrix
I'm trying to do a depth first search. I have no idea if I'm even close. Right now it's printing 1 3 4 5. It should be printing 1 2 4 7 5 6 3. Any help or advice is appreciated. Thanks. :) ![enter image description here][1] [1]: http://i.stack.imgur.com/ABq58.png Class: public class myGraphs { Stack<Integer> st; int vFirst; int[][] adjMatrix; int[] isVisited = new int[7]; public myGraphs(int[][] Matrix) { this.adjMatrix = Matrix; st = new Stack<Integer>(); int i; int[] node = {1, 2, 3, 4, 5, 6, 7}; int firstNode = node[0]; for (i = 1; i < node.length-1; i++){ depthFirst(firstNode, node[i]); } } public void depthFirst(int vFirst,int n) { int v,i; st.push(vFirst); while(!st.isEmpty()) { v = st.pop(); if(isVisited[v]==0) { System.out.print("\n"+v); isVisited[v]=1; } for ( i=1;i<=n;i++) { if((adjMatrix[v][i] == 1) && (isVisited[i] == 0)) { st.push(v); isVisited[i]=1; System.out.print(" " + i); v = i; } } } } // public static void main(String[] args) { // 1 2 3 4 5 6 7 int[][] adjMatrix = { {0, 1, 1, 0, 0, 0, 0}, {1, 0, 0, 1, 1, 1, 0}, {1, 0, 0, 0, 0, 0, 1}, {0, 1, 0, 0, 0, 0, 1}, {0, 1, 0, 0, 0, 0, 1}, {0, 1, 0, 0, 0, 0 ,0}, {0, 0, 1, 1, 1, 0, 0} }; new myGraphs(adjMatrix); } }
java
homework
depth-first-search
null
null
null
open
Depth First and Adj Matrix === I'm trying to do a depth first search. I have no idea if I'm even close. Right now it's printing 1 3 4 5. It should be printing 1 2 4 7 5 6 3. Any help or advice is appreciated. Thanks. :) ![enter image description here][1] [1]: http://i.stack.imgur.com/ABq58.png Class: public class myGraphs { Stack<Integer> st; int vFirst; int[][] adjMatrix; int[] isVisited = new int[7]; public myGraphs(int[][] Matrix) { this.adjMatrix = Matrix; st = new Stack<Integer>(); int i; int[] node = {1, 2, 3, 4, 5, 6, 7}; int firstNode = node[0]; for (i = 1; i < node.length-1; i++){ depthFirst(firstNode, node[i]); } } public void depthFirst(int vFirst,int n) { int v,i; st.push(vFirst); while(!st.isEmpty()) { v = st.pop(); if(isVisited[v]==0) { System.out.print("\n"+v); isVisited[v]=1; } for ( i=1;i<=n;i++) { if((adjMatrix[v][i] == 1) && (isVisited[i] == 0)) { st.push(v); isVisited[i]=1; System.out.print(" " + i); v = i; } } } } // public static void main(String[] args) { // 1 2 3 4 5 6 7 int[][] adjMatrix = { {0, 1, 1, 0, 0, 0, 0}, {1, 0, 0, 1, 1, 1, 0}, {1, 0, 0, 0, 0, 0, 1}, {0, 1, 0, 0, 0, 0, 1}, {0, 1, 0, 0, 0, 0, 1}, {0, 1, 0, 0, 0, 0 ,0}, {0, 0, 1, 1, 1, 0, 0} }; new myGraphs(adjMatrix); } }
0
5,575,012
04/07/2011 01:45:28
420,840
01/24/2010 02:48:27
959
11
what tools should i use to edit the linux kernel .
i want to be a linuxer , and want to learn and edit the linux kernel , but i dont know what tools are people use to edit it , how to Built environment about it , thanks
linux
kernel
null
null
null
04/07/2011 11:44:47
not a real question
what tools should i use to edit the linux kernel . === i want to be a linuxer , and want to learn and edit the linux kernel , but i dont know what tools are people use to edit it , how to Built environment about it , thanks
1
10,540,997
05/10/2012 19:37:08
1,387,986
05/10/2012 19:33:01
1
0
Tying to GUI Programs together
I would like to combine to GUI Programs together so that one runs off another asking you a yes or no question based off of 2 buttons that of course say yes or no. But i have no clue how to tie them together. I need the GUI window to pop up after a username and password is entered and is correct, and after they choose a choice that the 2nd GUI terminates and writes a line saying something. Any suggestions?
java
swingx
null
null
null
05/11/2012 01:51:32
not a real question
Tying to GUI Programs together === I would like to combine to GUI Programs together so that one runs off another asking you a yes or no question based off of 2 buttons that of course say yes or no. But i have no clue how to tie them together. I need the GUI window to pop up after a username and password is entered and is correct, and after they choose a choice that the 2nd GUI terminates and writes a line saying something. Any suggestions?
1
11,247,262
06/28/2012 14:49:48
1,363,730
04/29/2012 03:59:57
197
0
can this old Mac book be upgraded?
I`ve just got a really old Mac book and I want to upgrade it to the latest OS version. I do not know if it support to be upgraded, the config of this Mac book is as below: Model Name: MacBook Model Identifier: MacBook1, 1 Processor Name: Intel Core Duo Processor speed: 1.83 GHz The number of processors: 1 Total Number Of Cores: 2 L2 cache: 2 MB Memory: 1 GB Bus speed: 667 MHz Boot ROM Version: MB11.006 If I increase the memory, is it able to be upgraded? thanks!
ios
osx
null
null
null
06/28/2012 14:51:26
off topic
can this old Mac book be upgraded? === I`ve just got a really old Mac book and I want to upgrade it to the latest OS version. I do not know if it support to be upgraded, the config of this Mac book is as below: Model Name: MacBook Model Identifier: MacBook1, 1 Processor Name: Intel Core Duo Processor speed: 1.83 GHz The number of processors: 1 Total Number Of Cores: 2 L2 cache: 2 MB Memory: 1 GB Bus speed: 667 MHz Boot ROM Version: MB11.006 If I increase the memory, is it able to be upgraded? thanks!
2
2,065,197
01/14/2010 15:29:15
58,309
01/23/2009 14:55:33
355
7
When your web page can go to sleep
I have a web page, using jQuery and javaScript, and I would like to find out if and when to put the page to sleep. As a number of the tasks are background processes I need to put them to sleep if nothing is happening on the page. i.e. the user is working on another screen or not on his PC full stop
jquery
javascript
sleep
null
null
null
open
When your web page can go to sleep === I have a web page, using jQuery and javaScript, and I would like to find out if and when to put the page to sleep. As a number of the tasks are background processes I need to put them to sleep if nothing is happening on the page. i.e. the user is working on another screen or not on his PC full stop
0
3,660,503
09/07/2010 16:17:26
39,677
11/03/2008 21:48:03
6,201
4
Top 3 questions to test someones Python level, what would they be?
If you had to **judge someones level of Python understand in just 3 questions**, what would you ask?
python
null
null
null
null
09/07/2010 16:52:37
not constructive
Top 3 questions to test someones Python level, what would they be? === If you had to **judge someones level of Python understand in just 3 questions**, what would you ask?
4
10,373,453
04/29/2012 15:41:19
536,768
12/09/2010 17:06:03
1,582
88
how to reference database variables inside a Coldfusion8 cffunction tag?
I'm doing my first steps in Coldfusion8. I managed to setup a component/service with a cffunction I'm calling. Inside the function I need to contruct a 2x2 table with errors and corresponding error messages. Error messages are multi-language and stored in a MySQL table. **Problem:** I can't find a way to reference my variables from inside a *CFFunction* tag. This does not work: // select from database <cfparam name="Session.Sprache" default="DE"> <cfquery datasource="iln" name="texte"> SELECT * FROM languages WHERE sprache = "#Session.lang#" </cfquery> <cffunction name="createErrMsgsLog" returntype="object"> // create and populate <cfset allErrMsgs=ArrayNew(2)> <cfset allErrMsgs[1][1]="firma"> // not defined <cfset allErrMsgs[1][2]="#tx_validate_firma#"> .... </cffunction> **Question:** How can I reference my variables aka #tx_validate_firma# correctly inside *CFfunction*. They are always undefined.
mysql
variables
coldfusion
cffunction
null
null
open
how to reference database variables inside a Coldfusion8 cffunction tag? === I'm doing my first steps in Coldfusion8. I managed to setup a component/service with a cffunction I'm calling. Inside the function I need to contruct a 2x2 table with errors and corresponding error messages. Error messages are multi-language and stored in a MySQL table. **Problem:** I can't find a way to reference my variables from inside a *CFFunction* tag. This does not work: // select from database <cfparam name="Session.Sprache" default="DE"> <cfquery datasource="iln" name="texte"> SELECT * FROM languages WHERE sprache = "#Session.lang#" </cfquery> <cffunction name="createErrMsgsLog" returntype="object"> // create and populate <cfset allErrMsgs=ArrayNew(2)> <cfset allErrMsgs[1][1]="firma"> // not defined <cfset allErrMsgs[1][2]="#tx_validate_firma#"> .... </cffunction> **Question:** How can I reference my variables aka #tx_validate_firma# correctly inside *CFfunction*. They are always undefined.
0
1,227,484
08/04/2009 13:15:55
93,468
02/03/2009 22:24:01
456
23
Register User Control Issue
I have a user control registered at the top of my page: <%@ Register Src="/Controls/User/Navbar.ascx" TagName="Navbar" TagPrefix="pmc" %> and I reference it in my page like this: <pmc:Navbar runat="server" id="navbar"></pmc:Navbar> but it does not know what <pmc:Navbar is. I cannot figure out why. I'm using VS 2008, in a Web Application Project.
asp.net
null
null
null
null
null
open
Register User Control Issue === I have a user control registered at the top of my page: <%@ Register Src="/Controls/User/Navbar.ascx" TagName="Navbar" TagPrefix="pmc" %> and I reference it in my page like this: <pmc:Navbar runat="server" id="navbar"></pmc:Navbar> but it does not know what <pmc:Navbar is. I cannot figure out why. I'm using VS 2008, in a Web Application Project.
0
10,548,924
05/11/2012 09:37:14
907,810
08/23/2011 13:38:35
11
0
starting with GTK+ on Ubuntu
I am just beginning with GTK+. I have an Ubuntu 11.04. How should I install the GTK and which stable version? The GTK website offers packages for download. However there are 4 other supporting packages. I was wondering if I can us sudo apt-get or synaptic to download them. When I typed GTK on Synaptic there is a long list though. Please suggest a stable GTK version available for download using sudo apt-get. Also, what IDE should I use for development and simulation? I have been programming with Qt till now which had the QtCreator, QtDesigner for this purpose. My Application has to now be ported on GTK. I googled to find out no translator engine for Qt to GTK. Did any of you have this experience? Thanks
qt
ubuntu
gtk
apt-get
null
05/14/2012 18:00:44
not constructive
starting with GTK+ on Ubuntu === I am just beginning with GTK+. I have an Ubuntu 11.04. How should I install the GTK and which stable version? The GTK website offers packages for download. However there are 4 other supporting packages. I was wondering if I can us sudo apt-get or synaptic to download them. When I typed GTK on Synaptic there is a long list though. Please suggest a stable GTK version available for download using sudo apt-get. Also, what IDE should I use for development and simulation? I have been programming with Qt till now which had the QtCreator, QtDesigner for this purpose. My Application has to now be ported on GTK. I googled to find out no translator engine for Qt to GTK. Did any of you have this experience? Thanks
4
6,288,766
06/09/2011 06:13:58
790,260
06/09/2011 04:35:59
6
0
Which falsh player can replace Adobe flash player on android system?
My android mobile phone doesn't support adobe flash player, which makes flash games, especially web falsh games, not being able to be played. I am seeking a flash player to support swf animations, of course on Android system. It is better to be free. Tks.
android
flash
swf
null
null
06/10/2011 21:48:00
off topic
Which falsh player can replace Adobe flash player on android system? === My android mobile phone doesn't support adobe flash player, which makes flash games, especially web falsh games, not being able to be played. I am seeking a flash player to support swf animations, of course on Android system. It is better to be free. Tks.
2
4,217,812
11/18/2010 17:36:58
512,357
11/18/2010 15:58:37
1
0
Haskell function which takes a list and return tuples
I have ordederd to make a function, which takes a list ex [3,4,6,1,29] and returns a list of tuples [(3,4),(4,6),(6,1),(1,29)]
list
haskell
tuples
null
null
11/18/2010 17:53:55
not a real question
Haskell function which takes a list and return tuples === I have ordederd to make a function, which takes a list ex [3,4,6,1,29] and returns a list of tuples [(3,4),(4,6),(6,1),(1,29)]
1
9,991,645
04/03/2012 10:44:17
1,296,462
03/27/2012 19:46:06
10
0
XML Parse for android app
I downloaded an example of an app which reads XML data. it was working fine .. but then it just stopped after changing the url that points to an XML file on my server Static final String URL = "http://alinho.hostoi.com/mus.xml";
android
xml
parsing
null
null
04/04/2012 12:39:58
not a real question
XML Parse for android app === I downloaded an example of an app which reads XML data. it was working fine .. but then it just stopped after changing the url that points to an XML file on my server Static final String URL = "http://alinho.hostoi.com/mus.xml";
1
1,438,326
09/17/2009 11:39:55
74,772
03/06/2009 16:33:04
2,031
86
Is the set of SOLID principles missing an extra 'D'?
Although not a pure [OOD][1] principle - should [DRY][2] also be included when thinking about [SOLID][3] principles? If not - why not? [1]: http://en.wikipedia.org/wiki/OOD [2]: http://en.wikipedia.org/wiki/Don%27t_repeat_yourself [3]: http://en.wikipedia.org/wiki/Solid_(Object_Oriented_Design)
oop
solid
dry
null
null
null
open
Is the set of SOLID principles missing an extra 'D'? === Although not a pure [OOD][1] principle - should [DRY][2] also be included when thinking about [SOLID][3] principles? If not - why not? [1]: http://en.wikipedia.org/wiki/OOD [2]: http://en.wikipedia.org/wiki/Don%27t_repeat_yourself [3]: http://en.wikipedia.org/wiki/Solid_(Object_Oriented_Design)
0
9,698,508
03/14/2012 08:51:07
813,739
06/24/2011 08:42:26
107
4
Some website don't load properly on Mac
First of all I am new to Mac. I am using a macbook pro with OS X 10.6.8 on a 2.4 GHx Intel Core 2 Duo. But the book has already been used, so I assume some settings have been changed. Problem is that when I open a few websites, particularly facebook and google associated sites like gmail and documents, they don't load properly. With facebook it looks like if no CSS has been downloaded. Gmail dont show any icons and when I open a google doc like excel sheet and as soon as it tries to autosave, I can't make any further changes. Almost all other websites open properly. Moreover, I get a lot of security warnings by all browsers and I have to add almost all the sites to the exception list. I have tested these sites on Safari 5.1.2, Firefox 10.0 and Chrome 17.0.963.79. Images are attached, please suggest something. ![facebook][1] ![GMail][2] ![Google Docs][3] Thanks [1]: http://i.stack.imgur.com/X4XKS.jpg [2]: http://i.stack.imgur.com/EzTQ8.jpg [3]: http://i.stack.imgur.com/ryuZy.jpg
facebook
osx
firefox
safari
gmail
03/15/2012 12:53:14
off topic
Some website don't load properly on Mac === First of all I am new to Mac. I am using a macbook pro with OS X 10.6.8 on a 2.4 GHx Intel Core 2 Duo. But the book has already been used, so I assume some settings have been changed. Problem is that when I open a few websites, particularly facebook and google associated sites like gmail and documents, they don't load properly. With facebook it looks like if no CSS has been downloaded. Gmail dont show any icons and when I open a google doc like excel sheet and as soon as it tries to autosave, I can't make any further changes. Almost all other websites open properly. Moreover, I get a lot of security warnings by all browsers and I have to add almost all the sites to the exception list. I have tested these sites on Safari 5.1.2, Firefox 10.0 and Chrome 17.0.963.79. Images are attached, please suggest something. ![facebook][1] ![GMail][2] ![Google Docs][3] Thanks [1]: http://i.stack.imgur.com/X4XKS.jpg [2]: http://i.stack.imgur.com/EzTQ8.jpg [3]: http://i.stack.imgur.com/ryuZy.jpg
2
10,748,992
05/25/2012 05:36:53
164,002
08/26/2009 12:15:42
1,215
11
What is Mosaizer? can we add to my asp.net page?
Hi what is this Mosaizer, can we create using asp.net, can we add to our asp.net page. Thank you.
asp.net
null
null
null
null
05/25/2012 19:53:10
not a real question
What is Mosaizer? can we add to my asp.net page? === Hi what is this Mosaizer, can we create using asp.net, can we add to our asp.net page. Thank you.
1
6,132,214
05/25/2011 23:41:25
339,843
05/13/2010 00:27:55
732
38
How can I get status information (e.g., 7/30 uploaded) when publishing using ClickOnce?
It really irks me to sit around waiting for "Publishing files..."
c#
clickonce
null
null
null
null
open
How can I get status information (e.g., 7/30 uploaded) when publishing using ClickOnce? === It really irks me to sit around waiting for "Publishing files..."
0
10,928,006
06/07/2012 08:07:45
1,435,795
06/04/2012 18:31:44
1
0
Streaming properly to flash player using libav. Codec use H264, container flv
I am implementing an application. I have a stream continuously provide me AVPacket encoded with h264. So I use libav to write those AVPacket to buffer, and stream over http to flash player, using flv container. But, problem arise, since the flash player join in the middle of stream. It only display key-frame (I-Frame). So, the video is unplayable, about 1 fps. The size of AVPacket data as follow : 25k 4k 1k 1k 1k 4k 1k 1k 1k 3k 1k 1k 1k 30k 4k ..... Flash player only display the big one and skip all the small one. Here's my code for stream over http: pkt.stream_index = gEncVideoStream->index; if ((pkt.data[4] == 103)&&(pkt.data[5] = 100)){ pkt.flags |= AV_PKT_FLAG_KEY; fprintf(stderr,"Please, Im an I-Frame\n"); } printf("This is size:%d\n",pkt.size); bufferctx = av_malloc(200000); avio_open_dyn_buf(&gEncFormatCtx->pb); if (av_write_frame(gEncFormatCtx, &pkt) != 0) { printf("MUX: ERROR - Video frame write failed.\n"); return -1; } lenctx = avio_close_dyn_buf(gEncFormatCtx->pb, &bufferctx); http_loop(bufferctx, lenctx); So, anyone know why flashplayer only display my key-frame? I appreciate any help or hint.
flash-player
flv
h.264
libav
null
null
open
Streaming properly to flash player using libav. Codec use H264, container flv === I am implementing an application. I have a stream continuously provide me AVPacket encoded with h264. So I use libav to write those AVPacket to buffer, and stream over http to flash player, using flv container. But, problem arise, since the flash player join in the middle of stream. It only display key-frame (I-Frame). So, the video is unplayable, about 1 fps. The size of AVPacket data as follow : 25k 4k 1k 1k 1k 4k 1k 1k 1k 3k 1k 1k 1k 30k 4k ..... Flash player only display the big one and skip all the small one. Here's my code for stream over http: pkt.stream_index = gEncVideoStream->index; if ((pkt.data[4] == 103)&&(pkt.data[5] = 100)){ pkt.flags |= AV_PKT_FLAG_KEY; fprintf(stderr,"Please, Im an I-Frame\n"); } printf("This is size:%d\n",pkt.size); bufferctx = av_malloc(200000); avio_open_dyn_buf(&gEncFormatCtx->pb); if (av_write_frame(gEncFormatCtx, &pkt) != 0) { printf("MUX: ERROR - Video frame write failed.\n"); return -1; } lenctx = avio_close_dyn_buf(gEncFormatCtx->pb, &bufferctx); http_loop(bufferctx, lenctx); So, anyone know why flashplayer only display my key-frame? I appreciate any help or hint.
0
10,567,958
05/12/2012 22:46:46
1,345,415
04/20/2012 01:36:56
17
0
What Order Do Java Classes Run In?
With the following code, it has a few classes that do separate jobs. The question is, since they never call each other, which order do they run in? Do they run at the same time? import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Moving extends JPanel implements ActionListener { int x, y; Timer timer; Moving() { x = 0; y = 0; timer = new Timer(10, this); } public void actionPerformed(ActionEvent e) { x += 1; y += 1; repaint(); } public void paintComponent(Graphics g) { super.paintComponent(g); if (x > 1080 && y > 880) { x = 0; y = 0; } else { g.fillOval(x, y, 40, 40); } } public static void main(String[] args) { JFrame f = new JFrame("Moving"); f.setBackground(Color.GREEN); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Moving m = new Moving(); f.add(m); f.setSize(1100, 900); f.setVisible(true); m.timer.start(); } }
java
class
null
null
null
05/13/2012 17:04:50
not a real question
What Order Do Java Classes Run In? === With the following code, it has a few classes that do separate jobs. The question is, since they never call each other, which order do they run in? Do they run at the same time? import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Moving extends JPanel implements ActionListener { int x, y; Timer timer; Moving() { x = 0; y = 0; timer = new Timer(10, this); } public void actionPerformed(ActionEvent e) { x += 1; y += 1; repaint(); } public void paintComponent(Graphics g) { super.paintComponent(g); if (x > 1080 && y > 880) { x = 0; y = 0; } else { g.fillOval(x, y, 40, 40); } } public static void main(String[] args) { JFrame f = new JFrame("Moving"); f.setBackground(Color.GREEN); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Moving m = new Moving(); f.add(m); f.setSize(1100, 900); f.setVisible(true); m.timer.start(); } }
1
3,971,455
10/19/2010 18:29:42
361,850
06/08/2010 22:11:44
6
0
Element host first time creation performance.
We have WPF app and sometimes we display windows panel with windows controls. And one of those controls can be again a WPF control, which is hosted in element host. WPF (MainWindow) WindowsFormsHost Windows(Panel) Elementhost WPF(usercontrol) This windows Panel on an average has 2-3 wpf controls. Everytime panel is displayed the initialization of first element host is taking around 250 ms and subsequent element hosts very less around 10 ms. We are disposing panel once it is closed. Per this article if we create an empty element host and keep it alive/visible till the life of app, any subsequent creation of elementhosts takes very little time, which is true and i tested with a sample project. But when i created an empty element host and added to our Main wpf window, it does not help. Which means, when a wndow panel displayed element host inside it still takes around 250 ms. Any ideas whats going on here? Thanks Santosh
performance
element
host
null
null
null
open
Element host first time creation performance. === We have WPF app and sometimes we display windows panel with windows controls. And one of those controls can be again a WPF control, which is hosted in element host. WPF (MainWindow) WindowsFormsHost Windows(Panel) Elementhost WPF(usercontrol) This windows Panel on an average has 2-3 wpf controls. Everytime panel is displayed the initialization of first element host is taking around 250 ms and subsequent element hosts very less around 10 ms. We are disposing panel once it is closed. Per this article if we create an empty element host and keep it alive/visible till the life of app, any subsequent creation of elementhosts takes very little time, which is true and i tested with a sample project. But when i created an empty element host and added to our Main wpf window, it does not help. Which means, when a wndow panel displayed element host inside it still takes around 250 ms. Any ideas whats going on here? Thanks Santosh
0
11,202,094
06/26/2012 06:52:22
1,471,307
06/21/2012 07:13:38
3
0
Code is not Working?
When I add this code to my application for getting the **PhoneType and Email Type** it went to some errors, also Application stopped unexpectedly. **Added code** for phone type int contactPhoneType = pCur.getInt(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE)); if( contactPhoneType == ContactsContract.CommonDataKinds.Phone.TYPE_HOME){ switch(contactPhoneType){ case ContactsContract.CommonDataKinds.Phone.TYPE_HOME: Phonetype = "Home"; break; } } **On Display** contactlist.add(displayName + " , " + Phonetype + " , " + phoneNumber.get(i) + " , " + Emailtype + " , " + emailAddress.get(i) + "\n"); The same was coded for the Email. I didn't get what was wrong in this code. Any Solution ?
android
null
null
null
null
06/27/2012 11:47:34
not a real question
Code is not Working? === When I add this code to my application for getting the **PhoneType and Email Type** it went to some errors, also Application stopped unexpectedly. **Added code** for phone type int contactPhoneType = pCur.getInt(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE)); if( contactPhoneType == ContactsContract.CommonDataKinds.Phone.TYPE_HOME){ switch(contactPhoneType){ case ContactsContract.CommonDataKinds.Phone.TYPE_HOME: Phonetype = "Home"; break; } } **On Display** contactlist.add(displayName + " , " + Phonetype + " , " + phoneNumber.get(i) + " , " + Emailtype + " , " + emailAddress.get(i) + "\n"); The same was coded for the Email. I didn't get what was wrong in this code. Any Solution ?
1
10,522,760
05/09/2012 19:23:30
1,360,300
04/27/2012 05:12:30
354
2
Does C++ have an API
If Java has an api for looking up classes, does c++ have one also for looking up commands?
java
c++
api
null
null
07/19/2012 09:04:17
not a real question
Does C++ have an API === If Java has an api for looking up classes, does c++ have one also for looking up commands?
1
9,663,573
03/12/2012 08:10:39
1,192,356
02/06/2012 13:17:12
11
0
Index 4 beyond bounds for NSArray
I'm a beginner in this field and I'm facing this problem which says :[NSMutableArray objectAtIndex:]:Index 4 beyond bounds [0 .. 3]. Can't seem to find out error for this. Can any body help me in this regard? I'm attaching the code snippet for this... NSMutableArray *my_arrUserinfo = [UserresponcePerser userdesc]; NSString *encryptAlgo=@""; encryptAlgo = [encryptAlgo stringByAppendingString:[[my_arrUserinfo objectAtIndex:9]objectAtIndex:4]]; the UserresponcePerser is a perser which perses data elements from web service and stores it in the array.
objective-c
null
null
null
null
03/13/2012 12:41:28
too localized
Index 4 beyond bounds for NSArray === I'm a beginner in this field and I'm facing this problem which says :[NSMutableArray objectAtIndex:]:Index 4 beyond bounds [0 .. 3]. Can't seem to find out error for this. Can any body help me in this regard? I'm attaching the code snippet for this... NSMutableArray *my_arrUserinfo = [UserresponcePerser userdesc]; NSString *encryptAlgo=@""; encryptAlgo = [encryptAlgo stringByAppendingString:[[my_arrUserinfo objectAtIndex:9]objectAtIndex:4]]; the UserresponcePerser is a perser which perses data elements from web service and stores it in the array.
3
11,572,584
07/20/2012 03:45:16
1,412,803
05/23/2012 14:01:57
13
0
Free Windows Installer with requirements
I am looking for a free windows installer which can do: 1. Package several runtime environments installers (e.g. Crystal Report and Matlab) 2. Package 3rd party installer (e.g PDFCreator) 3. Package the program main folder 4. Lastly, add UAC to the program executable file. Any feedback is welcome. Thank you.
windows-installer
uac
null
null
null
07/20/2012 17:12:47
not constructive
Free Windows Installer with requirements === I am looking for a free windows installer which can do: 1. Package several runtime environments installers (e.g. Crystal Report and Matlab) 2. Package 3rd party installer (e.g PDFCreator) 3. Package the program main folder 4. Lastly, add UAC to the program executable file. Any feedback is welcome. Thank you.
4
7,584,647
09/28/2011 14:14:51
283,296
02/28/2010 23:05:44
1,099
6
Asking ffmpeg to extract frames at the original frame rate
On the ffmpeg documentation ([here][1], and [here][2]) I read that, by default, `ffmpeg`choses to extract frames at 25 frames per second (otherwise you can specify a framerate with the `-r` option) My problem is that I have a folder with dozens of videos, each of them recorded at different frame rates, so my question is: Is there a way to ask `ffmpeg` to extract frames from a video at the **"natural"** frame rate (i.e. the original frame rate at which the video was recorded)? In case it matters, I am working with `MP4` files [1]: http://linux.die.net/man/1/ffmpeg [2]: http://ffmpeg.org/ffmpeg.html#SEC9
ffmpeg
null
null
null
null
08/01/2012 14:15:34
off topic
Asking ffmpeg to extract frames at the original frame rate === On the ffmpeg documentation ([here][1], and [here][2]) I read that, by default, `ffmpeg`choses to extract frames at 25 frames per second (otherwise you can specify a framerate with the `-r` option) My problem is that I have a folder with dozens of videos, each of them recorded at different frame rates, so my question is: Is there a way to ask `ffmpeg` to extract frames from a video at the **"natural"** frame rate (i.e. the original frame rate at which the video was recorded)? In case it matters, I am working with `MP4` files [1]: http://linux.die.net/man/1/ffmpeg [2]: http://ffmpeg.org/ffmpeg.html#SEC9
2
11,500,219
07/16/2012 07:59:14
1,528,192
07/16/2012 07:43:18
1
0
browser back button issue in c#
How to write a code for browser back button which work properly for logged in user but take the user to login page once logout and clicking on browser back button. i dont want disable cache.
c#
javascript
null
null
null
07/16/2012 08:03:14
not a real question
browser back button issue in c# === How to write a code for browser back button which work properly for logged in user but take the user to login page once logout and clicking on browser back button. i dont want disable cache.
1
5,052,129
02/19/2011 16:55:28
624,223
02/19/2011 09:00:29
6
0
Django Form doesn't accept selection as valid choice. Can't see why.
i made a little form where I ask the user for some location (1st stage), then geocode the location and ask the user to confirm the location (2nd stage). Everything works fine, however, **when I select a choice and try to submit the form to get to the 3rd stage, the form doesn't accept the selection and issues an error "Select a valid choice". Why?** I can't see where I made a mistake. Please let me know what i did wrong. Thank you! my **forms.py** from django.http import HttpResponseRedirect from django.contrib.formtools.wizard import FormWizard from django import forms from django.forms.widgets import RadioSelect from geoCode import getLocation class reMapStart(forms.Form): location = forms.CharField() CHOICES = [(x, x) for x in ("cars", "bikes")] technology = forms.ChoiceField(choices=CHOICES) class reMapLocationConfirmation(forms.Form): CHOICES = [] locations = forms.ChoiceField(widget=RadioSelect(), choices = []) class reMapData(forms.Form): capacity = forms.IntegerField() class reMapWizard(FormWizard): def render_template(self, request, form, previous_fields, step, context=None): if step == 1: location = request.POST.get('0-location') address, lat, lng, country = getLocation(location) form.fields['locations'].choices = [(x, x) for x in address] return super(reMapWizard, self).render_template(request, form, previous_fields, step, context) def done(self, request, form_list): # Send an email or save to the database, or whatever you want with # form parameters in form_list return HttpResponseRedirect('/contact/thanks/') my **urls.py** ... (r'^reMap/$', reMapWizard([reMapStart, reMapLocationConfirmation, reMapData])), ... **generated html code by Django for a random location after the 1st submission** <form action='.' method='POST'><div style='display:none'> <input type='hidden' name='csrfmiddlewaretoken' value='0f61c17790aa7ecc782dbfe7438031a8' /></div> <table> <input type="hidden" name="wizard_step" value="1" /> <input type="hidden" name="0-location" value="market street san francisco" id="id_0-location" /><input type="hidden" name="0-technology" value="car" id="id_0-technology" /><input type="hidden" name="hash_0" value="8a654e29d73f2c2f6660b5beb182f0c8" /> <tr><th><label for="id_1-locations_0">Locations:</label></th><td><ul class="errorlist"><li>Select a valid choice. Market St, San Francisco, CA, USA is not one of the available choices.</li></ul><ul> <li><label for="id_1-locations_0"><input checked="checked" type="radio" id="id_1-locations_0" value="Market St, San Francisco, CA, USA" name="1-locations" /> Market St, San Francisco, CA, USA</label></li> </ul></td></tr> </table> <p><input type="submit" value="Submit" /></p> </form> I am thankful for any idea. This stuff is killing my day :) cheers, H
django
choice
valid
django-formwizard
null
null
open
Django Form doesn't accept selection as valid choice. Can't see why. === i made a little form where I ask the user for some location (1st stage), then geocode the location and ask the user to confirm the location (2nd stage). Everything works fine, however, **when I select a choice and try to submit the form to get to the 3rd stage, the form doesn't accept the selection and issues an error "Select a valid choice". Why?** I can't see where I made a mistake. Please let me know what i did wrong. Thank you! my **forms.py** from django.http import HttpResponseRedirect from django.contrib.formtools.wizard import FormWizard from django import forms from django.forms.widgets import RadioSelect from geoCode import getLocation class reMapStart(forms.Form): location = forms.CharField() CHOICES = [(x, x) for x in ("cars", "bikes")] technology = forms.ChoiceField(choices=CHOICES) class reMapLocationConfirmation(forms.Form): CHOICES = [] locations = forms.ChoiceField(widget=RadioSelect(), choices = []) class reMapData(forms.Form): capacity = forms.IntegerField() class reMapWizard(FormWizard): def render_template(self, request, form, previous_fields, step, context=None): if step == 1: location = request.POST.get('0-location') address, lat, lng, country = getLocation(location) form.fields['locations'].choices = [(x, x) for x in address] return super(reMapWizard, self).render_template(request, form, previous_fields, step, context) def done(self, request, form_list): # Send an email or save to the database, or whatever you want with # form parameters in form_list return HttpResponseRedirect('/contact/thanks/') my **urls.py** ... (r'^reMap/$', reMapWizard([reMapStart, reMapLocationConfirmation, reMapData])), ... **generated html code by Django for a random location after the 1st submission** <form action='.' method='POST'><div style='display:none'> <input type='hidden' name='csrfmiddlewaretoken' value='0f61c17790aa7ecc782dbfe7438031a8' /></div> <table> <input type="hidden" name="wizard_step" value="1" /> <input type="hidden" name="0-location" value="market street san francisco" id="id_0-location" /><input type="hidden" name="0-technology" value="car" id="id_0-technology" /><input type="hidden" name="hash_0" value="8a654e29d73f2c2f6660b5beb182f0c8" /> <tr><th><label for="id_1-locations_0">Locations:</label></th><td><ul class="errorlist"><li>Select a valid choice. Market St, San Francisco, CA, USA is not one of the available choices.</li></ul><ul> <li><label for="id_1-locations_0"><input checked="checked" type="radio" id="id_1-locations_0" value="Market St, San Francisco, CA, USA" name="1-locations" /> Market St, San Francisco, CA, USA</label></li> </ul></td></tr> </table> <p><input type="submit" value="Submit" /></p> </form> I am thankful for any idea. This stuff is killing my day :) cheers, H
0
230,594
10/23/2008 17:19:24
1,175,964
09/18/2008 19:18:25
80
4
Redirect depending on the Country?
We basically have 2 sites ( Java /JSP / Apache Webserver) : something.ca & something.com The .ca is canadian content, and the .com is american content. We need users to be redirected based on the ip addreess. We want US users to get the .com site and Canadian users get the .ca site. What is the best way to do this (at a webserver level or otherwise ) ? Please elaborate.
web-applications
design
apache
java
null
null
open
Redirect depending on the Country? === We basically have 2 sites ( Java /JSP / Apache Webserver) : something.ca & something.com The .ca is canadian content, and the .com is american content. We need users to be redirected based on the ip addreess. We want US users to get the .com site and Canadian users get the .ca site. What is the best way to do this (at a webserver level or otherwise ) ? Please elaborate.
0
648,363
03/15/2009 19:11:35
64,129
02/09/2009 11:20:49
201
20
How do I nest xsl:for-each from different parts of the xml document?
I am putting an XSL together than will create a NAnt build script using as input an XML file that defines all of the items that need to be built. We have a lot of very similar projects with standard layouts and defined standards for handover areas and so having an XML file that defines what the developers want to happen rather than describing how it needs to be done would greatly help the uptake of the build service. I want to define early on in the product build XML file the build modes to be used, i.e. <Build> <BuildModes> <Mode name="Debug" /> <Mode name="Release" /> </BuildModes> <ItemsToBuild> <Item name="first item" .... /> <Item name="second item" .... /> </ItemsToBuild> </Build> I want to have an <xsl:for-each select="/Build/BuildModes/Mode"> <xsl:for-each select="/Build/ItemsToBuild/Item"> <exec program="devenv"> <xsl:attribute name="line"> use the @name from the Mode and other stuff from Item to build up the command line </xsl:attribute> </xsl:for-each> </xsl:for-each> Now, I can do it by having a <xsl:variable> defined between the two for-each lines to hold the Mode/@name value but that's a bit messy, and what I actually want to do is flip the nexting around so that the build mode is inside the Item loop so it builds one mode then the other. At the moment it would build all of the debug and then all of the release builds. To do that I would have to have several <xsl:variable> declared and that's getting very messy. So it's nested <xsl:for-each /> when the elements in the source document are not nested.
xslt
xml
nested
loops
null
null
open
How do I nest xsl:for-each from different parts of the xml document? === I am putting an XSL together than will create a NAnt build script using as input an XML file that defines all of the items that need to be built. We have a lot of very similar projects with standard layouts and defined standards for handover areas and so having an XML file that defines what the developers want to happen rather than describing how it needs to be done would greatly help the uptake of the build service. I want to define early on in the product build XML file the build modes to be used, i.e. <Build> <BuildModes> <Mode name="Debug" /> <Mode name="Release" /> </BuildModes> <ItemsToBuild> <Item name="first item" .... /> <Item name="second item" .... /> </ItemsToBuild> </Build> I want to have an <xsl:for-each select="/Build/BuildModes/Mode"> <xsl:for-each select="/Build/ItemsToBuild/Item"> <exec program="devenv"> <xsl:attribute name="line"> use the @name from the Mode and other stuff from Item to build up the command line </xsl:attribute> </xsl:for-each> </xsl:for-each> Now, I can do it by having a <xsl:variable> defined between the two for-each lines to hold the Mode/@name value but that's a bit messy, and what I actually want to do is flip the nexting around so that the build mode is inside the Item loop so it builds one mode then the other. At the moment it would build all of the debug and then all of the release builds. To do that I would have to have several <xsl:variable> declared and that's getting very messy. So it's nested <xsl:for-each /> when the elements in the source document are not nested.
0
4,268,690
11/24/2010 15:51:13
506,185
11/12/2010 19:24:16
8
0
Applying a shader to framebuffer object to get fisheye affect
Lets say i have an application ( the details of the application should be irrelevent for solving the problem ). Instead of rendering to the screen, i am somehow able to force the application to render to a framebuffer object instead of rendering to the screen ( messing with glew or intercepting a call in a dll ). Once the application has rendered its content to the FBO is it possible to apply a shader to the contents of the FB? My knowledge is limited here, so from what i understand at this stage all information about vertices is no longer available and all the necessary tests have been applied, so whats left in the buffer is just pixel data. Is this correct? If it is possible to apply a shader to the FBO, is is possible to get a fisheye affect? ( like this for example: http://idea.hosting.lv/a/gfx/quakeshots.html ) The technique used in the linke above is to create 6 different viewports and render each viewport to a cubemap face and then apply the texture to a mesh. Thanks
opengl
graphics
glsl
null
null
null
open
Applying a shader to framebuffer object to get fisheye affect === Lets say i have an application ( the details of the application should be irrelevent for solving the problem ). Instead of rendering to the screen, i am somehow able to force the application to render to a framebuffer object instead of rendering to the screen ( messing with glew or intercepting a call in a dll ). Once the application has rendered its content to the FBO is it possible to apply a shader to the contents of the FB? My knowledge is limited here, so from what i understand at this stage all information about vertices is no longer available and all the necessary tests have been applied, so whats left in the buffer is just pixel data. Is this correct? If it is possible to apply a shader to the FBO, is is possible to get a fisheye affect? ( like this for example: http://idea.hosting.lv/a/gfx/quakeshots.html ) The technique used in the linke above is to create 6 different viewports and render each viewport to a cubemap face and then apply the texture to a mesh. Thanks
0
2,033,177
01/09/2010 11:26:55
160,718
08/21/2009 11:10:00
78
10
mysql with EF 4.0
Do you know a way for using mysql in vs2010 with ef4? Thanks in advance.
entity-framework
visual-studio-2010
mysql
null
null
06/02/2012 03:57:04
not a real question
mysql with EF 4.0 === Do you know a way for using mysql in vs2010 with ef4? Thanks in advance.
1