Web Dev Questions That Don't Need Their Own Thread v4
5,001 replies, posted
Maybe it's time to pick up Node.js then. I have a lot of experience with JavaScript, although is Node.js something that will look good on your CV? How many agencies these days will be looking for experience in Node.js versus PHP or Java.
What do you guys think of JSP? I've recently fallen in love with Java and I really don't want to go back to PHP for web development.
[QUOTE=Banana Lord.;43291015]What do you guys think of JSP? I've recently fallen in love with Java and I really don't want to go back to PHP for web development.[/QUOTE]
I have no experience with JSP at all but you've basically answered yourself! If you're in love with Java and in war with PHP, go for it. There's nothing to lose by trying it out. Be sure to tell us how it is! [img]http://www.facepunch.com/fp/ratings/heart.png[/img]
[QUOTE=Shadow801;43289028]Maybe it's time to pick up Node.js then. I have a lot of experience with JavaScript, although is Node.js something that will look good on your CV? How many agencies these days will be looking for experience in Node.js versus PHP or Java.[/QUOTE]
From what I have gathered with the representatives of the various companies that visited our University about a month ago, it's not as much what you know. But that you know how to learn quickly and on your own. When hiring they do not expect a professional able to churn out projects at a fast pace. But a quick and able individual, being able to learn what they want you to learn.
This was in Germany. (HFU to be precise.) So perhaps for the UK it's to take with a grain of salt.
[QUOTE=Banana Lord.;43291015]What do you guys think of JSP? I've recently fallen in love with Java and I really don't want to go back to PHP for web development.[/QUOTE]
I prefer to have full control over my markup, but as long as you don't go down the route of using something like PrimeFaces, I guess you'll be okay.
[QUOTE=Shadow801;43303583]I prefer to have full control over my markup, but as long as you don't go down the route of using something like PrimeFaces, I guess you'll be okay.[/QUOTE]
Can you explain what you mean by this please?
for some reason php isn't working on my web server after moving the folder where apache looks for files. I moved it from /var/www to /home/server/public_html. I've gone to /etc/apache2/mods-available/php5.conf and uncommented the lines which disables running php in user directories.
server is running debian
[QUOTE=PredGD;43312256]for some reason php isn't working on my web server after moving the folder where apache looks for files. I moved it from /var/www to /home/server/public_html. I've gone to /etc/apache2/mods-available/php5.conf and uncommented the lines which disables running php in user directories.
server is running debian[/QUOTE]
No errors? Maybe you forgot to change a line, check over the apache httpd.conf file.
Is there a simple way to fetch the latest video by someone on YouTube?
Grab it from their API
http://gdata.youtube.com/feeds/api/users/<username or userid>/uploads?max-results=1
[URL="https://developers.google.com/youtube/2.0/developers_guide_protocol_audience"]
More info[/URL]
Could any of you give me some link where I could learn php,java , they could also be youtube links.
[QUOTE=BoowmanTech;43314739]Could any of you give me some link where I could learn php,java , they could also be youtube links.[/QUOTE]
Could go with [URL="http://www.codecademy.com/dashboard"]Codecademy[/URL] for some PHP.
If you like videos more there is a whole [URL="http://www.youtube.com/user/TheFreecourses"]YouTube channel dedicated for learning[/URL]. And one of the courses is [URL="http://www.youtube.com/playlist?list=PLvRMjkCT20cGdxEqTdGP30fXuz1d_G4LJ"]PHP fundementals[/URL].
Hey Webdevs
Got a problem with jquery - here's a bit of my code:
[code]
<head>
<script>
$(function() {
$( "td" ).click(function() {
alert("a");
});
});
$(function() {
$( "input" ).click(function() {
alert("b");
});
});
</script>
</head>
<body>
<table>
<tr>
<td>1. <input type="checkbox"></td>
<td>2. <input type="checkbox"></td>
<td>3. <input type="checkbox"></td>
<td>4. <input type="checkbox"></td>
</tr>
</table>
</body>
[/code]
When I click the input checkbox both of the click functions are executed - I would like only the appropriate function to be run. Eg. only alert "b" when I click the checkbox, not both "b" and "a".
This is the first time I've ever done anything with jquery, and I don't know much about HTML, so please excuse (and tell me about) any errors or stupid things I'm doing. Thanks
Edit:
Figured it out
[url]http://api.jquery.com/event.stoppropagation/[/url]
[QUOTE=I am a noob;43315902]Hey Webdevs
Got a problem with jquery - here's a bit of my code:
[code]
<head>
<script>
$(function() {
$( "td" ).click(function() {
alert("a");
});
});
$(function() {
$( "input" ).click(function() {
alert("b");
});
});
</script>
</head>
<body>
<table>
<tr>
<td>1. <input type="checkbox"></td>
<td>2. <input type="checkbox"></td>
<td>3. <input type="checkbox"></td>
<td>4. <input type="checkbox"></td>
</tr>
</table>
</body>
[/code]
When I click the input checkbox both of the click functions are executed - I would like only the appropriate function to be run. Eg. only alert "b" when I click the checkbox, not both "b" and "a".
This is the first time I've ever done anything with jquery, and I don't know much about HTML, so please excuse (and tell me about) any errors or stupid things I'm doing. Thanks[/QUOTE]
It's because the inputs are inside the td, and [URL="http://jsfiddle.net/G5AKU/"]you click both[/URL] (it seems)
Any suggestions on HTML5 wrappers for mobile applications?
[QUOTE=TrinityX;43314025]No errors? Maybe you forgot to change a line, check over the apache httpd.conf file.[/QUOTE]
no errors that I know of at least, where would those be stored?
also where would I find httpd.conf on debian? I knew where it was located back when my server was running arch
[editline]27th December 2013[/editline]
wait hold on, php is suddenly working again. that's weird.
wondering though, would this
[code]<html>
<head>
<title>php testing</title>
</head>
<body>
<?php
echo "hi fuck u";
?>
</body>
</html>
[/code]
translate into this when on site?
[code]
<html>
<head>
<title>php testing</title>
</head>
<body>
hi fuck u
</body>
</html>
[/code]
[QUOTE=PredGD;43320823]no errors that I know of at least, where would those be stored?
also where would I find httpd.conf on debian? I knew where it was located back when my server was running arch
[editline]27th December 2013[/editline]
wait hold on, php is suddenly working again. that's weird.
wondering though, would this
[code]<html>
<head>
<title>php testing</title>
</head>
<body>
<?php
echo "hi fuck u";
?>
</body>
</html>
[/code]
translate into this when on site?
[code]
<html>
<head>
<title>php testing</title>
</head>
<body>
hi fuck u
</body>
</html>
[/code][/QUOTE]
No it becomes this:
[code]
<html>
<head>
<title>php testing</title>
</head>
<body>
hi fuck u
</body>
</html>
[/code]
[QUOTE=PredGD;43320823]no errors that I know of at least, where would those be stored?
also where would I find httpd.conf on debian? I knew where it was located back when my server was running arch
[editline]27th December 2013[/editline]
wait hold on, php is suddenly working again. that's weird.
wondering though, would this
[code]<html>
<head>
<title>php testing</title>
</head>
<body>
<?php
echo "hi fuck u";
?>
</body>
</html>
[/code]
translate into this when on site?
[code]
<html>
<head>
<title>php testing</title>
</head>
<body>
hi fuck u
</body>
</html>
[/code][/QUOTE]
Yes.
[QUOTE=Goz3rr;43322645]No it becomes this:
[code]
<html>
<head>
<title>php testing</title>
</head>
<body>
hi fuck u
</body>
</html>
[/code][/QUOTE]
No it doesn't.
[QUOTE=Jelly;43323348]
No it doesn't.[/QUOTE]
Huh, didn't know it takes on the indentation of the <?php ?> tags.
Hey, so i have learnt CSS and HTML and want to learn JavaScript and PHP, I was just wondering which language I should learn first. Cheers.
javascript
[QUOTE=Heroku;43323740]javascript[/QUOTE]
Why javascript and not PHP. I am kinda confused and not sure which one I should learn. I started some php but not sure what is the difference between them.
[QUOTE=BoowmanTech;43324769]Why javascript and not PHP. I am kinda confused and not sure which one I should learn. I started some php but not sure what is the difference between them.[/QUOTE]
php is server side. Javascript can be clientside or serverside(node).
Javascript is the thing that lets you interact with a page. You can make stuff move, have sorting, reordering, games, drop down menus. Once you have a basic understanding of javascript learn jquery, its a plugin someone has made for javascript making it easier to use.
[QUOTE=BoowmanTech;43324769]Why javascript and not PHP. I am kinda confused and not sure which one I should learn. I started some php but not sure what is the difference between them.[/QUOTE]
The move between PHP or JS when coming from HTML/CSS is a choice you have to make yourself, I got some basics done with JavaScript before I went with PHP.
[QUOTE=Goz3rr;43323383]Huh, didn't know it takes on the indentation of the <?php ?> tags.[/QUOTE]
It's the tabs before the opening php tag which make the printed text indented.
I'm trying to put that two-liner CSS flex code that someone posted in the previous page in What Are you working on... But I stopped to think about compatibility.
So I started checking my page's analytics and I went to the browser section.
Apparently IE is the third browser... Ngh, whatever. IE9 and later can handle basic stuff, and actually handle flexboxes, great!
Then I saw that 60 less users were using IE8 (not supported, craps itself).
And then,
7.0 21
6.0 2 :suicide:
What's the worst IE version you've seen being used on your pages?
[QUOTE=Coment;43337759]I'm trying to put that two-liner CSS flex code that someone posted in the previous page in What Are you working on... But I stopped to think about compatibility.
So I started checking my page's analytics and I went to the browser section.
Apparently IE is the third browser... Ngh, whatever. IE9 and later can handle basic stuff, and actually handle flexboxes, great!
Then I saw that 60 less users were using IE8 (not supported, craps itself).
And then,
7.0 21
6.0 2 :suicide:
What's the worst IE version you've seen being used on your pages?[/QUOTE]
IE5.5, fortunately it was just me cocking around in a Windows ME virtual machine.
For IE6 and below I just disable the site's regular stylesheet and stick up a warning:
[code]
<?php if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.')): ?>
<!--[if lte IE 6]>
<div id="iewarning">
Warning: Your web browser is seriously out of date, a security risk and not standards compliant.
If it's your computer upgrade to a later version or install Chrome or Firefox,
if it's not your own computer nag the person responsible for it till they do.
</div>
<!--<![endif]-->
<?php endif; ?>
[/code]
I use both the user agent string check and the conditional comment so that it doesn't get applied to browsers that are just spoofing IE6's user agent string and it's not being sent to everyone.
Hello !
I've being redoing a part of my website where I can post links for me to share. I've been moving from a full PHP model to a part PHP part Javascript one. Unfortunately, the current version consumes much much more system ressources and, as a result, the browser will quickly die after browsing 5 or more pages.
Here a link to the [URL="http://saming.fr/links/script.js"]main script[/URL], the [URL="http://saming.fr/files/quark.js"]modest library[/URL], and the [URL="http://saming.fr/links/"]full page[/URL].
I'm aware that loading all the images at once is a big part of the problem, and I'm trying to move away from that, but I think that my coding style is deeply flawed; I'm just too unexperienced at the moment to see where I went wrong.
I'm will happily take any and all hints as to why my code is bad and, more important, how to improve it.
Thanks in advance.
[URL="http://facepunch.com/showthread.php?t=1250244&p=43372169&viewfull=1#post43372169"]EDIT: Solution posted here.[/URL]
[QUOTE=saming;43358613]Hello !
I've being redoing a part of my website where I can post links for me to share. I've been moving from a full PHP model to a part PHP part Javascript one. Unfortunately, the current version consumes much much more system ressources and, as a result, the browser will quickly die after browsing 5 or more pages.
Here a link to the [URL="http://saming.fr/links/script.js"]main script[/URL], the [URL="http://saming.fr/files/quark.js"]modest library[/URL], and the [URL="http://saming.fr/links/"]full page[/URL].
I'm aware that loading all the images at once is a big part of the problem, and I'm trying to move away from that, but I think that my coding style is deeply flawed; I'm just too unexperienced at the moment to see where I went wrong.
I'm will happily take any and all hints as to why my code is bad and, more important, how to improve it.
Thanks in advance.[/QUOTE]
Your modest library can be replaced with jQuery entirely.
Also, just a general tip since I can see that you are making a lot of functions; if you're not planning on re-using them then there's not really any point in having them. I can't say that I know if it affects the load time at all by using functions but personally I never use functions, not named one at least in javascript.
Instead I use these functions(my terminology sucks so I don't know how to identify these functions).
[code]$("element").click(function() {
// Do stuff
});[/code]
At first glance I'd just recommend overall that you rewrite all of it using jQuery or maybe a more fitting library for a project like this.
Sorry, you need to Log In to post a reply to this thread.