How to enable Inkscape experimental LPE (Powerstroke) in Ubuntu - inkscape

I stumbled upon the Powerstroke experimental LPE for Inkscape and really want to try it out, but I cannot find the means to do it. This article states:
To test the LPE, Inkscape must be built with experimental LPE's enabled.
You have to build Inkscape with
#define LPE_ENABLE_TEST_EFFECTS
otherwise the LPE won't show in the LPE dialog.
(uncommenting line 9 in src/live_effects/effect.cpp will do the trick)
However, I cannot find the effect.cpp file, nor any other means to enable experimental LPEs. Does anybody know how to do this?

I think I was able to install the developer version of Inkscape which contains the latest experimentals. I just followed the description here: https://launchpad.net/~inkscape.dev/+archive/trunk

Related

Qt creator could not parse stddef.h --> incorrect code completion and highlighting

I am developing a QT GUI for my application using QT Creator (4.11.0).
Recently, our IT updated my OS to Ubuntu 20.04 (from 18.04) - maybe the error is related to that.
I have not touched to project in some month but yesterday wanted to continue developing it.
However, within the IDE there are now thousands of errors highlighted at almost every line of my code. (with highlighted I mean that there is this red background and a red dot beside the line number)
On the very top, it says:
Warning: The code model could not parse an included file, which might lead to incorrect code completion and highlighting, for example.
cstddef:50:10: fatal error: 'stddef.h' file not found
...
The errors that are listed in the IDE are very wired like:
type `QMainWindow`is not a direct or virtual base of `MainWindow` (my class is called `MainWindow`)
I'm pretty sure it is not related to my code:
the code compiles and works fine - it is really just the IDE that is highlighting errors at every line of my code.
I have the same code on a Windows Computer and there no errors are listed in the IDE.
even if I start a brand new QT Widget project the errors appear within the template code provided by the QT Creator.
Since the GCC version changed with the update of the OS, I thought maybe I have to define a new KIT but this also did not help.
Is there anything I can do to fix the issue?
Do I have to reinstall the QT Creator?
I know, pictures are not very well-liked but here I think it might help to understand what I mean with "IDE is highlighting errors":
1. First
~/.profile :
CPATH="/usr/include/clang/10/include:$CPATH"
C_INCLUDE_PATH="/usr/include/clang/10/include:$C_INCLUDE_PATH"
CPLUS_INCLUDE_PATH="/usr/include/clang/10/include:$CPLUS_INCLUDE_PATH"
export CPATH
export C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH
maybe /usr/include/clang/10/include see in you file system.
2. Second
Logout / login.
3. Third
Specifying Build Settings (Projects -> Build -> in every config build) in Build Environment section: [unset] CPATH, C_INCLUDE_PATH and CPLUS_INCLUDE_PATH
or [edit] replace this variable with the necessary values
I fixed this issue by sudo apt install clang-8.
Source: https://bugs.launchpad.net/ubuntu/+source/qtcreator/+bug/1890434

Failed to Install - Google Cloud SDK for python on Windows 10

I can't seem to understand why this just wouldn't install, it keeps failing and I have no idea how to proceed. Does anyone have any ideas as to why the installer would behave this way ?
Here is the bug filed at Google's Issue Tracker - https://issuetracker.google.com/issues/37366016
Greatly appreciate any help :)
As noted in the comments on this Q&A, the issue derives from a line in the installer which needs to be removed. The original comment by user "Valentin":
In your case, I think you can use the versioned archive method at
cloud.google.com/sdk/downloads#versioned Once you download it, instead
of running .\google-cloud-sdk\install.bat, open the file in an editor
and remove the line "echo %CmdCmdLine% | find /i "%~0" >nul". Then you
can run install.bat and finish the installation. Please still file a
bug so we can keep track of this.
OP noted that they filed an issue, so this is the appropriate resolution for anyone who sees this. I'd only request that OP update this thread with a link to their issue so other users can find it and watch for progress if they're interested.

Debugging XSLT with Intellij and Saxon - Unsupported Transformer

I'm currently trying to convert xml files to a completely different format, using IntelliJ Community Edition +Saxon to write and debug the stylesheet.
I have already Saxon-HE 9.7.0-5 as the top-most module dependency.
Running the stylesheets with the XSLT-Runner works just fine, but when I try to debug it, I get some errors.
When I specify no VM arguments I get:
java.lang.UnsupportedOperationException: Unsupported Transformer: net.sf.saxon.jaxp.TransformerImpl
at org.intellij.plugins.xsltDebugger.rt.engine.local.LocalDebugger.prepareTransformer(LocalDebugger.java:98)
at org.intellij.plugins.xsltDebugger.rt.engine.local.LocalDebugger.<init>(LocalDebugger.java:51)
at org.intellij.plugins.xsltDebugger.rt.engine.remote.DebuggerServer$1.<init>(DebuggerServer.java:55)
at org.intellij.plugins.xsltDebugger.rt.engine.remote.DebuggerServer.<init>(DebuggerServer.java:55)
at org.intellij.plugins.xsltDebugger.rt.engine.remote.DebuggerServer.create(DebuggerServer.java:71)
at org.intellij.plugins.xsltDebugger.rt.XSLTDebuggerMain.start(XSLTDebuggerMain.java:53)
at org.intellij.plugins.xslt.run.rt.XSLTRunner.main(XSLTRunner.java:143)
When I specify the VM-Arguments
-Dxslt.transformer.type=saxon
as recommended here, I get the following error:
javax.xml.transform.TransformerException: The URI http://www.w3.org/2005/xpath-functions does not identify an external Java class
Has anyone else experienced this?
IntelliJ IDEA Supports Saxon 9 Debugging up to Saxon 9.3.0.11.
As of Saxon 9.4.0.0 the net.sf.saxon.lib.TraceListener interface introduced braking changes net.sf.saxon.lib.TraceListener#open() => net.sf.saxon.lib.TraceListener#open(Controller) that got never adapted by JetBrains.
Since Maven artifacts for 9.3 are hard to come by you might want to manually get it from from SF.
https://sourceforge.net/projects/saxon/files/Saxon-HE/9.3/
Regarding your stack trace; It has a different story but ultimately results in going back to 9.3.
As of today, 9.3 seems to be the latest version that works with the current IntelliJ 2017.1.2 version.

