How do you disable orientdb console string truncating / shotening? - orientdb

I'm playing around with OrientDB and would like to stop the console from truncating the strings:
+----+-------+---------+--------+------------------+------------------+----------------------------------------------------+
|# |#RID |#CLASS |version |last_updated |name |attributes |
+----+-------+---------+--------+------------------+------------------+----------------------------------------------------+
|0 |#59:229|docker |6.8.10 |2021-03-19 17:3...|datastax/dse-se...|{docker={imageName=datastax/dse-server, imageTag=...|
+----+-------+---------+--------+------------------+------------------+----------------------------------------------------+
I'd like to actually see the entire record, not just the truncated version of it. Is this possible?

You can always increase the size of the "width" property.
SET WIDTH = 1000

I've managed to find something close enough to what I was looking for.
If you use the #RID of the record you are interested in - you can actually do this:
load record 59:229
+----+------------+--------------------------------------------------+
|# |NAME |VALUE |
+----+------------+--------------------------------------------------+
|0 |version |#6.8.10 |
|1 |last_updated|2021-03-19 17:37:35 |
|2 |attributes |[{imageName=datastax/dse-server, imageTag=6.8.10}]|
|4 |name |datastax/dse-server |
|5 |version |6.8.10 |
+----+------------+--------------------------------------------------+
If that's still not enough - then you can use display record or even display raw record to get the most details.
I'd still prefer it if I could use the tabular view (i.e. SELECT FROM ..), but I couldn't find a way to do it. If anybody finds it - feel free to answer and I'll mark it as the accepted answer.

Related

Failed to convert Jbehave named parameters without delemeters

We are using Serenity with Jbehave for out automation stories, and we have recently upgraded our version to Serenity(2.2.1) and jbejave(1.46.0). Jbehave-core updated from 4.1.3 to 4.4. After the update i am facing an issue with examples table. it is forcing to use delimiter for the step table provided which is taken from story Examples.
This worked previously and got expected values into table
Scenario: Verify scenario
Meta:
Given modal should contains the next content:
{transformer=FROM_LANDSCAPE}
| modalTitle | expectedTitle1 |
| modalFooterTitle | expectedFooterTitle |
Examples:
{transformer=FROM_LANDSCAPE}
| expectedTitle1 | this is first expected title |
| expectedFooterTitle | This is expected footer text |
Now i have to use delimiter to get my expected content into table as below
Given product modal should contains the next content:
{transformer=FROM_LANDSCAPE}
| modalTitle | <expectedTitle1> |
| modalFooterTitle | <expectedFooterTitle> |
Examples:
{transformer=FROM_LANDSCAPE}
| expectedTitle1 | this is first expected title |
| expectedFooterTitle | This is expected footer text |
Also tried with configuration steps like ParameterControls().useDelimiterNamedParameters(false) but didn't worked. We have already implemented thousands of stories and it is hard to replace storied with delimiters. is there any work around to solve my problem?

How to get the output of groupby as below in spark scala

After running groupby i got the result as
+--------------------+-----+
| City|count|
+--------------------+-----+
| Tyler| 2|
| Fairbanks| 1|
| Springfield| 12|
| Charleston| 7|
| Corona| 2|
I want the same result as below
Tyler : 2
Fairbanks : 1
Springfield : 12
I have to do it in scala spark.. not pysaprk
This question is a bit unclear. Please add more data like how your are printing the first output (putting the code will help).
Rest, based on output I can think of you are just taking some values from RDD and printing on console with default println. If thats the case, try mapping the data based on your output requirement and then use .mkstring("\n") over it. So pseudo code will look like
collectedResult.map(x=>s"${x._1} : ${x._2}").mkString("\n")
Note: this is just an example may not run just like that in editor. Also if the size of result is too big, this approach is not at all recommended.

How to re-align column of text table in emacs?

