Learned some cool shit about makin' music the other day.
(function(){ var i = 0; var audIntv = setInterval(function(){ (function InitSampleSound(fr, du){ var _p = {}; _p.audioCtx = new AudioContext(); _p.oscillator = _p.audioCtx.createOscillator(); _p.gainNode = _p.audioCtx.createGain(); _p.oscillator.connect(_p.gainNode); _p.gainNode.connect(_p.audioCtx.destination); _p.oscillator.type = 'sine'; _p.playSound = function playSound(f, d){ return new Promise(function(res, rej){ _p.oscillator.frequency.value = f; _p.oscillator.start(); setTimeout(function(){ _p.oscillator.stop(); setTimeout(function(){ _p.audioCtx.close(); res(_p); }, 50); }, d); }); }; return _p.playSound(fr, du).then(function(){ return InitSampleSound; }); })(600, 900).then(function(rfn){ return rfn(800, 900); }).then(function(rfn){ return rfn(600, 900); }).then(function(){ i++; if (i >= 4){ clearInterval(audIntv); } }); }, 3300); })();
Probably going to get in trouble, because i'm not supposed to be coding at work. But I barely have any free time at home, so I always end up writing at least a little code, and getting in trouble.
Still. Learned about the Web Audio API. So shit was worth it.
Dylan Morgan
>got laid off >5 months of runway before living off credit cards >previously finished FCC front end cert about a year ago
If I spent 8 hours a day learning and building, would 4 months be enough to become an employable js developer?
Kevin Rivera
You should be able to just copypasta that code into the js console on any page (including this thread) and have a genuine justWerks™ Experience.
>boo wee boo what in the? I didn't know you could make speakers play with js!
Christian Rivera
yes, with half that exp
Kevin Hughes
>Still. Learned about the Web Audio API. So shit was worth it. It isn't even final yet. Hell, spatial audio is buggy as fuck.
Eli Russell
How do I make $u equal to the query of pages whose id are equal to data? (there's only one page since id is unique and incremental)
Let's say data is 1. That means $u should return all pages whose id is 1. And $article should then be equal to that single page.
Justin Wood
Apparently so. I can't seem to find it anymore, but on a different day I remember reading a whole thing about this dude basically being able to define his own waveforms using the trigonometric equations, then sending the "samples" to an html5 audio element, and basically playing the wave he just created.
Reminded me of LabView kind of.
He also had a full spectral analyser based on a bunch of stuff I don't understand (yet) like FFT. He did all of this in js.
It made me realize that with the way it keeps being expanded, js could soon be a power in the world of instrumentation. I mean, with everything else you can do in js, why not?
Jackson James
I mean, it's one of the oldest languages. There's tons of libraries and support for it. Its market share has grown exponentially over the past decade. I'd say it's already a heavyweight in the world of instrumentation
Bentley Brown
$dat = (isset($_GET['data']) ? $_GET['data'] : die("need data param")); $lnk = new mysqli("127.0.0.1", "root", "", "MyDataBase"); $edat = $lnk->real_escape_string($dat); // if you forget to escape your inputs, hackers will destroy your life $res = $lnk->query("SELECT * FROM pages WHERE `ID` = '$edat';"); $row = $res->fetch_object(); $article = $row->article; header('Content-Type: application/json'); $out = (object) [ "article" => $article, "otherData" => $row ]; echo(json_encode($out, JSON_PRETTY_PRINT));
Mason Ward
anyone has a job in web developing here? was it hard to get? how's the pay? and how are your hours?
Cameron Thompson
>It made me realize that with the way it keeps being expanded, js could soon be a power in the world of instrumentation. I mean, with everything else you can do in js, why not? Lack of realtime performance, garbage browser APIs and limited IO - you won't have VST for your browser, even WebMIDI is a joke, inferior throughput, something that still matters in professional audio production. Unlike in games, there is exactly zero (0) tolerance for small hickups.
Brandon Taylor
What am I doing wrong here? I'm trying to translate the boolean to actual text, but it just says "passed" on every item, it says 1 and 0 just fine if I remove the if, ifelse part.
Aiden Miller
>$row['passed'] = 0 >$row['passed'] = 1 do you mean to be assigning? I think you mean double equals for equality check. $row['passed'] == 0 $row['passed'] == 1
How good is MySQL/MariaDB? Is the convenience from it worth it?
William Richardson
Use case wise I'm not very experienced with it, but hearing from people in my circle MySQL went to shit after the acquisition by oracle.
Ethan Jackson
>went to shit after the acquisition by oracle. That's normal to happen for everything gets their jew claws on.
Brandon Kelly
anyone? i fucking hate PHP its cancer. I tested it by echoing /images/123.jpg into an image tag and it displayed the image. So i know i'm getting access to the server just fine. However for some reason i cant echo out each file name
seriously fuck PHP i did this in 2 seconds with JS....
Jaxson Kelly
How do I skip the first row when selecting everything from a table? Isn't there a SKIP function or something like there's a LIMIT function?
Camden Nelson
SELECT Id, OrderDate, CustomerId, TotalAmount FROM [Order] WHERE NOT (TotalAmount >= 50 AND TotalAmount
Grayson Flores
idk, but off the top of my head. while($row < $row.length + 1) { echo row[i + 1]; i++; }
Lucas Clark
I don't get what's so hard to grasp about "This"
Ryder Thompson
Is there a specific language/framework that is focuses on security? Like what do banks use to prevent hacking? Would a meme like nodejs + express be secure?
Samuel Thompson
In react its kinda hard, in big applications
Samuel Jones
So database management. MySQL/MariaDB sounds cool. Do I have to learn SQL to use it? Can't I use another backend language like python or java entirely to manage my database?
Christopher Rogers
Who here /postitnotes/ because too autistic to conceptualize how your javascript functions flow?
Andrew Reed
...
Blake Scott
once you write them and know what they do its hard to forget. The toughest part for me is knowing where they are so i can get to them faster
Blake Jackson
>[LIMIT {[offset,] row_count | row_count OFFSET offset}] LIMIT does what you want already.
Landon Bennett
ORMs exist for a lot of languages already. But you really want to know what's going on behind them.
Easton Long
/ is the root directory of your server, so unless you have a directory called images there and have permissions to read it it's not going to work.
Aaron Diaz
can i do something like require() from node js in raw javascript? im trying to call a worker function. I would just put it in there but theres a lot of other JS on the page which the worker loads each request and it slows my app down
Kayden Nguyen
Is knowing jquery enough to be a front end? This job for one says they want html, css with responsive design and jquery. I know html and kinda css, not responsive design unless that's the resizing depending on browser window and don't know a js module? Not sure what they're called but I know how to do javascript for basic things
Benjamin Lee
no. knowing css "kinda" isn't enough either. 90% of anyone mentioning responsive it means using css media queries, not JS.
Chase Thompson
Whoever makes these threads should advertise in the old one, like a decent general. Optionally link to the old thread in the body too.
Aiden Reed
I think I'm having an issue with two way binding? here's the code
edit comment is fired when the server sends a comment update. 'data' is the array of comment objects, 'bgcolor' is the color stripped out of the target comment to be edited. after state is updated, fadeColor is called to fade the color values to 255 over setInterval. each time the interval fires, the value increments then I set state for bgcolor to get the updated color to render to the page.
currently the page renders the color fade fine, but the issue is that the backgrounColor on the edited comment itself also fades to white, which isn't directly set anywhere. is there any two way binding here I'm not aware of?
James Cruz
sorry this is in react
Jeremiah Bennett
>not using redux with react Filthy pleb
Wyatt Cruz
How do i get a job in backend web dev? I graduated and got a diploma in software engineering and have focused on web dev but no one wants to hire me.
Henry Russell
I recommend you decouple your controlling logic from the state of your components if for no other reason than the fact that you will be forced to cache some fo these values you are calculating on the fly every time you render.
Hudson Morales
wow console.log is a disaster for working with large files. I thought the entire time something was fucked with my app because it was logging stuff so slow (im parsing some csv files). It's actually fast when i do what i want with the data in the DOM.....
Juan Jones
do you have a portfolio? build stuff
Kevin Nelson
I have a portfolio with two apps, one is a blogging system written in php using laravel framework, the other is a basic social media app written just in php.
Zachary Murphy
more apps. make some quick front end ones if you want, 2 just strikes people as a low number
Kayden Rivera
Maybe you are right. I will do that, any other tips? Do you have a job in backend?
Levi Hughes
Alright how the fuck do I make a schema in mongo db?
So I'm scraping phrases from chat logs and then I store how many times the phrases have been used on a specific date.
Is this right? var phrasecountSchema = new Schema({ date: String, phrases: [ { phrase: String times_used: Integer } ]
});
Or do I omit the phrase object inside the array? But I want to specify what data there's about a phrase. HELP!
Ryder Williams
>nosql For what purpose?
Jack Wilson
all that college debt just to learn out of date tech must really sting
Hunter Wood
for mongoose 4.x // app/models/example.js
var mongoose = require('mongoose'); var Schema = mongoose.Schema;
var MuhSchema = new Schema({ name: String, comments: [{ body: String, date: Date }] });
Because it solves high traffic distributed network problems without having to reinvent the wheel of a custom distributed data store and caching layers.
Colton Russell
I'm using mongoose.
Jordan Cooper
>all those nested anonymous functions please don't
Leo Ramirez
Hello /wdg/. How would one make a webpage properly react to window resizing (As in prevent the void space below the background and properly have my images resize to compensate for the length/width loss.). I'm not all too knowledgeable in html or css because I just started learning, so sorry if the answer is obvious.
Jace Turner
im really fucking pissed off right now why the FUCK doesn't this line work:
FUCK ING MOTHER FUCKER IT WORKS ON EVERY OTHER ID ELEMENT I HAVE ON MY PAGE WHAT THE UCK IS GOING ON IVE BEEN STUCK ON THIS ALL FUCKING DAY GOD FUCKING DAMNIT WHAT THE HELL FUCKING WASTING SO MUCH TIME
I NEEDED TO CALL parser.abort() to stop searching through the rows once I found a match. Im basically trying to imitate a query with JS, and i needed to be specific and tell the piece of shit Worker to stop what its doing when i say so.
I LITERALLY SPENT ALL FUCKING DAY TRYING TO FIGURE THAT OUT. But hey I learned something.
FUCK
Cameron Phillips
Any idea what features to but in a key gen (as in game, invite, coupon keys...) I have length, delimiters, upper/lower case, only numbers/only chars so far
Parker Jones
You build it for fun/experience. Employers look for people who like to do this shit in their spare time. Building something for a portfolio allows you to fuck around with shit that you normally wouldn't be able to in a work environment and show off what you know.
I'M FUCKING GLAD THAT FUCKING EVERYTHING TURNED OUT SO FUCKING WELL FOR YOU!
Aaron Evans
Isn't there one already?
Landon Bennett
Okay, thanks
Nolan Peterson
Hey there. Making a blog using PHP, sql and a PDO object (Kind of new, only made one site with all this). What would be the best way to be able to store HTML in a column of SQL, avoiding SQL injection and JS execution.
I've been reading up about PHP markdown, but I've also seen things about bind value (rather than bind params)? Any recommendations?
Dylan Hughes
need help with a simple react problem, im using react-saga but im sure u guys will understand its not really a framework problem
Can I learn backend on my own? I'm fine with frontend but that's easy and some of the code posted here looks indecipherable. What's the best way to learn the concepts (like routes seem to be constants between server-side languages)?
Did you follow guides? Do you still have guides open to this day when making webapps?
Grayson Perez
I'm trying to echo a list of files in a directory on a mapped drive in PHP but having trouble. I'm connected to it just fine. However i've tried scandir(), readdir(), fopen(), etc and im not getting results. Any ideas?
William Anderson
i'm really excited lads. i've delved into a php framework for the first time since laravel and im actually enjoying it. i'm not gonna say which framework it is because i know one of you pricks will give me reasons to dislike it but yay im having fun with it and learning at the same time XDDDD!
Josiah Perry
Start by picking a backend language (PHP, Python, Ruby, NodeJS, Go, etc) and learning it, along with a framework for that language if you want. Learn how HTTP works if you don't already know. Find some tutorials to follow and also experiment on your own. Then, when you feel you're ready, try to make a few complete projects on your own.
also backend is easier than frontend when you get the hang of things imho.
Thomas Baker
>I know HTML/CSS/JS + Bootstrap/jQuery
What should I build for my portfolio that will give employers boners?
Xavier Myers
Learn PHP and SQL and build a messaging platform. That's what I did, got a junior PHP developer job starting a week from Monday.
Josiah Morales
link it plz, i want to see how complicated it is like if its just text or you coded everything by scratch, i know it would be pretty easy for me, but i want to know if its worth learning php
Alexander Gutierrez
Media queries, CSS framework grids, flexbox...
Jaxson Campbell
It's pretty basic desu. Do the codecademy PHP course and a few YouTube tutorials and you'll be up to speed.
Brody Jones
Not that hard to get, interned here and then interviewed after graduating. I make a bit over $80k. Hours vary...usually around 40 but I've also put in over 80 in a few rare cases.
Brody Nelson
How hard is it to land job with only a portfolio and no internships or work experience?
Leo Fisher
It took me a year and a half.
Noah Hughes
My work is so god damn slow, we move at a turtle pace due to Microsoft fanboy-ism senior developer. I get paid to much to leave.
Does anyone here have any experience working part time for another company?
Wyatt Rivera
How does a company that makes a website like this make software like it does?
Look at the "sample screen" and tell me what software they used to make that :)
java applets for website java for their desktop apps
Jordan Watson
I work for myself at night building my own cms as i go
Bentley Flores
Question about best practice kind of stuff
I have a class that encapsulates unique data per client that is retrieved from an API call. Would it be better to instantiate the object by passing that data in through the constructor or should the object itself make the call to get the data?
Ryder Ward
Depends on your implementation and how you will use caching. Your (meme)framework determines best practice
Michael Jackson
Object. Constructor shouldn't do anything.
Christopher Sanders
What would make a better twitter?
Other than real async feed loading.
Any competitor wouldn't be able to serve that amount of complex media at the start. Videos are expensive and so are pictures. Throwing that up without investors would get you in the hole real quick.
Mason Cruz
I have a small project I was hosting on Heroku, but I recently incorporated some NLP capabilities which require ~500mb of data to be installed. Is there are a similar service to Heroku (git integration, ease of use etc.) that allows you to configure how much server storage you need? Heroku is max 300mb. I heard AWS Elastic Beanstalk is a decent alternative.