Thursday, December 9, 2010

Monday, December 6, 2010

Tuesday, November 2, 2010

Monday, November 1, 2010

Using Java to modify CSS

I'm not a CSS expert, as you might see the search field on this blog has just moved a few pixels down: the shoemaker's son always goes barefoot

Actually I'm doing some stuff related to a tour of polish rock band Buldog.

I cannot find an option in Photoshop to save sliced image in the way I like.




Of course I can do in manually, but with so many divs and many further changes I should automate it somehow :)


Code listing:

public class changeCSS {
public static void main(String[] args) {
try {
ArrayList fileNames = new ArrayList();
fileNames.add("poland-background_PSD_div_NEw.html");

for (String fileName : fileNames) {
File file = new File(fileName);
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));

String line = null;
StringBuffer sb = new StringBuffer();

while ((line = br.readLine()) != null) {
sb.append(line);
sb.append("\n");

if (line.startsWith("#poland-background-PSD-div-")) {
int offset = line.indexOf("div-");
String number = line.substring(offset+4, offset+6);
sb.append("\tbackground: url(images/poland-background_PSD_div_" + number + ".png);\n");
}

}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}


And some excel as well, it's quick enough and automate anough for me:

Tuesday, October 12, 2010

Friday, September 24, 2010

birthday gift

When looking a for a girl, register on a dating site. When looking for a job, register on...

(thank you for a gift)

It's like "A" action cousing "A" result. Right now I know when to start looking for job, but recently I've got so much more other projects and goals to achieve. Just briefly:
Pomysł na firmę
StartupFest
Election Voting Poll
reklama na facebooku
Astronomy at Jagiellonian University
MLM
• simple websites for pensjonat kraków and korepetycje kraków (as you see they need complete redecoration, links now are only for SEO purposes)
coaching training
• Marocco (14.10 - 23.10)
• Vipassana (24.11 - 05.12)

Thursday, September 9, 2010

Wednesday, September 1, 2010

working for Google

• some phone interviews
• some conferences

After all:
The interview team was impressed with your background and accomplishments, and enjoyed getting to know you. We carefully reviewed your background and experience, and though we do not have a position that is a strong match with your qualifications at this time, we will be keeping your resume active in our system. We will continue to use our database to match your profile with new opportunities and will reach out to you if we find an opening for which you may be qualified.

Wednesday, July 28, 2010

My Client Center

It's really annoying. I've been trying on my two accounts:
The login is already an AdWords account.
The login is already linked to the MCC.

Someone described How to Upgrade Your Adwords Account to a MCC Account
HERE COMES THE FUN PART: Delete your old (original account) as an Adwords user

I cannot delete my account so I checked adwords help, trying on account number three:
As you did not submit billing information, your AdWords account was never activated. Therefore, no further action is needed on your part to cancel the account.

Not only I encountered this problem:


I'll will create new account I guess, 40zł as a minimum amount of payment for 220zł for spend (200zł coupon minus 20zł activation fee) is a good deal anyway.

UPDATE: To subscribe to My Client Center no activation fee is required.

UPDATE: Both images are 468x60 (image samples)





The first one is not correct though:

(after this experiment I switched to english user interface - it's more descriptive)

Thursday, July 1, 2010

Facebook application in tab

The point is:
- I've got wakacjones.TV videocast
- I've got Facebook page facebook.com/wakacjones I publish updates regularly
- I've got separate HTML file with list of the upcoming events (it's very simple, no database needed)
- I would like to include this list to my index.php file on main website, and include this list in one (default landing) tab on my Facebook page

As the name suggest - static FBML - is static and cannot load data from other sources. Solution should be simple - create a simple aplication and pin it to the Facebook page - but I don't know how to do it...

Useful resources I found:
Anatomy of a Facebook App
Tabbed Profile
Adding iFrames to your Facebook Application (something a little bit different but the whole page is very useful)
Another tutorial ("One final step in Developer is to allow users to add your application to their profile or pages.")

Some links on my case:
facebook.com/apps/application.php?id=100475266666223
apps.facebook.com/kurwamac/


I've added this app to my page:


I've tried to add it to tabs, but there is no such option:


In Canvas settings I tried either IFrame and FBML Render Method. I tried to set this:


Nothing helps, any clues?
This question was posted to Facebook Platform Developer Forum

Problem solved:

Thank you Moutaz Shams.

Wednesday, June 23, 2010

Friday, June 18, 2010

Monday, June 14, 2010

Monday, June 7, 2010

Friday, June 4, 2010

Twitter services

I realized I haven't posted links to some Twitter services mentioned in some scientific articles. Probably they weren't worth to mention. By the way - I've found a very convinient content agreggator.

:)
:(

I'll map positive and negative words and then connect them with elections, cities and SouthAfricaan world championships.

I tried to perform some searches on Facebook, but there is a bug I cannot understand:



(same query but different date and some authorization exception)

Thursday, June 3, 2010

searching parsing doing

I'll use Facebook search (login needed)

It is as easy as fetching URL: graph.facebook.com/search?q=graph

Problem emerge with parsing response:
{
"data": [
{
"id": "1522384619_124458707586819",
"from": {
"name": "Piyush Rana",
"id": "1522384619"
},
"picture": "http://photos-f.ak.fbcdn.net/hphotos-ak-ash1/hs524.ash1/30793_396695558906_524118906_4425851_3287166_s.jpg",
"link": "http://graph.facebook.com/photo.php?pid=4425851&id=524118906",
"name": "Wall Photos",
"caption": "crazy vs hot graph for girls",
"icon": "http://static.ak.fbcdn.net/rsrc.php/zB010/hash/9yvl71tw.gif",
"type": "link",
"created_time": "2010-06-03T07:45:09+0000",
"updated_time": "2010-06-03T07:45:09+0000"
},
{
"id": "612787180_124298310937744",
"from": {
"name": "Alan Rycroft",
"id": "612787180"
},
"message": "RT @RWWRSS: ReadWriteWeb: Twitter Exposes Intersections in the Social Graph http://bit.ly/cbcUsO",
"link": "http://www.facebook.com/",
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/7/183319479511/app_2_183319479511_5861.gif",
"attribution": "HootSuite",
"type": "link",
"created_time": "2010-06-03T04:32:03+0000",
"updated_time": "2010-06-03T04:32:03+0000"
}
],
"paging": {
"previous": "https://graph.facebook.com/search?q=graph&limit=2&since=2010-06-03T07%3A45%3A09%2B0000",
"next": "https://graph.facebook.com/search?q=graph&limit=2&until=2010-06-03T04%3A32%3A02%2B0000"
}
}


There are some java libraries and RestFB has what I've been looking for. Unfortunately there is one feature I miss very much - Operations without OAuth token (google groups).

I could:
1) parse response with JSON
2) parse response with ANTLR
3) change source code of the library
4) follow Desktop Application Authentication (seem to be the easiest task)

