magento2 – Google Analytics Shopping Behavior Analysis Missing Data Ask

I’ve created an eCommerce store and created the analytics for this store, On Magento2 backend I’ve placed the Tracking Code and I start to check that the data is being sent into GA. The enhanced eCommerce is already enabled and collecting order data. The issue is the Shopping Analysis Behavior that is missing data on some steps

Sessions with Product Views

Sessions with Add to Cart

Sessions with Checkout
enter image description here

trees – Is the heap in “Data Structures Algorithms in Java” by Goodrich, Tamassia, and Goldwasser missing sentinel leaves?

In the book, Data Structures Algorithms in Java Sixth Edition by Goodrich, Tamassia, and Goldwasser on page 339, there is an

“Example of a heap storing 13 entries with integer keys. The last position is the one storing entry (13,W).”

I’ve recreated the a similar image using qtree-tikz with my own depth and height calculations in the box on the left.

enter image description here

According to the book,

A heap T storing n entries has height $h = lfloor log n rfloor$.

Justification: From the fact that T is complete, we know that the number of nodes in levels $0$ through $h-1$ of T is precisely $1+2+4+…+2^{h-1} = 2^{h}-1$, and that the number of nodes in level $h$ is at least 1 and at most $2^h$. Therefore

$n geq 2^h -1 +1 = 2^h$ and $n leq 2^h -1 +2^h = 2^{h+1} -1$.

Here is where I see a problem. I added the depths and heights for nodes at each level according to my understanding of trees in the box to the left of the tree. The example tree Figure 9.1 shown above obviously has 7 inner nodes and although depth level 3 would have 8 nodes, it is unfull at 6 nodes.

If I follow the “Justification”, I end up with the following

I am being forced to conclude that there must be a missing level of sentinels,
$2^3 -1 = 7$ and the only way to get a power of 3 in those formulas is to have a height of 4. But why on earth would the authors, who otherwise explain everything in detail, not make important piece of information explicit? Or, did I miss something? I would appreciate a thorough explanation to help me understand the proof. It also seems that the authors throw around the term “level” loosely, sometimes meaning depth level and sometimes meaning height level.

I should also mention that earlier in the book, on page 286, they provide a definition for the height of a tree without any examples.

We next define the height of a tree to be equal to the maximum of the depths of its positions (or zero, if the tree is empty).

  • If $p$ is a leaf, then the height of $p$ is $0$.
  • Otherwise, the height of $p$ is one more than the maximum of the heights of $p$‘s children.

excel – Generic function for interpolating missing values in power query

I have written a (relatively) generic function for interpolating values in power query (also useful for power bi and m code).

I am looking for any improvements or input, but especially:

  1. speed
  2. handle more inputs correctly (more generic)
  3. documentation / readability of code
