воскресенье, 22 июня 2008 г.

Hi guys. I spended all day for listening podcasts about japan live. I want to go to japan, if you want to sponsor me you can send me money(for more information chat via icq:444220842) :) or give me freelance work(rails, asp.net, java or other technologies, preference to c/c++ qt job) :)

See you later.

среда, 18 июня 2008 г.

Display flickr images using javascript.

Type.registerNamespace("Voodoo");

Voodoo.FlickrImages = function(element) {
Voodoo.FlickrImages.initializeBase(this, [element]);

this._numberOfPages = 0;
this._currentItem = 17;
this._maxItems = 0;
this._xml = null;
}

Voodoo.FlickrImages.prototype = {
initialize: function() {
Voodoo.FlickrImages.callBaseMethod(this, 'initialize');

$addHandler(this._prevButton, 'click', Function.createDelegate(this, this.onPrevButtonClick));
$addHandler(this._nextButton, 'click', Function.createDelegate(this, this.onNextButtonClick));

/// url for getting feeds from flickr with urls and titles to images.
Proxy.GetXml("http://api.flickr.com/services/feeds/photos_public.gne", 600,
Function.createDelegate(this, this.onGetXmlSuccess),
Function.createDelegate(this, this.onGetXmlFailure),
this);
},
dispose: function() {
Voodoo.FlickrImages.callBaseMethod(this, 'dispose');
},

onGetXmlSuccess : function(result, context, methodName) {
this._xml = result;
this._maxItems = this._xml.getElementsByTagName('feed').item(0).childNodes.length - 17 / 2;
this.reloadImage();
},

onGetXmlFailure : function(error) {
},

onPrevButtonClick : function(e) {
if (this._currentItem != 17)
{
this._currentItem -= 2;
this.reloadImage();
}
},

onNextButtonClick : function(e) {
if (this._currentItem != this._maxItems)
{
this._currentItem += 2;
this.reloadImage();
}
},

reloadImage : function() {
this._imagesPanel.innerHTML = "

" + this._xml.getElementsByTagName('feed').item(0).childNodes.item(this._currentItem).childNodes.item(13).textContent + "

";
},

get_ImagesPanel : function() {
return this._imagesPanel;
},
set_ImagesPanel : function(value) {
this._imagesPanel = value;
},

get_PrevButton : function() {
return this._prevButton;
},
set_PrevButton : function(value) {
this._prevButton = value;
},

get_NextButton : function() {
return this._nextButton;
},
set_NextButton : function(value) {
this._nextButton = value;
},

get_NumberOfPages : function() {
return this._numberOfPages;
},
set_NumberOfPages : function(value) {
this._numberOfPages = value;
}
}

Voodoo.FlickrImages.registerClass('Voodoo.FlickrImages', Sys.UI.Control);

if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();

вторник, 17 июня 2008 г.

Write simple expander for text area(Very simple effect).

Today I started to recollect my knowledge in javascript and for simple training I wrote expander for html element textarea.

// library/expander.js
expander = {
_init : function() {
var elements = document.getElementsByTagName('textarea');
for(var i = 0; i < elements.length; i++)
{
var area = elements[i];
if (area.className.search(/\bexpander\b/) != -1)
{
expander.addActions(area);
}
}
},

addActions : function(area) {
area._rows = area.rows;
area._cols = area.cols;

area.onkeyup = expander._onkeyup;
area.onfocus = expander._onfocus;
},
_onkeyup : function(e) {
var area = e.target;
if ((area.value.length - area.rows) / area.cols > area.rows)
{
var count = (area.value.length - area.rows) / (area.cols * area.rows);
var lines = area.value.split('\n');
var line = lines[lines.length - 1];
if (line.length > area.cols)
{
var n = Math.floor(line.length / area.cols);
for(var i = 0; i < n; i++)
{
lines[lines.length - 1 + i] = line.substring(0, area.cols);
line = line.substring(area.cols, line.length);
}
if (line.length != 0)
{
lines[lines.length - 1 + i] = line;
}
area.value = lines.join('\n');
}
else
{
area.value += '\n';
}
area.rows += count;
}
else
{
if (area.value.length + area.cols <= area.cols * area.rows)
{
var count = area.cols * area.rows / (area.value.length + area.cols);
area.rows -= count - 1;
}
}

area._rows = area.rows;
area._cols = area.cols;
},
_onfocus : function(e) {
var area = e.target;

area.rows = area._rows;
area.cols = area._cols;
}
};

window.onload = expander._init;



// test.html

.html.
.head.
.title. Test page ./title.
.script. type="text/javascript" language="javascript" src="library/expander.js"../script.
./head.
.body.
.textarea id="area1" class="simple-text expander" rows="1" cols="20"../textarea.
.textarea id="area2" class="simple-text expander" rows="1" cols="20"../textarea.
./body.
./html.

понедельник, 16 июня 2008 г.

Music of the day

Slipknot (sic)

Poison for my brain)) such as sharepoint.
---
Today I found very good information about audit in sharepoint,
for more information :) see
http://www.microsoft.com/Rus/Msdn/publish/articles/bb397403.mspx

3 exam is approved by lecturer

It's beatifull day today)). Now I'll start to prepare for my evening basketball because 3 examination is approved.

суббота, 14 июня 2008 г.

exams))

Now I'm preparing for my exams. I try to inside out learn all having information about politology, sometimes I'm parsing wiki for additional knowlegdes but I haven't time, aaaa what do I have to do???

пятница, 13 июня 2008 г.

Music for this day.)



YellowCard
Lights and Sounds


;)

Information for anonymous readers.)

You might have noticed that my blog are writting with long break and sometimes with extrimly posting information(such as that day). Now I'm studing and have't time to write more pretty post. But фs soon as the opportunity I'll start to type more intresting and .NET article)).

The day after tomorrow)

Today I take my first task in new project.
M: "Go to read books about features in SharePoint;)"
One of the most abilities given to me that's chance working with ASP.NET and javascript, css and other crap) as you know it's black line for me.

Please approve my death.

Now I'm sitting on new project about 3 days.
1 day - Aaahhh, My death is so closely;) (I started to learn share point technologies:)).
2 day - all tired, we are alone in this cruel world.
3 day - I feel good, 6 hours and I'm going to sugar holiday.