Search Results

Search found 177 results on 8 pages for 'elliot harrison'.

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

  • How can I debug VGA Out on an iPad?

    - by Elliot
    The Dock Connector to VGA Adapter (required for VGA out on the iPad) uses the Dock Connector, so I can't have my laptop connected at the same time. I remember reading something about a Remote debugger, but despite lots of searching, I'm unable to find it. How can I run the debugger to test VGA output of my iPad app?

    Read the article

  • Can I force JAXB not to convert " into &quot;, for example, when marshalling to XML?

    - by Elliot
    I have an Object that is being marshalled to XML using JAXB. One element contains a String that includes quotes ("). The resulting XML has &quot; where the " existed. Even though this is normally preferred, I need my output to match a legacy system. How do I force JAXB to NOT convert the HTML entities? -- Thank you for the replies. However, I never see the handler escape() called. Can you take a look and see what I'm doing wrong? Thanks! package org.dc.model; import java.io.IOException; import java.io.Writer; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; import org.dc.generated.Shiporder; import com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler; public class PleaseWork { public void prettyPlease() throws JAXBException { Shiporder shipOrder = new Shiporder(); shipOrder.setOrderid("Order's ID"); shipOrder.setOrderperson("The woman said, \"How ya doin & stuff?\""); JAXBContext context = JAXBContext.newInstance("org.dc.generated"); Marshaller marshaller = context.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); marshaller.setProperty(CharacterEscapeHandler.class.getName(), new CharacterEscapeHandler() { @Override public void escape(char[] ch, int start, int length, boolean isAttVal, Writer out) throws IOException { out.write("Called escape for characters = " + ch.toString()); } }); marshaller.marshal(shipOrder, System.out); } public static void main(String[] args) throws Exception { new PleaseWork().prettyPlease(); } } -- The output is this: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <shiporder orderid="Order's ID"> <orderperson>The woman said, &quot;How ya doin &amp; stuff?&quot;</orderperson> </shiporder> and as you can see, the callback is never displayed. (Once I get the callback being called, I'll worry about having it actually do what I want.) --

    Read the article

  • Is it possible to programmatically set the state of the shift and control keys?

    - by Stephen Harrison
    The reason I am asking is that I am thinking of building a foot switch to act as shift and control keys - well two switches, one for each foot. I'm planning on using the Arduino for this and writing a small C# application to detect when the switch has been pressed that would then set the state of shift or control. I would rather not have to write a keyboard driver for the Arduino as I would like it to do other things as well.

    Read the article

  • RMagic Error in rails, with AM Charts

    - by Elliot
    Hi Everyone, I'm using AMCharts and rails. AMCharts uses the Image Magic lib to export an image of the chart. In rails this is done with the gem, RMagic. In a controller this is implemented with the following controller method: def export width = params[:width].to_i height = params[:height].to_i data = {} img = Magick::Image.new(width, height) height.times do |y| row = params["r#{y}"].split(',') row.size.times do |r| pixel = row[r].to_s.split(':') pixel[0] = pixel[0].to_s.rjust(6, '0') if pixel.size == 2 pixel[1].to_i.times do (data[y] ||= []) << pixel[0] end else (data[y] ||= []) << pixel[0] end end width.times do |x| img.pixel_color(x, y, "##{data[y][x]}") end end img.format = "PNG" send_data(img.to_blob , :disposition => 'inline', :type => 'image/png', :filename => "chart.png?#{rand(99999999).to_i}") end When the controller is accessed however, I receive this error in the page: The change you wanted was rejected. Maybe you tried to change something you didn't have access to. And this error in the logs (its running on heroku btw): ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken): /home/heroku_rack/lib/static_assets.rb:9:in `call' /home/heroku_rack/lib/last_access.rb:25:in `call' /home/heroku_rack/lib/date_header.rb:14:in `call' thin (1.0.1) lib/thin/connection.rb:80:in `pre_process' thin (1.0.1) lib/thin/connection.rb:78:in `catch' thin (1.0.1) lib/thin/connection.rb:78:in `pre_process' thin (1.0.1) lib/thin/connection.rb:57:in `process' thin (1.0.1) lib/thin/connection.rb:42:in `receive_data' eventmachine (0.12.6) lib/eventmachine.rb:240:in `run_machine' eventmachine (0.12.6) lib/eventmachine.rb:240:in `run' thin (1.0.1) lib/thin/backends/base.rb:57:in `start' thin (1.0.1) lib/thin/server.rb:150:in `start' thin (1.0.1) lib/thin/controllers/controller.rb:80:in `start' thin (1.0.1) lib/thin/runner.rb:173:in `send' thin (1.0.1) lib/thin/runner.rb:173:in `run_command' thin (1.0.1) lib/thin/runner.rb:139:in `run!' thin (1.0.1) bin/thin:6 /usr/local/bin/thin:20:in `load' /usr/local/bin/thin:20 Rendering /disk1/home/slugs/149903_609c236_eb4f/mnt/public/422.html (422 Unprocessable Entity) Anyone have any idea what's going on here?

    Read the article

  • Rails + AMcharts (with export image php script) - PHP script converted to controller?

    - by Elliot
    Hey Guys, This one might be a little confusing. I'm using AMCharts with rails. Amcharts comes with a PHP script to export images called "export.php" I'm trying to figure out how to take the code in export.php and put it into a controller. Here is the code: <?php // amcharts.com export to image utility // set image type (gif/png/jpeg) $imgtype = 'jpeg'; // set image quality (from 0 to 100, not applicable to gif) $imgquality = 100; // get data from $_POST or $_GET ? $data = &$_POST; // get image dimensions $width = (int) $data['width']; $height = (int) $data['height']; // create image object $img = imagecreatetruecolor($width, $height); // populate image with pixels for ($y = 0; $y < $height; $y++) { // innitialize $x = 0; // get row data $row = explode(',', $data['r'.$y]); // place row pixels $cnt = sizeof($row); for ($r = 0; $r < $cnt; $r++) { // get pixel(s) data $pixel = explode(':', $row[$r]); // get color $pixel[0] = str_pad($pixel[0], 6, '0', STR_PAD_LEFT); $cr = hexdec(substr($pixel[0], 0, 2)); $cg = hexdec(substr($pixel[0], 2, 2)); $cb = hexdec(substr($pixel[0], 4, 2)); // allocate color $color = imagecolorallocate($img, $cr, $cg, $cb); // place repeating pixels $repeat = isset($pixel[1]) ? (int) $pixel[1] : 1; for ($c = 0; $c < $repeat; $c++) { // place pixel imagesetpixel($img, $x, $y, $color); // iterate column $x++; } } } // set proper content type header('Content-type: image/'.$imgtype); header('Content-Disposition: attachment; filename="chart.'.$imgtype.'"'); // stream image $function = 'image'.$imgtype; if ($imgtype == 'gif') { $function($img); } else { $function($img, null, $imgquality); } // destroy imagedestroy($img); ?>

    Read the article

  • Any way to colorize specific days in FullCalendar?

    - by Bryan Field-Elliot
    Using FullCalendar, is there any way I can programmatically colorize specific days differently than the rest of the days? For example, in the "month" or "week" views, I'd like to colorize days with no events on them "red", and days with some events (but not yet a full schedule) "yellow". Days with a full schedule would be colorized normally (white background). Are there any callbacks or CSS tags I can take advantage of to add this behavior? Thank you.

    Read the article

  • Shark was unable to find symbol information for this address range - iPhone

    - by Elliot
    I'm trying to use Shark to determine which method(s) are taking the most time in my iPhone app. After sampling, I get this: Clicking the "!" button yields: Shark was unable to find symbol information for this address range. Typically this happens because the application was compiled without symbols or they have been subsequently stripped away. In Xcode, make sure the "Generate Debug Symbols" checkbox is selected (passes the -g flag to the compiler). Note that this does not affect code optimization, and does not typically alter performance significantly. However, the extra symbol information does consume significantly more space and may bloat the size of the executable. But I AM using the Debug option, and I am running on my Device. And Generate Debug Symbols IS checked. So what's wrong?

    Read the article

  • using Control.tabs for prototype.js in Rails

    - by Elliot
    Hey everyone, I've been trying to use http://livepipe.net/control/tabs to get some javascript tabs up and running on my rails up. I'm really just trying to figure out how to install this... and I don't see how I'm running into any issues at all. Here are the steps I've taken: put tabs.js in my scripts folder made sure the layout is including all javascript files then I copied in the code for example 1, as well as the CSS from the page's style sheet. I don't get an error, but it just doesn't work. Both tabs are displayed... Any ideas?

    Read the article

  • Computer Language puns and jokes

    - by Mark Harrison
    I'm looking for some funny jokes and puns that occur in computer languages. I'll post an oldie to kick things off... What are some others? update: Especially looking for code-related jokes... the ones that only make sense to programmers reading code.

    Read the article

  • lowest latency, least overhead app server?

    - by Mark Harrison
    I'm designing an application which will have a network interface for feeding out large numbers of very small metadata requests. The application code itself is very fast, basically looking up data cached in memory and sending it to the client. What's the absolute lowest latency I can get for a network application server running on a linux box? This will be an internal app running on gigE with no authentication. Any language/framework considered, with a preference for C, C++, or Python. Likewise for protocol, although HTTP would be nice.

    Read the article

  • Escaping Strings in JavaScript

    - by Steve Harrison
    Hello, Does JavaScript have a built-in function like PHP's addslashes (or addcslashes) function to add backslashes to characters that need escaping in a string? For example, this: This is a demo string with 'single-quotes' and "double-quotes". ...would become: This is a demo string with \'single-quotes\' and \"double-quotes\". Thanks, Steve

    Read the article

  • Python: disabling $HOME/.python-eggs?

    - by Mark Harrison
    Is there an easy way to disable Python egg caching? We have the situation where a system account needs to run a python program which imports a module. Since this is a non-login robot account, it does not have a home directory, and dies trying to create the directory /.python-eggs. What's the best way to fix this? Can I convert my eggs in site-files to something which will not be cached in .python-eggs?

    Read the article

  • Generate CSV file from rails

    - by Elliot
    I've been reading similar questions, but many of the answers are outdated or not clear enough for me. I'd like to be able to just do something like (in a controller action): respond_to do |format| format.html format.csv end I know I'd then need a view such as action.csv.erb So my questions are: 1) What do I need to configure in rails to allow this to happen in general. 2) How should I setup the CSV view to display some basic fields from a model?

    Read the article

  • How would I create a random number?

    - by Elliot Bonneville
    How would I create a random number using C++? I've heard that one should use the time as a seed, but I'm not sure how to do that with the correct syntax. How would I do this? One more thing - how would I limit the random number to a particular range? I'm simulating a dice roll and getting numbers in the millions...

    Read the article

  • Should I release NSString before assigning a new value to it?

    - by Elliot Chen
    Hi, Please give me some suggestions about how to change a NSString variable. At my class, I set a member var: NSString *m_movieName; ... @property(nonatomic, retain) NSString *m_movieName; At viewDidLoad method, I assign a default name to this var: -(void)viewDidLoad{ NSString *s1 = [[NSString alloc] initWithFormat:@"Forrest Gump"]; self.m_movieName = s1; ... [s1 release]; [super viewDidLoad] } At some function, I want to give a new name to this var, so I did like: -(void)SomeFunc{ NSString *s2 = [[NSString alloc] initWithFormat:@"Brave Heart"]; //[self.movieName release]; // ??????? Should perform here? self.m_moiveName = s2; [s2 release]; } I know, NSString* var is just a pointer to an allocated memory block, and 'assign' operation will increment this memory block's using count. For my situation, should I release m_movieName before assigning a value to it? If I do not release it (via [self.movieName release]), when and where will the previous block be released? Thanks for your help very much!

    Read the article

  • Get rid of wasted/unused space in a JMenu

    - by Trevor Harrison
    In my app, I've got a menu bar with a File menu. In the submenus, each JMenuItem is wasting a lot of white space to the left of the text for a checkbox (I think), even though I'm not including any JCheckBoxMenuItems. I'm seeing lots of other java/swing apps who's menus don't waste this space. How do I do it in my app?

    Read the article

  • Good way to capture/replay sessions from Apache Log?

    - by Mark Harrison
    For performance testing, I would like to capture some traffic from a production server and use that as a basis to replay the request to a test server in order to simulate a realistic load in our development environment. These are all stateless queries, so no issues regarding cookies, sessions, etc. The Apache log timestamps everything down to a 1 second resolution, but that's not fine enough granularity for our peak times. What's the best way to capture more fine-grained timestamps for replay? And is there some ab-like load generating program that can use this data to replicate load?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >