In javascript I have a function that picks to random playing cards, either suited or not suited. It also randomizes what suit the cards are.
I have it so it picks the 2 cards (AKs=Ace King suited ect), then it adds a suit to the first card at random, checks to see if there is an "s" to symbolize suited and if there is adds the same suit to the second card and appends both cards images too the page.
Does anyone have any ideas about how I can make it so if the 2 cards selected are not suited, the 2nd card will be assigned a suit that is NOT the same as the first?
Jace Gutierrez
you could always subset the array of available suits and just ensure you pick a random from that.
Do you use cross browser testing tools ? Are these any gud ?
Cooper Cruz
nah I just do it manually. Probably a bad idea function btest() { /path/to/safari $1 /path/to/firefox $1 /path/to/chrome $1 }
And then I remote into my windows VMs
Josiah Gomez
well this might be the most straight forward way of doing it
Cooper Murphy
I can not get nginx to send me emails on digitalocean.
Anyone know how to solve this?
Their tutorials don't work for some reason. None of them.
Tyler Martin
Ok I almost have this, the issue is, I splice the info out of the array, but how do I reset it so that the array is back to default when the function starts again?
After a few iterations of the function I have emptied the array.
Easton Walker
I have an interview and part of it is writing a small application in Angular 2. I'm almost done but a requirement was writing tests. What the hell can you even test in Angular 2? All I'm doing is literally a glorified Tour of Heroes. Create a mock service and then check if the component displays things properly? Please help.
Jaxson Allen
why does everything have be on top of 200 layered libraries
Jayden Williams
Why isn't there a thing like
%mobile {
}
to encapsulate all your mobile CSS?
What is the media query best for mobile phones.
Gavin Gutierrez
Never really did tests on front end stuff but i guess you could checkout dedicated js testing tools like karma + jasmine or whatever
Justin Long
you need a mail server famalam
Asher Reed
can you recommend any javascript-based image gallery viewer?
Jason Richardson
Yes, neither are working.
Cooper Gonzalez
make sure the problem really is your server not sending anything rather than email provider you're sending mail to moving it to spam or straight up blocking it because it come from an untrusted source
Evan Wood
What do you think @media is for? Also depends on your site.
Parker Anderson
What libraries or functions should I use to slow down an iteration so it seems like an animation.
e.g. I have the following json [ {name:"node 1", date:"2017-01-01"}, {name:"node 2", date:"2017-01-02"}, {name:"node 3", date:"2017-01-04"}, {name:"node 4", date:"2017-01-08"} ... ]
And I want to add each node to a network chart but I want to do so with respect to their date. (node 2 will be added much quicker than node 4) It was also be cool to have a slider so I could slide to a certain date and it would show that state
Grayson Cook
I think digitalocean counts as an untrusted source.
If I wanted to become a php dev, what would be some goals to work towards for an entry level position?
Pic unrelated.
Brayden Kelly
learn php, learn sql, database setup and management, learn big php framework
Carson Miller
Any kind of specific projects I should be working on to make people take notice user?
Kevin Gutierrez
>Taking final web development course in my college's IT program >It's all Ruby/Rails
Jordan Robinson
You could make small demo projects like user from a thread ago and his todo app or clone something you use regularly like a mail client, rss/podcast aggregator or whatever. There also are some open source projects written in php you might be able to contribute to or write plugins for. Also if you want to work with wordpress stuff you can learn how to set a site up and do themes or plugins
Adam Perry
Thanks for the suggestions user. I don't particularly want to work with WordPress but I know there's a ton of work out there. Probably once you learn the stuff it becomes super easy too. Which could be a double edged sword.
Brody Hall
academics will always be a lil behind on cutting edge business preferences
Angel Ortiz
Anybody using the skeleton + normalize css base? Any drawbacks?
Noah Gutierrez
What's the cutting edge business preference right now?
Gavin Perry
django jquery react nodejs with a bit of angular and font-awesome just to be sure. Come sin at a nice 50mb per page
Lucas Richardson
anyone here use freecodecamp? Trying to learn webdev but trying to decide on what learning/mooc thing to choose.
Oliver Ward
I'm in the same boat you are i'm guessing and have done some research
Do simple rip offs of other sties is something I see alot (finished small projects always better then unfinished big ones)
Try going through as many laracasts as possible/all probably a good idea as well as getting a couple side projects done (probably what I'm going to end up doing) There aren't that many videos and its' over most concepts I imagine you will be asked about or have to do stuff with php entry jobs.
it seems very soul sucking and it's only my back up if I can't find anything else (unlikely i imagine/hopefully)
so long as you are actively doing stuff it's good, you will probably end up switching around alot anyway. bento.io is something you might want to look at too. (i kind of started with fcc but not really but for html/css stuff for example did stuff there everything on bento.io pretty much, some random stuff I saw recommended like those flexbox games.) Just try to maintain actively doing stuff and you will improve. FCC /theodinproject are pretty nice tracks you can follow and later FCC Projects are recommended to peopel even not doing FCC so it wouldnt hurt to go along with it. If you dont understand something totally (fcc is pretty minimal) just google around, check bento.io, or search good resorueces to learn X on google or reddit or something.
Easton James
Also forgot to mention, best bet will always be just looking at job postings in your area for things to flesh out your resume. Tons of PHP jobs near me appreciate React and noSql stuff for example.
Julian Morgan
What built in fonts do you guys use so you don't have to download a trillion font faces?
Alternatively is there a light single web font I can include?
How does gfycat make their thumbnails animate? Its just a picture, but if you hover it starts playing the video. Doesnt that waste shitton of bandwidth? How is that possible/good when it would download shitton of videos at once when just scrolling.
Am i missing something?
Robert Johnson
its just a jpg thumbnail. They load the gif on an event then remove the placeholder
Cooper Phillips
>tfw not an attractive female >tfw no 90k likes for being retarded.
>tfw life on silver platter but too retarded to do anything about it.
Nathaniel Clark
The video is loaded on-demand when you move your mouse over the thumbnail, so most of the videos will never load. Also it is very compressed, the quality is horrible and the resolution is super tiny but it's okay for a preview video.
Liam Sanders
I'm making a chrome extension that downloads youtube videos using youtube-dl. can I call youtube-dl in javascript?
Kayden Adams
For personal use? Then run a server calling youtube-dl on your PC and make a HTTP request
press F12, go to network, press save button and then replicate whatever it did.
Blake Cooper
I just checked the request made by my browser. The data looks a bit weird, not like the other one I had sent, for example during login. Is this a special case? On the top is the request during login, which works flawlessly. On the bottom is the request that doesn't change anything.
Brayden Mitchell
What is the best way to create a cms?
Charles Hall
I mean, with Angular, django, ruby or php?
Jonathan Anderson
Top one is a normal form data request. That means the actual body is something like "csrfmiddlewaretoken=[...]&next=[...]&username=[...]&etcetc"
Bottom one is a multipart/form-data request, the part on the right is the actual body.
They're two different ways to send form data, whether it works not depends on what the server is expecting (if it's expecting normal form data and you're sending multipart form data, it's obviously not gonna work)
Henry Reyes
I can put something in a div/span of a certain class. Or I could just make said thing that class. Is there a preferred or standard way to decide between these options?
Matthew Young
GraphQL any good?
Nolan Fisher
no. I'd prefer not to have an extra div around something, but it depends on what you are going to do with it.
Anthony Richardson
Thanks for the push in the right direction.
Hunter Flores
Got my first junior web dev job recently. Fucking hate the culture, the lack of a lunch (or any) break, the requirement to have constant meetings after work.
When is it acceptable to quit? I would quite now and find another job, but I don't want it to look strange on my CV. Maybe 6 months?
Dylan Ward
I'd say at least 6 months, but don't think you have to put up with it for your CV sake, start looking for another job now.
Also if you want a break or lunch then take a fucking break. You may be working with autists who feel it necessary to kill themselves through work. You're entitled to a break and it's healthy to do so
Juan Reed
all the time. what country you're in? surely having no break is against the law. sue the shit out of them.
Jaxon Gutierrez
I'm just a junior dev, I feel like I'm not experienced enough to just look for another job and get it easily. I don't even know how I was hired at my current job.
UK. I want to move country so bad. There's another issue. Who the fuck would hire me abroad if I couldn't even stick to my first job for more than a few months.
Everyone tells me a year is best but fuck it I can't
I'm literally you. I moved from wales 6 months ago to sweden for my first real junior role. Don't feel so fraudulent that someone hired you even though you feel you like you don't somehow deserve your position there.
Kick yourself up the ass, grow some balls and start taking what you want. I'd suggest using linked in to apply to jobs in countries you want to go to and go from there. Get yourself a strong CV and portfolio and you should be good to go.
Christopher Clark
Hey man, I was actually thinking of moving somewhere in Scandinavia.
How did you get on with the language difference? Did you talk in English with your colleagues/boss? What was the interview like? Any tips on moving there would be great. I have only about £1k saved up too so I don't know how that would work.
The only thing stopping me is my retarded anxiety. I have very bad anxiety, and take meds for it (beta-blockers). They're the only thing which help me get through work. I have no idea how I'd be able to move to a different country without them.
Benjamin Allen
Web Development General, folks. With 0 development and 100% whining about not getting a job.
This general should just die or get renamed.
Daniel Ward
>Java is actually good edition of course it is, but justify the RAM usage for a small project
Ryder Parker
> How did you get on with the language difference? Everyone speaks english, and that's true for all the scandinavian countries (especially the capitols, which i've lived in 2 out of 3 of them)
> What was the interview like? I had one with an external recruitment company over Skype which consisted of questions about me personally (how old i am, what my aspirations are, where i've worked etc) then i had another Skype interview with the company where they asked about what i've worked with in the past, did I know key technologies (git, the framework they use) and basic thoughts on web dev. I then got a technical assesment on inspecting the model and view of one of the partials they use in the app. I went beyond that and showed a basic CRUD app in backbone to show I'm not a fuckwit. They offered me the job about a week later.
> Any tips on moving there would be great
The housing market in stockholm is fucked so you'll be spending a lot more on accommodation than a native would. Oslo wasn't much easier either as I found they prefer letting rooms to other scandis but definitely a bit easier than stockholm. Norway was easier to get a person number and bank account than sweden mind.
>I have very bad anxiety, and take meds for it (beta-blockers)
You can ask your GP for a 3 month supply to move away with then by the time you get yourself sorted here then you can just get it from the GP in the country you move to. The surgery shouldn't give you any problems if it's beta-blockers. It's not like they can be abused or as if they're expensive.
If you're that worried though get an e111 health card. It'll entitle you to health care in europe until you have social security in the country you move to get prescriptions as normal.
As long as you man up and take what you deserve then you'll make this work. Good luck user
Jaxson Long
In JS how do you write a variable that's "equal" to an int variable without being an int?
Luke Phillips
Wow thanks user, that really helped. I really hope I can make this work too. I feel like I fucked up in this country and my childhood was traumatising so I need to move away.
Best of luck in your life too!
Jordan Brooks
come on you don't even know your fucking operators read the fucking specs
> * valgrind gave no errors which means this is a professional program desu
Jonathan Rogers
No problem. You can do anything if you put your mind to it mate
var int = 5; var string = "Five!"
if (int === string.length) { console.log("the string is equal to the int") } else { console.log("the string is NOT equal to the int") }
Like that?
Wyatt Clark
its true tho
Isaac Cruz
I know my operators, I was talking about passing by reference vs value. Figured it out though, no worries.
Hudson Perry
Newfag here, so please forgive my ignorance. How would you implement archiving in the backend? Let's say you have a CMS with messages and they can be archived, e.g. in order not to be shown. Would you create an extra table for archived messages, or would you add a column/flag in the regular table for messages? The former would require an additional table, but the latter would not need an additional check for the archived flag. Am I thinking completely wrongly about it?
Carson Nelson
Look for existing plugins / themes for your cms that do that or make your own. Otherwise export existing db to a new backup db then delete messages you want to hide on production site, maybe setup new site behind authentication to interact with backup db.
Ethan Garcia
Thanks. I am making my own to learn that stuff. I was asking on a conceptual level which solution would be better, but I suppose it doesn't hurt to look around how other platforms have implemented this functionality.
Ryder Sanchez
Hello,
I’m planning to develop a web-based platform vaguely like Twitter. Using the site as an example, I’d like to know:
>Which languages would I have to learn to develop the front-end of Twitter? >Which languages would I have to learn to develop the back-end of Twitter? >How much would it cost for me to deploy a site like Twitter once it was made? >What would be a reasonable estimate of the time it'd take me to learn the languages required, and actually code something like Twitter from scratch?
Thanks!
Jace Evans
I want people to be able to tweet or post a picture on facebook that I generate client-side.
Anyone have any idea how to do this?
Basically I turn a div into an image with JS and want them to be able to share it immediately on social media. The image will not be saved on the server.
Juan Phillips
I literally can't get apache2 to work. I'm stuck behind a 403 permission denied error for the past week. >company says they're doing a new years check up on their servers or some shit >shut down servers and restart it >means my apache2 needs to restart as well >service apache2 start >error error error >what the fuck >fix errors, permission denied It was fucking working before!
Juan Peterson
Use facebook and twitter api. Requires you to setup oauth authentication so your user log in to your application with their twitter or facebook logins
Lucas Hall
glhf
Evan Nguyen
try looking into every config file, your firewall config might have been reset as well
Hudson Sanders
If I'm receiving hundreds of pages from a server through ajax in an array, how do i just put all the items on one page. basically i have a stream of data that has an object called pager and that includes a parameter per_page.
How do I manipulate this parameter so that I can receive everything?
Jeremiah Allen
If I'm reading this correct, I need to start a server to create a db? However, I seem to need a configuration file to start the server. Anyone here have experience with postgres?
Isaiah James
chown everything for www-data
Liam Allen
Just learn how to properly implement sql injection vulnerabilities in your code and you'll be fine
Josiah King
whats a good first node project? something i can CRUD?
Sebastian Phillips
Clone of a website you use/like Basic social media site Movie/book/game/etc review site CMS Stock tracking thing
Gabriel Rivera
Is there a point in using node if you don't have a database? I don't think making a static basic site that doesn't do much would be very beneficial for learning node. Am I right?
Jeremiah Fisher
1. html css js jquery 2. a range of options, php, nodejs, >python, etc 3. depends on the amount of traffic, twitter is big so it costs a lot 4. a year
Justin James
How do I run JavaScript inside the php file I'm requesting with AJAX post?
I'm trying to set the background color of a div created from the PHP.
Jose Rodriguez
>Is there a point in using node if you don't have a database? Plenty of reasons. Node (and any other backend environment) gives you access to the server's file system and software. For example, you could make a site that accepts a video file, re-encodes it with ffmpeg, and returns it to the client. Maybe you want to make a basic websocket chat room. No need for a database, but you need a centralized server for clients to pub/sub to. Maybe you want to be able to view status information about your server over the internet. You could write a script that collects various data and formats it into html. (Or you could ssh in and run top, but whatever.)
>I don't think making a static basic site that doesn't do much would be very beneficial for learning node. Am I right? Not necessarily. As I said, there's lots of stuff you can do without a database. That said, databases aren't that hard and they certainly have plenty of uses.
Chase Butler
you could echo js into script tags, probably not the smartest way to do it but when you mix php with javascript you run into these issues. Thats why a lot of people are ditching php and using js for both front end and back end
thanks m8
Nicholas Reed
So I'm making a web app that basically takes some information from the user and then displays it nicely in a word document, however I have no clue in how to make it so the user can download this document after, someone knows if there is some kind of tutorial on this? I am using React if that matters.
Wyatt Thompson
i used a js script that let me give users a download .csv file button, theres gotta be something out there for a word doc. Just search on google...thats what i did
Owen Brooks
Made 33 cents today with AdSense.
Time to buy a house.
Jace Fisher
There are so many things wrong with that I assume you're jus trolling, but in case it helps someone else:
- If you're using ajax, you almost certainly want to return json or xml to be consumed by the client. - when a php file is requested, the server runs the file through the php interpreter, then returns the resulting page as html (or xml, json, whatever). Any javascript on the page will run in the client's browser after the client receives the response. If you want to return an html page with javascript embedded in it, you just put it in a tag, exactly the same as a normal html file. (because as far as the browser is concerned, it *is* a normal html file.) - To change the background color of a div, select it by class, id, etc and change .style.backgroundColor to the color you want. Read this for details: w3schools.com/jsref/prop_html_style.asp
Plain-text or markdown file would be easy to generate, but word doc files are actually a strange form of xml with some proprietary MS shit thrown in. There are a few libraries for different languages floating around, but it definitely doesn't seem like something you can do frontend only.
csv == comma separated values. It's literally just a text file with the values separated by commas. Very easy to generate programmatically. Not really anywhere near the same level of complexity.
Blake Gomez
What are you showing ads on? And how many, etc? Google analytics has some pretty good tools to figure out what kind of demographics your site is popular with, if you didn't know. Figure that out and market the shit out of it.