Web Dev Questions That Don't Need Their Own Thread v4
5,001 replies, posted
[QUOTE=Netheous;44550122]I asked this question on purpose.
I wanted to hear your opinion, but appearently it's a 'dumb' question.[/QUOTE]
It's dumb because:
[QUOTE=TrinityX;44546941]Just please don't do this. All webdev-languages are good, it's just a matter of preference.[/QUOTE]
[QUOTE=Netheous;44550122]I asked this question on purpose.
I wanted to hear your opinion, but appearently it's a 'dumb' question.[/QUOTE]
It's not really dumb, but language wars are annoying so most react [I]very[/I] negatively to anything that might start one.
To answer your question, it's all about what you are productive with. If you manage to make great websites in PHP then do it. However I think the question you wanted to ask was "What are the languages to be the most productive with on the web today?" (Or similar) Which is way easier to answer with the standard answers of, Javascript with Node.JS (Express, Connect), Ruby (RoR, Sinatra) or Python (Flask, Django).
There are probably more (Frameworks as well) but they are your 'go to' languages I tend to see today. They all work differently and most of the time differ in ways on how to approach problems. As far as I am aware all of these frameworks/libraries I listed are great quality ones and pretty easy to setup.
Check out some Code Examples and pick for yourself.
my routes are failing for no reason.
[quote]
Railstest::Application.routes.draw do
devise_for :users
devise_for :models
#get "welcome/index"
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root"
root 'ships#index'
resources :ships
get "ships/fight", 'ships#fight'
[/quote]
if I have ", 'ships#fight' " in there it'll do a no controller error.
that's my routes file.
Here's my controller
[quote]
class ShipsController < ApplicationController
def index
@ships = Ship.all
end
def show
@ship = Ship.find(params[:id])
end
def new
@ship = Ship.new
end
def create
@ship = Ship.new(allowed_ship_params)
if @ship.valid?
@ship.save
return redirect_to(ships_path(@ship))
end
render :new
end
def edit
@ship = Ship.find(params[:id])
authorize! :update, @ship
end
def update
@ship = Ship.find(params[:id])
if @ship.valid?
@ship.update(allowed_ship_params)
return redirect_to(ships_path(@ship))
end
render :edit
end
def destroy
@ship = Ship.find(params[:id])
@ship.destroy
return redirect_to(ships_path)
end
def fight
@ship = Ship.find(params[:id])
if @ship.valid?
return redirect_to(ships_path(@ship))
end
render :fight
end
private
def allowed_ship_params
params[:ship].permit(:title, :ship, :user_id)
end
end
[/quote]
fight.html.erb is in the ships folder like the rest.
I always get an error in show.html.erb at line 3
[quote]
<p><%= link_to 'Edit me', edit_ship_path(@ship) %></p>
<p><%= link_to 'Destroy me', ship_path(@ship), method: :delete %></p>
<p><%= link_to 'Pilot me', fight_ship_path(@ship) %></p>
<h1><%= @ship.title %></h1>
<p><%= @ship.description %></p>[/quote]
undefined method `fight_ship_path' for #<#<Class:0x007fc01605ac98>:0x007fc0160599b0>
any ideas?
[highlight][editline]15th April 2014[/editline][/highlight]
Oh god I don't even know what I did but I fixed all my problems on my own I must be a genius.
Disregard above, I defined my routes in this format
fight_ship = get "/ships/:id/fight", to: 'ships#fight', as: 'fight_ship'
and it now works (somehow)
[QUOTE=Ac!dL3ak;44507624]I think Fizzdar
Just as a side note, Afterburst uses OpenVZ visualization, and Digital Ocean uses KVM. Arch Linux has known issues with OpenVZ.[/QUOTE]
Just to update on this - we're also offering KVM services in LA and DE - soon to be publicly launched. Feel free to shoot us a sales ticket mentioning this post if you're interested.
[QUOTE=rilez;44507598]I like the look of both of those. Who runs Afterburst?[/QUOTE]
Fizzadar and myself are the two FPer's of Afterburst (Charlie isn't active here)
[QUOTE=Flapadar;44559925]Fizzadar and myself are the two FPer's of Afterburst (Charlie isn't active here)[/QUOTE]
you hiring? ;)
I have 3 boxes. I want all 3 of the boxes height to be the height of the largest box. (so if box 1 is taller than boxes 2 and 3 have boxes 2 and 3 become the height of box 1)
Can I do this with JavaScript or something?
[QUOTE=rbreslow;44567304]I have 3 boxes. I want all 3 of the boxes height to be the height of the largest box. (so if box 1 is taller than boxes 2 and 3 have boxes 2 and 3 become the height of box 1)
Can I do this with JavaScript or something?[/QUOTE]
You using jquery? that would simplify it very much.
[QUOTE=rbreslow;44567304]I have 3 boxes. I want all 3 of the boxes height to be the height of the largest box. (so if box 1 is taller than boxes 2 and 3 have boxes 2 and 3 become the height of box 1)
Can I do this with JavaScript or something?[/QUOTE]
I assume this would just be a styling change, best way to do it would be to have the 3 boxes in a container, with the height of the container being the height of the highest box (of which would have a height of 100%). Then all you have to do is change the other two boxes to have a height of 100%. This is a simple matter of
[code]document.getElementById("divIDhere").style.height = "100%";[/code]
Example here:
[url]http://jsfiddle.net/X7PVR/[/url]
Probably the wrong board but Id though id ask here.
[url]http://www.dafont.com/bog.font[/url]
What do the Japanese characters in these fonts actually say? They don't actually mean literal A, B, C right? These fonts really confuse me, and there are a lot of Asian character fonts out there. Are the symbols and characters for those kept to a standard?
[QUOTE=lkymky;44575789]Probably the wrong board but Id though id ask here.
[url]http://www.dafont.com/bog.font[/url]
What do the Japanese characters in these fonts actually say? They don't actually mean literal A, B, C right? These fonts really confuse me, and there are a lot of Asian character fonts out there. Are the symbols and characters for those kept to a standard?[/QUOTE]
Aren't Japanese Characters only defined in Unicode? I think it's to keep it all ASCII.
[QUOTE=lkymky;44575789]Probably the wrong board but Id though id ask here.
[url]http://www.dafont.com/bog.font[/url]
What do the Japanese characters in these fonts actually say? They don't actually mean literal A, B, C right? These fonts really confuse me, and there are a lot of Asian character fonts out there. Are the symbols and characters for those kept to a standard?[/QUOTE]
I can read those, and they definitely don't match up to the English letters, simply because they can't, each "letter" consists of what would usually be two letters in English. You will need to set your keyboard to Japanese to write this, or copy Japanese characters from a website or unicode table
Why do they have the letters in A,B,C character slots at all then? Seems kindof pointless.
[t]http://puu.sh/8dD0j.png[/t] :v:
[QUOTE=lkymky;44578971]Why do they have the letters in A,B,C character slots at all then? Seems kindof pointless.
[t]http://puu.sh/8dD0j.png[/t] :v:[/QUOTE]
I don't think dafont is really designed for Foreign fonts, it'll probably do that with any language with foreign characters
[QUOTE=djjkxbox360;44579135]I don't think dafont is really designed for Foreign fonts, it'll probably do that with any language[/QUOTE]
Yeah, amazingly I like thier site more than any other to find fonts (other than /gd/) since they seem to have the best matching categories for fonts for what I'm trying do to.
I really love this font's style, I'm looking for an asian style font that uses English letters. Something like an exact copy of this font, with a, b, c etc.
Maybe similar to lego ninjago font, or this one [url]http://www.dafont.com/gang-of-three.font[/url]
Having a hard time finding one surprisingly.
How would I go about applying a style to whatever element that is last-child of a container?
I got some styles for a wrapper that says p tags should have a margin-bottom of 1.5em.
Then with the last-child pseudo selector I could remove that margin, because I don't want that extra margin at the bottom of the wrapper.
However, if it doesn't end with a p tag, say a blockquote, list or whatever. I will still need to remove that margin bottom applied on those styles.
Is there any magic that can help me do this in one selector instead of having to apply last-child on each element?
[QUOTE=Moofy;44580190]How would I go about applying a style to whatever element that is last-child of a container?
I got some styles for a wrapper that says p tags should have a margin-bottom of 1.5em.
Then with the last-child pseudo selector I could remove that margin, because I don't want that extra margin at the bottom of the wrapper.
However, if it doesn't end with a p tag, say a blockquote, list or whatever. I will still need to remove that margin bottom applied on those styles.
Is there any magic that can help me do this in one selector instead of having to apply last-child on each element?[/QUOTE]
[code]
:last-child {
blahbalhblah: afwa;
}
[/code]
[editline]18th April 2014[/editline]
[url]http://jsfiddle.net/LKYjj/[/url]
[QUOTE=KmartSqrl;44580266][code]
:last-child {
blahbalhblah: afwa;
}
[/code]
[editline]18th April 2014[/editline]
[url]http://jsfiddle.net/LKYjj/[/url][/QUOTE]
:suicide:
I feel like an idiot now, forgot it will target the last child within the parent too.
Thanks!
[QUOTE=Ac!dL3ak;44565450]you hiring? ;)[/QUOTE]
We're not at the moment, but if you want us to consider you when something comes up feel free to send us your details/CV. We generally keep a bunch of applications on record so if something comes up we can contact people who have previously shown interest.
Email is [email]hello@afterburst.com[/email]
Does anyone know if its possible to have javascript within a markup file?
Im porting my site over to nodejs' DocPad along with my wordpress blog and I want to have some sort of image gallery in the blog posts via something like Wow slider
[QUOTE=Flapadar;44588431]We're not at the moment, but if you want us to consider you when something comes up feel free to send us your details/CV. We generally keep a bunch of applications on record so if something comes up we can contact people who have previously shown interest.
Email is [email]hello@afterburst.com[/email][/QUOTE]
How many people have applied?
[QUOTE=Richy19;44591421]Does anyone know if its possible to have javascript within a markup file?
Im porting my site over to nodejs' DocPad along with my wordpress blog and I want to have some sort of image gallery in the blog posts via something like Wow slider[/QUOTE]
Write a plugin. Don't mix content with code.
[QUOTE=Ac!dL3ak;44592226]Don't take this offensively, but people have applied?[/QUOTE]
Are you even questioning this right after you asked if they might have interest in hiring you?
Or are you just trying to be rude on purpose?
I've been running a pastebin site on a VPS for a while, and during the last two weeks or so the bandwidth usage has risen dramatically. About four days ago I had to increase my VPS plan's bandwidth cap from 4 TB to 6 TB and right now the amount of used bandwidth is sitting at 87%.
The weird part is that the amount of page views, hits and bandwidth have remained pretty much the same according to Cloudflare. I installed ntop and according to it about 99.7% of traffic is being routed through Cloudflare.
So, what can I do to reduce my VPS unit's bandwidth usage? Right now the only idea I can think of is enabling gzip compression.
Definitely gzip compression. Make sure Cloudflare is serving as many of the resources as they will and mess with the settings so the static resources are cached for a longer time.
[QUOTE=Moofy;44595472]Are you even questioning this right after you asked if they might have interest in hiring you?
Or are you just trying to be rude on purpose?[/QUOTE]
No, I'm not trying to be rude at all. I don't understand the first question.
I should have rephrased the question to say "how many people have applied"
[QUOTE=Ac!dL3ak;44597325]No, I'm not trying to be rude at all. I don't understand the first question.
I should have rephrased the question to say "how many people have applied"[/QUOTE]
We've never advertised a position - but we've had around ~5-10 people apply anyway.
Oh crap, sorry, I just realized this morning that my wording was completely messed up. I didn't want to make it sound like a derogatory "who would work with you?", I was just genuinely interested in knowing how many people have applied so far, because I might be interested in trying as well
[QUOTE=Alcapwne;44547274]Can someone take a look at this please: [URL]http://stackoverflow.com/questions/23049506/facebook-api-disrupting-rest-of-page-until-it-loads-data[/URL]
Many thanks[/QUOTE]
Just wanted to tell you. The Facebook button won't show if the user is using some sort of ad-blocking extensions (Disconnect.me).
Do you guys have any recommendations on JS based image galleries?
All the ones I have found are commercial or something like that, I just want a simple MIT/BSD type licensed js library
I use adobe flash for graphics, imo its honestly the swiss army knife for web designers. Even if flash as a platform is dead, the application is extremely useful in creating vector graphics with bitmap ease, I've never felt more comfortable with an application.
However I wish I had more flexability with it when it comes to text, is there any way to get the glyphs of fonts and render/use them as vector objects?
Id imagine there is a way to do it with SVG somehow, however I don't know how to extract glyphs as individual objects that can be vector-bended as needed.
[t]http://puu.sh/8hLdq.png[/t]
I really hate recreating fonts by hand, this is the most retarded remedial task, but I can't seem to find out a better way.
Sorry, you need to Log In to post a reply to this thread.