Search Results

Search found 123 results on 5 pages for 'donald hughes'.

Page 3/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • Port blackberry to android app

    - by donald
    Hey, I am porting a blackberry application to android phone. The app is talking to web service using soap api. Is it possible to use ksoap2 available for android and use the same soap stub? if so, how? or I have to rewrite from scratch? I have never used soap/rest api's before, so m confused.

    Read the article

  • Android Custom Dialog NullPointerException

    - by Kyle Hughes
    I cannot for the life of me figure out why I'm getting a NullPointerException. When a user clicks on a particular image, a dialog window is supposed to pop-up and display a larger version of said image: private OnClickListener coverListener = new OnClickListener() { public void onClick(View v) { showDialog(DIALOG_COVER); } }; DIALOG_COVER is set to = 0. The associated onCreateDialog looks like this: protected Dialog onCreateDialog(int id) { Dialog dialog; switch(id) { case DIALOG_COVER: dialog = new Dialog(mContext); dialog.setContentView(R.layout.cover_dialog); dialog.setTitle(book.getTitle()); ImageView coverLarge = (ImageView)findViewById(R.id.coverLarge); coverLarge.setImageBitmap(book.getCover()); break; default: dialog = null; } return dialog; } For reference, this is cover_dialog.xml: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/coverDialog" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="10dp"> <ImageView android:id="@+id/coverLarge" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="fitStart" /></LinearLayout> Now, when the image previously described is clicked, the application immediately crashes and throws the following error through LogCat: 06-08 13:29:17.727: ERROR/AndroidRuntime(2220): Uncaught handler: thread main exiting due to uncaught exception 06-08 13:29:17.757: ERROR/AndroidRuntime(2220): java.lang.NullPointerException 06-08 13:29:17.757: ERROR/AndroidRuntime(2220): at org.kylehughes.android.brarian.AndroidBrarian.onCreateDialog(AndroidBrarian.java:259) The line in question refers to this line inside of onCreateDialog: coverLarge.setImageBitmap(book.getCover()); Basically, I don't get why coverLarge is null at that point. Any help would be much appreciated.

    Read the article

  • Reference a internal class from a Windows Workflow Activity

    - by Ben Hughes
    I'm creating a custom Workflow activity for use within TFS2010. In the same assembly I have a XAML activity and a C# code activity. The XAML activity references the code activity. When the assembly is deployed to our clients, I only want them to be able to use the Workflow activity. The code activity is of little use by itself and would no doubt confuse them. I thought the logical way to do this would be to set the code activity class to internal: the XAML is in the same assembly and should be able to access it. However, when I do that I get an error in the XAML saying that the assembly can't be found. Is there a way to make activities internal/hidden?

    Read the article

  • Using LINQ to XML, how can I join two sets of data based on ordinal position?

    - by Donald Hughes
    Using LINQ to XML, how can I join two sets of data based on ordinal position? <document> <set1> <value>A</value> <value>B</value> <value>C</value> </set1> <set2> <value>1</value> <value>2</value> <value>3</value> </set2> </document> Based on the above fragment, I would like to join the two sets together such that "A" and "1" are in the same record, "B" and "2" are in the same record, and "C" and "3" are in the same record.

    Read the article

  • Managing several hundred occurrences of NSLocalizedString

    - by Gordon Hughes
    My application has several hundred points of localisation, some of which can be reused many times. To prevent from hunting and pecking through code to find occurrences of a particular NSLocalizedString, I create a macro for each in a header file using the #define preprocessor directive. For example: #define kLocFirstString NSLocalizedString(@"Default Text", @"Comment") #define kLocSecondString NSLocalizedString(@"More Text", @"Another comment") ... When I want to refer to a particular string, I do so by its macro name. This method has been working nicely for me, but I'm concerned that such blatant abuse of #define is frowned upon. From the standpoint of "correctness", should I just inline each NSLocalizedString with the code, or is there another method (extern NSString *aString; perhaps?) that I can use to collect the declarations in one place?

    Read the article

  • Ruby on Rails form_remote_tag missing template

    - by Donald Hughes
    I'm using form_remote_tag(:url => {:controller => "home", :action => "search"}, :update => "mydiv"). When I click submit on the form "mydiv" is populated with the error "Template is missing. Missing template home/search.erb in view path app/views". I've tried multiple render options in def search, but they all result in the same error. It looks like the search method is trying to use it's default render even though I'm specifying what I want. I've tried: render 'index' render :text => 'Return this from my method!' Is my url incorrect? Is it not submitting back to my home controller's search method?

    Read the article

  • Is there a Post-Build Extensible Installer System

    - by Will Hughes
    We have a product that we need to create an installer for. It has a number of components which can be installed or not as the situation demands. When we ship our installation package, we want to be able to have that include any number of additional components to be installed. For example, Foo Manager Pro contains: Foo Manager Console Foo Manager Database Foo Manager Services That might be shipped as something like: FooManagerInstaller.exe FMPConsole.pkg FMPDatabase.pkg FMPServices.pkg A package might consist of something like: Manifest Files to be deployed Additional scripts to be executed (eg find file foo.config, do some XML Manipulation) If a client wants to add custom skins and a series of plugins as part of the install, they create their own packages: FMPConsoleSkins.pkg ClientWebservices.pkg If that client then ships it to someone else who wants to add more customisation - they can do so in the same way. We can build this from scratch - but wanted to check if this sort of install system already exists. We already have a set of NAnt scripts which do something not too far from this. But they're difficult to maintain, and quite complex. They don't offer any of the 'niceties' that we'd expect from an installer (like tracking deployed files and removing them if the install fails). We've been looking a little bit at NSIS and building MSIs using WiX, but it's not clear that these can offer us the capability for downstream to provide additional packages, without inventing our own installer language.

    Read the article

  • Raphael Scope Drag n drop multiple paper instances

    - by donald
    I have two Raphael paper instances. In both I want to drag and drop an element (circle). It is important for me to assign both these circles the same id. I expected no problem, as both are in different paper instances and therefore in different scope. What happens is, that somehow both elements react, when I have clicked both elements at least once. If I however give these elements different IDs everything works fine (each element only calls its "start", "drag" and "up" function if draged around). Is this intended behaviour of Raphael and do I have to assign different IDs to the elements in the different paper instances? Hopefully not and you can point me to the right direction :-) Thanks a lot for your Help in advance, Here comes the code: <!doctype html> <html> <head> <meta charset="utf-8" /> <title>DragNDrop</title> <script src="raphael-min.js"></script> </head> <body> <h1>Paper1</h1> <div id="divPaper1" style ="height: 150px; width: 300px; border:thin solid red"></div> <h1>Paper2</h1> <div id="divPaper2" style ="height: 150px; width: 300px; border:thin solid red"></div> <script> start1 = function () { console.log("start1"); } drag1 = function () { console.log("move1"); } up1 = function () { console.log("up1"); } start2 = function () { console.log("start2"); } drag2 = function () { console.log("move2"); } up2 = function () { console.log("up2"); } var paper1 = Raphael("divPaper1", "100%", "100%"); var circle1 = paper1.circle(40, 40, 30); circle1.attr("fill", "yellow"); circle1.id = "circle"; //both circles get the same id circle1.drag(drag1, start1, up1); paper2 = Raphael("divPaper2", "100%", "100%"); var circle2 = paper2.circle(40, 40, 30); circle2.attr("fill", "red"); circle2.id = "circle"; //both circles get the same id circle2.drag(drag2, start2, up2); </script> </body>

    Read the article

  • Pig: Count number of keys in a map

    - by Donald Miner
    I'd like to count the number of keys in a map in Pig. I could write a UDF to do this, but I was hoping there would be an easier way. data = LOAD 'hbase://MARS1' USING org.apache.pig.backend.hadoop.hbase.HBaseStorage( 'A:*', '-loadKey true -caching=100000') AS (id:bytearray, A_map:map[]); In the code above, I want to basically build a histogram of id and how many items in column family A that key has. In hoping, I tried c = FOREACH data GENERATE id, COUNT(A_map); but that unsurprisingly didn't work. Or, perhaps someone can suggest a better way to do this entirely. If I can't figure this out soon I'll just write a Java MapReduce job or a Pig UDF.

    Read the article

  • Routing WCF Traffic Based on URI Domain Requested

    - by Ian Patrick Hughes
    Is there a way to route traffic to a target WCF service file based on the URL domain requested? Basically, I have a single WCF RESTful services project with 3 service files offering different endpoints. It's hosted on a single IIS6 site looking for multiple host header values on port 80. I want to route traffic to different services files whether the requester is asking for www.site1.com, www.site2.com, or www.site3.com. Seems like the sort of thing I would use a global.asax or HTTP Handler for, but I am not sure since this is a regular WCF Service Application. Even though I am on IIS6 for this project, I don't mind using a URL re-writer and wildcard mapping, if I have to. I have admin rights on the balanced servers where this will reside, I just want to know if there is a common/best practice before I start hacking my way around this.

    Read the article

  • Ruby Nokogiri uninitialized constant

    - by donald
    `<main>': uninitialized constant Object::Nakogiri (NameError) I get that message when trying to run a simple code (ruby test.rb): require 'rubygems' require 'nokogiri' require 'open-uri' url = "http://www.walmart.com/cp/Baby-Days/1035659?povid=cat14503-env172199-module122910-lLinksptBABY" doc = Nakogiri::HTML(open(url)) puts doc.at_css("title").text I have the gem installed: ~/Code $ gem list --local | grep nokogiri nokogiri (1.4.4, 1.4.3.1)

    Read the article

  • Sax parsing from web service

    - by donald
    Hey, I am trying to parse xml file using Sax parser. let's say xml is like this.. I want to count the number of times b element is present (its variable) And i want this count before parsing, so that I can declare an array of appropriate size. One way is to run count then separately and other way is dynamic array (List Array) Is there any other better way to do this? Also, Is it possible to make an ArrayList of my class..? because I want an array of type myClass.

    Read the article

  • Strange Java Socket Behavior (Connects, but Doesn't Send)

    - by Donald Campbell
    I have a fairly complex project that boils down to a simple Client / Server communicating through object streams. Everything works flawlessly for two consecutive connections (I connect once, work, disconnect, then connect again, work, and disconnect). The client connects, does its business, and then closes. The server successfully closes both the object output stream and the socket, with no IO errors. When I try to connect a third time, the connection appears to go through (the ServerSocket.accept() method goes through and an ObjectOutputStream is successfully created). No data is passed, however. The inputStream.readUnshared() method simply blocks. I have taken the following memory precautions: When it comes time to close the sockets, all running threads are stopped, and all objects are nulled out. After every writeUnshared() method call, the ObjectOutputBuffer is flushed and reset. Has anyone encountered a similar problem, or does anyone have any suggestions? I'm afraid my project is rather large, and so copying code is problematic. The project boils down to this: SERVER MAIN ServerSocket serverSocket = new ServerSocket(port); while (true) { new WorkThread(serverSocket.accept()).start(); } WORK THREAD (SERVER) public void run() { ObjectInputBuffer inputBuffer = new ObjectInputBuffer(new BufferedInputStream(socket.getInputStream())); while (running) { try { Object myObject = inputBuffer.readUnshared(); // do work is not specified in this sample doWork(myObject); } catch (IOException e) { running = false; } } try { inputBuffer.close(); socket.close(); } catch (Exception e) { System.out.println("Could not close."); } } CLIENT public Client() { Object myObject; Socket mySocket = new Socket(address, port); try { ObjectOutputBuffer output = new ObjectOutputBuffer(new BufferedOutputStream(mySocket.getOutputStream())); output.reset(); output.flush(); } catch (Exception e) { System.out.println("Could not get an input."); mySocket.close(); return; } // get object data is not specified in this sample. it simply returns a serializable object myObject = getObjectData(); while (myObject != null) { try { output.writeUnshared(myObject); output.reset(); output.flush(); } catch (Exception e) { e.printStackTrace(); break; } // catch } // while try { output.close(); socket.close(); } catch (Exception e) { System.out.println("Could not close."); } } Thank you to everyone who may be able to help!

    Read the article

  • Inconsistent values in network switch throughput values

    - by Marcus Hughes
    Quite simple, I have a network switch with SNMP, and need to calculate the throughput of the switch port, so simply I use ifOutOctets. We transfer a file which is 145MB and if we use the total from the start, subtracted from the value at the end then the value is : 158901842 I simply can't get the value to match, or be anything similar to what the real transfer is. I understand that there may be excess traffic etc but I just can't get it to be anywhere similar (the server being tested has no traffic when this is not running) We have tried for a long time and suspect there may be an issue with the recording on the HP switch, do you have any suggestions, or how should we be calculating it? Thanks a lot in advance We have a HP ProCurve 1810G on 2.2

    Read the article

  • Hiding an error message div with setTimeout not working using Smarty

    - by Donald
    Hi guys, I'm trying to hide an error message div using a javascript function setTimeout after a specified time but it gives me errors that its a wrong smarty syntax, i've never used smarty before so i would really appreciate it if anyone can help me get up to speed with this syntax My code is as follows {if $error_message != ""} <script type="text/javascript"> setTimeout(function(){$('error').hide(); }, 1000); </script> <div id="error" class='error_message'> {$error_message} </div> {/if} Thanks in advance

    Read the article

  • Rails 3: Create an instance with 3 foreign keys.

    - by donald
    Hello, Having a reviews table: # Table name: reviews # # id :integer not null, primary key # wsp_id :integer # service_id :integer # user_id :integer # description :text # rating :integer # created_at :datetime # updated_at :datetime # belongs_to :wsp belongs_to :service belongs_to :user How can I create a review for a service and pass the wsp_id and user_id? Do I need to use nested routes? I am able to do @user.reviews.new(params[:review]) but I'm not being able of passing the wsp_id and the service_id. Here's my Reviews create controller. def create @review = current_user.reviews.new(params[:review]) if @review.save #Saved else #Error, not saved end end What am I doing wrong? Thank you!

    Read the article

  • Rails 3: jQuery form not working.

    - by donald
    Hi, I have jquery working on my Rails app using the gem 'jquery-rails'. I also have a search form working correctly. However, when I add :remote => true the form stops working. <%= form_tag services_path, :method => :get, :remote => true do %> <%= text_field_tag :search, params[:search] %> <%= submit_tag "Search", :name => nil %> </div> <% end %> I have also added a index.js.erb but it has no effect on it. For some reason the :remote = true makes the form to stop working. Any reason why? Thanks

    Read the article

  • Polymorphic behavior not being implemented

    - by Garrett A. Hughes
    The last two lines of this code illustrate the problem: the compiler works when I use the reference to the object, but not when I assign the reference to an array element. The rest of the code is in the same package in separate files. BioStudent and ChemStudent are separate classes, as well as Student. package pkgPoly; public class Poly { public static void main(String[] arg) { Student[] stud = new Student[3]; // create a biology student BioStudent s1 = new BioStudent("Tom"); // create a chemistry student ChemStudent s2 = new ChemStudent("Dick"); // fill the student body with studs stud[0] = s0; stud[1] = s1; // compiler complains that it can't find symbol getMajor on next line System.out.println("major: " + stud[0].getMajor() ); // doesn't compile; System.out.println("major: " + s0.getMajor() ); // works: compiles and runs correctly } }

    Read the article

  • DNS Server on Fedora 11

    - by Funky Si
    I recently upgraded my Fedora 10 server to Fedora 11 and am getting the following error in my DNS/named config. named[27685]: not insecure resolving 'fedoraproject.org/A/IN: 212.104.130.65#53 This only shows for certain addresses some are resolved fine and I can ping and browse to them fine, while others produce the error above. This is my named.conf file acl trusted-servers { 192.168.1.10; }; options { directory "/var/named"; forwarders {212.104.130.9 ; 212.104.130.65; }; forward only; allow-transfer { 127.0.0.1; }; # dnssec-enable yes; # dnssec-validation yes; # dnssec-lookaside . trust-anchor dlv.isc.org.; }; # Forward Zone for hughes.lan domain zone "funkygoth" IN { type master; file "funkygoth.zone"; allow-transfer { trusted-servers; }; }; # Reverse Zone for hughes.lan domain zone "1.168.192.in-addr.arpa" IN { type master; file "1.168.192.zone"; }; include "/etc/named.dnssec.keys"; include "/etc/pki/dnssec-keys/dlv/dlv.isc.org.conf"; include "/etc/pki/dnssec-keys//named.dnssec.keys"; include "/etc/pki/dnssec-keys//dlv/dlv.isc.org.conf"; Anyone know what I have set wrong here?

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >