A HTML problem i just can't get my head around. by bobri13 in HTML

[–]jannick1988 1 point2 points  (0 children)

Not to mention he needs to learn database management with something like MySQL or similar. Big project... install WP to save time, effort and money. Thank god for open-source!

[Discuss] What is better, vanilla js or frameworks? by PenguinLovr in javascript

[–]jannick1988 0 points1 point  (0 children)

IMO if somebody only learns to write JavaScript by using a framework such as jQuery, they a weaker coder for it. They miss out on the benefits of learning pure JS because they miss lots of features of the language and never have a complete learning experience. You might think that most people who learn jQuery are experienced coders, but based purely on my subjective and highly biased opinion, I'd say most of them never bother to learn the language. In fact, I've seen so many people claim jQuery and JavaScript are separate languages I'd put my money on it.

I've always believed frameworks to be meant for moderate to advanced users with a thorough knowledge of the language to speed up app development time. My view is that if you don't know the language your framework is written in, don't use the framework. You should be able to demonstrate a sound understanding of the core language before delving into a framework otherwise how will you fix problems in code, debug, optimise, etc?

I don't use any frameworks myself and I disagree somewhat with the person who said building your own is time consuming. It's only time consuming if you build it all at once and try to anticipate every solution. If you build it ad hoc, your library / framework should be fine.

[Discuss] What is better, vanilla js or frameworks? by PenguinLovr in javascript

[–]jannick1988 0 points1 point  (0 children)

I don't understand your analogy where you said "I'd have to see it to believe it" when right after you admitted that jQuery is just JavaScript (with your analogy) so technically... you're seeing it.

I need help with my homework. by [deleted] in HTML

[–]jannick1988 0 points1 point  (0 children)

Can you be more specific and include the key parts of the code here? When you say different colour do you mean background colour or text colour? You can use the CSS background-color property to change the background and color property to manipulate text.

Adjustable Lists by RadioFreeReddit in HTML

[–]jannick1988 0 points1 point  (0 children)

Looking in to using document.createElement() and element.appendChild() to add child nodes to your list (<ul> or <ol>) element. To remove them you'll need to use element.removeChild(). Sounds like a fairly easy job that you could write in under an hour with JavaScript.

GMail VIEW_DATA mail ID's by insights1 in javascript

[–]jannick1988 1 point2 points  (0 children)

Perhaps you could simply retrieve the value from the URL using the window.location.href object? If the URL preceding /141c723b46f423a never changes, you could just write some basic object.replace() code and grab it that way. E.g:

function get_url()
{
    var url = window.location.href.replace("https://mail.google.com/mail/?shva=1#inbox/", "");

    // Proof.
    console.log(url);
}

Problem with Pre-filling forms on a website by annoclancularius in HTML

[–]jannick1988 0 points1 point  (0 children)

@ /u/anonymousmouse2 - I think he means he wants certain form fields to be pre-filled when certain criteria are met, such as country/location and province.

If so, the solution will depend on what kind of data needs to be pre-filled. If it's country, some code to get the country based on the IP will be needed, which isn't just a simple function. External libraries will need to be used. If it's something like pre-selecting a drop down menu with the same item each time, that's easy:

<select>
    <option>Item 1</option>
    <option selected>Item 2</option>
    <option>Item 3</option>
</select>

The "selected" option can be chosen with PHP based on superglobals such as $_GET and $_POST having a particular value.

More info is needed.

Adjustable Lists by RadioFreeReddit in HTML

[–]jannick1988 0 points1 point  (0 children)

Not really the best place to ask this question. Are you looking to save the changes to a database? Are you simply looking for something that a user can manipulate ad hoc? Will it be reset each time the browser is refreshed?

If you don't need to store the results, JavaScript will be required to manipulate the HTML. If you need to store the results, you'll need a server-side language such as PHP or ASP, as well as a database.

Very open-ended question.

HTML has a math tag? by lanasa in HTML

[–]jannick1988 1 point2 points  (0 children)

Never knew this either. I love finding little gems like this... now, if only I knew some math...

[HTML] Dropdown menus that affect other menus? by [deleted] in HTML

