LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > Michael Uplawski
User Name
Password

Notices


  1. Old Comment

    False statement

    And here I was expecting for an expansion of the information on the false command given in its man page.

    Do nothing, unsuccessfully.
    Posted 04-03-2021 at 08:04 AM by jr_bob_dobbs jr_bob_dobbs is offline
  2. Old Comment

    Found the old replace command

    So I re-read this blog again.

    Addressing your "I may be programming in my sleep or am suffering from a strange variety of 'selective' Alzheimer," comment...

    Recently I started a text file with the name of each of my programs and a line or two explaining what each one does. This saves me from writing a program twice because I forgot what the first version was called! This has been a big help! You might want to do this?
    Posted 03-29-2021 at 10:19 PM by jr_bob_dobbs jr_bob_dobbs is offline
  3. Old Comment
    Posted 10-17-2018 at 02:20 PM by Michael Uplawski Michael Uplawski is offline
  4. Old Comment

    Transform HTML to LQ markup or -down

    nice!

    a little shell script wrapper:
    Code:
    #!/bin/sh
    
    default="$HOME/.local/share/lq_bbcode.xsl"
    LQ_BBCODE="${LQ_BBCODE-"$default"}"
    
    usage() {
    echo "
    Usage:
    
    $0 infile
    
    Output to stdout
    
    The shell variable LQ_BBCODE points to the XSL file to be used
    currently: $LQ_BBCODE
    default: $default
    "
    	exit 1
    }
    
    ! [ -r "$1" ] && echo "Input file \"$1\" is not readable" && usage
    
    xsltproc --html "$LQ_BBCODE" "$1" 2>/dev/null
    Posted 10-16-2018 at 01:58 AM by ondoho ondoho is offline
  5. Old Comment

    Found the old replace command

    Quote:
    Originally Posted by Michael Uplawski View Comment
    I guessed something like that.
    But the last time I used sed to iron my shirts, it burned them.
    Understood. It's easy to get something wrong in sed, and sed can do a lot of damage.
    Posted 08-29-2018 at 04:54 PM by jr_bob_dobbs jr_bob_dobbs is offline
  6. Old Comment

    Found the old replace command

    Quote:
    Originally Posted by jr_bob_dobbs View Comment
    sed can do this
    I guessed something like that.
    But the last time I used sed to iron my shirts, it burned them.
    Posted 08-25-2018 at 06:17 AM by Michael Uplawski Michael Uplawski is offline
  7. Old Comment

    Found the old replace command

    sed can do this
    Code:
    $ echo "We can't do nothing, face it!" | sed -e "s/can't/do not want to/g"
    We do not want to do nothing, face it!
    Note: "can't" is a contraction of "cannot," so the above is actually not an exact restatement.
    Quote:
    We cannot do nothing, face it!
    Posted 08-22-2018 at 07:16 PM by jr_bob_dobbs jr_bob_dobbs is offline
  8. Old Comment
    Posted 05-01-2018 at 12:13 PM by Habitual Habitual is offline
  9. Old Comment

    Generate a glossary from HTML

    I am ready to release a new version of the Html2Index gem, but want to provide updated documentation. There is a lot of work for me, from next week on until end of january... But here is at least the usage-message of the new version, as a kind of spoiler..:

    Code:
    :~/prog/html2index$ bin/html2index -h
    
    	Usage: html2index -s input.html [-o output.html] [-c config-file] [-t template.html] [-d]
    
    	* Will print to stdout, if the output-file is not provided.
    	* Adapt ~/.config/HTML2Index/config to your needs.
    
        -d, --debug                      Be verbose
        -s, --source=SOURCE              Source document (html)
        -o, --out=GLOSSAR                Glossar-file (html)
        -t, --template=TEMPLATE          Template (html)
        -c, --config=CONFIG              Configuration-file
        -h, --help                       Show this message
        -v, --version                    Show program version
    Posted 10-07-2017 at 05:56 AM by Michael Uplawski Michael Uplawski is offline
  10. Old Comment

    Cuddling with the Middle Ages

    EDITED: This comment contained a false statement. I have to leave it here and mark it as false, because it is frequently repeated in a pseudo-scientific context, by right-wing political activists, by marketing-experts, by so-called “coaches”.

    The story is that, around 1955, an American scientific formulated a hypothesis which was quickly refuted but stuck with some interested parties. I did not know and just found this thing too appealing to not give it some thought. When “Me Too” made everyboy think, I became comfortable with what had become my conviction.

    The truth is that, up to this day, nobody can identify anything in our brain's structure and organization which allowed to virtually map Freud's ideas to distinct parts or distinct functions of our brain. In the contrary, all studies in neuroscience which either tried to evaluate the hypothesis or otherwise bordered the issues that the hypothesis addresses, prove it wrong.

    Shorter: There is no such thing as a “Reptilian Brain”. Forget it.

    I do not reproduce the way in which I have to address myself for some time. There are ladies in the room.

    All that follows is *FALSE*:
    Free will” is an illusion. Between the termination of any action and the statement “I wanted to do that” a variable time between half a second and up to ten seconds pass. After that, your cortex has packed up the memory of the event, your action, the decisions taken based on the perceptions and lessons learned from the past and filed that package away for future use. The fact, that your interior library is now enriched by 1 new volume gives the reptilian brain new directives for the future. And it is the reptilian brain that states all of a sudden: “I wanted to do that”. Which is not even false, as it will.
    Posted 09-10-2017 at 04:08 AM by Michael Uplawski Michael Uplawski is offline
    Updated 03-23-2021 at 12:51 AM by Michael Uplawski (ALL FALSE)
  11. Old Comment

    Transforminator

    Quote:
    Originally Posted by Michael Uplawski View Comment
    I am “currently” (rather occasionally) improving the GUI by providing translated values for the configuration options. (...) The code will be much cleaner, once that I have overcome this hurdle...
    And DONE..., maybe. I guess...
    Posted 09-10-2017 at 03:56 AM by Michael Uplawski Michael Uplawski is offline
  12. Old Comment

    Paradigms exist to be broken

    Quote:
    Originally Posted by ntubski View Comment
    I have seen things like "every function returns a value", meaning if you write something that doesn't return a value, it's not a function, it's a "procedure" (i.e., descriptive, not prescriptive). There's also the idea from the ML-family of languages, that every function returns a value, even if it's the "unit" value which contains 0 bits of information (it's equivalent to "void" in C, but treating it as a value helps reduce special cases in the way functions are handled, so I think it's rather nice).
    As your background is complete and your reflection organ functional and oiled, you can ignore this point. ;-)

    I have worked with C/C++, Java and Ruby, only and only a few years with each. All three universes are populated with people who do not know the difference or have been educated to ignore them. Ada, VB and JavaScript could actually help to enlighten those with a restricted knowledge of programming languages, like myself.

    In the context of the document, above, your statement is important and well placed below my text. I may be erring but believe the general character of my explanations appeals to a few types of people with diverse programming experience.

    There is also a chance of cultural differences between Europe/Germany and your own professional environment. In this case, I would have to adapt the entry and enlarge on procedures against functions. We have had this kind of discussion in a forum of linguists and they never end with a satisfactory conclusion...

    But hey. Maybe the others just read this comments-section and it will be fine, too... ;-)
    Posted 10-29-2016 at 05:59 AM by Michael Uplawski Michael Uplawski is offline
    Updated 10-29-2016 at 06:00 AM by Michael Uplawski
  13. Old Comment

    Paradigms exist to be broken

    I think the difficulty comes from the fact your headers are not nested, right? e.g.

    Quote:
    Originally Posted by Michael Uplawski
    No, it is rather that the XML or XHTML documents are read from top to bottom and the templates first applied in the order of the appearance of triggering tags, then within a template for the same reason and in the same way.

    This means, that you would have to process the same XML-document twice to first apply the templates on all the headers, to produce the bookmark-tree, than once again to produce the transformed output. What I do, is rather “anticipate” the headers. Or even: presume that my template for headers will add id-attributes. These are my own creation and thus my for-each (or group) loop trusts me that the ids will be there. I decouple bookmark-tree from content and am still “dynamic” in that an arbitrary number of arbitrarily structured headers will be honored...

    if this is English.
    Posted 10-29-2016 at 04:57 AM by ntubski ntubski is offline
    Updated 10-29-2016 at 06:02 PM by ntubski (Attribution)
  14. Old Comment

    Text-mode spreadsheet viewer

    See Apache-Poi for a complete programming interface to most Microsoft® file-formats. Unfortunately, it is first of all a Java-library.
    Posted 10-08-2016 at 05:24 AM by Michael Uplawski Michael Uplawski is offline
  15. Old Comment
    Posted 10-08-2016 at 01:19 AM by Michael Uplawski Michael Uplawski is offline
  16. Old Comment

    Cuddling with the Middle Ages

    The royalist fraction of the extreme right (fascist) movements in France...
    - No joke -
    state, that Monarchism were the system of government the most adapted to the mentality of the French people.

    Their assessment is unfortunately correct. Without a monarch who would be responsible for just everything, who
    • furnishes prosperity and well-being to everyone
    • fails to do so
    • fails to do anything and is, thus, at the origin of all misery
    • points at the culprit who bungled it all or the enemy who is to be fought

    the French are obliged to find someone else to fit in, each time. And they tend to succeed. Hypocrisy helps and the refusal of all personal responsibility is just the base of the French way of life.

    No. I am cool. You are not.
    Posted 10-08-2016 at 12:19 AM by Michael Uplawski Michael Uplawski is offline
    Updated 10-08-2016 at 12:24 AM by Michael Uplawski
  17. Old Comment

    Transforminator

    I am “currently” (rather occasionally) improving the GUI by providing translated values for the configuration options. This is trickier than I had expected, as an original version of the option value must still be persisted and used internally. For example the page-layouts that everybody knows well are “landscape” and “portrait”. These are two values which are understood by the Ruby-Gem “Prawn” which creates the PDF-file from email. In he German locale they are replaced by „Querformat” and „Hochformat”, in French it is « paysage » and « portrait ».

    To allow translating *all* values, I introduce a new class which is aggregated by the ConfigOption objects.

    My difficulties at this time arise from the fact, that I overlooked the number of times that these values are read and displayed, either in their original- or the translated form. For the time, the new class tends to create more trouble than facilitation. But I begin to understand the necessary changes in the “architecture”. The code will be much cleaner, once that I have overcome this hurdle...
    Posted 09-23-2016 at 06:04 AM by Michael Uplawski Michael Uplawski is offline
  18. Old Comment

    What is progress

    Now the effing cancer took my favorite aunt, the strongest woman that I have known so far. No, she did not smoke, no, she did not live an unhealthy life and no she was not lacking physical activity. Rather the contrary. A nun who worked hard in medical service in Africa and later in hospitals in France. I claim that more than 50% of all cancer victims are just poisoned to death and the chemical food producing industries are the main culprits. Sirs, I wish that you suffer the same pain, and just a little longer, please. And I have had enough of it.
    Posted 07-23-2016 at 02:26 PM by Michael Uplawski Michael Uplawski is offline
  19. Old Comment

    What is progress

    I got another one...

    First, I want to remind you of the definition of the “idea of progress” from Wikipedia:
    Quote:
    the theory that scientific progress drives social progress; that advances in technology, science, and social organization inevitably produce an improvement in the human condition.
    • Technology
    • Science
    • Social organization
    are listed as factors that influence the human condition.

    Personally, I would like to enlarge the definition to just any development which leads to an improvement in the human condition and, this way, include culture and all the different disciplines that it comprises.

    Take music.

    Did music evolve in a way that it improved the human condition or am I just nuts? I may still be nuts, but it did not. Again, many do confuse sophistication with progress, but these are not two words for the same thing. The modern understanding of sophism, as cited in my blog-post, above, even conveys the idea of a digression.
    So how did music evolve. Composers and musicians are nowadays enjoying a freedom that they have not known in any preceding epoch. Maybe Mozart, Haydn and, still earlier Telemann, Purcell, Bach.., John Downland.., would have dreamed of a time, where they would be freed from the cycle of fifth or the diverse scales, that were “en vogue” during the periods of Ars Antiqua, Ars Nova and still during Renaissance ...

    Or maybe not.

    Just listen to Johann Sebastian Bach. When you are done, do it again... listen to Bach. What has happened during that hour or so?
    What hits you there, in the absence of all experimentation, is simple and pure mastership. Know your tools and handle them according to the manual and you produce incredible beauty??? Looks like that. Naaaa... it is not that simple. But anyway, restricted by crude social conventions, self-inflicted austerity and obediently observing his religion's rules, this man still excels in pushing the limits of his art.
    And we are still not able to simply assimilate these compositions, to consume them in the way that “modern” art is consumed and digested. They still generate joy and leave us astonished... where are those limits of the baroque era and its backwardness?

    And what is progress, again?
    Posted 05-26-2016 at 06:50 AM by Michael Uplawski Michael Uplawski is offline
    Updated 05-26-2016 at 06:52 AM by Michael Uplawski
  20. Old Comment

    Create Images from PDF and recreate PDF from Images...

    The SoftMaker Office-Suite since version 2016 uses font-forge (if installed) to convert OTF prior generating PDF-files.
    I have tested this a few times with their free version (FreeOffice) and can confirm that the quality of the results has improved. I can print from Evince what was not printable, before.

    In an attempt to comprehend more of the OTF-trouble, I notice that SoftMaker Office uses to embed fonts simultaneously in two encodings, WinAnsi *and* Identity-H, when the “export” function is used to create PDF. If I print into a file, instead, only Identity-H is used and this, too, lets evince handle the resulting files, which are also smaller, a lot better.

    But, at the same time, some PDF-documents are still not printable on paper, when they contain OTF.

    I still use the above procedure or the convert-tool (ImageMagick) to first create images from the affected PDF-files. This works always!
    Posted 05-17-2016 at 05:13 AM by Michael Uplawski Michael Uplawski is offline

  



All times are GMT -5. The time now is 08:24 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration