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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
74,625 | 09/16/2008 17:08:38 | 6,349 | 09/14/2008 16:27:12 | 1 | 4 | What is the best way to force yourself to master vi? | A good while ago, I read [an article by the creator of viemu][1], clearing up a lot of the misconceptions about vi, as well as explaining why it's a good idea (and why it's been very popular for the last 30 years+). The same guy also has [a great set of graphical cheat sheets][2] that teach the basics a few bits at a time.
I'm convinced.
I've been convinced for the past 2 years in fact. But I still really haven't gotten around to force myself to learn vi as my primary editor, the learning curve is just too high. When I get down to work, acceptable but immediate productivity (using my current editor) has so far won over tremendous productivity farther down the line (using vi).
Does anybody have any good tips to help get past the learning curve? It can be straight out tips, some other tutorial or article, whatever.
[1]: http://www.viemu.com/a-why-vi-vim.html
[2]: http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html | editor | text-editor | vi | null | null | 11/07/2011 15:23:43 | not constructive | What is the best way to force yourself to master vi?
===
A good while ago, I read [an article by the creator of viemu][1], clearing up a lot of the misconceptions about vi, as well as explaining why it's a good idea (and why it's been very popular for the last 30 years+). The same guy also has [a great set of graphical cheat sheets][2] that teach the basics a few bits at a time.
I'm convinced.
I've been convinced for the past 2 years in fact. But I still really haven't gotten around to force myself to learn vi as my primary editor, the learning curve is just too high. When I get down to work, acceptable but immediate productivity (using my current editor) has so far won over tremendous productivity farther down the line (using vi).
Does anybody have any good tips to help get past the learning curve? It can be straight out tips, some other tutorial or article, whatever.
[1]: http://www.viemu.com/a-why-vi-vim.html
[2]: http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html | 4 |
74,626 | 09/16/2008 17:08:39 | 10,168 | 09/15/2008 21:31:43 | 1 | 1 | How do you force a CIFS connection to unmount | I have a CIFS share mounted on a Linux machine. The CIFS server is down, or the internet connection is down, and anything that touches the CIFS mount now takes several minutes to timeout, and is unkillable while you wait. I can't even run ls in my home directory because there is a symlink pointing inside the CIFS mount and ls tries to follow it to decide what color it should be. If I try to umount it, the umount process hangs just like ls does. Not even sudo kill -9 can kill it. How can I force the kernel to unmount? | linux | cifs | smb | samba | null | null | open | How do you force a CIFS connection to unmount
===
I have a CIFS share mounted on a Linux machine. The CIFS server is down, or the internet connection is down, and anything that touches the CIFS mount now takes several minutes to timeout, and is unkillable while you wait. I can't even run ls in my home directory because there is a symlink pointing inside the CIFS mount and ls tries to follow it to decide what color it should be. If I try to umount it, the umount process hangs just like ls does. Not even sudo kill -9 can kill it. How can I force the kernel to unmount? | 0 |
74,641 | 09/16/2008 17:10:45 | 387,361 | 09/15/2008 23:19:26 | 96 | 3 | Modify an xml files in a jar file with Java | I currently am tasked with updating an XML file (persistance.xml) within a jar at a customers site. I can of course unjar the file, update the xml, then rejar the file for redeployment. I would like to kind these command line operations in a Swing App so that the person doing it does not have to drop to the command line. Any thoughts on a way to do this programatically? | java | java-ee | jboss | jar | null | null | open | Modify an xml files in a jar file with Java
===
I currently am tasked with updating an XML file (persistance.xml) within a jar at a customers site. I can of course unjar the file, update the xml, then rejar the file for redeployment. I would like to kind these command line operations in a Swing App so that the person doing it does not have to drop to the command line. Any thoughts on a way to do this programatically? | 0 |
74,649 | 09/16/2008 17:11:28 | 4,540 | 09/04/2008 17:35:05 | 277 | 14 | what is the flex (ActionScript3) syntax for a function valued function's type? |
What is the syntax to declare a type for my compare-function generator in code like the following?
var colName:String = ""; // actually assigned in a loop
gc.sortCompareFunction = function() : ??WHAT_GOES_HERE??
{
var tmp:String = colName;
return function(a:Object,b:Object):int { return compareGeneral(a,b,tmp); };
}();
| flex | actionscript-3 | null | null | null | null | open | what is the flex (ActionScript3) syntax for a function valued function's type?
===
What is the syntax to declare a type for my compare-function generator in code like the following?
var colName:String = ""; // actually assigned in a loop
gc.sortCompareFunction = function() : ??WHAT_GOES_HERE??
{
var tmp:String = colName;
return function(a:Object,b:Object):int { return compareGeneral(a,b,tmp); };
}();
| 0 |
74,662 | 09/16/2008 17:12:55 | 2,757 | 08/24/2008 21:53:16 | 900 | 54 | Has anyone hooked up BizTalk and Fogbugz? | We have an intranet system that schedules routine tasks. We also have Fogbugz for bug tracking. When an urgent bug comes in, we track that task in the bugtracker. However, I need to write back to both the Intranet and our CMS. I'm thinking Biztalk as the middle piece, but am not sure the best way to go about it. Database adapter? Web services?
I know I can use the CMS adapter for Microsoft CMS. I'd love to hear your experiences with Fogbugz. | fogbugz | biztalk | null | null | null | null | open | Has anyone hooked up BizTalk and Fogbugz?
===
We have an intranet system that schedules routine tasks. We also have Fogbugz for bug tracking. When an urgent bug comes in, we track that task in the bugtracker. However, I need to write back to both the Intranet and our CMS. I'm thinking Biztalk as the middle piece, but am not sure the best way to go about it. Database adapter? Web services?
I know I can use the CMS adapter for Microsoft CMS. I'd love to hear your experiences with Fogbugz. | 0 |
74,674 | 09/16/2008 17:13:40 | 13,123 | 09/16/2008 17:11:46 | 1 | 0 | How to do I check CPU and Memory Usage in Java? | I need to check CPU and memory usage for the server in java, anyone know how it could be done? | java | operating-system | cpu | ram | null | null | open | How to do I check CPU and Memory Usage in Java?
===
I need to check CPU and memory usage for the server in java, anyone know how it could be done? | 0 |
74,689 | 09/16/2008 17:14:52 | 13,128 | 09/16/2008 17:14:52 | 1 | 0 | Tools to effectively manage the information? | How do you guys manage the information overflow?
What are the tools that you guys use?
One of the usefull tool is RSS feed reader.
Does Any body uses any other tools or any other ways to effectively manage the information? | information-management | null | null | null | null | null | open | Tools to effectively manage the information?
===
How do you guys manage the information overflow?
What are the tools that you guys use?
One of the usefull tool is RSS feed reader.
Does Any body uses any other tools or any other ways to effectively manage the information? | 0 |
74,690 | 09/16/2008 17:15:00 | 1,585 | 08/16/2008 21:03:55 | 398 | 24 | How do I store the window size between sessions in Qt? | I have a QMainWindow in a Qt application. When I close it I want it to store its current restore size (the size of the window when it is not maximized). This works well when I close the window in restore mode (that is, not maximized). But if I close the window if it is maximized, then next time i start the application and restore the application (because it starts in maximized mode), then it does not remember the size it should restore to. Is there a way to do this? | qt | application | size | window | restore | null | open | How do I store the window size between sessions in Qt?
===
I have a QMainWindow in a Qt application. When I close it I want it to store its current restore size (the size of the window when it is not maximized). This works well when I close the window in restore mode (that is, not maximized). But if I close the window if it is maximized, then next time i start the application and restore the application (because it starts in maximized mode), then it does not remember the size it should restore to. Is there a way to do this? | 0 |
74,693 | 09/16/2008 17:15:22 | 13,098 | 09/16/2008 17:03:23 | 1 | 0 | Is there a platform independent way (Java?) to read an audio CD's TOC? | I would like to avoid using native libaries if at all possible. Surely there is a better way to solve this issue for Linux, Windows and Mac OS X. | java | crossplatform | null | null | null | null | open | Is there a platform independent way (Java?) to read an audio CD's TOC?
===
I would like to avoid using native libaries if at all possible. Surely there is a better way to solve this issue for Linux, Windows and Mac OS X. | 0 |
74,723 | 09/16/2008 17:18:59 | 8,167 | 09/15/2008 15:18:16 | 6 | 1 | Can you send a signal to Windows Explorer to make it refresh the systray icons? | This problem has been afflicting me for quite a while and it's been really annoying.
Every time I login after a reboot/power cycle the explorer takes some time to show up.
I've taken the step of waiting for all the services to boot up and then I login, but it doesn't make any difference.
The result is always the same: Some of the icons do not show up even if the applications have started.
I've dug a bit on the code that makes one application "stick" an icon in there, but is there an API call that one can perform so explorer re-reads all that icon info? Like invalidate or redraw or something of the sort? | icons | system-tray | windows-explorer | systray | null | null | open | Can you send a signal to Windows Explorer to make it refresh the systray icons?
===
This problem has been afflicting me for quite a while and it's been really annoying.
Every time I login after a reboot/power cycle the explorer takes some time to show up.
I've taken the step of waiting for all the services to boot up and then I login, but it doesn't make any difference.
The result is always the same: Some of the icons do not show up even if the applications have started.
I've dug a bit on the code that makes one application "stick" an icon in there, but is there an API call that one can perform so explorer re-reads all that icon info? Like invalidate or redraw or something of the sort? | 0 |
74,728 | 09/16/2008 17:19:33 | 13,139 | 09/16/2008 17:19:33 | 1 | 0 | Deploying VSTO Project to Server | Is it possible to place an application using vsto if the office is not installed? It doesn't appear to be so, but I was wondering if anyone had a work-around. | deployment | microsoftoffice | vsto | null | null | null | open | Deploying VSTO Project to Server
===
Is it possible to place an application using vsto if the office is not installed? It doesn't appear to be so, but I was wondering if anyone had a work-around. | 0 |
74,740 | 09/16/2008 17:20:14 | 13,060 | 09/16/2008 16:51:49 | 1 | 0 | What would you recommend as the best free online resource / tutorial to learn Agile Software Development methods? | I'm trying to learn Agile Software Development principles in a hurry and don't have time to wait for a book to arrive.
What would you recommend as the best free online tutorial on Agile Development methodology? | agile | software-engineering | null | null | null | 12/02/2011 19:51:47 | not constructive | What would you recommend as the best free online resource / tutorial to learn Agile Software Development methods?
===
I'm trying to learn Agile Software Development principles in a hurry and don't have time to wait for a book to arrive.
What would you recommend as the best free online tutorial on Agile Development methodology? | 4 |
74,782 | 09/16/2008 17:24:28 | 13,157 | 09/16/2008 17:24:15 | 1 | 0 | Which to use, eruby or erb? | What's the difference between eruby and erb? What considerations would drive me to choose one or the other?
My application is generating config files for network devices (routers, load balancers, firewalls, etc.). My plan is to template the config files, using embedded ruby (via either eruby or erb) within the source files to do things like iteratively generate all the interface config blocks for a router (these blocks are all very similar, differing only in a label and an IP address). For example, I might have a config template file like this:
hostname sample-router
<%=
r = String.new;
[
["GigabitEthernet1/1", "10.5.16.1"],
["GigabitEthernet1/2", "10.5.17.1"],
["GigabitEthernet1/3", "10.5.18.1"]
].each { |tuple|
r << "interface #{tuple[0]}\n"
r << " ip address #{tuple[1]} netmask 255.255.255.0\n"
}
r.chomp
%>
logging 10.5.16.26
which, when run through an embedded ruby interpreter (either erb or eruby), produces the following output:
hostname sample-router
interface GigabitEthernet1/1
ip address 10.5.16.1 netmask 255.255.255.0
interface GigabitEthernet1/2
ip address 10.5.17.1 netmask 255.255.255.0
interface GigabitEthernet1/3
ip address 10.5.18.1 netmask 255.255.255.0
logging 10.5.16.26
| ruby | eruby | erb | null | null | null | open | Which to use, eruby or erb?
===
What's the difference between eruby and erb? What considerations would drive me to choose one or the other?
My application is generating config files for network devices (routers, load balancers, firewalls, etc.). My plan is to template the config files, using embedded ruby (via either eruby or erb) within the source files to do things like iteratively generate all the interface config blocks for a router (these blocks are all very similar, differing only in a label and an IP address). For example, I might have a config template file like this:
hostname sample-router
<%=
r = String.new;
[
["GigabitEthernet1/1", "10.5.16.1"],
["GigabitEthernet1/2", "10.5.17.1"],
["GigabitEthernet1/3", "10.5.18.1"]
].each { |tuple|
r << "interface #{tuple[0]}\n"
r << " ip address #{tuple[1]} netmask 255.255.255.0\n"
}
r.chomp
%>
logging 10.5.16.26
which, when run through an embedded ruby interpreter (either erb or eruby), produces the following output:
hostname sample-router
interface GigabitEthernet1/1
ip address 10.5.16.1 netmask 255.255.255.0
interface GigabitEthernet1/2
ip address 10.5.17.1 netmask 255.255.255.0
interface GigabitEthernet1/3
ip address 10.5.18.1 netmask 255.255.255.0
logging 10.5.16.26
| 0 |
74,786 | 09/16/2008 17:25:06 | 5,410 | 09/09/2008 13:29:45 | 1 | 4 | Are there any projects for replacing HTML and the current javascript? | Google created protocol buffers as a replacement for the bulky XML method of data transition. Faster XML processing was just not good enough. Most of the web has grown up as a hodge podge of different technologies that have been integrated to work within the browser or to generate html. JavaScript is separate from HTML. Flash and Silverlight are plugged in the mix as well. We can get the job done with the tools we have but can we do better? <br>
Before you mention standards, (which are a good thing to have), think about evolutionary change versus revolutionary change. If Henry Ford asked people about a better way to get around they would have said they wanted a faster horse. (Webkit is a faster horse.) <br>
I am hoping there is a project and I just haven’t read of it.
| javascript | html | ajax | flash | silverlight | null | open | Are there any projects for replacing HTML and the current javascript?
===
Google created protocol buffers as a replacement for the bulky XML method of data transition. Faster XML processing was just not good enough. Most of the web has grown up as a hodge podge of different technologies that have been integrated to work within the browser or to generate html. JavaScript is separate from HTML. Flash and Silverlight are plugged in the mix as well. We can get the job done with the tools we have but can we do better? <br>
Before you mention standards, (which are a good thing to have), think about evolutionary change versus revolutionary change. If Henry Ford asked people about a better way to get around they would have said they wanted a faster horse. (Webkit is a faster horse.) <br>
I am hoping there is a project and I just haven’t read of it.
| 0 |
74,790 | 09/16/2008 17:25:27 | 11,234 | 09/16/2008 06:27:05 | 68 | 18 | is there a way for my binary to react to some global hotkeys in linux ? | Is it possible to listen for a certain hotkey ( e.g:Ctrl-I ) and then perform a specific action ? My application is written in C , will only run on Linux , and it doesn't have a GUI . Are there any libraries that help with this kind of task ?
Thanks | linux | c | hotkey | null | null | null | open | is there a way for my binary to react to some global hotkeys in linux ?
===
Is it possible to listen for a certain hotkey ( e.g:Ctrl-I ) and then perform a specific action ? My application is written in C , will only run on Linux , and it doesn't have a GUI . Are there any libraries that help with this kind of task ?
Thanks | 0 |
74,818 | 09/16/2008 17:29:01 | 13,121 | 09/16/2008 17:11:08 | 1 | 0 | What causes a velocity Template.merge() failure? How does one avoid it? | Our team has been experiencing a recurring problem with velocity templates. Upon rendering, some throw a RuntimeException with the message "Template.merge() failure - Unable to render Velocity Template, '/template.vm'". We have not been able to reproduce the problem and the documentation on the web is pretty insufficient. The problem is not consistently reproducible - the same templates whose rendering sometimes causes the error also manage to display without problems at other times. The Template class [source code][1] is also of little help. Thank you in advance.
[1]: http://www.docjar.com/docs/api/org/apache/velocity/Template.html | java | velocity | null | null | null | null | open | What causes a velocity Template.merge() failure? How does one avoid it?
===
Our team has been experiencing a recurring problem with velocity templates. Upon rendering, some throw a RuntimeException with the message "Template.merge() failure - Unable to render Velocity Template, '/template.vm'". We have not been able to reproduce the problem and the documentation on the web is pretty insufficient. The problem is not consistently reproducible - the same templates whose rendering sometimes causes the error also manage to display without problems at other times. The Template class [source code][1] is also of little help. Thank you in advance.
[1]: http://www.docjar.com/docs/api/org/apache/velocity/Template.html | 0 |
74,821 | 09/16/2008 17:29:27 | 11,234 | 09/16/2008 06:27:05 | 68 | 18 | where can I find vim-enhanced resources? | I recently installed vim-enhanced , but I can't find any article/tutorial related to it.All I could find is a page that briefly describes it's new features , along with several RPM's to download .
What exactly does it have to offer to scripting languages that regular vi/vim can't ?
Thanks | linux | vim | editor | vi | null | null | open | where can I find vim-enhanced resources?
===
I recently installed vim-enhanced , but I can't find any article/tutorial related to it.All I could find is a page that briefly describes it's new features , along with several RPM's to download .
What exactly does it have to offer to scripting languages that regular vi/vim can't ?
Thanks | 0 |
74,843 | 09/16/2008 17:32:27 | 5,056 | 09/07/2008 15:43:17 | 988 | 71 | Rhino Mocks: What scope do actions inside Do() execute in? | I notice that if I write
Expect.Call(delegate { obj.Method(null); }).IgnoreArguments().Do(
new Action(() => {Console.Write("executed");throw new Exception(); }));
Provided that the method does run, MbUnit will recieve the "executed" message but will not detect an exception being thrown. Does anyone know why that is so? Is this something about the way anonymous methods are treated by the framework or about the way Rhino Mocks executes them?
| .net | lambda | rhino-mocks | null | null | 09/16/2008 18:09:35 | off topic | Rhino Mocks: What scope do actions inside Do() execute in?
===
I notice that if I write
Expect.Call(delegate { obj.Method(null); }).IgnoreArguments().Do(
new Action(() => {Console.Write("executed");throw new Exception(); }));
Provided that the method does run, MbUnit will recieve the "executed" message but will not detect an exception being thrown. Does anyone know why that is so? Is this something about the way anonymous methods are treated by the framework or about the way Rhino Mocks executes them?
| 2 |
74,844 | 09/16/2008 17:32:30 | 13,158 | 09/16/2008 17:24:21 | 1 | 0 | Bash or Ksh ? | I'm not new to *nix, however lately I have been spending a lot of time at the prompt to do my development for my job. My question is what are the advantages of using Korn Shell or Bash Shell? Where are the pitfalls of using one over the other? Looking to understand from the perspective of a user, rather than purely scripting. | unix | bash | ksh | null | null | 09/02/2011 06:30:54 | off topic | Bash or Ksh ?
===
I'm not new to *nix, however lately I have been spending a lot of time at the prompt to do my development for my job. My question is what are the advantages of using Korn Shell or Bash Shell? Where are the pitfalls of using one over the other? Looking to understand from the perspective of a user, rather than purely scripting. | 2 |
74,847 | 09/16/2008 17:32:45 | 5,261 | 09/08/2008 18:44:40 | 189 | 18 | Php error_reporting, Best setting for development? E_STRICT ? | Typically I use E_ALL to see anything that php might say about my code to try and improve it.
I just noticed a error constant E_STRICT, but have never used or heard about it, is this a good setting to use for development? The manual says:
> Run-time notices. Enable to have PHP suggest changes to your code which will ensure the best interoperability and forward compatibility of your code.
So I'm wondering if I'm using the best error_reporting level with E_ALL or would that along with E_STRICT be the best? Or is there some other combination I've yet to learn? | php | error-reporting | error | level | e-all | null | open | Php error_reporting, Best setting for development? E_STRICT ?
===
Typically I use E_ALL to see anything that php might say about my code to try and improve it.
I just noticed a error constant E_STRICT, but have never used or heard about it, is this a good setting to use for development? The manual says:
> Run-time notices. Enable to have PHP suggest changes to your code which will ensure the best interoperability and forward compatibility of your code.
So I'm wondering if I'm using the best error_reporting level with E_ALL or would that along with E_STRICT be the best? Or is there some other combination I've yet to learn? | 0 |
74,852 | 09/16/2008 17:33:43 | 1,384,652 | 08/01/2008 12:01:23 | 2,179 | 88 | How good are you at a given language? | I get asked "how good are you at {a programming language goes here}" and quite honestly, I'm not sure how to answer them.
I can judge if I am beyond beginner when I know the key structures and could make a basic web page in that language (assuming it's web based) but the line between intermediate and expert is somewhat blurred. | language-agnostic | null | null | null | null | 01/23/2012 03:46:16 | not constructive | How good are you at a given language?
===
I get asked "how good are you at {a programming language goes here}" and quite honestly, I'm not sure how to answer them.
I can judge if I am beyond beginner when I know the key structures and could make a basic web page in that language (assuming it's web based) but the line between intermediate and expert is somewhat blurred. | 4 |
74,865 | 09/16/2008 17:34:46 | 7,154 | 09/15/2008 13:16:14 | 61 | 7 | How can I cause subversion to check out projects from other repositories? | I recently was working with a subversion project that checked out code not only from the repository I was working with, but also from a separate repository on a different server.
How can I configure my repository to do this?
I'm using the subversion client version 1.3.2 on Linux, and I also have access to TortoiseSVN version 1.4.8 (built on svn version 1.4.6) in Windows. | tortoisesvn | svn | null | null | null | null | open | How can I cause subversion to check out projects from other repositories?
===
I recently was working with a subversion project that checked out code not only from the repository I was working with, but also from a separate repository on a different server.
How can I configure my repository to do this?
I'm using the subversion client version 1.3.2 on Linux, and I also have access to TortoiseSVN version 1.4.8 (built on svn version 1.4.6) in Windows. | 0 |
74,879 | 09/16/2008 17:36:26 | 863 | 08/09/2008 19:07:26 | 995 | 38 | Any tools to generate an XSD schema from an XML instance document? | I am looking for a tool which will take an XML instance document and output a corresponding XSD schema.
I certainly recognize that the generated XSD schema will be limited when compared to creating a schema by hand (it probably won't handle optional or repeating elements, or data constraints), but it could at least serve as a quick starting point. | xml | xsd | null | null | null | null | open | Any tools to generate an XSD schema from an XML instance document?
===
I am looking for a tool which will take an XML instance document and output a corresponding XSD schema.
I certainly recognize that the generated XSD schema will be limited when compared to creating a schema by hand (it probably won't handle optional or repeating elements, or data constraints), but it could at least serve as a quick starting point. | 0 |
74,880 | 09/16/2008 17:36:36 | 10,505 | 09/15/2008 23:32:45 | 1 | 0 | Delegating a task in and getting notified when it completes (in C#) | Conceptually, I would like to accomplish the following but have had trouble understand how to code it properly in C#:
<pre><code>
SomeMethod { // Member of AClass{}
DoSomething;
Start WorkerMethod() from BClass in another thread;
DoSomethingElse;
}
</code></pre>
Then, when WorkerMethod() is complete, run this:
<pre><code>
void SomeOtherMethod() // Also member of AClass{}
{ ... }
</pre></code>
Can anyone please give an example of that? </br>
Many thanks, </br>
-Greg
| c# | delegates | notifications | null | null | null | open | Delegating a task in and getting notified when it completes (in C#)
===
Conceptually, I would like to accomplish the following but have had trouble understand how to code it properly in C#:
<pre><code>
SomeMethod { // Member of AClass{}
DoSomething;
Start WorkerMethod() from BClass in another thread;
DoSomethingElse;
}
</code></pre>
Then, when WorkerMethod() is complete, run this:
<pre><code>
void SomeOtherMethod() // Also member of AClass{}
{ ... }
</pre></code>
Can anyone please give an example of that? </br>
Many thanks, </br>
-Greg
| 0 |
74,883 | 09/16/2008 17:36:51 | 2,822 | 08/25/2008 11:42:23 | 399 | 17 | How do I compile mod_dontdothat on Windows | I cannot seem to compile mod_dontdothat on Windows. Has anybody managed to achieve this? | svn | apache | null | null | null | null | open | How do I compile mod_dontdothat on Windows
===
I cannot seem to compile mod_dontdothat on Windows. Has anybody managed to achieve this? | 0 |
74,884 | 09/16/2008 17:36:53 | 13,200 | 09/16/2008 17:36:53 | 1 | 0 | What is a good book for Javascript the language, and not Javascript frameworks, usage, and quirks? | I find myself using Javascript day to day without a solid understanding of the language. There are some great writeups out there about using specific features of the language, but I'd like a distilled, printed book reference about the language itself. | javascript | books | reference | null | null | 12/03/2011 05:21:42 | not constructive | What is a good book for Javascript the language, and not Javascript frameworks, usage, and quirks?
===
I find myself using Javascript day to day without a solid understanding of the language. There are some great writeups out there about using specific features of the language, but I'd like a distilled, printed book reference about the language itself. | 4 |
74,886 | 09/16/2008 17:37:02 | 10,071 | 09/15/2008 21:03:56 | 161 | 6 | How can I create a command line (unix/linux) instruction that uses variables to execute numerous commands? | I need to rearrange some content in various directories but it's a bit of a pain. In order to debug the application I'm working on (a ruby app) I need to move my gems into my gem folder one at a time (long story; nutshell: one is broken and I can't figure out which one).
So I need to do something like:
sudo mv backup/gem/foo gem/
sudo mv backup/doc/foo doc/
sudo mv backup/specification/foo.gemspec specification/
replacing "foo" each time. How can I author a simple shell script to let me do something like: gemMove("foo") and it fill in the blanks for me? | bash | command-line | shell | null | null | null | open | How can I create a command line (unix/linux) instruction that uses variables to execute numerous commands?
===
I need to rearrange some content in various directories but it's a bit of a pain. In order to debug the application I'm working on (a ruby app) I need to move my gems into my gem folder one at a time (long story; nutshell: one is broken and I can't figure out which one).
So I need to do something like:
sudo mv backup/gem/foo gem/
sudo mv backup/doc/foo doc/
sudo mv backup/specification/foo.gemspec specification/
replacing "foo" each time. How can I author a simple shell script to let me do something like: gemMove("foo") and it fill in the blanks for me? | 0 |
74,892 | 09/16/2008 17:37:38 | 7,439 | 09/15/2008 13:44:47 | 86 | 5 | Is there a quality, file-size, or other benefit to JPEG sizes being multiples of 8px or 16px? | The JPEG compression encoding process splits a given image into blocks of 8x8 pixels, working with these blocks in future lossy and lossless compressions. <a href="http://en.wikipedia.org/wiki/Jpeg#JPEG_codec_example">[source]</a>
It is also mentioned that if the image is a multiple 1MCU block (defined as a Minimum Coded Unit, 'usually 16 pixels in both directions') that lossless alterations to a JPEG can be performed. <a href="http://en.wikipedia.org/wiki/Jpeg#Lossless_editing">[source]</a>
I am working with product images and would like to know both if, and how much benefit can be derived from using multiples of 16 in my final image size (say, using an image with size 480px by 360px) vs. a non-multiple of 16 (such as 484x362). In this example I am not interested in further alterations, editing, or recompression of the final image. | jpeg | compression | lossy | image | null | null | open | Is there a quality, file-size, or other benefit to JPEG sizes being multiples of 8px or 16px?
===
The JPEG compression encoding process splits a given image into blocks of 8x8 pixels, working with these blocks in future lossy and lossless compressions. <a href="http://en.wikipedia.org/wiki/Jpeg#JPEG_codec_example">[source]</a>
It is also mentioned that if the image is a multiple 1MCU block (defined as a Minimum Coded Unit, 'usually 16 pixels in both directions') that lossless alterations to a JPEG can be performed. <a href="http://en.wikipedia.org/wiki/Jpeg#Lossless_editing">[source]</a>
I am working with product images and would like to know both if, and how much benefit can be derived from using multiples of 16 in my final image size (say, using an image with size 480px by 360px) vs. a non-multiple of 16 (such as 484x362). In this example I am not interested in further alterations, editing, or recompression of the final image. | 0 |
74,902 | 09/16/2008 17:38:20 | 877 | 08/10/2008 04:07:29 | 41 | 1 | Uninstall Mono from Mac OS X v10.5 Leopard | I installed Mono on my iMac last night and I immidiately had a change of heart! I don't think Mono is ready for prime time.
The Mono website says to run the following script to uninstall:
#!/bin/sh -x
#This script removes Mono from an OS X System. It must be run as root
rm -r /Library/Frameworks/Mono.framework
rm -r /Library/Receipts/MonoFramework-SVN.pkg
cd /usr/bin
for i in `ls -al | grep Mono | awk '{print $9}'`; do
rm ${i}
done
Has anyone had to uninstall Mono? Was it as straight forward as running the above script or do I have to do more? How messy was it? Any pointers are appreciated.
Thanks | mono | osx-leopard | null | null | null | null | open | Uninstall Mono from Mac OS X v10.5 Leopard
===
I installed Mono on my iMac last night and I immidiately had a change of heart! I don't think Mono is ready for prime time.
The Mono website says to run the following script to uninstall:
#!/bin/sh -x
#This script removes Mono from an OS X System. It must be run as root
rm -r /Library/Frameworks/Mono.framework
rm -r /Library/Receipts/MonoFramework-SVN.pkg
cd /usr/bin
for i in `ls -al | grep Mono | awk '{print $9}'`; do
rm ${i}
done
Has anyone had to uninstall Mono? Was it as straight forward as running the above script or do I have to do more? How messy was it? Any pointers are appreciated.
Thanks | 0 |
74,908 | 09/16/2008 17:38:57 | 13,138 | 09/16/2008 17:18:56 | 1 | 0 | How do you integrate system testing into an agile process? | The classic descriptions of agile development have releasable code at the end of an iteration. If there is further testing and validation that has to happen to create a releasable product, how do you integrate that into the process? | testing | agile | null | null | null | null | open | How do you integrate system testing into an agile process?
===
The classic descriptions of agile development have releasable code at the end of an iteration. If there is further testing and validation that has to happen to create a releasable product, how do you integrate that into the process? | 0 |
74,928 | 09/16/2008 17:40:02 | 2,531 | 08/22/2008 17:17:34 | 11 | 8 | Tool to parse a file | I'm trying to figure out the best way to parse a GE Logician MEL trace file to make it easier to read.
It has segments like
<pre>>{!gDYNAMIC_3205_1215032915_810 = (clYN)}
execute>GDYNAMIC_3205_1215032915_810 = "Yes, No"
results>"Yes, No"
execute>end
results>"Yes, No"
>{!gDYNAMIC_3205_1215032893_294 = (clYN)}
execute>GDYNAMIC_3205_1215032893_294 = "Yes, No"
results>"Yes, No"
execute>end
results>"Yes, No" </pre>
and
<pre>>{IF (STR(F3205_1220646638_285, F3205_1220646638_301) == "") THEN "" ELSE (\par\tab fnHeadingFormat("Depression") + CFMT(F3205_1220646638_285, "", "Have you often been bothered by feeling down, depressed or hopeless? ", "B", "\par ") + CFMT(F3205_1220646638_301, "", "Have you often been bothered by little interest or pleasure in doing things? ", "B", "\par ") ) ENDIF}
execute>call STR("No", "No")
results>"NoNo"
execute>"NoNo" == ""
results>FALSE
execute>if FALSE
results>FALSE
execute>call FNHEADINGFORMAT("Depression")
execute>call CFMT("Depression", "B,2")
results>"\fs24\b Depression\b0\fs20 "
execute>"\r\n" + "\fs24\b Depression\b0\fs20 "
results>"\r\n\fs24\b Depression\b0\fs20 "
execute>"\r\n\fs24\b Depression\b0\fs20 " + "\r\n"
results>"\r\n\fs24\b Depression\b0\fs20 \r\n"
results>return "\r\n\fs24\b Depression\b0\fs20 \r\n"
execute>call CFMT("No", "", "Have you often been bothered by feeling down, depressed or hopeless? ", "B", "\par ")
results>"\b Have you often been bothered by feeling down, depressed or hopeless? \b0 No\par "
execute>"\r\n\fs24\b Depression\b0\fs20 \r\n" + "\b Have you often been bothered by feeling down, depressed or hopeless? \b0 No\par "
results>"\r\n\fs24\b Depression\b0\fs20 \r\n\b Have you often been bothered by feeling down, depressed or hopeless? \b0 No\par "
execute>call CFMT("No", "", "Have you often been bothered by little interest or pleasure in doing things? ", "B", "\par ")
results>"\b Have you often been bothered by little interest or pleasure in doing things? \b0 No\par "
execute>"\r\n\fs24\b Depression\b0\fs20 \r\n\b Have you often been bothered by feeling down, depressed or hopeless? \b0 No\par " + "\b Have you often been bothered by little interest or pleasure in doing things? \b0 No\par "
results>"\r\n\fs24\b Depression\b0\fs20 \r\n\b Have you often been bothered by feeling down, depressed or hopeless? \b0 No\par \b Have you often been bothered by little interest or pleasure in doing things? \b0 No\par "
</pre>
I could grovel through doing it procedurally, but after all the regexps I've worked with, I find it hard to believe there's nothing out there that will let me define the rules for parsing the file in a similar manner. Am I wrong? | parsing | null | null | null | null | null | open | Tool to parse a file
===
I'm trying to figure out the best way to parse a GE Logician MEL trace file to make it easier to read.
It has segments like
<pre>>{!gDYNAMIC_3205_1215032915_810 = (clYN)}
execute>GDYNAMIC_3205_1215032915_810 = "Yes, No"
results>"Yes, No"
execute>end
results>"Yes, No"
>{!gDYNAMIC_3205_1215032893_294 = (clYN)}
execute>GDYNAMIC_3205_1215032893_294 = "Yes, No"
results>"Yes, No"
execute>end
results>"Yes, No" </pre>
and
<pre>>{IF (STR(F3205_1220646638_285, F3205_1220646638_301) == "") THEN "" ELSE (\par\tab fnHeadingFormat("Depression") + CFMT(F3205_1220646638_285, "", "Have you often been bothered by feeling down, depressed or hopeless? ", "B", "\par ") + CFMT(F3205_1220646638_301, "", "Have you often been bothered by little interest or pleasure in doing things? ", "B", "\par ") ) ENDIF}
execute>call STR("No", "No")
results>"NoNo"
execute>"NoNo" == ""
results>FALSE
execute>if FALSE
results>FALSE
execute>call FNHEADINGFORMAT("Depression")
execute>call CFMT("Depression", "B,2")
results>"\fs24\b Depression\b0\fs20 "
execute>"\r\n" + "\fs24\b Depression\b0\fs20 "
results>"\r\n\fs24\b Depression\b0\fs20 "
execute>"\r\n\fs24\b Depression\b0\fs20 " + "\r\n"
results>"\r\n\fs24\b Depression\b0\fs20 \r\n"
results>return "\r\n\fs24\b Depression\b0\fs20 \r\n"
execute>call CFMT("No", "", "Have you often been bothered by feeling down, depressed or hopeless? ", "B", "\par ")
results>"\b Have you often been bothered by feeling down, depressed or hopeless? \b0 No\par "
execute>"\r\n\fs24\b Depression\b0\fs20 \r\n" + "\b Have you often been bothered by feeling down, depressed or hopeless? \b0 No\par "
results>"\r\n\fs24\b Depression\b0\fs20 \r\n\b Have you often been bothered by feeling down, depressed or hopeless? \b0 No\par "
execute>call CFMT("No", "", "Have you often been bothered by little interest or pleasure in doing things? ", "B", "\par ")
results>"\b Have you often been bothered by little interest or pleasure in doing things? \b0 No\par "
execute>"\r\n\fs24\b Depression\b0\fs20 \r\n\b Have you often been bothered by feeling down, depressed or hopeless? \b0 No\par " + "\b Have you often been bothered by little interest or pleasure in doing things? \b0 No\par "
results>"\r\n\fs24\b Depression\b0\fs20 \r\n\b Have you often been bothered by feeling down, depressed or hopeless? \b0 No\par \b Have you often been bothered by little interest or pleasure in doing things? \b0 No\par "
</pre>
I could grovel through doing it procedurally, but after all the regexps I've worked with, I find it hard to believe there's nothing out there that will let me define the rules for parsing the file in a similar manner. Am I wrong? | 0 |
74,947 | 09/16/2008 17:41:49 | 13,219 | 09/16/2008 17:41:49 | 1 | 0 | How can i combine two columns containing Richtext data/files | What is the best way to maniupulate richtext / *.rtf data in SQL server 2005 / 2008
I have looked at ocx solutions. Maybe creating some CLR stored procs?? | sql-server | mssql | null | null | null | null | open | How can i combine two columns containing Richtext data/files
===
What is the best way to maniupulate richtext / *.rtf data in SQL server 2005 / 2008
I have looked at ocx solutions. Maybe creating some CLR stored procs?? | 0 |
74,951 | 09/16/2008 17:42:01 | 13,220 | 09/16/2008 17:42:01 | 1 | 0 | How do I implement custom drag functionality in a Flex list control? | Flex has built in drag-n-drop for list controls, and allows you to override this. But they don't cover this in examples. The built-in functionality automatically drags the list-item, if you want to override this you find the handlers are being set up on the list itself.
What I specifically want to do, is my TileList shows small thumbnails of items I can drag onto a large Canvas. As I drag an item from the list, the drag proxy should be a different image. | flex | null | null | null | null | null | open | How do I implement custom drag functionality in a Flex list control?
===
Flex has built in drag-n-drop for list controls, and allows you to override this. But they don't cover this in examples. The built-in functionality automatically drags the list-item, if you want to override this you find the handlers are being set up on the list itself.
What I specifically want to do, is my TileList shows small thumbnails of items I can drag onto a large Canvas. As I drag an item from the list, the drag proxy should be a different image. | 0 |
74,957 | 09/16/2008 17:42:41 | 1,463 | 08/15/2008 17:26:44 | 549 | 41 | Is there a Powershell "string does not contain" cmdlet or syntax? | In Powershell I'm reading in a text file. I'm then doing a Foreach-Object over the text file and am only interested in the lines that do NOT contain strings that are in $arrayOfStringsNotInterestedIn
Does anybody know the syntax for this?
Get-Content $filename | Foreach-Object {$_} | powershell | null | null | null | null | null | open | Is there a Powershell "string does not contain" cmdlet or syntax?
===
In Powershell I'm reading in a text file. I'm then doing a Foreach-Object over the text file and am only interested in the lines that do NOT contain strings that are in $arrayOfStringsNotInterestedIn
Does anybody know the syntax for this?
Get-Content $filename | Foreach-Object {$_} | 0 |
74,960 | 09/16/2008 17:42:51 | 13,224 | 09/16/2008 17:42:51 | 1 | 0 | How do I add a namespace reference to a SOAP response with Apache Axis2 and Java | I'm looking at the SOAP output from a web service I'm developing, and I noticed something curious:
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns1:CreateEntityTypesResponse xmlns:ns1="http://somedomain.com/wsinterface">
<newKeys>
<value>1234</value>
</newKeys>
<newKeys>
<value>2345</value>
</newKeys>
<newKeys>
<value>3456</value>
</newKeys>
<newKeys xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<newKeys xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<errors>Error1</errors>
<errors>Error2</errors>
</ns1:CreateEntityTypesResponse>
</soapenv:Body>
</soapenv:Envelope>
I have two newKeys elements that are nil, and both elements insert a namespace reference for xsi. I'd like to include that namespace in the soapenv:Envelope element so that the namespace reference is only sent once.
| axis2 | soap | java | namespaces | null | null | open | How do I add a namespace reference to a SOAP response with Apache Axis2 and Java
===
I'm looking at the SOAP output from a web service I'm developing, and I noticed something curious:
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns1:CreateEntityTypesResponse xmlns:ns1="http://somedomain.com/wsinterface">
<newKeys>
<value>1234</value>
</newKeys>
<newKeys>
<value>2345</value>
</newKeys>
<newKeys>
<value>3456</value>
</newKeys>
<newKeys xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<newKeys xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<errors>Error1</errors>
<errors>Error2</errors>
</ns1:CreateEntityTypesResponse>
</soapenv:Body>
</soapenv:Envelope>
I have two newKeys elements that are nil, and both elements insert a namespace reference for xsi. I'd like to include that namespace in the soapenv:Envelope element so that the namespace reference is only sent once.
| 0 |
74,986 | 09/16/2008 17:45:57 | 5,777 | 09/11/2008 11:10:19 | 33 | 3 | XBAP Application, can these work in Google Chrome? | I'm developing a .NET 3.5 XBAP application that runs perfectly fine in FF3 and IE6/7 etc. I'm just wondering if its possible to get these to run under other browsers, specifically (as its in the limelight at the moment) Google Chrome. | c# | .net | google-chrome | xbap | null | null | open | XBAP Application, can these work in Google Chrome?
===
I'm developing a .NET 3.5 XBAP application that runs perfectly fine in FF3 and IE6/7 etc. I'm just wondering if its possible to get these to run under other browsers, specifically (as its in the limelight at the moment) Google Chrome. | 0 |
74,993 | 09/16/2008 17:46:50 | 9,435 | 09/15/2008 18:48:18 | 1 | 0 | Which resources should one monitor on a Linux server running a web-server or database | When running any kind of server under load there are several resources that one would like to monitor to make sure that the server is healthy. This is specifically true when testing the system under load.
Some examples for this would be CPU utilization, memory usage, and perhaps disk space.
What other resource should I be monitoring, and what tools are available to do so? | linux | performance | sysadmin | null | null | null | open | Which resources should one monitor on a Linux server running a web-server or database
===
When running any kind of server under load there are several resources that one would like to monitor to make sure that the server is healthy. This is specifically true when testing the system under load.
Some examples for this would be CPU utilization, memory usage, and perhaps disk space.
What other resource should I be monitoring, and what tools are available to do so? | 0 |
75,001 | 09/16/2008 17:47:41 | 6,726 | 09/15/2008 12:32:49 | 181 | 20 | Why isn't there a viable mod_ruby for Apache yet? | As popular as Ruby and Rails are, it seems like this problem would already be solved. JRuby and mod_rails are all fine and dandy, but why isn't there an Apache mod for just straight Ruby? | ruby | apache | rubyonrails | null | null | null | open | Why isn't there a viable mod_ruby for Apache yet?
===
As popular as Ruby and Rails are, it seems like this problem would already be solved. JRuby and mod_rails are all fine and dandy, but why isn't there an Apache mod for just straight Ruby? | 0 |
75,011 | 09/16/2008 17:49:05 | 863 | 08/09/2008 19:07:26 | 995 | 39 | Does Scripting.Dictionary's RemoveAll() method release all of its elements first? | In a VB6 application, I have a `Dictionary` whose keys are `String`s and values are instances of a custom class. If I call `RemoveAll()` on the `Dictionary`, will it first free the custom objects? Or do I explicitly need to do this myself?
Dim d as Scripting.Dictionary
d("a") = New clsCustom
d("b") = New clsCustom
' Are these two lines necessary?
Set d("a") = Nothing
Set d("b") = Nothing
d.RemoveAll | vb6 | memory-management | dictionary | null | null | null | open | Does Scripting.Dictionary's RemoveAll() method release all of its elements first?
===
In a VB6 application, I have a `Dictionary` whose keys are `String`s and values are instances of a custom class. If I call `RemoveAll()` on the `Dictionary`, will it first free the custom objects? Or do I explicitly need to do this myself?
Dim d as Scripting.Dictionary
d("a") = New clsCustom
d("b") = New clsCustom
' Are these two lines necessary?
Set d("a") = Nothing
Set d("b") = Nothing
d.RemoveAll | 0 |
75,052 | 09/16/2008 17:52:56 | 6,822 | 09/15/2008 12:41:09 | 1 | 0 | How to stop a mp3 file from being downloaded by flash when in streaming mode | I have a flash player that has a set of songs loaded via an xml file.
The files dont start getting stream until you pick one.
If I quickly cycle through each of the 8 files, then flash starts trying to download each of the 8 files at the same time.
I'm wondering if there is a way to clear the file that is being downloaded. So that bandwidth is not eaten up if someone decides to click on lots of track names.
Something like mySound.clear would be great, or mySound.stopStreaming..
Has anyone had this problem before?
Regards,
Chris | flash | streaming | stop | null | null | null | open | How to stop a mp3 file from being downloaded by flash when in streaming mode
===
I have a flash player that has a set of songs loaded via an xml file.
The files dont start getting stream until you pick one.
If I quickly cycle through each of the 8 files, then flash starts trying to download each of the 8 files at the same time.
I'm wondering if there is a way to clear the file that is being downloaded. So that bandwidth is not eaten up if someone decides to click on lots of track names.
Something like mySound.clear would be great, or mySound.stopStreaming..
Has anyone had this problem before?
Regards,
Chris | 0 |
75,057 | 09/16/2008 17:53:22 | 13,099 | 09/16/2008 17:03:45 | 1 | 0 | What is the best way to check the strength of a password? | What is the best way of ensuring that a user supplied password is a strong password? | polls | algorithms | null | null | null | null | open | What is the best way to check the strength of a password?
===
What is the best way of ensuring that a user supplied password is a strong password? | 0 |
75,064 | 09/16/2008 17:54:02 | 13,198 | 09/16/2008 17:36:01 | 1 | 1 | Begning J2EE | I know something about Java but completely new to Enterprise Java. I'm trying my hand with NetBeans 6.1 and GlassFish Application Server.
Please guide me to some resources which tell me actually what java enterprise applications are, how they are different from normal java classes etc. Also which is best application server to use (on Linux)? | java-ee | null | null | null | null | null | open | Begning J2EE
===
I know something about Java but completely new to Enterprise Java. I'm trying my hand with NetBeans 6.1 and GlassFish Application Server.
Please guide me to some resources which tell me actually what java enterprise applications are, how they are different from normal java classes etc. Also which is best application server to use (on Linux)? | 0 |
75,076 | 09/16/2008 17:54:56 | 2,422 | 08/22/2008 03:48:16 | 231 | 14 | Obtain parameter values from StackFrame in .NET? | I would like to be able to obtain all the parameter values from the StackFrame in .NET. A bit like how you're able to see the values in the CallStack when in the VS debugger. My approach has concentrated on using the StackFrame class and then to reflect over a ParamaterInfo array. I've had success with reflection and properties, but this is proving a bit trickier.
Does anyone have an approach for achieving this?
Code so far looks like this...
class Program
{
static void Main(string[] args)
{
A a = new A();
a.Go(1);
}
}
public class A
{
internal void Go(int x)
{
B b = new B();
b.Go(4);
}
}
public class B
{
internal void Go(int y)
{
Console.WriteLine(GetStackTrace());
}
public static string GetStackTrace()
{
StringBuilder sb = new StringBuilder();
StackTrace st = new StackTrace(true);
StackFrame[] frames = st.GetFrames();
foreach (StackFrame frame in frames)
{
MethodBase method = frame.GetMethod();
sb.AppendFormat("{0} - {1}",method.DeclaringType, method.Name);
ParameterInfo[] paramaters = method.GetParameters();
foreach (ParameterInfo paramater in paramaters)
{
sb.AppendFormat("{0}: {1}", paramater.Name, paramater.ToString());
}
sb.AppendLine();
}
return sb.ToString();
}
}
Output looks like this:
-----------------------
SfApp.B - GetStackTrace
SfApp.B - Go
y: Int32 y
SfApp.A - Go
x: Int32 x
SfApp.Program - Main
args: System.String[] args
I'd like it to look more like this:
-----------------------------------
SfApp.B - GetStackTrace
SfApp.B - Go
y: 4
SfApp.A - Go
x: 1
SfApp.Program - Main | .net | c# | reflection | null | null | null | open | Obtain parameter values from StackFrame in .NET?
===
I would like to be able to obtain all the parameter values from the StackFrame in .NET. A bit like how you're able to see the values in the CallStack when in the VS debugger. My approach has concentrated on using the StackFrame class and then to reflect over a ParamaterInfo array. I've had success with reflection and properties, but this is proving a bit trickier.
Does anyone have an approach for achieving this?
Code so far looks like this...
class Program
{
static void Main(string[] args)
{
A a = new A();
a.Go(1);
}
}
public class A
{
internal void Go(int x)
{
B b = new B();
b.Go(4);
}
}
public class B
{
internal void Go(int y)
{
Console.WriteLine(GetStackTrace());
}
public static string GetStackTrace()
{
StringBuilder sb = new StringBuilder();
StackTrace st = new StackTrace(true);
StackFrame[] frames = st.GetFrames();
foreach (StackFrame frame in frames)
{
MethodBase method = frame.GetMethod();
sb.AppendFormat("{0} - {1}",method.DeclaringType, method.Name);
ParameterInfo[] paramaters = method.GetParameters();
foreach (ParameterInfo paramater in paramaters)
{
sb.AppendFormat("{0}: {1}", paramater.Name, paramater.ToString());
}
sb.AppendLine();
}
return sb.ToString();
}
}
Output looks like this:
-----------------------
SfApp.B - GetStackTrace
SfApp.B - Go
y: Int32 y
SfApp.A - Go
x: Int32 x
SfApp.Program - Main
args: System.String[] args
I'd like it to look more like this:
-----------------------------------
SfApp.B - GetStackTrace
SfApp.B - Go
y: 4
SfApp.A - Go
x: 1
SfApp.Program - Main | 0 |
75,105 | 09/16/2008 17:57:31 | 13,205 | 09/16/2008 17:38:04 | 1 | 0 | What datatype should be used for storing phone numbers in SQL Server 2005? | I need to store phone numbers in a table. Please suggest which datatype should I use?
**Wait. Please read on before you hit reply..**
This field needs to be indexed heavily as customers can use this field for searching (including wild character search).
As of now, we are expecting phone numbers to come in a number of formats (from an XML file). Do I have to write a parser to convert to a uniform format? There could be millions of data (with duplicates) and I dont want to tie up the server resources (in activities like preprocessing too much) every time some source data comes through..
Any suggestions are welcome.. | sql-server | indexing | null | null | null | null | open | What datatype should be used for storing phone numbers in SQL Server 2005?
===
I need to store phone numbers in a table. Please suggest which datatype should I use?
**Wait. Please read on before you hit reply..**
This field needs to be indexed heavily as customers can use this field for searching (including wild character search).
As of now, we are expecting phone numbers to come in a number of formats (from an XML file). Do I have to write a parser to convert to a uniform format? There could be millions of data (with duplicates) and I dont want to tie up the server resources (in activities like preprocessing too much) every time some source data comes through..
Any suggestions are welcome.. | 0 |
75,123 | 09/16/2008 18:00:05 | 3,208 | 08/27/2008 13:12:45 | 215 | 16 | Remove columns from DataTable in C# | I have a DataSet which I get a DataTable from that I am being passed back from a function call. It has 15-20 columns, however I only want 10 columns of the data.
Is there a way to remove those columns that I don't want, copy the DataTable to another that has only the columns defined that I want or is it just better to iterate the collection and just use the columns I need.
I need to write the values out to a fixed length data file. | c# | asp.net | null | null | null | null | open | Remove columns from DataTable in C#
===
I have a DataSet which I get a DataTable from that I am being passed back from a function call. It has 15-20 columns, however I only want 10 columns of the data.
Is there a way to remove those columns that I don't want, copy the DataTable to another that has only the columns defined that I want or is it just better to iterate the collection and just use the columns I need.
I need to write the values out to a fixed length data file. | 0 |
75,134 | 09/16/2008 18:00:40 | 6,967 | 09/15/2008 12:55:10 | 1 | 3 | How to make jQuery effects run in sequence, not simultaneously? | How do I have two effects in jQuery run in sequence, not simultaneously? Take this piece of code for example:
$("#show-projects").click(function() {
$(".page:visible").fadeOut("normal");
$("#projects").fadeIn("normal");
});
The fadeOut and the fadeIn run simultaneously, how do I make them run one after the other?
| javascript | jquery | null | null | null | null | open | How to make jQuery effects run in sequence, not simultaneously?
===
How do I have two effects in jQuery run in sequence, not simultaneously? Take this piece of code for example:
$("#show-projects").click(function() {
$(".page:visible").fadeOut("normal");
$("#projects").fadeIn("normal");
});
The fadeOut and the fadeIn run simultaneously, how do I make them run one after the other?
| 0 |
75,145 | 09/16/2008 18:02:03 | 2,459 | 08/22/2008 12:05:52 | 1 | 0 | How do you quickly find the URL for a .NET framework method on MSDN? | How to you find the URL that represents the documentation of a .NET framework method on the MSDN website? | .net | productivity | null | null | null | null | open | How do you quickly find the URL for a .NET framework method on MSDN?
===
How to you find the URL that represents the documentation of a .NET framework method on the MSDN website? | 0 |
75,153 | 09/16/2008 18:02:37 | 13,143 | 09/16/2008 17:21:16 | 1 | 0 | General Development Notes | During a typical day programming, I implement functions in a way that I would like to remember. For instance, say I tuned a DB insert function that, when I come across the situation again, I want to find what I did to resuse.
I need a place to keep the solution(what I did), and I need to find it somehow, which may be months or a year later. Using a mind map sort of idea, I was thinking about a personal wiki, but then I heard the stackoverflow podcast mention using this site for such a reason. Does anybody else keep track of slick things they've done so that they may find it sometime in the future. If so, what did you use, and in general, how do you use it? | notetaking | null | null | null | null | 11/20/2011 18:08:04 | not constructive | General Development Notes
===
During a typical day programming, I implement functions in a way that I would like to remember. For instance, say I tuned a DB insert function that, when I come across the situation again, I want to find what I did to resuse.
I need a place to keep the solution(what I did), and I need to find it somehow, which may be months or a year later. Using a mind map sort of idea, I was thinking about a personal wiki, but then I heard the stackoverflow podcast mention using this site for such a reason. Does anybody else keep track of slick things they've done so that they may find it sometime in the future. If so, what did you use, and in general, how do you use it? | 4 |
75,156 | 09/16/2008 18:02:51 | 13,282 | 09/16/2008 18:02:51 | 1 | 0 | How to limit execution time for a Perl script in IIS | This is a shared hosting environment. I control the server, but not necessarily the content. I've got a client with a Perl script that seems to run out of control every now and then and suck down 50% of the processor until the process is killed.
With ASP scripts, I'm able to restrict the amount of time the script can run, and IIS will simply shut it down after, say, 90 seconds.
Is there a way to do the same thing for a Perl script? How?? | iis | iis6 | perl | null | null | null | open | How to limit execution time for a Perl script in IIS
===
This is a shared hosting environment. I control the server, but not necessarily the content. I've got a client with a Perl script that seems to run out of control every now and then and suck down 50% of the processor until the process is killed.
With ASP scripts, I'm able to restrict the amount of time the script can run, and IIS will simply shut it down after, say, 90 seconds.
Is there a way to do the same thing for a Perl script? How?? | 0 |
75,159 | 09/16/2008 18:03:17 | 4,872 | 09/06/2008 09:14:55 | 499 | 13 | What is the easiest way to get total number for lines of code (LOC) in SQL Server? | I need to provide statistics on how many lines of code (LOC) associated with a system. The application part is easy but I need to also include any code residing within the SQL Server database. This would apply to stored procedures, functions, triggers, etc.
How can I easily get that info? Can it be done (accurately) with TSQL by querying the system tables\sprocs, etc? | sql-server | database | tsql | statistics | null | null | open | What is the easiest way to get total number for lines of code (LOC) in SQL Server?
===
I need to provide statistics on how many lines of code (LOC) associated with a system. The application part is easy but I need to also include any code residing within the SQL Server database. This would apply to stored procedures, functions, triggers, etc.
How can I easily get that info? Can it be done (accurately) with TSQL by querying the system tables\sprocs, etc? | 0 |
75,168 | 09/16/2008 18:03:54 | 13,209 | 09/16/2008 17:38:34 | 1 | 1 | Is there a working on-the-fly compilation in NetBeans 6.5 and how well is it doing? | I learned today that NetBeans 6.5 should have an on-the-fly compilation of (single) Java files. This feature is well known from Eclipse: Simply sotre the file and the compiled class is stored, too. Is NetBeans working the same way? If not, how is it ticking? | java | netbeans | compilation | null | null | null | open | Is there a working on-the-fly compilation in NetBeans 6.5 and how well is it doing?
===
I learned today that NetBeans 6.5 should have an on-the-fly compilation of (single) Java files. This feature is well known from Eclipse: Simply sotre the file and the compiled class is stored, too. Is NetBeans working the same way? If not, how is it ticking? | 0 |
75,175 | 09/16/2008 18:04:28 | 5,309 | 09/09/2008 01:21:26 | 296 | 7 | Create instance of generic type in Java? | Is it possible to create an instance of a generic type in Java? I'm thinking based on what I've seen that the answer is "no" (due to type erasure), but I'd be interested if anyone can see something I'm missing:
private static class SomeContainer<E>
{
E createContents()
{
return what???
}
}
| java | generics | null | null | null | null | open | Create instance of generic type in Java?
===
Is it possible to create an instance of a generic type in Java? I'm thinking based on what I've seen that the answer is "no" (due to type erasure), but I'd be interested if anyone can see something I'm missing:
private static class SomeContainer<E>
{
E createContents()
{
return what???
}
}
| 0 |
75,180 | 09/16/2008 18:04:40 | 9,530 | 09/15/2008 19:04:15 | 126 | 8 | How to display a dynamically allocated array in the Visual Studio debugger? | If you have a statically allocated array, the Visual Studio debugger can easily display all of the array elements. However, if you have an array allocated dynamically and pointed to by a pointer, it will only display the first element of the array when you click the + to expand it. Is there an easy way to tell the debugger, show me this data as an array of type Foo and size X? | c++ | visual-studio | debugging | null | null | null | open | How to display a dynamically allocated array in the Visual Studio debugger?
===
If you have a statically allocated array, the Visual Studio debugger can easily display all of the array elements. However, if you have an array allocated dynamically and pointed to by a pointer, it will only display the first element of the array when you click the + to expand it. Is there an easy way to tell the debugger, show me this data as an array of type Foo and size X? | 0 |
75,181 | 09/16/2008 18:04:42 | 305 | 08/04/2008 14:04:19 | 2,932 | 148 | Problem accessing the content of a div when that content came from an Ajax call | Here's a very simple Prototype example.
All it does is, on window load, an ajax call which sticks some html into a div.
<html>
<head>
<script type="text/javascript" src="scriptaculous/lib/prototype.js"></script>
<script type="text/javascript">
Event.observe(window, 'load', function(){
new Ajax.Request('get-table.php', {
method: 'get',
onSuccess: function(response){
$('content').innerHTML = response.responseText;
//This happens FIRST
//At this call, the div has HTML in it
click1();
},
onFailure: function(){
alert('Fail!');
}
});
//This happens SECOND
//At this call, the div is empty
click1();
});
function click1(){
if($('content').innerHTML){
alert('Found content');
}else{
alert('Empty div');
}
}
</script>
</head>
<body>
<a href="" onclick="click1(); return false;">Click 1</a><hr />
<div id="content"></div>
</body>
</html>
The thing that's confusing is the context in which Prototype understands that the div actually has stuff in it.
If you look at the onSuccess part of the ajax call, you'll see that at that point $('content').innerHTML has stuff in it.
However when I check $('content').innerHTML right after the ajax call, it appears to be empty.
This has to be some fundamental misunderstanding on my part. Anyone care to explain it to me?
| javascript | prototype | dom | null | null | null | open | Problem accessing the content of a div when that content came from an Ajax call
===
Here's a very simple Prototype example.
All it does is, on window load, an ajax call which sticks some html into a div.
<html>
<head>
<script type="text/javascript" src="scriptaculous/lib/prototype.js"></script>
<script type="text/javascript">
Event.observe(window, 'load', function(){
new Ajax.Request('get-table.php', {
method: 'get',
onSuccess: function(response){
$('content').innerHTML = response.responseText;
//This happens FIRST
//At this call, the div has HTML in it
click1();
},
onFailure: function(){
alert('Fail!');
}
});
//This happens SECOND
//At this call, the div is empty
click1();
});
function click1(){
if($('content').innerHTML){
alert('Found content');
}else{
alert('Empty div');
}
}
</script>
</head>
<body>
<a href="" onclick="click1(); return false;">Click 1</a><hr />
<div id="content"></div>
</body>
</html>
The thing that's confusing is the context in which Prototype understands that the div actually has stuff in it.
If you look at the onSuccess part of the ajax call, you'll see that at that point $('content').innerHTML has stuff in it.
However when I check $('content').innerHTML right after the ajax call, it appears to be empty.
This has to be some fundamental misunderstanding on my part. Anyone care to explain it to me?
| 0 |
75,182 | 09/16/2008 18:04:42 | 13,277 | 09/16/2008 18:01:28 | 1 | 0 | Detecting a chroot jail from within | How can one detect being in a chroot jail without root privileges? Assume a standard BSD or Linux system. The best I came up with was to look at the inode value for "/" and to consider whether it is reasonably low, but I would like a more accurate method for detection. | linux | unix | bsd | posix | chroot | null | open | Detecting a chroot jail from within
===
How can one detect being in a chroot jail without root privileges? Assume a standard BSD or Linux system. The best I came up with was to look at the inode value for "/" and to consider whether it is reasonably low, but I would like a more accurate method for detection. | 0 |
75,191 | 09/16/2008 18:05:18 | 1,785 | 08/18/2008 14:48:51 | 49 | 7 | unsigned char | In C/C++, what is an unsigned char used for? How is this different from a regular char? | c++ | c | null | null | null | null | open | unsigned char
===
In C/C++, what is an unsigned char used for? How is this different from a regular char? | 0 |
75,213 | 09/16/2008 18:06:50 | 1,785 | 08/18/2008 14:48:51 | 49 | 7 | scope resolution operator without a scope | In C++, what is the purpose of the scope resolution operator when used without a scope? For instance:
::foo();
| c++ | null | null | null | null | null | open | scope resolution operator without a scope
===
In C++, what is the purpose of the scope resolution operator when used without a scope? For instance:
::foo();
| 0 |
75,218 | 09/16/2008 18:07:34 | 2,443 | 08/22/2008 10:53:30 | 1,241 | 53 | How can I detect when an Exception's been thrown globally in Java? | How can I detect when an Exception has been thrown anywhere in my application?
I'm try to auto-magically send myself an email whenever an exception is thrown anywhere in my Java Desktop Application. I figure this way I can be more proactive.
I know I could just explicitly log and notify myself whenever an exception occurs, but I'd have to do it everywhere and I might(more likely will) miss a couple.
Any suggestions? | java | exception | null | null | null | null | open | How can I detect when an Exception's been thrown globally in Java?
===
How can I detect when an Exception has been thrown anywhere in my application?
I'm try to auto-magically send myself an email whenever an exception is thrown anywhere in my Java Desktop Application. I figure this way I can be more proactive.
I know I could just explicitly log and notify myself whenever an exception occurs, but I'd have to do it everywhere and I might(more likely will) miss a couple.
Any suggestions? | 0 |
75,230 | 09/16/2008 18:08:22 | 2,459 | 08/22/2008 12:05:52 | 16 | 1 | How do you quickly find the URL for a Win32 API on MSDN? | How do you quickly find the URL for a Win32 API on MSDN? It's easy for .NET methods -- just add the method name (for example, System.Byte.ToString) to http://msdn.microsoft.com/library/.
However, for Win32 APIs (say GetLongPathName), this doesn't work: [http://msdn.microsoft.com/en-us/library/GetLongPathName][1].
What's the magic pixie dust for Win32 APIs? Or does it only work for .NET methods?
[1]: http://msdn.microsoft.com/en-us/library/GetLongPathName | winapi | windows | productivity | null | null | null | open | How do you quickly find the URL for a Win32 API on MSDN?
===
How do you quickly find the URL for a Win32 API on MSDN? It's easy for .NET methods -- just add the method name (for example, System.Byte.ToString) to http://msdn.microsoft.com/library/.
However, for Win32 APIs (say GetLongPathName), this doesn't work: [http://msdn.microsoft.com/en-us/library/GetLongPathName][1].
What's the magic pixie dust for Win32 APIs? Or does it only work for .NET methods?
[1]: http://msdn.microsoft.com/en-us/library/GetLongPathName | 0 |
75,255 | 09/16/2008 18:10:03 | 11,138 | 09/16/2008 05:27:54 | 61 | 11 | How do you start running the program over again in gdb with 'target remote'? | When you're doing a usual <tt>gdb</tt> session on an executable file on the same computer, you can give the <tt>run</tt> command and it will start the program over again.
When you're running <tt>gdb</tt> on an embedded system, as with the command <tt>target localhost:3210'</tt>, how do you start the program over again without quitting and restarting your <tt>gdb</tt> session? | gdb | debugging | null | null | null | null | open | How do you start running the program over again in gdb with 'target remote'?
===
When you're doing a usual <tt>gdb</tt> session on an executable file on the same computer, you can give the <tt>run</tt> command and it will start the program over again.
When you're running <tt>gdb</tt> on an embedded system, as with the command <tt>target localhost:3210'</tt>, how do you start the program over again without quitting and restarting your <tt>gdb</tt> session? | 0 |
75,258 | 09/16/2008 18:10:18 | 8,543 | 09/15/2008 16:18:08 | 91 | 4 | How to make a Side-by-Side Compiler for .NET | Nikhil Kothari's [Script#][1] is quite possibly one of the most amazing concepts I've seen in the JavaScript arena for quite some time. This question isn't about JavaScript, but rather about language compilation in the .NET runtime.
I've been rather interested in how, using the .NET platform, one can write a compiler for a language that already has a compiler (like C#) that will generate separate output from the original compiler while allowing the original compiler to generate output for the same source during the same build operation, all the while referencing/using the output of the other compiler as well.
I'm not entirely sure I even understand the process well enough to ask the question with the right details, but this is the way I currently see the process, as per diagrams in the Script# docs. I've thought about many things involving complex language design and compilation that may be able to take advantage of concepts like this and I'm interested in what other people think about the concepts.
[1]: http://projects.nikhilk.net/ScriptSharp/ | .net | compiler-theory | language-design | null | null | null | open | How to make a Side-by-Side Compiler for .NET
===
Nikhil Kothari's [Script#][1] is quite possibly one of the most amazing concepts I've seen in the JavaScript arena for quite some time. This question isn't about JavaScript, but rather about language compilation in the .NET runtime.
I've been rather interested in how, using the .NET platform, one can write a compiler for a language that already has a compiler (like C#) that will generate separate output from the original compiler while allowing the original compiler to generate output for the same source during the same build operation, all the while referencing/using the output of the other compiler as well.
I'm not entirely sure I even understand the process well enough to ask the question with the right details, but this is the way I currently see the process, as per diagrams in the Script# docs. I've thought about many things involving complex language design and compilation that may be able to take advantage of concepts like this and I'm interested in what other people think about the concepts.
[1]: http://projects.nikhilk.net/ScriptSharp/ | 0 |
75,267 | 09/16/2008 18:10:55 | 6,178 | 09/12/2008 19:24:30 | 168 | 19 | In how many languages is Null not equal to anything not even Null? | In how many languages is Null not equal to anything not even Null?
| sql | language-agnostic | null | null | null | null | open | In how many languages is Null not equal to anything not even Null?
===
In how many languages is Null not equal to anything not even Null?
| 0 |
75,270 | 09/16/2008 18:11:15 | 12,600 | 09/16/2008 14:54:03 | 1 | 0 | Open Source Database Plugin For Eclipse? | Does anyone know of a good open source plugin for database querying and exploring within Eclipse?
The active Database Exploring plugin within Eclipse is really geared around being associated with a Java project. While I am just trying to run ad-hoc queries and explore the schema. I am effectively looking for a just a common, quick querying tool without the overhead of having to create a code project. I have found a couple open source database plugins for Eclipse but these have not seen active development in over a year.
Any suggestions? | database | eclipse | ide | null | null | 06/15/2012 15:05:13 | not constructive | Open Source Database Plugin For Eclipse?
===
Does anyone know of a good open source plugin for database querying and exploring within Eclipse?
The active Database Exploring plugin within Eclipse is really geared around being associated with a Java project. While I am just trying to run ad-hoc queries and explore the schema. I am effectively looking for a just a common, quick querying tool without the overhead of having to create a code project. I have found a couple open source database plugins for Eclipse but these have not seen active development in over a year.
Any suggestions? | 4 |
75,273 | 09/16/2008 18:11:47 | 5,486 | 09/09/2008 23:09:59 | 190 | 14 | "Could not reformat the document" in ASP.NET, VS2008 | I'm in an **ASP.NET UserControl**. When I type Control-K, Control-D to reformat all the markup, I get a series of messages from VS 2008:
"Could not reformat the document. The original format was restored."
"Could not complete the action."
"The operation could not be completed. The parameter is incorrect."
Anybody know what causes this? | asp.net | visual-studio | vs2008 | usercontrols | null | null | open | "Could not reformat the document" in ASP.NET, VS2008
===
I'm in an **ASP.NET UserControl**. When I type Control-K, Control-D to reformat all the markup, I get a series of messages from VS 2008:
"Could not reformat the document. The original format was restored."
"Could not complete the action."
"The operation could not be completed. The parameter is incorrect."
Anybody know what causes this? | 0 |
75,282 | 09/16/2008 18:12:33 | 4,491 | 09/04/2008 06:44:23 | 401 | 10 | SelectedIndexChanged event handler getting old index | I'm handling the onSelectIndexChanged event. An event is raised when the DropDownList selection changes. the problem is that the DropDownList still returns the old values for SelectedValue and SelectedIndex. What am I doing wrong?
Here is the DropDownList definition from the aspx file:
<div style="margin: 0px; padding: 0px 1em 0px 0px;">
<span style="margin: 0px; padding: 0px; vertical-align: top;">Route:</span>
<asp:DropDownList id="Select1" runat="server" onselectedindexchanged="index_changed" AutoPostBack="true">
</asp:DropDownList>
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
</div>
Here is the DropDownList OnSelectedIndexChanged event handler:
protected void index_changed(object sender, EventArgs e)
{
decimal d = Convert.ToDecimal( Select1.SelectedValue );
Literal1.Text = d.ToString();
}
| c# | asp.net | webforms | null | null | null | open | SelectedIndexChanged event handler getting old index
===
I'm handling the onSelectIndexChanged event. An event is raised when the DropDownList selection changes. the problem is that the DropDownList still returns the old values for SelectedValue and SelectedIndex. What am I doing wrong?
Here is the DropDownList definition from the aspx file:
<div style="margin: 0px; padding: 0px 1em 0px 0px;">
<span style="margin: 0px; padding: 0px; vertical-align: top;">Route:</span>
<asp:DropDownList id="Select1" runat="server" onselectedindexchanged="index_changed" AutoPostBack="true">
</asp:DropDownList>
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
</div>
Here is the DropDownList OnSelectedIndexChanged event handler:
protected void index_changed(object sender, EventArgs e)
{
decimal d = Convert.ToDecimal( Select1.SelectedValue );
Literal1.Text = d.ToString();
}
| 0 |
75,303 | 09/16/2008 18:14:00 | 4,607 | 09/04/2008 19:49:49 | 106 | 6 | What real-world language implement academic features from functional programming? | Lisp developed a set of interesting language features quite early on in the academic world, but most of them never caught on in production environments.
Some languages, like JavaScript, adapted basic features like garbage collection and lexical closures, but all the stuff that might actually change how you write programs on a large scale, like powerful macros, the code-as-data thing and custom control structures, only seems to propagate within other functional languages, none of which are practical to use for non-trivial projects.
The functional programming community also came up with a lot of other interesting ideas (apart from functional programming itself), like referential transparency, generalised case-expressions (ie, pattern-matching, not crippled like C/C# switches) and curried functions, which seem obviously useful in regular programming and should be easy to integrate with existing programming practice, but for some reason seem to be stuck in the academic world forever.
Why do these features have such a hard time getting adopted? Are there any modern, practical languages that actually learn from Lisp instead of half-assedly copying "first class functions", or is there an inherent conflict that makes this impossible? | lisp | haskell | ml | functional-programming | enterprise | null | open | What real-world language implement academic features from functional programming?
===
Lisp developed a set of interesting language features quite early on in the academic world, but most of them never caught on in production environments.
Some languages, like JavaScript, adapted basic features like garbage collection and lexical closures, but all the stuff that might actually change how you write programs on a large scale, like powerful macros, the code-as-data thing and custom control structures, only seems to propagate within other functional languages, none of which are practical to use for non-trivial projects.
The functional programming community also came up with a lot of other interesting ideas (apart from functional programming itself), like referential transparency, generalised case-expressions (ie, pattern-matching, not crippled like C/C# switches) and curried functions, which seem obviously useful in regular programming and should be easy to integrate with existing programming practice, but for some reason seem to be stuck in the academic world forever.
Why do these features have such a hard time getting adopted? Are there any modern, practical languages that actually learn from Lisp instead of half-assedly copying "first class functions", or is there an inherent conflict that makes this impossible? | 0 |
75,312 | 09/16/2008 18:14:48 | 8,975 | 09/15/2008 17:22:52 | 1 | 0 | Multicolor cursor in X | X has the method XCreatePixmapCursor to create a cursor from a pixmap with a color depth of 1. The foreground and background colors can be other than black and white, but there are only two colors.
Is there a way to create a multicolored cursor in X? | cursors | x | null | null | null | null | open | Multicolor cursor in X
===
X has the method XCreatePixmapCursor to create a cursor from a pixmap with a color depth of 1. The foreground and background colors can be other than black and white, but there are only two colors.
Is there a way to create a multicolored cursor in X? | 0 |
75,340 | 09/16/2008 18:18:03 | 13,320 | 09/16/2008 18:17:53 | 1 | 0 | XSLT processing in/from ruby | Can anyone recommend an efficient method to execute XSLT transforms of XML data within a Ruby application? The XSL gem (REXSL) is not available yet, and while I have seen a project or two that implement it, I'm wary of using them so early on. A friend had recommended a shell out call to Perl, but I'm worried about resources.
This is for a linux environment. | ruby | linux | xml | xslt | null | null | open | XSLT processing in/from ruby
===
Can anyone recommend an efficient method to execute XSLT transforms of XML data within a Ruby application? The XSL gem (REXSL) is not available yet, and while I have seen a project or two that implement it, I'm wary of using them so early on. A friend had recommended a shell out call to Perl, but I'm worried about resources.
This is for a linux environment. | 0 |
75,347 | 09/16/2008 18:18:37 | 2,357 | 08/21/2008 20:18:05 | 53 | 11 | execute an insert and then log in one sqlcommand | I've been asked to implement some code that will update a row in a database and then use a stored proc to insert the update in a history table. We can't add a stored proc to do this since we don't control the database. I know in sprocs you can do the update and then call execute on another stored proc. Can I set it up to do this in code using one sqlcommand? | sql | null | null | null | null | null | open | execute an insert and then log in one sqlcommand
===
I've been asked to implement some code that will update a row in a database and then use a stored proc to insert the update in a history table. We can't add a stored proc to do this since we don't control the database. I know in sprocs you can do the update and then call execute on another stored proc. Can I set it up to do this in code using one sqlcommand? | 0 |
75,361 | 09/16/2008 18:19:24 | 5,190 | 09/08/2008 12:03:43 | 1,670 | 107 | Force numerical order on a SQL Server 2005 varchar column, containing letters and numbers? | I have a column containing the strings 'Operator (1)' and so on until 'Operator (600)' so far.
I want to get them numerically ordered and I've come up with
select colname from table order by
cast(replace(replace(colname,'Operator (',''),')','') as int)
which is very very ugly.
Better suggestions? | sql | sql-server | ordering | null | null | null | open | Force numerical order on a SQL Server 2005 varchar column, containing letters and numbers?
===
I have a column containing the strings 'Operator (1)' and so on until 'Operator (600)' so far.
I want to get them numerically ordered and I've come up with
select colname from table order by
cast(replace(replace(colname,'Operator (',''),')','') as int)
which is very very ugly.
Better suggestions? | 0 |
75,379 | 09/16/2008 18:21:08 | 3,105 | 08/26/2008 17:00:01 | 79 | 8 | How to make embedded servlet engine instantiate servlets eagerly? | The problem is simple, but I'm struggling a bit already.
Server server = new Server(8080);
Context context = new Context(server, "/", Context.NO_SESSIONS);
context.addServlet(MainPageView.class, "/");
context.addServlet(UserView.class, "/signup");
server.start();
That's a pretty standard piece of code that you can find anywhere in Jetty world. I have an application that embeds Jetty as a servlet engine and has some servlets.
Instantiation of some of these servlets requires heavy work on startup. Say – reading additional config files, connecting to the database, etc. How can I make the servlet engine instantiate all servlets eagerly, so that I can do all the hard work upfront and not on the first user request? | java | servlets | jetty | null | null | null | open | How to make embedded servlet engine instantiate servlets eagerly?
===
The problem is simple, but I'm struggling a bit already.
Server server = new Server(8080);
Context context = new Context(server, "/", Context.NO_SESSIONS);
context.addServlet(MainPageView.class, "/");
context.addServlet(UserView.class, "/signup");
server.start();
That's a pretty standard piece of code that you can find anywhere in Jetty world. I have an application that embeds Jetty as a servlet engine and has some servlets.
Instantiation of some of these servlets requires heavy work on startup. Say – reading additional config files, connecting to the database, etc. How can I make the servlet engine instantiate all servlets eagerly, so that I can do all the hard work upfront and not on the first user request? | 0 |
75,385 | 09/16/2008 18:21:47 | 1,043 | 08/11/2008 18:08:32 | 1,481 | 57 | Make VS compiler catch signed/unsigned assignments? | The Visual Studio compiler does not seem to warn on signed/unsigned assignments, only on comparisons. For example the code below will generate a warning on the if statement but not the initial assignments.
Is there anyway to make it catch these? I'm already at W4 but thought (hoped) there may be another setting somewhere.
Thanks,
int foo(void)
{
unsigned int fooUnsigned = 0xffffffff;
int fooSigned = fooUnsigned; // no warning
if (fooSigned < fooUnsigned) // warning
{
return 0;
}
return fooSigned;
} | c | c++ | visual-studio | null | null | null | open | Make VS compiler catch signed/unsigned assignments?
===
The Visual Studio compiler does not seem to warn on signed/unsigned assignments, only on comparisons. For example the code below will generate a warning on the if statement but not the initial assignments.
Is there anyway to make it catch these? I'm already at W4 but thought (hoped) there may be another setting somewhere.
Thanks,
int foo(void)
{
unsigned int fooUnsigned = 0xffffffff;
int fooSigned = fooUnsigned; // no warning
if (fooSigned < fooUnsigned) // warning
{
return 0;
}
return fooSigned;
} | 0 |
75,386 | 09/16/2008 18:21:49 | 5,619 | 09/10/2008 14:56:48 | 65 | 3 | How quickly do you complete your projects, compared to what you thoght it would take? | I have recently been befuddled with comments regarding the speed at which some people claim to be able to develop various applications. I tend to feel that there is a definite relationship between application quality, reliability and speed of delivery.
I take Stackoverflow as a good example. I love the quality of the site, (and I think it's going to be the next big thing on the Inter-tubes), but I found it surprising (as did Jeff when he mentioned it on the podcast) that some people thought that they could code this whole site in a week or two. I have no doubt how hard Jeff and his team worked to develop this site into what it is today. And I don't blame them one bit for holding back the release date a couple weeks.
I find that these views about development permeate the developer landscape, thus leading to lower quality applications (ie. bug ridden, despite delivering on time). They also seem to undermine efforts to make sure that at least a certain level of quality is built into the code.
I am curious about everyone's views on this topic? Are people just too optimistic in their estimates? Are they exaggerating? | productivity | methodology | performance | estimation | null | null | open | How quickly do you complete your projects, compared to what you thoght it would take?
===
I have recently been befuddled with comments regarding the speed at which some people claim to be able to develop various applications. I tend to feel that there is a definite relationship between application quality, reliability and speed of delivery.
I take Stackoverflow as a good example. I love the quality of the site, (and I think it's going to be the next big thing on the Inter-tubes), but I found it surprising (as did Jeff when he mentioned it on the podcast) that some people thought that they could code this whole site in a week or two. I have no doubt how hard Jeff and his team worked to develop this site into what it is today. And I don't blame them one bit for holding back the release date a couple weeks.
I find that these views about development permeate the developer landscape, thus leading to lower quality applications (ie. bug ridden, despite delivering on time). They also seem to undermine efforts to make sure that at least a certain level of quality is built into the code.
I am curious about everyone's views on this topic? Are people just too optimistic in their estimates? Are they exaggerating? | 0 |
75,400 | 09/16/2008 18:23:28 | 9,531 | 09/15/2008 19:04:15 | 1 | 0 | NHibernate to not cache a property | How can I configure NHibernate to not cache a file. I know I can create a method that does an HSQL, but can I through a configuration setting in the <class>.xml file or the hibernate xml file itself to not cache a property?
Thanks in advance. | .net | nhibernate | caching | null | null | null | open | NHibernate to not cache a property
===
How can I configure NHibernate to not cache a file. I know I can create a method that does an HSQL, but can I through a configuration setting in the <class>.xml file or the hibernate xml file itself to not cache a property?
Thanks in advance. | 0 |
75,401 | 09/16/2008 18:23:45 | 13,332 | 09/16/2008 18:23:45 | 1 | 0 | Uses of "using" in C# | User [kokos][1] answered the wonderful [Hidden Features of C#][2] question by mentioning the **using** keyword. Can you elaborate on that? What are good uses of **using**?
[1]: http://stackoverflow.com/users/1065/kokos
[2]: http://stackoverflow.com/questions/9033/hidden-features-of-c | c# | using | null | null | null | null | open | Uses of "using" in C#
===
User [kokos][1] answered the wonderful [Hidden Features of C#][2] question by mentioning the **using** keyword. Can you elaborate on that? What are good uses of **using**?
[1]: http://stackoverflow.com/users/1065/kokos
[2]: http://stackoverflow.com/questions/9033/hidden-features-of-c | 0 |
75,411 | 09/16/2008 18:24:45 | 85 | 08/01/2008 16:38:08 | 266 | 12 | Deleting certain classes on running an external tool in eclipse? | I've set an external tool (sablecc) in eclipse (3.4) that generates a bunch of classes in the current project. I need to run this tool and regenerate these classes fairly frequently. This means that every time I want to run sablecc, I have to manually delete the packages/classes that sablecc creates in order to ensure that I don't have conflicts between the old and new generated classes. Is there some easy way to automate this from within eclipse or otherwise? | eclipse | sablecc | null | null | null | null | open | Deleting certain classes on running an external tool in eclipse?
===
I've set an external tool (sablecc) in eclipse (3.4) that generates a bunch of classes in the current project. I need to run this tool and regenerate these classes fairly frequently. This means that every time I want to run sablecc, I have to manually delete the packages/classes that sablecc creates in order to ensure that I don't have conflicts between the old and new generated classes. Is there some easy way to automate this from within eclipse or otherwise? | 0 |
75,428 | 09/16/2008 18:26:05 | 10,609 | 09/16/2008 00:22:27 | 1 | 0 | mmc could not create the snap in error when launching internet information services | I am getting this error when trying to run internet information services on a Virtual Machine running windows XP. Anyone have any idea?
| iis5 | null | null | null | null | null | open | mmc could not create the snap in error when launching internet information services
===
I am getting this error when trying to run internet information services on a Virtual Machine running windows XP. Anyone have any idea?
| 0 |
75,432 | 09/16/2008 18:26:15 | 8,761 | 09/15/2008 16:49:11 | 1 | 2 | How can I prevent URLDownloadToFile from retrieving from the cache ? | I am using URLDownloadToFile to retrieve a file from a website. Subsequent calls return the original file rather than an updated version. I assume it is retrieving a cached version.
| c++ | winapi | wininet | null | null | null | open | How can I prevent URLDownloadToFile from retrieving from the cache ?
===
I am using URLDownloadToFile to retrieve a file from a website. Subsequent calls return the original file rather than an updated version. I assume it is retrieving a cached version.
| 0 |
75,440 | 09/16/2008 18:26:47 | 8,453 | 09/15/2008 16:04:01 | 23 | 1 | How do I get the name of a python class as a string? | What method do I call to get the name of a class? | python | null | null | null | null | null | open | How do I get the name of a python class as a string?
===
What method do I call to get the name of a class? | 0 |
75,441 | 09/16/2008 18:26:50 | 8,088 | 09/15/2008 15:09:08 | 11 | 2 | Nant and changing file properties (read-only to writable) | As part of the Nant copy task, I would like to change the properties of the files in the target location. For instance make the files "read-write" from "read-only". How would I do this? | nant | null | null | null | null | null | open | Nant and changing file properties (read-only to writable)
===
As part of the Nant copy task, I would like to change the properties of the files in the target location. For instance make the files "read-write" from "read-only". How would I do this? | 0 |
75,463 | 09/16/2008 18:28:31 | 5,291 | 09/08/2008 21:37:17 | 62 | 1 | Hierarchical Group Permissions Theory/Resources? | Does anyone know of some good resources related to setting up heirarchical user account systems? I'm currently setting one up and am struggling with some of the more complex logic (especially with determining permissions). I was hoping I might be able to find some resources to help me along.
I'm building a user account system for a web CMS that allows for a nested group hierarchy. Each group can be allowed/denied access to read, write, add, and delete (either explicitly for that group, or implicitly by one of its parents). As if that weren't complicated enough, the system also allows for users to be members of multiple groups. -- This is where I'm stuck. I've got everything set up, but I'm struggling with the actual logic for determining pemissions for a given user. | theory | permissions | groups | user | null | null | open | Hierarchical Group Permissions Theory/Resources?
===
Does anyone know of some good resources related to setting up heirarchical user account systems? I'm currently setting one up and am struggling with some of the more complex logic (especially with determining permissions). I was hoping I might be able to find some resources to help me along.
I'm building a user account system for a web CMS that allows for a nested group hierarchy. Each group can be allowed/denied access to read, write, add, and delete (either explicitly for that group, or implicitly by one of its parents). As if that weren't complicated enough, the system also allows for users to be members of multiple groups. -- This is where I'm stuck. I've got everything set up, but I'm struggling with the actual logic for determining pemissions for a given user. | 0 |
75,479 | 09/16/2008 18:30:24 | 4,223 | 09/02/2008 12:31:58 | 2,097 | 81 | Eclipse RCP app fails to start | I have an Eclipse RCP app running on Java 6. When I try to run the product configuration from within Eclipse, it silently terminates almost immediately. No error is reported in the console. I've tried setting breakpoints in the IApplication and in the Activator, and neither are reached.
I know I don't have much specific information here, but can anyone give me any pointers on where I might start looking to diagnose the problem? | java | eclipse | rcp | null | null | null | open | Eclipse RCP app fails to start
===
I have an Eclipse RCP app running on Java 6. When I try to run the product configuration from within Eclipse, it silently terminates almost immediately. No error is reported in the console. I've tried setting breakpoints in the IApplication and in the Activator, and neither are reached.
I know I don't have much specific information here, but can anyone give me any pointers on where I might start looking to diagnose the problem? | 0 |
75,482 | 09/16/2008 18:30:41 | 9,594 | 09/15/2008 19:17:54 | 13 | 2 | How can I pre-compress files with mod_deflate in Apache 2.x? | I am serving all content through apache with `Content-Encoding: zip` but that compresses on the fly. A good amount of my content is static files on the disk. I want to gzip the files beforehand rather than compressing them every time they are requested.
This is something that, I believe, `mod_gzip` did in Apache 1.x automatically, but just having the file with .gz next to it. That's no longer the case with `mod_deflate`.
| apache | http | gzip | mod-deflate | content-encoding | null | open | How can I pre-compress files with mod_deflate in Apache 2.x?
===
I am serving all content through apache with `Content-Encoding: zip` but that compresses on the fly. A good amount of my content is static files on the disk. I want to gzip the files beforehand rather than compressing them every time they are requested.
This is something that, I believe, `mod_gzip` did in Apache 1.x automatically, but just having the file with .gz next to it. That's no longer the case with `mod_deflate`.
| 0 |
75,487 | 09/16/2008 18:31:22 | 5,777 | 09/11/2008 11:10:19 | 38 | 3 | What are the major new 'core' features of MS SQL Server 2008? | I'm looking mainly at things like new SQL syntax, new kinds of locking, new capabilities etc. Not so much in the surrounding services like data warehousing and reports... | sql-server | null | null | null | null | null | open | What are the major new 'core' features of MS SQL Server 2008?
===
I'm looking mainly at things like new SQL syntax, new kinds of locking, new capabilities etc. Not so much in the surrounding services like data warehousing and reports... | 0 |
75,489 | 09/16/2008 18:31:42 | 9,450 | 09/15/2008 18:50:47 | 149 | 16 | Formatting a long timestamp into a Date with JSTL | I am pulling a long timestamp from a database, but want to present it as a Date using Tags only, no embedded java in the JSP.<br><br> I've created my own tag to do this because I was unable to get the parseDate and formatDate tags to work, but that's not to say they don't work.<br>
<br>
Any advice?
Thanks. | java | jsp | jstl | null | null | null | open | Formatting a long timestamp into a Date with JSTL
===
I am pulling a long timestamp from a database, but want to present it as a Date using Tags only, no embedded java in the JSP.<br><br> I've created my own tag to do this because I was unable to get the parseDate and formatDate tags to work, but that's not to say they don't work.<br>
<br>
Any advice?
Thanks. | 0 |
75,495 | 09/16/2008 18:32:10 | 317 | 08/04/2008 15:43:28 | 428 | 20 | WPF UserControl Design Time Size | When creating a UserControl in WPF, I find it convenient to give it some arbitrary Height and Width values so that I can view my changes in the Visual Studio designer. When I run the control, however, I want the Height and Width to be undefined, so that the control will expand to fill whatever container I place it in. How can I acheive this same functionality without having to remove the Height and Width values before building my control? (Or without using DockPanel in the parent container.)
The following code demonstrates the problem:
<Window x:Class="ExampleApplication3.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:loc="clr-namespace:ExampleApplication3"
Title="Example" Height="600" Width="600">
<Grid Background="LightGray">
<loc:UserControl1 />
</Grid>
</Window>
The following definition of `UserControl1` displays reasonably at design time but displays as a fixed size at run time:
<UserControl x:Class="ExampleApplication3.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="300" Width="300">
<Grid Background="LightCyan" />
</UserControl>
The following definition of `UserControl1` displays as a dot at design time but expands to fill the parent `Window1` at run time:
<UserControl x:Class="ExampleApplication3.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid Background="LightCyan" />
</UserControl>
| wpf | null | null | null | null | null | open | WPF UserControl Design Time Size
===
When creating a UserControl in WPF, I find it convenient to give it some arbitrary Height and Width values so that I can view my changes in the Visual Studio designer. When I run the control, however, I want the Height and Width to be undefined, so that the control will expand to fill whatever container I place it in. How can I acheive this same functionality without having to remove the Height and Width values before building my control? (Or without using DockPanel in the parent container.)
The following code demonstrates the problem:
<Window x:Class="ExampleApplication3.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:loc="clr-namespace:ExampleApplication3"
Title="Example" Height="600" Width="600">
<Grid Background="LightGray">
<loc:UserControl1 />
</Grid>
</Window>
The following definition of `UserControl1` displays reasonably at design time but displays as a fixed size at run time:
<UserControl x:Class="ExampleApplication3.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="300" Width="300">
<Grid Background="LightCyan" />
</UserControl>
The following definition of `UserControl1` displays as a dot at design time but expands to fill the parent `Window1` at run time:
<UserControl x:Class="ExampleApplication3.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid Background="LightCyan" />
</UserControl>
| 0 |
75,500 | 09/16/2008 18:32:44 | 260 | 08/04/2008 08:21:41 | 119 | 12 | Best way to convert pdf files to tiff files | I have around 1000 pdf filesand I need to convert them to 300 dpi tiff files. What is the best way to do this? If there is an SDK or something or a tool that can be scripted that would be ideal. | pdf | image | tiff | null | null | null | open | Best way to convert pdf files to tiff files
===
I have around 1000 pdf filesand I need to convert them to 300 dpi tiff files. What is the best way to do this? If there is an SDK or something or a tool that can be scripted that would be ideal. | 0 |
75,508 | 09/16/2008 18:34:08 | 11,950 | 09/16/2008 12:34:32 | 3 | 1 | Trying to convert bunch of jpegs into a movie | I have 28,000 images I need to convert into a movie.
I tried
mencoder mf://*.jpg -mf w=640:h=480:fps=30:type=jpg -ovc lavc -lavcopts vcodec=msmpeg4v2 -nosound -o ../output-msmpeg4v2.avi
But it seems to crap out at 7500 frames.
The files are named
webcam_2007-04-16_070804.jpg
webcam_2007-04-16_071004.jpg
webcam_2007-04-16_071204.jpg
webcam_2007-04-16_071404.jpg
Up to march 2008 or so.
Is there another way I can pass the filenames to mencoder so it doesn't stop part way?
MEncoder 2:1.0~rc2-0ubuntu13 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (Family: 15, Model: 2, Stepping: 7)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 16 data: 0x0 - 0x0
MF file format detected.
[mf] search expr: *.jpg
[mf] number of files: 28617 (114468)
VIDEO: [IJPG] 640x480 24bpp 30.000 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:16 fourcc:0x47504A49 size:640x480 fps:30.00 ftime:=0.0333
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder)
==========================================================================
VDec: vo config request - 640 x 480 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 3)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
videocodec: libavcodec (640x480 fourcc=3234504d [MP42])
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Pos: 251.3s 7539f ( 0%) 47.56fps Trem: 0min 0mb A-V:0.000 [1202:0]
Flushing video frames.
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Video stream: 1202.480 kbit/s (150310 B/s) size: 37772908 bytes 251.300 secs 7539 frames
| video | encoding | null | null | null | null | open | Trying to convert bunch of jpegs into a movie
===
I have 28,000 images I need to convert into a movie.
I tried
mencoder mf://*.jpg -mf w=640:h=480:fps=30:type=jpg -ovc lavc -lavcopts vcodec=msmpeg4v2 -nosound -o ../output-msmpeg4v2.avi
But it seems to crap out at 7500 frames.
The files are named
webcam_2007-04-16_070804.jpg
webcam_2007-04-16_071004.jpg
webcam_2007-04-16_071204.jpg
webcam_2007-04-16_071404.jpg
Up to march 2008 or so.
Is there another way I can pass the filenames to mencoder so it doesn't stop part way?
MEncoder 2:1.0~rc2-0ubuntu13 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (Family: 15, Model: 2, Stepping: 7)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 16 data: 0x0 - 0x0
MF file format detected.
[mf] search expr: *.jpg
[mf] number of files: 28617 (114468)
VIDEO: [IJPG] 640x480 24bpp 30.000 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:16 fourcc:0x47504A49 size:640x480 fps:30.00 ftime:=0.0333
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder)
==========================================================================
VDec: vo config request - 640 x 480 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 3)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
videocodec: libavcodec (640x480 fourcc=3234504d [MP42])
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Pos: 251.3s 7539f ( 0%) 47.56fps Trem: 0min 0mb A-V:0.000 [1202:0]
Flushing video frames.
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Video stream: 1202.480 kbit/s (150310 B/s) size: 37772908 bytes 251.300 secs 7539 frames
| 0 |
75,525 | 09/16/2008 18:35:59 | 13,211 | 09/16/2008 17:39:08 | 11 | 2 | Form library | Zend_Form has a few problems for my use cases.
HTML_QuickForm2 looks dead (frozen in alpha for almost a year).
What is a good standalone alternative to these? | php | forms | null | null | null | null | open | Form library
===
Zend_Form has a few problems for my use cases.
HTML_QuickForm2 looks dead (frozen in alpha for almost a year).
What is a good standalone alternative to these? | 0 |
75,526 | 09/16/2008 18:36:01 | 13,281 | 09/16/2008 18:02:24 | 1 | 1 | What are the key components of web accessibility? | I understand that some countries have laws regarding website accessibility. In general, what are the minimum requirements that a website must meet to be accessible, regardless of country? | accessibility | null | null | null | null | null | open | What are the key components of web accessibility?
===
I understand that some countries have laws regarding website accessibility. In general, what are the minimum requirements that a website must meet to be accessible, regardless of country? | 0 |
75,529 | 09/16/2008 18:36:18 | 11,889 | 09/16/2008 12:05:22 | 1 | 4 | What are the best anti-code sites? | What are the best anti-code sites that people have found? What I mean by "anti-code" is websites, books, blogs, etc. that describe or explain bad code with the tongue-in-cheek goal of showing us what we should not do. (I made up the phase anti-code for lack of a better term.)
These are the sites I'm familiar with:
- [How to write unmaintainable code](http://mindprod.com/jgloss/unmain.html)
- [Refuctoring](http://www.waterfall2006.com/gorman.html)
- [Anti-patterns](http://www.antipatterns.com/)
- [The Daily WTF](http://thedailywtf.com/)
I'm sure there are others? I'm not asking just to get laughs; I often find that seeing "just how far down the rabbit hole goes" is a better instructor and stronger argument for good development. | language-agnostic | fun | null | null | null | 08/01/2012 02:38:48 | not constructive | What are the best anti-code sites?
===
What are the best anti-code sites that people have found? What I mean by "anti-code" is websites, books, blogs, etc. that describe or explain bad code with the tongue-in-cheek goal of showing us what we should not do. (I made up the phase anti-code for lack of a better term.)
These are the sites I'm familiar with:
- [How to write unmaintainable code](http://mindprod.com/jgloss/unmain.html)
- [Refuctoring](http://www.waterfall2006.com/gorman.html)
- [Anti-patterns](http://www.antipatterns.com/)
- [The Daily WTF](http://thedailywtf.com/)
I'm sure there are others? I'm not asking just to get laughs; I often find that seeing "just how far down the rabbit hole goes" is a better instructor and stronger argument for good development. | 4 |
75,533 | 09/16/2008 18:36:41 | 8,913 | 09/15/2008 17:12:49 | 1 | 0 | Better terminal in Mac OS X -- reversing the control and command key-mappings | I'm trying to have the same KDE Konsole experience within Mac OS X.
Here's my (overly complicated?) setup:
- I have Control and Command swapped at the System Preferences level. (Can't live without this)
- Parallels lets you, at the Parallels application level, also reverse Control and Command. So I can undo the System Preferences setting (and get the setup I want within virtual Linux)
I want this same per-application-opt-out for the Mac OS X Terminal app. Is it possible? | osx | terminal | null | null | null | null | open | Better terminal in Mac OS X -- reversing the control and command key-mappings
===
I'm trying to have the same KDE Konsole experience within Mac OS X.
Here's my (overly complicated?) setup:
- I have Control and Command swapped at the System Preferences level. (Can't live without this)
- Parallels lets you, at the Parallels application level, also reverse Control and Command. So I can undo the System Preferences setting (and get the setup I want within virtual Linux)
I want this same per-application-opt-out for the Mac OS X Terminal app. Is it possible? | 0 |
75,538 | 09/16/2008 18:37:05 | 2,328 | 08/21/2008 16:45:54 | 748 | 35 | Hidden Features of C++ | No C++ love when it comes to the "hidden features of" line of questions? Figured I would throw it out there. What are some of the hidden features of C++? | c++ | null | null | null | null | 02/29/2012 16:53:12 | not constructive | Hidden Features of C++
===
No C++ love when it comes to the "hidden features of" line of questions? Figured I would throw it out there. What are some of the hidden features of C++? | 4 |
75,546 | 09/16/2008 18:37:32 | 2,729 | 08/24/2008 18:30:56 | 409 | 19 | Initializing user.config or app.exe.config during install | I am developing a .NET WinForms application which relies on user.config to store various useful settings such as intranet web service URLs. We would like to make it possible to import custom initial settings as part of the installation. The use case for this is if a company has 100 machines they want to install the software on, and they should all have a reference to the intranet web service in question, this should not need to be set up manually on all the machines.
We are currently using a VS2008 setup project to generate the install package.
Our idea so far has been to enable the installer to make a custom initial .config file with the information (from a template), and then put that in place instead of the default one that the setup project installs.
However, I can't see a way to do this other than these few:
1. Hardcode the executable name into a custom installer action (deriving from System.Configuration.Install.Installer), in order to use the ConfigurationManager class to determine the .config file path. This would require manual changes to the installer if the executable name changes.
2. Roll our own configuration classes or file/folder hierarchy to store the settings. This would basically bar us from the advantages of the isolation mechanism (which is also the obstacle here) that .NET provides, if I understand correctly.
Does anyone know of any alternatives, or of ways to make the above two palatable?
If it comes down to the wire, at this point I plan to opt for #1 above. | .net | deployment | configurationfiles | null | null | null | open | Initializing user.config or app.exe.config during install
===
I am developing a .NET WinForms application which relies on user.config to store various useful settings such as intranet web service URLs. We would like to make it possible to import custom initial settings as part of the installation. The use case for this is if a company has 100 machines they want to install the software on, and they should all have a reference to the intranet web service in question, this should not need to be set up manually on all the machines.
We are currently using a VS2008 setup project to generate the install package.
Our idea so far has been to enable the installer to make a custom initial .config file with the information (from a template), and then put that in place instead of the default one that the setup project installs.
However, I can't see a way to do this other than these few:
1. Hardcode the executable name into a custom installer action (deriving from System.Configuration.Install.Installer), in order to use the ConfigurationManager class to determine the .config file path. This would require manual changes to the installer if the executable name changes.
2. Roll our own configuration classes or file/folder hierarchy to store the settings. This would basically bar us from the advantages of the isolation mechanism (which is also the obstacle here) that .NET provides, if I understand correctly.
Does anyone know of any alternatives, or of ways to make the above two palatable?
If it comes down to the wire, at this point I plan to opt for #1 above. | 0 |
75,564 | 09/16/2008 18:39:34 | 11,206 | 09/16/2008 06:10:28 | 250 | 32 | What is your favorite low-level profiling tool? | Its not uncommon that I have a program whose performance relies heavily on just a few functions and I want to be able to measure a single loop or code segment's speed down to single-clock precision so that I know whether my changes are actually improving performance or whether I'm just falling for the placebo of "optimized" code.
I personally find myself using ffmpeg's ["bench.h"][1], a set of C macros that use rdtsc to measure clock time and automatically compensates for context switches and similar. Of course, this approach has its own weaknesses; what other low-level profiling methods do StackOverflow users like?
[1]: http://pastebin.com/f38ba0fa9 | performance | optimization | profiling | null | null | null | open | What is your favorite low-level profiling tool?
===
Its not uncommon that I have a program whose performance relies heavily on just a few functions and I want to be able to measure a single loop or code segment's speed down to single-clock precision so that I know whether my changes are actually improving performance or whether I'm just falling for the placebo of "optimized" code.
I personally find myself using ffmpeg's ["bench.h"][1], a set of C macros that use rdtsc to measure clock time and automatically compensates for context switches and similar. Of course, this approach has its own weaknesses; what other low-level profiling methods do StackOverflow users like?
[1]: http://pastebin.com/f38ba0fa9 | 0 |
75,577 | 09/16/2008 18:41:04 | 13,378 | 09/16/2008 18:41:03 | 1 | 0 | Databinding ApplicationSettings to Custom Components | I have a custom component where I have implemented
INotifyPropertyChanged and IBindableComponent.
However, when I try to databind a property, the designer adds this
line:
this.component11.TestString =
global::WindowsFormsApplication2.Properties.Settings.Default.Setting;
instead of creating a binding as it does with a TextBox:
this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding(
"Text",
global::WindowsFormsApplication2.Properties.Settings.Default,
"Setting2",
true,
System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
I would have thought the designer would simply look to see if
IBindableComponent is implemented and if it is, generate the binding
coding instead of the assignment code.
Any ideas why this works with a textbox and not my custom component?
Thanks in advance,
Clint
Here is my custom component:
public partial class Component1 : Component, INotifyPropertyChanged, IBindableComponent
{
public Component1()
{
InitializeComponent();
}
public Component1(IContainer container)
{
container.Add(this);
InitializeComponent();
}
private string teststring;
[Bindable(true)]
public string TestString
{
get
{
return teststring;
}
set
{
if (teststring != value)
{
teststring = value;
FirePropertyChanged("TestString");
}
}
}
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
void FirePropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
#endregion
#region IBindableComponent Members
private BindingContext bindingContext = null;
public BindingContext BindingContext
{
get
{
if (null == bindingContext)
{
bindingContext = new BindingContext();
}
return bindingContext;
}
set { bindingContext = value; }
}
private ControlBindingsCollection databindings;
public ControlBindingsCollection DataBindings
{
get
{
if (null == databindings)
{
databindings = new ControlBindingsCollection(this);
}
return databindings;
}
set { databindings = value; }
}
#endregion
}
| c# | data-binding | custom-component | null | null | null | open | Databinding ApplicationSettings to Custom Components
===
I have a custom component where I have implemented
INotifyPropertyChanged and IBindableComponent.
However, when I try to databind a property, the designer adds this
line:
this.component11.TestString =
global::WindowsFormsApplication2.Properties.Settings.Default.Setting;
instead of creating a binding as it does with a TextBox:
this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding(
"Text",
global::WindowsFormsApplication2.Properties.Settings.Default,
"Setting2",
true,
System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
I would have thought the designer would simply look to see if
IBindableComponent is implemented and if it is, generate the binding
coding instead of the assignment code.
Any ideas why this works with a textbox and not my custom component?
Thanks in advance,
Clint
Here is my custom component:
public partial class Component1 : Component, INotifyPropertyChanged, IBindableComponent
{
public Component1()
{
InitializeComponent();
}
public Component1(IContainer container)
{
container.Add(this);
InitializeComponent();
}
private string teststring;
[Bindable(true)]
public string TestString
{
get
{
return teststring;
}
set
{
if (teststring != value)
{
teststring = value;
FirePropertyChanged("TestString");
}
}
}
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
void FirePropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
#endregion
#region IBindableComponent Members
private BindingContext bindingContext = null;
public BindingContext BindingContext
{
get
{
if (null == bindingContext)
{
bindingContext = new BindingContext();
}
return bindingContext;
}
set { bindingContext = value; }
}
private ControlBindingsCollection databindings;
public ControlBindingsCollection DataBindings
{
get
{
if (null == databindings)
{
databindings = new ControlBindingsCollection(this);
}
return databindings;
}
set { databindings = value; }
}
#endregion
}
| 0 |
75,608 | 09/16/2008 18:44:22 | 5,287 | 09/08/2008 21:29:47 | 164 | 20 | Serializing SQL CE data to XML | I'm working on a product feature that will allow the user to export data from a SQL CE database on one copy of my application and re-import it into SQL CE on the other end. This data is not whole tables, but the result of queries.
I had hoped to take advantage of .net's built-in XML-based serialization like in DataTable.WriteXML. But, none of the methods for executing queries against a SqlCeCommand provide an obvious way of serializing to XML or extracting a DataTable, which could provide the method.
Is there something I'm missing? Do I have to write my own serialization-deserialization methods or is there a built-in way. | .net | xml | .net-2.0 | sql-server-ce | null | null | open | Serializing SQL CE data to XML
===
I'm working on a product feature that will allow the user to export data from a SQL CE database on one copy of my application and re-import it into SQL CE on the other end. This data is not whole tables, but the result of queries.
I had hoped to take advantage of .net's built-in XML-based serialization like in DataTable.WriteXML. But, none of the methods for executing queries against a SqlCeCommand provide an obvious way of serializing to XML or extracting a DataTable, which could provide the method.
Is there something I'm missing? Do I have to write my own serialization-deserialization methods or is there a built-in way. | 0 |
75,614 | 09/16/2008 18:44:55 | 8,782 | 09/15/2008 16:51:52 | 1 | 0 | Using Lock pages in memory without being Administrator on Windows Vista and 2008 Server | The following question answers how you get large memory pages on Windows "[how do i run my app with large pages in windows][1]".
The problem I'm trying to solve is how do I configure it on Vista and 2008 Server.
Normally you just allow a specific user to lock pages in memory and you are done. However on Vista and 2008 this only works if you are using the Administrator account, it doesn't help if the user is actually part of the Administrators group. All other users always get an 1300 error code stating that some rights are missing.
Anyone have a clue of what else needs to be configured?
Thanks,
Staffan
[1]: http://stackoverflow.com/questions/39059/how-do-i-run-my-app-with-large-pages-in-windows | windows | null | null | null | null | null | open | Using Lock pages in memory without being Administrator on Windows Vista and 2008 Server
===
The following question answers how you get large memory pages on Windows "[how do i run my app with large pages in windows][1]".
The problem I'm trying to solve is how do I configure it on Vista and 2008 Server.
Normally you just allow a specific user to lock pages in memory and you are done. However on Vista and 2008 this only works if you are using the Administrator account, it doesn't help if the user is actually part of the Administrators group. All other users always get an 1300 error code stating that some rights are missing.
Anyone have a clue of what else needs to be configured?
Thanks,
Staffan
[1]: http://stackoverflow.com/questions/39059/how-do-i-run-my-app-with-large-pages-in-windows | 0 |
75,621 | 09/16/2008 18:45:34 | 8,247 | 09/15/2008 15:31:19 | 1 | 1 | How to use form values from an unbound form | I have a web report that uses a Django form (new forms) for fields that control the query used to generate the report (start date, end date, ...). The issue I'm having is that the page should work using the form's initial values (unbound), but I can't access the cleaned_data field unless I call is_valid(). But is_valid() always fails on unbound forms.
It seems like Django's forms were designed with the use case of editing data such that an unbound form isn't really useful for anything other than displaying HTML.
For example, if I have:
if request.method == 'GET':
form = MyForm()
else:
form = MyForm(request.method.POST)
if form.is_valid():
do_query(form.cleaned_data['start_date'], form.cleaned_data['end_date'])
is_valid() will fail if this is a GET (since it's unbound), and if I do:
if request.method == 'GET':
form = MyForm()
do_query(form.cleaned_data['start_date'], form.cleaned_data['end_date'])
else:
form = MyForm(request.method.POST)
if form.is_valid():
do_query(form.cleaned_data['start_date'], form.cleaned_data['end_date'])
the first call to do_query triggers exceptions on form.cleaned_data, which is not a valid field because is_valid() has not been called. It seems like I have to do something like:
if request.method == 'GET':
form = MyForm()
do_query(form['start_date'].field.initial, form['end_date'].field.initial)
else:
form = MyForm(request.method.POST)
if form.is_valid():
do_query(form.cleaned_data['start_date'], form.cleaned_data['end_date'])
that is, there isn't a common interface for retrieving the form's values between a bound form and an unbound one.
Does anyone see a cleaner way to do this?
| python | django | null | null | null | null | open | How to use form values from an unbound form
===
I have a web report that uses a Django form (new forms) for fields that control the query used to generate the report (start date, end date, ...). The issue I'm having is that the page should work using the form's initial values (unbound), but I can't access the cleaned_data field unless I call is_valid(). But is_valid() always fails on unbound forms.
It seems like Django's forms were designed with the use case of editing data such that an unbound form isn't really useful for anything other than displaying HTML.
For example, if I have:
if request.method == 'GET':
form = MyForm()
else:
form = MyForm(request.method.POST)
if form.is_valid():
do_query(form.cleaned_data['start_date'], form.cleaned_data['end_date'])
is_valid() will fail if this is a GET (since it's unbound), and if I do:
if request.method == 'GET':
form = MyForm()
do_query(form.cleaned_data['start_date'], form.cleaned_data['end_date'])
else:
form = MyForm(request.method.POST)
if form.is_valid():
do_query(form.cleaned_data['start_date'], form.cleaned_data['end_date'])
the first call to do_query triggers exceptions on form.cleaned_data, which is not a valid field because is_valid() has not been called. It seems like I have to do something like:
if request.method == 'GET':
form = MyForm()
do_query(form['start_date'].field.initial, form['end_date'].field.initial)
else:
form = MyForm(request.method.POST)
if form.is_valid():
do_query(form.cleaned_data['start_date'], form.cleaned_data['end_date'])
that is, there isn't a common interface for retrieving the form's values between a bound form and an unbound one.
Does anyone see a cleaner way to do this?
| 0 |
75,626 | 09/16/2008 18:46:07 | 13,393 | 09/16/2008 18:46:07 | 1 | 0 | How do i pass an object to a JSP tag | I have a JSP page that contains a scriplet where i instantiate an object. I would like to pass that object into the JSP tag without using any cache.
For example i would like to accomplish this:
<%@ taglib prefix="wf" uri="JspCustomTag" %>
<%
Object myObject = new Object();
%>
<wf:my-tag obj=myObject />
I'm trying to avoid directly interacting with any of the caches (page, session, servletcontext), i would rather have my tag handle that. | jsp-tags | jsp | null | null | null | null | open | How do i pass an object to a JSP tag
===
I have a JSP page that contains a scriplet where i instantiate an object. I would like to pass that object into the JSP tag without using any cache.
For example i would like to accomplish this:
<%@ taglib prefix="wf" uri="JspCustomTag" %>
<%
Object myObject = new Object();
%>
<wf:my-tag obj=myObject />
I'm trying to avoid directly interacting with any of the caches (page, session, servletcontext), i would rather have my tag handle that. | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.