Search Results

Search found 988 results on 40 pages for 'josh pennington'.

Page 25/40 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Apache Axis2 tried books

    - by josh
    I am looking to get my hands wet in Java Web Services. Apache CXF and Axis2 seem to be in demand a lot. I googled a bit for finding a good Axis2 book that has lot of working examples. some books like Quick Start Apache Axis 2 seem to have bad reviews on Amazon and titles like Web Services with Apache CXF and Axis2 seem to lack working examples. I want to get opinion from people who currently work with Axis2 and have read a book or two on the subject. Which is a good book for an Axis2 n00b.

    Read the article

  • Why is win32com so much slower than xlrd?

    - by Josh
    I have the same code, written using win32com and xlrd. xlrd preforms the algorithm in less than a second, while win32com takes minutes. Here is the win32com: def makeDict(ws): """makes dict with key as header name, value as tuple of column begin and column end (inclusive)""" wsHeaders = {} # key is header name, value is column begin and end inclusive for cnum in xrange(9, find_last_col(ws)): if ws.Cells(7, cnum).Value: wsHeaders[str(ws.Cells(7, cnum).Value)] = (cnum, find_last_col(ws)) for cend in xrange(cnum + 1, find_last_col(ws)): #finds end column if ws.Cells(7, cend).Value: wsHeaders[str(ws.Cells(7, cnum).Value)] = (cnum, cend - 1) break return wsHeaders And the xlrd def makeDict(ws): """makes dict with key as header name, value as tuple of column begin and column end (inclusive)""" wsHeaders = {} # key is header name, value is column begin and end inclusive for cnum in xrange(8, ws.ncols): if ws.cell_value(6, cnum): wsHeaders[str(ws.cell_value(6, cnum))] = (cnum, ws.ncols) for cend in xrange(cnum + 1, ws.ncols):#finds end column if ws.cell_value(6, cend): wsHeaders[str(ws.cell_value(6, cnum))] = (cnum, cend - 1) break return wsHeaders

    Read the article

  • Update count every second causing massive memory problems

    - by Josh
    Just on my local machine, trying the run the following script causes my computer to crash... What am I doing wrong? (function($) { var count = '6824756980'; while (count > 0) { setInterval(function() { $('#showcount').html(Math.floor(count-1)); count--; }, 1000 ); } })(jQuery); All I need to do is subtract one from the var "count" and update/display it's value every second.

    Read the article

  • SyntaxError: Parse Error only happens in safari

    - by Josh Crowder
    Im getting SyntaxError: Parse Error, only on safari. Here is the code in question. <script type="text/javascript"> // I am using transloadit a jquery plugin. which works on every other page and is loading fine on safari by the looks of it. The errors is on line 44 which is export: { Can anyone see anything wrong with that page?

    Read the article

  • Issues Deploying ROOT Context in Tomcat6

    - by Josh K
    I'm working on getting an application deployed to the ROOT ("/") context in my Tomcat 6 instance. Here's what has been done: Defined another virtual host (domain.com) Created the respective folder (/etc/tomcat6/Catalina/domain.com) Set it to auto deploy WAR's Set appBase to CATALINA_BASE/domainapps and created respective folder Copied manager.xml from localhost to domain.com. Now I'm trying to deploy into the ROOT context by uploading a ROOT.war to CATALINA_BASE/domainapps. This isn't working. I don't get any exceptions thrown, but the stock ROOT page ("It works !") stays up. I have successfully deployed it into another context (by uploading domainapp.war and viewing at /domainapp), but not ROOT. Re-reading the Virtual Host setup it makes reference to CATALINA_HOME and CATALINA_BASE. My CATALINA_HOME is at /usr/share/tomcat6/domainapp while CATALINA_BASE is /var/lib/tomcat6. Which should I be using for what? Currently haven't touched CATALINA_HOME but will try messing with a few things there. A better question might be what is the generally accepted flow taken to setup a new Tomcat instance and deploy an application to the root context.

    Read the article

  • Why is changing displays slow?

    - by Josh Bronson
    I've had many laptops over the course of many years, and while many things have sped up, one thing remains as slow today as it was years ago: (dis)connecting an external display. What's taking it so long to detect the new display and update the pixel buffers? I use Macs primarily, but I think this is equally slow on other platforms.

    Read the article

  • How to add the ImageMagick install to my path on Ubuntu

    - by Josh
    I have had been on a roller coaster trying to get ImageMagick to work on my Ubuntu slice. I Whenever I try to upload an image I get the following error: /tmp/stream.1170.0 is not recognized by the 'identify' command. If I type 'which identify' I get: /usr/local/bin/identify If I run '/usr/local/bin/identify' or just 'identify', I get the following error: /usr/local/bin/identify: error while loading shared libraries: libMagickCore.so.3: cannot open shared object file: No such file or directory If I run '/usr/bin/identify', ImageMagick is run just fine. How can I set my path to where when Paperclip runs the identify command, it points to /usr/bin/identify? Thanks. p.s. I have tried adding this to paperclip.rb: Paperclip.options[:command_path] = '/usr/bin' and Paperclip.options[:command_path] = '/usr/local/bin'

    Read the article

  • Dropdownlist post in ASP.NET MVC3 and Entity Framework Model

    - by Josh Blade
    I have 3 tables: RateProfile RateProfileID ProfileName Rate RateID RateProfileID PanelID Other stuff to update Panel PanelID PanelName I have models for each of these. I have an edit page using the RateProfile model. I display the information for RateProfile and also all of the Rates associated with it. This works fine and I can update it fine. However, I also added a dropdown so that I can filter Rates by PanelID. I need it to post back on change so that it can display the filtered rates. I'm using @Html.DropDownList("PanelID", (SelectList)ViewData["PanelDropDown"], new { onchange = "$('#RateForm').submit()" }) for my dropdownlist. Whenever it posts back to my HttpPost Edit method though, it seems to be missing all information about the Rates navigation property. It's weird because I thought it would do exactly what the input/submit button that I have in the form does (which actually passes the entire model back to my HttpPost Edit action and does what I want it to do). The panelID is properly being passed to my HttpPost Edit method and on to the next view, but when I try to query the Model.Rates navigation property is null (only when the post comes from the dropdown. Everything works fine when the post comes from my submit input). Get Edit: public ActionResult Edit(int id, int panelID = 1) { RateProfile rateprofile = db.RateProfiles.Single(r => r.RateProfileID == id); var panels = db.Panels; ViewData["PanelDropDown"] = new SelectList(panels, "PanelID", "PanelName", panelID); ViewBag.PanelID = panelID; return View(rateprofile); } HttpPost Edit: [HttpPost] public ActionResult Edit(RateProfile rateprofile, int panelID) { var panels = db.Panels; ViewData["PanelDropDown"] = new SelectList(panels, "PanelID", "PanelName", panelID); ViewBag.PanelID = panelID; if (ModelState.IsValid) { db.Entry(rateprofile).State = EntityState.Modified; foreach (Rate dimerate in rateprofile.Rates) { db.Entry(dimerate).State = EntityState.Modified; } db.SaveChanges(); return View(rateprofile); } return View(rateprofile); } View: @model PDR.Models.RateProfile @using (Html.BeginForm(null,null,FormMethod.Post, new {id="RateForm"})) { <div> @Html.Label("Panel") @Html.DropDownList("PanelID", (SelectList)ViewData["PanelDropDown"], new { onchange = "$('#RateForm').submit()" }) </div> @{var rates= Model.Rates.Where(a => a.PanelID == ViewBag.PanelID).OrderBy(a => a.minCount).ToList();} @for (int i = 0; i < rates.Count; i++) { <tr> <td> @Html.HiddenFor(modelItem => rates[i].RateProfileID) @Html.HiddenFor(modelItem => rates[i].RateID) @Html.HiddenFor(modelItem => rates[i].PanelID) @Html.EditorFor(modelItem => rates[i].minCount) @Html.ValidationMessageFor(model => rates[i].minCount) </td> <td> @Html.EditorFor(modelItem => rates[i].maxCount) @Html.ValidationMessageFor(model => rates[i].maxCount) </td> <td> @Html.EditorFor(modelItem => rates[i].Amount) @Html.ValidationMessageFor(model => rates[i].Amount) </td> </tr> } <input type="submit" value="Save" /> } To summarize my problem, the below query in my view only works when the post comes from the submit button and not when it comes from my dropdownlist. @{var rates= Model.Rates.Where(a => a.PanelID == ViewBag.PanelID).OrderBy(a => a.minCount).ToList();}

    Read the article

  • Testing perceived performance

    - by Josh Kelley
    I recently got a shiny new development workstation. The only disadvantage of this is that the desktop apps I'm developing now run very, very fast, and so I fear that parts of the code that would be annoyingly slow on end users' machines will go unnoticed during my testing. Is there a good way to slow down an application for testing? I've tried searching around, but all of the results I've been able to find seem pretty fiddly to set up (e.g., manually setting up a high-priority CPU-bound task on the same CPU core as the target app, or running a background process that rapidly interrupts and resumes the target app), and I don't know if the end result is actually a good representation of running on a slower computer (with its slower CPU, slower RAM, slower disk I/O...). I don't think that this is a job for a profiler; I'm interested in the user's perception of end-to-end performance rather than in where the time goes for particular operations.

    Read the article

  • Help making this code run faster for spoj.

    - by Josh Meredith
    I've been doing a few of the challenges on the Sphere Online Judge, but I can't seem to get the second problem (the prime generator) to run within the time limit. Does anyone have any tips for increasing the speed of the following code? #include <stdio.h> #include <math.h> int is_prime(int n); void make_sieve(); void fast_prime(int n); int primes[16000]; int main() { int nlines; int m, n; make_sieve(); scanf("%d", &nlines); for (; nlines >= 1; nlines--) { scanf("%d %d", &m, &n); if (!(m % 2)) { m++; } for ( ; m < n; m+=2) { fast_prime(m); } printf("\n"); } return 0; } /* Prints a number if it's prime. */ inline void fast_prime(int n) { int j; for (int i = 0; ((j = primes[i]) > -1); i++) { if (!(n % j)) { return; } } printf("%d\n", n); } /* Create an array listing prime numbers. */ void make_sieve() { int j = 0; for (int i = 0; i < 16000; i++) { primes[i] = -1; } for (int i = 2; i < 32000; i++) { if (i % 2) { if (is_prime(i)) { primes[j] = i; j++; } } } return; } /* Test if a number is prime. Return 1 if prime. Return 0 if not. */ int is_prime(int n) { int rootofn; rootofn = sqrt(n); if ((n <= 2) || (n == 3) || (n == 5) || (n == 7)) { return 1; } if (((n % 2) == 0) || ((n % 3) == 0) || ((n % 5) == 0) || ((n % 7) == 0)) { return 0; } for (int i = 11; i < rootofn; i += 2) { if ((n % i) == 0) { return 0; } } return 1; }

    Read the article

  • SQL query for select distinct with most recent timestamp first

    - by Josh
    I have a mysql table with three columns: username, location, timestamp. This is basically a log of user activity of what location they are in and the time that they were there. What I want to do is select a distinct username+location where only the most recent item (by timestamp) is provided. So say the table consists of: tom roomone 2011-3-25 10:45:00 tom roomtwo 2011-3-25 09:00:00 tom roomtwo 2011-3-25 08:30:00 pam roomone 3011-3-25 07:20:23 I would want only these to be selected: tom roomone 2011-3-25 10:45:00 tom roomtwo 2011-3-25 09:00:00

    Read the article

  • Turning a JSON list into a POJO

    - by Josh L
    I'm having trouble getting this bit of JSON into a POJO. I'm using Jackson configured like this: protected ThreadLocal<ObjectMapper> jparser = new ThreadLocal<ObjectMapper>(); public void receive(Object object) { try { if (object instanceof String && ((String)object).length() != 0) { ObjectDefinition t = null ; if (parserChoice==0) { if (jparser.get()==null) { jparser.set(new ObjectMapper()); } t = jparser.get().readValue((String)object, ObjectDefinition.class); } Object key = t.getKey(); if (key == null) return; transaction.put(key,t); } } catch (Exception e) { e.printStackTrace(); } } Here's the JSON that needs to be turned into a POJO: { "id":"exampleID1", "entities":{ "tags":[ { "text":"textexample1", "indices":[ 2, 14 ] }, { "text":"textexample2", "indices":[ 31, 36 ] }, { "text":"textexample3", "indices":[ 37, 43 ] } ] } And lastly, here's what I currently have for the java class: protected Entities entities; @JsonIgnoreProperties(ignoreUnknown = true) protected class Entities { public Entities() {} protected Tags tags; @JsonIgnoreProperties(ignoreUnknown = true) protected class Tags { public Tags() {} protected String text; public String getText() { return text; } public void setText(String text) { this.text = text; } }; public Tags getTags() { return tags; } public void setTags(Tags tags) { this.tags = tags; } }; //Getters & Setters ... I've been able to translate the more simple objects into a POJO, but the list has me stumped. Any help is appreciated. Thanks!

    Read the article

  • MSI Installer start auto-repair when service starts

    - by Josh Clark
    I have a WiX based MSI that installs a service and some shortcuts (and lots of other files that don't). The shortcut is created as described in the WiX docs with a registry key under HKCU as the key file. This is an all users install, but to get past ICE38, this registry key has to be under the current user. When the service starts (it runs under the SYSTEM account) it notices that that registry key isn't valid (at least of that user) and runs the install again to "repair". In the Event Log I get MsiInstaller Events 1001 and 1004 showing that "The resource 'HKEY_CURRENT_USER\SOFTWARE\MyInstaller\Foo' does not exist." This isn't surprising since the SYSTEM user wouldn't have this key. I turned on system wide MSI logging and the auto-repair created its log file in the C:\Windows\Temp folder rather than a specific user's TEMP folder which seems to imply the current user was SYSTEM (plus the log file shows the "Calling process" to be my service). Is there something I can do to disable the auto-repair functionality? Am I doing something wrong or breaking some MSI rule? Any hints on where to look next?

    Read the article

  • WSSQL query for multiple computers at once

    - by Josh
    I can run normal searches just fine. Windows 7 won't let me add a network share to my local index, but I can query the remote index just fine. The problem is that I can't find a way to query two indexes at once. I was hoping that something like this would work: SELECT System.ItemName FROM compA.SystemIndex, compB.SystemIndex WHERE SCOPE='file://compA/pathA' OR SCOPE='file://compB/pathB' but it doesn't. For simple queries, I can query compA and compB separately and then merge the results myself, but I'm hoping for a better way. Anybody here have some experience with this?

    Read the article

  • Associating Models with Polymorphic

    - by Josh Crowder
    I am trying to associate Contacts with Classes but as two different types. Current_classes and Interested_classes. I know I need to enable polymorphic but I am not sure as to where it needs to be enabled. This is what I have at the moment class CreateClasses < ActiveRecord::Migration def self.up create_table :classes do |t| t.string :class_type t.string :class_name t.string :date t.timestamps end end def self.down drop_table :classes end end class CreateContactsInterestedClassesJoin < ActiveRecord::Migration def self.up create_table 'contacts_interested_classes', :id => false do |t| t.column 'class_id', :integer t.column 'contact_id', :integer end end def self.down drop_table 'contacts_interested_classes' end end class CreateContactsCurrentClassesJoin < ActiveRecord::Migration def self.up create_table 'contacts_current_classes', :id => false do |t| t.column 'class_id', :integer t.column 'contact_id', :integer end end def self.down drop_table 'contacts_current_classes' end end And then inside of my Contacts Model I want to have something like this. class Contact < ActiveRecord::Base has_and_belongs_to_many :classes, :join_table => "contacts_interested_classes", :foreign_key => "class_id" :as => 'interested_classes' has_and_belongs_to_many :classes, :join_table => "contacts_current_classes", :foreign_key => "class_id" :as => 'current_classes' end What am I doing wrong?

    Read the article

  • JSP: How can I still get the code on my error page to run, even if I can't display it?

    - by Josh Hinman
    I've defined an error-page in my web.xml: <error-page> <exception-type>java.lang.Exception</exception-type> <location>/error.jsp</location> </error-page> In that error page, I have a custom tag that I created. The tag handler for this tag e-mails me the stacktrace of whatever error occurred. For the most part this works great. Where it doesn't work great is if the output has already begun being sent to the client at the time the error occurs. In that case, we get this: SEVERE: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/error.jsp] java.lang.IllegalStateException I believe this error happens because we can't redirect a request to the error page after output has already started. The work-around I've used is to increase the buffer size on particularly large JSP pages. But I'm trying to write a generic error handler that I can apply to existing applications, and I'm not sure it's feasible to go through hundreds of JSP pages making sure their buffers are big enough. Is there a way to still allow my stack trace e-mail code to execute in this case, even if I can't actually display the error page to the client?

    Read the article

  • Who do you use for a merchant account?

    - by Josh
    Hi everyone, I was hoping to get an idea of the merchant accounts out there and if there are any strong recommendations for one in particular. I would also appreciate advice on how merchant accounts differ. Please use separate answers for each recommendation so that we can take full advantage of the voting system. Thanks!

    Read the article

  • JavaScript try/catch: errors or exceptions?

    - by Josh
    OK. I may be splitting hairs here, but my code isn't consistent and I'd like to make it so. But before I do, I want to make sure I'm going the right way. In practice this doesn't matter, but this has been bothering me for a while so I figured I'd ask my peers... Every time I use a try... catch statement, in the catch block I always log a message to my internal console. However my log messages are not consistent. They either look like: catch(err) { DFTools.console.log("someMethod caught an error: ",err.message); ... or: catch(ex) { DFTools.console.log("someMethod caught an exception: ",ex.message); ... Obviously the code functions properly either way but it's starting to bother me that I sometimes refer to "errors" and sometimes to "exceptions". Like I said, maybe I'm splitting hairs but which is the proper terminology? "Exception", or "Error"?

    Read the article

  • Excel formula question

    - by Josh
    I'm trying to convert an excel formula that I found to a more easily understood formula. Below is the formula I'm trying to interpret. What is ei?? =3*ei/2-27*ei^3/32

    Read the article

  • Keep a div from reloading

    - by Josh
    Basically, I want the same effect as the oldschool html 'frameset' I think. Take a look at this page please: http://onomadesign.com/wordpress/identity-design/alteon-a-boeing-company/ If a user selects a project from industry - transportation for example, I would like that the right scrollmenu keeps its initial state when the new project page comes up. So they won't get lost and have to click again to be in the same submenu section. So, the right thumbnail navigation should stay in the same way, I don't want it to reload. Do I have to do it with frames or iframes? Or can I make some kind of jQuery call to 'not reload' that div? Maybe PHP? I'm sorry, I am not a programmer from origin. Thanks in advance.

    Read the article

  • Javascript AJAX function returns undefined instead of true / false

    - by Josh K
    I have a function that issues an AJAX call (via jQuery). In the complete section I have a function that says: complete: function(XMLHttpRequest, textStatus) { if(textStatus == "success") { return(true); } else { return(false); } } However, if I call this like so: if(callajax()) { // Do something } else { // Something else } The first is never called. If I put an alert(textStatus) in the complete function I get true, but not before that function returns undefined.

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >