[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 Development 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: 255
Thread images: 27
File: 1461994594448.png (868 KB, 822x552) Image search: [Google]
1461994594448.png
868 KB, 822x552
PHP is alright edition

>Last thread
>>54302144

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

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

>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/
http://www.freecodecamp.com/
http://www.codewars.com/
>Crockford on Javascript
https://www.youtube.com/playlist?list=PL7664379246A246CB

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

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

>Useful tools
https://pastebin.com/q5nB1Npt/
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
http://www.youtube.com/watch?v=pB0WvcxTbCA [Embed]
Good videos on the channel too
https://www.youtube.com/channel/UCVTlvUkGslCV_h-nSAId8Sw

>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
>>
>>54338529
Anyone use front-end functional programming libraries like Ramda? Underscore is gay btw
>>
http://www.ecu.edu.au/degrees/undergraduate
Can anyone go through those degrees and tell me which would best fit someone with prior web development skills, I am looking to start a career in web development also.
>>
CSS beginner here with some questions.

Do the majority of sites today still used float-based layouts? Is it recommended to still use this technique?

Should one use flexbox/grid already?
>>
I like PHP
>>
I want to know why wordpress sucks specifically. Is it the speed? The security? Or is it just because it has a huge popularity so it's easy to find shitty websites on it too? There are some big sites that are using it though, some news portals also, CNN is one of them, etc.

I don't get it. Keep in mind I don't have much exp with it and didn't use it for anything but a blog/portal for one of my courses (yes, part of it was centered around wp, kill me i guess). I just want to understand. People shit on joomla, but not on the wordpress. I don't want to become a pajeet then. Based on /g/, it seems like I'm surrounded by pajeets, from colleagues to lecturers. Just fuck my education up senpai.
>>
>>54338856
You should learn how to use both. But floats are still the most popular technique to do things.

>>54339115
Wordpress doesn't suck. People just don't update it and install shitty plugins with vulnerabilities. After which those installations get hijacked for spam. But considering almost a quarter of the internet runs on Wordpress that's to be expected. Surely only a fraction of the Wordpress installations are maintained.
>>
>>54339161
Alright, both it is then.

Another frontend question. What learning resources are there for advanced CSS, stuff like Codepen animations, etc.

Do you you have to get on that level through trial-and-error or is there a common resource available? All I've found are basic stuff, like w3schools, etc.
>>
>>54339252
Well, Mozilla Developer Network is the best resource for learning css. But it doesn't have a course for learning css animations yet. So no idea.
My own css animations so far have been done by trial and error.
>>
File: 1461511578179.jpg (21 KB, 640x480) Image search: [Google]
1461511578179.jpg
21 KB, 640x480
>>54338529
>>54338881
>no one took the b8
>>
>>54339764
I actually like PHP.
>>
Guys i need help with Sublime Text before I switch to something else

All I want is a smart CSS autocomplete. In Coda, if you're in a css file and type
display: 
you get valid css autocomplete for the display property. Sublime text is literally dunce in this regard and no plugin seems to solve it. Snippets do not solve it.

Does Atom or something else do this?
>>
I kinda want to add parallax for my header image. I am currently using that one popular parallax library. I didn't include jquery nor used and js/css frameworks because I wanted to make this site super lightweight. Now I would have to break that rule by including the jQ in for the parallax to work. It's nothing much, just the content slides over the header a little bit, like twitter. I don't see what's so bad about that. But anyway, is it worth it? Is jQ really that heavy?

You know that feel when you try some bling and then without it the design feels cheap and empty. I've falle for it now. Don't know what to do.
>>
>>54339924
If it's literally just to move the header when you scroll then just code it yourself for that once instance. If you want to reuse the effect with different setting throughout the site then just use jq and the plugin.
>>
>>54339890
Atom does auto complete. I've never had an issue with the suggestion. Also if you're on Linux Bluefish editor has a great auto complete
>>
>>54339764
>>54339782
And I also genuinely like PHP
>>
>>54339924
Parallax is like the gullwing doors of websites. When done well, it can be cool, but usually it's just tacky and unnecessary.

Also, if you use a large image, it can seriously impact your page load which is annoying and hurts page rank (if you care about that.)
>>
Does anyone have any experience with transferring domains between registrars?

I want to transfer a domain from a shitty greek registrar to dynadot and asked them for the auth code, they gave me "0~4^'uk0", is this a valid code? It looks unusual.
>>
>>54340015
I do. I'm building some news portal in WP for my course project, btw, I have just a few posts but I literally didn't get a single visit in a week. Seems kinda weird, but it's my first time having something on the web so I don't know what to expect.

And I guess I can code parallax by hand then.
>>
File: 1379151067561.gif (2 MB, 310x325) Image search: [Google]
1379151067561.gif
2 MB, 310x325
>>54338529
So /wdg/, a relative of mine is starting a business consulting firm and wants me to build websites for clients. Assuming most of these sites will be done in either Wordpress, Drupal or Rails, how much should I charge?
>>
>>54339890
There's something fucked up with your installation then, because Sublime does autocomplete in CSS for me, and it does it pretty well.
>>
>>54341089
The Drupal devs where I work charge about £350 a day
>>
File: 1394838879532.jpg (57 KB, 386x371) Image search: [Google]
1394838879532.jpg
57 KB, 386x371
>>54341291
That's a little over $500 according to Google, about what I had in mind. I was thinking of starting there and marking up the price based whether or not the site will make ad revenue.
>>
I have few radio checkboxes and have their value displayed on a canvas, but it only displays the default checked value, when I change value from checkboxes it remains the same in canvas, what am I missing?


var values = document.getElementsByName('checkbox');

for(var i = 0; i < values.length; i++){
if(values[i].checked){
var display = values[i].value;
}
}
>>
>>54341446
No idea pal.
>>
>>54341446
jsfiddle or jsbin it so we can help.
>>
>>54341017
>but I literally didn't get a single visit in a week
Did you tell anyone about it? People don't find out about shit by telepathy.
>>
>>54341446
post all of the code
>>
>>54341507
>>54341566
here you go http://jsfiddle.net/gu28uo1k/ , and yes I know I can do the same with changing html content but I need it with checkboxes
>>
>>54341509
Not yet, I didn't finish it yet. I'm strictly talking about visitors coming from google search or other outer sources. Only my group and a lecturer currently know about it. I have to improve my seo too, from what I've tested I get scores around 65-75%. I got a double amount of visitors outside of my country, but they got away instantly (it's in my native language anyway). Interested how they found it though.
>>
>>54341598
you need to run the code that draws the checkbox name on the canvas every time one of the checkboxes changes, you can't expect it to magically change by itself.

