Search Results

Search found 1513 results on 61 pages for 'ben reisner'.

Page 42/61 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • Reorganizing MySQL table to multiple rows by timestamp.

    - by Ben Burleson
    OK MySQL Wizards: I have a table of position data from multiple probes defined as follows: +----------+----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+----------+------+-----+---------+-------+ | time | datetime | NO | | NULL | | | probe_id | char(3) | NO | | NULL | | | position | float | NO | | NULL | | +----------+----------+------+-----+---------+-------+ A simple select outputs something like this: +---------------------+----------+----------+ | time | probe_id | position | +---------------------+----------+----------+ | 2010-05-05 14:16:42 | 00A | 0.0045 | | 2010-05-05 14:16:42 | 00B | 0.0005 | | 2010-05-05 14:16:42 | 00C | 0.002 | | 2010-05-05 14:16:42 | 01A | 0 | | 2010-05-05 14:16:42 | 01B | 0.001 | | 2010-05-05 14:16:42 | 01C | 0.0025 | | 2010-05-05 14:16:43 | 00A | 0.0045 | | 2010-05-05 14:16:43 | 00B | 0.0005 | | 2010-05-05 14:16:43 | 00C | 0.002 | | 2010-05-05 14:16:43 | 01A | 0 | | . | . | . | | . | . | . | | . | . | . | +---------------------+----------+----------+ However, I'd like to output something like this: +---------------------+--------+--------+-------+-----+-------+--------+ | time | 00A | 00B | 00C | 01A | 01B | 01C | +---------------------+--------+--------+-------+-----+-------+--------+ | 2010-05-05 14:16:42 | 0.0045 | 0.0005 | 0.002 | 0 | 0.001 | 0.0025 | | 2010-05-05 14:16:43 | 0.0045 | 0.0005 | 0.002 | 0 | 0.001 | 0.0025 | | 2010-05-05 14:16:44 | 0.0045 | 0.0005 | 0.002 | 0 | 0.001 | 0.0025 | | 2010-05-05 14:16:45 | 0.0045 | 0.0005 | 0.002 | 0 | 0.001 | 0.0025 | | 2010-05-05 14:16:46 | 0.0045 | 0.0005 | 0.002 | 0 | 0.001 | 0.0025 | | 2010-05-05 14:16:47 | 0.0045 | 0.0005 | 0.002 | 0 | 0.001 | 0.0025 | | . | . | . | . | . | . | . | | . | . | . | . | . | . | . | | . | . | . | . | . | . | . | +---------------------+--------+--------+-------+-----+-------+--------+ Ideally, the different probe position columns are dynamically generated based on data in the table. Is this possible, or am I pulling my hair out for nothing? I've tried GROUP BY time with GROUP_CONCAT that roughly gets the data out, but I can't separate that output into probe_id columns. mysql SELECT time, GROUP_CONCAT(probe_id), GROUP_CONCAT(position) FROM MG41 GROUP BY time LIMIT 10; +---------------------+-------------------------+------------------------------------+ | time | GROUP_CONCAT(probe_id) | GROUP_CONCAT(position) | +---------------------+-------------------------+------------------------------------+ | 2010-05-05 14:16:42 | 00A,00B,00C,01A,01B,01C | 0.0045,0.0005,0.002,0,0.001,0.0025 | | 2010-05-05 14:16:43 | 01C,01B,01A,00C,00B,00A | 0.0025,0.001,0,0.002,0.0005,0.0045 | | 2010-05-05 14:16:44 | 01C,01B,01A,00C,00B,00A | 0.0025,0.001,0,0.002,0.0005,0.0045 | | 2010-05-05 14:16:45 | 01C,01B,01A,00C,00B,00A | 0.0025,0.001,0,0.002,0.0005,0.0045 | | 2010-05-05 14:16:46 | 01C,01B,01A,00C,00B,00A | 0.0025,0.001,0,0.002,0.0005,0.0045 | | 2010-05-05 14:16:47 | 01C,01B,01A,00C,00B,00A | 0.0025,0.001,0,0.002,0.0005,0.0045 | | 2010-05-05 14:16:48 | 01C,01B,01A,00C,00B,00A | 0.0025,0.001,0,0.002,0.0005,0.0045 | | 2010-05-05 14:16:49 | 01C,01B,01A,00C,00B,00A | 0.0025,0.001,0,0.002,0.0005,0.0045 | | 2010-05-05 14:16:50 | 01C,01B,01A,00C,00B,00A | 0.0025,0.001,0,0.002,0.0005,0.0045 | | 2010-05-05 14:16:51 | 01C,01B,01A,00C,00B,00A | 0.0025,0.001,0,0.002,0.0005,0.0045 | +---------------------+-------------------------+------------------------------------+

    Read the article

  • jQuery oembed plugin z-index problem

    - by Ben
    I'm using the jQuery oembed plugin to display videos from a Vimeo feed. The only problem is they display over the top of my navigation menu. I have tried setting the z-index of the menu but this makes no difference. A common suggestion seems to be to set the wmode parameter to transparent or opaque. However, passing this as a parameter to the oembed function makes no difference. Thanks

    Read the article

  • Could I be writing this code better?

    - by Ben Dauphinee
    Is there any website out there somewhere where a programmer such as myself might be able to post pieces of code to be looked at by more experienced people? I am thinking of something that programmers could use to have advice given on how to improve their ability. I really like the atmosphere here, but am not sure that posting code for review here is appropriate.

    Read the article

  • charset problem?

    - by Ben Fransen
    Hi all, I have a bugging problem. For a website I made there are search engine friendly URL's generated. The only problem is there are ß-chars in the url too. Chars like ö, ï, ä, ü etc. are placed correct. But with the ß-char there is a diamond-icon with a questionmark in it. I thought it had to do with the charset which is used but i've tried both UTF-8 and iso-8859-1. Both without luck. I need to have the correct character in the url for the readability of deeplinks. Hope to hear from you!

    Read the article

  • I need to order a list that is dependant on another list. how to change both lists?

    - by Ben Fossen
    I have a Matlab program that generates a list x = 6.1692 8.1863 5.8092 8.2754 6.0891 the program also outputs another list aspl = 680 637 669 599 693. The two lists are on equal length and the first element in list x is related to the first element in list aspl. I need to graph the two lists but want list aspl to be in order from smallest to largest. How would I go about doing this? If I need to move the first element in aspl to position 4 in the list, then the first element of list x also needs to be moved to position 4 in list x. The numbers above are not important they are just examples, the actual program generates hundereds of numbers. for example x = 6.1692 8.1863 5.8092 8.2754 initially aspl = 680 637 669 599 693 after changing aspl to ascending order this is how x should look. x = 5.8092 8.1863 5.8092 6.1692 8.2754 aspl = 599 637 669 680 693

    Read the article

  • How can I run code in a C# class definition each time any instance of the class is deserialized?

    - by Ben
    I am trying to derive a class from ObservableCollection and I need to run just a single line of code each and every time any instance of this class is deserialized. My thought was to do this: [Serializable] public class ObservableCollection2<T> : ObservableCollection<T>, ISerializable { public ObservableCollection2() : base() { } public ObservableCollection2(SerializationInfo info, StreamingContext context) : base(info, context) { // Put additional code here. } void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); } } But I don't have access to those base methods related to serialization. Am I forced to re-write all of the serialization manually?

    Read the article

  • ValidateInputAttribute bug in VS 2010 RC / ASP.NET MVC 2.0?

    - by Ben
    Am I doing something wrong here? I have a text area on a view and am posting back the html contents. In VS 2008 and MVC 1.0 the following code successfully prevents input validation: [HttpPost] [ValidateInput(false)] public ActionResult Index(int? id) { return View(); } If I execute this code in VS 2010 / MVC 2.0 I always get this error: A potentially dangerous Request.Form value was detected from the client (body=""). Any ideas?

    Read the article

  • How can I make jQuery select an element in the style of CSS?

    - by ben
    <div id="id" class="div-style"><img id="1" class="img-style"></div> I would like to use the id attribute as a way for jQuery to select the element, and the class attribute for CSS to style it. My guess for jQuery selector ran thusly: $("#id .div-class") and $("#id .img-class") This returns the error "Selector expected"

    Read the article

  • How to access global variable in a view in Ruby on Rails?

    - by ben
    I have a User model. I have a Session controller, in which I have a global user variable that is assigned as follows: $user = User.authenticate(params[:session][:email], params[:session][:password]) (I've made user global just to try to solve this problem, so if there's a better way please let me know!) I need to use the email of the logged in user as a parameter to send to Flex part of my website. At the moment I'm creating the link as follows: <%= link_to "secondpage", secondpage_path(:email => @session.$user.email) But I'm getting the following error: compile error /Users/benhartney/rails_projects/talk/app/views/layouts/_header.html.erb:12: syntax error, unexpected tGVAR ..._path(:email = @session.$user.email) ).to_s); @output_buffe... There's also a little arrow pointing at $user If I remove the $ from $user, I get this error: undefined method `user' for nil:NilClass If I remove the (:email => @session.user.email) part, everything works fine, so I think all of the code except for this is ok. Can anyone tell me what I'm doing wrong? Thanks for reading!

    Read the article

  • Ajax Auto Complete in ASP.Net MVC project - How to display a an object's name but actually save it's

    - by Ben
    I have implemented the Ajax Autocomplete feature in my application using a web service file that querys my database and it works great. One problem I am having is allowing the user to see the item's name, as that's what they are typing in the textbox, but when they select it, it saves the item's ID number instead of the actual name. I want it to behave much like a dropdown list, where I can specify what is seen and entered vs. what is actually saved in the database (in this case, the product ID instead of it's name.) I have this text box in my view, along with the script: <script type="text/javascript"> Sys.Application.add_init(function() { $create( AjaxControlToolkit.AutoCompleteBehavior, { serviceMethod: 'ProductSearch', servicePath: '/ProductService.asmx', minimumPrefixLength: 1, completionSetCount: 10 }, null, null, $get('ProductID')) }); </script> <p> <label for="ProductID">Product:</label> <%= Html.TextBox("ProductID", Model.Products)%> <%= Html.ValidationMessage("ProductID", "*")%> </p> Here's what is in my asmx file: public class ProductService : System.Web.Services.WebService { [WebMethod] public string[] ProductSearch(string prefixText, int count) { MyDataContext db = new MyDataContext(); string[] products = (from product in db.Products where product.ProductName.StartsWith(prefixText) select product.ProductName).Take(count).ToArray(); return products; } } Can anyone help me figure this out? I'm using this so they can just start typing instead of having a dropdown list that's a mile long...

    Read the article

  • Haskell - function (that returns a list) on each element in a list

    - by Ben
    The assignment is to create a multiples function and I essentially want todo the following code: map (\t -> scanl (\x y -> x+y) t (repeat t)) listofnumbers The problem is that the scanl function returns a list of results rather than the one which the map function requires. So is there a function that will allow the return of lists?

    Read the article

  • In the following implementation of static_strlen, why are the & and parentheses around str necessary

    - by Ben
    If I change the type to const char str[Len], I get the following error: error: no matching function for call to ‘static_strlen(const char [5])’ Am I correct that static_strlen expects an array of const char references? My understanding is that arrays are passed as pointers anyway, so what need is there for the elements to be references? Or is that interpretation completely off-the-mark? #include <iostream> template <size_t Len> size_t static_strlen(const char (&str)[Len]) { return Len - 1; } int main() { std::cout << static_strlen("oyez") << std::endl; return 0; }

    Read the article

  • Facebook offline access step-by-step

    - by Ben
    After searchinge litteraly 1 day on fb and google for an up-to-date and working way to do something seemingly simple: I am looking for a step-by-step explanation to get offline_access for a user for a facebook app and then using this (session key) to retrieve offline & not within a browser friends & profile data. Preferrably doing this in the Fb Java API. Thanks. And yes I did check the facebook wiki. Update: Anyone? this: http://www.facebook.com/authorize.php?api_key=<api-key>&v=1.0&ext_perm=offline_access gives me offline_Access, however how to retrieve the session_key? Why can't facebook just do simple documentation, I mean there are like 600 people working there? The seemingly same question: http://stackoverflow.com/questions/617043/getting-offlineaccess-to-work-with-facebook Does not answer how to retrieve the session key Edit: I am still stuck with that. I guess nobody really tried such a batch access out yet...

    Read the article

  • How do I target a div without a class or id but with all these specific style-attributes

    - by Ben
    I'm restyling a certain page where I don't have access to all the source-HTML. So I'm left over with some hard to target elements within a page I need removed. For example the page is swamped with <div style="float: left; width: 10.25px; height: 284px;"></div>. To get rid of them I tried this in CSS: div[style="float: left; width: 10.25px; height: 284px;"] { display:none !important; } I'd like to fix this using CSS, because the the HTML that needs to be removed is updated using ajax. How do I target a div without a class or id but with all these specific style-attributes? Some more of the source-code (took a while to organize the parsed source): <div> <span class="Block BigPhotoList_Block"> <span class="Photo BigPhotoList_Photo" style="height: 200px"> <a href="/Webwinkel-Product-83760187/Le-Coq-Sportif-Angers-Low.html.html"> <span style="background-image:url(http://61955.static.securearea.eu/Files/2/61000/61955/ProductPhotos/MaxContent/144036303.jpg);" class="Canvas BigPhotoList_Canvas" title="Le-Coq-Sportif-Angers-Low"></span> </a> </span> <span class="Title BigPhotoList_Title"> <a href="/Webwinkel-Product-83760187/Le-Coq-Sportif-Angers-Low.html.html"> Le Coq Sportif Angers Low </a> </span> <span class="Price BigPhotoList_Price" style="font-size: 120%;"> € 89,95 </span> </span> <div style="float: left; width: 10.25px; height: 284px; border-right: 1px dashed #A0A0A0;" class="BigPhotoList_Stippel"></div> <div style="float: left; width: 10.25px; height: 284px;"></div> <span class="Block BigPhotoList_Block"> <span class="Photo BigPhotoList_Photo" style="height: 200px"> <a href="/Webwinkel-Product-83760185/Le-Coq-Sportif-Auveurne-Low.html"> <span style="background-image:url(http://61955.static.securearea.eu/Files/2/61000/61955/ProductPhotos/MaxContent/144036301.jpg);" class="Canvas BigPhotoList_Canvas" title="Le-Coq-Sportif-Auveurne-Low"></span> </a> </span> <span class="Title BigPhotoList_Title"> <a href="/Webwinkel-Product-83760185/Le-Coq-Sportif-Auveurne-Low.html"> Le Coq Sportif Auveurne Low </a> </span> <span class="Price BigPhotoList_Price" style="font-size: 120%;"> € 79,95 </span> </span> <div style="float: left; width: 10.25px; height: 284px; border-right: 1px dashed #A0A0A0;" class="BigPhotoList_Stippel"></div> <div style="float: left; width: 10.25px; height: 284px;"></div> <span class="Block BigPhotoList_Block"> <span class="Photo BigPhotoList_Photo" style="height: 200px"> <a href="/Webwinkel-Product-83760191/Le-Coq-Sportif-Bordeaux-Low.html"> <span style="background-image:url(http://61955.static.securearea.eu/Files/2/61000/61955/ProductPhotos/MaxContent/144036307.jpg);" class="Canvas BigPhotoList_Canvas" title="Le-Coq-Sportif-Bordeaux-Low"></span> </a> </span> <span class="Title BigPhotoList_Title"> <a href="/Webwinkel-Product-83760191/Le-Coq-Sportif-Bordeaux-Low.html"> Le Coq Sportif Bordeaux Low </a> </span> <span class="Price BigPhotoList_Price" style="font-size: 120%;"> € 99,95 </span> </span> <span class="Block BigPhotoList_Block"> <span class="Photo BigPhotoList_Photo" style="height: 200px"> <a href="/Webwinkel-Product-83760181/Le-Coq-Sportif-Cannet-Low.html"> <span style="background-image:url(http://61955.static.securearea.eu/Files/2/61000/61955/ProductPhotos/MaxContent/144036297.jpg);" class="Canvas BigPhotoList_Canvas" title="Le-Coq-Sportif-Cannet-Low"></span> </a> </span> <span class="Title BigPhotoList_Title"> <a href="/Webwinkel-Product-83760181/Le-Coq-Sportif-Cannet-Low.html"> Le Coq Sportif Cannet Low </a> </span> <span class="Discount BigPhotoList_Discount" style="font-size: 120%;"> € 99,95 </span> <span class="Price BigPhotoList_Price" style="font-size: 120%;"> € 94,95 </span> </span> <div style="float: left; width: 10.25px; height: 284px; border-right: 1px dashed #A0A0A0;" class="BigPhotoList_Stippel"></div> <div style="float: left; width: 10.25px; height: 284px;"></div> <span class="Block BigPhotoList_Block"> <span class="Photo BigPhotoList_Photo" style="height: 200px"> <a href="/Webwinkel-Product-83760183/Le-Coq-Sportif-Rodez-Low.html"> <span style="background-image:url(http://61955.static.securearea.eu/Files/2/61000/61955/ProductPhotos/MaxContent/144036299.jpg);" class="Canvas BigPhotoList_Canvas" title="Le-Coq-Sportif-Rodez-Low"></span> </a> </span> <span class="Title BigPhotoList_Title"> <a href="/Webwinkel-Product-83760183/Le-Coq-Sportif-Rodez-Low.html"> Le Coq Sportif Rodez Low </a> </span> <span class="Price BigPhotoList_Price" style="font-size: 120%;"> € 99,95 </span> </span> <div style="float: left; width: 10.25px; height: 284px; border-right: 1px dashed #A0A0A0;" class="BigPhotoList_Stippel"></div> <div style="float: left; width: 10.25px; height: 284px;"></div> <span class="Block BigPhotoList_Block"> <span class="Photo BigPhotoList_Photo" style="height: 200px"> <a href="/Webwinkel-Product-83760189/Le-Coq-Sportif-Sedan-Low.html"> <span style="background-image:url(http://61955.static.securearea.eu/Files/2/61000/61955/ProductPhotos/MaxContent/144036305.jpg);" class="Canvas BigPhotoList_Canvas" title="Le-Coq-Sportif-Sedan-Low"></span> </a> </span> <span class="Title BigPhotoList_Title"> <a href="/Webwinkel-Product-83760189/Le-Coq-Sportif-Sedan-Low.html"> Le Coq Sportif Sedan Low </a> </span> <span class="Discount BigPhotoList_Discount" style="font-size: 120%;"> € 109,95 </span> <span class="Price BigPhotoList_Price" style="font-size: 120%;"> € 99,95 </span> </span> </div>

    Read the article

  • Cant set drop down list selected value in page load

    - by Ben
    Hi, I'm trying to set the selected value of a ddl during page load ie. before databind. This causes "selected value does not exist" errors. So I force a databind, and add a new element if it does not exist in the data source. However it looks like when the databind is performed later in the page lifecycle that my added element(s) are removed/overwritten. Am I setting the values in the wrong part of the life cycle? what I'm doing seems rather hackish and I think im going about this the wrong way... is there a better way to do this?

    Read the article

  • What's the VB.NET equivalent of this C# code for wiring up and declaring an event?

    - by Ben McCormack
    I'm working on a tutorial to build a media player in Silverlight and am trying to wire up an EventHandler to the timer.Tick event of a DispatchTimer object so that the time of the video is synced with a Slider object. The sample code is in C# and I can't for the life of me figure out the proper syntax in VB.NET with RaiseEvent and/or Handles to wire up the event. Below is the relevant C# code. I'll include comments on where I'm getting stuck. private DispatchTimer timer; public Page() { //... timer = new DispatchTimer(); timer.Interval = TimeSpan.FromMilliseconds(50); timer.Tick += new EventHandler(timer_Tick); // <== I get stuck here b/c // I can't do "timer.Tick += ..." in VB.NET } void timer_Tick(object sender, EventArgs e) { if (VideoElement.NaturalDuration.TimeSpan.TotalSeconds > 0) { sliderScrubber.Value = VideoElement.Position.TotalSeconds / VideoElement.NaturalDuration.TimeSpan.TotalSeconds; } }

    Read the article

  • Animated status bar style transition, a la iPod app

    - by Ben Williamson
    In the iPod app, the navigation views have the default status bar style, and the Now Playing view is in the black style. The transition between them is animated with a crossfade. I want to do that. My first attempt: [UIView beginAnimations:@"whatever" context:nil]; [UIView setAnimationDuration:0.5]; self.navigationController.navigationBar.barStyle = UIBarStyleBlack; [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlack [UIView commitAnimations]; No joy, it pops to black. Takers?

    Read the article

  • How to make the value of one select box drive the options of a second select box

    - by Ben McCormack
    I want to make an HTML form with 2 select boxes. The selected option in the first select box should drive the options in the second select box. I would like to solve this dynamically on the client (using javascript or jQuery) rather than having to submit data to the server. For example, let's say I have the following Menu Categories and Menu Items: Sandwiches Turkey Ham Bacon Sides Mac 'n Cheese Mashed Potatoes Drinks Coca Cola Sprite Sweetwater 420 I would have two select boxes, named Menu Category and Items, respectively. When the user selects Sandwiches in the Menu Category box, the options in the Items box will only show Sandwich options. I'm stuck as how I might approach this. Once I filter out the 2nd list one time, how do I "find" the list options once I change my menu category in the 1st list? Also, if I'm thinking in SQL, I would have a key in the 1st box that would be used to link to the data in the 2nd box. However, I can't see where I have room for a "key" element in the 2nd box. How could this problem be solved with a combination of jQuery or plain javascript?

    Read the article

  • google oauth callback

    - by Ben None
    Setting oauth with some providers is always kind of weird; currently hitting a problem concerning the callback, i had made everything work very nicely with google, getting redirected back specifying the callback url in both the get_request_token and redirect url param oauth_callback= but it then for some reason stopped redirecting, i'm currently stuck with the pin to specify over at google. I seeking explanations about this, if anybody went through the same kind of problem. thx

    Read the article

  • Best cheap GUI for converting to f4v

    - by Ben
    Hi, I need to give one client the ability to convert some videos to f4v h264 before loading it up to an AIR app. I normally doing with the Adobe Media Encoder CS4 but that only ships with adobe products (you can't download it as a free standalone app - which, start rant is odd, you'd think they would push the format - Microsoft's competing expresssion encoder is free end rant) Anyway, I need to get a (hopefully not too expensive, but willing to pay for it) good 3rd part app that can take any video and convert it to an f4v. Can you suggest any? Everything i've found is horrible or jammed with ads and crap. What would you use? Any suggestion? (please don't just say ffmpeg - I know it can do it but we need to good simple GUI) Thanks!

    Read the article

  • Detect if camera is capturing in Flash

    - by Ben
    I'm having trouble with Camera.getCamera() in Flash AS3. If there are multiple camera drivers, it does not necessarily pick the correct one. If the default is the correct, the program works fine; however, if another driver is selected as the default then LED on the webcam does not come on and no video is captured. I can cycle through the available cams and select an arbitrary one. I don't, however, know how to determine if the selected camera is correct. It is not returning null. I considered using camera.currentFPS, but it's not clear when this gets updated. I'm really struggling to determine dynamically which camera will do the trick!

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >