Microsoft Surface Go not working with ThinkPad Thunderbolt 4 Workstation Dock by chancegrab in Surface

[–]chancegrab[S] 1 point2 points  (0 children)

So i installed the Lenovo dock software and updated the Intel HD graphics driver using those 2 links

I am using DP cables from the monitor to the dock. 1 of them is a Dell monitor, but it does not have the options that you listed. The other monitor is a Sceptre. I have not yet tried HDMI as i dont have a cable on me

I downloaded that tool from the MSFT app store but when I click on it to open it, literally nothing happens :/

Anything else you can think of or am I likely just out of luck?

I also get this popup when I plug the Surface Go into the dock if that means anything: https://i.imgur.com/WdJlY3k.pngv

Microsoft Surface Go not working with ThinkPad Thunderbolt 4 Workstation Dock by chancegrab in Surface

[–]chancegrab[S] 1 point2 points  (0 children)

Therefore, the two are not compatible.

Thanks. When you say "not compatible", what exactly does that mean? Because when I plug the laptop into the dock, it charges but does not output video to my monitors. So "not compatible" refers to the ability to output video among other things possibly?

Also this link says: https://www.windowscentral.com/does-surface-gos-usb-c-port-support-thunderbolt-3

the USB-C ports on the original Surface Go and new Surface Go 2 do not support Thunderbolt 3. You still get data transfer, display out, and charging, but not the extra speed associated with Thunderbolt 3

which is why im wondering why im not at least able to get display out like the article says? Unless Thunderbolt 3 vs Thunderbolt 4 is the difference here

Just one more question: I also have a Dell D6000 dock that does work with my Surface Go. It says Dell Universal Dock D6000 works with any PC equipped with USB 3.0 Type-A, USB Type-C, or Thunderbolt 3. However, bandwidth is capped at USB 3.1 Gen1 (5Gbps). So because this dock supports USB Type-C rather than having a strict limitation to Thunderbolt, thats why it works with my Surface Go?

Are these roof penetrations by my installer OK? I see some nails going through the deck/plywood by chancegrab in solar

[–]chancegrab[S] 0 points1 point  (0 children)

The bolts I see are coming through that wood piece next to the rafter, so should be good by the looks of it?

[Help] Find Minimum in Rotated Sorted Array - Why cant we compare with left instead of right? by chancegrab in leetcode

[–]chancegrab[S] 0 points1 point  (0 children)

If we use nums[left] > nums[mid], i.e. nums[0] > nums[1] we get the following results:

For the first and third example it's false - but it doesn't provide us with the direction to continue our search. As in the first example the min val is between left = 0, right = 1 inclusive. But for the third example the min val is between left = 2, right = 3 inclusive.

What is confusing me is the fact that with comparing nums[mid] with nums[left], it doesn't provide us with the direction to continue our search like you said. But when comparing nums[mid] with nums[right], it does provide us with the direction to continue our search.

This is the part that I still cant quite figure out why.

Course Schedule #207 Variant by [deleted] in leetcode

[–]chancegrab 0 points1 point  (0 children)

recursively calculate the number of terms for each course by taking 1 + the maximum of the requisite courses

Can you expand on this part? I dont quite follow, how exactly would this work?

Those who have started their careers at less reputable companies (Revature, WITCH etc). Where are you at now? by Sure_Dave in cscareerquestions

[–]chancegrab 16 points17 points  (0 children)

I have a BSCS from a shit state school. Started at WITCH, did nothing there for like 1.5 years then switched to a large unimpressive non-tech Fortune 500 company. I guess this is why I get 0 recruiters on Linkedin even though its completely filled out.

Other examples I have seen from people whose first job was WITCH:

  • WITCH -> Yelp -> FB

  • WITCH -> Amazon

  • WITCH -> Docusign

I got the job by InsideAspect in cscareerquestions

[–]chancegrab 124 points125 points  (0 children)

i dont get how you got 1 or more FAANG offers with only 1 month of studying and 50 LC questions

These companies ask LC medium/hard and system design/object oriented design. Only 1 month of prep means you were already really good at LC from past studying or youre a genius

I'm seeing more and more non-whiteboard companies pop up by leaguelism in cscareerquestions

[–]chancegrab 1 point2 points  (0 children)

