Unable to enter correct characters in IntelliJ - intellij-idea

I want to start developing apps using IntelliJ IDE. I have downloaded and installed it with no problem.
Now, IntelliJ does the following when I enter on the keyboard:
; : button = $
ctrl + shift = ^
shift + "\' = #
, button = ?
. button = /
As a coder I will need a . (dot) and/or semicolon, in which IntelliJ does not respond correctly to what I am typing.

Related

after installing magnus-ui in expo app getting error "No Space between hexadecimal literal and identifier"

expo go giving me this error
No Space between hexadecimal literal and identifier
No Stack
I am facing same problem here but it just happen in Android, iOS is running with no problem
-- EDIT --
I just found the problem when I tried to run the project on browser.
So these are the steps for you reproduce my aproach:
Run:
expo start
Choose "Run in web browser"
You will face a error in "color" module:
Access the module directory and file:
node_modules/color/index.js
1st problem is in line 66:
change this:
object &= 0xFF_FF_FF;
to this:
object &= 0xFFFFFF;
2nd problem is in the line 258:
change this:
`lum[i] = (chan <= 0.039_28) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;``
to this:
lum[i] = (chan <= 0.03928) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
So this solved my problem just creating a issue here:
https://github.com/Qix-/color/
-- UPDATE --
The right way to fix that is downgrade color plugin from 4.0.0 to latest release, in my case today (07/28) is 3.2.1 so run:
yarn remove color
yarn add color#3.2.1

Error in parse(text = x, srcfile = src): <text>:13:6: unexpected symbol 12: 13: This R ^

I am trying to create and run a simple .Rmd (RMarkdown file) on Kaggle.
When I create a new RMarkdown on Kaggle, when I click 'Run All' to run the Rmd code, I see:
Your Kernel is now running in the cloud.
Enter some code at the bottom of this console and press [Enter].
Session is starting...
Session started.
ERROR
Error in parse(text = x, srcfile = src): <text>:13:6: unexpected symbol 12: 13: This R ^
How can I successfully run a sample RMarkdown on Kaggle?
Notes
Similar problem outlined 10 days ago here.
The comment isn't helpful (it's just a shortcut instead of pressing the 'Run All' button)
Problem also seems to be mentioned 2 days ago here
Reproducible example
When creating a new RMarkdown on Kaggle, I do the following.
From the kaggle.com homepage, click on 'Code' on the left hand side, then on 'New Notebook':
When I do this, it is immediately clear that the interpreter doesn't lint the code correctly (look at the colours):
For reference, the language is 'RMarkdown':
And the editor type is 'Script':
And when I click 'Run All':
Click 'Save Version' (top right of screen)
That will run (i.e. 'knit') your RMarkdown code (it may take a moment). A link to the knitted document pop up in the bottom left of screen. It's that easy!

How to input a check mark into IDEA only by using keyboard instead copying from website? For example the check mark is ✓ or ✗

I get the ✓ and ✗ from website. I want to input them only by keyboard. How I deal with it?
You could just use Unicode hex value inside your println statement:
System.out.println(se.execute() == 1 +2 * (9 - 5) ? "\u2713" : "\u2717");
\u2713 is ✓
\u2717 is ✗
Also, It's possible to put such types of symbols by using keyboard shortcuts:
E.g. in Windows: Alt +2713 and Alt +2717

Visual Studio Code shortcut equivalent to Webstorm / IntelliJ Extend Selection

I've grown accustomed to Webstorm's "Extend Selection" shortcut which grows the selection to the next special character.
Example (if the cursor is somewhere in the "someObjectProperty"and the shortcut is activated):
var foo = someObject.someObjectProperty.subProperty;
<-- selection 1 -->
<------ selection 2 --------->
<-------------- selection 3 ------------>
Now that I've switched to Visual Studio Code, the closest to that type of shortcut I've found is 'editor.action.smartSelect.grow' shortcut
However, while it is similar, it's not the same. Using the same example (if the cursor is somewhere in the "someObjectProperty" and the shortcut is activated):
var foo = someObject.someObjectProperty.subProperty;
<---------------- selection 1 -------------->
<------------------- selection 2 ------------------>
Is there anything similar in VS Code as the Extend Selection in WebStorm as described above?
While there is no such shortcut/command that comes with VS Code there is third party extension that can be easily installed:
ext install expand-region
More info on the expand-region command:
https://marketplace.visualstudio.com/items?itemName=letrieu.expand-region
There's still no such thing, the third party plugins are nowhere near what Webstorm/Idea does, here's an incomplete visual gap analysis on how they can't be mentioned on the same page.
The Feature you're looking for is called shrink-expand-selection.
It works by using:
ALT + SHIFT + → to select the next sections
ALT + SHIFT + ← to select the previous sections
It works as follows for your example (imagine the cursor being on the j of someObjectProperty):
var foo = someObject.someObjectProperty.subProperty;
<-S1-> (This section exists because of camelCase)
<- S2 ->
<- S3 ->
<- S4 ->
<- S5 ->
For reference:
https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_shrink-expand-selection

Android MonkeyRunner unable to enter text

I recently started using MonkeyRunner to test the UI of my Android application (I am also using Espresso but wanted to play around with MonkeyRunner). The problem that I am having is that I am unable to enter text into EditText fields using the automation script.
The script navigates through my app perfectly but it doesn't seem to actually enter any text on call of the MonkeyRunner.type() command.
Please find my script below.
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
from com.android.monkeyrunner.easy import EasyMonkeyDevice, By
import commands
import sys
import os
# starting the application and test
print "Starting the monkeyrunner script"
# connection to the current device, and return a MonkeyDevice object
device = MonkeyRunner.waitForConnection()
easy_device = EasyMonkeyDevice(device)
apk_path = device.shell('pm path com.mysample
if apk_path.startswith('package:'):
print "application installed."
else:
print "not installed, install APK"
device.installPackage('/MySample/MySample.apk')')
package ="com.mysample"
activity = ".SampleActivity"
print "Package: " + package + "Activity: " + activity
print "starting application...."
device.startActivity(component=package + '/' + activity)
print "...component started"
device.touch(205,361, "DOWN_AND_UP")
device.type("This is sample text")
MonkeyRunner.sleep(1)
result = device.takeSnapshot()
result.writeToFile("images/testimage.png",'png')
As you can see from the script above the text This is sample text should be placed in the EditText box. Both the emulator and screenshot that is taken show no text in the text field.
Am I missing a step or just doing something incorrectly?
Any help would be greatly appreciated!
I would rather use AndroidViewClient/culebra to simplify the task.
Basically, you can connect your device with adb and then run
culebra -VC -d on -t on -o myscript.py
The script obtains references to all of the visible Views. Edit the script and add at the end
no_id10.type('This is sample text')
no_id10.writeImageToFile('/tmp/image.png')
No need to worry about View coordinates, no need to touch and type, no need to add sleeps, etc.
NOTE: this is using no_id10 as an example, the id for your EditText could be different
First of all, I would not use the MonkeyRunner.sleep command, but I would rather use the time package and the time.sleep command. Just import the package
import time
and you should be good to go.
Moreover, I suggest you should wait some time between device.touch and device.type. Try with
device.touch(205,361, "DOWN_AND_UP")
time.sleep(1)
device.type("This is sample text")