Categories

## Setting up SAMBA shares on a Linux system with SELinux enabled

I have for several years administered a server that hosts several shares over SAMBA. Every time there is a new share or maintenance to be done, there never seems to be a comprehensive list of things to get right for the shares to work correctly and have the correct permissions for the user. As I […]

Categories

## Increment string from given array of letters or exclude specific letters from incremental with PHP

I have a list of allowed letters $allowedLetters = array(‘B’,’C’,’D’,’F’,’G’,’H’,’J’,’K’,’L’,’M’,’N’,’P’,’R’,’S’,’T’,’V’,’W’,’X’,’Y’,’Z’); And from that array I would like to do string increment to get the following pattern: BBB, BBC, BBD … until ZZZ I know that I can do string increment as simple as this:$letters = array(); $letter = ‘BBB’; while ($letter !== ‘ZZZ’) { […]

Categories

Categories

## How do I curve text in a polar plot?

Hello Matplotlib Experts, How do I curve text in a matplotlib polar plot? In my attempt below, my code rotates each char individually, but doing so would remove the natural spacing of each font. Can somebody describe a solution for passing ax.text in matplotlib? import numpy as np import matplotlib as mpl import matplotlib.pylab as […]

Categories

## How could I give in Kruskal’s algorithm the name of the locations (vertex) in the form of strings, more precisely city names?

I wrote the following code with Kruskal’s algorithm and I don’t know how to modify it so that the locations are city names. public class Vertex { public char value; private char[] alphabet = {‘A’,’B’,’C’,’D’,’E’,’F’,’G’,’H’,’I’,’J’,’K’,’L’,’M’,’N’,’O’,’P’,’Q’,’R’,’S’,’T’,’U’,’V’,’W’,’X’,’Y’,’Z’}; public Vertex(char val) { this.value = val; } public int getIndex() { int idx = new String(alphabet).indexOf(this.value); return idx; } […]