<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://blog.swissattitude.ch/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>jmelly</title>
  <link>http://blog.swissattitude.ch/</link>
  <atom:link href="http://blog.swissattitude.ch/feed/rss2" rel="self" type="application/rss+xml"/>
  <description></description>
  <language>fr</language>
  <pubDate>Wed, 06 Jan 2010 10:42:45 +0100</pubDate>
  <copyright></copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Default values for hibernate3 on NOT NULL column</title>
    <link>http://blog.swissattitude.ch/post/2010/01/06/Default-values-for-hibernate3</link>
    <guid isPermaLink="false">urn:md5:6c6a3dd7c3b78cb00e9236b1402a4678</guid>
    <pubDate>Wed, 06 Jan 2010 11:36:00 +0100</pubDate>
    <dc:creator>Jonathan</dc:creator>
        <category>J2EE</category>
            
    <description>    &lt;p&gt;In a data driven environment, to avoid duplicating &amp;quot;DEFAULT&amp;quot; annotation in
column entity which have DEFAULT values defined in SGBD, hibernate has this
annotation:&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;@org.hibernate.annotations.Entity ( dynamicInsert = true,
dynamicUpdate = true )&lt;/code&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;This will ensure that no explicit null insert/update will be generated thus
violate the NOT NULL constraint.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.swissattitude.ch/post/2010/01/06/Default-values-for-hibernate3#comment-form</comments>
      <wfw:comment>http://blog.swissattitude.ch/post/2010/01/06/Default-values-for-hibernate3#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.swissattitude.ch/feed/atom/comments/473519</wfw:commentRss>
      </item>
    
  <item>
    <title>Logitech MX310 Linux X11 (xorg) configuration</title>
    <link>http://blog.swissattitude.ch/post/2009/01/07/Logitech-MX310-Linux-X11-xorg-configuration</link>
    <guid isPermaLink="false">urn:md5:3634980fb947ef711cc0601a322854f5</guid>
    <pubDate>Wed, 07 Jan 2009 21:44:00 +0100</pubDate>
    <dc:creator>Jonathan</dc:creator>
        <category>Linux</category>
            
    <description>    &lt;p&gt;For those who want to configure mouse wheel + back/forward buttons (I've
been looking around the solution for 3 years...):&lt;/p&gt;
&lt;pre&gt;
Section &amp;quot;InputDevice&amp;quot;
        Identifier      &amp;quot;Configured Mouse&amp;quot;
        Driver          &amp;quot;mouse&amp;quot;
        Option          &amp;quot;CorePointer&amp;quot;
        Option          &amp;quot;Device&amp;quot;      &amp;quot;/dev/input/mice&amp;quot;
        Option          &amp;quot;Protocol&amp;quot;    &amp;quot;ExplorerPS/2&amp;quot;
        Option          &amp;quot;ZAxisMapping&amp;quot;        &amp;quot;6 7&amp;quot;
        Option          &amp;quot;ButtonMapping&amp;quot;        &amp;quot;1 2 3 4 5&amp;quot;
        Option          &amp;quot;Emulate3Buttons&amp;quot;     &amp;quot;false&amp;quot;
EndSection
&lt;/pre&gt;</description>
    
    
    
          <comments>http://blog.swissattitude.ch/post/2009/01/07/Logitech-MX310-Linux-X11-xorg-configuration#comment-form</comments>
      <wfw:comment>http://blog.swissattitude.ch/post/2009/01/07/Logitech-MX310-Linux-X11-xorg-configuration#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.swissattitude.ch/feed/atom/comments/315752</wfw:commentRss>
      </item>
    
  <item>
    <title>Rkhunter hidden processes warning</title>
    <link>http://blog.swissattitude.ch/post/2008/12/16/Rkhunter-hidden-processes-warning</link>
    <guid isPermaLink="false">urn:md5:8f375ecaac81c097ed1b532d02707d2b</guid>
    <pubDate>Tue, 16 Dec 2008 10:13:00 +0100</pubDate>
    <dc:creator>Jonathan</dc:creator>
        <category>Linux</category>
            
    <description>    &lt;p&gt;Copy pasted from http://ubuntuforums.org/archive/index.php/t-796192.html for
