WordPress site loads only basic html content in some browsers

I have developed a website for my client, but when she tries to open it on her Phone browser especially(chrome), it displays only html content without css. But on a pc t works fyn.
My webite url: www.jirehguesthouse.com

how content displays

java – Is JTA appropriate for concurrent loads to a single database and transaction?

I have a Java process that loads data from a file in to an RDBMS – basically a CSV import with some logic around updating and deleting records in addition to the inserts. It’s important that it completes reasonably quickly and I’ve found that breaking the incoming data in to smaller units and loading those concurrently gives me a linear increase in throughput (up to a point).

This has worked fine for the most part but I’ll soon need to have the entire process succeed or fail in the presence of database errors. If it were all in one thread this would be trivial – just rollback the transaction if something goes wrong. However, this isn’t possible since each unit is running in a separate thread with distinct connections and transactions.

I’ve looked in to distributed transactions with JTA and it sounds promising. Although designed for distributing transactions among several different data sources it appears it could be used for having multiple connections participate in the same transaction.

Attempting to put together a proof-of-concept using a JTA provider (Atomikos in this case) proved to be more difficult than I anticipated and retrofitting this on to an existing application will be a significant amount of work since it isn’t running in a JavaEE app server where this would already be part of the architecture.

Before I start down this path I’d like to ask: does this sound reasonable? Is there anything I’m missing? It’s a bit of uncharted territory for me so I’d hate to waste a lot of effort attempting something that won’t work in the end due to reasons I didn’t foresee.

Short version: Is JTA a good choice for having multiple connections/threads participate in a single transaction on a single data source?

Can CSS style the in-between page loads of the same domain/site?

I frequently load links in my internal, localhost “control panel” which I’ve coded for myself, and it’s often unclear whether a page is being loaded. It’s hard to describe.

Yes, the little spin thing animation exists in the tab to the left (Pale Moon), but it could definitely be clarified.

It would be cool to be able to “blur the whole contents” with CSS when it’s loading, so it’s very obvious that it’s “working on it” and it has not halted.

Is this possible? If so, I have never seen it in use anywhere. Maybe it’s a bad idea long-term. Maybe it just sounds like a good thing, but once I enable it, I quickly get annoyed/tired in the eyes from it? Very possible.

java – DynamicClass – loads and instantiates classes at run-time

I needed to dynamically load and instantiate some classes from a generated jar and a generated .class file which depends on that jar. So I came up with this:

package ytm.yajco.translation.util;

import org.jetbrains.annotations.NotNull;

import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.nio.file.Path;

import static java.lang.StackWalker.Option.RETAIN_CLASS_REFERENCE;

public class DynamicClass {
    protected static final StackWalker walker = StackWalker.getInstance(RETAIN_CLASS_REFERENCE);
    protected final        Class<?>    loadedClass;

    /**
     * <b>WARNING:</b> Do not call this constructor if {@code jar} has already been loaded.
     * This will avoid multiple class loading.
     * <p>
     * Creates a new class loader which can load classes from {@code jar}.
     * The new classloader inherits the classpath from the class loader of the caller of this constructor.
     * Finally, the sought class is loaded from the given {@code jar}.
     *
     * @param classFQN fully qualified name of the class to be loaded
     * @param jar      path to the jar or root directory where {@code classFQN} is to be found
     * @see StackWalker#getCallerClass()
     */
    public DynamicClass(String classFQN, @NotNull Path jar) throws MalformedURLException, ReflectiveOperationException {
        this(classFQN, jar, walker.getCallerClass().getClassLoader());
    }

    /**
     * <b>WARNING:</b> Do not call this constructor if {@code jar} has already been loaded by {@code parentCL}
     * or its ancestors. This will avoid multiple class loading.
     * <p>
     * Creates a new class loader which can load classes from {@code jar}.
     * The new classloader inherits the classpath from {@code parentCL}.
     * Finally, the sought class is loaded from the given {@code jar}.
     *
     * @param classFQN fully qualified name of the class to be loaded
     * @param jar      path to the jar or root directory where {@code classFQN} is to be found
     * @param parentCL classloader to use as a parent
     */
    public DynamicClass(String classFQN, @NotNull Path jar, ClassLoader parentCL) throws MalformedURLException, ClassNotFoundException {
        final URL() jarLocation = {jar.toUri().toURL()};
        final URLClassLoader classLoader = URLClassLoader.newInstance(jarLocation, parentCL);
        loadedClass = Class.forName(classFQN, true, classLoader);
    }

