• Breaking News

    Thursday, November 8, 2018

    In case you missed it, create-react-app 2.0 is out and supports SASS and a lot of other things web developers

    In case you missed it, create-react-app 2.0 is out and supports SASS and a lot of other things web developers


    In case you missed it, create-react-app 2.0 is out and supports SASS and a lot of other things

    Posted: 08 Nov 2018 01:51 AM PST

    JavaScript may be a bit janky on a lot of sites, but that’s not the whole story..

    Posted: 08 Nov 2018 08:55 AM PST

    https://www.reddit.com/r/technology/comments/9v6uqc/

    I linked a discussion about the rise of cord cutting in lieu of internet video streaming.

    One of the key comments I want to highlight is that one where a commenter describes how instant the web is compared to tv.

    For as much as we rank on performance I wanted to post some perspective on the incredibly high standards that we hold ourselves to. And it's good! Use it as motivation! If you can shave half a second off your load times, do it!

    The JavaScript based web is still very very new (didn't really take off until 2013 when the extensible web manifesto was made and 2015 JavaScript modules were standardized) and we're still learning a lot about what our best practices really are.

    So, y'all are doing great. And keep pushing.

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

    Use AdBlocking in your Dev Environment

    Posted: 08 Nov 2018 02:50 PM PST

    JavaScript Visualizer - A tool for visualizing Execution Context, Hoisting, Closures, and Scopes in JavaScript

    Posted: 08 Nov 2018 05:41 AM PST

    I am afraid my current job is a one way road, again.

    Posted: 08 Nov 2018 02:00 AM PST

    Hi,

    I hope this is the right place, since I mostly do and want develop in JS.
    If not, I am happy about any advice where the right subr for this would be.

    I started a new job. They resell a product called 'ServiceNow', a big system to organize your company, own database and many tools and stuff to customize and develop own solutions and/or workflows.
    You can write server side js as well as client side scripts.
    My job requires to code custom features the company's clients need.

    Now comes the thing:

    I worked in a company with an old product that used a PHP templating framwork ($smarty) and some very old technologies (mix of jquery and js, ofc html/css), far away from anything close to ES6 or any modern standards. Did it 2 years and only progressed and learned (relevant) new stuff that I can use later in my career (ES6 stuff like async/await/promises, how to get rid of jQuery with vanilla JS, Graph QL, some frameworks like Angular5 and Vue, Node JS) in my free time.

    At the new company, I now slowly get to know that the product wont support ES6 in near future, mostly using ES5 vanilla JS.

    I fear I am, again, at a company where I will mostly invest my free time. Also, I have an offer of another company that mostly uses Angular5 and later for their projects.

    Any advice? Should I take my hat and go before I lose more time?
    I don't want to only progress in my career by investing free time and I am afraid to stale in my professional knowledge because I never use the new, modern stuff in a real world project but only in some small private margin.

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

    How do I combine selectors in ngrx to only get username and password?

    Posted: 08 Nov 2018 01:38 PM PST

    In Angular/ngrx I have a settings object in the store with the following defaults:

    export const initialState: SettingsState = { username: '', password: '', port: '', cache: false, theme: 'DEFAULT-THEME', }; 

    I want to trigger a re-fetch of data only if the username and/or password change. My selectors:

    export const selectSettingsState = createFeatureSelector<State, SettingsState>('settings'); export const selectSettings = createSelector(selectSettingsState, (state: SettingsState) => state); export const selectSettingsUsername = createSelector(selectSettings, state => state.username); export const selectSettingsPassword = createSelector(selectSettings, state => state.password); 

    then In my component:

    this.settings$ = this.store.pipe(concat(select(selectSettingsUsername), select(selectSettingsPassword)) .subscribe((username, password) => { if(username && password) this.store.dispatch(new ActionProfileRetrieve()); }); 

    The concat doesn't work but I'm not sure how to g et this to work where ActionProfileRetrieve is only called if username or password change not the other parts of the settings object.

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

    Curious how Typescript inheritance works behind the curtain? Take a look at Typescript inheritance deep dive ��

    Posted: 08 Nov 2018 03:55 AM PST

    Quick question about card-deck in bootstrap

    Posted: 08 Nov 2018 04:02 PM PST

    Is is possible to set a fixed width for my card? thanks in advance for the answer! :D

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

    Measuring site speed (for real user visits)

    Posted: 08 Nov 2018 03:50 PM PST

    Guys hi,

    I wander what's the best way to measure site speed for real user visits? (not talking about test tools like gtmetrix, etc)

    I need to record the value in milliseconds that takes to load the page (i guess from time of request to dom or document ready)

    Than i will pass it to GTM/GA.

    Passing value is not problem, just wonder what is the best way to measure the value itself.

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

    What's the most promising stack for direct compilation into web assembly?

    Posted: 08 Nov 2018 03:42 PM PST

    Blazar, maybe? Any opinions?

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

    Jinja2 HTML code formatter in Visual Studio Code

    Posted: 08 Nov 2018 03:38 PM PST

    I work with Visual Studio Code for almost all my projects, and am starting a Flask app. As of now, If I have HTML selected as the file type, when I format my code, it unindents all the Jinja code, but correctly indents the HTML. If I have it the other way around, it correctly indents all the Jinja, but unindents all the HTML. I haven't seen any extensions out there for this, and was just wondering if anyone knew of a solution?

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

    Changing a variable font's grade depending on ambient light

    Posted: 08 Nov 2018 03:31 PM PST

    Hey guys,

    I'm doing a project on Variable Fonts and their benefits and am looking to use some practical examples.

    During my research I found a video of someone putting their hand over the ambient light sensor on their laptop which then adjusted the grade of a variable font for legibility reasons. You can see the video here - http://tom.lokhorst.eu/type/video

    The person in the video stated in a tweet "this is a quick hack using a native macOS app to observe the display brightness". This was something I wanted to recreate without the app but by using javascript to access the ambient light sensor if the user's device had it.

    I thought this would be a relatively simple thing to recreate however I've spent all day trying but haven't been able to figure it out which is why I'm here asking for your guys' help!!

    If the app is something that is necessary does anyone know which app he is using?

    Many thanks,

    Adam

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

    Generating custom photo-realistic faces using AI

    Posted: 08 Nov 2018 06:02 AM PST

    Is there a "best practice" way to choose parts of a tech stack?

    Posted: 08 Nov 2018 10:28 AM PST

    I'm trying to level up my skills by learning how to create my own CMS.

    That being said, the sheer amount of choices I have to make from the outset are overwhelming to say the least.

    I've been obsessively looking at stackshare.io and playing around with the most-used tools of each category, cuz I figure, hey, if I run into issues, the most-used tools will likely have the most documentation and support online. But is this because these are truly the "best" tool or because they're the easiest to get up and running (WordPress comes to mind...)

    But of course even then I run into issues. Some tools (such as JS libraries) are obviously better suited to different tasks, but then I fall down the rabbit hole of comparing and contrasting dozens of choices for each aspect of my ideal application.

    I guess what I'm asking is, how to choose? The sheer volume of choices I need to make seems overwhelming, between what library/framework to use for the front-end, how to handle the backend, what kind of database I want to set up, etc. Do I just need more experience to make confident decisions, or are there any accepted "flowchart" methods for choosing tools for a stack?

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

    Headless CMS with Galleries Support?

    Posted: 08 Nov 2018 02:02 PM PST

    Hey, all. I'm looking for a CMS solution that can support multiple image galleries for a projects page. I've already built the front end, so I'm looking for a backend that exposes an API to grab the images off a server that my company manages.

    For cost reasons, I'm trying to avoid SaaS solutions. I'm doing most of this solo and semi-involuntarily, so I don't have a lot of places to go looking, and Googling the issue has been overwhelming.

    This client has her heart set on a drag-and-drop gallery creation solution for all of her projects, but I'm running dry on finding something that meets every need she has.

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

    git fetch not fetching remote branches

    Posted: 08 Nov 2018 01:29 PM PST

    What would be a reason for git fetch got fetching remote branches?

    https://stackoverflow.com/questions/1783405/how-do-i-check-out-a-remote-git-branch

    All I do is run git fetch - I then see

    C:\site\blog>git fetch *master

    I expect to see something like:

    C:\site\blog>git fetch *master origin/branch1 origin/branch2

    https://stackoverflow.com/questions/11623862/git-fetch-doesnt-fetch-all-branches

    I run the command in the accepted answer

    git config --get remote.origin.fetch

    The output of the command is

    +refs/heads/*:refs/remotes/origin/*

    From what I understand this indicates that I'm not only tracking master but all remotes.

    What's wrong? How do I fix this? What would be a reason you can't git fetch?

    running git fetch -a doesn't do anything either.

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

    Where do you guys host personal projects?

    Posted: 08 Nov 2018 01:29 PM PST

    I'm pretty new to developing but I was wondering where you guys host most of your projects. I was looking at Heroku, but it's really expensive and the free version sucks. Do you guys usually host multiple projects on one server?

    Thanks

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

    PHP hashing functions do not work for me

    Posted: 08 Nov 2018 01:28 PM PST

    I was going through my old CMS I wrote and I began updating all of the code to the newer security options in the latest PHP versions. I can't seem to get the password_hash(); and password_verify(); functions to work. I was just using the md5(); function before and it worked well but it doesn't salt anything.

    I rounded down what it's doing. This is what I am doing:

    On the register script I take the password inputted and then I strip all the injection characters then I take the clear password and I make a variable $var = password_hash($posted_password, bcrypt); and then I take that salted hash and put it into the database. Then in the Login script I take the inputted password again and I hash it using the same function and then I take that hash and do a database table select query and compare the stored hash to the user inputted hash from the login form. Well guess what? the login form is generating a different salted hash even though it's the exact same clear password. Why is it doing this? The PHP manual clearly states it is not supposed to do it like this. I'm running PHP version 5 something in a developer wamp server.

    Here's some of the code for comparing the hashes:

    /*

    ===========================

    +

    +

    + Logging In Page

    +

    +

    ===========================

    */

    if ($_GET["Page"] == "Login") {

    /*

    ===========================

    +

    + Post Variables

    +

    ===========================

    */

    /*

    ===========================

    + Username Post Variables

    ===========================

    */

    `$_POST_USERNAME_CLEAR = $_POST['post_username_login'];` `$_POST_USERNAME_CLEAR = preg_replace("/'/","\`", $_POST_USERNAME_CLEAR);` `$_POST_USERNAME_CLEAR = stripslashes($_POST_USERNAME_CLEAR);` 

    /*

    ===========================

    + Password Post Variables

    ===========================

    */

    `$_POST_PASSWORD_CLEAR = $_POST['post_password_login'];` `$_POST_PASSWORD_CLEAR = preg_replace("/'/","\`", $_POST_PASSWORD_CLEAR);` `$_POST_PASSWORD_CLEAR = stripslashes($_POST_PASSWORD_CLEAR);` `$_POST_PASSWORD_HASHED = password_hash($_POST_PASSWORD_CLEAR, PASSWORD_BCRYPT);` `$_POST_PASSWORD_VERIFY = password_verify($_POST_PASSWORD_HASHED, );` 

    /*

    ===========================

    +

    + Post Data VS. Stored Data

    +

    ===========================

    */

    `$_MAIN_LOGIN = $DB->query("SELECT * FROM {$_ACCESS_DATABASE_PREFIX}_members WHERE member_name='$_POST_USERNAME_CLEAR' AND member_password='$_POST_PASSWORD_HASHED'");` 

    if ($DB->num_rows($_MAIN_LOGIN) >= "1") {

    `setcookie("cerberus_user","$_POST_USERNAME_CLEAR", time()+$_GLOBAL_COOKIE_TIME);` `setcookie("cerberus_pass","$_POST_PASSWORD_HASHED", time()+$_GLOBAL_COOKIE_TIME);` `header("location: ?app=cPanel");` 

    } else {

    `header("location: ?app=Login&Message=No_User");` 

    } // [ + ] NUM_ROWS

    /*

    ===========================

    +

    + Kill Database Connection

    +

    ===========================

    */

    $DB->free($_MAIN_LOGIN);

    } // [ + ] LOGGING IN PAGE

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

    Jquery Timeouts and messages

    Posted: 08 Nov 2018 01:10 PM PST

    Hi there,

    I am trying in Jquery to have messages appear and disappear via a set timer.

    'use strict'
    $(function() {
    let testOne = 'test one.';
    let testTwo = 'test two';
    let messageBox = $('messagebox');
    let a = ['test:', testOne,'test2:', testTwo];

    setInterval(cool, 1000)
    function cool() {
    messageBox.text(a)

    }});
    What am I missing?

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

    The roadmap of a self-taught developer

    Posted: 08 Nov 2018 12:37 PM PST

    Hello I am a 24 year old college student drop out. A few year's back I struggled with a few mental health issues that prevented me from staying in school. Now I live with my parents and I do transportation work for some money here and there not really enough.(dying to move out)On my free time I have been self teaching my self everything I can about web development. I am about 3 years in, I have a couple of projects I can post on my portfolio which is linked to a wordpress website and GitHub. I am solid with html & css, my JavaScript needs a bit more improvement and I plan to eventually move to more back end stuff as I progress. My question is what's the best thing I can do to at least get a job as front-end developer? Apply to internships first ? Do some more freelance work ? Or are they jobs out there that might accept me with my current knowledge/skills?

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

    Any beginner friendly meetups or study groups in NYC?

    Posted: 07 Nov 2018 09:44 PM PST

    Hi!

    I just started programming about a week ago (complete beginner). I started with CS50, but I realized I'm more interested in web development so I'm taking a udemy course+freecodecamp and loving every second of it!

    With that said; my next step in the course is bootstrap and I really don't feel comfortable w/ my css knowledge at all. So I've been practicing and I was wondering if there were any meetups in NYC for people in the same position as I am? I really would love to turn this into a career and work/study a lot better with a group/partners.

    Edit: And also; if there are any beginners here in nyc, hit me up and let's get together!

    Edit 2: Sadly I can't afford any bootcamps. 24y, barely making a living and trying my best. I cut my hours at work, so I can focus more on studying.

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

    The database for my Wordpress site omits foreign characters on uploads. Can this be fixed?

    Posted: 08 Nov 2018 12:17 PM PST

    The posts for my Wordpress site are stored in a database table.

    If I'm bulk uploading posts--via PHPMYADMIN from a CSV doc in UTF-8 format--foreign characters and everything that follows will be eliminated.

    For example, if I upload a post with this title:

    Pardon the Interrupción

    It will appear on the site with this title:

    Pardon the Interrupci

    If I edit the title n the Wordpress editor, I can save the original title without issue. To that end, the database table can store this information--it just isn't surviving the upload process.

    Is there a way to get these foreign characters to upload intact?

    Thanks!

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

    Git rebase question with two remote repos

    Posted: 08 Nov 2018 12:06 PM PST

    I am in charge of some code that we use for an application. When I run the command git remote -v, I see two sets of remotes, one for "origin" which is ours and one for the opensource community where our code originates.

    The open-source community has some upgrades I would like to apply to our codebase. Basically, I want to upgrade our code which is based on version 3.1 to their version 3.5. They have branch for each stable version. Our codebase has some customizations I want to preserve. I think I need to use git rebase to accomplish mapping our customizations onto a different branch of their code, is that correct?

    I get a bit confused reading documentation on this, so any help on how that would look as far as a git command? Would I do something like check out the master branch of our repo, then run the command git rebase THEIR_REMOTE/THEIR_3.5_BRANCH ?

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

    No comments:

    Post a Comment