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
7,425,953
09/15/2011 04:43:57
946,030
09/15/2011 04:43:57
1
0
connect to a database in c# .net
Hey guys i am making a game launcher and i am making it so they have to registered to my website to continue and i don't know how to connect to a database on c# .net.<br /><Br /> **question**: How do i connect to a database that's on my website in c# .net? or where on the web do i learn that stuff? and its not a Microsoft server.<br /><br /> I have a idea that you use the sqlconnection but i don't know. any help will be appreciated i want to connect to only one table not just all of them and the table is called "users". table as well
c#
null
null
null
null
09/15/2011 06:56:50
not a real question
connect to a database in c# .net === Hey guys i am making a game launcher and i am making it so they have to registered to my website to continue and i don't know how to connect to a database on c# .net.<br /><Br /> **question**: How do i connect to a database that's on my website in c# .net? or where on the web do i learn that stuff? and its not a Microsoft server.<br /><br /> I have a idea that you use the sqlconnection but i don't know. any help will be appreciated i want to connect to only one table not just all of them and the table is called "users". table as well
1
9,699,860
03/14/2012 10:12:54
754,203
05/15/2011 04:24:46
19
1
database - which is better and why?
I have a table HelloWorld with columns english, spain, france, china and I don't know which is better for add data to this table. 1> Insert into HelloWorld values ("Hello", "hola", "bonjour", "nihao"); 2> Insert into HelloWorld (english, spain, france, china) values ("hello", "hola", "bonjour","nihao"); Can you guys tell me which is better from two above options. I appreciate any answer and explain.
database
null
null
null
null
06/04/2012 01:57:12
not constructive
database - which is better and why? === I have a table HelloWorld with columns english, spain, france, china and I don't know which is better for add data to this table. 1> Insert into HelloWorld values ("Hello", "hola", "bonjour", "nihao"); 2> Insert into HelloWorld (english, spain, france, china) values ("hello", "hola", "bonjour","nihao"); Can you guys tell me which is better from two above options. I appreciate any answer and explain.
4
10,860,844
06/02/2012 08:17:17
1,425,709
05/30/2012 09:49:06
11
0
How to join 3 select queries?
How to join these 3 query - select gameid , type ,Player1,Player2,Player3,Player4,Player5 from tbl_game where Player1=" + userid + " OR Player2=" + userid + " OR Player3=" + userid + " OR Player4=" + userid + " OR Player5=" + userid + " AND Complete = 'No' select Player1, Player2, Streaks from tbl_streaks where gameid=[gameid from first query] select userid, userid,Facebookid,points from tbl_userinfo where userid=[players from first query] `userid` is passed as parameter. I dont have any idea .. Please help me.
sql
database
query
null
null
06/04/2012 14:07:40
not a real question
How to join 3 select queries? === How to join these 3 query - select gameid , type ,Player1,Player2,Player3,Player4,Player5 from tbl_game where Player1=" + userid + " OR Player2=" + userid + " OR Player3=" + userid + " OR Player4=" + userid + " OR Player5=" + userid + " AND Complete = 'No' select Player1, Player2, Streaks from tbl_streaks where gameid=[gameid from first query] select userid, userid,Facebookid,points from tbl_userinfo where userid=[players from first query] `userid` is passed as parameter. I dont have any idea .. Please help me.
1
5,400,584
03/23/2011 03:26:45
475,464
10/14/2010 07:40:18
30
1
How to update date range using sql query?
This is my sql code DECLARE @Product TABLE ( Date_From Datetime, Date_To Datetime, Product_ID INT) INSERT INTO @Product Values ('20110323', '20110326', 101) INSERT INTO @Product Values ('20110327','20110329',101) -- The actual solution -- DECLARE @Beg Datetime, @End Datetime SET @Beg = '20110323' SET @End = '20110323' IF @Beg = @End BEGIN DECLARE @Temp TABLE (Date_From Datetime, Date_To Datetime, Product_ID INT, [Version] INT) INSERT INTO @Temp SELECT p.*, x.[Version] FROM @Product AS p, (SELECT 1 AS [Version] UNION SELECT 2 AS [Version]) AS x WHERE @Beg BETWEEN p.Date_From AND p.Date_To DELETE FROM @Product WHERE @Beg BETWEEN Date_From AND Date_To UPDATE @temp SET Date_From = CASE WHEN [Version] = 1 AND @Beg BETWEEN Date_From AND Date_To THEN DateAdd(dd, -1, @Beg) WHEN [Version] = 2 AND @Beg BETWEEN Date_From AND Date_To THEN DateAdd(dd, +1, @Beg) ELSE Date_From END, Date_To = CASE WHEN [Version] = 1 AND @Beg BETWEEN Date_From AND Date_To THEN DateAdd(dd, -1, @Beg) WHEN [Version] = 2 AND @Beg BETWEEN Date_From AND Date_To THEN DateAdd(dd, +1, @Beg) ELSE Date_From END INSERT INTO @Product ( Date_From, Date_To, Product_ID) SELECT Date_From, Date_To, Product_ID FROM @Temp END ELSE BEGIN UPDATE @Product SET Date_From = CASE WHEN Date_From BETWEEN @Beg AND @End THEN DateAdd(dd, 1, @End) ELSE Date_From END, Date_To = CASE WHEN Date_To BETWEEN @Beg AND @End THEN DateAdd(dd, -1, @Beg) ELSE Date_To END WHERE Date_From BETWEEN @Beg AND @End OR Date_To BETWEEN @Beg AND @End DELETE FROM @Product WHERE Date_From > Date_To END SELECT * FROM @Product ORDER BY Date_From this is the out put... 2011-03-22 00:00:00.000 2011-03-22 00:00:00.000 101 2011-03-24 00:00:00.000 2011-03-24 00:00:00.000 101 2011-03-27 00:00:00.000 2011-03-29 00:00:00.000 101 problem in this output is 22 that is not in the DECLARE table Wht i need is below out put 2011-03-24 00:00:00.000 2011-03-24 00:00:00.000 101 2011-03-27 00:00:00.000 2011-03-29 00:00:00.000 101
sql
query
null
null
null
null
open
How to update date range using sql query? === This is my sql code DECLARE @Product TABLE ( Date_From Datetime, Date_To Datetime, Product_ID INT) INSERT INTO @Product Values ('20110323', '20110326', 101) INSERT INTO @Product Values ('20110327','20110329',101) -- The actual solution -- DECLARE @Beg Datetime, @End Datetime SET @Beg = '20110323' SET @End = '20110323' IF @Beg = @End BEGIN DECLARE @Temp TABLE (Date_From Datetime, Date_To Datetime, Product_ID INT, [Version] INT) INSERT INTO @Temp SELECT p.*, x.[Version] FROM @Product AS p, (SELECT 1 AS [Version] UNION SELECT 2 AS [Version]) AS x WHERE @Beg BETWEEN p.Date_From AND p.Date_To DELETE FROM @Product WHERE @Beg BETWEEN Date_From AND Date_To UPDATE @temp SET Date_From = CASE WHEN [Version] = 1 AND @Beg BETWEEN Date_From AND Date_To THEN DateAdd(dd, -1, @Beg) WHEN [Version] = 2 AND @Beg BETWEEN Date_From AND Date_To THEN DateAdd(dd, +1, @Beg) ELSE Date_From END, Date_To = CASE WHEN [Version] = 1 AND @Beg BETWEEN Date_From AND Date_To THEN DateAdd(dd, -1, @Beg) WHEN [Version] = 2 AND @Beg BETWEEN Date_From AND Date_To THEN DateAdd(dd, +1, @Beg) ELSE Date_From END INSERT INTO @Product ( Date_From, Date_To, Product_ID) SELECT Date_From, Date_To, Product_ID FROM @Temp END ELSE BEGIN UPDATE @Product SET Date_From = CASE WHEN Date_From BETWEEN @Beg AND @End THEN DateAdd(dd, 1, @End) ELSE Date_From END, Date_To = CASE WHEN Date_To BETWEEN @Beg AND @End THEN DateAdd(dd, -1, @Beg) ELSE Date_To END WHERE Date_From BETWEEN @Beg AND @End OR Date_To BETWEEN @Beg AND @End DELETE FROM @Product WHERE Date_From > Date_To END SELECT * FROM @Product ORDER BY Date_From this is the out put... 2011-03-22 00:00:00.000 2011-03-22 00:00:00.000 101 2011-03-24 00:00:00.000 2011-03-24 00:00:00.000 101 2011-03-27 00:00:00.000 2011-03-29 00:00:00.000 101 problem in this output is 22 that is not in the DECLARE table Wht i need is below out put 2011-03-24 00:00:00.000 2011-03-24 00:00:00.000 101 2011-03-27 00:00:00.000 2011-03-29 00:00:00.000 101
0
6,176,256
05/30/2011 12:23:44
648,371
03/07/2011 15:22:45
503
4
How to call a method in the viewController from a subclassed UIButton?
I was trying to find a way to recognise a touch&hold on my buttons. I thought that to subclass my buttons was a good idea, but I'm now struggling with the whole idea of subclasses, parentsviews and the viewcontroller. So please forgive, I fear that this is a beginner's question: How do I call a method (which I've defined in my ViewController) from a subclassed UIButton? - [self someMethod]; doesn't work - as UIButton is not a descendent of my ViewController. - [super someMethod]; doesn't work either - same problem I suppose - [self.superview someMethod]; ... again no luck - [MyViewController someMethod]; doesn't work either -- as it is 'undecleared' -- do I have to import my ViewController? Or do some kind of protocol/class call? Any help would be very much appreciated. Here is my subclass: // // MoleButton.h // #import <Foundation/Foundation.h> @interface MoleButton : UIButton { int page; NSString *colour; NSTimer *holdTimer; } @property (nonatomic, assign) int page; @property (nonatomic, assign) NSString *colour; @end --- // // MoleButton.m #import "MoleButton.h" @implementation MoleButton @synthesize page, colour; - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesBegan:touches withEvent:event]; [self.superview touchesBegan:touches withEvent:event]; [holdTimer invalidate]; holdTimer = [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(touchWasHeld) userInfo:nil repeats:NO]; } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesMoved:touches withEvent:event]; [self.superview touchesMoved:touches withEvent:event]; [holdTimer invalidate]; holdTimer = nil; } -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesEnded:touches withEvent:event]; [self.superview touchesEnded:touches withEvent:event]; } - (void)touchWasHeld { holdTimer = nil; // do your "held" behavior here NSLog(@"TOUCH WAS HELD!!!!"); [MyViewController doSomething]; } @end
iphone
objective-c
cocoa-touch
uibutton
subclass
null
open
How to call a method in the viewController from a subclassed UIButton? === I was trying to find a way to recognise a touch&hold on my buttons. I thought that to subclass my buttons was a good idea, but I'm now struggling with the whole idea of subclasses, parentsviews and the viewcontroller. So please forgive, I fear that this is a beginner's question: How do I call a method (which I've defined in my ViewController) from a subclassed UIButton? - [self someMethod]; doesn't work - as UIButton is not a descendent of my ViewController. - [super someMethod]; doesn't work either - same problem I suppose - [self.superview someMethod]; ... again no luck - [MyViewController someMethod]; doesn't work either -- as it is 'undecleared' -- do I have to import my ViewController? Or do some kind of protocol/class call? Any help would be very much appreciated. Here is my subclass: // // MoleButton.h // #import <Foundation/Foundation.h> @interface MoleButton : UIButton { int page; NSString *colour; NSTimer *holdTimer; } @property (nonatomic, assign) int page; @property (nonatomic, assign) NSString *colour; @end --- // // MoleButton.m #import "MoleButton.h" @implementation MoleButton @synthesize page, colour; - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesBegan:touches withEvent:event]; [self.superview touchesBegan:touches withEvent:event]; [holdTimer invalidate]; holdTimer = [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(touchWasHeld) userInfo:nil repeats:NO]; } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesMoved:touches withEvent:event]; [self.superview touchesMoved:touches withEvent:event]; [holdTimer invalidate]; holdTimer = nil; } -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesEnded:touches withEvent:event]; [self.superview touchesEnded:touches withEvent:event]; } - (void)touchWasHeld { holdTimer = nil; // do your "held" behavior here NSLog(@"TOUCH WAS HELD!!!!"); [MyViewController doSomething]; } @end
0
8,643,881
12/27/2011 10:59:19
1,045,204
11/14/2011 08:31:57
36
7
Add sound when turning page with the keyboard
How to add a turning pages sound effect without to use the Next / Previous buttons, because it also controlled by the keyboard arrows. My code based on that code: http://tympanus.net/Tutorials/MoleskineNotebook/ thanks!!!
javascript
null
null
null
null
null
open
Add sound when turning page with the keyboard === How to add a turning pages sound effect without to use the Next / Previous buttons, because it also controlled by the keyboard arrows. My code based on that code: http://tympanus.net/Tutorials/MoleskineNotebook/ thanks!!!
0
3,334,071
07/26/2010 10:43:30
402,164
07/26/2010 10:43:30
1
0
ValueError: invalid literal for int(): Screw plugg (91_10 -> untitled) in python
i have partintid = int(Screw plugg (91_10 -> untitled)) i want to convert 'Screw plugg (91_10 -> untitled)' to int. but i get ValueError: invalid literal for int(): Screw plugg (91_10 -> untitled) Any help? - sunny
python
null
null
null
null
07/26/2010 15:38:22
not a real question
ValueError: invalid literal for int(): Screw plugg (91_10 -> untitled) in python === i have partintid = int(Screw plugg (91_10 -> untitled)) i want to convert 'Screw plugg (91_10 -> untitled)' to int. but i get ValueError: invalid literal for int(): Screw plugg (91_10 -> untitled) Any help? - sunny
1
6,288,859
06/09/2011 06:24:16
790,361
06/09/2011 06:12:43
1
0
html form object equivalent in c# .net
I am using a java based soap web service.In one service it return an html form object.is there any way to convert this html form type object into an object in c# .net or any form object available in c# for this.the same code is wor
asp.net
null
null
null
null
06/09/2011 12:04:37
not a real question
html form object equivalent in c# .net === I am using a java based soap web service.In one service it return an html form object.is there any way to convert this html form type object into an object in c# .net or any form object available in c# for this.the same code is wor
1
10,137,123
04/13/2012 07:52:46
1,146,708
01/13/2012 00:26:44
18
1
reason to use Spring Dependency Injection
I'm currently studying Spring and suddenly, I've got curious about DI And my question is **What're the main reasons to use DI?**
spring
dependency-injection
dependencies
null
null
04/14/2012 13:02:32
not constructive
reason to use Spring Dependency Injection === I'm currently studying Spring and suddenly, I've got curious about DI And my question is **What're the main reasons to use DI?**
4
10,896,419
06/05/2012 11:24:31
1,208,852
02/14/2012 10:39:09
23
0
Explain about UITableview Begin Updates ,add row indexpath, endupdates?
Hello Any one give the clear explanation about UITableview begin updates,insert the row at first in the table view and end updates. Thanks Lot
iphone
ios
uitableview
uitableviewcell
null
06/06/2012 03:54:20
not a real question
Explain about UITableview Begin Updates ,add row indexpath, endupdates? === Hello Any one give the clear explanation about UITableview begin updates,insert the row at first in the table view and end updates. Thanks Lot
1
9,408,091
02/23/2012 06:15:01
1,227,596
02/23/2012 06:10:03
1
0
copy YUV video frames from one buffer to another in Gstreamer
I am extremely new to Gstreamer. I am writing a plugin to reduce the height of a YUV video by 2. I get a segmentation fault when I try to copy data from the buf(argument to chain) to another buffer in the _chain() function as follows : GstBuffer *buffer; glong size; size = GST_BUFFER_SIZE(buf); buffer = gst_buffer_new (); GST_BUFFER_SIZE (buffer) = size; GST_BUFFER_MALLOCDATA (buffer) = g_malloc (size); GST_BUFFER_DATA (buffer) = GST_BUFFER_MALLOCDATA (buffer); memcpy(buffer,buf,size); Kindly help a newbie :) Thank you
gstreamer
null
null
null
null
null
open
copy YUV video frames from one buffer to another in Gstreamer === I am extremely new to Gstreamer. I am writing a plugin to reduce the height of a YUV video by 2. I get a segmentation fault when I try to copy data from the buf(argument to chain) to another buffer in the _chain() function as follows : GstBuffer *buffer; glong size; size = GST_BUFFER_SIZE(buf); buffer = gst_buffer_new (); GST_BUFFER_SIZE (buffer) = size; GST_BUFFER_MALLOCDATA (buffer) = g_malloc (size); GST_BUFFER_DATA (buffer) = GST_BUFFER_MALLOCDATA (buffer); memcpy(buffer,buf,size); Kindly help a newbie :) Thank you
0
2,103,928
01/20/2010 18:33:59
23,487
09/29/2008 15:32:37
48
0
AS400 RPG Simulator
I have a urgent requirement to call an RPG Program from java. As suggested in this http://stackoverflow.com/questions/184864/accessing-rpg-on-iseries-from-java question. I am planning to use JTOpen. But unfortunately I dont have access to any of theses systems. So is there any way I can test the java program ? Are there any RPG simulators for Windows? Any help or ideas will be highly useful With Regards, Phani
rpg
null
null
null
null
null
open
AS400 RPG Simulator === I have a urgent requirement to call an RPG Program from java. As suggested in this http://stackoverflow.com/questions/184864/accessing-rpg-on-iseries-from-java question. I am planning to use JTOpen. But unfortunately I dont have access to any of theses systems. So is there any way I can test the java program ? Are there any RPG simulators for Windows? Any help or ideas will be highly useful With Regards, Phani
0
8,738,941
01/05/2012 07:19:22
412,207
08/05/2010 17:04:29
129
0
How to monitor active connection pool in SQL Server?
I'm suspecting that my web application has connection leaks (getting the timeout and max connection reached error). So I wanted to monitor how many database connections are active in the pool. I'm using the SQL Express so I don't have User Connections performance counter as suggested in some help guides. I do found that I could also use Performance Monitor of Win 2008 server but I've no idea how to do so. Any guide on that would be appreciated.
asp.net
sql-server-2008
null
null
null
null
open
How to monitor active connection pool in SQL Server? === I'm suspecting that my web application has connection leaks (getting the timeout and max connection reached error). So I wanted to monitor how many database connections are active in the pool. I'm using the SQL Express so I don't have User Connections performance counter as suggested in some help guides. I do found that I could also use Performance Monitor of Win 2008 server but I've no idea how to do so. Any guide on that would be appreciated.
0
5,863,689
05/02/2011 23:48:13
731,310
04/29/2011 15:12:03
36
4
Amount of permutations problem
with given 1..n sequence how many is there permutations of this sequence, but in any permutation generated can't be : f(i)=i for example we have ( 1 2 3 ) ( 1 2 3 ) So we can do ( 1 2 3 ) ( 2 3 1 ) and also ( 1 2 3 ) ( 3 1 2 ) so we can generate only 2 permutations using these rules. Also how to deal with such problems ? Thanks for any advices.
permutation
null
null
null
null
05/03/2011 09:13:48
off topic
Amount of permutations problem === with given 1..n sequence how many is there permutations of this sequence, but in any permutation generated can't be : f(i)=i for example we have ( 1 2 3 ) ( 1 2 3 ) So we can do ( 1 2 3 ) ( 2 3 1 ) and also ( 1 2 3 ) ( 3 1 2 ) so we can generate only 2 permutations using these rules. Also how to deal with such problems ? Thanks for any advices.
2
3,168,340
07/02/2010 18:48:31
135,172
07/08/2009 19:03:01
824
50
Is there a way to use w3c-validator as a local instance using either a session cookie or using username and password?
I would like to integrate the usage of w3c-validator into unit testing. Is there a way to get around authentication to do this?
unit-testing
w3c
validation
w3c-validation
null
null
open
Is there a way to use w3c-validator as a local instance using either a session cookie or using username and password? === I would like to integrate the usage of w3c-validator into unit testing. Is there a way to get around authentication to do this?
0
8,330,711
11/30/2011 18:06:06
632,407
02/24/2011 13:45:52
4,549
219
perl: how to get the original regex from the precompiled version?
Simple code: use 5.014; use warnings; my $re = <DATA>; chomp $re; my $re2 = qr/$re/; say $re2; __END__ ^\w$ result: (?^u:^\w$) #added the (?^u: Is any correct way to decompile $re2 getting back the original regex? Motivation: the regex is an config value, so need: - read it - compile it - save it to the file for the later use. But can't save the compiled regex for the later use, because in every compiling the regex got expanded with the (?^u:, so after several cycles i ended with like: (?^u:(?^u:(?^u:(?^u:(?^u:^\w$))))) therefore the question are: - is here any correct way, how to save the compiled version? - if no way - how to decompile, to getting the original version? - any idea?
perl
null
null
null
null
null
open
perl: how to get the original regex from the precompiled version? === Simple code: use 5.014; use warnings; my $re = <DATA>; chomp $re; my $re2 = qr/$re/; say $re2; __END__ ^\w$ result: (?^u:^\w$) #added the (?^u: Is any correct way to decompile $re2 getting back the original regex? Motivation: the regex is an config value, so need: - read it - compile it - save it to the file for the later use. But can't save the compiled regex for the later use, because in every compiling the regex got expanded with the (?^u:, so after several cycles i ended with like: (?^u:(?^u:(?^u:(?^u:(?^u:^\w$))))) therefore the question are: - is here any correct way, how to save the compiled version? - if no way - how to decompile, to getting the original version? - any idea?
0
6,576,807
07/04/2011 23:23:38
828,816
07/04/2011 23:23:38
1
0
ADT plugin for eclipse helios on Win7 64 bit install error
I'm trying to install the ADT plugin for Eclipse and I get this error: > An error occurred while installing the > items session context > was:(profile=epp.package.java, > phase=org.eclipse.equinox.internal.p2.engine.phases.Install, > operand=null --> > [R]org.eclipse.jdt.debug > 3.6.1.v20100715_r361, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction). > The artifact file for > osgi.bundle,org.eclipse.jdt.debug,3.6.1.v20100715_r361 > was not found. my OS: Win7 64bit Eclipse version: Helios Service Release 2 Build id: 20110218-0911 ADT Plugin URL used: http://dl-ssl.google.com/android/eclipse/ This is really starting to be confusing x.x
android
eclipse
null
null
null
null
open
ADT plugin for eclipse helios on Win7 64 bit install error === I'm trying to install the ADT plugin for Eclipse and I get this error: > An error occurred while installing the > items session context > was:(profile=epp.package.java, > phase=org.eclipse.equinox.internal.p2.engine.phases.Install, > operand=null --> > [R]org.eclipse.jdt.debug > 3.6.1.v20100715_r361, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction). > The artifact file for > osgi.bundle,org.eclipse.jdt.debug,3.6.1.v20100715_r361 > was not found. my OS: Win7 64bit Eclipse version: Helios Service Release 2 Build id: 20110218-0911 ADT Plugin URL used: http://dl-ssl.google.com/android/eclipse/ This is really starting to be confusing x.x
0
9,751,584
03/17/2012 16:18:41
1,275,955
03/17/2012 16:05:49
1
0
Class Routine Generator Software
My teacher has assigned me a project. I have to create a software that will do the following things. It will take input of set of room numbers of a college and the name of the subjects of all 4 semesters(for example: 1st,3rd,5th,7th) running at the same time in a particular department. It will generate 4 routines for 4 semesters along with the assigned room numbers. I want to write the code using C language.Can anybody help me out? Can I use any algorithm of Operation Research or Graph theory?
c
null
null
null
null
03/17/2012 23:56:01
not a real question
Class Routine Generator Software === My teacher has assigned me a project. I have to create a software that will do the following things. It will take input of set of room numbers of a college and the name of the subjects of all 4 semesters(for example: 1st,3rd,5th,7th) running at the same time in a particular department. It will generate 4 routines for 4 semesters along with the assigned room numbers. I want to write the code using C language.Can anybody help me out? Can I use any algorithm of Operation Research or Graph theory?
1
8,637,164
12/26/2011 15:48:53
791,272
06/09/2011 15:47:35
12
0
Extjs - Multiple Combo Boxes in Gird
Phase: Client Side Development (No database, No AJAX, No XML, No server side programming(yet)) The first grid is completed with the exception of hiding the sorting menu but that is not the problem. The problem is the second grid. The combo box is there at the moment to let me know that it's working but I need that combo box only in the first row second column and the second row second column to have a different combo box (third one as well) and the fourth and fifth to be text fields. I can get the combo box to come up with only one store (total of three combo box stores) but I need the second and third combo boxes to show up in the second and third rows. Any help? (code is posted below) And I'm using ExtJS tabs as well. ` Ext.require(['Ext.tab.*', 'Ext.grid']); /*This works only the server correctly*/ Ext.onReady(function(){ function formatDate(value){ return value ? Ext.Date.dateFormat(value, 'm/d/Y'): ''; } /*Use php to build the store. Make things easier. This is for the first table.*/ var myData = [ ['Updated my personal information in my business office', '',''], ['Filled out and sent in my handwriting', '',''], ['Peronalized my Website Profile', '',''], ['Completed the 72 hour Challenge ', '',''], ['Complted the What Do You Want From Your SendOutCards Business', '',''], ['Know how to score myself using the Daily 8 System', '',''], ['Registered for a Treat\'em Right Seminar', '',''], ['Learned about local training and events', '',''], ['Started a personal development program', '',''], ['Enrolled in a Monthly Subscription', '',''], ['Reviewed the Distributor Kit', '',''], ['Read the Opportunity and Fast Start Guide', '',''], ['Watched the Building a Success Unit', '',''], ['Read the Getting Started Guidebook', '',''], ['Wrote down my goals', '',''], ['Started my warm market list', '',''], ['Ordered some Opportunity and Fast Start Guides', '',''], ['Scheduled time to meet with my Enroller for my System Training', '',''] ]; var myData2 = [ ['What kind of residual income do you want?', ''], ['How many hours per week are you willing to commit to get that income?', ''], ['How many months or years would you be willing to work to get that income?', ''], ['How would your life change if you ahd that kind of onthly income from you SendOutCards business?', ''], ['Why is that level of income important to you?', ''] ]; /* This is for second table --> first combo box*/ var combo = [ ['$200 - $500 per month'], ['$500 - $1000 per month'], ['$1000 - $2500 per month'], ['$2500 - $5000 per month'], ['$5000+ per month'] ]; /*This is the second table --> second combo box*/ var combo2 = [ ['2 - 5 hours per week'], ['5 - 7 hours per week'], ['7 - 10 hours per week'], ['10+ hours per week'] ]; /*This is the second table --> Third combo box*/ var combo3 = [ ['3 - 6 months'], ['6 - 12 months'], ['1 - 3 Years'], ['3 - 5 Years'], ['5 - 10 Years'] ]; /*These are the stores for each table*/ var store = Ext.create('Ext.data.ArrayStore', { fields: [ {name: 'company'}, {name: 'completed'}, {name: 'goal'} ], data: myData }); var store2 = Ext.create('Ext.data.ArrayStore', { fields:[{name: 'questions'}, {name: 'base'} ], data: myData2 }); /*The next three variables are for array stores*/ var comstore = Ext.create('Ext.data.ArrayStore', { fields:[{name: 'combo'} ], data: combo }); var comstore2 = Ext.create('Ext.data.ArrayStore',{ fields:[{name:'combo2'}], data: combo2 }); var comstore3 = Ext.create('Ext.data.ArrayStore',{ fields: [{name: 'combo3'}], data: combo3 }); var grid = Ext.create('Ext.grid.Panel', { store: store, columns: [ { text : '', flex : 1, sortable : false, dataIndex: 'company' }, { text : 'Completed', name:'com', width : 75, sortable : false, dataIndex:'completed', renderer : formatDate, field: { xtype:'datefield' } }, { text : 'Goal Date', name:'gd', width : 75, sortable : false, dataIndex: 'goal', renderer : formatDate, field: { xtype:'datefield' } }, { text : 'Days Left', name: 'dl', width : 75, sortable : false } ], plugins:[ Ext.create('Ext.grid.plugin.CellEditing',{clicksToEdit:1}) ], height: 450, width: 800, renderTo: 'check' }); var combox = Ext.create('Ext.form.field.ComboBox',{ store: comstore, displayField: 'combo', queryMode: 'local', typeAhead: false, width: 500, renderTo: 'check' }); var grid = Ext.create('Ext.grid.Panel', { store: store2, title: 'What Do You Want From Your SendOutCards Business', columns: [ { text : '', flex : 1, sortable : false, dataIndex: 'questions', }, { text : '', width : 75, sortable : false, dataIndex:'base' , field:{ xtype: 'combo', store: comstore, displayField: 'combo', queryMode: 'local', typeAhead: false } } ], plugins:[ Ext.create('Ext.grid.plugin.CellEditing',{clicksToEdit:1}) ], height: 450, width: 450, renderTo: 'check' }); var tabs = Ext.createWidget('tabpanel', { renderTo: 'tab', width: 1300, height: 800, activeTab: 1, defaults:{ autoScroll: true, bodyPadding: 10 }, items:[{ contentEl:'check', title: 'checklist', },{ contentEl:'builder', title: 'builder', }] }); }); `
javascript
extjs4
null
null
null
06/28/2012 20:14:52
too localized
Extjs - Multiple Combo Boxes in Gird === Phase: Client Side Development (No database, No AJAX, No XML, No server side programming(yet)) The first grid is completed with the exception of hiding the sorting menu but that is not the problem. The problem is the second grid. The combo box is there at the moment to let me know that it's working but I need that combo box only in the first row second column and the second row second column to have a different combo box (third one as well) and the fourth and fifth to be text fields. I can get the combo box to come up with only one store (total of three combo box stores) but I need the second and third combo boxes to show up in the second and third rows. Any help? (code is posted below) And I'm using ExtJS tabs as well. ` Ext.require(['Ext.tab.*', 'Ext.grid']); /*This works only the server correctly*/ Ext.onReady(function(){ function formatDate(value){ return value ? Ext.Date.dateFormat(value, 'm/d/Y'): ''; } /*Use php to build the store. Make things easier. This is for the first table.*/ var myData = [ ['Updated my personal information in my business office', '',''], ['Filled out and sent in my handwriting', '',''], ['Peronalized my Website Profile', '',''], ['Completed the 72 hour Challenge ', '',''], ['Complted the What Do You Want From Your SendOutCards Business', '',''], ['Know how to score myself using the Daily 8 System', '',''], ['Registered for a Treat\'em Right Seminar', '',''], ['Learned about local training and events', '',''], ['Started a personal development program', '',''], ['Enrolled in a Monthly Subscription', '',''], ['Reviewed the Distributor Kit', '',''], ['Read the Opportunity and Fast Start Guide', '',''], ['Watched the Building a Success Unit', '',''], ['Read the Getting Started Guidebook', '',''], ['Wrote down my goals', '',''], ['Started my warm market list', '',''], ['Ordered some Opportunity and Fast Start Guides', '',''], ['Scheduled time to meet with my Enroller for my System Training', '',''] ]; var myData2 = [ ['What kind of residual income do you want?', ''], ['How many hours per week are you willing to commit to get that income?', ''], ['How many months or years would you be willing to work to get that income?', ''], ['How would your life change if you ahd that kind of onthly income from you SendOutCards business?', ''], ['Why is that level of income important to you?', ''] ]; /* This is for second table --> first combo box*/ var combo = [ ['$200 - $500 per month'], ['$500 - $1000 per month'], ['$1000 - $2500 per month'], ['$2500 - $5000 per month'], ['$5000+ per month'] ]; /*This is the second table --> second combo box*/ var combo2 = [ ['2 - 5 hours per week'], ['5 - 7 hours per week'], ['7 - 10 hours per week'], ['10+ hours per week'] ]; /*This is the second table --> Third combo box*/ var combo3 = [ ['3 - 6 months'], ['6 - 12 months'], ['1 - 3 Years'], ['3 - 5 Years'], ['5 - 10 Years'] ]; /*These are the stores for each table*/ var store = Ext.create('Ext.data.ArrayStore', { fields: [ {name: 'company'}, {name: 'completed'}, {name: 'goal'} ], data: myData }); var store2 = Ext.create('Ext.data.ArrayStore', { fields:[{name: 'questions'}, {name: 'base'} ], data: myData2 }); /*The next three variables are for array stores*/ var comstore = Ext.create('Ext.data.ArrayStore', { fields:[{name: 'combo'} ], data: combo }); var comstore2 = Ext.create('Ext.data.ArrayStore',{ fields:[{name:'combo2'}], data: combo2 }); var comstore3 = Ext.create('Ext.data.ArrayStore',{ fields: [{name: 'combo3'}], data: combo3 }); var grid = Ext.create('Ext.grid.Panel', { store: store, columns: [ { text : '', flex : 1, sortable : false, dataIndex: 'company' }, { text : 'Completed', name:'com', width : 75, sortable : false, dataIndex:'completed', renderer : formatDate, field: { xtype:'datefield' } }, { text : 'Goal Date', name:'gd', width : 75, sortable : false, dataIndex: 'goal', renderer : formatDate, field: { xtype:'datefield' } }, { text : 'Days Left', name: 'dl', width : 75, sortable : false } ], plugins:[ Ext.create('Ext.grid.plugin.CellEditing',{clicksToEdit:1}) ], height: 450, width: 800, renderTo: 'check' }); var combox = Ext.create('Ext.form.field.ComboBox',{ store: comstore, displayField: 'combo', queryMode: 'local', typeAhead: false, width: 500, renderTo: 'check' }); var grid = Ext.create('Ext.grid.Panel', { store: store2, title: 'What Do You Want From Your SendOutCards Business', columns: [ { text : '', flex : 1, sortable : false, dataIndex: 'questions', }, { text : '', width : 75, sortable : false, dataIndex:'base' , field:{ xtype: 'combo', store: comstore, displayField: 'combo', queryMode: 'local', typeAhead: false } } ], plugins:[ Ext.create('Ext.grid.plugin.CellEditing',{clicksToEdit:1}) ], height: 450, width: 450, renderTo: 'check' }); var tabs = Ext.createWidget('tabpanel', { renderTo: 'tab', width: 1300, height: 800, activeTab: 1, defaults:{ autoScroll: true, bodyPadding: 10 }, items:[{ contentEl:'check', title: 'checklist', },{ contentEl:'builder', title: 'builder', }] }); }); `
3
11,381,990
07/08/2012 09:18:53
1,365,572
04/30/2012 10:20:42
61
0
Better way to create database for a price table
I need to create a price table system so i am going to create those three tables in my database. - PricingTable (ID,Name,ServiceID,Style) - PricingTablePackages (ID,PricingTable_ID,Title,Price,PricePerTime,Info,Flag,Link) - PricingTablePackagesFeatures (ID,PricingTablePackages_ID,Feature,Value,MoreInfo) Here One PriceTable can hold more then one PricingTablePackages ans one PricingTablePackage can hold more then one PricingTablePackagesFeature. Is anymore way to do better one ? in a single DB Table ? I am going to create a MVC3 Model for those table so what is the best way to do this kind od DB Table in MVC3 Model?
database
asp.net-mvc-3
null
null
null
null
open
Better way to create database for a price table === I need to create a price table system so i am going to create those three tables in my database. - PricingTable (ID,Name,ServiceID,Style) - PricingTablePackages (ID,PricingTable_ID,Title,Price,PricePerTime,Info,Flag,Link) - PricingTablePackagesFeatures (ID,PricingTablePackages_ID,Feature,Value,MoreInfo) Here One PriceTable can hold more then one PricingTablePackages ans one PricingTablePackage can hold more then one PricingTablePackagesFeature. Is anymore way to do better one ? in a single DB Table ? I am going to create a MVC3 Model for those table so what is the best way to do this kind od DB Table in MVC3 Model?
0
269,781
11/06/2008 18:32:22
24,721
10/03/2008 03:00:25
46
8
VB date conversion
Is there an easy way to convert a string that contains this: Date: Wed, 5 Nov 2008 13:12:12 -0500 (EST) into a string that contains this: 20081105_131212
vb
manipulation
null
null
null
null
open
VB date conversion === Is there an easy way to convert a string that contains this: Date: Wed, 5 Nov 2008 13:12:12 -0500 (EST) into a string that contains this: 20081105_131212
0
5,359,767
03/19/2011 03:02:07
666,508
03/18/2011 18:10:59
4
0
how to use a try and catch in vb.net
FOR THIS CODE IF ANY EROOR OCCURS ANY WERE IN THE CODE HOW COULD I USE THE TRY CATCH TOTKILO.Text = KILO.Text * TOUCH.Text * 0.01 TextBox10.Text = TextBox9.Text * TextBox8.Text * 0.01 K = Math.Round(Val(TOTKILO.Text) - Val(TextBox10.Text), 5) TextBox11.Text = TextBox7.Text + K cmd.CommandType = Data.CommandType.Text con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\SHOPPROJECT\SHOPPROJECT\shop.mdf;Integrated Security=True;User Instance=True" con.Open() If RadioButton1.Checked Then GOLD = 1 ElseIf RadioButton2.Checked Then SILVER = 1 End If If RadioButton3.Checked Then KGOLD = 1 ElseIf RadioButton4.Checked Then KSILVER = 1 End If cmd.CommandText = " INSERT INTO SALES VALUES('" & ComboBox1.Text & " ' , " & SILVER & " ," & GOLD & ",'" & ComboBox2.Text & "'," & KILO.Text & ", " & TOUCH.Text & " ," & TOTKILO.Text & "," & TextBox3.Text & "," & TextBox8.Text & "," & KGOLD & "," & KSILVER & "," & TextBox9.Text & " ," & TextBox10.Text & "," & TextBox11.Text & "," & TextBox12.Text & " , " & TextBox13.Text & " ) " cmd.CommandType = " UPDATE BALANCE SET OBBALANCE = " & TextBox11.Text & " WHERE CUSTOMERNAME = '" & ComboBox1.Text & "' " cmd.Connection = con cmd.ExecuteNonQuery() con.Close() END SUB SINCE I USED BOTH THE VB.NET CONTROLS AND ALSO THE LINK TO SQL TO UPDATE AND INSERT ALL SO WEN EVER ERROR OCCUS I WANT TO SHOW ENTER DATA COREECTLY HOW TO DO USING TRY CATCH
sql
null
null
null
null
03/19/2011 19:29:21
not a real question
how to use a try and catch in vb.net === FOR THIS CODE IF ANY EROOR OCCURS ANY WERE IN THE CODE HOW COULD I USE THE TRY CATCH TOTKILO.Text = KILO.Text * TOUCH.Text * 0.01 TextBox10.Text = TextBox9.Text * TextBox8.Text * 0.01 K = Math.Round(Val(TOTKILO.Text) - Val(TextBox10.Text), 5) TextBox11.Text = TextBox7.Text + K cmd.CommandType = Data.CommandType.Text con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\SHOPPROJECT\SHOPPROJECT\shop.mdf;Integrated Security=True;User Instance=True" con.Open() If RadioButton1.Checked Then GOLD = 1 ElseIf RadioButton2.Checked Then SILVER = 1 End If If RadioButton3.Checked Then KGOLD = 1 ElseIf RadioButton4.Checked Then KSILVER = 1 End If cmd.CommandText = " INSERT INTO SALES VALUES('" & ComboBox1.Text & " ' , " & SILVER & " ," & GOLD & ",'" & ComboBox2.Text & "'," & KILO.Text & ", " & TOUCH.Text & " ," & TOTKILO.Text & "," & TextBox3.Text & "," & TextBox8.Text & "," & KGOLD & "," & KSILVER & "," & TextBox9.Text & " ," & TextBox10.Text & "," & TextBox11.Text & "," & TextBox12.Text & " , " & TextBox13.Text & " ) " cmd.CommandType = " UPDATE BALANCE SET OBBALANCE = " & TextBox11.Text & " WHERE CUSTOMERNAME = '" & ComboBox1.Text & "' " cmd.Connection = con cmd.ExecuteNonQuery() con.Close() END SUB SINCE I USED BOTH THE VB.NET CONTROLS AND ALSO THE LINK TO SQL TO UPDATE AND INSERT ALL SO WEN EVER ERROR OCCUS I WANT TO SHOW ENTER DATA COREECTLY HOW TO DO USING TRY CATCH
1
11,577,434
07/20/2012 10:21:29
1,395,377
05/15/2012 06:28:45
455
33
how can post and get data using Json-rpc api in android?
i am trying to post and get data using jsonrpc API but i dont know the proper way to post and get data.so.can any boddy know that how to post and get data.i already download json-rpc.jar file. thanks in advance.
android
null
null
null
null
07/22/2012 02:55:18
not a real question
how can post and get data using Json-rpc api in android? === i am trying to post and get data using jsonrpc API but i dont know the proper way to post and get data.so.can any boddy know that how to post and get data.i already download json-rpc.jar file. thanks in advance.
1
5,912,456
05/06/2011 13:56:00
694,591
04/06/2011 09:57:54
1
0
Twitter4J Login/Logout and session details
I have a login button to login my twitter from twitter4J. once I get the authentication, I store the token and secret for the timeline updates to the twitter. later on I want the user to log off and be able to login via another twitter account. I am little bit confused how to invalidate the current authentication. and also I am unable to findout whether user is already logged in or not. the only way for me is by checking the token and secret variables. if they are not null, I assume that user is logged in. during debug, if i restart my app, the authentication URL gives me error if a user had already been authenticated. right now I am restarting the emulator to wash off the user authentication
android
session
login
logout
twitter4j
null
open
Twitter4J Login/Logout and session details === I have a login button to login my twitter from twitter4J. once I get the authentication, I store the token and secret for the timeline updates to the twitter. later on I want the user to log off and be able to login via another twitter account. I am little bit confused how to invalidate the current authentication. and also I am unable to findout whether user is already logged in or not. the only way for me is by checking the token and secret variables. if they are not null, I assume that user is logged in. during debug, if i restart my app, the authentication URL gives me error if a user had already been authenticated. right now I am restarting the emulator to wash off the user authentication
0
4,262,882
11/24/2010 02:04:26
301,957
03/25/2010 17:57:31
51
0
Best tools for web based developments graphics part
What software's are you guys using for the development of the graphic part of a web site? Photo shop or Fireworks or etc. Thank You.
dreamweaver
photoshop
null
null
null
09/10/2011 19:19:22
not constructive
Best tools for web based developments graphics part === What software's are you guys using for the development of the graphic part of a web site? Photo shop or Fireworks or etc. Thank You.
4
4,751,298
01/20/2011 19:00:08
578,462
01/17/2011 11:29:34
9
2
How to run Applet
please give me an Applet example and say how yo run an applet because applets doesn't have main and my IDE doesn't run it! please help me.
java
null
null
null
null
01/22/2011 00:56:11
not a real question
How to run Applet === please give me an Applet example and say how yo run an applet because applets doesn't have main and my IDE doesn't run it! please help me.
1
5,659,420
04/14/2011 06:28:49
697,111
04/07/2011 15:36:38
44
0
Setup VisualC++ to use OpenGL 4.1?
I'm trying to setup VC++ to compile code with OpenGL 4.1 functionality. I downloaded the 3 header files from from opengl.org; put them in the correct paths and include them - but keep getting errors like this: > error C3861: 'wglSwapIntervalEXT': identifier not found I have the latest video drivers. OpenGL says the problem is MS includes only version 1.1 with their compiler when though the vendor/driver supports 4.1.
c++
visual-studio-2010
visual-c++
opengl
null
null
open
Setup VisualC++ to use OpenGL 4.1? === I'm trying to setup VC++ to compile code with OpenGL 4.1 functionality. I downloaded the 3 header files from from opengl.org; put them in the correct paths and include them - but keep getting errors like this: > error C3861: 'wglSwapIntervalEXT': identifier not found I have the latest video drivers. OpenGL says the problem is MS includes only version 1.1 with their compiler when though the vendor/driver supports 4.1.
0
7,683,320
10/07/2011 05:18:19
983,399
10/07/2011 05:08:24
1
0
Edit using c# and ms access
i have a problem, i tried this code : private void button1_Click(object sender, RoutedEventArgs e) { conn.Open(); OleDbCommand cmd = new OleDbCommand("UPDATE tbl_Fullname SET Firstname=@firstn,Lastname=@lastn,Middlename=@midn WHERE fnID=@idn", conn); cmd.Parameters.Add("@idn", OleDbType.VarChar).Value = textBox5.Text; cmd.Parameters.Add("@firstn", OleDbType.VarChar).Value = textBox1.Text; cmd.Parameters.Add("@lastn", OleDbType.VarChar).Value = textBox2.Text; cmd.Parameters.Add("@midn", OleDbType.VarChar).Value = textBox3.Text; cmd.ExecuteNonQuery(); conn.Close(); } there was no error but when i ckecked my db access there is nothing changed. is this the exact code for updatint and editing? here is my whole code: private void Window_Loaded(object sender, RoutedEventArgs e) { } private void button3_Click(object sender, RoutedEventArgs e) { OleDbCommand cmd = new OleDbCommand("INSERT INTO tbl_Fullname (Lastname,Firstname,Middlename) VALUES (@first,@last,@midn)",conn); conn.Open(); cmd.Parameters.Add("@first", OleDbType.VarChar).Value = textBox1.Text; cmd.Parameters.Add("@last", OleDbType.VarChar).Value = textBox2.Text; cmd.Parameters.Add("@midn", OleDbType.VarChar).Value = textBox3.Text; cmd.ExecuteNonQuery(); conn.Close(); } private void textBox4_TextChanged(object sender, TextChangedEventArgs e) { conn.Open(); OleDbCommand cmd2 = new OleDbCommand("SELECT fnID,Lastname,Firstname,Middlename FROM tbl_Fullname WHERE fnID= @id", conn); cmd2.Parameters.Add("@id", OleDbType.VarChar).Value = textBox4.Text; try { OleDbDataReader dr = cmd2.ExecuteReader(); if (dr.Read()) { textBox1.Text = dr[1].ToString(); textBox2.Text = dr[2].ToString(); textBox3.Text = dr[3].ToString(); textBox5.Text = dr[0].ToString(); } else { MessageBox.Show("No result"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } conn.Close(); } private void button1_Click(object sender, RoutedEventArgs e) { conn.Open(); OleDbCommand cmd = new OleDbCommand("UPDATE tbl_Fullname SET Firstname=@firstn,Lastname=@lastn,Middlename=@midn WHERE fnID=@idn", conn); cmd.Parameters.Add("@idn", OleDbType.VarChar).Value = textBox5.Text; cmd.Parameters.Add("@firstn", OleDbType.VarChar).Value = textBox1.Text; cmd.Parameters.Add("@lastn", OleDbType.VarChar).Value = textBox2.Text; cmd.Parameters.Add("@midn", OleDbType.VarChar).Value = textBox3.Text; cmd.ExecuteNonQuery(); conn.Close(); } } } i hope someone can help me. i need it badly. thank you in advance.
c#
edit
access
null
null
null
open
Edit using c# and ms access === i have a problem, i tried this code : private void button1_Click(object sender, RoutedEventArgs e) { conn.Open(); OleDbCommand cmd = new OleDbCommand("UPDATE tbl_Fullname SET Firstname=@firstn,Lastname=@lastn,Middlename=@midn WHERE fnID=@idn", conn); cmd.Parameters.Add("@idn", OleDbType.VarChar).Value = textBox5.Text; cmd.Parameters.Add("@firstn", OleDbType.VarChar).Value = textBox1.Text; cmd.Parameters.Add("@lastn", OleDbType.VarChar).Value = textBox2.Text; cmd.Parameters.Add("@midn", OleDbType.VarChar).Value = textBox3.Text; cmd.ExecuteNonQuery(); conn.Close(); } there was no error but when i ckecked my db access there is nothing changed. is this the exact code for updatint and editing? here is my whole code: private void Window_Loaded(object sender, RoutedEventArgs e) { } private void button3_Click(object sender, RoutedEventArgs e) { OleDbCommand cmd = new OleDbCommand("INSERT INTO tbl_Fullname (Lastname,Firstname,Middlename) VALUES (@first,@last,@midn)",conn); conn.Open(); cmd.Parameters.Add("@first", OleDbType.VarChar).Value = textBox1.Text; cmd.Parameters.Add("@last", OleDbType.VarChar).Value = textBox2.Text; cmd.Parameters.Add("@midn", OleDbType.VarChar).Value = textBox3.Text; cmd.ExecuteNonQuery(); conn.Close(); } private void textBox4_TextChanged(object sender, TextChangedEventArgs e) { conn.Open(); OleDbCommand cmd2 = new OleDbCommand("SELECT fnID,Lastname,Firstname,Middlename FROM tbl_Fullname WHERE fnID= @id", conn); cmd2.Parameters.Add("@id", OleDbType.VarChar).Value = textBox4.Text; try { OleDbDataReader dr = cmd2.ExecuteReader(); if (dr.Read()) { textBox1.Text = dr[1].ToString(); textBox2.Text = dr[2].ToString(); textBox3.Text = dr[3].ToString(); textBox5.Text = dr[0].ToString(); } else { MessageBox.Show("No result"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } conn.Close(); } private void button1_Click(object sender, RoutedEventArgs e) { conn.Open(); OleDbCommand cmd = new OleDbCommand("UPDATE tbl_Fullname SET Firstname=@firstn,Lastname=@lastn,Middlename=@midn WHERE fnID=@idn", conn); cmd.Parameters.Add("@idn", OleDbType.VarChar).Value = textBox5.Text; cmd.Parameters.Add("@firstn", OleDbType.VarChar).Value = textBox1.Text; cmd.Parameters.Add("@lastn", OleDbType.VarChar).Value = textBox2.Text; cmd.Parameters.Add("@midn", OleDbType.VarChar).Value = textBox3.Text; cmd.ExecuteNonQuery(); conn.Close(); } } } i hope someone can help me. i need it badly. thank you in advance.
0
9,604,132
03/07/2012 15:19:18
583,464
01/20/2011 19:04:45
459
10
how to project a point on to a sphere
If i have a point (x,y,z) how to project it on to a sphere(x,y,z,radius) (on its surface). My input will be the coordinates of point and sphere. The output should be the coordinates of the projected point on sphere. Just convert from cartesian to spherical coordinates? Thanks!
c++
c
null
null
null
null
open
how to project a point on to a sphere === If i have a point (x,y,z) how to project it on to a sphere(x,y,z,radius) (on its surface). My input will be the coordinates of point and sphere. The output should be the coordinates of the projected point on sphere. Just convert from cartesian to spherical coordinates? Thanks!
0
8,247,492
11/23/2011 18:48:12
1,062,532
11/23/2011 18:34:07
1
0
Perl CGI gets parameters from a different request to the current URL
This is a weird one. :) I have a script running under Apache 1.3, with Apache::PerlRun option of mod_perl. It uses the standard CGI.pm module. It's a regularly accessed script on a busy server, accessed over https. The URL is typically something like... > /script.pl?action=edit&id=47049 Which is then brought into Perl the usual way... my $action = $cgi->param("action"); my $id = $cgi->param("id"); This has been working successfully for a couple of years. However we started getting support requests this week from our customers who were accessing this script and getting blank pages. We already had a line like the following that put the current URL into a form we use for customers to report an issue about a page... $cgi->url(-query => 1); And when we view source of the page, the result of that command is the same URL, but with an entirely different query string. > /script.pl?action=login&user=foo&password=bar A query string that we recognise as being from a totally different script elsewhere on our system. However crazy it sounds, it seems that when users are accessing a URL with a query string, the query string that the script is seeing is one from a previous request on another script. Of course the script can't handle that action and outputs nothing. We have some automated test scripts running to see how often this happens, and it's not every time. To throw some extra confusion into the mix, after an Apache restart, the problem seems to initially disappear completely only to come back later. So whatever is causing it is somehow relieved by a restart, but we can't see how Apache can possibly take the request from one user and mix it up with another.
perl
apache
cgi
mod-perl
null
null
open
Perl CGI gets parameters from a different request to the current URL === This is a weird one. :) I have a script running under Apache 1.3, with Apache::PerlRun option of mod_perl. It uses the standard CGI.pm module. It's a regularly accessed script on a busy server, accessed over https. The URL is typically something like... > /script.pl?action=edit&id=47049 Which is then brought into Perl the usual way... my $action = $cgi->param("action"); my $id = $cgi->param("id"); This has been working successfully for a couple of years. However we started getting support requests this week from our customers who were accessing this script and getting blank pages. We already had a line like the following that put the current URL into a form we use for customers to report an issue about a page... $cgi->url(-query => 1); And when we view source of the page, the result of that command is the same URL, but with an entirely different query string. > /script.pl?action=login&user=foo&password=bar A query string that we recognise as being from a totally different script elsewhere on our system. However crazy it sounds, it seems that when users are accessing a URL with a query string, the query string that the script is seeing is one from a previous request on another script. Of course the script can't handle that action and outputs nothing. We have some automated test scripts running to see how often this happens, and it's not every time. To throw some extra confusion into the mix, after an Apache restart, the problem seems to initially disappear completely only to come back later. So whatever is causing it is somehow relieved by a restart, but we can't see how Apache can possibly take the request from one user and mix it up with another.
0
9,189,925
02/08/2012 08:34:56
1,039,952
11/10/2011 14:30:10
6
2
Remove SVN content from old Java files
I have to make changes in an old project we did years ago and our company used SVN in that time (now we have GIT). I tried to run that project in Eclipse, but I discovered that all files have extensions *.java,v (that was easy to fix), but also all files include content like this head 1.2; access; symbols HR_struts:1.2.0.2 Root_HR_struts_start:1.2 Konec_hybridu_060602:1.2; locks; strict; comment @# @; 1.2 date 2006.05.05.05.48.50; author moncka; state Exp; branches; next 1.1; So I suppose that is the relic of our SVN usage. And my question is how to delete this content by using any tool (project contains thousands of files). Thanks a lot for help. P.S. Project also includes files like .jsp, .xml and so on which are spoiled too.
java
svn
rename
null
null
null
open
Remove SVN content from old Java files === I have to make changes in an old project we did years ago and our company used SVN in that time (now we have GIT). I tried to run that project in Eclipse, but I discovered that all files have extensions *.java,v (that was easy to fix), but also all files include content like this head 1.2; access; symbols HR_struts:1.2.0.2 Root_HR_struts_start:1.2 Konec_hybridu_060602:1.2; locks; strict; comment @# @; 1.2 date 2006.05.05.05.48.50; author moncka; state Exp; branches; next 1.1; So I suppose that is the relic of our SVN usage. And my question is how to delete this content by using any tool (project contains thousands of files). Thanks a lot for help. P.S. Project also includes files like .jsp, .xml and so on which are spoiled too.
0
3,774,713
09/23/2010 01:02:10
196,387
10/26/2009 01:15:14
13
0
API used in http://picclick.com/
my friend pointed me to the [http://picclick.com/][1] site yesterday, and i was curious if there's any public api the developer have used to get the results, i know google blocks your ip when it detects that you are sending automated requests. Thanks! [1]: http://picclick.com/
api
null
null
null
null
09/23/2010 03:49:19
not a real question
API used in http://picclick.com/ === my friend pointed me to the [http://picclick.com/][1] site yesterday, and i was curious if there's any public api the developer have used to get the results, i know google blocks your ip when it detects that you are sending automated requests. Thanks! [1]: http://picclick.com/
1
9,140,876
02/04/2012 12:30:34
1,189,315
02/04/2012 12:18:53
1
0
recovering database in sql server 2005 and 2008
How to recover database in sql server 2008,if i don't have any backup,I mean recover data from log file or any others techniques?
sql-server
backup
logfile
null
null
02/04/2012 13:59:54
off topic
recovering database in sql server 2005 and 2008 === How to recover database in sql server 2008,if i don't have any backup,I mean recover data from log file or any others techniques?
2
11,536,049
07/18/2012 07:11:45
1,485,159
06/27/2012 09:31:57
16
1
How to implement javascript spell check error in my c# asp.net application
I want to implement spell checker in my c# asp.net application.how can i do it.please help me details about this topices.
c#
javascript
asp.net
null
null
07/18/2012 07:18:02
not a real question
How to implement javascript spell check error in my c# asp.net application === I want to implement spell checker in my c# asp.net application.how can i do it.please help me details about this topices.
1
794,813
04/27/2009 18:55:46
76,322
03/10/2009 19:25:42
157
4
PyQT combobox only react on user interaction
I have a listbox that you can select users in. To the left of that is a combobox listing the available groups the user can be put it. If the user is in a group, the combobox will automatically be set to that group. I want to make it so when you change the group selection, it will move the user to that group. I added this connection: QtCore.QObject.connect(self.GroupsBox, QtCore.SIGNAL("currentIndexChanged(QString)"), self.HandleGrouping) The problem is that since I'll be selecting different users in different groups, every time I select a new user, the default option in the combobox changes and Qt registers this as a 'currentIndexChanged' signal. There appears to be no way to only fire the signal on direct user-interaction with the widget itself. What methods can I use to work around this?
python
qt
null
null
null
null
open
PyQT combobox only react on user interaction === I have a listbox that you can select users in. To the left of that is a combobox listing the available groups the user can be put it. If the user is in a group, the combobox will automatically be set to that group. I want to make it so when you change the group selection, it will move the user to that group. I added this connection: QtCore.QObject.connect(self.GroupsBox, QtCore.SIGNAL("currentIndexChanged(QString)"), self.HandleGrouping) The problem is that since I'll be selecting different users in different groups, every time I select a new user, the default option in the combobox changes and Qt registers this as a 'currentIndexChanged' signal. There appears to be no way to only fire the signal on direct user-interaction with the widget itself. What methods can I use to work around this?
0
6,413,501
06/20/2011 15:17:41
400,493
07/23/2010 17:02:17
102
3
Android: SQLite FTS3 slows down when fetching next/previous rows
<br/>I have a sqlite db that at the moment has few tables where the biggest one has over 10,000 rows. This table has four columns: id, term, definition, category. I have used a FTS3 module to speed up searching which helped a lot. However, now when I try to fetch 'next' or 'previous' row from table it takes longer than it was before I started using FTS3. This is how I create virtual table: CREATE VIRTUAL TABLE profanity USING fts3(_id integer primary key,name text,definition text,category text); This is how I fetch next/previous rows: SELECT * FROM dictionary WHERE _id < "+id + " ORDER BY _id DESC LIMIT 1 SELECT * FROM dictionary WHERE _id > "+id + " ORDER BY _id LIMIT 1 When I run these statements on the virtual table: - NEXT term is fetch within <b>~300ms</b>, - PREVIOUS term is fetch within <b>~200ms</b> When I do it with normal table (the one created without FTS3): - NEXT term is fetch within <b>~3ms</b>, - PREVIOUS term is fetch within <b>~2ms</b> Why there is such a big difference? Is there any way I can improve this speed? Thanks
android
sqlite
fts3
null
null
null
open
Android: SQLite FTS3 slows down when fetching next/previous rows === <br/>I have a sqlite db that at the moment has few tables where the biggest one has over 10,000 rows. This table has four columns: id, term, definition, category. I have used a FTS3 module to speed up searching which helped a lot. However, now when I try to fetch 'next' or 'previous' row from table it takes longer than it was before I started using FTS3. This is how I create virtual table: CREATE VIRTUAL TABLE profanity USING fts3(_id integer primary key,name text,definition text,category text); This is how I fetch next/previous rows: SELECT * FROM dictionary WHERE _id < "+id + " ORDER BY _id DESC LIMIT 1 SELECT * FROM dictionary WHERE _id > "+id + " ORDER BY _id LIMIT 1 When I run these statements on the virtual table: - NEXT term is fetch within <b>~300ms</b>, - PREVIOUS term is fetch within <b>~200ms</b> When I do it with normal table (the one created without FTS3): - NEXT term is fetch within <b>~3ms</b>, - PREVIOUS term is fetch within <b>~2ms</b> Why there is such a big difference? Is there any way I can improve this speed? Thanks
0
6,356,397
06/15/2011 10:36:31
799,393
06/15/2011 10:36:31
1
0
OOP C++ help needed..
This will look a bit strange, I know. It's not a common request. I have failed my first exam at OOP programming (in C++) and I have 4-5 days to prepare for the second and last time I can take this exam. I know the theory quite well, I'm not that good though at programming using many things like: virtual/static functions, static/dynamic/.. cast, STL lists, overloading operators, conversion constructors and some other things. I have read the theory, I just don't know where and how to apply it. What I ask (better to say beg) you to do for me is nothing more than giving me some exercises or an idea of a program/project that will include most of these things. I don't need the code (how to solve them), although some hints would be nice. I'm hoping at least some of you will understand my situation and won't ignore my request. Thank you in advance, Matt
c++
oop
stl
logic
null
06/15/2011 11:17:01
not constructive
OOP C++ help needed.. === This will look a bit strange, I know. It's not a common request. I have failed my first exam at OOP programming (in C++) and I have 4-5 days to prepare for the second and last time I can take this exam. I know the theory quite well, I'm not that good though at programming using many things like: virtual/static functions, static/dynamic/.. cast, STL lists, overloading operators, conversion constructors and some other things. I have read the theory, I just don't know where and how to apply it. What I ask (better to say beg) you to do for me is nothing more than giving me some exercises or an idea of a program/project that will include most of these things. I don't need the code (how to solve them), although some hints would be nice. I'm hoping at least some of you will understand my situation and won't ignore my request. Thank you in advance, Matt
4
9,777,872
03/19/2012 21:01:09
263,957
02/02/2010 00:14:50
508
3
Mozilla Firefox crash or ..?
I wrote the code and saw a bug in firefox and little bug in chrome <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Mozila Firefox</title> <script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script> $(function(){ $(window).scroll(function(){ if ($(window).scrollTop() == $(document).height() - $(window).height()){ alert('1'); } }); }); </script> </head> <body> CONTENT FOR SCROLL </body> </html> When I scroll this page in firefox i getting bug which covers the black transparent background browser. In chrome just more and more alerts. **Close your tabs in firefox!** Live: http://forum.xeksec.com/habr/mozilla_crash_or_wtf/
firefox
browser
crash
bugs
mozilla
03/20/2012 13:25:12
not a real question
Mozilla Firefox crash or ..? === I wrote the code and saw a bug in firefox and little bug in chrome <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Mozila Firefox</title> <script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script> $(function(){ $(window).scroll(function(){ if ($(window).scrollTop() == $(document).height() - $(window).height()){ alert('1'); } }); }); </script> </head> <body> CONTENT FOR SCROLL </body> </html> When I scroll this page in firefox i getting bug which covers the black transparent background browser. In chrome just more and more alerts. **Close your tabs in firefox!** Live: http://forum.xeksec.com/habr/mozilla_crash_or_wtf/
1
7,266,631
09/01/2011 06:09:28
252,780
01/17/2010 20:46:02
78
15
Selecting elements without jQuery
I guess this will be voted down, as it doesn't contain enough jQuery, but here it goes :) What is the most effective way to get the element(s) returned by the jQuery selector below using plain old javascript? $('a[title="some title text here"]', top.document)
javascript
jquery
null
null
null
null
open
Selecting elements without jQuery === I guess this will be voted down, as it doesn't contain enough jQuery, but here it goes :) What is the most effective way to get the element(s) returned by the jQuery selector below using plain old javascript? $('a[title="some title text here"]', top.document)
0
5,451,366
03/27/2011 18:34:00
679,224
03/27/2011 18:34:00
1
0
please correct this code ,this programme is to extract single and multiple line comments
#include <fstream> #include <iostream> using namespace std; int main() { char ch,ch1,ch3; string name,str; cout << " Enter the name of the file "; cin >> name; ifstream fin(name.c_str()); ofstream fout("output.txt",ios::out); if(!fin) { fout << " input file might not exist "; } else { cout << " To get single line comment press \"s\" otherwise Press \"m\" "; cin >> ch3; if(ch3 == 's') { cout <<" Single line comment are in this file ''output.txt''"; fin.get(ch); while(!fin.eof()) { if(ch == '/') { fin.get(ch); if(ch == '/') { fin.get(ch); while(ch != '\n') { fout << ch; fin.get(ch); } fout << endl; } fin.get(ch); } else { fin.get(ch); } } } else {//else1_start if(ch3 == 'm') {//if1_star cout << " multiple line comment are in this file ''output.txt'' "; fin.get(ch); while(!fin.eof()) {//while1_start if(ch == '/') {//if2_start fin.get(ch); if(ch == '*') {//if3_start fin.get(ch1); while(!(ch1 == '*' && fin.peek() == '/' ))//Q! {//while2_start fout << ch1; fin.get(ch1); }//while2_end }//if3_end }//if2_end else {//else2_start fin.get(ch); }//else2_end }//while1_end }//if1_end }//else1_end } fin.close(); fout.close(); return 0; }
c++-cli
null
null
null
null
03/28/2011 13:01:45
not a real question
please correct this code ,this programme is to extract single and multiple line comments === #include <fstream> #include <iostream> using namespace std; int main() { char ch,ch1,ch3; string name,str; cout << " Enter the name of the file "; cin >> name; ifstream fin(name.c_str()); ofstream fout("output.txt",ios::out); if(!fin) { fout << " input file might not exist "; } else { cout << " To get single line comment press \"s\" otherwise Press \"m\" "; cin >> ch3; if(ch3 == 's') { cout <<" Single line comment are in this file ''output.txt''"; fin.get(ch); while(!fin.eof()) { if(ch == '/') { fin.get(ch); if(ch == '/') { fin.get(ch); while(ch != '\n') { fout << ch; fin.get(ch); } fout << endl; } fin.get(ch); } else { fin.get(ch); } } } else {//else1_start if(ch3 == 'm') {//if1_star cout << " multiple line comment are in this file ''output.txt'' "; fin.get(ch); while(!fin.eof()) {//while1_start if(ch == '/') {//if2_start fin.get(ch); if(ch == '*') {//if3_start fin.get(ch1); while(!(ch1 == '*' && fin.peek() == '/' ))//Q! {//while2_start fout << ch1; fin.get(ch1); }//while2_end }//if3_end }//if2_end else {//else2_start fin.get(ch); }//else2_end }//while1_end }//if1_end }//else1_end } fin.close(); fout.close(); return 0; }
1
4,375,731
12/07/2010 10:39:13
352,627
05/28/2010 06:47:05
202
1
is it possible to detect when the uitextview's scroll bar is visible
is it possible to detect when the uitextview's scroll bar is visible thank you
iphone
iphone-sdk-3.0
null
null
null
null
open
is it possible to detect when the uitextview's scroll bar is visible === is it possible to detect when the uitextview's scroll bar is visible thank you
0
10,295,850
04/24/2012 10:09:55
1,331,669
04/13/2012 13:16:45
63
2
Is there any difference in php MVC zend & codeignitor
I just want to know one thing is the coding style of MVC is the same as Codeignitor in zEnd framework??? like retrieving/inserting values in the database etc
zend-framework
codeigniter
null
null
null
null
open
Is there any difference in php MVC zend & codeignitor === I just want to know one thing is the coding style of MVC is the same as Codeignitor in zEnd framework??? like retrieving/inserting values in the database etc
0
10,731,570
05/24/2012 05:21:06
1,414,154
05/24/2012 05:17:12
1
0
Android Http get request with json response
I am getting json response with special characters and symbols. How can i encode to that symbol €. Please give me answer. Thanks
android
null
null
null
null
05/25/2012 06:54:26
not a real question
Android Http get request with json response === I am getting json response with special characters and symbols. How can i encode to that symbol €. Please give me answer. Thanks
1
8,167,110
11/17/2011 12:31:15
523,630
11/29/2010 08:09:20
115
1
uninitialized constant Object::Dependencies
I am trying to install fiveruns_tuneup but this error pops up... nothing found in google =( Installation guide took from this page: https://github.com/fiveruns/fiveruns_tuneup Thx.
ruby-on-rails
ruby
object
null
null
null
open
uninitialized constant Object::Dependencies === I am trying to install fiveruns_tuneup but this error pops up... nothing found in google =( Installation guide took from this page: https://github.com/fiveruns/fiveruns_tuneup Thx.
0
10,701,357
05/22/2012 11:43:59
993,970
10/13/2011 17:01:51
13
0
Free hand linear drawing in a picture using QT
I want to create a event when a button has been pressed program should allow to draw free hand lines using mouse pointer in a picture. Currently I am in the stage where I can show album of pictures in a tab window. Can anybody help with that by providing some guideline or clues???
qt
qt4
qtgui
null
null
05/23/2012 12:43:31
not a real question
Free hand linear drawing in a picture using QT === I want to create a event when a button has been pressed program should allow to draw free hand lines using mouse pointer in a picture. Currently I am in the stage where I can show album of pictures in a tab window. Can anybody help with that by providing some guideline or clues???
1
6,684,802
07/13/2011 19:55:25
864,197
06/22/2011 16:18:25
45
0
C# - Calculator, what else to account for and incorporate?
So I am building a calculator in C# for fun to try to get use to the language and the GUI side of things.. I am wondering if anyone has suggestions on how to go about this or what functionality I should incorporate to get a better knowledge of C# and what it can do. Right now I just have a simple calculator that does the following (in decimal and binary): - Adds - Subtracts - Multiplies - Divides - Checks for the GCD - Checks if it is prime Any other suggestions I should do? I would love to have as many ideas as possible, as I would like to make this calculator as advanced as possible. Does anyone know how to go about doing a 'graphing' calculator function that can graph functions?
c#
gui
graph
calculator
functionality
07/13/2011 20:01:28
not a real question
C# - Calculator, what else to account for and incorporate? === So I am building a calculator in C# for fun to try to get use to the language and the GUI side of things.. I am wondering if anyone has suggestions on how to go about this or what functionality I should incorporate to get a better knowledge of C# and what it can do. Right now I just have a simple calculator that does the following (in decimal and binary): - Adds - Subtracts - Multiplies - Divides - Checks for the GCD - Checks if it is prime Any other suggestions I should do? I would love to have as many ideas as possible, as I would like to make this calculator as advanced as possible. Does anyone know how to go about doing a 'graphing' calculator function that can graph functions?
1
2,487,329
03/21/2010 14:02:23
433,242
03/21/2010 14:02:22
1
0
Darwin Streaming Server doesn't gives content
I have problems with Darwin Streaming server 5.5.5 on Debian. When i'm trying to open some stream, for ex. rtsp://sample.com/sample_100kbit.mp4 player reports it can't load stream and breaks connection. "Access History" section reports file was requested, so, at least initial connection is working, but nothing more. What can be wrong and what to check?
dss
debian
rtsp
streaming
flash
null
open
Darwin Streaming Server doesn't gives content === I have problems with Darwin Streaming server 5.5.5 on Debian. When i'm trying to open some stream, for ex. rtsp://sample.com/sample_100kbit.mp4 player reports it can't load stream and breaks connection. "Access History" section reports file was requested, so, at least initial connection is working, but nothing more. What can be wrong and what to check?
0
3,683,007
09/10/2010 07:53:42
2,648
08/23/2008 22:40:47
12,441
358
annotation-based validation framework
I'm looking for an annotation-based validation framework, that would allow me to validate parameter values. Something like the following: void someMethod(@NotBlank String foo, @NotEmpty Collection bar, @Positive Integer baz, @NotNull Object obj) { } If I could customise the error messages produced that would be nice. I'm using Java 1.5. Thanks, Don
java
validation
null
null
null
07/18/2012 10:28:02
not constructive
annotation-based validation framework === I'm looking for an annotation-based validation framework, that would allow me to validate parameter values. Something like the following: void someMethod(@NotBlank String foo, @NotEmpty Collection bar, @Positive Integer baz, @NotNull Object obj) { } If I could customise the error messages produced that would be nice. I'm using Java 1.5. Thanks, Don
4
7,549,605
09/26/2011 00:34:54
532,524
07/25/2010 23:21:31
133
3
What are the performance implications of using require_dependency in Rails 3 applications?
I feel like I understand the difference between require and require_dependency (from http://stackoverflow.com/questions/1457241/how-are-require-require-dependency-and-constants-reloading-related-in-rails). However, I'm wondering what should happen if I use some of the various methods out there (see http://hemju.com/2010/09/22/rails-3-quicktip-autoload-lib-directory-including-all-subdirectories/ and http://stackoverflow.com/questions/3356742/best-way-to-load-module-class-from-lib-folder-in-rails-3) to get all files loading so we: 1. don't need to use require_dependency all over the place in the application and 2. don't have to restart development servers when files in the lib directory change. It seems like development performance would be slightly impacted, which is not that big of a deal to me. How would performance be impacted in a production environment? Do all of the files generally get loaded only once if you are in production anyway? Is there a better way that I'm not seeing? If you could include some resources where I could read more about this, they would be greatly appreciated. Some blog posts said that this behavior changed recently with Rails 3 for autoreloading lib/* files and that it was contentious, but I didn't see any links to these discussions. It would be helpful for considering the pros/cons. Thanks!
ruby-on-rails
ruby
performance
require
null
null
open
What are the performance implications of using require_dependency in Rails 3 applications? === I feel like I understand the difference between require and require_dependency (from http://stackoverflow.com/questions/1457241/how-are-require-require-dependency-and-constants-reloading-related-in-rails). However, I'm wondering what should happen if I use some of the various methods out there (see http://hemju.com/2010/09/22/rails-3-quicktip-autoload-lib-directory-including-all-subdirectories/ and http://stackoverflow.com/questions/3356742/best-way-to-load-module-class-from-lib-folder-in-rails-3) to get all files loading so we: 1. don't need to use require_dependency all over the place in the application and 2. don't have to restart development servers when files in the lib directory change. It seems like development performance would be slightly impacted, which is not that big of a deal to me. How would performance be impacted in a production environment? Do all of the files generally get loaded only once if you are in production anyway? Is there a better way that I'm not seeing? If you could include some resources where I could read more about this, they would be greatly appreciated. Some blog posts said that this behavior changed recently with Rails 3 for autoreloading lib/* files and that it was contentious, but I didn't see any links to these discussions. It would be helpful for considering the pros/cons. Thanks!
0
5,901,779
05/05/2011 17:25:46
740,143
05/05/2011 14:28:59
1
0
pygame event handling
Just a noob question about python and pygame event handling. I got the following code in a pygame tutorial: >while 1: > > for event in pygame.event.get(): > if event.type in (QUIT, KEYDOWN): > sys.exit() ...but for some reason it returns this error: >if event.type in (QUIT, KEYDOWN): >NameError: name 'QUIT' is not defined Can anyone explain this?
python
event-handling
pygame
null
null
null
open
pygame event handling === Just a noob question about python and pygame event handling. I got the following code in a pygame tutorial: >while 1: > > for event in pygame.event.get(): > if event.type in (QUIT, KEYDOWN): > sys.exit() ...but for some reason it returns this error: >if event.type in (QUIT, KEYDOWN): >NameError: name 'QUIT' is not defined Can anyone explain this?
0
10,866,694
06/02/2012 23:26:12
1,429,226
05/31/2012 18:55:03
1
1
Simple contact form mailer
Well I'm working on my first PHP code, in the way of a simple form mailer. I can't seem to see why its generating the error > We are very sorry, but there were error(s) found with the form you > submitted. These errors appear below. > > We are sorry, but there appears to be a problem with the form you > submitted. > > Please go back and fix these errors. If anyone well versed in PHP sees the issue, I'd appreciate any guidance you can give. The HTML <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>untitled</title> </head> <body> <form action="send_form_email.php" method="post"> <fieldset> <legend> Error Report:</legend> <p><input name="name" type="text" placeholder="Your Name" autofocus></p> <p><input name="email" type="text" placeholder="email@domain.com"></p> <p><textarea name="descpirtion" placeholder="Give a description of the error."></textarea></p> <p><label>What internet browser were you using when the error occured?</label></p> <p><select name="browser"><option>Internet Explorer</option><option>Chrome</option><option>Safari</option><option>Firefox</option></select></p> <p><input type="submit" value="Submit"> <input type="reset" value="Cancel"></p> </fieldset> </form> </body> </html> the CSS body {background: #222; padding: 1em; margin: 0; font-size: 16px; color: #777;} body * {margin: 0; padding: 0; font-family: helvetica, sans-serif;} p {margin: 0 0 1em; font-size: 14px;} input, textarea, select { border: 1px solid #111; border-radius: 5px; padding: 0.5em; font-size: 15px; line-height: 1.2em; width: 80%; background: #444; color: #999; font-family: helvetica, sans-serif; background: -webkit-gradient(linear, left top, left bottom, from(#222), to(#444)); -webkit-appearance: none; -webkit-box-shadow: 1px 1px 1px #333; } input:focus, textarea:focus, select:focus {outline-color: #FC0;} textarea { color: #999; border-radius: 5px; height: 55px; background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #222), color-stop(0.05, #333)); } select { color: #999; border-radius: 5px; padding: 0.5em 1em 0.5em 0.75em; background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #222), color-stop(0.05, #333)); } input[type=text] { color: #999; border-radius: 5px; background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #222), color-stop(0.12, #333)); } input[type=submit] { color:#FFF; border-radius: 5px; width: auto; padding: 0.25em 1em; line-height: 1.5em; background: -webkit-gradient(linear, left top, left bottom, from(#FC0), to(#FF0)); border: 2px solid #FC0; text-shadow: 0 0 2px #300; font-weight: bold; -webkit-box-shadow: 1px 1px 3px #000; margin-right: 0.5em; } input[type=reset] { border-radius: 5px; width: auto; padding: 0.25em 1em; line-height: 1.5em; background: -webkit-gradient(linear, left top, left bottom, from(#333), to(#222)); border: 2px solid #444; text-shadow: 0 0 2px #300; font-weight: bold; color: #999; -webkit-box-shadow: 1px 1px 3px #000; } label{ color: #999; } leged{ padding: 5px; margin: 5px; } the PHP <?php if(isset($_POST['email'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "webmaster@canyonlakemma.com"; $email_subject = "Website Error Report"; function died($error) { // your error code can go here echo "We are very sorry, but there were error(s) found with the form you submitted. "; echo "These errors appear below.<br /><br />"; echo $error."<br /><br />"; echo "Please go back and fix these errors.<br /><br />"; die(); } // validation expected data exists if(!isset($_POST['first_name']) || !isset($_POST['email']) || !isset($_POST['description']) || !isset($_POST['browser'])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); } $name = $_POST['name']; // required $email_from = $_POST['email']; // required $description = $_POST['description']; // required $browser = $_POST['browser']; // required $error_message = ""; $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/'; if(!preg_match($email_exp,$email_from)) { $error_message .= 'The Email Address you entered does not appear to be valid.<br />'; } $string_exp = "/^[A-Za-z .'-]+$/"; if(!preg_match($string_exp,$name)) { $error_message .= 'Be sure to include your name.<br />'; } if(strlen($description) < 2) { $error_message .= 'Please include a description of the error.<br />'; } if(strlen($browser) < 2) { $error_message .= 'Please select your browser.<br />'; } if(strlen($error_message) > 0) { died($error_message); } $email_message = "Form details below.\n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "Name: ".clean_string($first_name)."\n"; $email_message .= "Email: ".clean_string($email_from)."\n"; $email_message .= "Description: ".clean_string($description)."\n"; $email_message .= "Browser: ".clean_string($broswer)."\n"; // create email headers $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?> <!-- include your own success html here --> Thank you for contacting us. We will be in touch with you very soon. <?php } ?>
php
html
css
forms
null
06/03/2012 16:16:00
too localized
Simple contact form mailer === Well I'm working on my first PHP code, in the way of a simple form mailer. I can't seem to see why its generating the error > We are very sorry, but there were error(s) found with the form you > submitted. These errors appear below. > > We are sorry, but there appears to be a problem with the form you > submitted. > > Please go back and fix these errors. If anyone well versed in PHP sees the issue, I'd appreciate any guidance you can give. The HTML <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>untitled</title> </head> <body> <form action="send_form_email.php" method="post"> <fieldset> <legend> Error Report:</legend> <p><input name="name" type="text" placeholder="Your Name" autofocus></p> <p><input name="email" type="text" placeholder="email@domain.com"></p> <p><textarea name="descpirtion" placeholder="Give a description of the error."></textarea></p> <p><label>What internet browser were you using when the error occured?</label></p> <p><select name="browser"><option>Internet Explorer</option><option>Chrome</option><option>Safari</option><option>Firefox</option></select></p> <p><input type="submit" value="Submit"> <input type="reset" value="Cancel"></p> </fieldset> </form> </body> </html> the CSS body {background: #222; padding: 1em; margin: 0; font-size: 16px; color: #777;} body * {margin: 0; padding: 0; font-family: helvetica, sans-serif;} p {margin: 0 0 1em; font-size: 14px;} input, textarea, select { border: 1px solid #111; border-radius: 5px; padding: 0.5em; font-size: 15px; line-height: 1.2em; width: 80%; background: #444; color: #999; font-family: helvetica, sans-serif; background: -webkit-gradient(linear, left top, left bottom, from(#222), to(#444)); -webkit-appearance: none; -webkit-box-shadow: 1px 1px 1px #333; } input:focus, textarea:focus, select:focus {outline-color: #FC0;} textarea { color: #999; border-radius: 5px; height: 55px; background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #222), color-stop(0.05, #333)); } select { color: #999; border-radius: 5px; padding: 0.5em 1em 0.5em 0.75em; background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #222), color-stop(0.05, #333)); } input[type=text] { color: #999; border-radius: 5px; background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #222), color-stop(0.12, #333)); } input[type=submit] { color:#FFF; border-radius: 5px; width: auto; padding: 0.25em 1em; line-height: 1.5em; background: -webkit-gradient(linear, left top, left bottom, from(#FC0), to(#FF0)); border: 2px solid #FC0; text-shadow: 0 0 2px #300; font-weight: bold; -webkit-box-shadow: 1px 1px 3px #000; margin-right: 0.5em; } input[type=reset] { border-radius: 5px; width: auto; padding: 0.25em 1em; line-height: 1.5em; background: -webkit-gradient(linear, left top, left bottom, from(#333), to(#222)); border: 2px solid #444; text-shadow: 0 0 2px #300; font-weight: bold; color: #999; -webkit-box-shadow: 1px 1px 3px #000; } label{ color: #999; } leged{ padding: 5px; margin: 5px; } the PHP <?php if(isset($_POST['email'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "webmaster@canyonlakemma.com"; $email_subject = "Website Error Report"; function died($error) { // your error code can go here echo "We are very sorry, but there were error(s) found with the form you submitted. "; echo "These errors appear below.<br /><br />"; echo $error."<br /><br />"; echo "Please go back and fix these errors.<br /><br />"; die(); } // validation expected data exists if(!isset($_POST['first_name']) || !isset($_POST['email']) || !isset($_POST['description']) || !isset($_POST['browser'])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); } $name = $_POST['name']; // required $email_from = $_POST['email']; // required $description = $_POST['description']; // required $browser = $_POST['browser']; // required $error_message = ""; $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/'; if(!preg_match($email_exp,$email_from)) { $error_message .= 'The Email Address you entered does not appear to be valid.<br />'; } $string_exp = "/^[A-Za-z .'-]+$/"; if(!preg_match($string_exp,$name)) { $error_message .= 'Be sure to include your name.<br />'; } if(strlen($description) < 2) { $error_message .= 'Please include a description of the error.<br />'; } if(strlen($browser) < 2) { $error_message .= 'Please select your browser.<br />'; } if(strlen($error_message) > 0) { died($error_message); } $email_message = "Form details below.\n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "Name: ".clean_string($first_name)."\n"; $email_message .= "Email: ".clean_string($email_from)."\n"; $email_message .= "Description: ".clean_string($description)."\n"; $email_message .= "Browser: ".clean_string($broswer)."\n"; // create email headers $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?> <!-- include your own success html here --> Thank you for contacting us. We will be in touch with you very soon. <?php } ?>
3
10,510,449
05/09/2012 05:43:52
1,383,744
05/09/2012 05:38:58
1
0
cannot destroy a database using rake
I am new to rails and while practising the tutorials I got the following error. Any ideas.. $ rake destroy scaffold Microposts --trace rake aborted! Don't know how to build task 'destroy' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task_manager.rb:49:in `[]' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:115:in `invoke_task' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:in `load' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:in `<main>'
ruby-on-rails
null
null
null
null
null
open
cannot destroy a database using rake === I am new to rails and while practising the tutorials I got the following error. Any ideas.. $ rake destroy scaffold Microposts --trace rake aborted! Don't know how to build task 'destroy' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task_manager.rb:49:in `[]' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:115:in `invoke_task' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:in `load' /home/keval/.rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:in `<main>'
0
7,644,156
10/04/2011 06:45:01
222,797
12/02/2009 10:02:31
679
17
Implementing 1 to 0 or 1 relation in sqlserver
I'm using Entity framework 4.1 database first approach . I've used Legacy database . In my edmx file which create entity classes based on tables on legacy database , there is a **1 to 0 or 1** association between some entities . although i explored the tables of database and relation between them i didn't find out how **1 to 0 or 1** relation have been implemented in database .
sql-server
sql-server-2008
entity-framework-4.1
entity-relationship
relation
null
open
Implementing 1 to 0 or 1 relation in sqlserver === I'm using Entity framework 4.1 database first approach . I've used Legacy database . In my edmx file which create entity classes based on tables on legacy database , there is a **1 to 0 or 1** association between some entities . although i explored the tables of database and relation between them i didn't find out how **1 to 0 or 1** relation have been implemented in database .
0
9,066,956
01/30/2012 16:12:23
617,779
02/15/2011 12:41:31
49
2
What is Python 3.0 not backward compatible?
I learn that Python 3.0 is not backward compatible. Will it not affect a lot of applications using older version of python? How did the developers of Python 3.0 did not think it was absolutely necessary to make it backward compatible?
python
null
null
null
null
01/30/2012 16:15:35
not constructive
What is Python 3.0 not backward compatible? === I learn that Python 3.0 is not backward compatible. Will it not affect a lot of applications using older version of python? How did the developers of Python 3.0 did not think it was absolutely necessary to make it backward compatible?
4
8,473,155
12/12/2011 10:50:55
1,016,228
10/27/2011 09:48:38
35
10
EF Query Model Tutorial link
Facing problem with every fetch i want to make using EF Query model.Place here few links from where i can grab EF Query model concepts in short time. i.e how to query your MODEL/EDM.<br/><b>NEED SOLUTION </b>::<br/>I have a method in my controller having primary key as parameter say <br/>`public action(int id)`<br/>now i want to fetch a list from table2(one to many relationship b/w table1 with primary key to table2 with foreign key) by matching that primary key with foreign key.<br/>`(from data in db.table2 where package.id==id select package)`<br/>I want to do this but in a neater terms(by using LINQ to ENTITY objects).
asp.net
asp.net-mvc-3
entity-framework
entity-framework-4
null
null
open
EF Query Model Tutorial link === Facing problem with every fetch i want to make using EF Query model.Place here few links from where i can grab EF Query model concepts in short time. i.e how to query your MODEL/EDM.<br/><b>NEED SOLUTION </b>::<br/>I have a method in my controller having primary key as parameter say <br/>`public action(int id)`<br/>now i want to fetch a list from table2(one to many relationship b/w table1 with primary key to table2 with foreign key) by matching that primary key with foreign key.<br/>`(from data in db.table2 where package.id==id select package)`<br/>I want to do this but in a neater terms(by using LINQ to ENTITY objects).
0
9,859,153
03/25/2012 09:33:33
1,194,088
02/07/2012 07:38:43
28
2
wcf The provided URI scheme 'http' is invalid; expected 'https'
im tring to create fileTransfer base on this [post][1] when i test it on local it work great i set my service on the server using iis without ssl this is my server config: <system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled="false" multipleSiteBindingsEnabled="true"/> <bindings> <wsHttpBinding> <binding name="TransferService" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/> <security mode="None" /> </binding> </wsHttpBinding> </bindings> <services> <service behaviorConfiguration="TransferServiceBehavior" name="WcfFTP.FtpService"> <endpoint address="FtpService.svc" binding="wsHttpBinding" bindingConfiguration="TransferService" contract="WcfFTP.IFileTransfer"/> <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex"/> </service> </services> <behaviors> <serviceBehaviors> <behavior name="TransferServiceBehavior"> <serviceMetadata httpGetEnabled="true"/> <dataContractSerializer maxItemsInObjectGraph="2147483647"/> <serviceDebug includeExceptionDetailInFaults="true"/> <serviceThrottling maxConcurrentCalls="500" maxConcurrentSessions="500" maxConcurrentInstances="500"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> and thats my client: <system.serviceModel> <bindings> <wsHttpBinding> <binding name="WSHttpBinding_IFileTransfer" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <security mode="TransportWithMessageCredential"> <transport clientCredentialType="Digest" proxyCredentialType="None" realm="" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" /> </security> </binding> </wsHttpBinding> </bindings> <client> <endpoint address="http://www.myhost.com/WsFTP/FtpService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IFileTransfer" contract="FtpWcfClient.IFileTransfer" name="WSHttpBinding_IFileTransfer" /> </client> </system.serviceModel> iv been tring some help on the net with this security issue but this error seems to be strang [1]: http://www.codeproject.com/Articles/166763/WCF-Streaming-Upload-Download-Files-Over-HTTP
wcf
wcf-security
null
null
null
null
open
wcf The provided URI scheme 'http' is invalid; expected 'https' === im tring to create fileTransfer base on this [post][1] when i test it on local it work great i set my service on the server using iis without ssl this is my server config: <system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled="false" multipleSiteBindingsEnabled="true"/> <bindings> <wsHttpBinding> <binding name="TransferService" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/> <security mode="None" /> </binding> </wsHttpBinding> </bindings> <services> <service behaviorConfiguration="TransferServiceBehavior" name="WcfFTP.FtpService"> <endpoint address="FtpService.svc" binding="wsHttpBinding" bindingConfiguration="TransferService" contract="WcfFTP.IFileTransfer"/> <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex"/> </service> </services> <behaviors> <serviceBehaviors> <behavior name="TransferServiceBehavior"> <serviceMetadata httpGetEnabled="true"/> <dataContractSerializer maxItemsInObjectGraph="2147483647"/> <serviceDebug includeExceptionDetailInFaults="true"/> <serviceThrottling maxConcurrentCalls="500" maxConcurrentSessions="500" maxConcurrentInstances="500"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> and thats my client: <system.serviceModel> <bindings> <wsHttpBinding> <binding name="WSHttpBinding_IFileTransfer" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <security mode="TransportWithMessageCredential"> <transport clientCredentialType="Digest" proxyCredentialType="None" realm="" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" /> </security> </binding> </wsHttpBinding> </bindings> <client> <endpoint address="http://www.myhost.com/WsFTP/FtpService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IFileTransfer" contract="FtpWcfClient.IFileTransfer" name="WSHttpBinding_IFileTransfer" /> </client> </system.serviceModel> iv been tring some help on the net with this security issue but this error seems to be strang [1]: http://www.codeproject.com/Articles/166763/WCF-Streaming-Upload-Download-Files-Over-HTTP
0
7,204,246
08/26/2011 11:52:58
914,000
08/26/2011 11:52:58
1
0
sending null values from datetimepicker to the database
hi can someone please help me with this issue? i want to send a null value to the database from datetimepicker but it doesnt work, it doesnt give an error but everytime i uncheck the checbox near on the datetimepicker the date still enters :( can anyone please help with this private void BtnSave_Click(object sender, EventArgs e) { using (SqlConnection sqlConn = new SqlConnection("Data Source=TANYA-PC;Initial Catalog=biore1;Integrated Security=True")) { string sqlQuery = @"INSERT INTO cottonpurchase VALUES(@slipNo, @purchasedate, @farmercode, @farmername, @villagename, @basicprice, @weight, @totalamountbasic, @premium, @totalamountpremium, @totalamountpaid, @certstatus)"; using (SqlCommand cmd = new SqlCommand(sqlQuery, sqlConn)) { cmd.Parameters.Add("@slipNo", SqlDbType.Int).Value = (!String.IsNullOrEmpty(TxtSlipNo.Text)) ? int.Parse(TxtSlipNo.Text) : (object)DBNull.Value; cmd.Parameters.Add("@purchasedate", SqlDbType.DateTime).Value = Date.Text; if (Date.Checked) cmd.Parameters.AddWithValue("purchdate", Date); else cmd.Parameters.AddWithValue("purchdate", DBNull.Value); cmd.Parameters.Add("@farmercode", SqlDbType.Int).Value = TxtFarmerCode.Text; cmd.Parameters.Add("@farmername", SqlDbType.VarChar, 100).Value = TxtFarmerName.Text; cmd.Parameters.Add("@villagename", SqlDbType.VarChar, 100).Value = TxtVillageName.Text; cmd.Parameters.Add("@basicprice", SqlDbType.Int).Value = (!String.IsNullOrEmpty(TxtBasicPrice.Text)) ? int.Parse(TxtBasicPrice.Text) : (object)DBNull.Value; cmd.Parameters.Add("@weight", SqlDbType.Int).Value = (!String.IsNullOrEmpty(TxtWeight.Text)) ? int.Parse(TxtWeight.Text) : (object)DBNull.Value; cmd.Parameters.Add("@totalamountbasic", SqlDbType.Int).Value = (!String.IsNullOrEmpty(TxtTotalAmountBasic.Text)) ? int.Parse(TxtTotalAmountBasic.Text) : (object)DBNull.Value; cmd.Parameters.Add("@premium", SqlDbType.Int).Value = (!String.IsNullOrEmpty(TxtPremium.Text)) ? int.Parse(TxtPremium.Text) : (object)DBNull.Value; cmd.Parameters.Add("@totalamountpremium", SqlDbType.Int).Value = (!String.IsNullOrEmpty(TxtTotalAmountPremium.Text)) ? int.Parse(TxtTotalAmountPremium.Text) : (object)DBNull.Value; cmd.Parameters.Add("@totalamountpaid", SqlDbType.Int).Value = (!String.IsNullOrEmpty(TxtTotalAmountPaid.Text)) ? int.Parse(TxtTotalAmountPaid.Text) : (object)DBNull.Value; //d.Parameters.Add("@yeildestimates", SqlDbType.Int).Value = (!String.IsNullOrEmpty(TxtYeildEstimates.Text)) ? int.Parse(TxtYeildEstimates.Text) : (object)DBNull.Value; cmd.Parameters.Add("@certstatus", SqlDbType.VarChar, 100).Value = comboBox1.Text; sqlConn.Open();
c#-2.0
null
null
null
null
null
open
sending null values from datetimepicker to the database === hi can someone please help me with this issue? i want to send a null value to the database from datetimepicker but it doesnt work, it doesnt give an error but everytime i uncheck the checbox near on the datetimepicker the date still enters :( can anyone please help with this private void BtnSave_Click(object sender, EventArgs e) { using (SqlConnection sqlConn = new SqlConnection("Data Source=TANYA-PC;Initial Catalog=biore1;Integrated Security=True")) { string sqlQuery = @"INSERT INTO cottonpurchase VALUES(@slipNo, @purchasedate, @farmercode, @farmername, @villagename, @basicprice, @weight, @totalamountbasic, @premium, @totalamountpremium, @totalamountpaid, @certstatus)"; using (SqlCommand cmd = new SqlCommand(sqlQuery, sqlConn)) { cmd.Parameters.Add("@slipNo", SqlDbType.Int).Value = (!String.IsNullOrEmpty(TxtSlipNo.Text)) ? int.Parse(TxtSlipNo.Text) : (object)DBNull.Value; cmd.Parameters.Add("@purchasedate", SqlDbType.DateTime).Value = Date.Text; if (Date.Checked) cmd.Parameters.AddWithValue("purchdate", Date); else cmd.Parameters.AddWithValue("purchdate", DBNull.Value); cmd.Parameters.Add("@farmercode", SqlDbType.Int).Value = TxtFarmerCode.Text; cmd.Parameters.Add("@farmername", SqlDbType.VarChar, 100).Value = TxtFarmerName.Text; cmd.Parameters.Add("@villagename", SqlDbType.VarChar, 100).Value = TxtVillageName.Text; cmd.Parameters.Add("@basicprice", SqlDbType.Int).Value = (!String.IsNullOrEmpty(TxtBasicPrice.Text)) ? int.Parse(TxtBasicPrice.Text) : (object)DBNull.Value; cmd.Parameters.Add("@weight", SqlDbType.Int).Value = (!String.IsNullOrEmpty(TxtWeight.Text)) ? int.Parse(TxtWeight.Text) : (object)DBNull.Value; cmd.Parameters.Add("@totalamountbasic", SqlDbType.Int).Value = (!String.IsNullOrEmpty(TxtTotalAmountBasic.Text)) ? int.Parse(TxtTotalAmountBasic.Text) : (object)DBNull.Value; cmd.Parameters.Add("@premium", SqlDbType.Int).Value = (!String.IsNullOrEmpty(TxtPremium.Text)) ? int.Parse(TxtPremium.Text) : (object)DBNull.Value; cmd.Parameters.Add("@totalamountpremium", SqlDbType.Int).Value = (!String.IsNullOrEmpty(TxtTotalAmountPremium.Text)) ? int.Parse(TxtTotalAmountPremium.Text) : (object)DBNull.Value; cmd.Parameters.Add("@totalamountpaid", SqlDbType.Int).Value = (!String.IsNullOrEmpty(TxtTotalAmountPaid.Text)) ? int.Parse(TxtTotalAmountPaid.Text) : (object)DBNull.Value; //d.Parameters.Add("@yeildestimates", SqlDbType.Int).Value = (!String.IsNullOrEmpty(TxtYeildEstimates.Text)) ? int.Parse(TxtYeildEstimates.Text) : (object)DBNull.Value; cmd.Parameters.Add("@certstatus", SqlDbType.VarChar, 100).Value = comboBox1.Text; sqlConn.Open();
0
9,850,440
03/24/2012 09:05:00
975,811
10/02/2011 21:19:20
5
1
Serial port data transfer from VB.NET to PHP
I am planning to read sms from a gsm modem using VB.net via serial port. but I want to send the sms text to a php file. So which would be better? writing in a file then opening the same file using php or using mysql database? or is there any other way?
php
vb.net
serial-port
null
null
03/25/2012 18:21:42
not a real question
Serial port data transfer from VB.NET to PHP === I am planning to read sms from a gsm modem using VB.net via serial port. but I want to send the sms text to a php file. So which would be better? writing in a file then opening the same file using php or using mysql database? or is there any other way?
1
620,984
03/07/2009 00:27:14
58,668
01/24/2009 21:06:40
835
75
What are the valuable lessons of history in programming and softwaer engineering?
As you've often heard, those who don't know their history are doomed to repeat it. Not wanting to be doomed to repeat history, - What are the valuable lessons of the history of our craft? - How does the working programmer most efficiently go about learning them, and keeping their understanding current? - In particular, how does the young programmer of the newest generation go about learning the lessons of time, not having the benefit of having had experienced them first hand? If there was one lesson of history you wish you'd known when you started programming, what would it be?
self-improvement
history
null
null
null
03/03/2012 01:50:20
not constructive
What are the valuable lessons of history in programming and softwaer engineering? === As you've often heard, those who don't know their history are doomed to repeat it. Not wanting to be doomed to repeat history, - What are the valuable lessons of the history of our craft? - How does the working programmer most efficiently go about learning them, and keeping their understanding current? - In particular, how does the young programmer of the newest generation go about learning the lessons of time, not having the benefit of having had experienced them first hand? If there was one lesson of history you wish you'd known when you started programming, what would it be?
4
2,795,445
05/08/2010 20:06:29
336,357
05/08/2010 20:02:29
1
0
where can i download ajax control tool kit for version 2.0
where can i download ajax control tool kit for version 2.0, I can find it for version 3.5 and 4 but they ar enot working with my visual sudio 2005
ajaxcontroltoolkit
null
null
null
null
null
open
where can i download ajax control tool kit for version 2.0 === where can i download ajax control tool kit for version 2.0, I can find it for version 3.5 and 4 but they ar enot working with my visual sudio 2005
0
390,693
12/24/2008 03:43:53
1,965
08/19/2008 15:51:08
14,045
692
Does anyone beside me, just NOT get ASP.NET MVC?
I've been fiddling with ASP.NET MVC since the CTP, and I like a lot of things they did, but there are things I just don't get. For example, I downloaded beta1, and I'm putting together a little personal site/resume/blog with it. Here is a snippet from the ViewSinglePost view: <% // Display the "Next and Previous" links if (ViewData.Model.PreviousPost != null || ViewData.Model.NextPost != null) { %> <div> <% if (ViewData.Model.PreviousPost != null) { %> <span style="float: left;"> <% Response.Write(Html.ActionLink("<< " + ViewData.Model.PreviousPost.Subject, "view", new { id = ViewData.Model.PreviousPost.Id })); %> </span> <% } if (ViewData.Model.NextPost != null) { %> <span style="float: right;"> <% Response.Write(Html.ActionLink(ViewData.Model.NextPost.Subject + " >>", "view", new { id = ViewData.Model.NextPost.Id })); %> </span> <% } %> <div style="clear: both;" /> </div> <% } %> Disgusting! Am I doing something wrong? Because I spent many dark days in classic ASP, and this tag soup reminds me strongly of it. Everyone preaches how you can do cleaner HTML. Guess, what? 1% of all people look at the outputted HTML. To me, I don't care if Webforms messes up my indentation in the rendered HTML, as long as I have code that is easy to maintain...This is not! So, convert me, a die hard webforms guy, why I should give up my nicely formed ASPX pages for this?
asp.net
mvc
tag-soup
null
null
07/28/2011 17:58:36
not constructive
Does anyone beside me, just NOT get ASP.NET MVC? === I've been fiddling with ASP.NET MVC since the CTP, and I like a lot of things they did, but there are things I just don't get. For example, I downloaded beta1, and I'm putting together a little personal site/resume/blog with it. Here is a snippet from the ViewSinglePost view: <% // Display the "Next and Previous" links if (ViewData.Model.PreviousPost != null || ViewData.Model.NextPost != null) { %> <div> <% if (ViewData.Model.PreviousPost != null) { %> <span style="float: left;"> <% Response.Write(Html.ActionLink("<< " + ViewData.Model.PreviousPost.Subject, "view", new { id = ViewData.Model.PreviousPost.Id })); %> </span> <% } if (ViewData.Model.NextPost != null) { %> <span style="float: right;"> <% Response.Write(Html.ActionLink(ViewData.Model.NextPost.Subject + " >>", "view", new { id = ViewData.Model.NextPost.Id })); %> </span> <% } %> <div style="clear: both;" /> </div> <% } %> Disgusting! Am I doing something wrong? Because I spent many dark days in classic ASP, and this tag soup reminds me strongly of it. Everyone preaches how you can do cleaner HTML. Guess, what? 1% of all people look at the outputted HTML. To me, I don't care if Webforms messes up my indentation in the rendered HTML, as long as I have code that is easy to maintain...This is not! So, convert me, a die hard webforms guy, why I should give up my nicely formed ASPX pages for this?
4
5,933,644
05/09/2011 07:03:47
744,680
05/09/2011 07:03:47
1
0
Splash screen issue..
I am creating a splash screen using the following code ,when i press back key the application moves to the home screen and within a few seconds shows my next mainmenu screen.I am calling finish() in onBackPressed(),I want to close the app on pressing back key in the splash screen.can any one help me on this?? Thanks!! Thread splashThread = new Thread() { @Override public void run() { try { int waited = 0; while (_active && (waited < 2000)) { sleep(100); if(_active) { waited += 100; } } } catch (InterruptedException e) { // do nothing } finally { finish(); startActivity(new Intent("next activity")); stop(); } } }; splashThread.start();
android
splash-screen
null
null
null
null
open
Splash screen issue.. === I am creating a splash screen using the following code ,when i press back key the application moves to the home screen and within a few seconds shows my next mainmenu screen.I am calling finish() in onBackPressed(),I want to close the app on pressing back key in the splash screen.can any one help me on this?? Thanks!! Thread splashThread = new Thread() { @Override public void run() { try { int waited = 0; while (_active && (waited < 2000)) { sleep(100); if(_active) { waited += 100; } } } catch (InterruptedException e) { // do nothing } finally { finish(); startActivity(new Intent("next activity")); stop(); } } }; splashThread.start();
0
8,688,356
12/31/2011 13:27:52
788,824
06/08/2011 08:28:56
499
27
Enlarge a Qt widget so it might cover other widgets
I have a complex layout of widgets in widgets in widgets in a QMainWindow. In one of them I have an image, it sits in the corner. What I would like to achieve is following: if the image is activated (e.g. clicked upon), it should be enlarged, so it might overlap other widgets. The problem is, I still would like it to remain in the layout, but in a way that everything else remains in its original size and position. I was thinking about having an empty but similar size widget as a "placeholder", and have the actual resizable widget float on top of it. My problem is, that it does not guarantee that it stays in its position if the main window is resized, maximized, etc. Is there a better or more efficient way to do it?
c++
qt
gui
null
null
null
open
Enlarge a Qt widget so it might cover other widgets === I have a complex layout of widgets in widgets in widgets in a QMainWindow. In one of them I have an image, it sits in the corner. What I would like to achieve is following: if the image is activated (e.g. clicked upon), it should be enlarged, so it might overlap other widgets. The problem is, I still would like it to remain in the layout, but in a way that everything else remains in its original size and position. I was thinking about having an empty but similar size widget as a "placeholder", and have the actual resizable widget float on top of it. My problem is, that it does not guarantee that it stays in its position if the main window is resized, maximized, etc. Is there a better or more efficient way to do it?
0
5,963,286
05/11/2011 11:13:25
673,487
03/23/2011 16:39:38
12
0
perl programming: continue block
I have just started learning PERL scripting language and have a programmatical question. In PERL, What is the logical reason for having 'continue' block work with while and do while loops, but not with 'for' loop?
perl
for-loop
while-loops
continue
null
null
open
perl programming: continue block === I have just started learning PERL scripting language and have a programmatical question. In PERL, What is the logical reason for having 'continue' block work with while and do while loops, but not with 'for' loop?
0
9,015,735
01/26/2012 08:56:52
991,403
10/12/2011 12:13:50
1
0
upgrading galaxy gio to android 2.3.4 and usb open accessory
i recently read about android open accessory , http://developer.android.com/guide/topics/usb/adk.html Which says, The Android 3.1 platform (also backported to Android 2.3.4) introduces Android Open Accessory support, which allows external USB hardware (an Android USB accessory) to interact with an Android-powered device in a special "accessory" mode. hence, if i were to purchase samsung galaxy gio and update it to 2.3.4 . will i be able to use this function? just to confirm... or, are there any problems that i have to look in to as well to be able to use usb open accessory.. thanks
android
usb
null
null
null
01/26/2012 21:30:06
too localized
upgrading galaxy gio to android 2.3.4 and usb open accessory === i recently read about android open accessory , http://developer.android.com/guide/topics/usb/adk.html Which says, The Android 3.1 platform (also backported to Android 2.3.4) introduces Android Open Accessory support, which allows external USB hardware (an Android USB accessory) to interact with an Android-powered device in a special "accessory" mode. hence, if i were to purchase samsung galaxy gio and update it to 2.3.4 . will i be able to use this function? just to confirm... or, are there any problems that i have to look in to as well to be able to use usb open accessory.. thanks
3
8,374,458
12/04/2011 09:39:42
56,861
01/19/2009 22:04:11
1,125
34
C# Repository and Unit of Work Patterns
Can someone point me to a good, real world example of using these patterns together in c#? That is to say, not just a CRUD example, but something where for instance, you would do things like say, create a series of child records at the same time that you then update the parent record in one unit?
c#
design-patterns
repository
null
null
12/06/2011 03:01:49
not constructive
C# Repository and Unit of Work Patterns === Can someone point me to a good, real world example of using these patterns together in c#? That is to say, not just a CRUD example, but something where for instance, you would do things like say, create a series of child records at the same time that you then update the parent record in one unit?
4
6,008,732
05/15/2011 13:41:32
293,709
03/15/2010 04:51:11
264
13
How to disable task-manager while running exe from a window service
i have a window application in C, In the application i have edited registry to disable/enable task manager,change password etc. which works well in running the project and i have made an exe of the application and call the exe from window service when the exe executes from the service , the registry changes are not made ie if i press ctrl+alt+del - task manager and change password is in enable state but if i execute the exe file manually it is all in disable state. I don't want user to kill this running process from task-manger. please help how can we disable task-manager.
c#
winforms
windowservice
null
null
05/16/2011 08:48:33
not a real question
How to disable task-manager while running exe from a window service === i have a window application in C, In the application i have edited registry to disable/enable task manager,change password etc. which works well in running the project and i have made an exe of the application and call the exe from window service when the exe executes from the service , the registry changes are not made ie if i press ctrl+alt+del - task manager and change password is in enable state but if i execute the exe file manually it is all in disable state. I don't want user to kill this running process from task-manger. please help how can we disable task-manager.
1
2,339,600
02/26/2010 05:04:56
131,075
06/30/2009 13:28:16
205
15
the code fragments below doesn't work, please figure out why
<script type="text/javascript"> for (count = 0; count < 10; count--) { alert('Dont touch this'); count = 5; }
javascript
null
null
null
null
06/07/2012 13:20:29
not a real question
the code fragments below doesn't work, please figure out why === <script type="text/javascript"> for (count = 0; count < 10; count--) { alert('Dont touch this'); count = 5; }
1
3,564,467
08/25/2010 09:30:27
428,433
08/23/2010 13:01:15
10
0
SOAP wev service on android
I am am trying to connect to a SOAP web service using ksoap2 library. I have read a bunch of docs about it, but i am stuck as my request is not an ordinary one. I need to specify some headers prior to sending the request. when is use a soap client to test the webservice i also need to put this in the soap enveope header section: <SOAP-ENV:Header> <mns:AuthIn xmlns:mns="http://enablon/wsdl/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <UserInfo xsi:type="wsdlns:AuthHeader"> <EnaHomeSite xsi:type="xsd:string">sss</EnaHomeSite> <EnaUserName xsi:type="xsd:string">sadsa</EnaUserName> <EnaPassword xsi:type="xsd:string">qwertf</EnaPassword> </UserInfo> </mns:AuthIn> </SOAP-ENV:Header> The rest of my code is similar to [this][1] approach The emulator takes a bit of time to precess so i assume it contacts the server, but the call to ...call crases with: org.xmlpull.v1.XmlPullParserException: expected: END_TAG {http://schemas.xmlsoap.org/soap/envelope/}Body (position:END_TAG </{http://schemas.xmlsoap.org/soap/envelope/}SOAP-ENV:Fault>@1:505 in java.io.InputStreamReader@43ef45e8) My question is how do i attach the header mentioned above to my request? I didn't manage to fine nice doc for ksoap. maybe some tutorials or examples. can anyone point me to some docs. I have found the javadoc, but it is rather thin. I have also tried to format my own raw HTTP request. (managed to do so on iPhone and it works just fine). However i can't seem to be able to add the body of the request in. I mean the big soap xml containing all headers namespaces and required data for the call. Any pointer on this direction would be also much appreciated. Thanks a lot, guys. Cheers, Alex [1]: http://android.amberfog.com/?p=45
android
web-services
authentication
soap
ksoap2
null
open
SOAP wev service on android === I am am trying to connect to a SOAP web service using ksoap2 library. I have read a bunch of docs about it, but i am stuck as my request is not an ordinary one. I need to specify some headers prior to sending the request. when is use a soap client to test the webservice i also need to put this in the soap enveope header section: <SOAP-ENV:Header> <mns:AuthIn xmlns:mns="http://enablon/wsdl/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <UserInfo xsi:type="wsdlns:AuthHeader"> <EnaHomeSite xsi:type="xsd:string">sss</EnaHomeSite> <EnaUserName xsi:type="xsd:string">sadsa</EnaUserName> <EnaPassword xsi:type="xsd:string">qwertf</EnaPassword> </UserInfo> </mns:AuthIn> </SOAP-ENV:Header> The rest of my code is similar to [this][1] approach The emulator takes a bit of time to precess so i assume it contacts the server, but the call to ...call crases with: org.xmlpull.v1.XmlPullParserException: expected: END_TAG {http://schemas.xmlsoap.org/soap/envelope/}Body (position:END_TAG </{http://schemas.xmlsoap.org/soap/envelope/}SOAP-ENV:Fault>@1:505 in java.io.InputStreamReader@43ef45e8) My question is how do i attach the header mentioned above to my request? I didn't manage to fine nice doc for ksoap. maybe some tutorials or examples. can anyone point me to some docs. I have found the javadoc, but it is rather thin. I have also tried to format my own raw HTTP request. (managed to do so on iPhone and it works just fine). However i can't seem to be able to add the body of the request in. I mean the big soap xml containing all headers namespaces and required data for the call. Any pointer on this direction would be also much appreciated. Thanks a lot, guys. Cheers, Alex [1]: http://android.amberfog.com/?p=45
0
10,664,797
05/19/2012 11:28:47
1,377,207
05/05/2012 18:27:43
123
3
Invoke the method to restart an open application
Is it possible to restart the same application which is running from within itself. Like say,I have a form which opens on button click.Now once this form is opened,i want to refresh its display and so I recall the init method again from within this form. Is this really possible?Please guide
java
null
null
null
null
05/19/2012 16:22:43
not a real question
Invoke the method to restart an open application === Is it possible to restart the same application which is running from within itself. Like say,I have a form which opens on button click.Now once this form is opened,i want to refresh its display and so I recall the init method again from within this form. Is this really possible?Please guide
1
5,794,975
04/26/2011 18:45:40
533,530
12/07/2010 10:36:52
116
1
How to know whether my each java programs is running on its own different JVM instance ?
I am running many different java programs simultaneously on single System, I need to check whether these programs are running on same or different JVM instance of perticular System ? All suggestions are appreciated. Thanks.
java
multithreading
jvm
null
null
null
open
How to know whether my each java programs is running on its own different JVM instance ? === I am running many different java programs simultaneously on single System, I need to check whether these programs are running on same or different JVM instance of perticular System ? All suggestions are appreciated. Thanks.
0
11,038,260
06/14/2012 17:24:05
503,565
11/10/2010 17:39:56
8
0
In Umbraco, is there a way to add dictionary fields into a rich text editor?
I am working on a site that will be using multiple keywords throughout the site. They don't want to have to go through every single page and add in the new info over the old info over and over. I was hoping that the dictionary library in umbraco would be able to help since it is being used in the XSLTSearch but it looks like i would only be able to make a macro that would search for the dictionary item and insert it that way. is there a way to just insert a field in the rich text editor from the dictionary without just making a macro?
dictionary
tinymce
umbraco
null
null
null
open
In Umbraco, is there a way to add dictionary fields into a rich text editor? === I am working on a site that will be using multiple keywords throughout the site. They don't want to have to go through every single page and add in the new info over the old info over and over. I was hoping that the dictionary library in umbraco would be able to help since it is being used in the XSLTSearch but it looks like i would only be able to make a macro that would search for the dictionary item and insert it that way. is there a way to just insert a field in the rich text editor from the dictionary without just making a macro?
0
6,885,534
07/30/2011 19:31:09
614,208
02/12/2011 12:56:02
233
13
Which one is good InnoDB or MYISAM?
I am using mySQL server and I came to know that mySQL uses both InnoDB and MYISAM engine.So I want to know for any big project which engine should I choose InnoDB or MYISAM.
mysql
innodb
myisam
null
null
08/02/2011 14:27:47
not constructive
Which one is good InnoDB or MYISAM? === I am using mySQL server and I came to know that mySQL uses both InnoDB and MYISAM engine.So I want to know for any big project which engine should I choose InnoDB or MYISAM.
4
6,881,090
07/30/2011 04:31:11
870,310
07/30/2011 04:04:46
1
0
Powershell script not running properly from SCCM
I'm trying to deploy Lego MindStorms through SCCM. I have a PowerShell script that I'm using to start the EXE and do some other things after the install. The PS1 file sits in the same directory as the EXE. The PowerShell script tries to run after the package gets downloaded, but the program doesn't get installed. I can go into the cache folder where the package was downloaded, right click the script and tell it to run, and the install kicks off fine. This is what I put in the command line for the program in SCCM:<br />` powershell.exe -executionpolicy bypass -file .\Install_MindStorms.ps1` I have also tried the same command as above without the .\ before the file name. What is happening differently here where I can manually run the PS1 file from the downloaded package, but the same file isn't working correctly when it is run automatically through the advertised program after it has been downloaded from the distribution point?
powershell
script
ps1
sccm
null
03/08/2012 00:01:39
too localized
Powershell script not running properly from SCCM === I'm trying to deploy Lego MindStorms through SCCM. I have a PowerShell script that I'm using to start the EXE and do some other things after the install. The PS1 file sits in the same directory as the EXE. The PowerShell script tries to run after the package gets downloaded, but the program doesn't get installed. I can go into the cache folder where the package was downloaded, right click the script and tell it to run, and the install kicks off fine. This is what I put in the command line for the program in SCCM:<br />` powershell.exe -executionpolicy bypass -file .\Install_MindStorms.ps1` I have also tried the same command as above without the .\ before the file name. What is happening differently here where I can manually run the PS1 file from the downloaded package, but the same file isn't working correctly when it is run automatically through the advertised program after it has been downloaded from the distribution point?
3
9,374,243
02/21/2012 08:22:43
1,222,854
02/21/2012 08:07:25
1
0
Can't compile Qt project in Mac Os Lion
* Qt 4.8 * Mac OS Lion * Compiler gcc Compiler doesn't see any Qt classes, QT_BEGIN_HEADER and etc. Compile param generated by qmake: g++ -c -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -fPIC -DCORE_LIBRARY -DQT_GUI_LIB -DQT_CORE_LIB compiling with clang gives same errors but dummy project compiling with no errors
osx
qt
gcc
osx-lion
qt4.8
03/17/2012 21:38:11
too localized
Can't compile Qt project in Mac Os Lion === * Qt 4.8 * Mac OS Lion * Compiler gcc Compiler doesn't see any Qt classes, QT_BEGIN_HEADER and etc. Compile param generated by qmake: g++ -c -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -fPIC -DCORE_LIBRARY -DQT_GUI_LIB -DQT_CORE_LIB compiling with clang gives same errors but dummy project compiling with no errors
3
9,968,020
04/01/2012 20:26:18
1,197,044
02/08/2012 11:26:31
42
0
Integrating MySQL or SQL in an ios app
I am building a ios app for ipad, in which the user will be able to create a personal page, by adding in a view controller lavels, images, and text fields... I then wanted to offer the share option, so that the content is saved online and shared amongs all app users. This is where i am getting a bit confused. At first i thought of using icloud, but this was not possible. So i looked on the internet, and found out of this mySQL, but after all the research i still can not understand how it works. So I have at first to create a mysql or sql (don't know the difference), on a mac or pc, and then integrate using a firmware my server in the app. Am i right? Is this how you do it? Can someone explain me? Also, has this anything to do with XML? Thanks in advance
mysql
ios
xcode
null
null
04/02/2012 05:10:56
not a real question
Integrating MySQL or SQL in an ios app === I am building a ios app for ipad, in which the user will be able to create a personal page, by adding in a view controller lavels, images, and text fields... I then wanted to offer the share option, so that the content is saved online and shared amongs all app users. This is where i am getting a bit confused. At first i thought of using icloud, but this was not possible. So i looked on the internet, and found out of this mySQL, but after all the research i still can not understand how it works. So I have at first to create a mysql or sql (don't know the difference), on a mac or pc, and then integrate using a firmware my server in the app. Am i right? Is this how you do it? Can someone explain me? Also, has this anything to do with XML? Thanks in advance
1
6,977,693
08/08/2011 04:16:58
284,758
03/02/2010 20:52:18
3,310
202
Convert an XML file into an embedded Resource
I have an XML file in a MSTEST project. It is an entity-framework Storage Specification Definition Language (SSDL) file. I'd like to know what is the easiest way to have the mstest project automatically convert the SSDL file into an embedded resource, so that the "usual" entity framework connection string can reference it. Ordinarily SSDL is automatically embedded as a resource. However, this SSDL file is generated from a custom XSLT transform, which is why I need to have my own way to transform it into an embedded resource.
visual-studio
entity-framework
msbuild
mstest
null
null
open
Convert an XML file into an embedded Resource === I have an XML file in a MSTEST project. It is an entity-framework Storage Specification Definition Language (SSDL) file. I'd like to know what is the easiest way to have the mstest project automatically convert the SSDL file into an embedded resource, so that the "usual" entity framework connection string can reference it. Ordinarily SSDL is automatically embedded as a resource. However, this SSDL file is generated from a custom XSLT transform, which is why I need to have my own way to transform it into an embedded resource.
0
7,797,495
10/17/2011 17:45:16
938,266
09/10/2011 14:35:41
28
0
Performance issue in sql query
Hy, I have 2 table in following structure Table_1 ID Name 1 a 2 b 3 a Table_2 SID ID sname 1 1 a 2 1 b 3 2 a Now I want something different...... Output ID Sname 1 a 1 b 2 a 2 b 3 a 3 b i.e for each record in table_1 there should be 2 possible value in table_2.... if record contain in only table_1 then 2 row should display in out put as display in result for id =3 if there is only one row of table_1 in table_2 then display row with second row as display in result for id = 2 i have written one query for this but it take time..... here is my query... DECLARE @tab table ( id int, Sname varchar(10) ) INSERT INTO @tab SELECT TB1.[Sid],TB2.sname FROM [Practise].[dbo].[Table_1] TB1 INNER JOIN [Table_2] TB2 ON TB1.[Sid] = TB2.[Sid] INSERT INTO @tab SELECT TB1.[Sid],'a' FROM [Practise].[dbo].[Table_1] TB1 LEFT OUTER JOIN @tab TB2 ON TB1.[Sid] = TB2.id WHERE TB2.id IS NULL INSERT INTO @tab SELECT TB1.[Sid],'b' FROM [Practise].[dbo].[Table_1] TB1 LEFT OUTER JOIN Table_2 TB2 ON TB1.[Sid] = TB2.Sid WHERE TB2.Sid IS NULL INSERT INTO @tab SELECT id,min(case when Sname ='a' THEN 'b' when Sname='b' Then 'a' END) from @tab group by id having COUNT(id) = 1 SELECT * FROM @tab ORDER BY id
sql-server-2008
null
null
null
null
10/28/2011 02:16:05
not a real question
Performance issue in sql query === Hy, I have 2 table in following structure Table_1 ID Name 1 a 2 b 3 a Table_2 SID ID sname 1 1 a 2 1 b 3 2 a Now I want something different...... Output ID Sname 1 a 1 b 2 a 2 b 3 a 3 b i.e for each record in table_1 there should be 2 possible value in table_2.... if record contain in only table_1 then 2 row should display in out put as display in result for id =3 if there is only one row of table_1 in table_2 then display row with second row as display in result for id = 2 i have written one query for this but it take time..... here is my query... DECLARE @tab table ( id int, Sname varchar(10) ) INSERT INTO @tab SELECT TB1.[Sid],TB2.sname FROM [Practise].[dbo].[Table_1] TB1 INNER JOIN [Table_2] TB2 ON TB1.[Sid] = TB2.[Sid] INSERT INTO @tab SELECT TB1.[Sid],'a' FROM [Practise].[dbo].[Table_1] TB1 LEFT OUTER JOIN @tab TB2 ON TB1.[Sid] = TB2.id WHERE TB2.id IS NULL INSERT INTO @tab SELECT TB1.[Sid],'b' FROM [Practise].[dbo].[Table_1] TB1 LEFT OUTER JOIN Table_2 TB2 ON TB1.[Sid] = TB2.Sid WHERE TB2.Sid IS NULL INSERT INTO @tab SELECT id,min(case when Sname ='a' THEN 'b' when Sname='b' Then 'a' END) from @tab group by id having COUNT(id) = 1 SELECT * FROM @tab ORDER BY id
1
1,854,383
12/06/2009 04:38:42
115,182
05/31/2009 19:08:40
157
3
Select average from MySQL table with LIMIT
I am trying to get the average of the lowest 5 priced items, grouped by the username attached to them. However, the below query gives the average price for each user (which of course is the price), but I just want one answer returned. SELECT AVG(price) FROM table WHERE price > '0' && item_id = '$id' GROUP BY username ORDER BY price ASC LIMIT 5
mysql
sql
mysql-query
average
null
null
open
Select average from MySQL table with LIMIT === I am trying to get the average of the lowest 5 priced items, grouped by the username attached to them. However, the below query gives the average price for each user (which of course is the price), but I just want one answer returned. SELECT AVG(price) FROM table WHERE price > '0' && item_id = '$id' GROUP BY username ORDER BY price ASC LIMIT 5
0
7,256,464
08/31/2011 11:45:32
834,351
07/07/2011 20:52:43
1
0
How to download extra content from a url on app first install (android)
Have been looking up and down for this, but no luck so far. Have an app that will need to download some external content (videos) and put it on the SD card. Then videos will be played from there. Need to know the code for it... Have the GUI of the app almost done... used Dreamweaver a phonegap. so when users download my app from the store, it will install them download the extra content from somewhere on the web. ether on first install , or on first use , or on first play. what ever is best practice. Please any help will be most welcome. Thank you very much in advance dre
download
content
external
extra
null
10/29/2011 13:08:56
not a real question
How to download extra content from a url on app first install (android) === Have been looking up and down for this, but no luck so far. Have an app that will need to download some external content (videos) and put it on the SD card. Then videos will be played from there. Need to know the code for it... Have the GUI of the app almost done... used Dreamweaver a phonegap. so when users download my app from the store, it will install them download the extra content from somewhere on the web. ether on first install , or on first use , or on first play. what ever is best practice. Please any help will be most welcome. Thank you very much in advance dre
1
8,947,359
01/20/2012 20:17:50
1,090,463
12/09/2011 20:23:45
18
0
htaccess Issue : Header throughing 404 although page is correctly displayed
I am facing quite a strange problem at the moment, i have wordpress and oscommerce installations on single domain. i placed wordpress at the root and oscommerce in /store/ folder. Everything is working properly except onething. the serve rheaders of oscommerce are throwing 404 error although page is displayed correctly. The results in a situation that googlebot will not index these pages at all. can anybody help me resolving the issue? what should i do now? Let me tell you, i am quite a new in the field...
php
apache
.htaccess
googlebot
null
null
open
htaccess Issue : Header throughing 404 although page is correctly displayed === I am facing quite a strange problem at the moment, i have wordpress and oscommerce installations on single domain. i placed wordpress at the root and oscommerce in /store/ folder. Everything is working properly except onething. the serve rheaders of oscommerce are throwing 404 error although page is displayed correctly. The results in a situation that googlebot will not index these pages at all. can anybody help me resolving the issue? what should i do now? Let me tell you, i am quite a new in the field...
0
9,902,350
03/28/2012 06:40:36
376,445
06/25/2010 16:04:34
368
10
Python - What's the use of if True:?
I just came accross the following code in an existent project, which I'm working on: if True: x = 5 y = 6 return x+y else: return 'Something Inside the if True are lots of conditions and some will also return the function already. Why would somebody write in that way? The code contained some other bugs also, but was just wondering about the if True: statement as it didn't make any sense to me. Probably also pretty stupid to ask it, but was wondering hehe.
python
null
null
null
null
null
open
Python - What's the use of if True:? === I just came accross the following code in an existent project, which I'm working on: if True: x = 5 y = 6 return x+y else: return 'Something Inside the if True are lots of conditions and some will also return the function already. Why would somebody write in that way? The code contained some other bugs also, but was just wondering about the if True: statement as it didn't make any sense to me. Probably also pretty stupid to ask it, but was wondering hehe.
0
4,563,286
12/30/2010 14:16:15
312,751
04/09/2010 12:20:37
64
1
selenium java issue
I was unable to figure out an issue. The method testTest1() was not executing. it should open yahoo.com . **Here is my code :** package example1; import org.testng.annotations.*; import com.thoughtworks.selenium.*; import java.util.regex.Pattern; public class SimpleTest extends SeleneseTestCase { private DefaultSelenium selenium; @BeforeSuite(alwaysRun = true) public void setUp() throws Exception { echo("in setup."); selenium = new DefaultSelenium("localhost", 4444, "*opera", "http://localhost:8080/"); echo("selenium instance created:"+selenium.getClass()); selenium.start(); echo("selenium instance started. Opening website..."); } @Test(sequential=true) public void testTest1() throws Exception { echo("testTest1:testing assertion."); selenium.open("http://www.yahoo.com"); } // Cleanup the selenium environment @AfterSuite(alwaysRun = true) private void stopTest() { selenium.stop(); echo("selenium stopped."); } private void echo(String msg){ System.out.println(msg); if(new Boolean(System.getProperties().getProperty("DEBUG"))) System.out.println(msg); } } The script was not opening yahoo.com and it says finally Total tests run: 0, Failures: 0, Skips: 0 Can any one tell me what to be needed thanks in advance
java
selenium
null
null
null
null
open
selenium java issue === I was unable to figure out an issue. The method testTest1() was not executing. it should open yahoo.com . **Here is my code :** package example1; import org.testng.annotations.*; import com.thoughtworks.selenium.*; import java.util.regex.Pattern; public class SimpleTest extends SeleneseTestCase { private DefaultSelenium selenium; @BeforeSuite(alwaysRun = true) public void setUp() throws Exception { echo("in setup."); selenium = new DefaultSelenium("localhost", 4444, "*opera", "http://localhost:8080/"); echo("selenium instance created:"+selenium.getClass()); selenium.start(); echo("selenium instance started. Opening website..."); } @Test(sequential=true) public void testTest1() throws Exception { echo("testTest1:testing assertion."); selenium.open("http://www.yahoo.com"); } // Cleanup the selenium environment @AfterSuite(alwaysRun = true) private void stopTest() { selenium.stop(); echo("selenium stopped."); } private void echo(String msg){ System.out.println(msg); if(new Boolean(System.getProperties().getProperty("DEBUG"))) System.out.println(msg); } } The script was not opening yahoo.com and it says finally Total tests run: 0, Failures: 0, Skips: 0 Can any one tell me what to be needed thanks in advance
0
8,904,839
01/18/2012 03:33:36
1,144,953
01/12/2012 07:45:12
8
0
Poppler configure issue
I want to incorporate libpopper into my application to be able to parse pdf file to plain text. And after I got the source code of poppler,I execute ./Configure,but there is a error about ***fontconfig*** saying below: ***configure: error: Package requirements (fontconfig >= 2.0.0) were not met: No package 'fontconfig' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables FONTCONFIG_CFLAGS and FONTCONFIG_LIBS to avoid the need to call pkg-config.*** I just want to convert pdf file to plain text using libpoppler.How Can I solve this issue? Thanks a lot!!
linux
poppler
fontconfig
null
null
01/19/2012 06:40:44
too localized
Poppler configure issue === I want to incorporate libpopper into my application to be able to parse pdf file to plain text. And after I got the source code of poppler,I execute ./Configure,but there is a error about ***fontconfig*** saying below: ***configure: error: Package requirements (fontconfig >= 2.0.0) were not met: No package 'fontconfig' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables FONTCONFIG_CFLAGS and FONTCONFIG_LIBS to avoid the need to call pkg-config.*** I just want to convert pdf file to plain text using libpoppler.How Can I solve this issue? Thanks a lot!!
3
7,055,959
08/14/2011 09:07:26
230,243
10/27/2009 18:29:34
40
1
iPhone sdk how to allow users to re-order tabbar items in IB built tabbar
I've been investigating this feature but it seems that most solutions require yo to have built your tababr programatically. My tab bar is built in IB and I don't particularly want to recode most of my app (unless I absolutely have to.) For IB built tabbars I've not yet found a tutorial or guidance. Does anyone have a good link or a some information to help me?. Thanks in advance.
iphone
sdk
nsuserdefaults
tabbar
null
null
open
iPhone sdk how to allow users to re-order tabbar items in IB built tabbar === I've been investigating this feature but it seems that most solutions require yo to have built your tababr programatically. My tab bar is built in IB and I don't particularly want to recode most of my app (unless I absolutely have to.) For IB built tabbars I've not yet found a tutorial or guidance. Does anyone have a good link or a some information to help me?. Thanks in advance.
0
9,796,835
03/21/2012 00:05:34
1,270,590
03/15/2012 02:59:04
6
0
need a help on my study guide
In big-Oh notation when we consider the order of the number of visits an algorithm makes, what do we ignore? I power of two terms II the coefficients of the terms III all lower order terms what I found in my book is that we ignore the coefficients of the terms. I check the answer that says only II but i got wrong. any suggestion?
java
homework
search
sorting
null
04/03/2012 23:35:48
not constructive
need a help on my study guide === In big-Oh notation when we consider the order of the number of visits an algorithm makes, what do we ignore? I power of two terms II the coefficients of the terms III all lower order terms what I found in my book is that we ignore the coefficients of the terms. I check the answer that says only II but i got wrong. any suggestion?
4
5,748,218
04/21/2011 18:25:09
719,480
04/21/2011 18:25:09
1
0
Proper syntax for a templated constructor using template template parameters
I'm trying to extend my (limited) understanding of class templates to class templates with template template parameters. This declaration and constructor works fine (well, it compiles): template < char PROTO > class Test { public: Test( void ); ~Test( void ); void doIt( unsigned char* lhs, unsigned char* rhs ); }; template< char PROTO > Test<PROTO>::Test( void ) { } But, when I try to do something similar using templated template parameters, I get these errors (line that sourced the errors is below): error: missing ‘>’ to terminate the template argument list error: template argument 1 is invalid error: missing ‘>’ to terminate the template argument list error: template argument 1 is invalid error: expected initializer before ‘>’ token template <char v> struct Char2Type { enum { value = v }; }; template < template<char v> class Char2Type > class Test2 { public: Test2( void ); ~Test2( void ); void doIt( unsigned char* lhs, unsigned char* rhs ); }; template< template<char v> class Char2Type > Test2< Char2Type<char v> >::Test2( void ) //ERROR ON THIS LINE { } I'm using gnu g++. What's wrong with the line above??
c++
templates
null
null
null
null
open
Proper syntax for a templated constructor using template template parameters === I'm trying to extend my (limited) understanding of class templates to class templates with template template parameters. This declaration and constructor works fine (well, it compiles): template < char PROTO > class Test { public: Test( void ); ~Test( void ); void doIt( unsigned char* lhs, unsigned char* rhs ); }; template< char PROTO > Test<PROTO>::Test( void ) { } But, when I try to do something similar using templated template parameters, I get these errors (line that sourced the errors is below): error: missing ‘>’ to terminate the template argument list error: template argument 1 is invalid error: missing ‘>’ to terminate the template argument list error: template argument 1 is invalid error: expected initializer before ‘>’ token template <char v> struct Char2Type { enum { value = v }; }; template < template<char v> class Char2Type > class Test2 { public: Test2( void ); ~Test2( void ); void doIt( unsigned char* lhs, unsigned char* rhs ); }; template< template<char v> class Char2Type > Test2< Char2Type<char v> >::Test2( void ) //ERROR ON THIS LINE { } I'm using gnu g++. What's wrong with the line above??
0
2,377,920
03/04/2010 08:53:52
229,849
12/11/2009 18:12:23
219
1
auto seeking in mediaplayer in vb.net
if i have a video of 70 Seconds and i want to play it directly from 31 seconds to onwards how can i do that in vb.net
vb.net
null
null
null
null
null
open
auto seeking in mediaplayer in vb.net === if i have a video of 70 Seconds and i want to play it directly from 31 seconds to onwards how can i do that in vb.net
0
10,263,234
04/21/2012 21:39:08
1,130,909
01/04/2012 22:03:19
79
8
Python: What does this mean? "a := 1"
Really basic syntax question in Python. What does something like this translate to? a := 1
python
syntax
null
null
null
04/22/2012 12:21:39
not a real question
Python: What does this mean? "a := 1" === Really basic syntax question in Python. What does something like this translate to? a := 1
1
4,229,095
11/19/2010 20:27:07
330,776
05/02/2010 11:27:40
55
0
Filling an array in a linkedList ?
.................
java
null
null
null
null
11/19/2010 20:29:15
not a real question
Filling an array in a linkedList ? === .................
1
5,108,449
02/24/2011 17:47:12
618,616
02/15/2011 21:28:25
11
0
UpdatePanel misplaced buttons
I am using an update panel inside a <td> tag of a table using the code below. However, because of the update panel, the Log Story button appears on top of the remaining two buttons: reset and cancel. This is probably an easy fix, so how can I align all buttons in one row? Thanks! <td colspan="2" align="right"> <asp:UpdatePanel ID="UpdatePanel3" runat="server"> <ContentTemplate> <asp:Button CssClass="button_style" id="btnSubmit" class="btn" Text="Log Story" runat="server" onClientClick="javascript:return validate();" Width="80px" /> </ContentTemplate> </asp:UpdatePanel> <div style="display: none;"> <asp:Button CssClass="button_style" id="Submit" class="btn" runat="server" OnClick="btnSubmit_Click" /> </div> &nbsp; <asp:Button CssClass="button_style" id="btnReset" class="btn" Text="Reset" onClick="clear" runat="server" Width="70px" /> &nbsp; <asp:Button CssClass="button_style" id="btnCancel" class="btn" Text="Cancel" onClick="cancel" runat="server" Width="70px" /> </td>
c#
asp.net
null
null
null
null
open
UpdatePanel misplaced buttons === I am using an update panel inside a <td> tag of a table using the code below. However, because of the update panel, the Log Story button appears on top of the remaining two buttons: reset and cancel. This is probably an easy fix, so how can I align all buttons in one row? Thanks! <td colspan="2" align="right"> <asp:UpdatePanel ID="UpdatePanel3" runat="server"> <ContentTemplate> <asp:Button CssClass="button_style" id="btnSubmit" class="btn" Text="Log Story" runat="server" onClientClick="javascript:return validate();" Width="80px" /> </ContentTemplate> </asp:UpdatePanel> <div style="display: none;"> <asp:Button CssClass="button_style" id="Submit" class="btn" runat="server" OnClick="btnSubmit_Click" /> </div> &nbsp; <asp:Button CssClass="button_style" id="btnReset" class="btn" Text="Reset" onClick="clear" runat="server" Width="70px" /> &nbsp; <asp:Button CssClass="button_style" id="btnCancel" class="btn" Text="Cancel" onClick="cancel" runat="server" Width="70px" /> </td>
0
1,850,133
12/04/2009 22:41:01
48,523
12/23/2008 00:36:38
1,042
30
How to check for a constant in an array using PHP?
I'm not really sure how to do this. I have an object and I want to set a 'type' property on it, but before doing that I want to check to make sure it's a valid type. I was thinking this is a good time to use constants since the type names won't change (nor do I want them to be). // this is just a sample of what I was thinking: class Foobar { const TYPE_1 = 'type 1'; protected $_types = array( self::TYPE_1 ); public function setType($value) { // check to make sure value is a valid type // I'm thinking it should be able to accept // Foobar::TYPE_1, 'TYPE_1', or 'type 1' // for flexibility sake. But I don't know } }
php
null
null
null
null
null
open
How to check for a constant in an array using PHP? === I'm not really sure how to do this. I have an object and I want to set a 'type' property on it, but before doing that I want to check to make sure it's a valid type. I was thinking this is a good time to use constants since the type names won't change (nor do I want them to be). // this is just a sample of what I was thinking: class Foobar { const TYPE_1 = 'type 1'; protected $_types = array( self::TYPE_1 ); public function setType($value) { // check to make sure value is a valid type // I'm thinking it should be able to accept // Foobar::TYPE_1, 'TYPE_1', or 'type 1' // for flexibility sake. But I don't know } }
0
9,310,921
02/16/2012 12:00:18
1,051,355
04/26/2010 11:56:09
480
7
Python syntax overview?
I am searching a cheat sheet that gives me an overview of syntax capabilities of python 2.x I am not searching a Quick Reference on common data structures and functions. I think of a pice of valid example code but also gives hints to alternatives, e.g. there are multiple ways to employ a for loop over a range. It should be dense code with not too much explanation.
python
syntax
overview
null
null
07/18/2012 12:02:22
not constructive
Python syntax overview? === I am searching a cheat sheet that gives me an overview of syntax capabilities of python 2.x I am not searching a Quick Reference on common data structures and functions. I think of a pice of valid example code but also gives hints to alternatives, e.g. there are multiple ways to employ a for loop over a range. It should be dense code with not too much explanation.
4
9,579,482
03/06/2012 07:20:17
1,251,542
03/06/2012 07:12:25
1
0
asp.net content page
I am using asp.net3.5 master-content page.<br><br> 1. dropdownlist control load having problem while loading some default javascript events like <bR> onblur()<br>onkeydown() . <br><br> can any one help me how to avoid this?
c#
asp.net
ajax
master-pages
content
03/06/2012 22:40:45
not a real question
asp.net content page === I am using asp.net3.5 master-content page.<br><br> 1. dropdownlist control load having problem while loading some default javascript events like <bR> onblur()<br>onkeydown() . <br><br> can any one help me how to avoid this?
1
2,805,841
05/10/2010 19:34:25
46,250
12/15/2008 03:56:54
177
5
Implementing PyMyType_Check methods with Python C API?
All the Python-provided types have a check method (i.e., `PyList_Check`) that allows you to check if an arbitrary `PyObject*` is actually a specific type. How can I implement this for my own types? I haven't found anything good online for this, though it seems like a pretty normal thing to want to do. Also, maybe I'm just terrible at looking through large source trees, but I cannot for the life of me find the implementation of `PyList_Check` or any of it's companions in the Python (2.5) source.
python
c
c++
null
null
null
open
Implementing PyMyType_Check methods with Python C API? === All the Python-provided types have a check method (i.e., `PyList_Check`) that allows you to check if an arbitrary `PyObject*` is actually a specific type. How can I implement this for my own types? I haven't found anything good online for this, though it seems like a pretty normal thing to want to do. Also, maybe I'm just terrible at looking through large source trees, but I cannot for the life of me find the implementation of `PyList_Check` or any of it's companions in the Python (2.5) source.
0
11,629,577
07/24/2012 11:08:41
1,548,469
07/24/2012 11:04:31
1
0
linux TCP/IP stack modifying
It's an Interview question: For some reason I want to have receiver send out MORE ACKs. o How do I do (assuming I can freely modify Linux TCP/IP stack)? Where to change? o What’s the impact? How do you model that? o For example, what if for every data packet received I immediately send out 2 or 3 ACKs?
linux
tcp
stack
null
null
07/24/2012 23:03:44
not a real question
linux TCP/IP stack modifying === It's an Interview question: For some reason I want to have receiver send out MORE ACKs. o How do I do (assuming I can freely modify Linux TCP/IP stack)? Where to change? o What’s the impact? How do you model that? o For example, what if for every data packet received I immediately send out 2 or 3 ACKs?
1
10,334,086
04/26/2012 13:09:00
1,113,027
12/23/2011 07:57:28
1
0
Can I write entire aaplication using NOSQL ONLY?
I am planning an application that intends to store a LOT of user data. and i am quite concerned about the speed of data retrial. I have heard a little about NOSQL and know that it provides better performance than relational databases. So I am planning to use NOSQL (Preferably MongoDB) as my primary database system. I want to ask if its really possible to create an entire application using ONLY NOSQL or even using it as my primary database. Am i on the correct path? Do i need to use relational databases(MySQL) as well? I am totally novice in NOSQL technologies and would appreciate any advice.
php
mysql
nosql
relational-database
null
04/29/2012 09:27:09
not a real question
Can I write entire aaplication using NOSQL ONLY? === I am planning an application that intends to store a LOT of user data. and i am quite concerned about the speed of data retrial. I have heard a little about NOSQL and know that it provides better performance than relational databases. So I am planning to use NOSQL (Preferably MongoDB) as my primary database system. I want to ask if its really possible to create an entire application using ONLY NOSQL or even using it as my primary database. Am i on the correct path? Do i need to use relational databases(MySQL) as well? I am totally novice in NOSQL technologies and would appreciate any advice.
1
7,765,531
10/14/2011 09:18:02
549,928
12/21/2010 12:57:31
52
1
Can anybody explain me how to use ARC in my iPhone app?
Since ios5 released and i upgraded my xcode to 4.2 and now i want to start one new iPhone project i'm interested to use ARC functionality, so i know little bit about this that if we use ARC then no need to use release/autorelease/retain for our objects and moreover dealloc is not at all needed, but the thing is how exactly the code structure changes? how the reference count and object references is handled in llvm?what we have to do in code so that to use ARC?if i am using any third party API in my project how could i handle those,are they compatible with this? Any help is appreciated in advance, thank you.
iphone
objective-c
ios
ipad
xcode4
10/15/2011 06:20:34
not a real question
Can anybody explain me how to use ARC in my iPhone app? === Since ios5 released and i upgraded my xcode to 4.2 and now i want to start one new iPhone project i'm interested to use ARC functionality, so i know little bit about this that if we use ARC then no need to use release/autorelease/retain for our objects and moreover dealloc is not at all needed, but the thing is how exactly the code structure changes? how the reference count and object references is handled in llvm?what we have to do in code so that to use ARC?if i am using any third party API in my project how could i handle those,are they compatible with this? Any help is appreciated in advance, thank you.
1
2,132,155
01/25/2010 12:23:22
192,428
10/19/2009 12:57:12
1
0
regular expression
(.[^_]+) Matches correctly when there is no underscore, how can I modify this regex to match when there is no underscore only before a question mark ? ie. ignore any underscores after ?
regex
null
null
null
null
null
open
regular expression === (.[^_]+) Matches correctly when there is no underscore, how can I modify this regex to match when there is no underscore only before a question mark ? ie. ignore any underscores after ?
0
7,158,648
08/23/2011 09:10:36
572,586
01/12/2011 10:49:26
1,212
107
Why do we need `class` in C++?
Using `struct` we can achieve all the functionalities of a `class`: - constructors, destructors - member functions, static functions. - overloaded functions, virtual functions - public / private / protected access specifiers. - operators The only difference are the default access rights: public for class, private for struct. Why do we need a Class then ?
c++
null
null
null
null
08/23/2011 15:26:03
not constructive
Why do we need `class` in C++? === Using `struct` we can achieve all the functionalities of a `class`: - constructors, destructors - member functions, static functions. - overloaded functions, virtual functions - public / private / protected access specifiers. - operators The only difference are the default access rights: public for class, private for struct. Why do we need a Class then ?
4