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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
67,009 | 09/15/2008 21:10:36 | 260 | 08/04/2008 08:21:41 | 103 | 7 | google maps traffic info | Google maps in some region can serve traffic information showing the blocked roads and so on. I was wondering if there is any code example demonstrating how can I serve traffice information for my own region. | google-maps | null | null | null | null | null | open | google maps traffic info
===
Google maps in some region can serve traffic information showing the blocked roads and so on. I was wondering if there is any code example demonstrating how can I serve traffice information for my own region. | 0 |
67,021 | 09/15/2008 21:12:17 | 6,681 | 09/15/2008 12:29:11 | 77 | 2 | How do I export the Bazaar history of a subfolder | I'm coding a framework along with a project which uses this framework. The project is a Bazaar repository, with the framework in a subfolder below the project.
I want to give the framework a Bazaar repository of its own. How do I do it? | bazaar | null | null | null | null | null | open | How do I export the Bazaar history of a subfolder
===
I'm coding a framework along with a project which uses this framework. The project is a Bazaar repository, with the framework in a subfolder below the project.
I want to give the framework a Bazaar repository of its own. How do I do it? | 0 |
67,029 | 09/15/2008 21:13:04 | 260 | 08/04/2008 08:21:41 | 103 | 7 | google maps providing directions in local language | I noticed that google maps is providing directions in my local language (hungarian) when I am using google chrome, but english language directions when I am using it from ie. I would like to know how chrome figures this out and how can I write code that is always returning directions on the user's language. | google-maps | null | null | null | null | null | open | google maps providing directions in local language
===
I noticed that google maps is providing directions in my local language (hungarian) when I am using google chrome, but english language directions when I am using it from ie. I would like to know how chrome figures this out and how can I write code that is always returning directions on the user's language. | 0 |
67,052 | 09/15/2008 21:16:39 | 8,509 | 09/15/2008 16:11:39 | 56 | 1 | Do you prefer Analog or Digital Issue Management? | Do you prefer **digital** issue management software (FogBugz, Sharepoint, etc) or **analog** workflows (recipe cards, white boards, etc) ? | bug-tracking | null | null | null | null | 10/05/2011 13:37:53 | not constructive | Do you prefer Analog or Digital Issue Management?
===
Do you prefer **digital** issue management software (FogBugz, Sharepoint, etc) or **analog** workflows (recipe cards, white boards, etc) ? | 4 |
67,056 | 09/15/2008 21:16:58 | 260 | 08/04/2008 08:21:41 | 103 | 7 | best library to do web-scraping | I would like to get data from from different webpages such as addresses of restaurants or dates of different events for a given location and so on. What is the best library I can use for extracting this data from a given set of sites? | language-agnostic | class-library | spider | null | null | null | open | best library to do web-scraping
===
I would like to get data from from different webpages such as addresses of restaurants or dates of different events for a given location and so on. What is the best library I can use for extracting this data from a given set of sites? | 0 |
67,063 | 09/15/2008 21:18:22 | 10,088 | 09/15/2008 21:09:09 | 1 | 1 | Convention question: When do you use a Getter/Setter function rather than using a Property | It strikes me that Properties in C# should be use when trying to manipulate a field in the class. But when there's complex calculations or database involved, we should use a getter/setter.
Is this correct?
When do you use s/getter over properties? | c# | null | null | null | null | null | open | Convention question: When do you use a Getter/Setter function rather than using a Property
===
It strikes me that Properties in C# should be use when trying to manipulate a field in the class. But when there's complex calculations or database involved, we should use a getter/setter.
Is this correct?
When do you use s/getter over properties? | 0 |
67,069 | 09/15/2008 21:19:03 | 1,444 | 08/15/2008 16:02:54 | 1 | 3 | How to actually use a source control system? | So I get that most of you are frowning at me for not currently using any source control. I want to, I really do, now that I've spent some time reading the questions / answers here. I am a hobby programmer and really don't do much more than tinker, but I've been bitten a couple of times now not having the 'time machine' handy...
I still have to decide which product I'll go with, but that's not relevant to this question.
I'm really struggling with the flow of files under source control, so much so I'm not even sure how to pose the question sensibly.
Currently I have a directory hierarchy where all my PHP files live. I edit them there and can hit refresh on my browser to see what happens.
As I understand it, my files now live in a different place. When I want to edit, I check it out and edit away. But what is my substitute for F5? How do I test it? Do I have to check it back in, then hit F5? I admit to a good bit of trial and error in my work. I suspect I'm going to get tired of checking in and out real quick for the frequent small changes I tend to make. I have to be missing something, right?
Can anyone step me through where everything lives and how I test along the way, while keeping true to the goal of having a 'time machine' handy?
| version-control | null | null | null | null | null | open | How to actually use a source control system?
===
So I get that most of you are frowning at me for not currently using any source control. I want to, I really do, now that I've spent some time reading the questions / answers here. I am a hobby programmer and really don't do much more than tinker, but I've been bitten a couple of times now not having the 'time machine' handy...
I still have to decide which product I'll go with, but that's not relevant to this question.
I'm really struggling with the flow of files under source control, so much so I'm not even sure how to pose the question sensibly.
Currently I have a directory hierarchy where all my PHP files live. I edit them there and can hit refresh on my browser to see what happens.
As I understand it, my files now live in a different place. When I want to edit, I check it out and edit away. But what is my substitute for F5? How do I test it? Do I have to check it back in, then hit F5? I admit to a good bit of trial and error in my work. I suspect I'm going to get tired of checking in and out real quick for the frequent small changes I tend to make. I have to be missing something, right?
Can anyone step me through where everything lives and how I test along the way, while keeping true to the goal of having a 'time machine' handy?
| 0 |
67,082 | 09/15/2008 21:20:26 | 9,107 | 09/15/2008 17:44:35 | 19 | 3 | What is the best epoll/kqueue/select equvalient on Windows? | What is Windows' best I/O event notification facility?
By best I mean something that ...
1. doesn't have a limit on number of input file descriptors
2. works on all file descriptors (disk files, sockets, ...)
3. provides various notification modes (edge triggered, limit triggered)
| windows | api | io | sdk | epoll | null | open | What is the best epoll/kqueue/select equvalient on Windows?
===
What is Windows' best I/O event notification facility?
By best I mean something that ...
1. doesn't have a limit on number of input file descriptors
2. works on all file descriptors (disk files, sockets, ...)
3. provides various notification modes (edge triggered, limit triggered)
| 0 |
67,093 | 09/15/2008 21:22:00 | 556 | 08/06/2008 16:48:23 | 1,032 | 12 | How do I quickly rename a mysql database (change schema name)? | Usually I just dump the database and reimport it with a new name. This is not an option for very big databases. Apparently RENAME {DATABASE | SCHEMA} db_name TO new_db_name; <a href="http://dev.mysql.com/doc/refman/5.1/en/rename-database.html">does bad things, exist only in a handful of versions, and is a bad idea overall</a>. | mysql | null | null | null | null | null | open | How do I quickly rename a mysql database (change schema name)?
===
Usually I just dump the database and reimport it with a new name. This is not an option for very big databases. Apparently RENAME {DATABASE | SCHEMA} db_name TO new_db_name; <a href="http://dev.mysql.com/doc/refman/5.1/en/rename-database.html">does bad things, exist only in a handful of versions, and is a bad idea overall</a>. | 0 |
67,103 | 09/15/2008 21:22:52 | 4,872 | 09/06/2008 09:14:55 | 394 | 10 | What is the best way to improve performance of NHibernate? | I have an application that uses NHibernate as its ORM and sometimes it experiences performance issues due to how the data is being accessed by it. What kind of things can be done to improve the performance of NHibernate? (Please limit to one recommendation per answer)
| .net | nhibernate | orm | data-access-layer | null | null | open | What is the best way to improve performance of NHibernate?
===
I have an application that uses NHibernate as its ORM and sometimes it experiences performance issues due to how the data is being accessed by it. What kind of things can be done to improve the performance of NHibernate? (Please limit to one recommendation per answer)
| 0 |
67,104 | 09/15/2008 21:22:54 | 7,236 | 09/15/2008 13:23:44 | 1 | 0 | Is Asp.net and Windows Workflow good combination? | I am implementing a quite simple state-machine order processing application. It is a e-commerce application with a few twists. The users of the application will not be editing workflows by themselves.
Microsoft claims that asp.net and Windows Workflow is possible to combine. How hard is it to install and maintain a combination of asp.net and Windows Workflow? I would be keeping the workflow state in sql-server.
Is it easier for me to roll my own state machine code or is Windows Workflow the right tool for the job?
| asp.net | workflow | null | null | null | null | open | Is Asp.net and Windows Workflow good combination?
===
I am implementing a quite simple state-machine order processing application. It is a e-commerce application with a few twists. The users of the application will not be editing workflows by themselves.
Microsoft claims that asp.net and Windows Workflow is possible to combine. How hard is it to install and maintain a combination of asp.net and Windows Workflow? I would be keeping the workflow state in sql-server.
Is it easier for me to roll my own state machine code or is Windows Workflow the right tool for the job?
| 0 |
67,117 | 09/15/2008 21:23:51 | 556 | 08/06/2008 16:48:23 | 1,032 | 12 | Do you have any tips and tricks for speeding up mysql dumps and imports? | This would include my.cnf settings, using ramdisks, etc. | mysql | null | null | null | null | 01/07/2012 03:53:41 | not constructive | Do you have any tips and tricks for speeding up mysql dumps and imports?
===
This would include my.cnf settings, using ramdisks, etc. | 4 |
67,125 | 09/15/2008 21:24:40 | 381 | 08/05/2008 10:39:26 | 2,558 | 35 | What is cURL good for ? | What's the single best use you've put [cURL](http://curl.haxx.se/) to ? | automation | curl | null | null | null | 04/20/2012 15:20:08 | not constructive | What is cURL good for ?
===
What's the single best use you've put [cURL](http://curl.haxx.se/) to ? | 4 |
67,127 | 09/15/2008 21:24:50 | 1,133 | 08/12/2008 17:34:48 | 170 | 11 | Database functionality with WPF app: SQLite, SQL CE, other? | I want to extend a WPF application with database functionality. Which database engine would you suggest and why? SQLite, SQL CE, other? | wpf | sqlite | sql-server-ce | null | null | null | open | Database functionality with WPF app: SQLite, SQL CE, other?
===
I want to extend a WPF application with database functionality. Which database engine would you suggest and why? SQLite, SQL CE, other? | 0 |
67,141 | 09/15/2008 21:26:02 | 7,754 | 09/15/2008 14:21:17 | 102 | 16 | Using Rails 2.x with MS SQL Server 2005 | Does anybody here have positive experience of working with MS SQL Server 2005 from Rails 2.x?
Our developers use MacOSX, and our production runs on Linux. For legacy reasons we should use MS SQL Server 2005.
We're using ruby-odbc and are running into various problems, too depressing to list here. I get an impression that we're doing something wrong.
I'm talking about the no-compromise usage, that is, with migrations and all.
Thank you, | ruby-on-rails | mssql | odbc | null | null | null | open | Using Rails 2.x with MS SQL Server 2005
===
Does anybody here have positive experience of working with MS SQL Server 2005 from Rails 2.x?
Our developers use MacOSX, and our production runs on Linux. For legacy reasons we should use MS SQL Server 2005.
We're using ruby-odbc and are running into various problems, too depressing to list here. I get an impression that we're doing something wrong.
I'm talking about the no-compromise usage, that is, with migrations and all.
Thank you, | 0 |
67,151 | 09/15/2008 21:26:33 | 10,119 | 09/15/2008 21:17:45 | 1 | 0 | How can one host Flash content in a WPF application and use transparency? | How can I go about hosting flash content inside a WPF form and still use transparency/alpha on my WPF window? Hosting a WinForms flash controls does not allow this. | wpf | flash | null | null | null | null | open | How can one host Flash content in a WPF application and use transparency?
===
How can I go about hosting flash content inside a WPF form and still use transparency/alpha on my WPF window? Hosting a WinForms flash controls does not allow this. | 0 |
67,154 | 09/15/2008 21:27:03 | 407,138 | 09/15/2008 17:20:10 | 1 | 0 | Is it safe to manipulate objects that i created outside my thread if i don't explicitly access them on the thread which created them? | I am working on a cocoa software and in order to keep the GUI responsive during a massive data import ( CoreData ) i need to run the import outside the main thread.
Is it safe to access those objects even if I created them in the main thread without using locks **if** I don't explicitly access those objects while the thread is running. | osx | cocoa | multithreading | core-data | nsthread | null | open | Is it safe to manipulate objects that i created outside my thread if i don't explicitly access them on the thread which created them?
===
I am working on a cocoa software and in order to keep the GUI responsive during a massive data import ( CoreData ) i need to run the import outside the main thread.
Is it safe to access those objects even if I created them in the main thread without using locks **if** I don't explicitly access those objects while the thread is running. | 0 |
67,167 | 09/15/2008 21:28:18 | 10,135 | 09/15/2008 21:22:39 | 1 | 0 | AxAcroPDF - Vista64 Class Not Registered Error | We have a WinForms application written in C# that uses the AxAcroPDFLib.AxAcroPDF component to load and print a PDF file. Has been working without any problems in Windows XP. I have moved my development environment to Vista 64 bit and now the application will not run (on Vista 64) unless I remove the AxAcroPDF component. I get the following error when the application runs:
"System.Runtime.InteropServices.COMException:
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))."
I have been advised on the Adobe Forums that the reason for the error is that they do not have a 64 bit version of the AxAcroPDF ActiveX control.
Is there some way around this problem? For example can I convert the 32bit ActiveX control to a 64bit control myself? | activex | adobe | 64-bit | axacropdf | null | null | open | AxAcroPDF - Vista64 Class Not Registered Error
===
We have a WinForms application written in C# that uses the AxAcroPDFLib.AxAcroPDF component to load and print a PDF file. Has been working without any problems in Windows XP. I have moved my development environment to Vista 64 bit and now the application will not run (on Vista 64) unless I remove the AxAcroPDF component. I get the following error when the application runs:
"System.Runtime.InteropServices.COMException:
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))."
I have been advised on the Adobe Forums that the reason for the error is that they do not have a 64 bit version of the AxAcroPDF ActiveX control.
Is there some way around this problem? For example can I convert the 32bit ActiveX control to a 64bit control myself? | 0 |
67,171 | 09/15/2008 21:28:35 | 3,029 | 08/26/2008 12:41:11 | 3 | 9 | Releasing under license: Do all files need the copyright statment? | Working out some code to release under the apache license. At the end of the license it shows you what to include in yoru files to indicate the copyright and licensing info. However, some software released under this license (e.g. [testng](http://www.testng.org)) only includes a copy of the license and the source code has no copyright statements.
Does it matter if the code has copyright headers in it? I really hate seeing these things in my code, but I want to do what is needed to ensure the licensing applies. | apache | licensing | open-source | null | null | null | open | Releasing under license: Do all files need the copyright statment?
===
Working out some code to release under the apache license. At the end of the license it shows you what to include in yoru files to indicate the copyright and licensing info. However, some software released under this license (e.g. [testng](http://www.testng.org)) only includes a copy of the license and the source code has no copyright statements.
Does it matter if the code has copyright headers in it? I really hate seeing these things in my code, but I want to do what is needed to ensure the licensing applies. | 0 |
67,174 | 09/15/2008 21:29:02 | 9,986 | 09/15/2008 20:42:14 | 1 | 0 | Find memory leaks caused by smart pointers | Does anybody know a "technique" to discover memory leaks caused by smart pointers? I am currently working on a large project that heavily uses smart pointers with reference counting. Obviously we have some memory leaks caused by smart pointers, that are still referenced somewhere in the code, so that their memory does not get free'd. It's very hard to find the line of code with the "needless" reference, that causes the corresponding object not to be free'd (although it's not of use any longer).
I found some advice in the web, that proposed to collect call stacks of the increment/decrement operations of the reference counter. This gives me a good hint, which piece of code has caused the reference counter to get increased or decreased.
But what I need is some kind of algorithm that groups the corresponding "increase/decrease call stacks" together. After removing these pairs of call stacks, I hopefully have (at least) one "increase call stack" left over, that shows me the piece of code with the "needless" reference, that caused the corresponding object not to be freed. Now it will be no big deal to fix the leak!
But has anybody an idea for an "algorithm" that does the grouping?
(I hope someone understood, what I tried to explain ...) | memory | leak | pointer | smart | null | null | open | Find memory leaks caused by smart pointers
===
Does anybody know a "technique" to discover memory leaks caused by smart pointers? I am currently working on a large project that heavily uses smart pointers with reference counting. Obviously we have some memory leaks caused by smart pointers, that are still referenced somewhere in the code, so that their memory does not get free'd. It's very hard to find the line of code with the "needless" reference, that causes the corresponding object not to be free'd (although it's not of use any longer).
I found some advice in the web, that proposed to collect call stacks of the increment/decrement operations of the reference counter. This gives me a good hint, which piece of code has caused the reference counter to get increased or decreased.
But what I need is some kind of algorithm that groups the corresponding "increase/decrease call stacks" together. After removing these pairs of call stacks, I hopefully have (at least) one "increase call stack" left over, that shows me the piece of code with the "needless" reference, that caused the corresponding object not to be freed. Now it will be no big deal to fix the leak!
But has anybody an idea for an "algorithm" that does the grouping?
(I hope someone understood, what I tried to explain ...) | 0 |
67,180 | 09/15/2008 21:29:26 | 10,160 | 09/15/2008 21:29:26 | 1 | 0 | mod_python/MySQL error on INSERT with a lot of data: "OperationalError: (2006, 'MySQL server has gone away')" | When doing an INSERT with a lot of data, ie~ `INSERT INTO table (mediumtext_field) VALUES ('...lots of text here: about 2MB worth...')', MySQL returns "OperationalError: (2006, 'MySQL server has gone away')"
This is happening within a minute of starting the script, so it is not a timeout issue. Also, `mediumtext_field` should be able to hold ~16MB of data, so that shouldn't be a problem.
Any ideas what is causing the error or how to work around it?
Some relevant libraries being used: mod_python 3.3.1, MySQL 5.0.51 (on Windows XP SP3, via xampp, details below)
###### ApacheFriends XAMPP (basic package) version 1.6.5 ######
+ Apache 2.2.6
+ MySQL 5.0.51
+ phpMyAdmin 2.11.3 | python | mysql | xampp | null | null | null | open | mod_python/MySQL error on INSERT with a lot of data: "OperationalError: (2006, 'MySQL server has gone away')"
===
When doing an INSERT with a lot of data, ie~ `INSERT INTO table (mediumtext_field) VALUES ('...lots of text here: about 2MB worth...')', MySQL returns "OperationalError: (2006, 'MySQL server has gone away')"
This is happening within a minute of starting the script, so it is not a timeout issue. Also, `mediumtext_field` should be able to hold ~16MB of data, so that shouldn't be a problem.
Any ideas what is causing the error or how to work around it?
Some relevant libraries being used: mod_python 3.3.1, MySQL 5.0.51 (on Windows XP SP3, via xampp, details below)
###### ApacheFriends XAMPP (basic package) version 1.6.5 ######
+ Apache 2.2.6
+ MySQL 5.0.51
+ phpMyAdmin 2.11.3 | 0 |
67,183 | 09/15/2008 21:29:45 | 8,118 | 09/15/2008 15:12:55 | 11 | 0 | Is there a specification of Java's threading model running under Windows XP available anywhere? | There are various documents describing threading on Solaris/Linux, but nowwhere describing the Windows implementation. I have a passing interest in this, it seems strange that something so critical is (seemingly) not documented.
Threading is not the same on different OS' - "Write Once, Run Anywhere" isn't true for threading.
See <http://java.sun.com/docs/hotspot/threads/threads.html> | java | multithreading | documentation | null | null | null | open | Is there a specification of Java's threading model running under Windows XP available anywhere?
===
There are various documents describing threading on Solaris/Linux, but nowwhere describing the Windows implementation. I have a passing interest in this, it seems strange that something so critical is (seemingly) not documented.
Threading is not the same on different OS' - "Write Once, Run Anywhere" isn't true for threading.
See <http://java.sun.com/docs/hotspot/threads/threads.html> | 0 |
67,185 | 09/15/2008 21:30:01 | 10,161 | 09/15/2008 21:30:01 | 1 | 0 | Best tool for the job: cross-platform, open source, on- and off-line tool development. | The goal is to build tools and applications that have both web-based and standalone versions for multiple OS's (*nix, Mac, Win, etc.).
I've got a general idea of how to architect software that is flexible enough to accomplish this, but ...
Is there a language or framework that's designed for or uniquely suited to this task? | cross-platform | programming-languages | methodology | null | null | null | open | Best tool for the job: cross-platform, open source, on- and off-line tool development.
===
The goal is to build tools and applications that have both web-based and standalone versions for multiple OS's (*nix, Mac, Win, etc.).
I've got a general idea of how to architect software that is flexible enough to accomplish this, but ...
Is there a language or framework that's designed for or uniquely suited to this task? | 0 |
67,200 | 09/15/2008 21:31:13 | 10,104 | 09/15/2008 21:13:13 | 1 | 0 | Tool recommendation for converting VB to C# | We have a project with over 500,000 lines of VB.NET that we need to convert to C#. Any recommendations, based on experience, for tools to use? We are using Visual Studio 2008 and we're targeting 3.5 . | c# | vb.net | visual-studio-2008 | null | null | null | open | Tool recommendation for converting VB to C#
===
We have a project with over 500,000 lines of VB.NET that we need to convert to C#. Any recommendations, based on experience, for tools to use? We are using Visual Studio 2008 and we're targeting 3.5 . | 0 |
67,209 | 09/15/2008 21:32:35 | 3,747 | 08/30/2008 14:33:59 | 321 | 28 | How do you customize the copy/paste behavior in Visual Studio 2008? | How do you customize the Copy/Paste behavior in Visual Studio 2008?
For example I create a new `<div id="MyDiv"></div>` and then copy and paste it in the same file.
VisualStudio pastes `<div id="Div1"></div>` instead of the original text I copied.
It is even more frustrating when I'm trying to copy a group of related div's that I would like to copy/paste several times and only change one part of the id.
Is there a setting I can tweak to change the copy/paste behavior? | visual-studio-2008 | copy-paste | null | null | null | null | open | How do you customize the copy/paste behavior in Visual Studio 2008?
===
How do you customize the Copy/Paste behavior in Visual Studio 2008?
For example I create a new `<div id="MyDiv"></div>` and then copy and paste it in the same file.
VisualStudio pastes `<div id="Div1"></div>` instead of the original text I copied.
It is even more frustrating when I'm trying to copy a group of related div's that I would like to copy/paste several times and only change one part of the id.
Is there a setting I can tweak to change the copy/paste behavior? | 0 |
67,219 | 09/15/2008 21:33:26 | 7,209 | 09/15/2008 13:21:13 | 1 | 0 | How do you prevent printing dialog when using Excel PrintOut method | When I use the PrintOut method to print a Worksheet object to a printer, the "Printing" dialog is displayed even though I have set DisplayAlerts = False. The code below works in an Excel macro but the same thing happens if I use this code in a VB or VB.Net application (with the reference changes required to use the Excel object).
Public Sub TestPrint()
Dim vSheet As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Set vSheet = ActiveSheet
vSheet.PrintOut Preview:=False
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
| excel | vba | null | null | null | null | open | How do you prevent printing dialog when using Excel PrintOut method
===
When I use the PrintOut method to print a Worksheet object to a printer, the "Printing" dialog is displayed even though I have set DisplayAlerts = False. The code below works in an Excel macro but the same thing happens if I use this code in a VB or VB.Net application (with the reference changes required to use the Excel object).
Public Sub TestPrint()
Dim vSheet As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Set vSheet = ActiveSheet
vSheet.PrintOut Preview:=False
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
| 0 |
67,223 | 09/15/2008 21:33:41 | 10,176 | 09/15/2008 21:33:40 | 1 | 0 | why might my pyglet vertex lists and batches be very slow on Windows? | I'm writing opengl code in python using the library pyglet. When I draw to the screen using pyglet.graphics.vertex_list or pyglet.graphics.batch objects, they are very slow (~0.1 fps) compared to plain old pyglet.graphics.draw() or just glVertex() calls, which are about 40fps for the same geometry.
In Linux the vertex_list is about the same speed as glVertex, which is disappointing, and batch methods are about twice as fast, which is a little better but not as much gain as I was hoping for. | python | opengl | pyglet | null | null | null | open | why might my pyglet vertex lists and batches be very slow on Windows?
===
I'm writing opengl code in python using the library pyglet. When I draw to the screen using pyglet.graphics.vertex_list or pyglet.graphics.batch objects, they are very slow (~0.1 fps) compared to plain old pyglet.graphics.draw() or just glVertex() calls, which are about 40fps for the same geometry.
In Linux the vertex_list is about the same speed as glVertex, which is disappointing, and batch methods are about twice as fast, which is a little better but not as much gain as I was hoping for. | 0 |
67,244 | 09/15/2008 21:36:30 | 4,872 | 09/06/2008 09:14:55 | 394 | 10 | How do I determine using TSQL what roles are granted execute permissions on a specific stored procedure? | Is there a system stored procedure or a system view I can use? | sql-server | tsql | stored-procedures | null | null | null | open | How do I determine using TSQL what roles are granted execute permissions on a specific stored procedure?
===
Is there a system stored procedure or a system view I can use? | 0 |
67,273 | 09/15/2008 21:41:00 | 10,184 | 09/15/2008 21:36:31 | 1 | 0 | How do you iterate through every file/directory recursively in standard C++ | How do you iterate through every file/directory recursively in standard C++ | c++ | filesystems | null | null | null | null | open | How do you iterate through every file/directory recursively in standard C++
===
How do you iterate through every file/directory recursively in standard C++ | 0 |
67,275 | 09/15/2008 21:41:21 | 4,257 | 09/02/2008 14:39:35 | 677 | 50 | Reading from a ZipInputStream into a ByteArrayOutputStream | I am trying to read a single file from a java.util.zip.ZipInputStream, and copy it into a java.io.ByteArrayOutputStream (so that I can then create a java.io.ByteArrayInputStream and hand that to a 3rd party library that will end up closing the stream, and I don't want my ZipInputStream getting closed).
I'm probably missing something basic here, but I never enter the while loop here:
ByteArrayOutputStream streamBuilder = new ByteArrayOutputStream();
int bytesRead;
byte[] tempBuffer = new byte[8192*2];
try {
while ( (bytesRead = zipStream.read(tempBuffer)) != -1 ){
streamBuilder.write(tempBuffer, 0, bytesRead);
}
} catch (IOException e) {
...
}
What am I missing that will allow me to copy the stream? Thanks.
| java | inputstream | outputstream | null | null | null | open | Reading from a ZipInputStream into a ByteArrayOutputStream
===
I am trying to read a single file from a java.util.zip.ZipInputStream, and copy it into a java.io.ByteArrayOutputStream (so that I can then create a java.io.ByteArrayInputStream and hand that to a 3rd party library that will end up closing the stream, and I don't want my ZipInputStream getting closed).
I'm probably missing something basic here, but I never enter the while loop here:
ByteArrayOutputStream streamBuilder = new ByteArrayOutputStream();
int bytesRead;
byte[] tempBuffer = new byte[8192*2];
try {
while ( (bytesRead = zipStream.read(tempBuffer)) != -1 ){
streamBuilder.write(tempBuffer, 0, bytesRead);
}
} catch (IOException e) {
...
}
What am I missing that will allow me to copy the stream? Thanks.
| 0 |
67,299 | 09/15/2008 21:44:00 | 9,431 | 09/15/2008 18:47:51 | 1 | 0 | Is Unit Testing worth the effort? | I am working to integrate Unit Testing into the development process on the team I work on and there are some skeptics. What are some good ways to convince the skeptics of the value of Unit Testing? In my specific case we would be adding Unit Tests as we added functionality or fixed bugs. Unfortunatley our code base does not lend itself to easy testing. | unit-testing | null | null | null | null | 01/27/2012 01:02:25 | not constructive | Is Unit Testing worth the effort?
===
I am working to integrate Unit Testing into the development process on the team I work on and there are some skeptics. What are some good ways to convince the skeptics of the value of Unit Testing? In my specific case we would be adding Unit Tests as we added functionality or fixed bugs. Unfortunatley our code base does not lend itself to easy testing. | 4 |
67,300 | 09/15/2008 21:44:05 | 9,470 | 09/15/2008 18:55:14 | 1 | 0 | Why doesn't BackColor work for TabControls in .NET? | If you use the standard tab control in .NET for your tab pages and you try to change the look and feel a little bit then you are able to change the back color of the tab pages but not for the tab control. The property is available, you could set it but it has no effect. If you change the back color of the pages and not of the tab control it looks... uhm quite ugly.
I know Microsoft doesn't want it to be set. [MSDN][1]: '<i>This property supports the .NET Framework infrastructure and is not intended to be used directly from your code. This member is not meaningful for this control.</i>' A control property just for color which supports the .NET infrastructure? ...hard to believe.
I hoped over the years Microsoft would change it but they did not. I created my own TabControl class which overrides the paint method to fix this. But is this really the best solution?
What is the reason for not supporting BackColor for this control? What is your solution to fix this? Is there a better solution than overriding the paint method?
[1]: http://msdn.microsoft.com/en/library/w4sc610z(VS.80).aspx | .net | microsoft | controls | tabcontrol | null | null | open | Why doesn't BackColor work for TabControls in .NET?
===
If you use the standard tab control in .NET for your tab pages and you try to change the look and feel a little bit then you are able to change the back color of the tab pages but not for the tab control. The property is available, you could set it but it has no effect. If you change the back color of the pages and not of the tab control it looks... uhm quite ugly.
I know Microsoft doesn't want it to be set. [MSDN][1]: '<i>This property supports the .NET Framework infrastructure and is not intended to be used directly from your code. This member is not meaningful for this control.</i>' A control property just for color which supports the .NET infrastructure? ...hard to believe.
I hoped over the years Microsoft would change it but they did not. I created my own TabControl class which overrides the paint method to fix this. But is this really the best solution?
What is the reason for not supporting BackColor for this control? What is your solution to fix this? Is there a better solution than overriding the paint method?
[1]: http://msdn.microsoft.com/en/library/w4sc610z(VS.80).aspx | 0 |
67,339 | 09/15/2008 21:48:18 | 7,311 | 09/15/2008 13:30:54 | 11 | 3 | Save us from VSS! | Greetings.
I'm a 1-2 man band at work, and so far I've been using VSS for two reasons 1) the company was using that when I started a few months ago, and 2) it is friendly with Visual Studio.
Needless to say, I would very much like to upgrade to a not-so-archaic source control system. However, I don't want to give up the friendliness with Visual Studio, and I'd like to be able to migrate the existing codebase over to a better source control system.
I can't imagine I'm the only person in this situation. Does anyone have a success story they wouldn't mind sharing?
| vs2008 | version-control | visual-studio-2008 | visual-sourcesafe | null | null | open | Save us from VSS!
===
Greetings.
I'm a 1-2 man band at work, and so far I've been using VSS for two reasons 1) the company was using that when I started a few months ago, and 2) it is friendly with Visual Studio.
Needless to say, I would very much like to upgrade to a not-so-archaic source control system. However, I don't want to give up the friendliness with Visual Studio, and I'd like to be able to migrate the existing codebase over to a better source control system.
I can't imagine I'm the only person in this situation. Does anyone have a success story they wouldn't mind sharing?
| 0 |
67,354 | 09/15/2008 21:49:59 | 5,234 | 09/08/2008 16:25:48 | 10 | 1 | Dreaded iframe horizontal scroll bar can't be removed in IE? | I have an iframe. The content is wider than the width I am setting so the iframe gets a horizontal scroll bar. I can't increase the width of the iframe so I want to just remove the scroll bar. I tried setting the scroll property to "no" but that kills both scroll bars and I want the vertical one. I tried setting overflow-x to "hidden" and that killed the horizontal scroll bar in ff but not in IE. sad for me. | internet-explorer | iframe | null | null | null | null | open | Dreaded iframe horizontal scroll bar can't be removed in IE?
===
I have an iframe. The content is wider than the width I am setting so the iframe gets a horizontal scroll bar. I can't increase the width of the iframe so I want to just remove the scroll bar. I tried setting the scroll property to "no" but that kills both scroll bars and I want the vertical one. I tried setting overflow-x to "hidden" and that killed the horizontal scroll bar in ff but not in IE. sad for me. | 0 |
67,366 | 09/15/2008 21:51:34 | 8,737 | 09/15/2008 16:45:06 | 1 | 3 | A check list for fixing C#/VB.Net apps to sql-server timeout problems | I have run into this problem of users complaining either about very slow responses and/or timeout errors when using some applications in the past due to many reasons.
What type of solutions from basic to weird have you used to fix this problem in the past? | c# | sql-server | vb.net | timeout | null | null | open | A check list for fixing C#/VB.Net apps to sql-server timeout problems
===
I have run into this problem of users complaining either about very slow responses and/or timeout errors when using some applications in the past due to many reasons.
What type of solutions from basic to weird have you used to fix this problem in the past? | 0 |
67,368 | 09/15/2008 21:51:56 | 10,046 | 09/15/2008 20:57:21 | 1 | 1 | How do you update a live, busy web site in the politest way possible? | When you roll out changes to a live web site, how do you go about checking that the *live* system is working correctly? Which tools do you use? Who does it? Do you block access to the site for the testing period? What amount of downtime is acceptable? | testing | null | null | null | null | null | open | How do you update a live, busy web site in the politest way possible?
===
When you roll out changes to a live web site, how do you go about checking that the *live* system is working correctly? Which tools do you use? Who does it? Do you block access to the site for the testing period? What amount of downtime is acceptable? | 0 |
67,370 | 09/15/2008 21:52:15 | 64 | 08/01/2008 14:27:12 | 295 | 19 | Dynamically Create a generic type for template | I'm programming WCF using the ChannelFactory which expects a type in order to call the CreateChannel method. For example:
>IProxy proxy = ChannelFactory<IProxy>.CreateChannel(...);
In my case I'm doing routing so I don't know what type my channel factory will be using. I can parse a message header to determine the type but I hit a brick wall there because even if I have an instance of Type I can't pass that where ChannelFactory expects a generic type.
Another way of restating this problem in very simple terms would be that I'm attempting to do something like this:
>string listtype = Console.ReadLine(); // say "System.Int32"
>Type t = Type.GetType( listtype);
>List<t> myIntegers = new List<t>(); // does not compile, expects a "type"
>List<typeof(t)> myIntegers = new List<typeof(t)>(); // interesting - type must resolve at compile time?
Is there an approach to this I can leverage within C#?
| c# | generics | null | null | null | null | open | Dynamically Create a generic type for template
===
I'm programming WCF using the ChannelFactory which expects a type in order to call the CreateChannel method. For example:
>IProxy proxy = ChannelFactory<IProxy>.CreateChannel(...);
In my case I'm doing routing so I don't know what type my channel factory will be using. I can parse a message header to determine the type but I hit a brick wall there because even if I have an instance of Type I can't pass that where ChannelFactory expects a generic type.
Another way of restating this problem in very simple terms would be that I'm attempting to do something like this:
>string listtype = Console.ReadLine(); // say "System.Int32"
>Type t = Type.GetType( listtype);
>List<t> myIntegers = new List<t>(); // does not compile, expects a "type"
>List<typeof(t)> myIntegers = new List<typeof(t)>(); // interesting - type must resolve at compile time?
Is there an approach to this I can leverage within C#?
| 0 |
67,394 | 09/15/2008 21:54:55 | 1,115,144 | 09/15/2008 16:09:15 | 93 | 4 | Which should I implement first, PayPal or Google Checkout, on my eCommerce website? | Paypal and Google Checkout will take some time to implement so I'm wanting to know if anyone in the community has installed them and has a recommendation on which to do first. We use the .Net environment. | .net | google | implementation | paypal | checkout | null | open | Which should I implement first, PayPal or Google Checkout, on my eCommerce website?
===
Paypal and Google Checkout will take some time to implement so I'm wanting to know if anyone in the community has installed them and has a recommendation on which to do first. We use the .Net environment. | 0 |
67,407 | 09/15/2008 21:56:23 | 7,831 | 09/15/2008 14:31:00 | 11 | 5 | Why isn't there a Team Foundation Server Express Edition? | Why isn't there a Team Foundation Server Express Edition? | visual-studio | version-control | tfs | null | null | null | open | Why isn't there a Team Foundation Server Express Edition?
===
Why isn't there a Team Foundation Server Express Edition? | 0 |
67,410 | 09/15/2008 21:56:26 | 10,251 | 09/15/2008 21:56:26 | 1 | 0 | Why does sed fail with International characters and how to fix? | GNU sed version 4.1.5 seems to fail with International chars. Here is my input file:
Gras Och Stenar Trad - From Moja to Minneapolis DVD [G2007DVD] 7812 | X
<br>
Gras Och Stenar Trad - From Möja to Minneapolis DVD [G2007DVD] 7812 | Y
(Note the umlaut in second line.)
And when I do
sed 's/.*| //' < in
I would expect to see only the X and Y, as I've asked to remove ALL chars up to the '|' and space beyond it. Instead, I get:
X<br>
Gras Och Stenar Trad - From M? Y
I know I can use tr to remove the International chars. first, but is there a way to just use sed? | linux | sed | character | international | null | null | open | Why does sed fail with International characters and how to fix?
===
GNU sed version 4.1.5 seems to fail with International chars. Here is my input file:
Gras Och Stenar Trad - From Moja to Minneapolis DVD [G2007DVD] 7812 | X
<br>
Gras Och Stenar Trad - From Möja to Minneapolis DVD [G2007DVD] 7812 | Y
(Note the umlaut in second line.)
And when I do
sed 's/.*| //' < in
I would expect to see only the X and Y, as I've asked to remove ALL chars up to the '|' and space beyond it. Instead, I get:
X<br>
Gras Och Stenar Trad - From M? Y
I know I can use tr to remove the International chars. first, but is there a way to just use sed? | 0 |
67,418 | 09/15/2008 21:57:04 | 8,598 | 09/15/2008 16:25:22 | 19 | 1 | Passing hierarchy into a Verilog module | I have a "watcher" module that is currently using global hierarchies inside it. I need to instantiate a second instance of this with a second global hierarchy.
Currently:
module watcher;
wire sig = `HIER.sig;
wire bar = `HIER.foo.bar;
...
endmodule
watcher w; // instantiation
Desired:
module watcher(input base_hier);
wire sig = base_hier.sig;
wire bar = base_hier.foo.bar;
...
endmodule
watcher w1(`HIER1); // instantiation
watcher w2(`HIER2); // second instantiation, except with a different hierarchy
My best idea is to use vpp (the Verilog preprocessor) to brute-force generate two virtually-identical modules (one with each hierarchy), but is there a more elegant way?
| verilog | null | null | null | null | null | open | Passing hierarchy into a Verilog module
===
I have a "watcher" module that is currently using global hierarchies inside it. I need to instantiate a second instance of this with a second global hierarchy.
Currently:
module watcher;
wire sig = `HIER.sig;
wire bar = `HIER.foo.bar;
...
endmodule
watcher w; // instantiation
Desired:
module watcher(input base_hier);
wire sig = base_hier.sig;
wire bar = base_hier.foo.bar;
...
endmodule
watcher w1(`HIER1); // instantiation
watcher w2(`HIER2); // second instantiation, except with a different hierarchy
My best idea is to use vpp (the Verilog preprocessor) to brute-force generate two virtually-identical modules (one with each hierarchy), but is there a more elegant way?
| 0 |
67,426 | 09/15/2008 21:58:37 | 10,247 | 09/15/2008 21:54:44 | 1 | 0 | Dynamically sorted STL containers | I'm fairly new to the STL, so I was wondering whether there are any dynamically sortable containers? At the moment my current thinking is to use a vector in conjunction with the various sort algorithms, but I'm not sure whether there's a more appropriate selection given the (presumably) linear complexity of inserting entries into a sorted vector. | c++ | stl | containers | null | null | null | open | Dynamically sorted STL containers
===
I'm fairly new to the STL, so I was wondering whether there are any dynamically sortable containers? At the moment my current thinking is to use a vector in conjunction with the various sort algorithms, but I'm not sure whether there's a more appropriate selection given the (presumably) linear complexity of inserting entries into a sorted vector. | 0 |
67,454 | 09/15/2008 22:00:31 | 9,812 | 09/15/2008 20:02:43 | 1 | 0 | Serving dynamically generated ZIP archives in Django | How to serve users a dynamically generated ZIP archive in Django?
I'm making a site, where users can choose any combination of available books and download them as ZIP archive. I'm worried that generating such archives for each request would slow my server down to a crawl. I have also heard that Django doesn't currently have a good solution for serving dynamically generated files. | python | django | null | null | null | null | open | Serving dynamically generated ZIP archives in Django
===
How to serve users a dynamically generated ZIP archive in Django?
I'm making a site, where users can choose any combination of available books and download them as ZIP archive. I'm worried that generating such archives for each request would slow my server down to a crawl. I have also heard that Django doesn't currently have a good solution for serving dynamically generated files. | 0 |
67,457 | 09/15/2008 22:00:43 | 44,972 | 09/02/2008 10:00:56 | 52 | 1 | Tansparent Web Page Overlays in C# | How can I show a web page in a transparent window and have the white part of the web page also transparent. | c# | null | null | null | null | null | open | Tansparent Web Page Overlays in C#
===
How can I show a web page in a transparent window and have the white part of the web page also transparent. | 0 |
67,475 | 09/15/2008 22:02:54 | 3,446 | 08/28/2008 15:47:28 | 116 | 16 | Good references / tips for designing rule systems? | I often need to implement some sort of rule system that is user-editable -- the requirements are generally different enough that the same system isn't directly applicable, so I frequently run into the same problem--how do I design a rule system that
1. is maintainable
2. properly balances expressiveness with ease of use
3. is easily extended (if/when I get (2) wrong).
I think Rule systems / DSLs are extremely valuable, but I don't feel comfortable with my ability to design them properly.
What references / tips do you have to offer that may help make this easier?
Because of the nature of the problems I run into, existing languages are generally not applicable. (For example, you would *not* require that general computer users learn python in order to write an email filter.) Similarly, rule *languages*, such as [JESS][1], are only a partial solution, since some (simpler) user interface needs to be built on-top of the rule language so non-programmers can make use of it. This interface invariably involves removing some features, or making those features more difficult to use, and that [process][1] poses the same problems described above.
[1]: http://herzberg.ca.sandia.gov/ | rules | filtering | gui | dsl | null | null | open | Good references / tips for designing rule systems?
===
I often need to implement some sort of rule system that is user-editable -- the requirements are generally different enough that the same system isn't directly applicable, so I frequently run into the same problem--how do I design a rule system that
1. is maintainable
2. properly balances expressiveness with ease of use
3. is easily extended (if/when I get (2) wrong).
I think Rule systems / DSLs are extremely valuable, but I don't feel comfortable with my ability to design them properly.
What references / tips do you have to offer that may help make this easier?
Because of the nature of the problems I run into, existing languages are generally not applicable. (For example, you would *not* require that general computer users learn python in order to write an email filter.) Similarly, rule *languages*, such as [JESS][1], are only a partial solution, since some (simpler) user interface needs to be built on-top of the rule language so non-programmers can make use of it. This interface invariably involves removing some features, or making those features more difficult to use, and that [process][1] poses the same problems described above.
[1]: http://herzberg.ca.sandia.gov/ | 0 |
67,492 | 09/15/2008 22:04:53 | 5,056 | 09/07/2008 15:43:17 | 924 | 68 | What Is the simplest way to build an Array of N numbers following a simple pattern? | Let's say the first N integers divisible by 3 starting with 8.
I'm sure there is some one line solution using lamdas, I just don't know it that area of the language well enough yet. | c# | null | null | null | null | null | open | What Is the simplest way to build an Array of N numbers following a simple pattern?
===
Let's say the first N integers divisible by 3 starting with 8.
I'm sure there is some one line solution using lamdas, I just don't know it that area of the language well enough yet. | 0 |
67,512 | 09/15/2008 22:08:07 | 7,994 | 09/15/2008 14:52:27 | 1 | 0 | Best keyboard for custom Dvorak-based programming layout | I'm considering switching to a Dvorak-based keyboard layout, but one optimized for programming (mostly) Java and python (e.g. [DDvorak][1], [Programmer Dvorak][2], etc.). What particular keyboard would be best for such an undertaking?
Thanks.
[1]: http://www.siteuri.ro/dvorak/DDvorak.aspx
[2]: http://www.kaufmann.no/roland/dvorak/ | keyboard | dvorak | java | python | null | null | open | Best keyboard for custom Dvorak-based programming layout
===
I'm considering switching to a Dvorak-based keyboard layout, but one optimized for programming (mostly) Java and python (e.g. [DDvorak][1], [Programmer Dvorak][2], etc.). What particular keyboard would be best for such an undertaking?
Thanks.
[1]: http://www.siteuri.ro/dvorak/DDvorak.aspx
[2]: http://www.kaufmann.no/roland/dvorak/ | 0 |
67,516 | 09/15/2008 22:08:43 | 10,272 | 09/15/2008 22:04:03 | 1 | 0 | Flex: How to add a tab close button for TabNavigator component | I'd like to have a TabNavigator component that has a close button for some of the tabs. How do I do that?
It seems that the TabNavigator component does not allow (or I could not find) extensibility of this form.
Help. Thanks
| flex | actionscript-3 | null | null | null | null | open | Flex: How to add a tab close button for TabNavigator component
===
I'd like to have a TabNavigator component that has a close button for some of the tabs. How do I do that?
It seems that the TabNavigator component does not allow (or I could not find) extensibility of this form.
Help. Thanks
| 0 |
67,518 | 09/15/2008 22:09:39 | 10,171 | 09/15/2008 21:32:38 | 1 | 0 | Multiple tabs in windows vista and gvim | I am trying to get the "Edit with Vim" my Right click context menu to
work, so that each new file I open opens in a new tab in a single instance
of vim.
Currently, using Regedit I have set
<code>
\HKEY-LOCAL-MACHINE\SOFTWARE\Vim\Gvim\path = "C:\Programs\Vim \vim72\gvim.exe" -p --remote-tab-silent "%*"
</code>
The registry key is of type REG_SZ
This almost works... Currently it opens the file in a new tab, but it also opens another tab (which is the active tab) the tab is labeled \W\S\ --literal and the file seems to be trying to open the following file.
<code>
C:\Windows\System32\--literal
</code>
I think the problem is around the "%*" - I tried changing that to "%1", but if i do that I get an extra tab called %1.
Vim version 7.2 (although I saw the same behaviour on 7.1)
Windows vista home premium
Thanks for any help.
David.
| vim | tabs | null | null | null | null | open | Multiple tabs in windows vista and gvim
===
I am trying to get the "Edit with Vim" my Right click context menu to
work, so that each new file I open opens in a new tab in a single instance
of vim.
Currently, using Regedit I have set
<code>
\HKEY-LOCAL-MACHINE\SOFTWARE\Vim\Gvim\path = "C:\Programs\Vim \vim72\gvim.exe" -p --remote-tab-silent "%*"
</code>
The registry key is of type REG_SZ
This almost works... Currently it opens the file in a new tab, but it also opens another tab (which is the active tab) the tab is labeled \W\S\ --literal and the file seems to be trying to open the following file.
<code>
C:\Windows\System32\--literal
</code>
I think the problem is around the "%*" - I tried changing that to "%1", but if i do that I get an extra tab called %1.
Vim version 7.2 (although I saw the same behaviour on 7.1)
Windows vista home premium
Thanks for any help.
David.
| 0 |
67,536 | 09/15/2008 22:11:32 | 8,279 | 09/15/2008 15:36:55 | 11 | 1 | How to record webcam to flv with constant framerate | I would like my website to record flvs using webcams. These flvs need to have a constant framerate so I can play with them afterwards.
I've tried many different servers to handle the flv recording. The resulting flvs play OK in Wimpy FLV Player, for example, except that the progress indicator doesn't move smoothly or in a regular fashion. This is a sign that there is something wrong with the framerate.
Here's what I tried and the kind of problem I get:
1. Using [red5][1] (v 0.6.3 and 0.7.0,
both on OS X 10.5.4 and Ubuntu 8.04)
and the publisher.html example it
includes. Here's the [resulting
flv][2]. The indicator jumps towards
the end very rapidly.
2. Still using red5, but publishing "live" and starting the recording after a couple of seconds. I used [these example files][3]. Here's the [resulting flv][4]. The indicator still jumps to the end very rapidly, no sound at all with this method...
3. Using [Wowza Media Server Pro][5] (v 1.5.3, on my mac). The progress indicator doesn't jump to the end, but it moves more quickly at the very beginning. This is enough that conversion to other formats using ffmpeg will have the visual not synchronized properly with the audio. Just to be sure I tried the [video recorder that comes with it][6], as well as using red5's publisher.html (with [identical results][7]).
4. Using Flash Media Server 3 through an account hosted at [www.influxis.com][8]. I get yet another progression pattern. The progress indicator jumps a bit a the beginning and then becomes regular. Here's [an example][9].
I know it is possible to record a "flawless" flv because facebook's video application does it (using red5?) Indeed, it's easy to look at the HTML source of facebook video and get the http URL to download the flvs they produce. When played back in Wimpy, the progress indicator is smooth, and transcoding with "ffmpeg -i facebook.flv -r 15 facebook.avi" produces a good avi. Here's [an example][10].
So, can I manage to get a good flv with a constant framerate?
PS: Server must be either installable on Linux or else be available at a reasonably priced hosting provider.
[1]: http://osflash.org/red5
[2]: http://www.marc-andre.ca/posts/blog/webcam/test-red5-publisher.flv
[3]: http://sziebert.net/posts/server-side-stream-recording-with-red5/
[4]: http://www.marc-andre.ca/posts/blog/webcam/test-red5-live-sziebert.flv
[5]: http://www.wowzamedia.com/products.html
[6]: http://www.marc-andre.ca/posts/blog/webcam/test-wowza.flv
[7]: http://www.marc-andre.ca/posts/blog/webcam/test-wowza-publisher.flv
[8]: http://www.influxis.com
[9]: http://www.marc-andre.ca/posts/blog/webcam/test-influxis.flv
[10]: http://www.marc-andre.ca/posts/blog/webcam/test-facebook.flv | flash | webcam | null | null | null | null | open | How to record webcam to flv with constant framerate
===
I would like my website to record flvs using webcams. These flvs need to have a constant framerate so I can play with them afterwards.
I've tried many different servers to handle the flv recording. The resulting flvs play OK in Wimpy FLV Player, for example, except that the progress indicator doesn't move smoothly or in a regular fashion. This is a sign that there is something wrong with the framerate.
Here's what I tried and the kind of problem I get:
1. Using [red5][1] (v 0.6.3 and 0.7.0,
both on OS X 10.5.4 and Ubuntu 8.04)
and the publisher.html example it
includes. Here's the [resulting
flv][2]. The indicator jumps towards
the end very rapidly.
2. Still using red5, but publishing "live" and starting the recording after a couple of seconds. I used [these example files][3]. Here's the [resulting flv][4]. The indicator still jumps to the end very rapidly, no sound at all with this method...
3. Using [Wowza Media Server Pro][5] (v 1.5.3, on my mac). The progress indicator doesn't jump to the end, but it moves more quickly at the very beginning. This is enough that conversion to other formats using ffmpeg will have the visual not synchronized properly with the audio. Just to be sure I tried the [video recorder that comes with it][6], as well as using red5's publisher.html (with [identical results][7]).
4. Using Flash Media Server 3 through an account hosted at [www.influxis.com][8]. I get yet another progression pattern. The progress indicator jumps a bit a the beginning and then becomes regular. Here's [an example][9].
I know it is possible to record a "flawless" flv because facebook's video application does it (using red5?) Indeed, it's easy to look at the HTML source of facebook video and get the http URL to download the flvs they produce. When played back in Wimpy, the progress indicator is smooth, and transcoding with "ffmpeg -i facebook.flv -r 15 facebook.avi" produces a good avi. Here's [an example][10].
So, can I manage to get a good flv with a constant framerate?
PS: Server must be either installable on Linux or else be available at a reasonably priced hosting provider.
[1]: http://osflash.org/red5
[2]: http://www.marc-andre.ca/posts/blog/webcam/test-red5-publisher.flv
[3]: http://sziebert.net/posts/server-side-stream-recording-with-red5/
[4]: http://www.marc-andre.ca/posts/blog/webcam/test-red5-live-sziebert.flv
[5]: http://www.wowzamedia.com/products.html
[6]: http://www.marc-andre.ca/posts/blog/webcam/test-wowza.flv
[7]: http://www.marc-andre.ca/posts/blog/webcam/test-wowza-publisher.flv
[8]: http://www.influxis.com
[9]: http://www.marc-andre.ca/posts/blog/webcam/test-influxis.flv
[10]: http://www.marc-andre.ca/posts/blog/webcam/test-facebook.flv | 0 |
67,554 | 09/15/2008 22:15:11 | 10,120 | 09/15/2008 21:18:07 | 1 | 3 | What's the best Free C++ Profiler for windows (if there are) | I'm looking for a profiler in order to find the bottleneck of my c++ code.
I'd like to find a free, non intrusive, good profiling tool.
I'm a game developer and I use PIX for Xbox360, I found it very good (but not free)
I know the Intel v-Tune, but it's not free.
There exists any free profiling tool? | c++ | windows | free | profile | null | null | open | What's the best Free C++ Profiler for windows (if there are)
===
I'm looking for a profiler in order to find the bottleneck of my c++ code.
I'd like to find a free, non intrusive, good profiling tool.
I'm a game developer and I use PIX for Xbox360, I found it very good (but not free)
I know the Intel v-Tune, but it's not free.
There exists any free profiling tool? | 0 |
67,556 | 09/15/2008 22:15:49 | 1,945 | 08/19/2008 14:49:22 | 43 | 8 | Getting multiple file sizes for a preloader | Alright, currently I have my SWF hitting a php file that will go and find all the files I specify to it, add their sizes together and return their combined sizes as one number. I then use this number with a ProgressEvent listener to determine the current percentage of files downloading for that particular section of the website.
Pretty straightforward right? Well now using that PHP file is out of the question and I'm attempting to do everything inside the SWF instead of having it hit an outside script to get the numbers I need.
Is there any good way to get a file's size BEFORE I start loading it into flash? I really need the preloader to be a 0 to 100% preloader so I need the total number of bytes I will be downloading before it actually starts.
One thought I had was to just go through the array holding the file URLs, start loading them, getTotalBytes without displaying any loading, kill the load on the first tick, add up all those total bytes numbers, and then start the actual downloading process. This method seems very ugly and it will be a huge time waste as every time the user hits a pre loader on the site it will probably take a second or two to run through all the files, find their total and then actually start downloading.
Is there a better solution to this problem without going outside of flash to get the size of those files? | flash | actionscript-3 | null | null | null | null | open | Getting multiple file sizes for a preloader
===
Alright, currently I have my SWF hitting a php file that will go and find all the files I specify to it, add their sizes together and return their combined sizes as one number. I then use this number with a ProgressEvent listener to determine the current percentage of files downloading for that particular section of the website.
Pretty straightforward right? Well now using that PHP file is out of the question and I'm attempting to do everything inside the SWF instead of having it hit an outside script to get the numbers I need.
Is there any good way to get a file's size BEFORE I start loading it into flash? I really need the preloader to be a 0 to 100% preloader so I need the total number of bytes I will be downloading before it actually starts.
One thought I had was to just go through the array holding the file URLs, start loading them, getTotalBytes without displaying any loading, kill the load on the first tick, add up all those total bytes numbers, and then start the actual downloading process. This method seems very ugly and it will be a huge time waste as every time the user hits a pre loader on the site it will probably take a second or two to run through all the files, find their total and then actually start downloading.
Is there a better solution to this problem without going outside of flash to get the size of those files? | 0 |
67,557 | 09/15/2008 22:15:59 | 9,149 | 09/15/2008 17:51:03 | 1 | 2 | How to Audit Database Activity without Performance and Scalability Issues? | I have a need to do auditing all database activity regardless of whether it came from application or someone issuing some sql via other means. So the auditing must be done at the database level. The database in question is Oracle. I looked at doing it via Triggers and also via something called Fine Grained Auditing that Oracle provides. In both cases, we turned on auditing on specific tables and specific columns. However, we found that Performance really sucks when we use either of these methods.
Since auditing is an absolute must due to regulations placed around data privacy, I am wondering what is best way to do this without significant performance degradations. If someone has Oracle specific experience with this, it will be helpful but if not just general practices around database activity auditing will be okay as well.
| database | performance | oracle | audit | null | null | open | How to Audit Database Activity without Performance and Scalability Issues?
===
I have a need to do auditing all database activity regardless of whether it came from application or someone issuing some sql via other means. So the auditing must be done at the database level. The database in question is Oracle. I looked at doing it via Triggers and also via something called Fine Grained Auditing that Oracle provides. In both cases, we turned on auditing on specific tables and specific columns. However, we found that Performance really sucks when we use either of these methods.
Since auditing is an absolute must due to regulations placed around data privacy, I am wondering what is best way to do this without significant performance degradations. If someone has Oracle specific experience with this, it will be helpful but if not just general practices around database activity auditing will be okay as well.
| 0 |
67,559 | 09/15/2008 22:16:39 | 6,827 | 09/15/2008 12:41:25 | 3 | 3 | How do I fix a "broken" debugger in EclipseME? | How do I fix a broken debugger, one that just won't start, in EclipseME?
(This question has an answer which will be transferred from another question soon) | eclipse | eclipseme | java-me | debugging | null | null | open | How do I fix a "broken" debugger in EclipseME?
===
How do I fix a broken debugger, one that just won't start, in EclipseME?
(This question has an answer which will be transferred from another question soon) | 0 |
67,561 | 09/15/2008 22:16:52 | 2,361 | 08/21/2008 20:41:09 | 591 | 29 | Does fluent interfaces violate the Law of Demeter? | The [wikipedia article][1] about [Law of Demeter][3] says:
> The law can be stated simply as "use only one dot".
However a [simple example][4] of a [fluent interface][2] may look like this:
static void Main(string[] args)
{
new ZRLabs.Yael.Pipeline("cat.jpg")
.Rotate(90)
.Watermark("Monkey")
.RoundCorners(100, Color.Bisque)
.Save("test.png");
}
So does this goes together?
[1]: http://en.wikipedia.org/wiki/Law_Of_Demeter
[2]: http://en.wikipedia.org/wiki/Fluent_interface
[3]: http://c2.com/cgi/wiki/LawOfDemeter?LawOfDemeter
[4]: http://weblogs.asp.net/jgalloway/archive/2006/12/06/a-simple-example-of-a-fluent-interface.aspx | oop | desing | language-agnostic | null | null | null | open | Does fluent interfaces violate the Law of Demeter?
===
The [wikipedia article][1] about [Law of Demeter][3] says:
> The law can be stated simply as "use only one dot".
However a [simple example][4] of a [fluent interface][2] may look like this:
static void Main(string[] args)
{
new ZRLabs.Yael.Pipeline("cat.jpg")
.Rotate(90)
.Watermark("Monkey")
.RoundCorners(100, Color.Bisque)
.Save("test.png");
}
So does this goes together?
[1]: http://en.wikipedia.org/wiki/Law_Of_Demeter
[2]: http://en.wikipedia.org/wiki/Fluent_interface
[3]: http://c2.com/cgi/wiki/LawOfDemeter?LawOfDemeter
[4]: http://weblogs.asp.net/jgalloway/archive/2006/12/06/a-simple-example-of-a-fluent-interface.aspx | 0 |
67,581 | 09/15/2008 22:19:45 | 10,307 | 09/15/2008 22:19:45 | 1 | 0 | Comprehensive List of x86_64 Assembly Instructions | I'm doing a lab for a comp sci class that involves "defusing a binary bomb," basically reverse engineering a program to gain 6 "passwords." I was just looking for a list of all of the instructions in one, easy to read place.
Thanks
Alex | x86-64 | null | null | null | null | null | open | Comprehensive List of x86_64 Assembly Instructions
===
I'm doing a lab for a comp sci class that involves "defusing a binary bomb," basically reverse engineering a program to gain 6 "passwords." I was just looking for a list of all of the instructions in one, easy to read place.
Thanks
Alex | 0 |
67,621 | 09/15/2008 22:28:36 | 3,821 | 08/31/2008 02:41:10 | 87 | 12 | How to Call a method via AJAX without causing the page to render at all? | I am working with ASP.net.<br><br>
I am trying to call a method that exists on the base class for the page I am using. I want to call this method via Javascript and do not require any rendering to be handled by ASP.net.<br><br>
What would be the easiest way to accomplish this.
<br><br>
I have looked at PageMethods which for some reason are not working and found that a lot of other people have had trouble with them. | asp.net | ajax | asp.net-ajax | null | null | null | open | How to Call a method via AJAX without causing the page to render at all?
===
I am working with ASP.net.<br><br>
I am trying to call a method that exists on the base class for the page I am using. I want to call this method via Javascript and do not require any rendering to be handled by ASP.net.<br><br>
What would be the easiest way to accomplish this.
<br><br>
I have looked at PageMethods which for some reason are not working and found that a lot of other people have had trouble with them. | 0 |
67,628 | 09/15/2008 22:30:19 | 7,093 | 09/15/2008 13:09:49 | 96 | 13 | Deepzoom for WPF | Are there any ports to WPF of Silverlight's MultiScaleImage (aka DeepZoom)? Have Microsoft road-mapped this at all for WPF?
I want to move from WinForms to WPF and require something like DeepZoom, using Silverlight isn't an option. | wpf | silverlight | deepzoom | null | null | null | open | Deepzoom for WPF
===
Are there any ports to WPF of Silverlight's MultiScaleImage (aka DeepZoom)? Have Microsoft road-mapped this at all for WPF?
I want to move from WinForms to WPF and require something like DeepZoom, using Silverlight isn't an option. | 0 |
67,629 | 09/15/2008 22:30:41 | 10,333 | 09/15/2008 22:28:36 | 1 | 0 | What is "Client-only Framework subset" in Visual Studio 2008? | What does "Client-only Framework subset" in Visual Studio 2008 do? | .net | visual-studio-2008 | null | null | null | null | open | What is "Client-only Framework subset" in Visual Studio 2008?
===
What does "Client-only Framework subset" in Visual Studio 2008 do? | 0 |
67,631 | 09/15/2008 22:30:55 | 10,286 | 09/15/2008 22:08:59 | 1 | 0 | How to import module from file name | How can I load a python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option.
| python | configuration | null | null | null | null | open | How to import module from file name
===
How can I load a python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option.
| 0 |
67,640 | 09/15/2008 22:31:47 | 5,284 | 09/08/2008 21:00:02 | 21 | 1 | Other than Xcode, are there any full functioned IDEs for Objective C? | I know and have XCode, but I was wondering if there were any other complete development environments that support Objective C? I'm not looking for solutions with vim or emacs, nor editors like BBEdit that support syntax highlighting, but a full fledged IDE with:
- code completion
- compilation
- debugging
- refactoring
Extra points for being cross platform, supporting vi key bindings and supporting other languages.
| ide | objectivec | debugging | null | null | null | open | Other than Xcode, are there any full functioned IDEs for Objective C?
===
I know and have XCode, but I was wondering if there were any other complete development environments that support Objective C? I'm not looking for solutions with vim or emacs, nor editors like BBEdit that support syntax highlighting, but a full fledged IDE with:
- code completion
- compilation
- debugging
- refactoring
Extra points for being cross platform, supporting vi key bindings and supporting other languages.
| 0 |
67,647 | 09/15/2008 22:32:53 | 1,130 | 08/12/2008 16:39:54 | 70 | 4 | How to convert a FLV file to MP3 in C# ? | I'm looking for a way to extract the audio part of a FLV file. I googled it and I've found several implementations but none of them in C#.
I know I could use a tool like ffMpeg but I'd prefer a pure code solution.
**DISCLAIMER** : I'm not attempting to do anything illegal (like stealing copyrighted content...). This is a business requirement of the application I'm building. | c# | mp3 | flv | null | null | null | open | How to convert a FLV file to MP3 in C# ?
===
I'm looking for a way to extract the audio part of a FLV file. I googled it and I've found several implementations but none of them in C#.
I know I could use a tool like ffMpeg but I'd prefer a pure code solution.
**DISCLAIMER** : I'm not attempting to do anything illegal (like stealing copyrighted content...). This is a business requirement of the application I'm building. | 0 |
67,659 | 09/15/2008 22:35:15 | 83 | 08/01/2008 16:31:56 | 1,291 | 83 | Can a LINQ to SQL IsDiscriminator column NOT inherit? | I'm designing my database and LINQ To SQL ASP.NET web application.
Imagine I have two types of pages: normal and root. Some pages are roots. Some pages are not.
I have a Page database table and a RootPage database table:
Page
----
PK PageId
HtmlTitle
PageHeading
MetaDescription
IsRoot
RootPage
--------
FK PK PageId
FavIcon
StyleSheet
MasterPage
I think that if within my DBML file I set the IsDiscriminator property of the IsRoot column, then my RootPage class will inherit the Page class.
I want to be able to work like this in my code:
MyDataContext db = new MyDataContext();
var roots = from p in db.Pages
where p is RootPage
select (RootPage)p;
Or like this:
RootPage r = new RootPage();
r.HtmlTitle = "Foo";
r.FavIcon = "bar.ico";
...
db.Pages.Add(r);
db.SubmitChanges();
Can a LINQ to SQL IsDiscriminator column be nullable or false? Will this work? | .net | asp.net | linq | linq-to-sql | inheritance | null | open | Can a LINQ to SQL IsDiscriminator column NOT inherit?
===
I'm designing my database and LINQ To SQL ASP.NET web application.
Imagine I have two types of pages: normal and root. Some pages are roots. Some pages are not.
I have a Page database table and a RootPage database table:
Page
----
PK PageId
HtmlTitle
PageHeading
MetaDescription
IsRoot
RootPage
--------
FK PK PageId
FavIcon
StyleSheet
MasterPage
I think that if within my DBML file I set the IsDiscriminator property of the IsRoot column, then my RootPage class will inherit the Page class.
I want to be able to work like this in my code:
MyDataContext db = new MyDataContext();
var roots = from p in db.Pages
where p is RootPage
select (RootPage)p;
Or like this:
RootPage r = new RootPage();
r.HtmlTitle = "Foo";
r.FavIcon = "bar.ico";
...
db.Pages.Add(r);
db.SubmitChanges();
Can a LINQ to SQL IsDiscriminator column be nullable or false? Will this work? | 0 |
67,665 | 09/15/2008 22:36:00 | 3,617 | 08/29/2008 15:02:13 | 3 | 1 | IE7 CSS Scrolling Div Bug | I recently came across an IE7 only bug that I thought I'd share so when I come to this site 6 months from now to figure out the same thing, I'll have it on hand.
I believe the easiest way to recreate this bug would be the following:
<div style="overflow: auto; height: 150px;">
<div style="position: relative;">[...]</div>
</div>
In IE7, the outer div is a fixed size and the inner div is relatively positioned and contains more content (assuming the inner div causes an overflow). In all other browsers, this seems to work as expected. | html | css | internet-explorer-7 | bug | null | null | open | IE7 CSS Scrolling Div Bug
===
I recently came across an IE7 only bug that I thought I'd share so when I come to this site 6 months from now to figure out the same thing, I'll have it on hand.
I believe the easiest way to recreate this bug would be the following:
<div style="overflow: auto; height: 150px;">
<div style="position: relative;">[...]</div>
</div>
In IE7, the outer div is a fixed size and the inner div is relatively positioned and contains more content (assuming the inner div causes an overflow). In all other browsers, this seems to work as expected. | 0 |
67,666 | 09/15/2008 22:36:02 | 1,474 | 08/15/2008 18:54:27 | 21 | 2 | Backup/Restore database for oracle 10g testing | Using Oracle 10g with our testing server what is the most efficient/easy way to backup and restore a database to a static point, assuming that you always want to go back to the given point once a backup has been created.
A sample use case would be the following
1. install and configure all software
2. Modify data to the base testing point
3. take a backup somehow (this is part of the question, how to do this)
4. do testing
5. return to step 3 state (restore back to backup point, this is the other half of the question) | sql | oracle | backup | 10g | rman | null | open | Backup/Restore database for oracle 10g testing
===
Using Oracle 10g with our testing server what is the most efficient/easy way to backup and restore a database to a static point, assuming that you always want to go back to the given point once a backup has been created.
A sample use case would be the following
1. install and configure all software
2. Modify data to the base testing point
3. take a backup somehow (this is part of the question, how to do this)
4. do testing
5. return to step 3 state (restore back to backup point, this is the other half of the question) | 0 |
67,676 | 09/15/2008 22:38:26 | 7,277 | 09/15/2008 13:27:07 | 1 | 0 | DataSet.Select and DateTime | How can I use .NET DataSet.Select method to search records that match a DateTime?
What format should I use to enter my dates in? | c# | .net | dataset | null | null | null | open | DataSet.Select and DateTime
===
How can I use .NET DataSet.Select method to search records that match a DateTime?
What format should I use to enter my dates in? | 0 |
67,682 | 09/15/2008 22:39:36 | 10,352 | 09/15/2008 22:35:57 | 1 | 0 | How do I use Javascript to locate by X-Y Coordinates in my browser? | I'm trying to make it so when a user scrolls down a page, click a link, do whatever it is they need to do, and then come back to the pages w/ links, they are at the same (x-y) location in the browser they were before. How do I do that?
I'm a DOM Newbie so I don't know too much about how to do this.
Target Browsers: IE6/7/8, Firefox 2/3, Opera, Safari
| javascript | firefox | opera | coordinates | x-y | null | open | How do I use Javascript to locate by X-Y Coordinates in my browser?
===
I'm trying to make it so when a user scrolls down a page, click a link, do whatever it is they need to do, and then come back to the pages w/ links, they are at the same (x-y) location in the browser they were before. How do I do that?
I'm a DOM Newbie so I don't know too much about how to do this.
Target Browsers: IE6/7/8, Firefox 2/3, Opera, Safari
| 0 |
67,685 | 09/15/2008 22:39:47 | 8,279 | 09/15/2008 15:36:55 | 11 | 1 | How to concatenate webcam FLVs | I want my website to concatenate some webcam recordings in FLV files (like this one). This needs to be done on Linux without user input. How do I do this? For simplicity's sake, I'll use the same flv as both inputs in hope of getting a flv that plays the same thing twice in a row.
That should be easy enough, right? There's even a full code example in the [ffmpeg FAQ][1].
Well, pipes seem to be giving me problems (both on my mac running Leopard and on Ubunut 8.04) so let's keep it simple and use normal files. Also, if I don't specify a rate of 15 fps, the visual part plays [extremely fast][2]. The example script thus becomes:
ffmpeg -i input.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 \
- > temp.a < /dev/null
ffmpeg -i input.flv -an -f yuv4mpegpipe - > temp.v < /dev/null
cat temp.v temp.v > all.v
cat temp.a temp.a > all.a
ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \
-f yuv4mpegpipe -i all.v -sameq -y output.flv
Well, using this will work for the audio, but I only get the video the first time around. This seems to be the case for any flv I throw as input.flv, including the movie teasers that come with red5.
a) Why doesn't the example script work as advertised, in particular why do I not get all the video I'm expecting?
b) Why do I have to specify a framerate while Wimpy player can play the flv at the right speed?
The only way I found to concatenate two flvs was to use mencoder. Problem is, mencoder doesn't seem to concat flvs:
mencoder input.flv input.flv -o output.flv -of lavf -oac copy \
-ovc lavc -lavcopts vcodec=flv
I get a Floating point exception...
MEncoder 1.0rc2-4.0.1 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Xeon(R) CPU 5150 @ 2.66GHz (Family: 6, Model: 15, Stepping: 6)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
success: format: 0 data: 0x0 - 0x45b2f
libavformat file format detected.
[flv @ 0x697160]Unsupported audio codec (6)
[flv @ 0x697160]Could not find codec parameters (Audio: 0x0006, 22050 Hz, mono)
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [FLV1] 240x180 0bpp 1000.000 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:44 fourcc:0x31564C46 size:240x180 fps:1000.00 ftime:=0.0010
** MUXER_LAVF *****************************************************************
REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit
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: [ffflv] vfm: ffmpeg (FFmpeg Flash video)
==========================================================================
audiocodec: framecopy (format=6 chans=1 rate=22050 bits=16 B/s=0 sample-0)
VDec: vo config request - 240 x 180 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (240x180 fourcc=31564c46 [FLV1])
VIDEO CODEC ID: 22
AUDIO CODEC ID: 10007, TAG: 0
Writing header...
[NULL @ 0x67d110]codec not compatible with flv
Floating point exception
c) Is there a way for mencoder to decode and encode flvs correctly?
So the only way I've found so far to concat flvs, is to use ffmpeg to go back and forth between flv and avi, and use mencoder to concat the avis:
ffmpeg -i input.flv -vcodec rawvideo -acodec pcm_s16le -r 15 file.avi
mencoder -o output.avi -oac copy -ovc copy -noskip file.avi file.avi
ffmpeg -i output.avi output.flv
d) There must be a better way to achieve this... Which one?
e) Because of the problem of the framerate, though, only flvs with constant framerate (like the one I recorded through [facebook][1]) will be converted correctly to avis, but this won't work for the flvs I seem to be recording (like [this one][3] or [this one][4]). Is there a way to do this for these flvs too?
Any help would be very appreciated.
[1]: http://ffmpeg.mplayerhq.hu/faq.html#SEC31
[2]: http://www.marc-andre.ca/posts/blog/webcam/output-norate.flv
[3]: http://www.marc-andre.ca/posts/blog/webcam/test-wowza.flv
[4]: http://www.marc-andre.ca/posts/blog/webcam/test-red5-publisher.flv
| linux | flash | webcam | ffmpeg | mencoder | null | open | How to concatenate webcam FLVs
===
I want my website to concatenate some webcam recordings in FLV files (like this one). This needs to be done on Linux without user input. How do I do this? For simplicity's sake, I'll use the same flv as both inputs in hope of getting a flv that plays the same thing twice in a row.
That should be easy enough, right? There's even a full code example in the [ffmpeg FAQ][1].
Well, pipes seem to be giving me problems (both on my mac running Leopard and on Ubunut 8.04) so let's keep it simple and use normal files. Also, if I don't specify a rate of 15 fps, the visual part plays [extremely fast][2]. The example script thus becomes:
ffmpeg -i input.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 \
- > temp.a < /dev/null
ffmpeg -i input.flv -an -f yuv4mpegpipe - > temp.v < /dev/null
cat temp.v temp.v > all.v
cat temp.a temp.a > all.a
ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \
-f yuv4mpegpipe -i all.v -sameq -y output.flv
Well, using this will work for the audio, but I only get the video the first time around. This seems to be the case for any flv I throw as input.flv, including the movie teasers that come with red5.
a) Why doesn't the example script work as advertised, in particular why do I not get all the video I'm expecting?
b) Why do I have to specify a framerate while Wimpy player can play the flv at the right speed?
The only way I found to concatenate two flvs was to use mencoder. Problem is, mencoder doesn't seem to concat flvs:
mencoder input.flv input.flv -o output.flv -of lavf -oac copy \
-ovc lavc -lavcopts vcodec=flv
I get a Floating point exception...
MEncoder 1.0rc2-4.0.1 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Xeon(R) CPU 5150 @ 2.66GHz (Family: 6, Model: 15, Stepping: 6)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
success: format: 0 data: 0x0 - 0x45b2f
libavformat file format detected.
[flv @ 0x697160]Unsupported audio codec (6)
[flv @ 0x697160]Could not find codec parameters (Audio: 0x0006, 22050 Hz, mono)
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [FLV1] 240x180 0bpp 1000.000 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:44 fourcc:0x31564C46 size:240x180 fps:1000.00 ftime:=0.0010
** MUXER_LAVF *****************************************************************
REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit
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: [ffflv] vfm: ffmpeg (FFmpeg Flash video)
==========================================================================
audiocodec: framecopy (format=6 chans=1 rate=22050 bits=16 B/s=0 sample-0)
VDec: vo config request - 240 x 180 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (240x180 fourcc=31564c46 [FLV1])
VIDEO CODEC ID: 22
AUDIO CODEC ID: 10007, TAG: 0
Writing header...
[NULL @ 0x67d110]codec not compatible with flv
Floating point exception
c) Is there a way for mencoder to decode and encode flvs correctly?
So the only way I've found so far to concat flvs, is to use ffmpeg to go back and forth between flv and avi, and use mencoder to concat the avis:
ffmpeg -i input.flv -vcodec rawvideo -acodec pcm_s16le -r 15 file.avi
mencoder -o output.avi -oac copy -ovc copy -noskip file.avi file.avi
ffmpeg -i output.avi output.flv
d) There must be a better way to achieve this... Which one?
e) Because of the problem of the framerate, though, only flvs with constant framerate (like the one I recorded through [facebook][1]) will be converted correctly to avis, but this won't work for the flvs I seem to be recording (like [this one][3] or [this one][4]). Is there a way to do this for these flvs too?
Any help would be very appreciated.
[1]: http://ffmpeg.mplayerhq.hu/faq.html#SEC31
[2]: http://www.marc-andre.ca/posts/blog/webcam/output-norate.flv
[3]: http://www.marc-andre.ca/posts/blog/webcam/test-wowza.flv
[4]: http://www.marc-andre.ca/posts/blog/webcam/test-red5-publisher.flv
| 0 |
67,699 | 09/15/2008 22:42:07 | 117 | 08/02/2008 05:54:20 | 776 | 24 | How do I clone all remote branches with Git? | I have a master and a dev branch, both pushed to github, I've cloned, pulled, fetched, but I remain unable to get anything other than the master branch back.
I'm sure I'm missing something obvious, but I have RTM any I'm getting no joy at all.
--- | git | null | null | null | null | null | open | How do I clone all remote branches with Git?
===
I have a master and a dev branch, both pushed to github, I've cloned, pulled, fetched, but I remain unable to get anything other than the master branch back.
I'm sure I'm missing something obvious, but I have RTM any I'm getting no joy at all.
--- | 0 |
67,706 | 09/15/2008 22:43:53 | 1,107 | 08/12/2008 12:14:29 | 246 | 9 | LinqToSql and full text search | Has anyone come up with a good way of performing full text searches (`FREETEXT() CONTAINS()`) for any number of arbitrary keywords using standard LinqToSql query syntax?
I'd obviously like to avoid having to use a Stored Proc or have to generate a Dynamic SQL calls.
Obviously I could just pump the search string in on a parameter to a SPROC that uses FREETEXT() or CONTAINS(), but I was hoping to be more creative with the search and build up queries like:
"pepperoni pizza" and burger, not "apple pie".
Crazy I know - but wouldn't it be neat to be able to do this directly from LinqToSql? Any tips on how to achieve this would be much appreciated. | linq-to-sql | full-text-search | null | null | null | null | open | LinqToSql and full text search
===
Has anyone come up with a good way of performing full text searches (`FREETEXT() CONTAINS()`) for any number of arbitrary keywords using standard LinqToSql query syntax?
I'd obviously like to avoid having to use a Stored Proc or have to generate a Dynamic SQL calls.
Obviously I could just pump the search string in on a parameter to a SPROC that uses FREETEXT() or CONTAINS(), but I was hoping to be more creative with the search and build up queries like:
"pepperoni pizza" and burger, not "apple pie".
Crazy I know - but wouldn't it be neat to be able to do this directly from LinqToSql? Any tips on how to achieve this would be much appreciated. | 0 |
67,713 | 09/15/2008 22:46:21 | 10,155 | 09/15/2008 21:28:27 | 1 | 2 | How do display a form in any site's pages using a bookmarklet (like Note in Google Reader)? | In Google Reader, you can use a bookmarklet to "note" a page you're visiting. When you press the bookmarklet, a little Google form is displayed on top of the current page. In the form you can enter a description, etc. When you press Submit, the form submits itself without leaving the page, and then the form disappears. All in all, a very smooth experience.
I obviously tried to take a look at how it's done, but the most interesting parts are minified and unreadable. So...
Any ideas on how to implement something like this (on the browser side)? What issues are there? Existing blog posts describing this?
| javascript | bookmarklet | js | browser | null | null | open | How do display a form in any site's pages using a bookmarklet (like Note in Google Reader)?
===
In Google Reader, you can use a bookmarklet to "note" a page you're visiting. When you press the bookmarklet, a little Google form is displayed on top of the current page. In the form you can enter a description, etc. When you press Submit, the form submits itself without leaving the page, and then the form disappears. All in all, a very smooth experience.
I obviously tried to take a look at how it's done, but the most interesting parts are minified and unreadable. So...
Any ideas on how to implement something like this (on the browser side)? What issues are there? Existing blog posts describing this?
| 0 |
67,725 | 09/15/2008 22:48:30 | 1,152,057 | 09/15/2008 18:43:23 | 1 | 5 | Is there an algorithm that extracts meaningful tags of english text | I would like to extract a reduced collection of "meaningful" tags (10 max) out of an english text of any size.
[http://tagcrowd.com/][1] is quite interesting but the algorithm seems very basic (just word counting)
Is there any other existing algorithm to do this?
[1]: http://tagcrowd.com/ | algorithm | tags | semantic | null | null | null | open | Is there an algorithm that extracts meaningful tags of english text
===
I would like to extract a reduced collection of "meaningful" tags (10 max) out of an english text of any size.
[http://tagcrowd.com/][1] is quite interesting but the algorithm seems very basic (just word counting)
Is there any other existing algorithm to do this?
[1]: http://tagcrowd.com/ | 0 |
67,734 | 09/15/2008 22:50:40 | 1,538 | 08/16/2008 13:21:01 | 306 | 15 | Execute JavaScript from within a C# assembly | I'd like to execute JavaScript code from within a C# assembly and have the results of the JavaScript code returned to the calling C# code.
It's easier to define things that I'm not trying to do:
- I'm not trying to call a JavaScript
function on a web page from my code
behind.
- I'm not trying to load a WebBrowser
control.
- I don't want to have the JavaScript
perform an AJAX call to a server.
What I want to do is write unit tests in JavaScript and have then unit tests output JSON, even plain text would be fine. Then I want to have a generic C# class/executible that can load the file containing the JS, run the JS unit tests, scrap/load the results, and return a pass/fail with details during a post-build task.
I think it's possible using the old ActiveX ScriptControl, but it seems like there ought to be a .NET way to do this without using SilverLight, the DLR, or anything else that hasn't shipped yet. Anyone have any ideas? | javascript | csharp | .net | codedeom | null | null | open | Execute JavaScript from within a C# assembly
===
I'd like to execute JavaScript code from within a C# assembly and have the results of the JavaScript code returned to the calling C# code.
It's easier to define things that I'm not trying to do:
- I'm not trying to call a JavaScript
function on a web page from my code
behind.
- I'm not trying to load a WebBrowser
control.
- I don't want to have the JavaScript
perform an AJAX call to a server.
What I want to do is write unit tests in JavaScript and have then unit tests output JSON, even plain text would be fine. Then I want to have a generic C# class/executible that can load the file containing the JS, run the JS unit tests, scrap/load the results, and return a pass/fail with details during a post-build task.
I think it's possible using the old ActiveX ScriptControl, but it seems like there ought to be a .NET way to do this without using SilverLight, the DLR, or anything else that hasn't shipped yet. Anyone have any ideas? | 0 |
67,736 | 09/15/2008 22:51:04 | 10,391 | 09/15/2008 22:51:04 | 1 | 0 | WCF problem passing complex types | I have a service contract that defines a method with a parameter of type System.Object (xs:anyType in the WSDL). I want to be able to pass simple types as well as complex types in this parameter. Simple types work fine, but when I try to pass a complex type that is defined in my WSDL, I get this error:
Element 'http://tempuri.org/:value' contains data of the 'http://schemas.datacontract.org/2004/07/MyNamespace:MyClass' data contract. The deserializer has no knowledge of any type that maps to this contract. Add the type corresponding to 'MyClass' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.
Adding it as a known type doesn't help because it's already in my WSDL. How can I pass an object of a complex type via an "xs:anyType" parameter?
More info:
I believe this works when using NetDataContract, but I can't use that because my client is Silverlight.
I have seen references to complex types explicitly extending xs:anyType, but I have no idea how to make WCF generate a WSDL that does that, and I have no idea whether or not it would even help.
Thanks | .net | wcf | wsdl | null | null | null | open | WCF problem passing complex types
===
I have a service contract that defines a method with a parameter of type System.Object (xs:anyType in the WSDL). I want to be able to pass simple types as well as complex types in this parameter. Simple types work fine, but when I try to pass a complex type that is defined in my WSDL, I get this error:
Element 'http://tempuri.org/:value' contains data of the 'http://schemas.datacontract.org/2004/07/MyNamespace:MyClass' data contract. The deserializer has no knowledge of any type that maps to this contract. Add the type corresponding to 'MyClass' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.
Adding it as a known type doesn't help because it's already in my WSDL. How can I pass an object of a complex type via an "xs:anyType" parameter?
More info:
I believe this works when using NetDataContract, but I can't use that because my client is Silverlight.
I have seen references to complex types explicitly extending xs:anyType, but I have no idea how to make WCF generate a WSDL that does that, and I have no idea whether or not it would even help.
Thanks | 0 |
67,761 | 09/15/2008 22:54:58 | 4,495 | 09/04/2008 07:45:31 | 78 | 13 | NetworkStream.Write returns immediately - how can I tell when it has finished sending data? | Despite the documentation, NetworkStream.Write does not appear to wait until the data has been sent. Instead, it waits until the data has been copied to a buffer and then returns. That buffer is transmitted in the background.
This is the code I have at the moment. Whether I use ns.Write or ns.BeginWrite doesn't matter - both return immediately. The EndWrite also returns immediately (which makes sense since it is writing to the send buffer, not writing to the network).
bool done;
void SendData(TcpClient tcp, byte[] data)
{
NetworkStream ns = tcp.GetStream();
done = false;
ns.BeginWrite(bytWriteBuffer, 0, data.Length, myWriteCallBack, ns);
while (done == false) Thread.Sleep(10);
}
public void myWriteCallBack(IAsyncResult ar)
{
NetworkStream ns = (NetworkStream)ar.AsyncState;
ns.EndWrite(ar);
done = true;
}
How can I tell when the data has actually been sent to the client?
| c# | network-programming | null | null | null | null | open | NetworkStream.Write returns immediately - how can I tell when it has finished sending data?
===
Despite the documentation, NetworkStream.Write does not appear to wait until the data has been sent. Instead, it waits until the data has been copied to a buffer and then returns. That buffer is transmitted in the background.
This is the code I have at the moment. Whether I use ns.Write or ns.BeginWrite doesn't matter - both return immediately. The EndWrite also returns immediately (which makes sense since it is writing to the send buffer, not writing to the network).
bool done;
void SendData(TcpClient tcp, byte[] data)
{
NetworkStream ns = tcp.GetStream();
done = false;
ns.BeginWrite(bytWriteBuffer, 0, data.Length, myWriteCallBack, ns);
while (done == false) Thread.Sleep(10);
}
public void myWriteCallBack(IAsyncResult ar)
{
NetworkStream ns = (NetworkStream)ar.AsyncState;
ns.EndWrite(ar);
done = true;
}
How can I tell when the data has actually been sent to the client?
| 0 |
67,780 | 09/15/2008 22:58:52 | 1,541 | 08/16/2008 13:56:32 | 149 | 8 | Where can I find an example burn-down / planning game template? | I'd like to experiment with burn-down and planning game with the team I'm on. People on my team are interested in making it happen, however I'm sure someone has done this before and has learned some lessons we hopefully don't have to repeat. Does anyone know of an example Excel (or other tool) template available for burn-down or planning game activities? | project-management | templates | project-planning | null | null | null | open | Where can I find an example burn-down / planning game template?
===
I'd like to experiment with burn-down and planning game with the team I'm on. People on my team are interested in making it happen, however I'm sure someone has done this before and has learned some lessons we hopefully don't have to repeat. Does anyone know of an example Excel (or other tool) template available for burn-down or planning game activities? | 0 |
67,788 | 09/15/2008 23:00:47 | 7,577 | 09/15/2008 13:59:48 | 1 | 0 | Does MSSQL 2005 Scale to a Large Number of Databases? | If I add 3-400 databases to a single MSSQL server instance will I encounter scaling issues introduced by the large number of databases. | mssql | null | null | null | null | null | open | Does MSSQL 2005 Scale to a Large Number of Databases?
===
If I add 3-400 databases to a single MSSQL server instance will I encounter scaling issues introduced by the large number of databases. | 0 |
67,790 | 09/15/2008 23:01:10 | 10,394 | 09/15/2008 22:52:50 | 1 | 1 | Is there any way to pass a structure type to a c function | I have some code with multiple very similar functions to look up an item in a list based on the contents of one field in a structure. The only difference between the functions is the type of the structure that the lookup is occurring in. If I could pass in the type, I could remove all the code duplication. | c | null | null | null | null | null | open | Is there any way to pass a structure type to a c function
===
I have some code with multiple very similar functions to look up an item in a list based on the contents of one field in a structure. The only difference between the functions is the type of the structure that the lookup is occurring in. If I could pass in the type, I could remove all the code duplication. | 0 |
67,798 | 09/15/2008 23:03:18 | 10,392 | 09/15/2008 22:51:59 | 1 | 0 | Multiline C# Regex to match after a blank line | I'm looking for a multiline regex that will match occurrences after a blank line. For example, given a sample email below, I'd like to match "From: Alex". `^From:\s*(.*)$` works to match any From line, but I want it to be restricted to lines in the body (anything after the first blank line).
<pre>
Received: from a server
Date: today
To: Ted
From: James
Subject: [fwd: hi]
fyi
----- Forwarded Message -----
To: James
From: Alex
Subject: hi
Party!
</pre> | regex | null | null | null | null | null | open | Multiline C# Regex to match after a blank line
===
I'm looking for a multiline regex that will match occurrences after a blank line. For example, given a sample email below, I'd like to match "From: Alex". `^From:\s*(.*)$` works to match any From line, but I want it to be restricted to lines in the body (anything after the first blank line).
<pre>
Received: from a server
Date: today
To: Ted
From: James
Subject: [fwd: hi]
fyi
----- Forwarded Message -----
To: James
From: Alex
Subject: hi
Party!
</pre> | 0 |
67,810 | 09/15/2008 23:05:53 | 10,402 | 09/15/2008 22:55:51 | 1 | 0 | How to debug a JSP tomcat service using eclipse? | I would like to debug my separately running JSP/Struts/Tomcat/Hibernate application stack using the Eclipse IDE debugger. How do I setup the java JVM and eclipse so that I can set breakpoints, monitor variable values, and see the code that is currently executing? | java | eclipse | tomcat | debugging | null | null | open | How to debug a JSP tomcat service using eclipse?
===
I would like to debug my separately running JSP/Struts/Tomcat/Hibernate application stack using the Eclipse IDE debugger. How do I setup the java JVM and eclipse so that I can set breakpoints, monitor variable values, and see the code that is currently executing? | 0 |
67,831 | 09/15/2008 23:07:46 | 6,336 | 09/14/2008 09:56:07 | 144 | 16 | What is the best data access paradigm? | There are so many different options coming out of microsoft for data access. Which one is the best for scalable apps?
**Linq**
Should we be using Linq? It certainly seems easy but if you know your SQL does it really help. Also I hear that you can't run Async queries in ASP.NET using Linq. Therefore I wonder if it is really scalable? Are there any really big sites using Linq (With the possible exception of stackoverflow).
**Entity Framework**
Don't hear so much razzmatazz about the Entity Framework. Seems closer to the Object model I'm familure with.
**Astoria/Dynamic Data**
Should we be exposing our data as a service?
I'm pretty confused and thats before I get into the other ORM products like NHibernate. Any ideas or wisdom on which is better?
| asp.net | .net | linq | null | null | null | open | What is the best data access paradigm?
===
There are so many different options coming out of microsoft for data access. Which one is the best for scalable apps?
**Linq**
Should we be using Linq? It certainly seems easy but if you know your SQL does it really help. Also I hear that you can't run Async queries in ASP.NET using Linq. Therefore I wonder if it is really scalable? Are there any really big sites using Linq (With the possible exception of stackoverflow).
**Entity Framework**
Don't hear so much razzmatazz about the Entity Framework. Seems closer to the Object model I'm familure with.
**Astoria/Dynamic Data**
Should we be exposing our data as a service?
I'm pretty confused and thats before I get into the other ORM products like NHibernate. Any ideas or wisdom on which is better?
| 0 |
67,835 | 09/15/2008 23:08:36 | 10,439 | 09/15/2008 23:08:36 | 1 | 0 | Deleting a file in VBA | Using VBA, how can I (a) test whether a file exists, and if so, (b) delete it? | vba | null | null | null | null | null | open | Deleting a file in VBA
===
Using VBA, how can I (a) test whether a file exists, and if so, (b) delete it? | 0 |
67,875 | 09/15/2008 23:15:00 | 9,593 | 09/15/2008 19:17:26 | 28 | 2 | Good ways to Learn Cocoa? | I'd love to learn Cocoa, it seems like the best systems language for Mac OS X.
Can you recommend any useful ways to learn the language? Books, websites, example projects or even classes to take? | cocoa | null | null | null | null | null | open | Good ways to Learn Cocoa?
===
I'd love to learn Cocoa, it seems like the best systems language for Mac OS X.
Can you recommend any useful ways to learn the language? Books, websites, example projects or even classes to take? | 0 |
67,879 | 09/15/2008 23:16:10 | 1,965 | 08/19/2008 15:51:08 | 4,224 | 244 | Passing data between a parent app and a virtual directory | I have an application that runs as a child application in a virtual directory.
I want to pass a value from the parent application, but I believe that Session is keyed per application, and won't work.
To further complicate things, the parent application is WebForms, while the child is NVelocity MVC.
Does anyone know a trick that allows me to use some sort of Session type functionality between virtual applications?
| c# | asp.net | iis | null | null | null | open | Passing data between a parent app and a virtual directory
===
I have an application that runs as a child application in a virtual directory.
I want to pass a value from the parent application, but I believe that Session is keyed per application, and won't work.
To further complicate things, the parent application is WebForms, while the child is NVelocity MVC.
Does anyone know a trick that allows me to use some sort of Session type functionality between virtual applications?
| 0 |
67,890 | 09/15/2008 23:18:36 | 10,461 | 09/15/2008 23:18:36 | 1 | 0 | What's the best way to hash a url in ruby? |
I'm writing a web app that points to external links. I'm looking to create a non-sequential, non-guessable id for each document that I can use in the URL. I did the obvious thing: treating the url as a string and str#crypt on it, but that seems to choke on any non-alphanumberic characters, like the slashes, dots and underscores.
Any suggestions on the best way to solve this problem?
Thanks!
| ruby | null | null | null | null | null | open | What's the best way to hash a url in ruby?
===
I'm writing a web app that points to external links. I'm looking to create a non-sequential, non-guessable id for each document that I can use in the URL. I did the obvious thing: treating the url as a string and str#crypt on it, but that seems to choke on any non-alphanumberic characters, like the slashes, dots and underscores.
Any suggestions on the best way to solve this problem?
Thanks!
| 0 |
67,894 | 09/15/2008 23:19:52 | 1,597 | 08/17/2008 10:01:21 | 242 | 14 | Why do we need extern "C"{ #include <foo.h> } in C++? | **Specifically:**
- When should we use it?
- What is happening at the compiler/linker level that requires us to use it?
- How in terms of compilation/linking does this solve the problems which require us to use it?
| c++ | c | compiler | linker | null | null | open | Why do we need extern "C"{ #include <foo.h> } in C++?
===
**Specifically:**
- When should we use it?
- What is happening at the compiler/linker level that requires us to use it?
- How in terms of compilation/linking does this solve the problems which require us to use it?
| 0 |
67,898 | 09/15/2008 23:21:22 | 5,302 | 09/08/2008 22:49:47 | 128 | 13 | TDD and productivity | Ignoring the obvious benefits after the code has been written, I am interested to get a rough idea how much productivity is initially lost, or how much extra time is initially required, due to the requirements of TDD.
I am aware of the benefits of TDD and the productivity gains that come from writing less buggy code, I am just interested here in understanding the initial cost of implementing it. | productivity | tdd | null | null | null | 07/06/2012 17:59:45 | off topic | TDD and productivity
===
Ignoring the obvious benefits after the code has been written, I am interested to get a rough idea how much productivity is initially lost, or how much extra time is initially required, due to the requirements of TDD.
I am aware of the benefits of TDD and the productivity gains that come from writing less buggy code, I am just interested here in understanding the initial cost of implementing it. | 2 |
67,916 | 09/15/2008 23:24:17 | 10,479 | 09/15/2008 23:24:17 | 1 | 0 | lambada expressions in vb.net | I have something that is driving me absolutely crazy...
Public Function GetAccountGroups() As IList(Of AccountGroup)
Dim raw_account_groups As IList(Of AccountGroup)
raw_account_groups = _repository.GetAccountGroups().ToList()
Dim parents = (From ag In raw_account_groups _
Where ag.parent_id = 0 _
Select ag).ToList()
parents(0).sub_account_groups = (From sag In raw_account_groups _
Where sag.parent_id = 0 _
Select sag).ToList()
Dim sql_func As Func(Of AccountGroup, List(Of AccountGroup)) = Function(p) _
(From sag In raw_account_groups _
Where sag.parent_id = p.id _
Select sag).ToList()
parents.ForEach(Function(p) p.sub_account_groups = sql_func(p))
Return parents
End Function
The line "parents.ForEach(Function(p) p.sub_account_groups = sql_func(p))" has this error...
Operator '=' is not defined for types 'System.Collections.Generic.IList(Of st.data.AccountGroup)' and 'System.Collections.Generic.List(Of st.data.AccountGroup)'.
but I really can't see how it is any different from this code from Rob Connery
public IList<Category> GetCategories() {
IList<Category> rawCategories = _repository.GetCategories().ToList(); var parents = (from c in rawCategories
where c.ParentID == 0
select c).ToList();
parents.ForEach(p =>
{
p.SubCategories = (from subs in rawCategories
where subs.ParentID == p.ID
select subs).ToList();
});
return parents;
}
which compiles perfectly... what am I doing incorrectly?
Thanks in advance,
David
| vb.net | linq | null | null | null | null | open | lambada expressions in vb.net
===
I have something that is driving me absolutely crazy...
Public Function GetAccountGroups() As IList(Of AccountGroup)
Dim raw_account_groups As IList(Of AccountGroup)
raw_account_groups = _repository.GetAccountGroups().ToList()
Dim parents = (From ag In raw_account_groups _
Where ag.parent_id = 0 _
Select ag).ToList()
parents(0).sub_account_groups = (From sag In raw_account_groups _
Where sag.parent_id = 0 _
Select sag).ToList()
Dim sql_func As Func(Of AccountGroup, List(Of AccountGroup)) = Function(p) _
(From sag In raw_account_groups _
Where sag.parent_id = p.id _
Select sag).ToList()
parents.ForEach(Function(p) p.sub_account_groups = sql_func(p))
Return parents
End Function
The line "parents.ForEach(Function(p) p.sub_account_groups = sql_func(p))" has this error...
Operator '=' is not defined for types 'System.Collections.Generic.IList(Of st.data.AccountGroup)' and 'System.Collections.Generic.List(Of st.data.AccountGroup)'.
but I really can't see how it is any different from this code from Rob Connery
public IList<Category> GetCategories() {
IList<Category> rawCategories = _repository.GetCategories().ToList(); var parents = (from c in rawCategories
where c.ParentID == 0
select c).ToList();
parents.ForEach(p =>
{
p.SubCategories = (from subs in rawCategories
where subs.ParentID == p.ID
select subs).ToList();
});
return parents;
}
which compiles perfectly... what am I doing incorrectly?
Thanks in advance,
David
| 0 |
67,929 | 09/15/2008 23:27:30 | 10,476 | 09/15/2008 23:23:24 | 1 | 0 | Copying data from one DataTable to another | What is the fastest way of transferring few thousand rows of data from one DataTable to another? Would be great to see some sample code snippets. | ado.net | c# | null | null | null | null | open | Copying data from one DataTable to another
===
What is the fastest way of transferring few thousand rows of data from one DataTable to another? Would be great to see some sample code snippets. | 0 |
67,937 | 09/15/2008 23:28:56 | 8,855 | 09/15/2008 17:02:21 | 1 | 0 | How can I import a raw RSS feed in C#? | Does anyone know an easy way to import a raw, XML RSS feed into C#? Am looking for an easy way to get the XML as a string so I can parse it with a Regex.
Thanks,
-Greg
| import | xml | rss | c# | null | null | open | How can I import a raw RSS feed in C#?
===
Does anyone know an easy way to import a raw, XML RSS feed into C#? Am looking for an easy way to get the XML as a string so I can parse it with a Regex.
Thanks,
-Greg
| 0 |
67,959 | 09/15/2008 23:35:14 | 109 | 08/02/2008 00:20:47 | 370 | 11 | C# XML serialization gotchas | I've run into a few gotchas when doing C# XML serialization that I thought I'd share:
* You can't serialize items that are read-only (like KeyValuePairs)
* You can't serialize a generic dictionary. Instead, try this wrapper class (from http://weblogs.asp.net/pwelter34/archive/2006/05/03/444961.aspx):
<hr/>
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
[XmlRoot("dictionary")]
public class SerializableDictionary<TKey, TValue> : Dictionary<TKey, TValue>, IXmlSerializable
{
#region IXmlSerializable Members
public System.Xml.Schema.XmlSchema GetSchema()
{
return null;
}
public void ReadXml(System.Xml.XmlReader reader)
{
XmlSerializer keySerializer = new XmlSerializer(typeof(TKey));
XmlSerializer valueSerializer = new XmlSerializer(typeof(TValue));
bool wasEmpty = reader.IsEmptyElement;
reader.Read();
if (wasEmpty)
return;
while (reader.NodeType != System.Xml.XmlNodeType.EndElement)
{
reader.ReadStartElement("item");
reader.ReadStartElement("key");
TKey key = (TKey)keySerializer.Deserialize(reader);
reader.ReadEndElement();
reader.ReadStartElement("value");
TValue value = (TValue)valueSerializer.Deserialize(reader);
reader.ReadEndElement();
this.Add(key, value);
reader.ReadEndElement();
reader.MoveToContent();
}
reader.ReadEndElement();
}
public void WriteXml(System.Xml.XmlWriter writer)
{
XmlSerializer keySerializer = new XmlSerializer(typeof(TKey));
XmlSerializer valueSerializer = new XmlSerializer(typeof(TValue));
foreach (TKey key in this.Keys)
{
writer.WriteStartElement("item");
writer.WriteStartElement("key");
keySerializer.Serialize(writer, key);
writer.WriteEndElement();
writer.WriteStartElement("value");
TValue value = this[key];
valueSerializer.Serialize(writer, value);
writer.WriteEndElement();
writer.WriteEndElement();
}
}
#endregion
}
Any other XML gotchas out there? | c# | xml | serialization | null | null | 04/14/2012 20:17:43 | not constructive | C# XML serialization gotchas
===
I've run into a few gotchas when doing C# XML serialization that I thought I'd share:
* You can't serialize items that are read-only (like KeyValuePairs)
* You can't serialize a generic dictionary. Instead, try this wrapper class (from http://weblogs.asp.net/pwelter34/archive/2006/05/03/444961.aspx):
<hr/>
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
[XmlRoot("dictionary")]
public class SerializableDictionary<TKey, TValue> : Dictionary<TKey, TValue>, IXmlSerializable
{
#region IXmlSerializable Members
public System.Xml.Schema.XmlSchema GetSchema()
{
return null;
}
public void ReadXml(System.Xml.XmlReader reader)
{
XmlSerializer keySerializer = new XmlSerializer(typeof(TKey));
XmlSerializer valueSerializer = new XmlSerializer(typeof(TValue));
bool wasEmpty = reader.IsEmptyElement;
reader.Read();
if (wasEmpty)
return;
while (reader.NodeType != System.Xml.XmlNodeType.EndElement)
{
reader.ReadStartElement("item");
reader.ReadStartElement("key");
TKey key = (TKey)keySerializer.Deserialize(reader);
reader.ReadEndElement();
reader.ReadStartElement("value");
TValue value = (TValue)valueSerializer.Deserialize(reader);
reader.ReadEndElement();
this.Add(key, value);
reader.ReadEndElement();
reader.MoveToContent();
}
reader.ReadEndElement();
}
public void WriteXml(System.Xml.XmlWriter writer)
{
XmlSerializer keySerializer = new XmlSerializer(typeof(TKey));
XmlSerializer valueSerializer = new XmlSerializer(typeof(TValue));
foreach (TKey key in this.Keys)
{
writer.WriteStartElement("item");
writer.WriteStartElement("key");
keySerializer.Serialize(writer, key);
writer.WriteEndElement();
writer.WriteStartElement("value");
TValue value = this[key];
valueSerializer.Serialize(writer, value);
writer.WriteEndElement();
writer.WriteEndElement();
}
}
#endregion
}
Any other XML gotchas out there? | 4 |
67,964 | 09/15/2008 23:36:21 | 1,436 | 08/15/2008 15:43:19 | 463 | 22 | What is the best free way to clean up Word HTML? | Please provide the single best option you are aware of. | html | word | null | null | null | null | open | What is the best free way to clean up Word HTML?
===
Please provide the single best option you are aware of. | 0 |
67,980 | 09/15/2008 23:38:35 | 7,199 | 09/15/2008 13:20:14 | 1 | 0 | How do I register a custom type converter in Spring? | I need to pass a UUID instance via http request parameter. Spring needs a custom type converter (from String) to be registered. How do I register one? | java | spring | null | null | null | null | open | How do I register a custom type converter in Spring?
===
I need to pass a UUID instance via http request parameter. Spring needs a custom type converter (from String) to be registered. How do I register one? | 0 |
68,006 | 09/15/2008 23:43:09 | 10,504 | 09/15/2008 23:32:44 | 1 | 0 | Simple free-or-cheap tool for rolling out Windows XP + standardized apps to a small computer lab? | I manage a high-school computer lab with ~40 machines, have old PCs with varying hardware. I need to roll out Windows XP + a standard set of apps and settings for new machines, and to re-format older machines.
What tool is available to help with this? It doesn't have to be perfect, but if it minimizes the time I set in front of machines installing programs and tweaking settings, it's a win. | windows | windows-xp | system-administration | null | null | 01/12/2012 12:18:56 | not constructive | Simple free-or-cheap tool for rolling out Windows XP + standardized apps to a small computer lab?
===
I manage a high-school computer lab with ~40 machines, have old PCs with varying hardware. I need to roll out Windows XP + a standard set of apps and settings for new machines, and to re-format older machines.
What tool is available to help with this? It doesn't have to be perfect, but if it minimizes the time I set in front of machines installing programs and tweaking settings, it's a win. | 4 |
68,015 | 09/15/2008 23:46:15 | 10,472 | 09/15/2008 23:22:18 | 1 | 0 | Folder with Extension | I'm looking to have windows recognize that certain folders are associated to my application - maybe by naming the folder 'folder.myExt'.
Can this be done via the registry?
A bit more info<br>
- This is for a x-platform app ( that's why I suggested the folder with an extension - mac can handle that ) <br>
- The RAD I'm using doesn't read write binary data efficiently enough as the size of this 'folder' will be upwards of 2000 files and 500Mb
| windows | registry | null | null | null | null | open | Folder with Extension
===
I'm looking to have windows recognize that certain folders are associated to my application - maybe by naming the folder 'folder.myExt'.
Can this be done via the registry?
A bit more info<br>
- This is for a x-platform app ( that's why I suggested the folder with an extension - mac can handle that ) <br>
- The RAD I'm using doesn't read write binary data efficiently enough as the size of this 'folder' will be upwards of 2000 files and 500Mb
| 0 |
68,018 | 09/15/2008 23:46:38 | 10,522 | 09/15/2008 23:42:06 | 1 | 0 | ResourceBundle from Java/Struts and replace expressions | If I have a Resource bundle property file:
A.properties:
thekey={0} This is a test
And then I have java code that loads the resource bundle:
ResourceBundle labels =
ResourceBundle.getBundle("A", currentLocale);
labels.getString("thekey");
How can I replace the {0} text with some value
labels.getString("thekey", "Yes!!!");
Such that the output comes out as:
Yes!!! This is a test.
There are no methods that are part of Resource Bundle to do this. Also, I am in Struts, is there some way to use MessageProperties to do the replacement.
| java | java-ee | struts | resourcebundle | null | null | open | ResourceBundle from Java/Struts and replace expressions
===
If I have a Resource bundle property file:
A.properties:
thekey={0} This is a test
And then I have java code that loads the resource bundle:
ResourceBundle labels =
ResourceBundle.getBundle("A", currentLocale);
labels.getString("thekey");
How can I replace the {0} text with some value
labels.getString("thekey", "Yes!!!");
Such that the output comes out as:
Yes!!! This is a test.
There are no methods that are part of Resource Bundle to do this. Also, I am in Struts, is there some way to use MessageProperties to do the replacement.
| 0 |
68,067 | 09/15/2008 23:58:22 | 7,173 | 09/15/2008 13:18:17 | 1 | 0 | How To Generate A Javascript File From The Server | I'm using BlogEngine.NET (a fine, fine tool) and I was playing with the TinyMCE editor and noticed that there's a place for me to create a list of external links, but it has to be a javascript file:
`external_link_list_url : "example_link_list.js"`
this is great, of course, but the list of links I want to use needs to be generated dynamically from the database. This means that I need to create this JS file from the server on page load. Does anyone know of a way to do this? Ideally, I'd like to just overwrite this file each time the editor is accessed.
Thanks! | c# | asp.net | javascript | tinymce | blogengine.net | null | open | How To Generate A Javascript File From The Server
===
I'm using BlogEngine.NET (a fine, fine tool) and I was playing with the TinyMCE editor and noticed that there's a place for me to create a list of external links, but it has to be a javascript file:
`external_link_list_url : "example_link_list.js"`
this is great, of course, but the list of links I want to use needs to be generated dynamically from the database. This means that I need to create this JS file from the server on page load. Does anyone know of a way to do this? Ideally, I'd like to just overwrite this file each time the editor is accessed.
Thanks! | 0 |
68,072 | 09/15/2008 23:58:57 | 2,555 | 08/22/2008 20:27:46 | 201 | 8 | How would I host an external application in WPF? | How can I host a (.Net, Java, VB6, MFC, etc) application in a WPF window. I have a need to use WPF windows to wrap external applications and control the window size and location. does anyone have any ideas on how to accomplish this or a direction to research in? | wpf | hosting | external | null | null | null | open | How would I host an external application in WPF?
===
How can I host a (.Net, Java, VB6, MFC, etc) application in a WPF window. I have a need to use WPF windows to wrap external applications and control the window size and location. does anyone have any ideas on how to accomplish this or a direction to research in? | 0 |
68,074 | 09/15/2008 23:59:09 | 8,819 | 09/15/2008 16:56:20 | 1 | 1 | Good way to learn Scala? | I've recently become interested in learning Scala, my first thought was a simple compiler, but I don't have very good knowledge of Automata theory.
So my question is: what's a good project or tutorial to learn scala with? | compiler | scala | automata | null | null | null | open | Good way to learn Scala?
===
I've recently become interested in learning Scala, my first thought was a simple compiler, but I don't have very good knowledge of Automata theory.
So my question is: what's a good project or tutorial to learn scala with? | 0 |
68,084 | 09/16/2008 00:00:46 | 10,541 | 09/15/2008 23:50:03 | 1 | 1 | Switching from C# to C++. Any must-reads? | I'm trying to find a least-resistance path from C# to C++, and while I feel I handle C# pretty well after two solid years, I'm still not sure I've gotten the "groove" of C++, despite numerous attempts.
Are there any particular books or websites that might be suitable for this transition? | c# | c++ | null | null | null | null | open | Switching from C# to C++. Any must-reads?
===
I'm trying to find a least-resistance path from C# to C++, and while I feel I handle C# pretty well after two solid years, I'm still not sure I've gotten the "groove" of C++, despite numerous attempts.
Are there any particular books or websites that might be suitable for this transition? | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.