LAURENT*

Members
  • Content count

    280
  • Joined

  • Last visited

Community Reputation

779 Good

About LAURENT*

  • Rank
    Member

Personal Information

  • Interests
    Art
    Audio
    Business
    Design
    DevOps
    Education
    Production
    Programming
    QA

Recent Profile Visitors

10301 profile views
  1. Test case 1 has over 100000 inputs. Here is the link they gave me. I didn't see a forum but they do seem to have some sort of discussion section. This is usually my go to place but that might stem from admiration, regardless I will be exploring hacker rank now. https://hr-testcases-us-east-1.s3.amazonaws.com/17161/input01.txt?AWSAccessKeyId=AKIAJ4WZFDFQTZRGO3QA&Expires=1509810471&Signature=LhvakIXqneFbVLZEsjdvQElBwtQ%3D&response-content-type=text%2Fplain
  2. I decided to take on competition and challenges across the internet. My place of choice at the moment is hacker rank. I'm stuck on hacker rank's 30 day challenge day 8. I need to create a map key data structure for a phone book. The maps need to be the names of the people and the keys are their numbers. Does anyone know how to complete this challenge and could someone explain to me why test case 1 would fail with my code? #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <map> using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int it = 0; int n; int number; string name; std::map<string,int> phoneBook; //Number of names + phone numbers cin >> n; //Fill in Map and keys while (it < n) { cin >> name; cin >> number; if(phoneBook.insert(std::make_pair(name, number)).second != false) { phoneBook.insert(std::make_pair(name, number)); it++; } } //Find the keys using the map for (int i = 0; i < n; i++) { cin >> name; if(phoneBook.find(name) != phoneBook.end()) { cout<<name<<"="<<phoneBook[name]<<endl; } else if(phoneBook.find(name) == phoneBook.end()) { cout<<"Not found"<<endl; } } return 0; }
  3. I'm looking to buy.........

    I'm looking to buy a 500 gig drive to store my crap on. I have a lot of stuff on a lot of different thumb drives and I want to unify data and put all of it in one place. I won't use it often I'll probably just update and once a month or something like that. Any advice? Any brands I should look at? Anything at all?
  4. What are your focusing techniques?

    I tried working on this at work. The time restraint of lunch seems to be working for now. I'll see how I can apply everything else. I really want to keep this going.
  5. What are your focusing techniques?

    I want to work in a consistent schedule now. I've had moments when I couldn't stop working but those moments are random and unpredictable. I don't want unpredictable, I want to be consistent. I tried forcing myself to work on projects when I'm not in the mood and the results aren't what I'm liking. I'm doing very well with practicing and maintaining good habits and I want to continue applying more good habits to my daily life. How do you focus on the job then? My focus is really random and I want to control it. There have to be someway to do it.
  6. What I work on personal projects I work on them whenever I feel like it. I want to change that habit but it hasn't been easy. I've increase my discipline to diet exercise and sleep consistently but that was training to not do something. Training myself to actively do stuff has been much harder. What are your techniques for sitting down and really getting to work without a distractions?
  7. An array of array of int type

    This looks right although I don't know what std means. Option 1 looks perfect.
  8. I want to create an array of array of int type arrays. Can anyone help me?
  9. Sound effects won't overlap.

    Thanks a lot. At first using the sound pool class lagged my game hard, but then I got the idea to only use it for small sound effects instead. Thanks
  10. Hello,   I'm having a serious problem with audio in my game. My sound effects won't overlap. My game uses bullets that fire at a somewhat frequent state and I need to play the sounds repeatedly. I tried to use a class call media player but I don't think this will be helpful and to top it off the Music continued to play even after I exited to my phone's home screen. Could someone recommend me a better method for handling sound for my game? I'm so close to done with the programming part then I'll finally be able to start making levels. Please help me.  
  11. I need to get the position of image buttons. I'm going to programmically add images instead of doing so in the XML file. There is another major problem I need to address. Inside of the XML my buttons are placed relative to a parent. Even if I positioned my asset where the buttons are and their size was correct I would still need to space them correctly inside my HorizontalScrollView . Is there any way to specify layout_margin as a percentage of the parent instead of in dp?
  12. Nope, I don't want the touch coordinates. I could easily figure that out. I think I worded my question wrong but I did come up with a new solution. I was concerned about the user point of view and wanted to turn inches to pixels but first I needed to figure out how to get the pixel to inches. I was looking way too far ahead. I decided to go on a new solutions of using screen percentage. By calculating the percentage I wanted objects to be scaled relative to the phone pixel dimensions I was able to get really accurate result in resizing them. With this technique in hand I was also able to get accurate positioning too using percentage calculations. I'm expecting a small percentage error using this but I don't mind. My game only response to "onTouch".  
  13. I think I will assume. I'll get a whole list of phones and tablets and get their average dimensions. I'll scale everything with this average in mind. It won't be perfect but good enough is good for me.
  14. I'm trying to convert from inches to pixel. Does anyone know how to do this in android studios. I'm doing this in a java file not an XML file.
  15. The path of least resistant seems like a double edge sword especially with the work environment example you posted. I did get a new idea from your explanation.   I have one file with a single number. The value of the number represent the how many levels have been unlocked with the max value being 9. Since the game is completed in linear order that should be all I need. Now I feel like a professional and a little lazy.....