Tuesday, May 25, 2010

Set interface to prevent duplicating items

package test;
import java.util.*;

class Vertex {
int number;

public Vertex(int number) {
this.number = number;
}

public String toString() {
return number + "";
}

@Override
public boolean equals(Object obj) {
return this.number == ((Vertex) obj).number;
}

}

public class SetTest {
public static void main(String[] args) {
Set vertices = new HashSet();

Vertex a = new Vertex(2);
Vertex b = new Vertex(3);
Vertex c = new Vertex(3);

System.out.println(b.equals(c));

vertices.add(a);
vertices.add(b);
vertices.add(c);

System.out.println(vertices);
}
}


Class HashSet
Interface Set
A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1 and e2 such that e1.equals(e2), and at most one null element. As implied by its name, this interface models the mathematical set abstraction.

Equals method is overriden but it doesn't work!
true
[3, 2, 3]


groups.google.com/group/comp.lang.java.programmer/browse_thread/thread/5abcb183daa74336#

Monday, May 24, 2010

Sunday, May 23, 2010

Who want to be a programmer?

I know I will work for Google one day. Right now I'm about to finish my master thesis and in the meantime look what I've found a moment ago: Software Engineer - New Grad - Krakow

Sounds like a perfect spot for me!

The amazing final of a 1 millions dollars winnner, it's just a matter of time when I earn my first million. Just look at this interview with CEO of Asseco, his stock share are worth about 500m (I trust people who own 500m). It's worth to translate:
Constantly we say we have great programmers. This is not true. With all due respect for the profession of a programmer, decide about the success of analysts, who describe the IT processes. And, unfortunately, not educated good analysts. If they have, thanks to the companies for which they worked, and not Polish schools that would prepare them. The average university lecturer in computer science had the chance to achieve a major IT project, so it's hard to pass the knowledge relevant to business.

