tag:blogger.com,1999:blog-28449298665477413962024-02-22T01:34:13.357+02:00Dark - ITtips & tricksziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.comBlogger40125tag:blogger.com,1999:blog-2844929866547741396.post-90335781276208645912012-12-20T14:07:00.002+02:002012-12-20T14:09:07.869+02:00Hi Santa !Dear Santa,
how are you ? .. is there hottest time before the Christmas ? :)
I know ...
I have the same situation ... may be not the same, but
We are startup team (2 devs) + 1 sales.
Our wish - to launch our project which helps peoples all over the world.
So - give us plz Intellij Idea license to continue creating our prototype more faster with fun and without bugs.
regards, Alex
btw - allziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com1tag:blogger.com,1999:blog-2844929866547741396.post-31179372529192739622012-09-07T09:00:00.001+03:002012-11-09T19:18:00.885+02:00Coursera - lectures savingDo you know Coursera?
It's greatest online educational center.
A lot of courses in different areas and they all are FREE!
My current course is ML (machine learning) :)
On the course you have a lot of resources (video, lectures). But when course is finished after several months video will be removed.
I've made python script course-ROBO-era - automate saving Coursera lectures locally - you can useziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-39132591795609910392011-09-27T18:43:00.008+03:002011-10-01T22:17:40.494+03:00Jinja template and if/else class replacementI'd like to add CSS classes to a html tags based on certain "conditions".in this case I'm using jinja macro{%- macro ifElseBoolTemplate(variable, trueValue="", falseValue="") -%} {%- if variable -%}{{ trueValue }}{%- else -%}{{ falseValue }}{%- endif %}{%- endmacro %}(macro saved at file : macro/formMacro.html){% import 'macro/formMacro.html' as formTag with context %}...<div class="item {{ziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-34760123203328267272011-04-19T23:43:00.005+03:002011-04-19T23:51:45.520+03:00PR your selfwhich is the most efficient way to make self promotion, self PR ?PR in blogging (FRESH, targeting), facebook & social activitywhere can I read about ?ziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-65978723406118616222010-11-24T10:52:00.020+02:002010-11-24T11:59:46.905+02:00Generic CRUD (Spring 3)Time to time I have situation where generic CRUD (java, Spring) requiredSo - let's do itGeneric DAO here.Main components:- generic DAO (above)- generic service- generic controller- view & generic modelsand smart developer ;)The good approach - usage jQuery & jqgrid on frontend.jqgrid allows us to make:- dynamic grid- filtering- create, update, delete, view & search by entitiesURLs:/${appName}/${ziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com1tag:blogger.com,1999:blog-2844929866547741396.post-42985258358265085152010-09-27T15:51:00.009+03:002010-09-27T16:18:08.208+03:00Example: how to start EclipseLink (or other JPA) transaction declaratively in SpringHere is example of declarative transaction management with EclipseLink JPA provider in Spring-based application. Similar approach should work with other JPA providers as well.I use Maven for building so these were the required dependencies: org.eclipse.persistence javax.persistence 2.0.0 org.aspectj aspectjrt 1.6.9 org.springframework spring-aspects 3.0.4.RELEASEHere is Spring's application Paul Lysakhttp://www.blogger.com/profile/07909719784192959799noreply@blogger.com1tag:blogger.com,1999:blog-2844929866547741396.post-60727330841574673992010-08-11T19:21:00.005+03:002010-08-11T19:51:16.959+03:00DataSource through JNDI in Tomcat: place for JDBC driverRecently I needed to reconfigure DataSource in Tomcat 6 though JNDI. Previously it was configured in Spring application context, but there was need to use DataSource also in BIRT template where Spring configuration was of little use, so the only option was to use JNDI.Project uses Maven to build itself and appropriate database driver (for MySQL) was included as dependency, so it was in a Paul Lysakhttp://www.blogger.com/profile/07909719784192959799noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-67998105375431023122010-03-25T17:08:00.006+02:002010-03-26T08:47:13.846+02:00Blogger : value of data:postLabelsLabelhow to change the value of <data:postLabelsLabel/> ?There are 2 ways for changing tag label in Blogger:remove tag in template and put hardcoded labelpreferred wayziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-84032211278668669122010-02-03T21:01:00.002+02:002010-02-03T21:08:00.500+02:00Eclipse debugging erroron Eclipse debugging has the error message .. wtf ?ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)after googling - solution has been found.Firewall ziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-38434152139610587152009-11-23T17:29:00.019+02:002009-11-23T23:10:20.041+02:00Maven: adding profile-dependent resources to projectRecently I needed to use different .properties files in my project depending on whether it runs in IDE at my workstation or is packed as .war file and deployed on production server. Project uses Maven to build itself. I've made some notes about solving this problem which hopefully will help somebody to do something similar.Profiles can be configured in pom.xml file and then activated either from Paul Lysakhttp://www.blogger.com/profile/07909719784192959799noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-59796850730397073312009-07-12T20:08:00.006+03:002009-07-12T21:21:02.921+03:00Inno Setup & MySQL. Full scriptHi !Thx a lot to inno-developers team. Excellent job - guys!! At this post I'll publish full script for mysql setup patch creation.1. We'll use mysql-essential package2. Put prepared my.ini to the mysql package3. ... and script :)#define RequirementsBin "pathTo\mysql_light\db"#define BasePath "pathTo\mysql_light"#define IncludeFramework true[Setup]AppName=[...]AppVerName=[...]AppPublisher=[...]ziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com3tag:blogger.com,1999:blog-2844929866547741396.post-89965312354075329142009-07-12T19:55:00.010+03:002012-10-30T13:41:57.038+02:00Custom data loading to jqGridI'v found jqGrid as best jQuery grid solution. Yeah ! ))
possible ways to obtain data are - 'xml', 'json','clientSide' or 'local', 'xmlstring', 'jsonstring' and 'function (...)'
If you use function() - it's 4 u :
jQuery(document).ready(function() {
jQuery("#list").jqGrid({
datatype : function(postdata) {
var gridObj = jQuery("#list");
gridObj.clearGridData().setGridParam({page: ziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com2tag:blogger.com,1999:blog-2844929866547741396.post-64472307976604941342009-07-10T04:51:00.009+03:002009-07-14T21:45:37.412+03:00Hibernate & case sensitivity table namesTo manage case sensitivity tables and key strategy in hibernate + spring you should use hibernate NamingStrategy implementation. ... org.hibernate.dialect.MySQL5Dialect thread org.hibernate.transaction.JDBCTransactionFactory <bean class="a.b.c.CustomNamingStrategy" /> a.b.c.CustomNamingStrategy should implements NamingStrategy or extends already ziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-74558521627806086402009-05-21T18:32:00.010+03:002009-07-12T20:07:52.439+03:00Inno Setup & MySQLTo start mysql as service from Inno Setup installer you can use this code:[Run]Filename: {app}\bin\mysqld; Parameters: --install; WorkingDir: {app}\bin; Flags: postinstall runhidden; StatusMsg: MySQL service installing; AfterInstall: InitializeService;[Code]procedure InitializeService();var ErrorCode: Integer;begin ShellExec('', ExpandConstant('{sys}\net.exe'),' start mysql', '', SW_SHOW,ziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com2tag:blogger.com,1999:blog-2844929866547741396.post-23925250289446551112009-03-19T12:44:00.003+02:002009-03-19T12:52:01.211+02:00Google calendar & Mylyn integrationI have idea to make extension for Mylyn with Google calendar.I have found 2 projects:- jaretcalendar (last activity - 2008-03-30) - FREE- tasktop.com - non free product.may be such extension already exists - do you know ?or maybe somebody what's to take part in extension development ?thxziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-6733236856375275582009-03-02T22:40:00.005+02:002009-03-03T00:37:07.921+02:00OpenSource community - here we go !Our start-up - litha-paint (web based vector drawing service) now is open source !It hosted on codehaus - http://litha-paint.codehaus.org/SVN - http://svn.codehaus.org/litha-paint/So - you r welcome :)ziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-76443808663026626042009-02-21T19:11:00.002+02:002009-02-21T19:17:41.172+02:00Drupal 6 & CCK field filling manuallyIf you should fill CCK field manually you must fill 'value' field and '_error_element' field. Otherwise data will not be accepted./*** Implementation of hook_nodeapi().*/function custom_nodeapi(&$node, $op) { switch ($op) { case 'presave': if ($node->type == 'order') { $node->field_date_creation[0]['value'] = format_date(time()); $node->field_date_creation[0]['_error_element'] = 'ziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-57151667814908632922009-02-19T12:11:00.003+02:002009-02-20T08:01:31.680+02:00Content page customization in DrupalIf you want to customize Content page (admin/content/node) in Drupal (on screen below) you can insert form altering hook:/** * Implementation of hook_form_alter(). */function custom_form_alter(&$form, $form_state, $form_id) { if($form_id == 'node_admin_content') { // form overview name // available fields: // $form['admin']['title'][nid] // $form['admin']['name'][nid] // $form['admin']['ziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-23906111138632732112009-02-03T23:56:00.004+02:002009-02-04T00:04:06.855+02:00Eclipse RCP & ImageDescriptorIf you what to use icons, which located in project packages, but isn't defined as shared resources in ISharedImages you coud use it in such way:somthAction.setImageDescriptor(Plugin.imageDescriptorFromPlugin("org.eclipse.ui", "/icons/full/etool16/save_edit.gif"));ziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-71033108587113318342009-02-02T15:34:00.006+02:002009-02-04T10:30:36.076+02:00Eclipse RCP & localizationI have lost 1 hour to find out - why in my Eclipse rcp application - on development mode - labels shown correct, on production mode - I have labels such as "%views.browser.name".To localize eclipse rcp application and to use parameters from plugin.properties MANIFEST.MF should contains string:Bundle-Localization: pluginziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-84403512284535561132009-01-28T12:04:00.008+02:002009-01-28T13:02:56.923+02:00symfony & mark fields as required, part 2In previous post - "symfony & mark fields as required" we have a solution for symfony to mark required forms field automatically.But - it's not fully OOP. so ...1. the main idea - create custom formatter.2. inheritenceBase class for all generated forms - is BaseFormPropelIt's also generated from template sfPropelFormBaseTemplate.php which is in propel plugin. Fix it. (class will be extends from ziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com1tag:blogger.com,1999:blog-2844929866547741396.post-58471202799102628542009-01-27T11:51:00.007+02:002009-01-27T12:28:38.491+02:00JavaScript and templatesSometimes - it's necessary to build HTML code by JavaScript one of desigion - create dirty JavaScript code - with innerHTMLanother - approach - use templatingso templating for jQuery - I have used jTemplates.Features:- Fast*, Small (<10kB)- 100% in JavaScript- Work with Ajax and/or JSON- Allow to use JavaScript code in templates- Work with jQuery- Allow to build cascading templates- Allow to ziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-17534366581240024122009-01-24T00:10:00.003+02:002009-01-24T00:19:57.411+02:00jQuery and deep clone objectToday I had a problem with object cloning (multidimentional) in JavaScriptthx to Andrea Ercolino - now I know - jQuery has such feature - as deep clone :) jQuery.extend( true, obj1, obj1);more detail description you could read hereziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-74434009044300016552009-01-20T20:43:00.008+02:002009-01-20T21:12:29.211+02:00pre- , post- or instead- :: domain object processingIf you need to run somth action -before, -after or instead of object saving you could use "Behavior" Propel feature.for example - generated code contains such block: public function save(PropelPDO $con = null) { foreach (sfMixer::getCallables('BaseSampleModel:save:pre') as $callable) { $affectedRows = call_user_func($callable, $this, $con); if (is_int($affectedRows)) {ziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com0tag:blogger.com,1999:blog-2844929866547741396.post-11338263183144542602009-01-19T17:40:00.004+02:002009-01-19T17:45:34.987+02:00symfony 1.2.2 has been releasedSymfony 1.2.2 has been released.fixed more than 30 bugs in framework and a lot of fixes in plugins !I like this guys :)more details here.ziDevhttp://www.blogger.com/profile/09927091528934283646noreply@blogger.com0