Search Results

Search found 1506 results on 61 pages for 'ben rokah'.

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

  • LBA48 in Linux SCSI ATA Passthrough

    - by Ben Englert
    I am writing a custom disk monitoring/diagnostics app which, among other things, needs to do stuff to SATA disks behind a SAS PCI card under Linux. So far I am following this guide as well as the example code in sg_utils to pass ATA taskfiles through the SCSI layer. Seems to be working okay. However, in both cases, the CDB data structure (pointed to by the cmdp member of the sg_io argument to the ioctl) has only one unsigned char worth of space for the number of sectors. If you look at the ata_taskfile structure in linux\ata.h you'll see that it has an "nsect" and a "hob_nsect" field - high order bits for the sector count, to support LBA48. It turns out that in my application I need LBA48 support. So, anyone know how to set up an sg_io_hdr structure with an LBA48 sector count?

    Read the article

  • Valid signed Hex to long function

    - by Ben
    I am trying to convert a 24bit Hexadecimal string (6 characters) signed in two's complement to a long int in C. This is the function I have come up with: long int hex2li (char string[]) { char *pEnd; long int result = strtol (string, &pEnd, 16); if (strcmp (pEnd, "") == 0) { if (toupper (string[0]) == 'F') { return result - 16777216; } else { return result; } } return LONG_MIN; } Is it valid? Is there a better way of doing this?

    Read the article

  • Bypassing Javascript form handler

    - by Ben Aston
    We are writing an ASP.NET MVC application. By default, if the client browser has Javascript, the handler for every form on the page is set, by Javascript, to be one that sends the submission down an Ajax "pipe" (progressive enhancement). But, for one form (on a page of several), I'd like this handler to be bypassed/ignored. Is there a simple way to do this? Perhaps by overriding the handler by specifying my own onsubmit event directly in the DOM - or some other method? We use jQuery, so those libraries are available to me.

    Read the article

  • Can't mass-assign protected attributes: user

    - by Ben Aluan
    I'm working on a simple app that requires me to submit a form. I created two models. user.rb class User < ActiveRecord::Base attr_accessible :email has_many :item end item.rb class Item < ActiveRecord::Base attr_accessible :user_id belongs_to :user end Instead of creating a user using the user form view, I'm trying to create the user using the item form view. items/_form.html.haml = nested_form_for @item do |form| = form.fields_for :user do |builder| = builder.text_field :email = form.submit "Save" Did I miss something here? I'm using nested_form_for btw. Thank you.

    Read the article

  • JSF - Session Bean restart on logout and login

    - by Ben
    Hi, I have a web application with a backing bean which has the context of the current logged in user. It is implemented on JSF. When the user logs out he is forwarded to a login screen (in another JSP page). I would like the current session to be erased when that happens and a new one to be created the next time the user logs in and enters the application. My question is - how do you delete a session? (I guess the new session will be created automatically the next time the user enters the link) This is kinda newb i guess, but I couldn't find a solution for this. Thanks for the Help!

    Read the article

  • How do you write multiple lists from Matlab to the same excel file?

    - by Ben Fossen
    I have several lists in Matlab that I want to write to the same excel file. I have one list xordered and another list aspl. I do not know the length of the lists till after I run the Matlab program. I used data = xlswrite('edgar.xls',fliplr(sortedx'),'A2:A3000') for the first list but when I tried to write another list to the same file like this I ended up with two different excel files named edgar.xls asp_data = xlswrite('edagr.xls', fliplr(aspl'), 'B2:B3000') Is there a way I can write both of these lists into the same excel file? xordered in the A column and aspl in the B column?

    Read the article

  • finding process bottlenecks rails/ruby

    - by Ben
    I just got started with rails, and when I testing in development mode, I see in the logs that my Mailer action is taking 1175ms. Is there anyway to find out what exactly is the slow step? Also, there is a line that says (View:2, DB:1). I assume the DB means number of database lookups, but what about the view?

    Read the article

  • How do you pass in a value to a subfunction in Matlab I am getting output errors?

    - by Ben Fossen
    Below is my code in Matlab I am having trouble with the line sum = (h/2) * (f(a) + f(b)) + h; Matlab says I have to many outputs when I try to call the f(x) function. Is my problem with the f(x) function function Trapezoid_Uniform(a,b,n) h = (b - a)/n; sum = (h/2) * (f(a) + f(b)) + h; for i = 1:n-1 x = a + i*h; sum = sum + f(x); end sum = sum*h; disp(sum); end function f(z) f = exp(z); end

    Read the article

  • How do I format the contents of a DataGrid cell as a Date? as Currency?

    - by Ben McCormack
    I have a Silverlight DataGrid that's being populated with different types of data for each column. I'm trying to figure out how to format some of the contents of the DataGrid's cells, specifically for dates and formatting. I have a date column that's currently displaying like: 3/11/2010 12:00:00 AM. I would rather it display like 3/14/2010. I have a number column that's currently displaying like: 51.32. I'd rather it display as currency like $51.32. I'm not sure how I can go about doing this. I'd prefer to do it in XAML instead of C#, but both solutions are fine. For reference, here's my XAML so far: </data:DataGridTextColumn> <data:DataGridTextColumn Header="Payee" Binding="{Binding Payee}"/> <data:DataGridTextColumn Header="Category" Binding="{Binding Category}"/> <data:DataGridTextColumn Header="Memo" Binding="{Binding Memo}"/> <data:DataGridTextColumn Header="Inflow" Binding="{Binding Inflow}"/> <data:DataGridTextColumn Header="Outflow" Binding="{Binding Outflow}"/> </data:DataGrid.Columns>

    Read the article

  • using a 64-bit compiler in microsoft visual c++

    - by Ben
    this question is essentially identical to an earlier question i had that didn't receive any answers. hopefully someone can help me out this time. i am trying to compile a vc++ project as 64 bit using visual c++ express 2010. i know that the 64 bit compiler does not come with the default installation of vc++ express so i installed windows sdk for windows 7 as specified here (http://msdn.microsoft.com/en-us/library/9yb4317s.aspx) which includes the 64 bit compiler as i understand. however, there is still no 64 bit option in the configuration manager for vc++. after some searching i found and completed this tutorial (http://jenshuebel.wordpress.com/2009/02/12/visual-c-2008-express-edition-and-64-bit-targets/) as well as the various links at the bottom of this page. despite all my efforts, i still cannot get the 64 bit compiler to show in vc++ (i.e. the 64 bit compiler won't show under "active solutions platform" in the configuration manager). if anyone has any experience/tips with getting this to work i would really appreciate it. fyi - i am running windows 7(x64).

    Read the article

  • Attaching user data to AXObserver

    - by Ben Packard
    I am using an AXObserver to monitor when a window is closed. In the callback, I am just raising an NSNotification. All working well. What is the correct syntax for attaching some user data as refcon? The working call looks like this: err6 = AXObserverAddNotification(observerTable, tableRef, kAXUIElementDestroyedNotification, nil); and the callback specified when I create the observer has the signature: static void cbTableClosed (AXObserverRef observer, AXUIElementRef element, CFStringRef notification, void *refcon) I want to replace refcon with an object of my own, but don't know how to change either line. The obvious objective-c type changes through up warnings.

    Read the article

  • How can I get started with PHPUnit, where my class construct requires a preconfigured db connection?

    - by Ben Dauphinee
    I have a class that uses a lot of database internally, so I built the constructor with a $db handle that I am supposed to pass to it. I am just getting started with PHPUnit, and I am not sure how I should go ahead and pass the database handle through setup. public function setUp(/*do I pass a database handle through here, using a reference? aka &$db*/){ $this->_acl = new acl; } public function __construct(Zend_Db_Adapter_Abstract $db, $config = array()){

    Read the article

  • Same font, character spacing and line-height but different results

    - by Ben Huh
    The introduction of @font-face in CSS3 allows web designers to use fonts that look the same across all browsers. That is what I thought until trying it out with the following code in jsFiddle: HTML: <div> The_Quick_Brown<br> Fox_Jumps_Over<br> The_Lazy_Dog </div> CSS: @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: url('http://themes.googleusercontent.com/static/fonts/opensans/v6/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff') format('woff'); } div { display: block; width: 496px; height: 86px; font-size: 1.3em; font-family: 'Open Sans'; font-style: normal; margin: 0; border: 0; padding: 0; background: cyan; letter-spacing: 1.44em; line-height: 1.44; overflow: hidden; } This is the view from Firefox 12.0. Take note of the partially obscured 'o' in 'brown', the position of 'g' in 'dog' and the underscore '_' at the bottom edge. This is the view from Google Chrome 19.0. Despite explicitly setting letter-spacing and line-height for the same font, why are the results still different?

    Read the article

  • Memory leak when declaring NSString from ABRecordCopyValue

    - by Ben Thompson
    I am using the following line of code... NSString *clientFirstName = (NSString *)ABRecordCopyValue(person, kABPersonFirstNameProperty); The 'analyse' feature on Xcode is saying that this giving rise to a potential memory leak. I am not releasing clientFirstName at all as I have neither alloc or retain'd it. However, I am conscious that ABRecordCopyValue may not be returning an object as say a command like [NSMutableArray arrayWithArray:someArray] would which might mean I am indeed creating a new object that I control and must release. Keen to hear thoughts...

    Read the article

  • AdMob ad is showing in iOS simulator, but not on iDevice

    - by Ben Toscano
    As the heading states, I can get my AdMob Ad to show in the iOS 5.1 and 6.0 simulator just fine, however, when running my application on my iOS 5.1.1 or 6.0 devices, there is just a blank space where the ad should be served. The code in my .m file is as follows: bannerView_ = [[GADBannerView alloc] initWithFrame:CGRectMake(0.0, 411.0 - GAD_SIZE_320x50.height, GAD_SIZE_320x50.width, GAD_SIZE_320x50.height)]; bannerView_.adUnitID = @"**myID**"; bannerView_.rootViewController = self; [self.view addSubview:bannerView_]; [bannerView_ loadRequest:[GADRequest request]]; //GADRequest *r = [[GADRequest alloc] init]; //r.testing = YES; //[bannerView_ loadRequest:r]; Furthermore, if I initiate testing of ads (see commented-out section), the test ad shows on both the simulator AND my iDevices, which is baffling me! What am I missing? Thanks for your help.

    Read the article

  • How can I force a jQuery plugin to refresh the data it has loaded?

    - by Ben Dauphinee
    I am working with jQuery Pagination, and a popup form. On saving the data in the form, how would I go about forcing the Pagination plugin to reload the data it would load for whatever page I am on, without reloading the entire webpage? Ex: Item 1 Item 2 Item 3 Add Item-Item 23-Save-Reload List Item 1 Item 2 Item 3 Item 23 http://d-scribe.de/webtools/jquery-pagination/lib/jquery_pagination/README

    Read the article

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