Coding
Archived Posts from this Category
Archived Posts from this Category
When we are learning something new we’re going through the next steps.
But there is not much questions/quizes about MySQL, and the recent one is a popular Carsten’s MySQL Pop Quiz serie. We can get a lot off usefull information from such quizes . So, I’ve translated it to russian. I hope it could be usefull for some of us how doesn’t know english well
0 comments Thursday 03 Apr 2008 | Andrew Dashin | Coding, MySQL
I am speaking about development mode. When you start your application with “grails run-app” by default it will be located at http://localhost:8080/[your application name]. But what if we’d like to start our aplication for example in a server root? Or in any other custom path?
Lets try to do this! The steps are following:
Now you can start your application with “grails run-app”! Notice that if you want use https then you should also make similar changes in $GRAILS_HOME/scripts/RunAppHttps.groovy file. I’ve mentioned line numbers but it is for 1.0.2 version only.
0 comments Wednesday 26 Mar 2008 | Andrew Dashin | Coding, Grails
You can read in russian my report on Exception #07 conference. In brief - this was a great experience for me. And in the nearest future I’ll share all materials.
7 comments Monday 17 Mar 2008 | Andrew Dashin | Life, Coding, Grails
The last day I’m suffering from different thoughts. So I’ve decided to share’em with you.
It is really possible to create the application such as gears, but independent from Google, that will run on most platofrms and browsers. What we need:
And that’s all. To use it you will need just to include the applet and JS-library into your page, after the first load applet will detect platform and will download embeded MySQL and native libraries.
2 comments Friday 14 Mar 2008 | Andrew Dashin | Coding, MySQL, JavaScript
Since you are happy Firefox 3 user - you can not use Firebug, official firebug. But I’ve found FF3 compatible one. Of course, all changes in Fireclipse are trivial enough, but it is a pleasure when something is already done before you.
Enjoy!
0 comments Friday 08 Feb 2008 | Andrew Dashin | Coding, JavaScript
I’ve just tried to run PHP with MySQL on my Leopard and the first problem: “Can’t connect to local MySQL server through socket ‘/var/mysql/mysql.sock’”
I’ve just changed php.ini to:
mysql.default_socket = /tmp/mysql.sock
The same situation with mysqli settings - be default it is not set so you should update it to the real path.
And it works!
0 comments Tuesday 08 Jan 2008 | Andrew Dashin | Coding, PHP, MySQL, MacOSX
Last week we’ve found that our application runs not so fast as we wished. This was a complicated webservice application with many services/methods and each serivce method is accessing MySQL (InnoDB) database through the Hibernate layer.
In Hibernate layer we used Criteria API to make queries, so in the source code is impossible to view exact queries which will run.
So I’ve found two solutions how can we profile our application.
1. It is possible to turn on hibernate option “hibernate.show_sql=false” and check each query in the mysql console with MySQL query profiling
2. And the second solution was Elvyx.
I’ve chose the second one.
It is needed just to replace jdbc driver with the Elvyx’s one, setup Elvyx driver to use the driver you used before (in my case that was com.mysql.jdbc.Driver), and start Elvyx server (with GUI) to see profiling results.
0 comments Monday 17 Dec 2007 | Andrew Dashin | MySQL
If you do not like the navigation panel (the bar in the top of the page) - you can hide it.
Just add the following javascript in your site template:
function hidenav() {
document.getElementById(’navbar’).style.display=’none’;
}
Then add onload=”hidenav()” to the body HTML tag
That’s all. Have fun.
3 comments Tuesday 30 Oct 2007 | Andrew Dashin | Life, Coding, JavaScript
My google summer of code project called MyWebER is going to die. The reason - I have no time to proceed developing it. I have a lot of ideas, but not sure that I’ll find any time to implement them.
As I can see, MySQL AB is not interested in this project. If anyone wants to help me - you’re welcome.
“Skilled JavaScript developers are wanted.” (C)
4 comments Friday 26 Oct 2007 | Andrew Dashin | My projects, MySQL, MyWebER
var ss = “qq”; for (ii = 0; ii < 1000; ii++) { ss += “ffff”; }
An interesting way…
1 comment Thursday 18 Oct 2007 | Andrew Dashin | Coding, WTF, JavaScript
(define luhn-check (lambda (ccn) (define csum 0) (define num 0) (do ((i (string-length ccn) (- i 1))) ((<= i 0) (print csum)) (set! num (string->number (substring ccn (- i 1) i))) (if (> (modulo i 2) 0) (begin (set! num ( * 2 num)) (if (> num 9) (set! num (- num 9))))) (set! csum (+ num csum)) ))) ;; test case (luhn-check “4561261212345467″)
And here is implemented with MySQL.
1 comment Saturday 11 Aug 2007 | Andrew Dashin | Coding, Scheme
Sometimes we have to open new browser window and invoke some code in it when it loads.
The first thing I’ve tried was: childWindow.onload = function () {/* Action goes here */;};
But it doesn’t work in IE! At first look it could seem strange. But the solution is very simple.
childWindow.onload = function () {/* Action goes here */;};
if (childWindow.attachEvent) {childWindow.attachEvent(”onload”, childWindow.onload);};
The second line will be executed in IE only and will solve the problem. Actually this is due its event model and nothing more
0 comments Monday 30 Jul 2007 | Andrew Dashin | Coding, JavaScript
In my last post I’ve asked for any help on my project. So, tanks to Jay Pipes for his tip.
One of most developer problems is documentation. And a good solution was initially appeared in Java with javadoc. At now many languages have special javadoc-like tools. I’ve made a little research, and decided to use jsdoc and phpdoc in my project. I am still open for any suggestions
0 comments Wednesday 04 Jul 2007 | Andrew Dashin | Coding, My projects, MySQL, MyWebER, JavaScript
So, now I am working on this project. This project is a part of google SoC. I believe in the end it should be something like mysql workbench, but web-two-zerofied. At current moment there is not much to look into (http://myweber.googlecode.com/svn/trunk/). But I will be very grateful to you for any comments, questions and suggestions.
1 comment Monday 25 Jun 2007 | Andrew Dashin | Coding, My projects, MySQL, MyWebER
A piece of JavaScript:
var total = total + parseFloat(eval(’document.frm.smth’ + x + ‘.value’));
…
var tmpTotal = eval(’parseFloat(document.frm.smth.value)’ + action + ‘parseFloat(price)’);
1 comment Thursday 26 Apr 2007 | Andrew Dashin | Coding, WTF, JavaScript
- Next »