https://jsfiddle.net/fxmaa6px/
>>
>>54341799
thanks a lot friend !!
>>
How do I make an image gallery CMS with an admin panel for uploading/deleting (in PHP and MySQL?). Can anyone point me to tutorials or maybe some scripts that do what I want?

I want to learn how this is done, including thumbnail generating and all that
>>
>>54339161
>and install shitty plugins with vulnerabilities
Literally all of them. Fucking CloudFlare put an intern in charge of their plugin and one of the updates he put out broke literally everything and anything with no rhyme or reason. Also, have you ever tried developing for wordpress "properly"? If you want to build anything front facing on the admin side you're going to need to spend days trying to fill in the blanks in their incomplete documentation
>>
>>54341931
I think there might be a few WP plugins that do exactly that. Their source code should be available.
>>
>>54339115
Web developers don't learn web development in school. Either they come from a CS background and learned it on their own, or they just had enough free time to sit on /g/ all day and piece together a list of what not to do from our constant complaints about different web technologies
>>
>>54339782
people hate on php because its easy to learn and is often written by retards.

however, masterfully written php is orgasmic
>>
>>54341931
Pretty simple stuff. You can learn all of it by looking at any imageboard script's source
>>
>>54341991
Is it really though? Older languages like Perl have more syntactic sugar and fit in better with modern web dev standards. Meanwhile most PHP based stacks are still glorified CGI scripts, even with a framework

I don't understand why anyone would use PHP if they had a choice
>>
How would you go about reading names from a text file and inserting each field into a database using stupid assed php
>>
>>54341931
basic thumbnailing with php is really easy, here's the code from an imageboard I was working on a while ago

$thumbsize = [100, 100];
$sourcepath = "./source.png";
$thumbpath = "./thumb.jpg";

$sourcesize = getimagesize($sourcepath);
$sourcecanvas = imagecreatefrompng($sourcepath);
$thumbcanvas = imagecreatetruecolor($thumbsize["width"], $thumbsize["height"]);
imagefill($thumbcanvas, 0, 0, imagecolorallocate($thumbcanvas, 255, 255, 255));
imagecopyresampled($thumbcanvas, $sourcecanvas, 0, 0, 0, 0, $thumbsize[0], $thumbsize[1], $sourcesize[0], $sourcesize[1]);
imagejpeg($thumbcanvas, $thumbpath, 90);
imagedestroy($sourcecanvas);
imagedestroy($thumbcanvas);
>>
>>54341946
My own (travel) website is based on wordpress. I made my own theme because that child theme nonsense was just bothersome.

I also did notice a lot isnt properly documented. Especially everything regarding comments is a clusterfuck.
>>
File: 1455583541591.jpg (31 KB, 600x450) Image search: [Google]
1455583541591.jpg
31 KB, 600x450
>>54341969
>>54341994
WP is really fleshed out, so are imageboards. I was hoping for the minimalistic amount of code needed for it to work standalone. It really means a lot to me, but if digging through random people's spaghetti code and hoping I'm looking at the right part is the only way to do it. Then I suppose I will..
>>
>>54342018
plz stop
>>
>>54342047
Nice, this is really clear and I understand it. How do you handle filenames? Also what do you put into the database? I'm assuming you separate the filename from the typetype (png, jpg, gif), then concatenate it later when you want to display it back?
>>
>>54342091
>so are imageboards
They really aren't
>>
>>54342036
$names = file_get_contents("names.txt");
$names = preg_split("/\\r?\\n/", $names);

foreach($names as $name) {
// assuming you're using pdo
$query = $db->prepare("INSERT INTO faggots (name) VALUES (:name)");
$query->bindValue(":name", $name);
$query->execute();
}


>>54342128
For filenames on disk I use md5 hashes which is usually the best option to avoid problems (4chan uses timestamps which is a problem because if two people post an image at the exact same time, one of them might be overwritten).
I split the filename and extension (validated with some mimetype checks obviously) and store them seperately in the database.
>>
>>54342128
>Nice, this is really clear and I understand it
That's because you aren't looking at the code that's doing the actual work. Maybe things have changed but I don't think getimagesize(), imagecreatefrompng, etc., are part of PHP's standard library. He or someone else had to write the code behind them
>>
>>54342178
Timestamps and a random 3 digit number appended at the end
>>
>>54342178
md5 on the original filename right? That makes sense, pretty good idea. Thanks

>>54342186
O-oh
>>
>>54342264
No, the actual md5 checksum of the image itself.
>>
>>54342178
Thanks, I'll give this a go. The way we've been doing it in uni involved writing mysqli_query($conn, $Sql) is this different from the PDO
>>
>>54342186
Those image functions are part of PHP's GD library, which is included in most PHP installations. Most imageboards including 4chan use it for thumbnailing.

https://secure.php.net/manual/en/book.image.php

>>54342198
Actually it's just a timestamp in miliseconds (from php's microtime() function)

>>54342264
>md5 of the filename
That's retarded.
I meant the md5 of the file contents (use md5_file($path) for this)
>>
>>54342286
Don't expect to learn anything useful programming wise at school. CS is all about math and theory. You learn programming languages and design patterns on your own time
>>
>>54341991
>>54342018

That's probably because writing any language masterfully is orgasmic.
>>
>>54341931
I can share you my script, but it's pretty bad.

