xref | Obsolete | TLS library
kandi X-RAY | xref Summary
kandi X-RAY | xref Summary
Obsolete
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of xref
xref Key Features
xref Examples and Code Snippets
Community Discussions
Trending Discussions on xref
QUESTION
I am learning to plot in r using plotly package. This chunk of code is provided on plotly website: enter link description here . I change colorscale = c('#FFE1A1', '#683531')
to let say colorscale = c('blue', 'red')
. shouldnt it change the scatter points colors? what part of the code is then supposed to change the color of the points gradiently. I know I can set it to pallette names or like "Greens", but I dont know how to give a range of gradient colors between two.
also as far as I looked, plotly 3d points can not have a sphere effecct. just wondering if I can mix it with rgl package who has.
library(plotly)
...ANSWER
Answered 2022-Mar-24 at 14:38I had the exact same issue today, you can create your scale into a list before using colorscale:
QUESTION
ANSWER
Answered 2022-Feb-13 at 17:33You can only do rename in a fully defined function. The grey background means that Ghidra didn't properly create a function at this point. You can see this also in a disassembly where you only have a label at this location. If you think this is a function you can type F and define a function. It should enable all the edit options.
QUESTION
So I am working on a challenge problem to find a vulnerability in a C program binary that allows a command to be executed by the program (using the effective UID in Linux).
I am really struggling to find how to do this with this particular program.
The disassembly of the function in question (main function):
...ANSWER
Answered 2022-Feb-02 at 10:16In regular C code, execlp("tidy","tidy","-asxml",0);
is incorrect as execlp()
expects a null pointer argument to mark the end of the argument list.
0
is a null pointer when used in a pointer context, which this is not. Yet on architectures where pointers have the same size and passing convention as int
, such as 32-bit linux, passing 0
or passing NULL
generate the same code, so sloppiness does not get punished.
In 64-bit mode, it would be incorrect to do so but you might get lucky with the x86_64 ABI and a 64-bit 0 value will be passed in this case.
In your own code, avoid such pitfalls and use NULL
or (char *)0
as the last argument for execlp()
. But on this listing, Ghidra produces code that generates the same assembly code, and in 32-bit mode, passing 0
or (char *)0
produce the same code, so no problem here.
In your context, execlp("tidy","tidy","-asxml",0);
shows another problem: it will look for an executable program with the name tidy
in the current PATH
and run this program as tidy
with a command line argument -asxml
. Since it changed the effective uid and gid, this is a problem if the program is setuid root because you can create a program named tidy
in a directory appearing in the PATH
variable before the system directories and this program will be run with the modified rights.
Another potential problem is the program does not check for failure of the system calls setreuid()
and setregid()
. Although these calls are unlikely to fail for the arguments passed, as documented in the manual pages, it is a grave security error to omit checking for a failure return from setreuid()
. In case of failure, the real and effective uid (or gid) is not changed and the process may fork and exec with root privileges.
QUESTION
I'm using itext 7 to sign pdf that has 2 signature fields and itext is printing
Error occurred while reading cross reference table. Cross reference table will be rebuilt.
The line that is causing error is
ANSWER
Answered 2022-Jan-26 at 11:38Eventually you posted the problematic cross reference table. What immediately catches one's eye are multiple entries of this kind:
QUESTION
I have an XML like:
...ANSWER
Answered 2022-Jan-23 at 23:09This is a solution I think with xml2 and a quick and verbose tidy verse approach.
Not always easy to have a compact code when importing nested xml data.
QUESTION
For example, we have dataset tips
with columns day
, total_bill
and sex
.
I want to visualize boxplots (x=day
, y=total_bill
,color=sex
). After that I want to calculate test and p-value in every day between female and male participants. If p-value < 0.05, I want to add asterisk. How could I change the code below?
In this example the comparison between different days without sex:
...ANSWER
Answered 2022-Jan-18 at 23:57When you are setting up the boxplots, using px.box
from plotly.express will be useful since you can pass the argument color="sex"
which will create two boxplots for each gender for every day. You'll also want to sort the tips
DataFrame so that the days of the week are plotted in order.
Then the add_pvalue_annotation
function can be modified so that we are calculating the p-value for the t-test between men and women within each day (instead of the t-tests between tips for different days of the week). You'll also want to the change the starting and ending point of the annotations so that they are between the Men and Women categories within the same day instead of between different days.
For the tips
dataset, I ran t-tests between the men and women within each day of the week (e.g. men and women on Thur, men and women on Fri...), and none of the p-values are below 0.05.
However, to demonstrate that add_pvalue_annotation
function will place annotations down correctly, I set the p-value threshold to 0.15 so that the p-value between men and women on Friday (p-value = 0.13
) will be annotated on the chart.
QUESTION
I have an Excel12v function using XLOPER to set some values on an Excel sheet. I can create XLLs fine as per Microsoft's XLL guide. I authored xladd-derive for Rust which enables this an allows returning scalars and ranges of values very simply.
However I would like, rather than return a value, to set a random cell to a value. There is xlSet function demonstrated below that does this and works fine.
...ANSWER
Answered 2022-Jan-17 at 14:22In general, Excel prevents spreadsheet functions from changing the values in cells. In effect, spreadsheet functions are given a read-only view of the values in the sheet.
This is the documentation for xlSet which states:
xlSet behaves as a Class 3 command-equivalent function; that is, it is available only inside a DLL when the DLL is called from an object, macro, menu, toolbar, shortcut key, or the Run button in the Macro dialog box (accessed from View tab on the ribbon starting in Excel 2007, and the Tools menu in earlier versions).
The reason for this is to prevent circular references or other actions that would break or confuse the calculation tree. Excel would struggle to determine dependencies between cells if a function in one cell could change other cells' contents.
Consider the hypothetical function AddOne()
which takes a number, adds one and uses this to set the cell immediately to the right via xlSet (or otherwise). What would happen if the formula in cell A1 were =AddOne(B1)
?
This Excel SDK reference gives more information. Namely:
Different Types of Functions
Excel4 and Excel12 distinguish among three classes of functions. The functions are classified according to the three states in which Excel might call the DLL.
Class 1 applies when the DLL is called from a worksheet as a result of recalculation.
Class 2 applies when the DLL is called from within a function macro or from a worksheet where it was registered with a number sign (#) in the type text.
Class 3 applies when a DLL is called from an object, macro, menu, toolbar, shortcut key, ExecuteExcel4Macro method, or the Tools/Macro/Run command. For more information, see Excel Commands, Functions, and States.
Only Class 3 functions can call xlSet.
So, in summary, the Excel application really doesn't want users to change one cell from a function call in another. As always, if you work hard enough you could probably achieve this (eg get the COM application object pointer by some method and modify the cell that way, or set up a callback to modify the cell asynchronously), but you might have unpredictable results.
QUESTION
I'm trying to extract assembly code from string but the regex was not right because i only can extract the opcodes not the instruction code
...ANSWER
Answered 2022-Jan-15 at 04:57You can try this:
QUESTION
In a plotly dash app, I am adding a text annotation with a clickable link that has a hash in it.
...ANSWER
Answered 2021-Dec-03 at 07:04It's a known bug: plotly/plotly.js#4084
Offending line in plotly.js:
QUESTION
I'm trying to use some simple I/O macros introduced in book "Assembler Language Programming for IBM Z System Servers" (Macros introduced in Appendix B section). But when I'm tryin to run the sample program, as soon as program reach the first macro system dump occurs. Also there is IEF686I in the output. I'm a student learning IBM assembly language and I'm not familiar with JCL and I don't know if I'm doing something wrong in it. Is the format of getting input and assigning the output area OK or I should do it in a different way? Here is the JCL:
...ANSWER
Answered 2021-Nov-18 at 11:15Something is wrong with your private macro PRINTOUT, or something is wrong with the stetup done before calling the macro in line 6 of your assembler source. I can't tell what it is, because you didn't provide details about that macro (others have suggested to rerun the job with PRINT GEN).
Lack of more information, this is my analysis of what happened:
This is the ABEND information printed in the joblog
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install xref
You can use xref like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page