I export my matrix (one column) with following:
putexcel set exc.xlsx , replace sheet(primo)
putexcel B2=matrix(P3, names)
and it creates an Excel file without problems. However, if I want to format it, with for example:
putexcel (B3:C3), bold border(bottom)
I get error "198 option not allowed"... I work in Stata 13.1. How to fix this?
Excel cell formatting was introduced to Stata in version 14. The putexcel command works in Stata 13, but does not allow you to make any formatting changes. See the official Stata 14 release announcement here:
http://www.stata.com/new-in-stata/
and here specifically for cell formatting:
http://www.stata.com/new-in-stata/excel-cell-formatting/
Related
I need to add a watch in hexadecimal format in CLion.
ltoa(variable, 16) doesn't work, at least, on my system.
In Java/Python, I can have a workaround: write a custom toString()/__str__ for my class and have it displayed the way I need. gdb has p/x. How do I do it in CLion?
Edit: ltoa(variable, 16) works if I define ltoa in my code, as it's not always present in standard library.
set output-radix 16
You can set this as a default option in a file called .gdbinit, which you can put in your home directory, or the working directory from which you start GDB (project root, for instance).
They added hex view as an experimental feature: Hexadecimal view
To enable:
Invoke the Maintenance popup: press Ctrl+Alt+Shift+/, or call Help | Find Action and search for Maintenance. Choose Experimental features.
Select the cidr.debugger.value.numberFormatting.hex checkbox
Go to Settings / Preferences | Build, Execution, Deployment | Debugger | Data Views | C/C++ and set the checkbox Show hex values for numbers. Choose to have hexadecimal values displayed instead or alongside the original values.
Now the hexadecimal formatting is shown both in the Variables pane of the Debug tool window and in the editor's inline variables view.
...after refining the formulation, I see it.
I wrote my own char *lltoa(long long value, int radix) function. I can use it in watches now.
Update: in the respective feature request, Chris White found a workaround on OS X with lldb:
I decided to do a bit more digging and found a way to set lldb on OS X
to force HEX output for unsigned char data types:
type format add –format hex "unsigned char"
If you want to make this setting persistent you can also create a
.lldbinit file and add this command to it. Once you do this CLion
will display this data type in HEX format.
This makes ALL the variables of this type display in hex.
Update 2: My first workaround is pretty dirty, here's a better one.
You can assign formats to more specific types. The debugger keeps track of type inheritance. So, adding a hex format to uint8_t will not affect unsigned char. You can fine-tune the displays.
You can assign formats to structs also. Here's an example from my .lldbinit:
type format add --format dec int32_t
# https://lldb.llvm.org/varformats.html
type summary add --summary-string "addr=${var.address} depth=${var.depth}" Position
I have used "Date, MM/DD/CCYY" under the <format> column in the RTF, when used in SQL developer I get proper output where CC is replaced with century(e.g. 03/07/2016 as per the format "MM/DD/CCYY" will be 03/07/2116 [21st century]) but in RTF I get the output as 03/07/CC16.
I also tried TO_CHAR(FIELD,’MM/DD/CCYY’) but its not working. Can you please let me know the issue, why the format is not workin
Try using small 'yy' instead of 'YY'.Hopefully you will get the output.
if you want to display concatenated with CC then use small yy,else you can do like this "MM/DD/CC/YY" Or "MM/DD/CCyy"
Please post if you have any other concerns.
I'm aware of data validations in Axlsx, however I'm not sure that's what I'm looking for here. I don't want to validate any data per se, but want any cell notices (in Excel here) to to be ignored.
For example, a notice I'm seeing on a couple of cells is:
The number in this cell is formatted as text or preceded by an apostrophe.
I tried doing something like this to select the whole worksheet and avoid showing any validation erros, however it didn't work for me:
sheet.add_data_validation("A1:H100", {
showErrorMessage: false
})
Can I use a Data validation to avoid displaying these notices in Excel?
This is one of the error checking options found in Excel Options ► Formulas ► Error checking rules ► Numbers formatted as text or preceded by an apostrophe. (or Alt+F,T,F then Alt+H)
To halt the display of these error control messages through VBA, run the following line of code.
Application.ErrorCheckingOptions.NumberAsText = False
How does Mathematica decide when to round numbers in its output? For example,
giving the input
250000.5
gives the output
2500001
While
25000.5
is indeed printed as
25000.5
N[] isn't helpful here either, I need to use NumberForm[] to get it to actually print 250000.5 as 250000.5
I'm a Mathematica newbie, and I'm sure its ridiculously easy to control this threshold for when it starts ignoring decimals in its output, but could somebody please point me in the right direction?
another option for you to try, you can go to options and change the default PrintPrecision from 6 to say 16, and now you will see that it will print what you typed above
after I changed that to 16 (click on the field itself, and type 16 into the field to replace the 6, and hit return), then
Nasser is correct that PrintPrecision is the right setting.
You have a number of options for its use. You can set it Globally or for the specific Notebook using the Options Inspector. You can also use it directly with Style:
Style[250000.5, PrintPrecision -> 10]
250000.5
You can set it temporarily for one session like this:
SetOptions[$FrontEndSession, PrintPrecision -> 10]
Finally you can set it using Style Sheets (select cell type Output).
In the default TraditionalForm and StandardForm output modes Mathematica only shows a certain number of most significant digits. You can use InputForm to get the full precision number.
I would like to insert a hash at the beginning of a selected block of text in VIM (ruby comment). I selected the lines in Visual Mode, but how do I perform the same operation to all lines?
You have two primary options:
Select in block visual mode (ctrl-v), then use I to insert the same thing along the left side of the entire block. Similarly A appends; see blockwise operators.
Select the lines in normal visual (v) or visual line (V) mode, then run the same command on all of them, for example s/^/# / or normal I#. Typing : while you have a visual selection automatically uses the visual selection as the line range (denoted by '<,'>).
While in visual mode do the
:'<,'>s/^/#
actually, '<,'> will be inserted automatically when you hit :.
You better use this.
COMMAND MODE with set number to see lines
:10,50s/^/#/g
First number before comma is the start line and second number after comma is the end line. Both are included.
Another question might have copied this question, so came here from How to Insert in Visual Block Mode.
Highly recommend that people take a look at this cheat sheet: http://www.rayninfo.co.uk/vimtips.html
As people do more research into VIM people will see a lot of %s/^/# with the % sign in front and by replacing the % sign with what pops up in Visual Block Mode with :'<,'> the symbols that pop up you are able to do insert, etc.
:'<,'>s/^/# (applied on selected lines only)
:%s/^/# (applied globally)
(sharing my two cents after researching how to add a hrefs' to different lines).