What does ### mean in Dynamics-NAV Text Constants - dynamics-nav

I have noticed that in Dynamics NAV 2013 that some TextConsts have started using ### as the language code.
For example in Codeunit 12:
PurchaseAlreadyExistsErr#1003 : TextConst '###="%1 = Document Type;
What does ### mean in this context?

They're there as translation comments. My friend Jan Hoek his written a nice blog post on this: http://mibuso.com/blogs/zenandtheartofcsidedevelopment/category/textconstants/.
So 'help yourself' ;-)

Related

Biblatex doesn't compile. Probably .bib file not recognised

I've spent many hours trying to get my bibliography working - unsuccessfully. I suspect that, somehow, my .bib file doesn't get recognised.
Help would be greatly appreciated.
MWE:
\documentclass[a4paper, 12pt]{article}
\usepackage{array}
\usepackage{lscape}
\usepackage[paper=portrait,pagesize]{typearea}
\usepackage[showframe=false]{geometry}
\usepackage{changepage}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{adjustbox}
\usepackage[utf8]{inputenc}
\usepackage{babel,csquotes,xpatch}
\usepackage[backend=biber,style=authoryear, natbib]{biblatex}
\addbibresource{test.bib}
\usepackage{xurl}
\usepackage[colorlinks,allcolors=blue]{hyperref}
\begin{document}
This is a test... test test\\
\cite{glaeser_gyourko}\\
\cite{hsieh-moretti:2019}\\
\cite{glaeser_gyourko}\\
\printbibliography
\end{document}
test.bib file:
#article{hsieh-moretti:2019,
Author = {Hsieh, Chang-Tai and Moretti, Enrico},
Title = {Housing Constraints and Spatial Misallocation},
Journal = {American Economic Journal: Macroeconomics},
Volume = {11},
Number = {2},
Year = {2019},
Month = {4},
Pages = {1-39},
DOI = {10.1257/mac.20170388},
URL = {https://www.aeaweb.org/articles?id=10.1257/mac.20170388}
}
#article{glaeser_gyourko,
Author = {Glaeser, Edward and Gyourko, Joseph},
Title = {The Economic Implications of Housing Supply},
Journal = {Journal of Economic Perspectives},
Volume = {32},
Number = {1},
Year = {2018},
Month = {2},
Pages = {3-30},
DOI = {10.1257/jep.32.1.3},
URL = {https://www.aeaweb.org/articles?id=10.1257/jep.32.1.3}
}
In PDF it looks like this: enter image description here
I get the following information in the source viewer:
Process started
INFO - This is Biber 2.14 INFO - Logfile is 'test.blg' INFO - Reading
'test.bcf' INFO - Found 2 citekeys in bib section 0 INFO - Processing
section 0 INFO - Globbing data source 'test.bib' INFO - Globbed data
source 'test.bib' to test.bib INFO - Looking for bibtex format file
'test.bib' for section 0 INFO - LaTeX decoding ... INFO - Found
BibTeX data source 'test.bib'
Process exited with error(s)
I use texmaker 5.0.4 on MacOS and I post my configurations here:
enter image description here enter image description here
I really have very little idea on what goes on. Today, I started a work session, added a new source and it didn't work. I deleted the new source so that the bibliography would be the same as prior to me changing it, and it didn't work either. So, this let's me assume that, somehow, the program doesn't understand where the bibliography is. The .bib file and the document are in the same folder.
What I tried:
Triple checked code in bibliography using tools such as https://biblatex-linter.herokuapp.com/
Clear the cache of all documents.
change the natbib in the command \usepackage[backend=biber,style=authoryear, natbib]{biblatex} to biber -> doesn't seem to work.
Left out natbib and got same result. \usepackage[backend=biber,style=authoryear, natbib]{biblatex} => \usepackage[backend=biber,style=authoryear]{biblatex}
Add the command \usepackgage{natbitb} in addition to biblatex but this produces compatibility issues.
Add the codes \usepackage[utf8]{inputenc} &
\usepackage{babel,csquotes,xpatch} because they are recommendet by this biblatex cheat sheet: http://tug.ctan.org/info/biblatex-cheatsheet/biblatex-cheatsheet.pdf. Didn't change anything.
Thanks for your time!
I had a similar problem, what helped me was looking up the articles and rewriting them via the Google Scholar bibTex version.
The problem arose as I changed the name manually. This results in an error which is not recognized. And this threw me into researching exactly the same kind of .bib file not recognized error.
Your housing article should be formatted like this:
#article{hsieh2019housing,
title={Housing constraints and spatial misallocation},
author={Hsieh, Chang-Tai and Moretti, Enrico},
journal={American Economic Journal: Macroeconomics},
volume={11},
number={2},
pages={1--39},
year={2019}
}
I found another source of this problem Citavi generates invalid bibtex syntax. Often the year field is not correctly filled or special characters are not escaped properly. Maybe these are data errors which have their origin in the sources not in Citavi, but nonetheless often Citavi does not export valid bibtex format.

