Function eval is inherent in scripting languages, despite that Java isn't scripting language and such method there isn't present, there is a possibility to realize her, Java gives for this purpose tools. We will be defined that for this purpose it is necessary:Функция eval присуща скриптовым языкам, не смотря на то, что Java не является скриптовым языком и такого метода там нет, существует возможность реализовать её самим, Java предоставляет для этого инструменты. Определимся, что для этого нужно:
1) generation of a code for compilation 1) генерация кода для компиляции
2) compilation in byte-code 2) компилирование в байт-код
3) loading of a byte-code and its execution 3) загрузка байт-кода и его исполнение
To read completely»Читать полностью »
Something has climbed up in a head and has decided to write interpreter Brainfuck'a :) Here that has turned out:Что-то взбрело в голову и решил написать интерпретатор Brainfuck’а :) Вот что получилось:
To read completely»Читать полностью »
Under FreeBSD I something haven't dared to be engaged in it, well тат like as replacement to Windows and was necessary to do. The problem is that: there is a program on java which through ODBC communicates with MSAccess base, here this perversion it was necessary to force to work under ubuntu. Have been to begin with established unixodbc and mdbtools. The field of their installation of any labels in the menu hasn't appeared, commands аля unixodbc mdbtools not прокатили, through search надыбыл/usr/share/menu/unixodbc-bin and that there already ODBCConfig, it is necessary to tell to sense from this гуишной covers not much, and hasn't understood as normally what there to make, all errors gave out, by practical consideration and Google has been found out that all that is necessary is in /etc/odbc.ini and /etc/odbcinst.ini. In odbcinst.ini there were driver MSAccess options which to me всётаки it was possible to push. And in odbc.ini options System DNS where actually also should is описалово конекта to base, anything difficult there wasn'tПод FreeBSD я что-то не решился этим заниматься, ну тат вроде как замена винде и делать пришлось. Задача такова: есть прога на java, которая через ODBC общается с MSAccess базой, вот это извращение нужно было заставить работать под ubuntu. Для начала были установлены unixodbc и mdbtools. Поле их установки никаких ярлыков в меню не появилось, команды аля unixodbc mdbtools не прокатили, через поиск надыбыл /usr/share/menu/unixodbc-bin а то туда уже ODBCConfig, надо сказать толку от этой гуишной оболочки не много, так и не разобрался как нормально что там сделать, всё ошибки выдавал, опытным путём и гуглом было выяснено, что все что надо находится в /etc/odbc.ini и /etc/odbcinst.ini. В odbcinst.ini находились настройки драйвера MSAccess которые мне всётаки удалось запихнуть. а в odbc.ini настройки System DNS где собственно и должно находится описалово конекта к базе, ничего сложного там не было
11 22 33 44 55 66 77 88 | [myConnection][myConnection] Description = Microsoft AccessTS Description = Microsoft AccessTS Driver = MDB1 Driver = MDB1 Database = /home/vampirus/db1.mdb Database = /home/vampirus/db1.mdb Servername = localhost Servername = localhost UserName = UserName = Password = Password = Port = 5432 Port = 5432 |
помойму only Driver, Database here are necessary but time works and so that has left)помойму только Driver,Database тут нужны но раз работает и так то оставил)
Has checked up work проверил работу
11 22 | isql-v myConnectionisql -v myConnection select * from Realtion select * from Realtion |
Works, well I think hurt, so it is simple, I will check up in the evening, how there java with it will make friends, and has gone for work.работает, ну думаю зашибись, так просто, вечером проверю, как там java с этим подружится, и пошёл на работу.
In the evening. Вечером.
About attempt of start the program dropped out with an exception, still after all I have for some reason solved that it will be better if to put Open-jdk вмето sun’овского. All right has put сановкий jdk. And here I was waited by a surprise, probably the driver clumsy or that, but at any deal was Result Set Type is not supported. It turns out from MSAccess it was necessary отказыватся, I am better than anything mysql haven't thought up. It is necessary to tell to put mysql php apache I didn't want, since for these purposes I wanted to put FreeBSD on an old computer. Well all right I think it is useful mysql for something. Since php it would not be desirable to put, has solved well I will try through perl it should be not difficult, but the module (or how it there?) DBD:ODBC It has not appeared, about its attempt to deliver Makefile.pl has given out what that errors, to understand in which небыло any desire. Then for import, has solved поробовать mdbtools, knowingly put, but on how many I could understand import went only in csv, well I think here on python I will try, the blessing with csv I on it already worked, but here for me waited подлянка, for work with mysql it was necessary to deliver something, and there was already a laziness. It like in mysql to me was last attempt kexi under FreeBSD has thrown (or not, непомню), but here she refused to do it and fell. про попытке запуска прога выпадала с исключением, ещё бы ведь я почему-то решил что будет лучше если поставить Open-jdk вмето sun’овского. Ладно поставил сановкий jdk. И тут меня ждал сюрприз, видимо драйвер корявый или что, но при любом раскладе было Result Set Type is not supported. Получается от MSAccess надо было отказыватся, ничего лучше mysql я не придумал. Надо сказать ставить mysql php apache я не хотел, т.к. для этих целей я хотел поставить FreeBSD на старый комп. Ну ладно думаю пригодится mysql ещё для чего-нибудь. т.к. php ставить не хотелось, решил ну попробую через perl не сложно должно быть, но модуля(или как он там?) DBD:ODBC не оказалось, про попытке его доставить Makefile.pl выдал какие то ошибки, разбираться в которых небыло никакого желания. потом для импорта, решил поробовать mdbtools, не зря же ставил, но на сколько я смог понять импорт шёл только в csv, ну думаю тут на python попробую, благо с csv я на нём уже работал, но тут меня ждала подлянка, для работы с mysql надо было что-то доставить, а было уже лень. Последней попыткой была kexi под FreeBSD она вроде в mysql мне перекинула(или нет, непомню), но тут она отказывалась это делать и падала.
Уторо evenings мудренее. Уторо вечера мудренее.
It was necessary to put at once php and not to show off, ah moreover it was necessary to rock the driver odbcmysql and to adjust, but these are trifles. скриптик idle time of anything difficult Надо было сразу поставить php и не выпендриваться, ах да ещё пришлось качнуть драйвер odbcmysql и настроить, но это мелочи. скриптик простой ничего сложного
11 22 33 44 55 66 77 88 99 1010 1111 1212 1313 1414 | <? php <?php $r = odbc_connect ("myConnection", "", ""); $r = odbc_connect("myConnection","",""); $q = odbc_exec ($r, "select * from Relation"); $q = odbc_exec($r,"select * from Relation"); $conn = mysql_connect ("localhost", "root", "password"); $conn = mysql_connect("localhost","root","password"); mysql_selectdb ("db1"); mysql_selectdb("db1"); while (odbc_fetch_row ($q)) { while(odbc_fetch_row($q)){ $PS=odbc_result ($q, "PS"); $PS=odbc_result($q,"PS"); $Parg = odbc_result ($q, "Parg"); $Parg = odbc_result($q,"Parg"); $X = odbc_result ($q, "X"); $X = odbc_result($q,"X"); $R = odbc_result ($q, "relation"); $R = odbc_result($q,"relation"); $Y = odbc_result ($q, "Y"); $Y = odbc_result($q,"Y"); mysql_query ("INSERT INTO Relation (PS, Parg, X, relation, Y) VALUE (' $PS', ' $ Parg ', ' $X ', ' $R ', ' $Y ')"); mysql_query("INSERT INTO Relation (PS,Parg,X,relation,Y) VALUE ('$PS','$Parg','$X','$R','$Y')"); } ?> ?> |
And here I from the reliable start a program, and it to me go wood, table RELATION isn't present, how so? There is it speak (well I haven't got used still that the register matters), all right I rename the table in RELATION, and it to me isn't present table Relation, ah you a sou … = in what mean делат a program in Windows to group the person. Having translated all to the uniform register, java all has eaten and has started to work)и вот я с надежной запускаю прогу, а она мне идите лесом, таблицы RELATION нету, как так? есть она говорю(ну не привык я ещё что регистр имеет значение), ладно переименовываю таблицу в RELATION, а она мне нету таблицы Relation, ах ты су… @= во что значит делат прогу в винде группе человек. Переведя всё к единому регистру, java всё скушала и начала работать)
11 22 33 44 55 66 77 88 |
Here such interesting slice of a code was at viewing of code Unimd’a, i.e. queue.pull () I don't change stopped, so I believe this check have arisen from that this miracle моногопоточное, but even in this case from this check in my opinion I pound not so much. And we in this хернёй should work, and actually вылазят errors, to a campaign we will copy this miracle, whether хз only there will be a sense isn't present.Вот такой интересный кусочек кода нашёлся при просмотре кода Unimd’a, т.е. queue.pull() не изменяет stopped, я так полагаю эта проверка возникла из за того, что это чудо моногопоточное, но даже в этом случае от этой проверки на мой взгляд толку не очень много. А нам в этой хернёй приходится работать, и собственно вылазят ошибки, походу будем переписывать это чудо, хз только будет толк ли нет.
upd:толка From our changes any (upd:толка от наших изменений никакого(
The strange combination, these 3 elements yields not clear result, i.e. at reading of letters by an opera on a mail ру it falls before it having written down on rigid opera.core and a broad gull ява cars, before I sinned on яву more precisely on како that there diablo since it appeared in a broad gull and eclipse with similar signs fell, but now that эклипс works, and in a broad gull appears already Java VM: Java HotSpot (TM) Client VM (1.5.0_13-p7-oper_16_jan_2008_22_08 mixed mode), видими всётани it that that with an opera not so, after all firefox doesn't fall, though 1 time on what that a site it has fallen.Странное сочетание, 3 этих элементов даёт непонятный результат, т.е. при чтении писем оперой на мэйл ру она падает перед этим записав на жёсткий opera.core и лог ява машины, до этого я грешил на яву точнее на како то там diablo т.к. он фигурировал в логе да и eclipse с аналогичными признаками падал, но теперь то эклипс работает, а в логе фигурирует уже Java VM: Java HotSpot(TM) Client VM (1.5.0_13-p7-oper_16_jan_2008_22_08 mixed mode), видими всётани это что то с оперой не так, ведь firefox не падает, хотя 1 раз на каком то сайте он упал.
The client chose icq, centericq couples didn't shake, has put kopete, there траблы with accepted messages, has put SIM like arranges, truth it is impossible to transfer files (or it is possible?), can that another then I will find.выбирал icq клиент, centericq чёт не качалась, поставил kopete, там траблы с принимаемыми сообщениями, поставил SIM вроде устраивает, файлы правда нельзя передавать(или можно?), может что другое потом найду.
Installation java is the whole epopee, try поставть jdk it falls out with еррором, a pier under the license swing, you swing seem pieces of 6 files, 1 time it is necessary зарегатся, well ладоно, you begin ставть so it in the middle again falls out and tells a pier rock to me 1 more file, well it is fine, has rocked has put, хз norms works or not, there is no place to check up. Установка java это целая эпопея, пытаешься поставть jdk она вываливается с еррором, мол по лицензии качайте сами, качаешь кажись штук 6 файлов, 1 раз нужно зарегатся, ну ладоно, начинаешь ставть, так она посередине опять вываливается и говорит мол качните мне ещё 1 файлик, ну ладно, качнул поставил, хз норм работает или нет, негде проверить.
Has started to put eclipse shook in general with какогото the Brazilian server, меееедленноооо has left for the night by the morning it will be put, aha now in the morning) has risen I look and he waits while I for an option выбиру, here the swine, all right has chosen, so it has again gone that that to swing, assemblage has then begun, ппц I am so much варнингов still never saw, in general these crusts созлатели иклипса (or libraries?), src.zip still what that нехватало, is fine hardly assemblage запершилась, well I think I will start, so this сволось has given out еррор какойто and remained to hang эмблемка эклипса, вообщем it is unsuccessful. Начал ставить eclipse качался вообще с какогото бразильского сервера, меееедленноооо оставил на ночь к утру поставится, ага сейчас) утром встал смотрю а он ждёт пока я опции выбиру, вот сволочь, ладно выбрал, так он опять пошёл что то качать, потом началась сборка, ппц столько варнингов я ещё никогда не видел, вообще корки эти созлатели иклипса( или библиотек?), src.zip ещё каких то нехватало, ладно с горем пополам сборка запершилась, ну думаю запущу, так эта сволось выдала еррор какойто и осталась висеть эмблемка эклипса, вообщем неудачно.
Strange why in кде набыло at once хрени which shows a battery charge, has put klaptobat or as that so is called. Странно почему в кде набыло сразу хрени которая показывает заряд батареи, поставил klaptobat или как то так называется.
Now ищю the normal manager закачек гуишный and a player, ненайду probably wget an ohm I will use Теперь ищю нормальный менеджер закачек гуишный и плеер, ненайду буду наверное wget ом пользоваться









Fresh comments
Свежие комментарии