[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/wdg/ - Web Dev. General
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 165
Thread images: 19
File: poo-to-loo.jpg (37 KB, 651x386) Image search: [Google]
poo-to-loo.jpg
37 KB, 651x386
Last thread: >>54940626


>IRC Channel
#/g/wdg @ irc.rizon.net
Web client: https://www.rizon.net/chat

> Discord
https://discord.gg/0qLTzz5potDFXfdT

>Learning material
https://www.codecademy.com/
https://www.bento.io/
https://programming-motherfucker.com/
https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md
https://www.theodinproject.com/
https://www.freecodecamp.com/
http://www.w3schools.com/
https://developer.mozilla.org/
http://www.codewars.com/
https://www.youtube.com/watch?v=JxAXlJEmNMg&feature=youtu.be&list=PL7664379246A246CB [Embed] - "Crockford on JavaScript" lecture series.

>Frontend development
https://github.com/dypsilon/frontend-dev-bookmarks

>Backend development
https://en.m.wikipedia.org/wiki/Comparison_of_web_application_frameworks
backendDevelopmentBookmarks.md

>Useful tools
https://pastebin.com/q5nB1Npt/ (embed) (embed)
https://libraries.io/ - Discover new open source libraries, modules and frameworks and keep track of ones you depend upon.
https://developer.mozilla.org/en-US/docs/Web - Guides for HTML, CSS, JS, Web APIs & more.
http://www.programmableweb.com/ - List of public APIs

>NEET guide to web dev employment
https://pastebin.com/4YeJAUbT/
>How to get started
https://www.youtube.com/watch?v=pB0WvcxTbCA [Embed] - "WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice"
https://www.youtube.com/watch?v=zf_cb_Nw5zY [Embed] - "JavaScript is Easy" - If you can't into programming, you probably won't find a simpler introduction to JavaScript than this.


>cheap vps hosting in most western locations
https://lowendbox.com
https://www.digitalocean.com/
https://www.linode.com/
https://www.heroku.com/
https://www.leaseweb.com
>>
1st for Go
>>
2nd for Come
>>
3st for cum
>>
4 for how do I get a job
>>
5th for India
>>
6th for Trump and MAGA
>>
6th for why aren't you asleep yet
>>
>tfw got more done in 3 hours at Starbucks than a whole week at home

I guess not being able to browse image boards helps a ton, and being seen coding helps your ego and desires to continue.
>>
>>54969477
I'm unproductive everywhere.
>>
>>54969477
This is bait
>>
>>54969477
I think that it could be a social pressure thing
>>
>>54969388
Drank too much and slept all day.

Also found a bunch of cheap herman miller aeron chairs I'm looking at.
>>
>>54969502
how is that bait
>>
File: wdg-frat.jpg (97 KB, 616x435) Image search: [Google]
wdg-frat.jpg
97 KB, 616x435
guys let's start a wdg - webdev fraternity.
just a friendly group who share common wdg passion.

Requirements:
1. html, css, js
2. rest of the memeshit frameworks

What should we name it? I was thinking of just converting initials of wdg to greek but "w" has no greek equiv. pic related.

>Resume: "member of Whatever Delta Gamma"
>Github: "member of Whatever Delta Gamma"
Sounds Nice!
>>
>>54969773
Something something hipsters in Starbucks on their macs trying to look productive.

That guy is a meme.
>>
File: chrome_2016-06-07_21-55-02.png (142 KB, 1920x955) Image search: [Google]
chrome_2016-06-07_21-55-02.png
142 KB, 1920x955
I'm making an imageboard software in php.
Looking for help with the front-end/design, as I don't have an eye for such things.
As far as the back-end goes, I know it has bugs, I'm working on it. That said, pointing out bugs you notice is never harmful, only possibly redundant.
It's free to use, although I wouldn't recommend it, and the source code is available here:
https://github.com/4tran/VIB

A live site is running here:
http://4tran.bid/

Any opinions are appreciated. If you'd like to help me more extensively with my project, do let me know, as I would not turn down a competent partner.
>>
>>54969813
Im on it brah...

doctors have their own, EE's have their own, architects have their own...

Web Developers must have this!! We need to unite against pajeets!
>>
Can anyone explain what the hell is going on in this scene?

When he goes to close his account, what exactly is he doing? Why would he be doing it in code? Is he just deleting it with an sql command? That seems retarded?

https://www.youtube.com/watch?v=UdAqU4GRR9Y
>>
>>54969813
Not a bad idea.

Make some sort of online web dev fraternity where only really good web devs can enter.

Membership cards and bumper stickers. Extremely intense testing standards.

Also if you hired a recruiter to find placements and to shill the idea to businesses it would probably catch on.
>>
>>54970030

I simply cannot tell if this is sarcasm.
>>
>>54970030
>where only really good web devs can enter.
people who are not so good as long as they know css, html, js should be able to enter. Members are ranked anyways. Just like illuminati - the better they become, the higher they climb the steps. The thing is /wdg/ really needs to have a fraternity badly. People who just rip other's work a.k.a "those who ignore licenses(MIT, Apache) without proper attribution", "people who can't into google" "dipshits", "pajeets" and other "cancerous individuals" need not apply
>>
File: 9d941b6c-s.jpg (127 KB, 640x853) Image search: [Google]
9d941b6c-s.jpg
127 KB, 640x853
Can someone enlight me on front-end framework? After a shallow study of React.js I don't seem to find their utility. They seem just like yet another layer of unnecessary complexity.

But I've never made anything big, only intranet sites and a couple of small personal projects.
>>
>>54970332
>people who are not so good as long as they know css, html, js should be able to enter

>what is backend
fucking hell, is this general now a meme or what?
>>
>>54970526
agreed. I think at minimum sql should be required, as it's foundational to any web software with even moderate complexity.
>>
>>54970613
Actually, now that I think of it, I'm being quite biased.
SQL is not used in all dynamic web software.
However, a back-end is required for any real functionality.
Instead, it should require one of the following languages:
php, python, ruby, perl.
OR
javascript or any other language if they can prove that they can use it as a back-end (through the means of node.js or whatever)
>>
>>54970332
Well /wdg/ is small.

It would need to be open to everyone.

We can range block India.
>>
>>54970015
databases often have a boolean field "isActive" with true/false values

if false, then x restrictions
>>
>>54969813
Lambdadelta
>>
>>54970391
the utility of react is that the components are simply functions of props and state, and are able to handle updating themselves and their children when data changes
this means that one of the major problems, keeping ui lined up with application state, is mostly already done for you

but if you really don't like it, you could use backbone which provides utilities for accomplishing the same thing with more code
>>
>>54969839
just a suggestion: when you make a post, you shouldn't have to click to get back to the thread.
>>
can anyone point me towards an in depth look at ASP.NET mvc frameworks? More specifically: how are Html helper methods implemented, and other things of this nature.
>>
>>54969839
Code is a mess. Logic mixed with presentation, SQL queries thrown in for good measure. Eww.

I suggest you to restructure your project into a proper MVC or similar pattern.
>>
File: 222.png (172 KB, 1600x900) Image search: [Google]
222.png
172 KB, 1600x900
>>54969839
pretty neat. are you using a framework or just php?
also you should look into google captcha.
its pretty easy to implement
>>
Are there any eslint rules for maximum length of jsx components? There are people on my team who will make 800 fucking line components with clear potential for breaking up and my manager is too busy with a retarded QA team to tell people off
>>
>>54971628
what is that http request builder application anyway
>>
>>54971683
postman
>>
>>54970613
Alright fixed.

>Requirements:
>1. html, css, js
>2. any backend like php, python, ruby, perl, sql


Now somebody be a leader already! We'll go from there
>>
Read one of the stickies

>Sleeping during the day may have unintended consequences.

uuhhh, what kind?
>>
File: Capture.jpg (426 KB, 1540x671) Image search: [Google]
Capture.jpg
426 KB, 1540x671
Unsure if /dpt/ or /wdg/, but it's in the web, so here I am.

> open http://www.rainymood.com/
> view source
> see the face of satan

I'm not much of a code monkey but I have no idea how the fuck such a simple looking page can justify this much code. I don't want a line by line breakdown of whats happening but can someone tell me broadly what the fuck is going on here?
>>
Completely new to web development but have very basic HTML and CSS knowledge from high school. How good is freecodecamp as a place to start? I watched the "Watch this if you want to become a web developer video" and I think I'm more interested in the back end side of things. What would you guys recommend? How did you get started?
>>
>>54975004
It's just a minified library (jQuery). That's why it looks terrible like that. They just import it to use some of it's functions, it's not the code of an app.
>>
>>54975004
That just looks like standard minification, even if loading jquery for such a simple page is overkill
>>
All web devs projects the same.

You can master one framework and be able to do it all
>>
whats the best way to create links to articles nowadays

>article/id
>article/slug-id.html
>article/date/slug

also, using mongodb, the id field is rather unhandy
>>
>>54975630
>mongodb
kys
>>
File: you know where it goes.jpg (10 KB, 285x200) Image search: [Google]
you know where it goes.jpg
10 KB, 285x200
>>54975630
>mongodb
>>
>>54975657
its just a blog idiot. I dont give a fuck if there is a 0.00000001 % chanse of data loss
>>
>>54975664
doesn't justify using db that has literally no merits
>>
>>54975681
>>no merits
>doesnt save emty fields (save space)
>native json support
>horizontally scalable

but what do I care, fuck wdg, should have gone to google in the first place instead asking autists.
>>
>>54975169
If you actually want to get good, pick up a js book and a php book with good reviews. When they teach you a concept, implement it and make it more impressive.

Say the php book teaches you how to do simple form handling and has you print the result on the screen. Take that further and make a super simple login system using mysql or some whatever db you like. After about a year of doing bullshit like codecademy and never learning anything, this strategy is how I actually started learning shit.

Oh and you're going to be very confused at times doing projects beyond your reach. Google is your friend.
>>
>>54975708
>horizontally scala-memeing a blog
kys
>>
Recommendations for hosting a web application pls. Relatively simple, runs on Java (Spring), Postgres database. Currently just undergoing development and testing.

Is there much of a benefit to having separate servers for database and app server as opposed to both on the same server (assuming total specs are the same), especially while just testing? Any recommendations for specs? Was thinking of starting with 1 core and 2 gigs of RAM. Finally, any better option than linode?
>>
Is there a guide on testing your project's security?
>>
>>54976487
post it on /g/ and fix everything that breaks
>>
>>54976497
>/g/
>capable hackers
I think you mean /b/
>>
>>54976511
This happened some time ago. It's not about actual server security, but it still is about common security measures
>https://www.reddit.com/r/webdev/comments/4e2hn8/i_shared_my_web_app_to_4chan_and_forgot_to/
>>
File: 1464436610233.jpg (172 KB, 1024x1344) Image search: [Google]
1464436610233.jpg
172 KB, 1024x1344
I'm more of a paper books kind of guy than web tutorials guy. What books have you guys found helpful in learning? For any webdev subject.
>>
Why is web development looked down on /g/?
>>
>>54975203
>>54975214
Thanks guys, I'll google the shit out of your posts when I get home.
>>
>>54976792
Because it's far easier to learn and pays just as well as other programming jobs.

>WordPress "devs" make as much as video game programmers.
>>
>>54976792
>go to a meetup
>they're doing hands on session with raspbpi like board
>everyone is told to group up
>dude comes up to me and asks what i do
>tell him i'm a webdev
>dude goes away to find a different partner
>>
>Post resume on Dice, Indeed, and Monster
>Get 6 calls
>marketing, marketing, marketing, marketing, computer repair, wordpress content producer located 5000 miles away

This is depressing.
>>
>>54977004
You can do some hardware stuff with node.
>>
>>54976370
Digitalocean? They've worked well for me, and if you can use an academic email you can get a significant amount of free credit.

I'd say to just try setting up the full stack on one server and see if it works well enough. It's true that Java is an infamous memory hog, though.
>>
>>54976867
>tfw I'm decent at low-level programming and have a keen interest in it
>tfw find it much more satisfying
>tfw can only find work as a freelance node webdev
>>
>>54976747
Javascript the definitive guide
Exploring ES6
Code Complete
Peopleware
An introduction to parallel programming
Computer Networking
GoF
Introduction to Algorithms
Modern Operating Systems
SQL and Relational Theory
Unix and Linux administration handbook
Don't make me think
>>
How do I into AWS? There's like 100 different services, I just want to get Node and Express to Hello World my shit up.
>>
>>54978068
Google "node express aws tutorial"
Entry level google fu
>>
http://seocopywriting.com/seo-copywriting-certification-training-faqs/

Would this be of use to me if I'm going into Web Design?
>>
In javascript is there any overhead for a class that has prototype functions? For example, say I have a simple Point (x, y) class and a Vector (x, y) class. The point class does nothing except store x, y but Vector has a dozen or so prototype functions to help add/multiply/divide/etc vectors. Would there be a performance hit if I just decided to use the Vector class for all my Points even though they'd never use those prototype functions?

I think I read somewhere that prototype functions are basically a single instance that are re-used for every new instance of a class (hence needing to use the this keyword in them) but I'm not 100% sure.
>>
>>54978068
I wouldn't bother with AWS for dev, use digitalocean or vultr or another basic VPS provider
>>
>>54978864
If you are concerned about performance, why are you using Javascript for core constructs like that? They should be native code.
>>
>>54979252
> They should be native code.
I don't know what that means or how to do that. I only recently started using javascript.

Is there any overhead, though?
>>
>>54979288
>recently started using javascript
don't think about performance until it's an actual issue, tested and measured. limiting yourself from the start is a bad idea.
>>
>>54978068
openshift, free
>>
File: 1460578775854.jpg (142 KB, 463x634) Image search: [Google]
1460578775854.jpg
142 KB, 463x634
I know this will lead to some vague responses, but what are some tips for people who are just starting on the path to become a web developer? It seems to be being a freelancer might be incredibly challenging with the technology that's changing, but if you know HTML/CSS/JS it can make finding a job easier.
>>
File: 1440624720523.jpg (197 KB, 1280x1280) Image search: [Google]
1440624720523.jpg
197 KB, 1280x1280
Can you write a library less than 10 kilobytes without sacrificing structure and maintainability?

I'm working on this currently: https://github.com/Forestdev/jsRoute

It for whatever reason irks me that the main library (which includes 1 dependency bundled together) is 12 kb. I've seen smaller libraries, but they look like a fucking mess.
>>
File: 1419215199961.jpg (20 KB, 225x225) Image search: [Google]
1419215199961.jpg
20 KB, 225x225
http://rosettacode.org/wiki/Rosetta_Code

Get your new project going lads
>>
>>54979616
>Can you write a library less than 10 kilobytes without sacrificing structure and maintainability?
yep,http://vanilla-js.com/
>>
File: 1445371833109.jpg (163 KB, 980x735) Image search: [Google]
1445371833109.jpg
163 KB, 980x735
>>54979705

I need to step it up.
>>
File: andr1.png (99 KB, 1359x476) Image search: [Google]
andr1.png
99 KB, 1359x476
Why is my uploaded picture in an Android app not uploaded to my images file?

Any php webfagg who has an idea about this error?
>>
File: kebab.jpg (8 KB, 184x184) Image search: [Google]
kebab.jpg
8 KB, 184x184
>>54979829
>REMOVE QEBAB CONFIRMED
>>
>>54979829
Show the actual code giving the error
>>
>>54979705

Line 12 on createCar.php

what the fuck is up with your file naming?
>>
>>54979829
??

>>54979896
>>54979919
>>54979926


<?php
$conn = mysqli_connect("localhost","root","","android_api") or die('Unable to Connect');

$brand = $_POST["brand"];
$type = $_POST["type"];
$fuelType = $_POST["fuelType"];
$price = $_POST["price"];
$image = $_POST["image"];

$decodedImage = base64_decode("$image");
file_put_contents("images/".$image . ".JPG", $decodedImage);

$stmt = $conn-> prepare("INSERT INTO cars(brand, type, fuelType, price, imageName) VALUES( $brand, $type, $fuelType, $price, $image)");
$stmt->bind_param('sssss', $brand, $type, $fuelType, $price, $image);
$result = $stmt->execute();
$stmt->close();
?>
>>
Working on php code base and there is encoding problem.

Apache's default charset is set to utf8, php's internal encoding is utf8 and the webpage has metatag with charset utf8.

When I echo ä it will show ä in the webpage.
When I echo string that came from database that contains ä it will print the ä as question mark.

If I try same from terminal by executing php file it will show ä properly on both cases.

I could just change the pages charset to ISO-8859-1, then the page would show ä properly with strings that came from database but there is other functionality on the page with hardcoded encoding conversion form ISO to utf and back and I'm afraid that something will break.

No idea what to do. Urge to tell boss that I quit is rising.
>>
>>54980133
What encoding is your database and tables? Should be utf8_unicode_ci these days.
>>
>>54980204
It's db2 and now that I'm checking it's telling me that the table encoding is empty. But I assume it defaults to utf8 because the old guy said that they never had this problem before and they claim they have not changed anything in the database settings.
>>
>>54980204
>not utf8mb4_unicode_ci

>>54979962
You're trying to use the contents of the image as a filename.
Your code is also completely open to SQL injections and arbitrary file writes. Just thought I'd let you know.
>>
>>54980473
Thanks for your answer

but i thought
file_put_contents()


was for putting stuff in a file? Well i'm trying to use the content of my file for the creation of my file? What am I doing wrong here.

Yea I know about the vulnerabilities but it's for Android app programming, so no worries
>>
>>54980530
For file_put_contents(), the first argument is the filename and the second is the contents of the file.

Your code,
file_put_contents("images/".$image . ".JPG", $decodedImage);
tries to write a file to ./images/<contents of image>.jpg instead of an actual path.

You're also using bind_param wrong and feeding your variables directly into the query, without quotes, so if the problem above didn't happen the script would fail anyway later on.
>>
>>54980573
Okay, i'll do some troubleshooting and debugging then.


TYVM for you help.
>>
Where can I find a long list of little front end web dev projects? I'm teaching myself using FCC but I'd like to have mini projects to keep working on my skills.
>>
Gulp vs Grunt?
>>
>>54969477
Coding at McDonalds >>>>> because you're likely the only engineer there most of the time.
>>
WEBDEV CANT SYSDEV
>>
>>54969839
>it seems bumping works now

Were you not just sorting by last_bump_date ??
>>
Web developers can't program!
>>
Webdev's aren't programmers!
>>
>>54969839
If you're actually serious with this, scrap everything, learn some proper PHP and start over.

Your current code is a complete mess, makes no sense, and will be a nightmare to work with once you actually start adding features. It's worse than most existing imageboard scripts, which is really saying something.
>>
>>54981312
Are you baiting?

>disgusting grease smell
>loud niggers chimping out all hours of the day
>loud niggers behind the counter shouting orders at each other
>can't use the bathroom unless you buy something as there's a loud nigger guarding it
>nauseating elevator music
>a nigger will steal your laptop
>>
File: 1463847071685.jpg (12 KB, 499x281) Image search: [Google]
1463847071685.jpg
12 KB, 499x281
Should learn php or python for web development? Please I need answers?
>>
>>54981586
You should probably move out the hood, Jamal.
>>
>>54982134
If you live in a big city, any McDonalds built regardless of its location will somehow attract niggers, there's probably an equation for it
>>
>>54982129
not a fan of python, still... anything but PHP
>>
>>54982129
python if you want better jobs and love programming, otherwise php
>>
>windows 10 has a bash terminal

Fuck. The one thing that could actually convince me to upgrade. That would make deving on my desktop so much easier.
>>
>>54982330
if you want to shill you're better off starting a new thread instead of posting here where nobody will see it
>>
File: 1460511342297.jpg (963 KB, 1280x1280) Image search: [Google]
1460511342297.jpg
963 KB, 1280x1280
>>54982348
Yes. Also all webdevs exclusively use Macs.
>>
>>54982348
I'm not shilling. I'm actually contemplating just turning off all the telemetry so that I can get the unix terminal. It would be really useful to me and that's inarguable.
>>
>>54982330
from what I've read, it's terrible. it works, but it's terrible none the less
>>
>>54982440
Or you could dual boot with a linux distro of your choice.

Or you could run a linux VM on Windows. Vagrant makes it easy to set up a virtual development environment.
https://www.youtube.com/watch?v=PmOMc4zfCSw

A vagrant box does have some limitations tho, and can also be a pain in the ass.

Or you could pay for a dedicated linux VPS with Digital Ocean or Linode or something, and develop everything 100% over SSH in the terminal using vim or emacs... that is after you download an SSH client because lmao Windows.
>>
>>54969813

i'll design the logo
>>
What's the best way to go about separating larger files into smaller files? Say you have 1000+ LoC in a single file and want to break it down into smaller, more manageable files.
>>
File: 1454346105497.jpg (185 KB, 1920x1080) Image search: [Google]
1454346105497.jpg
185 KB, 1920x1080
Am I the only one here who hates Jquery and just use pure JS instead because it's easy to debug?
>>
>>54982633
I prefer vanilla over jquery because I don't really get jquery. It just seems to make everything more difficult.
>>
>>54982633
no, I prefer pure JS, too..
>>
>>54982552
Oh good... someone's offered to make a logo. The project is off to a FLYING start.
>>
>>54982633
I include jquery in every page just for $.ajax
>>
>>54982633
I used to... but now I switched to clojurescript. So much easier, so much live editing, so much job security.
>>
>>54982552
Obviously the beta glyph is all you'll need as a logo.
>>
>>54982678
go to your kitchen, get everything you can find from under the sink, pour all the bottles into a big jug and then drink that big bleach smoothy.
>>
>>54982725
will do, thanks for the suggestion
>>
Why is picking a backend language to dive deeper so fucking hard?
>>
>>54982526

Not him but in my setup, dual booting is actually more of a pain in the ass, and using a VM sounds intriguing.
>>
>>54982796
Go is quite easy: https://tour.golang.org
I do have problems learning other langs, mostly because I think learning shitty langs/frameworks is mostly a was of time... but that's me, no idea about you

>>54982827
if you are into IT/tech in general, you should be using VMs for many things already
>>
>>54982796
Probably because there are so many choices.
>>
>>54982851

I know. It's crippling.
>>
>>54982851
What languages are use majorly for backend?
>>
>>54982849
>is mostly a was of time
*waste

>>54982888
java, C#, vb... and related, jsp, vb.net, asp and so on
then there is php, js, ruby, python, go, etc.
nice trips
>>
>>54982923

I'm between js, php and java, actually.

I think I'll start with js because it's inevitable.
>>
>>54982965
Js is pretty easy and quite enjoyable. Just stay away from jquery during your learning phase
>>
What is the smallest/simplest client-side JS templating library?
It's just for changing some form fields depending on a selection.
>>
>>54982965
do you know how to program? if so, I'd suggest learning Go, seriously
>>
>>54983012

I'm planning to do the least amount of jQuery.

Right now I'm "scanning" a list of bootcamps for their curriculums so I can shape my own.
>>
>>54983012
>Just stay away from jquery during your learning phase

W-why? Asking for my friend.
>>
>>54983891
It encourages bad habits. You can use jQuery for expedience but you should know how to do everything in vanilla JS, first.
>>
What should I learn to get a job?
>>
>>54984328
how to write a (nice) CV
>>
Any good resume examples?

One guy was talking about showing examples of my stuff in the resume itself.

I need a job to feed my investments.
>>
>>54982671
I'll make the website.

WordPress and boobstrap ok? :^}
>>
How do I double select in SQL? I have a table called messages. The fields are:
-- id (Primary)
-- sender
-- recipient
-- date
-- sender_delete
-- recipient_delete

