• Web Development Questions That Don't Need Their Own Thread v2
    3,079 replies, posted
[QUOTE=Adzter;32732678]Hmm.. Just I've never really used Linux before never mind command line, guess it's time to look up some tutorials EDIT: Right, got Ubuntu server edition setup in a virtual box lets see what I can do[/QUOTE] Gentoo Master Race frowns upon your choice. Let us know if you need help with anything, however.
[QUOTE=Adzter;32732555]On a scale of 1 to Norton how bad of a resource hog is a GUI for linux?[/QUOTE] ooooh that's why windows is slow for me [editline]11th October 2011[/editline] [QUOTE=Adzter;32732678]Hmm.. Just I've never really used Linux before never mind command line, guess it's time to look up some tutorials EDIT: Right, got Ubuntu server edition setup in a virtual box lets see what I can do EDIT2: Alrighty, got Apache, PHP done now for MySQL[/QUOTE] nginx
Wahoo.. got everything installed... thanks to [url=http://www.howtoforge.com/ubuntu_debian_lamp_server]this[/url] and then realised I can't actually check if I've done it right or not because I'm running it in virtual box. Derp.
Is there anything in javascript which would allow me to do something like: [code]var action = flagActions[elem.id]['action'][/code] ? Basically, 2D key => attr arrays like in PHP. I tried with json but if I had to do the thing above it'd only work through eval and I really don't want that.
[QUOTE=TerabyteS_;32733151]Is there anything in javascript which would allow me to do something like: [code]var action = flagActions[elem.id]['action'][/code] ? Basically, 2D key => attr arrays like in PHP. I tried with json but if I had to do the thing above it'd only work through eval and I really don't want that.[/QUOTE] yeah?
Associative arrays seem to be possible in JavaScript. Sexy. [editline]11th October 2011[/editline] [QUOTE=Ac!dL3ak;32733224]yeah?[/QUOTE]what
[QUOTE=TerabyteS_;32733236]Associative arrays seem to be possible in JavaScript. Sexy. [editline]11th October 2011[/editline] what[/QUOTE] [code] flagActions = [ { "action" : "watermelons" } ] [/code] assuming that elem.id is equal to 0, [code] return flagActions[elem.id]['action']; [/code] returns "watermelons".
[QUOTE=vexx21322;32719677]Not sure if this would go here or in programming so I'll just try here. I want to alter the style sheet of a webpage so that there's not so much whitespace. I've tried creating a STYLE element and setting its' innerHTML to the css style sheet but it doesn't seem to be working. If I loop through all the elements on the page that have that style sheet applied to them and set the elements style, it works. But this isn't ideal because if a page has dynamic elements, then those elements won't get the style applied to them.[/QUOTE] I figured out why the css stylesheet wasn't changing when I included it in the page. I needed to put !important after every attribute.
[QUOTE=vexx21322;32736839]I figured out why the css stylesheet wasn't changing when I did included it in the page. I needed to put !important after ever attribute.[/QUOTE] not really CSS rule orders matter [editline]11th October 2011[/editline] for example if i put [code] a:hover { color:#111; text-decoration:underline; } a { color:#333; text-decoration:none; } [/code] the link being hovered over would never turn #111 and get an underline. but if i put [code] a { color:#333; text-decoration:none; } a:hover { color:#111; text-decoration:underline; } [/code] it would turn those colors
[QUOTE=hacksore;32729039]Why do people use cufon, isn't the text made up of images? What makes it, if at all, better then Google web fonts? ...[/QUOTE]Cufon predates wide support for @font-face in Browsers (Only Safari "properly" supported it back then), now that IE9+/Firefox/Chrome/Opera/Safari support proper @font-face, the main reason people keep using Cufon is because they like it (Or because they don't know any better, probably the main reason)
[QUOTE=TheDecryptor;32739450]Cufon predates wide support for @font-face in Browsers (Only Safari "properly" supported it back then), now that IE9+/Firefox/Chrome/Opera/Safari support proper @font-face, the main reason people keep using Cufon is because they like it (Or because they don't know any better, probably the main reason)[/QUOTE] And because in a lot of cases, the font renders better.
I haven't read about Cufon for a while, but I'm pretty sure it stores the glyphs as plain path data and renders them using <canvas>, so you end up with no hinting and the raw glyph outlines used. Using the raw glyph data looks good at larger sizes, but it looks terrible at low sizes, and by using <canvas> you lose support for sub-pixel hinting and other platform features (Using system support gives you kerning, ligatures, etc., Cufon doesn't). You can do something similar in Firefox on Windows Vista/7 at least, if you apply a small rotation (0.0001deg) DirectWrite (the system text library used) disables hinting, but you keep sub-pixel positioning and all the nice OpenType features.
Cufon does indeed render text inside <canvas>, and 9/10 times looks better than @font-face (on Windows, Mac always looks good). But obviously it relies on javascript, and font-face is finally going to be browser-friendly (though I assume IE will refuse to accept OpenType/etc?).
I'm having problems with Regex, I don't entirely understand it but I'm trying to make a greasemonkey script that will extract a username from a page's html and then add an additional link to it. I'm trying to figure out how to filter out everything except the username. [code]<a href="/members/JonBons/default.aspx">JonBons</a>[/code] Once I do that I want to create a link like this. [code]<a href="/member/USERNAME.aspx">(Dossier)</a>[/code] Any tips?
[QUOTE=JonBons;32746057]I'm having problems with Regex, I don't entirely understand it but I'm trying to make a greasemonkey script that will extract a username from a page's html and then add an additional link to it. I'm trying to figure out how to filter out everything except the username. [code]<a href="/members/JonBons/default.aspx">JonBons</a>[/code] Once I do that I want to create a link like this. [code]<a href="/member/USERNAME.aspx">(Dossier)</a>[/code] Any tips?[/QUOTE] [code]/\<a href\=\"\/members\/(.*?)\/default\.aspx\"\>\\1\<\/a\>/gi[/code] may work i don't think i'm good at regex
Best notepad alternative? I should probably add this is for HTML.
[QUOTE=reevezy67;32750740]Best notepad alternative? I should probably add this is for HTML.[/QUOTE] notepad++ or sublime text
[QUOTE=reevezy67;32750740]Best notepad alternative? I should probably add this is for HTML.[/QUOTE] Best in my opinion is Sublime 2, but for HTML, you'd probably be better going with N++.
[QUOTE=vexx21322;32752133]Best in my opinion is Sublime 2, but for HTML, you'd probably be better going with N++.[/QUOTE] Is there any difference when it comes to HTML? + 1 for Sublime, it's beautiful
[QUOTE=Fizzadar;32752337]Is there any difference when it comes to HTML? + 1 for Sublime, it's beautiful[/QUOTE] Sublime is awesome, doesn't hurt your eyes like notepad does.
[QUOTE=reevezy67;32752485]Sublime is awesome, doesn't hurt your eyes like notepad does.[/QUOTE] i hope you're not talking about NPP.
[QUOTE=Fizzadar;32752337]Is there any difference when it comes to HTML? + 1 for Sublime, it's beautiful[/QUOTE] From when I last used n++, it has more features and plugins geared towards HTML. Plus, n++ has the tree thing for code, so you can hide code, which is very helpful for HTML
[QUOTE=vexx21322;32752539]From when I last used n++, it has more features and plugins geared towards HTML. Plus, n++ has the tree thing for code, so you can hide code, which is very helpful for HTML[/QUOTE] The group hide isnt just for html you can just select a line of code and hide it They dont even need to be the same group.
[QUOTE=reevezy67;32752485]Sublime is awesome, doesn't hurt your eyes like notepad does.[/QUOTE] Opinions. Sublime hurts my eyes.
[QUOTE=mobrockers2;32752686]Opinions. Sublime hurts my eyes.[/QUOTE]You can configure everything about the look of it, though.
[QUOTE=zzlawlzz;32752495]i hope you're not talking about NPP.[/QUOTE] I just said notepad. I like low saturation darker colours.
[QUOTE=reevezy67;32752707]I just said notepad. I like low saturation darker colours.[/QUOTE] Tip: Dont compare things with notepad. [editline]13th October 2011[/editline] [QUOTE=mobrockers2;32752686]Opinions. Sublime hurts my eyes.[/QUOTE] That's silly.
[QUOTE=Octave;32752693]You can configure everything about the look of it, though.[/QUOTE] And you can configure everything about the look in notepad++ too.
[QUOTE=Fizzadar;32745810]Cufon does indeed render text inside <canvas>, and 9/10 times looks better than @font-face (on Windows, Mac always looks good). But obviously it relies on javascript, and font-face is finally going to be browser-friendly (though I assume IE will refuse to accept OpenType/etc?).[/QUOTE] IE9+ actually does accept OpenType, TrueType and WOFF fonts, even the first platform preview did (even though Microsoft said it only supported WOFF) DirectWrite (the font rasterisation API Firefox 4+ and IE9+ use) is pretty good at what it does, better than Quartz in some regards, but unfortunately it does still use GDI style hinting (Which can be disabled though, then you get the raw outlines, but still with proper AA and such)
Just a thought, why is flash something you want to avoid when developing a website? I know I shouldn't, I just don't know why.
Sorry, you need to Log In to post a reply to this thread.