Does LLVM support or ever support PathProfiling well?

Our project needs a tool to gather path profiling information of a program, so I turn to LLVM for help.
However, it seems the function we need is removed since version 3.4. I try the version 3.3 instead, and I find that edge profiling, optimal edge profiling works well. When it comes to path profiling, it simply doesn't work.
And I can't find libprofile_rt.so in version 3.3 build, I download one from http://rpmfind.net/ instead.
The command I use:
opt -insert-path-profiling -o example.pp.bc example.bc
lli -load WHERE_YOUR_LIBPROFILE_RE_SO_LIES/libprofile_rt.so example.pp.bc
#it produces llvmprof.out successfully
llvm-prof example.pp.bc
#then following error occurs : llvm-prof: Unknown packet type #5!
So, my question is :
1.Is there a new version that support PathProfiling again?
2.Any historical version of LLVM support PathProfiling well? If any, please tell me the version number ...
I've checked some old dev mails. The answer to my questions seems to be "NO". But the newest mails were written 2 years ago. Since LLVM is pretty hot these years and a long time passed, I want to make sure the questions above again and get the up-to-date answer.
I hope I make the problem I met clear. Your comments are very welcome.
Thanks

How to disable Eclipse CDT code formatter for a code block

The CDT code formatter has a pretty decent selection of options, but it doesn't seem to have to a feature that allows one to tell it to ignore a block of code. This feature exists in the Java code formatter:
// #formatter:off
... // code that should not be formatted
// #formatter:on
Does this feature exist and I just don't know about it, or does anyone know of any decent work-arounds?
In my particular case, I'm trying to define data structures (enum types and arrays of strings) that I want to have specific layouts.
Use Astyle (Artistic Style) formatter, it's far superior to the Eclipse CDT built-in formatter and has the feature you require:
http://astyle.sourceforge.net/astyle.html#_Disable_Formatting
Example:
#include <iostream>
int main(int argc, char** argv)
{
// *INDENT-OFF*
std::cout<<"hello world"<<'\n';
// *INDENT-ON*
}
Formatting this using astyle won't indent the code between // INDENT-OFF and // INDENT-ON but it will also disable any other formatting features astyle does, like the spacing of the instructions in this case.
I use it myself configured as an external tool.
The only problem, external tools don't have hotkeys, but there is one hotkey to "Run Last Launched External Tool", and if you only use one external tool it works the same.
More details about the configuration (linux):
Astyle:
You can get it easily from your distribution repositories or via the official site.
To setup a configuration file with the formatting settings:
http://astyle.sourceforge.net/astyle.html#_Options_File
I use the home folder variant, just create a .astylerc in your $HOME, mine contains:
--suffix=none
--style=allman
--indent=tab=4
--max-code-length=70
--close-templates
--keep-one-line-blocks
--break-elseifs
--break-closing-brackets
--align-reference=type
--align-pointer=type
--indent-classes
--indent-modifiers
--indent-switches
--indent-cases
--indent-labels
--indent-col1-comments
--min-conditional-indent=0
--pad-oper
--pad-header
--unpad-paren
Eclipse:
"Run" menu --> External tools --> External tools Configurations... Add a new "Program" and in the configuration window:
Location: /usr/bin/astyle (use whereis or locate to check this)
Working Directory: ${project_loc}
Arguments: ${selected_resource_loc}
In the same window, refresh tab:
Tick Refresh resources upon completion.
Tick "The selected resource"
Same window, common tab:
Display in favorites menu, Tick "External tools"
Yes, you can do it since CDT supports this feature starting from version 9.7. The behavior is exactly the same of JDT.
If you are using OS X or Linux (I haven't checked Windows, but it may be supported), you can use clang-format and CppStyle instead.
clang-format is a formatter utility which is provided with Clang, and it supports on/off comments // clang-format on and // clang-format off in C/C++/ObjC code. An introduction to build Clang and its utility tools can be found here.
http://clang.llvm.org/get_started.html
You do not need to install whole Clang and LLVM files on your system. Because clang-format is a standalone program which works without Clang. The on/off comments are not supported in old versions, so please use ver 3.7 (available from SVN as of Feb 2015).
CppStyle is an Eclipse plugin which enables us to use clang-format from Eclipse CDT.
https://github.com/wangzw/cppstyle
FYI. Here is the same feature request in the CDT Bugzilla. The functionality might be officially supported in future, but using clang-format or Astyle seems to be a better solution at the moment. https://bugs.eclipse.org/bugs/show_bug.cgi?id=453926
I guess I could stick these in a file with an extension ignored by the formatter and include this file where appropriate. I tried this out and it works - the data structure gets picked up the indexer (i.e. autocomplete works). Still, it would be nice to have an equivalent to the Java "#formatter:..." syntax.
As far as I know the answer is simply no, such a feature does not exist. You might be able to implement such a feature using the SDK though. Beware that in my experience the documentation is very incomplete and it's very hard to find an Eclipse developer who would be willing to help you fill in the holes. But since the feature exists in the Java formatter and it is an open source product, perhaps you could port over the logic to the C++ formatter.
You could also avoid formatting the whole file, and instead format only by selection.