Honestly I'm not top programmer (one day I'll) but having at least one better person in each proffesion in my contacts and wide knowledge is undoubtfully an advantage.

Friday, May 21, 2010

brief receiving

emptypage has received a brief! I wish I could publish it but I guess it isn't in a good taste. Anyway I've started preparations, it's actually a very good training.

Right now I'm trying to put SWF uploader into work:


That's the sole of developer's job!

Previously I was trying to get image uploader plugin from CKeditor but the code was a lite bit obfuscated while SWF uploader seems to be dedicated tool for this.

Wednesday, May 19, 2010

facebook client library

If you are looking for facebook-platform.tar.gz here is the answer:

(look at the recent date)

Old REST API says: If you are new to the Facebook Platform, we recommend you use our new Graph API instead.

It's a terrible mess, I'm unable to log in to even the simpliest application because recent SDK version doesn't include methods every tutorial I encounter uses.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>stefan_test</title>
</head>
<body>
<h1>stefan_test</h1>
<p><fb:login-button autologoutlink="true"></fb:login-button></p>
<p><fb:like></fb:like></p>

<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: '100475266666223', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol +
'//connect.facebook.net/en_GB/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
</body>
</html>


Now is 3AM, tommorow I'm gonna try this tutorial part 1 and 2 (a lot of code included encourages me to do so)

Tuesday, May 18, 2010

Thursday, May 13, 2010

Twitter keyphrases

My collegues have very similiar topic. I've listeded to their presentation and here is the of the keyphrases that seemend useful to me:
- collaborative filtering
- latent semantic analysis
- singular value decomposition
- item based collaborative filtering recommendation
- robust collaborative filtering
(and the last term with a paper covering this topic)
- Short and Tweet: Experiments on Recommending Content from Information Streams (PDF)

Two more links on Twitter advertising:
- Will Twitter’s advertisers be severely let down?
- http://www.wallblog.co.uk/2010/04/13/users-divided-on-twitter-ads/

youtube income, youtube monetization

I realized that every letter I would send to an employeer I would have to end with a disclaimer: "I will for google one day so this is only temporary job"

10 Insights From 11 Months Of Working At Google (91 comments)

Why Google Employees Quit (345 comments)

On a conference about video there was a discussion about 10 minutes limitation on YouTube. They say there are some law cases anyway extending this limit can be an easy way to get some revenue.

Tuesday, May 11, 2010

hosting code

I've created github repository here.

Even following instructions is not a piece of cake, even getting installer, even installing... "Social coding" is a nice thing but it doesn't work that way. Decent client is a must if want to gain wider audience.

I've created google repository here.

Right now I'm installing SVN plugin to Eclipse.

Getting Started with Google Code Hosting, Subversion, and TortoiseSVN without feeling like an Idiot - explained really simple!

Sunday, May 9, 2010

Saturday, May 8, 2010

Friday, May 7, 2010

it's been a long time

In the meantime there was a new release of the library - download.


(logged to my test account to find out that the last activity was 4 months ago)

