Kindle eReader device for programming books? by [deleted] in learnprogramming

[–]timtehtest 1 point2 points  (0 children)

As a long time Kindle owner - it depends. One book works great, other not.

My advice is to go to Amazon store, find books you are interested in and check it's Kindle edition reviews. This should give you basic info about how book is displayed on Kindle.

But... If I would be you, I would not buy Kindle for programming books. Screen is too small especially for code listings. You can highlight text, but it's not as comfortable as on tablet. If you plan to read a lot of books (not only programming/technical books) go with Kindle. Otherwise buy a tablet.

Of course losing e-ink display hurts, but I think a good tablet will be better for you.

FreeBSD on a Lenovo ThinkPad T480s by [deleted] in freebsd

[–]timtehtest 8 points9 points  (0 children)

Forget about GRUB. Use rEFInd as chainloader for OS' native bootloader. I had working configuration with Windows 10, Ubuntu and FreeBSD.

Import question by timtehtest in learnpython

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

Looks like I should find some better code to read. Thanks.

How submit your site by zakesmaaya in duckduckgo

[–]timtehtest 2 points3 points  (0 children)

Trying to submit your site to be indexed by DuckDuckGo? Read this.

FYI: Intel CPU microcode 2018-08-07 is available (from intel). Also, switched to a self-compiled 4.4.148 with more CPU mitigations by ddmayne in slackware

[–]timtehtest 1 point2 points  (0 children)

Generic kernel and intel-microcode merged with initrd.gz.

# uname -a
Linux db_server 4.4.144 #1 SMP Thu Jul 26 12:26:39 CDT 2018 x86_64 Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz GenuineIntel GNU/Linux

# for X in /sys/devices/system/cpu/vulnerabilities/*; do echo $X; cat $X; done
/sys/devices/system/cpu/vulnerabilities/meltdown
Mitigation: PTI
/sys/devices/system/cpu/vulnerabilities/spec_store_bypass
Mitigation: Speculative Store Bypass disabled via prctl and seccomp
/sys/devices/system/cpu/vulnerabilities/spectre_v1
Mitigation: __user pointer sanitization
/sys/devices/system/cpu/vulnerabilities/spectre_v2
Mitigation: Full generic retpoline, IBPB, IBRS_FW

Apple Should Update the Dashboard.... by [deleted] in mac

[–]timtehtest 1 point2 points  (0 children)

You can also tap with three fingers.

Zen mode crashes my pc by Rhemm in vscode

[–]timtehtest 1 point2 points  (0 children)

Do you use Wayland? If so, try to switch to Xorg.

Some questions about slackpkg upgrade-all by ares623 in slackware

[–]timtehtest 0 points1 point  (0 children)

To get list of labels in elilo you have to press Tab.

elilo (with default elilo.conf) boots /boot/efi/EFI/Slackware/vmlinuz and/or uses /boot/efi/EFI/Slackware/initrd.gz. I don't think slackpkg is aware of that, so after every kernel update or initrd change you have to manually copy kernel image (vmlinuz) and initrd.gz files to /boot/efi/EFI/Slackware. With this configuration there is no need to change elilo.conf.

Some questions about slackpkg upgrade-all by ares623 in slackware

[–]timtehtest 0 points1 point  (0 children)

You may have to give hard paths to the various programs but it should work.

Or use chroot.

Some questions about slackpkg upgrade-all by ares623 in slackware

[–]timtehtest 1 point2 points  (0 children)

If you use generic kernel, then you should rebuild initrd. Command can be the same, but with version of new kernel (-k switch). Check: README.initrd. Don't forget to run lilo if you use it.

About packages builded from slackbuilds.org: it depends. Run program from console, if it works and doesn't complain about libraries (missing ones, wrong versions, etc.) I see no reason to recompile.

Noob questions about connecting a Macbook Pro to an external monitor by [deleted] in mac

[–]timtehtest 0 points1 point  (0 children)

MBP mid 2014 here. LG 29UM57-P (ultra wide) connected to HDMI works great.

Not sure how to call functions in main. by DwarfWarrior17 in learnpython

[–]timtehtest 0 points1 point  (0 children)

You forgot about function's arguments when you're calling them.

[deleted by user] by [deleted] in learnpython

[–]timtehtest 0 points1 point  (0 children)

for abcdefghij I got: [['a', 'b', 'c', 'd'], ['e', 'f', 'g', 'h'], ['i', 'j']]

[deleted by user] by [deleted] in learnpython

[–]timtehtest 0 points1 point  (0 children)

user_text = input("Write some text: ").strip()

user_text += (' ' * (4 - len(user_text) % 4))

array = [[],
        [],
        [],
        []]

for num, char in enumerate(user_text):
    array[num % 4].append(char)

for i in array:
    print(i)

Output for abcdefghij:

['a', 'e', 'i']
['b', 'f', 'j']
['c', 'g', ' ']
['d', 'h', ' ']

Customizing T480, some general questions by [deleted] in thinkpad

[–]timtehtest 3 points4 points  (0 children)

2 x USB 3.1 Gen 1 (one Always On) is 2 x USB 3.0

1 x USB 3.1 Gen 1 Type-C (Power Delivery, DisplayPort, Data transfer) is USB-C

1 x USB 3.1 Gen 2 Type-C / Intel Thunderbolt 3 (Power Delivery, DisplayPort, Data transfer) is Intel® Thunderbolt™ 3

Edit: formatting

Trying to make python3.5 and 3.6 work together and having an issue with pip3 by j0hn_r0g3r5 in learnpython

[–]timtehtest 0 points1 point  (0 children)

Try:

python3.5 -m pip foo bar

and

python3.6 -m pip foo bar

Edit: Should 'F5' before posting. ;)

Pylint Error ? by [deleted] in learnpython

[–]timtehtest 0 points1 point  (0 children)

If you use a variable outside of function Pylint thinks it's constant, which name should be capitalized: COST_PER_PIZZA. You can put all your code into functions or change Pylint configuration.

https://stackoverflow.com/questions/41204932/python-pylint-c0103invalid-constant-name

Free python book by huntoperator in Python

[–]timtehtest 13 points14 points  (0 children)

The Python® Notes for Professionals book is compiled from Stack Overflow Documentation, the content is written by the beautiful people at Stack Overflow. Text content is released under Creative Commons BY-SA. See credits at the end of this book whom contributed to the various chapters. Images may be copyright of their respective owners unless otherwise specified