Jump to content

clegger

Member
  • Posts

    43
  • Joined

  • Last visited

Awards

This user doesn't have any awards

  1. Not mentioning anything about DX12 or Vulkan in their 1060 review really makes the LTT video seem... incomplete at best. I think there should be a follow-up to give a little more depth. IMO, there's more to base your buying decision on than titles exclusively using older APIs when new ones are already starting to be adopted with significant benefits being possible. As time goes on I fully expect the RX 480 to level out in price with the GTX 1060 as more games take advantage of the full potential of modern APIs.
  2. Got a GTX 970, but want better DX 12 card!
  3. I have a question about the cardinality of the set containing the sums. Does this mean the cardinality of the set of distinct sums, or the cardinality of the set of sums including duplicates? In your example the set of all sums just happened to all be unique, but with the example of {1,2,3,4}, k=2 the set of sums is {3,4,5,5,6,7}. Is the cardinality of the set you are looking for 5 or 6?
  4. I know you are asking about best practices, but I'll spin the question a little and ask if you are expecting any side effects? In this case a side effect would be previous calls to method1 or method2 causing subsequent calls to these methods to return different results. Ideally your code would not have such side effects, but if they did then you should be testing a cross-section of calls (using one instance of the object) to ensure the side effects behaved as expected. When my team writes test classes we try to group them into the concept of a scenario. One scenario = one test class. Usually one instance of an object for the class under test is used for a scenario. We may have multiple scenarios exercising one class so there may be multiple test classes for each class. The scenarios help us create meaningful names for our test classes and test methods, but sometimes they get really wordy.
  5. If you've got Windows 10 and are willing to run an Insider Preview build then you can use this to actually run bash (and thus gcc) right on Windows without CygWin: http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/
  6. You underestimate just how old this guy really is. In truth I think he started with basic, but my point still stands. To play devil's advocate I'd argue that there are some things that better taught with different languages, even assembly. Do you learn about memory allocation and the stack and the heap from higher-level languages (Java, C#, etc)? Not really. But you are still able to write bad code in spite of the mechanisms in place in those languages to "protect you from having to understand things at that level". I'm not saying "you have to learn assembly first". There are merits in all languages. You will learn something useful from any one you choose. If you think it will be interesting to you then ignore the naysayers. Here's where the opinionated version of me comes in; when you feel comfortable with one language then force yourself to try something drastically different to keep learning.
  7. Honestly, if programming in assembly language for a long-dead architecture floats your boat then I say "just go for it". There are people out there who still write programs for old consoles like the Atari 2600 just for fun. I know a guy who is writing (from scratch) the game Desert Bus for a console so obscure that I can't even remember the name of it. I personally think he's crazy to choose doing that for fun, but he's learning new stuff from doing it. If someone tells you that you can't / shouldn't start with a language that you think would be interesting then feel free to ignore them. If it gets you learning something new then you're most certainly smarter afterwards as a result.
  8. My suggestion would be Connect 4 (or other turn-based game with a rectangular-shaped play-surface to meet the 2-dimensional array criteria). Creating an AI player component with minimax and apha-beta pruning is a pretty standard thing for first or second year programming project. The reason I selected Connect 4 is because the rules for evaluation are pretty straightforward and the number of choices for making a move are also limited. Creating different AI difficulties is as simple as configuring the depth of search in your game tree minimax evaluation. And if you want a really easy computer player you can just use a random number generator (as you indicated was an optional component) to choose an available column. If you haven't heard of game trees then here's a good video:
  9. As far as I know this should work exactly the same on OSX as on any other *nix. I'm no expert at using sed, but googling "sed find text between two strings" gave me this which you might find helpful: http://stackoverflow.com/questions/13242469/how-to-use-sed-grep-to-extract-text-between-two-words If the pipe character '|' doesn't redirect the output to a file then you can try using '>' instead. http://stackoverflow.com/questions/6674327/redirect-all-output-to-file
  10. You probably want to learn how to use the "sed" utility. http://www.grymoire.com/Unix/Sed.html The answer to this question might point you on the right path. The problem is similar, but you appear to want everything after the last index of the minus character. http://stackoverflow.com/questions/15548277/get-the-characters-after-the-last-index-of-a-substring-from-a-string ls | sed 's/.*\-//' | file.txt
  11. I just tried the Selenium IDE in Firefox with the "select" element example from w3schools: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select Using the Selenium IDE recorder I was able to open the page and change the dropdown to select the 3rd item (Opel) using these commands:
  12. Are you using the Selenium WebDriver or the Selenium IDE (Firefox add-on)? I've personally only used the WebDriver APIs. If you post your code then I could have a look.
  13. http://www.seleniumhq.org/ Selenium is a tool for automating browsers. I've used it with C# to automate the completion of a multi-page survey. I think there's even a way to run it headless with PhantomJS. I'm guessing you're going to run up against a CAPTCHA if you are using a popular classified site or a system that throttles your posting frequency. Just be careful, what you are likely planning on doing probably goes against the terms of service of the site.
  14. This book always seems to get recommended: https://www.amazon.com/JavaScript-Good-Parts-ebook/dp/B0026OR2ZY
  15. If you're willing to stick your neck out a little bit then you could suggest that work like this is usually done in the realm of operations / system administration. Typically you find more powershell tooling used in that type of role than writing custom applications in C#. My suggestion would be to keep functionality like this in Powershell scripts that can be used by Sys Admins and be part of their "toolbox". If you want to further integrate these into a bigger system then call out to powershell from .NET like this: https://blogs.msdn.microsoft.com/kebab/2014/04/28/executing-powershell-scripts-from-c/
×