Reference page in printed asciidoc documentation

I want to create a link within an asciidoc PDF for a printed book. The right way to do this is something like:
[[LinkUniqueCode]]
Here is the stuff I'm linking to...
Lots of document here...
Now look <<LinkUniqueCode,at the link>>.
Normally I would expect this to render as something like this in PDF:
Now look at the link (Page 13).
But instead I'm getting a link which is useless in a printed PDF...
I've searched a lot for this but the keywords I found are too generic and I only found this.
I've tried adding :xrefstyle: full but that didn't really help either.
I've seen this both through the fopub backend and the PDF backend. I'm guessing there should be a "print mode" for the PDF generation but I can't really see what I'm doing wrong here.
OK, that was me being stupid. I forgot to include:
:doctype: book
Which made it all good.
Edit:
For full reference here's my entire header:
:xrefstyle: full
:listing-caption: Listing
:sectnums:
:pdf-page-size: [8.125in, 10.25in]
:doctype: book
:media: prepress
:icons: font
:source-highlighter: rouge
:toc: macro
:toclevels: 4
:toc-title: Contents
:toc-placement: manual
:tip-caption: :bulb:
:autofit-option:
:hide-uri-scheme:
:uuid: 92CA37B2-EB2B-4B8F-AC7C-XXXXXXXXX
:front-cover-image: image:images/ebook.png[Front Cover,1000,1600]
:lang: en-US
:revdate: 2018-07-22
:doctitle: My Title
:author: Shai Almog
:producer: Codename One Academy
:description: My Description
:keywords: My Keywords,Other Words
:copyright: Shai Almog, all rights reserved
:publication-type: book
Then the body of this file is:
include::file-names-for-each-chapter.asciidoc[]
[index]
== Index
This seemed to work correctly
look at: https://stackoverflow.com/questions/47312831/asciidoctor-page-number-usable
I took your example and it was not made good.
What other settings like xrefstyle you used?
EDIT: look here:
asciidoctor-pdf -v
Asciidoctor PDF 1.5.0.alpha.16 using Asciidoctor **1.5.4** [http://asciidoctor.org]
Runtime Environment (ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)
I think this explains:
On Wed, Aug 9, 2017 at 11:23 PM, Jeremie Bresson [via Asciidoctor :: Discussion] <[hidden email]> wrote:
The "xrefstyle" feature is really great (new with Asciidoctor 1.5.6.1, see http://asciidoctor.org/docs/user-manual/#customizing-the-cross-reference-text )

Tone analyser only returns analysis for 1 sentence

When using tone analyser, I am only able to retrieve 1 result. For example, if I use the following input text.
string m_StringToAnalyse = "The World Rocks ! I Love Everything !! Bananas are awesome! Old King Cole was a merry old soul!";
The results only return the analysis for document level and sentence_id = 0, ie. "The World Rocks !". The analysis for the next 3 sentences are not returned.
Any idea what I am doing wrong or am I missing out anything? This is the case when running the provided sample code as well.
string m_StringToAnalyse = "This service enables people to discover and understand, and revise the impact of tone in their content. It uses linguistic analysis to detect and interpret emotional, social, and language cues found in text.";
Running Tone analysis using the sample code on the sample sentence provided above also return results for the document and the first sentence only.
I have tried with versions "2016-02-19" as well as "2017-03-15" with same results.
I believe that if you want sentence by sentence analysis you need to send every separate sentence as a JSON object. It will then return analysis in an array where id=SENTENCE_NUM.
Here is an example of one I did using multiple YouTube comments (using Python):
def get_comments(video):
#Get the comments from the Youtube API using requests
url = 'https://www.googleapis.com/youtube/v3/commentThreads?part=snippet&maxResults=100&videoId='+ video +'&key=' + youtube_credentials['api_key']
r = requests.get(url)
comment_dict = list()
# for item in comments, add an object to the list with the text of the comment
for item in r.json()['items']:
the_comment = {"text": item['snippet']['topLevelComment']['snippet']['textOriginal']}
comment_dict.append(the_comment)
# return the list as JSON to the sentiment_analysis function
return json.dumps(comment_dict)
def sentiment_analysis(words):
# Load Watson Credentials using Python SDK
tone_analyzer = ToneAnalyzerV3(
username=watson_credentials['username'], password=watson_credentials['password'], version='2016-02-11')
# Get the tone, based on the JSON object that is passed to sentiment_analysis
return_sentiment = json.dumps(tone_analyzer.tone(text=words), indent=2)
return_sentiment = json.loads(return_sentiment)
Afterwards you can do whatever you want with the JSON object. I would also like to note for anyone else looking at this if you want to do an analysis of many objects, you can add sentences=False in the tone_analyzer.tone function.

XAML How to get a project name

Im learning XAML with microsoft visual studio 2013 wpf application.
I want to make a textblock display my Project Name from a some kind of resource(?) - I want to make a template :) .
Thank you for help in advance :) .
string name = Assembly.GetEntryAssembly().GetName().Name;
or
string name = Assembly.GetExecutingAssembly().GetName().Name;
Alternatively, you can get the Assembly object from any known type in the assembly:
Assembly assy = typeof({class name here}).Assembly;
This also allows another option to get the the name only:
string name = typeof({class name here}).Assembly.GetName().Name;
Here's the link