>it was my first PHP page.
>>
>>54342308
I've quickly come to realise that, basically paying 9000 quid to get PowerPoint slides read to me
>>
>>54342286
Mysqli works but pdo is much better, you should switch to it if you can.
>>
File: 1443422587352.gif (146 KB, 300x375) Image search: [Google]
1443422587352.gif
146 KB, 300x375
>>54342303
Is md5ing the contents how 4chan detects duplicate images being posted?
>>
>>54342303
>Most imageboards including 4chan use it for thumbnailing
Most of what I've seen utilizes imagemagick. I'm not sure what 4chan uses now, but I have a large portion of Yotsuba's source from 2009 and I can double check for you if you want.
>Actually it's just a timestamp in miliseconds (from php's microtime() function)
I remember hearing otherwise. Also Wakaba definitely doesn't do this, and practically everything out there today has code derived from Futabally and Wakaba (you'd be surprised how many newer imageboard scripts are just Perl rewritten for whatever language the script is in), even if they were supposedly "written from scratch and free of Futabally cruft".
>>
>>54342356
Should've done CS at a good uni. With all the threads making fun of IT and "Web Development" majors you should have known better
>>
>>54342370
Yes. It stores them as a data-* attribute in the images, you can see if you inspect element on your image.
>>
>>54342338
Sure, I can cum by very precisely tickling my penis with a feather, but there are easier and better ways to achieve orgasm
>>
>>54342348
I would love that. Even if it's bad, as long as it's main purpose is that one thing I asked for then I can learn from the code
>>
>>54342370
4chan uses MD5s but runs them through pack() and base64_encode to make them smaller.

>>54342381
The 4chan code leaked like 6 years ago uses GD for thumbnailing and microtime() for filenames (I'm looking at it right now), they might have changed it since then though. Other scripts like tinyboard give you the option to choose between GD and Imagemagick.
>>
>>54342464
>4chan uses MD5s but runs them through pack() and base64_encode to make them smaller.
That was a fun one to figure out when I was writing my 4chan archiver
>>
First of all, sorry because most probably this has been answered already hundreds of tiems, but anyways, it is my first time in this general because i want to learn a bit of wd

Django (Python) or Ruby On Rails

What would you say is better and more powerful and why, also, any other alternatives? (no php, or jsp already know them)
>>
>>54342443
Admin gallery - http://pastebin.com/weXwfQaW
Gallery w/ thumbnailing - http://pastebin.com/TW1kbU2z

I tried to warn you. I wrote this 4 years ago as part of my first PHP page.

the user_handle.php takes the $_GET and bans if the session privilege is admin or mod level (1 or 2), it also unlinks the images from the folders and destroys the row in the db so it doesn't display broken images.

It looks god awful and I would never make anything this bad anymore, but it works.
>>
>>54342682
>http://pastebin.com/TW1kbU2z
Thank you
>>
>>54342615
> this has been answered already hundreds of tiems
It has

>What would you say is better and more powerful and why
Believe it or not, there is no single 'best' language / framework / whatever, just different tools for different jobs. It really depends on what your needs are, what language(s) you know, what your existing codebase is using already (if you're working for the man)

>any other alternatives
Tons. Other than Django, RoR, and the java/php frameworksm some other big players are Node (javascript) and ASP.NET (C#). And then there are backend frameworks for basically every language that can run on a server.
>>
>>54342400
Not that guy but I'll mention my case.

I'm in a third (last year of bachelors here) year of multimedia studies, (I've seen that it is also called new media or digital media). Basically, I didn't know what to expect when I enrolled, I was studying something else in a parallel. Anyway, circumstances led me to pursue just this for two years. The program is what is expected from this kind of study. I had courses in general design, web design, a couple on frontend and backend, even some digital marketing, also, video production and postproduction and two in audio engineering. Some will say it's shit, some will say it's great - I'd give it a 5/10 desu, at the end I am not satisfied really much with it, even though it is considered the best in my country and wider. It seems like it is extremely easy to get a job and they have connections with big agencies here though.

Anyway, that's where I ended up. So yeah, around 70% of it was web, and I learned about web and not CS. Maybe I fucked up, maybe I didn't but now it's over. The that thing I'm now considering is studying something else, or at least wait for a 1-2 more years (masters). Master's studies on the other hand have a lot of business courses, more audio/video, and ofc, a couple on 3D.

The feeling of jack of all trades sucks. It seems that I'm quite good in all of them, but it would be better to specialize for something. When I look back, I can't say I would pick CS though, since I'm more interested in everything else desu, but oh well, it is what it is.

Sorry for the blog. I felt the need to share and let it off my chest.
>>
learning bootstrap and have a problem with border on hover
when I put the mouse on a img, the img gets smaller by 1px on every side.. how do I stop it.. tried it with
* {
box-sizing: border-box;
}

but it doesnt work

 img:hover {
border: 2px black solid;
}
>>
>>54344542
Post a jsFiddle, or tell us more about the code. Are you sure you are using just Bootstrap and no custom CSS that could affect the img styling?
>>
>>54344542
try http://www.w3schools.com/css/css_outline.asp
>>
>>54344671
>>54344808
nevermind it works now, probably a bug in the live preview
>>
>>54338529
hey wanna beat some lammers? go to infojobs.com.br, and open an account and search for IT jobs. CDCYBER, the Brazilian NSA... uses this site to exchange the office, because the base is a fake office,and changes the phone number everyday.
>>
>>54344939
Sorry, but wat?
>>
ASP.NET is it a meme?
If i want to learn something relevant what would it be?
>>
>>54345482
Learn to go back to the early 00's when ASS.NET was still relevant or learn how to get a job at some dusty old megacorperation that still uses it.
>>
So I've been playing with Node.js/Express, and started making routes for this website I'm making.

So I use Postman to test the HTTP methods, and they all work fine. But when I use Chrome, POST requests with forms become broken and it suddenly doesn't work.

So how do I go about making forms work Express?
>>
>>54346230
They work just like regular forms. Make sure the form attributes are correct. Should be something like:
<form action="/foo" method="post">

where "/foo" is the location you want to POST to. Also, if you're uploading files, you need to include:
enctype="multipart/form-data"
>>
>>54338529
I can't figure out fucking node, npm, or any of that other crap.

Can someone PLEASE show me a basic index page that successfully incorporates/uses this library: http://excelbuilderjs.com/index.html

[pic related]
produces:
Uncaught Error: Module name "lodash" has not been loaded yet for context: _. Use require([])
http://requirejs.org/docs/errors.html#notloaded

in the js console

I literally can't even get to the first line of code, because the libs are all fucked
>>
Ubuntu is so fucking stupid. If I want to drag and drop a file into the /usr/ directory then I should be allowed to.

End of story.

I shouldn't have to sudo cp everything from a terminal or change ownerships making everything vulnerable. Not even gksudo nautilus allows me to do shit.

No wonder no normie uses this shit.
>>
>>54346395
Yeah, I have the form all correct it seems, its just using a basic login system, with a username/password.

It seems to be that in Postman, it send the data with "application/json", but the Html forms send with "application/x-www-form-urlencoded".
>>
>>54346472
Just give up and go back to Windows :)
>>
>>54346494
>send the data with "application/json", but the Html forms send with "application/x-www-form-urlencoded"

That's normal. Are you using body-parser to get the contents of the POST?
>>
>>54346472
UI = abstraction = casualization = normies ree et cetera

t. /dpt/ poster
>>
All right guys how do i make quick 200 bucks online
>>
>>54347036
>quick
Don't know.
>>
>>54347036
Sell your kitchen table and chairs.
>>
>>54347036
Grease up that boipussi
>>
>>54347100
>>54347065
>>54347060

well fuck greasing my boipussy, thanks
>>
I'm wanting to sell a Twitter follow/favorite/retweet bot, but everything is done on the backend and I don't want Twitter to ban the server IP.

What's an alternative?
>>
File: 1382229357173.gif (3 MB, 800x450) Image search: [Google]
1382229357173.gif
3 MB, 800x450
I need to re-design my website, but I'm feeling completely uncreative.

How do you get inspired design-wise /wdg/?
>>
There was a website posted in one of these threads (I think, or it was posted on /gd/ but pretty sure it was on here) that had minimal and repeated backgrounds good for site backgrounds.


Anybody know what I am talking about?
>>
>>54348027
nevermind I found it:

http://subtlepatterns.com
>>
>>54348014
http://mediaqueri.es
http://dribbble.com

That's where I get inspiration to create shit.
>>
Mayyyn, Rails is so abstract I feel like I won't be able to do anything outside of tutorials. Literally magic. Is the node like that too? First time learning some framework like this. I'll learn node one day, but since I'm already half way through rails tutorial it's stupid to stop now. Just... I don't know, I have a hard time remembering all of this. Also, installing gems and using methods which are doing everything for you is making me feel like a Rajesh Mahabivkari. Literally taping things together. Is this a normal workflow in web dev??
>>
am i supposed to feel useless in my first day of work? i managed to write about 6 lines of code. i was mostly chasing files trying to understand how things were glued to each other in this big-ass project. i don't know if i'm way over my head or if this is what it feels like to work. it's entirely different when i'm building apps from scratch.. i pretty much know exactly what to do. but here i feel like i don't know anything
>>
>>54349023
If you're on a new codebase and a new framework/language, sure. Your colleagues should explain the layout of the codebase to you though, assuming it's not documented well (hahaha, I jest)

Also a decent IDE can usually indicate how things are glued together somewhat
>>
>>54347060
what about slowly?
>>
>>54342286
hey mate UWS? ;)
>>
So just what is ASP.NET?