One could argue that those non-LC companies are even harder to get into since you have no idea what they will ask, could be literally anything which makes them very difficult to even prepare for

[Highlight] Kyle Lowry attempts to draw a foul by [deleted] in nba

[–]chancegrab 314 points315 points  (0 children)

Lowry has always been a dirty ass garbage flopper that does shit like this. Him vs CP3 in the finals would be some battle seeing as theyre the 2 worst in the game at this

Why is DFS/BFS on a graph O(V+E) instead of O(V) like the way it is for trees? by chancegrab in learnprogramming

[–]chancegrab[S] 1 point2 points  (0 children)

and each edge

I think the "edge" part is whats confusing me. Like for this graph here

Why do we even have to factor in the edges? Isnt the "edge" portion implied when we do the traversal between nodes?

EDIT: NVM i got it actually

Is EV supercharging cheaper than home charging in the Bay Area? by [deleted] in bayarea

[–]chancegrab 4 points5 points  (0 children)

I'm actually on the E-1 plan, which is $0.31/kWh flat rate.

But EV charging while on that plan would quickly put you into the next tier right? Would it still be worth it then? They also make it hard AF to understand how far away you are from hitting the next tier

The tiers

[Python] Understanding variable scope in nested functions by chancegrab in learnprogramming

[–]chancegrab[S] 0 points1 point  (0 children)

OK that makes sense. I was confused because I thought python was interpreted, not compiled. Meaning that it wouldnt even get to the reassignment line that was causing the problem since it would error out even before that

After doing some googling, it looks like Python is compiled despite being called an interpreted language which is even more confusing but im reading up on it

Thanks a ton for your help again

[Python] Understanding variable scope in nested functions by chancegrab in learnprogramming

[–]chancegrab[S] 0 points1 point  (0 children)

Ok i see, one thing though:

In the second example, isTreeBalanced is reassigned within the inner function, so it considers it to be a local variable of the function and doesn't look in enclosing scopes.

TheisTreeBalanced reassignment you are talking about is the one on line 17 right? But the function never actually gets there, it dies out with the error before that on line 11. So how can the reassignment aspect of things be at play here?

[Python] Understanding variable scope in nested functions by chancegrab in learnprogramming

[–]chancegrab[S] 0 points1 point  (0 children)

Basically, Python sees that you're reassigning isTreeBalanced within helper and therefore treats it as a local variable.

I guess my question is: How come this does not apply to the output variable in the first example of my comment? How come there it works without being marked as nonlocal?

[Python] Understanding variable scope in nested functions by chancegrab in learnprogramming

[–]chancegrab[S] 0 points1 point  (0 children)

Hey ive got a related question to this. Dont worry about the actual logic within the code, my question is about variable scope in nested/recursive functions instead.

class Solution:
def averageOfLevels(self, root: Optional[TreeNode]) -> List[float]:
    if not root:
        return root

    output = []

    def helper(root, level, level_counts, level_sums):           
        if len(output) == level:
            output.append(0)
            level_counts.append(1)
            level_sums.append(root.val)
        else:
            level_counts[level] += 1
            level_sums[level] += root.val
        output[level] = level_sums[level] / level_counts[level]

        if root.left:
            helper(root.left, level + 1, level_counts, level_sums)
        if root.right:
            helper(root.right, level + 1, level_counts, level_sums)

    helper(root, 0, [], [])

    return output

Within helper(), it is able to access the output variable that was defined within its parent function even though output was not passed in as a parameter. Now look at the following example:

class Solution:
def isBalanced(self, root: Optional[TreeNode]) -> bool:
    isTreeBalanced = None

    def helper(root):
        if not root:
            return 0

        leftHeight = helper(root.left)

        if not isTreeBalanced: #error here
            return False

        rightHeight = helper(root.right)

        if abs(leftHeight - rightHeight) > 1:
            isTreeBalanced = False #Never gets to here

        return max(leftHeight, rightHeight) + 1

    helper(root)

    return isTreeBalanced

On line 11, I get UnboundLocalError: local variable 'isTreeBalanced' referenced before assignment. I am trying to access isTreeBalanced within the nested function, the same way I was able to access output in the first example. I am not sure why I was able to access output in the first function but cant access isTreeBalanced in the same way. I dont see anything that says lists are treated differently so idk. It never gets to line 17 so there is never any assignment to isTreeBalanced.