(Input as table, xColumn as text, yColumn as text) =>
//Interpolates missing yColumn values based on nearest existing xColumn, yColumn pairs
let
    Buffer = Table.Buffer(Input),
    //index for joining calculations and preserving original order
    #"Added Main Index" = Table.AddIndexColumn(Buffer, "InterpolateMainIndex", 0, 1),
    #"Two Columns and Index" = Table.RemoveColumns(#"Added Main Index", List.Select(Table.ColumnNames(#"Added Main Index"), each _ <> xColumn and _ <> yColumn and _ <> "InterpolateMainIndex")),
    #"Remove Blanks" = Table.SelectRows(#"Two Columns and Index", each Record.Field(_, yColumn) <> null and Record.Field(_, yColumn) <> ""),
    //index for refering to next non-blank record
    #"Added Sub Index" = Table.AddIndexColumn(#"Remove Blanks", "InterpolateSubIndex", 0, 1),
    //m = (y2 - y1) / (x2 - x1)
    m = Table.AddColumn(#"Added Sub Index",
                        "m",
                        each    (Number.From(Record.Field(_, yColumn))-Number.From(Record.Field(#"Added Sub Index"{(InterpolateSubIndex)+1}, yColumn))) / 
                                (Number.From(Record.Field(_, xColumn))-Number.From(Record.Field(#"Added Sub Index"{(InterpolateSubIndex)+1}, xColumn))),
                        type number),
    //b = y - m * x
    b = Table.AddColumn(m, "b", each Record.Field(_, yColumn) - (#"m") * Number.From(Record.Field(_, xColumn)), type number),
    //rename  or remove columns to allow full join
    #"Renamed Columns" = Table.RenameColumns(b,{{"InterpolateMainIndex", "InterpolateMainIndexCopy"}}),
    xColumnmb = Table.RemoveColumns(#"Renamed Columns",{yColumn, xColumn, "InterpolateSubIndex"}),
    Join = Table.Join(#"Added Main Index", "InterpolateMainIndex", xColumnmb, "InterpolateMainIndexCopy", JoinKind.FullOuter),
    //enforce orignal sorting
    #"Sorted by Main Index" = Table.Sort(Join,{{"InterpolateMainIndex", Order.Ascending}}),
    #"Filled Down mb" = Table.FillDown(#"Sorted by Main Index",{"m", "b"}),
    //y = m * x + b
    Interpolate = Table.ReplaceValue(#"Filled Down mb",null,each ((m) * Number.From(Record.Field(_, xColumn)) + (b)),Replacer.ReplaceValue,{yColumn}),
    //clean up
    #"Remove Temporary Columns" = Table.RemoveColumns(Interpolate,{"m", "b", "InterpolateMainIndex", "InterpolateMainIndexCopy"}),
    #"Restore Types" = Value.ReplaceType(#"Remove Temporary Columns", Value.Type(Input))
in
    #"Restore Types"

Lastly, there were no tags for power query, power bi, or interpolating. I’m not sure what other tags I can use for this post besides excel.

linux – Citrix toolbar missing, I’m using POP OS

So I Currently use citrix from windows and When I do I get a toolbar on top from which I can put citrix into fullscreen mode or windowed mode. Now that I started using POP OS I dont get the toolbar, As soon as I launch the workstation it goes into fullscreen mode and I’ve no way to make toogle windowed mode on or off. Please help me with this.

commerce – Configuration – > Zones admin page missing?

I’ve installed Drupal Commerce 2 and as explained here:

https://drupal-commerce.readthedocs.io/en/latest/v2/building-blocks/address/zones.html

there should be a “Zones” admin page at Configuration -> Zones. But I don’t have that page and I only have “default” zone?!?

Only relevant module I found is:
https://www.drupal.org/project/address_zone

but it exists only for Drupal 7?!

What I’m trying actually is to configure Commerce Product Tax, which exists only for D8 and at screenshot from module page:
https://www.drupal.org/project/commerce_product_tax

… they do have zones “France” and “France (Corsica)”, so this should be possible somehow I guess.

How to administrate those zones and why I don’t have that page under “Configuration” in my back-end?

wallet recovery – How can I recover the missing end of my private key?

You don’t need to bruteforce anything here (at least almost), and can recover the missing last 7 characters on an average PC at home within less than 1 second using a simple Python script!

In your picture there are 7 characters missing at the end of the private key (figured out by comparing with a test-printout using the same HTML file).

Yes, it is correct that this key format is using Base58 alphabet and therefore there are 58 possibilities per character, so for 7 characters you would need to try 58^7 possibilities (which would be about 2 trillions) in theory, but all these considerations are missing an important fact:

When such a private key (the format is called WIF short for Wallet Import Format, see also the reference documentation here) is encoded, at the end (after the actual private key) 4 bytes are added as a checksum. So if these 4 bytes are missing (at the end) you can calculate it from the rest.

Second: in your picture it looks like your private key starts with an L. This indicates that the Bitcoin address is based on a compressed public key. Don’t worry, this is a technical detail, but this helps you further:
Private keys for compressed pubkeys have another special byte added after the key (and before the checksum), namely a fixed 0x01 (see also in the reference documenation for WIF).

This means that the last 5 bytes of a WIF encoded private key (starting with L or K) are either static or can be computed from the rest.

So you are very lucky that the last 7 characters are missing (and not the first 7, because then you really would need to bruteforce 2 trillion possibilities).

What to do with this information:

If we apply this knowledge now to base58 we see that only a single character is missing and then we can calculate the rest.

Reasoning: first: a single base58 character carries ~5.85799 = log2(58) bits of information and second: we don’t need the last 40 bits (4 bytes checksum + 1 static byte for compressed key are 5 bytes = 40 bits).

So, if only 6 characters would be missing at the end (6 * 5.85799.. = 35.14794) we not need to bruteforce anything, because this would be still less than the 40 bits we don’t need.

Conclusion:

As you are missing 7 characters we just need to bruteforce one single character (and this means just 58 attempts, not 2 trillions).
So we just attempt to add one of the 58 characters from the bas58 alphabet. For each attempt we calculate the full base58 string by adding the static compressed key flag byte (0x01) and after that the checksum and simply compare it with the rest of the key you have. If it matches it is a valid candidate.

At the end of these 58 attempts you will end up with 2 or 3 (at most) valid private key candidates, and just need to check these 3 keys, to see which one belongs to your address.

The Reddit user /u/dooglus/ (not me) pointed out exactly this in the first place in his comment on your post and he also added a snippet of Python code which does exactly I’ve described above.

Don’t trust anybody, don’t hand out your key to any stranger!

Now take your time, learn what the Python script below does (don’t trust me or any strangers) and when you feel safe, copy the Python snippet from /u/dooglus/’s comment, save it in a text-file named complete-wif.py on a safe computer. After that take the computer offline and run the Python script by typing this into a commandline:

python3 complete-wif.py L...-your-private-key-goes-here...yhub

and it will print 2 or 3 completed WIF private keys in less than 1 second.

Appendix:

For reference, I appended the Python script but it’s not my work, all credits go to /u/dooglus/. I just can confirm that it does what I described above (but ask others to confirm this and try it with other private keys before you trust it with your real private key):

#!/usr/bin/env python3

import base58, sys

partial = sys.argv(1)

if len(partial) != 45:
    print("partial key should be 45 characters")
    sys.exit(1)

results = {}
for c in '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz':
    wif = base58.b58encode_check(base58.b58decode(partial + c*7)(:33) + b'x01').decode('ascii')
    if wif(:45) == partial: results(wif) = True

for k in results.keys(): print(k)

Playstore App Update Rejected – Disclaimer/Source: Missing Clear Source of Information/Disclaimer

I’ve done 10 updates previously for the same app. Now It got rejected for "Missing Clear Source of Information/Disclaimer"

The Message I got

Link

Also There is no option for me to put disclaimer for a release.

How to fix this issue?

8 – Missing form state values after adding submit function

I added a submit function in the form_alter hook when inserting a node:

$form('actions')('save_as_draft') = (
  '#type' => 'submit',
  '#value' => t('Save as Draft'),
  '#submit' => ('save_as_draft'),
  '#limit_validation_errors' => (),
);

In the save_as_draft() function, I want to get the address value from the form state, but there are no values (except for the additional submit button).

function save_as_draft(&$form, DrupalCoreFormFormStateInterface $form_state) {
  var_dump($form_state->getValue('field_address'));                      // outputs NULL
  var_dump($form_state->get('field_address'));                           // outputs NULL 
  var_dump($form('field_address')('widget')(0)('value')('#value'));      // outputs 'Address value'
  var_dump(array_keys($form_state->getValues())); // outputs { (0)=>  "save_as_draft" (1)=> "op" }
}

How can I get the form_state values in this alternative submit function without validating the whole form?

Is there another way of retrieving the form values instead of digging through the widget arrays?

MySQL Workbench Schema tables are missing

just started exploring MySQL Workbench and I recently restarted MySQL Workbench and I couldn’t find the table in the model. I believe it’s still there but I’m not sure how to display it like before. On the second picture(earlier), I can see and edit all my tables
enter image description here

enter image description here

Rendering Glitches (Font missing, Icons corrupted, Wallpaper corrupted) Ubuntu (Desktop) 20.04

Hardware: Dell XPS 9360

Software: Ubuntu 20.04 (LTS)

Problem: Graphical Glitches when using Ubuntu’s Desktop: Corrupted Icons with random artifacts each reboot, corrupted wallpaper with random artifact each reboot, missing character from fonts used in the desktop UI (taskbar and program menu)
Screenshots:

Longer Explanation
I recently did a fresh install of the new Ubuntu LTS after years of using an old versions. Everything worked fine. Then I began to setup my i3wm (which works fine without glithces) and so on, which I usually work with most of the time. After everything was setup, I switched back to the Ubuntu UI for a second and noticed the above states graphical/rendering problems. I tried googling them, but alltough I did find some older post, they either weren’t answered or it turned out that after some investigation their problems didn’t relate to mine.
All I did during the setup was install normal apt stuff and mess around with my i3 and vim configs.
The “most unusual” thing I did was setup some X11 stuff to get the touchpad and backlight working in i3, which I doubt messed up the ubuntu desktop like this (if it helps, here is everything i did: X11 stuff).

Does anybody have any idea how to fix the ubuntu-desktop without a total reinstall?

Already tried:

  • Rebooting
  • Restarting the Ubuntu Ui (Alt+F2, r)
  • reinstalling ubunut-desktop (sudo apt get install –reinstall
    ubuntu-desktop, then restart)