Visual Studio is the IDE.

C# is the language (or Visual Basic, F#, etc.)

ASP.NET MVC is the auto-generated code framework which follows the MVC design pattern.

But what is ASP.NET itself? Is it a bunch of C# commands and methods that are bundled into any ASP.NET project at creation, just like JQuery provides for JavaScript?

Is it some magic that happens to your code when it is compiled to turn text like [HTTP POST] into actual code?
>>
Is there a simple general explanation of all the meme technologies and buzzwords? ( aspnet, nodejs, django, angularjs, frontend, backend, etc.etc)
Web dev is so confusing there are so many "frameworks" and shit.
>>
>>54349608
First few sentences of any Wikipedia article is what I use.
>>
Anyone know if there is a monitor that can take 2 hdmi inputs and you can switch between them at will?

I have trouble deving with my ubuntu box way over there. I can't dev at a 45 degree angle.
>>
>>54349694
can't you do it over the network using vnc?
>>
>>54348703
I tried to learn Rails a while ago but I just couldn't get into it for some reason. Never particularly cared for ruby either for that matter.

I've been working with node for a couple of months now and I like it a lot better. It took me a bit to get used to node's asynchronous callback shit, but once I got it, I really started enjoying it.

>Literally taping things together. Is this a normal workflow in web dev??
To some extent, yeah. Why reinvent the wheel? If you want to make stuff that's not an unreadable bloated mess of spaghetti code, you still need to know what you're doing.
>>
>>54346472
http://askubuntu.com/questions/44418/how-to-enable-root-login
>>
What should I make?
>>
>>54349932
a random waifu selector
>>
>>54349536
https://en.wikipedia.org/wiki/ASP.NET

It's a backend web application framework. It's kind of like Express for NodeJS or Laravel for PHP.
>>
>>54349694
Buy a 5 dollar switch
>>
>>54350147
Or hub. Whatever you wanna call it
>>
File: 1462171494939.jpg (921 KB, 1835x2750) Image search: [Google]
1462171494939.jpg
921 KB, 1835x2750
>>54349952
How would I populate my database with waifu characteristics? I'd need personality traits, favorite color, birth date at least.

I'm not passionate enough about waifus to do it desu,
>>
>>54346472
sudo setfacl -m u:tommy:rwx /usr/;
sudo setfacl -d -m u:tommy:rwx /usr/;
>>
File: 1421464412974.png (1006 KB, 3489x4000) Image search: [Google]
1421464412974.png
1006 KB, 3489x4000
>>54350167
>>54349952

crowdsource it.

create the world's premier user-generated waifu database and invite NEETs and other waifufags to populate it for you using intuitive and clean web interfaces. You can call it waifudb.moe and host it on said site.

[spoiler]That will be $500 USD for consultation.[/spoiler]
>>
>>54350649
fuck I keep forgetting about nospoilers
>>
>>54338881
we all do, my friend.

it just gets better & better, too.
>>
Do link shorteners make the site slow to load?
I found in the main controller of my app something like that:
    public static function url_shortener($target)
{
file_get_contents('urlshortenerlink/api.txt?url=' . $target);
}

This is called 7+ times in the home page. Could this be the reason the site is slow as fuck?
>>
>>54351283
*return file_get_contents
>>
How's python for web development? I don't have any webdev experience but I need to make a couple site-based tools that require some backend software.
>>
>>54351467
Flask
Django
Pick one
>>
>>54351283
If you're actually making 7+ http requests, that would probably slow your page down quite a bit. Just getting the contents of a file generally isn't slow unless the file is huge or something.
>>
>>54341611
You're gonna need some links on major blogs & forums before you even start to see real results from google.
>>
>>54341991
> Semicolons
> Orgasmic

