• Breaking News

    Wednesday, June 24, 2020

    GitHub's Dark Mode is coming web developers

    GitHub's Dark Mode is coming web developers


    GitHub's Dark Mode is coming

    Posted: 24 Jun 2020 01:04 AM PDT

    The function you need but don't know(yet)

    Posted: 24 Jun 2020 10:59 AM PDT

    console.time('areWeThereYet'), console.timeLog('areWeThereYet') and console.timeEnd('areWeThereYet')

    Just in case you didn't know.
    If your functions or processes are taking too much time, use these to check how long they take.

    Put time at the beginning, timeLog wherever you want after that, timeEnd at the...end.

    It prints how long it took to reach that point from the start(time).

    I had no clue it was this easy!

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

    Elevator.js

    Posted: 24 Jun 2020 01:47 AM PDT

    CSS folded poster effect

    Posted: 24 Jun 2020 04:30 AM PDT

    Ward: Minimalistic server dashboard

    Posted: 24 Jun 2020 02:53 PM PDT

    How can I keep the top of two adjacent divs in line when the screen size is changed, instead of their bottom?

    Posted: 24 Jun 2020 02:37 PM PDT

    Hey, I have two adjacent divs each with width of a certain % (originally 45 but I use 40 for the jsfiddle) and with padding between them. They contain one header and then <p> text underneath. When I change the screen size, because the width of these divs changes, at various screen-widths the number of lines the text inside each div makes up changes, obviously the wider the space the fewer lines it needs.

    As I change the width of the page, when one div takes up more lines than the other, the one with fewer lines moves down the number of lines they differ in, causing the bottoms of the divs to constantly be in-line, while the top parts are not inline. How can I reverse this so that when one of the two divs needs to take up more vertical space, it merely adds that to the bottom, keeping their top part (including header) fixed?

    This fiddle demonstrates it at least to the extent needed: https://jsfiddle.net/evn8rxfc/

    Help would be very much appreciated.

    EDIT: Ok made jsfiddle now demonstrate the problem.

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

    Old-school Php/CodeIgniter/jQuery guy looking to go newschool without going full Angular

    Posted: 24 Jun 2020 02:19 PM PDT

    A few months ago I took over an application written in Node/Angular/Nest even though I have never worked with Angular or TypeScript and it has been a nightmare. The function of this single-page-application is to serve as a rapid development test-bed to fill in gaps in our core product. I inherited it half finished with no documentation or prior experience with Node, TypeScript, Angular, Nest, GraphQL, or any of the dozens of node modules they rely on. I am the sole person on this project and own it from ideation and design to development, deployment, and support.

    I have done Udemy courses on Node and TypeScript and have been preparing to do one on Angular and Nest, but that this point I run into so many bugs that I have spent more time trying to understand the application than I would have simply rewriting it. Probably by an order of magnitude.

    Today I let my boss know that I'm done with this and I'm going to rewrite the application from scratch using what I know, and I what I know is php and javascript (front end JS, I've never worked with Node before this).

    All the application does is:

    • Login is handled via SSO using cookies/JWT. All I really do is make an API call to get a JSON object and that object returns who the user is and what projects they have access to.
    • A list of reports is shown and you can edit/create/delete reports based on the projects you have access to. Reports are stored in MariaDB with some meta data like who owns them as well as a JSON object that defines the report parameters.
    • Reports are then saved back to the DB and/or the JSON is sent to an Amazon SQS queue to be processed by a Spark process I don't manage.
    • Once the reports have been processed and are saved back to MariaDb they are able to be viewed in a simple table.

    That's it. Super simple single page application.

    I am currently trying to determine if using CodeIgniter is the right move or if I should try to use something written in Node/TypeScript. I like what I've learned of Node and TypeScript so far, but the application as I inherited it is over-engineered and acts more as an academic exercise than a practical testbed for rapid iteration and deployment. It's just me, not an entire team. So spending the time writing custom types and interfaces is just a waste of time. What I need is really just an easy-to-understand framework with a task runner that at the very least handles routing and includes an ORM.

    Ideally what I'd like is CodeIgniter written in Node/TypeScript, but that seems like a very specific and niche request.

    My main goal here is to be effective and able to rapidly iterate. Secondary to that though, I'd like to take advantage of a more modern language or framework without having to relearn everything I know. I get that Angular is awesome, but it's too much for me to learn while also being effective.

    What I'm asking is: If any of you have wisdom to share, please do.

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

    Dreaming too big?

    Posted: 24 Jun 2020 01:35 PM PDT

    Hello, i am a junior front end developer looking to become a full stack. I am learning everything that could help me, from video editing, photoshop, how freelancing works, and this kind of stuff beside programming.

    The thing is that I might be dreaming too much.. I'm thinking to move in UK / US to live the dream. Now.. what am i supposed to expect? The type of life with the latest phone, a nice 20-30k $ car, money to spend on stuff. Or the "somehow average" life but affording to eat at a restaurant a few more times a month?

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

    Tips on Creating Websites from Scratch

    Posted: 24 Jun 2020 01:18 PM PDT

    Hello. I want to learn how to create a website from scratch but I'm really confused where to start. I already know HTML and CSS and a little bit of Javascript. Here are my questions:

    1. I would really love to learn React and use it in my website. I've done a few tutorials in youtube but I'm kinda confused how will I apply it. Like can I first code my sites in html/css then apply React after? Any resources that could help me with this?

    2. I want my site to have a login and order management. I already know databases and I'd like to kinda do it on my own. Are there like database templates for online shopping and account management?

    3. Hosting. Once I'm finished, how will I get a website with my own domain. I've read about AWS but still confused how to implement it.

    Thank you in advance!

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

    What technology is this?

    Posted: 24 Jun 2020 01:17 PM PDT

    It is a walkthrough of a house. Click on the video:
    https://www.modularhomes.com/floor-plan-detail/111208-3600/new-england-manufactured-homes/kingston/american-select/1585q/

    Does anyone know what kind of technology is this? How would you build this? Also what kind of camera would you use or how would you take the photos?

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

    ajax form, how to create division line and bold text?

    Posted: 24 Jun 2020 04:45 PM PDT

    Hi,

    I'm nearly done coding my ajax form which work, but I need to improve the visual a bit.

    Currently I have this

    $email_content = "Name : $name \r\n"; $email_content .= "Last name : $last \r\n"; $email_content .= "Email : $email \r\n"; $email_content .= "Subjet : $subjet \r\n"; $email_content .= "Message :\r\n$message \r\n"; 

    And it shows as :

    Name : John

    Last name : Doe

    Email : email@email.com

    Subject : This is a test

    Message :

    This is my message

    However, I would like something like :

    This is my message

    __________________________

    This message was sent from contact form

    Name : John

    Last name : Doe

    Email : email@email.com

    Subject : This is a test

    I would like to know how to make the separator. Is it as simple as adding an <hr> tag somewhere?

    Also, how to make bold and italic inside the email? I tried adding <strong>, but it's not working and it shows it as a text instead of a HTML code.

    Thank you

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

    How to add real-time shipping to an existing e-commerce site?

    Posted: 24 Jun 2020 12:21 PM PDT

    The company that I work for has a website that sells hundreds of products online, however they have never shown shipping costs in the shopping cart. Shipping has always been calculated after the fact (when the package is created, measured and weighed) and THEN the customer is charged the full amount. This inability to be transparent with shipping has lead to a lot of shopping cart abandonment, and a loss of sales.

    Are we limited by what we can do because we are using a platform that our web developers have created? They don't currently have a way to show real-time shipping costs to the customers that's based on size, weight and location.

    In the platform there are "shipping options" which allow me to create and assign products based on weight ranges that I can determine. The resultant added price is the same cost to ship to London as it is to NYC, and that just doesn't make sense. Sure it might help us offset the shipping costs a little but we'll be making money off of some, and losing money off the rest. We want to offer to our customers the lowest possible shipping prices without it affecting profit margins and our thought is that real-time shipping would be able to do that.

    Given all of that, how do we properly implement and show real-time shipping to our customers in their shopping carts? Any help or advice is appreciated.

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

    JS question.

    Posted: 24 Jun 2020 04:05 PM PDT

    I have form where I ask for first name, last name, etc. But I want to do this multiple times. In other forms on the same page.

    So I have a function.

    And a series of var

    Var lname = document.getElementById("lname").value;

    ...and other vars

    Then

    Document.getElementById ("xyz"). InnerHtml = ...

    This is all home to one form.

    But instead of writing out multiple functions and duplicate functions, I'd like to see how I can reuse a var I've already written.

    I'm not sure if I do this with an array or another getElementBy....

    The only work around I can think of is multiple pages with multiple Js files...

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

    What is the most convenient and simple way to convert my python scripts in to an API?

    Posted: 24 Jun 2020 12:15 PM PDT

    I used to know Django and Django REST. But I am hyper focused on Vue and JAMstack rn. I was all over the place when it came to learning web dev. But this time I want to take one step at a time.

    The problem is that the "fun" of creating a web something is very limiting unless there is some backend system (atleast for me).

    I am a python developer and my ideas translate well in python. I am trying to be better at JavaScript but again I want to take one step at a time while keeping things fun.

    I fear that trying to learn nodejs or relearning django at this point might make me stuck in tutorials. I haven't properly mastered vuex stores and I am looking to create interesting projects that take advantage of my python skills. That way, my syntactical and documentation knowledge of Vue would translate into actual skill.

    For the time being I was using typicode's Json Server and with a time delay in the python script that assessed the changes in the Json file.

    What could be a more elegant solution for an API creation with a watchers function that can interact with python scripts that I can learn within at best 2 hours and can be hosted heroku or my raspberry pi?

    I am sorry if this is a very naive question.

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

    .htaccess, redirects, & exceptions

    Posted: 24 Jun 2020 12:13 PM PDT

    Hey guys,

    I'm trying to set up a redirect for a domain in my .htaccess file, where all of the pages of the old domain get redirected to a single page on the new domain.

    Additionally, I want to exclude a few pages on the old domain from this redirect.

    So far, I've been able to get the many-to-one redirect to work, but the exceptions I have not figured out yet.

    Here's my code:

    RewriteEngine On RewriteCond %{REQUEST_URI} !=/sample-page RewriteRule ^(.*)$ http://newdomain.com/landing-page/ [R=301,L] 

    Any help with getting the exceptions to work would be would be appreciated.

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

    Freelance devs I am startunt a Web Dev business this year what is the number one thing to help get your first few clients ?

    Posted: 24 Jun 2020 03:44 PM PDT

    I'm going to be building websites and web apps in the Florida area and then expand to different cities and maybe some national and international jobs eventually with branding.

    I would like to know what you guys did to get your first few clients, excite them and make them feel secure and also be very competitive.

    Any opinions and banter is usually valuable when starting a business so thanks !

    View Poll

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

    How isolated should tenants be in a SaaS application?

    Posted: 24 Jun 2020 03:03 PM PDT

    I've been getting more involved with designing SaaS applications lately. It's my first time building SaaS, so I'm quite confused by a lot of concepts. One is multi tenancy. There seem to be lots of approaches: shared everything, isolated schemas, isolated databases ...

    I'm attempting to build an HR product that holds employee data that is quite sensitive: Name, contact info, job title etc.

    I'm not sure how isolated the data needs to be in order to potentially work with bigger organizations in the future. I also can't seem to find best practices online. All I find are explanations for the various approaches but no recommendations as to which isolation type to choose.

    Maybe some of you can help?

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

    Help with Web Dev Project

    Posted: 24 Jun 2020 03:03 PM PDT

    Hi! I am a student, going into information systems. Last semester, we dived a little bit into node.js for backend web development. I've been wanting to build a personal website to show off my web dev skills on my resume for a while now, and during quarantine, I decided to do it with node.js, so I can dynamically serve content. My university offers free domains and hosting to students, which I had previously set up for a static website I built. However, I quickly realized during my project that their system doesn't support node.js, and they recommend using AWS with an AWS Educate account to set up websites that require node.js or similar systems. I set up an AWS Educate account and have since been very overwhelmed with all the possibilities and complexity of AWS that is beyond my knowledge. After looking into some tutorials, I set up a EC2 instance to run the node.js app. After doing so, and reading some things online, I'm questioning if this is the best service on AWS to use for my needs. All I'm trying to do is run a very simple, personal resume type website that is built using node.js and EJS. There will be little to no traffic, but I don't have to "pay" because I have a student account and $100 credit from my university. What is the best service to use on AWS for this? Best meaning costs the least or not at all (staying within my student limits), easiest to use and maintain, and just the correct application for me needs. Thanks for all the help in advance.

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

    What story do you tell, when an interviewer says: "Tell me about a hard question you've had to solve?"

    Posted: 24 Jun 2020 02:56 PM PDT

    I am interested in the different types of stories people tell.

    I'd also like to know how complicated the interviewer expects the story to be.

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

    React Redux TypeScript Global Functions?

    Posted: 24 Jun 2020 02:33 PM PDT

    I am building an app using React TypeScript with Redux. I have actions I can dispatch to modify the store. I also have functions that I am passing down to child components from App.tsx used to dispatch actions. Is there a way for me to have actions that dispatch actions in redux so that I can simply dispatch these functions from my child components instead of doing what I am currently? I did some Googling, but I don't think I have found something that worked (?)

    Thanks in advance!

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

    How to create the Gary Vee search engine

    Posted: 24 Jun 2020 02:24 PM PDT

    https://search.garyvaynerchuk.com/

    I'm working with a small business that wants me to import their YouTube content to their website and create a search engine similar to Gary Vees in the link above.

    Any tutorial-like help would be greatly appreciated. A method that's less technical would be great even if it requires a lot more legwork.

    Thanks guys

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

    Advice for leading a web development project with separation of concerns in development?

    Posted: 24 Jun 2020 02:04 PM PDT

    To give context, I am leading my senior capstone team in building a full stack application. The way we have it split is that half of our team is going to work purely on the front end while the other half works purely on the backend.

    Given the amount of work needed to finish the project and the amount of learning each member has to do just for their respective tasks, I find it very difficult to have anyone work on both the front and back end.

    While this might work in the theory, I'm worried that having this separation will end up being more difficult than expected. I can't help but feel that there will be a lot of confusion and that integration of the two ends will be difficult.

    Any advice for someone in my position so that this can work? It's my first time doing something like this so I would like to be as prepared as I can for when development starts.

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

    Scrollmagic: scene is not defined

    Posted: 24 Jun 2020 02:01 PM PDT

    I'm at a loss guy. I'm building out a WP theme that is using scrollmagic.

    1. I create a new scene in script1.js that works fine
    2. I call scene.duration(500); in script2.js and receive console error: scene is not defined

    script2.js is really just an ajax script, and on success I need to update the scroll duration. Given it's in a different file, I'm obviously missing how to get that variable.

    script2.js loads after script1.js in the DOM

    I think I'm missing an understanding of accessing variables from other files. Suggestions?

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

    Is there an in-browser css class custom prefixer?

    Posted: 24 Jun 2020 01:46 PM PDT

    I've been searching for a couple of hours through npm and google looking for a simple CSS prefixer (or parser) that works in the browser. I think I've been through 15 different packages. Everything I've found runs in node and/or is like 8 years old and relies on old libraries that have been long ago abandoned.

    Our use case is that we have some customizable css but need to ensure that all of the user's styles are prefixed so that they're scoped. This has to be done live. For example, reading a css string like:

    .field { color: red; } .thing { background-color: green; } 

    would turn into

    .custom-prefix .field { color: red; } .custom-prefix .thing { background-color: green; } 

    Do you know of something to solve this?

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

    No comments:

    Post a Comment