save only some pdf pages from a pdf

You can use Okular, of course: print to file -> the pages you want. But thus you get an image pdf. If you want keep a text pdf, you can use a program like PdfArranger, which allows to save (only) the pages you want from a whole pdf, keeping them as searchable pdf (text).

quick type special characters

In Linux you can use ComposeKey, setting it for example (in System settings) as RightCtrl (the right-Ctrl key). RightCtrl is better than AltGr in Italian keyboard, to keep AltGr for some characters like ‘[‘, or ‘]’, or ‘@’, or ‘#’, otherwise unaccessible.

In that way, when you type 1) first RightCtrl 2) then ^ 3) then o, you will get ô. You don’t need to press simultaneously all the keys.

To sum up, the main simbols :

  • RightCtrl+^+o = ô
  • RightCtrl+”+o = ö
  • RightCtrl+’+o = ó

re-ocr a pdf with Adobe

You have to 1) save the old searchable pdf to tiff images (as many as the pages), 2) ocr the tiff images to a searchable pf 3) combine the new multiple pdf to one pdf.

problems with phpmyadim

Sometimes it happens that phpmyadmin (/mysql) don’t allow you to do what it should allow, such as change the encoding of a column (or of a table or of a database), or change the engine of tables.

Then, after many failed attempts via sql query, I found that the easiest solution is

  • export the database
  • do the changes you want through a text editor, such as Kate, i.g., replacing the old enconding with the new one
  • import the (modifyed) database (after deleting/renaming the old one)
  • done!

svg rounded corner and shadow

shadow (like css shadow-box)

At least with Firefox you can use a filter, like the following:

.shadow{filter: drop-shadow(8px 6px 6px gray);}

rounded corner

The simplest way to round the corners of a box is to

  • use rect element with rx and ry attributes (such as rx="20" ry="20")
  • and define the style of rect with stroke-linejoin:round; and something like stroke:[your color]; stroke-width:[the width you like];

You can see the following example

box rounded

php/msql keywords as hashtags

php separate all items in a mysql field

You can use the explode syntax, as in the following exapmple:

$keywords = $row['keywords'];
foreach (explode(',', $keywords) as $key) {
    echo "<span><a href="\hashtag.php?tag=$key\">{$key}</a></span>";
}

In the example we have a mysql field (keywords) with many items comma separated (such as : “truth, soul, body, mind” and so on).

And we obtain to have as many links from each item toward a specific target, as they are (that is: 3 links if you have 3 items, 7 links fi you have 7 ones).

In this way you can get a system of hashtags for your database keywords.

other steps

You need another file, let we call them hashtag.php.

The content of hashtag.php could be something like:

<?php  
 //hashtag.php  
 if(isset($_GET["tag"]))  
 {  
      $tag = preg_replace('/(?<!\S)#([0-9a-zA-Z]+)/', '', $_GET["tag"]);

//to beautify and stylize, but not necessary BEGIN
      $title=$tag;
      include "$root/intell/header-intell.inc";      
//to beautify and stylize, but not necessary END      

      $connect = mysqli_connect("localhost", "[mysql user]", "[mysql password]", "[mysql database]");  
      
      mysqli_set_charset($connect, 'utf8mb4');  // procedural style
      
      $query = "SELECT * FROM [your table] WHERE [your fields with tags] LIKE '%".$tag."%';  
      $result = mysqli_query($connect, $query);  
      if(mysqli_num_rows($result) > 0)  
      {  
           while($row = mysqli_fetch_array($result))  
           {  
                echo "<h2>$row[title]</h2>
                <blockquote><p>$row[text]</p></blockquote>
                <p><i>$row[author]</i><br />";
                $keywords = $row['keywords'];
                foreach (explode(',', $keywords) as $key) {
                if(trim($row["keywords"])==''){echo "";} else{echo "<span><a href=\"hashtag.php?tag=$key\">{$key}</a></span>";}
                }
                echo "</p>";
           }  
      }  
      else  
      {  
           echo '<p>No Data Found</p>';  
      }  
 }  
 ?>  

Afterwards obviously you could adjust the css according to your needs.

Of course you can have as many other php files as you want, where you usually store you database content, in which you can add the kewwords as hashtags, with a code like the following:

echo "</p><p class=\"keywords\">";
$keywords = $row['keywords'];
foreach (explode(',', $keywords) as $key) {
    if(trim($row["keywords"])==''){echo "";} else{echo "<span><a href=\"hashtag.php?tag=$key\">{$key}</a></span>";}
}
echo "</p>";}

LibreBase problems with native mysql connector

1. mysql connector not working

From LO 6.4 native mysql connector didn’t work any more. But a possible solution is to comment the line skip-networking in my.conf.

I mean now the line is #skip-networking, before it was skip-networking.

2. subforms not working

In new releases, to avoid this issue, you have to cut a small portion of code in content.xml, as in the following instructions:

have a look at the content.xml in the *.odb-file (could be opened by a zip-program)

Not working code:
<db:driver-settings db:system-driver-settings=”” db:base-dn=”” db:parameter-name-substitution=”false”/>

Working code
<db:driver-settings db:system-driver-settings=”” db:base-dn=””/> »

It works!

3. tables or queries not working

You should check the table/query structure and avoid fields (which should have a length) with no length.