PostId
int64
4
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
1
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-55
461k
OwnerUndeletedAnswerCountAtPostTime
int64
0
21.5k
Title
stringlengths
3
250
BodyMarkdown
stringlengths
5
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
32
30.1k
OpenStatus_id
int64
0
4
63,147
09/15/2008 14:02:20
7,599
09/15/2008 14:02:20
1
0
User Interface Controls for Win32
I see many user interface control libraries for .NET, but where can I get similar stuff for win32 using simply C/C++? Things like prettier buttons, dials, listviews, graphs, etc. Seems every Win32 programmers' right of passage is to end up writing his own collection. :/ Thanks, Sebastian
gui
winapi
null
null
null
null
open
User Interface Controls for Win32 === I see many user interface control libraries for .NET, but where can I get similar stuff for win32 using simply C/C++? Things like prettier buttons, dials, listviews, graphs, etc. Seems every Win32 programmers' right of passage is to end up writing his own collection. :/ Thanks, Sebastian
0
63,157
09/15/2008 14:03:59
368,855
09/15/2008 14:03:59
1
0
Hooking into the TCP Stack in C
I am looking to develop a kernel module which can hook directly into the TCP stack on a FreeBSD machine. I have read the tutorials and anything else I could find on developing KLD's which isn't much of a problem, but can anyone tell me, for example, how I could obtain the src and dest address of a packet that is being processed by the system? I was also thinking of perhaps using IPF to redirect packets (i.e. all FTP data) to a program for analysis instead of hooking directly into the stack as mentioned above. Is this possible? I don't want to have to use libpcap as I want to be able to manipulate real packets in real time and not just copies. Any information would be greatly appreciated. Thanks, A
c
tcp
bsd
stack
freebsd
null
open
Hooking into the TCP Stack in C === I am looking to develop a kernel module which can hook directly into the TCP stack on a FreeBSD machine. I have read the tutorials and anything else I could find on developing KLD's which isn't much of a problem, but can anyone tell me, for example, how I could obtain the src and dest address of a packet that is being processed by the system? I was also thinking of perhaps using IPF to redirect packets (i.e. all FTP data) to a program for analysis instead of hooking directly into the stack as mentioned above. Is this possible? I don't want to have to use libpcap as I want to be able to manipulate real packets in real time and not just copies. Any information would be greatly appreciated. Thanks, A
0
63,162
09/15/2008 14:04:31
5,432
09/09/2008 14:46:59
76
2
What development documentation do you find useful
I find that for most software projects, documentation is often oriented towards the process of development the software, rather than supporting and maintaining it. This is particularly true when using agile methodologies, which emphasize minimalistic documentation. The issue with development-oriented documentation is that it tends to be less usable as a reference, especially after a few releases. It's a pain to sifting through a pile of story cards (or story pages on a wiki, as our team uses) trying to work out which stories are current, and which have been modified (directly or indirectly) by more recent stories. A full waterfall-style requirements specification, technical-design document, etc. may be fine if development is always done in a big bang, but as bugs are fixed, minor features added, etc. it may be difficult to maintain. I'm a fan of minimalistic documentation, as the less documentation there is, the easier it is to find things (assuming what you're looking for is documented, of course), and the easier it is to maintain. I am thinking of extending our wiki-based story pages to contain some meta-data, i.e. references to other stories which are related, affected, obsoleted, etc., similar to [IETF RFPs][1]. I'm interested in hearing about other peoples' experiences with lightweight approaches to software documentation that works for maintenance and support, not just delivering a project and tossing it over the wall. [1]: http://en.wikipedia.org/wiki/Request_for_Comments
documentation
development-process
agile
maintenance
null
null
open
What development documentation do you find useful === I find that for most software projects, documentation is often oriented towards the process of development the software, rather than supporting and maintaining it. This is particularly true when using agile methodologies, which emphasize minimalistic documentation. The issue with development-oriented documentation is that it tends to be less usable as a reference, especially after a few releases. It's a pain to sifting through a pile of story cards (or story pages on a wiki, as our team uses) trying to work out which stories are current, and which have been modified (directly or indirectly) by more recent stories. A full waterfall-style requirements specification, technical-design document, etc. may be fine if development is always done in a big bang, but as bugs are fixed, minor features added, etc. it may be difficult to maintain. I'm a fan of minimalistic documentation, as the less documentation there is, the easier it is to find things (assuming what you're looking for is documented, of course), and the easier it is to maintain. I am thinking of extending our wiki-based story pages to contain some meta-data, i.e. references to other stories which are related, affected, obsoleted, etc., similar to [IETF RFPs][1]. I'm interested in hearing about other peoples' experiences with lightweight approaches to software documentation that works for maintenance and support, not just delivering a project and tossing it over the wall. [1]: http://en.wikipedia.org/wiki/Request_for_Comments
0
63,181
09/15/2008 14:05:47
6,448
09/15/2008 10:12:05
3
2
Editing XML in Flex using e4x
In Flex, I have an xml document such as the following: var xml:XML = <root><node>value1</node><node>value2</node><node>value3</node></root> At runtime, I want to create a TextInput control for each node under root, and have the values bound to the values in the XML. As far as I can tell I can't use BindingUtils to bind to e4x nodes at runtime (please tell me if I'm wrong here!), so I'm trying to do this by hand: for each (var node:XML in xml.node) { var textInput:TextInput = new TextInput(); var handler:Function = function(event:Event):void { node.setChildren(event.target.text); }; textInput.text = node.text(); textInput.addEventListener(Event.CHANGE, handler); this.addChild(pileHeightEditor); } My problem is that when the user edits one of the TextInputs, the node getting assigned to is always the last one encountered in the for loop. I am used to this pattern from C#, where each time an anonymous function is created, a "snapshot" of the values of the used values is taken, so "node" would be different in each handler function. How do I "take a snapshot" of the current value of node to use in the handler? Or should I be using a different pattern in Flex?
javascript
flex
e4x
null
null
null
open
Editing XML in Flex using e4x === In Flex, I have an xml document such as the following: var xml:XML = <root><node>value1</node><node>value2</node><node>value3</node></root> At runtime, I want to create a TextInput control for each node under root, and have the values bound to the values in the XML. As far as I can tell I can't use BindingUtils to bind to e4x nodes at runtime (please tell me if I'm wrong here!), so I'm trying to do this by hand: for each (var node:XML in xml.node) { var textInput:TextInput = new TextInput(); var handler:Function = function(event:Event):void { node.setChildren(event.target.text); }; textInput.text = node.text(); textInput.addEventListener(Event.CHANGE, handler); this.addChild(pileHeightEditor); } My problem is that when the user edits one of the TextInputs, the node getting assigned to is always the last one encountered in the for loop. I am used to this pattern from C#, where each time an anonymous function is created, a "snapshot" of the values of the used values is taken, so "node" would be different in each handler function. How do I "take a snapshot" of the current value of node to use in the handler? Or should I be using a different pattern in Flex?
0
9,842,853
03/23/2012 16:25:13
1,288,669
03/23/2012 16:13:15
1
0
Retrieve parameters from url with XPages
I created a page with XPages and jquery mobile. I passed by a link to a page parameter. The link that is generated is as follows: http://myserver/mydb.nsf/Test.xsp#subpage?parameter=B I tried using different methods to retrieve the data you get is the past, but not riescto to retrieve the parameter. var exCon = facesContext.getExternalContext(); var request = exCon.getRequest(); // This is the actual HTTP servlet request... var paramValue = request.getParameter("parameter"); aaa = facesContext.getExternalContext().getRequest().getRequestURL(); bbb = facesContext.getExternalContext().getRequest().getRequestURI(); ccc = facesContext.getExternalContext().getRequest().getContextPath(); ddd = facesContext.getExternalContext().getRequest().getQueryString(); var url:XSPUrl; url = context.getUrl(); var tagname = url.getParameter('parameter'); prova = ddd.getParameter('parameter'); print("Request: " + request) print("URL2: " + url); print("URL: " + aaa); print("URL3: " + bbb); print("URL4: " + ccc); print("URL5: " + ddd); print("Parametro3 : " + prova); print("Parametro2 : " + tagname); print("Parametro: " + paramValue); Doing a bit of debag with the consol I saw that the url that is shown is: http://myserver/mydb.nsf/Test.xsp Come posso ovviare al problema thanks
xpages
null
null
null
null
null
open
Retrieve parameters from url with XPages === I created a page with XPages and jquery mobile. I passed by a link to a page parameter. The link that is generated is as follows: http://myserver/mydb.nsf/Test.xsp#subpage?parameter=B I tried using different methods to retrieve the data you get is the past, but not riescto to retrieve the parameter. var exCon = facesContext.getExternalContext(); var request = exCon.getRequest(); // This is the actual HTTP servlet request... var paramValue = request.getParameter("parameter"); aaa = facesContext.getExternalContext().getRequest().getRequestURL(); bbb = facesContext.getExternalContext().getRequest().getRequestURI(); ccc = facesContext.getExternalContext().getRequest().getContextPath(); ddd = facesContext.getExternalContext().getRequest().getQueryString(); var url:XSPUrl; url = context.getUrl(); var tagname = url.getParameter('parameter'); prova = ddd.getParameter('parameter'); print("Request: " + request) print("URL2: " + url); print("URL: " + aaa); print("URL3: " + bbb); print("URL4: " + ccc); print("URL5: " + ddd); print("Parametro3 : " + prova); print("Parametro2 : " + tagname); print("Parametro: " + paramValue); Doing a bit of debag with the consol I saw that the url that is shown is: http://myserver/mydb.nsf/Test.xsp Come posso ovviare al problema thanks
0
9,842,855
03/23/2012 16:25:18
1,077,967
12/02/2011 17:58:03
11
5
Is it possible to add tooltips to image's drawn on an HTML5 canvas?
I would like to draw a line or bar graph using HTML5 canvas. I would like to - take in data from an outside source (or hardcode it in for testing purposes) - draw the graph - Hover over a node/bar and have a tooltip appear displaying the number/relevant data. So my question is, it is possible to apply tooltips to individual images/lines/anything on a canvas? (I know that the canvas itself can have it's own tooltip) One solution that I'm sure would work would be to just make each node a separate canvas with it's own tooltip and image but that sounds a bit excessive. And ideally I would like to use jquery.ui.tooltip, but really I just want to know if anything will work. var imageObj = new Image(); $(imageObj).attr("title","kitten"); $(imageObj).tooltip(); imageObj.onload = function(){ context.drawImage(imageObj, destX, destY, destWidth, destHeight); }; imageObj.src = "BW-kitten.jpg"; I got the outline from [here](http://www.html5canvastutorials.com/tutorials/html5-canvas-image-size/) and added what I thought could possibly work. The kitten draws properly and there are no console errors and all of that good stuff.
html5
canvas
tooltip
jquery-tooltip
null
null
open
Is it possible to add tooltips to image's drawn on an HTML5 canvas? === I would like to draw a line or bar graph using HTML5 canvas. I would like to - take in data from an outside source (or hardcode it in for testing purposes) - draw the graph - Hover over a node/bar and have a tooltip appear displaying the number/relevant data. So my question is, it is possible to apply tooltips to individual images/lines/anything on a canvas? (I know that the canvas itself can have it's own tooltip) One solution that I'm sure would work would be to just make each node a separate canvas with it's own tooltip and image but that sounds a bit excessive. And ideally I would like to use jquery.ui.tooltip, but really I just want to know if anything will work. var imageObj = new Image(); $(imageObj).attr("title","kitten"); $(imageObj).tooltip(); imageObj.onload = function(){ context.drawImage(imageObj, destX, destY, destWidth, destHeight); }; imageObj.src = "BW-kitten.jpg"; I got the outline from [here](http://www.html5canvastutorials.com/tutorials/html5-canvas-image-size/) and added what I thought could possibly work. The kitten draws properly and there are no console errors and all of that good stuff.
0
9,842,862
03/23/2012 16:25:53
1,288,667
03/23/2012 16:12:17
1
0
Databinding issues: Binding Navigator, BindingList(Of T) and deleting items
Background: I have a form with a BindingNavigator on it. There's a binding source declared and all hooked up. There's 2 text boxes on the form and a Public withevents instance of my class inherited from a BindingList(of T) - ThingCollection. If I create a new Thing using the Navigator, the "AddNewCore" method of ThingCollection gets called by the Navigator and I happily create a new instance of Thing amd add it to the collection and write the data to a database. If I edit an item on the form, I can pick up the change in the Property of the Thing and write the changes to the database. Likewise on startup I can happily read from the database, create instances of Thing and add them to the ThingCollection. My problem comes on clicking the Delete button on the Navigator. How do I hook that back to the ThingCollection on the instance of Thing so that I can delete it? I appreciate I could use BindingNavigatorDeleteItem_Click on the form, then go through and try and find out what's missing, but that seems a really messay way of doing things compared to the Create, Read and Update. I could also disable the delete button and add my own, but that's not much better. Has anybody got any thoughts?
delete
bindinglist
null
null
null
null
open
Databinding issues: Binding Navigator, BindingList(Of T) and deleting items === Background: I have a form with a BindingNavigator on it. There's a binding source declared and all hooked up. There's 2 text boxes on the form and a Public withevents instance of my class inherited from a BindingList(of T) - ThingCollection. If I create a new Thing using the Navigator, the "AddNewCore" method of ThingCollection gets called by the Navigator and I happily create a new instance of Thing amd add it to the collection and write the data to a database. If I edit an item on the form, I can pick up the change in the Property of the Thing and write the changes to the database. Likewise on startup I can happily read from the database, create instances of Thing and add them to the ThingCollection. My problem comes on clicking the Delete button on the Navigator. How do I hook that back to the ThingCollection on the instance of Thing so that I can delete it? I appreciate I could use BindingNavigatorDeleteItem_Click on the form, then go through and try and find out what's missing, but that seems a really messay way of doing things compared to the Create, Read and Update. I could also disable the delete button and add my own, but that's not much better. Has anybody got any thoughts?
0
9,842,863
03/23/2012 16:25:56
1,257,391
03/08/2012 15:45:27
1
0
UIButton above animating CALayer
I have a UIButton with an image which I have positioned just above a CALayer which I animate with a flip at certain times. When it flips it can cover up the button. I am wanting to keep the UIbutton above the layer at all times during this. I am finding that with bringSubviewToFront it is keeping the UIButton functionality above the CALayer, but not the image, so therefore it doesn't look usable and looks covered up. If anyone has encountered this or has any recommendations I'd really appreciate it, thanks.
ios
uibutton
calayer
null
null
null
open
UIButton above animating CALayer === I have a UIButton with an image which I have positioned just above a CALayer which I animate with a flip at certain times. When it flips it can cover up the button. I am wanting to keep the UIbutton above the layer at all times during this. I am finding that with bringSubviewToFront it is keeping the UIButton functionality above the CALayer, but not the image, so therefore it doesn't look usable and looks covered up. If anyone has encountered this or has any recommendations I'd really appreciate it, thanks.
0
9,807,604
03/21/2012 15:23:52
64,120
02/09/2009 10:54:52
1,405
57
How can I get rst2html.py to include the CSS for syntax highlighting?
When I run rst2html.py against my ReStructured Text source, with its code-block directive, it adds all the spans and classes to the bits of code in the HTML, but the CSS to actually colorize those spans is absent. Is it possible to get RST to add a CSS link or embed the CSS in the HTML file?
restructuredtext
null
null
null
null
null
open
How can I get rst2html.py to include the CSS for syntax highlighting? === When I run rst2html.py against my ReStructured Text source, with its code-block directive, it adds all the spans and classes to the bits of code in the HTML, but the CSS to actually colorize those spans is absent. Is it possible to get RST to add a CSS link or embed the CSS in the HTML file?
0
9,842,868
03/23/2012 16:26:17
1,218,356
02/18/2012 17:15:45
14
0
Multiple values ​​in EditorFor with jquery
I'm new in MVC 3. Anyone know a post where adding multiple values in a editorfor withjquery eg some cities like this: ![enter image description here][1] [1]: http://i.stack.imgur.com/vnhys.gif
asp.net-mvc-3
null
null
null
null
null
open
Multiple values ​​in EditorFor with jquery === I'm new in MVC 3. Anyone know a post where adding multiple values in a editorfor withjquery eg some cities like this: ![enter image description here][1] [1]: http://i.stack.imgur.com/vnhys.gif
0
9,842,869
03/23/2012 16:26:19
942,621
09/13/2011 13:17:31
1
3
Post jQuery ajax form the same way as normal html form, breaking same-origin-policy
I have written a jQuery solution for submitting a form to a third party domain. The third party url accepts forms posted from other domains when the form is posted with normal html. I cannot make this happen with jQuery and $.post. Example: sender url: http...domain1 receiver url: https...domain2 When I submit the form on domain1.com using normal html everything works fine. The problem is when I use $.post() jQuery throws an error as soon as the target domain is using https. Ie8 throws an error already when receiver url is http...domain2. My question is how I can use jQuery and submit the form the same way as normal html does. I'd like the solution to work in ie8 as well preferrably. Also, I'd prefer not to use Access-Control-Allow-Origin: * (set as a header in php on the target server). Is there a way to use jQuery, and send ajax forms with the same result as a normal html form? <html lang='sv'> <head> <script src='js/jquery-1.7.1.min.js'></script> <script> $(function() { $.post( // works in all browsers but ie8 with Access-Control-Allow-Origin: * "http...domain2/?ts="+new Date().getMilliseconds(), // breaks in chrome, didn't test others //"https...domain2/?ts="+new Date().getMilliseconds(), { a:"a", b:"b" }, function(responseText) { alert(responseText); }, "json" //"html" // seems to get same result as when using "json" above ).done(function(){ alert("done!"); }).error(function(event){ alert("error!"); }); }); </script> </head> <body> <!-- working form --> <form action="https...domain2/?ts=whatever" method="post"> <textarea name="a">a</textarea> <textarea name="b">b</textarea> <input type="submit"> </form> </body> </html>
jquery
ajax
same-origin-policy
null
null
null
open
Post jQuery ajax form the same way as normal html form, breaking same-origin-policy === I have written a jQuery solution for submitting a form to a third party domain. The third party url accepts forms posted from other domains when the form is posted with normal html. I cannot make this happen with jQuery and $.post. Example: sender url: http...domain1 receiver url: https...domain2 When I submit the form on domain1.com using normal html everything works fine. The problem is when I use $.post() jQuery throws an error as soon as the target domain is using https. Ie8 throws an error already when receiver url is http...domain2. My question is how I can use jQuery and submit the form the same way as normal html does. I'd like the solution to work in ie8 as well preferrably. Also, I'd prefer not to use Access-Control-Allow-Origin: * (set as a header in php on the target server). Is there a way to use jQuery, and send ajax forms with the same result as a normal html form? <html lang='sv'> <head> <script src='js/jquery-1.7.1.min.js'></script> <script> $(function() { $.post( // works in all browsers but ie8 with Access-Control-Allow-Origin: * "http...domain2/?ts="+new Date().getMilliseconds(), // breaks in chrome, didn't test others //"https...domain2/?ts="+new Date().getMilliseconds(), { a:"a", b:"b" }, function(responseText) { alert(responseText); }, "json" //"html" // seems to get same result as when using "json" above ).done(function(){ alert("done!"); }).error(function(event){ alert("error!"); }); }); </script> </head> <body> <!-- working form --> <form action="https...domain2/?ts=whatever" method="post"> <textarea name="a">a</textarea> <textarea name="b">b</textarea> <input type="submit"> </form> </body> </html>
0
9,842,870
03/23/2012 16:26:23
1,288,578
03/23/2012 15:31:14
1
0
Interpolate data using plyr in R
# I am trying to use plyr and approx to interpolate values for y for each year between the observed values. # Instead of just the 3 observations for each country, # I would like to have 11 observations - one for each year from 1985 and 1995. # Here is a sample data set country <- c("country a", "country a", "country a", "country b", "country b", "country b", "country c", "country c", "country c") year <- c(1985, 1990, 1995, 1985, 1990, 1995, 1985, 1990, 1995) y <- c(10, 12, 16, NA, 23, 20, 12, 16, NA) data <- data.frame(cbind(country,year,y)) The data set looks like this: country year y 1 country a 1985 10 2 country a 1990 12 3 country a 1995 16 4 country b 1985 <NA> 5 country b 1990 23 6 country b 1995 20 7 country c 1985 12 8 country c 1990 16 9 country c 1995 <NA> # I can get approx to work for a subset of the data with just one country a <- subset(data, data$country == "country a") # interpolate y value for every year from 1985 to 1995 attach(a) a.int <- approx(year,y, xout = 1985:1995, method = "linear") # But how do I use plyr to interpolate data for each country? # I've tried using dlply, but the output values are NA for each year attach(data) int <- dlply(data, .(country), function(i) approx(i$year, i$y, xout = 1985:1995, method = "linear")$y ) # How can I use plyr and approx together to interpolate values of y? # Also, once I get the correct aprrox output (which will be list) how do I reshape the data so that it is in the original long format? Ideally, the data would have 11 rows each country and one column with y values. Thanks- -Adam
plyr
null
null
null
null
null
open
Interpolate data using plyr in R === # I am trying to use plyr and approx to interpolate values for y for each year between the observed values. # Instead of just the 3 observations for each country, # I would like to have 11 observations - one for each year from 1985 and 1995. # Here is a sample data set country <- c("country a", "country a", "country a", "country b", "country b", "country b", "country c", "country c", "country c") year <- c(1985, 1990, 1995, 1985, 1990, 1995, 1985, 1990, 1995) y <- c(10, 12, 16, NA, 23, 20, 12, 16, NA) data <- data.frame(cbind(country,year,y)) The data set looks like this: country year y 1 country a 1985 10 2 country a 1990 12 3 country a 1995 16 4 country b 1985 <NA> 5 country b 1990 23 6 country b 1995 20 7 country c 1985 12 8 country c 1990 16 9 country c 1995 <NA> # I can get approx to work for a subset of the data with just one country a <- subset(data, data$country == "country a") # interpolate y value for every year from 1985 to 1995 attach(a) a.int <- approx(year,y, xout = 1985:1995, method = "linear") # But how do I use plyr to interpolate data for each country? # I've tried using dlply, but the output values are NA for each year attach(data) int <- dlply(data, .(country), function(i) approx(i$year, i$y, xout = 1985:1995, method = "linear")$y ) # How can I use plyr and approx together to interpolate values of y? # Also, once I get the correct aprrox output (which will be list) how do I reshape the data so that it is in the original long format? Ideally, the data would have 11 rows each country and one column with y values. Thanks- -Adam
0
9,842,875
03/23/2012 16:26:35
429,540
08/24/2010 12:46:41
109
0
Generate valid ical file on linux
Is there a simple way to create a valid icalendar file for a single appointment providing date, time, title and description on the linux commandline? Note that this data might have to be escaped properly. I looked at konsolecalendar (kde) but it seems to be broken on my kubuntu linux.
linux
shell
ical
icalendar
kde
null
open
Generate valid ical file on linux === Is there a simple way to create a valid icalendar file for a single appointment providing date, time, title and description on the linux commandline? Note that this data might have to be escaped properly. I looked at konsolecalendar (kde) but it seems to be broken on my kubuntu linux.
0
63,206
09/15/2008 14:08:20
7,292
09/15/2008 13:28:39
1
0
Find all available JREs on Mac OS X from Java application installer
If Java application requires certain JRE version - how can I check its availability on Mac OS X during installation?
java
osx
installer
macos
null
null
open
Find all available JREs on Mac OS X from Java application installer === If Java application requires certain JRE version - how can I check its availability on Mac OS X during installation?
0
63,232
09/15/2008 14:10:47
7,524
09/15/2008 13:54:23
1
0
How to make Flex RIA contents accessible to search engines like Google?
How would you make the contents of Flex RIA applications accessible to Google, so that Google can index the content and shows links to the right items in your Flex RIA. Consider a online shop, created in Flex, where the offered items shall be indexed by Google. Then a link on Google should open the corresponding product in the RIA.
flex
google
ria
googlebot
null
null
open
How to make Flex RIA contents accessible to search engines like Google? === How would you make the contents of Flex RIA applications accessible to Google, so that Google can index the content and shows links to the right items in your Flex RIA. Consider a online shop, created in Flex, where the offered items shall be indexed by Google. Then a link on Google should open the corresponding product in the RIA.
0
63,257
09/15/2008 14:13:33
1,409
08/15/2008 13:18:51
665
46
Does generated code need to be human readable?
I'm working on a tool that will output an interface and a couple classes implementing that interface. My output isn't particularly complicated, so it's not going to be hard to make the output conform to our normal code formatting standards. But this got me thinking: how human-readable does auto-generated code need to be? When should extra effort be expended to make sure the generated code is easily understood by a human? In my case, the classes I'm generating are essentially just containers for some data related to another part of the build. No one should ever need to look at the code for the classes themselves, they just need to call the various getters it provides. So, it's probably not too important if the code is "clean". However, what happens if you're generating code that has a decent amount of logic in it?
language-agnostic
code-generation
readability
null
null
null
open
Does generated code need to be human readable? === I'm working on a tool that will output an interface and a couple classes implementing that interface. My output isn't particularly complicated, so it's not going to be hard to make the output conform to our normal code formatting standards. But this got me thinking: how human-readable does auto-generated code need to be? When should extra effort be expended to make sure the generated code is easily understood by a human? In my case, the classes I'm generating are essentially just containers for some data related to another part of the build. No one should ever need to look at the code for the classes themselves, they just need to call the various getters it provides. So, it's probably not too important if the code is "clean". However, what happens if you're generating code that has a decent amount of logic in it?
0
63,291
09/15/2008 14:16:41
299
08/04/2008 13:31:09
363
29
SQL: Select columns with NULL values only
How do I select all the columns in a table that only contain NULL values?
mssql
null
null
null
null
null
open
SQL: Select columns with NULL values only === How do I select all the columns in a table that only contain NULL values?
0
63,295
09/15/2008 14:16:54
7,659
09/15/2008 14:09:44
1
0
How do I get sun webserver to redirect from /
I have Sun webserver iws6 (iplanet 6) proxying my bea cluster. My cluster is under /portal/yadda. I want anyone who goes to http://the.domain.com/ to be quickly redirected to http://the.domain.com/portal/ . I have and index.html that does a post and redirect, but the user sometimes sees it. Does anyone have a better way? Aaron
webserver
sun
redirect
null
null
null
open
How do I get sun webserver to redirect from / === I have Sun webserver iws6 (iplanet 6) proxying my bea cluster. My cluster is under /portal/yadda. I want anyone who goes to http://the.domain.com/ to be quickly redirected to http://the.domain.com/portal/ . I have and index.html that does a post and redirect, but the user sometimes sees it. Does anyone have a better way? Aaron
0
63,343
09/15/2008 14:20:57
1,463
08/15/2008 17:26:44
505
34
How can I change IE's homepage without opening IE?
Here's an interesting problem. On a recently installed Server 2008 64bit I opened IE and through the Tools -> Options I changed the homepage to iGoogle.com. Clicked okay and then clicked the homepage button. IE crashes. Now you'd think that I could just remove iGoogle as the homepage but when I open IE it immediately goes to that page and crashes on open. Obviously I'd prefer to find a solution to why IE is crashing on the iGoogle page but just to get IE running again I need to remove iGoogle as the homepage. Is there anyway to do this without opening IE?
internet-explorer-7
server2008
null
null
null
null
open
How can I change IE's homepage without opening IE? === Here's an interesting problem. On a recently installed Server 2008 64bit I opened IE and through the Tools -> Options I changed the homepage to iGoogle.com. Clicked okay and then clicked the homepage button. IE crashes. Now you'd think that I could just remove iGoogle as the homepage but when I open IE it immediately goes to that page and crashes on open. Obviously I'd prefer to find a solution to why IE is crashing on the iGoogle page but just to get IE running again I need to remove iGoogle as the homepage. Is there anyway to do this without opening IE?
0
63,345
09/15/2008 14:21:07
7,505
09/15/2008 13:52:12
1
0
When did I last talk to my Domain Server?
How can my app get a valid "last time connected to domain" timestamp from Windows, even when the app is running offline? Background: I am writing an application that is run on multiple client machines throughout my company. All of these client machines are on one of the AD domains implemented by my company. This application needs to take certain measures if the client machine has not communicated with the AD for a period of time. An example might be that a machine running this app is stolen. After e.g. 4 weeks, the application refuses to work because it detects that the machine has not communicated with its AD domain for 4 weeks. Note that this must not be tied to a user account because the app might be running as a Local Service account. It the computer-domain relationship that I'm interested in. I have considered and rejected using `WinNT://<domain>/<machine>$,user` because it doesn't work while offline. Also, any `LDAP://...` lookups won't work while offline. I have also considered and rejected scheduling this query on a dayly basis and storing the timestamp in the registry or a file. This solutions requires too much setup and coding. Besides this value simply MUST be stored locally by Windows. Thanks in advance.
windows
activedirectory
null
null
null
null
open
When did I last talk to my Domain Server? === How can my app get a valid "last time connected to domain" timestamp from Windows, even when the app is running offline? Background: I am writing an application that is run on multiple client machines throughout my company. All of these client machines are on one of the AD domains implemented by my company. This application needs to take certain measures if the client machine has not communicated with the AD for a period of time. An example might be that a machine running this app is stolen. After e.g. 4 weeks, the application refuses to work because it detects that the machine has not communicated with its AD domain for 4 weeks. Note that this must not be tied to a user account because the app might be running as a Local Service account. It the computer-domain relationship that I'm interested in. I have considered and rejected using `WinNT://<domain>/<machine>$,user` because it doesn't work while offline. Also, any `LDAP://...` lookups won't work while offline. I have also considered and rejected scheduling this query on a dayly basis and storing the timestamp in the registry or a file. This solutions requires too much setup and coding. Besides this value simply MUST be stored locally by Windows. Thanks in advance.
0
63,378
09/15/2008 14:24:36
7,538
09/15/2008 13:56:32
1
0
Screen + vim causes shift-enter to insert 'M' and a newline
When running a vim instance in gnu screen hitting shift enter in insert mode adds an 'M' and then a newline, rather than just a newline. Does anybody know what the problem might be, or where to look? Thanks in advance Relevant system info: > Ubuntu 8.04.1 > Screen version 4.00.03 (FAU) 23-Oct-06 > VIM - Vi IMproved 7.1 (2007 May 12, compiled Jan 31 2008 12:20:21) > Included patches: 1-138
vim
screen
gnu-screen
ide
editor
null
open
Screen + vim causes shift-enter to insert 'M' and a newline === When running a vim instance in gnu screen hitting shift enter in insert mode adds an 'M' and then a newline, rather than just a newline. Does anybody know what the problem might be, or where to look? Thanks in advance Relevant system info: > Ubuntu 8.04.1 > Screen version 4.00.03 (FAU) 23-Oct-06 > VIM - Vi IMproved 7.1 (2007 May 12, compiled Jan 31 2008 12:20:21) > Included patches: 1-138
0
63,408
09/15/2008 14:29:15
1,967
08/19/2008 15:58:15
30
2
iPhone app loading
When loading, my iPhone apps always loads to a black screen first then pops up the main window--this happens even with a simple empty app with a single window loaded. I've noticed that when loading, most apps zoom in on the main window (or scale it to fit the screen, however you want to think about it) and then load the content of the screen, with no black screen (see the Contacts app for an example). How do I achieve this effect?
iphone
null
null
null
null
null
open
iPhone app loading === When loading, my iPhone apps always loads to a black screen first then pops up the main window--this happens even with a simple empty app with a single window loaded. I've noticed that when loading, most apps zoom in on the main window (or scale it to fit the screen, however you want to think about it) and then load the content of the screen, with no black screen (see the Contacts app for an example). How do I achieve this effect?
0
63,421
09/15/2008 14:31:22
7,545
09/15/2008 13:56:58
1
0
Using EMACS as an IDE
Currently my workflow with Emacs when I am coding in C or C++ involves three windows. The largest on the right contains the file I am working with. The left is split into two, the bottom being a shell which I use to type in compile or make commands, and the top is often some sort of documentation or README file that I want to consult while I am working. Now I know there are some pretty expert Emacs users out there, and I am curious what other Emacs functionally is useful if the intention is to use it as a complete IDE. Specifically, most IDEs usually fulfill these functions is some form or another: - Source code editor - Compiler - Debugging - Documentation Lookup - Version Control - OO features like class lookup and object inspector For a few of these, it's pretty obvious how Emacs can fit these functions, but what about the rest? Also, if a specific language must be focused on, I'd say it should be C++.
emacs
development-environment
null
null
null
null
open
Using EMACS as an IDE === Currently my workflow with Emacs when I am coding in C or C++ involves three windows. The largest on the right contains the file I am working with. The left is split into two, the bottom being a shell which I use to type in compile or make commands, and the top is often some sort of documentation or README file that I want to consult while I am working. Now I know there are some pretty expert Emacs users out there, and I am curious what other Emacs functionally is useful if the intention is to use it as a complete IDE. Specifically, most IDEs usually fulfill these functions is some form or another: - Source code editor - Compiler - Debugging - Documentation Lookup - Version Control - OO features like class lookup and object inspector For a few of these, it's pretty obvious how Emacs can fit these functions, but what about the rest? Also, if a specific language must be focused on, I'd say it should be C++.
0
63,429
09/15/2008 14:31:57
7,838
09/15/2008 14:31:57
1
0
How do I display dynamic text at the mouse cursor via C++/MFC in a Win32 application.
I would like to be able to display some dynamic text at the mouse cursor location in a win32 app, for instance to give an X,Y coordinate that would move with the cursor as though attached. I can do this during a mousemove event using a TextOut() call for the window at the mouse coordinates and invalidate a rectange around a stored last cursor position to clear up the previous output. However this can suffer from flickering and cause problems with other things being drawn in a window such as tracker boxes. Is there a better way to do this, perhaps using the existing cursor drawing/invalidating mechanism ?
c++
mfc
wn32
null
null
null
open
How do I display dynamic text at the mouse cursor via C++/MFC in a Win32 application. === I would like to be able to display some dynamic text at the mouse cursor location in a win32 app, for instance to give an X,Y coordinate that would move with the cursor as though attached. I can do this during a mousemove event using a TextOut() call for the window at the mouse coordinates and invalidate a rectange around a stored last cursor position to clear up the previous output. However this can suffer from flickering and cause problems with other things being drawn in a window such as tracker boxes. Is there a better way to do this, perhaps using the existing cursor drawing/invalidating mechanism ?
0
63,439
09/15/2008 14:32:56
2,187
08/20/2008 20:30:43
117
4
Programatically show tooltip in winforms application.
How can I programatically cause a control's tooltip to show in a Winforms app? (P/Invoke is ok if necessary).
winforms
null
null
null
null
null
open
Programatically show tooltip in winforms application. === How can I programatically cause a control's tooltip to show in a Winforms app? (P/Invoke is ok if necessary).
0
63,447
09/15/2008 14:34:09
6,522
09/15/2008 11:57:44
6
1
How do you preform an IF...THEN in a SQL SELECT
I want to be able to perform a IF...THEN in an SQL SELECT Statement. For Example; SELECT IF(Obsolete = 'N' or InStock = 'Y';1;0) as Salable, * FROM Product
mssql
null
null
null
null
null
open
How do you preform an IF...THEN in a SQL SELECT === I want to be able to perform a IF...THEN in an SQL SELECT Statement. For Example; SELECT IF(Obsolete = 'N' or InStock = 'Y';1;0) as Salable, * FROM Product
0
63,454
09/15/2008 14:34:58
315,650
09/15/2008 14:17:57
1
0
What is the best javascript lightbox script currently available?
What is the best javascript lightbox script currently available? I'm working on a project and am a bit baffled at the number of lightbox scripts out there. The one I need should: - not allow flash movies to show through the grayed out background - work in all browsers including IE6, Opera - should allow html content, flash files - easily skinnable/css configurable - should be well documented - can be a jquery plugin (can just be a standalone script), but not prototype - can display iframes - is well documented and tested
javascript
css
design
interface
lightbox
null
open
What is the best javascript lightbox script currently available? === What is the best javascript lightbox script currently available? I'm working on a project and am a bit baffled at the number of lightbox scripts out there. The one I need should: - not allow flash movies to show through the grayed out background - work in all browsers including IE6, Opera - should allow html content, flash files - easily skinnable/css configurable - should be well documented - can be a jquery plugin (can just be a standalone script), but not prototype - can display iframes - is well documented and tested
0
63,463
09/15/2008 14:35:57
3,043
08/26/2008 13:24:14
2,279
217
Split out ints from string
Let's say I have a web page that currently accepts a single ID value via a url parameter: http://example.com/maypage.aspx?ID=1234 I want to change it to accept a _list_ of ids, like this: http://example.com/mypage.aspx?IDs=1234,4321,6789 So it's available to my code as a string via _context.Request.QueryString["IDs"]._ What's the best way to turn that string value into a List&lt;int>? **Edit:** I know how to do .split() on a comma to get a list of strings, but I ask because I don't know how to easily convert that string list to an in list. This is still in .Net 2.0, so no lambdas.
.net
.net-2.0
string
null
null
null
open
Split out ints from string === Let's say I have a web page that currently accepts a single ID value via a url parameter: http://example.com/maypage.aspx?ID=1234 I want to change it to accept a _list_ of ids, like this: http://example.com/mypage.aspx?IDs=1234,4321,6789 So it's available to my code as a string via _context.Request.QueryString["IDs"]._ What's the best way to turn that string value into a List&lt;int>? **Edit:** I know how to do .split() on a comma to get a list of strings, but I ask because I don't know how to easily convert that string list to an in list. This is still in .Net 2.0, so no lambdas.
0
63,488
09/15/2008 14:38:58
7,666
09/15/2008 14:10:56
1
1
Which is the most useful Mercurial hook for programming in a loosely connected team?
I recently discovered the notify extension in Mercurial which allows me quickly send out emails whenever I push changes, but I'm pretty sure I'm still missing out on a lot of functionality which could make my live a lot easier. Which Mercurial hook or combination of interoperating hooks is the most useful for working in a loosely connected team?
python
mercurial
hook
null
null
null
open
Which is the most useful Mercurial hook for programming in a loosely connected team? === I recently discovered the notify extension in Mercurial which allows me quickly send out emails whenever I push changes, but I'm pretty sure I'm still missing out on a lot of functionality which could make my live a lot easier. Which Mercurial hook or combination of interoperating hooks is the most useful for working in a loosely connected team?
0
63,494
09/15/2008 14:39:31
3,848
08/31/2008 11:24:27
122
13
Does anyone use template metaprogramming in real life?
I discovered [template metaprogramming](http://en.wikipedia.org/wiki/Template_metaprogramming) more than 5 years ago and got a huge kick out of reading [Modern C++ Design](http://www.amazon.com/Modern-Design-Programming-Patterns-Depth/dp/0201704315) but I never found an opertunity to use it in real life. Have *you* ever used this technique in real code? > Contributors to [Boost](http://www.boost.org/) need not apply ;o)
c++
templates
null
null
null
null
open
Does anyone use template metaprogramming in real life? === I discovered [template metaprogramming](http://en.wikipedia.org/wiki/Template_metaprogramming) more than 5 years ago and got a huge kick out of reading [Modern C++ Design](http://www.amazon.com/Modern-Design-Programming-Patterns-Depth/dp/0201704315) but I never found an opertunity to use it in real life. Have *you* ever used this technique in real code? > Contributors to [Boost](http://www.boost.org/) need not apply ;o)
0
63,509
09/15/2008 14:40:55
7,556
09/15/2008 13:57:47
1
3
Are there any JSF component libraries that generate semantic and cross-browser html markup?
I'm using RichFaces per a client requirement, but the markup it (and the stock JSF controls) generates is an awful mess of nested tables. Are there any control libraries out there that generate nicer markup? AJAX support is a huge plus!
jsf
semantic-web
null
null
null
null
open
Are there any JSF component libraries that generate semantic and cross-browser html markup? === I'm using RichFaces per a client requirement, but the markup it (and the stock JSF controls) generates is an awful mess of nested tables. Are there any control libraries out there that generate nicer markup? AJAX support is a huge plus!
0
63,517
09/15/2008 14:41:39
7,850
09/15/2008 14:32:35
1
0
Intellisense in Visual Studio 2005 between C# and VB - can't navigate to definitions
I'm absolutely stunned by the fact that MS just couldn't get it right to navigate to the definition of a method, when you're combining C# and VB projects in one solution. If you're trying to navigate from VB to C#, it brings up the "Object Explorer", and if from C# to VB, it generates a metadata file. Honestly, what is so complicated about jumping between different languages, especially if they're supposedly using the same CLR? Does anyone know why this is, or if there's any workaround? Did they get it right in VS 2008?
c#
visual-studio
vb.net
microsoft
intellisense
null
open
Intellisense in Visual Studio 2005 between C# and VB - can't navigate to definitions === I'm absolutely stunned by the fact that MS just couldn't get it right to navigate to the definition of a method, when you're combining C# and VB projects in one solution. If you're trying to navigate from VB to C#, it brings up the "Object Explorer", and if from C# to VB, it generates a metadata file. Honestly, what is so complicated about jumping between different languages, especially if they're supposedly using the same CLR? Does anyone know why this is, or if there's any workaround? Did they get it right in VS 2008?
0
63,546
09/15/2008 14:45:47
7,950
09/15/2008 14:45:46
1
0
VS2005 C# Programmatically change connection string contained in app.config
Would like to programmically change the connecton string for a database which utilizes the membership provider of asp.net within a windows application. The system.configuration namespace allows changes to the user settings, however, we would like to adjust a application setting? Does one need to write a class with utilizes XML to modify the class?
c#
windowsapplication
null
null
null
null
open
VS2005 C# Programmatically change connection string contained in app.config === Would like to programmically change the connecton string for a database which utilizes the membership provider of asp.net within a windows application. The system.configuration namespace allows changes to the user settings, however, we would like to adjust a application setting? Does one need to write a class with utilizes XML to modify the class?
0
63,556
09/15/2008 14:46:56
1,404
08/15/2008 11:06:47
72
3
c# properties with repeated code
I have a class with a bunch of properties that look like this: public string Name { get { return _name; } set { IsDirty = true; _name = value; } } It would be a lot easier if I could rely on C# 3.0 to generate the backing store for these, but is there any way to factor out the IsDirty=true; so that I can write my properties something like this and still get the same behaviour: [MakesDirty] public string Name { get; set; }
c#
properties
attributes
null
null
null
open
c# properties with repeated code === I have a class with a bunch of properties that look like this: public string Name { get { return _name; } set { IsDirty = true; _name = value; } } It would be a lot easier if I could rely on C# 3.0 to generate the backing store for these, but is there any way to factor out the IsDirty=true; so that I can write my properties something like this and still get the same behaviour: [MakesDirty] public string Name { get; set; }
0
63,563
09/15/2008 14:47:53
7,053
09/15/2008 13:04:53
1
0
Capturing the desktop with WMF
I am using [Windows Media Format SDK][1] to capture the desktop in real time and save it in a WMV file (actually this is an oversimplification of my project, but this is the relevant part). For encoding, I am using the [Windows Media Video 9 Screen][2] codec because it is very efficient for screen captures and because it is available to practically everybody without the need to install anything, as the codec is included with Windows Media Player 9 runtime (included in Windows XP SP1). I am making BITMAP screen shots using the GDI functions and feed those BITMAPs to the encoder. As you can guess, taking screen shots with GDI is slow, and I don't get the screen cursor, which I have to add manually to the BITMAPs. The BITMAPs I get initially are DDBs, and I need to convert those to DIBs for the encoder to understand (RGB input), and this takes more time. Firing a profiler shows that about 50% of the time is spent in WMVCORE.DLL, the encoder. This is to be expected, of course as the encoding is CPU intensive. The thing is, there is something called [Windows Media Encoder][3] that comes with a SDK, and can do screen capture using the desired codec in a simpler, and more CPU friendly way. The WME is based on WMF. It's a higher lever library and also has .NET bindings. I can't use it in my project because this brings unwanted dependencies that I have to avoid. I am asking about the method WME uses for feeding sample data to the WMV encoder. The encoding takes place with WME exactly like it takes place with my application that uses WMF. WME is more efficient than my application because it has a much more efficient way of feeding video data to the encoder. It doesn't rely on slow GDI functions and DDB->DIB conversions. How is it done? Thanks in advance, A. [1]: http://msdn.microsoft.com/en-us/library/aa387410(VS.85).aspx [2]: http://www.microsoft.com/windows/windowsmedia/forpros/codecs/video.aspx#WindowsMediaVideo9Screen [3]: http://www.microsoft.com/windows/windowsmedia/forpros/encoder/default.mspx
windows
screencasts
winapi
directshow
wmf
null
open
Capturing the desktop with WMF === I am using [Windows Media Format SDK][1] to capture the desktop in real time and save it in a WMV file (actually this is an oversimplification of my project, but this is the relevant part). For encoding, I am using the [Windows Media Video 9 Screen][2] codec because it is very efficient for screen captures and because it is available to practically everybody without the need to install anything, as the codec is included with Windows Media Player 9 runtime (included in Windows XP SP1). I am making BITMAP screen shots using the GDI functions and feed those BITMAPs to the encoder. As you can guess, taking screen shots with GDI is slow, and I don't get the screen cursor, which I have to add manually to the BITMAPs. The BITMAPs I get initially are DDBs, and I need to convert those to DIBs for the encoder to understand (RGB input), and this takes more time. Firing a profiler shows that about 50% of the time is spent in WMVCORE.DLL, the encoder. This is to be expected, of course as the encoding is CPU intensive. The thing is, there is something called [Windows Media Encoder][3] that comes with a SDK, and can do screen capture using the desired codec in a simpler, and more CPU friendly way. The WME is based on WMF. It's a higher lever library and also has .NET bindings. I can't use it in my project because this brings unwanted dependencies that I have to avoid. I am asking about the method WME uses for feeding sample data to the WMV encoder. The encoding takes place with WME exactly like it takes place with my application that uses WMF. WME is more efficient than my application because it has a much more efficient way of feeding video data to the encoder. It doesn't rely on slow GDI functions and DDB->DIB conversions. How is it done? Thanks in advance, A. [1]: http://msdn.microsoft.com/en-us/library/aa387410(VS.85).aspx [2]: http://www.microsoft.com/windows/windowsmedia/forpros/codecs/video.aspx#WindowsMediaVideo9Screen [3]: http://www.microsoft.com/windows/windowsmedia/forpros/encoder/default.mspx
0
63,581
09/15/2008 14:50:34
4,186
09/02/2008 09:12:05
11
1
Unobtrusive Javascript: Removing links if Javascript is enabled
I'm using [PopBox][1] for magnifying thumbnails on my page. But I want my website to work even for users which turned javascript off. I tried to use the following HTML code: <a href="image.jpg"> <img src="thumbnail.jpg" pbsrc="image.jpg" onclick="Pop(...);"/> </a> Now i need to disable the a-Tag using javascript, otherwise my PopBox won't work. How do I do that? [1]: http://www.c6software.com/Products/PopBox/
javascript
unobtrusive
null
null
null
null
open
Unobtrusive Javascript: Removing links if Javascript is enabled === I'm using [PopBox][1] for magnifying thumbnails on my page. But I want my website to work even for users which turned javascript off. I tried to use the following HTML code: <a href="image.jpg"> <img src="thumbnail.jpg" pbsrc="image.jpg" onclick="Pop(...);"/> </a> Now i need to disable the a-Tag using javascript, otherwise my PopBox won't work. How do I do that? [1]: http://www.c6software.com/Products/PopBox/
0
63,599
09/15/2008 14:52:15
7,106
09/15/2008 13:10:41
1
2
Including files case-sensitively on Windows from PHP
We have an issue using the PEAR libraries on Windows from PHP. Pear contains many classes, we are making use of a fair few, one of which is the Mail class found in Mail.php. We use PEAR on the path, rather than providing the full explicit path to individual PEAR files: require_once('Mail.php'); Rather than: require_once('/path/to/pear/Mail.php'); This causes issues in the administration module of the site, where there is a mail.php file (used to send mails to users). If we are in an administrative screen that sends an email (such as the user administration screen that can generate and email new random passwords to users when they are approved from the moderation queue) and we attempt to include Mail.php we "accidentally" include mail.php. Without changing to pre-pend the full path to the PEAR install explicitly requiring the PEAR modules (non-standard, typically you install PEAR to your path...) is there a way to enforce PHP on Windows to require files case-sensitively? (We support Apache and Microsoft IIS)
php
windows
apache
pear
null
null
open
Including files case-sensitively on Windows from PHP === We have an issue using the PEAR libraries on Windows from PHP. Pear contains many classes, we are making use of a fair few, one of which is the Mail class found in Mail.php. We use PEAR on the path, rather than providing the full explicit path to individual PEAR files: require_once('Mail.php'); Rather than: require_once('/path/to/pear/Mail.php'); This causes issues in the administration module of the site, where there is a mail.php file (used to send mails to users). If we are in an administrative screen that sends an email (such as the user administration screen that can generate and email new random passwords to users when they are approved from the moderation queue) and we attempt to include Mail.php we "accidentally" include mail.php. Without changing to pre-pend the full path to the PEAR install explicitly requiring the PEAR modules (non-standard, typically you install PEAR to your path...) is there a way to enforce PHP on Windows to require files case-sensitively? (We support Apache and Microsoft IIS)
0
63,607
09/15/2008 14:53:05
7,735
09/15/2008 14:19:12
1
1
Rendering SVG and Delphi
What are options to render SVG images with Delphi (Win32)? "Interactive" component would be big advantage, I'd like to be able to modify the SVG image dynamically (change colors, line widths, texts) and get events when user clicks the image.
delphi
svg
null
null
null
null
open
Rendering SVG and Delphi === What are options to render SVG images with Delphi (Win32)? "Interactive" component would be big advantage, I'd like to be able to modify the SVG image dynamically (change colors, line widths, texts) and get events when user clicks the image.
0
63,617
09/15/2008 14:54:17
6,992
09/15/2008 12:58:25
1
0
A good, free resource to learn the fundamentals of C (not C++) development?
Any recommendation for a good, free resource to learn the fundamentals of C (not C++) development covering basic topics such as Algorithms, Control Structures, Functions, Arrays, Pointers, Structures, et cétera?
c
tutorials
resources
reference
questions
null
open
A good, free resource to learn the fundamentals of C (not C++) development? === Any recommendation for a good, free resource to learn the fundamentals of C (not C++) development covering basic topics such as Algorithms, Control Structures, Functions, Arrays, Pointers, Structures, et cétera?
0
63,618
09/15/2008 14:54:18
7,936
09/15/2008 14:44:19
1
0
What is best way to debug Shoes applications?
Shoes has some built in dump commands (Shoes.debug), but are there other tools that can debug the code without injecting debug messages throughout? Something like gdb would be great.
ruby
shoes
null
null
null
null
open
What is best way to debug Shoes applications? === Shoes has some built in dump commands (Shoes.debug), but are there other tools that can debug the code without injecting debug messages throughout? Something like gdb would be great.
0
63,632
09/15/2008 14:55:32
6,106
09/12/2008 12:48:57
251
3
Importing XML file in Rails app, UTF-16 encoding problem
I'm trying to import an XML file via a web page in a Ruby on Rails application, the code ruby view code is as follows (I've removed HTML layout tags to make reading the code easier) <% form_for( :fmfile, :url => '/fmfiles', :html => { :method => :post, :name => 'Form_Import_DDR', :enctype => 'multipart/form-data' } ) do |f| %> <%= f.file_field :document, :accept => 'text/xml', :name => 'fmfile_document' %> <%= submit_tag 'Import DDR' %> <% end %> Results in the following HTML form <form action="/fmfiles" enctype="multipart/form-data" method="post" name="Form_Import_DDR"><div style="margin:0;padding:0"><input name="authenticity_token" type="hidden" value="3da97372885564a4587774e7e31aaf77119aec62" /> <input accept="text/xml" id="fmfile_document" name="fmfile_document" size="30" type="file" /> <input name="commit" type="submit" value="Import DDR" /> </form> The Form_Import_DDR method in the 'fmfiles_controller' is the code that does the hard work of reading the XML document in using REXML. The code is as follows @fmfile = Fmfile.new @fmfile.user_id = current_user.id @fmfile.file_group_id = 1 @fmfile.name = params[:fmfile_document].original_filename respond_to do |format| if @fmfile.save require 'rexml/document' doc = REXML::Document.new(params[:fmfile_document].read) doc.root.elements['File'].elements['BaseTableCatalog'].each_element('BaseTable') do |n| @base_table = BaseTable.new @base_table.base_table_create(@fmfile.user_id, @fmfile.id, n) end And it carries on reading all the different XML elements in. My question is this. This whole process works fine when reading an XML document with character encoding UTF-8 but fails when the XML file is UTF-16, does anyone know why this is happening and how it can be stopped? I'm using Rails 2.1.0 and Mongrel 1.1.5 in Development environment on Mac OS X 10.5.4, site DB and browser on same machine.
xml
rubyonrails
null
null
null
null
open
Importing XML file in Rails app, UTF-16 encoding problem === I'm trying to import an XML file via a web page in a Ruby on Rails application, the code ruby view code is as follows (I've removed HTML layout tags to make reading the code easier) <% form_for( :fmfile, :url => '/fmfiles', :html => { :method => :post, :name => 'Form_Import_DDR', :enctype => 'multipart/form-data' } ) do |f| %> <%= f.file_field :document, :accept => 'text/xml', :name => 'fmfile_document' %> <%= submit_tag 'Import DDR' %> <% end %> Results in the following HTML form <form action="/fmfiles" enctype="multipart/form-data" method="post" name="Form_Import_DDR"><div style="margin:0;padding:0"><input name="authenticity_token" type="hidden" value="3da97372885564a4587774e7e31aaf77119aec62" /> <input accept="text/xml" id="fmfile_document" name="fmfile_document" size="30" type="file" /> <input name="commit" type="submit" value="Import DDR" /> </form> The Form_Import_DDR method in the 'fmfiles_controller' is the code that does the hard work of reading the XML document in using REXML. The code is as follows @fmfile = Fmfile.new @fmfile.user_id = current_user.id @fmfile.file_group_id = 1 @fmfile.name = params[:fmfile_document].original_filename respond_to do |format| if @fmfile.save require 'rexml/document' doc = REXML::Document.new(params[:fmfile_document].read) doc.root.elements['File'].elements['BaseTableCatalog'].each_element('BaseTable') do |n| @base_table = BaseTable.new @base_table.base_table_create(@fmfile.user_id, @fmfile.id, n) end And it carries on reading all the different XML elements in. My question is this. This whole process works fine when reading an XML document with character encoding UTF-8 but fails when the XML file is UTF-16, does anyone know why this is happening and how it can be stopped? I'm using Rails 2.1.0 and Mongrel 1.1.5 in Development environment on Mac OS X 10.5.4, site DB and browser on same machine.
0
63,646
09/15/2008 14:56:37
7,532
09/15/2008 13:55:10
1
0
WPF Data Binding and Validation Rules Best Practices
I have a very simple WPF application in which I am using data binding to allow editing of some custom CLR objects. I am now wanting to put some input validation in when the user clicks save. However, all the WPF books I have read don't really devote any space to this issue. I see that you can create custom ValidationRules, but I am wondering if this would be overkill for my needs. So my question is this: is there a good sample application or article somewhere that demonstrates best practice for validating user input in WPF?
wpf
validation
data-binding
null
null
null
open
WPF Data Binding and Validation Rules Best Practices === I have a very simple WPF application in which I am using data binding to allow editing of some custom CLR objects. I am now wanting to put some input validation in when the user clicks save. However, all the WPF books I have read don't really devote any space to this issue. I see that you can create custom ValidationRules, but I am wondering if this would be overkill for my needs. So my question is this: is there a good sample application or article somewhere that demonstrates best practice for validating user input in WPF?
0
63,658
09/15/2008 14:58:02
7,921
09/15/2008 14:41:58
1
1
How do I stop network flooding using Windows 2003 Network Load balancing?
I know that the MsNLB can be configured to user mulitcast with IGMP. However, if the switch does not support IGMP what are the options?
networking
load-balancing
msnlb
win2003
null
null
open
How do I stop network flooding using Windows 2003 Network Load balancing? === I know that the MsNLB can be configured to user mulitcast with IGMP. However, if the switch does not support IGMP what are the options?
0
63,671
09/15/2008 14:59:29
1,228
08/13/2008 13:58:55
1,808
135
Is it safe for structs to implement interfaces?
I seem to remember reading something about how it is bad for structs to implement interfaces in CLR via C#, but I can't seem to find anything about it. Is it bad? Are there unintended consequences of doing so? public interface Foo { Bar GetBar(); } public struct Fubar : Foo { public Bar GetBar() { return new Bar(); } }
.net
interface
struct
null
null
null
open
Is it safe for structs to implement interfaces? === I seem to remember reading something about how it is bad for structs to implement interfaces in CLR via C#, but I can't seem to find anything about it. Is it bad? Are there unintended consequences of doing so? public interface Foo { Bar GetBar(); } public struct Fubar : Foo { public Bar GetBar() { return new Bar(); } }
0
63,681
09/15/2008 15:00:45
7,735
09/15/2008 14:19:12
1
1
How create threads under Python for Delphi?
I'm hosting Python script with Python for Delphi components inside my Delphi application. I'd like to create background tasks which keep running by script. Is it possible to create threads which keep running even if the script execution ends. I've noticed that the program gets stuck if the executing script ends and there is thread running. However if I'll wait until the thread is finished everything goes fine.
python
delphi
null
null
null
null
open
How create threads under Python for Delphi? === I'm hosting Python script with Python for Delphi components inside my Delphi application. I'd like to create background tasks which keep running by script. Is it possible to create threads which keep running even if the script execution ends. I've noticed that the program gets stuck if the executing script ends and there is thread running. However if I'll wait until the thread is finished everything goes fine.
0
63,690
09/15/2008 15:01:44
7,685
09/15/2008 14:13:32
1
1
How do you reliably get an IP address via DHCP?
I work with embedded Linux systems that sometimes want to get their IP address from a DHCP server. The DHCP Client client we use ([dhcpcd][1]) has limited retry logic. If our device starts up without any DHCP server available and times out, dhcpcd will exit and the device will never get an IP address until it's rebooted with a DHCP server visible/connected. I can't be the only one that has this problem. The problem doesn't even seem to be specific to embedded systems (though it's worse there). How do you handle this? Is there a more robust client available? [1]: http://www.phystech.com/download/dhcpcd.html "DHCPCD"
linux
dhcp
null
null
null
null
open
How do you reliably get an IP address via DHCP? === I work with embedded Linux systems that sometimes want to get their IP address from a DHCP server. The DHCP Client client we use ([dhcpcd][1]) has limited retry logic. If our device starts up without any DHCP server available and times out, dhcpcd will exit and the device will never get an IP address until it's rebooted with a DHCP server visible/connected. I can't be the only one that has this problem. The problem doesn't even seem to be specific to embedded systems (though it's worse there). How do you handle this? Is there a more robust client available? [1]: http://www.phystech.com/download/dhcpcd.html "DHCPCD"
0
63,694
09/15/2008 15:02:16
7,028
09/15/2008 13:02:20
1
3
Creating a Math library using Generics in C#
Is there any feasible way of using generics to create a Math library that does not depend on the base type chosen to store data? In other words, let's assume I want to write a Fraction class. The fraction can be represented by two ints or two doubles or whatnot. The important thing is that the basic four arithmetic operations are well defined. So, I would like to be able to write "Fraction<int> frac = new Fraction<int>(1,2)" and/or "Fraction<double> frac = new Fraction<double>(0.1, 1.0). Unfortunately there is no interface representing the four basic operations (+,-×,÷). Has anybody found a workable, feasible way of implementing this?
c#
generics
math
interface
null
null
open
Creating a Math library using Generics in C# === Is there any feasible way of using generics to create a Math library that does not depend on the base type chosen to store data? In other words, let's assume I want to write a Fraction class. The fraction can be represented by two ints or two doubles or whatnot. The important thing is that the basic four arithmetic operations are well defined. So, I would like to be able to write "Fraction<int> frac = new Fraction<int>(1,2)" and/or "Fraction<double> frac = new Fraction<double>(0.1, 1.0). Unfortunately there is no interface representing the four basic operations (+,-×,÷). Has anybody found a workable, feasible way of implementing this?
0
63,720
09/15/2008 15:05:05
7,961
09/15/2008 14:47:10
1
0
Does Vista do stricter checking or Interface Ids in DCOM calls? (the Stub received bad Data)?
I hope everyone will pardon the length, and narrative fashion, of this question. I decided to describe the situation in some detail in my blog. I later saw Joel's invitation to this site, and I thought I'd paste it here to see if anyone has any insight into the situation. I wrote, and now support, an application that consists of a Visual Basic thick client speaking DCOM to middle tier COM+ components written in C++ using ATL. It runs in all eight of our offices. Each office hosts a back-end server that contains the COM+ application (consisting of 18 separate components) and the SQLServer. The SQLServer is typically on the same back-end server, but need not be. We recently migrated the back-end server in our largest office -- New York -- from a MSC cluster to a new virtual machine hosted on VMWare's ESX technology. Since the location of the COM+ application had moved from the old server to a new one with a different name, I had to redirect all the clients so that they activated the COM+ application on the new server. The procedure was old hat as I had done essentially the same thing for several of my smaller offices that had gone through similar infrastructure upgrades. All seemed routine and on Monday morning the entire office -- about 1,000 Windows XP workstations -- were running without incident on the new server. But then the call came from my mobile group -- there was an attorney working from home with a VPN connection that was getting a strange error after being redirected to the new server: <pre> Error on FillTreeView2 - The stub received bad data. </pre> Huh? I had never seen this error message before. Was it the new server? But all the workstations in the office were working fine. I told the mobile group to switch the attorney back to the old sever (which was still up), and the error disappeared. So what was the difference? Turns out this attorney was running Vista at home. We don't run Vista in any of our offices, but we do have some attorneys that run Vista at home (certainly some in my New York office). I do as well and I've never seen this problem. To confirm that there was an issue, I fired up my Vista laptop, pointed it to the new server, and got the same error. I pointed it back to the old server, and it worked fine. Clearly there was some problem with Vista and the components on the new server -- a problem that did not seem to affect XP clients. What could it be? Next stop -- the application error log on my laptop. This yielded more information on the error: <pre> Source: Microsoft-Windows-RPC-Events Date: 9/2/2008 11:56:07 AM Event ID: 10 Level: Error Computer: DevLaptop Description: Application has failed to complete a COM call because an incorrect interface ID was passed as a parameter. The expected Interface ID was 00000555-0000-0010-8000-00aa006d2ea4, The Interface ID returned was 00000556-0000-0010-8000-00aa006d2ea4. User Action - Contact the application vendor for updated version of the application. </pre> The interface ids provided the clue I needed to unravel the mystery. The "expected" interface id identifies MDAC's Recordset interface -- specifically version 2.1 of that interface. The "returned" interface corresponds to a later version of Recordset (version 2.5 which differs from version 2.1 by the inclusion of one additional entry at the end of the vtable -- method Save). Indeed my component's interfaces expose many methods that pass Recordset as an output parameter. So were they suddenly returning a later version of Recordset -- with a different interface id? It certainly appeared to be the case. And then I thought, why should it matter. The vtable looks the same to clients of the older interface. Indeed, I suspect that if we were talking about in-process COM, and not DCOM, this apparently innocuous impedance mismatch would have been silently ignored and would have caused no issues. Of course, when process and machine boundaries come into play, there is a proxy and a stub between the client and the server. In this case, I was using type library marshaling with the free threaded marshaller. So there were two mysteries to solve: Why was I returning a different interface in the output parameters from methods on my new server? Why did this affect only Vista clients? As my server software was hosted on servers at each of my eight offices, I decided to try pointing my Vista client at all of them in sequence to see which had problems with Vista and which didn't. Illuminating test. Some of the older servers still worked with Vista but the newer ones did not. Although some of the older servers were still running Windows 2000 while the newer ones were at 2003, that did not seem to be the issue. After comparing the dates of the component DLLs it appeared that whenever the client pointed to servers with component DLLs dated before 2003 Vista was fine. But those that had DLLs with dates after 2003 were problematic. Believe it or nor, there were no (or at least no significant) changes to the code on the server components in many years. Apparently the differing dates were simply due to recompiles of my components on my development machine(s). And it appeared that one of those recompiles happened in 2003. The light bulb went on. When passing Recordsets back from server to client, my ATL C++ components refer to the interface as _Recordset. This symbol comes from the type library embedded within msado15.dll. This is the line I had in the C++ code: <pre> #import "c:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace rename ( "EOF", "adoEOF" ) </pre> Don't be deceived by the 15 in msdad15.dll. Apparently this DLL has not changed name in the long series of MDAC versions. When I compiled the application back in the day, the version of MDAC was 2.1. So _Recordset compiled with the 2.1 interface id and that is the interface returned by the servers running those components. All the client's use the COM+ application proxy that was generated (I believe) back in 1999. The type library that defines my interfaces includes the line: <pre> importlib("msado21.tlb"); </pre> which explains why they expect version 2.1 of Recordset in my method's output parameters. Clearly the problem was with my 2003 recompile and the fact that at that time the _Recordset symbol no longer corresponded to version 2.1. Indeed _Recordset corresponded to the 2.5 version with its distinct interface id. The solution for me was to change all references from _Recordset to Recordset21 in my C++ code. I rebuilt the components and deployed them to the new server. Voila -- the clients seemed happy again. In conclusion, there are two nagging questions that remain for me. Why does the proxy/stub infrastructure seem to behave differently with Vista clients. It appears that Vista is making stricter checks of the interface ids coming back from method parameters than is XP. How should I have coded this differently back in 1999 so that this would not have happened? Interfaces are supposed to be immutable and when I recompiled under a newer version of MDAC, I inadvertently changed my interface because the methods now returned a different Recordset interface as an output parameter. As far as I know, the type library back then did not have a version-specific symbol -- that is, later versions of the MDAC type libraries define Recordset21, but that symbol was not available back in the 2.1 type library.
dcom
null
null
null
null
null
open
Does Vista do stricter checking or Interface Ids in DCOM calls? (the Stub received bad Data)? === I hope everyone will pardon the length, and narrative fashion, of this question. I decided to describe the situation in some detail in my blog. I later saw Joel's invitation to this site, and I thought I'd paste it here to see if anyone has any insight into the situation. I wrote, and now support, an application that consists of a Visual Basic thick client speaking DCOM to middle tier COM+ components written in C++ using ATL. It runs in all eight of our offices. Each office hosts a back-end server that contains the COM+ application (consisting of 18 separate components) and the SQLServer. The SQLServer is typically on the same back-end server, but need not be. We recently migrated the back-end server in our largest office -- New York -- from a MSC cluster to a new virtual machine hosted on VMWare's ESX technology. Since the location of the COM+ application had moved from the old server to a new one with a different name, I had to redirect all the clients so that they activated the COM+ application on the new server. The procedure was old hat as I had done essentially the same thing for several of my smaller offices that had gone through similar infrastructure upgrades. All seemed routine and on Monday morning the entire office -- about 1,000 Windows XP workstations -- were running without incident on the new server. But then the call came from my mobile group -- there was an attorney working from home with a VPN connection that was getting a strange error after being redirected to the new server: <pre> Error on FillTreeView2 - The stub received bad data. </pre> Huh? I had never seen this error message before. Was it the new server? But all the workstations in the office were working fine. I told the mobile group to switch the attorney back to the old sever (which was still up), and the error disappeared. So what was the difference? Turns out this attorney was running Vista at home. We don't run Vista in any of our offices, but we do have some attorneys that run Vista at home (certainly some in my New York office). I do as well and I've never seen this problem. To confirm that there was an issue, I fired up my Vista laptop, pointed it to the new server, and got the same error. I pointed it back to the old server, and it worked fine. Clearly there was some problem with Vista and the components on the new server -- a problem that did not seem to affect XP clients. What could it be? Next stop -- the application error log on my laptop. This yielded more information on the error: <pre> Source: Microsoft-Windows-RPC-Events Date: 9/2/2008 11:56:07 AM Event ID: 10 Level: Error Computer: DevLaptop Description: Application has failed to complete a COM call because an incorrect interface ID was passed as a parameter. The expected Interface ID was 00000555-0000-0010-8000-00aa006d2ea4, The Interface ID returned was 00000556-0000-0010-8000-00aa006d2ea4. User Action - Contact the application vendor for updated version of the application. </pre> The interface ids provided the clue I needed to unravel the mystery. The "expected" interface id identifies MDAC's Recordset interface -- specifically version 2.1 of that interface. The "returned" interface corresponds to a later version of Recordset (version 2.5 which differs from version 2.1 by the inclusion of one additional entry at the end of the vtable -- method Save). Indeed my component's interfaces expose many methods that pass Recordset as an output parameter. So were they suddenly returning a later version of Recordset -- with a different interface id? It certainly appeared to be the case. And then I thought, why should it matter. The vtable looks the same to clients of the older interface. Indeed, I suspect that if we were talking about in-process COM, and not DCOM, this apparently innocuous impedance mismatch would have been silently ignored and would have caused no issues. Of course, when process and machine boundaries come into play, there is a proxy and a stub between the client and the server. In this case, I was using type library marshaling with the free threaded marshaller. So there were two mysteries to solve: Why was I returning a different interface in the output parameters from methods on my new server? Why did this affect only Vista clients? As my server software was hosted on servers at each of my eight offices, I decided to try pointing my Vista client at all of them in sequence to see which had problems with Vista and which didn't. Illuminating test. Some of the older servers still worked with Vista but the newer ones did not. Although some of the older servers were still running Windows 2000 while the newer ones were at 2003, that did not seem to be the issue. After comparing the dates of the component DLLs it appeared that whenever the client pointed to servers with component DLLs dated before 2003 Vista was fine. But those that had DLLs with dates after 2003 were problematic. Believe it or nor, there were no (or at least no significant) changes to the code on the server components in many years. Apparently the differing dates were simply due to recompiles of my components on my development machine(s). And it appeared that one of those recompiles happened in 2003. The light bulb went on. When passing Recordsets back from server to client, my ATL C++ components refer to the interface as _Recordset. This symbol comes from the type library embedded within msado15.dll. This is the line I had in the C++ code: <pre> #import "c:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace rename ( "EOF", "adoEOF" ) </pre> Don't be deceived by the 15 in msdad15.dll. Apparently this DLL has not changed name in the long series of MDAC versions. When I compiled the application back in the day, the version of MDAC was 2.1. So _Recordset compiled with the 2.1 interface id and that is the interface returned by the servers running those components. All the client's use the COM+ application proxy that was generated (I believe) back in 1999. The type library that defines my interfaces includes the line: <pre> importlib("msado21.tlb"); </pre> which explains why they expect version 2.1 of Recordset in my method's output parameters. Clearly the problem was with my 2003 recompile and the fact that at that time the _Recordset symbol no longer corresponded to version 2.1. Indeed _Recordset corresponded to the 2.5 version with its distinct interface id. The solution for me was to change all references from _Recordset to Recordset21 in my C++ code. I rebuilt the components and deployed them to the new server. Voila -- the clients seemed happy again. In conclusion, there are two nagging questions that remain for me. Why does the proxy/stub infrastructure seem to behave differently with Vista clients. It appears that Vista is making stricter checks of the interface ids coming back from method parameters than is XP. How should I have coded this differently back in 1999 so that this would not have happened? Interfaces are supposed to be immutable and when I recompiled under a newer version of MDAC, I inadvertently changed my interface because the methods now returned a different Recordset interface as an output parameter. As far as I know, the type library back then did not have a version-specific symbol -- that is, later versions of the MDAC type libraries define Recordset21, but that symbol was not available back in the 2.1 type library.
0
63,741
09/15/2008 15:07:50
6,770
09/15/2008 12:36:56
6
0
Why does the default IntelliJ default class javadoc comment use non-standard syntax?
Why does the default IntelliJ default class javadoc comment use non-standard syntax? Instead of creating a line with "User: jstauffer" it could create a line with "@author jstauffer". The other lines that it creates (Date and Time) probably don't have javadoc syntax to use but why not use the javadoc syntax when available? For reference here is an example: <pre>/** * Created by IntelliJ IDEA. * User: jstauffer * Date: Nov 13, 2007 * Time: 11:15:10 AM * To change this template use File | Settings | File Templates. */</pre>
intellij
null
null
null
null
null
open
Why does the default IntelliJ default class javadoc comment use non-standard syntax? === Why does the default IntelliJ default class javadoc comment use non-standard syntax? Instead of creating a line with "User: jstauffer" it could create a line with "@author jstauffer". The other lines that it creates (Date and Time) probably don't have javadoc syntax to use but why not use the javadoc syntax when available? For reference here is an example: <pre>/** * Created by IntelliJ IDEA. * User: jstauffer * Date: Nov 13, 2007 * Time: 11:15:10 AM * To change this template use File | Settings | File Templates. */</pre>
0
63,743
09/15/2008 15:08:05
3,894
08/31/2008 18:32:32
33
1
innerHTML manipulation in JavaScript
I am developing a web page code, which fetches dynamically the content from the server and then places this content to container nodes using something like container.innerHTML = content; Sometimes I have to overwrite some previous content in this node. This works fine, until it happens that previous content occupied more vertical space then a new one would occupy AND a user scrolled the page down -- scrolled more than new content would allow, provided its height. In this case the page redraws incorrectly -- some artifacts of the old content remain. It works fine, and it is even possible to get rid of artifacts, by minimizing and restoring the browser (or force the window to be redrawn in an other way), however this does not seem very convenient. Does anybody have the idea how to deal with this?
html
javascript
dom
null
null
null
open
innerHTML manipulation in JavaScript === I am developing a web page code, which fetches dynamically the content from the server and then places this content to container nodes using something like container.innerHTML = content; Sometimes I have to overwrite some previous content in this node. This works fine, until it happens that previous content occupied more vertical space then a new one would occupy AND a user scrolled the page down -- scrolled more than new content would allow, provided its height. In this case the page redraws incorrectly -- some artifacts of the old content remain. It works fine, and it is even possible to get rid of artifacts, by minimizing and restoring the browser (or force the window to be redrawn in an other way), however this does not seem very convenient. Does anybody have the idea how to deal with this?
0
63,748
09/15/2008 15:08:20
3,885
08/31/2008 16:43:36
124
10
Should I use clone when adding a new element? When should clone be used?
I want to implement in Java a class for handling graph data structures. I have a Node class and an Edge class. The Graph class maintains two list: a list of nodes and a list of edges. Each node must have an unique name. How do I guard against a situation like this: <code language="Java"> Graph g = new Graph(); Node n1 = new Node("#1"); Node n2 = new Node("#2"); Edge e1 = new Edge("e#1", "#1", "#2"); // Each node is added like a reference g.addNode(n1); g.addNode(n2); g.addEdge(e1); // This will break the internal integrity of the graph n1.setName("#3"); g.getNode("#2").setName("#4"); </code> I believe I should clone the nodes and the edges when adding them to the graph and return a NodeEnvelope class that will maintain the graph structural integrity. Is this the right way of doing this or the design is broken from the beginning ?
java
memory
classes
null
null
null
open
Should I use clone when adding a new element? When should clone be used? === I want to implement in Java a class for handling graph data structures. I have a Node class and an Edge class. The Graph class maintains two list: a list of nodes and a list of edges. Each node must have an unique name. How do I guard against a situation like this: <code language="Java"> Graph g = new Graph(); Node n1 = new Node("#1"); Node n2 = new Node("#2"); Edge e1 = new Edge("e#1", "#1", "#2"); // Each node is added like a reference g.addNode(n1); g.addNode(n2); g.addEdge(e1); // This will break the internal integrity of the graph n1.setName("#3"); g.getNode("#2").setName("#4"); </code> I believe I should clone the nodes and the edges when adding them to the graph and return a NodeEnvelope class that will maintain the graph structural integrity. Is this the right way of doing this or the design is broken from the beginning ?
0
63,749
09/15/2008 15:08:22
966
08/11/2008 07:35:55
56
5
What user account would you recommend running the SQL Server Express 2008 services in a development environment?
The SQL Server Express 2008 setup allow you to assign different user account for each service. For a development environment, would you use a domain user, local user, NT Authority\NETWORK SERCVICE, NT Authority\Local System or some other account and why?
sql-server
setup
development-environment
null
null
null
open
What user account would you recommend running the SQL Server Express 2008 services in a development environment? === The SQL Server Express 2008 setup allow you to assign different user account for each service. For a development environment, would you use a domain user, local user, NT Authority\NETWORK SERCVICE, NT Authority\Local System or some other account and why?
0
63,752
09/15/2008 15:08:55
8,086
09/15/2008 15:08:55
1
0
When is the best time to use <b> and <i> in lieu of <strong> and <em>, if ever?
Semantically speaking, is there an appropriate place in today's websites (late 2008+) where using the bold `<b>` and italic `<i>` tags are more useful than the more widely used `<strong>` and `<em>` tags?
css
bold
em
italics
strong
null
open
When is the best time to use <b> and <i> in lieu of <strong> and <em>, if ever? === Semantically speaking, is there an appropriate place in today's websites (late 2008+) where using the bold `<b>` and italic `<i>` tags are more useful than the more widely used `<strong>` and `<em>` tags?
0
63,755
09/15/2008 15:09:16
8,033
09/15/2008 14:58:06
11
1
Easy way to create a form to email in SharePoint without using infopath.
Does anyone know a good way to do this? I need to have simple forms that submit to email without writing a lot of code. These forms will be hosted in content-viewer web parts or similar in MOSS 2007. I'd like to avoid using InfoPath.
sharepoint
null
null
null
null
null
open
Easy way to create a form to email in SharePoint without using infopath. === Does anyone know a good way to do this? I need to have simple forms that submit to email without writing a lot of code. These forms will be hosted in content-viewer web parts or similar in MOSS 2007. I'd like to avoid using InfoPath.
0
63,756
09/15/2008 15:09:20
6,992
09/15/2008 12:58:25
1
0
Is there a way to "diff" two XMLs element-wise?
I'm needing to check the differences between two XMLs but not "blindly", Given that both use the same DTD, I'm actually interested in verifying wether they have the same amount of elements or if there's differences.
xml
comparison
diff
dtd
element
null
open
Is there a way to "diff" two XMLs element-wise? === I'm needing to check the differences between two XMLs but not "blindly", Given that both use the same DTD, I'm actually interested in verifying wether they have the same amount of elements or if there's differences.
0
63,758
09/15/2008 15:09:23
2,309
08/21/2008 15:09:37
1
0
Is it possible to kill a Java Virtual Machine from another Virtual Machine?
I have a Java application that launches another java application. The launcher has a watchdog timer and receives periodic notifications from the second VM. However, if no notifications are received then the second virtual machine should be killed and the launcher will perform some additional clean-up activities. The question is, is there any way to do this using only java? so far I have to use some native methods to perform this operation and it is somehow ugly. Thanks!
java
null
null
null
null
null
open
Is it possible to kill a Java Virtual Machine from another Virtual Machine? === I have a Java application that launches another java application. The launcher has a watchdog timer and receives periodic notifications from the second VM. However, if no notifications are received then the second virtual machine should be killed and the launcher will perform some additional clean-up activities. The question is, is there any way to do this using only java? so far I have to use some native methods to perform this operation and it is somehow ugly. Thanks!
0
63,764
09/15/2008 15:09:54
115
08/02/2008 05:44:40
1,438
137
What databases do I have permissions on
How can I find what databases I have a minimum of read access to in either basic SQL, MySQL specific or in PHP?
sql
permissions
null
null
null
null
open
What databases do I have permissions on === How can I find what databases I have a minimum of read access to in either basic SQL, MySQL specific or in PHP?
0
63,771
09/15/2008 15:10:13
6,770
09/15/2008 12:36:56
6
0
Debugger for unix pipe commands
As I build *nix piped commands I find that I want to see the output of one stage to verify correctness before building the next stage but I don't want to re-run each stage. Does anyone know of a program that will help with that? It would keep the output of the last stage automatically to use for any new stages. I usually do this by sending the result of each command to a temporary file but it would be nice for a program to handle this.
shell
null
null
null
null
null
open
Debugger for unix pipe commands === As I build *nix piped commands I find that I want to see the output of one stage to verify correctness before building the next stage but I don't want to re-run each stage. Does anyone know of a program that will help with that? It would keep the output of the last stage automatically to use for any new stages. I usually do this by sending the result of each command to a temporary file but it would be nice for a program to handle this.
0
63,774
09/15/2008 15:10:35
1,287
08/14/2008 12:06:53
58
5
Is it a problem (for your boss) when you study at work?
Almost every day at work for about an hour, I make it a point to stop working on the current project and study something to become a better developer. Read some blogs, or a chapter from a book. My previous boss didn't have a problem with it (because he was doing the same) but my current boss doesn't like it. I feel it makes me more productive in the long run so I haven't stopped; I got better at hiding it and when I'm "caught", I lie that I'm finding a solution to a roadblock I hit. I started feeling guilty about this over time and decided to find a new job. Now, in your experience, do I have a decent chance of finding working environment where studying is encouraged or are most bosses like my current one? Is there a good way to address this during a job interview?
work-environment
null
null
null
null
null
open
Is it a problem (for your boss) when you study at work? === Almost every day at work for about an hour, I make it a point to stop working on the current project and study something to become a better developer. Read some blogs, or a chapter from a book. My previous boss didn't have a problem with it (because he was doing the same) but my current boss doesn't like it. I feel it makes me more productive in the long run so I haven't stopped; I got better at hiding it and when I'm "caught", I lie that I'm finding a solution to a roadblock I hit. I started feeling guilty about this over time and decided to find a new job. Now, in your experience, do I have a decent chance of finding working environment where studying is encouraged or are most bosses like my current one? Is there a good way to address this during a job interview?
0
63,776
09/15/2008 15:10:49
6,899
09/15/2008 12:47:20
46
5
Bit reversal of an integer, ignoring integer size and endianness
Given an integer typedef: typedef unsigned int TYPE; or typedef unsigned long TYPE; I have the following code to reverse the bits of an integer: TYPE max_bit= (TYPE)-1; void reverse_int_setup() { TYPE bits= (TYPE)max_bit; while (bits <<= 1) max_bit= bits; } TYPE reverse_int(TYPE arg) { TYPE bit_setter= 1, bit_tester= max_bit, result= 0; for (result= 0; bit_tester; bit_tester>>= 1, bit_setter<<= 1) if (arg & bit_tester) result|= bit_setter; return result; } One just needs first to run reverse_int_setup(), which stores an integer with the highest bit turned on, then any call to reverse_int(*arg*) returns *arg* with its bits reversed (to be used as a key to a binary tree, taken from an increasing counter, but that's more or less irrelevant). Is there a platform-agnostic way to have in compile-time the correct value for max_int after the call to reverse_int_setup(); Otherwise, is there an algorithm you consider *better/leaner* than the one I have for reverse_int()? Thanks.
c
bit-manipulation
integer
null
null
null
open
Bit reversal of an integer, ignoring integer size and endianness === Given an integer typedef: typedef unsigned int TYPE; or typedef unsigned long TYPE; I have the following code to reverse the bits of an integer: TYPE max_bit= (TYPE)-1; void reverse_int_setup() { TYPE bits= (TYPE)max_bit; while (bits <<= 1) max_bit= bits; } TYPE reverse_int(TYPE arg) { TYPE bit_setter= 1, bit_tester= max_bit, result= 0; for (result= 0; bit_tester; bit_tester>>= 1, bit_setter<<= 1) if (arg & bit_tester) result|= bit_setter; return result; } One just needs first to run reverse_int_setup(), which stores an integer with the highest bit turned on, then any call to reverse_int(*arg*) returns *arg* with its bits reversed (to be used as a key to a binary tree, taken from an increasing counter, but that's more or less irrelevant). Is there a platform-agnostic way to have in compile-time the correct value for max_int after the call to reverse_int_setup(); Otherwise, is there an algorithm you consider *better/leaner* than the one I have for reverse_int()? Thanks.
0
63,778
09/15/2008 15:10:55
3,475
08/28/2008 17:53:18
140
10
What are my options for having the RadioButtonList functionality of ASP.NET in WinForms?
Is this type of control only available in a 3rd-party library? Has someone implemented an open source version?
winforms
webforms
radio-button
radiobuttonlist
null
null
open
What are my options for having the RadioButtonList functionality of ASP.NET in WinForms? === Is this type of control only available in a 3rd-party library? Has someone implemented an open source version?
0
63,784
09/15/2008 15:11:42
6,266
09/13/2008 12:51:36
206
14
Implementing scripts in c++ app
I want to move verious parts of my app into simple scripts, to allow people that do not have a strong knowleagd of c++ to be able to edit and implement various features. Because its a real time app, I need to have some kind of multi-tasking for these scripts, idealy I want it so that the c++ app calls a script function which then continues running (under the c++ thread) untill either a pause point (Wait(x)), or it returns. In the case of it waiting the state needs to be saved ready for the script to be restarted the next time the app loops after the duration has expired. The scripts also need to be able to call c++ functions, idealy using the c++ classes rather than just plain functions which wrap the c++ classes. I don't want to spend a massive amount of time implementing this, so using an existing scripting lanaguage is prefered to trying to write my own. I heard that Python and Lua can be integrated into a c++ app, but I do not know how to do this to achive my goals. -The scripts must be able to call c++ functions -The scripts must be able to "pause" when certain functiosn are called (eg Wait), and be restarted again by the c++ thread -Needs to be pretty fast, this is for a real time app and there could potentialy be alot of scripts running. I ca probebly roll the multi-tasking code fairly easily, provideing the scripts can be saved, and restarted (posibly by a diffrent thread to the origenal)
c++
scripting
null
null
null
null
open
Implementing scripts in c++ app === I want to move verious parts of my app into simple scripts, to allow people that do not have a strong knowleagd of c++ to be able to edit and implement various features. Because its a real time app, I need to have some kind of multi-tasking for these scripts, idealy I want it so that the c++ app calls a script function which then continues running (under the c++ thread) untill either a pause point (Wait(x)), or it returns. In the case of it waiting the state needs to be saved ready for the script to be restarted the next time the app loops after the duration has expired. The scripts also need to be able to call c++ functions, idealy using the c++ classes rather than just plain functions which wrap the c++ classes. I don't want to spend a massive amount of time implementing this, so using an existing scripting lanaguage is prefered to trying to write my own. I heard that Python and Lua can be integrated into a c++ app, but I do not know how to do this to achive my goals. -The scripts must be able to call c++ functions -The scripts must be able to "pause" when certain functiosn are called (eg Wait), and be restarted again by the c++ thread -Needs to be pretty fast, this is for a real time app and there could potentialy be alot of scripts running. I ca probebly roll the multi-tasking code fairly easily, provideing the scripts can be saved, and restarted (posibly by a diffrent thread to the origenal)
0
63,787
09/15/2008 15:11:45
3,208
08/27/2008 13:12:45
158
9
What makes Drupal better/different from Joomla
I talked to a few friends that say Drupal is amazing and that it is way better than Joomla. What are the major differences/advantages.
drupal
joomla
null
null
null
null
open
What makes Drupal better/different from Joomla === I talked to a few friends that say Drupal is amazing and that it is way better than Joomla. What are the major differences/advantages.
0
63,790
09/15/2008 15:12:16
4,473
09/04/2008 01:17:18
161
10
VS 2003 Reports "unable to get the project file from the web server" when opening a solution from VSS
When attempting to open a project from source control on a newly formatted pc, I receive an "unable to get the project file from the web server" after getting the sln file from VSS. If I attempt to open the sln file from explorer, I also receive the same error. Any pointers or ideas? Thanks!
visual-sourcesafe
vs2003
null
null
null
null
open
VS 2003 Reports "unable to get the project file from the web server" when opening a solution from VSS === When attempting to open a project from source control on a newly formatted pc, I receive an "unable to get the project file from the web server" after getting the sln file from VSS. If I attempt to open the sln file from explorer, I also receive the same error. Any pointers or ideas? Thanks!
0
63,800
09/15/2008 15:12:55
8,118
09/15/2008 15:12:55
1
0
Does Java impose any further restrictions on filenames other than the underlying operating system?
Does Java impose any extra restrictions of its own. Windows (upto Vista) does not allow names to include \ / < > ? * : I know HOW to validate names (a regular expression). I need to validate filenames entered by users. My application does not need to run on any other platform, though, of course, I would prefer to be platform independent!
java
filesystems
operating-system
null
null
null
open
Does Java impose any further restrictions on filenames other than the underlying operating system? === Does Java impose any extra restrictions of its own. Windows (upto Vista) does not allow names to include \ / < > ? * : I know HOW to validate names (a regular expression). I need to validate filenames entered by users. My application does not need to run on any other platform, though, of course, I would prefer to be platform independent!
0
63,801
09/15/2008 15:13:02
5,056
09/07/2008 15:43:17
845
64
How do you document your methods?
As suggested, I have closed the question posed [here][1] and have broken it up into separate questions regarding code documentation to be posed throughout the day. ---------- The first question I have is, what are the guidelines you follow when you write documentation for a method/function/procedure? Do you always do doc-comments or do you try to let the method names speak for themselves? What about within the code block? Do you find yourself writing a lot of line by line code? If you do, why do you feel the need for it? What do you think should be the standard for documenting a small self-contained chunk of code (as opposed to the code as whole or tests)? Do you find that your opinions differ depending on project size/type? On language you're using? On documentation tools available? [1]: http://stackoverflow.com/questions/63297/how-do-you-do-documentation
documentation
guidance
null
null
null
03/15/2012 22:48:13
not constructive
How do you document your methods? === As suggested, I have closed the question posed [here][1] and have broken it up into separate questions regarding code documentation to be posed throughout the day. ---------- The first question I have is, what are the guidelines you follow when you write documentation for a method/function/procedure? Do you always do doc-comments or do you try to let the method names speak for themselves? What about within the code block? Do you find yourself writing a lot of line by line code? If you do, why do you feel the need for it? What do you think should be the standard for documenting a small self-contained chunk of code (as opposed to the code as whole or tests)? Do you find that your opinions differ depending on project size/type? On language you're using? On documentation tools available? [1]: http://stackoverflow.com/questions/63297/how-do-you-do-documentation
4
63,805
09/15/2008 15:13:59
1,220
08/13/2008 13:44:48
1,593
119
Nix which command in Powershell?
Does anyone know how to ask powershell where something is? For instance "which notepad" and it returns the directory where the notepad.exe is run from according to the current paths.
unix
powershell
command
null
null
null
open
Nix which command in Powershell? === Does anyone know how to ask powershell where something is? For instance "which notepad" and it returns the directory where the notepad.exe is run from according to the current paths.
0
63,814
09/15/2008 15:14:19
1,506
08/16/2008 01:57:52
11
1
What kind of CAL do I need for Sharepoint?
I'm looking at setting up a Sharepoint server for my small group of co-workers. I'm confused as to what I need to do to ensure we're licensed properly. We are planning on using the Sharepoint Services that is baked into a standard Windows Server install, not the Office Sharepoint, does each user need a specific Sharepoint CAL?
sharepoint
licensing
null
null
null
null
open
What kind of CAL do I need for Sharepoint? === I'm looking at setting up a Sharepoint server for my small group of co-workers. I'm confused as to what I need to do to ensure we're licensed properly. We are planning on using the Sharepoint Services that is baked into a standard Windows Server install, not the Office Sharepoint, does each user need a specific Sharepoint CAL?
0
63,870
09/15/2008 15:19:29
7,028
09/15/2008 13:02:20
1
4
Splitting a file and its lines under Linux/bash
I have a rather large file (150 million lines of 10 chars). I need to split it in 150 files of 2 million lines, with each output line being alternatively the first 5 characters or the last 5 characters of the source line. I could do this in Perl rather quickly, but I was wondering if there was an easy solution using bash. Any ideas?
linux
bash
largefile
filesplitting
null
null
open
Splitting a file and its lines under Linux/bash === I have a rather large file (150 million lines of 10 chars). I need to split it in 150 files of 2 million lines, with each output line being alternatively the first 5 characters or the last 5 characters of the source line. I could do this in Perl rather quickly, but I was wondering if there was an easy solution using bash. Any ideas?
0
63,876
09/15/2008 15:20:42
1,111
08/12/2008 12:40:23
186
20
DVD menu coding
As a programmer I have no idea how one would go about programming menus for a DVD, I have heard that this is possible, and even seen basic games using DVD menus - although it may very well be a closed-system. Is it even possible and if so, what language, compilers etc exist for this?
language
dvd
menu
null
null
null
open
DVD menu coding === As a programmer I have no idea how one would go about programming menus for a DVD, I have heard that this is possible, and even seen basic games using DVD menus - although it may very well be a closed-system. Is it even possible and if so, what language, compilers etc exist for this?
0
63,878
09/15/2008 15:21:20
7,705
09/15/2008 14:16:31
26
3
Exporting a Reporting Services Report to Excel and Having the table header wrap
I have a report in Reporting services, and when I preview it, the headers for a table wrap, but when I export it to Excel, the don't. They just get cut off. Any ideas on how to force it to wrap when I export to Excel?
reporting-services
null
null
null
null
null
open
Exporting a Reporting Services Report to Excel and Having the table header wrap === I have a report in Reporting services, and when I preview it, the headers for a table wrap, but when I export it to Excel, the don't. They just get cut off. Any ideas on how to force it to wrap when I export to Excel?
0
63,882
09/15/2008 15:21:31
7,001
09/15/2008 12:59:17
1
0
How do you view SQL Server 2005 Reporting Services reports from ReportViewer Control in DMZ
I want to be able to view a SQL Server 2005 Reporting Services report from an ASP.NET application in a DMZ through a ReportViewer control. The SQLand SSRS server are behind the firewall.
sql
reporting
server
services
2005
null
open
How do you view SQL Server 2005 Reporting Services reports from ReportViewer Control in DMZ === I want to be able to view a SQL Server 2005 Reporting Services report from an ASP.NET application in a DMZ through a ReportViewer control. The SQLand SSRS server are behind the firewall.
0
63,896
09/15/2008 15:23:03
7,557
09/15/2008 13:57:49
1
2
Analyzer for Russian language in Lucene and Lucene.Net
Lucene has quite poor support for Russian language. RussianAnalyzer (part of lucene-contrib) is of very low quality. RussianStemmer module for Snowball is even worse. It does not recognize Russian text in Unicode strings, apparently assuming that some bizarre mix of Unicode and KOI8-R must be used instead. Do you know any better solutions?
.net
java
lucene
null
null
null
open
Analyzer for Russian language in Lucene and Lucene.Net === Lucene has quite poor support for Russian language. RussianAnalyzer (part of lucene-contrib) is of very low quality. RussianStemmer module for Snowball is even worse. It does not recognize Russian text in Unicode strings, apparently assuming that some bizarre mix of Unicode and KOI8-R must be used instead. Do you know any better solutions?
0
63,897
09/15/2008 15:23:04
8,203
09/15/2008 15:23:04
1
0
why hash codes generated by this function are not unique?
I'm testing the below VB function, which I get from a Google search and plan to use it to generate hash codes for quick string comparison. However, there are occasion in which two different strings would have the same hash code. For example, these strings "122Gen 1 heap size (.NET CLR Memory w3wp):mccsmtpteweb025.20833333333333E-02" "122Gen 2 heap size (.NET CLR Memory w3wp):mccsmtpteweb015.20833333333333E-02" have the same hash code of 237117279. Please tell me: - what is wrong with the function? - how can I fix it? Thank you martin ---------------------- Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (dest As Any, src As Any, ByVal bytes As Long) Private Function HashCode(Key As String) As Long On Error GoTo ErrorGoTo Dim lastEl As Long, i As Long ' copy ansi codes into an array of long lastEl = (Len(Key) - 1) \ 4 ReDim codes(lastEl) As Long ' this also converts from Unicode to ANSI CopyMemory codes(0), ByVal Key, Len(Key) ' XOR the ANSI codes of all characters For i = 0 To lastEl - 1 HashCode = HashCode Xor codes(i) 'Xor Next ErrorGoTo: Exit Function End Function
hash-function
hash-code-uniqueness
null
null
null
null
open
why hash codes generated by this function are not unique? === I'm testing the below VB function, which I get from a Google search and plan to use it to generate hash codes for quick string comparison. However, there are occasion in which two different strings would have the same hash code. For example, these strings "122Gen 1 heap size (.NET CLR Memory w3wp):mccsmtpteweb025.20833333333333E-02" "122Gen 2 heap size (.NET CLR Memory w3wp):mccsmtpteweb015.20833333333333E-02" have the same hash code of 237117279. Please tell me: - what is wrong with the function? - how can I fix it? Thank you martin ---------------------- Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (dest As Any, src As Any, ByVal bytes As Long) Private Function HashCode(Key As String) As Long On Error GoTo ErrorGoTo Dim lastEl As Long, i As Long ' copy ansi codes into an array of long lastEl = (Len(Key) - 1) \ 4 ReDim codes(lastEl) As Long ' this also converts from Unicode to ANSI CopyMemory codes(0), ByVal Key, Len(Key) ' XOR the ANSI codes of all characters For i = 0 To lastEl - 1 HashCode = HashCode Xor codes(i) 'Xor Next ErrorGoTo: Exit Function End Function
0
63,910
09/15/2008 15:25:01
7,689
09/15/2008 14:14:14
1
0
Best Way to Animate Sprites in Flex
Is there a preferred way to handle animation when using Flex -- For instance, if I want to render a ball and bounce it around the screen?
flex
null
null
null
null
null
open
Best Way to Animate Sprites in Flex === Is there a preferred way to handle animation when using Flex -- For instance, if I want to render a ball and bounce it around the screen?
0
63,916
09/15/2008 15:25:28
8,207
09/15/2008 15:24:28
1
0
Joomla Blog/Wordpress Integration
I'm looking for a wordpress-like blog interface to put inside a Joomla hosted site. The admin interface of Joomla is quirky enough and hard enough to use that daily updates are infeasible. What I am looking for is an easy-to-use posting interface that supports multiple users with different accounts/names, a tagging scheme, and easy find by date/user/tag functionality. Has anyone had experience putting something like this together?
wordpress
joomla
null
null
null
null
open
Joomla Blog/Wordpress Integration === I'm looking for a wordpress-like blog interface to put inside a Joomla hosted site. The admin interface of Joomla is quirky enough and hard enough to use that daily updates are infeasible. What I am looking for is an easy-to-use posting interface that supports multiple users with different accounts/names, a tagging scheme, and easy find by date/user/tag functionality. Has anyone had experience putting something like this together?
0
63,918
09/15/2008 15:25:30
315,650
09/15/2008 14:17:57
1
0
What is the best online javascript/css/html/xhtml/dom reference?
I'm a front-end developer and I was looking for opinions about the best all-round online documentation for javascript/css/html/xhtml/dom/browser quirks and support. I've tried Sitepoint, Quirksmode, W3Schools but all of these seem to be lacking in certain aspects and have been using them in combination.
javascript
html
css
ajax
xhtml
null
open
What is the best online javascript/css/html/xhtml/dom reference? === I'm a front-end developer and I was looking for opinions about the best all-round online documentation for javascript/css/html/xhtml/dom/browser quirks and support. I've tried Sitepoint, Quirksmode, W3Schools but all of these seem to be lacking in certain aspects and have been using them in combination.
0
63,930
09/15/2008 15:27:09
3,029
08/26/2008 12:41:11
1
0
Struts 1.3: forward outside the application context?
Struts 1.3 application. Main website is NOT served by struts/Java. I need to forward the result of a struts action to a page in the website, that is outside of the struts context. Currently, I forward to a JSP in context and use a meta-refresh to forward to the real location. That seems kinda sucky. Is there a better way?
java
struts
null
null
null
null
open
Struts 1.3: forward outside the application context? === Struts 1.3 application. Main website is NOT served by struts/Java. I need to forward the result of a struts action to a page in the website, that is outside of the struts context. Currently, I forward to a JSP in context and use a meta-refresh to forward to the real location. That seems kinda sucky. Is there a better way?
0
63,935
09/15/2008 15:27:51
2,177
08/20/2008 18:55:30
51
3
Can I submit a Struts form that references POJO (i.e. not just String or boolean) fields?
I have a Struts (1.3x) ActionForm that has several String and boolean properties/fields, but also has some POJO fields. so my form looks something like: MyForm extends ActionForm { private String name; private int id; private Thing thing; ...getters/setters... } In the JSP I can reference the POJO's fields thusly: <html:text property="thing.thingName" /> ...and the values display correctly, but if I try to **submit** the form I get the ServletException: BeanUtils.populate error. There seems to be a lot of information about this general topic on the web, but none really addresses my specific question, which is: shouldn't I be able to submit a form in Struts that contains fields that are POJOs?
java
jsp
struts
null
null
null
open
Can I submit a Struts form that references POJO (i.e. not just String or boolean) fields? === I have a Struts (1.3x) ActionForm that has several String and boolean properties/fields, but also has some POJO fields. so my form looks something like: MyForm extends ActionForm { private String name; private int id; private Thing thing; ...getters/setters... } In the JSP I can reference the POJO's fields thusly: <html:text property="thing.thingName" /> ...and the values display correctly, but if I try to **submit** the form I get the ServletException: BeanUtils.populate error. There seems to be a lot of information about this general topic on the web, but none really addresses my specific question, which is: shouldn't I be able to submit a form in Struts that contains fields that are POJOs?
0
63,938
09/15/2008 15:28:07
7,001
09/15/2008 12:59:17
1
1
How do I show data in the header of a SQL 2005 Reporting Services report?
Out of the box SSRS reports cannot have data exposed in the page header., Is there a way to get this data to show?
sql
reporting
report
services
header
null
open
How do I show data in the header of a SQL 2005 Reporting Services report? === Out of the box SSRS reports cannot have data exposed in the page header., Is there a way to get this data to show?
0
63,940
09/15/2008 15:28:20
8,157
09/15/2008 15:17:19
1
0
Missing classes in WMI when non-admin
I'd like to be able to see Win32_PhysicalMedia information when logged in as a Limited User in XP (not admin rights). It works ok when logged in as Admin, WMIDiag has just given a clean bill of health, and Win32_DiskDrive class produces information correctly, but Win32_PhysicalMedia produces a count of 0 for this code set WMI = GetObject("WinMgtmts:/root/cimv2") set objs = WMI.InstancesOf("Win32_PhysicalMedia") wscript.echo objs.count Alternatively, if the hard disk serial number as found on the SerialNumber property of the physical drives is available in another class which I can read as a limited user please let me know. I am not attempting to write to any property with WMI, but I can't read this when running as a Limited User. Interestingly, DiskDrive misses out Signature property, which would do for my application when run as a Limited User but is present when run from an Admin account.
wmi
nonadmin
null
null
null
null
open
Missing classes in WMI when non-admin === I'd like to be able to see Win32_PhysicalMedia information when logged in as a Limited User in XP (not admin rights). It works ok when logged in as Admin, WMIDiag has just given a clean bill of health, and Win32_DiskDrive class produces information correctly, but Win32_PhysicalMedia produces a count of 0 for this code set WMI = GetObject("WinMgtmts:/root/cimv2") set objs = WMI.InstancesOf("Win32_PhysicalMedia") wscript.echo objs.count Alternatively, if the hard disk serial number as found on the SerialNumber property of the physical drives is available in another class which I can read as a limited user please let me know. I am not attempting to write to any property with WMI, but I can't read this when running as a Limited User. Interestingly, DiskDrive misses out Signature property, which would do for my application when run as a Limited User but is present when run from an Admin account.
0
63,960
09/15/2008 15:30:25
1,965
08/19/2008 15:51:08
4,098
239
Game Programming and Event Handlers
I haven't programmed games for about 10 years (My last experience was DJGPP + Allegro), but I thought I'd check out XNA over the weekend to see how it was shaping up. I am fairly impressed, however as I continue to piece together a game engine, I have a (probably) basic question. How much should you rely on C#'s Delegates and Events to drive the game? As an application programmer, I use delegates and events heavily, but I don't know if there is a significant overhead to doing so. In my game engine, I have designed a "chase cam" of sorts, that can be attached to an object and then recalculates its position relative to the object. When the object moves, there are two ways to update the chase cam. * Have an "UpdateCameras()" method in the main game loop. * Use an event handler, and have the chase cam subscribe to object.OnMoved. I'm using the latter, because it allows me to chain events together and nicely automate large parts of the engine. However, if event handlers firing every nanosecond turn out to be a major slowdown, I'll remove it and go with the loop approach. Ideas?
c#
xna
camera
null
null
null
open
Game Programming and Event Handlers === I haven't programmed games for about 10 years (My last experience was DJGPP + Allegro), but I thought I'd check out XNA over the weekend to see how it was shaping up. I am fairly impressed, however as I continue to piece together a game engine, I have a (probably) basic question. How much should you rely on C#'s Delegates and Events to drive the game? As an application programmer, I use delegates and events heavily, but I don't know if there is a significant overhead to doing so. In my game engine, I have designed a "chase cam" of sorts, that can be attached to an object and then recalculates its position relative to the object. When the object moves, there are two ways to update the chase cam. * Have an "UpdateCameras()" method in the main game loop. * Use an event handler, and have the chase cam subscribe to object.OnMoved. I'm using the latter, because it allows me to chain events together and nicely automate large parts of the engine. However, if event handlers firing every nanosecond turn out to be a major slowdown, I'll remove it and go with the loop approach. Ideas?
0
63,969
09/15/2008 15:31:15
7,050
09/15/2008 13:04:36
1
0
What to use to replace an existing (small) company backup system?
My company's main file server is backed up to tape (DAT 25GB). We use several tapes for the backup:<br> - Daily D1=Monday, D2=Tuesday, D3=Wednesday, D4=Thursday<br> - Weekly W1=1st Friday of the month, W2=2nd, W3=3rd<br> - Monthly M1=1st month of the year, M2=2nd, M3=3rd<br> The monthly tapes are kept of site. Additionaly backups are made twice a year.<br> <br> This system works fine and files are rarely lost (unless someone forgets to ask for a restore for several months - this happens).<br> <br> <b>The trouble is that 25GB is not sufficient.</b><br> <br> I have been looking into replacing the existing backup system with others:<br> - NAS/SAN, this becomes expensive very quickly, especially if we are trying to simulate the D, W, M tapes.<br> - Offsite backups, most of the files are confidential and even though offsite backups encrypt the files, management are not happy about giving their work to another company. - Buy a bigger tape backup drive; then I will need two for backwards compatibility (heavy going). - Perhaps some kind of file versioning, combined with NAS/SAN? Your solutions are welcome.<br> Thanks.
backup
null
null
null
null
null
open
What to use to replace an existing (small) company backup system? === My company's main file server is backed up to tape (DAT 25GB). We use several tapes for the backup:<br> - Daily D1=Monday, D2=Tuesday, D3=Wednesday, D4=Thursday<br> - Weekly W1=1st Friday of the month, W2=2nd, W3=3rd<br> - Monthly M1=1st month of the year, M2=2nd, M3=3rd<br> The monthly tapes are kept of site. Additionaly backups are made twice a year.<br> <br> This system works fine and files are rarely lost (unless someone forgets to ask for a restore for several months - this happens).<br> <br> <b>The trouble is that 25GB is not sufficient.</b><br> <br> I have been looking into replacing the existing backup system with others:<br> - NAS/SAN, this becomes expensive very quickly, especially if we are trying to simulate the D, W, M tapes.<br> - Offsite backups, most of the files are confidential and even though offsite backups encrypt the files, management are not happy about giving their work to another company. - Buy a bigger tape backup drive; then I will need two for backwards compatibility (heavy going). - Perhaps some kind of file versioning, combined with NAS/SAN? Your solutions are welcome.<br> Thanks.
0
10,065,126
04/08/2012 18:10:31
1,246,746
03/03/2012 11:18:42
1
0
JDBC + postgres connection problems
I've a problem when i'm connecting to a postgresql database with jdbc. I've install postgresql 9.1 from a package download on the pgAdmin3 site (i needed gui). I'm connecting to db whith pgAdmin with no problems, but when i try to connect from java code, i've the sequent error: >org.postggresql.util.PSQLException: FATAL: password authentication failed for user postgres the code that throws the exception is public class ConnectionManager { private ConnectionManager(){}; private static boolean driverLoad = false; private static final String pgDriver="org.postgresql.Driver"; private static final String pgUrl="jdbc:postgresql:coffeeDB"; private static final String usr="postgres"; private static final String psw="password"; public static Connection getConnection() throws ClassNotFoundException, SQLException { if(!driverLoad) { Class.forName(pgDriver); driverLoad=true; } return DriverManager.getConnection(pgUrl, usr, psw); } }
java
postgresql
jdbc
null
null
null
open
JDBC + postgres connection problems === I've a problem when i'm connecting to a postgresql database with jdbc. I've install postgresql 9.1 from a package download on the pgAdmin3 site (i needed gui). I'm connecting to db whith pgAdmin with no problems, but when i try to connect from java code, i've the sequent error: >org.postggresql.util.PSQLException: FATAL: password authentication failed for user postgres the code that throws the exception is public class ConnectionManager { private ConnectionManager(){}; private static boolean driverLoad = false; private static final String pgDriver="org.postgresql.Driver"; private static final String pgUrl="jdbc:postgresql:coffeeDB"; private static final String usr="postgres"; private static final String psw="password"; public static Connection getConnection() throws ClassNotFoundException, SQLException { if(!driverLoad) { Class.forName(pgDriver); driverLoad=true; } return DriverManager.getConnection(pgUrl, usr, psw); } }
0
10,065,120
04/08/2012 18:09:53
948,617
09/16/2011 10:35:13
23
4
NSMatrix in ScrollView; origin settings are locked. Why?
I have an NSMatrix, embedded within a scroll view (using IB). It works great, using the "-sizeToCells" method after changing the number of rows/columns. But I would like to move the initial matrix inside the scrollview. IB grays out the X and Y settings. Why, and how would it be possible to change the origin? Thanks!
osx
cocoa
scrollview
origin
nsmatrix
null
open
NSMatrix in ScrollView; origin settings are locked. Why? === I have an NSMatrix, embedded within a scroll view (using IB). It works great, using the "-sizeToCells" method after changing the number of rows/columns. But I would like to move the initial matrix inside the scrollview. IB grays out the X and Y settings. Why, and how would it be possible to change the origin? Thanks!
0
10,065,123
04/08/2012 18:10:19
263,680
02/01/2010 16:34:06
57
0
Simple android application with roboguice throwing exceptions
I have a very simple application that works but when i add roboguice it throws > java.lang.RuntimeException: Unable to instantiate application > com.MyFirstApp.MyFirstApplication: java.lang.ClassNotFoundException: > com.MyFirstApp.MyFirstApplication The application class: public class MyFirstApplication extends RoboApplication { @Override protected void addApplicationModules(List<Module> modules) { //modules.add(new DefaultModule()); } } The MainActivity: public class MainActivity extends RoboActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } the manifest: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.MyFirstApp" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="14" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:name="MyFirstApplication"> <activity android:name="com.MyFirstApp.Activities.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> I have put guice-2.0-no_aop.jar and roboguice-1.1.3.jar in the assets folder and added them to the buildpath. when i remove the robo part it works fine. can anyone tell me what i did wrong.
android
roboguice
null
null
null
null
open
Simple android application with roboguice throwing exceptions === I have a very simple application that works but when i add roboguice it throws > java.lang.RuntimeException: Unable to instantiate application > com.MyFirstApp.MyFirstApplication: java.lang.ClassNotFoundException: > com.MyFirstApp.MyFirstApplication The application class: public class MyFirstApplication extends RoboApplication { @Override protected void addApplicationModules(List<Module> modules) { //modules.add(new DefaultModule()); } } The MainActivity: public class MainActivity extends RoboActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } the manifest: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.MyFirstApp" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="14" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:name="MyFirstApplication"> <activity android:name="com.MyFirstApp.Activities.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> I have put guice-2.0-no_aop.jar and roboguice-1.1.3.jar in the assets folder and added them to the buildpath. when i remove the robo part it works fine. can anyone tell me what i did wrong.
0
10,065,124
04/08/2012 18:10:21
326,089
04/26/2010 14:35:48
256
2
Human-Machine Readable - Structured Data Storage in files
I need to store structured file data that is both human and machine readable. I mainly use python to open/edit/read these files. However I may need to use other programs as well. I used to use XML/XPATH. However, the xpath libraries are frail and don't work on most systems withtout a significant amount of frustration. I am tired trying to figure out xpath this I port my scripts to different platform. me@ubuntu:~/$ program -arg1 "foo" -arg2 File "/home/me/bin/script.py", line 16, in <module> from xml import xpath ImportError: cannot import name xpath BTW, `sudo apt-get install python-xml` does not fix this problem. The bottom line is that I am fed up with xml/xpath. I want a solution that will work in all cases, on all platforms, without question! What can I use? Advice?
python
xml
ubuntu
null
null
null
open
Human-Machine Readable - Structured Data Storage in files === I need to store structured file data that is both human and machine readable. I mainly use python to open/edit/read these files. However I may need to use other programs as well. I used to use XML/XPATH. However, the xpath libraries are frail and don't work on most systems withtout a significant amount of frustration. I am tired trying to figure out xpath this I port my scripts to different platform. me@ubuntu:~/$ program -arg1 "foo" -arg2 File "/home/me/bin/script.py", line 16, in <module> from xml import xpath ImportError: cannot import name xpath BTW, `sudo apt-get install python-xml` does not fix this problem. The bottom line is that I am fed up with xml/xpath. I want a solution that will work in all cases, on all platforms, without question! What can I use? Advice?
0
10,065,130
04/08/2012 18:10:46
1,220,221
02/20/2012 04:47:34
48
5
Include Adorner in ScrollViewer scrollable region
I currently have an `Adorner` inside a `ScrollViewer`. Objects at the bottom of the scrollviewer can sometimes display a large adorner below them. Unfortunately, that adorner is not included in the `ExtentHeight` of the scrollviewer, so the lower portion of the adorner is clipped by the bottom of the scrollviewer's viewport. Is there a way to get the adorner layer's contents to be included in the scrollable region of the scrollviewer?
.net
wpf
null
null
null
null
open
Include Adorner in ScrollViewer scrollable region === I currently have an `Adorner` inside a `ScrollViewer`. Objects at the bottom of the scrollviewer can sometimes display a large adorner below them. Unfortunately, that adorner is not included in the `ExtentHeight` of the scrollviewer, so the lower portion of the adorner is clipped by the bottom of the scrollviewer's viewport. Is there a way to get the adorner layer's contents to be included in the scrollable region of the scrollviewer?
0
10,065,131
04/08/2012 18:10:46
1,005,236
10/20/2011 12:56:43
397
38
Make Struts2 form use setId(Long) instead of setId(String)
First, I have a form, that's for editing a persisted dataset. I have a hidden field, that holds the id of the dataset, to be edited. When i submit the form, I get a NoSucheMethodException, because Struts wants to have a method setId(String), but my bean only has a setId(long). I don't really want to create another method, to convert from String to long. Is there any way, to make Struts parse this value to long, on its own?
java
struts
null
null
null
null
open
Make Struts2 form use setId(Long) instead of setId(String) === First, I have a form, that's for editing a persisted dataset. I have a hidden field, that holds the id of the dataset, to be edited. When i submit the form, I get a NoSucheMethodException, because Struts wants to have a method setId(String), but my bean only has a setId(long). I don't really want to create another method, to convert from String to long. Is there any way, to make Struts parse this value to long, on its own?
0
63,974
09/15/2008 15:31:32
5,363
09/09/2008 10:58:29
46
2
Flickering during updates to Controls in WinForms (e.g. DataGridView)
In my application I have a DataGridView control that displays data for the selected object. When I select a different object (in a combobox above), I need to update the grid. Unfortunately different objects have completely different data, even different columns, so I need to clear all the existing data and columns, create new columns and add all the rows. When this is done, the whole control flickers horribly and it takes ages. Is there a generic way to get the control in an update state so it doesn't repaint itself, and then repaint it after I finish all the updates? It is certainly possible with TreeViews: myTreeView.BeginUpdate(); try { //do the updates } finally { myTreeView.EndUpdate(); } Is there a generic way to do this with other controls, DataGridView in particular?
c#
.net
winforms
null
null
null
open
Flickering during updates to Controls in WinForms (e.g. DataGridView) === In my application I have a DataGridView control that displays data for the selected object. When I select a different object (in a combobox above), I need to update the grid. Unfortunately different objects have completely different data, even different columns, so I need to clear all the existing data and columns, create new columns and add all the rows. When this is done, the whole control flickers horribly and it takes ages. Is there a generic way to get the control in an update state so it doesn't repaint itself, and then repaint it after I finish all the updates? It is certainly possible with TreeViews: myTreeView.BeginUpdate(); try { //do the updates } finally { myTreeView.EndUpdate(); } Is there a generic way to do this with other controls, DataGridView in particular?
0
63,995
09/15/2008 15:34:22
8,054
09/15/2008 15:03:12
11
1
Giving class unique ID on instantiation: .Net
I would like to give a class a unique ID every time a new one is instantiated. For example with a class named Foo i would like to be able to do the following dim a as New Foo() dim b as New Foo() and a would get a unique id and b would get a unique ID. The ids only have to be unique over run time so i would just like to use an integer. I have found a way to do this BUT (and heres the caveat) I do NOT want to be able to change the ID from anywhere. My current idea for a way to implement this is the following: Public Class test Private Shared ReadOnly _nextId As Integer Private ReadOnly _id As Integer Public Sub New() _nextId = _nextId + 1 _id = _nextId End Sub End Class However this will not compile because it throws an error on _nextId = _nextId + 1 I don't see why this would be an error (because _Id is also readonly you're supposed to be able to change a read only variable in the constructor.) I think this has something to do with it being shared also. Any solution (hopefully not kludgy hehe) or an explanation of why this won't work will be accepted. The important part is i want both of the variables (or if there is a way to only have one that would even be better but i don't think that is possible) to be immutable after the object is initialized. Thanks!
.net
vb.net
vb
null
null
null
open
Giving class unique ID on instantiation: .Net === I would like to give a class a unique ID every time a new one is instantiated. For example with a class named Foo i would like to be able to do the following dim a as New Foo() dim b as New Foo() and a would get a unique id and b would get a unique ID. The ids only have to be unique over run time so i would just like to use an integer. I have found a way to do this BUT (and heres the caveat) I do NOT want to be able to change the ID from anywhere. My current idea for a way to implement this is the following: Public Class test Private Shared ReadOnly _nextId As Integer Private ReadOnly _id As Integer Public Sub New() _nextId = _nextId + 1 _id = _nextId End Sub End Class However this will not compile because it throws an error on _nextId = _nextId + 1 I don't see why this would be an error (because _Id is also readonly you're supposed to be able to change a read only variable in the constructor.) I think this has something to do with it being shared also. Any solution (hopefully not kludgy hehe) or an explanation of why this won't work will be accepted. The important part is i want both of the variables (or if there is a way to only have one that would even be better but i don't think that is possible) to be immutable after the object is initialized. Thanks!
0
63,998
09/15/2008 15:34:28
7,754
09/15/2008 14:21:17
11
5
Hidden features of Ruby
Continuing the "Hidden features of ..." meme, let's share the lesser-known but useful features of Ruby programming language. Try to limit this discussion with core Ruby, without any Ruby on Rails stuff. See also: * [Hidden features of C#](http://stackoverflow.com/questions/9033/hidden-features-of-c); * [Hidden features of Java](http://stackoverflow.com/questions/15496/hidden-features-of-java); * [Hidden features of JavaScript](http://stackoverflow.com/questions/61088/hidden-features-of-javascript); Thank you,
ruby
null
null
null
null
null
open
Hidden features of Ruby === Continuing the "Hidden features of ..." meme, let's share the lesser-known but useful features of Ruby programming language. Try to limit this discussion with core Ruby, without any Ruby on Rails stuff. See also: * [Hidden features of C#](http://stackoverflow.com/questions/9033/hidden-features-of-c); * [Hidden features of Java](http://stackoverflow.com/questions/15496/hidden-features-of-java); * [Hidden features of JavaScript](http://stackoverflow.com/questions/61088/hidden-features-of-javascript); Thank you,
0
64,000
09/15/2008 15:34:35
4,926
09/06/2008 18:01:11
1,405
62
Draining Standard Error in Java
When launching a process from Java, both stderr and stdout can block on output if I don't read from the pipes. Currently I have a thread that pro-actively reads from one and the main thread blocks on the other. Is there an easy way to join the two streams or otherwise cause the subprocess to continue while not losing the data in stderr?
java
null
null
null
null
null
open
Draining Standard Error in Java === When launching a process from Java, both stderr and stdout can block on output if I don't read from the pipes. Currently I have a thread that pro-actively reads from one and the main thread blocks on the other. Is there an easy way to join the two streams or otherwise cause the subprocess to continue while not losing the data in stderr?
0
64,003
09/15/2008 15:34:54
8,095
09/15/2008 15:09:38
1
0
How do I use PHP to get the current year?
I want to put a copyright notice in the footer of a web site, but I think it's incredibly tacky for the year to be out-of-date. How would I make the year update automatically with PHP4 and PHP5?
php4
php5
null
null
null
null
open
How do I use PHP to get the current year? === I want to put a copyright notice in the footer of a web site, but I think it's incredibly tacky for the year to be out-of-date. How would I make the year update automatically with PHP4 and PHP5?
0
64,010
09/15/2008 15:35:51
4,939
09/06/2008 20:36:05
62
1
How does one record audio from a Javascript based webapp?
I'm trying to write a web-app that records WAV files (eg: from the user's microphone). I know Javascript alone can not do this, but I'm interested in the least proprietary method to augment my Javascript with. My targeted browsers are Firefox for PC and Mac (so no ActiveX). Please share your experiences with this. I gather it can be done with Flash (but not as a WAV formated file). I gather it can be done with Java (but not without code-signing). Are these the only options?
java
javascript
web-applications
audio
null
null
open
How does one record audio from a Javascript based webapp? === I'm trying to write a web-app that records WAV files (eg: from the user's microphone). I know Javascript alone can not do this, but I'm interested in the least proprietary method to augment my Javascript with. My targeted browsers are Firefox for PC and Mac (so no ActiveX). Please share your experiences with this. I gather it can be done with Flash (but not as a WAV formated file). I gather it can be done with Java (but not without code-signing). Are these the only options?
0
64,014
09/15/2008 15:36:26
1,154
08/12/2008 23:39:07
455
42
How-To Auto Discovery a WCF Service?
Is there a way to auto discover a specific WCF service in the network? I don want to config my client with the address if this is posible.
.net-3.5
wcf
null
null
null
null
open
How-To Auto Discovery a WCF Service? === Is there a way to auto discover a specific WCF service in the network? I don want to config my client with the address if this is posible.
0
64,036
09/15/2008 15:39:04
3,885
08/31/2008 16:43:36
129
10
How do you make a deep copy of an object?
In java it's a bit difficult to implement a deep object copy function. What steps you take to ensure the original object and the cloned one share no reference?
java
classes
clone
null
null
null
open
How do you make a deep copy of an object? === In java it's a bit difficult to implement a deep object copy function. What steps you take to ensure the original object and the cloned one share no reference?
0
64,041
09/15/2008 15:39:46
4,653
09/05/2008 00:53:33
41
1
Winform DataGridView font size . .
How do i change font size on the datagridview?
c#
winforms
datagridview
null
null
null
open
Winform DataGridView font size . . === How do i change font size on the datagridview?
0
64,046
09/15/2008 15:40:38
8,152
09/15/2008 15:16:50
1
0
Publishing Website fails for some pages
I have a strange problem when I publish my website. I inherited this project and the problem started before I arrived so I don't know what conditions lead to the creation of the problem. Basically, 3 folders below the website project fail to publish properly. When the PrecompiledWeb is transferred to the host these three folders have to be manually copied from the Visual Studio project (i.e. they are no longer the published versions) to the host for it to work. If the results of the publish operation are left, any page in the folder results in the following error: > Server Error in '/' Application. > Unable to cast object of type > 'System.Web.Compilation.BuildResultNoCompilePage' > to type > 'System.Web.Compilation.BuildResultCompiledType'. > Description: An unhandled exception > occurred during the execution of the > current web request. Please review the > stack trace for more information about > the error and where it originated in > the code. > > Exception Details: > System.InvalidCastException: Unable to > cast object of type > 'System.Web.Compilation.BuildResultNoCompilePage' > to type > 'System.Web.Compilation.BuildResultCompiledType'. > > Source Error: > > An unhandled exception was generated > during the execution of the current > web request. Information regarding the > origin and location of the exception > can be identified using the exception > stack trace below. > > Stack Trace: > > [InvalidCastException: Unable to cast > object of type > 'System.Web.Compilation.BuildResultNoCompilePage' > to type > 'System.Web.Compilation.BuildResultCompiledType'.] > System.Web.UI.PageParser.GetCompiledPageInstance(VirtualPath > virtualPath, String inputFile, > HttpContext context) +254 > System.Web.UI.PageParser.GetCompiledPageInstance(String > virtualPath, String inputFile, > HttpContext context) +171 > URLRewrite.URLRewriter.ProcessRequest(HttpContext > context) +2183 > System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() > +405 System.Web.HttpApplication.ExecuteStep(IExecutionStep > step, Boolean& completedSynchronously) > +65 > > > Version Information: Microsoft .NET > Framework Version:2.0.50727.832; > ASP.NET Version:2.0.50727.832 Does anyone have any idea what the possible causes of these pages not publishing correctly could be? Anything I can look at that may indicate the root of the problem?
asp.net
c#
.net
.net-2.0
null
null
open
Publishing Website fails for some pages === I have a strange problem when I publish my website. I inherited this project and the problem started before I arrived so I don't know what conditions lead to the creation of the problem. Basically, 3 folders below the website project fail to publish properly. When the PrecompiledWeb is transferred to the host these three folders have to be manually copied from the Visual Studio project (i.e. they are no longer the published versions) to the host for it to work. If the results of the publish operation are left, any page in the folder results in the following error: > Server Error in '/' Application. > Unable to cast object of type > 'System.Web.Compilation.BuildResultNoCompilePage' > to type > 'System.Web.Compilation.BuildResultCompiledType'. > Description: An unhandled exception > occurred during the execution of the > current web request. Please review the > stack trace for more information about > the error and where it originated in > the code. > > Exception Details: > System.InvalidCastException: Unable to > cast object of type > 'System.Web.Compilation.BuildResultNoCompilePage' > to type > 'System.Web.Compilation.BuildResultCompiledType'. > > Source Error: > > An unhandled exception was generated > during the execution of the current > web request. Information regarding the > origin and location of the exception > can be identified using the exception > stack trace below. > > Stack Trace: > > [InvalidCastException: Unable to cast > object of type > 'System.Web.Compilation.BuildResultNoCompilePage' > to type > 'System.Web.Compilation.BuildResultCompiledType'.] > System.Web.UI.PageParser.GetCompiledPageInstance(VirtualPath > virtualPath, String inputFile, > HttpContext context) +254 > System.Web.UI.PageParser.GetCompiledPageInstance(String > virtualPath, String inputFile, > HttpContext context) +171 > URLRewrite.URLRewriter.ProcessRequest(HttpContext > context) +2183 > System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() > +405 System.Web.HttpApplication.ExecuteStep(IExecutionStep > step, Boolean& completedSynchronously) > +65 > > > Version Information: Microsoft .NET > Framework Version:2.0.50727.832; > ASP.NET Version:2.0.50727.832 Does anyone have any idea what the possible causes of these pages not publishing correctly could be? Anything I can look at that may indicate the root of the problem?
0
64,051
09/15/2008 15:41:22
8,212
09/15/2008 15:25:39
1
0
Backporting a VB.Net 2008 app to target .Net 1.1
I have a small diagnostic VB.Net application ( 2 forms, 20 subs & functions) written using VB.Net 2008 that targets Framework 2.0 and higher, but now I realize I need to support Framework 1.1. I'm looking for the most efficient way to accomplish this given these constraints: . I don't know which parts of the application are 2.0-specific. . I could reconstruct the forms without too much trouble. . I need to support SharpZipLib My current idea is to find and install Vb.Net 2003, copy over my code and iteratively re-create the tool. Are there better options?
vb.net
null
null
null
null
null
open
Backporting a VB.Net 2008 app to target .Net 1.1 === I have a small diagnostic VB.Net application ( 2 forms, 20 subs & functions) written using VB.Net 2008 that targets Framework 2.0 and higher, but now I realize I need to support Framework 1.1. I'm looking for the most efficient way to accomplish this given these constraints: . I don't know which parts of the application are 2.0-specific. . I could reconstruct the forms without too much trouble. . I need to support SharpZipLib My current idea is to find and install Vb.Net 2003, copy over my code and iteratively re-create the tool. Are there better options?
0