how do I bind my svg's in my doc to pieces of d3 data so I can target them seperately with click events?
Kevin Reed
how do i achieve this tyvm
Justin Bailey
$attempt = new Attempt(); then goes into my Vue vue passes it back $attempt = $request->attempt; then I try to modify it like $attempt->body = 'x'; and error Attempt to assign property of non-object so how do I pass an unsaved thingy between functions in Laravel?
Camden Baker
and to add this is what $attempt is but still throws the error Object { task_id: 9, session_id: 55, task: Object, session: Object } and the $request is working properly and all i dun get it
Brody Torres
I have a bunch of small flask web services that will be all served under the same domain.
Is it better to make a single flask app or somehow use a reverse proxy? The second option seems better to me (and more practical), but I'm not sure how to set up something like nginx to do it.
Levi Collins
Wtf is attempt?
Caleb Howard
it's a self-made model
Cooper Walker
I suspect you are misunderstanding basics but it's hard to say without seeing code.
Tyler Fisher
I suspect so too public function attemptStart(Request $request) { $attempt = new Attempt(); $attempt->task() ->associate(Task::find($request->task));
hopefully that worked, otherwise using one flask app and multiple routes is much simpler/easier since you can just expose flask to 0.0.0.0 and proxy to the port from nginx for all routes. Or if you're in AWS land just use lambda and API gateway.
Mason Fisher
>1GB file >sublime text uses 3.7GB of ram
i wonder what kind of representation text editors use
and //register the attempt axios.post('/attempt', { body: answer, correct: wasCorrect, count: this.tries, attempt: this.attempt, }) .then(response => console.log('attempt', response.data.dbAnswer)) .catch(error => console.error('attempt: ',error)); the latter fucks up. some of this is obviously just for debugging
Nathan Stewart
Pretty sure request doesn't give you back model but generic representation of data.
Daniel Barnes
then how do I turn it into that model? I need the created_at timestamp there. Is there a way? theres no model(continue) or something?
Jaxson Morris
RTFM? Seriously finding that kind of info is part of developing and you should be able to do it.
Elijah Perez
just a no will do next time ty
Juan Reyes
>tfw too lazy to setup LAMP so I can learn PHP >tfw Django looks like a cluster fuck
UI/UX designer here. I'm tired of being a wageslave so I'm planing to learn iOS programming and get self-employed by building my own apps/games. I have all the background I need to bring good apps to the market that have a good usability and a modern design.
Anyone doing something like this? Is it worth? From what I read it takes years to master a programming language. I have some basic skills though, for example I did some coding in framer.js (coffee script).
Elijah Nguyen
What is the best paid learning resource on line for PHP? Has anyone tried Lynda.com?
Basically I am able to has my work to get them to pay for a few courses online and other things, so am looking at my options.
Also has anyone bought code online just to look at how they are doing something and then adapting it for a different use? I'm really tempted as it's difficult to work out what professional code looks like while trying to teach yourself for free online.
Parker Brooks
Are models and views even efficient?
It seems requesting a fuckton of joined data in a view then selecting just what you want in the model is a giant waste of resources.
Maybe it's just how my company uses them. For some reason it's ok to join 15 tables in a view then use only 5 columns from it.
It seems like the better option would be to get exactly what you need with a custom query in the model.
Am I thinking about this all wrong?
Austin Kelly
I would go with vendors like Zend - it's at least recognizable
Ayden Ramirez
Best and easiest way to password protect a page?
Parker Jones
If you have just a few users the easiest is probably .htaccess Auth
Connor Evans
cheers senpai
Robert Rogers
Thanks buddy, I'll look into it.
Asher Phillips
>every single XML prettifier online doesn't accept malformed XML
why
Benjamin Peterson
How do i get download link for youtube video? I need that for my script
Mason Flores
function refill1() { var a = document.getElementById("1"); if(a.getAttribute("fill")=="red"){ a.setAttribute("fill","blue"); }else{ a.setAttribute("fill", "red"); } } function refill2() { var a = document.getElementById("2"); if(a.getAttribute("fill")=="red"){ a.setAttribute("fill","blue"); }else{ a.setAttribute("fill", "red"); } } function refill3() { var a = document.getElementById("3"); if(a.getAttribute("fill")=="red"){ a.setAttribute("fill","blue"); }else{ a.setAttribute("fill", "red"); } } var el = document.getElementById("1"); el.addEventListener("click", refill1, false); var el = document.getElementById("2"); el.addEventListener("click", refill2, false); var el = document.getElementById("3"); el.addEventListener("click", refill3, false);
I'm obviously reusing the code like an idiot not sure how functions or callback functions would work for this situation
Connor Lewis
Model-View design is only efficient, if the model is kept in memory. Yes, they are doing it wrong.
Jose Howard
Haha you guys aren't real computers lol learn to technology losers haha
Easton Evans
I would use youtube-dl for the task. Why? You don't have to reinvent the wheel and it's regularly updated You can use a wrapper or do the calls yourself.
Jaxson Gonzalez
Just a stupid question. If I understand the structure of this code and how it works, is it a good sign? Am I doing good in learning programming?
Anthony Gomez
eh i guess its a good sign if your just starting out, it's very basic atm it's just changing the color of a circle every time you click.
trying to stop repeating the code so when I have hundreds of elements i wont have to write all the function calls for each ID manually
Justin King
function refill() { if(this.getAttribute("fill")=="red"){ this.setAttribute("fill","blue"); }else{ this.setAttribute("fill", "red"); } } var el = document.getElementsByTagName("circle"); el[0].addEventListener("click", refill, false); el[1].addEventListener("click", refill, false); el[2].addEventListener("click", refill, false);
shortened it down but still repeating the el[i] tried using a for loop to use the event listener for each child circle of the svg element but it wouldn't work
Christian Ward
>mysql update fucks up page by setting strict mode on >need to change one line via ssh to fix >root login with public key authentication required >guy who built my page has the key but doesn't answer me How fucked am I? Please tell me that there's another way
Ryan Hall
>root login if you set that server too, it is probably hackable too
Ian Nelson
this works
var theParent = document.querySelector("#shapes"); theParent.addEventListener("click", refill, false); function refill(e) { var el = e.target; if(el.getAttribute("fill")=="red"){ el.setAttribute("fill","blue"); }else{ el.setAttribute("fill", "red"); } e.stopPropagation(); }
Zachary Ross
>want to use the typescript playground page to quickly test something >search for "ts playground"
Owen Reed
why is the join method on strings and not on arrays in python? seems weird
lol
Nicholas Thomas
should've look for "sandbox"
Isaac Foster
well yea the account of the webprovider is mine its just the rootlogin of the ssh that I need to get. >hacking I hope don't need to spend weeks for this
Andrew Perez
Just ask your webhoster if they can reset the root password
Nathaniel Young
that's a good tip, thank you for that
Henry Smith
MySQL keeps updating out of the blue almost every day taking the screen like this wtf
Kevin Garcia
what is wrong with this anons: shell_exec('youtube-dl -o \"'.$this->path.'%(title)s-%(id)s.%(ext)s\" '.$this->url);
error: sh: -c: line 0: syntax error near unexpected token `('
Gavin Nguyen
So that it can't be misused or its function misinterpreted. It will always produce a string.
Jayden Lopez
A lot of shit. Look up how shell_exec() works and how to properly escape and use arguments.
Samuel Hill
i used it many times in this way, just with ffmpeg
Luis Brown
If you use single quotes you don't need to escape double quotes
Christian Hughes
i tried different ways but i always get same error shell_exec("youtube-dl -o \'".$this->path."%(title)s-%(id)s.%(ext)s\' ".$this->url);
error sh: -c: line 0: syntax error near unexpected token `('
Carson Cox
does the same thing to me, once a day or so I think. Should we be worried?
Caleb Kelly
You did exactly the same thing as before but changing single and double quotes kek
i got it already, i left "/", after deleting it it works
Landon Russell
is there a such thing as freelance sysadmin that works from home? I mean could I get freelance work maintaining servers from my bedroom?
Blake Hernandez
>start project that should take 20 minutes at most >takes five hours
Hunter Bell
As long as you learned something worth the time
Liam Watson
What's the fastest way to shit out single page static website? Like, a landing page for a single product. Wordpress?
Brayden Sanchez
Probably buying a landing page theme with a builder.
Ian Sanders
not him but what sites do I look for shit like this?
Aaron Morales
Does anybody know of very stable language/framework suitable for very low maintenance. I'm sick of PHP pajeets changing APIs with releases that then break my application, which I don't have time to fix. Is C with cgi or fastcgi a good choice? >inb4 django Only 3 years of support with LTS release. I'm looking for 5+ years. Page gets 1-2 visitors per day, just simple image gallery with content stored in database and gets updated regularly.
James Watson
This is from themeforest which I used quite a lot. There's also templatemonster
Alexander Davis
##this is all inside a for-loop: article = {"url": url, "score": score, "country": 0, "length": length_article} #dict
Using django, I have a list of dicts, from where I take said dicts one at a time, populate them and then try to save them to my database with the save() funct. It all goes alright, except for the save part: the only dict saved is the very last one. Any help pls?
Joshua Howard
Is article and db_article the same? Did you try calling add_Article twice in a row with different dicts?
Christian White
i am considering to pay for a video tutorial series at udemy so i can learn node.js properly. cost almost nothing and looks like it covers everything a beginner needs to know. thoughts?
Nathaniel Young
>Is article and db_article the same? yeah, they are the same, just messed it up when pasting it onto the code box here.
so I found part of the problem: the [0] index (I think) makes it overwrite everything onto the same slot in the database (always the first slot). I have checked and as I run the script the dicts are being written one on top of each other, and at the end only the last one is left, of course. So I need to get rid of that [0] in the add_Article def, but if I just delete it, there's an error. Ideas?
It's a long time since I worked with django but you could try this:
p, _ = Article.objects.get_or_create( urlId = a['url'], feels = a['score'], date = time.strftime("%c"), length = a['length'] ) p.save() # no idea if you need save return p
Tyler Nelson
nah, that won't even run, but thanks anyways
Isaac Thompson
Did you fix the indentations so it works with your code? It's pretty much what the doc says:
alright, I'll take a break and give it a shot. Burnt out already from dealing with a lot of previous shit to get to this point. thanks again, I'll read the docs carefully this time.
Hudson Fisher
...
John Bell
is this true?
Eli Thomas
idk i look exactly like the guy on the left and im full stack
get at me
Leo Fisher
Did anything noteworthy happen after the Opera what was it, 12.15? source code was leaked?
Robert Flores
i have not extensively researched the topic but i haven't heard of anything
it's probably super illegal to use the leaked code and there are better alternatives that won't get you sued to hell
Luis Garcia
Well damn, that's a shame. I suppose it isn't anything worth getting sued over though. Thank you.
Nolan Lewis
fuck that crap. i paid just now
Elijah Rivera
Swift developer here. Used to be into php and laravel, if I were you I'd check out laracasts.com
Adrian Green
uhh, no. If anything it's the opposite. Front end is stacked with young guys, back is olds
Andrew Ortiz
Anyone has a copy of From Newbie to Ninja with Node js?
Dominic Cruz
Is it possible to do Web deving entirely using Wincuck
Hudson Campbell
That title is everything wrong with webdev Let me guess, some '''''code artisan''''' wrote it? Fuck
Connor Fisher
yeah, alright, now it's working, thanks dude. I'm following another book, and trying to adapt the book's example to the project I want to do. Guess I fucked up somewhere in the process.
Cameron Wood
I really don't care about code artisans or people in general I just want to learn.
What's the simplest php engine out there? I am tired of pure html
Wyatt Flores
Just got off a phone interview for my first webdev job (was a network engineer prior), they liked the tech I used and liked my apps but obviously were concerned that I hadn't worked a dev role previously. The guy was interested in bringing me in on a 90 day contract and was going to propose this to HR. would you guys work on contract for your first job?
Caleb Ortiz
yeah, if it's the only offer you've had in a while, go for it. If you think something better is just around the corner, wait a bit. But me, I'd take it. You trust you can show them you're actually worth something in those 90 days, right?
And maybe you can even impress them and go for a raise after the contract is up...
Ayden Sanchez
is pastebin down?
Brody Garcia
pastebín is down pastebin is not
Josiah Hughes
sorry for spoonfeed
thank you
Wyatt Price
lol OP needs to get his shit together!
Cooper Garcia
yeah I'd take it assuming I'd satisfy them and get a job out of it but that they'd lowball me when bringing me on full time so I'd stay 6 months and get a job elsewhere for more money
Camden Reed
It's a test. A good webdev should pay attention to tiny details 24/7.