Pick one.
>>
>>54351283
The fuck kind of url shortener is that?
>>
>>54351719
I changed it because 4chan thought it was span
>>
thoughts on w3schools?
>>
>>54352274
its ok
>>
>>54351467
flask is pretty comfy
>>
Where can I learn how to code my own wordpress themes?

I know nothing about PHP if that means anything. I only know how to make static sites with HTML/CSS/Bootstrap
>>
>>54352274
It's horrible and not up to date. Use MDN or official W3C standard docs.
>>
>>54338529

Today I learned to use a certain library to create excel files.

Which is good, because my employer loves excel spreadsheets for some reason.
>>
How can I learn html to the point where I can make a good looking website using only html and nothing else?
>>
Is Udacity a good program, or Udemy? Any of those?
>>
File: 1461362790639.jpg (192 KB, 616x960) Image search: [Google]
1461362790639.jpg
192 KB, 616x960
>>54352274
I fucking love it.
Learned JQuery in 1 day on that site
>>
>>54353057
Too make a good looking website will also require CSS at the bare minimum.
>>
>>54353057
In this day and age, it is pretty much impossible to make a good looking website with just HTML.

CSS is necessary to make any decent looking page.

Now. If you include the right libraries, (like the bootstrap classing system), you can make decent looking webpages without having to write much CSS yourself. You'll basically just be creating webpages with some <div> soup, and using the class="thing" attribute to denote what kind of "component" this is.

I'm the guy from: >>54352928
Look how little HTML/CSS it took to create the bulk of the page: [pic related]

Start Here: http://getbootstrap.com/css/
Then here: http://getbootstrap.com/components/
Then here: http://getbootstrap.com/javascript/


Then check some of these out: http://getbootstrap.com/getting-started/#examples

And have some fun.
In the grand scheme of things, web development is probably easier now than it used to be. You just gotta approach it differently from the old days.
>>
>>54353161
So disgusting.
>>
>>54353186
Damn, I thought I was the only one.
Javascript is meme tier now
>>
>>54353153
Can't I just use style tags?
>>
File: lets-talk-profit.jpg (104 KB, 692x530) Image search: [Google]
lets-talk-profit.jpg
104 KB, 692x530
>>54353186
I made 5 grand by selling a custom website to Universal, how much profit are your projects producing?

Hating on widely-adopted technologies doesn't make you superior, it just makes you obtuse.
>>
All I care about is money. I don't give a shit what I learn, I just want a lot of money.
>>
>>54353238
<style>
div.myPanel { min-width: 500px; min-height: 3em; }
</style>


Is equivalent to CSS. Style is merely the tag which contains CSS. If you know how to use the style tag then you know CSS.

Same goes for the style attribute:
<div class="myPanel" style="min-width:500px; min-height:3em;">
<img src="/whats-happening.png">
<p>This totally happened</p>
</div>
>>
>>54353239
Good for you. It's still fucking disgusting to look at.

>>54353238
Alright I'm done here
>>
File: 1461368582863.png (149 KB, 499x499) Image search: [Google]
1461368582863.png
149 KB, 499x499
>>54353239
>Universal Studios
>5k

I'm doing mine for non profit because I'm not a money laundering jew
>>
>>54353314
I tried being homeless once.

Decided it wasn't for me. Now I work for profit. I'm never going back.
>>
>>54353280
That's fine. I meant using elements on html only even if it is technically CSS. I really want to get a hang of html without focusing too much on css.
>>
>>54353342
I have no idea what distinction you're making here. What is the difference you see between putting CSS in a script tag and putting CSS in a stylesheet?
>>
File: 1441493090446.png (78 KB, 219x241) Image search: [Google]
1441493090446.png
78 KB, 219x241
>>54353359
Nothing.
>>
>>54349932
Something like meatspin
>>
>be systems programmer
>try to webdev
>shit's impossible

Trying to figure out all these arbitrary frameworks built on top of each other is a pain in the ass.
>>
>>54338529

Hi guys. I posted a thread about this before I noticed there was an active PHP thread. So here it is again - I'm trying to create an SQL function that makes it so you can insert information into a table but only when you are admin. The problem is, my admin 'userid' is in my 'users' table, and the information I want to be able to insert is in the 'comments' table, so when I try to post something it says I cannot because of a foreign key confliction. tldr - is there a way to reference multiple tables in one SQL statement? My latest unsuccessful attempt at this is as follows - ""INSERT INTO `comments` (`title`, `post`, `postdate`) VALUES ('$title', '$post', CURRENT_TIMESTAMP) REFERENCES `users` (`userid`)";"
>>
>>54338529

All you fags who always claim you don't have any ideas for a website: I got something for you.

Supercell Thunderstorms (tornados) & Spouts (water, land, fire)

Please create me a website that explains the different kinds of Tornados/Spouts, shows some pretty pictures and/or videos, and generally captures why people like me get real hard for tornadoes.

https://www.youtube.com/watch?v=P04BpqvYBq4
https://www.youtube.com/watch?v=66Yte03B3Lo
https://www.youtube.com/watch?v=3mGteUFDBlc
https://www.youtube.com/watch?v=S-UPAcKNvII

Have some fun with this one. Make it beautiful. Report back in the morning.
>>
File: two_cuties.webm (357 KB, 640x640) Image search: [Google]
two_cuties.webm
357 KB, 640x640
What does someone put on their portfolio project wise? Just site examples showing you know what to do or what? I'm curious.
>>
File: FU.jpg (57 KB, 640x430) Image search: [Google]
FU.jpg
57 KB, 640x430
>>54353526
Fuck you, I'm not doing your homework unless you pay me.
>>
>>54354021
I would put anything that's not completely ugly or NDA'd up. You want to show what you can do and any piece of your work shows that.
>>
>>54354072
So would even hobby projects count?
>>
>>54354021
>something you can make look good
>something that's fun to play with to amuse HR monkeys
>something that makes use of a diverse range of technologies
>something with a demonstrable function such as hitting APIs
>>
>>54354094
totally. if someone can look at it and get a general idea of your skill level then it's good. The most important thing is to at least have something at all.
>>
>>54354112
>>54354104
Alright, many thanks guys.
>>
>>54354120
No worries. Make sure you have them in public repos so people can look at the work
>>
i'm at my wits end

