Jump to content

Gob

Member
  • Posts

    72
  • Joined

  • Last visited

Awards

This user doesn't have any awards

About Gob

  • Birthday Jul 28, 1987

Profile Information

  • Gender
    Male
  • Occupation
    Software Developer / Geophysicist
  1. Your package private variable "clickListener" is not initialized.
  2. Yeah, I have used Google Cloud Platfrom before, they support python and java. Really, how did they get around the Gnu Public License?
  3. Out of curiosity, what makes you say this? I have worked on 2 major Enterprise applications involving java. The first project was a Desktop Application written strictly in java with nearly 15 million lines of code. Further, this project was actually a clone (with many more features added) of a project written in C++. Neither project was more, or less stable than the other. And really nothing about either language affected stability. The second project was a business platform server project written in a mixture of C++ and Java (65% C++, 35% java), roughly 10 million lines of code, cross platform (Linux, WIndows, AIX, Solaris, etc). Once again, bugs/development issues were distributed proportionally.
  4. I think you have misunderstood what Hadoop is and how it relates to Google. Here's an FYI: Hadoop is actually an open source project spear-headed by the Apache foundation (https://en.wikipedia.org/wiki/Apache_Hadoop). You are correct, though, that Google does offer it on its cloud platform. Further, this platform is closed source, and contains "trade secrets" with regards to the VM implementations you mention above (fun fact, their own implementation of the JVM keeps Oracle at bay). However, Google is just running Apache's Hadoop with some optimizations (https://cloud.google.com/hadoop/what-is-hadoop). Further, because it is open source, you can run Hadoop on your own systems, AWS, DigitalOcean, etc. So you have more freedom than you think. The main reason you don't see Hadoop interfaced with C++ is because Hadoop itself is written in Java, and thus, there is a huge convenience sticking with that language as you do not have to reimplement libraries that are already implemented in the Hadoop packages. So you actually could interface C++ executables, it would just be tedious (and fun with JNI!). As for this java vulnerability, my opinion is that java client applets should have been killed years ago. If they had, I bet the "Java is insecure" stigma would be no where near as prevalent.
  5. Really, the man pages are your best friend here: type "man pipe" in the command line. But these are also replicated everywhere, like http://man7.org/linux/man-pages/man2/pipe.2.html. Just as an aside, I suspect the reason you are not getting many answers is because you are claiming to understand how to use pipes and what they do, and then don't really pose an answerable question. So it is hard for someone to give you an answer. I will try, though. The "int pipe(int fds[2])" system call basically sets up a buffer in the kernel space that allows userland processes to intercommunicate. There is an example in the link I posted. But the gist is that you pass an array of two ints to the system call. If the system call is successful the array contains two File Descriptors. fds[0] is the read end of the pipe, and fds[1] is write end. After fork()ing the process, depending on the communication direction, the child and parent will use the close() system call on the end of pipe they are not using, and then use the write()/read() system calls on the corresponding end to send/receive the bytes to/from the kernel space buffer. There are other methods for inter-process communication, but they may require synchronization (for example shared memory, see "shmget"). Hope that helps.
  6. Vessel Account: StackSmash Videos commented: https://www.vessel.com/videos/JYZEYDYx0 https://www.vessel.com/videos/LCoY5zfFf
  7. Will do, I'm at work, so it will be in a few hours.
  8. Yeah I think I mis-typed. It is Windows Server 2012.
  9. Have you bought anything yet? I have a legitimate Windows Home Server 2012 key which I got through university. I prefer the *nix varieties for servers, so I will probably never use it. Would you like my key?
  10. You can, but it makes using the syntax look strange: myQueue << std::cout I believe this is vastly more readable, and consistent with the standard notation: std::cout << myQueue << std::endl;std::cout << "End of queue output" << std::endl; Further, if you want avoid polluting the global namespace, there are ways of adding indirection, but it is not necessary for his/her task I'm sure. Edit: Sorry I made I typo in my original post. Corrected
  11. You need to make sure the ostream overloaded operator is declared in the global scope: Correct: //queue.h#include <string>#include <iostream>...class queue{public:...private:....};std::ostream& operator<<(std::ostream& os, const queue& instance) { ...} Incorrect: //queue.h#include <string>#include <iostream>...class queue{public:...std::ostream& operator<<(std::ostream& os);...}private:....}; You need to define a function within your class (Queue) that returns a std::ostream& and do something like this: //queue.h#include <string>#include <iostream>...class queue{public:...std::ostream& addToStream(std::ostream& os);private:...};std::ostream& operator<<(std::ostream& os, const queue& instance) { return instance.addToStream(os);} Function definition for addToStream: std::ostream& queue::addToStream(std::ostream& os){ node* current = data->get_head(); while (current != NULL) { os << current->get_data() << " "; //Prints current position then leaves a gap. current = current->get_next(); } //Ending the row with a #. os << "#"; return os;} Hope that helps!
  12. Off topic: Ironically, if you think he is being unreasonable, doesn't that make you unreasonable for trying to reason with him? ->mind blown On topic: A few weeks ago, I would have not cared about this article at all saying something like "Who cares what performance a camera has on a phone". However, I just went traveling recently, and it is fantastic to have such an opportunistic camera. My GF has a HTC one M8, and I was generally impressed with the quality, even at low light. I wonder how the 6\6+ compares in low light with its higher pixel count.
  13. First thing, try and put code into code tags. I don't know C#, but I can guess what the issue is. You are creating a dictionary that has String type keys, and Dictionary type values. You correctly initialize the object: private Dictionary<int, Dictionary<String, Boolean>> test = new Dictionary<int, Dictionary<String, Boolean>>(); But you are not correctly inserting a new entry into the dictionary: // Can't do this, the ins String and False bool primative are not in a dictionary// test.Add(1, ins, false);//Initialize main dictionaryDictionary<int, Dictionary<String, Boolean>> main = new Dictionary<int, Dictionary<String, Boolean>>();int mainKey = 1;//Prep the Dictionary valueString subKey = "Some string key";Boolean subValue = false;Dictionary<String, Boolean> dictValue = new Dictionary<String, Boolean>();dictValue.Add(subKey,subValue);//Now Add to main dictmain.Add(mainKey,dictValue); I hope this helps.
×