Search Results

Search found 3237 results on 130 pages for 'david rodriguez dribeas'.

Page 99/130 | < Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >

  • GWT + Seam, cannot fetch scoped beans from gwt servlet in seam resource servlet.

    - by David Göransson
    Hello all I am trying to get session and conversation scoped beans to a gwt servlet in the seam resource servlet. I have a conversation scoped bean: @Name ("viewFormCopyAction") @Scope (ScopeType.CONVERSATION) public class ViewFormCopyAction {} and a session scoped bean: @Name ("authenticator") @Scope (ScopeType.SESSION) public class AuthenticatorAction {} There is a RemoteService interface: @RemoteServiceRelativePath ("strokesService") public interface StrokesService extends RemoteService { public Position getPosition (int conversationId); } with corresponding async interface: public interface StrokesServiceAsync extends RemoteService { public void getPosition (int conversationId, AsyncCallback callback); } and implementation: @Name ("com.web.actions.forms.gwt.client.StrokesService") @Scope (ScopeType.EVENT) public class StrokesServiceImpl implements StrokesService { @In Manager manager; @Override @WebRemote public Position getPosition (int conversationId) { manager.switchConversation( "" + conversationId ); ViewFormCopyAction vfca = (ViewFormCopyAction) Component.getInstance( "viewFormCopyAction" ); AuthenticatorAction aa = (AuthenticatorAction) Component.getInstance( "authenticator" ); return null; } } The gwt page is within an IFrame in a regular seam page and the conversationId is propagted with the src attribute of the IFrame. Both bean objects end up with only null values. Can anyone see anything wrong with the code? I know that I could use strings instead of the int, but never mind that at this point.

    Read the article

  • Ravendb 960 does not honor JsonIgnore with property of Dictionary<string, object>

    - by David Robbins
    Does JsonIgnore not work when a property has data? I have the followin class: public class SomeObject { public string Name { get; set; } public DateTime Created { get; set; } public List<string> ErrorList { get; set; } [JsonIgnore] public Dictionary<string, object> Parameters { get; set; } public SomeObject() { this.ErrorList = new List<string>(); this.Parameters = new Dictionary<string, object>(); } } My expectation was that JsonIgnore would exclude properties from De- / Serialization. My RavenDB document has data. Am I missing something?

    Read the article

  • Changing type of object in a conditional

    - by David Doria
    I'm having a bit of trouble with dynamic_casting. I need to determine at runtime the type of an object. Here is a demo: include include class PersonClass { public: std::string Name; virtual void test(){}; //it is annoying that this has to be here... }; class LawyerClass : public PersonClass { public: void GoToCourt(){}; }; class DoctorClass : public PersonClass { public: void GoToSurgery(){}; }; int main(int argc, char *argv[]) { PersonClass* person = new PersonClass; if(true) { person = dynamic_cast(person); } else { person = dynamic_cast(person); } person-GoToCourt(); return 0; } I would like to do the above. The only legal way I found to do it is to define all of the objects before hand: PersonClass* person = new PersonClass; LawyerClass* lawyer; DoctorClass* doctor; if(true) { lawyer = dynamic_cast(person); } else { doctor = dynamic_cast(person); } if(true) { lawyer-GoToCourt(); } The main problem with this (besides having to define a bunch of objects that won't be use) is that I have to change the name of the 'person' variable. Is there a better way? (I am not allowed to change any of the classes (Person, Lawyer, or Doctor) because they are part of a library that people who will use my code have and won't want to change). Thanks, Dave

    Read the article

  • Getting specific values with regex

    - by David
    I need to knowingly isolate each row of the vCard and get its value. For instance, I want to get "5555" from X-CUSTOMFIELD. So far, my thoughts are: "X-CUSTOMFIELD;\d+" I have been looking at some tutorials and I am a little confused with what function to use? What would my regex above return? Would it give me the whole line or just the numerical part (5555)? I was thinking I i get the whole row, I can use substring to get the digits? BEGIN:VCARD VERSION:2.1 N:Last;First; FN:First Last TEL;HOME;VOICE:111111 TEL;MOBILE;VOICE:222222 X-CUSTOMFIELD;5555 END:VCARD

    Read the article

  • Actionscript Enterframe Movement

    - by David
    I am trying to make accelerated movement, but I am running into a problem that, for the life of me, I cannot understand. My class definition: public class Player extends MovieClip { private var stageRef:Stage; private var key:KeyObject; private var acceleration:int = .5; private var curSpeed:int = 0; public function Player(stageRef:Stage) { this.stageRef = stageRef; addEventListener(Event.ENTER_FRAME, enterFrame); key = new KeyObject(stageRef); } public function enterFrame(e:Event) : void { if(key.isDown(key.RIGHT)) { x += 5; } } } This works to move my position in the x direction at a constant rate. However, if I change enterFrame to public function enterFrame(e:Event) : void { if(key.isDown(key.RIGHT)) { x += acceleration; } } No movement occurs. Is there something going on in the event I do not understand? Why is it that I can have x increased by a constant value but not a constant value as defined in a variable in the class? Is it a scope issue?

    Read the article

  • Is developing iPhone apps in any language other than Objective-C ever a truly viable solution?

    - by David Foster
    I hear all this stuff about crazy ways to build iPhone apps using Ruby or C# under .NET or the like. Even stuff about developing apps on Windows using Java, or auto-generated apps using Flash CS5 or something. Now, I've never really spent any time at all investigating these claims—I just brushed them off as clumsy or cumbersome or down-right claptrap—but I'm a proud Objective-C programmer who's perhaps a little worried as to whether there's any truth in all of this?

    Read the article

  • C++ Template Class Constructor with Variable Arguments

    - by david
    Is it possible to create a template function that takes a variable number of arguments, for example, in this Vector< T, C class constructor: template < typename T, uint C > Vector< T, C >::Vector( T, ... ) { assert( C > 0 ); va_list arg_list; va_start( arg_list, C ); for( uint i = 0; i < C; i++ ) { m_data[ i ] = va_arg( arg_list, T ); } va_end( arg_list ); } This almost works, but if someone calls Vector< double, 3 ( 1, 1, 1 ), only the first argument has the correct value. I suspect that the first parameter is correct because it is cast to a double during the function call, and that the others are interpreted as ints and then the bits are stuffed into a double. Calling Vector< double, 3 ( 1.0, 1.0, 1.0 ) gives the desired results. Is there a preferred way to do something like this?

    Read the article

  • C++ is there a difference between assignment inside a pass by value and pass by reference function?

    - by Rémy DAVID
    Is there a difference between foo and bar: class A { Object __o; void foo(Object& o) { __o = o; } void bar(Object o) { __o = o; } } As I understand it, foo performs no copy operation on object o when it is called, and one copy operation for assignment. Bar performs one copy operation on object o when it is called and another one for assignment. So I can more or less say that foo uses 2 times less memory than bar (if o is big enough). Is that correct ? Is it possible that the compiler optimises the bar function to perform only one copy operation on o ? i.e. makes __o pointing on the local copy of argument o instead of creating a new copy?

    Read the article

  • LNK2019 Against CArray Add, GetAt, GetSize, all includes are present

    - by David J
    I'm having some issues trying to Compile a DLL, but I just can't see where this linking error is coming from. My LNK2019 is: Exports.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall CArray<struct HWND__ *,struct HWND__ *>::Add(struct HWND__ *)" (__imp_?Add@? $CArray@PAUHWND__@@PAU1@@@QAEHPAUHWND__@@@Z) referenced in function "int __stdcall _Disable(struct HWND__ *,long)" (?_Disable@@YGHPAUHWND__@@J@Z) Disable(...) is... static BOOL CALLBACK _Disable(HWND hwnd, LPARAM lParam) { CArray<HWND, HWND>* pArr = (CHWndArray*)lParam; if(::IsWindowEnabled(hwnd) && ::IsWindowVisible(hwnd)) { pArr->Add(hwnd); ::Enable(hwnd, FALSE); } } This is the first function in Exports.cpp; right above it is #include <afxtempl.h> I have the Windows 7.1 SDK installed (and have tried reinstalling both that and VS2010). The exact same project compiles perfectly fine on other machines, so it can't be the code itself.. I've spent countless errors researching, which led to desperate attempts of just changing random values in the solution file, including different Windows headers, etc. My last resort is getting to be just reinstalling the OS completely (assuming it's actually a problem with the Windows SDK being incorrect or something). Any suggestions at all would be a huge help. EDIT: I've added /showIncludes on the cpp giving issues, and I do see afxtempl.h being included. It's being included multiple times due to other headers including it, but it is there (and it is from the same directory every time): 1> Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\afxtempl.h

    Read the article

  • How to animate line-drawing in iPhone development?

    - by david
    I have been searching around, but there seems no good answer for this simple question. So I am asking again: how to animate line-drawing in iphone dev? Basically what I want is something like this: @implementation MyUIView - (void) triggerLineDrawing: (CGPathRef) path { ... // animate line drawing here } Can it be done?

    Read the article

  • What's the easiest way to implement background downloading in Wicket?

    - by David Moles
    I've got a simple Wicket form that lets users select some data and then download a ZIP file (generated on the fly) containing what they asked for. Currently the form button's onSubmit() method looks something like this: public void onSubmit() { IResourceStream stream = /* assemble the data they asked for ... */ ; ResourceStreamRequestTarget target = new ResourceStreamRequestTarget(stream); target.setFileName("download.zip"); RequestCycle.get().setRequestTarget(target); } This works, but of course the request stops there and it's impossible to display any other feedback to the user. What I'd like to have is something like the typical "Your requested download [NAME] should begin automatically. If not, click this link." Ideally, still displaying the same page, so the user can immediately select some different data and download that as well. I imagine it's possible to do this using Wicket's Ajax classes, but I've managed to avoid having to use them so far, and it's not immediately obvious to me how. What's my quickest way out, here?

    Read the article

  • Webhook data for Orders Paid

    - by David Lazar
    A client recently requested some fancy processing based off of the Gateway attribute registered with a Paid order. When I receive, validate and inspect the JSON of the order, I am logging the gateway attribute and finding it is nil at times. When I check the order using the API after the Webhook, the gateway attribute is present and matches the one rendered in the Shop admin. Is there an explanation for why the gateway can at times be nil? This prevents me from taking care of the client's requested processing.

    Read the article

  • In java can i have more than one class/object in a file?

    - by David
    So the way i've been told to do things is you have your file and the file name is Classname.java and then the code is something like this: class ClassName { SOME METHODS main {} } and then thats all. I'd like to have two objects defined and used within the same .java file. (i don't want to have to put the other class in a difernt file just because i'd like to send this to someone and i want to avoid hasstle of atatching multiple files to an email [the lazy do make good programers though if you think about it]) is it possible to do this? do i have to do anything special and if so what? what are some mistakes i'm likely to make or that you have made in the past when doing this?

    Read the article

  • How to retrieve Google Appengine Objects by id (Long value) ?

    - by David
    Hi, i have declared an entity the following way: public class MyEntity { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; @Persistent private String text; //getters and setters } Now I want to retrieve the objects using the id. I tried to manage it from the Google Appengine Data Viewer with "SELECT * FROM MyEntity Where id = 382005" or via a query in a servlet. I get no results returned. But i know for sure that the object with the id exists (i made a jsp which queries all objects in the db and displays them in the db). So what is wrong in my query? Am I querying the wrong field? The Google Appengine Data Viewer names the field "ID/name" and it has the value "id=382005". Do I have to query with this names? I've tried but it didn't work out :(

    Read the article

  • How to stop an activity with GL view. Application not responding

    - by David
    I have an activity that I want to programmatically stop after some elapsed time. I have a GL view running. My understanding is that the GLSurfaceView.renderer is running in its own thread, so I created a handler instantiated from the activity. In the GLSurfaceView I post a message. The handler then attempts to stop the activity with the following: onStop(); finish(); The activity seems to close. However, if I try to restart the application, I get a blank screen, the phone is practically locked up and eventually I get a message that the activity in the application is not responding. I'm also getting geting a wake lock, ie PowerManager.newWakeLock(...). When I try to release it, I get an exception. Not sure if its the GL view of the wake lock which is causing me troubles. Any ideas appreciated.

    Read the article

  • Get Item from Collection by unique ID

    - by David Murdoch
    I have a collection of Contacts that inherits from CollectionBase: public class ContactCollection : CollectionBase{ //... } each contact in the collection has a unique ID: public class Contact{ public int ContactID{ get; private set; } //... } I think what I would like to do is something like the following: // get the contact by their unique [Contact]ID Contact myPerson = Contact.GetContactById(15); // get all contacts for the customer ContactCollection contacts = customer.GetContacts(); // replaces the contact in the collection with the // myPerson contact with the same ContactID. contacts.ReplaceAt(myPerson); // saves the changes to the contacts and the customer // customer.Save(); There is probably a better way...if so, please suggest it.

    Read the article

  • Optimise & improve performance of this MYSQL query

    - by David
    SELECT u.id, u.honour, COUNT(*) + 1 AS rank FROM user_info u INNER JOIN user_info u2 ON u.honour < u2.honour WHERE u.id = '$id' AND u2.status = 'Alive' AND u2.rank != '14' This query is currently utterly raping my server. It works out based on your honour what rank you are within the 'user_info' table which stores it out of all our users. Screenshot for explain. http://cl.ly/370z0v2Y3v2X1t1r1k2A SELECT u.id, u.honour, COUNT(*)+1 as rank FROM user_info u USE INDEX (prestigeOptimiser) INNER JOIN user_info u2 ON u.honour < u2.honour WHERE u.id='3' AND u2.status='Alive' AND u2.rank!='14'

    Read the article

  • How do I specify (1) an order and (2) a meaninful string representation for users in my Django application?

    - by David Faux
    I have a Django application with users. I have a model called "Course" with a foreign key called "teacher" to the default User model that Django provides: class Course(models.Model): ... teacher = models.ForeignKey(User, related_name='courses_taught') When I create a model form to edit information for individual courses, the possible users for the teacher field appear in this long select menu of user names. These users are ordered by ID, which is of meager use to me. How can I order these users by their last names? change the string representation of the User class to be "Firstname Lastname (username)" instead of "username"?

    Read the article

< Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >