Categories
Development

create numbered, ordered list of section header elements from html using xPath

I want to parse some HTML to create a nested navigation (ordered list for a table of contents) based on the section headings elements (H1,H2,H3,H4,H5,H6) using XPath. For exampe, if I have a structure like this: <h2>Header 1.</h2> <h2>Header 2.</h2> <h3>SubHeader 2.1</h3> <h4>SubHeader 2.1.1</h4> <h2>Header 3.</h2> <h3>SubHeader 3.1</h3> <h3>SubHeader 3.2</h3> I would like xPath to […]

Categories
Development

scala spark dataframe: explode a string column to multiple strings

Any pointers on below? input df: here col1 is of type string +———————————-+ | col1| +———————————-+ |[{a:1,g:2},{b:3,h:4},{c:5,i:6}] | |[{d:7,j:8},{e:9,k:10},{f:11,l:12}]| +———————————-+ expected output: (again col1 is of type string) +————-+ | col1 | +————-+ | {a:1,g:2} | | {b:3,h:4} | | {c:5,i:6} | | {d:7,j:8} | | {e:9,k:10} | | {f:11,l:12}| +—–+ Thanks!

Categories
Development

Body styling stops at one screen for no apparent reason

The styling I have on the body element stops exactly where my computer “first screen” stops. There doesn’t seem to be a code related reason for it: // Styled JSX react.js library: body { font-size: calc(14px + (26 – 14) * ((100vw – 300px) / (1600 – 300))); background-color: wheat; border: 2px dashed green; } […]

Categories
CSS Development PHP Ruby

What is wrong with my group3 in my css code? [duplicate]

This question already has an answer here: What is a clearfix? 10 answers What methods of ‘clearfix’ can I use? 29 answers This question was previously marked as duplicate and closed without a proper answer. I tried clearing the float as suggested but everything appeared in one vertical line and not side by side. And […]

Categories
Development PHP Wordpress

Issue working with particles.js in WordPress theme

I’m trying to incorporate particles.js into a locally hosted WordPress child theme (Illdy is the parent) and have been successful in getting particles to appear, but I am having issues with their placement. See image: Particles Below Header I have a feeling this is a CSS/HTML problem, but I have been unable to figure it […]

Categories
Development

I’m in the process of cleaning up a website’s code. One of the things I am doing is running each page’s code through the W3C Markup Validation Service: https://validator.w3.org/ For the page I’m currently working on, the validator gave me a lot of errors. I have already fixed nearly all of them but there is […]

Categories
Development

I’m in the process of cleaning up a website’s code. One of the things I am doing is running each page’s code through the W3C Markup Validation Service: https://validator.w3.org/ For the page I’m currently working on, the validator gave me a lot of errors. I have already fixed nearly all of them but there is […]

Categories
Development jQuery

How do I fix a menu from disappearing when I toggle it?

It used to work and now I have no idea what I did wrong. When I toggle the mobile menu, the navigation items don’t show up but when I inspect it the browser shows they’re there but aren’t visible. Can someone help me figure out this menu problem? This has stumped me I tried making […]

Categories
Development

Why does nested array crach excel when it reaches upper limit?

I have the following code which crashes excel when run: Option Explicit Private Type Calculations x As Double x2 As Double x3 As Double x4 As Double x5 As Double h1 As Double v1 As Double a1 As Double p1 As Double h2 As Double v2 As Double a2 As Double p2 As Double h3 […]

Categories
Development

LESS loops through variables to multiply classes

What am I doing wrong here? What I’m doing: body { &.green { h1, h2, h3, h4, h5 { color: @color-green; } } } What I’m trying to do: @color-green: #1ED261; body { @colors: green, red, blue; .for-each(@color-name in @colors) { &.@{color-name} { h1, h2, h3, h4, h5 { color: @color-@color-name; << IS THIS THE […]