• Breaking News

    Tuesday, June 26, 2018

    Rotten Tomatoes uses a development build of React. Is this a mistake on their part or is there any reason you'd want to do this on a large scale? web developers

    Rotten Tomatoes uses a development build of React. Is this a mistake on their part or is there any reason you'd want to do this on a large scale? web developers


    Rotten Tomatoes uses a development build of React. Is this a mistake on their part or is there any reason you'd want to do this on a large scale?

    Posted: 26 Jun 2018 09:51 AM PDT

    I was browsing their website when I noticed my React Chrome plugin told me that there was a dev build of React it was using. Could this likely be someone that just forgot to use the built version of their codebase? I can't think of a reason you would want to do this.

    submitted by /u/hopelesso
    [link] [comments]

    Advanced Javascript for Beginners: Part 2

    Posted: 26 Jun 2018 06:20 AM PDT

    Welcome to Advanced Javascript for Beginner: Part 2. In this part, you will learn about template strings, default arguments, and async-await function.

    Template strings

    Sometimes we need to add variables to strings. This is the traditional way of doing that:

    const name = "Simon"; const age = 25; const city = "Minneapolis"; const pet = "dog"; const greeting = "Hi, my name is " + name + ". I live in " + city + ". I am " + age + " years old, and I have a "+ pet + "."; 

    That is very annoying, particularly when you have to add many variables to a string. There is easier, more advanced way of doing that. You do not use single or double quotes. You need to use back-ticks (`` ) .Inside template strings, you can use single or double quotes freely. But what is even cooler, is that adding variables is much simpler.

    const name = "Simon"; const age = 25; const city = "Minneapolis"; const pet = "dog"; const greeting = `Hi, my name is ${name}. I live in ${city}. I am ${age} years old, and I have a ${pet}.`; 

    Same outcome, but much cleaner code. If you want to, you can do simple expressions inside template strings, like subtraction or multiplication.

    const year = 2018; const age = 40; console.log(`I was born in ${year-age}`); 

    Default arguments

    In Javascript, you can define default arguments for functions.

    function greeting(name="",age=35,pet="dog"){ const greeting = `Hi, my name is ${name}. I am ${age} years old, and I have a ${pet}.`; console.log(greeting) } greeting(); 

    The function will work, even if we do not enter any arguments once we call it.

    Async Await

    Promises are a really powerful feature in Javascript. If you do not know what promises are, check out this article: Master the JavaScript Interview: What is a Promise?Usually, promises look like this:

    const promise = new Promise((resolve,reject)=>{ if(true){ resolve("It worked"); }else{ reject("Something went wrong"); } }); promise.then(result=>result+"!").then(result2=>console.log(result2)); 

    Async await is a new feature in Javascript. It is built on top of the promises. Like template strings, async await helps to make our code cleaner.

    const promise = new Promise((resolve,reject)=>{ if(true){ resolve("It worked"); }else{ reject("Something went wrong"); } }); async function p(){ const result = await promise+"!";//Wait for the response console.log(result); } p(); 

    Async function is declared with keyword "async". We use the keyword "await" to pause the function and wait for the response.The functionality is same. The only difference is that instead of promise chain, we have an async function. Now I will show you better, more real-life example.We are going to fetch some user data from JSONPlaceholder.

    Fetching with promise chain

    fetch('https://jsonplaceholder.typicode.com /users').then(response=>response.json()).then(users=>console.log(users)); 

    Fetching with async await

    async function fetchUsers(){ const response = await fetch('https://jsonplaceholder.typicode.com/users'); const users = await response.json(); console.log(users); } fetchUsers(); 

    Catching errors with async await

    In real life applications, we need error handling. It is done with try/catch statement when using async await. Here is the previous example with error handling:

    async function fetchUsers(){ try{ const response = await fetch('https://jsonplaceholder.typicode.co/users'); const users = await response.json(); console.log(users); } catch(err){ console.log("Error: " + err); } } fetchUsers(); 

    Notice that I intentionally misspelled the URL to test our error handling.The syntax is very simple:

    1. Add your main code inside "try" block.
    2. Add your error handling inside "catch" block.
    3. Do not forget "err" argument in the catch block. It will give you access to the error string.

    I hope you learned something. It is a lot of advanced javascript for one time. It took me some time to learn all this myself.Next part will come out soon. Please, share this tutorial if you found it helpful. If you have any questions, leave a comment.

    submitted by /u/simeonplatonov
    [link] [comments]

    xpost: Vultr firewall leaked my instance online; do not trust vultr's firewall service

    Posted: 26 Jun 2018 08:07 AM PDT

    Over the weekend I received dozens of emails from our build server that its been blocking ssh attempts left and right. Thankfully I set the instance in a secure matter and configured SSH properly, but After reviewing logs and referencing the external IPs, it was determined vultr's firewall was not performing as intended, IE: DROP all incoming traffic except for certain addresses. I contacted vultr and received a very boilerplate response that it is not their responsibility to maintain my instance, even when including auth and denyhosts logs. They claim the issue has been resolved but still have fingerprinting going on.

    This is a warning, do not trust vultr's firewall settings, as they do not seem to stick.

    submitted by /u/drunkcatsdgaf
    [link] [comments]

    Higher Order Functions, Components and Single Page Analytics

    Posted: 26 Jun 2018 02:54 PM PDT

    My first Progressive Web App, an educational game using React and TypeScript. My kids loved it, I hope you do too! ��

    Posted: 26 Jun 2018 12:57 PM PDT

    How much did you know, when you first got hired?

    Posted: 26 Jun 2018 06:15 AM PDT

    Everyone has heard stories about people who got a front end job by just learning html and css, but I'm guessing that isn't the norm, lol. So I'm curious how much did you actually know how to do when you got hired?

    submitted by /u/dntpnc42
    [link] [comments]

    Is it possible to add multiline functionality to the find and replace package in Atom?

    Posted: 26 Jun 2018 12:46 PM PDT

    I'm trying to investigate and test this out. I know BBEdit or Oxygen has this feature, but I need to add it to my workflow in Atom for my day job. Anyone know if this has been done or is even achievable?

    Thank you!

    submitted by /u/stkulp
    [link] [comments]

    Drawing Images with CSS Gradients - CSS-Tricks

    Posted: 26 Jun 2018 09:57 AM PDT

    Anyone know what type of angular table this is? Attempting to make something exactly the same

    Posted: 26 Jun 2018 02:48 PM PDT

    Mimicking the Bloomberg menu widget without JavaScript

    Posted: 26 Jun 2018 09:41 AM PDT

    back-end web developing learning path

    Posted: 26 Jun 2018 10:16 AM PDT

    Hi I wanna learn back-end web developing, If you are a back-end developer what did you learn and what would you recommend?

    what I already know:

    -basic HTML and CSS

    -mediocre at js, jquery, PHP and MYSQL

    submitted by /u/the-duude
    [link] [comments]

    Why is this query not returning what is supposed to return?

    Posted: 26 Jun 2018 08:51 AM PDT

    Hello,

    So i have this sql query: SELECT * from dadoscontactos WHERE idCategoria='73' AND 'localidade' like 'a%';

    And i have a row in database that matches this query but when i try to use it nothing is returned unless i put another % before the a

    Thanks!

    submitted by /u/Lazkeer
    [link] [comments]

    Typescript vs my current linter

    Posted: 26 Jun 2018 03:40 PM PDT

    I asked about strong typing/Typescript in a learn programming sub and someone mentioned their linter helps them keep track of types just fine. I also noticed this, it's quite clear when I'm writing a string because half the editor turns green until I close the string for example.

    Surely static typing goes beyond this in terms of power/utility because I see such rave reviews about it so I wanted to ask you guys: why Typescript over regular IDE linting?

    submitted by /u/seands
    [link] [comments]

    Rule of thumb for browser/device compatibility?

    Posted: 26 Jun 2018 03:31 PM PDT

    I was just wondering what the public consensus is for this. Apart from the popular devices, is it worth developing for old browsers from 2013 to small screens such as the iPhone 5 and tiny laptops?

    submitted by /u/impressiveTrees
    [link] [comments]

    Reusing HttpClient didn’t solve all my problems

    Posted: 26 Jun 2018 02:35 PM PDT

    Building a RSS Viewer With Vue: Part 1

    Posted: 26 Jun 2018 02:29 PM PDT

    What's the proper way to set up a LAMP stack?

    Posted: 26 Jun 2018 08:08 AM PDT

    I have experience playing around in XAMPP, and I've heard that it shouldn't be used as a production server. I'm wanting to get a proper production quality LAMP stack set up, and I'm hoping /r/webdev can provide some guidance, please.

    Should I look into installing a preconfigured package that wouldn't basically be a production ready XAMPP alternative, or should I install and configure each of the components separately? I'm leaning towards the latter at this point.

    I have a virtualization server available, and I'm wondering if I should put everything on one virtual machine, or split things across several. I've heard that in professional setups you'll have the web server on one machine, the database server on another machine, and storage on a third. How would I configure Apache and MariaDB to run on one machine while reading/writing data (PHP and database files) from another? How would an FTP server get thrown into the mix?

    I primarily like playing in Debian, and intended to use it for this project. Any reason I should consider an alternate distro for this?

    Everything's going to be behind a pfSense firewall, and I believe that I'll just need to expose the web server to the Internet. Are there any other pfSense considerations that I need to take into account?

    What about security? I can handle installing Debian, Apache, MariaDB and PHP. What about configurations and security considerations?

    submitted by /u/RedMushtoom
    [link] [comments]

    The role of Babel now?

    Posted: 26 Jun 2018 02:04 PM PDT

    I'm just getting into web dev and from my understanding, Babel was popular for transpiling ES6 to ES5 when ES6 wasn't widely supported. So is there any reason for it, now that most browsers support ES6?

    submitted by /u/OddTuning
    [link] [comments]

    Career Advice

    Posted: 26 Jun 2018 01:53 PM PDT

    I've been an amateur developer for a long time, working on personal projects and utilities but I'd like to move to a more professional career in web development. I'm fairly proficient in PHP and Laravel with great knowledge in CSS and HTML. I've been poking around with learning Vue for better reactive UX/UI lately. My question is, what sort of focus should I have for getting a development job? What skills do I need to have a handle on to get an entry level job for experience? I've never done much with testing or server setup, so I know I've got weaknesses there. What's a good place to start to learn what's needed for an entry level position? Thank you!

    submitted by /u/OdinForPresident
    [link] [comments]

    Registrar responsibility - domain suspended at NameCheap

    Posted: 26 Jun 2018 05:08 AM PDT

    I have a one domain in account at NameCheap that is currently suspended. On June 3, I renewed the domain for another year. The domain is for a volunteer fire company here in the US (and we use it quite actively).

    Shortly after renewing I received the email regarding ICANN's requirement to verify contact info. No problem, I clicked on the link and confirmed things are correct. As part of that email it said that I had until June 25 to verify otherwise the domain would be suspended.

    On June 21 (note, 4 days before June 25) a friend emailed and said the website wasn't working. Plastered across it was a big notice saying the site was suspended due to "email address not being verified" etc. Crap. I went on NameCheap's online help and talked with someone there he resent the verification email to me, but I never received it. Weird. He finally suggested I change my admin contact email to my Gmail address. Ok. I did that, received the verification email and then I saw the screen that the contact info was accepted and I have a screenshot showing everything was good and the site would be un-suspended in 24-48 hours. That is a long wait, but ok, glad the issue would be done.

    So on June 23 I checked it again and it was still not working. I talked with Online Chat and they said I had to submit a ticket with the "Risk Management Team". That didn't sound good. So, I did, put all this information in there and heard nothing.

    I tried talking with someone on the NameCheap online support again on June 24 and they said they could not talk to me about anything.

    So, now it is June 26, I have heard nothing from NameCheap, nothing. The online support won't talk to me and I am waiting on this ticket.

    What I think might have happened to cause this is I accessed namecheap.com over a VPN (PIA VPN). I found one other note of this in r/NameCheap that someone seemed to have exactly the same issue as I did.

    The things I have learned here: Don't access namecheap.com over a VPN. Domain names should be held tenuously (which is scary for an online presence).

    Is there **any** recourse? Can I be required to wait until they decide to contact me?

    [unfortunately I am going on vacation out of country tomorrow, so that is going to make this even more difficult].

    submitted by /u/brechmos
    [link] [comments]

    If you’re a UI/UX designer...

    Posted: 25 Jun 2018 11:14 PM PDT

    I envy you for your work, you are the hero we all need but don't deserve... just how do you guys do this shit without wanting to kill yourself 10 minuets after? Like I'd rather re write the Linux kernel than do any front end work, especially work that involves CSS (which it does 99% of the time)...

    Doing backend stuff is much better and overall easier for me. like if I wasn't trying to build up a portfolio, I'd never ever do any frontend work.

    submitted by /u/CoolByDesign
    [link] [comments]

    The Vue Handbook - a free ebook

    Posted: 26 Jun 2018 09:16 AM PDT

    Question: Getting Started With Clients.

    Posted: 26 Jun 2018 08:52 AM PDT

    Greetings, a question for you all prefaced with some background:

    I am a beginner web developer/designer and I am currently working on some sites for my first clients. Question is: what is the easiest and most convenient way to get a client set up with a domain and host since they themselves need to purchase it, and what do you do in order to get information to fill their website (ie. template, structure, photos, blurbs, descriptions, etc.)

    I realized it is very easy to create the site but I don't totally know what structure they desire, then how to easily get the information to fill their website without making them do a ton of work. If my question doesn't make sense, I have no problem clarifying. Thanks!

    submitted by /u/NeverBe4Seen
    [link] [comments]

    No comments:

    Post a Comment