SIDEBAR
»
S
I
D
E
B
A
R
«
lunching ijusthadabeer.com
Jul 19th, 2010 by joecks

what, why and how for the  lunch  of the  crowd-sourcing website ijusthadabeer.com

What

This is a crowdsourcing game, to determine the local current local consumption  of beer. It should be fun, but also provide the idea of sensing an complicated and interessting fact based on a relative simple sensing algorithm. You as a participant is doing nothing special than telling the world that you had a beer, this is then available on this map, showing the big picture of overall thirst.

The interpretation is yours, wheather a place is more populare to get a beer or if an area is more despaired for alohol.

Why

I’m intressted in harvesing little umimportant not-personalized facts to build big pictures, available to everyone, for more of an\ scietific intressted than  comercial use. So lay back and have fun watching how people get involved.

How

This experiment works by allowing the browser to share your location, this might be a problem to some of you, so just disallow and look at the map in read-only mode. By pressing the “I just had a beer” - button you are allowed to tell the world about you current consume, or if you sensed someones else consue close to you. Choosing your place is conveniet to map the sensed information with a current location. And to make clear where what happend.

Cheeres and enjoy!

Importing Cisco pcf settings to Mac OS 10.6 ’s Cisco IPSec Client
Dez 1st, 2009 by joecks

So far importing the pcf config file is not supported. But you just need to use the informations provided by the pcf file itself:
- group name
- group Secret
for that you need to decode the hash using this cisco vpnclient password decoder. Based on the cisco-decrypt.c code, which you might like to compile by your own.

Then you type in you password and username, and everything should work.

View All Icons in android.R.drawable
Okt 23rd, 2009 by joecks

Based on an IconViewer I found in the web I desigend this app to show all icons on android.R.drawable. If you need you might change the Class easily.

Icon Viewer App

Icon Viewer App

package de.dailab.iconviewer;

import java.lang.reflect.Field;

import android.app.*;
import android.content.*;
import android.graphics.*;
import android.os.*;
import android.view.*;
import android.view.View.OnClickListener;
import android.widget.*;

public class IconViewer extends Activity {

    
	private int[] IDS;
	
    private int[] getIDS(){
    //	android.R.drawable.ic_menu_zoom
    //	17301504
    //	17301655
    //	android.R.drawable.ic_menu_zoom
    	int[] ids = new int[800];
    	for (int i = 0; i < ids.length; i++) {
			ids[i]= 17301504+i;
		}
    	return ids;
    }

    /**
     * Determines the Name of a Resource,
     * by passing the R.xyz.class and
     * the resourceID of the class to it.
     * @param aClass : like R.drawable.class
     * @param resourceID : like R.drawable.icon
     * @throws IllegalArgumentException if field is not found.
     * @throws NullPointerException if aClass-Parameter is null.
     * <br><br>
     * <b>Example-Call:</b><br>
     * String resName = getResourceNameFromClassByID(R.drawable.class, R.drawable.icon);<br>
     * Then resName would be '<b>icon</b>'.*/
    public String getResourceNameFromClassByID(Class<?> aClass, int resourceID)
                             throws IllegalArgumentException{
         /* Get all Fields from the class passed. */
         Field[] drawableFields = aClass.getFields();
         
         /* Loop through all Fields. */
         for(Field f : drawableFields){
              try {
                   /* All fields within the subclasses of R
                    * are Integers, so we need no type-check here. */
                   
                   /* Compare to the resourceID we are searching. */
                   if (resourceID == f.getInt(null))
                        return f.getName(); // Return the name.
              } catch (Exception e) {
                   e.printStackTrace();
              }
         }
         /* Throw Exception if nothing was found*/
         throw new IllegalArgumentException();
    }
    
    
    private OnClickListener onClicker;
    
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        IDS = getIDS();
        requestWindowFeature(Window.FEATURE_NO_TITLE);

        
        onClicker = new OnClickListener(){

			@Override
			public void onClick(View v) {
				myImageView mv = (myImageView) v;
				String resName = "noname";
				try {
					resName  = getResourceNameFromClassByID(android.R.drawable.class, mv.resId); 
				} catch (IllegalArgumentException e) {
					// TODO: handle exception
				}
				
				String str = "this image is: " + mv.getResId() + "\n And name: "+ resName;
				System.out.println(str);
				Toast.makeText(getBaseContext(), str, Toast.LENGTH_SHORT).show();
			}
        	
        };
        
