Search Results

Search found 404 results on 17 pages for 'roger ford'.

Page 12/17 | < Previous Page | 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Are you using C++0x today? [closed]

    - by Roger Pate
    This is a question in two parts, the first is the most important and concerns now: Are you following the design and evolution of C++0x? What blogs, newsgroups, committee papers, and other resources do you follow? Even where you're not using any new features, how have they affected your current choices? What new features are you using now, either in production or otherwise? The second part is a follow-up, concerning the new standard once it is final: Do you expect to use it immediately? What are you doing to prepare for C++0x, other than as listed for the previous questions? Obviously, compiler support must be there, but there's still co-workers, ancillary tools, and other factors to consider. What will most affect your adoption? Edit: The original really was too argumentative; however, I'm still interested in the underlying question, so I've tried to clean it up and hopefully make it acceptable. This seems a much better avenue than duplicating—even though some answers responded to the argumentative tone, they still apply to the extent that they addressed the questions, and all answers are community property to be cleaned up as appropriate, too.

    Read the article

  • getting a "default" concrete class that implements an interface

    - by Roger Joys
    I am implementing a custom (and generic) Json.net serializer and hit a bump in the road that I could use some help on. When the deserializer is mapping to a property that is an interface, how can I best determine what sort of object to construct to deserialize to to place into the interface property. I have the following: [JsonConverter(typeof(MyCustomSerializer<foo>))] class foo { int Int1 { get; set; } IList<string> StringList {get; set; } } My serializer properly serializes this object, and but when it comes back in, and I try to map the json parts to to object, I have a JArray and an interface. I am currently instantiating anything enumerable like List as theList = Activator.CreateInstance(property.PropertyType); This works create to work with in the deserialization process, but when the property is IList, I get runtime complaints (obviously) about not being able to instantiate an interface. So how would I know what type of concrete class to create in a case like this? Thank you

    Read the article

  • CUDA - multiple kernels to compute a single value

    - by Roger
    Hey, I'm trying to write a kernel to essentially do the following in C float sum = 0.0; for(int i = 0; i < N; i++){ sum += valueArray[i]*valueArray[i]; } sum += sum / N; At the moment I have this inside my kernel, but it is not giving correct values. int i0 = blockIdx.x * blockDim.x + threadIdx.x; for(int i=i0; i<N; i += blockDim.x*gridDim.x){ *d_sum += d_valueArray[i]*d_valueArray[i]; } *d_sum= __fdividef(*d_sum, N); The code used to call the kernel is kernelName<<<64,128>>>(N, d_valueArray, d_sum); cudaMemcpy(&sum, d_sum, sizeof(float) , cudaMemcpyDeviceToHost); I think that each kernel is calculating a partial sum, but the final divide statement is not taking into account the accumulated value from each of the threads. Every kernel is producing it's own final value for d_sum? Does anyone know how could I go about doing this in an efficient way? Maybe using shared memory between threads? I'm very new to GPU programming. Cheers

    Read the article

  • Free sounds for iPhone games.

    - by Roger Gilbrat
    I'm looking for a good source for sound effects for my iPhone game. I like SoundSnap, but they charge you for every sound you download, not just the ones you end up using. Sound design in games can be a very iterative process and I don't want to pay for 10 sounds I never use before finding the right one. freesound.org is another really good site, but they are all CC licensed and can't be used in commercial games. It's unclear if a free iPhone App is considered commercial (or if my final game will be free). Googling for this returns a huge number of pay sites with horrible web pages. I don't mind paying for sounds, but I want to pay for what I use. Any good personal recommendations?

    Read the article

  • Updating or inserting high scores in SQL

    - by Roger Gilbrat
    I've been racking my brain over this for the past few days and I'm not sure it's possible, but figured I ask here. Is it possible for a single SQL statement to update a high score if your score is greater or insert it if your first score? My Score table has a UserID, Level and Score columns and I like it to follow the following logic: If your new score is greater than your last score for this Level, then replace it. If you don't have a score for this Level then add it. If your score for this Level is less than your highest score for this Level then do nothing. Is this possible in a single SQL statement or do I have to use two, one to see if you have a new high score and if so, replace it? Each UserID would have only one score in the table for each Level. I'm using MySQL.

    Read the article

  • Wordpress Events List Date Problem

    - by Roger
    Hi, I'm having a problem displaying events in the correct order in wordpress. I think the problem is because wordpress is treating the date as a string and ordering it by the day because it's in british date format. The goal is to display a list of future events with the most current event at the top of the list. But I must use the british date format of dd/mm/yyyy. Do I need to go back to the drawing board or is there a way of converting the date to achieve the result I need? Thanks in advance :) <ul> <?php // Get today's date in the right format $todaysDate = date('d/m/Y');?> <?php query_posts('showposts=50&category_name=Training&meta_key=date&meta_compare=>=&meta_value=' . $todaysDate . '&orderby=meta_value&order=ASC'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <li> <h3><a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a></h3> <?php $getDate = get_post_meta($post->ID, 'date', TRUE); $dateArray = explode('/', $getDate); ?> <?php if($getDate != '') { ?> <div class="coursedate rounded"><?php echo date('d F Y', mktime(0, 0, 0, $dateArray[1], $dateArray[0], $dateArray[2])); ?></div> <?php } ?> <p><?php get_clean_excerpt(140, get_the_content()); ?>...</p> <p><strong><a class="link" href="<?php the_permalink(); ?>">For further details and booking click here</a></strong></p> </li> <?php endwhile; ?> <?php else : ?> <li>Sorry, no upcoming events!</li> <?php endif; ?>

    Read the article

  • Sort array by two specifics values in PHP

    - by Roger
    The folks have already showed me how to sort an array by a specific value using usort and a fallback function in PHP. What if this specifc value doesn't exist and we have to use two values? in the example bellow the values [4] and [5]... In other words, I want to do this: order all objects numericaly by the fith value of each object from the highest to the lowest, and addicionally, for those objects that have the fifht value is empty (in the examplem '-'), order them by the fourth value. Array( [0] => Array( [0] => links-patrocinados [1] => adwords [2] => 0,5 [3] => R$92,34 [4] => 823000 [5] => 49500 ) [1] => Array( [0] => adwords [1] => google adwords como funciona [2] => 0,38 [3] => R$0,20 [4] => 480 [5] => 480 ) [2] => Array( [0] => links-patrocinados [1] => adword [2] => 0,39 [3] => R$58,77 [4] => 49500 [5] => 2900 ) [3] => Array( [0] => agencia [1] => agencias viagens espanholas [2] => - [3] => R$0,20 [4] => 58 [5] => - ) [4] => Array( [0] => agencia [1] => era agencia imobiliaria [2] => - [3] => R$0,20 [4] => 73 [5] => - ) )

    Read the article

  • iPhone - a question about @property

    - by Roger
    Hi, I am kind of newbie on Objective-C and I was looking at a code, trying to understand a few things, and I come across with this .h file: there was a declaration like that on the @interface section MyVideoClass *contrast_; then below we have @property (nonatomic, retain) MyVideoClass *contrast; @property (nonatomic, retain) FetchClass *fetchMe; The strange part is that the first has an underscrore after the name and the second one, doesn't. The other strange thing is that the guy has a call to these properties like this: FetchClass *fetchOne = [self.fetchMe contrast]; What kind of call is that? This seems pretty insane to me. I simply cannot understand what is going on here, but the code works. pretty insane. Can you guys explain me that? Forgive the stupid question, but I am still learning... thanks

    Read the article

  • What are the rules about using an underscore in a C++ identifier?

    - by Roger Lipscombe
    It's common in C++ to name member variables with some kind of prefix to denote the fact that they're member variables, rather than local variables or parameters. If you've come from an MFC background, you'll probably use "m_foo". I've also seen "myFoo" occasionally. C# (or possibly just .NET) seems to recommend using just an underscore, as in "_foo". Is this allowed by the C++ standard?

    Read the article

  • Is private method in spring service implement class thread safe

    - by Roger Ray
    I got a service in an project using Spring framework. public class MyServiceImpl implements IMyService { public MyObject foo(SomeObject obj) { MyObject myobj = this.mapToMyObject(obj); myobj.setLastUpdatedDate(new Date()); return myobj; } private MyObject mapToMyObject(SomeObject obj){ MyObject myojb = new MyObject(); ConvertUtils.register(new MyNullConvertor(), String.class); ConvertUtils.register(new StringConvertorForDateType(), Date.class); BeanUtils.copyProperties(myojb , obj); ConvertUtils.deregister(Date.class); return myojb; } } Then I got a class to call foo() in multi-thread; There goes the problem. In some of the threads, I got error when calling BeanUtils.copyProperties(myojb , obj); saying Cannot invoke com.my.MyObject.setStartDate - java.lang.ClassCastException@2da93171 obviously, this is caused by ConvertUtils.deregister(Date.class) which is supposed to be called after BeanUtils.copyProperties(myojb , obj);. It looks like one of the threads deregistered the Date class out while another thread was just about to call BeanUtils.copyProperties(myojb , obj);. So My question is how do I make the private method mapToMyObject() thread safe? Or simply make the BeanUtils thread safe when it's used in a private method. And will the problem still be there if I keep the code this way but instead I call this foo() method in sevlet? If many sevlets call at the same time, would this be a multi-thread case as well?

    Read the article

  • Text substitution (reading from file and saving to the same file) on linux with sed...

    - by Roger
    I want to read the file "teste", make some "find&replace" and overwrite "teste" with the results. The closer i got till now is: $cat teste I have to find something This is hard to find... Find it wright now! $sed -n 's/find/replace/w teste1' teste $cat teste1 I have to replace something This is hard to replace... If I try to save to the same file like this: $sed -n 's/find/replace/w teste' teste or: $sed -n 's/find/replace/' teste > teste The result will be a blank file... I know I am missing something very stupid but any help will be welcome. UPDATE: Based on the tips given by the folks and this link: http://idolinux.blogspot.com/2008/08/sed-in-place-edit.html here's my updated code: sed -i -e 's/find/replace/g' teste

    Read the article

  • undefined method `output_data' for #<EventManager:0x007fa4220320c8> (NoMethodError)

    - by Roger Camps
    I keep getting this error: event_manager.rb:83:in': undefined method output_data' for #<EventManager:0x007fc5018320c0> (NoMethodError) I am following the exercise on this website: Here is my code (My error comes towards the end with DEF OUTPUT_DATA ...): # Dependencies require "csv" # Class Definition class EventManager INVALID_PHONE_NUMBER = "0000000000" INVALID_ZIPCODE = "00000" def initialize puts "EventManager Initialized." filename = "event_attendees.csv" @file = CSV.open(filename, {:headers => true, :header_converters => :symbol}) end def print_names @file.each do |line| puts line.inspect puts line[2] + " " + line[3] end end #printing home phone number method def print_numbers @file.each do |line| number = clean_number(line[:homephone]) puts number end end #cleaning numbers method def clean_number(number) cleaner= number.delete('.' + ')' + '(' + '-') if cleaner.length == 10 # Do Nothing elsif cleaner.length == 11 if cleaner.start_with?("1") cleaner = cleaner[1..-1] else cleaner = INVALID_PHONE_NUMBER end else cleaner = INVALID_PHONE_NUMBER end return cleaner end def clean_zipcode(original) if original.nil? zipcode = INVALID_ZIPCODE elsif original.length < 5 while original.length < 5 original = original.insert(0, "0") end else return original end return zipcode end def print_zipcodes @file.each do |line| zipcode = clean_zipcode(line[:zipcode]) puts zipcode end def output_data output = CSV.open("event_attendees_clean.csv", "w") @file.each do |line| output << line end end end end # Script manager = EventManager.new #manager.print_numbers #manager.print_zipcodes manager.output_data I've tried several things, checked all through the internet and I just can't figure it out myself. I will really appreciate any help. Thank you in advance!

    Read the article

  • Strange Happenings

    - by MOSSLover
    There are weeks we go about our life thinking nothing is going to change nothing will happen.  Then there are other weeks a billion things happen at once.  Friday started off very weird for me.  I flew into Atlanta and I met some cool people for another SharePoint event.  I had some good conversations.  Saturday then hit me and my virtual machine bombed in my presentation after the auto updater ran.  I was writing code on the board and describing everything in notepad.  I would say as presentations go it was the best and the worst presentation all wrapped into one.  The next day I was in Baltimore and I hung out with my aunt which was relatively uneventful and great.  Then Monday hit and half my presentations failed or succeeded and my screen freezes so I start describing the code.  I was on top of my game until Monday night.  On top of the world.  I'm exhausted I get into Raleigh and one of the craziest stories of my life happens.  So my boss has been renting cars through Priceline this week I got a different company than the other weeks. The company gives me a Ford Focus and I plug in the coordinates on my IPhone where I want go.  I head out and then I get to the destination hotel (or I thought I did). I go inside it's the wrong hotel the other one is a few miles away.  I walk outside hop into the car and it sounds like a gunshot.  Nothing is starting...Am I doing something wrong?  No I'm not the car is completely dead in the water.  I call the rental car facility and they tell me to call roadside they are closing for the night.  Roadside says they can't give me a new car but they can get me a jump then I have to take it up with the facility.  They send me a tow truck to give me a jump the guy can't jump the car.  He tells me this vehicle was towed about an hour ago.  He shows me a copy of a slip from when he towed it.  We also notice the rental car company left one of there price scanning guns in the vehicle.  I call up roadside and now they are interested in getting me a car because I need to be onsite tomorrow.  They get the manager of the facility on the phone he apologizes profusely and he says he'll be there in 10 minutes.  About 30 minutes pass and him plus another dude show up with a Ford Escape leather interior.  At this point I hand him the gun tell him someone left it in the vehicle and that I'm not so happy with them.  I ask them to comp my rental they can't due to Priceline, however if I call him again this week he can get me a voucher.  It's about 2 am and I'm ready to get to the hotel I don't make it in the next morning until 10 am.  I would say this was a crazy week all forms of technology are trying to tell me something.  What I have no idea, but we'll see the outcome soon.  I feel so weird tons of change is about to happen.  I don't know if it's good or bad.  I think this week is some form of omen.

    Read the article

  • Implementation of any Hamiltonian Path Problem algorithm

    - by Julien
    Hi all ! Here is my problem : I have an array of points, the points have three properties : the "x" and "y" coordinates, and a sequence number "n". The "x" and "y" are defined for all the points, the "n" are not. You can access and write them calling points[i]-x, points[i]-y, points[i]-n. i.e. : points[i]->n = var var = points[i]->n So the title maybe ruined the surprise, but I'm looking for a possible implementation of a solution to the Hamiltonian path problem : I need to set the "n" number of each point, so that the sequence is the shortest path (not cycle, the edges have to be disjoint) that goes exactly once through each point. I looked for a solution and I found The Bellman Ford Algorithm but I think it doesn't work since the problem doesn't specify that it has to go through all of the points is it correct ? If it is, does somebody has another algorithm and the implementation ? If the Bellman Ford Algorithm works, how would I implement it ? Thanks a lot, Julien

    Read the article

  • PHP: How to store XML data in an array?

    - by tommy
    Below is the XML I am working with - there are more items - this is the first set. How can I get these elements in to an array? I have been trying with PHP's SimpleXML etc. but I just cant do it. <response xmlns:lf="http://api.lemonfree.com/ns/1.0"> <lf:request_type>listing</lf:request_type> <lf:response_code>0</lf:response_code> <lf:result type="listing" count="10"> <lf:item id="56832429"> <lf:attr name="title">Used 2005 Ford Mustang V6 Deluxe</lf:attr> <lf:attr name="year">2005</lf:attr> <lf:attr name="make">FORD</lf:attr> <lf:attr name="model">MUSTANG</lf:attr> <lf:attr name="vin">1ZVFT80N555169501</lf:attr> <lf:attr name="price">12987</lf:attr> <lf:attr name="mileage">42242</lf:attr> <lf:attr name="auction">no</lf:attr> <lf:attr name="city">Grand Rapids</lf:attr> <lf:attr name="state">Michigan</lf:attr> <lf:attr name="image">http://www.lemonfree.com/images/stock_images/thumbnails/2005_38_557_80.jpg</lf:attr> <lf:attr name="link">http://www.lemonfree.com/56832429.html</lf:attr> </lf:item> <!-- more items --> </lf:result> </response> Thanks guys EDIT: I want the first items data in easy to access variables, I've been struggling for a couple of days to get SimpleXML to work as I am new to PHP, so I thought manipulating an array is easier to do.

    Read the article

  • how to store xml data in array (php)

    - by tommy
    <?xml version="1.0" encoding="UTF-8" ?> - <response xmlns:lf="http://api.lemonfree.com/ns/1.0"> <lf:request_type>listing</lf:request_type> <lf:response_code>0</lf:response_code> - <lf:result type="listing" count="10"> - <lf:item id="56832429"> <lf:attr name="title">Used 2005 Ford Mustang V6 Deluxe</lf:attr> <lf:attr name="year">2005</lf:attr> <lf:attr name="make">FORD</lf:attr> <lf:attr name="model">MUSTANG</lf:attr> <lf:attr name="vin">1ZVFT80N555169501</lf:attr> <lf:attr name="price">12987</lf:attr> <lf:attr name="mileage">42242</lf:attr> <lf:attr name="auction">no</lf:attr> <lf:attr name="city">Grand Rapids</lf:attr> <lf:attr name="state">Michigan</lf:attr> <lf:attr name="image">http://www.lemonfree.com/images/stock_images/thumbnails/2005_38_557_80.jpg</lf:attr> <lf:attr name="link">http://www.lemonfree.com/56832429.html</lf:attr> </lf:item> Above is the xml i am working with - there are more items - this is the first set. How can i get these elements in to an array. I have been trying with php's simple xml etc but i just cant do it. Thanks guys

    Read the article

  • Advantages of Using Linux as primary developer desktop

    - by Nick N
    I want to get some input on some of the advantages of why developers should and need to use Linux as their primary development desktop on a daily basic as opposed to using Windows. This is particulary helpful when your Dev, QA, and Production environments are Linux. The current analogy that I keep coming back to is. If I build my demo car as a Ford Escort, but my project car is a Ford Mustang, it doesn't make sense at all. I'm currently at an IT department that allows dual boot with Windows and Linux, but some run Linux while the vast majority use Windows. Here's several advantages that I've came up with since using Linux as a primary desktop. Same Exact operating system as Dev, QA, and Production Same Scripts (.sh) instead of maintaining (.bat and *.sh). Somewhat mitigated by using cygwin, but still a bit different. Team learns simple commands such as: cd, ls, cat, top Team learns Advanced commands like: pkill, pgrep, chmod, su, sudo, ssh, scp Full access to installs typically for Linux, such as RPM, DEB installs just like the target environments. The list could go on and on, but I want to get some feedback of anything that I may have missed, or even any disadvantages (of course there are some). To me it makes sense to migrate an entire team over to using Linux, and using Virtual Box, running Windows XP VM's to test functional items that 95% of most of the world uses. This is similar but a little different thread going on here as well. link text

    Read the article

  • Get table row based on radio button using prototype/javascript

    - by David Buckley
    I have an html table that has a name and a radio button like so: <table id="cars"> <thead> <tr> <th>Car Name</th> <th></th> </tr> </thead> <tbody> <tr> <td class="car">Ford Focus</td> <td><input type="radio" id="selectedCar" name="selectedCar" value="8398"></td> </tr> <tr> <td class="car">Lincoln Navigator</td> <td><input type="radio" id="selectedCar" name="selectedCar" value="2994"></td> </tr> </tbody> </table> <input type="button" value="Select Car" onclick="selectCar()"></input> I want to be able to select a radio button, then click another button and get the value of the radio button (which is a unique ID) as well as the car name text (like Ford Focus). How should I code the selectCar method? I've tried a few things like: val1 = $('tr input[name=selectedCar]:checked').parent().find('#cars').html(); val1 = $("td input[name='selectedCar']:checked").parents().find('.cars').html(); val1 = $('selectedCar').checked; but I can't get the proper values. I'm using prototype, but the solution can be plain javascript as well.

    Read the article

  • Best Practices around Oracle VM with RAC: RAC SIG webcast - Thursday, March 18th -

    - by adam.hawley
    The RAC SIG will be hosting an interesting webcast this Thursday, March 18th at 9am pacific time (5pm GMT) on: Best Practices around Oracle VM with RAC The adaptation of virtualization technology has risen tremendously and continues to grow due to the rapid change and growth rate of IT infrastructures. With this in mind, this seminar focuses on configuration best practices, examining how Oracle RAC scales & performs in a virtualized environment, and evaluating Oracle VM Server's ease of use. Roger Lopez from Dell IT will be presenting. This Week's Webcast Connection Info: ==================================== Webcast URL (use Internet Explorer): https://ouweb.webex.com/ouweb/k2/j.php?ED=134103137&UID=1106345812&RT=MiM0 Voice can either be heard via the webconference or via the following dial in: Participant Dial-In 877-671-0452 International Dial-In 706-634-9644 International Dial-In No Link http://www.intercall.com/national/oracleuniversity/gdnam.html Intercall Password 86336

    Read the article

  • 45 % des internautes chinois utiliseraient toujours Internet Explorer 6, comment faire disparaître le logiciel du pays ?

    45.2% des internautes chinois utiliseraient toujours Internet Explorer 6, comment faire disparaître le logiciel du pays ? Mise à jour du 07.12.2010 par Katleen Une étude récente vient de révéler que le vieux navigateur fait de la résistance en Chine. Alors que dans le monde entier, la part de marché de l'ancêtre est de 7.6%, elle atteint presque 50% dans ce pays (ce qui donne alors un total de 14.6% dans le monde, Chine incluse). Un cauchemar pour Microsoft, qui aimerait bien voir ce logiciel disparaître du globe. Roger Capriotti, chef de produit marketing pour Internet Explorer, à en effet pour mission de réduire la part de marché d'IE6 à 0. Malgré tou...

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17  | Next Page >