Relative path MS Word with INCLUDETEXT - word

I am trying to use INCLUDETEXT to automate a Table of Contents with number of pages from various other .docm files in folders below main folder.
I have trouble using relative paths in MS Word per: relative path includetext in MS Word
Here is my effort which results in an
"Error! Not a valid filename":
{INCLUDETEXT "{FILENAME \P } \..\..\Div 22 Plumbing\SECTION 22 07 80.DOCM" Pages}
Div 22... folder is one level the FILENAME path. Pages is a bookmark in the .docm file.
I tried like this too with same negative result:
{INCLUDETEXT "{FILENAME \P } \\..\\Div 22 Plumbing\SECTION 22 07 80.DOCM" Pages}
I am able to get the contents of Pages into my TOC if I just use the INCLUDETEXT from an external file in the same folder, I just can't seem to get the contents from a file in a subfolder.

in your example, you put this:
{INCLUDETEXT "{FILENAME \P } \\..\\Div 22 Plumbing\SECTION 22 07 80.DOCM" Pages}
did you mean this:
{INCLUDETEXT "{FILENAME \P } \\..\\Div 22 Plumbing\\SECTION 22 07 80.DOCM" Pages}

Related

Mercurial: How can I change default tag message template?

I would like to use some prefix labels in commit messages to quickly identify the kind of commit when viewing the revision log, and for ability to quickly filter down the log.
Some of the prefixes I intend to use are (TAG:, MERGE:, TEST:, STABLE:, TRUE-UP:, FIX():, FEATURE():, & possibly others).
Additionally, for tags I would like to change the default message to be a little more descriptive, like so:
TAG: Added tag v3.4 for e90d0caa766 created on 2022-09-22 01:05:00
Applied fix for foobar.
For tagging, Mercurial seems to not open the editor so I can examine the tag message, so my attempts to debug this have been tedious.
I've tried adding the following to my repo hgrc config file:
[committemplate]
changeset.tag = "TAG: Added tag {tag} for {node|short} created on {date|isodate}\n{desc}"
I've also played around with the [hooks] section and pretag hook.
Additionally, I've tried on the command line with various formatting adjustments:
hg tag -r . -m 'TAG: Added tag {tag} for {node|short} created on {date|isodate}\n{desc}' test4
For the command line attempt above none of this populates the template fields in the message, and for the other attempts in the hgrc config file, this has not altered the commit message not once or even errored.
What am I missing here?
[committemplate] work, if it was added to hgrc (tried at repo-level, not globally), but somehow not in expected form (see below)
Just note: if you'll use "Added tag" wording, you, maybe want to limit area of modified message to only adding tags (hg tag can remove tags also, BTW) with changeset.tag.add
My test-case
Hg 6.2.2
No redefined committemplate in global config
Dumb oneliner for changeset.tag and later for changeset.tag.add
Tagging pure in CLI (due to total fails in THG)
Some logs
Plain hg tag -r 0 0.1 + hg tag --remove 0.1 used with changeset.tag redefined (default messages used by hg)
changeset: 2:006c40256d9b
user: lazybadger
date: Thu Sep 22 17:05:15 2022 +0500
summary: Removed tag 0.1
changeset: 1:1927f74a0ec0
user: lazybadger
date: Thu Sep 22 17:02:46 2022 +0500
summary: Added tag 0.1 for changeset 8385f66bee57
Tagging with -e additional option (BEWARE: tag inserted in editor by hand, {tag} nor {tags} are not expanded in changeset.tag.* text)
changeset: 7:5aee36e13e4d
tag: lazybadger
date: Thu Sep 22 17:13:43 2022 +0500
summary: TAGGING: Tag 0.3 added
...
changeset: 3:9a4b0a117fb1
user: lazybadger
date: Thu Sep 22 17:06:23 2022 +0500
summary: TAG: Tag 0.1 touched

VS Code process "ruby" on MacOS running at 100% CPU: how to fix?