    /**
     * Finds the sought class using the given class loader.
     *
     * @param classFQN    fully qualified name of the class to be loaded
     * @param classLoader class loader to reuse
     * @throws ClassNotFoundException if the class cannot be located by the specified class loader
     */
    public DynamicClass(String classFQN, ClassLoader classLoader) throws ClassNotFoundException {
        loadedClass = Class.forName(classFQN, true, classLoader);
    }

    public Class<?> getLoadedClass() {
        return loadedClass;
    }

    public ClassLoader getClassLoader() {
        return loadedClass.getClassLoader();
    }
}

In one of the cases I know the interface statically so in my DynamicSupplier subclass:

public Supplier<?> newSupplierInstance() throws ReflectiveOperationException {
    return (Supplier<?>) loadedClass.getDeclaredConstructor().newInstance();
}

In the other case I know the method signatures, so I have provided methods to which hide the reflective access. Also I wrap the new instance in a small class just to put an abstract layer when working with a bare Object.

package ytm.yajco.translation.language;

import org.jetbrains.annotations.NotNull;
import ytm.yajco.translation.util.DynamicClass;

import java.io.Reader;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.nio.file.Path;

public class DynamicParser extends DynamicClass {

// skipped JavaDoc for brevity in this review
    public DynamicParser(String parserFQN, @NotNull Path parserJar) throws MalformedURLException, ReflectiveOperationException {
        this(parserFQN, parserJar, walker.getCallerClass().getClassLoader());
    }

// skipped other constructors matching super for brevity in this review


    public static Object parseSentence(@NotNull Object parser, String sentence) throws ReflectiveOperationException {
        final Method parse = parser.getClass().getMethod("parse", String.class);
        return parse.invoke(parser, sentence);
    }

    public static Object parseSentence(@NotNull Object parser, Reader sentence) throws ReflectiveOperationException {
        final Method parse = parser.getClass().getMethod("parse", Reader.class);
        return parse.invoke(parser, sentence);
    }


    public Parser newParserInstance() throws ReflectiveOperationException {
        final Object parser = loadedClass.getDeclaredConstructor().newInstance();
        return new Parser(parser);
    }


    public static class Parser {
        private final Object parser;

        private Parser(Object parser) {
            this.parser = parser;
        }

        public Object parseSentence(String sentence) throws ReflectiveOperationException {
            return DynamicParser.parseSentence(parser, sentence);
        }

        public Object parseSentence(Reader sentence) throws ReflectiveOperationException {
            return DynamicParser.parseSentence(parser, sentence);
        }

        public Object getRealParser() {
            return parser;
        }
    }

}

So what do you think about my creation? ­čÖé BTW, is Parser an adapter (as per GOF)?

javascript – jQuery console loads twice in SharePoint

I am having issues with this jQuery code. I don’t understand why my function runs twice. ‘dosomething’ and data shows up twice in the console and i’m not sure why. Please help.

$(document).ready(function() {
    loadReportData();
})

function loadReportData(){
  $.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('individual')/items",
    type: "GET",
    headers: {
        "Accept":"application/json;odata=verbose"   
    },
    success:dosomething,
    error:dosomethingelse
  })    

}

function dosomething(data){
 console.log("dosomething");
 console.log(data);

}

enter image description here

console
enter image description here

seo – Will Google index AJAX content as part of the page when it loads into the page on click and Googlebot crawls the content at its hash bang URL?

I’m trying to implement ajax calls to load parts of a page only when a user gets to that part of the page and make sure at the same time that Google is able to read the content.

Here is what I have done:

  • created a link “view comments” on my page and adding #!module=comments to the url
  • on PHP side I capture the escaped_fragment and load static html
  • client side I have created a script that loads the static html when clicking on the link

It works fine. When I click on the link, I see the static content being loaded. If I access the URL directly (escaped_fragment) it also display the content correctly.

Now the SEO part with GoogleBot…

There is a possibility to simulate crawling from the Google Search Console. I tested the url with the script and I logged all visits on the static html page to see if Googlebot was getting there. The good news is that I see GoogleBot visiting the static html page.