in jquery how can i delete the content of a table before i generate a new table? when i press a button it generates a table with a tbody, then when i press it again i want it to delete that so when i create a new table it doesn't just append to the end of my last table.

this is my table appending:
            $("#relatedSites").show();
$.each(data['competitorInfo'], function(index) {
$('#relatedSitesTable tr:last').after("<tr><td>" + data['competitorInfo'][index]['title'][0] + "</td><td><a href=//" + data['competitorInfo'][index]['url'][0] + "><font color=#464E51>" + data['competitorInfo'][index]['url'][0] + "</font></a></td></tr>");
});


and this is my table:
                <div id="relatedSites" class="col-md-12">
<h3 style="margin-bottom: 0; margin-left: 0.5%;">Related Sites</h3>
<table id="relatedSitesTable" class="table">
<thead>
<th>Site</th>
<th>Link</th>
<th></th>
</thead>
<tbody>
<tr></tr>
</tbody>
</table>
</div>
>>
>>54354692
nonce apologist
>>
>>54354692
Not sure what you want, but can't you not remove() the last tr of your table, and then append the generated line in your table?
>>
>>54353430
it is called a JOIN.
>>
>>54354692
>jQuery
>2008+8
ishygddt
>>
I really dont understand how to write safe code. To be more specific, I dont understand how to sanitize code. I'm new to this and the examples on how to write it are confusing.

Is it as simple as
$inputfield = get()
$filteredcontent = htmlspecialchars($inputfield)
echo $filteredcontent

?
>>
File: PrtScr capture.jpg (65 KB, 859x505) Image search: [Google]
PrtScr capture.jpg
65 KB, 859x505
>>54355231
Yeah, it's so old and obsolete. Nobody uses it anymore.
>>
>>54355331
This is not really sanitization, this is escaping. And that's good: you need to escape your external input each case you'll insert the somewhere.

Escape it for HTML display (htmlentities, etc)
Escape it for SQL insertion (prepared statements, etc)
Escape it for shell (escapeshellcmd, etc).

