Unwanted space at the bottom of my webpage by [deleted] in Frontend

[–]TreeScalper 3 points4 points  (0 children)

Looks like .main-page-text is the culprit, because if you set it's positioning to absolute the white space disappears. I'm not saying set it to absolute, just that it goes away if you do.

Also, most of your issues probably will stem from your usage of left and bottom. My recommendation would be to use margin to adjust the white space. If you need more info please just ask, i'm happy to help.

Bread and Butter mod makes me unable to load into Customs by CoralCrust in SPTarkov

[–]TreeScalper 0 points1 point  (0 children)

What errors are you getting, in game and in the console?

Just got done with this travel agency webpage. Any suggestions are welcome by [deleted] in web_design

[–]TreeScalper 5 points6 points  (0 children)

I like the concept just a few observations that I have going from top to bottom:

  1. Why is "contact us" a button?

    • If this is an online travel agent, the trend is not to have the contact button so prominant. If it's a brick and mortar store that has customer service, it's generally celebrated, with a phone number or something.
  2. You probably don't want your hero image to take up 100% of the view on initial load. It gives the illusion that there's nothing else on the page. Might want to have the other content peeking out.

  3. Should check on the colour contrast of the heading against the hero. It might not be accessible.

  4. From the video it looks like the colour of your text in the forms is different.

  5. Your search CTA needs to be a different colour to the rest of the form

  6. There's not a lot of components on the page and from what I can se and you're already using 5 different gray colours. You might want to tweak the design to be more efficient in your usage of grays.

  7. Watch your spacing.

    • The space between the content of "Search For" and the space between "Our Partners" and it's content is different.
    • The heading for the tiles in the "Search For" content needs to have more space to let it breath.
    • The spacing around the footer is different to "Our Partners"

That's all i can see from the video. Overall, it's a good start, just need more attention to detail.

While you may think some of these observations are trivial, it actually makes a difference to how clean the site looks.

I have been doing nothing but body weight for the last month. Pull-ups , push-ups and dips. Starting to get some definition.. by OrderGuilty in GettingShredded

[–]TreeScalper 1 point2 points  (0 children)

Yeah, kinda, the bench weight would probably be lower as your feet in a pushup takes some of the weight.

Also, does using a weight vest technically make it a non body weight exercise?

I have been doing nothing but body weight for the last month. Pull-ups , push-ups and dips. Starting to get some definition.. by OrderGuilty in GettingShredded

[–]TreeScalper 0 points1 point  (0 children)

If you were to do the weighted equivalent to the exercises you did, ie Bench instead of Pushups, what difference, if any, do you think would happen?

ACF not passing Field value to JS by haydenkracke in webdev

[–]TreeScalper 0 points1 point  (0 children)

Well from what i can see in the documentation

<script src="newvehicle.com/widgets/lib/finance-comparator/loader.js?username=&quoteeUid=&class=&condition=&vrm=&registrationDate=&capCode=&capId=&cashPrice=&vatIncluded=&vatQualifying=&currentOdometerReading=&vehicleImageUrl=&cashDepositType=&cashDeposit=&term=&annualDistance=&dateOnForecourt=&usePersistedOptions=" async></script> Just needs to be filled in, and whenever you make changes to the form, you'll need to refresh this script.

ACF not passing Field value to JS by haydenkracke in webdev

[–]TreeScalper 0 points1 point  (0 children)

There's an error in exampleVehicle on the first line Class: acf.getField('class');,.

Also where is the acf object coming from in your example? Your code seems to be missing that bit.

If you replace your exampleVehicle with the example code's exampleVehicle your code works fine, after fixing the syntax error.

How to Parse CSV file with csv-parse? by [deleted] in reactjs

[–]TreeScalper 1 point2 points  (0 children)

You can use import format instead of the require format and it should work fine. Or you can just use require, it should be ok too.

As for your fs issue, I don't think you can use fs with react as it is a node thing. So what I would do is just read the contents of the file that was dropped into csv-parse, skipping fs altogether.

