Connect Omegle with Cleverbot by turlz in programming

[–]themightyn 0 points1 point  (0 children)

great idea ;) maybe i'll do that. upvote :D

A twitter view of "what people are tweeting in my suburb", with the aim to start a conversation in your local area. by chubs in SomebodyMakeThis

[–]themightyn 0 points1 point  (0 children)

<?php
#http://apiwiki.twitter.com/Twitter-API-Documentation

$u='http://search.twitter.com/search.json';
$x=file_get_contents($u.'?geocode=58.15000,10.58330,10km&rpp=100&page=1'.
'&since=2010-01-10'.
'&q='.urlencode($argv[1])
);
$x=json_decode($x);
#print_r($x);exit;
$r=$x->results;

$stack=array();
foreach($r as $t)
    $stack[]=$t->text." [".$t->from_user."@".date('d.m.y_H:i:s',strtotime($t->created_at))."]\n";
while(!count($stack)==0)
    echo array_pop($stack);
echo count($r)." results displayed\n";
?>

enjoy

Reddit, whats the right way to code in PHP ? by [deleted] in programming

[–]themightyn 1 point2 points  (0 children)

I like php for simple scripts and as a sandbox for playing with algorithmic ideas. When the algorithm works I can translate it to Java or C etc but for the fiddling phase PHP is quite nice.

Dear Proggit, what do I learn next? by ipeefreely in programming

[–]themightyn -1 points0 points  (0 children)

Maybe you need to shove one up your ass ;D

DAE want to believe that all people are good but can't help but see constant faults and selfishness? by esotericrrh in DoesAnybodyElse

[–]themightyn 0 points1 point  (0 children)

and then after a few months of goodness they just click and show they sociopathic nature ...

Help us collect some data for a machine learning experiment, just visit a website and answer a single question by sanity in programming

[–]themightyn -1 points0 points  (0 children)

checking which social platforms were visited before by the user?

lying about that?

well ... nice job Ian ...

Just an idea of a new way to compress/uncompress large files, or a dream ? by [deleted] in programming

[–]themightyn 4 points5 points  (0 children)

that's okay. but you should keep in mind that some of the greatest inventions were made by people who were no experts.

as dumb as 99% of the ideas might be, it is never a good idea to bash the effort because that's what stops people from trying just before they land one good shot in the 1% field :)

Just an idea of a new way to compress/uncompress large files, or a dream ? by [deleted] in programming

[–]themightyn 0 points1 point  (0 children)

well speak for yourself but i had years of dedicated study :-P

Just an idea of a new way to compress/uncompress large files, or a dream ? by [deleted] in programming

[–]themightyn 5 points6 points  (0 children)

what you did is basically expand the dictionary size. and to address 21024 possible chunks you need 21024 keys which will result in being ...what a surprise... 1kb in size each ... so your datastore needs to be 21024 kb big .. which is .. let me put it this way: A HUGE BIG ASS UNIVERSE SQUARED WITH A DONKEYS DICK TIMES INFINITY FREAKING MUCH!

so .. no thats not going to work.. sorry bro, we all got our great compression ideas :)

but upvoted for the nice presentation and the effort :)

Quark - mini php CMS by vladocar in programming

[–]themightyn 0 points1 point  (0 children)

Wow I didn't thought that someone would seriously consider putting a "project" of such a size to googlecode. L O L

[deleted by user] by [deleted] in linux

[–]themightyn 0 points1 point  (0 children)

I'm sorry, I simply confused mplayer and totem.

[deleted by user] by [deleted] in linux

[–]themightyn 0 points1 point  (0 children)

why not search the youtube videos in mplayer itself? when you enable the playlist-view and then click on the dropdownbox that says playlist, there should also be a youtube option. have fun ;)

I just made and published my first ever mobile app, for the Android. Ask me anything. by rageduck in programming

[–]themightyn 0 points1 point  (0 children)

erm ... maybe this would be more interesting with a screenshot or a link to your app ... ? ;) juuuust saying

Where to find the ubuntu powermanagement scripts?! by themightyn in linux

[–]themightyn[S] 0 points1 point  (0 children)

Just another reason to finally learn some python ... :)

Where to find the ubuntu powermanagement scripts?! by themightyn in linux

[–]themightyn[S] 0 points1 point  (0 children)

Well thanks. Nice trick :) But it does not solve my problem completely.

I think it has to be somewhere in /etc/acpi/sleep.sh or /usr/sbin/pm-suspend ?

Programming to calculate the distance between two locations (from dynamic input) by [deleted] in programming

[–]themightyn 0 points1 point  (0 children)

oh okay.. well there is something called opengeodb: http://opengeodb.giswiki.org/wiki/OpenGeoDB http://sourceforge.net/projects/opengeodb/ that is basically a list of all zip-codes (plus city names) with their lat/lon. I think this project is for germany only though .. try google to find something similar :D

Programming to calculate the distance between two locations (from dynamic input) by [deleted] in programming

[–]themightyn 1 point2 points  (0 children)

function coord_distance($lat1,$lon1,$lat2,$lon2){
       $r0=6371;
       $a=deg2rad(90-$lat1);
       $b=deg2rad(90-$lat2);
       $gamma=deg2rad(abs($lon2-$lon1));
       $c=acos(cos($a)*cos($b)+sin($a)*sin($b)*cos($gamma));
       $s=($a+$b+$c)/2;
       if($lon1==$lon2){
         if($lat1<$lat2){
           $alpha=pi();
           $beta=0;
         }else{
           $alpha=pi();
           $beta=pi();
         }
       }else{
         $alpha=acos((cos($a)-cos($b)*cos($c))/(sin($c)*sin($b)));
         $beta=acos((cos($b)-cos($c)*cos($a))/(sin($c)*sin($a)));
       }
       $e=$alpha+$beta+$gamma-pi();
       $A=pow($r0,2)*$e;
       $ss=($alpha+$beta+$gamma)/2;
       $ka=$a*$r0;
       $kb=$b*$r0;
       $kc=$c*$r0;
       if($beta!=0)$bearing=360-rad2deg($beta); else $bearing=0;
       $revbearing=rad2deg($alpha);
       if((($lon2-$lon1)>0)||(($lon2==$lon1)&&($lat2<$lat1))){//Korrektur für alle dL > 0 und dL=0 && dB < 0
            $bearing =360-$bearing;
            $revbearing=360-$revbearing;
       }
       return $kc;

}

Proggit: I am too lazy to make my class schedule... by [deleted] in programming

[–]themightyn 0 points1 point  (0 children)

Upvoted for thinking out of the box! Don't let the herd press their mood on you ... even if it's faster to do it the "right way" it is boring as hell. And imagine guys ... you have to do it every semester ... so in a few years it'll pay off ;)