You can try sanitize your data with various filters (make sure it's real email, length of strings, etc) but it may leave security holes you didn't think of. So always escape it.
>>
>>54355454
That makes sense.
>>
Can you guys rely to me microjobs? like 3-4 dlls assignments
>>
>>54355454
Manually escaping and prepared statements for SQL are not the same thing. Escaping is fragile, prepared statements are always the best approach for security.
>>
>>54338881
>hacked together so some random goy can make his personal home page
what could go wrong?
>>
>>54353239
so much this.

while you simpering faggots go on about how bootstrap is too heavy for 4GLTE at 60Mbps I make an extra 10-20K a year having fun in my spare time most smoking weed and doing design.
>>
I have to learn backbone js for my new job next month but of all the frameworks out there I thought this was the least used? should they transition to something newer such as react or angular?
>>
>>54357057
Backbone is still fairly popular, not as "on trend" perhaps. It's much more light-weight than React or Angular, gives you more freedom to make your own choices rather than prescribing a route.

If your new job has a large codebase in Backbone why should they waste time to transition to current_trendy_framework unless there are real defined benefits? It's not broken.
>>
Have a question, if anyone cares to help.

Writing a small website for someone I personally know, using Node.js back end.

The guy was going to use a paid WordPress before I talked him out of it.

What's the easiest way to go about creating a system for him to edit/add content to his website?

At the moment, I'm playing around with the idea of having a password protected edit page, with input boxes for all the text editables, and using a .json file on the server to write this to/read from when serving the page.

This works perfectly so far, but surely there is some better way to do this? Unsure if it's a dumb strategy.
>>
>>54354038
Who gives "Tornado Website" homework?

Bitch, I'm just a guy who loves it when nature gets pissy. Love to watch her throw her tantrums.
>>
>>54357299
does your friend really need a NodeJS backend application though?
>>
>>54357353

I use Node for all backends. Just what I find easiest. No express, just a file server, with caching, etags, gzip and some other stuff.

The website also handles some galleries which I've handled the upload for in a different way.
>>
>>54354692
<table class="myTable">
<thead></thead>
<tbody></tbody>
</table>
<script type="application/javascript">
$('.myTable > tbody').empty().append([
$('<tr>').append([
$('<td>').text('stuff'),
$('<td>').text('more stuff'),
$('<td>').text('last cell')
]),
$('<tr>').append([
$('<td>').text('stuff'),
$('<td>').text('more stuff'),
$('<td>').text('last cell')
])
]);
</script>
>>
If I only want to make meme webapps for fun, how far would a HTML/CSS + Meteor + Django get me?
>>
>>54357299
So you're writing a custom CMS with Node from scratch, rather than letting the guy use the well-established and user friendly Wordpress?

You're daft, you don't even seem to know how to make a CMS yourself. Just let him use Wordpress rather than re-inventing the wheel. Hope he's not paying you for this unnecessary effort.

Wordpress is easy to write themes for if he wanted a custom appearance, otherwise just use the thousands of cheap templates you can purchase.
>>
>>54346788
I am, but I can't seem to get it working with urlencoded forms, even if extended: true is on.
>>
>>54357512
The problem with wordpress is that he wanted something very specific, which could not be done with any themes. A very expensive one may have done something similar, but would have needed a lot of tweaking, to get to somewhere only half as good.

This would have been on the .com version, not .org.

The website is fairly static too, only needing changes for things like new prices, or changing descriptions, etc

>you don't even seem to know how to make a CMS yourself

I don't, and this wasn't requested, I am just thinking of ways to make it easier for him to change content, as he expected to have to edit the html text
>>
>>54357563
Fair enough, but still think you could have learned to make a custom Wordpress theme yourself quicker than making a custom site.

With changing content, normal practise is to use a Javascript WYSIWYG editor plugin like CKEditor to replace the textarea fields in the form. You can heavily restrict the buttons/formatting the user is allowed to access, so they don't screw up the styling.
>>
>>54357428
Well, you need HTML/CSS for basically anything that even smells like web dev, so there's that. You also need to know javascript (at least to some extent) to use AJAX and whatnot.

Django Unchained is good if you need a backend MVC framework and want to use python.

Meteor is kind of an all-in-one javascript thing though. You write one application with client-side and server-side parts and it does all the db stuff in one big blob. It's kind of okay for babby's first web application, but it has some issues. You're better off just adding libs/frameworks when you need them imo.
>>
>>54357607
Yeah, that CKEditor seems like it could make things a lot more user friendly, and give them a fair bit more control.

Thanks for telling me about it, I'll see if I can implement it.
>>
File: 1461636176715.jpg (207 KB, 755x1341) Image search: [Google]
1461636176715.jpg
207 KB, 755x1341
>>54357428
meteor and django are pretty big, do you really need SSR or a turing complete MVC(tm)?

better option imo is to use vue.js for the frontend stuff(extra meme cred since no one uses vue) and write the backend in Golang so /g/ ridicules you every step of the way.
>>
>>54357517
show us a code snippet of your form and the post handler that seems to be the problem.

>>54357563
>The problem with wordpress is that he wanted something very specific, which could not be done with any themes.
I seriously doubt that. WP is php shit, but it is pretty flexible.

>This would have been on the .com version, not .org.
You do know you can download and self-host WP, right? It's just a bunch of php files. Just get the cheapest shared plan from namecheap or something with a LAMP stack and install it. It's like 1/5th the cost of running a node app. If you're stuck on the idea of making it a node app, there are already plenty of CMSs that exist for it. Why not use one of those, or at least get some ideas from it. No need to make things more difficult on yourself for no reason.
>>
>>54357691
>>54357634

Thanks for the answers.
I can already script in python, javascript and create basic HTML/CSS. Even dabbled in jQuery and Angular. So even though I'm a newb, I'm not starting from scratch.

I would just like to run some small projects, nothing too fancy nor startup worthy. Apparently Meteor has a very friendly learning curve, that's what attracted me to it.

So, are you saying I wouldn't need django if I use Meteor? Does it handle all of the server side if I'm just doing basic stuff?
>>
>>54357730
login.jade
extends layout

block content
h1 Login

form(action="/login" method="post")
div
label(for="username") User Name
br
input(type="text" id="username")
div
label(for="password") Password
br
input(type="password" id="password")
div
input(type="submit")



index.js
router.route('/login')

.post(function(req, res, next)
{
console.log(req.body);
});


I literally just have to down to the POST request handler, and it still wont get the body of the data from the form
>>
>>54357756
they're both end to end solutions, the difference is django is backend focused(or rather just plain unfocused, its more a CMS than a framework tbqh), whereas meteor is much newer and being js designed for frontendfags.

either one is fine, depends what language you feel more comfortable in i guess.
>>
>>54357756
>So, are you saying I wouldn't need django if I use Meteor? Does it handle all of the server side if I'm just doing basic stuff?

It's been a while since I've messed with meteor, but that's correct iirc. It automatically comes bundled with MongoDB. It should be fine for a small hobby project, but just be aware that it doesn't scale well at all if you make something that you intend people to actually use.

If you're already familiar with js, you might want to look into using node as well. It's pretty easy to get into.

>>54357777
your inputs don't have names
>>
>>54357825
Thanks!
>>
>>54357856
Holy shit, how did I miss that.

Thank you so much man, I would have went insane lolol
>>
>>54357607
Ffs, dont suggest WP for something its obviously not meant.
>>
anyone here finished all freecodecamp courses ?
>>
>>54358311
I finished all the frontend ones, then did the backend api ones and stopped because the rest of it wasn't finished.
>>
>>54358311
freecodecamp itself hasn't finished all the courses yet
>Coming Soon :^)
>>
>>54358348
Does it give good frontend skills or is it just a big meme?
>>
Found myself a potential freelance gig and I'm not sure what to charge. I'd basically be building a glorified scheduling web app for a driving school. I'm contracting myself through an LLC, so they have no idea that its just one autist working on their shit whenever I feel like it. What should I charge? I came up with $8400 assuming we had 3 devs working on the project at at average hourly rate of $20 (according to government statistics that's lower than the median) for about a month. Does that seem reasonable?
>>
>>54358466
I already had some frontend knowledge when I started, so I can't say for sure whether it does a good job of teaching you starting from nothing, but the projects and js exercises are definitely good practice.
>>
>>54357691
Well I do wear a lot of flowery shirts. Also how is C++ anything like Perl, Python, or R? I'm a Perl developer primarily and I'd never touch C++ if given the choice. Only time I've ever used it was in school
>>
File: 22973772255_7a3955c621_k.jpg (788 KB, 2048x1298) Image search: [Google]
22973772255_7a3955c621_k.jpg
788 KB, 2048x1298
>>54358692
>Well I do wear a lot of flowery shirts.
Where the hell do you buy these clothes? Pic related, I've seen two people with this shirt in my life and i think it's fan fucking tastic.

As for your question, I didn't make the pic, it's likely just arranged to trigger as many people as possible.
>>
>>54358743
I'm not sure. I think I got a bunch at Express, but I didn't have much going on in my life at that time and barely remember it
>>
>>54358311
"Tic tac toe" is under the advanced category and in a google interview they ask you to do implement tic tac toe that plays by itself for a warm up question. Wut.
>>
Is anyone using spring here and if so can point me to a good learning resource ?
>>
>>54358529
Anyone?
>>
>>54358529
People really pay 8400 bucks for that??
>>
>>54358862
I don't see how this surprises anyone. "Coding" and computer science are not the same thing. Knowing your way around a single programming language isn't nearly enough to build anything of significance
>>
>>54358942
I use Spring framework in my job. Best resource is the book "Spring in Action" (version 4), often referred to it when I was learning.

Official documentation is good but doesn't really demonstrate how everything fits together.

>>54358529
How much you charge depends on your perceived value and the financials of your client, not related to the task really.
>>
>>54339890
If you're starting from a new file, save it as a css file and then it will do css autocomplete you dipshit.
>>
>>54359006
>Official documentation is good but doesn't really demonstrate how everything fits together.

yeah it felt more like a syntax overview to me, not much good examples there