personal archive&lt;/p&gt;
&lt;p&gt;If the processes are truly hidden, then yes it's probably something you
should worry about. But it's possible that you've got a false positive
situation.&lt;/p&gt;
&lt;p&gt;When rkhunter tells you that there are hidden processes, try to cd to the
/proc/&amp;lt;pid&amp;gt; directory for the process (where &amp;lt;pid&amp;gt; is one of the
process ID numbers output by rkhunter). If you can't cd into the directory,
then the process isn't really hidden, it was just in the middle of exiting when
the rkhunter check ran and rkhunter was confused and you probably have nothing
to worry about.&lt;/p&gt;
&lt;p&gt;If you do manage to cd into the /proc/&amp;lt;pid&amp;gt; directory, then it's
likely you have a problem. Interesting things to do once you're in the
/proc/&amp;lt;pid&amp;gt; directory include:&lt;/p&gt;
&lt;p&gt;1) &amp;quot;cat cmdline&amp;quot; should give you the name the process is running under&lt;/p&gt;
&lt;p&gt;2) &amp;quot;sudo cat environ | perl -pe 's/\000/\n/g'&amp;quot; gets you the environment
variable settings for the process&lt;/p&gt;
&lt;p&gt;3) &amp;quot;sudo ls -l fd&amp;quot; shows you what files the process currently has open&lt;/p&gt;
&lt;p&gt;4) &amp;quot;sudo ls -l cwd&amp;quot; shows you the current working directory of the process
(which could be interesting if the process was started by the attacker from
their rootkit installation directory)&lt;/p&gt;
&lt;p&gt;There's plenty of other cool stuff you can do with the various bits of
information under /proc, but the above should be enough to help you figure out
what the process(es) are doing and how much trouble you're in.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.swissattitude.ch/post/2008/12/16/Rkhunter-hidden-processes-warning#comment-form</comments>
      <wfw:comment>http://blog.swissattitude.ch/post/2008/12/16/Rkhunter-hidden-processes-warning#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.swissattitude.ch/feed/atom/comments/309303</wfw:commentRss>
      </item>
    
  <item>
    <title>Symfony 1.1 : i18n with MySQL</title>
    <link>http://blog.swissattitude.ch/post/2008/11/13/Symfony-11-%3A-i18n-with-MySQL</link>
    <guid isPermaLink="false">urn:md5:3e0d319a626eb81e5a5dd9f9e0353a7a</guid>
    <pubDate>Thu, 13 Nov 2008 16:00:00 +0100</pubDate>
    <dc:creator>Jonathan</dc:creator>
        <category>PHP</category>
        <category>i18n</category><category>symfony 1.1</category>    
    <description>    &lt;p&gt;As having searched for a while to find the right solution, here are the
steps to enable i18n over MySQL with Symfony 1.1&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;
&lt;h2&gt;Configuration (factories.xml)&lt;/h2&gt;
&lt;p&gt;Edit or create &amp;quot;factories.xml&amp;quot; in global config directory or any app
directory as following (replace with your db)&lt;/p&gt;
&lt;pre&gt;
all:
  i18n:
    class: sfI18N
    param:
      source: MySQL
      
prod:
  i18n:
    param:
      database: &amp;quot;mysql://user:pass@host/db&amp;quot;
      debug: off
    cache:
        class: sfFileCache
        param:
          automatic_cleaning_factor: 0
          cache_dir:                 %SF_I18N_CACHE_DIR%
          lifetime:                  86400
          prefix:                    %SF_APP_DIR%

dev:    
  i18n:
    class: sfI18N
    param:
      database: &amp;quot;mysql://user:pass@host/db&amp;quot;
      debug: on
      untranslated_prefix: &amp;quot;[T]&amp;quot;
      untranslated_suffix: &amp;quot;[/T]&amp;quot;
    cache:
        class: sfNoCache
