Search Results

Search found 3180 results on 128 pages for 'david sauter'.

Page 103/128 | < Previous Page | 99 100 101 102 103 104 105 106 107 108 109 110  | Next Page >

  • How to assemble a WAV file?

    - by David
    I'm doing an educational project in which 1) I record voice commands on a separate device and after appropriate processing etc... 2) I send 16-bit samples encapsulated in UDP packets over Ethernet to the PC. After receiving the packets and "extracting" data (samples) from them, I need to assemble the samples to a WAV file. Any example code? Any suggestions?

    Read the article

  • interpreting assembly instructions

    - by David Lee
    I am trying to translate the following: Action: pushl %ebp movl %esp, %eax subl $32, %esp movl $0, -8(%eax) movl $0, -4(%eax) movl -4(%eax), %eax cmpl 32(%eax), %ebp movl -4(%ebp), %eax sall $2, %ebp addl 8(%ebp), %ebp movl (%ebp), %ebp addl %ebp, -8(%eax) addl $1, -4(%eax) What is the best way to learn assembly and translating this code?

    Read the article

  • Regex to split a string (in Java) so that spaces are preserved?

    - by david
    I need to split a string (in Java) into individual words ... but I need to preserve spaces. An example of the text I need to split is something like this: ABC . . . . DEF . . . . GHI I need to see "ABC", " . . . .", "DEF", ". . . .", and "GHI". Obviously splitting on the space character \s isn't going to work, as all the spaces get swallowed up as one space. Any suggestions? Thanks

    Read the article

  • Mercurial: include revisions in diff?

    - by David Wolever
    Is there some way to ask Mercurial to show the revisions being diffed in the output? For example: $ hg diff -r trunk:development diff -r 08d51ecf22cf:ff5673e55b9f --git a/foo.c b/foo.c ... Or something similar? I've found that there have been a few times that I've taken a diff (eg, to review), but have later been unable to recreate it because I've forgotten which revisions it was taken against.

    Read the article

  • How to call a custom php file on magento product page

    - by David
    if getChildHtml('product_type_data') ? maps directly to catalog/product/view/type/simple.phtml by default, how do I map to my own file? If I wanted to create a file that would produce a small image to place on the product page, right under "availability" how would I tell magento to map to where I have put the file? From what I understand getChildHtml('product_type_data') ? defaults to the file path: catalog/product/view/type/simple.phtml so how can I customize the magento defaults and tell it to map to my custom files i've created? I hope I have explained this well enough, if not, please let me know and I will try to explain more. Any help or guidance would be awesome. Thanks.

    Read the article

  • How to get number of elements of a class before a certain element

    - by David Shaikh
    I want to know how many elements of a certain class appear in the DOM before an element that let's say has been clicked on. <html> <div class="a"> </div> <div class="b"> <div class="a"> </div> </div> <button>CLick me!</button> <div class="a"> </div> </html> So in the previous DOM tree if the element to be clicked is the button, and Im looking for divs with class "a" it should return 2, even though in the whole tree there are 3, but "before" the button there are only 2. How could I do that? Thanks

    Read the article

  • Waiting for a subset of threads in a Java ThreadPool

    - by David Semeria
    Let's say I have a thread pool containing X items, and a given task employs Y of these items (where Y is much smaller than X). I want to wait for all of the threads of a given task (Y items) to finish, not the entire thread pool. If the thread pool's execute() method returned a reference to the employed thread I could simply join() to each of these Y threads, but it doesn't. Does anyone know of an elegant way to accomplish this? Thanks.

    Read the article

  • Combining Content Data in Google Analytics

    - by David Csonka
    When I first start one of my Wordpress blogs, I had the permanent URL for each post include the date of posting. The slug format looked like this: /blog/2010/01/25/this-is-my-article/ Later on, I changed it so that the date was not included in the permanent URL, like this: /blog/this-is-my-article/ and setup a redirect plugin to make sure that users would get to the page they wanted until the site was re-indexed. In Google Analytics, when I review the stats for content I now have multiple records for what is essentially the same page. ie: Top Content List: 45 Pageviews- /blog/this-is-my-article/ 24 Pageviews- /blog/2010/01/25/this-is-my-article/ 33 Pageviews- /blog/some-other-article/ Is there any way to combine those records somehow?

    Read the article

  • Limiting what a .net plugin can access

    - by David Hogue
    I have a web application that can load plugins through reflection. It currently uses Assembly.LoadFrom() and Activator.CreateInstance() to get this done. Right now plugins are loaded into the same AppDomain and have access to anything in my app and anything my app could access. What I'm looking for is a way to limit what classes and methods the plugin can access for security purposes. I want to have all of my classes and methods throw an exception when called unless they are whitelisted. I'd be whitelisting basically all the functions in an API class and a few data transfer objects. I also don't want the plugin to be able to access the filesystem or the database on it's own. I think I can do that with trust levels in a separate AppDomain though. Does anyone out there have any good ideas or resources? Is this something that could be done with Code Access Security or the new Security-Transparent Code features in .net 4?

    Read the article

  • CENTOS Named (BIND DNS) and OPENVPN - How to allow VPN clients to Connect to BIND as DNS

    - by David
    Hi, I have setup OpenVPN. All seems to be working fine except that Name Lookups are not done via the BIND DNS server on the server. I have added push "redirect-gateway def1" and push "dhcp-option DNS 10.8.0.1" to the OpenVPN server config. It does seem like this is being pushed to the Client. The problem however is that I believe the BIND DNS is not allowing the Client to connect and do name lookups. How do I go about configuring BIND to allow connections from the VPN clients?

    Read the article

  • Confused about std::runtime_error vs. std::logic_error

    - by David Gladfelter
    I recently saw that the boost program_options library throws a logic_error if the command-line input was un-parsable. That challenged my assumptions about logic_error vs. runtime_error. I assumed that logic errors (logic_error and its derived classes) were problems that resulted from internal failures to adhere to program invariants, often in the form of illegal arguments to internal API's. In that sense they are largely equivalent to ASSERT's, but meant to be used in released code (unlike ASSERT's which are not usually compiled into released code.) They are useful in situations where it is infeasible to integrate separate software components in debug/test builds or the consequences of a failure are such that it is important to give runtime feedback about the invalid invariant condition to the user. Similarly, I thought that runtime_errors resulted exclusively from runtime conditions outside of the control of the programmer: I/O errors, invalid user input, etc. However, program_options is obviously heavily (primarily?) used as a means of parsing end-user input, so under my mental model it certainly should throw a runtime_error in the case of bad input. Where am I going wrong? Do you agree with the boost model of exception typing?

    Read the article

  • Where is my software installed in Linux?

    - by David
    I use whereis matlab and find: /usr/local/bin/matlab , which is a very long bash file. How can I find where matlab is installed, I mean, its installed folder. EDIT: I used the following method: open matlab and use edit svds.m to open the svds.m file and the editor shows the folder:)

    Read the article

  • What is the worst source control you have used? [closed]

    - by David Liddle
    There are many discussions about what people's favourite source control is (subversion, mercurial ...). But what source control systems have you used that you certainly wouldn't recommend? And more beneficial, how would you go about promoting change in the business to a new source control system? A few years ago I developed using a source control system called Synergy. There were two Synergy experts in the company that constantly had to help the developers do check-ins/outs and merges were especially difficult. What would be your steps of migrating to a better source control. Would you host everything internally or pay for services such as github?

    Read the article

  • XPATH remove attribute

    - by David
    Hi does anyone know hwo to remove an attrbute using xpath. In particular the rel attribute and its text from a link. i.e. <a href='http://google.com' rel='some text'>Link</a> and i want to remove rel='some text'. There will be multiple links in the html i am parsing.

    Read the article

  • Why is `goog.Disposable.call(this);` necessary?

    - by David Faux
    In this snippet of Google Closure javascript code involving a constructor, why is goog.Disposable.call(this); necessary? Doesn't Foo already inherit from Disposable with goog.inherits(foo, goog.Disposable);? goog.provide('foo'); /** * @constructor */ foo = function(){ goog.Disposable.call(this); } goog.inherits(foo, goog.Disposable); foo.prototype.doSomething = function(){ ... } foo.prototype.disposeInternal = function(){ ... }

    Read the article

  • Union and order by

    - by David Lively
    Consider a table like tbl_ranks -------------------------------- family_id | item_id | view_count -------------------------------- 1 10 101 1 11 112 1 13 109 2 21 101 2 22 112 2 23 109 3 30 101 3 31 112 3 33 109 4 40 101 4 51 112 4 63 109 5 80 101 5 81 112 5 88 109 I need to generate a result set with the top two(2) rows for a subset of family ids (say, 1,2,3 and 4) ordered by view count. I'd like to do something like select top 2 * from tbl_ranks where family_id = 1 order by view_count union all select top 2 * from tbl_ranks where family_id = 2 order by view_count union all select top 2 * from tbl_ranks where family_id = 3 order by view_count union all select top 2 * from tbl_ranks where family_id = 4 order by view_count but, of course, order by isn't valid in a union all context in this manner. Any suggestions? I know I could run a set of 4 queries, store the results into a temp table and select the contents of that temp as the final result, but I'd rather avoid using a temp table if possible. Note: in the real app, the number of records per family id is indeterminate, and the view_counts are also not fixed as they appear in the above example.

    Read the article

  • Unit testing a functions whose purposes is side effects

    - by David
    How would you unit test do_int_to_string_conversion? #include <string> #include <iostream> void do_int_to_string_conversion(int i, std::string& s) { switch(i) { case 1: s="1"; break; case 2: s="2"; break; default: s ="Nix"; } std::cout << s << "\n"; } int main(int argc, char** argv){ std::string little_s; do_int_to_string_conversion(1, little_s); do_int_to_string_conversion(2, little_s); do_int_to_string_conversion(3, little_s); }

    Read the article

  • MySQL transaction conundrum

    - by David Faitelson
    I need to perform several inserts in a single atomic transaction. For example: start transaction; insert ... insert ... commit; However when MySQL encounters an error it aborts only the particular statement that caused the error. For example, if there is an error in the second insert statement the commit will still take place and the first insert statement will be recorded. Thus, when errors occur a MySQL transaction is not really a transaction. To overcome this problem I have used an error exit handler where I rollback the transaction. Now the transaction is silently aborted but I don't know what was the problem. So here is the conundrum for you: How can I both make MySQL abort a transaction when it encounters an error, and pass the error code on to the caller?

    Read the article

  • Fetch Products Grouped By Total Sales ?

    - by David
    Hi, I have the following MySQL tables: TABLE: Products ---------------------- id | productname 1030 | xBox 360 1031 | PlayStation 3 1032 | iPod Touche TABLE: Sales ---------------------- productid | saledate 1031 | 2010-06-14 06:30:12 1031 | 2010-06-14 08:54:38 1030 | 2010-06-14 08:58:10 1032 | 2010-06-14 10:12:47 I want to fetch using php the products i sold today and groupe them by sales number and order by sale date (if possible) , example of Output: Today's statistics: -Playstation 3 (2 sales) -Xbox 360 (1 sale) -iPod Touche (1 sale) Thanks

    Read the article

  • Designers, Expression or SharePoint Designer, and real source control

    - by David Lively
    I'm trying desperately to move from VSS to a real source control system. Options include TFS and SVN. My designers need to keep their ability to modify source files and instantly preview their changes in a browser without having to commit their changes. Using FPSE with VSS, this works flawlessly, since saving a file causes the copy in the working folder on the dev server to be updated, so they can just save and refresh their browser which is pointed at the dev server. The site in question consists of 350k+ lines of classic ASP code and some new ASP.NET MVC. They only need to be able to modify views within the MVC code, not C#. Though Expression includes a version of Cassini for local debugging, Cassini does not support classic ASP. Surely someone has solved this problem before. It can't be necessary to install IIS on each designer's machine (this is absolutely untenable). I need a way to have a common working folder on a dev webserver updated whenever someone saves a file locally, just like using FPSE. I'd rather not write an FPSE proxy that knows how to talk to TFS/SVN. Any suggestions? (I know I've asked this question in the past, but I haven't yet found a solution.)

    Read the article

  • Calling C++/CLI Method with System::DateTime parameter requires 'ValueType' as a parameter?

    - by David Ipsen
    I'm attempting to call a method written in C++/CLI from C#. The C++/CLI code is used to update a TIMESTAMP column in an Oracle database, given a record ID and the System::DateTime object which is the .NET compatible data type for Oracle's TIMESTAMP type. The method I am calling has the following prototype: bool ChangeJobUpdateDate (int jobIdIn, System::DateTime^ updateDateIn) I've added a reference to this DLL project in a test project that I made; I'm writing the tests in C#. However, when I try to call this method from the C# unit test project, the function appears to have the following method declaration (via intellisense): bool ChangeJobUpdateDate (int jobIdIn, ValueType updateDateIn) I'm admittedly not that familiar with C++/CLI, so is there something I'm missing?

    Read the article

  • Recommendations for technical (programming) podcasts or audio books?

    - by David Pfeffer
    I'd like to do some professional development during my commute, but I find that reading programming texts on the bus and train cause nausia because of how much I have to focus on them. I'd like to find some good technical programming audio books, either free or for purchase/download and some good technical podcasts. What are the best programming audio books or podcasts out there, and where can they be found?

    Read the article

  • Magento: server requirements for a quite big shop to run smoothly

    - by david parloir
    Hi, I'm working on a quite big magento: it will have 50 different shops (1 magento install, 1 admin to rule them all) for start, this number is expected to raise in the future, and a catalog of more than 1k products. This catalog will be shared by all shops. I'm concerned about the server requirements I need for this to run smoothly. So far this is what I've found to get the most of it: Caching: using magento's cache with APC, MySQL's querys Images sprite in the theme use FastCGI instead of mod_php database clustering: I don't think it will be necesary for 1k products, what do you think? using Zend Server Are there other thing I can do in order to improve magento's performance? I'd like to know all I need from the beginning so I can find the right server. thanks in advance.

    Read the article

  • Notepad++ regular expression find and replace $_REQUEST with $_GET but a more secure

    - by David
    What I am doing is replacing, in a large program, all $_REQUEST['var'] and mysql_escape_string($_REQUEST['var']) with either the 1st or 2nd line below the dotted line. Now, I have figured out this much of the regular expression but I would like to make it simpler. Instead of having to run the top one first then the 2nd one I would like to just run one all together. I tried this but it did not work. (mysql_escape_string\()*$_REQUEST\[\'([^']*)\'\]\)(\)*) So below is what works but again have to do it twice. $_REQUEST\[\'([^']*)\'\] mysql_escape_string\($_REQUEST\[\'([^']*)\'\]\) (isset($_GET['\1'])?mysql_real_escape_string($_GET['\1']):false) (isset($_POST['\1'])?mysql_real_escape_string($_POST['\1']):false) ============================ Update: Yeah, after some research I figured out that Notepad++ does not support most regular expressions. I guess one additional step can not hurt a person. It's just laziness. *NOTE: BUT if anyone wants to try feel free to comment. At least it is just 2 steps and not 20.

    Read the article

< Previous Page | 99 100 101 102 103 104 105 106 107 108 109 110  | Next Page >