F# quotations on Windows Phone

I'm using Daniel Mohl's F# templates for Windows phone, but it seems the bundled FSharp.Core doesn't have some of the quotations code. I'm trying to port this code from regular .NET:
open System.ComponentModel
open Microsoft.FSharp.Quotations
open Microsoft.FSharp.Quotations.Patterns
[<AbstractClass>]
type ViewModelBase() =
let propertyChanged = new Event<_, _>()
let toPropName expr =
match expr with
| PropertyGet(a, b, list) -> b.Name
| _ -> failwith "Unsupported: " + expr.ToString()
interface INotifyPropertyChanged with
[<CLIEvent>]
member x.PropertyChanged = propertyChanged.Publish
member x.NotityPropertyChanged expr =
propertyChanged.Trigger(x, new PropertyChangedEventArgs(toPropName expr))
But the compiler complaints about Microsoft.FSharp.Quotations.Patterns and PropertyGet. It seems it doesn't even know the Expr type.
Any idea on how to solve this?
I replaced the FSharp.Core file that comes in the template by the one that comes in the F# April 2011 CTP in the WindowsPhone7\Silverlight\4.0\bin folder, and with this version it now compiles fine
I've compared FSharp.Core.dll from Template you've mentiond and those one which is referenced if you create a F# Silverlight library with .Net Reflector and they are different! :) Thouse one which added to template's dependencies folder doesn't have Quotations.
So my first two thoughts is either add F# SCL and create your view model there or not to use this template at all. But I actually like this template or how it looks at least... so thanks you for the mentioning it anyway :)

Resources