• Web Dev Questions That Don't Need Their Own Thread v4
    5,001 replies, posted
[QUOTE=Stonecycle;41973273]Sometimes, I wish it would do the opposite. I usually tab indent before the bracket, so something like [i]body[/i] becomes [i]border-style[/i] and many other assorted words.[/QUOTE] Well I figured it can actually end everything as long as you don't close the opening tag, but it's still pretty weird :v: - And I know your feel, I hate when I wan't to give a margin like 5px or something and it puts it on margin-right and then I can't find the error :suicide:
[QUOTE=Moofy;41972913]Is it just me or does sublime text only finish some tags, selectors and stuff like that? In school we work on NetBeans (because we have to) - and I kinda got used to it finishing automatically, can I make sublime do that too? :v:[/QUOTE] yes, you can do this using the package control. [url]https://sublime.wbond.net[/url] I'm not sure which plugin did that for me. I'm pretty sure it was emmet [url]https://sublime.wbond.net/packages/Emmet[/url] [editline]26th August 2013[/editline] there's also [url]https://sublime.wbond.net/packages/Tag[/url] which you can just do </ and it will close html tags for you.
[QUOTE=Moofy;41972913]Is it just me or does sublime text only finish some tags, selectors and stuff like that? In school we work on NetBeans (because we have to) - and I kinda got used to it finishing automatically, can I make sublime do that too? :v:[/QUOTE] Plugins. Edit: What jung3o said :v: If you want I can share a list of plugins I have installed.
OK. How do I bind a DNS to my centos? [img]http://i.cubeupload.com/7NgV4N.png[/img] Seriously, what do I even do.
[QUOTE=asantos3;41974867]Plugins. Edit: What jung3o said :v: If you want I can share a list of plugins I have installed.[/QUOTE] Go ahead :v: also where do you find these plugins? Are they all put together somewhere? Like an official page for them?
[QUOTE=Moofy;41976079]Go ahead :v: also where do you find these plugins? Are they all put together somewhere? Like an official page for them?[/QUOTE] [QUOTE=jung3o;41974746]yes, you can do this using the package control. [url]https://sublime.wbond.net[/url][/QUOTE] [url=http://wbond.net/sublime_packages/alignment]Alignment[/url] Dead-simple alignment of multi-line selections and multiple selections [url=https://sublime.wbond.net/packages/All%20Autocomplete]Autocomplete[/url] Extend Sublime Text 2 autocompletion to find matches in all open files of the current window [url=https://sublime.wbond.net/packages/BracketHighlighter]Bracket&#8203;Highlighter[/url] Bracket and tag highlighter [url=https://sublime.wbond.net/packages/Emmet]Emmet[/url] Emmet (ex-Zen Coding) for Sublime Text (go check it out their website, this is the most awesome plugin in the list) [url=https://sublime.wbond.net/packages/LESS]LESS[/url] LESS syntax highlighting [url=https://sublime.wbond.net/packages/Prefixr]Prefixr[/url] Runs CSS through Prefixr.com API (kinda meh if you work with sass or less) [url=https://sublime.wbond.net/packages/Sass]Sass[/url] Sass support for TextMate & Sublime Text 2 [url=https://sublime.wbond.net/packages/SideBarEnhancements]SideBarEnhancements[/url] Enhancements to Sublime Text sidebar. Files and folders. [url=https://sublime.wbond.net/packages/SublimeCodeIntel]Sublime&#8203;Code&#8203;Intel[/url] Full-featured code intelligence and smart autocomplete engine [url=https://sublime.wbond.net/packages/SublimeLinter]SublimeLinter[/url] Inline lint highlighting for the Sublime Text 2 editor [url=https://sublime.wbond.net/packages/Theme%20-%20Soda]Theme - Soda[/url] Dark and light custom UI themes for Sublime Text There's lots of plugins, you can install [url=https://sublime.wbond.net/packages/SFTP]SFTP[/url] for SFTP/FTP. There's a few missing on that list but it's just plugins for python or test purposes.
[QUOTE=asantos3;41978108][url=http://wbond.net/sublime_packages/alignment]Alignment[/url] Dead-simple alignment of multi-line selections and multiple selections [url=https://sublime.wbond.net/packages/All%20Autocomplete]Autocomplete[/url] Extend Sublime Text 2 autocompletion to find matches in all open files of the current window [url=https://sublime.wbond.net/packages/BracketHighlighter]Bracket&#8203;Highlighter[/url] Bracket and tag highlighter [url=https://sublime.wbond.net/packages/Emmet]Emmet[/url] Emmet (ex-Zen Coding) for Sublime Text (go check it out their website, this is the most awesome plugin in the list) [url=https://sublime.wbond.net/packages/LESS]LESS[/url] LESS syntax highlighting [url=https://sublime.wbond.net/packages/Prefixr]Prefixr[/url] Runs CSS through Prefixr.com API (kinda meh if you work with sass or less) [url=https://sublime.wbond.net/packages/Sass]Sass[/url] Sass support for TextMate & Sublime Text 2 [url=https://sublime.wbond.net/packages/SideBarEnhancements]SideBarEnhancements[/url] Enhancements to Sublime Text sidebar. Files and folders. [url=https://sublime.wbond.net/packages/SublimeCodeIntel]Sublime&#8203;Code&#8203;Intel[/url] Full-featured code intelligence and smart autocomplete engine [url=https://sublime.wbond.net/packages/SublimeLinter]SublimeLinter[/url] Inline lint highlighting for the Sublime Text 2 editor [url=https://sublime.wbond.net/packages/Theme%20-%20Soda]Theme - Soda[/url] Dark and light custom UI themes for Sublime Text There's lots of plugins, you can install [url=https://sublime.wbond.net/packages/SFTP]SFTP[/url] for SFTP/FTP. There's a few missing on that list but it's just plugins for python or test purposes.[/QUOTE] Great list! Sass, LESS and SublimeLinter are my personal favorites
[QUOTE=thejjokerr;41987544] PS I am on Windows 7 (64-bit) [/QUOTE] This is your problem; installing Ruby on Windows is a fucking bitch. If you aren't interested in dual-booting I would suggest using a VM.
[QUOTE=thejjokerr;41987544]Ugh, I want to learn Ruby (On Rails) but I can't even get around installing it properly... Whenever I create a new application trying to use mysql it just borks and goes: [CODE]Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension . D:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb checking for rb_thread_blocking_region()... yes checking for rb_wait_for_single_fd()... yes checking for rb_hash_dup()... yes checking for rb_intern3()... yes *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=D:/RailsInstaller/Ruby1.9.3/bin/ruby --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib extconf.rb:37:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError ) Gem files will remain installed in D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9 .1/gems/mysql2-0.3.13 for inspection. Results logged to D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0. 3.13/ext/mysql2/gem_make.out An error occurred while installing mysql2 (0.3.13), and Bundler cannot continue. Make sure that `gem install mysql2 -v '0.3.13'` succeeds before bundling.[/CODE] I installed Ruby, RubyDevKit, RailsInstaller, MySQL Server 5.6 and have placed the libmysql.dll in "D:\Ruby200-x64\bin". Everything is installed on the same drive. Can anyone help me out with this, I really want to get into Ruby, but so far everything I found on this error on the internet is the same advice that I have already followed multiple times. [editline]27th August 2013[/editline] PS I am on Windows 7 (64-bit) I tried installing the gem with "gem install mysql --platform=ruby -- --with-mysql-include=D:\include --with-mysql-lib=D:\lib" where it contained the 32-bit version of the MySQL Connector/C but when making the application it still gives the same errors.[/QUOTE] find and check the mkmf.log that it's tell you to check for more details and then fix the specific error(s) that are showing up in there.
Anyone know why this piece of code wouldn't return the content length in the header - and is there a fix for it? Been trying to look for a fix for a while now... [code]render :json => Model.all[/code]
[QUOTE=alexanderk;41990645]Anyone know why this piece of code wouldn't return the content length in the header - and is there a fix for it? Been trying to look for a fix for a while now... [code]render :json => Model.all[/code][/QUOTE] Well it might not return the content length of the header because you are rendering the whole collection of Models as json!
[QUOTE=commander204;41993534]Well it might not return the content length of the header because you are rendering the whole collection of Models as json![/QUOTE] I've tried making custom hashes as JSON as well, same result. I don't get content-length using render for anything
hi all, so I have this piece of code here and it was just simply a timed message thing that changed every 2 seconds. You put a heap of items in an array and it just goes through them. Now what I want is for this to be a randomly picked item from the array that is displayed. So it could pick anything from this array and display it. What would I do for this? [CODE]<div id="randomMsgDiv">Uc</div> <script type="text/javascript"> function randomMsg() { currMsg++; document.getElementById('randomMsgDiv').innerHTML = msgArr[currMsg%msgArr.length]; }; function init() { currMsg = -1; msgArr = Array('whatever', 'facepunch', 'wtf', 'meh', 'examples'); randomMsg(); var t=setInterval("randomMsg()",2000); }; window.onload = init(); </script>[/CODE] Also... is it possible to do it with images (if images use links?) Thanks
What's the "nicest" way to create a HTML table with columns of different percentage widths? e.g. [ 5% | 30% | 60% | 5% ] At the moment I have different classes for each of the <th> elements at the top of the table but it feels inefficient and messy, especially when I have a table with 7 columns. Any other suggestions?
I'm trying to install the soda dark theme with Sublime Text 2, I did install the package control/manager and did install the soda theme. But upon activating it something goes wrong. I go to: [B]preferences -> settings - user[/B] and this comes: [url]http://gyazo.com/03c39682087ea470aabbaaee0b3777c0[/url]
[QUOTE=Moofy;41999390]I'm trying to install the soda dark theme with Sublime Text 2, I did install the package control/manager and did install the soda theme. But upon activating it something goes wrong. I go to: [B]preferences -> settings - user[/B] and this comes: [url]http://gyazo.com/03c39682087ea470aabbaaee0b3777c0[/url][/QUOTE] Move theme up into the top block. [code] { "theme": "Soda Light.sublime-theme", "ignored_packages": [ "Vintage" ] } [/code]
Where do you guys go for Freelance work? I'm trying to generate income but the site I went too has offered nothing but people with $5 budgets trying to get whole websites designed for that $5.
-nevermind- made the images clickable by putting them in a HTML <a> tag. It's a little messy but it works.
[QUOTE=RidingKeys;42003769]Where do you guys go for Freelance work? I'm trying to generate income but the site I went too has offered nothing but people with $5 budgets trying to get whole websites designed for that $5.[/QUOTE] Who da' fuck gets a website for $5? Anyways, I just try to move around on social networks and suddenly I end up with someone desperate and we agree on a price.
-snip automerge-
[QUOTE=Pat.Lithium;42005411]-snip automerge-[/QUOTE] Ninja'd
[QUOTE=Pat.Lithium;42005361]Something about making an image clickable with javascript[/QUOTE] Through the power of jquery [code] $('YourImageIDorClassOrSomething').on("click", "img", function () { // Stuff }); [/code] I hope [editline]Aww[/editline] Damn
[QUOTE=Vietnow;41998766]What's the "nicest" way to create a HTML table with columns of different percentage widths? e.g. [ 5% | 30% | 60% | 5% ] At the moment I have different classes for each of the <th> elements at the top of the table but it feels inefficient and messy, especially when I have a table with 7 columns. Any other suggestions?[/QUOTE] Try [url=http://www.w3schools.com/cssref/sel_nth-child.asp]this[/url]. [code] .nastyTable th:nth-child(1) { width: 5%; } .nastyTable th:nth-child(2) { width: 30%; } ... [/code]
[QUOTE=gokiyono;42005572]Through the power of jquery [code] $('YourImageIDorClassOrSomething').on("click", "img", function () { // Stuff }); [/code] I hope [editline]Aww[/editline] Damn[/QUOTE] I've figured out what to do. I'm trying to recreate minesweeper in javascript without using jquery. It works so far just have to add a timer and to stop said timer when a mine is clicked (or end the game if all mines have been found). [editline]29th August 2013[/editline] on the subject of that: the grid is stored in an array that has corresponding x and y values. To find the x I take the ID of the cell and get the remainder of it divided by the grid width, and the y is the ID divided by the grid height (floored). How would I reverse this to get the ID from the X and Y values? [editline]29th August 2013[/editline] stupid question actually, the ID of the cell can be found using the ID of the current cell.
[QUOTE=RidingKeys;42003769]Where do you guys go for Freelance work? I'm trying to generate income but the site I went too has offered nothing but people with $5 budgets trying to get whole websites designed for that $5.[/QUOTE] Go to people you know and people those people know. Look for people looking for devs/designers on craigslist sometimes too (that was what I did when i was just getting started). Now all my work is word of mouth for the most part, sometimes I randomly run in to people who need dev work. I've been having to turn jobs down this past year because I've been getting lots of requests for freelance while I'm working full time too haha.
Is it my browsers scroll bar that has a small gap next to it? When I have something at full width, it doesn't fill out like a 1-2px gap between the actual div and the scrollbar in the browser. My teacher told me it was chrome, but it happens in all browsers? :suicide:
Screenshot?
Is the HTML5 Certification Test hard like my Java one was?
[QUOTE=Bomber9900;42012033]Is the HTML5 Certification Test hard like my Java one was?[/QUOTE] There is no official HTML5 certification so whatever one you found is just trying to get your money. [editline]29th August 2013[/editline] [QUOTE=thejjokerr;42011017]Sorry for the late reply, I got this in that file: [URL]http://pastebin.com/dFCLA0pG[/URL] I also noticed that when I run "$ file `which ruby`" it tells me the ruby.EXE is for "PE32 executable for MS Windows (console) Intel 80386 32-bit" even though I have a 64-bit. Why is this and does it matter? Oh and I noticed in an IRB console it manages to require the mysql just fine and even connect to it and query the database, it just wont let me create a project using -d mysql as a database.[/QUOTE] Rails uses the mysql2 gem. Is that the one you are using to test in irb?
[QUOTE=KmartSqrl;42012245]There is no official HTML5 certification so whatever one you found is just trying to get your money. [editline]29th August 2013[/editline] Rails uses the mysql2 gem. Is that the one you are using to test in irb?[/QUOTE] Ah so then W3 is just doing their own certificate thing, it's not a real certificate as in something like a Microsoft Masters Certificate?
Sorry, you need to Log In to post a reply to this thread.