When I insert a table using M-x table-insert
I get the following table:
+-----+-----+-----+
| | | |
+-----+-----+-----+
| | | |
+-----+-----+-----+
| | | |
+-----+-----+-----+
But When I add content the | become disaligned like this
+-----+-----+-----+
| content | | |
+-----+-----+-----+
| | | |
+-----+-----+-----+
| | | |
+-----+-----+-----+
How do you realign the column?
When I press enter it just creates that:
+-----+-----+-----+
| contecnt | | |
| | | |
+-----+-----+-----+
| | | |
+-----+-----+-----+
| | | |
+-----+-----+-----+
You enter the corresponding cell and start editing the text with C-c' it opens the edit mode and automatically wraps the text accordingly. Once done type C-c' again and you're back in the nicely formated table.
The table should expand as needed for words longer than the width of the column, and the entire column should widen when this happens. Multiple words will wrap appropriately when the width is reached if there is space to break the line. Remember to use tab to move from cell to cell in the table.
Column width can be changed manually with M-x table-widen-cell and M-x table-narrow-cell.
Sometimes Emacs gets confused for some reason, and something like what you describe happens. One way to fix it is to exit table mode with M-x table-unrecognize-table, manually edit the table, then do M-x table-recognize-table. It's not ideal, but sometimes is easiest.
Yes, org-mode table and table-mode table functionality are interfering with one another and preventing the table from realigning properly. I'm not sure how to fix that, but you mentioned in a comment that you are using table-mode specifically because you want multi-lined cells in the table.
I suggest that instead you use an org table (with M-x org-table-create) and then you can split long lines over multiple lines within the same cell by calling M-x org-table-wrap-region at the point where you want the split.
Just press TAB within the table and it will autoalign.

Making applications for different monitor sizes

I have been developing an application with the following layout (greatly simplified):
+----------------------------------+
| +----------------+ |
| Main | | Info |
| | Interactive | |
| Actions | | And |
| | Graph | |
| Go | | Forms |
| | (Resizable) | |
| Here | | |
| +----------------+ |
+----------------------------------+
With a screen resolution of 1440x900. There are some minimum widths set for buttons etc to make them more beautiful (so for example the label inside has some distance from the button borders). Now if I resize the window to about 800x600, it becomes like this:
+----------------------+
| +----+ |
| Main | | Info |
| Actions | | And |
| | | |
| Go | | Forms |
| Here | | |
| +----+ |
+----------------------+
Which is not so beautiful. The reason the middle panel gets so small is that the labels on either sides cannot be shrunk.
The question is, how can I tell gtk to scale everything (e.g. images, fonts etc) inside a window?
If such a functionality doesn't exist, what choice do I have for making everything inside the window (or at least the font sizes) smaller or bigger, without having to manually change every widget?
Gtk doesn't allow you to "scale" anything automatically in a window. It would also be a bad idea, as you don't know how little the window will be (not only because of the screen resolution, but because of the user manually resizing the window).
I'd suggest you to redesign your layout. It's complicated to suggest a solution without a real screenshot, but maybe the Main Actions could be replaced in the top part of the window.
Use a toolbar with your main actions, and put other actions in a menu bar. This will give more space to the interactive graph. Info and forms, if not required at every moment, may be in a tabbed view, or in a popup. Hard to tell more without a screenshot.

Multiple SQLite Queries on iOS

I have more than 3 views. My database looks like this:
Category:
CatID | CatTitle
----------------
1 | XYZ
2 | Sample
Content:
ItemID | ItemCatID | ItemText | ItemText2 | ItemText3 | ItemText4
-----------------------------------------------------------------
1 | 1 | Test | Bla | Sample | MoreContent
2 | 1 | Test2 | BlaBla | Sample2 | Other Content
3 | 2 | Test3 | BlaBla2 | Sample3 | Other Content2
I want a view where first page category, second page list (ItemText), third page detail.
I'm not sure how to go about accomplishing that. If I use JOIN should I define "sqlite3_stmt *compiledStatement" in triple?
I think it can be done with 'For', "get parent,child" (like a cursor in java)?
Any advice welcome.
I'm not sure what you want.
Can you be more specific?
I can give you two tips though, first SQLite does not support stored procedures and has a very limited support for PL/SQL:http://www.sqlite.org/whentouse.html
if you REALLY MUST use it I suggest looking at this, I never tried it but it may work:
http://chriswolf.heroku.com/articles/2011/01/26/adding-stored-procedures-to-sqlite
Second, you usually wanna use a Wrapper around SQLite c functions so you worry about the SQL itself more and less about the c functions, examples:
Best Cocoa/Objective-C Wrapper Library for SQLite on iPhone
Hope this helps