How do I know if the static content of this page has been added to the main page? (and not seen as separate content) I’d like to transform all my pages with ajax loading if I’m not sure to do the right thing.

woocommerce – Search result page doesn’t load sometimes or loads in a messy way

After searching any product or clicking on menu categories the result page doesn’t show anything and displays an corrupted messy page or nothing at all with error http 500. Results exist but it doesn’t show them or it finally gets displayed after refreshing the page 4 or 5 times.

this is the website links:
www.click.af

Has it ever happened to anyone else before?

finite element method – Deformation following loads in AceGen

I have a simple 2D finite element problem comprising a unit domain that is fully constrained on the left, vertically constrained on the bottom and subject to a uniformly distributed load at the top. See below

enter image description here

At present the load remains vertical throughout the deformation.
How can I modify this problem so that the load follows the deformation and stays perpendicular to the top surface of the body?

My current code is shown below

(* Open AceFEM *)
<< AceFEM`;
(* Domain and load *)
DensityX = 10;
DensityY = 10;
Height = 1;
Width = 1;
Load = -50;
SMTInputData("Threads" -> 4);
(* Create domain *)
SMTAddDomain(
  "CornerDomain", {"ML:", "SE", "PE", "Q1", "DF", "HY", "Q1", 
   "D", {{"NeoHooke", "WA"}}}, {"E *" -> 200});
SMTMesh("CornerDomain", 
  "Q1", {DensityX, 
   DensityY}, {{{0, 0}, {Width, 0}}, {{0, Height}, {Width, Height}}});
(* Boundary conditions *)
SMTAddEssentialBoundary("X" == 0 &, 1 -> 0, 2 -> 0);
SMTAddEssentialBoundary("Y" == 0 &, 2 -> 0);
SMTAddNaturalBoundary(Line({{0, Height}, {Width, Height}}), 
  2 -> Line({Load}));
(* Begin analysis *)
SMTAnalysis();
SMTShowMesh("BoundaryConditions" -> True)
(* Solution procedure *)
tolNR = 10^-5; maxNR = 500; targetNR = 100;
(Lambda)Max = 1; (Lambda)0 = (Lambda)Max/1000; (CapitalDelta)
(Lambda)Min = (Lambda)Max/10000; (CapitalDelta)(Lambda)Max = 
(Lambda)Max/100;
SMTNextStep("(Lambda)" -> (Lambda)0);
While(
  While(
   step = 
    SMTConvergence(tolNR, 
     maxNR, {"Adaptive BC", 
      targetNR, (CapitalDelta)(Lambda)Min, 
(CapitalDelta)(Lambda)Max, (Lambda)Max})
   , SMTNewtonIteration();
   );
  If(step((4)) === "MinBound", SMTStatusReport("Analyze"); 
   SMTStepBack(););
  step((3)) 
  , If(step((1)), SMTStepBack(););
  SMTNextStep("(CapitalDelta)(Lambda)" -> step((2)))
  );

Which yields the deformed body

enter image description here

Any help would be appreciated!

How to show a loader before the page fully loads?

I want to show the loader before my website fully load as the customer is trying to click the some of the links before the page gets loaded.

To show the order, where I have to update?

Any help will be appreciated!

html – Click button with Javascript after page load / as soon as element loads

I’ve checked many other answers on StackOverflow but none of them work for some reason.

I’m trying to use something simple like

window.onload = function() {
    sleep(5000)
    clickButton()
}

But as far as I can tell the button on a page I want clicked loads AFTER page load. So window.onload doesn’t work at all. That’s why I tried to use a custom sleep function to force the code to run after-after page load but nope. Code “sleeps” by preventing page from fully loading, then runs clickButton(), then the page loads. Useless.

I know my actual button clicking code works in practice because I just fed into the browser console line by line and it worked fine. But the button I’m targeting loads after my code is executed!

I have also tried these which also do not work:

window.addEventListener('load', function () {
   clickButton()
})

setTimeout(clickButton(), 5000)

setInterval(clickButton(), 5000)

Also I’m using:
document.querySelector("(data-a-target='button-name')");

instead of:
document.getElementById("myCheck");

since this button does not have an id.

Also I have never used jquery before if that it the answer.

How on earth do I get js to click a button immediately as soon as it loads?