Search Results

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

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

  • C++ Generate and store the co-ordinates of an n-cube

    - by Ben
    I want to write a function to generate and store the co-ordinates of an n-cube and I have no idea how to start. Specifically, I wish to generate the co-ordinates for an evenly or randomly distributed cloud of points for this n-cube and store them. What would be a good way to start with this or if possible, a quick solution?

    Read the article

  • Parse text/html part of email source using Javascript

    - by Ben McCormack
    Using javascript, I need to parse the Content-Type text/html portion of an email message and extract just the HTML part. Here's an example of the part of the mail source in question: ------=_Part_1504541_510475628.1327512846983 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit <html ... a bunch of html ... /html> I want to extract everything between (and including) the <html> tags after text/html. How do I do this? NOTE: I'm OK with a hacky regex. I don't expect this to be bulletproof.

    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

  • 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

  • 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

  • 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

  • Problem storing an RSS feed in Flex 4

    - by ben
    Hey guys, I'm having some trouble storing the results of an RSS feed in my Flex 4 app. Here is the variables view, showing the result of the HTTPService which gets the feed: And here is the code I use to store the result: public var rssXML:XML; rssXML = event.result as XML; But after this code is run, rssXML is still null. What am I doing wrong? Thanks for reading.

    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

  • 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

  • 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

  • Exception throwing

    - by Ben Aston
    In C#, will the folloing code throw e containing the additional information up the call stack? ... catch(Exception e) { e.Data.Add("Additional information","blah blah"); throw; }

    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

  • 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

  • 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

  • How can I get the previous logged events when a particular logger is triggered?

    - by Ben Laan
    I need to show the previous 10 events when a particular logger is triggered. The goal is to show what previous steps occurred immediately before NHibernate.SQL logging was issued. Currently, I am logging NHibernate sql to a separate file - this is working correctly. <appender name="NHibernateSqlAppender" type="log4net.Appender.RollingFileAppender"> <file value="Logs\NHibernate.log" /> <appendToFile value="true" /> <rollingStyle value="Size" /> <maxSizeRollBackups value="10" /> <maximumFileSize value="10000KB" /> <staticLogFileName value="true" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%d{dd/MM/yy HH:mm:ss,fff} [%t] %-5p %c - %m%n" /> </layout> </appender> <logger name="NHibernate.SQL" additivity="false"> <level value="ALL"/> <appender-ref ref="NHibernateSqlAppender"/> </logger> <logger name="NHibernate" additivity="false"> <level value="WARN"/> <appender-ref ref="NHibernateSqlAppender"/> </logger> But this only outputs SQL, without context. I would like all previous logs within a specified namespace to also be logged, but only when the HNibernate.SQL appender is triggered. I have investigated the use of BufferingForwardingAppender as a means to collect all events, and then filter them within the NHibernateSqlAppender, but this is not working. I have read about the LoggerMatchFilter class, which seems like it is going to help, but I'm not sure where to put it. <appender name="BufferingForwardingAppender" type="log4net.Appender.BufferingForwardingAppender" > <bufferSize value="10" /> <lossy value="true" /> <evaluator type="log4net.Core.LevelEvaluator"> <threshold value="ALL"/> </evaluator> <appender-ref ref="NHibernateSqlAppender" /> </appender> <appender name="NHibernateSqlAppender" type="log4net.Appender.RollingFileAppender"> <file value="Logs\NHibernate.log" /> <appendToFile value="true" /> <rollingStyle value="Size" /> <maxSizeRollBackups value="10" /> <maximumFileSize value="10000KB" /> <staticLogFileName value="true" /> <filter type="log4net.Filter.LoggerMatchFilter"> <loggerToMatch value="NHibernate.SQL" /> <loggerToMatch value="Laan" /> </filter> <filter type="log4net.Filter.LoggerMatchFilter"> <loggerToMatch value="NHibernate" /> <acceptOnMatch value="false"/> </filter> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%d{dd/MM/yy HH:mm:ss,fff} [%t] %-5p %c - %m%n" /> </layout> </appender> <root> <level value="ALL" /> <appender-ref ref="BufferingForwardingAppender"/> </root> The idea is that buffering appender will store all events, but then the NHibernateSqlAppender will only flush when an NHibernate.SQL event fires, plus it will flush the buffer (of 10 previous items, within the specified logger level, which in this example is Laan.*).

    Read the article

  • What wording in the C++ standard allows static_cast<non-void-type*>(malloc(N)); to work?

    - by ben
    As far as I understand the wording in 5.2.9 Static cast, the only time the result of a void*-to-object-pointer conversion is allowed is when the void* was a result of the inverse conversion in the first place. Throughout the standard there is a bunch of references to the representation of a pointer, and the representation of a void pointer being the same as that of a char pointer, and so on, but it never seems to explicitly say that casting an arbitrary void pointer yields a pointer to the same location in memory, with a different type, much like type-punning is undefined where not punning back to an object's actual type. So while malloc clearly returns the address of suitable memory and so on, there does not seem to be any way to actually make use of it, portably, as far as I have seen.

    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

  • Django User "per project" group assignation

    - by Ben G
    Hi, Here's my problem : my site has users, which can create projects, and access other user's projects. Each project can assign different rights to users. So, i could have Project A : user "John" is in group "manager" , and Project "B" user "John" is in group "worker". How could I use the Django User authentication model to do that ? From a SQL point a view, what i would like is to be able to add "project_id" in the primary key for the "auth_user_groups" table. I don't think profile is of any help here. Any advice ? UPDATE : "worker" and "manager" are just two examples of the permission group (or "roles") that my application defines. There will be more in the future. Eg : i will probably also have "admin", "reporting", etc...

    Read the article

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