[QUOTE=Torekk;32657172]Oh god, I'm amazed by the new tumblr customization tools.
Also, do modern browsers support the W3C standards for CSS3? I'm sick of writing the same line 5 times, just for each browser.[/QUOTE]
The latest versions already support a good chunk of properties without vendor prefixes, but don't count too much on it yet. If you're using Sublime Text 2, get the Prefixr extension - easily installable through the Package Control extension. Ctrl + Alt + X on a declaration, and it automatically adds the necessary vendor prefixes.
Sorry RusselG, maybe I went a bit over the top and got a little carried away. I guess that you've finally learned your lesson. There's not much stuff I can say other than this.
[editline]7th October 2011[/editline]
[QUOTE=Kopimi;32656808]Maybe if you spent more time on your own designs rather than being an elitist cunt and bashing webdev newbies, you'd have some money to keep qfi.im running and your blog wouldn't look like shit.
It's not even that I care about protecting russell or anyone else, you're just being such a dick and shitting up the thread with so much drama it's unbearable.[/QUOTE]
By attacking me personally you're putting yourself at the same low level as mine.
[QUOTE=Chuushajou;32656405]Oh Wow, tumblr have changed their theme customization tools, it actually looks rather attractive now!
[IMG]http://i.imgur.com/PyqUd.png[/IMG][/QUOTE]
I don't usualy like the iOS style interface, but it really suits that editor.
Only marginally webdev related, but I made a reddit.com bot in half an hour:
[img]http://i.imgur.com/MNdwM.png[/img]
It scans subreddits with frequent image posts, looking for images hosted outside a set of reliable hosts., side-loads the images to imgur.com and posts the new link as a comment to the original link.
[url]http://www.reddit.com/user/imgur-mirror-bot/[/url]
[QUOTE=Kopimi;32632742]You know that on smaller monitors the whole picture wont show up, so it's just a random picture of your face
Also, the navigation links in black text are hard to see against the patterned background[/quote]
Rollover it.
[QUOTE=Torekk;32657677]No, that's not what I meant. I mean if Mozilla Firefox, Safari, Opera and Chrome support the W3C style of CSS properties. Like
[code]box-shadow: 1px 1px 2px 5px #000; <- W3C
-moz-box-shadow: 1px 1px 2px 5px #000; <- Mozilla Firefox
-o-box-shadow: 1px 1px 2px 5px #000; <- Opera
-webkit-box-shadow: 1px 1px 2px 5px #000; <- Safari and Chrome[/code]
So you don't have to write those 4 lines everytime.
I'm not sure if Chrome supports it fully, but it seems like for most.[/QUOTE]
[url]https://developer.mozilla.org/en/CSS/box-shadow#Browser_compatibility[/url]
[url]https://developer.mozilla.org/en/CSS/border-radius#Browser_compatibility[/url]
etc.
Knock yourself out.
[QUOTE=Nlogax;32659721]Rollover it.[/QUOTE]
It's hard to roll over something you cant see in the first place :v:
Well I do realise how big a hole I've dug for myself, so clean-up time.
I'm currently improving on that "devooo" thing, I realised the name is horrible, changed it to quadr.
Put an extremely ugly config viewer, to show the config values from an incredibly ugly way of making configs.
Currently, this is my config file:
[code]
$config = array(
"site" => array(
"name" => "quadr",
"author" => "Russel"
),
"news" => array(
"date" => "6/10/11",
"message" => "Testing, aahhk?"
)
);
[/code]
How can I make this better? I'm only doing it like this because I like the way arrays build that $config['array_value']['subarray_value'] layout.
[QUOTE=RusselG;32660657][code]
$config = array(
"site" => array(
"name" => "quadr",
"author" => "Russel"
),
"news" => array(
"date" => "6/10/11",
"message" => "Testing, aahhk?"
)
);
[/code]
How can I make this better? I'm only doing it like this because I like the way arrays build that $config['array_value']['subarray_value'] layout.[/QUOTE]
I don't fully understand what you said, but I prefer
[php]
<?php
$config['site']['name'] = 'quadr';
$config['site']['author'] = 'Russel';
$config['news']['date'] = '6/10/11';
$config['news']['message'] = 'Testing, aahhk?';
?>
[/php]
I'd probably use a different method of displaying news, but that's me.
[QUOTE=Known Havok;32661637]I don't fully understand what you said, but I prefer
[php]
<?php
$config['site']['name'] = 'quadr';
$config['site']['author'] = 'Russel';
$config['news']['date'] = '6/10/11';
$config['news']['message'] = 'Testing, aahhk?';
?>
[/php]
I'd probably use a different method of displaying news, but that's me.[/QUOTE]
Yeah, I'll be making a CMS for the news and other features.
[img]http://i.imgur.com/2b53F.png[/img]
Scrapping it so I suppose I'll post the [i]finished[/i] product.
[QUOTE=Jelly;32661942]
Scrapping it so I suppose I'll post the [i]finished[/i] product.[/QUOTE]
Is it ok if you give the code for a test sheet like this, with all the elements you can change?
I've been looking for one, but yet to find one.
I'll quickly write one.
God damn it Jelly, make your mind up! :v:
Anyway, yes I'd like that if you could.
[css]
/* Reset */
html{color:#000;background:#FFF}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,select,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,button,caption,cite,code,dfn,em,input,optgroup,option,select,strong,textarea,th,var{font:inherit}del,ins{text-decoration:none}li{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:baseline}sub{vertical-align:baseline}legend{color:#000}
html, body {
}
/* Headings */
h1, h2, h3, h4, h5, h6 {
}
h1 {
}
h2 {
}
h3 {
}
h4 {
}
h5 {
}
h6 {
}
/* Forms */
form {
}
fieldset {
}
fieldset legend {
}
label {
}
input[type=text] {
}
input[type=submit] {
}
button {
}
textarea {
}
select {
}
option {
}
optgroup {
}
/* Tables */
table {
}
thead {
}
tbody {
}
tfoot {
}
tr {
}
td {
}
th {
}
/* Decoration */
sub {
}
sup {
}
strong {
}
em {
}
blockquote {
}
p {
}
a {
}
pre {
}
code {
}
/* Lists */
ul {
}
ul li {
}
ol {
}
ol li {
}
[/css]
[editline]a[/editline]
Should cover it.
I usually write in LESS so this was painful to write.
[QUOTE=Jelly;32662163]-hugecodesnip-[/QUOTE]
Thanks, but I meant the html side :v:
Ahh well, easy to make from this.
[editline]uselessinfo.jpg[/editline]
I'd love it if you had a html template :eng101:
[html]
<h1>This is the primary heading and there should only be one of these per page</h1>
<p>A small paragraph to <em>emphasis</em> and show <strong>important</strong> bits.</p>
<ul>
<li>This is a list item</li>
<li>So is this - there could be more</li>
<li>Make sure to style list items to:
<ul>
<li>Not forgetting child list items</li>
<li>Not forgetting child list items</li>
<li>Not forgetting child list items</li>
<li>Not forgetting child list items</li>
</ul>
</li>
<li>A couple more</li>
<li>top level list items</li>
</ul>
<p>Don't forget <strong>Ordered lists</strong>:</p>
<ol>
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
<li>Aliquam tincidunt mauris eu risus.
<ol>
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
<li>Aliquam tincidunt mauris eu risus.</li>
</ol>
</li>
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
<li>Aliquam tincidunt mauris eu risus.</li>
</ol>
<a href="#">Linkity Link!</a>
<h2>A sub heading which is not as important as the first, but is quite imporant overall</h2>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
<table>
<thead>
<tr>
<th>Table Heading</th>
<th>Table Heading</th>
</tr>
</thead>
<tfoot>
<tr>
<td>table footer</td>
<td>table footer</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>table data</td>
<td>table data</td>
</tr>
<tr>
<td>table data</td>
<td>table data</td>
</tr>
<tr>
<td>table data</td>
<td>table data</td>
</tr>
<tr>
<td>table data</td>
<td>table data</td>
</tr>
</tbody>
</table>
<h3>A sub heading which is not as important as the second, but should be used with consideration</h3>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
<blockquote><p>“Ooh - a blockquote! Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.”</p></blockquote>
<h4>A sub heading which is not as important as the second, but should be used with consideration</h4>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
<pre><code>
#header h1 a {
display: block;
width: 300px;
height: 80px;
}
</code></pre>
<h5>A sub heading which is not as important as the second, but should be used with consideration</h5>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
<dl>
<dt>Definition list</dt>
<dd>Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat.</dd>
<dt>Lorem ipsum dolor sit amet</dt>
<dd>Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat.</dd>
</dl>
<h6>This heading plays a relatively small bit part role, if you use it at all</h6>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
<form>
<fieldset>
<legend>Test Form</legend>
<p><label for="">Test:</label> <input type="text" /></p>
<p><label for="">Test:</label> <select><option>ok</option><optgroup>nope</optgroup><option>yep</option></select></p>
<p><label for="">Test:</label> <input type="radio" /></p>
<p><label for="">Test:</label> <input type="checkbox" /></p>
<p><label for="">Test:</label><input type="submit" /></p>
</fieldset>
</form>
[/html]
[php]
<?php
error_reporting(E_ALL ^ E_NOTICE);
set_time_limit(0);
function puts($msg, $time=true){
if($time) echo date('h:i:s').' -- ';
echo $msg."\r\n";
}
function pronounceability($word) {
static $vowels = array('a', 'e', 'i', 'o', 'u', 'y');
static $composites = array('mm', 'll', 'th', 'ing');
if (!is_string($word)) return false;
// Remove non letters and put in lowercase
$word = preg_replace('/[^a-z]/i', '', $word);
$word = strtolower($word);
// Special case
if ($word == 'a') return 1;
$len = strlen($word);
// Let's not parse an empty string
if ($len == 0) return 0;
$score = 0;
$pos = 0;
while ($pos < $len):
// Check if is allowed composites
foreach($composites as $comp):
$complen = strlen($comp);
if(($pos + $complen) < $len):
$check = substr($word, $pos, $complen);
if($check == $comp):
$score += $complen;
$pos += $complen;
continue 2;
endif;
endif;
endforeach;
// Is it a vowel? If so, check if previous wasn't a vowel too.
if(in_array($word[$pos], $vowels)):
if(($pos - 1) >= 0 && !in_array($word[$pos - 1], $vowels)):
$score += 1;
$pos += 1;
continue;
endif;
else: // Not a vowel, check if next one is, or if is end of word
if(($pos + 1) < $len && in_array($word[$pos + 1], $vowels)):
$score += 2;
$pos += 2;
continue;
elseif (($pos + 1) == $len):
$score += 1;
break;
endif;
endif;
$pos += 1;
endwhile;
return $score / $len;
}
puts('Time :: Word :: Pronounceability :: Domain:Availability', false);
$wordlist = '/usr/share/dict/words';
$maxlength = '6'; #Should be even
$words = explode("\n", file_get_contents($wordlist));
while(true):
while(strlen($word1) != $maxlength) $word1 = $words[rand(0, (count($words) - 1))];
while(strlen($word2) != $maxlength) $word2 = $words[rand(0, (count($words) - 1))];
$word1 = implode('', array_slice(str_split($word1), 0, round(($maxlength / 2)) ));
$word2 = implode('', array_slice(str_split($word2), round(($maxlength / 2)), $maxlength));
$word = ucfirst($word1.$word2);
$pronounce = round(pronounceability($word), 2);
if($pronounce > 0.5):
$whois = json_decode(file_get_contents('http://domai.nr/api/json/search?q='.$word), true);
puts($word.' -- '.$pronounce.' -- '.$whois['results'][0]['domain'].':'.$whois['results'][0]['availability']);
endif;
endwhile;
[/php]
Mashes up words based on a dictionary. Change $wordslist to the location of your dictionary, should work out of the box on OSX. It checks the pronounceability of a word and whether the .com is available. I didn't write the pronounceability function, that's why it sucks.
[editline]a[/editline]
Example output:
[code]
Time :: Word :: Pronounceability :: Domain:Availability
04:21:55 -- Hamlea -- 0.67 -- hamlea.com:available
04:21:56 -- Pecmet -- 0.83 -- pecmet.com:available
04:21:58 -- Joyhed -- 0.83 -- joyhed.com:available
04:21:59 -- Neuity -- 0.67 -- neuity.com:available
04:22:00 -- Phuely -- 0.67 -- phuely.com:available
04:22:01 -- Kakden -- 0.83 -- kakden.com:available
[/code]
80% of the time you'll get weird ones that are unusable.
[QUOTE=TerabyteS_;32652732]The underline under the title of the games looks a bit out of place.[/QUOTE]
I noticed that before I posted the picture but remarkably enough, I was too lazy to fix it.
[QUOTE=Kopimi;32660568]It's hard to roll over something you cant see in the first place :v:[/QUOTE]
Then how did you know it was there to begin with?
[IMG]http://i52.tinypic.com/10oh442.png[/IMG]
[highlight](User was banned for this post ("Memeshit" - Orkel))[/highlight]
I had some spare time in my 3 period long IT lesson at School today and decided I'd try and learn how to use the Wordpress framework and do the best I could to make it pleasant to view on mobile devices. I made a basic layout the night before and put it on my flash drive, which I worked off at School.
I just got home and realised that I left the flash drive in the side of the computer at school, so about 2 hours of work will probably be gone and the only bit left is [url=http://dl.dropbox.com/u/5003648/Web2/main.html]this[/url].
I would say that I could just get it back on Monday, but I'm doubtful because I've left things like that at School before accidentally and never seen them again :saddowns:.
[QUOTE=zerosix;32667342]I had some spare time in my 3 period long IT lesson at School today and decided I'd try and learn how to use the Wordpress framework and do the best I could to make it pleasant to view on mobile devices. I made a basic layout the night before and put it on my flash drive, which I worked off at School.
I just got home and realised that I left the flash drive in the side of the computer at school, so about 2 hours of work will probably be gone and the only bit left is [url=file:///C:/Users/Sam/Dropbox/Public/Web2/main.html]this[/url].
I would say that I could just get it back on Monday, but I'm doubtful because I've left things like that at School before accidentally and never seen them again :saddowns:.[/QUOTE]
I think you linked your dropbox link wrong
yeah I did :v: copied the file address from the top of my browser thinking that I was on the dropbox website
[editline]7th October 2011[/editline]
I'm not going to bother spending another 2 hours doing the same thing, going to have a mess around with tumblr for a bit and then move on to actually learning PHP instead of putting it off like I have been doing for the last few months.
[QUOTE=zerosix;32657001]might have to finally get round to installing Sublime 2, Notepad++ looks boring and kinda hurts my eyes with the bright background after a while[/QUOTE]
While I do like Sublime Text, I must tell you that you can change the theme in Notepad++.
[QUOTE=jaybuz;32667632]While I do like Sublime Text, I must tell you that you can change the theme in Notepad++.[/QUOTE]
but that takes effort! I'm fine with Sublime for now, although I do miss Edit With: Notepad++, with Sublime it seems you can only do Open With
[QUOTE=zerosix;32667729]but that takes effort! I'm fine with Sublime for now, although I do miss Edit With: Notepad++, with Sublime it seems you can only do Open With[/QUOTE]
I'm sure there's an option when installing it called "Add to explorer context menu".
[editline]7th October 2011[/editline]
I just downloaded this PackageDownloader plugin: [url]http://sublime-text-community-packages.googlecode.com/svn/pages/PackageDownloader.html[/url]
- but when I run it it just opens like text file in Sublime, what do?
Put it in your sublime packages folder...?
[QUOTE=KmartSqrl;32667892]Put it in your sublime packages folder...?[/QUOTE]
Yeah, I did try after posting that but I keep getting an error regarding some keybinding file. I renamed the file and it ran fine but the Packages context menu wasn't showing up.
I need to create a function that takes a string as input and then returns a numeric value for how close it relates to the English language. The input will have no spaces. Obviously the function will need a dictionary file.
I am writing a cipher solver and want to remove the part of having to manually look at several possibilities to see which one is English.
Anyone know how I would do that? Or if you can link me to an existing function that would be great.
Sorry, you need to Log In to post a reply to this thread.