Another question posted to newsgroup here and here.

Just basic stuff, learning the API:

public class Main {
public static void main(String[] args) {
Twitter twitter = new TwitterFactory().getInstance(XXX, XXX);
try {
Query query = new Query("obama");
query.setGeoCode(new GeoLocation(50.0, 10.0), 1000.0, Query.KILOMETERS);
QueryResult result = twitter.search(query);

for (Tweet tweet : result.getTweets()) {
System.out.println(
tweet.getCreatedAt() +
" user: " + tweet.getFromUser().substring(0, 2) +
" text: " + tweet.getText().substring(0, 2) +
" loc: " + tweet.getGeoLocation()
);
}

} catch (TwitterException e) {
e.printStackTrace();
}
}
}


Some useful classes: Query, QueryResult

Thursday, May 6, 2010

google adwords dla agencji

I registered a few days ago:
Otrzymujesz tę wiadomość ponieważ zarejestrowałeś się w serwisie Google dla agencji.

Twoja rejestracja w serwisie Google dla agencji przebiegła pomyślnie.

Zaloguj się do serwisu Google dla agencji poprzez stronę www.google.com/googledlaagencji. Przejdź do Panelu Google dla agencji, aby zarejestrować się na bezpłatne szkolenie Google dla agencji, zdać test i przeglądać inne użyteczne informacje.


I took a test, in this case headline includes the answer:


It wasn't that easy, I checked some things on the internet, anyway that was the point - force people to get a quick review of the basics:


Some useful links I encountered on my way:
analytics tracking
webmaster tools
youtube on your site

Wednesday, May 5, 2010

How to start cyfrowy dorsz?

List of groups, groups of lists here:
16. System oceniania prowadzących
Prowadzący: dr inż. Jacek Dajda
Prowadzący PP: mgr inż. Witold Rakoczy
Zespół: Anna Leśniak, Marcin Nowak, Paweł Obrok Paweł Pierzchała

What do you need to start working on this project:
• VMware
• Ubuntu

Remember, linux is not for people, so you must be cautious when following instructions:
• update sources list
• sudo apt-get install ruby
rubygems (untar, setup.rb)

1. jezeli masz jakiekolwiek rubygemsy to zrob:

$ gem install rubygems-update # again, might need to be admin/root
$ update_rubygems # ... here too


2. jezeli nie, to zainstaluj jakiekolwiek (sudo apt-get install rubygems)
i zrob punkt 1.

• gem install rubygems-update
• update_rubygems
• sudo gem install bundler
• sudo apt-get install ruby1.8-dev
• sudo apt-get install libxml2-dev
• sudo apt-get install libxslt-dev
• sudo apt-get install libsqlite3-dev
• sudo apt-get install libopenssl-ruby
• cd cyfrowy_dorsz/frontend then sudo bundle install
• bin/merb
• localhost:4000

github.com
codegarden (login needed)

Actually none of my fellow developers were able to start it. That is why I copied virtual machine with working application. But it wasn't the last tricky part - I needed to clean public keys and learn how to use git.


git clone git@github.com:obrok/cyfrowy_dorsz.git
git pull origin master (sudo bundle install just to make no gems were added)
git add .
git commit
git push origin master


Remember to perform tests before each commit: rake spec

If some error occur update database: rake sequel:db:migrate

To add user:
bin/merb -i
User.create(:email => "aaa.aaa.pl", :password => "pass", password_confirmation => "pass")


To manage branches is also not my pair of shoes. As my excuse - this is my first experience with git.

Adobe Flash Builder

Unfortunale I've missed the event, nevertheless it's nice to get an email with these instructions:
https://freeriatools.adobe.com/flexevent?coupon=9u9bpdcUcp0L
'Program' 'Flash Builder 4 for event attendees'
9u9bpdcUcp0L

Thanks for Applying for a Free Copy of Adobe Flash Builder 4

Flex in a week (sounds like a challenge)

