Terrible title, I know, but is there a way in XPath to get to a desired link by only knowing that the link is second going back from the last ellipsis?
In this instance, the desired link is /2
<div class="page">
1
2
3
...
50
51
52
</div>
In this case, it is /3.
<div class="page">
1
2
3
4
...
50
51
52
</div>
And, just to throw a spanner, in the works... this one is 21:
<div class="page">
1
2
3
...
18
19
20
21
22
...
50
51
52
</div>
I've tried all sorts of ways to get at it, from writing out counts to throwing magic beans out of my window, but nothing works. And now I'm out of magic beans. :(
Any suggestions for this problem (XPath, not the magic beans!) are welcome!
/div[#class='page']/text()[normalize-space()='…'][last()]/preceding-sibling::a[2]
Related
I have generated a dxf file but when I opened it with AutoCAD, crashes AutoCAD and gives a message ID 11 incorrect: already used.
the dxf content: https://github.com/tarikjabiri/dxf/blob/dev/examples/latest.dxf
I can't spot the problem 3 days I am trying to solve it.
I think something wrong with the APPID because it holding the ID 11 or the Handle in the language of DXF.
I have a dxf working: https://github.com/tarikjabiri/dxf/blob/dev/examples/Minimal_DXF_AC1021.dxf
Thanks in advance.
There are two minor issues:
DIMSTYLE table
0
TABLE
2
DIMSTYLE
105 <<< handle group code of the table "head" is 5 as usual
8
100
AcDbSymbolTable
100
AcDbDimStyleTable
70
1
0
DIMSTYLE
5 <<< handle group code of the table entry is 105
12
330
8
100
AcDbSymbolTableRecord
100
AcDbDimStyleTableRecord
2
STANDARD
70
0
40
1
BLOCK_RECORD table entries for *MODEL_SPACE and *PAPER_SPACE
0
TABLE
2
BLOCK_RECORD
5
9
330
0
100
AcDbSymbolTable
70
2
0
BLOCK_RECORD
5
14
330
9
100
AcDbSymbolTableRecord
100
AcDbRegAppTableRecord <<< subclass marker string "AcDbBlockTableRecord"
2
*MODEL_SPACE
70
0
70
0
280
After this changes the file opens in Autodesk DWG Trueview 2022.
Cant run app Nativescript on iOS but runs on android
My code works ok android with no problems but in iOS i get those erros below.
and i have no ideia why, what im missing ???? Its a plugin? Module?
Any help would be good cuz im lost here. thanks
when i run tns run ios --env.aot --env.uglify.
the erros i get when running the app :
***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1 0x10fe3991f NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
2 0x10fe71b60 NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*)
3 0x110812dd6 ffi_closure_unix64_inner
4 0x1108137fa ffi_closure_unix64
5 0x114515d22 -[CALayer layoutSublayers]
6 0x11451a9fc CA::Layer::layout_if_needed(CA::Transaction*)
7 0x114526d58 CA::Layer::layout_and_display_if_needed(CA::Transaction*)
8 0x11449624a CA::Context::commit_transaction(CA::Transaction*)
9 0x1144cd606 CA::Transaction::commit()
10 0x116f942c3 __34-[UIApplication _firstCommitBlock]_block_invoke_2
11 0x115a97cbc __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__
12 0x115a97480 __CFRunLoopDoBlocks
13 0x115a91d04 __CFRunLoopRun
14 0x115a914d2 CFRunLoopRunSpecific
15 0x11b8af2fe GSEventRunModal
16 0x116f7afc2 UIApplicationMain
17 0x11081363d ffi_call_unix64
18 0x12db4cf70
JavaScript stack trace:
1 #file:///node_modules/tns-core-modules/ui/content-view/content-view.js:44:0
2 _eachLayoutView#file:///node_modules/tns-core-modules/ui/core/view/view-common.js:1015:0
3 #file:///node_modules/tns-core-modules/ui/proxy-view-container/proxy-view-container.js:45:0
4 eachChildView#file:///node_modules/tns-core-modules/ui/layouts/layout-base-common.js:125:0
5 _eachLayoutView#file:///node_modules/tns-core-modules/ui/proxy-view-container/proxy-view-container.js:43:0
6 get#file:///node_modules/tns-core-modules/ui/content-view/content-view.js:38:0
7 onMeasure#file:///node_modules/tns-core-modules/ui/page/page.js:272:0
8 measure#file:///node_modules/tns-core-modules/ui/core/view/view.js:55:0
9 measureChild#file:///node_modules/tns-core-modules/ui/core/view/view-common.js:954:0
10 i#file:///node_modules/tns-core-modules/ui/core/view/view.js:636:0
11 viewDidLayoutSubviews#file:///node_modules/tns-core-modules/ui/page/page.js:192:0
12 UIApplicationMain#[native code]
13 S#file:///node_modules/tns-core-modules/application/application.js:277:0
14 run#file:///node_modules/tns-core-modules/application/application.js:305:0
15 bootstrapNativeScriptApp#file:///node_modules/nativescript-angular/platform-common.js:205:0
16 bootstrapApp#file:///node_modules/nativescript-angular/platform-common.js:106:0
17 bootstrapModuleFactory#file:///node_modules/nativescript-angular/platform-common.js:77:0
18 #file:///app/bundle.js:72:449
19 ./main.ts#file:///app/bundle.js:72:477
20 k#file:///src/webpack/bootstrap:750:0
21 n#file:///src/webpack/bootstrap:43:0
22 r#file:///src/webpack/bootstrap:30:0
23 anonymous#file:///src/$_lazy_route_resource lazy namespace object:2:0
24 evaluate#[nat<…>
JavaScript error:
file:///node_modules/tns-core-modules/ui/content-view/content-view.js:44:0 JS ERROR Error: More than one layout child inside a
1 UIApplicationMain#[native code]
2 S#file:///node_modules/tns-core-modules/application/application.js:277:0
3 run#file:///node_modules/tns-core-modules/application/application.js:305:0
4 bootstrapNativeScriptApp#file:///node_modules/nativescript-angular/platform-common.js:205:0
5 bootstrapApp#file:///node_modules/nativescript-angular/platform-common.js:106:0
6 bootstrapModuleFactory#file:///node_modules/nativescript-angular/platform-common.js:77:0
7 #file:///app/bundle.js:72:449
8 ./main.ts#file:///app/bundle.js:72:477
9 k#file:///src/webpack/bootstrap:750:0
10 n#file:///src/webpack/bootstrap:43:0
11 r#file:///src/webpack/bootstrap:30:0
12 anonymous#file:///src/$_lazy_route_resource lazy namespace object:2:0
13 evaluate#[native code]
14 moduleEvaluation#:1:11
15 promiseReactionJob#:1:11
Somewhere in your source, usually at the root of a particular component's html/xml, you have a view that is only rendered on iOS. However, because it fails on iOS and not Android, it is likely that you have not placed the similar restriction on the other top-level element.
<ios>
<Label text="only iOS"></Label>
</ios>
<Label text="only Android"></Label> <!-- Error; is present in template for both!! -->
It is hard for me to guess where exactly the issue might be, but I'd suggest having a look through your templates for the usage of ios.
Well in ios u cant have free templates floating arround everything was too be inside a LayoutContainer
Android (Works) iOS (Don't Work)
<GridLayout>
(... Content)
</GridLayout>
<GridLayout>
(... More Content)
</GridLayout>
Android (Works) iOS (Works)
<GridLayout> // MAIN CHILD
(... Content)
<GridLayout>
(... More Content)
</GridLayout>
</GridLayout>
I´m having an issue with a DXF code for an Ellipse, I´m trying to have it Graphed by AutoCad 2019 but it won´t recognize the code for an unknown reason. I would greatly apreciate any insight on the issue. Thanks a lot in advance
0
SECTION
2
ENTITIES
0
ELLIPSE
8
0
10
43.6886
20
16.2019
30
0
11
64.4949
21
16.2019
31
0
210
0
220
0
230
0
40
0.4
41
0
42
6.28319
0
ENDSEC
0
EOF
Well, you are missing some AutoCAD 'housekeeping' stuff in your dxf file. You have all the geometry bits for your ellipse, but AutoCAD doesn't know where to put them in the overall DXF file. So you have to include things like the drawing 'Handle' and the other required elements that place the ellipse in the overall framework of the whole drawing. An ellipse in a DXF file starts out like what is shown below:
ENTITIES
0
ELLIPSE
5
86
330
70
100
AcDbEntity
8
0
100
AcDbEllipse
10
43.6886
20
16.2019
30
0
The R2000 dxf spec will tell you what all those pieces are for specifically, but everything above
AcDbEllipse
10
is needed to place the ellipse in the greater context of the rest of the drawing. Without it, the ellipse would not be recognized.
I can tell you that code 8 identifies the layer the entity is on, in this case, 0 and code 5 identifies a unique handle (id code) for the entity, in this case 86. The handle must be unique for every entity in a dxf file. If you are manipulating/creating dxf entities in code, you have to be very careful to never have duplicate handles.
This ia an example of DXF with a line from 100,100,0 to 200,200,0
999
Start Section ***************************************************************
0
SECTION
999
Start Entities ****************************************************************
2
ENTITIES
999
Line ************************************************************************
0
LINE
8
LAYER1
10
100
20
100
30
0
11
200
21
200
31
0
0
ENDSEC
999
End Section ***************************************************************
999
End File ********************************************************************
0
EOF
999 is for comment
then you have to start section and entities
at the end close section and file
If you need more Info contact me
I want get 2 last digits of numbers, this digits also can be string not int
Cell:
29501864,071879
17906796,472795
17038547,962973
182638877,306748
101159098,3431
183391558,187717
VB script function: Right(CStr( [tracts.Shape_Area] ),2)
What I get:
94
47
32
48
31
17
What I want get
79
95
73
48
31
17
What is wrong in my function ?
This code is correct:
Right(CStr( [Shape_Area] ),2)
When you import a FeatureClass in a geodatabase, the Shape_Area created as a Double field that can have many decimal places! (By default 8 decimal places)
But in Attribute Table, you can see 6 decimal places by default. To see all the decimal places of your numbers try this:
CStr( [Shape_Area] )
Frame Image Function Offset
0 coredll.dll xxx_RaiseException 19
1 mscoree3_7.dll 436488
2 mscoree3_7.dll 386545
3 mscoree3_7.dll 540936
4 TransitionStub 0
5 System.Windows.Navigation.NavigationService.Navigate 1652
6 XXX.Components.pushScreen 172
7 XXX.pushHomeScr 996
8 XXX.update 1488
9 .__c__DisplayClass3._ResponseReady_b__0 700
10 mscoree3_7.dll 429164
11 mscoree3_7.dll 185803
12 mscoree3_7.dll 184423
13 System.Reflection.RuntimeMethodInfo.InternalInvoke 112
14 System.Reflection.RuntimeMethodInfo.InternalInvoke 1556
15 System.Reflection.MethodBase.Invoke 104
16 System.Delegate.DynamicInvokeOne 476
17 System.MulticastDelegate.DynamicInvokeImpl 84
18 System.Windows.Threading.DispatcherOperation.Invoke 80
19 System.Windows.Threading.Dispatcher.Dispatch 404
I am using the following code to push new page
Uri navigateUritemp = new Uri(url, UriKind.RelativeOrAbsolute);
if(scrObj.NavigationService.CurrentSource != navigateUritemp)
{
scrObj.NavigationService.Navigate(navigateUritemp);
}
It looks the following line is throwing invalidoperationexception
scrObj.NavigationService.Navigate(navigateUritemp);
can someone tell what is wrong in this code?
One common situation in which I've seen this InvalidOperationException happen is if multiple navigations are attempted simultaneously, or if a navigation attempt occurs while the app is not in the foreground.
This can happen, for example, if a user manages to hit an appbar button a second time while a slow navigation is occurring.
A quick search reveals others have seen the same sort of thing - e.g. http://www.nickharris.net/2011/01/windows-phone-7-navigation-is-not-allowed-when-the-task-is-not-in-the-foreground/
Try to use if (scrObj.NavigationService.CurrentSource.equals(navigateUritemp)) Maybe this will help. Are you getting this exception all the time?
Try to do the following:
Create a new project and remove the rest of your code and keep the code related to NavigationService.
Crate a folder (Name the folder something like homescreen)
Add 2 XAML pages (eg: Page1.xaml, Page2.xaml)
Test NavigationService code from MainPage.xaml
Try this:
NavigationService.Navigate(new Uri("/homescreen/Page1.xaml", UriKind.Relative));
or
NavigationService.Navigate(new Uri("/homescreen/Page2.xaml", UriKind.Relative));
if you are using UriKind.Relative make sure to specify the correct path, eg: if you use "homescreen/Page2.xaml" it want work, you have to use "/homescreen/Page2.xaml", " / " at the beginning of your path is like "root" or "~" in ASP.NET