&lt;/pre&gt;
&lt;p&gt;This will activate i18n with MySQL. But the the database tables must be
added&lt;/p&gt;
&lt;h2&gt;DB schema (translation_schema.xml)&lt;/h2&gt;
&lt;p&gt;This content can be found in
&amp;quot;\lib\symfony\i18n\sfMessageSource_MySQL.class.php&amp;quot; :&lt;/p&gt;
&lt;pre&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&amp;lt;database name=&amp;quot;propel&amp;quot; package=&amp;quot;lib.model&amp;quot; defaultIdMethod=&amp;quot;native&amp;quot;&amp;gt;
        &amp;lt;table name=&amp;quot;catalogue&amp;quot;&amp;gt;
                &amp;lt;column name=&amp;quot;cat_id&amp;quot; type=&amp;quot;integer&amp;quot; required=&amp;quot;true&amp;quot;
                        primaryKey=&amp;quot;true&amp;quot; autoincrement=&amp;quot;true&amp;quot; /&amp;gt;
                &amp;lt;column name=&amp;quot;name&amp;quot; type=&amp;quot;varchar&amp;quot; size=&amp;quot;100&amp;quot; /&amp;gt;
                &amp;lt;column name=&amp;quot;source_lang&amp;quot; type=&amp;quot;varchar&amp;quot; size=&amp;quot;100&amp;quot; /&amp;gt;
                &amp;lt;column name=&amp;quot;target_lang&amp;quot; type=&amp;quot;varchar&amp;quot; size=&amp;quot;100&amp;quot; /&amp;gt;
                &amp;lt;column name=&amp;quot;date_created&amp;quot; type=&amp;quot;timestamp&amp;quot; /&amp;gt;
                &amp;lt;column name=&amp;quot;date_modified&amp;quot; type=&amp;quot;timestamp&amp;quot; /&amp;gt;
                &amp;lt;column name=&amp;quot;author&amp;quot; type=&amp;quot;varchar&amp;quot; size=&amp;quot;255&amp;quot; /&amp;gt;
        &amp;lt;/table&amp;gt;
        &amp;lt;table name=&amp;quot;trans_unit&amp;quot;&amp;gt;
                &amp;lt;column name=&amp;quot;msg_id&amp;quot; type=&amp;quot;integer&amp;quot; required=&amp;quot;true&amp;quot;
                        primaryKey=&amp;quot;true&amp;quot; autoincrement=&amp;quot;true&amp;quot; /&amp;gt;
                &amp;lt;column name=&amp;quot;cat_id&amp;quot; type=&amp;quot;integer&amp;quot; /&amp;gt;
                &amp;lt;foreign-key foreignTable=&amp;quot;catalogue&amp;quot; onDelete=&amp;quot;cascade&amp;quot;&amp;gt;
                        &amp;lt;reference local=&amp;quot;cat_id&amp;quot; foreign=&amp;quot;cat_id&amp;quot; /&amp;gt;
                &amp;lt;/foreign-key&amp;gt;
                &amp;lt;column name=&amp;quot;id&amp;quot; type=&amp;quot;varchar&amp;quot; size=&amp;quot;255&amp;quot; /&amp;gt;
                &amp;lt;column name=&amp;quot;source&amp;quot; type=&amp;quot;longvarchar&amp;quot; /&amp;gt;
                &amp;lt;column name=&amp;quot;target&amp;quot; type=&amp;quot;longvarchar&amp;quot; /&amp;gt;
                &amp;lt;column name=&amp;quot;comments&amp;quot; type=&amp;quot;longvarchar&amp;quot; /&amp;gt;
                &amp;lt;column name=&amp;quot;date_created&amp;quot; type=&amp;quot;timestamp&amp;quot; /&amp;gt;
                &amp;lt;column name=&amp;quot;date_modified&amp;quot; type=&amp;quot;timestamp&amp;quot; /&amp;gt;
                &amp;lt;column name=&amp;quot;author&amp;quot; type=&amp;quot;varchar&amp;quot; size=&amp;quot;255&amp;quot; /&amp;gt;
                &amp;lt;column name=&amp;quot;translated&amp;quot; type=&amp;quot;integer&amp;quot; /&amp;gt;
        &amp;lt;/table&amp;gt;
