font size of Squirrel SQL too small - squirrel-sql

The size of the font to enter the SQL is too small. What is the way to increase the size of the font to type the SQL ?
In 'global options' there is a possibility to increase the size of the fonts. But this has no impact on the size of the text to enter the SQL.

In the SquirreL SQL Client Version 3.7.1 you can able to increase the font size in the SQL Entry area.
Below is the procedure:
Go to File --> New Session Properties
Navigate to SQL Tab and then in the below you have the option
called SQL Entry Area where you can increase your font size as
you needed. Click here to see the screenshot

I'm assuming you're using Windows 8.1 like I am. It seems some combination of 8.1, high DPI monitors, and Swing don't play well together. My fix was to edit the squirrel-sql.bat file and add the following java options right after the existing java option
-Dswing.plaf.metal.controlFont=Tahoma-18 -Dswing.plaf.metal.userFont=Tahoma-18
For reference, the complete line is as follows:
start "SQuirreL SQL Client" /B "%LOCAL_JAVA%" -Xmx256m -Dsun.java2d.noddraw=true -Dswing.plaf.metal.controlFont=Tahoma-18 -Dswing.plaf.metal.userFont=Tahoma-18 -cp %SQUIRREL_CP% -splash:"%SQUIRREL_SQL_HOME%/icons/splash.jpg" net.sourceforge.squirrel_sql.client.Main %TMP_PARMS%
EDIT: The above will increase the size for everything except the SQL entry field. For this, go to File->New Session Properties->SQL->SQL Entry Area

Additional java switches on top of the ones given by James will help with other sections of the UI which shows small font.
-Dswing.plaf.metal.titleFont=Tahoma-18
-Dswing.plaf.metal.menuFont=Tahoma-18
-Dswing.plaf.metal.systemFont=Tahoma-18
-Dswing.plaf.metal.smallFont=Tahoma-18
start.bat entry :
start "SQuirreL SQL Client" /B "%LOCAL_JAVA%" -Dsun.awt.nopixfmt=true -Dsun.java2d.noddraw=true -Dswing.plaf.metal.controlFont=Tahoma-18 -Dswing.plaf.metal.userFont=Tahoma-18 -Dswing.plaf.metal.titleFont=Tahoma-18 -Dswing.plaf.metal.menuFont=Tahoma-18 -Dswing.plaf.metal.systemFont=Tahoma-18 -Dswing.plaf.metal.smallFont=Tahoma-18 -cp %SQUIRREL_CP% -splash:"%SQUIRREL_SQL_HOME%/icons/splash.jpg" net.sourceforge.squirrel_sql.client.Main %TMP_PARMS%
High DPI discussion on stackexchange

Here is what worked for me (Windows 10 64-bit, SQuirrel 3.9.1, jrw1.8.0_211)
At the bottom of C:\Program Files\squirrel-sql-3.9.1\squirrel-sql.bat, I changed the start command to this:
start "SQuirreL SQL Client" /B "%LOCAL_JAVA%"^
-Dsun.awt.nopixfmt=true -Dsun.java2d.noddraw=true^
-Dswing.plaf.metal.controlFont=Tahoma-18^
-Dswing.plaf.metal.userFont=Tahoma-18^
-Dswing.plaf.metal.titleFont=Tahoma-18^
-Dswing.plaf.metal.menuFont=Tahoma-18^
-Dswing.plaf.metal.systemFont=Tahoma-18^
-Dswing.plaf.metal.smallFont=Tahoma-18^
-cp %CP%^
-splash:"%SQUIRREL_SQL_HOME%/icons/splash.jpg"^
net.sourceforge.squirrel_sql.client.Main %TMP_PARMS%
Note, that the ^ must be at the very end of the line (no spaces after it!)

There is Font tab in the Global Preferences , there will be Four tabs, increase the Font size there, I selected Arial size 28, now my squirrel display font size large enough, so my eyes wont get strained.
File ==> Global Preferences ==> Fonts

In the SquirreL SQL Client Version 3.9.0:

Go to File -> New Session Properties -> SQL tab -> SQL Entry Area -> Choose FONT accordingly.
Refer to the image below:

Related

SAS DM - Getting Rid of the Results Tab

I'm looking for a way to get rid of the Results Tab, keeping only the Explorer Tab which can itself display the results. However, WSAVE ALL doesn't "remember" that configuration detail, and even when I manually close it, it keeps showing up again every time I run a procedure which generates results.
Thanks
After struggling for a while for the WSAVE ALL command, which I cannot get to work. I read the second part of your question. Results can be disabled by altering the Output Delivery System (ODS) settings in SAS. ODS is too broad to cover in full here, but the two statements to run are:
ods results off; /* Stops results being generated */
ods listing; /* Turns on the old-style listing so you can see the output */
/* print a sample */
proc print data=sashelp.class;
run;
To automate this for your session, you can add these statements to your autoexec.sas file, or there may be options you can add to the sasv9.cfg files, find the locations for these by running:
%put %sysfunc(getoption(config));
At any point you can reverse the behaviour by running:
ods results;
ods listing off;
I found what seems to be a durable solution. Here are the steps to follow:
Activate the Explorer pane. Go to Options > Tools > Explorer... and under the General tab, make sure Results is checked (by default, it is not).
In your autoexec.sas file, inclure the following line:
dm "odsresults; cancel";
Restart SAS
Et voilà!
The Results pane is now gone, and the results will appear as usual in a Results Viewer window with the items listed directly in the Explorer Window (turn on the tree view to easily access both your libraries and the output items. Use WSAVE ALL in the commands window for SAS to remember that configuration).
Note 1: Under Windows, the autoexec.sas file can be saved in the %userprofile% directory.
Note 2: To get rid of the obsolete Output window when using only ODS-style outputs, add this line to autoexec.sas:
dm "Output; winclose";

