• Web Dev Questions That Don't Need Their Own Thread v4
    5,001 replies, posted
I want to implement UI sounds on a website I use to show off my abilities as a web developer. Off by default, I want to be able to add sounds to HTML elements by applying classes that js/Query would pick up on; on the onHover event. So simple enough, however I have no audio experience at all. Love music but for the life of me I am just unable to convey any musical ability to a computer or instrument. So that leaves me with Three options Open Source Steal it (then remix?) Make my own. I really love the steam big picture UI sounds. I have a few requirements. Must be: Quiet, Not stupid, Intuitive, and be able to be heard over thousands of times without it getting annoying. So my questions: Where would I be able to source these forms of audio from? What formats should I use or implement for cross browser compatibility? Is there a code base for something as simple as this already out there?
[QUOTE=Coffeee;43037801]I want to make a website that has lots of my cool little Javascript powered stuff on it. So basically, you get to a homepage and you select which one you want to look at and it shows you. I don't want to hard code it, I want it to be run through a database. What's the best way to do this? Do I put all the code for everything into a database and run it like that, Or do I just store the links to the files in the database? I want it to be very clean. I don't want to edit 500 files every time I add a site.[/QUOTE] Update: So I've created a little mock up of what I want the site to look like. I have these buttons on the side that will take you to more 'fun stuff'. [IMG_THUMB]http://i44.tinypic.com/3142lgh.jpg[/IMG_THUMB] (That's me with the mouse over the first one, on the nyan page.) [IMG_THUMB]http://i44.tinypic.com/5wxj5t.png[/IMG_THUMB] (I have the mouse over the second one, on the sloth page.) Every page share design features such as the buttons, the top ribbon, a button at the bottom right and they all have has the same <head> tag, but they have different content. I want the buttons to be created from a database query. I don't want to manually add code for them when I add a new site. I just want to add a row to a database and the button appears and links you to the content. I also don't want to copy and paste over any code that is already there (like the ribbon or the head tag). How do I do this? PHP Framework?
What is the best way to start an array in Javascript? [code] var arr = new Array(); || var narr = []; [/code]
What's the best way to make a lightbox? Using jQuery?
[QUOTE=gokiyono;43064715]What is the best way to start an array in Javascript? [/QUOTE] I don't think that there is any difference in performance between the two. I usually prefer [] because its just as readable and is faster to type.
[QUOTE=gokiyono;43064715]What is the best way to start an array in Javascript? [code] var arr = new Array(); || var narr = []; [/code][/QUOTE] [code]var x = [];[/code] [editline]4th December 2013[/editline] [QUOTE=Moofy;43065125]What's the best way to make a lightbox? Using jQuery?[/QUOTE] That's a bit of...an open question. Read up some tutorials, or even better, don't re-invent the wheel for the 1000th time and just pick and modify one of the existing lightbox plugins to fit your needs.
[QUOTE=StinkyJoe;43065869] That's a bit of...an open question. Read up some tutorials, or even better, don't re-invent the wheel for the 1000th time and just pick and modify one of the existing lightbox plugins to fit your needs.[/QUOTE] Perhaps but I just wanted to try out some things, and a lightbox doesn't [I]sound[/I] that hard. However I'll take a look on some others and see how it works (or just customize as you said).
what sites do you guys use to find icons? I need the standard icons such as declined, accepted, loading etc... preferably in a pack
I like [URL="http://icomoon.io/"]http://icomoon.io/[/URL], they also allow you to get your own icon packs, which is great to avoid downloading useless icons.
[QUOTE=Lizart;43067825]what sites do you guys use to find icons? I need the standard icons such as declined, accepted, loading etc... preferably in a pack[/QUOTE] I too use IcoMoon as above but, if you want some colored icons then [url=http://www.fatcow.com/free-icons]these[/url] may suit you well. [editline]4th December 2013[/editline] Some may be useless to you.
Hey. How would I create a sticky post that stays on the top of a newsfeed?
Sup. Im basicly just making a random data generator for one of my databases, to fill it up. One of the table's name is ip, and I have to generate a random internet address for it, like rand(1,10).rand(1,10).rand(1,10) etc. Now, I have this code : [code]$ip_address = rand(10,999)+"."+rand(0,999)+"."+rand(0,999)+"."+rand(0,999);[/code] but I cannot figure out how to put the "dots" between them, since they add up or I don't even know what they do. I guess it's because they're two different types of data, but still.
[QUOTE=Hammond;43101441]Sup. Im basicly just making a random data generator for one of my databases, to fill it up. One of the table's name is ip, and I have to generate a random internet address for it, like rand(1,10).rand(1,10).rand(1,10) etc. Now, I have this code : [code]$ip_address = rand(10,999)+"."+rand(0,999)+"."+rand(0,999)+"."+rand(0,999);[/code] but I cannot figure out how to put the "dots" between them, since they add up or I don't even know what they do. I guess it's because they're two different types of data, but still.[/QUOTE] [code]$ip_address = rand(10,999) . "." . rand(0,999) . "." . rand(0,999) . "." . rand(0,999);[/code] In PHP it's not + but . that merges strings.
[QUOTE=gokiyono;43101489][code]$ip_address = rand(10,999) . "." . rand(0,999) . "." . rand(0,999) . "." . rand(0,999);[/code] In PHP it's not + but . that merges strings.[/QUOTE] Love ya, mate <3
Is it really only possible to change the Sublime Text icon on Windows 7 using ResEdit?
It looks like it, although the sources I found were at least 7 months old.
[QUOTE=Hammond;43101512]Love ya, mate <3[/QUOTE] fyi octets are a max of 255
[QUOTE=jetboy;43102985]fyi octets are a max of 255[/QUOTE] You don't know anything about psudo-ip addresses :v:
Ideally database seeders should replicate real data as accurately as possible.
[QUOTE=Moofy;43102288]Is it really only possible to change the Sublime Text icon on Windows 7 using ResEdit?[/QUOTE] As far as I know, yeah. Or you could create a shortcut for it and add an icon for it, I think. Windows is odd sometimes [editline]7th December 2013[/editline] [QUOTE=jetboy;43103080]Ideally database seeders should replicate real data as close as possible.[/QUOTE] Don't get realistic with me now
[QUOTE=mac338;43100517]Hey. How would I create a sticky post that stays on the top of a newsfeed?[/QUOTE] Unfortunately the only person who knew how to do that was Steve Jobs. So I'm afraid the secret is buried with him. :/
[QUOTE=eternalflamez;43102925]It looks like it, although the sources I found were at least 7 months old.[/QUOTE] Meh, shouldn't really matter however I don't wanna get it just for one stinky icon. But the default one annoys me :suicide: [editline]8th December 2013[/editline] Anyways used ResEdit, does it take a while to update the icon around the computer? Only shows it in the direct install directory's EXE.
I'm using Codeigniter (reading this: [URL="http://ellislab.com/codeigniter/user-guide/general/urls.html"]http://ellislab.com/codeigniter/user-guide/general/urls.html[/URL]) I want to do something like this: (Code igniter is installed at vrondakis.com) vrondakis.com/query1 --> Would query a database, and see if 'query1' exists. vrondakis.com/cheese --> Would query a database, and see if 'cheese' exists. Previously, I've made a controller called query, and then inside of it made a function called query with the query parameters. The only problem is that it makes you have to go to a link like this: vrondakis.com/query/query/cheese How can I do this without the 'query/query' part?
Public function index($query){//whatever} i think
[QUOTE=P1raten;43103650]Unfortunately the only person who knew how to do that was Steve Jobs. So I'm afraid the secret is buried with him. :/[/QUOTE] This is the only reply I'm going to get? :v:
[QUOTE=BeatAlex;43112466]Public function index($query){//whatever} i think[/QUOTE] Doesn't work. I already tried that.
[QUOTE=mac338;43112484]This is the only reply I'm going to get? :v:[/QUOTE] I don't know about newsfeeds, but if they're sorted by time, I guess setting the sticky with some weird value (like "Dec 30, 9999") would make all the others go after that one?
[QUOTE=mac338;43112484]This is the only reply I'm going to get? :v:[/QUOTE] Suppose you add a class to it, and then have something like jquery to have it stay at the top. Or, because I'm tired, have an array with arrays of sticky, nonsticky. [code] var arr = { "sticky" : { 1 : 1, 5 : 5, 124124 : 124124 }, "news" : { 41 : 4525, 4362 : 143651, 2345345234523: 12325423453254124 } }; [/code] Or a third, probably better option.
I haven't found a jquery stickypost feature, only a jquery sticky element feature. And I don't know Java.
Hi again. I have a trigger, which activates a link, like [url]http://localhost/crap/join.php?uid=1337&gold=1000&bank=2000[/url]. Basicly, all I want to do is to check, if there's already a row with uid=1337, and if yes, then just update the gold / bank info. If no, then insert the whole thing in. I've made something up, and yes, I know it's a mess, but I'm not exactly sure what's not working. Thanks :) Code so far: [code] $selected = $_GET['uid']; $gold = $_GET['gold']; $bank = $_GET['bank']; $rows = mysql_query("SELECT * FROM player_data", $connect); $rows2 = mysql_query("SELECT * FROM player_data WHERE game_id=$selected", $connect); $num_row = mysql_num_rows($rows); $num_row2 = mysql_num_rows($rows2); $id_row = $num_row + 1; if($num_row2==0){ $order="INSERT INTO player_data (id,game_id,gold,bank) VALUES ('$id_row','$selected','$gold','$bank')"; }else{ $order2="UPDATE player_data SET gold=$gold+10, bank=$bank+10 WHERE game_id=$selected"; } [/code] So far it just duplicates itself on the trigger.
Sorry, you need to Log In to post a reply to this thread.