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,328,564
09/07/2011 03:26:20
927,838
09/04/2011 18:31:08
11
0
Reload Data in TableView and group
i have a normal table view, and i want to reload the data and make de table separated with groups is that possible,or i have to load another view? -(NSString *) tableView: (UITableView *) tableView titleForHeaderInSection: (NSInteger) section { if(group){ switch (section) { case 0: return @"A"; break; case 1: return @"B"; break; case 2: return @"C"; break; case 3: return @"D"; break; case 4: return @"E"; break; } }return nil; } i try to put a boolean to verify the time to reload data but didnt work....
objective-c
uitableview
reloaddata
null
null
null
open
Reload Data in TableView and group === i have a normal table view, and i want to reload the data and make de table separated with groups is that possible,or i have to load another view? -(NSString *) tableView: (UITableView *) tableView titleForHeaderInSection: (NSInteger) section { if(group){ switch (section) { case 0: return @"A"; break; case 1: return @"B"; break; case 2: return @"C"; break; case 3: return @"D"; break; case 4: return @"E"; break; } }return nil; } i try to put a boolean to verify the time to reload data but didnt work....
0
7,574,975
09/27/2011 20:01:25
186,608
10/08/2009 18:13:35
418
3
Are ATI stream processors equivalent to nVida CUDA cores?
Question: Are ATI stream processors equivalent to nVida CUDA cores? --- Info: Compare this pricey nVida card: http://www.newegg.com/Product/Product.aspx?Item=N82E16814130587 To this cheap ATI card: http://www.newegg.com/Product/Product.aspx?Item=N82E16814125315 The nVida card has 512 Cuda cores, the ATI card has 400 Stream processors. what are the difference between these? particularly in terms of something like Open CL. would an program running open cl on the nVida card run 512 threads and running on the ATI card run 400 threads?
opencl
gpu
null
null
null
09/28/2011 03:33:08
off topic
Are ATI stream processors equivalent to nVida CUDA cores? === Question: Are ATI stream processors equivalent to nVida CUDA cores? --- Info: Compare this pricey nVida card: http://www.newegg.com/Product/Product.aspx?Item=N82E16814130587 To this cheap ATI card: http://www.newegg.com/Product/Product.aspx?Item=N82E16814125315 The nVida card has 512 Cuda cores, the ATI card has 400 Stream processors. what are the difference between these? particularly in terms of something like Open CL. would an program running open cl on the nVida card run 512 threads and running on the ATI card run 400 threads?
2
8,500,452
12/14/2011 06:44:10
951,299
09/18/2011 14:29:10
16
3
best way to build a web page
I have been developing a magazine engine which behaves like a web page. Currently it is heavily dependent on a nested system of divs labelled by id's and classes to allow it to be swappable, and resize to fit the monitor of the device in question. I recently showed this to someone, asking for feedback on how it looked, and he concentrated on how sloppy the html was. **My question is, is it better to have a clean, unadorned html at the very beginning of the load, and build out the code to make the magazine that allows for the swiping on the different devices and click-throughs for desktop versions?** Sorry I don't have a demo handy, I'm trying several css frameworks to gain control over the typical adventurous "let's try this" coding cycle to make it easier to understand and update for the future (an integrated creation system online, with styles a creator can modify). This latest iteration is exploring responsive image downloads.
html
css
magazine
null
null
12/14/2011 17:18:11
not a real question
best way to build a web page === I have been developing a magazine engine which behaves like a web page. Currently it is heavily dependent on a nested system of divs labelled by id's and classes to allow it to be swappable, and resize to fit the monitor of the device in question. I recently showed this to someone, asking for feedback on how it looked, and he concentrated on how sloppy the html was. **My question is, is it better to have a clean, unadorned html at the very beginning of the load, and build out the code to make the magazine that allows for the swiping on the different devices and click-throughs for desktop versions?** Sorry I don't have a demo handy, I'm trying several css frameworks to gain control over the typical adventurous "let's try this" coding cycle to make it easier to understand and update for the future (an integrated creation system online, with styles a creator can modify). This latest iteration is exploring responsive image downloads.
1
10,664,989
05/19/2012 12:00:30
1,372,423
05/03/2012 12:12:04
90
8
CSS Clip - Sprite Image
I have a sprite image which I want to display 128x89px portions across multiple span elements. In the example I have set the left-clip to 30px to highlight the issue, normally this would be in multiples of 128px. When I set the left clip to 30px, it seems to add 30px left margin. Surely, I don't need to add a negative left margin to correct it? I am a total newbie to `clip` as I have never really needed to use it, but now there is. My understanding of it is the same as a square cut out of a piece of paper. Adjusting the clip values will move the piece of paper around therefore changing the viewed image. Please help. **JSFiddle:** http://jsfiddle.net/VgjXr/ **CSS:** a { border: 1px solid #000; height: 89px; width: 128px; display: block; } span.image { background-image: url('http://i1269.photobucket.com/albums/jj591/mark1979smith/splice.jpg'); position: absolute; display: block; width: 128px; height: 89px; clip: rect(0px,158px,89px,30px); clear: both; } **HTML:** <div class="element" id="cheeseOption7"> <div id="optional_46"> <a href="#"> <span class="image"><!-- --></span> </a> </div> </div>
css
clip
null
null
null
null
open
CSS Clip - Sprite Image === I have a sprite image which I want to display 128x89px portions across multiple span elements. In the example I have set the left-clip to 30px to highlight the issue, normally this would be in multiples of 128px. When I set the left clip to 30px, it seems to add 30px left margin. Surely, I don't need to add a negative left margin to correct it? I am a total newbie to `clip` as I have never really needed to use it, but now there is. My understanding of it is the same as a square cut out of a piece of paper. Adjusting the clip values will move the piece of paper around therefore changing the viewed image. Please help. **JSFiddle:** http://jsfiddle.net/VgjXr/ **CSS:** a { border: 1px solid #000; height: 89px; width: 128px; display: block; } span.image { background-image: url('http://i1269.photobucket.com/albums/jj591/mark1979smith/splice.jpg'); position: absolute; display: block; width: 128px; height: 89px; clip: rect(0px,158px,89px,30px); clear: both; } **HTML:** <div class="element" id="cheeseOption7"> <div id="optional_46"> <a href="#"> <span class="image"><!-- --></span> </a> </div> </div>
0
5,864,019
05/03/2011 00:58:53
609,391
02/09/2011 08:02:39
73
0
I am a php programmer converting to python. Please explain the importance (or non importance) of unit testing. I never unit tested with php!
I am at a point in my learning about solid software development where I realize that the "pedal-to-the-medal code at light speed and pray for good results with no real plan" approach does not work. I am seeking to replace my old (and admittedly not exactly great) ways with solid practices. I have never used unit testing before, and now on top of trying to learn pyramid (which is going well thanks to the thorough documentation) I am also trying to see how unit testing in general can benefit me (also in the future add integration testing, regression testing, etc.). I read this intro to nosetest http://ivory.idyll.org/articles/nose-intro.html, and (not to be flippant) I see that you can use unit tests to test regular expressions, and see `if a=1; b=1; now does a == b`. This is all I can see at this point. I do not need a framework for this. I can use a regular expression tester, and common sense to 'test'. If I'm going to use unit testing to see if two variables are equal, then wouldn't i have to create a test every time I create a variable and set it equal to something? The examples from the article just seem kind of arbitrary. My mind is way open to learning the benefits of unit testing, but I want to know What are some practical applications of unit testing. Bottom line: I have never used unit testing before, so please tell me why I am wrong, and should start using testing. Cheers!!
unit-testing
nose
pyramid
null
null
05/04/2011 21:09:27
off topic
I am a php programmer converting to python. Please explain the importance (or non importance) of unit testing. I never unit tested with php! === I am at a point in my learning about solid software development where I realize that the "pedal-to-the-medal code at light speed and pray for good results with no real plan" approach does not work. I am seeking to replace my old (and admittedly not exactly great) ways with solid practices. I have never used unit testing before, and now on top of trying to learn pyramid (which is going well thanks to the thorough documentation) I am also trying to see how unit testing in general can benefit me (also in the future add integration testing, regression testing, etc.). I read this intro to nosetest http://ivory.idyll.org/articles/nose-intro.html, and (not to be flippant) I see that you can use unit tests to test regular expressions, and see `if a=1; b=1; now does a == b`. This is all I can see at this point. I do not need a framework for this. I can use a regular expression tester, and common sense to 'test'. If I'm going to use unit testing to see if two variables are equal, then wouldn't i have to create a test every time I create a variable and set it equal to something? The examples from the article just seem kind of arbitrary. My mind is way open to learning the benefits of unit testing, but I want to know What are some practical applications of unit testing. Bottom line: I have never used unit testing before, so please tell me why I am wrong, and should start using testing. Cheers!!
2
6,454,022
06/23/2011 12:31:47
772,868
11/04/2010 22:37:20
407
25
A prolog for Prolog?
In case you write Prolog programs regularly you probably have your own library of predicates you always rely on. Some Prolog systems come with a rich set of predefined predicates and some not. Some systems have libraries but they are mostly incompatible with other systems. Also, many existing libraries contain a lot of rarely needed predicates. But then, there are a couple predicates that "should" be always present. And then, there is [some progress happening since November][1]. Why not here too? So what are your favorite predicates? That is predicates, that are not defined in the ISO core. To start with: `between/3`, `member/2`, `length/2`, `dif/2`, `maplist/2`, ... For DCGs: `seq//1`, `iseq//1`, `... //0`. [1]: http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_assessment#progress
prolog
iso
null
null
null
06/23/2011 17:03:19
not a real question
A prolog for Prolog? === In case you write Prolog programs regularly you probably have your own library of predicates you always rely on. Some Prolog systems come with a rich set of predefined predicates and some not. Some systems have libraries but they are mostly incompatible with other systems. Also, many existing libraries contain a lot of rarely needed predicates. But then, there are a couple predicates that "should" be always present. And then, there is [some progress happening since November][1]. Why not here too? So what are your favorite predicates? That is predicates, that are not defined in the ISO core. To start with: `between/3`, `member/2`, `length/2`, `dif/2`, `maplist/2`, ... For DCGs: `seq//1`, `iseq//1`, `... //0`. [1]: http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_assessment#progress
1
2,637,090
04/14/2010 11:56:49
316,457
04/14/2010 11:56:49
1
0
A two player game over the intranet..
I am a student of 3rd year engineering and only a novice in my programming skills. I need some help with my project.. I wish to develop a two player game to be played over the network (Intranet). I want to develop a simple website with a few html pages for this.My ideas for the project run as follows: 1.People can log in from different systems and check who ever is online on the network currently. the page also shows who is playing with whom. 2.If a person is interested in playing with a player who is currently online, he sends a request of which the other player is somehow notified( using a message or an alert on his profile page..) 3.If the player accepts the request, a game is started. This is exactly where I am clueless.. How can I make them play the game? I need to develop a turn based game with two players, eg chessboard.. how can I do this? The game has to be played live.. and it is time tracked. i need your help with coding the above.. the other features i wish to include are: 4.The game could not be abruptly terminated by any one if the users.The request to terminate the game should be sent to the other player first and only if he accepts can the game be terminated. 5. Whoever wins the game would get a plus 10 on their credit and if he terminated he gets a minus 10. The credits remains constant even if he loses but the success percentage is reduced. 6.The player with highest winning percentage is projected as the player of the week on the home page and he can post a challenge to all others.. I only have an intermediate knowledge of core java and know the basics of Swing and Awt. I am not at all familiar with networking in java right now. I have 5 to 6 weeks of time for developing the project but I hope to learn the things before I start my project. i would prefer to use a lan to illustrate the project and I know only java,jsp,oracle,html and bit of xml to develop my proj. Also I wish to know if I can code this within 6 weeks, would it be too difficult or complicated? Please spare some time to tell me. Please.. please.. I need your suggestions and help.. thank you so much..
java
networking
null
null
null
11/30/2011 18:49:58
not a real question
A two player game over the intranet.. === I am a student of 3rd year engineering and only a novice in my programming skills. I need some help with my project.. I wish to develop a two player game to be played over the network (Intranet). I want to develop a simple website with a few html pages for this.My ideas for the project run as follows: 1.People can log in from different systems and check who ever is online on the network currently. the page also shows who is playing with whom. 2.If a person is interested in playing with a player who is currently online, he sends a request of which the other player is somehow notified( using a message or an alert on his profile page..) 3.If the player accepts the request, a game is started. This is exactly where I am clueless.. How can I make them play the game? I need to develop a turn based game with two players, eg chessboard.. how can I do this? The game has to be played live.. and it is time tracked. i need your help with coding the above.. the other features i wish to include are: 4.The game could not be abruptly terminated by any one if the users.The request to terminate the game should be sent to the other player first and only if he accepts can the game be terminated. 5. Whoever wins the game would get a plus 10 on their credit and if he terminated he gets a minus 10. The credits remains constant even if he loses but the success percentage is reduced. 6.The player with highest winning percentage is projected as the player of the week on the home page and he can post a challenge to all others.. I only have an intermediate knowledge of core java and know the basics of Swing and Awt. I am not at all familiar with networking in java right now. I have 5 to 6 weeks of time for developing the project but I hope to learn the things before I start my project. i would prefer to use a lan to illustrate the project and I know only java,jsp,oracle,html and bit of xml to develop my proj. Also I wish to know if I can code this within 6 weeks, would it be too difficult or complicated? Please spare some time to tell me. Please.. please.. I need your suggestions and help.. thank you so much..
1
7,735,379
10/12/2011 04:46:59
937,482
09/09/2011 20:07:07
89
0
indentation please
I seriously need assistance in finding where in my program is my indentation wrong. I've tweaked it for hours and been unsuccessful getting it to work. kQuestion = 'question' kGuess = 'guess' # define a function for asking yes/no questions def yesno(prompt): ans = raw_input(prompt) return (ans[0]=='y' or ans[0]=='Y') # define a node in the question tree (either question or guess) class Qnode: # initialization method def __init__(self,guess): self.nodetype = kGuess self.desc = guess # get the question to ask def query(self): if (self.nodetype == kQuestion): return self.desc + " " elif (self.nodetype == kGuess): return "Is it a " + self.desc + "? " else: return "Error: invalid node type!" # return new node, given a boolean response def nextnode(self,answer): return self.nodes[answer] # turn a guess node into a question node and add new item # give a question, the new item, and the answer for that item def makeQuest( self, question, newitem, newanswer ): # create new nodes for the new answer and old answer newAnsNode = Qnode(newitem) oldAnsNode = Qnode(self.desc) # turn this node into a question node self.nodetype = kQuestion self.desc = question # assign the yes and no nodes appropriately self.nodes = {newanswer:newAnsNode, not newanswer:oldAnsNode} def traverse(fromNode): # ask the question yes = yesno( fromNode.query() ) # if this is a guess node, then did we get it right? if (fromNode.nodetype == kGuess): if (yes): print "I'm a genius!!!" return # if we didn't get it right, return the node return fromNode # if it's a question node, then ask another question return traverse( fromNode.nextnode(yes) ) def run(): # start with a single guess node topNode = Qnode('python') done = 0 while not done: # ask questions till we get to the end result = traverse( topNode ) # if result is a node, we need to add a question if (result): item = raw_input("OK, what were you thinking of? ") print "Enter a question that distinguishes a", print item, "from a", result.desc + ":" q = raw_input() ans = yesno("What is the answer for " + item + "? ") result.makeQuest( q, item, ans ) print "Got it." # repeat until done print done = not yesno("Do another? ") print # immediate-mode commands, for drag-and-drop or execfile() execution if __name__ == '__main__': run() print raw_input("press Return>") else: print "Module questor imported." print "To run, type: questor.run()" print "To reload after changes to the source, type: reload(questor)" # end of questor.py I get a `Traceback (most recent call last): File "C:/Python27/delete.py", line 68, in <module> result = traverse( topNode ) NameError: name 'topNode' is not defined `
python
homework
indentation
null
null
01/22/2012 19:52:03
too localized
indentation please === I seriously need assistance in finding where in my program is my indentation wrong. I've tweaked it for hours and been unsuccessful getting it to work. kQuestion = 'question' kGuess = 'guess' # define a function for asking yes/no questions def yesno(prompt): ans = raw_input(prompt) return (ans[0]=='y' or ans[0]=='Y') # define a node in the question tree (either question or guess) class Qnode: # initialization method def __init__(self,guess): self.nodetype = kGuess self.desc = guess # get the question to ask def query(self): if (self.nodetype == kQuestion): return self.desc + " " elif (self.nodetype == kGuess): return "Is it a " + self.desc + "? " else: return "Error: invalid node type!" # return new node, given a boolean response def nextnode(self,answer): return self.nodes[answer] # turn a guess node into a question node and add new item # give a question, the new item, and the answer for that item def makeQuest( self, question, newitem, newanswer ): # create new nodes for the new answer and old answer newAnsNode = Qnode(newitem) oldAnsNode = Qnode(self.desc) # turn this node into a question node self.nodetype = kQuestion self.desc = question # assign the yes and no nodes appropriately self.nodes = {newanswer:newAnsNode, not newanswer:oldAnsNode} def traverse(fromNode): # ask the question yes = yesno( fromNode.query() ) # if this is a guess node, then did we get it right? if (fromNode.nodetype == kGuess): if (yes): print "I'm a genius!!!" return # if we didn't get it right, return the node return fromNode # if it's a question node, then ask another question return traverse( fromNode.nextnode(yes) ) def run(): # start with a single guess node topNode = Qnode('python') done = 0 while not done: # ask questions till we get to the end result = traverse( topNode ) # if result is a node, we need to add a question if (result): item = raw_input("OK, what were you thinking of? ") print "Enter a question that distinguishes a", print item, "from a", result.desc + ":" q = raw_input() ans = yesno("What is the answer for " + item + "? ") result.makeQuest( q, item, ans ) print "Got it." # repeat until done print done = not yesno("Do another? ") print # immediate-mode commands, for drag-and-drop or execfile() execution if __name__ == '__main__': run() print raw_input("press Return>") else: print "Module questor imported." print "To run, type: questor.run()" print "To reload after changes to the source, type: reload(questor)" # end of questor.py I get a `Traceback (most recent call last): File "C:/Python27/delete.py", line 68, in <module> result = traverse( topNode ) NameError: name 'topNode' is not defined `
3
9,303,561
02/16/2012 00:00:07
79,312
03/18/2009 05:13:55
233
7
How to checkin the output of a project/solution (dll) post a successful build in TFS2010
Just wondering on the recommended process of checking in an output of a project or solution post a successful build. For example the Build relates to a common library. Post a change I want that to be checked in to a known location so other solutions can reference. Some examples might be - Custom Workflow activities - Invoking TF exe directly
visual-studio-2010
tfs
msbuild
tfs2010
vsts
null
open
How to checkin the output of a project/solution (dll) post a successful build in TFS2010 === Just wondering on the recommended process of checking in an output of a project or solution post a successful build. For example the Build relates to a common library. Post a change I want that to be checked in to a known location so other solutions can reference. Some examples might be - Custom Workflow activities - Invoking TF exe directly
0
7,369,282
09/10/2011 02:44:45
937,811
09/10/2011 02:44:45
1
0
how to scan my traffic (c#)?
i have school knowledge in c#, i would like to know what ive to learn in order to scan all the traffic in my internet. my goal is to make a plugin to mmorpg game, that save the chat log into txt file when the user want to do that,for that i need to be able to see all the (Messages that sent in the game)\(my traffic) :) i dont look for software like wireshark because i would like to let other players to use that plugin ,so i look for library(i think ?) that support that, tyvm for your help:)
c#
networking
null
null
null
09/15/2011 22:51:11
not a real question
how to scan my traffic (c#)? === i have school knowledge in c#, i would like to know what ive to learn in order to scan all the traffic in my internet. my goal is to make a plugin to mmorpg game, that save the chat log into txt file when the user want to do that,for that i need to be able to see all the (Messages that sent in the game)\(my traffic) :) i dont look for software like wireshark because i would like to let other players to use that plugin ,so i look for library(i think ?) that support that, tyvm for your help:)
1
8,167,739
11/17/2011 13:19:11
859,229
07/23/2011 11:07:37
6
0
Running Nopcommerce in inetpub
in inetpub/wwwroot,i copied the source code of nopcommerce2.2 and created the website for the source code and assigned the port no.when i tried to run the website using the port no it gave me the error login failed for NT/NETWORK AUTHORITY .I have assigned the permission for network service and everyone.but still it gives the error.
networking
null
null
null
null
11/18/2011 13:34:24
not a real question
Running Nopcommerce in inetpub === in inetpub/wwwroot,i copied the source code of nopcommerce2.2 and created the website for the source code and assigned the port no.when i tried to run the website using the port no it gave me the error login failed for NT/NETWORK AUTHORITY .I have assigned the permission for network service and everyone.but still it gives the error.
1
551,208
02/15/2009 17:01:24
66,420
02/14/2009 12:01:59
3
2
Remote access Windows Vista to Mac OSX?
Is there a means to do remote desktop access from Windows Vista to Mac Mini with OSX? Looking to be able to remote in to Mac in order to access system so no need to have it on a seperate monitor/kb to do testing and development. Anything similar to Windows Remote Desktop that can be used?
remote-desktop
osx
windows
null
null
08/30/2011 14:15:24
off topic
Remote access Windows Vista to Mac OSX? === Is there a means to do remote desktop access from Windows Vista to Mac Mini with OSX? Looking to be able to remote in to Mac in order to access system so no need to have it on a seperate monitor/kb to do testing and development. Anything similar to Windows Remote Desktop that can be used?
2
665,941
03/20/2009 12:32:18
34,009
11/04/2008 09:38:24
510
32
Any way to share session state between different applications in tomcat?
We want to split a working application in two different wars and the easiest path seams to be sharing the same session, so if app A set `session.setAttribute("foo", "bar")` app B will be able to see it. Is there a way to share the `HttpSession` state for both apps in the same Tomcat instance? Our app is running on a dedicated tomcat 5.5, there are no other apps running on the same tomcat instance, so any security concerns regarding the session sharing are not a problem. If it's not possible or this <em>session sharing</em> is a really bad idea please leave a comment.
session
tomcat
java
java-ee
null
null
open
Any way to share session state between different applications in tomcat? === We want to split a working application in two different wars and the easiest path seams to be sharing the same session, so if app A set `session.setAttribute("foo", "bar")` app B will be able to see it. Is there a way to share the `HttpSession` state for both apps in the same Tomcat instance? Our app is running on a dedicated tomcat 5.5, there are no other apps running on the same tomcat instance, so any security concerns regarding the session sharing are not a problem. If it's not possible or this <em>session sharing</em> is a really bad idea please leave a comment.
0
4,923,154
02/07/2011 15:37:26
336,578
05/09/2010 09:54:53
280
23
C# advantages and disadvantages over C++
I use C++ for more than 10 years(high school, university, and now at work). I had some time between projects and started to learn C#. I wanted to make simple things(in my opinion). - to get a form window handle - to call a function written in C++ and compiled as dll - to populate a PropertyGrid at run time - to use a form in another form(parent-child windows) - to convert a byte array to a string - to change build path and much more things that I think are usual things when somebody creates an application. With the help of stackoverflow members I managed to do almost all the things I wanted, but everything seems to be more complicated than in C++. There are many syntax/IDE flaws: - It does not convert any int value to bool(check for null for example is weird) - Use of "out" when calling a function, the function was already defined using "out" keyword - The sources must be in same folder(or sub-folder) as the project - obj folder in same folder as the project - When I double click on a source file the IDE opens Design instead of code I don't want to put this language in a corner and forget about it. I want to know the good things about it. My first contact with C# let me the impression that I don't have freedom, that everything I must do requires more code that same thing in C++. Can you help we with good/bad things of C# in comparison with C++? Something simple like: > C++ - converts int values to bool > values -> check for NULL is simple > > C# - does not converts int values to > bool -> check for null requires more > code Thank you!
c#
c++
null
null
null
02/07/2011 15:43:30
not constructive
C# advantages and disadvantages over C++ === I use C++ for more than 10 years(high school, university, and now at work). I had some time between projects and started to learn C#. I wanted to make simple things(in my opinion). - to get a form window handle - to call a function written in C++ and compiled as dll - to populate a PropertyGrid at run time - to use a form in another form(parent-child windows) - to convert a byte array to a string - to change build path and much more things that I think are usual things when somebody creates an application. With the help of stackoverflow members I managed to do almost all the things I wanted, but everything seems to be more complicated than in C++. There are many syntax/IDE flaws: - It does not convert any int value to bool(check for null for example is weird) - Use of "out" when calling a function, the function was already defined using "out" keyword - The sources must be in same folder(or sub-folder) as the project - obj folder in same folder as the project - When I double click on a source file the IDE opens Design instead of code I don't want to put this language in a corner and forget about it. I want to know the good things about it. My first contact with C# let me the impression that I don't have freedom, that everything I must do requires more code that same thing in C++. Can you help we with good/bad things of C# in comparison with C++? Something simple like: > C++ - converts int values to bool > values -> check for NULL is simple > > C# - does not converts int values to > bool -> check for null requires more > code Thank you!
4
2,935,017
05/29/2010 12:28:55
87,152
04/04/2009 19:42:27
734
1
Input system reference trouble
I'm using [SFML][1] for input system in my application. size_t WindowHandle; WindowHandle = ...; // Here I get the handler sf::Window InputWindow(WindowHandle); const sf::Input *InputHandle = &InputWindow.GetInput(); // [x] Error At the last lines I have to get reference for the input system. Here is declaration of **GetInput** from [documentation][2]: const Input & sf::Window::GetInput () const The problem is: >invalid conversion from ‘const sf::Input*’ to ‘sf::Input*’ What's wrong? [1]: http://www.sfml-dev.org/ [2]: http://www.sfml-dev.org/documentation/1.6/classsf_1_1Window.htm#49db47a79ca98b7d65087adeea06e919
c++
reference
sfml
null
null
null
open
Input system reference trouble === I'm using [SFML][1] for input system in my application. size_t WindowHandle; WindowHandle = ...; // Here I get the handler sf::Window InputWindow(WindowHandle); const sf::Input *InputHandle = &InputWindow.GetInput(); // [x] Error At the last lines I have to get reference for the input system. Here is declaration of **GetInput** from [documentation][2]: const Input & sf::Window::GetInput () const The problem is: >invalid conversion from ‘const sf::Input*’ to ‘sf::Input*’ What's wrong? [1]: http://www.sfml-dev.org/ [2]: http://www.sfml-dev.org/documentation/1.6/classsf_1_1Window.htm#49db47a79ca98b7d65087adeea06e919
0
10,762,318
05/25/2012 23:09:39
1,028,880
11/04/2011 01:15:29
18
4
Is http://mydomain.com/me@mail.com safe to use as URL?
I consider to setup a server to deal with URLs including email address such as http://mydomain.com/me@mail.com According to RFC  3986, I userstand @ is reserved on authority part = //mydomain.com/, but unreserved on path part /......., so currently I assume it's ok to use email address on pass. Having said that, I still not sure if it is safe to use like http://mydomain.com/me@mail.com on production. Please advise. Thanks.
url
rfc3986
null
null
null
null
open
Is http://mydomain.com/me@mail.com safe to use as URL? === I consider to setup a server to deal with URLs including email address such as http://mydomain.com/me@mail.com According to RFC  3986, I userstand @ is reserved on authority part = //mydomain.com/, but unreserved on path part /......., so currently I assume it's ok to use email address on pass. Having said that, I still not sure if it is safe to use like http://mydomain.com/me@mail.com on production. Please advise. Thanks.
0
3,227,099
07/12/2010 09:07:18
389,319
07/12/2010 09:07:17
1
0
CCnet MsBuild and MSTest
I've set up a CCNet Server with MSBuild and MSTest. Afterwards I've created a Test Project with some Unit Tests. The Build is sucessfull, but two of the Unit Tests do fail (on purpose). I receive an Email that the Build was not successfull (even only the Unit Tests failed). Is it possible to send a seperated Email (if only the Unit Tests fail) or change the contend of the Email so I can see that only the Unit Tests failed and not the Build itsself? I look forward to your answer, with kind regards Sandor D.
mstest
null
null
null
null
null
open
CCnet MsBuild and MSTest === I've set up a CCNet Server with MSBuild and MSTest. Afterwards I've created a Test Project with some Unit Tests. The Build is sucessfull, but two of the Unit Tests do fail (on purpose). I receive an Email that the Build was not successfull (even only the Unit Tests failed). Is it possible to send a seperated Email (if only the Unit Tests fail) or change the contend of the Email so I can see that only the Unit Tests failed and not the Build itsself? I look forward to your answer, with kind regards Sandor D.
0
7,817,934
10/19/2011 07:32:43
882,565
08/07/2011 08:51:12
26
0
Bash script - Recursive Find of New lines and Carriage returns at end of files
I have a website that is giving me all sorts of errors, I've ran a recursive script to check for BOM headers.. but how would I do the same thing to find carriage returns and line feeds at the end of a file? I want to check over my codebase to make sure there aren't any files with extra lines hanging out
php
bash
sed
awk
grep
null
open
Bash script - Recursive Find of New lines and Carriage returns at end of files === I have a website that is giving me all sorts of errors, I've ran a recursive script to check for BOM headers.. but how would I do the same thing to find carriage returns and line feeds at the end of a file? I want to check over my codebase to make sure there aren't any files with extra lines hanging out
0
10,817,126
05/30/2012 13:17:57
656,925
08/12/2010 02:22:36
2,475
45
Eliminating State on the Server Side - Best Practice? Pros / Cons
After seeing how easy client-side state can be accomplished on this [SO Post][1] and verifying that using local storage will work on all major modern browsers on this [W3schools site][2], I want to eliminate the Session Class in PHP...I want to eliminate sessions and keep this info on the client side. What are the pros and cons to doing this? Did I miss anything? This is a major refactoring so I wanted to cover my bases. Should I implement state on the client side? **Pros** - Less load to the server - Simpler Implementation ( note link above ) **Cons** - Must pass back state variables to server when needed [1]: http://stackoverflow.com/questions/10807822/can-javascript-maintain-any-state-after-a-reload [2]: http://www.w3schools.com/html5/html5_webstorage.asp
php
javascript
null
null
null
06/02/2012 04:03:00
not constructive
Eliminating State on the Server Side - Best Practice? Pros / Cons === After seeing how easy client-side state can be accomplished on this [SO Post][1] and verifying that using local storage will work on all major modern browsers on this [W3schools site][2], I want to eliminate the Session Class in PHP...I want to eliminate sessions and keep this info on the client side. What are the pros and cons to doing this? Did I miss anything? This is a major refactoring so I wanted to cover my bases. Should I implement state on the client side? **Pros** - Less load to the server - Simpler Implementation ( note link above ) **Cons** - Must pass back state variables to server when needed [1]: http://stackoverflow.com/questions/10807822/can-javascript-maintain-any-state-after-a-reload [2]: http://www.w3schools.com/html5/html5_webstorage.asp
4
8,651,705
12/28/2011 04:02:01
1,118,637
12/28/2011 03:52:55
1
0
[Python]Whats wrong with these 3 lines of python code? Thanks :D
#I get an error after i put in an input, how can i fix it? print('Type ROLL to roll for your stats') roll = input () if roll == ROLL:
python
string
respond
null
null
12/28/2011 05:11:16
not a real question
[Python]Whats wrong with these 3 lines of python code? Thanks :D === #I get an error after i put in an input, how can i fix it? print('Type ROLL to roll for your stats') roll = input () if roll == ROLL:
1
8,908,275
01/18/2012 10:03:11
684,202
03/30/2011 15:18:16
97
7
Difficult math/programming task
My teacher told me to create algoirthm to solve this, but I cann't seem to figure out a way how I could make this work. Could you please help me? (a + b)(b + c)(c + a) = 2012 Ther can be multiple solutions tothis problem, but c >= b >= a
algorithm
null
null
null
null
01/18/2012 15:32:07
off topic
Difficult math/programming task === My teacher told me to create algoirthm to solve this, but I cann't seem to figure out a way how I could make this work. Could you please help me? (a + b)(b + c)(c + a) = 2012 Ther can be multiple solutions tothis problem, but c >= b >= a
2
9,261,354
02/13/2012 13:27:43
1,100,166
12/15/2011 15:16:01
1
0
how can i use toggle button in my application
file.xml <?xml version="1.0" encoding="utf-8" ?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="false" android:drawable="@drawable/on_invisible_50x40" /> <item android:state_focused="true" android:drawable="@drawable/off_68x40" /> </selector> file_ch.xml <?xml version="1.0" encoding="utf-8" ?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="false" android:drawable="@drawable/on_60x40" /> <item android:state_focused="true" android:drawable="@drawable/off_invisible_68x40" /> </selector> main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <LinearLayout android:layout_width="wrap_content" android:id="@+id/rl_onoff" android:layout_height="wrap_content"> <ImageView android:id="@+id/on_btn" android:layout_width="80dp" android:layout_height="40dp" android:src="@drawable/file_ch" android:visibility="visible"></ImageView> <ImageView android:id="@+id/off_btn" android:layout_width="80dp" android:layout_height="40dp" android:src="@drawable/file" android:visibility="invisible"></ImageView> </LinearLayout> </LinearLayout> i want iphone toggle but its showing only on and off part but not showing on_invisible and off_insible part
android
null
null
null
null
02/13/2012 19:52:59
not a real question
how can i use toggle button in my application === file.xml <?xml version="1.0" encoding="utf-8" ?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="false" android:drawable="@drawable/on_invisible_50x40" /> <item android:state_focused="true" android:drawable="@drawable/off_68x40" /> </selector> file_ch.xml <?xml version="1.0" encoding="utf-8" ?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="false" android:drawable="@drawable/on_60x40" /> <item android:state_focused="true" android:drawable="@drawable/off_invisible_68x40" /> </selector> main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <LinearLayout android:layout_width="wrap_content" android:id="@+id/rl_onoff" android:layout_height="wrap_content"> <ImageView android:id="@+id/on_btn" android:layout_width="80dp" android:layout_height="40dp" android:src="@drawable/file_ch" android:visibility="visible"></ImageView> <ImageView android:id="@+id/off_btn" android:layout_width="80dp" android:layout_height="40dp" android:src="@drawable/file" android:visibility="invisible"></ImageView> </LinearLayout> </LinearLayout> i want iphone toggle but its showing only on and off part but not showing on_invisible and off_insible part
1
6,372,036
06/16/2011 12:45:55
616,129
02/14/2011 11:45:19
110
1
Create a GUI interface for marketing
I want to market a free software and I am thinking how I should create a good GUI for attracting more visitator to my website company. Any suggestion? Thanks
gui
null
null
null
null
06/17/2011 07:10:13
off topic
Create a GUI interface for marketing === I want to market a free software and I am thinking how I should create a good GUI for attracting more visitator to my website company. Any suggestion? Thanks
2
7,953,890
10/31/2011 12:46:12
810,304
06/22/2011 12:15:47
214
14
PHP printing raw string
I need to print CURL headers as a raw string, so with all of the \n and \r anyone could tell me how to? I tried print_r and few other but it hasnt worked Thanks, S
php
html
null
null
null
null
open
PHP printing raw string === I need to print CURL headers as a raw string, so with all of the \n and \r anyone could tell me how to? I tried print_r and few other but it hasnt worked Thanks, S
0
10,940,466
06/07/2012 21:58:46
834,764
07/08/2011 05:03:33
379
6
Is the Zend Framework really a framework or a library?
A library can be described as a collections of functionality that *you can call*. A framework can be described as a pre-made program where in various places you can insert your own code. The framework then *calls the code for you* at the correct points. In my many PHP applications, i've been using Zend more as a library, I am creating the "framework" and using what Zend has to offer as a library. Is the Zend framework really a library?
php
zend-framework
frameworks
terminology
null
06/09/2012 07:10:04
not constructive
Is the Zend Framework really a framework or a library? === A library can be described as a collections of functionality that *you can call*. A framework can be described as a pre-made program where in various places you can insert your own code. The framework then *calls the code for you* at the correct points. In my many PHP applications, i've been using Zend more as a library, I am creating the "framework" and using what Zend has to offer as a library. Is the Zend framework really a library?
4
5,450,697
03/27/2011 16:52:56
679,132
03/27/2011 16:52:56
1
0
methods of saving websites.
I am comparing 2 database pages in delphi. I review 2 pages at the same time with 2 seperate webbrowsers. My problem is that sometimes you have the same page but with difference values filled in the fields. Because it is a database of course. What I want to do is save the general page, where I know that the page has the same element etc. My question is difficult to ask because I find it difficult to explain it. But what is easiest to extract from a website such as title, or ip address or anything else which would allow me to save it under that name. I have tried title, but the title can change due to the change of values on the database page it does not work anymore. Anyone have any ideas on how to save it. Any feedback would be great. maybe the more people the more I can find the answer to this very odd question.
delphi
website
null
null
null
04/09/2011 07:11:29
not a real question
methods of saving websites. === I am comparing 2 database pages in delphi. I review 2 pages at the same time with 2 seperate webbrowsers. My problem is that sometimes you have the same page but with difference values filled in the fields. Because it is a database of course. What I want to do is save the general page, where I know that the page has the same element etc. My question is difficult to ask because I find it difficult to explain it. But what is easiest to extract from a website such as title, or ip address or anything else which would allow me to save it under that name. I have tried title, but the title can change due to the change of values on the database page it does not work anymore. Anyone have any ideas on how to save it. Any feedback would be great. maybe the more people the more I can find the answer to this very odd question.
1
3,484,369
08/14/2010 17:25:38
417,854
08/12/2010 00:36:37
6
0
mysql_fetch_row(): supplied argument is not a valid MySQL result resource in
I am getting the error (mysql_fetch_row(): supplied argument is not a valid MySQL result resource in) for this query. Why? <code> <?php set_time_limit(0); //MySQL globals $mysql_server = "***";//change this server for your Drupal installations $mysql_user = "***";//Ideally, should be root $mysql_pass = "***";//Corresponding password $conn = mysql_connect($mysql_server,$mysql_user,$mysql_pass);//MySQL connection string $query = "select * from dr_wiwe_old_node WHERE type = 'story'"; $noders = mysql_query($query); var_dump($noders); while ($row = mysql_fetch_row($noders)) { $nid = $row[0]; $vid = $row[1]; $type = $row[2]; $title = mysql_real_escape_string($row[3]); $uid = $row[4]; $status = $row [5]; $created = $row[6]; $changed = $row[7]; $comment = $row[8]; $promote = $row[9]; $moderate = $row[10]; $sticky = $row[11]; //Insertion into node $query="insert into dr_wiwe_node values('" . $nid . "','" . $vid . "','" . $type . "','','" . $title . "','" . $uid . "','" . $status . "','" . $created . "','" . $changed . "','" . $comment . "','" . $promote . "','" . $moderate . "','" . $sticky . "','0','0')"; if (!mysql_query($query)) { print $query; } ?> </code> Where is the error or Wat can I change?
mysql
mysql-error-1064
null
null
null
null
open
mysql_fetch_row(): supplied argument is not a valid MySQL result resource in === I am getting the error (mysql_fetch_row(): supplied argument is not a valid MySQL result resource in) for this query. Why? <code> <?php set_time_limit(0); //MySQL globals $mysql_server = "***";//change this server for your Drupal installations $mysql_user = "***";//Ideally, should be root $mysql_pass = "***";//Corresponding password $conn = mysql_connect($mysql_server,$mysql_user,$mysql_pass);//MySQL connection string $query = "select * from dr_wiwe_old_node WHERE type = 'story'"; $noders = mysql_query($query); var_dump($noders); while ($row = mysql_fetch_row($noders)) { $nid = $row[0]; $vid = $row[1]; $type = $row[2]; $title = mysql_real_escape_string($row[3]); $uid = $row[4]; $status = $row [5]; $created = $row[6]; $changed = $row[7]; $comment = $row[8]; $promote = $row[9]; $moderate = $row[10]; $sticky = $row[11]; //Insertion into node $query="insert into dr_wiwe_node values('" . $nid . "','" . $vid . "','" . $type . "','','" . $title . "','" . $uid . "','" . $status . "','" . $created . "','" . $changed . "','" . $comment . "','" . $promote . "','" . $moderate . "','" . $sticky . "','0','0')"; if (!mysql_query($query)) { print $query; } ?> </code> Where is the error or Wat can I change?
0
10,307,231
04/24/2012 23:04:57
1,354,853
04/24/2012 22:31:06
1
0
Create a Login page in asp.net mvc3
I'm a new developer in ASP.NET MVC. I want to create a Login page for user account in my application. I saw many tutorials that work with Enity Framework but I preferred to work with SQL and now I cant decide to choose which one! Can anyone explain that is it better to use SQL or EF? Any answers can be very helpful. Thanks
asp.net
database
asp.net-mvc-3
null
null
04/25/2012 18:28:56
not constructive
Create a Login page in asp.net mvc3 === I'm a new developer in ASP.NET MVC. I want to create a Login page for user account in my application. I saw many tutorials that work with Enity Framework but I preferred to work with SQL and now I cant decide to choose which one! Can anyone explain that is it better to use SQL or EF? Any answers can be very helpful. Thanks
4
11,454,076
07/12/2012 14:29:15
1,521,073
07/12/2012 14:21:53
1
0
Server-development-platform for large scale e-commerce business
Considering that java or dotnet does not seem to be the two obvious choices anymore. If you were to start a new enterprise-sized e-commerce business what server-development platform would you use.
e-commerce
null
null
null
null
07/14/2012 21:09:58
off topic
Server-development-platform for large scale e-commerce business === Considering that java or dotnet does not seem to be the two obvious choices anymore. If you were to start a new enterprise-sized e-commerce business what server-development platform would you use.
2
7,775,323
10/15/2011 02:19:49
996,402
10/15/2011 01:47:27
1
0
How do I submit Javascript Data into my Database?
OK, So! Im trying to insert Coordinates found by javascript by an onClick into my Database. How do I do it? Can someone show me?
javascript
database
null
null
null
10/15/2011 02:44:38
not a real question
How do I submit Javascript Data into my Database? === OK, So! Im trying to insert Coordinates found by javascript by an onClick into my Database. How do I do it? Can someone show me?
1
8,808,402
01/10/2012 18:23:05
907,724
08/23/2011 12:42:38
30
0
Array used for an inventory like 'Apples' = 99 in C#
I have researched different ways of creating arrays and how to use lists, but I couldn't find what I was looking for. I made a program in python that does what I want, but python cuts alot of corners and I would like to know the "proper" and most efficient way of doing this. I want to create an array (or list, not sure what's best for this) that has a string like 'Potion' and an int for the amount of that item, like an inventory for a game. What would be the best way to implement this? I noticed you can make arrays like: Inventory.InvArray[][] But how can I make the first element a string, and the second element an int? As you can see I'm a little confused, any help is appreciated :)
c#
arrays
list
inventory
null
null
open
Array used for an inventory like 'Apples' = 99 in C# === I have researched different ways of creating arrays and how to use lists, but I couldn't find what I was looking for. I made a program in python that does what I want, but python cuts alot of corners and I would like to know the "proper" and most efficient way of doing this. I want to create an array (or list, not sure what's best for this) that has a string like 'Potion' and an int for the amount of that item, like an inventory for a game. What would be the best way to implement this? I noticed you can make arrays like: Inventory.InvArray[][] But how can I make the first element a string, and the second element an int? As you can see I'm a little confused, any help is appreciated :)
0
11,363,775
07/06/2012 14:04:46
725,342
04/26/2011 12:16:59
5
1
Ext JS vs Kendo UI
We are evaluating Ext JS and Kendo UI as potential frameworks for a large enterprise SAAS application. The server-side will be based on ASP.NET MVC. I would like to know what others who may have had to make the same decision went with and why. Some of the factors we are considering are control set, validation, ease of use, charting, ability to modify/create new controls, etc. Any help would be appreciated.
javascript
asp.net-mvc-3
extjs
frameworks
kendo-ui
07/20/2012 19:47:17
not constructive
Ext JS vs Kendo UI === We are evaluating Ext JS and Kendo UI as potential frameworks for a large enterprise SAAS application. The server-side will be based on ASP.NET MVC. I would like to know what others who may have had to make the same decision went with and why. Some of the factors we are considering are control set, validation, ease of use, charting, ability to modify/create new controls, etc. Any help would be appreciated.
4
10,799,368
05/29/2012 12:41:38
1,423,594
05/29/2012 11:44:29
1
0
Android app can't login
We develop an application with Phonegap 1.7 and JQM 1.1, and tested in few phones before upload to Play Store. Our application have a login screen and the problem we found is that in the devices we used for tested the application we can't login. On the contrary, in any device that don't have the app previous, it works correctly. I delete the app in the devices that have problems via Settings/Application and via ADB uninstall and reinstall the application from Play Store, and the problem continues. Can you help us, please? Thanks and regards,
android
null
null
null
null
05/30/2012 15:20:33
too localized
Android app can't login === We develop an application with Phonegap 1.7 and JQM 1.1, and tested in few phones before upload to Play Store. Our application have a login screen and the problem we found is that in the devices we used for tested the application we can't login. On the contrary, in any device that don't have the app previous, it works correctly. I delete the app in the devices that have problems via Settings/Application and via ADB uninstall and reinstall the application from Play Store, and the problem continues. Can you help us, please? Thanks and regards,
3
8,174,232
11/17/2011 21:00:19
309,289
04/05/2010 15:05:45
200
8
Teaching Myself WCF and MVC
I are a Softeare developer specialixing in asp.net. As I look for a better job, I find that the two top skills I don't have are WCF and MVC. I'm looking for hints as to how best to teach these skills to myself. I'd also be open to any low cost training. Thanks. Bob
wcf
mvc
null
null
null
11/18/2011 16:00:44
not constructive
Teaching Myself WCF and MVC === I are a Softeare developer specialixing in asp.net. As I look for a better job, I find that the two top skills I don't have are WCF and MVC. I'm looking for hints as to how best to teach these skills to myself. I'd also be open to any low cost training. Thanks. Bob
4
10,969,481
06/10/2012 14:26:32
340,225
05/13/2010 11:42:37
27
4
usage of project folder inside android data/data
I am thinking about the usage of project app folder inside data/data/com.myapp.main in android file system. For examples like CACHE folder, database folder, lib folder etc... inside data/data/com.ayppp.main. Do people like samsung/htc change or edit those folders and files inside according to their requirement or is it promised that it wont change and will remain as its in all android versions and devices ? thanks.
java
android
htc
android-4.0
samsung-mobile
null
open
usage of project folder inside android data/data === I am thinking about the usage of project app folder inside data/data/com.myapp.main in android file system. For examples like CACHE folder, database folder, lib folder etc... inside data/data/com.ayppp.main. Do people like samsung/htc change or edit those folders and files inside according to their requirement or is it promised that it wont change and will remain as its in all android versions and devices ? thanks.
0
3,667,318
09/08/2010 11:41:23
375,958
06/25/2010 06:23:20
222
10
Did Open Source World Need A New Programming Language?
Lets look around for famous programming languages and their runtime environments and frameworks... - C, C++ are hard and complex for a small and simple application. - Java is going to be a commercial stuff for Oracle. - PHP is good but only about web. - C#, VB.NET and commonly .NET Framework is Microsoft product. - Mono project? A few people trust it as i saw! - Python and ruby and ... They are good but not good enough!- I hope i don't forget any other famous language! My question is: Did Open Source World Need A New Great Programming Language?
open-source
programming-languages
null
null
null
09/08/2010 11:56:58
not a real question
Did Open Source World Need A New Programming Language? === Lets look around for famous programming languages and their runtime environments and frameworks... - C, C++ are hard and complex for a small and simple application. - Java is going to be a commercial stuff for Oracle. - PHP is good but only about web. - C#, VB.NET and commonly .NET Framework is Microsoft product. - Mono project? A few people trust it as i saw! - Python and ruby and ... They are good but not good enough!- I hope i don't forget any other famous language! My question is: Did Open Source World Need A New Great Programming Language?
1
11,478,610
07/13/2012 21:26:06
1,274,387
03/16/2012 15:33:37
1
0
Where can I found service or software B2B to help me to choose the best supplier with the best price for a product?
for example just with UPC number for a product the service or the software find me the best price from a supplier.
web-services
software-engineering
business
software-tools
b2b
07/15/2012 00:35:43
not constructive
Where can I found service or software B2B to help me to choose the best supplier with the best price for a product? === for example just with UPC number for a product the service or the software find me the best price from a supplier.
4
8,715,647
01/03/2012 16:51:08
140,367
07/17/2009 18:53:45
4,919
214
How can I create a static library in nasm and link with gcc?
I would like to implement a number of functions in (32bit) NASM that have the following signature: int function1(); int function2(); etc. Then I want to create an object file and be able to statically link it with a C++ program compiled with gcc. I am looking for an example implementation of a function that returns an int, any additional code needed to export the symbols and the command line for NASM to produce a .a file that I can link to statically. Thanks in advance.
c++
gcc
static-libraries
nasm
null
null
open
How can I create a static library in nasm and link with gcc? === I would like to implement a number of functions in (32bit) NASM that have the following signature: int function1(); int function2(); etc. Then I want to create an object file and be able to statically link it with a C++ program compiled with gcc. I am looking for an example implementation of a function that returns an int, any additional code needed to export the symbols and the command line for NASM to produce a .a file that I can link to statically. Thanks in advance.
0
3,704,234
09/13/2010 20:42:20
286,149
03/04/2010 10:10:28
48
0
Java usage and licensing in web projects
If I wanted to create a commercial web-project (like e.g. facebook) with a Java backend (created with the Java SDK) which generates a "normal" HTML frontend, would I have to purchase a commercial license from SUN/Oracle? Or does this only apply to applications written in Java which are directly being shipped to a customer?
java
licensing
null
null
null
07/17/2012 04:40:47
off topic
Java usage and licensing in web projects === If I wanted to create a commercial web-project (like e.g. facebook) with a Java backend (created with the Java SDK) which generates a "normal" HTML frontend, would I have to purchase a commercial license from SUN/Oracle? Or does this only apply to applications written in Java which are directly being shipped to a customer?
2
9,762,644
03/18/2012 21:53:09
1,275,742
03/17/2012 12:48:37
8
0
Detect Child id and call a slide toggle on it
Basically I have a series of projects displayed on the page. Each project consists of a container div, an image div inside, then a button inside that div. With another div there which is set to 'Display:none'. When the user clicks the 'button inside' the div set to 'display:none' slideToggles on each click... I will have many of these on a page and am currently having to add new lines of code for the new 'id' of the button and the sliding div... Is there a way to detect the sliding div which is a child to the image div? The current code I am using is: $(function(){ $("#lifestyledropdown").click(function(event) {event.preventDefault(); $("#lifestyleimages").slideToggle(); }); $("#camarguedropdown").click(function(event) {event.preventDefault(); $("#camargueimages").slideToggle(); }); }); Each follow the same pattern: Project 1: div id = 'name-A'dropdown (id of the button to activate the slide toggle) div id = 'name-A'images (id of the div that slides down) Project 2: div id = 'name-B'dropdown (id of the button to activate the slide toggle) div id = 'name-B'images (id of the div that slides down) Each project will have the same layout just different content so I am assuming I can use a code to detect the 'name section'?
javascript
design-patterns
slidetoggle
null
null
null
open
Detect Child id and call a slide toggle on it === Basically I have a series of projects displayed on the page. Each project consists of a container div, an image div inside, then a button inside that div. With another div there which is set to 'Display:none'. When the user clicks the 'button inside' the div set to 'display:none' slideToggles on each click... I will have many of these on a page and am currently having to add new lines of code for the new 'id' of the button and the sliding div... Is there a way to detect the sliding div which is a child to the image div? The current code I am using is: $(function(){ $("#lifestyledropdown").click(function(event) {event.preventDefault(); $("#lifestyleimages").slideToggle(); }); $("#camarguedropdown").click(function(event) {event.preventDefault(); $("#camargueimages").slideToggle(); }); }); Each follow the same pattern: Project 1: div id = 'name-A'dropdown (id of the button to activate the slide toggle) div id = 'name-A'images (id of the div that slides down) Project 2: div id = 'name-B'dropdown (id of the button to activate the slide toggle) div id = 'name-B'images (id of the div that slides down) Each project will have the same layout just different content so I am assuming I can use a code to detect the 'name section'?
0
4,136,708
11/09/2010 17:38:19
420,555
08/14/2010 18:32:26
81
2
ASP.NET MVC 3 books plans
Does anybody know when first ASP.NET MVC 3 books will come out? I know it is kind of early to ask but I'm wondering if there are some release dates from Apress, Wrox or any other publisher.
asp.net-mvc-3
null
null
null
null
09/27/2011 14:56:42
not constructive
ASP.NET MVC 3 books plans === Does anybody know when first ASP.NET MVC 3 books will come out? I know it is kind of early to ask but I'm wondering if there are some release dates from Apress, Wrox or any other publisher.
4
9,187,723
02/08/2012 04:05:53
1,196,271
02/08/2012 03:58:05
1
0
How to integrate alfreshco with a Tomcat JAVA application
i am having a Java application. Now we have a requirement to create forum with expert advises and chatting options etc. Also, video upload/download options. To do so, we are planning to use Alfreshco. Now my questions is, how do i integrate the alfreshco from my java application and what are all the steps to proceed? Thanks a lot for your help in advance. thanks and regards Srikant
java
null
null
null
null
02/09/2012 17:08:00
not a real question
How to integrate alfreshco with a Tomcat JAVA application === i am having a Java application. Now we have a requirement to create forum with expert advises and chatting options etc. Also, video upload/download options. To do so, we are planning to use Alfreshco. Now my questions is, how do i integrate the alfreshco from my java application and what are all the steps to proceed? Thanks a lot for your help in advance. thanks and regards Srikant
1
11,656,355
07/25/2012 18:35:37
1,213,334
02/16/2012 08:17:50
450
38
iOS + cocos2d. Frameworks or libraries for local highscores?
All the frameworks or libraries for highscores I've seen are for social networks or score sharing. But I want to save highscores on a current device only
iphone
ios
frameworks
cocos2d-iphone
scoring
07/25/2012 19:01:30
not a real question
iOS + cocos2d. Frameworks or libraries for local highscores? === All the frameworks or libraries for highscores I've seen are for social networks or score sharing. But I want to save highscores on a current device only
1
5,596,416
04/08/2011 14:16:21
698,803
04/08/2011 14:16:21
1
0
How to keep stable positions in BaseAdapter.getView for created views?
it seems to be a problem keeping positions for already created views in BaseAdapter.getView(). In my case I've created an data-object(-array) holding all my data for a listview. There are three types of listitems: seperators, items with checkbox and items with an clickable image to open a dialog. That data will performed by a customized array-adapter, always with a separate layout. For that I used different viewholders. Creation is not the problem, but if the recycler starts it's work all indizes/positions are changed. But on that indizes my data are based on. I know how the recycler works, but how (in hell) the programmer should keep the relation to it's own data? Here in stackoverflow.com some people asked the same questions, and the answer was 'override getItemViewType-Methode'. No problem, but if position always changes, that not really helps, right? Have someone a solution? Regards Pierre
android
null
null
null
null
null
open
How to keep stable positions in BaseAdapter.getView for created views? === it seems to be a problem keeping positions for already created views in BaseAdapter.getView(). In my case I've created an data-object(-array) holding all my data for a listview. There are three types of listitems: seperators, items with checkbox and items with an clickable image to open a dialog. That data will performed by a customized array-adapter, always with a separate layout. For that I used different viewholders. Creation is not the problem, but if the recycler starts it's work all indizes/positions are changed. But on that indizes my data are based on. I know how the recycler works, but how (in hell) the programmer should keep the relation to it's own data? Here in stackoverflow.com some people asked the same questions, and the answer was 'override getItemViewType-Methode'. No problem, but if position always changes, that not really helps, right? Have someone a solution? Regards Pierre
0
10,111,294
04/11/2012 17:52:52
1,212,133
02/15/2012 18:34:37
3
1
how to read data from excel sheet and store into mysql database
i've a requirement in java(spring) to read data from an excel sheet and store in mysql database,here i've to read data from excel sheet for every 5mins only one row for each read and store in mysql database.can anyone help me how to do this. thanks in advance.
mysql
apache
null
null
null
04/30/2012 13:56:38
not a real question
how to read data from excel sheet and store into mysql database === i've a requirement in java(spring) to read data from an excel sheet and store in mysql database,here i've to read data from excel sheet for every 5mins only one row for each read and store in mysql database.can anyone help me how to do this. thanks in advance.
1
5,805,051
04/27/2011 13:38:40
727,386
04/27/2011 13:38:40
1
0
Storing vector array in a file and then again loading.
Okay, I know there exist some serialization libraries for C++, but I need something simple. I am testing the SDL library by writing a game prototype and I need a way to store some specific map data to a file and then read it back into objects (serialization). Specifically: - std::string with a map name - A Vector string array for tilesets - A 3D Vector<Tile> array for the map tiles. (x,y,z of the tile, z is used for multiple layers) Tile class has the following features: TileID and PassageID (The ID of the tile and the passability setting), which are both integers (I use an enum for easier disambiguation). It would be good if the methods would be easily expandable so I can add some more variables to them. I would be thankful if you guys could make me two methods, one for serializing these objects and writing to file, and one for loading these objects from a file. Thank you!
c++
file
serialization
stdvector
null
04/27/2011 14:09:23
not a real question
Storing vector array in a file and then again loading. === Okay, I know there exist some serialization libraries for C++, but I need something simple. I am testing the SDL library by writing a game prototype and I need a way to store some specific map data to a file and then read it back into objects (serialization). Specifically: - std::string with a map name - A Vector string array for tilesets - A 3D Vector<Tile> array for the map tiles. (x,y,z of the tile, z is used for multiple layers) Tile class has the following features: TileID and PassageID (The ID of the tile and the passability setting), which are both integers (I use an enum for easier disambiguation). It would be good if the methods would be easily expandable so I can add some more variables to them. I would be thankful if you guys could make me two methods, one for serializing these objects and writing to file, and one for loading these objects from a file. Thank you!
1
9,696,933
03/14/2012 06:24:19
259,624
01/26/2010 22:31:42
33
1
RFID and Camera Project
Specifics, I would like to do the following: 1) Have an RFID reader at home that connects it's output line to an IP camera (Done) 2) The RFID reader has some software that can send me the "tag" scanned via the internet (Done). I assign the ip and port. 3) The IP camera will trigger with the output sent from the RFID reader (Done) 4) I want to develop a web-app that takes in the RFID info of the tag scanned and sends me an e-mail with a temporary user and password so I can view the ip camera (which is already pointing to some ip) online for some x number of minutes. Alternatively, I can record the session in the sever and download the video that was recorded 5 minutes or so after the RFID sent the info to my server. I would like to work on this through RoR (which I am familiar with) and start a simple app. I'd probably have to have a database listening on some port on my server and then process that information. Each tag will match an e-mail (i.e. mom, dad) and send them a temporary user/pass so they can download that session or view it. Any tips are greatly appreciated.
ruby-on-rails
web-services
rfid
null
null
null
open
RFID and Camera Project === Specifics, I would like to do the following: 1) Have an RFID reader at home that connects it's output line to an IP camera (Done) 2) The RFID reader has some software that can send me the "tag" scanned via the internet (Done). I assign the ip and port. 3) The IP camera will trigger with the output sent from the RFID reader (Done) 4) I want to develop a web-app that takes in the RFID info of the tag scanned and sends me an e-mail with a temporary user and password so I can view the ip camera (which is already pointing to some ip) online for some x number of minutes. Alternatively, I can record the session in the sever and download the video that was recorded 5 minutes or so after the RFID sent the info to my server. I would like to work on this through RoR (which I am familiar with) and start a simple app. I'd probably have to have a database listening on some port on my server and then process that information. Each tag will match an e-mail (i.e. mom, dad) and send them a temporary user/pass so they can download that session or view it. Any tips are greatly appreciated.
0
11,593,034
07/21/2012 14:34:49
581,315
01/19/2011 11:13:03
1
0
How many classes per unit are advisable to have?
My question is specific to Delphi. I think that in Java and C# world it is a rather accepted practice to generally have one module per class. I think this is a good rule to follow in Delphi too, because in Delphi private members aren't really private if you have more than one class in a unit. So I was surprised to hear from two different senior (and probably more experienced than I am) programmers tell me I divide my code too much. One of them told me to not be shy about placing 5-6 classes in a unit. Is there some issue with "one class per module" rule that I am not aware of? And is "5-6 classes per unit" a good recommendation? I do not mean to take these rules as absolutes. Surely there can be situations when it is appropriate to do either way. I am asking about the general rule.
delphi
delphi-7
null
null
null
07/24/2012 02:51:00
not constructive
How many classes per unit are advisable to have? === My question is specific to Delphi. I think that in Java and C# world it is a rather accepted practice to generally have one module per class. I think this is a good rule to follow in Delphi too, because in Delphi private members aren't really private if you have more than one class in a unit. So I was surprised to hear from two different senior (and probably more experienced than I am) programmers tell me I divide my code too much. One of them told me to not be shy about placing 5-6 classes in a unit. Is there some issue with "one class per module" rule that I am not aware of? And is "5-6 classes per unit" a good recommendation? I do not mean to take these rules as absolutes. Surely there can be situations when it is appropriate to do either way. I am asking about the general rule.
4
10,071,025
04/09/2012 09:00:06
1,201,289
02/10/2012 05:02:38
13
3
google codejam : how to submit answer
i am participating in google codejam 2012. I have red their [Quick start guide](http://code.google.com/codejam/quickstart.html) . But i still unable to understand how to submit the answer. I have following question: 1> It's said that, we have to download the test cases (.in file) and run our program by using it. I just want to know if i have to make a method to extract input from .in file for that or enter it manually to verify the working? 2> When submit our answer, do we have to submit .txt file or .exe file(Am using c language)? Thanks in advance
c++
c
google
google-code-jam
null
04/09/2012 12:11:04
off topic
google codejam : how to submit answer === i am participating in google codejam 2012. I have red their [Quick start guide](http://code.google.com/codejam/quickstart.html) . But i still unable to understand how to submit the answer. I have following question: 1> It's said that, we have to download the test cases (.in file) and run our program by using it. I just want to know if i have to make a method to extract input from .in file for that or enter it manually to verify the working? 2> When submit our answer, do we have to submit .txt file or .exe file(Am using c language)? Thanks in advance
2
11,119,398
06/20/2012 12:18:24
998,667
10/17/2011 07:02:03
191
15
UIPageViewController spine in corner
Is it possible to make UIPageViewController to turn pages to corner, not to screen edge? I understand that it is not provided as is, but may be there are some tricks?
objective-c
ios
cocoa-touch
uipageviewcontroller
null
null
open
UIPageViewController spine in corner === Is it possible to make UIPageViewController to turn pages to corner, not to screen edge? I understand that it is not provided as is, but may be there are some tricks?
0
4,466,214
12/16/2010 23:01:32
229,072
12/10/2009 19:12:50
599
22
Create a union or join on the values returned from groovy sql.rows()
I am using groovys sql.rows(SPCallString) function to call a stored procedure which is returning some rows based off the arguments. I am doing this for 3 different stored procedures. Is there a way in groovy I can perform a "union" on those rows that are returned from the three calls? I basically want something like this: if thesea re the rows returned from sql.rows for each of the three calls, ->"X","Y", "M" ->"X","Y", "P" ->"X","Y", "Q" I want to return ->"X","Y", "M,P,Q" Thanks!
java
sql
groovy
null
null
null
open
Create a union or join on the values returned from groovy sql.rows() === I am using groovys sql.rows(SPCallString) function to call a stored procedure which is returning some rows based off the arguments. I am doing this for 3 different stored procedures. Is there a way in groovy I can perform a "union" on those rows that are returned from the three calls? I basically want something like this: if thesea re the rows returned from sql.rows for each of the three calls, ->"X","Y", "M" ->"X","Y", "P" ->"X","Y", "Q" I want to return ->"X","Y", "M,P,Q" Thanks!
0
8,952,797
01/21/2012 11:59:31
1,118,771
12/28/2011 05:59:05
35
0
how to set progress bar in file uploading using jquery?
Hi i am uploading multiple files in php so i need to get progress status for uploading files please any one guide me. Thanks for Advance.
php
jquery
php5
file-upload
null
07/19/2012 15:18:09
not a real question
how to set progress bar in file uploading using jquery? === Hi i am uploading multiple files in php so i need to get progress status for uploading files please any one guide me. Thanks for Advance.
1
9,769,096
03/19/2012 11:11:04
1,273,427
03/16/2012 07:12:53
1
0
Implementing Sign in using Twitter, Omniauth and Devise
I am referring to these railscasts for implementing signing in using twitter, omniauth and devise: 1. http://railscasts.com/episodes/235-omniauth-part-1?view=asciicast 2. http://railscasts.com/episodes/236-omniauth-part-2?view=asciicast **Scenario:** A twitter user comes to my app. Clicks on the Twitter link to sign in and is taken to /auth/twitter. He allows my app on the twitter site and is redirected back to my app. He enters his email id on my site as that is mandatory. He uses the site and then signs out of my app. He then wants to log back in again. He clicks on the Twitter sign in icon again. **My problem:** I expected that he would not have to authorize my app once again on the twitter site. But, that is not the case. This time again, twitter asks this user to authorize. My code follows the railscasts exactly: <routes.rb> match '/auth/:provider/callback' => 'authentications#create' class AuthenticationsController < ApplicationController ... def create omniauth = request.env["omniauth.auth"] authentication = Authentication.find_by_provider_and_uid(omniauth['provider'], omniauth['uid']) if authentication flash[:notice] = "Signed in successfully." sign_in_and_redirect(:user, authentication.user) elsif current_user current_user.authentications.create(:provider => omniauth['provider'], :uid => omniauth['uid']) flash[:notice] = "Authentication successful." redirect_to authentications_url else user = User.new user.apply_omniauth(omniauth) if user.save flash[:notice] = "Signed in successfully." sign_in_and_redirect(:user, user) else session[:omniauth] = omniauth.except('extra') redirect_to new_user_registration_url end end end ... end User model from Devise is modified as: class User < ActiveRecord::Base devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable # Setup accessible (or protected) attributes for your model attr_accessible :email, :password, :password_confirmation, :remember_me has_many :authentications def apply_omniauth(omniauth) authentications.build(:provider => omniauth['provider'], :uid => omniauth['uid']) end def password_required? (authentications.empty? || !password.blank?) && super end end What do I need to do to ensure that a returning user is not asked to authorize my app everytime s/he is redirected to /auth/twitter ???
twitter
devise
omniauth
null
null
null
open
Implementing Sign in using Twitter, Omniauth and Devise === I am referring to these railscasts for implementing signing in using twitter, omniauth and devise: 1. http://railscasts.com/episodes/235-omniauth-part-1?view=asciicast 2. http://railscasts.com/episodes/236-omniauth-part-2?view=asciicast **Scenario:** A twitter user comes to my app. Clicks on the Twitter link to sign in and is taken to /auth/twitter. He allows my app on the twitter site and is redirected back to my app. He enters his email id on my site as that is mandatory. He uses the site and then signs out of my app. He then wants to log back in again. He clicks on the Twitter sign in icon again. **My problem:** I expected that he would not have to authorize my app once again on the twitter site. But, that is not the case. This time again, twitter asks this user to authorize. My code follows the railscasts exactly: <routes.rb> match '/auth/:provider/callback' => 'authentications#create' class AuthenticationsController < ApplicationController ... def create omniauth = request.env["omniauth.auth"] authentication = Authentication.find_by_provider_and_uid(omniauth['provider'], omniauth['uid']) if authentication flash[:notice] = "Signed in successfully." sign_in_and_redirect(:user, authentication.user) elsif current_user current_user.authentications.create(:provider => omniauth['provider'], :uid => omniauth['uid']) flash[:notice] = "Authentication successful." redirect_to authentications_url else user = User.new user.apply_omniauth(omniauth) if user.save flash[:notice] = "Signed in successfully." sign_in_and_redirect(:user, user) else session[:omniauth] = omniauth.except('extra') redirect_to new_user_registration_url end end end ... end User model from Devise is modified as: class User < ActiveRecord::Base devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable # Setup accessible (or protected) attributes for your model attr_accessible :email, :password, :password_confirmation, :remember_me has_many :authentications def apply_omniauth(omniauth) authentications.build(:provider => omniauth['provider'], :uid => omniauth['uid']) end def password_required? (authentications.empty? || !password.blank?) && super end end What do I need to do to ensure that a returning user is not asked to authorize my app everytime s/he is redirected to /auth/twitter ???
0
7,538,713
09/24/2011 11:29:22
147,572
07/30/2009 03:47:25
113
1
UINavigationBar displays incorrectly when combine with UITabBarController
I'm trying to create Home Screen for UITabBarViewController with another UINavigationViewController and UIViewController Subclass. In application,There are: - two Tab for loading NewsController and VideoController - HomeViewController that loads immediately when application finish launch. This is my application shot screen. HomeViewController ![enter image description here][1] NavigationBar show a half NewsViewController ![enter image description here][2] This is my code. //In TabBarWithHomeDelegate.m - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { homeViewController = [[HomeViewController alloc]init]; UINavigationController *nav = [[UINavigationController alloc]init]; nav.navigationItem.title = @"Tab 1 Data"; [nav pushViewController:homeViewController animated:NO]; [self.tabBarController setSelectedViewController:nav]; self.window.rootViewController = self.tabBarController; [self.window makeKeyAndVisible]; return YES; } //In NewsViewController.m for touching on home button -(IBAction) homeButtonClick:(id)sender { TabBarWithHomeAppDelegate * appDelegate = [[UIApplication sharedApplication] delegate]; UITabBarController * tabBarController = appDelegate.tabBarController; [tabBarController setSelectedViewController:nil]; [tabBarController setSelectedViewController:appDelegate.homeViewController]; } In addition, I have attached source code. I'm will be grad if you see that and help me to solve this. In fact, I try to do it myself almost 6 hours. [link to download source code.][3] [1]: http://i.stack.imgur.com/kqVLB.png [2]: http://i.stack.imgur.com/nKDLn.png [3]: http://codesanook.com/code/TabBarWithHome.zip
iphone
cocoa-touch
ios4
uinavigationcontroller
uitabbarcontroller
null
open
UINavigationBar displays incorrectly when combine with UITabBarController === I'm trying to create Home Screen for UITabBarViewController with another UINavigationViewController and UIViewController Subclass. In application,There are: - two Tab for loading NewsController and VideoController - HomeViewController that loads immediately when application finish launch. This is my application shot screen. HomeViewController ![enter image description here][1] NavigationBar show a half NewsViewController ![enter image description here][2] This is my code. //In TabBarWithHomeDelegate.m - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { homeViewController = [[HomeViewController alloc]init]; UINavigationController *nav = [[UINavigationController alloc]init]; nav.navigationItem.title = @"Tab 1 Data"; [nav pushViewController:homeViewController animated:NO]; [self.tabBarController setSelectedViewController:nav]; self.window.rootViewController = self.tabBarController; [self.window makeKeyAndVisible]; return YES; } //In NewsViewController.m for touching on home button -(IBAction) homeButtonClick:(id)sender { TabBarWithHomeAppDelegate * appDelegate = [[UIApplication sharedApplication] delegate]; UITabBarController * tabBarController = appDelegate.tabBarController; [tabBarController setSelectedViewController:nil]; [tabBarController setSelectedViewController:appDelegate.homeViewController]; } In addition, I have attached source code. I'm will be grad if you see that and help me to solve this. In fact, I try to do it myself almost 6 hours. [link to download source code.][3] [1]: http://i.stack.imgur.com/kqVLB.png [2]: http://i.stack.imgur.com/nKDLn.png [3]: http://codesanook.com/code/TabBarWithHome.zip
0
8,957,886
01/22/2012 00:10:00
1,305,450
05/18/2010 20:04:55
1
1
Impersonation and DirectoryEntry
I am impersonating a user account successfully, but I am not able to use the impersonated account to bind to AD and pull down a DirectoryEntry. <pre> The below code outputs: Before impersonation I am: DOMAIN\user After impersonation I am: DOMAIN\admin Error: C:\Users\user\ADSI_Impersonation\bin\Debug\ADSI_Impersonation.exe samaccountname: </pre> My issue seems similar to: <pre> How to use the System.DirectoryServices namespace in ASP.NET http://support.microsoft.com/kb/329986 </pre> I am obtaining a primary token. I understand that I need to use delegation to use the impersonated token on a remote computer. I confirmed that the account doesn't have the flag checked "Account is sensitive and cannot be delegated". I also confirmed that the Local Group Policy and Domain Group Policies are not preventing delegation: Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\ What am I missing? Thanks! <pre><code> using System; using System.DirectoryServices; using System.Security; using System.Security.Principal; using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; using System.Runtime.ConstrainedExecution; namespace ADSI_Impersonation { class Program { [DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Unicode)] public static extern bool LogonUser(String lpszUsername, String lpszDomain, String lpszPassword, int dwLogonType, int dwLogonProvider, out SafeTokenHandle phToken); [DllImport("kernel32.dll", CharSet = CharSet.Auto)] public static extern bool CloseHandle(IntPtr handle); static void Main(string[] args) { const int LOGON32_PROVIDER_DEFAULT = 0; const int LOGON32_LOGON_INTERACTIVE = 2; string userName = "admin@domain.com"; string password = "password"; Console.WriteLine("Before impersonation I am: " + WindowsIdentity.GetCurrent().Name); SafeTokenHandle safeTokenHandle; try { bool returnValue = LogonUser(userName, null, password, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, out safeTokenHandle); if (returnValue) { WindowsIdentity newId = new WindowsIdentity(safeTokenHandle.DangerousGetHandle()); WindowsImpersonationContext impersonatedUser = newId.Impersonate(); } else { Console.WriteLine("Unable to create impersonatedUser."); return; } } catch (Exception e) { Console.WriteLine("Authentication error.\r\n" + e.Message); } Console.WriteLine("After impersonation I am: " + WindowsIdentity.GetCurrent().Name); string OU = "LDAP://dc=domain,dc=com"; DirectoryEntry entry = new DirectoryEntry(OU); entry.AuthenticationType = AuthenticationTypes.Secure; DirectorySearcher mySearcher = new DirectorySearcher(); mySearcher.SearchRoot = entry; mySearcher.SearchScope = System.DirectoryServices.SearchScope.Subtree; mySearcher.PropertiesToLoad.Add("cn"); mySearcher.PropertiesToLoad.Add("samaccountname"); string cn = "fistname mi. lastname"; string samaccountname = ""; try { // Create the LDAP query and send the request mySearcher.Filter = "(cn=" + cn + ")"; SearchResultCollection searchresultcollection = mySearcher.FindAll(); DirectoryEntry ADentry = searchresultcollection[0].GetDirectoryEntry(); Console.WriteLine("samaccountname: " + ADentry.Properties["samaccountname"].Value.ToString()); } catch (Exception e) { Console.WriteLine("Error: " + e.Message); } Console.WriteLine("samaccountname: " + samaccountname); Console.ReadLine(); } } public sealed class SafeTokenHandle : SafeHandleZeroOrMinusOneIsInvalid { private SafeTokenHandle() : base(true) { } [DllImport("kernel32.dll")] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] [SuppressUnmanagedCodeSecurity] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool CloseHandle(IntPtr handle); protected override bool ReleaseHandle() { return CloseHandle(handle); } } } </pre></code>
c#
impersonation
directoryentry
null
null
null
open
Impersonation and DirectoryEntry === I am impersonating a user account successfully, but I am not able to use the impersonated account to bind to AD and pull down a DirectoryEntry. <pre> The below code outputs: Before impersonation I am: DOMAIN\user After impersonation I am: DOMAIN\admin Error: C:\Users\user\ADSI_Impersonation\bin\Debug\ADSI_Impersonation.exe samaccountname: </pre> My issue seems similar to: <pre> How to use the System.DirectoryServices namespace in ASP.NET http://support.microsoft.com/kb/329986 </pre> I am obtaining a primary token. I understand that I need to use delegation to use the impersonated token on a remote computer. I confirmed that the account doesn't have the flag checked "Account is sensitive and cannot be delegated". I also confirmed that the Local Group Policy and Domain Group Policies are not preventing delegation: Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\ What am I missing? Thanks! <pre><code> using System; using System.DirectoryServices; using System.Security; using System.Security.Principal; using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; using System.Runtime.ConstrainedExecution; namespace ADSI_Impersonation { class Program { [DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Unicode)] public static extern bool LogonUser(String lpszUsername, String lpszDomain, String lpszPassword, int dwLogonType, int dwLogonProvider, out SafeTokenHandle phToken); [DllImport("kernel32.dll", CharSet = CharSet.Auto)] public static extern bool CloseHandle(IntPtr handle); static void Main(string[] args) { const int LOGON32_PROVIDER_DEFAULT = 0; const int LOGON32_LOGON_INTERACTIVE = 2; string userName = "admin@domain.com"; string password = "password"; Console.WriteLine("Before impersonation I am: " + WindowsIdentity.GetCurrent().Name); SafeTokenHandle safeTokenHandle; try { bool returnValue = LogonUser(userName, null, password, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, out safeTokenHandle); if (returnValue) { WindowsIdentity newId = new WindowsIdentity(safeTokenHandle.DangerousGetHandle()); WindowsImpersonationContext impersonatedUser = newId.Impersonate(); } else { Console.WriteLine("Unable to create impersonatedUser."); return; } } catch (Exception e) { Console.WriteLine("Authentication error.\r\n" + e.Message); } Console.WriteLine("After impersonation I am: " + WindowsIdentity.GetCurrent().Name); string OU = "LDAP://dc=domain,dc=com"; DirectoryEntry entry = new DirectoryEntry(OU); entry.AuthenticationType = AuthenticationTypes.Secure; DirectorySearcher mySearcher = new DirectorySearcher(); mySearcher.SearchRoot = entry; mySearcher.SearchScope = System.DirectoryServices.SearchScope.Subtree; mySearcher.PropertiesToLoad.Add("cn"); mySearcher.PropertiesToLoad.Add("samaccountname"); string cn = "fistname mi. lastname"; string samaccountname = ""; try { // Create the LDAP query and send the request mySearcher.Filter = "(cn=" + cn + ")"; SearchResultCollection searchresultcollection = mySearcher.FindAll(); DirectoryEntry ADentry = searchresultcollection[0].GetDirectoryEntry(); Console.WriteLine("samaccountname: " + ADentry.Properties["samaccountname"].Value.ToString()); } catch (Exception e) { Console.WriteLine("Error: " + e.Message); } Console.WriteLine("samaccountname: " + samaccountname); Console.ReadLine(); } } public sealed class SafeTokenHandle : SafeHandleZeroOrMinusOneIsInvalid { private SafeTokenHandle() : base(true) { } [DllImport("kernel32.dll")] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] [SuppressUnmanagedCodeSecurity] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool CloseHandle(IntPtr handle); protected override bool ReleaseHandle() { return CloseHandle(handle); } } } </pre></code>
0
5,310,051
03/15/2011 09:55:25
602,676
02/04/2011 05:45:46
53
0
file handling in c# .net
There is a list of things i want to do. I have a forms application. 1) Go to a particular line. I know how to go in a serial manner, but is there any way by which i can jump to a particular line no. 2)To find out total no of line
c#
.net
null
null
null
null
open
file handling in c# .net === There is a list of things i want to do. I have a forms application. 1) Go to a particular line. I know how to go in a serial manner, but is there any way by which i can jump to a particular line no. 2)To find out total no of line
0
11,646,750
07/25/2012 09:32:00
1,547,086
07/23/2012 22:24:26
1
0
Building a web admin interface with Python and JavaScript libraries
Actually I want to build a GUI for a system web admin with Python and Java Script libraries. The web interface should present the logs and reports (raw data, graphs/charts) through the web interface should manage linux services and change configuration files. Would you think it's a good idea that i use a Python framework or not? what's your idea about which framework is better for this work. This framework should have possibility for linking GUI to backend, read data from DB, work with jQuery or AJAX and with high performance. I would really appreciated if someone help me in this situation.
jquery
python
frameworks
null
null
07/25/2012 12:18:39
not a real question
Building a web admin interface with Python and JavaScript libraries === Actually I want to build a GUI for a system web admin with Python and Java Script libraries. The web interface should present the logs and reports (raw data, graphs/charts) through the web interface should manage linux services and change configuration files. Would you think it's a good idea that i use a Python framework or not? what's your idea about which framework is better for this work. This framework should have possibility for linking GUI to backend, read data from DB, work with jQuery or AJAX and with high performance. I would really appreciated if someone help me in this situation.
1
5,547,167
04/05/2011 04:21:53
320,486
04/19/2010 15:17:42
1,058
6
SEO difference algoritm search engine google, yahoo and bing?
dont get me wrong here, each of google yahoo or bing algorithm is a secret, the real question is what is the main difference between 3 search engine when they visit our site? example google uses hl=en bing uses xml:en or etc ? 1. **is there any tips that we have to know before starting implementing SEO to our site ?** *there are good helps around this but none give us an example + difference ? http://meta.stackoverflow.com/questions/14056/seo-in-stackoverflow http://stackoverflow.com/questions/953682/thousands-of-301-redirects-bad-for-seo http://stackoverflow.com/questions/369272/whats-better-for-seo-stackoverflow-com-style-domain-com-91512-some-trimmed-tex Thanks Adam Ramadhan
google
seo
yahoo
bing
null
04/05/2011 09:20:36
not a real question
SEO difference algoritm search engine google, yahoo and bing? === dont get me wrong here, each of google yahoo or bing algorithm is a secret, the real question is what is the main difference between 3 search engine when they visit our site? example google uses hl=en bing uses xml:en or etc ? 1. **is there any tips that we have to know before starting implementing SEO to our site ?** *there are good helps around this but none give us an example + difference ? http://meta.stackoverflow.com/questions/14056/seo-in-stackoverflow http://stackoverflow.com/questions/953682/thousands-of-301-redirects-bad-for-seo http://stackoverflow.com/questions/369272/whats-better-for-seo-stackoverflow-com-style-domain-com-91512-some-trimmed-tex Thanks Adam Ramadhan
1
10,383,362
04/30/2012 12:01:26
395,069
07/18/2010 09:21:17
31
1
Wix: Registry information for .Net assemblies being registered as COM
We have couple of .net assemblies being registered as COM. Normally we register these with RegAsm. To add these in our installers, we used Heat.exe, but we only get this for one of these: <Component Id="MyUtility.tlb" Guid="{32A51956-3779-4182-88F2-4566B4824690}"> <File Id="MyUtility.tlb" KeyPath="yes" Source="SourceDir\MyUtility.tlb" /> <TypeLib Id="{D77831FC-9D4E-4D9A-B773-9A5E6DACD440}" Description="MyUtility" HelpDirectory="RSS" Language="0" MajorVersion="8" MinorVersion="11"> <Interface Id="{05971F63-AB6E-3832-855B-BF78429EEE02}" Name="_RSSUserControl" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" /> <Interface Id="{19B8F61C-F22E-4A7D-A225-B797377CEF6B}" Name="IRSS_COMVisibleInterface" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" /> <Interface Id="{9346DEEF-2EF3-36DC-8095-287957D07F19}" Name="_DisplayRSSFeed" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" /> </TypeLib> </Component> We doubt that this is incomplete information in order to register this on target machine. Is there any other method to get its registration data and merge with our installer? Thanks
regasm
null
null
null
null
null
open
Wix: Registry information for .Net assemblies being registered as COM === We have couple of .net assemblies being registered as COM. Normally we register these with RegAsm. To add these in our installers, we used Heat.exe, but we only get this for one of these: <Component Id="MyUtility.tlb" Guid="{32A51956-3779-4182-88F2-4566B4824690}"> <File Id="MyUtility.tlb" KeyPath="yes" Source="SourceDir\MyUtility.tlb" /> <TypeLib Id="{D77831FC-9D4E-4D9A-B773-9A5E6DACD440}" Description="MyUtility" HelpDirectory="RSS" Language="0" MajorVersion="8" MinorVersion="11"> <Interface Id="{05971F63-AB6E-3832-855B-BF78429EEE02}" Name="_RSSUserControl" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" /> <Interface Id="{19B8F61C-F22E-4A7D-A225-B797377CEF6B}" Name="IRSS_COMVisibleInterface" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" /> <Interface Id="{9346DEEF-2EF3-36DC-8095-287957D07F19}" Name="_DisplayRSSFeed" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" /> </TypeLib> </Component> We doubt that this is incomplete information in order to register this on target machine. Is there any other method to get its registration data and merge with our installer? Thanks
0
9,155,838
02/06/2012 05:15:13
488,505
09/29/2010 12:36:11
515
13
Resolving Bonjour Discovery Dependencies
I have developed the a library to discover Device Using Bonjour Discovery Api. I have installed bonjour sdk in my system so the Unit Test for it is working fine in my machine. But When we run on fresh machine it is crashing.The reason for this Bonjour is not installed on that system.This library is going to be used in Some application. My assumption is to run this library we not run mDNResponder.exe and mdnsNSP.dll. One way to solve the problem is install the Bonjour SDk manually. I am wanted to do it programatically.Please help me do this.
c++
bonjour
zeroconf
null
null
null
open
Resolving Bonjour Discovery Dependencies === I have developed the a library to discover Device Using Bonjour Discovery Api. I have installed bonjour sdk in my system so the Unit Test for it is working fine in my machine. But When we run on fresh machine it is crashing.The reason for this Bonjour is not installed on that system.This library is going to be used in Some application. My assumption is to run this library we not run mDNResponder.exe and mdnsNSP.dll. One way to solve the problem is install the Bonjour SDk manually. I am wanted to do it programatically.Please help me do this.
0
11,515,722
07/17/2012 03:40:59
1,390,558
05/12/2012 02:38:43
6
0
Programming simultaneously in an IDE with team members
Tried looking on the net for this with not much luck does anyone know if you can actually code simultaneously on the same piece of code with team members ie we can all work from home but still on the same piece of code at the same time?
netbeans
null
null
null
null
07/17/2012 08:12:25
not a real question
Programming simultaneously in an IDE with team members === Tried looking on the net for this with not much luck does anyone know if you can actually code simultaneously on the same piece of code with team members ie we can all work from home but still on the same piece of code at the same time?
1
7,664,425
10/05/2011 16:16:10
887,142
08/10/2011 03:58:28
278
1
Will I need some kind of caching mechanism for this?
I've started building an application that part of which allows users to split-test and rotate offers, setting minimum and maximum amounts of traffic for a particular url, and a time to reset. So, for example, one user might enter the url `http://www.example.com`, a minimum of `90` hits, a maximum of `150` and a time until reset of `1 hour`. Every hour, a number will be chosen from between the two, and become the new hit amount for that hour. Once the the number of hits for `http://www.example.com` has been reached within an hour `http://www.example.com` will be removed from the list, until the next reset. All in all, on a page load, at least 3-4 database queries are made at different points throughout. **Here are my questions:** Is this sustainable with large traffic amounts, say `2,500+` requests per hour without some kind of caching mechanism (which is almost impossible to build, because hit's need to be exact and updated on request, so I don't see how a cache could be built in this instance)? What are the variables/factors that will determine whether or not this will be doable? I realize my questions a little, "iffy", so please do ask clarification if you need it :)! Any advice, comments, answers would be greatly appreciated!
php
mysql
null
null
null
10/05/2011 23:32:40
not constructive
Will I need some kind of caching mechanism for this? === I've started building an application that part of which allows users to split-test and rotate offers, setting minimum and maximum amounts of traffic for a particular url, and a time to reset. So, for example, one user might enter the url `http://www.example.com`, a minimum of `90` hits, a maximum of `150` and a time until reset of `1 hour`. Every hour, a number will be chosen from between the two, and become the new hit amount for that hour. Once the the number of hits for `http://www.example.com` has been reached within an hour `http://www.example.com` will be removed from the list, until the next reset. All in all, on a page load, at least 3-4 database queries are made at different points throughout. **Here are my questions:** Is this sustainable with large traffic amounts, say `2,500+` requests per hour without some kind of caching mechanism (which is almost impossible to build, because hit's need to be exact and updated on request, so I don't see how a cache could be built in this instance)? What are the variables/factors that will determine whether or not this will be doable? I realize my questions a little, "iffy", so please do ask clarification if you need it :)! Any advice, comments, answers would be greatly appreciated!
4
10,074,023
04/09/2012 13:35:04
1,277,316
03/18/2012 19:07:52
8
0
How to make radius only in top border in css?
In my site I need to make radius only on top of paragraph, div... but I don't know how to do this. Can someone help me?
html
css
radius
null
null
04/09/2012 16:33:44
not a real question
How to make radius only in top border in css? === In my site I need to make radius only on top of paragraph, div... but I don't know how to do this. Can someone help me?
1
8,940,845
01/20/2012 11:38:48
995,678
10/14/2011 15:28:02
1
0
the calling thread cannot access this object because a different thread owns it in wpf
private void Window_Loaded(object sender, RoutedEventArgs e) { bw.DoWork += new DoWorkEventHandler(bw_DoWork); } private void btnAddGroup_Click(object sender, RoutedEventArgs e) { if (bw.IsBusy != true) { bw.RunWorkerAsync(); } } System.Timers.Timer timer = null; private void bw_DoWork(object sender, DoWorkEventArgs e) { timer = new System.Timers.Timer(); timer.Interval = 1000; timer.Enabled = true; timer.Elapsed += new ElapsedEventHandler(UpdateChatContent); } public void UpdateChatContent() { var myVar=(from a in db select a).tolist(); datagrid1.itemsSource=myVar;//here is the exception occurs }
c#
null
null
null
null
01/21/2012 03:40:35
not a real question
the calling thread cannot access this object because a different thread owns it in wpf === private void Window_Loaded(object sender, RoutedEventArgs e) { bw.DoWork += new DoWorkEventHandler(bw_DoWork); } private void btnAddGroup_Click(object sender, RoutedEventArgs e) { if (bw.IsBusy != true) { bw.RunWorkerAsync(); } } System.Timers.Timer timer = null; private void bw_DoWork(object sender, DoWorkEventArgs e) { timer = new System.Timers.Timer(); timer.Interval = 1000; timer.Enabled = true; timer.Elapsed += new ElapsedEventHandler(UpdateChatContent); } public void UpdateChatContent() { var myVar=(from a in db select a).tolist(); datagrid1.itemsSource=myVar;//here is the exception occurs }
1
5,242,086
03/09/2011 06:14:42
651,027
03/09/2011 06:14:42
1
0
script in python
writing script in python by reading a log file and generate a graphical report. Could any one help me how to proceeed.I am new to programming
python
null
null
null
null
03/09/2011 06:20:51
not a real question
script in python === writing script in python by reading a log file and generate a graphical report. Could any one help me how to proceeed.I am new to programming
1
4,340,845
12/02/2010 22:51:25
210,780
11/13/2009 22:30:25
124
6
Two Classes In Two Units With The Same Class Name in Delphi
I Have a case in Delphi such as: Unit A contains class "One" Unit B contains class "One" I'm in a class that uses unit A and want to use a static function from the class One in B; how do I do it? In C#, I'd write something like: B.One.SomeProcedure Or even I would use "using" to "rename" one namespace. What can I do in Delphi? (Removing the "uses" for unit A is not an option, nor is renaming one of the two classes.)
delphi
namespaces
null
null
null
null
open
Two Classes In Two Units With The Same Class Name in Delphi === I Have a case in Delphi such as: Unit A contains class "One" Unit B contains class "One" I'm in a class that uses unit A and want to use a static function from the class One in B; how do I do it? In C#, I'd write something like: B.One.SomeProcedure Or even I would use "using" to "rename" one namespace. What can I do in Delphi? (Removing the "uses" for unit A is not an option, nor is renaming one of the two classes.)
0
4,473,374
12/17/2010 17:53:56
546,363
12/17/2010 17:53:56
1
0
Error message when attempting to log into Facebook
Recently I have not been able to log into my Facebook account from my laptop or any computer. The error I get is "***INTERNET EXPLORERE CANNONT DOWNLOAD LOGIN.PHP FROM LOGIN.FACEBOOK.COM INTERNET EXPLORER WAS NOT ABLE TO OPEN THIS INTERNET SITE. THE REQUESTE SITE IS EITHER UNAVAILABLE OR CANNONT BE FOUND. PLEASE TRY AGAIN LATER*** In the background is another screen with on the ribbon says**:***0% of login/php from login.facebook.com Completed. Getting file information login.php from login.facebook.com***** I'm not a programer or have any idea how to fix this. Can anyone be of assistance? Thank you! Jan
php
message
null
null
null
12/17/2010 18:06:21
off topic
Error message when attempting to log into Facebook === Recently I have not been able to log into my Facebook account from my laptop or any computer. The error I get is "***INTERNET EXPLORERE CANNONT DOWNLOAD LOGIN.PHP FROM LOGIN.FACEBOOK.COM INTERNET EXPLORER WAS NOT ABLE TO OPEN THIS INTERNET SITE. THE REQUESTE SITE IS EITHER UNAVAILABLE OR CANNONT BE FOUND. PLEASE TRY AGAIN LATER*** In the background is another screen with on the ribbon says**:***0% of login/php from login.facebook.com Completed. Getting file information login.php from login.facebook.com***** I'm not a programer or have any idea how to fix this. Can anyone be of assistance? Thank you! Jan
2
2,545,635
03/30/2010 13:42:10
296,460
03/18/2010 11:46:36
1
0
Basic Boost Regex question
I'm trying to write some c++ code that tests if a string is in a particular format. In this program there is a height followed by some decimal numbers: for example "height 123.45" or "height 12" would return true but "SomeOtherString 123.45" would return false. My first attempt at this was to write the following: string action; cin >> action; boost::regex EXPR( "^height \\d*(\\.\\d{1,2})?$/" ) ;//height format regex bool height_format_matches = boost::regex_match( action, EXPR ) ; if(height_format_matches==true){ \\do some stuff } However height_format_matches never seemed to be true. Any help is greatly appreciated!
c++
boost
regex
null
null
null
open
Basic Boost Regex question === I'm trying to write some c++ code that tests if a string is in a particular format. In this program there is a height followed by some decimal numbers: for example "height 123.45" or "height 12" would return true but "SomeOtherString 123.45" would return false. My first attempt at this was to write the following: string action; cin >> action; boost::regex EXPR( "^height \\d*(\\.\\d{1,2})?$/" ) ;//height format regex bool height_format_matches = boost::regex_match( action, EXPR ) ; if(height_format_matches==true){ \\do some stuff } However height_format_matches never seemed to be true. Any help is greatly appreciated!
0
287,260
11/13/2008 15:35:24
572
08/06/2008 20:56:54
8,028
377
Are there any free and open-source server-side analytics engines?
If you have any experiences with them, what are your thoughts on them as well?
analytics
statistics
null
null
null
04/26/2012 13:29:12
not constructive
Are there any free and open-source server-side analytics engines? === If you have any experiences with them, what are your thoughts on them as well?
4
10,534,474
05/10/2012 12:56:34
318,220
04/16/2010 05:53:43
67
5
how to submit form when preventDefault() is being used?
i have a form and i have tried to implement tinuy jquery ajax code it it. but the problem is i used preventDefault() to stop form from auto submitting. Now i cant make it submit even when i want it to. //after user clicks submit buttons $('.submit').click(function(event){ data = { country: $('.country').val(), tel_country_code: $('.country_code').val(), tel_no: $('.tel_no').val() } $.ajax({ type: 'POST', url: "<?php echo site_url('listings/does_business_exists');?>", data: data, dataType: "json", success: function(json_data){ if(json_data.result == false){ $('.error-position').html(json_data.errors); $('.error-position').show(); } else{ return true; //i want form to submit here } } }); event.preventDefault(); }) any suggestion friends ??
jquery
ajax
codeigniter
null
null
05/11/2012 16:27:32
too localized
how to submit form when preventDefault() is being used? === i have a form and i have tried to implement tinuy jquery ajax code it it. but the problem is i used preventDefault() to stop form from auto submitting. Now i cant make it submit even when i want it to. //after user clicks submit buttons $('.submit').click(function(event){ data = { country: $('.country').val(), tel_country_code: $('.country_code').val(), tel_no: $('.tel_no').val() } $.ajax({ type: 'POST', url: "<?php echo site_url('listings/does_business_exists');?>", data: data, dataType: "json", success: function(json_data){ if(json_data.result == false){ $('.error-position').html(json_data.errors); $('.error-position').show(); } else{ return true; //i want form to submit here } } }); event.preventDefault(); }) any suggestion friends ??
3
8,228,790
11/22/2011 14:53:24
909,071
08/24/2011 07:08:45
102
2
How to collect data from array?
form: <input type="text" name="sample[]" id="sample1"/> <input type="text" name="sample[]" id="sample2"/> <input type="text" name="sample[]" id="sample1"/> .... How to collect data from form, and then put each value to mysql?
php
null
null
null
null
11/22/2011 15:05:16
not a real question
How to collect data from array? === form: <input type="text" name="sample[]" id="sample1"/> <input type="text" name="sample[]" id="sample2"/> <input type="text" name="sample[]" id="sample1"/> .... How to collect data from form, and then put each value to mysql?
1
6,868,023
07/29/2011 02:23:18
868,611
07/29/2011 02:23:18
1
0
Cisco AnyConnect or IPSec user/ip authentication restriction
I'm trying to restrict some users from authenticating and accessing the VPN from home. I have a Cisco ASA5505, they use AnyConnect or IPSec, and I only want them to gain access to the VPN when they're at the office. I can't block everything and allow only office IP because we do have some users who roam around and need access to Cisco from different locations. Is there a way to restrict certain users only to access the VPN or even authenticate from certain IPs? Thanks, Alex
vpn
cisco
ipsec
asa
null
07/31/2011 11:17:57
off topic
Cisco AnyConnect or IPSec user/ip authentication restriction === I'm trying to restrict some users from authenticating and accessing the VPN from home. I have a Cisco ASA5505, they use AnyConnect or IPSec, and I only want them to gain access to the VPN when they're at the office. I can't block everything and allow only office IP because we do have some users who roam around and need access to Cisco from different locations. Is there a way to restrict certain users only to access the VPN or even authenticate from certain IPs? Thanks, Alex
2
6,130,782
05/25/2011 20:51:21
711,926
04/17/2011 07:47:01
62
5
How good is headjs?
from the information on [headjs website][1], it looks like loading files in parallel using headjs is the best way to load external js files. it sounds convincing..It also says that loading js files on the bottom or top of the page doesnt make a big difference. I dont know about this since I am afraid the description may be a little bit bias..I want to hear from all the javascript experts here, which way is the better one these days? using headjs or the old school way(minify file, gzip, put js on bottom, combine multiple scripts into one)..? [1]: http://headjs.com/
javascript
null
null
null
null
05/25/2011 21:03:01
not constructive
How good is headjs? === from the information on [headjs website][1], it looks like loading files in parallel using headjs is the best way to load external js files. it sounds convincing..It also says that loading js files on the bottom or top of the page doesnt make a big difference. I dont know about this since I am afraid the description may be a little bit bias..I want to hear from all the javascript experts here, which way is the better one these days? using headjs or the old school way(minify file, gzip, put js on bottom, combine multiple scripts into one)..? [1]: http://headjs.com/
4
9,933,826
03/29/2012 21:29:43
491,837
10/29/2010 22:44:57
1,455
92
code behind bind DynamicResource
I'm trying to bind to a Dynamic Resource in code behind. However, the only method I see of setting a Dynamic Resource is SetResourceReference(Key); I can't do that in a binding? So how do I bind directly to a dynamic resource. My goal is to dynamically select a System Brush and it retain that information in XAML when written, but I don't have an opportunity to set directly, but only with a binding to a value property.
wpf
binding
codebehind
dynamicresource
null
null
open
code behind bind DynamicResource === I'm trying to bind to a Dynamic Resource in code behind. However, the only method I see of setting a Dynamic Resource is SetResourceReference(Key); I can't do that in a binding? So how do I bind directly to a dynamic resource. My goal is to dynamically select a System Brush and it retain that information in XAML when written, but I don't have an opportunity to set directly, but only with a binding to a value property.
0
3,258,753
07/15/2010 18:39:03
288,789
03/08/2010 13:11:27
3
0
One idea... how make one retweet system to my site
i wanna that peoples get my button n put on their sites.. javascritp???? help please...
javascript
null
null
null
null
07/15/2010 19:26:34
not a real question
One idea... how make one retweet system to my site === i wanna that peoples get my button n put on their sites.. javascritp???? help please...
1
6,071,130
05/20/2011 11:15:21
762,616
05/20/2011 11:09:24
1
1
I want the fastest way to search all Ip addresses of the PC's connected to Lan using JAVA and placed all it in JCOMBOBOX??
I want the fastest way to find all the IP addresses of the PCs connected to the Lan for(i=0;i<255;i++) this kind of the code takes too much for searching and displaying i want display ip addresses in the combobox it takes 8 minutes to run and find ip addresses connected to the Lan
java
null
null
null
null
05/21/2011 21:37:20
not a real question
I want the fastest way to search all Ip addresses of the PC's connected to Lan using JAVA and placed all it in JCOMBOBOX?? === I want the fastest way to find all the IP addresses of the PCs connected to the Lan for(i=0;i<255;i++) this kind of the code takes too much for searching and displaying i want display ip addresses in the combobox it takes 8 minutes to run and find ip addresses connected to the Lan
1
8,542,848
12/17/2011 05:38:44
1,103,093
12/17/2011 04:56:28
1
0
I need help to build a multiple choice system for a website, but can't find anything with the features needed
I need to build a multiple choice question system for a website. Each user would see one question at a time and the multiple possible answers. As each question is answered, that answer would be highlighted (ideally with a different color), the answers that were not chosen would disappear, and the next level of questions would appear. All previous answers would stay showing, ideally in a nice-looking graphical format, and ideally would end up looking like a tree. In other words, as the questions are answered, the tree path is automatically generated by the position of the answer chosen, but you can't see the answers not chosen. It would really be great if you could see those answers not chosen like tree branches. Hope I'm explaining this right! Questions can have between 2 and 19 possible answers. There need to be separate names & passwords for each user. The answers would be kept in the system online for future review and possible change. The answers would also be emailed automatically, once all the questions are answered. Can this also be built to handle simultaneous users? I'm a relative newbie to programming, so I'd like to use the simplest possible approach and software. The website is built in Wordpress, but I can't find anything in the Wordpress forums to do the job, and I don't think Wordpress stuff has the horsepower to get the job done. BTW, Stack Overflow is awesome! What a fantastic resource... I'm so glad I found it! Thanks in advance.
project
multiple
choice
null
null
12/19/2011 05:48:25
not a real question
I need help to build a multiple choice system for a website, but can't find anything with the features needed === I need to build a multiple choice question system for a website. Each user would see one question at a time and the multiple possible answers. As each question is answered, that answer would be highlighted (ideally with a different color), the answers that were not chosen would disappear, and the next level of questions would appear. All previous answers would stay showing, ideally in a nice-looking graphical format, and ideally would end up looking like a tree. In other words, as the questions are answered, the tree path is automatically generated by the position of the answer chosen, but you can't see the answers not chosen. It would really be great if you could see those answers not chosen like tree branches. Hope I'm explaining this right! Questions can have between 2 and 19 possible answers. There need to be separate names & passwords for each user. The answers would be kept in the system online for future review and possible change. The answers would also be emailed automatically, once all the questions are answered. Can this also be built to handle simultaneous users? I'm a relative newbie to programming, so I'd like to use the simplest possible approach and software. The website is built in Wordpress, but I can't find anything in the Wordpress forums to do the job, and I don't think Wordpress stuff has the horsepower to get the job done. BTW, Stack Overflow is awesome! What a fantastic resource... I'm so glad I found it! Thanks in advance.
1
1,266,133
08/12/2009 13:23:41
147,012
07/29/2009 11:08:28
1
0
CMS without a template?
Is there a CMS that can manage content on a site without having to implement a template? I've already designed a site with XHTML and CSS, so don't need a template, but do need active content management in static places, such as articles on the homepage and on a couple of other pages. Preferably open-source all the way, and tableless layout. Thanks for looking
content-management-system
php
tableless
null
null
null
open
CMS without a template? === Is there a CMS that can manage content on a site without having to implement a template? I've already designed a site with XHTML and CSS, so don't need a template, but do need active content management in static places, such as articles on the homepage and on a couple of other pages. Preferably open-source all the way, and tableless layout. Thanks for looking
0
8,058,904
11/09/2011 00:19:33
151,372
08/05/2009 21:14:12
727
47
Selenium IDE to load Suites and Testcases from URL?
I've just written a quick enhancement to our CMS to automatically generate Selenium Selenese tests. This works great, but now I'm banging my head against the wall as Selenium IDE requires the test suites and files to be on the local filesystem. Is there a way to get Selenium IDE to load test suites (and cases) from a URL instead of a filesystem path? That way I could just point Selenium IDE to the automatically generated test cases. (I find this kind of ironic. It's a web test tool running in a web browser but can't access anything on the web... ;)
selenium
null
null
null
null
null
open
Selenium IDE to load Suites and Testcases from URL? === I've just written a quick enhancement to our CMS to automatically generate Selenium Selenese tests. This works great, but now I'm banging my head against the wall as Selenium IDE requires the test suites and files to be on the local filesystem. Is there a way to get Selenium IDE to load test suites (and cases) from a URL instead of a filesystem path? That way I could just point Selenium IDE to the automatically generated test cases. (I find this kind of ironic. It's a web test tool running in a web browser but can't access anything on the web... ;)
0
6,689,190
07/14/2011 06:21:50
843,962
07/14/2011 06:21:50
1
0
Authentication token problem
Does the authentication token generated in ruby for login transaction may contain "+" char ? Because I want to execute the performance test on web page written in ruby I have written script and so on.. but always when this token contains this char "+" login transaction fails thanks in advance for answer.
ruby
jmeter
null
null
null
07/15/2011 03:03:12
not a real question
Authentication token problem === Does the authentication token generated in ruby for login transaction may contain "+" char ? Because I want to execute the performance test on web page written in ruby I have written script and so on.. but always when this token contains this char "+" login transaction fails thanks in advance for answer.
1
2,018,408
01/07/2010 05:28:58
228,755
12/10/2009 11:56:45
15
1
SAP ABAP Ecc.6 Associate level Exam Books link required
Can anyone provide me link or Ebooks of ABAP Ecc.6 or the way to fine them for Associalte Level exam preparation.
sap
abap
null
null
null
08/01/2012 12:43:38
not constructive
SAP ABAP Ecc.6 Associate level Exam Books link required === Can anyone provide me link or Ebooks of ABAP Ecc.6 or the way to fine them for Associalte Level exam preparation.
4
1,189,098
07/27/2009 16:11:46
139,071
07/15/2009 22:58:41
16
0
Basic doubt about sensor usage
Suppose I have a cellphone with accelerometer and magnetometer, and want to determine its absolute (wrt North/East/South/West) 3d position. Imagine the phone is laid vertically, with the screen facing me, the "up" vector pointing to the ceil. Whenever I tilt, the accelerometer allows me to get the "up" vector info change. The problem is that if I tilt the device and put it horizontally (screen now facing ceil, and "up" vector pointing to the opposite of where I am), then the up vector doesn't get updated any more if I rotate the phone horizontally on the table. This is something that clearly is detected by the magnetometer now. So, the question is, when to know where to use acc or mag for each case? Is there a generic way to achieve this?
accelerometer
magnetometer
sensor
null
null
06/24/2012 16:47:56
off topic
Basic doubt about sensor usage === Suppose I have a cellphone with accelerometer and magnetometer, and want to determine its absolute (wrt North/East/South/West) 3d position. Imagine the phone is laid vertically, with the screen facing me, the "up" vector pointing to the ceil. Whenever I tilt, the accelerometer allows me to get the "up" vector info change. The problem is that if I tilt the device and put it horizontally (screen now facing ceil, and "up" vector pointing to the opposite of where I am), then the up vector doesn't get updated any more if I rotate the phone horizontally on the table. This is something that clearly is detected by the magnetometer now. So, the question is, when to know where to use acc or mag for each case? Is there a generic way to achieve this?
2
9,195,179
02/08/2012 14:24:36
1,197,370
02/08/2012 14:09:36
1
0
where can i find advanced backbone.js examples
Can someone please direct me to a resource containing an advanced backbone.js example? by advance i mean multiple pages with nested views, complex layouts etc. I have browsed the web, gitHub repository, blogs and even purchased the "recipes with backbone" book. all of the samples are at a level of simple SPA (yes i know backbone is for that, but i know it can do much more) level, a todo list a calendar, adding and deleting notes etc. Is there something a bit more advanced and complex that i can learn from? i'm no expert in backbone but for me the best way is to learn by sample Thanks for helping
backbone.js
null
null
null
null
null
open
where can i find advanced backbone.js examples === Can someone please direct me to a resource containing an advanced backbone.js example? by advance i mean multiple pages with nested views, complex layouts etc. I have browsed the web, gitHub repository, blogs and even purchased the "recipes with backbone" book. all of the samples are at a level of simple SPA (yes i know backbone is for that, but i know it can do much more) level, a todo list a calendar, adding and deleting notes etc. Is there something a bit more advanced and complex that i can learn from? i'm no expert in backbone but for me the best way is to learn by sample Thanks for helping
0
5,496,439
03/31/2011 07:18:14
609,587
02/09/2011 10:45:15
35
0
Is there a need to include all tests in the testing part in RoR?
I am new to RoR and in the basic demo application i am using **rspec** test only and it serves the purpose, but are the tests like **autotest**, spork etc also required?
ruby-on-rails
ruby-on-rails-3
null
null
null
null
open
Is there a need to include all tests in the testing part in RoR? === I am new to RoR and in the basic demo application i am using **rspec** test only and it serves the purpose, but are the tests like **autotest**, spork etc also required?
0
7,423,087
09/14/2011 21:17:12
399,696
07/22/2010 22:33:13
255
30
Three20 Photo Viewer causes my layout to slide up
thanks for any help with this. I'm using the Three20 Photo Viewer in my app. Before I navigate to the photo viewer, all my views appear correctly, but after I click back out of the Photo Viewer, all of my content is slid up underneath my navigation bar. Has any one experienced this, and found a solution? Thanks for any help, Dave
iphone
uinavigationcontroller
three20
null
null
null
open
Three20 Photo Viewer causes my layout to slide up === thanks for any help with this. I'm using the Three20 Photo Viewer in my app. Before I navigate to the photo viewer, all my views appear correctly, but after I click back out of the Photo Viewer, all of my content is slid up underneath my navigation bar. Has any one experienced this, and found a solution? Thanks for any help, Dave
0
122,493
09/23/2008 17:34:21
16,488
09/17/2008 17:36:50
6
0
Is it better working on a single technology or working on different ones??
I have always worked on websphere commerce..and recently got an offer to work in a plain J2EE project. I am not sure if I should go ahead or not. **Which is better in the long term??** staying in the technology you always worked on and mastering it or swapping technologies n languages every now and then.
different-languages
technologies
languages
java-ee
changing-languages
12/30/2011 21:09:22
not constructive
Is it better working on a single technology or working on different ones?? === I have always worked on websphere commerce..and recently got an offer to work in a plain J2EE project. I am not sure if I should go ahead or not. **Which is better in the long term??** staying in the technology you always worked on and mastering it or swapping technologies n languages every now and then.
4
9,771,859
03/19/2012 14:19:40
1,278,597
03/19/2012 13:02:48
1
0
DetailsView loses datasource after callback with use ICallbackEventHandler
I am trying make in my asp.net application modifications without Postback and without UpdatePanel. For paging and for modifying I want use only callbacks on the my site. For it I use an interface "ICallbackEventHandler". This simple application has "ASPGridView" & "ASPDetailsView". Both with installed property EnableSortingAndPagingCallbacks="True". But I have problem. I try save my DetailsView with use javascript:EditDetails('ASPDetailsView_SaveEdit|PRIMARY KEY') But my DetailsView on server-side & client-htmlcode always **empty**! Why? How I can transfer my edit of values from DetailsView on server-side after user click the button "Save"? <%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="ICallbackeEventHandler2._Default" %> <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"></script> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"/> </asp:Content> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <div id="divGridView"> <asp:GridView ID="GridView1" runat="server" Width="100%" AutoGenerateColumns="False" EmptyDataText="Нет данных для отображения" AllowPaging="True" EnableSortingAndPagingCallbacks="True" DataSourceID="SqlDataSourceGrid1" AllowSorting="True" EnableViewState="False" OnRowDataBound="_grid_RowDataBound" DataKeyNames="CustomerID" PagerSettings-Position="TopAndBottom" > <Columns> <asp:BoundField DataField="CompanyName" HeaderText="CompanyName"> <ItemStyle Wrap="True"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="ContactName" HeaderText="ContactName"> <ItemStyle Wrap="True"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="ContactTitle" HeaderText="ContactTitle"> <ItemStyle Wrap="True"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="Address" HeaderText="Address"> <ItemStyle Wrap="True"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="City" HeaderText="City" /> <asp:BoundField DataField="Region" HeaderText="Region"> <ItemStyle Wrap="True"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="PostalCode" HeaderText="PostalCode" /> <asp:BoundField DataField="Country" HeaderText="Country" /> <asp:BoundField DataField="Phone" HeaderText="Phone"> <ItemStyle Wrap="True"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="Fax" HeaderText="Fax"> <ItemStyle Wrap="True"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="CustomerID" HeaderText="Id"> </asp:BoundField> <asp:BoundField DataField="CustomerID" HeaderText="Command"> </asp:BoundField> </Columns> <PagerSettings Position="TopAndBottom"></PagerSettings> </asp:GridView> </div> <div id="divDetails" style="cursor:move; background-color:#DDDDDD;border:solid 1px Gray; color:Black;width:300px;top: 25%; left: 45%;position:absolute;"> <asp:DetailsView ID="DetailsView1" runat="server" EnablePagingCallbacks="True" DataSourceID="SqlDataSourceDetails1" Height="50px" Width="300px" DataKeyNames="CustomerID" AutoGenerateRows="False" DefaultMode="Edit" > <Fields> <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" ReadOnly="True" SortExpression="CustomerID"/> <asp:BoundField DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName"> </asp:BoundField> <asp:BoundField DataField="ContactName" HeaderText="ContactName" SortExpression="ContactName"> </asp:BoundField> <asp:BoundField DataField="ContactTitle" HeaderText="ContactTitle" SortExpression="ContactTitle"> </asp:BoundField> <asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address"> </asp:BoundField> <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" /> <asp:BoundField DataField="Region" HeaderText="Region" SortExpression="Region"> </asp:BoundField> <asp:BoundField DataField="PostalCode" HeaderText="PostalCode" SortExpression="PostalCode" /> <asp:BoundField DataField="Country" HeaderText="Country" SortExpression="Country" /> <asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone"> </asp:BoundField> <asp:BoundField DataField="Fax" HeaderText="Fax" SortExpression="Fax"> </asp:BoundField> </Fields> </asp:DetailsView> </div> <script language="javascript" type="text/javascript"> // <![CDATA[ /////////////// function EditDetails(args){ <%= ClientScript.GetCallbackEventReference(Me,"args", "ShowDetails", Nothing) %>; $('#divDetails').show(); } function ShowDetails(eventArgument,context) { window.document.getElementById('divDetails').innerHTML = eventArgument; } $('#divDetails') .draggable() .resizable(); $('#divDetails').hide(); </script> <asp:SqlDataSource ID="SqlDataSourceGrid1" runat="server" ConnectionString="<%$ ConnectionStrings:NORTHWINDConnectionString %>" SelectCommand="SELECT * FROM [Customers]"></asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSourceDetails1" runat="server" ConnectionString="<%$ ConnectionStrings:NORTHWINDConnectionString %>" SelectCommand="SELECT * FROM [Customers] WHERE ([CustomerID] = @pk)" UpdateCommand="UPDATE [Customers] SET [CompanyName] = @CompanyName, [ContactName] = @ContactName, [ContactTitle] = @ContactTitle, [Address] = @Address, [City] = @City, [Region] = @Region, [PostalCode] = @PostalCode, [Country] = @Country, [Phone] = @Phone, [Fax] = @Fax WHERE [CustomerID] = @pk" DeleteCommand="DELETE FROM [Customers] WHERE [CustomerID] = @pk" InsertCommand="INSERT INTO [Customers] ([CustomerID], [CompanyName], [ContactName], [ContactTitle], [Address], [City], [Region], [PostalCode], [Country], [Phone], [Fax]) VALUES (@CustomerID, @CompanyName, @ContactName, @ContactTitle, @Address, @City, @Region, @PostalCode, @Country, @Phone, @Fax)" > <SelectParameters> <asp:Parameter Name="pk" Type="String" ConvertEmptyStringToNull="true" /> </SelectParameters> <DeleteParameters> <asp:Parameter Name="pk" Type="String" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="CustomerID" Type="String" /> <asp:Parameter Name="CompanyName" Type="String" /> <asp:Parameter Name="ContactName" Type="String" /> <asp:Parameter Name="ContactTitle" Type="String" /> <asp:Parameter Name="Address" Type="String" /> <asp:Parameter Name="City" Type="String" /> <asp:Parameter Name="Region" Type="String" /> <asp:Parameter Name="PostalCode" Type="String" /> <asp:Parameter Name="Country" Type="String" /> <asp:Parameter Name="Phone" Type="String" /> <asp:Parameter Name="Fax" Type="String" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="pk" Type="String" /> <asp:Parameter Name="CompanyName" Type="String" /> <asp:Parameter Name="ContactName" Type="String" /> <asp:Parameter Name="ContactTitle" Type="String" /> <asp:Parameter Name="Address" Type="String" /> <asp:Parameter Name="City" Type="String" /> <asp:Parameter Name="Region" Type="String" /> <asp:Parameter Name="PostalCode" Type="String" /> <asp:Parameter Name="Country" Type="String" /> <asp:Parameter Name="Phone" Type="String" /> <asp:Parameter Name="Fax" Type="String" /> </UpdateParameters> </asp:SqlDataSource> </asp:Content> And code Public Class _Default Inherits System.Web.UI.Page Implements System.Web.UI.ICallbackEventHandler Protected returnValue As String Private _nColPKCommand As Integer Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load _nColPKCommand = GetHeaderColumnIndexByName(GridView1, "Command") If Not IsPostBack Then GridView1.DataBind() End If End Sub Public Function GetCallbackResult() As String Implements System.Web.UI.ICallbackEventHandler.GetCallbackResult Return returnValue End Function Public Sub RaiseCallbackEvent(ByVal eventArgument As String) Implements System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent Dim p() As String = eventArgument.Split("|"c) If p(0) = "ASPDetailsView_RowEdit" Then detailsEdit(DetailsViewMode.Edit, p(1)) ElseIf p(0) = "ASPDetailsView_RowNew" Then detailsEdit(DetailsViewMode.Insert, "") ElseIf p(0) = "ASPDetailsView_SaveEdit" Then Dim cause As Boolean Dim ErrStr As String = "" Dim pk As String = p(1) returnValue = "" '!!!!!!! DetailsView1.Rows.Count = 0 WHY ? DetailsView1.ChangeMode(DetailsViewMode.Edit) Try SqlDataSourceDetails1.UpdateParameters("pk").DefaultValue = pk SqlDataSourceDetails1.UpdateParameters("CompanyName").DefaultValue = DetailsView1.DataItem("CompanyName") SqlDataSourceDetails1.UpdateParameters("ContactName").DefaultValue = DetailsView1.DataItem("ContactName") SqlDataSourceDetails1.UpdateParameters("ContactTitle").DefaultValue = DetailsView1.DataItem("ContactTitle") SqlDataSourceDetails1.UpdateParameters("Address").DefaultValue = DetailsView1.DataItem("Address") SqlDataSourceDetails1.UpdateParameters("City").DefaultValue = DetailsView1.DataItem("City") SqlDataSourceDetails1.UpdateParameters("Region").DefaultValue = DetailsView1.DataItem("Region") SqlDataSourceDetails1.UpdateParameters("PostalCode").DefaultValue = DetailsView1.DataItem("PostalCode") SqlDataSourceDetails1.UpdateParameters("Country").DefaultValue = DetailsView1.DataItem("Country") SqlDataSourceDetails1.UpdateParameters("Phone").DefaultValue = DetailsView1.DataItem("Phone") SqlDataSourceDetails1.UpdateParameters("Fax").DefaultValue = DetailsView1.DataItem("Fax") DetailsView1.UpdateItem(cause) Catch ex As Exception ErrStr = ex.Message End Try If cause = False Then SqlDataSourceDetails1.SelectParameters("pk").DefaultValue = pk DetailsView1.DefaultMode = DetailsViewMode.Edit DetailsView1.DataBind() renderDetails(DetailsView1, pk) Using sw As New IO.StringWriter() Dim htw As New HtmlTextWriter(sw) 'sw.WriteLine("!!!MY Test!!!") If pk.Length > 0 Then sw.WriteLine("<div style='width:100%'><table style='width:100%'><tr style='text-align:center'><td >CustomerId:" & pk & "</td></tr></table></div>") End If DetailsView1.RenderControl(htw) htw.Flush() sw.WriteLine("<div>" & "<button type='button' onclick=""javascript:EditDetails('ASPDetailsView_SaveEdit|" & pk & "')"">Save</button>" & "<button type='button' onclick=""$('#divDetails').hide();"">Cancel</button>" & "</div>") sw.WriteLine("<div><p style='color:Red'>" & ErrStr & "</p></div>") returnValue = sw.ToString() End Using End If End If End Sub Private Sub detailsEdit(ByVal mode As DetailsViewMode, ByVal pk As String) returnValue = "" SqlDataSourceDetails1.SelectParameters("pk").DefaultValue = pk DetailsView1.ChangeMode(mode) DetailsView1.DataBind() renderDetails(DetailsView1, pk) End Sub Private Sub renderDetails(ByVal _d As DetailsView, ByVal pk As String) Using sw As New IO.StringWriter() Dim htw As New HtmlTextWriter(sw) 'sw.WriteLine("!!!MY Test!!!") If pk.Length > 0 Then sw.WriteLine("<div style='width:100%'><table style='width:100%'><tr style='text-align:center'><td >CustomerId:" & pk & "</td></tr></table></div>") End If _d.RenderControl(htw) htw.Flush() sw.WriteLine("<div style='float: right;'>" & "<button type='button' onclick=""javascript:EditDetails('ASPDetailsView_SaveEdit|" & pk & "')"">Save</button>" & "<button type='button' onclick=""$('#divDetails').hide();"">Cancel</button>" & "</div>") returnValue = sw.ToString() End Using End Sub Private Function GetHeaderColumnIndexByName(ByVal grd As GridView, ByVal SearchColumnName As String) As Integer For columnIndex = 0 To grd.HeaderRow.Cells.Count - 1 Dim oCol As DataControlField = grd.Columns(columnIndex) If String.Equals(oCol.HeaderText, SearchColumnName) Then Return columnIndex End If Next Return -1 End Function Protected Sub _grid_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Dim gdv As GridView = DirectCast(sender, GridView) Dim ncolPK As Integer = _nColPKCommand If e.Row.RowType = DataControlRowType.DataRow AndAlso (e.Row.RowState = DataControlRowState.Normal OrElse e.Row.RowState = DataControlRowState.Alternate) Then If ncolPK > -1 Then '<table> Dim tableCommand As New HtmlTable '<table> для Command '<tr> Dim rowCommand = New HtmlTableRow() '<tr> для Command Dim cellCommand = New HtmlTableCell() '<td> для Command Dim img As New Image '<td> img.ImageUrl = "../icons/edit.png" 'img.Attributes.Add("title", "[F2] Редактировать запись") 'img.Attributes.Add("alt", "Изменить") img.Attributes.Add("alt", "Edit") img.Attributes.Add("style", "text-align:Left;cursor:pointer;") img.Attributes.Add("onclick", "javascript:EditDetails('ASPDetailsView_RowEdit|" & e.Row.Cells(ncolPK).Text & "');") e.Row.Attributes("id") = gdv.ClientID & "|" & e.Row.RowIndex.ToString() cellCommand.Attributes.Add("style", "white-space:nowrap;border-right-width:0px;") cellCommand.Controls.Add(img) img = Nothing rowCommand.Cells.Add(cellCommand) cellCommand = Nothing '/<td> '<td> cellCommand = New HtmlTableCell() '<td> для Command cellCommand.Attributes.Add("style", "width:5px") Dim lSpace As New Label() lSpace.Text = "&nbsp;" cellCommand.Controls.Add(lSpace) rowCommand.Cells.Add(cellCommand) cellCommand = Nothing '/<td> '<td> cellCommand = New HtmlTableCell() '<td> для Command cellCommand.Attributes.Add("style", "white-space:nowrap;border-right-width:0px;") img = New Image img.ImageUrl = "../icons/add.png" 'img.Attributes.Add("title", "[CTRL+INS] Новая запись") 'img.Attributes.Add("alt", "Новая") img.Attributes.Add("alt", "New") img.Attributes.Add("style", "text-align:Left;cursor:pointer;") img.Attributes.Add("onclick", "javascript:EditDetails('ASPDetailsView_RowNew|" & "')") cellCommand.Attributes.Add("style", "white-space:nowrap;border-right-width:0px;") cellCommand.Controls.Add(img) rowCommand.Cells.Add(cellCommand) img = Nothing cellCommand = Nothing '/<td> '<td> cellCommand = New HtmlTableCell() '<td> для Command cellCommand.Controls.Add(lSpace) cellCommand.Attributes.Add("style", "width:5px") rowCommand.Cells.Add(cellCommand) cellCommand = Nothing '/<td> '<td> cellCommand = New HtmlTableCell() '<td> для Command cellCommand.Attributes.Add("style", "white-space:nowrap;border-right-width:0px;") img = New Image img.ImageUrl = "../icons/delete.png" 'img.Attributes.Add("title", "[DEL] Удалить запись") 'img.Attributes.Add("alt", "Удалить") img.Attributes.Add("alt", "Del") img.Attributes.Add("style", "text-align:Left;cursor:pointer;") img.Attributes.Add("onclick", "javascript:if(!confirm('r u sure?')) { return false; } EditGrid('ASPGridView_RowDelete|" & "')") cellCommand.Attributes.Add("style", "white-space:nowrap;border-right-width:0px;") cellCommand.Controls.Add(img) rowCommand.Cells.Add(cellCommand) img = Nothing cellCommand = Nothing '</td> '<td> cellCommand = New HtmlTableCell() '<td> для Command cellCommand.Controls.Add(lSpace) cellCommand.Attributes.Add("style", "width:5px") rowCommand.Cells.Add(cellCommand) cellCommand = Nothing '/<td> 'cellCommand = New HtmlTableCell() '<td> для Command 'cellCommand.Attributes.Add("style", "white-space:nowrap;border-right-width:0px;") 'img = New Image 'img.ImageUrl = "../icons/eye--arrow18x18.png" 'img.Attributes.Add("title", "[F4] Показать атрибуты") 'img.Attributes.Add("alt", "Атрибуты") 'img.Attributes.Add("style", "text-align:Left;cursor:pointer;") 'img.Attributes.Add("onclick", "javascript:EditGrid('ASPGridView_RowDelete|" & "')") 'cellCommand.Attributes.Add("style", "white-space:nowrap;border-right-width:0px;") 'cellCommand.Controls.Add(img) 'rowCommand.Cells.Add(cellCommand) 'img = Nothing 'cellCommand = Nothing '</tr> tableCommand.Rows.Add(rowCommand) '</table> e.Row.Cells(ncolPK).Controls.Add(tableCommand) End If End If End Sub End Class Pic1. I can't save my modification because the elements of DetailsView was destroyed after render. http://blastru.pochta.ru/error1.JPG Pic2. Object DetailsView is empty. http://blastru.pochta.ru/error4.JPG Pic3. HTML code has not elements DetailsView ttp://blastru.pochta.ru/error3.JPG How DetailsView can save edition values with use ICallbackEventHandler?
asp.net
detailsview
icallbackeventhandler
null
null
null
open
DetailsView loses datasource after callback with use ICallbackEventHandler === I am trying make in my asp.net application modifications without Postback and without UpdatePanel. For paging and for modifying I want use only callbacks on the my site. For it I use an interface "ICallbackEventHandler". This simple application has "ASPGridView" & "ASPDetailsView". Both with installed property EnableSortingAndPagingCallbacks="True". But I have problem. I try save my DetailsView with use javascript:EditDetails('ASPDetailsView_SaveEdit|PRIMARY KEY') But my DetailsView on server-side & client-htmlcode always **empty**! Why? How I can transfer my edit of values from DetailsView on server-side after user click the button "Save"? <%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="ICallbackeEventHandler2._Default" %> <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"></script> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"/> </asp:Content> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <div id="divGridView"> <asp:GridView ID="GridView1" runat="server" Width="100%" AutoGenerateColumns="False" EmptyDataText="Нет данных для отображения" AllowPaging="True" EnableSortingAndPagingCallbacks="True" DataSourceID="SqlDataSourceGrid1" AllowSorting="True" EnableViewState="False" OnRowDataBound="_grid_RowDataBound" DataKeyNames="CustomerID" PagerSettings-Position="TopAndBottom" > <Columns> <asp:BoundField DataField="CompanyName" HeaderText="CompanyName"> <ItemStyle Wrap="True"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="ContactName" HeaderText="ContactName"> <ItemStyle Wrap="True"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="ContactTitle" HeaderText="ContactTitle"> <ItemStyle Wrap="True"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="Address" HeaderText="Address"> <ItemStyle Wrap="True"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="City" HeaderText="City" /> <asp:BoundField DataField="Region" HeaderText="Region"> <ItemStyle Wrap="True"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="PostalCode" HeaderText="PostalCode" /> <asp:BoundField DataField="Country" HeaderText="Country" /> <asp:BoundField DataField="Phone" HeaderText="Phone"> <ItemStyle Wrap="True"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="Fax" HeaderText="Fax"> <ItemStyle Wrap="True"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="CustomerID" HeaderText="Id"> </asp:BoundField> <asp:BoundField DataField="CustomerID" HeaderText="Command"> </asp:BoundField> </Columns> <PagerSettings Position="TopAndBottom"></PagerSettings> </asp:GridView> </div> <div id="divDetails" style="cursor:move; background-color:#DDDDDD;border:solid 1px Gray; color:Black;width:300px;top: 25%; left: 45%;position:absolute;"> <asp:DetailsView ID="DetailsView1" runat="server" EnablePagingCallbacks="True" DataSourceID="SqlDataSourceDetails1" Height="50px" Width="300px" DataKeyNames="CustomerID" AutoGenerateRows="False" DefaultMode="Edit" > <Fields> <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" ReadOnly="True" SortExpression="CustomerID"/> <asp:BoundField DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName"> </asp:BoundField> <asp:BoundField DataField="ContactName" HeaderText="ContactName" SortExpression="ContactName"> </asp:BoundField> <asp:BoundField DataField="ContactTitle" HeaderText="ContactTitle" SortExpression="ContactTitle"> </asp:BoundField> <asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address"> </asp:BoundField> <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" /> <asp:BoundField DataField="Region" HeaderText="Region" SortExpression="Region"> </asp:BoundField> <asp:BoundField DataField="PostalCode" HeaderText="PostalCode" SortExpression="PostalCode" /> <asp:BoundField DataField="Country" HeaderText="Country" SortExpression="Country" /> <asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone"> </asp:BoundField> <asp:BoundField DataField="Fax" HeaderText="Fax" SortExpression="Fax"> </asp:BoundField> </Fields> </asp:DetailsView> </div> <script language="javascript" type="text/javascript"> // <![CDATA[ /////////////// function EditDetails(args){ <%= ClientScript.GetCallbackEventReference(Me,"args", "ShowDetails", Nothing) %>; $('#divDetails').show(); } function ShowDetails(eventArgument,context) { window.document.getElementById('divDetails').innerHTML = eventArgument; } $('#divDetails') .draggable() .resizable(); $('#divDetails').hide(); </script> <asp:SqlDataSource ID="SqlDataSourceGrid1" runat="server" ConnectionString="<%$ ConnectionStrings:NORTHWINDConnectionString %>" SelectCommand="SELECT * FROM [Customers]"></asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSourceDetails1" runat="server" ConnectionString="<%$ ConnectionStrings:NORTHWINDConnectionString %>" SelectCommand="SELECT * FROM [Customers] WHERE ([CustomerID] = @pk)" UpdateCommand="UPDATE [Customers] SET [CompanyName] = @CompanyName, [ContactName] = @ContactName, [ContactTitle] = @ContactTitle, [Address] = @Address, [City] = @City, [Region] = @Region, [PostalCode] = @PostalCode, [Country] = @Country, [Phone] = @Phone, [Fax] = @Fax WHERE [CustomerID] = @pk" DeleteCommand="DELETE FROM [Customers] WHERE [CustomerID] = @pk" InsertCommand="INSERT INTO [Customers] ([CustomerID], [CompanyName], [ContactName], [ContactTitle], [Address], [City], [Region], [PostalCode], [Country], [Phone], [Fax]) VALUES (@CustomerID, @CompanyName, @ContactName, @ContactTitle, @Address, @City, @Region, @PostalCode, @Country, @Phone, @Fax)" > <SelectParameters> <asp:Parameter Name="pk" Type="String" ConvertEmptyStringToNull="true" /> </SelectParameters> <DeleteParameters> <asp:Parameter Name="pk" Type="String" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="CustomerID" Type="String" /> <asp:Parameter Name="CompanyName" Type="String" /> <asp:Parameter Name="ContactName" Type="String" /> <asp:Parameter Name="ContactTitle" Type="String" /> <asp:Parameter Name="Address" Type="String" /> <asp:Parameter Name="City" Type="String" /> <asp:Parameter Name="Region" Type="String" /> <asp:Parameter Name="PostalCode" Type="String" /> <asp:Parameter Name="Country" Type="String" /> <asp:Parameter Name="Phone" Type="String" /> <asp:Parameter Name="Fax" Type="String" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="pk" Type="String" /> <asp:Parameter Name="CompanyName" Type="String" /> <asp:Parameter Name="ContactName" Type="String" /> <asp:Parameter Name="ContactTitle" Type="String" /> <asp:Parameter Name="Address" Type="String" /> <asp:Parameter Name="City" Type="String" /> <asp:Parameter Name="Region" Type="String" /> <asp:Parameter Name="PostalCode" Type="String" /> <asp:Parameter Name="Country" Type="String" /> <asp:Parameter Name="Phone" Type="String" /> <asp:Parameter Name="Fax" Type="String" /> </UpdateParameters> </asp:SqlDataSource> </asp:Content> And code Public Class _Default Inherits System.Web.UI.Page Implements System.Web.UI.ICallbackEventHandler Protected returnValue As String Private _nColPKCommand As Integer Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load _nColPKCommand = GetHeaderColumnIndexByName(GridView1, "Command") If Not IsPostBack Then GridView1.DataBind() End If End Sub Public Function GetCallbackResult() As String Implements System.Web.UI.ICallbackEventHandler.GetCallbackResult Return returnValue End Function Public Sub RaiseCallbackEvent(ByVal eventArgument As String) Implements System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent Dim p() As String = eventArgument.Split("|"c) If p(0) = "ASPDetailsView_RowEdit" Then detailsEdit(DetailsViewMode.Edit, p(1)) ElseIf p(0) = "ASPDetailsView_RowNew" Then detailsEdit(DetailsViewMode.Insert, "") ElseIf p(0) = "ASPDetailsView_SaveEdit" Then Dim cause As Boolean Dim ErrStr As String = "" Dim pk As String = p(1) returnValue = "" '!!!!!!! DetailsView1.Rows.Count = 0 WHY ? DetailsView1.ChangeMode(DetailsViewMode.Edit) Try SqlDataSourceDetails1.UpdateParameters("pk").DefaultValue = pk SqlDataSourceDetails1.UpdateParameters("CompanyName").DefaultValue = DetailsView1.DataItem("CompanyName") SqlDataSourceDetails1.UpdateParameters("ContactName").DefaultValue = DetailsView1.DataItem("ContactName") SqlDataSourceDetails1.UpdateParameters("ContactTitle").DefaultValue = DetailsView1.DataItem("ContactTitle") SqlDataSourceDetails1.UpdateParameters("Address").DefaultValue = DetailsView1.DataItem("Address") SqlDataSourceDetails1.UpdateParameters("City").DefaultValue = DetailsView1.DataItem("City") SqlDataSourceDetails1.UpdateParameters("Region").DefaultValue = DetailsView1.DataItem("Region") SqlDataSourceDetails1.UpdateParameters("PostalCode").DefaultValue = DetailsView1.DataItem("PostalCode") SqlDataSourceDetails1.UpdateParameters("Country").DefaultValue = DetailsView1.DataItem("Country") SqlDataSourceDetails1.UpdateParameters("Phone").DefaultValue = DetailsView1.DataItem("Phone") SqlDataSourceDetails1.UpdateParameters("Fax").DefaultValue = DetailsView1.DataItem("Fax") DetailsView1.UpdateItem(cause) Catch ex As Exception ErrStr = ex.Message End Try If cause = False Then SqlDataSourceDetails1.SelectParameters("pk").DefaultValue = pk DetailsView1.DefaultMode = DetailsViewMode.Edit DetailsView1.DataBind() renderDetails(DetailsView1, pk) Using sw As New IO.StringWriter() Dim htw As New HtmlTextWriter(sw) 'sw.WriteLine("!!!MY Test!!!") If pk.Length > 0 Then sw.WriteLine("<div style='width:100%'><table style='width:100%'><tr style='text-align:center'><td >CustomerId:" & pk & "</td></tr></table></div>") End If DetailsView1.RenderControl(htw) htw.Flush() sw.WriteLine("<div>" & "<button type='button' onclick=""javascript:EditDetails('ASPDetailsView_SaveEdit|" & pk & "')"">Save</button>" & "<button type='button' onclick=""$('#divDetails').hide();"">Cancel</button>" & "</div>") sw.WriteLine("<div><p style='color:Red'>" & ErrStr & "</p></div>") returnValue = sw.ToString() End Using End If End If End Sub Private Sub detailsEdit(ByVal mode As DetailsViewMode, ByVal pk As String) returnValue = "" SqlDataSourceDetails1.SelectParameters("pk").DefaultValue = pk DetailsView1.ChangeMode(mode) DetailsView1.DataBind() renderDetails(DetailsView1, pk) End Sub Private Sub renderDetails(ByVal _d As DetailsView, ByVal pk As String) Using sw As New IO.StringWriter() Dim htw As New HtmlTextWriter(sw) 'sw.WriteLine("!!!MY Test!!!") If pk.Length > 0 Then sw.WriteLine("<div style='width:100%'><table style='width:100%'><tr style='text-align:center'><td >CustomerId:" & pk & "</td></tr></table></div>") End If _d.RenderControl(htw) htw.Flush() sw.WriteLine("<div style='float: right;'>" & "<button type='button' onclick=""javascript:EditDetails('ASPDetailsView_SaveEdit|" & pk & "')"">Save</button>" & "<button type='button' onclick=""$('#divDetails').hide();"">Cancel</button>" & "</div>") returnValue = sw.ToString() End Using End Sub Private Function GetHeaderColumnIndexByName(ByVal grd As GridView, ByVal SearchColumnName As String) As Integer For columnIndex = 0 To grd.HeaderRow.Cells.Count - 1 Dim oCol As DataControlField = grd.Columns(columnIndex) If String.Equals(oCol.HeaderText, SearchColumnName) Then Return columnIndex End If Next Return -1 End Function Protected Sub _grid_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Dim gdv As GridView = DirectCast(sender, GridView) Dim ncolPK As Integer = _nColPKCommand If e.Row.RowType = DataControlRowType.DataRow AndAlso (e.Row.RowState = DataControlRowState.Normal OrElse e.Row.RowState = DataControlRowState.Alternate) Then If ncolPK > -1 Then '<table> Dim tableCommand As New HtmlTable '<table> для Command '<tr> Dim rowCommand = New HtmlTableRow() '<tr> для Command Dim cellCommand = New HtmlTableCell() '<td> для Command Dim img As New Image '<td> img.ImageUrl = "../icons/edit.png" 'img.Attributes.Add("title", "[F2] Редактировать запись") 'img.Attributes.Add("alt", "Изменить") img.Attributes.Add("alt", "Edit") img.Attributes.Add("style", "text-align:Left;cursor:pointer;") img.Attributes.Add("onclick", "javascript:EditDetails('ASPDetailsView_RowEdit|" & e.Row.Cells(ncolPK).Text & "');") e.Row.Attributes("id") = gdv.ClientID & "|" & e.Row.RowIndex.ToString() cellCommand.Attributes.Add("style", "white-space:nowrap;border-right-width:0px;") cellCommand.Controls.Add(img) img = Nothing rowCommand.Cells.Add(cellCommand) cellCommand = Nothing '/<td> '<td> cellCommand = New HtmlTableCell() '<td> для Command cellCommand.Attributes.Add("style", "width:5px") Dim lSpace As New Label() lSpace.Text = "&nbsp;" cellCommand.Controls.Add(lSpace) rowCommand.Cells.Add(cellCommand) cellCommand = Nothing '/<td> '<td> cellCommand = New HtmlTableCell() '<td> для Command cellCommand.Attributes.Add("style", "white-space:nowrap;border-right-width:0px;") img = New Image img.ImageUrl = "../icons/add.png" 'img.Attributes.Add("title", "[CTRL+INS] Новая запись") 'img.Attributes.Add("alt", "Новая") img.Attributes.Add("alt", "New") img.Attributes.Add("style", "text-align:Left;cursor:pointer;") img.Attributes.Add("onclick", "javascript:EditDetails('ASPDetailsView_RowNew|" & "')") cellCommand.Attributes.Add("style", "white-space:nowrap;border-right-width:0px;") cellCommand.Controls.Add(img) rowCommand.Cells.Add(cellCommand) img = Nothing cellCommand = Nothing '/<td> '<td> cellCommand = New HtmlTableCell() '<td> для Command cellCommand.Controls.Add(lSpace) cellCommand.Attributes.Add("style", "width:5px") rowCommand.Cells.Add(cellCommand) cellCommand = Nothing '/<td> '<td> cellCommand = New HtmlTableCell() '<td> для Command cellCommand.Attributes.Add("style", "white-space:nowrap;border-right-width:0px;") img = New Image img.ImageUrl = "../icons/delete.png" 'img.Attributes.Add("title", "[DEL] Удалить запись") 'img.Attributes.Add("alt", "Удалить") img.Attributes.Add("alt", "Del") img.Attributes.Add("style", "text-align:Left;cursor:pointer;") img.Attributes.Add("onclick", "javascript:if(!confirm('r u sure?')) { return false; } EditGrid('ASPGridView_RowDelete|" & "')") cellCommand.Attributes.Add("style", "white-space:nowrap;border-right-width:0px;") cellCommand.Controls.Add(img) rowCommand.Cells.Add(cellCommand) img = Nothing cellCommand = Nothing '</td> '<td> cellCommand = New HtmlTableCell() '<td> для Command cellCommand.Controls.Add(lSpace) cellCommand.Attributes.Add("style", "width:5px") rowCommand.Cells.Add(cellCommand) cellCommand = Nothing '/<td> 'cellCommand = New HtmlTableCell() '<td> для Command 'cellCommand.Attributes.Add("style", "white-space:nowrap;border-right-width:0px;") 'img = New Image 'img.ImageUrl = "../icons/eye--arrow18x18.png" 'img.Attributes.Add("title", "[F4] Показать атрибуты") 'img.Attributes.Add("alt", "Атрибуты") 'img.Attributes.Add("style", "text-align:Left;cursor:pointer;") 'img.Attributes.Add("onclick", "javascript:EditGrid('ASPGridView_RowDelete|" & "')") 'cellCommand.Attributes.Add("style", "white-space:nowrap;border-right-width:0px;") 'cellCommand.Controls.Add(img) 'rowCommand.Cells.Add(cellCommand) 'img = Nothing 'cellCommand = Nothing '</tr> tableCommand.Rows.Add(rowCommand) '</table> e.Row.Cells(ncolPK).Controls.Add(tableCommand) End If End If End Sub End Class Pic1. I can't save my modification because the elements of DetailsView was destroyed after render. http://blastru.pochta.ru/error1.JPG Pic2. Object DetailsView is empty. http://blastru.pochta.ru/error4.JPG Pic3. HTML code has not elements DetailsView ttp://blastru.pochta.ru/error3.JPG How DetailsView can save edition values with use ICallbackEventHandler?
0
11,546,574
07/18/2012 16:58:43
382,838
07/03/2010 20:47:52
971
14
Basic graph-database in SQL?
Some basic question/statements about the differences of relational and graph-databases. Please comment as much as you can or like. For 1:N-relationships: If I just swap a column ParentId (pointing "backwards" from target entity to source entity) to a Link (edge) in a separate table pointing from SourceId to TargetId. Would that qualify as a kind of graph-database right there? A hierarchical structure is just a kind of graph where each node have only one incoming link (perhaps this could be limited to a link of a certain type/label?). A graph database is a database where the relationships have been moved into a separate table where more information can be stored about each relationship. A graph-database with a link-table would in some way replace the need for a middle-table for N:N-relationships. (BTW what is the correct name the kind of table used with a N:N-relationship?) Using a separate Link-table consume more space but is faster and simpler to query. If I choose to go with my idea for a SQL-graph-database for now, would it be easy to migrate to a complete graph-database later? Please give some examples of what I would miss by not going all-in on a graph-database today? (not needed to get accept!)
c#
sql
relational-database
graph-databases
null
07/19/2012 15:19:32
not a real question
Basic graph-database in SQL? === Some basic question/statements about the differences of relational and graph-databases. Please comment as much as you can or like. For 1:N-relationships: If I just swap a column ParentId (pointing "backwards" from target entity to source entity) to a Link (edge) in a separate table pointing from SourceId to TargetId. Would that qualify as a kind of graph-database right there? A hierarchical structure is just a kind of graph where each node have only one incoming link (perhaps this could be limited to a link of a certain type/label?). A graph database is a database where the relationships have been moved into a separate table where more information can be stored about each relationship. A graph-database with a link-table would in some way replace the need for a middle-table for N:N-relationships. (BTW what is the correct name the kind of table used with a N:N-relationship?) Using a separate Link-table consume more space but is faster and simpler to query. If I choose to go with my idea for a SQL-graph-database for now, would it be easy to migrate to a complete graph-database later? Please give some examples of what I would miss by not going all-in on a graph-database today? (not needed to get accept!)
1
11,032,947
06/14/2012 12:19:49
1,431,292
06/01/2012 17:45:24
13
0
Python editors (IDE)
i have a curiosity. Is there an IDE for python on linux? I am new to python, just last week wrote my first script(a simple nagios check) and i work on gentoo or ubuntu linux using vim as my primary editor for anything. It's really good and i'm pleased with vim's performance(and if you get to read all cheat sheets it's really powerful) but being a beginner i could use the help of some intellisense(code completion). IF you have any info please advise.
python
linux
ide
editor
gentoo
06/14/2012 12:26:28
not constructive
Python editors (IDE) === i have a curiosity. Is there an IDE for python on linux? I am new to python, just last week wrote my first script(a simple nagios check) and i work on gentoo or ubuntu linux using vim as my primary editor for anything. It's really good and i'm pleased with vim's performance(and if you get to read all cheat sheets it's really powerful) but being a beginner i could use the help of some intellisense(code completion). IF you have any info please advise.
4
7,474,200
09/19/2011 16:28:26
181,797
09/30/2009 12:33:16
448
44
OpenMPI application
Please help me to find real working OpenMPI application. I need any OpenMPI application which have widely/worldwide usage. At least the name of that kind application will be enough. Thanks
parallel-processing
hpc
openmpi
e-learning
null
09/20/2011 02:58:14
not constructive
OpenMPI application === Please help me to find real working OpenMPI application. I need any OpenMPI application which have widely/worldwide usage. At least the name of that kind application will be enough. Thanks
4
11,269,675
06/29/2012 22:21:43
1,492,249
06/29/2012 22:11:00
1
0
How to Get to the root cause?
OKay so I want to learn this process, what I want is that say I ahve an application in that when I fill some required fields, some of them are supposte to be auto-fill with a specialty code, now this is not working when i am providing this, so I am looking at the code and trying to test it, but here is what I have heard that I need to get the request and response from the logs either one depending on sitution will be used and tahn put in function test and run it as maven test will tell me where the error was.. Anyway if you know other way of tracing an error ot to check codes are working fine pls do tell. All I am asking is Have an issue in the application that when provided with special code it should auto fill the rest requirment on the page, but its not doing that to resolve this defect pls tell how will you track it down.....Here are your options You have a WEBLOGIC ADM CONSOLE, Eclipse, JUnit, Putty, WinSCP....pls do not ask for providing the actual code its immposible....All I can tell its from a repository svn from one of the folder select which one project and tane checkout and look at a big java class. I know you guys are the best and you can do it.
java
junit
null
null
null
06/29/2012 22:30:56
not a real question
How to Get to the root cause? === OKay so I want to learn this process, what I want is that say I ahve an application in that when I fill some required fields, some of them are supposte to be auto-fill with a specialty code, now this is not working when i am providing this, so I am looking at the code and trying to test it, but here is what I have heard that I need to get the request and response from the logs either one depending on sitution will be used and tahn put in function test and run it as maven test will tell me where the error was.. Anyway if you know other way of tracing an error ot to check codes are working fine pls do tell. All I am asking is Have an issue in the application that when provided with special code it should auto fill the rest requirment on the page, but its not doing that to resolve this defect pls tell how will you track it down.....Here are your options You have a WEBLOGIC ADM CONSOLE, Eclipse, JUnit, Putty, WinSCP....pls do not ask for providing the actual code its immposible....All I can tell its from a repository svn from one of the folder select which one project and tane checkout and look at a big java class. I know you guys are the best and you can do it.
1
11,148,192
06/21/2012 23:18:50
895,580
08/15/2011 20:30:01
1
0
Android Out Of Memory error with with images
For some reason I can not load any image that has more than 200 pixels in either width or height without getting a OOM error. To fix this I lowered the amount of pixels on my images but now they all look blurry. Does anyone know the best way to load higher quality images without getting this error. Also I have tried manually recycling my bitmaps but when doing so it seems to just give me the out of memory error no matter what size the images are.
android
memory
bitmap
null
null
null
open
Android Out Of Memory error with with images === For some reason I can not load any image that has more than 200 pixels in either width or height without getting a OOM error. To fix this I lowered the amount of pixels on my images but now they all look blurry. Does anyone know the best way to load higher quality images without getting this error. Also I have tried manually recycling my bitmaps but when doing so it seems to just give me the out of memory error no matter what size the images are.
0
8,322,162
11/30/2011 06:49:19
710,316
04/15/2011 18:03:07
738
0
How to loop through all params without knowing their names
I have a few functions that accept several parameters. public function somefunc(param1:String, param2:String, param3:String):void{ } Is there a way to loop through all the params (without knowing how many or their names) and put them in some kind of an array with their names, so I'd get an associative array [ param1: "value 1" param2: "value 2" param3: "value 3" ]
actionscript-3
null
null
null
null
null
open
How to loop through all params without knowing their names === I have a few functions that accept several parameters. public function somefunc(param1:String, param2:String, param3:String):void{ } Is there a way to loop through all the params (without knowing how many or their names) and put them in some kind of an array with their names, so I'd get an associative array [ param1: "value 1" param2: "value 2" param3: "value 3" ]
0
10,368,042
04/28/2012 22:18:43
845,529
07/14/2011 22:39:05
79
1
.htaccess 404 error page relative url
I am trying to create a custom 404 page and i want to use in the .htaccess page the relative path of the page. But it is not working. For tha full path I am getting results. Is there any way to make the relative path to work? I have this in the .htaccess file ErrorDocument 404 /notfound.php
.htaccess
null
null
null
null
null
open
.htaccess 404 error page relative url === I am trying to create a custom 404 page and i want to use in the .htaccess page the relative path of the page. But it is not working. For tha full path I am getting results. Is there any way to make the relative path to work? I have this in the .htaccess file ErrorDocument 404 /notfound.php
0
5,478,836
03/29/2011 20:57:18
490,326
10/28/2010 16:02:27
242
17
Max number of open async HttpWebRequest
For an application that needs to download several (25+) different objects at the same time from an internet connect, what is the max number of async HttpWebRequests that _should_ be used? What are the consequences of using more?
c#
asynchronous
httpwebrequest
null
null
null
open
Max number of open async HttpWebRequest === For an application that needs to download several (25+) different objects at the same time from an internet connect, what is the max number of async HttpWebRequests that _should_ be used? What are the consequences of using more?
0
7,244,758
08/30/2011 14:23:54
919,897
08/30/2011 14:23:54
1
0
flex.components.List - Events not working when scroller.enabled = false
I am working in Adobe FlashBuilder 4.5, I have a spark list using a custom actionscript 3 renderer. The renderer creates a button in each row with an event listener on MouseEvent.CLICK. The event works correctly when scrolling is enabled, but if I set the list's scroller.enabled = false, the event stops working. What I need to do is capture the current row index when it is clicked. Is there another way around this? I've tried listening for the event at the list level, but I can't seem to get the selected row from that level. Thanks.
flex
actionscript
mouseevent
null
null
09/13/2011 17:12:21
too localized
flex.components.List - Events not working when scroller.enabled = false === I am working in Adobe FlashBuilder 4.5, I have a spark list using a custom actionscript 3 renderer. The renderer creates a button in each row with an event listener on MouseEvent.CLICK. The event works correctly when scrolling is enabled, but if I set the list's scroller.enabled = false, the event stops working. What I need to do is capture the current row index when it is clicked. Is there another way around this? I've tried listening for the event at the list level, but I can't seem to get the selected row from that level. Thanks.
3
8,273,623
11/25/2011 19:47:09
1,066,169
11/25/2011 19:18:09
1
0
Wamp server not changing color while online and not showing localhost
I have installed wamp server. When i put wamp server online, it goes online but the Wamp server icon doensnot changes its color- it remains red but the server is online. THe local host doesnot shows in the browser..how can is
wamp
null
null
null
null
06/25/2012 21:14:44
off topic
Wamp server not changing color while online and not showing localhost === I have installed wamp server. When i put wamp server online, it goes online but the Wamp server icon doensnot changes its color- it remains red but the server is online. THe local host doesnot shows in the browser..how can is
2
5,749,388
04/21/2011 20:22:05
682,907
03/29/2011 21:36:18
659
30
NSArrayController selection being reset
I have a Cocoa Document-based Application with an inspector panel that is shared between documents (modelled after the TextEdit source code that ships with xcode). Inside the Document class I have an NSMutableArray and an NSMutableIndexSet that are linked up with bindings to an NSArrayController. The inspector panel is in a separate nib file, and I have two identical NSArrayControllers, one from the main document window, and one from the inspector panel, so that both can interact with the document. This is why I do a manual binding to the selectionIndexes, so that I don't get two separate selections with the two separate NSArrayControllers. The inspector panel keeps track of which document is being inspected by a: Document *inspectedDocument; which is updated whenever the document is switched, or no document has focus at all. An NSObjectController is linked up to <code>inspectedDocument</code>, and the NSArrayController I mentioned before is linked up to that controller. Now, my problem is that when the inspector panel is in place, and the <code>inspectedDocument</code> is changed, the selection indexes are reset. The problem goes away if I don't use the inspector panel, so I assume it is its NSArrayController that is issuing this reset. I don't have any controls that bind to the selection and could change it (such as a table view). In the inspector panel's NSArrayController, if I have "Avoid Empty Selection" ticked, the selection resets to the first object, otherwise it resets to no selection, so it is definitely a legitimate resetting of the selection. Actually, I don't even want the inspector panel to ever be able to change the selection, so ideally I would like to establish a read-only binding for that NSArrayController's selection indexes. **In short:** The NSArrayController's selection is being reset whenever the parent NSObjectController changes what it's point at. How can I prevent this happening?
objective-c
cocoa
osx
cocoa-bindings
null
null
open
NSArrayController selection being reset === I have a Cocoa Document-based Application with an inspector panel that is shared between documents (modelled after the TextEdit source code that ships with xcode). Inside the Document class I have an NSMutableArray and an NSMutableIndexSet that are linked up with bindings to an NSArrayController. The inspector panel is in a separate nib file, and I have two identical NSArrayControllers, one from the main document window, and one from the inspector panel, so that both can interact with the document. This is why I do a manual binding to the selectionIndexes, so that I don't get two separate selections with the two separate NSArrayControllers. The inspector panel keeps track of which document is being inspected by a: Document *inspectedDocument; which is updated whenever the document is switched, or no document has focus at all. An NSObjectController is linked up to <code>inspectedDocument</code>, and the NSArrayController I mentioned before is linked up to that controller. Now, my problem is that when the inspector panel is in place, and the <code>inspectedDocument</code> is changed, the selection indexes are reset. The problem goes away if I don't use the inspector panel, so I assume it is its NSArrayController that is issuing this reset. I don't have any controls that bind to the selection and could change it (such as a table view). In the inspector panel's NSArrayController, if I have "Avoid Empty Selection" ticked, the selection resets to the first object, otherwise it resets to no selection, so it is definitely a legitimate resetting of the selection. Actually, I don't even want the inspector panel to ever be able to change the selection, so ideally I would like to establish a read-only binding for that NSArrayController's selection indexes. **In short:** The NSArrayController's selection is being reset whenever the parent NSObjectController changes what it's point at. How can I prevent this happening?
0
8,031,980
11/07/2011 01:49:38
486,979
10/25/2010 21:58:23
142
5
is flowplayer a dead project? how do I get a bug report to the developers?
I attempted to post on the forums, but, honestly, the flowplayer bug report forum contains mostly spam postings and I don't see any recent developer activity. Plus, the last version of flowplayer seems to be August 2010. Anyone know what the situation is here? I'm having an issue with the flowplayer 3.2.6 api (js).
flowplayer
null
null
null
null
11/07/2011 03:41:50
off topic
is flowplayer a dead project? how do I get a bug report to the developers? === I attempted to post on the forums, but, honestly, the flowplayer bug report forum contains mostly spam postings and I don't see any recent developer activity. Plus, the last version of flowplayer seems to be August 2010. Anyone know what the situation is here? I'm having an issue with the flowplayer 3.2.6 api (js).
2
6,301,338
06/10/2011 02:22:21
111,783
05/24/2009 15:11:52
3,174
118
Update NSMenuItem while the host menu is shown
I have an `NSMenuItem` that I need to update to show a progress (like Time machine does with it's backup). The problem is that when I set a new `title` on that `NSMenuItem` and the `title` is not changing. It is in fact changing when I close and reopen the menu, but I want to update it while the user is looking at it. I also tried remove an item and re-inserting it with no result. Any pointers?
cocoa
osx
nsmenuitem
null
null
null
open
Update NSMenuItem while the host menu is shown === I have an `NSMenuItem` that I need to update to show a progress (like Time machine does with it's backup). The problem is that when I set a new `title` on that `NSMenuItem` and the `title` is not changing. It is in fact changing when I close and reopen the menu, but I want to update it while the user is looking at it. I also tried remove an item and re-inserting it with no result. Any pointers?
0