        AbsoluteLayout layout=new AbsoluteLayout(this);
        layout.setBackgroundColor(Color.rgb(255,255,255));
        setContentView(layout); 

        GridView gridView=new GridView(this);
        setALParams(gridView,0,0);
        gridView.setNumColumns(4);
        gridView.setGravity(Gravity.CENTER);
        gridView.setAdapter(new ImageAdapter(this));
        layout.addView(gridView);
        
        
    }
    
    public class myImageView extends ImageView{

		private int resId;

		public int getResId() {
			return resId;
		}

		public myImageView(Context context) {
			super(context);
			// TODO Auto-generated constructor stub
		}
		
		@Override
		public void setImageResource(int res){
			super.setImageResource(res);
			resId = res;
		}
    	
    }
    
    public class ImageAdapter extends BaseAdapter {
        private Context context;//コンテキスト
		
		

        public ImageAdapter(Context c) {
            context=c;
        }

        public int getCount() {
            return IDS.length;
        }

        public Object getItem(int position) {
            return position;
        }

        public long getItemId(int position) {
            return position;
        }
        
        

        public View getView(int position,View convertView,ViewGroup parent) {
            ImageView imageView;
            if (convertView==null) {
                imageView=new myImageView(context);
                imageView.setLayoutParams(new GridView.LayoutParams(45,45));
                imageView.setAdjustViewBounds(false);
                imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
                imageView.setPadding(8,8,8,8);
            } else {
                imageView=(ImageView)convertView;
            }
            imageView.setImageResource(IDS[position]);
            imageView.setOnClickListener(onClicker);
            return imageView;
        }
    }

    private static void setALParams(View view,int x,int y) {
        setALParams(view,x,y,
            AbsoluteLayout.LayoutParams.WRAP_CONTENT,
            AbsoluteLayout.LayoutParams.WRAP_CONTENT);
    }
    
    private static void setALParams(View view,int x,int y,int w,int h) {
        view.setLayoutParams(
            new AbsoluteLayout.LayoutParams(w,h,x,y));
    }
}
Moderne Gesellschaft - Hornbach und so
Sep 26th, 2009 by joecks

Ich bin echt glücklich in Deutschland zu leben, wo mittlerweile unter moderner Wohnwelt das hier verstanden wird:

hornbach-september2009-seite19

Gefunden habe ich dieses Bild im Hornbach Katalog für September 2009 auf Seite 19 . :D

iMob
Jun 21st, 2009 by joecks

Beim Versuch den Tempelhof Flughafen zu besetzen am 20.6 fiel mir auf wie schlecht die Demonstranten im Gegensatz zu den Polizisten organisiert waren. Letzteren mussten jedoch eine viel größere Fläche schützen als sie eigentlich mit 1400 Polizisten bewerkstelligen konnten, gegen fast 5000 Demonstranten. Doch warum ist es den Besetzern trotzdem nicht gelungen?