Lets say the sender is John and the recipient is Mary, How do I display all the messages that have been sent between them?
Was thinking:
SELECT * FROM messages WHERE sender = 'John' AND recipient = 'Mary' UNION SELECT * FROM messages WHERE sender ='Mary' AND recipient = 'John'


That works but I don't know if there's a more efficient way to do this.
>>
File: Screenshot_2016-06-08_20-53-34.png (16 KB, 944x149) Image search: [Google]
Screenshot_2016-06-08_20-53-34.png
16 KB, 944x149
How would i embed the latest tweet from a feed?
something like pic related for example
>>
>>54984884
SELECT * FROM messages WHERE ((sender = 'John' AND recipient = 'Mary') OR (sender = 'Mary' AND recipient = 'John'))
>>
>>54984884
>WHERE sender = 'John' AND recipient = 'Mary'
it's been a while since I dabbled with sql... but I guess this should work:

... WHERE (sender = 'John' AND recipient = 'Mary') OR (WHERE recipient = 'John' AND sender = 'Mary')
>>
>>54985033
Twitter API
>>
>>54985044
bah, too late... plus, this use parentheses better

>>54985061
>OR (WHERE
err, remove that WHERE
>>
>>54985044
>>54985061

Thanks guys, much better than what I had.
>>
LADS, ITS HAPPENING. I have a phone interview tomorrow! Junior Dev/Designer $40,000 - $50,000.
>>
>>54985400
Remember in tech interviews there are often several rounds of interviews. Congrats on beating the trash man though.
>>
Hi Fellow /wdg/ Delta Gamma bros

Whats the vanilla js equivalent of these 2 snippets:

A:
$.ajax({
method: "GET",
url: "js/ajax/name.js",
dataType: "script",
cache: true
}).done(function () {

});


B:
$(document).ajaxStop(function () {

});
>>
>>54985400
Ignore >>54985526

Great start. Hope you get it.
>>
>>54982678
>I include jquery in every page just for $.ajax
Same here. Cross-browser vanilla-js ajax solutions are tedius as fuck. Is there a place where we could just select/customize the jquery components to include? Just like the bootstrap customization page
>>
Anyone here use FullCalendar? What do you think of it? Is there a better option for a display-only calendar API/library?
>>
whats the deal with the slide animation in js? I put margin on a div and the slideUp animation starts from the original location of div instead with the margin. how can I fix this?
>>
>>54985400
Awesome. Hope you nail the interview and land it.

My time SOON.
>>
>>54985889
>>54982678
Have you tried something like superagent or reqwest?
>https://github.com/visionmedia/superagent
>https://github.com/ded/Reqwest
>>
If I make a mix between twitter and facebook could I finally get a job somewhere?
>>
>>54985617
Thanks!

>>54986214
Thanks man. All the best with your opportunities too.
>>
Where the fuck do you guys get your ideas for projects? I can understand how to use certain back-ends but I can't come up with projects to actually apply what I've learned.
>>
/dpt/

Shit flinging discussions on pooo in the loo languages

/wdg/

Comfy discussions on white languages and frameworks
>>
>>54985578
Google you don't need jquery it might include an equivalent to it but I'm too lazy to check
>>
I'm writing a userscript to autoplay gifs and webms.
My problem is getting webms to expand correctly, if you click on them, the thumbnail disappears and the 4chan extension's ImageExpansion functions don't trigger as they should.

function autoplay_images()
{
var imgs = document.getElementsByClassName("fileThumb");
for (var i = 0; i < imgs.length; i++)
{
if (imgs[i].href.indexOf(".gif") > -1) /* GIF */
imgs[i].firstChild.src = imgs[i].href;
if (imgs[i].href.indexOf(".webm") > -1) /* WEBM */
{
var thumb = imgs[i].firstChild;
var webm = document.createElement('video');
webm.setAttribute('src', imgs[i].href);
webm.setAttribute('poster', thumb.src);
webm.setAttribute('style', thumb.style.cssText);
webm.setAttribute('autoplay', 'true');
webm.setAttribute('loop', 'true');
webm.setAttribute('preload', 'auto');
webm.onclick = function() {
window.open(webm.src);
};
imgs[i].replaceChild(webm, thumb);
}
}
}

autoplay_images();
>>
>>54975630
the best way to do article links is to have a hash that always links to it and cointain tags or the headline from the article.

for example you have article with the headline "arnold is running for president."

then the optimal way to be representing it in a link would be something like:
site:article:hash as follows
website.com/article/arnold-president-bb5dc8842ca31d4603d6aa11448d1654
the article in question should be accessible by this hashed url or the has alone.
this helps immensly with search engines and will make maintaining databases much much easier in the long run.
either use a routing framework to achive this or some reverse proxy like nginx.
Thread replies: 165
Thread images: 19

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.