Search Results

Search found 3846 results on 154 pages for 'life sciences'.

Page 99/154 | < Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >

  • Get binary data from audio impulses

    - by Timo
    I have IR sensor which have TRS plug and I can record my remotes signals into audio. Now I want to control my computer with TV remote, but I don't have any clue how to compare audio input with pre-recorded audio. But after I realized that these audio waves contains only some kind data (binary) I can turn these into binary or hex, so it is much easier to compare. Waves look just like this: http://i.imgur.com/lCIyl.png And this: ttp://i.imgur.com/goJ6d.png These are records of "OK" button, sometimes there are some impulses on right channel too and I don't know why, it seems like connections in sensor are damaged maybe. Ok thats not matter, anyway I need help with python program which read these impulses and turn these into binary, in realtime from audio input(mic). I know it's sounds like "Do it for me, while I enjoy my life", but I don't have experiences with sound transforming/reading... I've looking for python examples for recording and reading audio, but unsuccessfully.

    Read the article

  • Android: implementing sliding cards in widget

    - by DroidIn.net
    I have a widget that periodically updates itself (hourly) to display top result of search query. I would like to extend it so it captures several top results and then loops through these. The best example would be Genie News and Weather widget for which I was unable to find a source code. QUESTIONS: What would be a good way to implement the animation? I'm thinking ViewAnimator + timer, but is there maybe a better way, say FrameLayout + alerts? I'm already using AlertManager to periodically pull search results for the widget How bad such arraignment would affect phone's battery life?

    Read the article

  • MVC4 not binding a list of basic types

    - by admanb
    I cannot, for the life of me, get this data to bind. Here's my JavaScript: var params = { 'InvItemIDs': ["188475", "188490"]}; $.post("api/Orders/OrderFromInventory?" + $.param(params)) and the Controller action: public HttpResponseMessage OrderFromInventory(IList<int> InvItemIDs) { return new HttpResponseMessage(); } I've built the query string so that it's sending: ?InvItemIDs=188475&InvItemIDs=188490 as well as ?InvItemIDs[]=188475&InvItemIDs[]=188490 and even ?InvItemIDs[0]=188475&InvItemIDs[1]=188490 and none of them are binding. InvItemIDs is always null. What am I doing wrong? EDIT: So it turns out all this is a bug (or something) in the new Web API controller code in MVC4. As soon as I moved the exact same code over to a standard controller it started working. I'm still interested if anyone has any insight as to why the Web API would break this binding.

    Read the article

  • Why exactly is server side HTML rendering faster than client side?

    - by mvbl fst
    I am working on a large web site, and we're moving a lot of functionality to the client side (Require.js, Backbone and Handlebars stack). There are even discussions about possibly moving all rendering to the client side. But reading some articles, especially ones about Twitter moving away from client side rendering, which mention that server side is faster / more reliable, I begin to have questions. I don't understand how rendering fairly simple HTML widgets in JS from JSON and templates is a contemporary browser on a dual core CPU with 4-8 GB RAM is any slower than making dozens of includes in your server side app. Are there any actual real life benchmarking figures regarding this? Also, it seems like parsing HTML templates by server side templating engines can't be any faster than rendering same HTML code from a Handlebars template, especially if this is a precomp JS function?

    Read the article

  • Bind web user control property in markup

    - by Ian Levy
    I'm sure it's elementary but I can't figure it out. This does not work - the the binding expression is passed as string to the control: {<uc:usercontrol runtat="server" message='<%#Me.protectedVariable%>'/>} The code behind include a Page.Databind() call in page_load. But this does work: <uc:usercontrol runat="server" id="usercontrol1"/> And in code behind page_load: usercontrol1.message = Me.protectedVariable Do I have to bind from the code-behind? Is this a page life cycle issue?

    Read the article

  • C++ Singleton design pattern

    - by Artem Barger
    Recently I've bumped into a realization/implementation of the Singleton design pattern for C++. It has looked like this (I have adopted it from the real life example): // a lot of methods are omitted here class Singleton { public: static Singleton* getInstance( ); ~Singleton( ); private: Singleton( ); static Singleton* instance; }; From this declaration I can deduce that the instance field is initiated on the heap. That means there is a memory allocation. What is completely unclear for me is when exactly the memory is going to be deallocated? Or is there a bug and memory leak? It seems like there is a problem in the implementation. My main question is, how do I implement it in the right way?

    Read the article

  • Tools for understanding large codebase

    - by 0tar0gz
    Hi! My whole life I have been programming in simple plain text editor. Lately, I was contemplating about joining an open source project which is fairly large and written in C. I downloaded the sources, started to look around, read this, forget that... Then I thought to myself: this can't be true. This is 21st century there must be some tool which would help me to understand the code, perhaps some kind of IDE or "code navigator". What flows from here to where, this typedef struct is just interface to that private type, this function is just #define from above, function called in this file is defined in that file, ... you get the idea. Dear Stack Overflow, is this 21st century? Is there something like this?

    Read the article

  • Extension methods on a static object

    - by Max Malygin
    I know (or so I hear) that writing extension methods for a single stand alone .net class (not an implementation of IEnumerable) is potential code smell. However, for the sake of making the life easier I need to attach a method to the ConfigurationManager class in asp.net. It's a static object so this won't work: public static List<string> GetSupportedDomains(this ConfigurationManager manager) { //the manager needs to be static. } So the question is - is it possible to write an extension method for a static class in .net?

    Read the article

  • Selenium testing with checksums (md5)

    - by Peter
    I am new at selenium testing and am writing a bunch of tests for a webpage that relies heavily on javascript user interaction. At first I wrote a lot of assertions of the style If I press button A" then assert number of visible rows = x, assert checkboxes checked are such assert title = bar .... [20 more] and so on. Then I switched to checksumming the HTML using MD5: If I press button A" then assert md5(html) = 8548bccac94e35d9836f1fec0da8115c. And it made my life a whole lot easier... But is this a bad practice in any way?

    Read the article

  • For what purposes have YOU used T4?

    - by Chris Melinn
    T4 has existed for several years in Visual Studio, but doesn't get a lot of attention. However, for those that know it, there seems to be some very creative and useful purposes. I am researching some different ways that T4 is used, and I would appreciate to hear how YOU may have used it for real life scenarios. I am primarily interested in non-standard and creative uses. Some interesting examples: Phil Haack uses T4 to create static CSS files from .less To Generate WPF and Silverlight Dependency Properties using T4 Templates Note: I realize this is a discussion-oriented question, but the answers could be helpful to others. I have tagged it as subjective and also marked as "community wiki", so please allow the question to remain open. Thanks!

    Read the article

  • Silverlight Spring Effect on TextBlock control

    - by CJCraft.com
    Hi, I'd like to create view that if the user clicks on a control, let's say a TextBlock, that the control would spring back and forth in place from where the user clicked. By spring I mean push back and forth like if there were springs behind the TextBlock in each corner. I've seen demos of this type of effect, and for the life of me, I can't come up with the name of the effect to help with searches, or find an example of this. Maybe instead of a TextBlock it would help to image a picture that could be pressed down on, and as if springs were behind it and then would bounce back into place.

    Read the article

  • emacs debugger: how can I step-out, step-over ?

    - by Cheeso
    I don't know why I'm having so much trouble groking the documentation for the elisp debugger. I see it has a commands to "step-into" (d). But for the life of me, I cannot see a step-out or step-over. Can anyone help? If I have this in the Backtrace buffer: Debugger entered--returning value: 5047 line-beginning-position() * c-parse-state() * byte-code("...") * c-guess-basic-syntax() c-show-syntactic-information(nil) call-interactively(c-show-syntactic-information) ...where do I put the cursor, and what key do I type, to step out of the parse-state() fn ? by that I mean, run until that fn returns, and then stop in the debugger again.

    Read the article

  • UI Design - design pattern for city/country drop down? (ASP.NET MVC)

    - by JK
    What is the best way to do a city/country dropdown pair in ASP.NET MVC? I see lots of places with country above city, but that's unnatural: in real life we write city/country. I've used city, then country, but the problem is that the user then has to go backwards after changing the country. The other problem is what do you do about cities/countries not in your list? If city/country are both drop downs, then the user cant type their own city if it is missing. But if you have a dropdown and a textbox, that makes it unwieldy (you end up with 4 controls to enter 2 pieces of data). Are there any examples websites where the city/country dropdown pair are done in a very useable and clear manner?

    Read the article

  • form data posted using linq-to-sql not showing until I refresh the page

    - by PeteShack
    I have an asp.net mvc app with a form. When you submit the form, it adds records to the sql database with linq-to-sql. After adding the records, the controller displays the form again, and should show those new values on the form. But, when it displays the form, the values are blank, until you refresh the page. While tracing through the code, I can see the records being added to the database when they are submitted, but the view doesnt display them, unless I refresh. The view is not the problem, it just displays the view model, which is missing the new records immediately after the post. I know this is kind of vague, but wasnt sure what parts of code to include here. Could this have something to do with data context life cycle? Basically, there is a data context created when the form is posted, then a different data context is created in the method that displays the form. Any suggestions on what might be causing this?

    Read the article

  • Page layout breaks only in Opera which is weird?

    - by Qwibble
    Okay so I'm working on an admin panel, in which everything should always be only within the view port until you hit the minimum widths and heights set. The current version of it can be seen here (its still in development) : http://qwibbledesigns.co.uk/preview/Admin/ In layout terms, it works flawlessly in all browsers, even down to ie6 =D. However, opera doesn't like it, and for some reason, always add's extra space to the bottom of the page, making it have an extra scrollbar, and I can't fathom it out which is highly annoying. Jquery is used to set the height of the container, sidebar, and content area so that they're always within the browser view port, and these functions rerun when the window is resized. I therefore cannot work out the the life of me what's wrong with opera. Would anyone mind taking a look and seeing if they can work it out? =D

    Read the article

  • Jquery .html replacer just empties my selector, what's wrong!?

    - by jphenow
    $("#autoNames").html(function (index, html) { var begin = "<script language='javascript' type='text/javascript'> var names = ["; var end = String('];' + '<' + '/' + 'script' + '>'); var result = begin.concat(jsonService, end); $("#autoNames").html(result); return false; }); I can't figure out for the life of me why this doesn't work. I've gotten the html function to work before, but for some reason this just leaves my autoNames tag empty... and i've called an alert() on the result variable and things exist in that string... any clues? Thanks

    Read the article

  • What's the most performance effective way to have a webbrowser inside a class library ?

    - by Xaqron
    I'm developing a class library. Need some data from internet and this cannot be done with HttpWebRequest in my case so I wanna use WebBrowser component. WebBrowser is used for opening a single page and fetch some data from it, so WebBrowser life-time is very short. Running thread is MTA and no message pump or STA thread is available by default (class library is used by an ASP.NET application). How to create a WebBrowser object, run it with a STA thread, fetch data from a web page and finally dispose it with the least performance impact on the application ? I just need the idea/concept and will find details myself. Thanks guys

    Read the article

  • An array of structures in C...

    - by 00010000
    For the life of me I can't figure out the proper syntax for creating an array of structures in C. I tried this: struct foo { int x; int y; } foo[][] = { { { 1, 2 }, { 4, 5 }, { -1, -1 } }, { { 55, 44 } { 100, 200 }, } }; So for example foo[1][0].x == 100, foo[0][1].y == 5, etc. But GCC spits out a lot of errors. If anyone could provide the proper syntax that'd be great. EDIT: Okay, I tried this: struct foo { const char *x; int y; }; struct foo bar[2][] = { { { "A", 1 }, { "B", 2 }, { NULL, -1 }, }, { { "AA", 11 }, { "BB", 22 }, { NULL, -1 }, }, { { "ZZ", 11 }, { "YY", 22 }, { NULL, -1 }, }, { { "XX", 11 }, { "UU", 22 }, { NULL, -1 }, }, }; But GCC gives me "elements of array bar have incomplete type" and "excess elements in array initializer".

    Read the article

  • Get next key-value pair in an object

    - by captainclam
    So, given a key, I want to find the next property in an object. Then, I want to return the value of the NEXT property. I can not rely on the keys to be ordered or sequential (they're uuids). Please see below for trivial example of what I want: var db ={ a: 1, b: 2, c: 3 } var next = function(db, key) { // ??? } next(db, 'a'); // I want 2 next(db, 'b'); // I want 3 I also want a prev() function, but I'm sure it will be the same solution. This seems like such a trivial problem but I can't for the life of me figure out how to do it. Happy for the solution to use underscore.js or be written in coffeescript :)

    Read the article

  • When is a program limited by the memory bandwidth?

    - by hanno
    I want to know if a program that I am using and which requires a lot of memory is limited by the memory bandwidth. When do you expect this to happen? Did it ever happen to you in a real life scenario? I found several articles discussing this issue, including http://www.cs.virginia.edu/~mccalpin/papers/bandwidth/node12.html http://www.cs.virginia.edu/~mccalpin/papers/bandwidth/node13.html http://ispass.org/ucas5/session2_3_ibm.pdf The first link is a bit old, but suggests that you need to perform less than about 1-40 floating point operations per floating point variable in order to see this effect (correct me if I'm wrong). How can I measure the memory bandwidth that a given program is using and how do I measure the (peak) bandwidth that my system can offer? I don't want to discuss any complicated cache issues here. I'm only interested in the communication between the CPU and the memory.

    Read the article

  • Why does FrameworkElement's FindResource() Method Accept an Object and not a String?

    - by ChrisNel52
    I understand that calling FindResource() on a FrameworkElement (e.g. a Window) can be used to find a resource in the FrameworkElement's ResourceDictionary. For example, I've used it many times to access a Style through code to add a new Setter to the Style dynamically. I always pass the x:Key value of the Style as a string into the FindResource() method. Like... Style style = w.FindResource("GridDescriptionColumn") as Style; My question is, I noticed that FindResource() accepts an argument of type object and not an argument of type string. I can't for the life of my think of a reason I would call FindResource() with an argument that is not a string. It makes me think that I may unaware of other ways to use FindResource(). Does anyone know why FindResource() accepts a parameter type of object and not string? If so, what would be an example of calling FindResource() with a parameter type other than a string? Thanks.

    Read the article

  • Can I get a patch-compatible output from git-diff?

    - by Malvolio
    I am doing something very simple wrong. I'm trying to prepare an ordinary patch file, so I can reapply some changes: $ git diff > before $ git diff something_here > save.patch $ git checkout . $ patch < save.patch $ git diff > after $ diff before after $ With something_here blank it almost works, but the file names aren't right. I think I'm just I'm missing some option. In real life, I am going to do a merge after the checkout, so the patch might fail there, but you see what I'm getting at.

    Read the article

  • APC on Windows makes server terminate connection

    - by vanneto
    Hello. I have a slight problem and cannot for the life of me figure out what is happening. I am running a Linux machine on a server with APC enabled. Everything works fine. Now when I enable APC on Windows the server starts terminating the connection. You know, the "Site currently unavailable" message Firefox spits out. I tried the access logs, error logs and there is nothing there to indicate an error. How could APC influence on a server like this? BTW: I have a CMS on my local server/live server. On the live server it works great with APC. On the dev server the connection terminates. The strange thing is, simpler scripts execute just fine. The CMS is using CakePHP. Any help would be very appreciated.

    Read the article

  • Poll for pressed buttons in Java

    - by directedition
    I have a WorldWind application build based on the Java SDK. It has a great event handler for detecting when you click on objects, but I've run into a snag. While I can click on and select individual objects, I can't determine if the user is pressing the control key while they click (if they want to select multiple objects). I can implement event handlers for both the mouse and the keyboard, but I can't for the life of me figure out how to tie the two together. How could I make my mouse listener poll the system for a list of currently depressed keys?

    Read the article

  • Get notified when some other application acquires wake lock

    - by Sebouh
    I am wondering if the following is possible in android. I want to have my application do a certain task whenever the phone get awoken. Whenever some other application acquires a wake lock to do it's task, I want my application to do something of its own. Can I get notified through an intent using a broadcast receiver about this event? If so, what will happen if that other application finishes before my task ends? The reason I'm asking is that I don't want to wake the phone up to do my task and affect the battery life. I want to take the opportunity of the wake lock to do my thing.

    Read the article

< Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >