Why have symbolic links between files in folders at same depth?

I noticed that on OS X, the /usr/local/Cellar folder contains binaries installed using Homebrew, and that /usr/local/opt has symbolic links to a bunch of those binaries. I haven’t used symbolic links much, but as I understand it, the purpose of them is to create a link in a convenient location to a file/folder that acts as a copy of that file/folder, without having to move that file/folder from its original location.

So my questions are:

1) Am I correct in my understanding of symbolic links there? ^^

2) If so ^^, why would you create symbolic links in one folder (/usr/local/opt) to binaries in another folder (/usr/local/Cellar) that is at a similar location/depth in the file structure? Under what circumstances would you use these symbolic links where you couldn’t just use the binaries?


Proving recursion depth of merge sort

Hello I want to prove the recursion depth of merge sort, which is $ O(\log(n))$ . I think I can prove this by recurrence equation and the master theorem: $ T(N)=2 T(n/2)+O(N) $ however i need to get $ O(\log(n)) $ . Basically I want only to calculate the complexity of the deviding and remove the conquer part from this equation. How can I do this? Or is there another way to prove the height of the recursion tree?

In the picture below you can see I want to prove the height from red to gray.

enter image description here

Is there a simple image processor that can reduce image color depth (convert 24-bit RGB to 2, 4 or 8-bit indexed color)?

I have a need for a quick/easy image processing application under Ubuntu 18.04 that will allow me to view, crop, scale down and reduce color depth/color mode (number of color bits per pixel) – with and without dithering – of 24-bit JPG input images and export them as PNG. I’d like the option of reducing to 4, 16 or 256 colors (2, 4 or 8 bits per pixel).

GIMP has these capabilities, but I’m looking for something less bulky.

In Windows (and OS/2 before that!), I was a longtime user of PMView, a speedy viewer and processor. I can continue to use PMView through WINE (there is also an IrfanView app that works similarly through WINE), but I would prefer a Linux app.

I have tried a number of applications. I like the simplicity, cropping, resizing and even the color manipulations of gThumb. But gThumb does not allow me to save a PNG at less than 24-bit. Same problem with Shotwell and Mirage. I’ve had no luck getting usable results with Pinta.

Is the height of all binary trees with average depth of O(logn) for all nodes, also O(logn)?

If the height of all the binary trees with average depth of O(logn), is also O(logn) is true, I need to prove it. If it isn’t correct I’m asked to find a group of trees which have an average depth of O(logn) but their height is not O(logn). Since O is calculated asymptoticaly the group of trees must be general and not specific (for expample not trees with 10 nodes).

Change maximum depth of a menu tree

I discovered today that Drupal 8 only allows you to add menu items in a maximum of 9 levels.

I understand this is more than enough for most users, but I’m using the menu system to organize pages for a choose-your-own-adventure game, and need around 15 menu levels.

There is a variable “MAX_DEPTH = 9” in the file core/lib/Drupal/Core/MenuMenuTreeStorage.php where I guess the value is set.

Is there some way to change this value? I tried changing it directly in that file to see what happened, but that gave me a blank website and a DatabaseExceptionWrapper error.

I know some things can be changed through config variables, but I don’t know how to find out if this is one of those things, or how to do it. Any hints in the right direction would be very appreciated!

“Taxonomy with depth” view

I have a taxonomy tree like this:

  • balls
    • basketball
      • color
        • red
        • green
    • volleyball
      • color
        • red
        • green

If a Taxonomy term has children, I want to show them; if there aren’t children I want to show the nodes associated with the taxonomy term.

My view settings are the following.

Views settings screenshot

This is similar to Show all child nodes of a taxonomy term D7, but I cant get it to work.

I use Content: Has taxonomy terms (with depth), and I set the depth to 1. It doesn’t work as expected.

maximum recurssion depth reached in python

I have developed a code for finding max and min using recursion. But as soon as I make a list greater then 6 elements it throws a runtime error.

RecursionError: maximum recursion depth exceeded in comparison

Here is the below code:

def maxmin(a,i,j):     if(i==j):         return(a[i],a[j])     elif(i==j-1):         if(a[i]>a[j]):             return(a[i],a[j])         else:             return(a[j],a[i])     else:         mid =int(i+j/2)         value1 =maxmin(a,i,mid)         value2 =maxmin(a,mid+1,j)         if(value1[0]>value2[0]):             max=value1[0]         else:             max=value2[0]         if(value1[1]<value2[1]):             min = value1[1]         else:             min=value2[1]         return(max,min)  import sys sys.setrecursionlimit(1000) a =[2,3,90,0,-9,3] maxmin(a,0,len(a)-1) 

I have also increased the limit for recursion but still not working.

I tried another small code by recursion with a stack size of 1000 and its working fine. I think there is some issue in the code. The stack space occupied by the above program is not even 100.

import sys sys.setrecursionlimit(1000) def fib(n, sum):     if n < 1:         return sum     else:         return fib(n-1, sum+n)  c = 900 print(fib(c, 0)) 

The second program is working fine while the first is throwing errors.

I really in depth help ( UK tourist Visal refused Twice ),and makes so uneasy

I was denied UK visa based on the followings:

  1. You have stated that you will visit the UK for 6 days.

  2. I note that you were refused a visa for this purpose on 23 March,2019. At that time the Entry clearance officer had not been satisfied that you had sufficiently demonstrated your studies in resident country(Asia). You have not addressed this , nor have provided any evidence that you are currently pursuing a course of study there. I note that you have you have temporary residence in the (Country in Asia). The documents you submit do not demonstrate your long term intention on completion of any studies.

Note : I have been to UK on 6 months tourist visa,even Schengen country and Singapore( didnt over stayed nor abuse the visa stipulations ). I applied for 2 years tourist visa,and submitted back documents from my University ,showing am a bona fide full time PhD Student,with 8 months resident visa of my current resident country to show.

  1. You have submitted a bank statement in your name for the (Bank Name). I note that there are several cash deposit over the reporting period. The source of these fund is not clear and they dont reflect your stated annual income of 12,200GPS.

Note: I provided the name of sponsor(mom) with her payment payments slips,and other back others documents from my local bank to support the source of it.

  1. I consider that you have not shown sufficiently strong family ,social or economics ties outside the UK or reason to return to your home country at the end of the trip.

Note: I secured my first UK tourist visa(6 months) with two landed properties in my city, resubmit additional landed property with stock shares (3 landed properties of mine ) ,and a letter from my parents stating am the sole heir of their 3 residential properties in the heart of my city. I dont have kids nor married