Navigate to sql position - sql

IntelliJ pro comes with an embedded SQL editor.
Sometimes, I type a wrong request and the database returns an error and the corresponding SQL position.
Example :
[2017-01-02 16:32:35] [42P01] ERROR: missing FROM-clause entry for table "customer"
Position : 516
Problem : for readability reasons, the request is written on multiple lines, making it harder to find the position 516.
Up to now, the only solution I got is to delete the \n characters in order to have the request on only one line then navigate to the 516th column.
But I guess there is a better way, like a fancy keyboard shortcut?

It's been a while you asked but I'll answer anyway to help others:
Download "Character Position" plug-in from here:
https://plugins.jetbrains.com/plugin/10334-character-position
Install plugin & Restart IntelliJ
Character position will be shown in the bottom-left corner of the editor.

In my case I press F2 and cursor go there.

The current caret position (line number and offset) is displayed in the Status Bar. You can click it to open the Go To Line dialog box.
Change the second number to the needed position of your character and will be navigated directly.

Related

Unable to identify Web object in UFT for webpage?

SystemUtil.Run "iexplore.exe", "https://www.jetairways.com/EN/IN/Home.aspx"
wait (7)
Set traverse=Browser("Jet Airways: Airlines").Page("Jet Airways: Airlines")
traverse.WebEdit("placeholder:=From").Click
traverse.Link("acc_name:= This link will open Popup window for airport selection. ").WebElement("innerhtml:=All Airports","innertext:=All Airports","outerhtml:=<strong>All Airports </strong>").Click
traverse.WebTabStrip("html id:=ToC").Link("innerhtml:=Africa","innertext:=Africa").Click
Set oDesc = Description.Create
oDesc( "micclass" ).value = "Link"
oDesc( "href" ).value = "https://www.jetairways.com/EN/IN/Home.aspx#"
Set rc=Browser("creationtime:=0").Page("micClass:=page").ChildObjects(oDesc)
msgbox rc.count
UFT is not bale to identify the link, lets say, Johanesber or Port Elizabeth,etc
This is actually not working. Have tried many ways .
Can some one help me fix this?
The following code works for me, I cleaned up some of the spaces (and simplified the description a bit). I don't understand what you were trying to accomplish with the last lines of your script (counting the links).
I think the problem you were facing was probably to do with the fact that when you use descriptive programming (either inline with := or using a Description object), the values are used as regular expressions and not as plain strings. This means you have to escape regular expression characters (in this case ( and )) or else the values won't match.
Set traverse=Browser("Jet Airways: Airlines").Page("Jet Airways: Airlines")
traverse.WebEdit("placeholder:=From").Click
traverse.Link("acc_name:=This link will open Popup window for airport selection.").WebElement("html tag:=strong").Click
traverse.WebTabStrip("html id:=ToC").Link("innerhtml:=Africa","innertext:=Africa").Click
traverse.Link("innertext:=Port Elizabeth \(PLZ\)").Click ' Note \( and \)
Try to write the link object and the pop up window object in two different lines
traverse.Link("acc_name:= This link will open Popup window for airport selection. ")
traverse.WebElement("innerhtml:=All Airports","innertext:=All Airports","outerhtml:=<strong>All Airports </strong>").Click
also try to use Regex if the property values contains spaces or symbols.

Calabash-android: How do I read text which comes from an API?

I want to read the text which comes from API end, When I query (query("*")) it does not appear on the calabash-android console.
wait_for_text(text, timeout: 10) does not work either.
query "all * marked'Email field can not be empty'"
Calabash doesn't return results that are not visible by default. So if the error message is on the screen but just invisible, using the all operator should do the trick.
In android two different message can show in edit text field by using hint text and error text
if its hint text use this:
query("* id:'edit_text_id'", :hint)
if its error message use this:
query("* id:'edit_text_id'", :error)
Normally these kind of text messages won't show by querying -> query("*")

Is there a keyboard shortcut to select a column for editing in Atom editor?

