Search Results

Search found 96 results on 4 pages for 'kunjaan'.

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

  • How do you perform arithmetic calculations on symbols in Scheme/Lisp?

    - by kunjaan
    I need to perform calculations with a symbol. I need to convert the time which is of hh:mm form to the minutes passed. ;; (get-minutes symbol)->number ;; convert the time in hh:mm to minutes ;; (get-minutes 6:19)-> 6* 60 + 19 (define (get-minutes time) (let* ((a-time (string->list (symbol->string time))) (hour (first a-time)) (minutes (third a-time))) (+ (* hour 60) minutes))) This is an incorrect code, I get a character after all that conversion and cannot perform a correct calculation. Do you guys have any suggestions? I cant change the input type. Context: The input is a flight schedule so I cannot alter the data structure. ;; ---------------------------------------------------------------------- Edit: Figured out an ugly solution. Please suggest something better. (define (get-minutes time) (let* ((a-time (symbol->string time)) (hour (string->number (substring a-time 0 1))) (minutes (string->number (substring a-time 2 4)))) (+ (* hour 60) minutes)))

    Read the article

  • Please Recommend CS Project books

    - by kunjaan
    Programming Collective Intelligence is an awesome way to get your feet wet in Machine learning. I am looking for similar books which has small but interesting programming projects. Do you have any recommendations? Edit: It need not be related to machine learning. It could be any programming project-based books. Thanks. Edit2: Collective Intelligence in Action is one more book that looks at some interesting CS stuffs. Do you guys have any similar recommendations?

    Read the article

  • Echo target description in Ant

    - by kunjaan
    <target name="compile" description="Compile the File"> <echo>Compile the File </echo> <mkdir dir="${compilation-dir}" /> <javac srcdir="." classpath="another2" destdir="${compilation-dir}" /> </target> I want to echo the description of the target. Is there a better way of doing this other than duplicating it?

    Read the article

  • How do I bind Different Interfaces using Google Guice?

    - by kunjaan
    Do I need to create a new module with the Interface bound to a different implementation? Chef newChef = Guice.createInjector(Stage.DEVELOPMENT, new Module() { @Override public void configure(Binder binder) { binder.bind(FortuneService.class).to(FortuneServiceImpl.class); } }).getInstance(Chef.class); Chef newChef2 = Guice.createInjector(Stage.DEVELOPMENT, new Module() { @Override public void configure(Binder binder) { binder.bind(FortuneService.class).to(FortuneServiceImpl2.class); } }).getInstance(Chef.class); I cannot touch the Chef Class nor the Interfaces. I am just a client binding to Chef's FortuneService to different Interfaces at runtime.

    Read the article

  • Conditionally Delete in Ant

    - by kunjaan
    I want to delete the directory if the property "delete-compiled-dir" is set to true. Right now I have <target name="deleted-after-compilation" depends="compile,jar"> <condition property="${delete-compiled-dir}" value="true"> <delete dir="${compilation-dir}" /> </condition> <echo> Deleting Compiled Directory Classes </echo> </target>

    Read the article

  • How do I create different Objects using Google Guice?

    - by kunjaan
    I have a Module which binds an Interface to a particular implementation. I use that module to create an object. How do I create a different kind of object with the the interface bound to a different implementation? Do I need to create a new module with the Interface bound to a different implementation?

    Read the article

  • Stuck on solving the Minimal Spanning Tree problem.

    - by kunjaan
    I have reduced my problem to finding the minimal spanning tree in the graph. But I want to have one more constraint which is that the total degree for each vertex shouldnt exceed a certain constant factor. How do I model my problem? Is MST the wrong path? Do you know any algorithms that will help me? One more problem: My graph has duplicate edge weights so is there a way to count the number of unique MSTs? Are there algorithms that do this? Thank You. Edit: By degree, I mean the total number of edges connecting the vertex. By duplicate edge weight I mean that two edges have the same weight.

    Read the article

  • Can I ask ANT to look into .classpath for external jars?

    - by kunjaan
    Right now I have <!-- Classpath declaration --> <path id="project.classpath"> <fileset dir="${lib.dir}"> <include name="**/*.jar" /> <include name="**/*.zip" /> </fileset> </path> <!-- Compile Java source --> <target name="compile" depends="clean"> <mkdir dir="${build.dir}" /> <javac srcdir="${src.java.dir}" destdir="${build.dir}" nowarn="on"> <classpath refid="project.classpath" /> </javac> </target> Is there someway I can tell ANT to look into the eclipse's .classpath and figure out the external jars?

    Read the article

  • Third Party Libraries and Technologies very Java Programmer must be aware of?

    - by kunjaan
    I agree that this is a very subjective question but as a student of Java , I get suggested good libraries and technologies for Java by my mentors at work. For example, I was not aware of Google Guice for Dependency Injection, awesomeness of Java Reflection APIs, ORMs like Hibernate or stuffs you could do with libraries like Hadoop. I want to collect and share some of the libraries that exemplifies good java programming (so that beginners like me could code walk and emulate the coding practice), teach unique concepts to Java (for example Dependency Injections or ORM) and/or are really interesting libraries that a student like me would get to do interesting projects on (eg. Hadoop). I redited this question 3 times to make it more specific : ). I am sorry if I am really not clear in my intentions. But some kind of a list of good concepts and third party libraries for Java could really help some of my intern friends here at work. Thank you.

    Read the article

  • Count the number of objects in an Image

    - by kunjaan
    I am investigating the possibility of image processing to identify certain objects and also count them in an image. I will be given a picture and I need to identify the number of boxes present in that image. Does anybody have any experience with any Machine Vision/ Image Processing libraries like ImageJ, Fiji, JAI, jMagick ,Java Vision Toolkit? Which do you think is best suited for the job? What do you guys suggest? If the APIs can be used from Java, it would be better. Thank you. Edit: I am dealing with warehouse brown boxes. Yes I am talking about regular photos. The source is usually a mobile phone picture.

    Read the article

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