Predictability – Can a predictable program have infinite output?

Our general rule is one question per post. I answer the first question.

A program can certainly produce infinite output. It can enter an endless loop that produces an output. Consider the first program of all in Basic:

10 PRINT "Hello World!"
20 GOTO 10

There is no point in saying that a program is predictable. You do not have to write a program to output a program. Instead, you can simply write the program you want. Instead of talking about predictable programs, predictability is about languages. We speak of predictable languages. Check the definition of predictability.

Isometric output of the Z-as-Y sort order in Unity

I'm having problems with the Z-as-Y Tilometric sort order in Unity. I try to paint two levels of tiles on my tile map. When I add tiles that I expect to be "below" / "behind" my upper level, they partially obscure the tiles above. (The visual discrepancy is shown on the right in the image I attached.)

My two levels are currently painted at Z = 0 and Z = 2. I've been looking for a handful of new arrivals:

  • The sort mode is set to individual
  • Sort order in the top right
  • Transparency sort axis set to X = 0, Y = 1, Z = 0
  • I scrubbed for possible optical illusions using normal (not Z-like-Y) isometry to look at my tiles and make sure I have a coherent grid.

Am I missing something here? My understanding was that with Z-as-Y, I could use a single tile map to paint tiles at multiple heights, but this display problem in my sort order makes me think that Z-as-Y is not quite enough for that Job to do.

Problematic tile

New posts on how to just output block quotes content from a widget?

1 creates a simple widget that shows recent posts titles. How can only the content, 1 between < blockquote >< /blockquote > from the last posts?

For example, all my posts have a quote HTML tag like this:

“Lorem ipsum carrots, an improved student developer, but they do occaecat time and vitality, like work and obesity.

< blockquote >Admin content< /blockquote >

Over the years, the nostrud movement, the school district not aliquip advantage, it can work. "

1 need to see recent posts basically as follows:

New posts widget title

After title 1

Admin salary from behind

Post title 2

Admin salary from behind

Post title 3

Admin salary from behind

Thanks a lot!

Put NER output in a list

I am new to Python. I use an API to detect NERs in Persion. The structure of the output for each word is (word, NER tag) and after each sentence there is a line break (see below). So the output is not a list. How can I list this edition so that sentences can be separated?
Thank you for your reply.

output of NER tool:


ubuntu – Redirects the output of the bash command to files

I have to save all the output logs of my bash commands in a text file.
When I do the following, I get an error message

alejandro@alejandro-X556UAK:~$ sudo touch salida.txt
[sudo] password for alejandro: 
alejandro@alejandro-X556UAK:~$ sudo du -h ./* > salida.txt
bash: salida.txt: Permission denied

terminal – Adds colors to the output of existing CLI commands

I want to create a function / alias that colors the output of another command. Is there a best practice method for doing this?

Let's take that for example alias Command whose output looks something like this:


In the standard bash / zsh, this is all in the same color. However, I would like to adjust the output so that the part before the alias itself (the part before the =) is green and the alias command (the part after it =) is red, for example.

Obviously, alias is just an example because I want to add colors to other commands.

My current solution used awk:

alias | awk -F"=" '{print "33(1;32m" $1 "33(0m=33(1;31m"$2"33(0m "}'


I don't find it particularly appealing (especially the color codes). It also seems that this approach is for more complex commands (e.g. adding a color output to it top or ps) and doesn't seem to be very maintainable in the long run.

Any ideas on how to do this better / easier?

PS: I think this is a general question about Unix / Linux terminals, but since I mainly work on OS X, I decided to ask here …

Theming – Drupal 8: Output of part of the field {{content}} / contributor in the block – views-block – ??. twig

I created a view block that is "more of this author" and was able to configure the view to retrieve the author of the current node and display more content from that author. Hooray! I want to create a link that contains all of the author’s content, and it seems that the block doesn’t cause part of {{content}} to appear regardless of what I try. It can display {{content}} that contains the field_contributors field, but I can't seem to make it pull part of {{content}}. I've read dozens of discussions and tried all possible branch variables, including {{content.field_contributors (0)}}, {{content.field_contributors}}, {{content (& # 39; # block_content & # 39;). field_contributors.value}}. I can't find out where the problem is for my whole life. Isn't that just possible? I use Drupal 8.8.

Here is my block – Views block – More-from-this-author-block-1.html.twig

 * @file
 * Theme override to display a block.
Might be better to theme as views-view-fields--VIEWNAME.html.twig

{{ title_prefix }} {% if label %} {{ label }} {% endif %} {{ title_suffix }}
{% block content %} {{ content|without('field_contributors', 'field_featured_images') }} {% endblock %}
See all by {{ content('#block_content').field_contributors.value }} {# nothing works here no matter what #)}

zfs – Samba output time with shadow copy

I was wondering if anyone else has experience with it. Current version: 6.1 Zentyal and Samba version 4.7.6-Ubuntu
The time in the shadow copy is not displayed correctly on the previous versions of Windows, as soon as I shadow: localtime = yes and restart samba shows no previous versions, which is why I have to set shadow: localtime = no
Pyznap is currently used for snapshots of the ZFS file system
see pictures on the times not correct but both windows and zentyal have the right time only the previous versions are now. The hour difference is approximately 5 hours after the last snapshot was taken at 6:10 p.m. on tens of minutes and at 1:10 p.m. on previous versions of Windows

This is my Samba share

    path = /data
    browseable = yes
    force create mode = 0660
    force directory mode = 0660
    valid users = @"Domain Users"
    read list =
    write list = @"Domain Users"
    admin users =
    vfs objects = acl_xattr full_audit recycle shadow_copy2
#    full_audit:failure = connect opendir disconnect unlink mkdir rmdir open rename
full_audit:prefix = %u|%I|%S
full_audit:failure = connect
full_audit:success = mkdir rename unlink rmdir pwrite pread connect disconnect
full_audit:facility = local5
full_audit:priority = notice
    recycle: inherit_nt_acl = Yes
    recycle: versions = Yes
    recycle: excludedir = /tmp|/var/tmp
    recycle: keeptree = Yes
    recycle: repository = RecycleBin
    recycle: directory_mode = 0700
shadow: snapdir = .zfs/snapshot
shadow: sort = desc
# Specify snapshot name: frequent, hourly, daily... as desired
shadow: format = _%Y-%m-%d_%H:%M:%S
shadow: snapprefix = ^pyznap
shadow: delimiter = _
shadow:localtime = no