Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks.
What IDE would y'all recommend for working with SpringBoot? I've been using Spring Tool Suite but it has been very annoying and doesn't seem that great. It seems like Intellij IDEA only works for Spring if you get the paid edition. Are there any other good choices that I've missed?
On December 17 2017 07:37 WarSame wrote: Fuck. That's what I was thinking but I'm not willing to drop money on it when I'm just doing this to see if I like Spring Boot.
Well, you can always just go with free evaluation for 30 days. After this runs out you can still use the IDE (it will just auto-close itself every so often - 30-45 minutes if I remember correctly) without a problem. You can also get your free evaluation and during that time sign up for the EAP, which will allow you to use this software for free until next stable release (should be about 3-4 months or so judging by their usual release cycles). My friend used to ride PHPStorm early access program for over 6 months without paying a dime.
Scenario: I have many large integer values, and tied to each one of those are several other key small values. Let's call these values V, A, B, C, and D.
I want to do arithmetic between the V values, but only if I can match their respective A values, or match their respective B values, or match one's A to the other's B(but not both), AND if the V values have certain things in common. After doing arithmetic, I will need to alter the values V, A, B, C, D, and get rid of duplicate Vs, keeping only the unique V entry with the highest C value. (im sorry if this is hard to follow).
Which sounds like a more efficient setup:
1.) A list of (V,A,B,C,D), and a hashmap with keys [A] and keys [B], where the keys point to indices of the list that have that A or B in their tuple. I will iterate the list, and for each tuple I will look up the indices that keys A and B point to, and make comparisons between those tuples and this tuple.
If they meet the criteria, I will perform arithmetic and put the new (V,A,B,C,D) into a NEW list. And create a NEW hashmap with keys A and B, these will be updated from all the arithmetic in this information. As I create the new list, I will look for duplicate V values by sorting the list as I go (inserting each V into an appropriate index so as to keep it sorted).
vs
2.) A hashmap of keys [V], where each key V points to a tuple (A,B,C,D). I then also have a hashmap of [A] and [B] keys, that each point to a list of Vs that have that A or B in their tuple. I will then iterate my hashmap of keys V, looking at each tuple. For each tuple, I will look up A and B in my hashmap. For each lookup, I will get a list of Vs. For each of those Vs, I will look up their tuple (A,B,C,D). I will then make comparisons.
If the criteria has been met, I will do arithmetic on the Vs and form an updated tuple (A,B,C,D), put the new V into a NEW hashmap as a key, and the new tuple as it's entry. Create another new hashmap, and the keys A and B in that tuple will point to a new list, with V as an entry in it. HOWEVER, when this process starts, if V was already a key in the new hashmap(signalling a duplicate), then I look up it's tuple and make comparisons. Then I can either replace the old one with the new, or simply not add the new one.
vs -
some other method entirely?
space and time are both a concern., but probably moreso time thanks!
On December 15 2017 02:57 Acrofales wrote: I'm assuming the first two steps are performed simultaneously. If not (you first do the even numbers and after that the odd numbers, then modify accordingly. And if the operations are done inplace, that's another different solution. Can all still be done in the same loop, though:
I've recently studied common sorting algorithms. I've not bothered to learn how to reproduce them, but I'm wondering if just having an idea how they work is enough. Also, Big O notation as well. Are you guys the same?
I just print it to the output, but I dont like it really much. You cant tell what a black or white square is and using caps and lower case letters is also not that great. Do you guys maybe have a better idea of how to visualize the board in a better way without using third party libraries?
I tried the chess unicode characters and colorization in the console, but that doesnt work on windows.
Wow. I'll be definitely checking this thing out. It's a web framework that lets you do dynamic pages (angular-like) all in the back-end. Some of their solutions are pretty neat. Won't work for older browsers though, since it's all based on web sockets (I wonder how's performance with many dynamic properties in a view). The idea is really neat, I think it could be much better if Ruby were concurrent though.
Another thing I have to test is the phoenix framework since I already have to learn Elixir for work.
On December 21 2017 09:08 graNite wrote: Im building a chess programm in python that i want to be able to also solve chess puzzles like this: + Show Spoiler +
Place two Knights, two Rooks, two Bishops and two Kings on a 4x4 chessboard, so that:
1) The Kings are not attacked at all.
2) All other pieces are attacked exactly once.
Ignore color, so every piece attacks every other piece whose square it can move to, including the Kings.
I just print it to the output, but I dont like it really much. You cant tell what a black or white square is and using caps and lower case letters is also not that great. Do you guys maybe have a better idea of how to visualize the board in a better way without using third party libraries?
I tried the chess unicode characters and colorization in the console, but that doesnt work on windows.
Do you need to visualize in the console?
Easiest thing is to make HTML and view in the browser. Write some css and html and you will get everything you want.
8x8 table with height and width. CSS Style for black and white squares and borders. Each piece would be an entry in the table. Style this with an img or a glyhicon.
If you want to go overboard. You might want to include a javascript file.
Write your output as json. Something along the lines of the position and piece and player.
thats a good idea, although that would much more wore than i was planning to do :D
i wanted to use the console because that is the thing i have the easiest access to. i dont want to use external libraries because i want to do it "on my own"
Wow. I'll be definitely checking this thing out. It's a web framework that lets you do dynamic pages (angular-like) all in the back-end. Some of their solutions are pretty neat. Won't work for older browsers though, since it's all based on web sockets (I wonder how's performance with many dynamic properties in a view). The idea is really neat, I think it could be much better if Ruby were concurrent though.
Another thing I have to test is the phoenix framework since I already have to learn Elixir for work.
Wow. I'll be definitely checking this thing out. It's a web framework that lets you do dynamic pages (angular-like) all in the back-end. Some of their solutions are pretty neat. Won't work for older browsers though, since it's all based on web sockets (I wonder how's performance with many dynamic properties in a view). The idea is really neat, I think it could be much better if Ruby were concurrent though.
Another thing I have to test is the phoenix framework since I already have to learn Elixir for work.
Any reason for choosing elixir instead of erlang?
Rails is our primary technology stack. It'll be easier for people to move to Elixir than Erlang. We might move down the stack later but I hardly see a reason since Ruby has like the best syntax ever and it utilizes the Erlang VM anyway so it's more about how you write your code because it's compiled to Erlang code anyway.
On December 21 2017 09:08 graNite wrote: Im building a chess programm in python that i want to be able to also solve chess puzzles like this: + Show Spoiler +
Place two Knights, two Rooks, two Bishops and two Kings on a 4x4 chessboard, so that:
1) The Kings are not attacked at all.
2) All other pieces are attacked exactly once.
Ignore color, so every piece attacks every other piece whose square it can move to, including the Kings.
I just print it to the output, but I dont like it really much. You cant tell what a black or white square is and using caps and lower case letters is also not that great. Do you guys maybe have a better idea of how to visualize the board in a better way without using third party libraries?
I tried the chess unicode characters and colorization in the console, but that doesnt work on windows.
use jupyter notebook. it's pretty straightforward and easy. You can now use html and view through your browser.
I've been working on Spring Boot. I've got OAuth2 working but my client secret is in my application.properties file. This will get added to github when I push. I could just .gitignore my application.properties file but there are other important values in there. How do I separate out my client secret/id from application.properties?
On December 25 2017 02:11 WarSame wrote: I've been working on Spring Boot. I've got OAuth2 working but my client secret is in my application.properties file. This will get added to github when I push. I could just .gitignore my application.properties file but there are other important values in there. How do I separate out my client secret/id from application.properties?
Spring properties can be configured to read from multiple files. By default it also reads from system properties and environment variables. There are a lot of options for you, just have to figure out what works for you and what your deployment looks like.