When running Visual Studio Code for my Ruby on Rails development project, there is a 'ruby' process constantly running at almost 100% CPU making my fans spin like crazy. Looking at the Open Files and Ports of that process in the Activity Monitor, it looks like this is being caused by some process (node_modules.asar?) scanning through data directories (my_project/public/system/**):
cwd
/Users/pascal/projects/RoR/my_project
txt
/Users/pascal/.rbenv/versions/2.4.4/bin/ruby
txt
/usr/local/Cellar/gmp/6.1.2_2/lib/libgmp.10.dylib
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/enc/encdb.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/enc/trans/transdb.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/stringio.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/etc.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/digest/sha1.bundle
txt
/usr/local/Cellar/openssl/1.0.2o_2/lib/libcrypto.1.0.0.dylib
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/digest.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/openssl.bundle
txt
/usr/local/Cellar/openssl/1.0.2o_2/lib/libssl.1.0.0.dylib
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/io/nonblock.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/io/console.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/zlib.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/socket.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/io/wait.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/enc/windows_31j.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/json-2.1.0/lib/json/ext/parser.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/json-2.1.0/lib/json/ext/generator.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/ripper.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/cgi/escape.bundle
txt
/Library/Preferences/Logging/.plist-cache.KjBd2ZgB
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/readline.bundle
txt
/usr/local/Cellar/readline/7.0.3_1/lib/libreadline.7.0.dylib
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.7/lib/rubyeventmachine.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/date_core.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/psych.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/strscan.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/enc/utf_16le.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/enc/utf_16be.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/racc/cparse.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/2.4.0/x86_64-darwin17/enc/trans/single_byte.bundle
txt
/Users/pascal/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.5/lib/nokogiri/nokogiri.bundle
txt
/usr/local/Cellar/xz/5.2.4/lib/liblzma.5.dylib
txt
/usr/lib/dyld
0
->(none)
1
->(none)
2
->(none)
3
->0xebb30f785d0d6639
4
->0xebb30f785d0d4fb9
5
->0xebb30f785d0d70b9
6
->0xebb30f785d0d7b39
7
/dev/null
8
->0xebb30f785d0d7bf9
9
->0xebb30f785d0d6e79
10
localhost:59701
11
localhost:59701->localhost:59702
12
[ctl com.apple.netsrc id 9 unit 64]
13
->0xebb30f7867f30159
14
192.168.10.31:59810->151.101.0.70:https
15
/Users/pascal/projects/RoR/my_project
16
/Users/pascal/projects/RoR/my_project/public
17
/Users/pascal/projects/RoR/my_project/public/system
18
/Users/pascal/projects/RoR/my_project/public/system/dragonfly
19
/Users/pascal/projects/RoR/my_project/public/system/dragonfly/test
20
/Users/pascal/projects/RoR/my_project/public/system/dragonfly/test/images
21
/Users/pascal/projects/RoR/my_project/public/system/dragonfly/test/images/662
22
/Users/pascal/projects/RoR/my_project/public/system/dragonfly/test/images/662/2017
23
/Users/pascal/projects/RoR/my_project/public/system/dragonfly/test/images/662/2017/12
24
/Users/pascal/projects/RoR/my_project/public/system/dragonfly/test/images/662/2017/12/08
25
/Users/pascal/projects/RoR/my_project/public/system/dragonfly/test/images/662/2017/12/08/13
26
/Users/pascal/projects/RoR/my_project/public/system/dragonfly/test/images/662/2017/12/08/13/11
27
/Users/pascal/projects/RoR/my_project/public/system/dragonfly/test/images/662/2017/12/08/13/11/27
36
/dev/ptmx
38
/private/var/folders/fn/wjmjy_xj1vv2n8lhfcsjb3480000gn/T/com.microsoft.VSCode.ShipIt.3TPnSs1E/Visual Studio Code.app/Contents/Resources/app/node_modules.asar
I'm hoping that some exclude folders settings would fix this, but I cannot find any relevant setting. Or is there another solution for this?
This turned out to be caused by the Solargraph gem. According to this explanation of the author, the exclude settings of this gem in the .solargraph.yml file don't work very well. Instead one should use more specific include settings. In my case I was using - **/*.rb as a single include setting. I've now changed this to:
include:
- app/**/*.rb
- db/migrate/**/*.rb
- db/seeds/**/*.rb
- config/**/*.rb
- lib/**/*.rb
- spec/**/*.rb
Since then the ruby process seems to be tamed.

Protractor CSV file upload doesn't work

I have problem when trying to upload a csv of excel files via protractor. File is valid. When I upload it manually everything is fine. But for some reason, upload with protractor says that size is 0, and type is not recognized.
Screenshot of file details after upload
Upload code:
var fileToUpload = './test.csv';
var absolutePath = path.resolve(__dirname, fileToUpload);
element(by.css("input[type=\"file\"]")).sendKeys(absolutePath);
Also I have tried with absolute path, without path.resolve, and also I have tried with xlsx file. Problem remains the same.
I believe I've found the cause. From my tests it seems like the File type is missing, see below:
For a .csv file:
File
lastModified: 1468589472000
lastModifiedDate: Fri Jul 15 2016 14:31:12 GMT+0100 (BST)
name: "valid-import.csv"
size: 198
type: ""
webkitRelativePath: ""
For a .svg file:
File
lastModified: 1468587182000
lastModifiedDate: Fri Jul 15 2016 13:53:02 GMT+0100 (BST)
name: "valid-import.svg"
size: 1030
type: "image/svg+xml"
webkitRelativePath: ""
Note the missing type attribute — I'm trying to dig further into this, if I find anything I'll update this answer.

Angular file upload - return name uploaded file

I'm using an angular-file-upload directive. When I uploading file I getting file's name before upload on callback.
$$hashKey: "object:19"_file: FilelastModified: 1429780959000lastModifiedDate: Thu Apr 23 2015 12:22:39 GMT+0300 (MSK)name: "av_1.png"size: 1278type: "image/png"webkitRelativePath: "" trueisUploading: falsemethod: "POST"progress: 100removeAfterUpload: false
name: "av_1.png" - name before upload
But I need to get name of file after upload. Name turns in 16 bit encoding and looks like 68b714b12c6a4336500a4c5a4b53c60e.png for example.
How can I return file's name after upload?

weird results on db_dump(berkeley db)

I have about 400MB sized berkeley db file.
$> ls -alh ses.db
-rw-rw-r-- 1 junyoung junyoung 391M 9월 23 17:32 ses.db
after dumping it, I've checked the size again.
$> db_dump ses.db > ses.db.dump
$> ls -alh ses.db.dump
-rw-rw-r-- 1 junyoung junyoung 2.2M 9월 23 18:09 ses.db.dump1
the result file size is too small than I expected.
what's the reason of this? any comments?
There could be many reasons for this, to be sure. But possibly the most common reason is that the database once held many more records which were later deleted. This space is not returned to the filesystem.
See this thread in the Oracle forums for more information https://community.oracle.com/thread/879030 . And, as it says in there, try the db_stat command to get some visibility into what's going on in your database.