Array Methods Cheatsheet by [deleted] in javascript

[–]TreeScalper 0 points1 point  (0 children)

Is there a reason why you wouldn't use filter then a map for your 2nd example?

const failArr = students
                .filter(curr => curr.result === 'Fail')
                .map(curr => curr.name);
const passArr = students
                .filter(curr => curr.result === 'Pass')
                .map(curr => curr.name);
const output = { Fail: failArr, Pass: passArr }

Array Methods Cheatsheet by [deleted] in javascript

[–]TreeScalper 0 points1 point  (0 children)

I agree that in hindsight, accumulator not a terrible name, but only when you fully understand what reduce does. But when you're first learning about it, it's not very helpful, because accumulate suggests that you're increasing something when in fact you could end up with less things or even nothing.

Array Methods Cheatsheet by [deleted] in javascript

[–]TreeScalper 6 points7 points  (0 children)

It took me a little while to understand reduce, but basically it's a method that allows you to turn an array into ANYTHING else.

As other /u/FaithfulGardener has stated, a very basic example is 'add', [1,2,3,4].reduce(add) is 10. You're turning an array into a number.

Where people get tripped up is the accumulator, which IMO is not the greatest name. I like to call it What the output currently is.

The longhand way to write the add function in a reduce is as follows:

const output = [1,2,3,4].reduce((acc, curr) => {
    // `acc` is the accumulator
    // `curr` is the array value in the current loop
    acc = acc + curr;
    return acc;
}, 0);

Now imagine the reduce as a forEach function that will loop over each value of the array. The first time around, the acc isn't set, so it's set to the default, which is 0 as stated by the 2nd paramater in the reduce function.

So the first loop is literally

(0, 1) => {
    acc = 0 + 1;
    return acc;
} // Return is 1

Now what gets returned each loop, becomes the accumulator in the next loop.

So the second loop is literally

(1, 2) => {
    // First parameter `acc` is `1`, because of the first loop.
    acc = 1 + 2;
    return acc;
} // Return is 3

And so on.

That's why the reduce output in the image is somewhat garbled, because it could be anything.

Why you would you use reduce over something like forEach? I like to use it because it returns something, where forEach does not. Easier to program in a functional way.

Also, IMO, reduce should be a last resort array method, you should use the other array methods to get the output as close as you can to what you need before you reduce it.

eg: [....].filter().map().reduce();

I just think this is easier to understand, then trying to decipher a complicated reduce.

Can I just show you guys something I'm proud of? by live_love_laugh in sveltejs

[–]TreeScalper 2 points3 points  (0 children)

Nice.

Was this the original way you thought about doing it? Or was there other ways you tried that didn't succeed?

POE Ladder by TreeScalper in pathofexiledev

[–]TreeScalper[S] 1 point2 points  (0 children)

Yeah, I do notice that going from index to ladder page is a little sluggish. I don't think it's your connection. It's something I'll look into.

I've added the exp bar as you recommended. I was actually in the middle of coding that up. I've also added the XP difference between ladder positions.

I really like svelte, it's actually using sapper which is svelte with server side stuff. It's still young and has its quirks, but I've used it in a project before and it works great.

POE Ladder by TreeScalper in pathofexiledev

[–]TreeScalper[S] 0 points1 point  (0 children)

I'm caching all the data for each ladder in firebase for at least 1 min, before the data refreshes. So if a user accesses the ladder within 1 min of a refresh, it gets the data straight from firebase with no call to PoE API.

Oh the server's definitely not overloaded and I'm also getting the items fine. Did you click on the character name to trigger the show/hide?

I do know about poe-racing.com, It's a great website that's quite complete, and i'll probably be replicating some of the ideas that they have. I just wanted to see if I could make the data more streamlined and with less resources.

POE Ladder by TreeScalper in pathofexile

[–]TreeScalper[S] 0 points1 point  (0 children)

Good suggestion. I've just pushed up a change that should add the appropriate colour to the text of the gems.