&amp;lt;/database&amp;gt;
&lt;/pre&gt;
&lt;p&gt;You can add this content to your &amp;quot;schema.xml&amp;quot; or create a new one (what I've
done). Anyway there is no yaml version so if you only have a schema.yml either
you'll have to translate the xml other you can create a new file named
*****schema.xml with the content shown above.&lt;/p&gt;
&lt;p&gt;To take the new schema in account you'll have to execute :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;php symfony propel:build-sql&lt;/li&gt;
&lt;li&gt;php symfony propel:insert-sql (warning this will erase all data)&lt;/li&gt;
&lt;li&gt;php symfony propel:build-model&lt;/li&gt;
&lt;li&gt;php symfony cc&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Base data&lt;/h2&gt;
&lt;p&gt;The &amp;quot;catalogue&amp;quot; table must be filled with the languages you want to
translate: &lt;img src=&quot;http://blog.swissattitude.ch/public/symfony/.catalogue_m.jpg&quot; alt=&quot;Catalogue table content&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;Catalogue table content, nov 2008&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Then you'll be able to add translation units in trans_unit table: &lt;img src=&quot;http://blog.swissattitude.ch/public/symfony/.translate_m.jpg&quot; alt=&quot;Translate content&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;Translate content, nov 2008&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;That's all folks&lt;/h2&gt;
&lt;p&gt;After understanding this, it is not complicated but as there are various
outdated information on the net, it's hard to get the right solution. I've also
discovered that only &amp;quot;name&amp;quot; column of &amp;quot;catalogue&amp;quot; table is relevant to find the
translation (and &amp;quot;source&amp;quot; column of &amp;quot;trans_unit&amp;quot; table). The &amp;quot;source_lang&amp;quot; and
&amp;quot;target_lang&amp;quot; is not used as shown in the sfMessageSource_MySQL.class php
file:&lt;/p&gt;
&lt;pre&gt;
public function &amp;amp;loadData($variant)
  {
    $variant = mysql_real_escape_string($variant, $this-&amp;gt;db);

    $statement =
      &amp;quot;SELECT t.id, t.source, t.target, t.comments
        FROM trans_unit t, catalogue c
        WHERE c.cat_id =  t.cat_id
          AND c.name = '{$variant}'
        ORDER BY id ASC&amp;quot;;
&lt;/pre&gt;
&lt;p&gt;I hope anybody could find this information useful...&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.swissattitude.ch/post/2008/11/13/Symfony-11-%3A-i18n-with-MySQL#comment-form</comments>
      <wfw:comment>http://blog.swissattitude.ch/post/2008/11/13/Symfony-11-%3A-i18n-with-MySQL#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.swissattitude.ch/feed/atom/comments/297757</wfw:commentRss>
      </item>
    
  <item>
    <title>Le pourquoi du comment</title>
    <link>http://blog.swissattitude.ch/post/2008/10/29/Le-pourquoi-du-comment</link>
    <guid isPermaLink="false">urn:md5:4079264ff37e1276cf5a0652b62363bf</guid>
    <pubDate>Wed, 29 Oct 2008 10:50:00 +0100</pubDate>
    <dc:creator>Jonathan</dc:creator>
            
    <description>    &lt;p&gt;Ce blog a pour but de diffuser diverses informations le plus souvent
orientées sur le développement d'application en informatique...&lt;/p&gt;
&lt;p&gt;Bonne visite&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.swissattitude.ch/post/2008/10/29/Le-pourquoi-du-comment#comment-form</comments>
      <wfw:comment>http://blog.swissattitude.ch/post/2008/10/29/Le-pourquoi-du-comment#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.swissattitude.ch/feed/atom/comments/291846</wfw:commentRss>
      </item>
    
</channel>
</rss>