I have the below project directory structure,
|-root
|-mylib
|-_inc
|-legacy
|-header1.h
|-header2.h
|-version4
|-header1.h
|-header2.h
|-lib.h //lib.h has to access headers from /legacy and /version4
//Ex: #include "legacy/header1.h" and #include
//"version4/header1.h"
|-header2.h
|-header3.h
|-_src
|-mylib.c
Makefile_lib.mk
|-myApp
|-_inc
|-app_header.h
|-_src
|-app_src.c
Makefile_app.mk
Makefile
Usecase:
-> mylib is a static library and has to be used as a dependency to myApp. myApp shall be using API's from mylib after linking it and including a header lib.h.
-> I am getting error while compiling myApp saying <legacy/header1.h> : No such file directory.
-> I am new to Makefile, can someone guide me how would Makefile , Makefile_app.mk and Makefile_lib.mk look like ?
#Makefile_lib.mk
_src_dirs_ := $(_cur_module_path_)/_src
_lib_name_ := mylib
_lib_objs_ := $($(_build_)_OBJ_OUTDIR)/mylib$(_obj_ext_) \
#Makefile_app.mk
INCLUDE=-I/../mylib/_inc/
_src_dirs_ := $(_cur_module_path_)
_bin_name_ := myapp$(_bin_ext_)
_bin_objs_ := $($(_build_)_OBJ_OUTDIR)/myapp$(_obj_ext_)
_bin_libs_ := \
$($(_build_)_LIB_OUTDIR)/$(_lib_prefix_)mylib$(_lib_ext_) \
I'm using the excelize library.
newfile, _ := excelize.OpenFile("filename.xlsx")
println(newfile.GetComments())
//map[Sheet1:[{Author 0 A2 comment1}]]
_ = newfile.InsertRow("Sheet1", 1)
println(newfile.GetComments())
//map[Sheet1:[{Author 0 A2 comment1}]]
the coordinates of my comment comment1 have not changed. How to solve this problem?
I am trying to generate a conll file from Stanford Core NLP, which then can be used as an input to Semafor (as semafor accepts conll file only).
The generated file looks like this:
1 My my PRP$ O 2 nmod:poss
2 kitchen kitchen NN O 5 nsubj
3 no no RB O 4 neg
4 longer longer RB O 5 advmod
5 smells smell VBZ O 0 ROOT
6 . . . O 5 punct
When I use this file, the Semafor server returns illegalArgument exception since the format is slightly different. Their example conll file looks like this:
1 My _ PRP$ PRP$ _ 2 NMOD _ _
2 kitchen _ NN NN _ 5 SBJ _ _
3 no _ RB RB _ 5 ADV _ _
4 longer _ RB RB _ 3 AMOD _ _
5 smells _ VBZ VBZ _ 0 ROOT _ _
6 . _ . . _ 5 P _ _
It seems that I can control the output by defining the keys. The default keys are ID, FORM, LEMMA,POSTAG,NER, HEAD, DEPREL. However, I don't know the keys for the example conll file provided by Semafor. Please guide me how I might convert the generated file format into Semafor example file format.
I believe that Semafor can generate its own conll file in the format that it needs. We use Stanford Core NLP just to split a document into sentences per line, and then use Semafor itself to generate the conll file.
I'm having WIA 2.0 problems on Windows 7. On windows XP with wia 2.0 (version from Windows 7 everything works ok)
One device, HP ScanJet 7650 refuses to have its scanning resolution set to anything above 100. When I try to set either of WIA properties
6147 _ Horizontal Resolution
6148 _ Vertical Resolution
to anything above 100 I get:
A first chance exception of type
'System.ArgumentException' occurred
Value does
not fall within the expected range.
After that, value of property is 850 (?) and scanner ignores it and scans at 100 dpi
On this same WIA 2.0 and Lexmark X340 MFP I can set scanning resolution without any problems.
Using the same scanner (HP ScanJet 7650) on WIA 1.0 I had no problems. Also, scanning from this scanner using Windows scan applet (from Devices and printers) it can scan in DPIs well above 100. So, I must be doing something wrong.
Here is complete list of properties available on WIA 2.0 for HP ScanJet 7650:
4098 _ Item Name
4099 _ Full Item Name
4101 _ Item Flags
4120 _ Color Profile Name
6154 _ Brightness
6155 _ Contrast
71692 _ Private Highlight Level
71694 _ Private Midtone Level
71693 _ Private Shadow Level
71695 _ Private Gamma
71699 _ Private Saturation
71696 _ Private Hue X
71697 _ Private Hue Y
71698 _ Private Sharpen Level
6159 _ Threshold
6147 _ Horizontal Resolution
6148 _ Vertical Resolution
71687 _ Private Default Resolution
71688 _ Private Quality Resolution
6149 _ Horizontal Start Position
6150 _ Vertical Start Position
6151 _ Horizontal Extent
6152 _ Vertical Extent
4112 _ Pixels Per Line
4113 _ Bytes Per Line
4114 _ Number of Lines
4116 _ Item Size
4118 _ Minimum Buffer Size
6146 _ Current Intent
4103 _ Data Type
4104 _ Bits Per Pixel
4110 _ Bits Per Channel
4109 _ Channels Per Pixel
4111 _ Planar
4107 _ Compression
4108 _ Media Type
4106 _ Format
4105 _ Preferred Format
4123 _ Filename extension
4102 _ Access Rights
6153 _ Photometric Interpretation
71686 _ Private Source Depth
71683 _ Private Preview
71689 _ Private Exposure Method
71722 _ Private Smoothing
71723 _ Private Color Enhanced
71685 _ Private TMA Method
71701 _ Private Defaults
71702 _ 71702
71703 _ 71703
71704 _ 71704
71711 _ 71711
71712 _ 71712
71705 _ 71705
71706 _ 71706
71707 _ 71707
71708 _ 71708
71709 _ 71709
71710 _ 71710
71721 _ 71721
71713 _ 71713
71714 _ 71714
71715 _ 71715
71716 _ 71716
71717 _ 71717
71718 _ 71718
71719 _ 71719
71720 _ Private Property
Have you looked at this question?
Try set WiaImageBias.MaximizeQuality
The Property Object has two properties, SubTypeMax and SubTypeMin, that you may want to check before setting the value property.
I have this code
Dim doc As XDocument = New XDocument( _
New XDeclaration("1.0", "utf-8", "yes"), _
New XElement("transaction", _
New XElement("realm", wcRealm), _
New XElement("password", wcPassword), _
New XElement("confirmation_email", wcConfEmail), _
New XElement("force_subscribe", wcSubscribe), _
New XElement("optout", wcOptOut), _
New XElement("command", _
New XElement("type", wcType), _
New XElement("list_id", wcListId), _
From trans As DataRow In table.Rows _
Order By trans("last") _
Select New XElement("record", _
New XElement("email", trans("email")), _
New XElement("first", trans("first")), _
New XElement("last", trans("last")), _
New XElement("company", trans("company")), _
New XElement("address_1", trans("address_1")), _
New XElement("address_2", ""), _
New XElement("city", trans("city")), _
New XElement("state", trans("state")), _
New XElement("zip", trans("zip")), _
New XElement("country", trans("country")), _
New XElement("phone", trans("phone")), _
New XElement("fax", trans("fax")), _
New XElement("custom_source", trans("source")), _
New XElement("custom_vmail_expire_date", "")))))
'' # Save XML document at root.
doc.Save("c:\vj" & saveDate & ".xml")
which works fine a produces the proper XML file BUT I run it through a validator and get this error.
Sorry, I am unable to validate this document because on line 1 it contained one or more bytes that I cannot interpret as us-ascii (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.
The error was: ascii "\xEF" does not map to Unicode
What could be causing that?
The problem is that you have an UTF-8 file that you are trying to validate as ASCII. Those 2 bytes are the unicode headers.
The validator doesn't support UTF8/UCS-2. Either save the file as ascii (which will break, as the xml says it's utf-8) or find a validator that was created within the last 5 years.
EDIT:
Note: If you want to save it as US Ascii, use new XDeclaration("1.0", "us-ascii", "yes")
The file is saved as UTF-8 with the byte-order-marker character at the start (this character begins with the octet 0xEF).
You validator for some reason seems not to like this character. Strictly speaking this character is whitespace and it is invalid to have whitespace preceeding the XML declaration. However, most parsers I know will skip it as being simply an indicator of unicode encoding and not treat it as content.