Search Results

Search found 663 results on 27 pages for 'aaron francis'.

Page 8/27 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Dynamically creating GWT screens using Metadata?

    - by Francis Shanahan
    I have an AWT applet application that needs to be ported over to GWT. The applet screens are described in meta data and the applet renders each screen dynamically using reflection. We'd like the same thing in GWT/ExtGWT. I've built a working version of this ExtJS whereby the metadata is turned into ExtJS Screen configs in the form of JSON. The drawback with this approach is the "wiring" of controls to data needs to be written in Javascript. GWT is preferred since it'd be all Java code, no JS. Upon digging in it's possible to render the screens using GWT off the metadata using GWT.create(). The problem I'm having is the wiring to hook a dynamically created button for example to an event handler requires reflection which is not supported in GWT. Is this conclusion correct? and if so, are there any other ways to achieve this type of dynamic UI using ExtGWT?

    Read the article

  • how to specify open id realm in openid4java 0.9.5

    - by Salvin Francis
    my url @ development : http://192.168.0.1:8888/com.company.MyEntryPoint/MyEntrypoint.html my url @ live env : http://www.example.com/com.company.MyEntryPoint/MyEntrypoint.html I need users to authenticate using open id, this is how i want my realm to be: *.company.MyEntryPoint I wrote a simple code to specify realm: AuthRequest authReq = manager.authenticate( discovered, returnToUrl, "*.company.MyEntryPoint" ); it does not work. Exception: org.openid4java.message.MessageException: 0x301: Realm verification failed (2) for: *.company.MyEntryPoint at org.openid4java.message.AuthRequest.validate(AuthRequest.java:354) at org.openid4java.message.AuthRequest.createAuthRequest(AuthRequest.java:101) at org.openid4java.consumer.ConsumerManager.authenticate(ConsumerManager.java:1073) Of all the combinations I tried, curiously, the following worked: AuthRequest authReq = manager.authenticate( discovered, returnToUrl, "http://localhost:8888/com.capgent.MyEntryPoint" ); This does not solves my issue but rather complicates it :) According to google and open id spec it should have worked complete code snippet: List discoveries = manager.discover(clientUrl); DiscoveryInformation discovered = manager.associate(discoveries); AuthRequest authReq = manager.authenticate(discovered, returnToUrl,"*.company.MyEntryPoint"); FetchRequest fetch = FetchRequest.createFetchRequest(); fetch.addAttribute("email", "http://schema.openid.net/contact/email", true); fetch.addAttribute("country", "http://axschema.org/contact/country/home", true); fetch.addAttribute("firstname", "http://axschema.org/namePerson/first", true); fetch.addAttribute("lastname", "http://axschema.org/namePerson/last", true); fetch.addAttribute("language", "http://axschema.org/pref/language", true); authReq.addExtension(fetch); String returnStr; if (!discovered.isVersion2()) { returnStr = authReq.getDestinationUrl(true); } else { returnStr = authReq.getDestinationUrl(false); } What am I doing wrong over here ?

    Read the article

  • ASP.NET 2.0 - scaffolding a database table for webforms

    - by Francis Huang
    Can you recommend a tool that can analyze a SQL database table, read the table columns, and populate an .aspx page with appropriate controls (i.e. textboxes with matching labels)? See this demo of ComponentOne InputPanel for WinForms for the functionality desired. Are there any built-in tools for ASP.NET 2.0 WebForms that can help build a scaffold page for any given database table or entity? Are there any free components out there to help achieve this goal?

    Read the article

  • Access the camera with iPhone SDK

    - by Jason Francis
    It seems obvious that some people have been able to figure out how to access the iPhone camera through the SDK (Spore Origins, for example), but I haven't been able to find any helpful information. I don't want anyone to violate their NDA, but does anyone know of any existing (official) resources that show how this can be done? Thanks.

    Read the article

  • How to parse strings representing xml.dom.minidom nodes in python?

    - by Francis Davey
    I have a collection of nodes xml.dom.Node objects created using xml.dom.minidom. I store them (individually) in a database by converting them to a string using the toxml() method of a the Node object. The problem is that I'd sometimes like to be able to convert them back to the appropriate Node object using a parser of some kind. As far as I can see the various libraries shipped with python use Expat which won't parse a string like '' or indeed anything which is not a correct xml string. So, does anyone have any ideas? I realise I could pickle the nodes in some way and then unpickle them, but that feels unpleasant and I'd much rather be storing in a form I can read for maintenance purposes. Surely there is something that will do this?

    Read the article

  • How do I specify Open ID Realm in spring security ?

    - by Salvin Francis
    We are using Spring security in our application with support for username / password based authentication as well as Open id based authentication. The issue is that google gives a different open id for the return url specified and we have at least 2 different entry points in our application from where open id is configured into our system. Hence we decided to use open id realm. http://blog.stackoverflow.com/2009/0...ue-per-domain/ http://groups.google.com/group/googl...unts-api?pli=1 how is it possible to integrate realm into our spring configuration/code ? This is how we are doing it in traditional openid library code: AuthRequest authReq = consumerManager.authenticate(discovered, someReturnToUrl,"http://www.example.com"); This works and gives same open id for different urls from our site. our configuration: Code: ... <http auto-config="false"> <!-- <intercept-url> tags are here --> <remember-me user-service-ref="someRememberedService" key="some key" /> <form-login login-page="/Login.html" authentication-failure-url="/Login.html?error=true" always-use-default-target="false" default-target-url="/MainPage.html"/> <openid-login authentication-failure-url="/Login.html?error=true" always-use-default-target="true" default-target-url="/MainPage.html" user-service-ref="someOpenIdUserService"/> </http> ... <beans:bean id="someOpenIdUserService" class="com.something.MyOpenIDUserDetailsService"> </beans:bean> <beans:bean id="openIdAuthenticationProvider" class="com.something.MyOpenIDAuthenticationProvider"> <custom-authentication-provider /> <beans:property name="userDetailsService" ref="someOpenIdUserService"/> </beans:bean> ...

    Read the article

  • TypeError: Error #2007: Parameter child must be non-null.

    - by Bobby Francis Joseph
    I am running the following piece of code: package { import fl.controls.Button; import fl.controls.Label; import fl.controls.RadioButton; import fl.controls.RadioButtonGroup; import flash.display.Sprite; import flash.events.MouseEvent; import flash.text.TextFieldAutoSize; public class RadioButtonExample extends Sprite { private var j:uint; private var padding:uint = 10; private var currHeight:uint = 0; private var verticalSpacing:uint = 30; private var rbg:RadioButtonGroup; private var questionLabel:Label; private var answerLabel:Label; private var question:String = "What day is known internationally as Speak Like A Pirate Day?"; private var answers:Array = [ "August 12", "March 4", "September 19", "June 22" ]; public function RadioButtonExample() { setupQuiz(); } private function setupQuiz():void { setupQuestionLabel(); setupRadioButtons(); setupButton(); setupAnswerLabel(); } private function setupQuestionLabel():void { questionLabel = new Label(); questionLabel.text = question; questionLabel.autoSize = TextFieldAutoSize.LEFT; questionLabel.move(padding, padding + currHeight); currHeight += verticalSpacing; addChild(questionLabel); } private function setupAnswerLabel():void { answerLabel = new Label(); answerLabel.text = ""; answerLabel.autoSize = TextFieldAutoSize.LEFT; answerLabel.move(padding + 120, padding + currHeight); addChild(answerLabel); } private function setupRadioButtons():void { rbg = new RadioButtonGroup("question1"); createRadioButton(answers[0], rbg); createRadioButton(answers[1], rbg); createRadioButton(answers[2], rbg); createRadioButton(answers[3], rbg); } private function setupButton():void { var b:Button = new Button(); b.move(padding, padding + currHeight); b.label = "Check Answer"; b.addEventListener(MouseEvent.CLICK, checkAnswer); addChild(b); } private function createRadioButton(rbLabel:String, rbg:RadioButtonGroup):void { var rb:RadioButton = new RadioButton(); rb.group = rbg; rb.label = rbLabel; rb.move(padding, padding + currHeight); addChild(rb); currHeight += verticalSpacing; } private function checkAnswer(e:MouseEvent):void { if (rbg.selection == null) { return; } var resultStr:String = (rbg.selection.label == answers[2]) ? "Correct" : "Incorrect"; answerLabel.text = resultStr; } } } This is from Adobe Livedocs. http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/ I have added a Radiobutton to stage and then deleted it so that its there in the library. However I am getting the following error TypeError: Error #2007: Parameter child must be non-null. at flash.display::DisplayObjectContainer/addChildAt() at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground() at fl.controls::LabelButton/fl.controls:LabelButton::draw() at fl.controls::Button/fl.controls:Button::draw() at fl.core::UIComponent/::callLaterDispatcher() Can anyone tell me what is going on and how to remove this error.

    Read the article

  • Why is Window.open()'s return type void ?

    - by Salvin Francis
    Doing something like this is perfectly permissible in javascript: var newWindow = window.open(...) However, this does not work in the senario of GWT (I am using 1.5 I dont know about later versions), Window window = Window.open("", "", ""); Throws me a compile time error that the open is a method with a return type as void. Why should it be void ? What if i want to close my popup from the main Window ? how do I get its handle ? I will have to resort to native javascript no doubt but i was just curious so as to why this is so...

    Read the article

  • How do I create a ListBox In Ext-GWT ?

    - by Salvin Francis
    Plain and Simple, I want to use a Listbox in my project, The demo here: http://www.extjs.com/examples shows no answer, In fact, I really hate it when companies show-off their 'complex' widgets in this manner and fail to show the most basic of all widgets. For example, I discovered class SimpleComboBox over the net till then I assumed that we required a class to contain list store, etc...

    Read the article

  • Drupal 7 Forms API Conditional Logic not working in IE

    - by Francis Yaconiello
    I have a drupal 7 form with a bunch of fields: $form['account_type'] = array( '#title' => t('Utility Account Type'), '#type' => 'select', '#options' => necp_enrollment_administration_portal_account_type_options(), '#required' => TRUE, '#default_value' => isset($form_state['values']['account_type']) ? $form_state['values']['account_type'] : '', ); // Should show if account_type = 1 $form['home_wrapper'] = array( '#type' => 'fieldset', '#states' => array( 'visible' => array( ':input[name="account_type"]' => array('value' => 1), ), ), ); $form['home_wrapper']['first_name_1'] = array( '#title' => t('Primary Account First Name'), '#type' => 'textfield', '#default_value' => isset($form_state['values']['first_name_1']) ? $form_state['values']['first_name_1'] : '', '#states' => array( 'required' => array( ':input[name="account_type"]' => array('value' => 1), ), ), ); $form['home_wrapper']['last_name_1'] = array( '#title' => t('Primary Account Last Name'), '#type' => 'textfield', '#default_value' => isset($form_state['values']['last_name_1']) ? $form_state['values']['last_name_1'] : '', '#states' => array( 'required' => array( ':input[name="account_type"]' => array('value' => 1), ), ), ); // Should show if account_type = 2 $form['business_wrapper'] = array( '#type' => 'fieldset', '#states' => array( 'visible' => array( ':input[name="account_type"]' => array('value' => 2), ), ), ); $form['business_wrapper']['company_name'] = array( '#title' => t('Company/Organization'), '#type' => 'textfield', '#default_value' => isset($form_state['values']['company_name']) ? $form_state['values']['company_name'] : '', '#states' => array( 'required' => array( ':input[name="account_type"]' => array('value' => 2), ), ), ); In Firefox/Chrome/Opera all versions this form behaves as it should. However in all versions of IE the form initializes with display:none; style on all of the conditional fields regardless of what the value in account_type is. Changing the selected option of account_type does not effect the hidden status. Any tips on debugging this form would be awesome. Notes: I am not much of a Drupal developer, I inherited this site. Just trying to iron out the last couple bugs so we can go live there are more fields than are listed above, I just gave you some of the applicable ones so that you could get the gist of how my forms were setup current url for the form in development: https://northeastcleanpower.com/enroll_new I'm using http://www.browserstack.com/ to debug IE 7 - 10pp4 (I think we only have to support 8 and up though) I've also tried: ':select[name="account_type"]' => array('value' => 1), '#edit-account-type' => array('value' => 1),

    Read the article

  • Handling duplicate insertion

    - by Francis
    So I've got this piece of code which, logically should work but Entity Framework is behaving unexpectedly. Here: foreach (SomeClass someobject in allObjects) { Supplier supplier = new Supplier(); supplier.primary_key = someobject.id; supplier.name = someobject.displayname; try { sm.Add(supplier); ro.Created++; } catch (Exception ex) { ro.Error++; } } Here's what I have in sm.Add() public Supplier Add(Supplier supplier) { try { _ctx.AddToSupplier(supplier); _ctx.SaveChanges(); return supplier; } catch (Exception ex) { throw; } } I can have records in allObjects that have the same id. My piece of code needs to support this and just move on to the next and try to insert it, which I think should work. If this happens, an exception is throw, saying that records with dupe PKs cannot be inserted (of course). The exception mentions the value of the PK, for example 1000. All is well, a new supplier is passed to sm.Add() containing a PK that's never been used before. (1001) Weirdly though, when doing SaveChanges(), EF will whine about not being able to insert records with dupe PKs. The exception still mentions 1000 even though supplier contains 10001 in primary_key. I feel this is me not using _ctx properly. Do I need to call something else to sync it ?

    Read the article

  • How is it that i am getting two different open ids for the same site for the same user

    - by Salvin Francis
    I was under the impression that the open id for a user remains constant. I am allowing users to setup open id with my site with 2 different screens in my app... I was under the impression that the open id for a user is constant and will not change and I was planning to save it to my database for a given user, However, to my suprise, I found different ids for the same user using the same google account in the two different screens. How does open id actually work ?

    Read the article

  • Resolve HTTP 304 - not modified in AJAX call made via GWT

    - by Salvin Francis
    We are using an application made in GWT with the server as tomcat. The project runs fine normally, however there are situations where the server is restarted. At such point of time, the ajax call made by the code below returns blank text with the status code as 304 RequestBuilder requestBuilder = new RequestBuilder(RequestBuilder.POST, URL.encode(serverUrl)); //-- serverUrl is the url to which this call is posted to. requestBuilder.setHeader("Content-Type", "application/x-www-form-urlencoded"); requestBuilder.setHeader("Expires","0"); requestBuilder.sendRequest( postData, new RequestCallback() { public void onError(Request request, Throwable exception) { //Do nothing } public void onResponseReceived(Request request, Response response) { //sometimes when the server is restarted, I get response.getStatusCode() = 304 and the response.getText() as blank } } ); normally we get back some data from the server inside this response text. How do we now get the data when the response itself is blank ?

    Read the article

  • Find value within a range in lookup table

    - by francis
    I have the simplest problem to implement, but so far I have not been able to get my head around a solution in Python. I have built a table that looks similar to this one: 501 - ASIA 1262 - EUROPE 3389 - LATAM 5409 - US I will test a certain value to see if it falls within these ranges, 389 -> ASIA, 1300 -> LATAM, 5400 -> US. A value greater than 5409 should not return a lookup value. I normally have a one to one match, and would implement a dictionary for the lookup. But in this case I have to consider these ranges, and I am not seeing my way out of the problem. Maybe without providing the whole solution, could you provide some comments that would help me look in the right direction? It is very similar to a vlookup in a spreadsheet. I would describe my Python knowledge as somewhere in between basic to intermediate. Many thanks in advance.

    Read the article

  • How to Prevent an Applet from Unloading across web pages?

    - by Francis Shanahan
    I have a large applet that takes some 40 seconds to initialize (cabs are cached so ignore download time for this question). The issue is, if the user goes to Page A which launches the applet (single window) and then navigates to page B, the applet is unloaded. If the user goes back to Page A, they incur the 40 seconds init time once again. I'd like to be able to launch the applet, incurring the 40 seconds init time once and only once. The applet needs to reside inside a single browser window (the same window as my web application). In other words, I cannot launch the applet in a popup. Does anyone have any creative ideas around how to prevent the applet unloading?

    Read the article

  • How can I improve my select query for storing large versioned data sets?

    - by Jason Francis
    At work, we build large multi-page web applications, consisting mostly of radio and check boxes. The primary purpose of each application is to gather data, but as users return to a page they have previously visited, we report back to them their previous responses. Worst-case scenario, we might have up to 900 distinct variables and around 1.5 million users. For several reasons, it makes sense to use an insert-only approach to storing the data (as opposed to update-in-place) so that we can capture historical data about repeated interactions with variables. The net result is that we might have several responses per user per variable. Our table to collect the responses looks something like this: CREATE TABLE [dbo].[results]( [id] [bigint] IDENTITY(1,1) NOT NULL, [userid] [int] NULL, [variable] [varchar](8) NULL, [value] [tinyint] NULL, [submitted] [smalldatetime] NULL) Where id serves as the primary key. Virtually every request results in a series of insert statements (one per variable submitted), and then we run a select to produce previous responses for the next page (something like this): SELECT t.id, t.variable, t.value FROM results t WITH (NOLOCK) WHERE t.userid = '2111846' AND (t.variable='internat' OR t.variable='veteran' OR t.variable='athlete') AND t.id IN (SELECT MAX(id) AS id FROM results WITH (NOLOCK) WHERE userid = '2111846' AND (t.variable='internat' OR t.variable='veteran' OR t.variable='athlete') GROUP BY variable) Which, in this case, would return the most recent responses for the variables "internat", "veteran", and "athlete" for user 2111846. We have followed the advice of the database tuning tools in indexing the tables, and against our data, this is the best-performing version of the select query that we have been able to come up with. Even so, there seems to be significant performance degradation as the table approaches 1 million records (and we might have about 150x that). We have a fairly-elegant solution in place for sharding the data across multiple tables which has been working quite well, but I am open for any advice about how I might construct a better version of the select query. We use this structure frequently for storing lots of independent data points, and we like the benefits it provides. So the question is, how can I improve the performance of the select query? I assume the nested select statement is a bad idea, but I have yet to find an alternative that performs as well. Thanks in advance. NB: Since we emphasize creating over reading in this case, and since we never update in place, there doesn't seem to be any penalty (and some advantage) for using the NOLOCK directive in this case.

    Read the article

  • Zend_Form: Is this really the way we should be doing things?

    - by Francis Daigle
    OK. I understand how to use Zend_Form and it's implementation of the decorator pattern. My question is, is this the best way to be going about creating forms? Shouldn't a documents forms be left to to the front-end rather than generating forms programmatically? Doesn't this kinda violate the whole idea of keeping things separate? I mean, really, even providing that you have a good understanding of the methodology being employed, does it really save one that much time? I guess what I'm looking for is some guidance as to what might be considered 'best practice'. I'm not saying that Zend_Form doesn't have it's place, I'm just wondering if it should be used in all cases (or not). And this has nothing to do with validation. I'm just thinking that something more akin to using the 'ViewScript' approach might be more appropriate in most cases. Your thoughts?

    Read the article

  • Who owes who money optimisation problem

    - by Francis
    Say you have n people, each who owe each other money. In general it should be possible to reduce the amount of transactions that need to take place. i.e. if X owes Y £4 and Y owes X £8, then Y only needs to pay X £4 (1 transaction instead of 2). This becomes harder when X owes Y, but Y owes Z who owes X as well. I can see that you can easily calculate one particular cycle. It helps for me when I think of it as a fully connected graph, with the nodes being the amount each person owes. Problem seems to be NP-complete, but what kind of optimisation algorithm could I make, nevertheless, to reduce the total amount of transactions? Doesn't have to be that efficient, as N is quite small for me.

    Read the article

  • Getting SharePoint absolute site url

    - by Francis
    I need to get the current absolute url of my site from inside an aspx page (no codebehind). I tried $SPUrl, but it get's converted into a relative url. <asp:Literal runat="server" text="<% $SPUrl:~Site/mypage.aspx %>" /> results in "/mypage.aspx". It's important that I get the full absolute url starting with "http://". <asp:Literal runat="server" text="<% $SPUrl:~SiteCollection/mypage.aspx %>" /> does the same. The goal is to get this url: "http://myspweb.com/mypage.aspx" as result.

    Read the article

  • How to remove "index.php?" from HTACCESS [duplicate]

    - by Francis Goris
    This question already has an answer here: Reference: mod_rewrite, URL rewriting and “pretty links” explained 2 answers I have url like this: www.site.com/index.php?/genero/aventura/av/ But I would like this to be my new url: site.com/genero/aventura/av/ I used the following code: <IfModule mod_rewrite.c>RewriteEngine On RewriteCond %{HTTP_HOST} !^www.site.com/$ [NC] RewriteRule ^index.php\?/(.*)$ site.com/$1 [R=301,L] </IfModule> but only returns me: site.com/index.php?/genero/aventura/av/ This is my latest & full version: RewriteEngine on #RewriteCond $1 !^(index\.php|ver_capitulo\.html|google3436eb8eea8b8d6e\.html|BingSiteAuth\.xml |portadas|public|mp3|css|favicon\.ico|js|plantilla|i|swf|plugins|player\.swf|robots\.txt) RewriteCond $1 !^(index\.php|public|css|js|i|feed|portadas|robots\.txt|BingSiteAuth\.xml|plugins|i|mp3|favicon\.ico|pluginslist\.xml|google3436eb8eea8b8d6e\.html) RewriteRule ^(.*)$ /index.php?/$1 [L] #DirectoryIndex index.php #RewriteCond %{THE_REQUEST} http://www.page.com/index\.php [NC] #RewriteRule ^(.*?)index\.php$ http://page.com/$1 [L,R=301,NC,NE] #DirectoryIndex index.php #RewriteEngine On Thanks for reading.

    Read the article

  • Update working on target repo when changes are pushed to it

    - by Francis
    I'm implementing GIT for web developemnt, and I want to have the working copy repository that everybody pushes to automatically reflect the latest commit in it (since it is online for everyone on the team to see as a testing site). Right now, you have to run "git reset --hard HEAD" on the repository after somebody pushes to it in order to be up to date.

    Read the article

  • jQuery code works in Chrome, not in IE9

    - by Francis Ducharme
    Pretty new to jQuery here, I've got a chunk of code that works OK in Chrome, but fails in IE9 (have not tried FF yet). Here's the code: var textColor = $('#navmenu-body').css('color'); textColor = textColor.slice(4); In IE9, I get an error to the effect that slice can't be called because textColor is undefined. I was not sure if it's because jQuery just can't find the #navmenu-body element or that it can't find the CSS attribute color. So I did: var j = $('#navmenu-body'); var textColor = $('#navmenu-body').css('color'); textColor = textColor.slice(4); In IE9's console, j.length returns 0. So the selector is indeed, not working Here's the #navmenu-body HTML DOM <div id="navmenu-body" class="x-panel-body x-panel-body-cssmenu x-layout-fit x-panel-body-cssmenu" style="height: 398px; left: 0px; top: 0px; width: 200px;"> </div> Do I need to do something else for IE9 support ?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >