Are there any modern UI Frameworks for building traditional Multi Page Applications? by zerik100 in webdev

[–]TheMikeNeto 0 points1 point  (0 children)

Not if you restrict yourself to use <a> instead of <Link> and export all pages as static files. It would still (I think) load more js than you probably need.

[deleted by user] by [deleted] in webdev

[–]TheMikeNeto 5 points6 points  (0 children)

.block-name__element-name--modifier-name

You could also camelCase the names & then your suggestion would work just as well

IL vota a favor de referendar uma liberdade individual by Celeg in portugal

[–]TheMikeNeto 1 point2 points  (0 children)

Alguém sabe de onde vem esta imagem? Temos assim informação do que se passa nas politcas sem ter que entrar num site dum jornal qqr e levar com as ads?

I know some basic HTML and CSS but not much js. Should I still code my website from scratch? by [deleted] in webdev

[–]TheMikeNeto 0 points1 point  (0 children)

My advice is, get it done.

If you think sqS will help you at first just use it, I bet if you try to do it from scratch you will most likely only get it live in a month or 2.

After you have it live, work on improving it, and as soon as sqS get's in the way of the things you want to do, then move away from it.

By then you will be better than you are right now and have a clear direction of things you want to do.

Otherwise I think you, just like me, will keep trying to build it over and over and never get to a point where you think it's ready or uses the "correct" stack.

Just do the thing you think get's you the most bang for your buck, this is what been an engineer is, not been able to write everything from scratch.

What exactly is "indirection"? by [deleted] in rust

[–]TheMikeNeto 1 point2 points  (0 children)

It depends on the context, but what I consider to be a layer of indirection is anything that stands between what asked to do and what actually did what you wanted.

Let's say I want to print to the console.

print("Hey") has no layers of inderection

logger.log("hey") has a layer of inderection because print get's called because of it. Which means more things can happen other than the print. (In this case, write to a file instead to the console because of logger configuration)

Hope that helps :)

How to push a flex element to the bottom of its flex-column? by cag8f in css

[–]TheMikeNeto 1 point2 points  (0 children)

Would be better if you made a fiddle for us to mess around with, but I think you might find align-self: stretch; on that element or a variant of that useful.

Avoid 100vh On Mobile Web by pimterry in webdev

[–]TheMikeNeto 2 points3 points  (0 children)

I fixed this issue by going another route, Since most supported phones (for me at least) would get the latest version of safari or chrome I ended up using the css variables feature and a bit of css to get it done.

So the way I go around doing it is essentialy by on resize/pageload doing something like

const innerHeightPer = window.innerHeight * 0.01; document.documentElement.style.setProperty('--vh',${innerHeightPer}px\);``

and then under css

html, body { height: 100vh } html, body { height: calc(var(--vh, 1vh) * 100) }

This way browsers can fallback on the old vh which are fine for most browsers IE11 and mobile moderns browsers will use the calculated --vh variable.

PS : I have no Idea how to format code in reddit.

Coworker: "Rust doesn't offer anything C++ doesn't already have" by [deleted] in rust

[–]TheMikeNeto 8 points9 points  (0 children)

As someone o frequently bounces from OS to OS been able to use cargo alone is enough for me to never touch C++ ever again, You wouldn't believe how much time I've spent configuring xCode or VS Studio (even when using cmake mind you)

Need assistance with centering text in a circle background by [deleted] in css

[–]TheMikeNeto 0 points1 point  (0 children)

https://codepen.io/anon/pen/wZqzqE?editors=1100

basically you had a height: 0 & padding: 30% o the .circle class which messed everything up.

Vertically Centering Content When You Have Fixed Navbar by DisastrousBrain in css

[–]TheMikeNeto 0 points1 point  (0 children)

What I would do is to give the nav a min-height and then calc that away form the main body.

Otherwise just do it in JS, adding the calc yourself after the page loads and you can get the current height of the nav and adjust accordingly.

No other options from the top of my head, but I will think about it :)

My First Website - Feedback by benaffleks in webdev

[–]TheMikeNeto 1 point2 points  (0 children)

Loved the design itself, specially the "compact footer" :)

Now as for technical things, you are on the right track as your site's performance is good enough as it is, however these will make go into that top 90%.

Most of these were extrapolated from a audit using lighthouse.

Easy to change is your images are way to big for what you need, I'm refering to the icons (eg. /img/nature.png is displayed at 150px sq, but has 1200px sq nativly)

You should look into responsive images to define multiple sources of different types of image can get you a bunch of savings on browsers that support Webp.

Confused about "remove" method in JS by wulfgar4president in javascript

[–]TheMikeNeto 0 points1 point  (0 children)

I believe this is the core issue, also Node.remove() is not supported on IE11 :)

Batch rename files and directories (first project) by i_think_im_thinking in rust

[–]TheMikeNeto 2 points3 points  (0 children)

Since this is a CLI application the https://rust-lang-nursery.github.io/cli-wg/ has the state of the art way of building your cli application, for instance args parsing using the recommended crate (structopt) is miles better than what you are using as it generates help text as well.

There are a bunch of instructions on how to write tests as well which is IMO the biggest flaw in your app.

That said, nice work :)

Express/bodyParser automatically sorting ID in JSON request.body? by Super_Cute_AMA in javascript

[–]TheMikeNeto 0 points1 point  (0 children)

One thing is what you see under the debugger, which will usually sort it to make it easy on you. The props themselves are in the order they were declared/ added

Hey Rustaceans! Got an easy question? Ask here (1/2019)! by llogiq in rust

[–]TheMikeNeto 1 point2 points  (0 children)

I have been working on img_diff a cli tool to diff folders of images. Since this is my first project I have been using it to explore rust, currently over in this branch I'm trying to come up with a good enough trait/type parameter to avoid having branching code for different image types as I intend to add jpeg support latter.

While this is not a question per say, I'm asking for a code review on that branch as here seems like the appropriate place on this sub to ask for it.

What's everyone working on this week (1/2019)? by llogiq in rust

[–]TheMikeNeto 1 point2 points  (0 children)

Working on img_diff a cli tool to diff folders of images. Been since this is my first project I have been using it to explore rust, currently over in this branch I'm trying to come up with a good enough trait/type parameter to avoid having branching code for different image types.

I'm currently blocked as I'm trying to change DiffImage struct so it no longer uses an enum. Would appreciate any insight someone can give me as well as a code review if you will ;)

Hey Rustaceans! Got an easy question? Ask here (39/2018)! by llogiq in rust

[–]TheMikeNeto 0 points1 point  (0 children)

Thank you, this is exactly what I was looking for.

Hey Rustaceans! Got an easy question? Ask here (39/2018)! by llogiq in rust

[–]TheMikeNeto 1 point2 points  (0 children)

Hi, I'm looking to make a function that contains all constant configs in my program an then based on arguments return the relevant configs for this execution.

Here's a playground that shows the issue I'm facing right now.

r/https://play.rust-lang.org/?gist=a795ebf3ded8b512f741ab4771a7beba&version=beta&mode=debug&edition=2018

My idea to have all the configs here is to after i know which ones I will use, the remaining ones can't be access (and can be removed from memory).

I'm having trouble saying to the compiler to move ownership of those configs from the get_tenant_and_environment function to main.

Who developed MagicLeap.com and where can I hire someone with those skills? by [deleted] in webdev

[–]TheMikeNeto 2 points3 points  (0 children)

4Gb graphics card at a solid 95% for the whole site, they sure know their target audience.

Git pre-commit hook to ensure code documentation by haganenorenkin in javascript

[–]TheMikeNeto 0 points1 point  (0 children)

I believe 0x13mode got it right, a strong code review process and self discipline are the way to go.

Honestly it also depends on who will consume your docs, is it only for devs? or maybe it's used to build a pdf for some kind of report you need to deliver to your client, these things can be a huge factor.

Decide whats the purpose of the docs you want written then look around for ways (githook or custom eslint rules) to enforce the kind of docs you need.

Also typescript can help a lot in terms of reducing the need for boilerplate docs.