How to set empty file description using AutoItWrapper?

When I add this wrapper directive it changes the description field of my executable. But when I leave it empty (or omit the directive) its value defaults to Aut2Exe.
#AutoIt3Wrapper_Res_Description=
How can I change this behavior? Is there a parameter for AutoIt3Wrapper.exe that leaves it empty? This is the compile command executed by SciTE:
"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /in "C:\...\myscript.au3" /console
Looking at the AutoIt3Wrapper source code, which is provided in the installation, the following line (line 2326 in my installation) reads:
If $INP_Description = "" Then $INP_Description = FileGetVersion($AutoItBin, "FileDescription")
I believe that to be the source of the Aut2Exe description.
How to force the description to be blank is a bit trickier. The quick and easy hack is to have a script that runs after compilation that removes the description, I usually have reshacker somewhere to hand for tasks like this.
Long term, I will put the issue to the developer, as it seems strange to set a description when the user has explicitly left it blank.

Can you delete a range of lines in sublime text2?

Say I want to delete lines 5000 - 9000 in a large data file. Can I delete a range of lines easily?
Check out the LineJumper plugin. It's marked in Package Control as ST3-only, but it should work fine with ST2, only you'll have to git clone the repository into your Packages directory. Once you've done that, open Packages/LineJumper/LineJumper.sublime-settings and edit the "number_of_lines" argument to the number of lines you want to select (in this case, 4000). Save the file, then hit CtrlG and type in 5000 to jump to line 5000. Next, hit AltShift↓ to jump down 4000 lines, selecting them all. Finally, hit Delete and you're all set. The plugin could probably be modified to open a popup to enter the lines to be selected, if you don't want to edit the .sublime-settings file every time you want to select a large block of text, but I'll leave that as an exercise for the reader :)
The manual answer with no plugins.
Cut from the first location (e.g line 5000) to the end of the file
Paste this into another/new window
Find the second location (e.g. line 4000 (=9000-5000))
Cut from here to the start of the file
Cut everything that is left and paste it back in the first file at the end.
This is easier than scrolling from start to finish of large sections you want to remove, and the effort does not depend on the size you want to remove (but it's still not fully satisfying...).

How can I define custom colors for use in ZSH prompt?

I'm having some difficulty configuring my zsh prompt. Specifically I would like the font to have the color defined by the hex code: #87afdf
Currently, I've set up the prompt as follows:
PROMPT='%B[%d]
➞ %b'
I've attempted to add colors in the following way:
autoload -U colors && colors
PROMPT='%{$fg[#87afdf]%}%B[%d]
➞ %b%{$reset_color%}'
But this only gives me the following gibberish:
$fg[#87afdf][/Users/gregory]
➞ $reset_color
Any ideas on how to proceed would be very much appreciated.
You have to use a 256-color palette. You can see the numerical values for each of the 256 colors in ZSH using the following command:
for code in {000..255}; do print -P -- "$code: %F{$code}Color%f"; done
The same for bash:
for code in {0..255}; do echo -e "\e[38;05;${code}m $code: Color"; done
Solution for Oh-My-Zsh users
How to print available colors
As already mentioned you have to use a 256-color palette.
The easiest way to see which colors are available is to use the following command (as ZSH uses spectrum underneath):
spectrum_ls
it will print all available colors
...
How to use color in Oh-my-zsh theme
To use color in your theme you have to write it like $FG[<0-255>] for example $FG[172]
Upper case might be important there as $fg[172] does not work on my console!
Possible problem
Your terminal might support only 8 colors instead of 256. If it is true you will not see all the colors after executing spectrum_ls.
In such case you have to configure your terminal to support 256 colors.
Source
https://dev.to/yujinyuz/custom-colors-in-oh-my-zsh-themes-4h13
Unless you're using a very unusual terminal, you can't use just any color combination that you would like. Standard terminals are limited to (at best) a 256-color palette.
The colors function which ships with zsh is simply to allow the colors from the old 16-color palette to be referred to by name, it will not help in using colors outside of that range.
There is a simple script available which will setup $FG and $BG arrays to provide a way to use colors from the 256-color palette by number, but without needing to deal with the escape sequences necessary for the terminal to deal with those.

MySQL the command line and pagers

I cant find anything about this from searching here.
I use mysql on the command line at work and I work with fairly large tables so I set the mysql pager allowing a more readable result if I run a query, that returns 1000's of results. I use the command below to set the pager.
\P less -Sin
This suits my needs but has left me wondering if there are any more pager styles that mysql uses on the command line.
The MySQL client just passes its output to whatever command you specify with \P (for "Pager").
-Sin are commandline switches to the program less. From man less:
-i Causes searches to ignore case
-n Suppresses line numbers
-S Causes lines longer than the screen width to be chopped rather than folded.
For more options of the MySQL client, see reference.
mysql> pager less
PAGER set to 'less'
You might want to try pspg:
Unix pager designed for work with tables. Designed for PostgreSQL, but MySQL is supported too.
Main target
possibility to freeze first few rows, first few columns
possibility to use fancy colors - like mcview or FoxPro
In action:
This post is old, but still very helpful.
You can set the pager to whatever you want, including a script that parses all output before feeding it back to you. The examples there include using an add-on tool that makes EXPLAIN output more readable.
Also note that to turn off this functionality and return to normal stdout the command is nopager.
If you don't like less you can use more :)
\P more