Tuesday, May 4, 2010

facebook application developer

This link is very useful: Apps on Facebook.com

This is my app (based on this tutorial) and here is the list - list of your own applications.

Actually it's easier than you think!

One day I might use google app engine and then this plugin might be useful. I created a brief presentation about it:


And here is the link to the sample aplication (reload if any error occurs).

Monday, May 3, 2010

working on master thesis

Later Today I'm gonna post my first draft to scribd:
Docelowo będzie ona opublikowana w języku angielskim a obecny dokument ma wyłącznie charakter roboczy.

Ultimately, it will be published in English and the current document is only for draft purpouses.

In worst case I'll use google translate.


Michał-Stefanów-Praca-Magisterska-2010-05-03

In the meantime I'll add some new link to this list (mashable):
- Twitter Research Tools
- Extraordinary Twitter Updates
- Twitter Badges
- Twitter Visualizations
- interia.pl

press acreditation

There are several rules | link:
1) Przy odbiorze akredytacji należy okazać oryginał legitymacji prasowej.
2) Brak podpisów, pieczęci lub ważnej legitymacji skutkuje odrzuceniem wniosku lub odmową wydania akredytacji.
3) Akredytacje będą wydawane TYLKO dziennikarzom w rozumieniu art. 7 ust. 2 pkt 1) ustawy z dnia 26 stycznia 1984 roku Prawo prasowe.
4) Wnioski przedstawicieli klubów, zespołów, sponsorów, agencji reklamowych i promocyjnych będą odrzucane.
5) Termin nadsyłania wniosków mija 1 maja 2010r.

Of course I don't meet any requirement, that is why I'm gonna send an inquiry. Honestly: no chance.

some more Facebook stuff

I've created a page for a president:


Understandably it was recategorized:


I've created another account and to my surprise my real account was the first suggestion:

(IP matching don't think so)

Created account becouse another one was blocked:


Honestly this is the weirdest group I've ever seen:

reklama na Facebooku: working on better offer, working on website, working on campaign for rozwój osobisty, working on master thesis that is actually my priority.

Sunday, May 2, 2010

Saturday, May 1, 2010

Friday, April 30, 2010

summer internships in Sabre

I've sent them application once. Right now it's too late to apply - deadline was 15th April. I'm feeling like another great oppurtunity is missed... Anyway, maybe they'll hire me later, it's worth to try.

Tuesday, April 27, 2010

Google Summer of Code

Sounds like a perfect oppurtunity missed:
Students can submit their applications via the Google Summer of Code 2010 site from March 29 - April 9, 2010. We hear almost universally from our mentoring organizations that the best applications they receive are from students who took the time to interact and discuss their ideas before submitting an application, so make sure to check out each organization's "Ideas" list to get to know a particular open source organization better.

Too little Twitter will make you completely obsolete.

Saturday, April 24, 2010

Friday, April 23, 2010

Linux is not for people

I just cannot stand how harsch is to use Linux of any kind. I made a screenshot of some error on my VMware Ubuntu. Closing toolbox in Gimp couses closing od Gimp itself. Anyway the quickiest way is to share files via GMail:
Use the standard Windows File Sharing / Samba to create a networked share point. You don't need to do anything to the VM's configuration. Just treat both the host and guest as separate PCs on the same network, and configure everything as such.
On the Linux side, it depends on the distro, the shell, and the window manager.

I've never worked on Mac, right know I think about presentation of Radosław Długosz. What I remembered at most is: "macs connets advantages of both PC and Linux".

Monday, April 19, 2010

Saturday, April 17, 2010

Saturday, April 10, 2010

facebook targeting

It's possible to select some pages in targeting tool:


It depends on the type:


There is an interesting note on Pride&Glory facebook fanpage, I just checked it out:


The reason is: some people doesn't specify Poland as country:


It's obvious that some event are now being cancelled:


Sometimes it might be useful to check some details or discuss on the event site but there is no such possibility: