# Kyle Jones

Ranch Hand
since Jan 22, 2014
For More
Cows and Likes
Cows
1
In last 30 days
0
Total given
0
Likes
1
0
Total given
11
Given in last 30 days
0
Scavenger Hunt
Ranch Hand Scavenger Hunt
Greenhorn Scavenger Hunt

## Recent posts by Kyle Jones

How can I use recursion to improve this?? Thanks

7 years ago

The question states:
Given the list l as [4, 3, 5, 7, 8] and the key t as 12, the function answer(l, t) would return the list [0, 2] because the list l contains the sub-list [4, 3, 5] starting at index 0 and ending at index 2, for which 4 + 3 + 5 = 12, even though there is a shorter sequence that happens later in the list (5 + 7). On the other hand, given the list l as [1, 2, 3, 4] and the key t as 15, the function answer(l, t) would return [-1, -1] because there is no sub-list of list l that can be summed up to the given target value t = 15.

Here is my attempt but this will not work if the list is bigger in size (list can be up to 100 in size). Any suggestions or different approaches to take as im sure there are

7 years ago
Yes you are right, but (something i didn't mention)

I am using the maven assembly plugin to create a distribution where the jar and config file are both inside a tar.gz file.
8 years ago

Was actually easier than I thought.. Got there using the FileInputStream

Here is the change:

Cheers!
8 years ago
Hi,

I am currently running a jar file and want it to pick up a config file in the same location where the jar lives (jar to use external config file).

Here is my code:

The problem is this does not pick up the external config file.

Is there a way to do this?

8 years ago
Thanks for the reply. Will keep it in mind
8 years ago
Just a heads up that this course has started again this week. (7 week certified course fro, 10gen)

I have enrolled and finished the first week and it looks pretty good.

8 years ago
As the title suggests, is it ok to post code you work on in your day job online/Github?

Firstly, I dont mean an exact copy and paste.. but similar work and idea's?

I am working on a team where I am implementing just parts of the feature. I want to gain a better understanding of things we have worked on so want to develop similar features but to work at home and implement all the feature.. basically all for a learning process, and to change the implementation where possible so its not exactly the same.

Would this look bad if employers saw it?
8 years ago
Hi,

I have a MAC Mini running 10.8.5, 2.6 Ghz i7 with 10GB RAM.

I currently have a 128GB SSD hardrive which is where the mac boots from and a 1TB other harddrive as storage.

I want to also install Ubuntu so that I can use this as my primary use, for developing. Is it possible to split the 128SSD So that both linux and mac boot from this (to optimize performance), and then split the 1tb drive in half so both use these aswell?

Is this the best way top do this?

Or is it better to use all the SSD for ubuntu and have the 1tb for the mac? (as ill be using this for mostly ubuntu stuff)

Anyone with any experience with this any opinions would be appreciated
8 years ago
Hi,

Currently I have a watchservice polling a directory and when new csv files land in the directory I am getting a list of file names that are dropped in.

How can I process each file that drops into the watched directory to that I copy the csv to a database?

Thanks

ps Also, i have entity classes etc set up for the csv file in database.
8 years ago

Henry Wong wrote:
Thanks for coming back and reporting the answer ... you earned a cow.

Henry

Thanks for the cow

I am looking to write tests for this function, this is my cuurent test:

Any other functionalities that could be tested here, or improvements on the above?

Thanks
8 years ago
Here is my solution using recursion. Thanks Henry

I am now looking at easier solutions using Java 8 functionalities.

8 years ago
Thanks for the reply, i will look at doing this recursively.

Probably a noob question but how could I instantiate an array of this type?

[1, [2, 3], [4, [5, [6, 7], 8], 9], 10]

8 years ago
Hi all,

Using java 7,
What would the best method be to flatten an array such as:
[1, [2, 3], [4, [5, [6, 7], 8], 9], 10]

So that the output is [1,2,3,4,5,6,7,8,9,10]

Currently I am stuck trying to iterate this array.

Many thanks

8 years ago
Where to put the .xml file in a Maven / Spring project?

I am following this tutorial http://thinkbiganalytics.com/ingestion-with-spring-integration/

The second step says 'The second step, which is similar to other Spring projects, is to set up the components that we’ll use in an XML file. I created the XML file Spring-Integration.xml and put the following content in it.'

I cant seem to figure out where I should be putting this? Does it matter?