>spring in action
I assume it is this one: https://www.manning.com/books/spring-in-action-fourth-edition ?
>>
>>54358982
Yeah it might be a bit much. I guess I didn't take into account that this hypothetical team would have other projects that should help pay the bills as well. I'm not really sure how I'd derive a fee taking something like that into account though. I've never been in charge of sales or anything financial really. This is my first time doing anything other than taking orders and throwing frontend stuff at our intern of the week
>>
>>54359034
Yes, that's the book.
>>
Trying to get this PHP working keep getting a parse error when running it. I know Jsfiddle isn't the best place to put it but here it is https://jsfiddle.net/cqgshmvm/1/
>>
>>54359100
maybe I should have asked this first, but is it worth to learn spring or are the other frameworks on the horizon that could replace spring ? (only talking about java)
>>
>>54359122
Does PHP even support multi-line strings like that?
>>
>>54359122
Forgot a "break" in your switch.
>>
>>54359150
Don't think that would cause a "parse error", if that's even a thing
>>
>>54359122
>>54359164
Found it: remove the word "function" in your echo function colour_text()
>>
>>54359122
Damn this shit is so bad i dont even know where to start.
>>
>>54359136
Spring is still the most popular. It's very extensible and flexible - it uses standard POJOs a lot, you can combine it with other libraries without much effort. Definitely worth learning imo.

e.g. You can use plain JDBC with Spring, or use an ORM, and if you choose an ORM there are many which are compatible, doesn't have to be Hibernate for example.
>>
>>54359220
thanks for the answer and the advice, DI and spring looks kinda weird but I think I'll get used to it
thanks anon
>>
>>54359215
I am pretty shit like
>>
>>54359212
Thanks, it seems to have caught an undefined variable (assume it means the $result in the html at the bottom) and given me a notice. Any idea how to fix that?
>>
>>54359351
It's because when you send the form, it doesn't go through your else, so your $result var is not set, hence the error.
>>
>>54359351
>>54359371
Basically, instead of echo'ing in your if, you want to give the return value of your colour function in your $result var.

>$result = colour_text();

Don't forget to remove the $result = blabla in your function and write return instead.

Vars inside functions have their own scope.
>>
>>54358989
Here you learn "front end development" but you'd not pass a google interview for front end development nor in any other bigger company.
>>
>>54359482
what do you need to know for such companies ?
>>
>>54341991
I dont understand why people even use PHP anymore when you have minimalist frameworks like Sinatra, Flask, Express, etc
>>
>>54359551
Because frameworks aren't the same thing as a programming language? I'm not a fan of PHP myself but there are plenty of PHP frameworks that mimic Sinatra and Flask
>>
>>54359535
Check out their interviews, there's even one good reddit post on it. Basically algorithms, you have to write some algorithm, explain it and suggest how you would scale it, then e.g. invert a linked list, implement you own atoi() function, bs trees, then they ask you a little about how web works, servers, protocols etc. I can't remember the rest, but this is all for a warm up. After that, (I think it depends on the country), you go through all of that again, 1 or times with a different interviewee, and then the final stage is a full day of interviews. Even before all of that is a phone interview btw.

Pretty "scary", yeah. I guess I'm a lost hope because I study webdev instead of a CS, I should either kill myself or start from the first year after this because there is no way in hell I want to work like a pajeet, moving pixels and installing basic CMSes, I really don't deserve it.
>>
>>54359581
>I'm not a fan of PHP myself but there are plenty of PHP frameworks that mimic Sinatra and Flask
thats even more weird, why would you use a microframework implemented in PHP instead of a language that is more extensible and DSL-like like Python, Ruby, JS?
>>
>>54359428
I appreciate your help, but I still can't do it . Simple lack of knowledge I'm afraid
>>
>>54359630
All of that is covered in a basic data structures class. I'm at a shitty community college and we went through all of it in a single semester
>>
>>54359630
Relevant. Those sorts of interviews are bullshit - as recent graduates are more likely to pass that seasoned software developers who are longer out of academia
>>
>>54359630
*1 or 2 times with a different interviewer

Btw actually I think that tic tac toe is not for a warm up, but still, you get like 30-45 minutes to write it. Most of them fail that miserably.
>>
>>54359428
It's echoing the word out but not in any colour
>>
>>54359702
Yes, you do lack knowledge, I can tell by your code. But you just have to learn. It's all chinese at first. Go browse the websites linked in the first post. Don't give up.
>>
>>54359746
I plan on learning, thanks
>>
>>54359737
Write a "break;" after each case in your switch.

      switch ($_POST['colour']) {
case 'bk': $colour = "black"; break;
case 'rd': $colour = "red"; break;
case 'be': $colour = "blue"; break;
case 'yw': $colour = "yellow"; break;
default: $colour = "black";
}
>>
>>54354072
>I would put anything that's not completely ugly
Almost all of my creations on my portfolio are functional but ugly. If I'm not applying to be a designer, does it even matter if my work looks pretty?
>>
>>54359709
It's true, yeah. Unfortunately my study didnt have it, but software engineers did. But that IS something you can learn by yourself easy.

But don't forget that was really just a first step in the interview process to weed out people that dont know anything (like me :( ).

Btw is khan academy decent enough for starters? I mean, I am familiar with data structures and search algos, but don't know shit about analysis and scaling. It seems like it is very shallow though.

I watched some harvard's algos by that one indian lecturer and it was great, I understood things easily but couldn't solve shit in the assignments though...
>>
>>54359783
I'll do that now thanks
>>
>>54359896
Another mistake I came across was in your returned string in your function, you used single quotes but put a variable inside it. If you want to do that, you need to use double quotes. Otherwise, you'll have the same problem I had: it'll literaly display $word.
>>
>>54359783
That did it, thanks everyone who helped out
>>
>>54359122
function colour_text($a, $b) {
$c = array('bk'=>'black', 'rd'=>'red', 'be'=>blue'', 'yw'=>'yellow');
return in_array($a, $c) ? '<div style="color: ' . $c[$a] . ';">' . $b . '</div>' : '' ;
}
>>
any tips for working from home? i'm thinking all i need is a timer so i know when to stop
>>
>>54360582
>stopping
lel, keep working to get projects done faster and so you can be recognized as a good goy
>>
>>54360784
i have to watch hentai and study too
>>
What's a good text editor like Sublime but free? Sublime is great and I have no problem paying for it later, but right now I'm broke and need something to use in the mean time.
>>
>>54361162
I use Notepad++ for Windows. And Atom for Linux / cross platform.
Thread replies: 255
Thread images: 27

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.