how activate autocompletion in Spyder - spyder

despite all flags in Tools-->Completion & Lights-->General are set to "on", editor completion wont work anyway.. neighter TAB nor Ctrl+Space activate the function.. system characteristics: Spyder 5.1.5|Python 3.9.7 64-bit | Qt 5.12.10 | PyQt5 5.12.3 | Windows 10. Any advise,plz ?
thks

Related

Kitty terminal needs harfbuzz

I compiled harfbuzz 7.0.0 on Ubuntu 22.04 ok.
I want to install latest kitty terminal (0.27.1) where harfbuzz >= 1.5 is required.
Kitty did not find harfbuzz 7.0.0
When I typed "make" for Kitty, i get a system exit telling me that harfbuzz >= 1.5 is required and that the version is not found.
I typed "export PKG_CONFIG_PATH=/home/user/harfbuzz/harfbuzz-7.0.0/src" since that is where 'harfbuzz.pc' resides.
harbuzz is still not found when typing 'make' in the kitty directory.
Alternative solution implemented (worked ok): "curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin"

How to get file path of most recently used simulator & most recently updated app on an iOS simulator in Bash?

It can be useful (or necessary) to know the full path on a mac of a given iOS simulator app. E.g., I have an iOS app with sqlite and want an easy way to build a connection string for debugging with DBeaver. Most of the time the criteria is "where on the mac is the path to the most recently run simulator & most recently built app on it?". How do I get this in bash?
# id of most recent device
device=$(ls -lt ~/Library/Developer/CoreSimulator/Devices/ | head -2 | tail -1 | awk 'NF{print $NF; exit}')
# id of most recent app
app=$(ls -lt ~/Library/Developer/CoreSimulator/Devices/"$device"/data/Containers/Data/Application | head -2 | tail -1 | awk 'NF{print $NF; exit}')
# the full path
fullpath=$(ls ~/Library/Developer/CoreSimulator/Devices/"$device"/data/Containers/Data/Application/"$app"/)
echo $fullpath

How to define a custom prompt in JShell from a script?

I am trying to create a custom JShell prompt and want to load it from a file directly.
But it is not showing the custom prompt when loading the set prompt from a file, but I am able to do it writing the same commands on JShell.
Ex:
I have a file 'jshell_prompt_file' contains these 3 lines to set the prompt:
/set mode genspice -quiet
/set prompt genspice "GetNetConnectivity > " "--------> "
/set feedback genspice
When I load the file while invoking JShell, it does not change the prompt.
1:31am [login1] ~/JSHELL 1023:-)jshell jshell_prompt_file
| Welcome to JShell -- Version 13.0.2
| For an introduction type: /help intro
jshell>
But when I copy-paste the same command to set feedback, then it changes it
2:53am [login1] ~/JSHELL 1034:-)jshell jshell_prompt_file
| Welcome to JShell -- Version 13.0.2
| For an introduction type: /help intro
jshell> /set feedback genspice
GetNetConnectivity >
Can someone help me to achieve this without the user have to type it on command prompt? I want the first prompt to be the custom prompt.
The feedback mode need to be set with a specific JShell command line option : --feedback.
In your file jshell_prompt_file keep only the first two lines:
/set mode genspice -quiet
/set prompt genspice "GetNetConnectivity > " "--------> "
and run JShell with:
jshell jshell_prompt_file --feedback genspice

iOS emulator location for UITesting

I am trying to run my UITests on Continuous Integration server (I am using Bitrise). So in one of my UITests I have the following:
let myLocationPin = app.otherElements["My Location"]
self.expectation(for: exists, evaluatedWith: myLocationPin, handler: nil)
self.waitForExpectations(timeout: 20, handler: nil)
expect(myLocationPin.exists).to(beTrue())
expect(myLocationPin.isHittable).to(beTrue())
myLocationPin.tap()
It works well on my local machine but as soon as the tests is being ran on the CI server it fails. I have found out that the reason is for the failure is that the emulator that runs the test doesn't have any selected location. I have tried to add a GPX file, but that didn't work either. Any suggestions ?
Did you select location on your local machine from the dropdown list before run?
If it is the case then you won't be able to use the graphical UI to do it on bitrise, however locations can be selected per scheme.
You can follow this post to set location on your schemes:
Automating Xcode' Debug > Simulate Location command
Update:
If the method above didn't solved the issue, another solution would be:
To change location in the simulator itself, you will need to add a script step before your UITest including the following script:
# download set-simulator-location
brew install lyft/formulae/set-simulator-location
# run simulator
export IOS_SIMULATOR_UDID=`instruments -s devices | grep "iPhone 6 (10.3) \[" | awk -F '[ ]' '{print $4}' | awk -F '[\[]' '{print $2}' | sed 's/.$//'`
echo $IOS_SIMULATOR_UDID
open -a "simulator" --args -CurrentDeviceUDID $IOS_SIMULATOR_UDID
# wait simulator to start fully
sleep 15
# set location
set-simulator-location -q London
Don't forget to change iPhone 6 (10.3) to the simulator you need and London to your own location, with -c flag you can set coordinates as well.
For more info about set-simulator-location visit: set-simulator-location
If you want custom location in your simulator then Select simulator and follor these two steps.
and change location

After "cordova run ios" terminal does not echo keyboard input

Using Cordova 4.1.2. After successfully running the project on an iPad using:
cordova run ios
and exiting LLDB using kill or safequit commands the terminal window will no longer echo keyboard input.
Is there a shell command I can enter to restore normal function of the terminal window? Currently I have to exit the terminal and start a new one after testing my cordova application.
It appears that one of the scripts being run by the cordova run ios is turning off terminal echo. Terminal settings before:
~>stty
speed 9600 baud;
lflags: echoe echoke echoctl pendin
iflags: iutf8
oflags: -oxtabs
cflags: cs8 -parenb
And after:
speed 9600 baud;
lflags: -icanon -iexten -echo echoe echoke echoctl
iflags: inlcr iutf8
oflags: -oxtabs
cflags: cs8 -parenb
dsusp eof lnext reprint status werase
<undef> <undef> <undef> <undef> <undef> <undef>
I have been able to work around this issue by carefully typing the following after LLDB exits to restore keyboard echo:
stty echo

Resources