Search Results

Search found 146 results on 6 pages for 'arthur upfield'.

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

  • Cutomizing dired

    - by Arthur Debert
    I just came across this dired mode screen at Wikipedia. I am looking into those customizations. Regarding colors, I guess just specifying the correct faces will do, but how do I get dired to show file sized in kbytes by default? And the available space in MBs (top line)?

    Read the article

  • Doubt about instance creation by using Spring framework ???

    - by Arthur Ronald F D Garcia
    Here goes a command object which needs to be populated from a Spring form public class Person { private String name; private Integer age; /** * on-demand initialized */ private Address address; // getter's and setter's } And Address public class Address { private String street; // getter's and setter's } Now suppose the following MultiActionController @Component public class PersonController extends MultiActionController { @Autowired @Qualifier("personRepository") private Repository<Person, Integer> personRepository; /** * mapped To /person/add */ public ModelAndView add(HttpServletRequest request, HttpServletResponse response, Person person) throws Exception { personRepository.add(person); return new ModelAndView("redirect:/home.htm"); } } Because Address attribute of Person needs to be initialized on-demand, i need to override newCommandObject to create an instance of Person to initiaze address property. Otherwise, i will get NullPointerException @Component public class PersonController extends MultiActionController { /** * code as shown above */ @Override public Object newCommandObject(Class clazz) thorws Exception { if(clazz.isAssignableFrom(Person.class)) { Person person = new Person(); person.setAddress(new Address()); return person; } } } Ok, Expert Spring MVC and Web Flow says Options for alternate object creation include pulling an instance from a BeanFactory or using method injection to transparently return a new instance. First option pulling an instance from a BeanFactory can be written as @Override public Object newCommandObject(Class clazz) thorws Exception { /** * Will retrieve a prototype instance from ApplicationContext whose name matchs its clazz.getSimpleName() */ getApplicationContext().getBean(clazz.getSimpleName()); } But what does he want to say by using method injection to transparently return a new instance ??? Can you show how i implement what he said ??? ATT: I know this funcionality can be filled by a SimpleFormController instead of MultiActionController. But it is shown just as an example, nothing else

    Read the article

  • preserving history when using mercurial ontop of clearcase

    - by Arthur Ulfeldt
    I work in a ClearCase shop and CC does a good job of integrating the team's work though our code review process prevents me from using it to track my daily changes. Creating an hg repository on top of my CC view works really well. I can track my changes and easily make backups on the file server, produce diffs for people etc. This is all well and good until I move to a new CC view and have to leave my history behind. I would love to be able to ?pull? my previous history in and have everything that's different in the new view show up as the latest change set.

    Read the article

  • Looking for a Regex to get SccTeamFoundationServer value from .sln file

    - by Arthur
    I am looking tor a Regex for C# to get SccTeamFoundationServer value from .sln file. Maybe someone has come across such need and found a solution. Could you help? File: Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication", "WebApplication\WebApplication.csproj", "{AE0F6C02-1C8D-426D-AFA0-C07A52E6112F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication", "ConsoleApplication\ConsoleApplication.csproj", "{2BD82C34-CF50-4559-A3CD-F85ACD657292}" EndProject Global GlobalSection(TeamFoundationVersionControl) = preSolution SccNumberOfProjects = 3 SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} SccTeamFoundationServer = http://ServerName:8080/ SccLocalPath0 = . SccProjectUniqueName1 = ConsoleApplication\\ConsoleApplication.csproj SccProjectName1 = ConsoleApplication SccLocalPath1 = ConsoleApplication SccProjectUniqueName2 = WebApplication\\WebApplication.csproj SccProjectName2 = WebApplication SccLocalPath2 = WebApplication EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {AE0F6C02-1C8D-426D-AFA0-C07A52E6112F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AE0F6C02-1C8D-426D-AFA0-C07A52E6112F}.Debug|Any CPU.Build.0 = Debug|Any CPU {AE0F6C02-1C8D-426D-AFA0-C07A52E6112F}.Release|Any CPU.ActiveCfg = Release|Any CPU {AE0F6C02-1C8D-426D-AFA0-C07A52E6112F}.Release|Any CPU.Build.0 = Release|Any CPU {2BD82C34-CF50-4559-A3CD-F85ACD657292}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2BD82C34-CF50-4559-A3CD-F85ACD657292}.Debug|Any CPU.Build.0 = Debug|Any CPU {2BD82C34-CF50-4559-A3CD-F85ACD657292}.Release|Any CPU.ActiveCfg = Release|Any CPU {2BD82C34-CF50-4559-A3CD-F85ACD657292}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

    Read the article

  • How to pass dynamic values using MVC AJax.BeginForm

    - by Arthur
    I'm using MVC and AJax.BeginForm to do some ajax updating of my page. The BeginForm code looks something like: using (Ajax.BeginForm("HandleCrop", "Card", new { accept = true, id = Model.ImageUpload.ID, file = Model.ImageUpload.File, imageCropX = Model.CropInfo.X, imageCropY = Model.CropInfo.Y, imageCropWidth = Model.CropInfo.Width, imageCropHeight = Model.CropInfo.Height }, new AjaxOptions { HttpMethod = "POST", OnComplete = "ConfirmCompleted", OnSuccess = "ReloadUpload", OnFailure = "Failure" }, null)) The Model.CropInfo is being put in as hidden fields like so: <%=Html.HiddenFor(m => m.CropInfo.X) %> <%=Html.HiddenFor(m => m.CropInfo.Y) %> <%=Html.HiddenFor(m => m.CropInfo.Width) %> <%=Html.HiddenFor(m => m.CropInfo.Height) %> However, these values are being dynamically modified by some client side javascript, and these values need to be posted through the Ajax call back to the server. The above code will obviously not work as the imageCrop.. parameters in the Ajax form are being filled when the page is rendered (therefore being all 0). My question is: what is the correct way to approach this situation?

    Read the article

  • How to map a test onto a list of numbers

    - by Arthur Ulfeldt
    I have a function with a bug: user> (-> 42 int-to-bytes bytes-to-int) 42 user> (-> 128 int-to-bytes bytes-to-int) -128 user> looks like I need to handle overflow when converting back... Better write a test to make sure this never happens again. This project is using clojure.contrib.test-is so i write: (deftest int-to-bytes-to-int (let [lots-of-big-numbers (big-test-numbers)] (map #(is (= (-> % int-to-bytes bytes-to-int) %)) lots-of-big-numbers))) This should be testing converting to a seq of bytes and back again produces the origional result on a list of 10000 random numbers. Looks OK in theory? except none of the tests ever run. Testing com.cryptovide.miscTest Ran 23 tests containing 34 assertions. 0 failures, 0 errors. why don't the tests run? what can I do to make them run?

    Read the article

  • why can't I call .update on a MessageDigest instance

    - by Arthur Ulfeldt
    when i run this from the repl: (def md (MessageDigest/getInstance "SHA-1")) (. md update (into-array [(byte 1) (byte 2) (byte 3)])) I get: No matching method found: update for class java.security.MessageDigest$Delegate the Java 6 docs for MessageDigest show: update(byte[] input) Updates the digest using the specified array of bytes. and the class of (class (into-array [(byte 1) (byte 2) (byte 3)])) is [Ljava.lang.Byte; Am I missing something in the definition of update? Not creating the class I think I am? Not passing it the type I think I am?

    Read the article

  • Is there a better way to declare an empty, typed matrix in MATLAB?

    - by Arthur Ward
    Is there a way to "declare" a variable with a particular user-defined type in MATLAB? zeros() only works for built-in numeric types. The only solution I've come up with involves using repmat() to duplicate a dummy object zero times: arr = repmat(myClass(), [1 0]) Without declaring variables this way, any code which does "arr(end+1) = myClass()" has to include a special case for the default empty matrix which is of type double. Have I missed something a little more sensible?

    Read the article

  • Just an experiment changing the application data path

    - by Arthur
    When I change the Appication Data path in windows xp registry to a network folder I get this error message on the next system startup: "windows cannot load the user's profile but has logged you with the default profile system" The registry keys are: "[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]" "[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]" under the names "AppData" and "Local AppData" I dont care if "Windows logins you with the default profile system" but is there a way to disable that message, or change the message timeout form 30 seconds to 0?,or maybe create an script that changes the Application Data path every system startup? P.S. The computer with the shared folder is always on.

    Read the article

  • How can I push to a git-svn repo?

    - by Arthur Ulfeldt
    I cloned an svn repo with git svn clone ... and now I want to push changes to it. after that I will use this repo to rebase everything and commit back to svn. The problem that pushing to a non-bare repo seems to not be a good idea, and git svn seems unhappy about working with a bare one?

    Read the article

  • GAE datastore - count records between one minute ago and two minutes ago?

    - by Arthur Wulf White
    I am using GAE datastore with python and I want to count and display the number of records between two recent dates. for examples, how many records exist with a time signature between two minutes ago and three minutes ago in the datastore. Thank you. #!/usr/bin/env python import wsgiref.handlers from google.appengine.ext import db from google.appengine.ext import webapp from google.appengine.ext.webapp import template from datetime import datetime class Voice(db.Model): when = db.DateTimeProperty(auto_now_add=True) class MyHandler(webapp.RequestHandler): def get(self): voices = db.GqlQuery( 'SELECT * FROM Voice ' 'ORDER BY when DESC') values = { 'voices': voices } self.response.out.write(template.render('main.html', values)) def post(self): voice = Voice() voice.put() self.redirect('/') self.response.out.write('posted!') def main(): app = webapp.WSGIApplication([ (r'.*', MyHandler)], debug=True) wsgiref.handlers.CGIHandler().run(app) if __name__ == "__main__": main()

    Read the article

  • pagination - 10 pages per page

    - by arthur
    I have a pagination script that displays a list of all pages like so: prev [1][2][3][4][5][6][7][8][9][10][11][12][13][14] next But I would like to only show ten of the numbers at a time: prev [3][4][5][6][7][8][9][10][11][12] next How can I accomplish this? Here is my code so far: <?php /* Set current, prev and next page */ $page = (!isset($_GET['page']))? 1 : $_GET['page']; $prev = ($page - 1); $next = ($page + 1); /* Max results per page */ $max_results = 2; /* Calculate the offset */ $from = (($page * $max_results) - $max_results); /* Query the db for total results. You need to edit the sql to fit your needs */ $result = mysql_query("select title from topics"); $total_results = mysql_num_rows($result); $total_pages = ceil($total_results / $max_results); $pagination = ''; /* Create a PREV link if there is one */ if($page > 1) { $pagination .= '< a hr_ef="?page='.$prev.'">Previous</a> '; } /* Loop through the total pages */ for($i = 1; $i <= $total_pages; $i++) { if(($page) == $i) { $pagination .= $i; } else { $pagination .= '< a hr_ef="index.php?page='.$i.'">'.$i.'</a>'; } } /* Print NEXT link if there is one */ if($page < $total_pages) { $pagination .= '< a hr_ef="?page='.$next.'"> Next</a>'; } /* Now we have our pagination links in a variable($pagination) ready to print to the page. I pu it in a variable because you may want to show them at the top and bottom of the page */ /* Below is how you query the db for ONLY the results for the current page */ $result=mysql_query("select * from topics LIMIT $from, $max_results "); while ($i = mysql_fetch_array($result)) { echo $i['title'].'<br />'; } echo $pagination; ?>

    Read the article

  • Business Tier | client state in desktop application- way around Stateful Session Beans?

    - by arthur
    I read positive inputs on the following posts concerning client state management: Stateful EJBs in web application?, here, and here. I want to know how implement such client state management for desktop applications (Swing, AWT, SWT, and other). let's assume there are n desktop clients supposed to use some (remote) services provided on an Application Server. How to maintain a separate and permanent data state for each client , distinct from the other without have to use using stateful session Beans (SFSB) ? is that even possible on this application type ? With Webapp(Servlets / JsSF and JSP) some can avoid using SFSB by HttpSession object and/or coupling it with stateless session beans (SLSB). HttpSession object would keep information for each (Web)client separate and the SLSB would play the business logic music. But HttpSession objects aren't present on desktop application and I go stuck with only SFSB and SLSB. Knowing the problems(Concurrency, Error Handling, usw ) of SFSB, I would have not wanted to use it. What would be the other options? is there only SFSB available? Thanks in advances

    Read the article

  • How to make a Windows Mobile based WinForms .Net application easily changeable?

    - by Arthur
    I need to build a Win Mobile WinForms .Net application that once developed will be easy to morph or adjust to new user requirements quickly (including changes in GUI). The main objective is to minimize the development time (development to production roll-out effort). Also, a nice thing to have is to be able to test it in an automated way. The application must be able to: 1) Persist state (may use a local database); 2) Sync data across (via Radio or WiFi); 3) Exchange info with a desktop PC or a central server;

    Read the article

  • Table per subclass inheritance relationship: How to query against the Parent class without loading a

    - by Arthur Ronald F D Garcia
    Suppose a Table per subclass inheritance relationship which can be described bellow (From wikibooks.org - see here) Notice Parent class is not abstract @Entity @Inheritance(strategy=InheritanceType.JOINED) public class Project { @Id private long id; // Other properties } @Entity @Table(name="LARGEPROJECT") public class LargeProject extends Project { private BigDecimal budget; } @Entity @Table(name="SMALLPROJECT") public class SmallProject extends Project { } I have a scenario where i just need to retrieve the Parent class. Because of performance issues, What should i do to run a HQL query in order to retrieve the Parent class and just the Parent class without loading any subclass ???

    Read the article

  • How to dispatch a multimethod on the type of an array

    - by Arthur Ulfeldt
    I'm working on a multimethod that needs to update a hash for a bunch of different things in a sequence. Looked fairly straitforward until I tried to enter the 'type of an array of X'. (defmulti update-hash #(class %2)) (type (byte 1)) => java.lang.Byte (defmethod update-hash java.lang.Byte [md byte] (. md update byte)) (type (into-array [ (byte 1)])) => [Ljava.lang.Byte; (defmethod update-hash < WHAT GOES HERE > [md byte]

    Read the article

  • Stop MSVC++ debug errors from blocking the current process?

    - by Mike Arthur
    Any failed ASSERT statements on Windows cause the below debug message to appear and freeze the applications execution. I realise this is expected behaviour but it is running periodically on a headless machine so prevent the unit tests from failing, instead waiting on user input indefinitely. Is there s a registry key or compiler flag I can use to prevent this message box from requesting user input whilst still allowing the test to fail under ASSERT? Basically, I want to do this without modifying any code, just changing compiler or Windows options. Thanks!

    Read the article

  • Linked List Sorting with Strings In C

    - by user308583
    I have a struct, with a Name and a single Node called nextName It's a Singly Linked list, and my task is to create the list, based on alphabetical order of the strings. So iff i enter Joe Zolt and Arthur i should get my list structured as Joe Than Joe Zolt Than Arthur Joe Zolt I'm having trouble implementing the correct Algorithm, which would put the pointers in the right order. This is What I have as of Now. Temp would be the name the user just entered and is trying to put into the list, namebox is just a copy of my root, being the whole list if(temp != NULL) { struct node* namebox = root; while (namebox!=NULL && (strcmp((namebox)->name,temp->name) <= 0)) { namebox = namebox->nextName; printf("here"); } temp->nextName = namebox; namebox = temp; root = namebox; This Works right now, if i enter names like CCC BBB than AAA I Get Back AAA BBB CCC when i print But if i put AAA BBB CCC , When i print i only get CCC, it cuts the previous off.

    Read the article

  • How to egrep the first character in second column?

    - by Steve
    using egrep, how can i print all lastnames start with K or k ??? Jennifer Cowan:548-834-2348:583 Laurel Ave., Kingsville, TX 83745:10/1/35:58900 Lesley Kirstin:408-456-1234:4 Harvard Square, Boston, MA 02133:4/22/62:52600 Jennifer Cowan:548-834-2348:583 Laurel Ave., kingsville, TX 83745:10/1/35:58900 Lesley kirstin:408-456-1234:4 Harvard Square, Boston, MA 02133:4/22/62:52600 William Kopf:846-836-2837:6937 Ware Road, Milton, PA 93756:9/21/46:43500 Arthur Putie:923-835-8745:23 Wimp Lane, Kensington, DL 38758:8/31/69:126000

    Read the article

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