• What are you working on? v6
    4,671 replies, posted
[QUOTE=T3hGamerDK;32304531]Chrome would be almost naked.[/QUOTE]She does look kinda crazy
I just hacked together this script that can be used to resize image on the fly [code] #imports from bottle import route, run, request, response import urllib, Image, cStringIO, redis import cPickle as pickle #defining settings redis_cache = redis.Redis(host='localhost', port=6379, db=711) #routes and classes @route('/resize') def resize(): if request.GET.get('src'): image_url = request.GET.get('src') else: return 'no image defined' #determining size if request.GET.get('w'): width = int(request.GET.get('w')) else: width = 2000 if request.GET.get('h'): height = int(request.GET.get('h')) else: height = 2000 r_image_id = 'r_'+image_url+'_'+str(width)+'_'+str(height) o_image_id = 'o_'+image_url print 'getting up to redis' if redis_cache.exists(r_image_id): print 'in the resize cache' image_return = redis_cache.get(r_image_id) else: print 'hasn\'t hit the resize cache' #opens image if redis_cache.exists(o_image_id): print 'hitting the cache', o_image_id file_contents = cStringIO.StringIO(redis_cache.get(o_image_id)) else: file_from_url = urllib.urlopen(image_url) file_contents = cStringIO.StringIO(file_from_url.read()) print 'starting to cache original image' redis_cache.set(o_image_id, file_contents.getvalue()) image = Image.open(file_contents) #does resizing to said image size = [width, height] image.thumbnail(size, Image.ANTIALIAS) #preps image for response image_out = cStringIO.StringIO() image.save(image_out, "JPEG") image_return = image_out.getvalue() #saves image to cache redis_cache.set(r_image_id, image_return) response.content_type = 'image/jpg' return image_return #let's run this run(host='localhost', port=9999, reloader=True) [/code] [url]https://github.com/hzy-/Pyzer[/url]
[QUOTE=TerabyteS_;32304504]Notice IE's face.[/QUOTE] That's edited, it wasn't like that originally.
[QUOTE=sentrix;32306345]That's edited, it wasn't like that originally.[/QUOTE]Edited for a reason.
Userd741. I've also sent you a PM Fizzadar, thanks.
They're teaching us HTML5 at school. Admirable.
[QUOTE=TerabyteS_;32316150]They're teaching us HTML5 at school. Admirable.[/QUOTE] sounds better than my html course i made a decent website template in 10 minutes and my teacher looked at it and told me to delete it, then the whole class was forced to do a step by step thing in dreamweaver [url]http://31.3.227.117/sickwebsite/[/url] this is what i achieved at the end of the 3 hour session!
[QUOTE=Kwaq;32317382]sounds better than my html course i made a decent website template in 10 minutes and my teacher looked at it and told me to delete it, then the whole class was forced to do a step by step thing in dreamweaver [url]http://31.3.227.117/sickwebsite/[/url] this is what i achieved at the end of the 3 hour session![/QUOTE] Oh god, the pain
[QUOTE=Kwaq;32317382]sounds better than my html course i made a decent website template in 10 minutes and my teacher looked at it and [b]told me to delete it[/b], then the whole class was forced to do a step by step thing in dreamweaver [url]http://31.3.227.117/sickwebsite/[/url] this is what i achieved at the end of the 3 hour session![/QUOTE] Wonder why.
[QUOTE=Jelly;32318336]Wonder why.[/QUOTE] because according to him divs are wrong and framesets are the way to go
[QUOTE=Kwaq;32318374]because according to him divs are wrong and framesets are the way to go[/QUOTE] I was more aiming towards the fact it looks like shit.
[QUOTE=Crhem van der B;32307996]Userd741.[/QUOTE] [QUOTE=Rashy;32302764]Userd84e Thanks![/QUOTE] [QUOTE=Chuushajou;32301603]User4318 Please & thank you! [IMG]http://www.facepunch.com/fp/ratings/heart.png[/IMG][/QUOTE] [QUOTE=TerabyteS_;32301386]Alright, Userb4be [editline]15th September 2011[/editline] Reads as UserBabe[/QUOTE] [QUOTE=pdkm931;32300250]User1402[/QUOTE] [QUOTE=Snakess;32300167]User4d30 if you could Thanks![/QUOTE] [QUOTE=cani;32297590]Got room for one more? [b]User69f2[/b][/QUOTE] [QUOTE=KmartSqrl;32297504]Useraa65[/QUOTE] d-d-d-d-d-d-d-done [QUOTE=adamjon858;32298429]Fizz I can't help but notice the lack of classes....any reason why you shy away from OOP?[/QUOTE] The core (FD Core thing) is class-based (mostly). The way I see it (in PHP particularly) is any web-app can pretty much be split into two things: loads & processes. In the case of PK Russet processes output javascript, normally they'd simply redirect to a load in a 'normal' site. There's certainly bits which would probably better suit a class (the battle system); but it's PHP; the difference is minimal (and there's *almost* no duplicate code - with a few exceptions soon to be moved to functions). [QUOTE=zzlawlzz;32302741]wait, you cant talk?[/QUOTE] Nope, chat is still (trying) to use APC, there's tonnes of little things; at the moment it's very much a tech-demo as it were. [QUOTE=zzlawlzz;32302880][img]http://i.imgur.com/TljCt.png[/img] swimming :v: [editline]15th September 2011[/editline] I like how sometimes you battle pokemons more than once and i just run around on level 10 and below and get 300 exp without dying :v:[/QUOTE] EXP is generated using the same formula, except it currently doesn't take into account level differences.
If you have room for another one, I'd appreciate it. I'm Userec9b.
[QUOTE=Fizzadar;32319368]d-d-d-d-d-d-d-done The core (FD Core thing) is class-based (mostly). The way I see it (in PHP particularly) is any web-app can pretty much be split into two things: loads & processes. In the case of PK Russet processes output javascript, normally they'd simply redirect to a load in a 'normal' site. There's certainly bits which would probably better suit a class (the battle system); but it's PHP; the difference is minimal (and there's *almost* no duplicate code - with a few exceptions soon to be moved to functions). Nope, chat is still (trying) to use APC, there's tonnes of little things; at the moment it's very much a tech-demo as it were. EXP is generated using the same formula, except it currently doesn't take into account level differences.[/QUOTE] Houston, we have a bug report! [QUOTE][img]http://dl.dropbox.com/u/15894462/ZScreen/2011-09/PK_Russet_-_Mozilla_Firefox-2011-09-16_17.57.36.png[/img][/QUOTE] [QUOTE][img]http://dl.dropbox.com/u/15894462/ZScreen/2011-09/PK_Russet_-_Mozilla_Firefox-2011-09-16_18.00.24.png[/img][/QUOTE] If the player is blocked by an object, the screen will continue going in the direction the player is going.
[QUOTE=pdkm931;32320142]Houston, we have a bug report! If the player is blocked by an object, the screen will continue going in the direction the player is going.[/QUOTE] Yeah, that makes it hard as hell to play because I can't see where I'm going. [editline]16th September 2011[/editline] When the arrow keys are pressed, it seems that the default scrolling event is not prevented, that might be what breaks it. [editline]16th September 2011[/editline] Seems to be fixed now, the html element was not width/height-restricted and without an overflow rule and it made the scrolling overflow :smile:
[QUOTE=TerabyteS_;32320251] Seems to be fixed now, the html element was not width/height-restricted and without an overflow rule and it made the scrolling overflow :smile:[/QUOTE] Cheers for the help!
Userc9da Would appreciate :)
[QUOTE=Kwaq;32320855]Userc9da Would appreciate :)[/QUOTE] Done :) [editline]16th September 2011[/editline] oh and chat works (mostly), and debug is hidden by default
Since donations aren't coming anymore, I'm considering shutting down qfi.im when I still have a gain from it, to avoid risking to actually have to pay for its cost with my own money. Or I could keep the hosting and remake it as an URL shortener. Should I give it one last try and plaster the entire page with one big alert saying that qfi.im is dying if I don't receive any donations (or does anybody know of any other strategy)? [img]http://i.somethingawful.com/forumsystem/emoticons/emot-saddowns.gif[/img]
You could always add ads and ask users not to block them.
[QUOTE=Crhem van der B;32322041]You could always add ads and ask users not to block them.[/QUOTE]I'm banned from adSense and that's the only ad service that gives some actual revenue. Adbrite gave me basically nothing.
[QUOTE=Fizzadar;32320951]Done :) [editline]16th September 2011[/editline] oh and chat works (mostly), and debug is hidden by default[/QUOTE] Userec9b
Seriously, how much is the hosting for qf.im? At the very least...just scale down the hosting or use one of my extra VPS's.
I was browsing through my old files and I've found something. [img]http://gabrielecirulli.com/p/20110916-225055.png[/img] I don't recall ever writing this :v:
I remember when you wrote that!!
[QUOTE=theJohn;32322374]Userec9b[/QUOTE] Done :)
[QUOTE=TerabyteS_;32324620]I was browsing through my old files and I've found something. [IMG]http://gabrielecirulli.com/p/20110916-225055.png[/IMG] I don't recall ever writing this :v:[/QUOTE] [QUOTE=StinkyJoe;27997146]Having an execution time of 0.00240 is not something to be proud of, in that context.[/quote] [URL="http://www.facepunch.com/threads/1056099?p=27997068&viewfull=1#post27997068"]You made it here :v:[/URL]
[QUOTE=deadeye536;32330406][URL="http://www.facepunch.com/threads/1056099?p=27997068&viewfull=1#post27997068"]You made it here :v:[/URL][/QUOTE]Oh. How sad :v:
Right, before I post I'd just like to say something; This has been my first ever HTML + CSS project, I only finished the tutorials the day before I started work on this which was around 4 days ago now It's completely rawr coded using only the reference guide and Notepad++, it's obviously unfinished in the way that there is basically no content in any of the content areas, but by request I can just alter the height if you want a better feel of the website So without further ado, my 1st, nooby website: [url]www.maxhazell.x10.mx[/url] Oh and also, there isn't a real purpose for this, it's just a project to develop skills with, and in time if I start learning PHP I can make things a bit more interesting on it, and with any of your advice, make it better in general Thanks :)
Just bought a 17" Macbook Pro + Matte screen + 128GB SSD. O...M....G This thing is amazing. So much nicer in build quality/design than my old laptop. I mean, the OS is cool too, but I've been hackintoshing for years so it's nothing new. Let me say this though without starting a war (hopefully). If you use any kind of version control system, work often with linux servers, or like to do lots of dev testing with a web server other than Apache: OSX > Windows by soooo much. To those who think Macs are way better for design etc., they're not. They use the same programs as Windows so there isn't much of a difference. I find it funny this is often an argument and not the fact that it makes coding so much nicer.
Sorry, you need to Log In to post a reply to this thread.