I have an MSBuild script that builds all solutions in my repository, but now I need a way to copy all of the output to a build directory. I was trying to use the Output parameter in the build task to know which files to copy, but RecursiveDir can't be used with that parameter: MSBuild RecursiveDir is empty (you can see my build script here too). Anyway, I have this folder structure:
Repository
|
+- Solution1
| |
| +- ProjectA
| | |
| | +- bin
| | |
| | +- Release
| |
| +- ProjectB
| |
| +- bin
| |
| +- Release
|
+- Solution2
| |
| +- ProjectA
| |
| +- bin
| |
| +- x86
| |
| +-Release
| |
| +- images
|
...etc
Basically, I just want to copy the contents of each Release folder, including subfolder structure and contents, into the following structure:
Build
|
+- Solution1
|
+- Solution2
| |
| +- images
|
...etc
I.e. I want to strip the Project\bin\platform\configuration part of the path. I don't want to have to manually include each project, because new ones pop up every so often and it would be nice not to have to update the build script every time. Seems simple enough but I can't figure it out...
I've seen MsBuild Copy output and remove part of path but I don't really understand it so I don't know how to apply it here.
Have you tried overriding the output path parameter?
For example if you call msbuild on each solution
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe $(SolutionName) /p:OutputPath="%CD%\Build"
This will redirect your output from your projects with no configuration to deal with.
Just look in \Build for your output (Its content depends on your project type)
Related
How can I add extra informationto extend the summary information produced by BenchmarkDotNet?
Like:
current host name or
current (Git) branch name
I would like to achieve something similar to this example:
Host MachineName: <Environment.MachineName>
Branch: <Git-Branch-Name>
BenchmarkDotNet=v0.13.1, OS=Windows 10...
Intel Core i7...
[Host] : .NET Framework 4.8 (4.8.4300.0), X64 RyuJIT
Dry : .NET Framework 4.8 (4.8.4300.0), X64 RyuJIT
Job=Dry IterationCount=1 LaunchCount=1
RunStrategy=ColdStart UnrollFactor=1 WarmupCount=1
| Method | Mean | Error |
|----------------- |----------- |------ |
| Foo | 1,940.3 ms | NA |
Currently there is no way to extend the Summary with extra data. All you can do is to implement a custom column and add it to the config: https://benchmarkdotnet.org/articles/configs/columns.html
I use idea 2021.2 and corresponding markdown plugin. But the simple table cannot display in previous mode:
Why? I found somebody has related the problem to the JavaFx, however, I think it is occured in old version idea. I cannot find javafx render option in my version.
How to solve it?
You are using the wrong Markdown syntax.
The following code works fine (minimum three - for table header)
| Column 1 | Column 2 |
| :--- | :--- |
| AAA | BBB |
In running some scripts that update WordPress, the output of the scripts is logged to a file. Here is a relevant portion of the log file:
Downloading update from https://downloads.wordpress.org/plugin/adrotate.5.8.15.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the plugin...
Plugin updated successfully.
Downloading update from https://downloads.wordpress.org/plugin/cookie-notice.2.0.0.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the plugin...
Plugin updated successfully.
Downloading update from https://downloads.wordpress.org/plugin/google-site-kit.1.25.0.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the plugin...
Plugin updated successfully.
Disabling Maintenance mode...
+-----------------+-------------+-------------+---------+
| name | old_version | new_version | status |
+-----------------+-------------+-------------+---------+
| adrotate | 5.8.14 | 5.8.15 | Updated |
| cookie-notice | 1.3.2 | 2.0.0 | Updated |
| google-site-kit | 1.24.0 | 1.25.0 | Updated |
+-----------------+-------------+-------------+---------+
[32;1mSuccess:[0m Updated 3 of 3 plugins.
[32;1mSuccess:[0m Theme already updated.
What I want to do next is open, read, and extract a portion of that log file to write it to a separate file as-is. The critical piece I need is this table from the output above:
+-----------------+-------------+-------------+---------+
| name | old_version | new_version | status |
+-----------------+-------------+-------------+---------+
| adrotate | 5.8.14 | 5.8.15 | Updated |
| cookie-notice | 1.3.2 | 2.0.0 | Updated |
| google-site-kit | 1.24.0 | 1.25.0 | Updated |
+-----------------+-------------+-------------+---------+
So, what I'm doing is using
awk '/Disabling Maintenance mode...$/,/[32;1mSuccess:$/' logfile.txt
to attempt to grab that table. Unfortunately, with this awk command, I seem to also get the Disabling Maintenance mode... and [32;1mSuccess: parts along with it. And those strings aren't reliably consistent enough to use them as proper start/end markers for awk. The most accurate thing I can think of is the correct regex to grab just that table and nothing more.
The problem with the text-formatted table is that the length and width of it can vary depending on what the script is updating. The "name" column could have an item in it that's 50 characters long, for example, which makes the table wider. It could also have, like, 20 "rows". So I never know how many hyphens or pipe characters to count in regex or in some kind of loop.
I've tried various tutorials and also regex101.com to devise a pattern that will help me find this variable length/width pattern. But I'm making no progress. I'm not sure I know how to frame the problem correctly within regex syntax. All tutorials I'm reading are using "abc" and "xxx" as examples and this is so much more complex.
Can anyone help me figure out how to do this?
Maybe this is too simple?
awk 'bar == 3 {exit}; /--/ {bar++} bar ' logfile.txt
If you don't want the bars in the output:
awk 'bar == 3 {exit}; /--/ {bar++; next} bar' logfile.txt
With your shown samples please try following. Written and tested in GNU awk.
awk '
/^\[32;1mSuccess:/ { found="" }
/^Disabling Maintenance/{ found=1; next }
found
' Input_file
Explanation: Adding detailed explanation for above.
awk ' ##Starting awk program from here.
/^\[32;1mSuccess:/ { found="" } ##Checking if line starts from [32;1mSuccess: then unset found here.
/^Disabling Maintenance/{ found=1; next } ##Checking if line starts from Disabling Maintenance then set found to 1 here.
found ##checking condition if found is set(NOT NULL) then print that line.
' Input_file ##Mentioning Input_file name here.
I would use GNU AWK following way, let file.txt content be
Downloading update from https://downloads.wordpress.org/plugin/adrotate.5.8.15.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the plugin...
Plugin updated successfully.
Downloading update from https://downloads.wordpress.org/plugin/cookie-notice.2.0.0.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the plugin...
Plugin updated successfully.
Downloading update from https://downloads.wordpress.org/plugin/google-site-kit.1.25.0.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the plugin...
Plugin updated successfully.
Disabling Maintenance mode...
+-----------------+-------------+-------------+---------+
| name | old_version | new_version | status |
+-----------------+-------------+-------------+---------+
| adrotate | 5.8.14 | 5.8.15 | Updated |
| cookie-notice | 1.3.2 | 2.0.0 | Updated |
| google-site-kit | 1.24.0 | 1.25.0 | Updated |
+-----------------+-------------+-------------+---------+
[32;1mSuccess:[0m Updated 3 of 3 plugins.
[32;1mSuccess:[0m Theme already updated.
then
awk '/^[+|].*[+|]$/' file.txt
output
+-----------------+-------------+-------------+---------+
| name | old_version | new_version | status |
+-----------------+-------------+-------------+---------+
| adrotate | 5.8.14 | 5.8.15 | Updated |
| cookie-notice | 1.3.2 | 2.0.0 | Updated |
| google-site-kit | 1.24.0 | 1.25.0 | Updated |
+-----------------+-------------+-------------+---------+
Explanation: print only lines which begin with one of: +| and end with one of: +|. Note that this might give false positives if you have any non-table lines starting with + or | and ending with + or |, so I suggest you run further test with your input data if you wish to use my solution.
I am struggling to load most of the Drug Ontology OWL files and most of the ChEBI OWL files into GraphDB free v8.3 repository with Optimized OWL Horst reasoning on.
is this possible? Should I do something other than "be patient?"
Details:
I'm using the loadrdf offline bulk loader to populate an AWS r4.16xlarge instance with 488.0 GiB and 64 vCPUs
Over the weekend, I played around with different pool buffer sizes and found that most of these files individually load fastest with a pool buffer of 2,000 or 20,000 statements instead of the suggested 200,000. I also added -Xmx470g to the loadrdf script. Most of the OWL files would load individually in less than one hour.
Around 10 pm EDT last night, I started to load all of the files listed below simultaneously. Now it's 11 hours later, and there are still millions of statements to go. The load rate is around 70/second now. It appears that only 30% of my RAM is being used, but the CPU load is consistently around 60.
are there websites that document other people doing something of this scale?
should I be using a different reasoning configuration? I chose this configuration as it was the fastest loading OWL configuration, based on my experiments over the weekend. I think I will need to look for relationships that go beyond rdfs:subClassOf.
Files I'm trying to load:
+-------------+------------+---------------------+
| bytes | statements | file |
+-------------+------------+---------------------+
| 471,265,716 | 4,268,532 | chebi.owl |
| 61,529 | 451 | chebi-disjoints.owl |
| 82,449 | 1,076 | chebi-proteins.owl |
| 10,237,338 | 135,369 | dron-chebi.owl |
| 2,374 | 16 | dron-full.owl |
| 170,896 | 2,257 | dron-hand.owl |
| 140,434,070 | 1,986,609 | dron-ingredient.owl |
| 2,391 | 16 | dron-lite.owl |
| 234,853,064 | 2,495,144 | dron-ndc.owl |
| 4,970 | 28 | dron-pro.owl |
| 37,198,480 | 301,031 | dron-rxnorm.owl |
| 137,507 | 1,228 | dron-upper.owl |
+-------------+------------+---------------------+
#MarkMiller you can take a look at the Preload tool, which is part of GraphDB 8.4.0 release. It's specially designed to handle large amount of data with constant speed. Note that it works without inference, so you'll need to load your data and then change the ruleset and reinfer the statements.
http://graphdb.ontotext.com/documentation/free/loading-data-using-preload.html
Just typing out #Konstantin Petrov's correct suggestion with tidier formatting. All of these queries should be run in the repository of interest... at some point in working this out, I misled myself into thinking that I should be connected to the SYSTEM repo when running these queries.
All of these queries also require the following prefix definition
prefix sys: <http://www.ontotext.com/owlim/system#>
This doesn't directly address the timing/performance of loading large datasets into an OWL reasoning repository, but it does show how to switch to a higher level of reasoning after loading lots of triples into a no-inference ("empty" ruleset) repository.
Could start by querying for the current reasoning level/rule set, and then run this same select statement after each insert.
SELECT ?state ?ruleset {
?state sys:listRulesets ?ruleset
}
Add a predefined ruleset
INSERT DATA {
_:b sys:addRuleset "rdfsplus-optimized"
}
Make the new ruleset the default
INSERT DATA {
_:b sys:defaultRuleset "rdfsplus-optimized"
}
Re-infer... could take a long time!
INSERT DATA {
[] <http://www.ontotext.com/owlim/system#reinfer> []
}
ALL,
Is it possible to get the version of the RichEdit control the program uses?
| Version | Class name | Library | Shipped with | New features
|------------|---------------|--------------|-----------------|
| 1.0 | "RICHEDIT" | Riched32.dll | Windows 95 |
| 2.0 | "RichEdit20W" | Riched20.dll | Windows 98 | ITextDocument
| 3.0 | "RichEdit20W" | Riched20.dll | Windows 2000 | ITextDocument2
| 3.1 | "RichEdit20W" | Riched20.dll | Server 2003 |
| 4.1 | "RICHEDIT50" | Msftedit.dll | Windows XP SP1 | tomApplyTmp
| 7.5 | "RICHEDIT50" | Msftedit.dll | Windows 8 | ITextDocument2 (new), ITextDocument2Old, Spell checking, Ink support, Office Math
| 8.5 | "RICHEDIT50" | Msftedit.dll | Windows 10 | LocaleName, more image formats
I know I can just have some variable and assign it appropriately if Msftedit.dll library is loaded or not. However if I do load RichEd20.dll, I can get either RichEdit 2 or RichEdit 3 implementation. And they are quite different. A lot of stuff were added in the latter.
If i did load Msftedit.dll, there are features that 7.5 that would not be available in earlier versions (e.g. automatic spell checking).
It's even possible that the same process can have all three DLLs loaded, and even using all three versions of RichEdit in the same process:
"RICHEDIT" → 1.0
"RichEdit20W" → 2.0, 3.0
"RICHEDIT50" → 4.1, 7.5, 8.5
Given a RichEdit control (e.g. WinForms RichTextBox, WPF RichTextBox, WinRT RichEditBox, VCL TRichEdit) is there a way to determine the version of a RichEdit control?
Or maybe I can somehow differentiate them by Windows version where it is available?
If using c++ you may find the following snippet useful to read out the class name :
TCHAR className[MAX_PATH];
GetClassName(GetRichEditCtrl().GetSafeHwnd(), className, _countof(className));
GetRichEditCtrl() is function on another control, you may need to substitute with whatever gives you a hwnd to the control.
Another method is using a tool like spy++ to inspect the class name.