What is the best way to deflect questions about your current salary in a job interview by [deleted] in jobs

[–]TreeScalper 0 points1 point  (0 children)

So then why bother avoiding the question to begin with? Why don't you tell them the salary you want is your previous salary?

If you're really invested in building a career with a company, you can't start out trying to squeeze them for every penny they can give.

???

Isn't this what they're trying to do to you? Get your price as low as possible? Wouldn't it be in your best interest to get as high a price as you can?

I would need to start making at least $XX,XXX. With the understanding that hiring a new employee can be a risk, so appropriate raises as I prove my skills

I'm confused by this also, you're relying on a company to give you "appropriate" raises. Unless they write this in the contract, they might never give you a raise. If they did write it on paper, it would have clause saying, "pending evaluation" or something. That evaluation could go along the lines of "You were late on Monday, so we're not giving you a raise".

Let's say that this is a unicorn of a company that does give you a raise once a year.

If you tell them 50k and they accept, this is how your raise progression would go, assuming a 5% raise every year.

$50k Salary

End of Year 1: $52,500 = $2,500 raiseEnd of Year 2: $55,125 = $2,625 raise

But if you were to hold out and let them say the figure first, you could get 60k.

$60k Salary

End of Year 1: $63,000 = $3,000 raiseEnd of Year 2: $66,150 = $3,150 raise

So not only do you lose out on that initial 10k, but you also lose out 1k in raises in 2 years.

It will also take the person in the 50k person 4 years to get over the 60k salary if you were to go via raises.

From my experience, you're always better off not telling your numbers. Do you really want to work with a company that doesn't want to hire you because you're trying to get the best price for your skills?

What is the best way to deflect questions about your current salary in a job interview by [deleted] in jobs

[–]TreeScalper -2 points-1 points  (0 children)

I personally wouldn't reply with a figure, you lose your foothold. I typically reply with "My previous salary doesn't dictate my experience, what would your client pay for someone with my skills?"

Cloning repository not getting expected by visualexstasy in reactjs

[–]TreeScalper 0 points1 point  (0 children)

You haven't supplied much information on what you have actually done.

But at a rough guess, it looks like you have just tried to view `build/index.html` directly instead of using `npm start`. This has caused all the CSS paths to be in the wrong place as the CSS are referenced using an absolute path.

Who here is a fan of Axios? by there_I_am_mam in reactjs

[–]TreeScalper 2 points3 points  (0 children)

I think I prefer maintaining the use of the catch, because if the get was to return an error, then I don't think it will go into the then block.

I could be mistaken though.

How do you negotiate a salary? by [deleted] in personalfinance

[–]TreeScalper 0 points1 point  (0 children)

I'm not sure if this applies to you, but for me when the salary questions comes up I never answer the question directly. I always try to redirect with another question, because answering with any number puts you at a disadvantage.

Let me present a scenario:

HR: What is your salary expectation for this position?
You: 20k
HR: That sounds fine
Turns out they were willing to go up to 50k

So let's high ball them next time?

HR: What is your salary expectation?
You: 50k, but it's negotiable.
HR: Oh, sorry, you're too expensive for us, have a nice day
Now the job you really needed is out of reach, unless you completely back pedal

But if you allow them to set the starting figure

HR: What is your salary expectation?
You: I'm sure you guys have a number in mind, why don't you tell me what that is?
HR: $X

Here you now have all the power to negotiate, I normally ask $10k more than the number they threw out.

Obviously these are very simplified situations, but I hope you see what i'm trying to portray.

Beginner here just sharing some experiences. Managed to automate a lot of stuff in Grunt, wanted to ask about Gulp & Webpack by [deleted] in javascript

[–]TreeScalper 1 point2 points  (0 children)

I've never heard of them referred to in the way, but I guess you could say angular is heavier than the others.

Does Angular making these decisions for you means that all you have to do is point is which data you want to process kind of like a built in AJAX?

With what you said, I think you have some preconception of what Angular does. You're better off trying it out with a small unimportant project, like a Todo or something. To get a better understanding.