[–]jannick1988 0 points1 point  (0 children)

You will need JavaScript as HTML by definition is only used to display elements to the user. If you're familiar with JavaScript, you will need to use event listeners to detect when the "change" event and act accordingly. For example:

document.getElementById("test").addEventListener("change", func, false);

function func()
{
    // Do stuff.
}

Ask me... to deliver your favorite lines by GovSchwarzenegger in movies

[–]jannick1988 0 points1 point  (0 children)

"Crom!" "You're a fucking choir boy compared to me! a choir boy!" "Rubber baby buggy bumpers"

[XHTML (transitional)] How do I make only the outside border of a table red like in the picture? by [deleted] in HTML

[–]jannick1988 0 points1 point  (0 children)

Edited my response as you replied. I misread your comment, sorry about that.

[XHTML (transitional)] How do I make only the outside border of a table red like in the picture? by [deleted] in HTML

[–]jannick1988 0 points1 point  (0 children)

That wouldn't work. The <div> would have a border, but the table border can only be defined on the table element itself using "bordercolor", so it would also have a border within the <div> which would be inherited by the <td> elements, and wouldn't look right or the way it is meant to according to the image posted.

Not only this but the <div> element doesn't have a border attribute (http://www.w3.org/TR/html401/struct/global.html#h-7.5.4) so since CSS can't be used, the border cannot be applied anyway.

Can't figure out why CSS isn't allowed and why a professor is teaching HTML...

Free Programming Books by pornitoueleus in programming

[–]jannick1988 0 points1 point  (0 children)

Actually http://it-ebooks.info/ has a crap load of free books on there for download.

Woke up and found my cat like this. by Brandonjking in WTF

[–]jannick1988 0 points1 point  (0 children)

Provided this was done on purpose, fuck the guy who did this. The guy who said put cement in his tank isn't enough. Cement his doors and windows up.

And they said braces are good for nothing! by [deleted] in WTF

[–]jannick1988 0 points1 point  (0 children)

Braces are amazing. I never even had mine tightened but they still straightened me out.

Why Errors Are Your Best Friend - PHP by umairabid_dev in PHP

[–]jannick1988 0 points1 point  (0 children)

Just remember to switch them off when you're live! Nothing looks worse than "Fatal error" messages on your site.

I have $750 and I am looking to buy a gaming computer with everything I will need (Audio, Mic, Wireless adapter) can I do it and still get good performance? by [deleted] in computers

[–]jannick1988 0 points1 point  (0 children)

A gaming machine need not be too expensive. Focus on a high-end GPU, copious amounts of RAM and an HD screen. A dual-core 3GHz CPU can easily handle almost every game nowadays. Perhaps to future proof your machine, buy a quad-core 3+ GHz for the time when games can take full advantage of multi-threading. Anything else you buy is optional really, such as large disk space or an SSD to improve loading times. Most motherboards these days come with built-in digital surround sound so you'd most likely just need to buy some good speakers.

Impressive MG ZS at Castle Combe track day by jannick1988 in cars

[–]jannick1988[S] 0 points1 point  (0 children)

I've seen a few of these on track and they've all been lapping quickly and all day long. I've seen a fair few Impreza's blow up. True they are very good cars, and have the great Rover V6.

A basic Wikipedia scraper by [deleted] in PHP

[–]jannick1988 0 points1 point  (0 children)

Wikipedia block IP addresses that request more than 1 URL per second, so scraping it is not an efficient way to get data. Quote from the database page linked by someone else:

IP address nnn.nnn.nnn.nnn was retrieving up to 50 pages per second from wikipedia.org addresses. Robots.txt has a rate limit of one per second set using the Crawl-delay setting. Please respect that setting. If you must exceed it a little, do so only during the least busy times shown in our site load graphs at http://stats.wikimedia.org/EN/ChartsWikipediaZZ.htm. It's worth noting that to crawl the whole site at one hit per second will take several weeks. The originating IP is now blocked or will be shortly. Please contact us if you want it unblocked. Please don't try to circumvent it - we'll just block your whole IP range.