Scenario
When editing a file in Atom Editor how do I select multiple lines where the same edit needs to be performed?
For example:
this.name = name;
this.age = age;
this.sound = sound;
needs to be transformed into:
that.name = name;
that.age = age;
that.sound = sound;
Imagine there are many of these lines, but we do not want to use a find-and-replace because it will change more than we need.
Question - Is there a Keyboard Shortcut for Column Selection?
Is there a sequence of keyboard shortcuts (preferably Mac) which we can use to:
a) select the initial word
b) select the "column" (that word on several lines)
then apply the change to several lines at once (in bulk)
I know how to do this in SublimeText:
http://sublime-text-unofficial-documentation.readthedocs.org/en/latest/editing/editing.html#column-selection but have tried many different key combinations without any luck in Atom and googling has proved fruitless...
There are several ways to achieve this:
Keyboard
You can enable column selection mode using Ctrl+Shift+↑/↓. This will allow you to extend the cursor to multiple rows. Once you have selected all rows, release the keys, and use the Delete key to remove the text you want to replace. Once you're done, press the Esc key to release the cursors.
Note: You will have to disable the Mission Control (key bindings) in OS X to use this key combo.
How to Disable Mission Control (conflicting) Key Bindings (Mac)
To do this open System Preferences > Mission Control
Locate the key bindings for Mission Control and Applications windows:
Disable the key bindings for these two:
More details here.
Mouse
If you install the Sublime Style Column Selection package, you can use Alt+Mouse to select the columns in question.
More details here.
Here is a plugin for Atom, just hold alt and be happy.
sublime-style-column-selection
With the cursor somewhere on the first "this", do Ctrl+D (OS X: command+D) three times. Then type "that".
Another option is to select the rows you want to edit. Then select "Split into Lines" from the "selection" menu. Then hit the home-key and start editing away in multi-cursor mode.
For me on Atom 1.7.4 it worked by adding below lines to my /Users/username/.atom/keymap.cson. Ofcourse I am using alt-shift-down as shortcuts.
'atom-workspace atom-text-editor:not([mini])':
'alt-shift-down': 'editor:add-selection-below'
Update: I could not configure both alt+shift+down and alt+shift+up at the same time. For now I am okay with alt+shift+down
On Windows 10, follow the following steps:
Press ctrl + alt together and use up/down arrow keys to expand the height of your now vertical cursor
Now use shift to select the columns to be deleted
press delete key to remove selected columns
click anywhere on document (without pressing ctrl/alt keys) to bring cursor back to normal 1 column height
I came by this thread, and the feature I was personally looking for was the multi-cursor extension.
I've tried all of the following potential solutions:
sublime-style-column-selection
multi-cursor
multi-cursor-plus
Adding the following text to /Users/$(whoami)/.atom/leymap.cson
'atom-workspace atom-text-editor:not([mini])':
'alt-down': 'editor:add-selection-below'
'alt-up': 'editor:add-selection-above'
The last solution is the one that worked best without interfering with any of my other normal workflows.

Remove the lines from a document

Goal:
Display the result without using any line between column and row
Problem:
I can't remove these line
The picture below is taken in preview mode
// Fullmetalboy
In the textbox properties for each cell of the grid, just make sure you set the BorderWidth property to 0.
Due to very limited info in the question maybe try Results-to-text instead of Results-to-grid?
I think that we need more info here... are you showing these results in a HTML page, through some dynamic language (ASP, PHP, Ruby)? or are you using reporting tools like Crystal Dynamics?
If you're doing in HTML, I guess the css rule border-collapse:collapse on the table would do the trick

haml editing on gEdit, any way to auto indent?

I'm using gEdit to edit haml files and the auto indenting feature seems to work when i'm writing one line after another, but when I go and clear out a exisiting element (a div or a class) the rest of the code below doesn't adjust itself. Suppose this is my code
.rightside
.container
%ul
%li hello
%li world
Now is there any way (using some plugin) through which when I delete .rightside, the rest of the code moves to left by two spaces? I now have to manually erase the space on every line. Thanks for your input.
You can select the block underneath the tag in question and use Shift-Tab or Ctrl-Shift-T to un-indent the text, assuming you have gedit set to use 2 spaces for tabs.
I have also installed the multi-edit plugin. This gives me multiple carets at which points any edits i make will be duplicated. In this case, I can just position the cursor at the top of that block, use the Ctrl-PgDown key shortcut to select the whole block, and then hit delete a couple times.