Search Results

Search found 3585 results on 144 pages for 'chris roberts'.

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

  • How to pass initialisation parameters to a web service in Netbeans

    - by Bob Roberts
    I have built a web web service with Netbeans 6.8 using the "Web Service from WSDL" wizard. It has generated the binding classes and a skeleton for the class implementing the web service. I've set some initialization parameters in web.xml, under the servlet corresponding to the web service. Now I'd like to pass those parameters to the class implementing the web service. How can this be achieved (preferably without editing any of the code auto-generated by Netbeans)?

    Read the article

  • how to send an array of bytes over a TCP connection (java programming)

    - by Mark Roberts
    Can somebody demonstrate how to send an array of bytes over a TCP connection from a sender program to a receiver program in Java. (I'm new to Java programming, and can't seem to find an example of how to do this that shows both ends of the connection (sender and receiver.) If you know of an existing example, maybe you could post the link. (No need to reinvent the wheel.) P.S. This is NOT homework! :-)

    Read the article

  • converting an array of characters to a const gchar*

    - by Mark Roberts
    I've got an array of characters which contains a string: char buf[MAXBUFLEN]; buf[0] = 'f'; buf[1] = 'o'; buf[2] = 'o'; buf[3] = '\0'; I'm looking to pass this string as an argument to the gtk_text_buffer_insert function in order to insert it into a GtkTextBuffer. What I can't figure out is how to convert it to a const gchar *, which is what gtk_text_buffer_insert expects as its third argument. Can anybody help me out?

    Read the article

  • Policy based design and defaults.

    - by Noah Roberts
    Hard to come up with a good title for this question. What I really need is to be able to provide template parameters with different number of arguments in place of a single parameter. Doesn't make a lot of sense so I'll go over the reason: template < typename T, template <typename,typename> class Policy = default_policy > struct policy_based : Policy<T, policy_based<T,Policy> > { // inherits R Policy::fun(arg0, arg1, arg2,...,argn) }; // normal use: policy_base<type_a> instance; // abnormal use: template < typename PolicyBased > // No T since T is always the same when you use this struct custom_policy {}; policy_base<type_b,custom_policy> instance; The deal is that for many abnormal uses the Policy will be based on one single type T, and can't really be parameterized on T so it makes no sense to take T as a parameter. For other uses, including the default, a Policy can make sense with any T. I have a couple ideas but none of them are really favorites. I thought that I had a better answer--using composition instead of policies--but then I realized I have this case where fun() actually needs extra information that the class itself won't have. This is like the third time I've refactored this silly construct and I've got quite a few custom versions of it around that I'm trying to consolidate. I'd like to get something nailed down this time rather than just fish around and hope it works this time. So I'm just fishing for ideas right now hoping that someone has something I'll be so impressed by that I'll switch deities. Anyone have a good idea? Edit: You might be asking yourself why I don't just retrieve T from the definition of policy based in the template for default_policy. The reason is that default_policy is actually specialized for some types T. Since asking the question I have come up with something that may be what I need, which will follow, but I could still use some other ideas. template < typename T > struct default_policy; template < typename T, template < typename > class Policy = default_policy > struct test : Policy<test<T,Policy>> {}; template < typename T > struct default_policy< test<T, default_policy> > { void f() {} }; template < > struct default_policy< test<int, default_policy> > { void f(int) {} }; Edit: Still messing with it. I wasn't too fond of the above since it makes default_policy permanently coupled with "test" and so couldn't be reused in some other method, such as with multiple templates as suggested below. It also doesn't scale at all and requires a list of parameters at least as long as "test" has. Tried a few different approaches that failed until I found another that seems to work so far: template < typename T > struct default_policy; template < typename T, template < typename > class Policy = default_policy > struct test : Policy<test<T,Policy>> {}; template < typename PolicyBased > struct fetch_t; template < typename PolicyBased, typename T > struct default_policy_base; template < typename PolicyBased > struct default_policy : default_policy_base<PolicyBased, typename fetch_t<PolicyBased>::type> {}; template < typename T, template < typename > class Policy > struct fetch_t< test<T,Policy> > { typedef T type; }; template < typename PolicyBased, typename T > struct default_policy_base { void f() {} }; template < typename PolicyBased > struct default_policy_base<PolicyBased,int> { void f(int) {} };

    Read the article

  • Which function pair in QString to use for converting to/from std::string?

    - by Noah Roberts
    I'm working on a project that we want to use Unicode and could end up in countries like Japan, etc... We want to use std::string for the underlying type that holds string data in the data layer (see Qt, MSVC, and /Zc:wchar_t- == I want to blow up the world as to why). The problem is that I'm not completely sure which function pair (to/from) to use for this and be sure we're 100% compatible with anything the user might enter in the Qt layer. A look at to/fromStdString indicates that I'd have to use setCodecForCStrings. The documentation for that function though indicates that I wouldn't want to do this for things like Japanese. This is the set that I'd LIKE to use though. Does someone know enough to explain how I'd set this up if it's possible? The other option that looks like I could be pretty sure of it working is the to/fromUTF8 functions. Those would require a two step approach though so I'd prefer the other if possible. Is there anything I've missed?

    Read the article

  • NSDirectoryEnumerator And Subfolders

    - by Matthew Roberts
    I have an iPhone app that searches a folder, collates an an array of all the audio files, and lets them be played back. The problem is that if there is a subfolder within the folder I am searching, it will just skip over it/not go into its contents. My code is as follows: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSDirectoryEnumerator *direnum = [[NSFileManager defaultManager] enumeratorAtPath:documentsDirectory]; NSString *pname; while (pname = [direnum nextObject]) { [musicArray addObject:[pname stringByDeletingPathExtension]]; } What I want to do is continue to search its subfolders, how would I go about doing that?

    Read the article

  • relative path issue (noob)

    - by tim roberts
    I am using the following code to check existence of a file before publishing an image in my erb file. <% @imagename = @place.name + ".jpg" %> <% if FileTest.exist?( "/Users/Tim/projects/game/public/" + @imagename ) %> <p><img src= '<%= @imagename %>' width="400" height="300" /> </p> <% end %> And when I publish this to Heroku, it obviously wont work. I tried using a relative path, but not able to get it to work. <% if FileTest.exist?( "/" + @imagename ) % any help appreciated.

    Read the article

  • Android Calendar API vs Calendar Provider API

    - by John Roberts
    I'm a little bit confused about the difference between the two. An example of the Calendar API is supposedly located here: http://samples.google-api-java-client.googlecode.com/hg/calendar-android-sample/instructions.html, but the author himself suggests using the Calendar Provider API, details about which are here: http://developer.android.com/guide/topics/providers/calendar-provider.html. Can someone explain to me the difference between the two, and which would be better for me to use for a simple calendar app?

    Read the article

  • How can I quickly sum all numbers in a file?

    - by Mark Roberts
    I have a file which contains several thousand numbers, each on it's own line: 34 42 11 6 2 99 ... I'm looking to write a script which will print the sum of all numbers in the file. I've got a solution, but it's not very efficient. (It takes several minutes to run.) I'm looking for a more efficient solution. Any suggestions?

    Read the article

  • Does it exist: smart pointer, owned by one object allowing access.

    - by Noah Roberts
    I'm wondering if anyone's run across anything that exists which would fill this need. Object A contains an object B. It wants to provide access to that B to clients through a pointer (maybe there's the option it could be 0, or maybe the clients need to be copiable and yet hold references...whatever). Clients, lets call them object C, would normally, if we're perfect developers, be written carefully so as to not violate the lifetime semantics of any pointer to B they might have...but we're not perfect, in fact we're pretty dumb half the time. So what we want is for object C to have a pointer to object B that is not "shared" ownership but that is smart enough to recognize a situation in which the pointer is no longer valid, such as when object A is destroyed or it destroys object B. Accessing this pointer when it's no longer valid would cause an assertion/exception/whatever. In other words, I wish to share access to data in a safe, clear way but retain the original ownership semantics. Currently, because I've not been able to find any shared pointer in which one of the objects owns it, I've been using shared_ptr in place of having such a thing. But I want clear owneship and shared/weak pointer doesn't really provide that. Would be nice further if this smart pointer could be attached to member variables and not just hold pointers to dynamically allocated memory regions. If it doesn't exist I'm going to make it, so I first want to know if someone's already released something out there that does it. And, BTW, I do realize that things like references and pointers do provide this sort of thing...I'm looking for something smarter.

    Read the article

  • Facebook Scrumptious sample app won't build

    - by Chase Roberts
    I did exactly what they do in the video. However, when I get to the scrumptious app and try to build/run it, mine fails. It says: "Parse Issue. Expected a type." Here are the two lines that it thinks are broken (located in the ACAccountStore.h): // Returns the account type object matching the account type identifier. See // ACAccountType.h for well known account type identifiers - (ACAccountType *)accountTypeWithAccountTypeIdentifier:(NSString *)typeIdentifier; // Returns the accounts matching a given account type. - (NSArray *)accountsWithAccountType:(ACAccountType *)accountType; Here is a link to the tutorial. I only didn't even make it two min in before I hit this wall. http://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/3.1/ I am running Xcode v4.4.1.

    Read the article

  • Should this work?

    - by Noah Roberts
    I am trying to specialize a metafunction upon a type that has a function pointer as one of its parameters. The code compiles just fine but it will simply not match the type. #include <iostream> #include <boost/mpl/bool.hpp> #include <boost/mpl/identity.hpp> template < typename CONT, typename NAME, typename TYPE, TYPE (CONT::*getter)() const, void (CONT::*setter)(TYPE const&) > struct metafield_fun {}; struct test_field {}; struct test { int testing() const { return 5; } void testing(int const&) {} }; template < typename T > struct field_writable : boost::mpl::identity<T> {}; template < typename CONT, typename NAME, typename TYPE, TYPE (CONT::*getter)() const > struct field_writable< metafield_fun<CONT,NAME,TYPE,getter,0> > : boost::mpl::false_ {}; typedef metafield_fun<test, test_field, int, &test::testing, 0> unwritable; int main() { std::cout << typeid(field_writable<unwritable>::type).name() << std::endl; std::cin.get(); } Output is always the type passed in, never bool_.

    Read the article

  • script to sum all numbers in a file (linux)

    - by Mark Roberts
    I have a file which contains several thousand numbers, each on it's own line: 34 42 11 6 2 99 ... I'm looking to write a script which will print the sum of all numbers in the file. I've got a solution, but it's not very efficient. (It takes several minutes to run.) I'm looking for a more efficient solution. Any suggestions?

    Read the article

  • How can I prevent page-break in CFDocument from occuring in middle of content?

    - by Dan Roberts
    I am generating a PDF file dynamically from html/css using the cfdocument tag. There are blocks of content that I don't want to span multiple pages. After some searching I found that the style "page-break-inside" is supported according to the docs. However in my testing the declaration "page-break-inside: avoid" does no good. Any suggestions on getting this style declaration to work, or have alternative suggestions? Here is an example. I would expect the content in the div tag not to span a page break but it does. The style "page-break-inside: avoid" is not being honored. <cfdocument format="flashpaper"> <cfloop from="1" to="10" index="i"> <div style="page-break-inside: avoid"> <h1>Table Label</h1> <table> <tr><td>label</td><td>data</td></tr> <tr><td>label</td><td>data</td></tr> <tr><td>label</td><td>data</td></tr> <tr><td>label</td><td>data</td></tr> <tr><td>label</td><td>data</td></tr> <tr><td>label</td><td>data</td></tr> <tr><td>label</td><td>data</td></tr> <tr><td>label</td><td>data</td></tr> <tr><td>label</td><td>data</td></tr> </table> </div> </cfloop> </cfdocument>

    Read the article

  • PHP – Slow String Manipulation

    - by Simon Roberts
    I have some very large data files and for business reasons I have to do extensive string manipulation (replacing characters and strings). This is unavoidable. The number of replacements runs into hundreds of thousands. It's taking longer than I would like. PHP is generally very quick but I'm doing so many of these string manipulations that it's slowing down and script execution is running into minutes. This is a pain because the script is run frequently. I've done some testing and found that str_replace is fastest, followed by strstr, followed by preg_replace. I've also tried individual str_replace statements as well as constructing arrays of patterns and replacements. I'm toying with the idea of isolating string manipulation operation and writing in a different language but I don't want to invest time in that option only to find that improvements are negligible. Plus, I only know Perl, PHP and COBOL so for any other language I would have to learn it first. I'm wondering how other people have approached similar problems? I have searched and I don't believe that this duplicates any existing questions.

    Read the article

  • How would one call std::forward on all arguments in a variadic function?

    - by Noah Roberts
    I was just writing a generic object factory and using the boost preprocessor meta-library to make a variadic template (using 2010 and it doesn't support them). My function uses rval references and std::forward to do perfect forwarding and it got me thinking...when C++0X comes out and I had a standard compiler I would do this with real variadic templates. How though, would I call std::forward on the arguments? template < typename ... Params void f(Params ... params) // how do I say these are rvalue reference? { y(std::forward(...params)); //? - I doubt this would work. } Only way I can think of would require manual unpacking of ...params and I'm not quite there yet either. Is there a quicker syntax that would work?

    Read the article

  • Representing a number in a byte array (java programming)

    - by Mark Roberts
    I'm trying to represent the port number 9876 (or 0x2694 in hex) in a two byte array: class foo { public static void main (String args[]) { byte[] sendData = new byte[1]; sendData[0] = 0x26; sendData[1] = 0x94; } } But I get a warning about possible loss of precision: foo.java:5: possible loss of precision found : int required: byte sendData[1] = 0x94; ^ 1 error How can I represent the number 9876 in a two byte array without losing precision?

    Read the article

  • Google I/O 2010 - Tech, innovation, CS, & more: A VC panel

    Google I/O 2010 - Tech, innovation, CS, & more: A VC panel Google I/O 2010 - Technology, innovation, computer science, and more: A VC panel Tech Talks Albert Wenger, Chris Dixon, Dave McClure, Brad Feld, Paul Graham, Dick Costolo What do notable tech-minded VCs think about big trends happening today? In this session, you'll get to hear from and ask questions to a panel of well-respected investors, all of whom are programmers by trade. Albert Wenger, Chris Dixon, Dave McClure, Paul Graham, and Brad Feld will duke it out on a number of hot tech topics with Dick Costolo moderating. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 329 5 ratings Time: 01:00:20 More in Science & Technology

    Read the article

  • UK SQL Server User Group Events (June)

    There are two events of note for the SQL Server User Group in June.  The first is a Live Meeting event with myself on 04.06.2009.  I am going to be looking at how to integrate Data Mining into your BI solution.  I will be looking at putting DM into SSIS, SSAS and SSRS.  It will be very demo oriented.  You can register for the event here The second event is an event at Microsoft Reading on 10.06.2009.  The evening will be a BI/Data Mining event.  Chris Webb and myself are organizing it and  we want speakers.  We would love to see new faces up there telling us about their BI/DM solutions/Tips and Tricks.  If you want to speak at the event then let me or Chris know.  If you just want to attend then you can register here.

    Read the article

  • Silverlight Cream for December 09, 2010 -- #1006

    - by Dave Campbell
    In this Issue: Adam Kinney, Jonathan van de Veen, René Schulte(-2-), Vikas, Chad Campbell, Chris Koenig, John Papa, and Martin Krüger. Above the Fold: Silverlight: "Silverlight TV #54: Introducing 11 Brand New Labs" John Papa WP7: "Gestures in Windows Phone 7" Chris Koenig Training: "New Windows Phone 7 tutorials for Designers on toolbox!" Adam Kinney Shoutouts: Jesse Liberty posted ways to get help when you get stuck: Top 10 Tips To Getting Help With Silverlight From SilverlightCream.com: New Windows Phone 7 tutorials for Designers on toolbox! Adam Kinney posted about some WP7 design goodness he's had the opportunity to take part in putting together that is now available for all of us on the Microsoft design Toolbox site.... detailed info about what's there. Adventures while building a Silverlight Enterprise application part #39 Jonathan van de Veen has his latest Silverlight coding adventure detailed on his blog... in the final throes of releasing, he came across some issues surrounding CRUD operations... Windows Phone Unplugged - How to Detect the Zune Software René Schulte has a post up about my two favorite devices: Zune and WP7 ... and how to detect if the Zune software is running when the device is connected to the PC. Issue with the WP7 PictureDecoder and Workaround René Schulte has a second post up today about strange behavior with the PictureDecoder DecodeJpeg method... he describes the problem and a workaround for it. Performance Wizard for Silverlight Vikas reports some Silverlight goodness in the VS2010 SP1 beta that's out ... a Performance Wizard... and he's ratted out it's use and sharing that info... Submitting an App to the Windows Phone Marketplace Chad Campbell details the user experience of getting an app through the marketplace to users... from the standpoint of someone that's been there. Gestures in Windows Phone 7 Chris Koenig is talking about Gestures in WP7, documenting how he used some XNA to get some side-to-side image scrolling going on... and gave us the source! Silverlight TV #54: Introducing 11 Brand New Labs John Papa has his latest Silverlight TV up and he's talking to two great guys: Dan Wahlin and Corey Schuman who have produced the labs you've seen referenced... awesome stuff guys... WP7: precisely position the text cursor when writing text Martin Krüger has a quick WP7 usage tip up for precisely positioning the text cursor in a textbox ... I could have used that today when "Nick's Frame Shop" came up as "Nix Frame Shop" in a search. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Mobile: Wrox Cross Platform Mobile Development - iPhone, iPad, Android, and everything with .NET & C#

    - by Wallym
    Wrox has produced a bundle of their 3 best selling mobile development books and it is available as of Today (March 16). A bundle of 3 best-selling and respected mobile development e-books from Wrox form a complete library on the key tools and techniques for developing apps across the hottest platforms including Android and iOS. This collection includes the full content of these three books, at a special price: Professional Android Programming with Mono for Android and .NET/C#, ISBN: 9781118026434, by Wallace B. McClure, Nathan Blevins, John J. Croft, IV, Jonathan Dick, and Chris Hardy Professional iPhone Programming with MonoTouch and .NET/C#, ISBN: 9780470637821, by Wallace B. McClure, Rory Blyth, Craig Dunn, Chris Hardy, and Martin Bowling Professional Cross-Platform Mobile Development in C#, ISBN: 9781118157701, by Scott Olson, John Hunter, Ben Horgen, and Kenny Goers Remember, go buy 8-10 copies of the 3 book set for the ones you love. They will make great and romantic gifts!!

    Read the article

  • Silverlight Cream for June 28, 2011 -- #1112

    - by Dave Campbell
    In this Issue: WindowsPhoneGeek, John Papa, Mike Taulty, Erno de Weerd, Stephen Price, Chris Rouw, Peter Kuhn, Damian Schenkelman, Michael Washington, and Manas Patnaik. Above the Fold: Silverlight: "Binding to View Model properties in Data Templates. The RootBinding Markup Extension" Damian Schenkelman WP7: "Storing Files in SQL Server using WCF RIA Services and Silverlight – Part 3" Chris Rouw LightSwitch: "Saving Files To File System With LightSwitch (Uploading Files)" Michael Washington Shoutouts: Steve Wortham announced a change to his XilverlightXAP.com site... they're now accepting XAML illustrations: Introducing XAML Illustrations, Increased Payouts to Contributors, and More Amid all the discussions that I've tried to avoid, Michael Washinton is Betting The House On LightSwitch From SilverlightCream.com: Dynamically updating a data bound LongListSelector in Windows Phone WindowsPhoneGeek's latest is on using the LongListSelector from the Toolkit and dynamically updating it with data... detailed guidelines and plenty of pictures and code as always. Silverlight TV 77: Exploring 3D with Aaron Oneal John Papa has Silverlight TV number 77 up and is chatting with Aaron Oneal, program manager of the Silverlight 3D efforts... too cool. Silverlight WebBrowser Control for Offline Apps (Part 2) Mike Taulty wrote this post in Silverlight 5 Beta, but says it should be fine in 4... a continuation of his HTML Content display using the WebBrowser control while offline Windows Phone 7: Databinding and the Pivot Control Erno de Weerd discusses the Pivot control in WP7 based on his attempts to use it in an app. Required Attribute on an Entity Stephen Price has a new post at XAML Source... first is this one on setting the required attribute and the troubles you can get into if it's not set correctly Storing Files in SQL Server using WCF RIA Services and Silverlight – Part 3 Chris Rouw has Part 3 of his series on Storing files in SQL Server using FILESTREAM Storage in SQL Server 2008 and Silverlight... this time he's viewing files stored in the FILESTREAM from the LOB app. Getting ready for the Windows Phone 7 Exam 70-599 (Part 4) Peter Kuhn has Part 4 of his series on getting ready for the WP7 exam up at SilverlightShow... the date is coming up soon... are you ready? Binding to View Model properties in Data Templates. The RootBinding Markup Extension Damian Schenkelman has a Silverlight 5 Beta post up... digging into the XAML Markup Extensions and popping out a RootBindingExtensionthat helps bind to a property in a view model from a DataTemplate. Saving Files To File System With LightSwitch (Uploading Files) Michael Washington has a cool tutorial up on his new LightSwitch Help Website... File Upload to a server file system using LightSwitch, plus a project to download... good stuff! Microsoft Media Platform (MMPPF): Player Framework for Silverlight Manas Patnaik's latest post is about the Media Player Project... some of the history of media with Silvelight and how to go about using the Media Player Project bits Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • UK SQL Server User Group Events (June)

    There are two events of note for the SQL Server User Group in June.  The first is a Live Meeting event with myself on 04.06.2009.  I am going to be looking at how to integrate Data Mining into your BI solution.  I will be looking at putting DM into SSIS, SSAS and SSRS.  It will be very demo oriented.  You can register for the event here The second event is an event at Microsoft Reading on 10.06.2009.  The evening will be a BI/Data Mining event.  Chris Webb and myself are organizing it and  we want speakers.  We would love to see new faces up there telling us about their BI/DM solutions/Tips and Tricks.  If you want to speak at the event then let me or Chris know.  If you just want to attend then you can register here.

    Read the article

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