Eine simple Antwort ist sicherlich, dass Sie nicht wussten wo wie viele Polizisten in welcher Anzahl standen und sich deswegen entgegen ihren eigentlichen Motivation, in die Kessel der Polizei treiben ließen. Doch es wäre eigentlich super einfach eine Applikation zu schreiben, die auf einem IPhone/Android liefe und über die aktuelle GPS Position solche Informationen sammelt und auswertet. Auch wenn die Idee einfach Klingt und sicherlich für viele Zwecke einsetzbar wäre (Katastrophensituationen, Konzerte, Umweltschäden ) muss man zunächst ein mathematisches Problem lösen: Wie kann man aus Schätzung verschiedener unabhängigen/ abhängigen Über eine bestimmte Position, einen realen (mit hoher Sicherheit) Wert für die gesamte Menge ermitteln. Wobei man das Problem beachten muss was sich aus der Überlagerung der Quellen ergibt und so eventuell zu Viele Teilnehmer geschätzt werden und man auch wie man eine spezielle Geographie in die Positionirung einflißen läßt. Auch sollten die Teilnehmer nicht von einander wissen welche Schätzung sie abgegeben haben, sodass falsche Einschätzungen vermieden werden können. Doch zuerst wird es wichtig herauszufinden, wie viele aktiv Teilnehmen es bedarf um ein relativ korrektes Ergebnis zu liefern?

Mathematische Lösung und eine genaue Skizze folgt.

xkcd
Mai 24th, 2009 by joecks

meine zwei lieblings xkcd’s bis jetzt:

To be wanted. To be wanted.

OpenBank
Mai 13th, 2009 by joecks

I was thinking of a new kind of local business bank concept. It should be a fully community driven concept, where the community is lending their money for local projects. This projects can be private, like to buy a car, or of a business-kind, like opening a “Spätkauf”. All money transfers are transparent and all projects will have to be approved by a local committee, which will the most insight about a projects success. But why should anybody be willing to gives his money to others? So the main point is that: based on the money given a community member will receive the main part of the interest back.

So if we have an OpenBank with three members Alice, Bob and lets say Klaus, and Klaus likes to take a loan for a new TV. So when he applies for the loan of lets say 3000€, he would have to make a request at the OpenBank. So Alice and Bob invested 2000€ each in the bank, and will have to state their participation in Klaus project. So Alice likes Klaus idea, and will lend him 2000€ where Bob is skeptical and would just invest 1000€ from his base account. So Klaus loan request will be successful and he will have to repay the money with a fixed interest rate of lets say 9% after 12 months From that interest Alice receives 2/3 and Bob just 1/3.

An OpenBank will only operates localy, so that any member of the community is able to understand and check an approved or pending request. No money for loans should be taken from external sources, but the members, so the bank will be always independent. Nobody but the members and OpenBank Infrastructure (servers, technical personal, paper stuff ) will receive the interest.

The concept is not yet complete and there are a lot of questions, about how to react if money will not be repaid, how the relationship will be between lender and debtor …

Well unfortunatly I’m too late with this idea I just found two great banks following that principles: Zopa , SMAVA and Martin just told me about the Grameen Bank

Umlaute in Wordpress 2.7.1 mit Textile PlugIn
Mai 13th, 2009 by joecks

Ich hatte einen Merkwürdigen Fehler bei der Standart Installation von Wordpress 2.7.1- de und en, der bei einem anderen enviroment nicht vorkam, dass die Umlaute nicht korrekt angezeigt wurden.

Ich dachte zunächst das Problem lag an einer fehlenden mysql SET NAME query Anweisung , die über die Variable define('DB_COLLATE','') auf utf8 gesetzt werden müsste.

Doch schlißlich war es das Textile 2 (Improved) Plugin für Wordpress, was die Codierung falsch gemacht hat. Die Werte für das eingehende und ausgehende Codec müssen einfach frei bleiben.

Werder Besäufniss
Mai 9th, 2009 by joecks

Für alle die sich an dieses Besäufniss noch lange erinnern wollen: die Bilder

Auf dem Weg zu ewigem Ruhm
Apr 9th, 2009 by joecks

pp_red.png pp_green.png pp_pink.png pp_black.png Nach dem YouTube Video hat mich der Perverse Puschel etwas beschäftigt, woraus dieses Design entstanden ist. Auf ein T-shirt wirkt es dann noch mehr, sodass ich meinen Beitrag bei laFraise einfach mal unter “Wir Eichhörchen” in den Wettbewerb geschickt habe.

Und wurde mit der Begründung es passe nicht zu ihrem Stil abgeleht. Schade.

»  Substance:WordPress   »  Style:Ahren Ahimsa