Posts

Concatenate rows in Oracle

Recently, I had to concatenate and put in one line (comma separated) the results of a query in Oracle. After one version using replace, xmlagg and xmlelement which had several problems and some reading online I compiled the following code: select rtrim(dbms_xmlgen.convert(xmlagg(xmlelement(e, mycolumn || ', ')).extract('//text()').getClobVal(), 1), ', ') from mytable The extract/getClobVal trick came from "ORA-19011 Character string buffer too small when used with XMLAGG function": http://oracle.ittoolbox.com/groups/technical-functional/oracle-dev-l/ora19011-character-string-buffer-too-small-when-used-with-xmlagg-function-3882635 The dbms_xmlgen.convert trick came from "HOWTO: Avoid Conversion of Escape Codes": http://www.liberidu.com/blog/?p=635 Enjoy :-)

Little batch file for StatSVN

StatSVN retrieves information from a Subversion repository and generates various tables and charts describing the project development. You can get the software this page: http://www.statsvn.org/downloads.html Inside the archive (statsvn-0.7.0.zip) you have a readme.txt and a statsvn.jar . It would've been nice to be able to run StatSVN directly so I played a bit to create this bat file: set home=%cd% set /p project=Project folder: set report=report cd /d %project% del svn.log svn log --xml -v > svn.log cd /d %home% rd /s /q %report% java -jar statsvn.jar -output-dir %report% %project%\svn.log %project% del %project%\svn.log %report%\index.html Just create the bat file in the folder where you extracted StatSVN, run it, paste your project's folder path and wait for the magic to happen. The report will be generated in a folder named report and the report's index.html should be opened in your browser.

Universe to science, and vice versa

Image
We live in our Universe. We all study it and learn about it so that we can live in it. Human civilization systematized all knowledge into sciences like mathematics (from Greek: learning , study , science ), physics (from Greek: nature ), biology, chemistry, etc. The system of sciences is helping us understand where we are, but it is also enabling us to influence the World. The result? We have the Universe and our tiny, dense information structure called sciences. The Universe is "building" the sciences through us and gets influenced by the sciences through us. You can call the sciences, one dimension of our contribution as a society. You can also call the sciences a living organism that moves around and interacts with its environment. Here is an ugly sketch of the pyramid of influences: All the dots are in the Universe. The black ones are the inanimate objects. The red ones are the people on Earth. The blue ones are the objects of science. What is interesting to note here i...

Those little tiny spots on the canvas

During our lives, while learning about the world, we see that everything is composed of something else. Everything evolves into something else. Things change. And then, there are singularities. Singularities are points of the world that the human cannot perceive into. There is The Big Bang that came from a single point. There are those quantum particles that space is "composed of" (maybe not a good example ^^). All those points hide an unimaginable amount of wow. Maybe those points are even more important than all the unknown worlds and undiscovered features of the world we are somewhat able to observe now. What I thought about today is the " Technological Singularity ". The advancement in speed, intelligence, etc. will ultimately bring humans to a new frontier where a new era will begin. This brings thoughts about the end of all things just like any other singularity out there. It's tempting. Our society is a platform, a test-tube, for those scientific endeavor...

Крачка назад във вечния танц

Последните дни излезе новината, че Светия Синод на Българската православна църква иска задължително обучение по религия в училище. Хайде нова акция... Светият Синод иска задължително обучение по религия в училище: http://dariknews.bg/view_article.php?article_id=592334 ДСБ подкрепи искането за задължително обучение по религия: http://dariknews.bg/view_article.php?article_id=593318&audio_id=63200 Негово Високопреосвещенство Ловчанският митрополит Гавраил: http://www.vsekiden.com/77609 Ясно е, че в последно време, политическия елит е застанал зад Светия Синод и може би това е плода на разговорите им. Предполагам има и още, но само бъдещето ще покаже. Какво наблюдаваме в исторически план? Религията, подкрепяна от вярата на народа, е успяла да съхрани българския дух. Комунизмът унищожава религията, за да може хората да вярват само в него и да го подкрепят. Когато той си заминава, хората първоначално се опитват да вярват в държавата. Цялата тази смяна на правителства и партии ...

SMS за милиони

Днес получих следния SMS: Mtel Vi predstavia: Unikalna oferta ot SMS za Milioni! BEZPLATEN SMS s Vasheto EGN na nomer 9999 i moje da spechelite 20 000 leva oshte dnes! Ne e za izpuskane! Стори ми се доста съмнителна цялата работа и се разтърсих. Намерих следните форуми и статии: Номер 9999: http://www.ipmart-bg.com/archive/index.php/t-28709.html МТел продължава да спами* с SMS за милиони: http://varnanews.info/index.php?option=com_content&view=article&id=472:-sms-&catid=44:newsbulgaria&Itemid=91 Внимание, МТел събира ЕГН-та противозаконно: http://varnanews.info/index.php?option=com_content&view=article&id=468:2010-09-23-06-21-08&catid=44:newsbulgaria&Itemid=91 Бихте ли си дали ЕГН-то на номер 9999: http://www.mobilebulgaria.com/forum/307145/1/0/0/%D0%B1%D0%B8%D1%85%D1%82%D0%B5-%D0%BB%D0%B8-%D1%81%D0%B8-%D0%B4%D0%B0%D0%BB%D0%B8-%D0%B5%D0%B3%D0%BD-%D1%82%D0%BE-%D0%BD%D0%B0-%D0%BD%D0%BE%D0%BC%D0%B5%D1%80-9999 Оказва се, че става въпрос за играта SMS за мили...

Universe, Mind, AGI, mumbo jumbo

The Universe. It's there. The mind is in the Universe. It's part of the Universe. It's the Universe. We make the abstraction that what we do is decided by us. Just as the Earth can think of herself as orbiting the Sun. Earth is part of the Universe, so are we. All is natural. AGI is in the Universe. It's part of the Universe. It's the Universe. We make the abstraction that if a computer does something that seems intelligent to us, it has a mind similar to ours. What is happening actually? What is all this mumbo jumbo? Can I please have another view on the matter? The U(niverse) can have virtual U(s) in it. The creators of those U(s) are the "thinkers". They make a dense representation of the U and act upon the real U "intelligently" according to their will. For example our knowledge is that dense representation. Our will is actually the next move that was given to us. But it was given by the same U. We cannot be intelligent and be part of the U. ...