Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I, personally, use Bootstrap.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

The only thing I changed 2 weeks ago (per this thread) was Google Analytics from async to deferred.

Now, Desktop is passing and Mobile is failing (the opposite of before). I really don't think it has anything to do with the change I made. As I alluded to before, it is always constantly in flux based on the geographic locations of the visitors Google sends to us that month.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

So sorry I couldn’t help. I was still sleeping when you posted.

mexabet commented: Thanks, Dani for stopping by. I managed to figure it out by myself. I reiterate my appreciations for your time. +5
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

… and is also why we have a rule against posting AI-generated content ;)

AndreRet commented: We do, oh Shucks, now I am lost :) +15
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I think they are insinuating that even though AI seems like a magic bullet solution to content writing, it’s not perfect, and its faults will be its downfall. That makes it not a good long term solution.

IMHO, this is exactly correct. Every content writer and their mother are using AI to generate cheap article content these days, with the desire to have it rank well on Google. At a superficial level, it seems like the holy grail. But under the surface, the writing is plagued with inaccuracies and it’s essentially just fluff content that’s been written and said before and is just being rehashed. After all, AI is only capable of rewriting what’s always been out there. It doesn’t introduce any new concepts, new ideas, or new thoughts, which makes it kinda useless. The kinda content that people want to read, and that adds value to the interwebs, is content that brings something new to the table. Whether that be new ideas, new perspectives, etc.

Soooo, in the long term, Google will figure out what content is just rehashed from stuff already out there, and what content actually adds value and is useful. And that, ladies and gentlemen, will make AI content generation obsolete.

AndreRet commented: Can't agree more, I suppose why content became very bad and had a drop of accuracy of almost 39% +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Personally, I don’t like the idea of having to use CONVERT() on every query in my application. i think the right strategy is to make sure the database is in the right character set and you're connecting to the database with the correct charset. As mentioned, it works for me without having to modify my queries with CONVERT(). You shouldn’t have to either.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

You mentioned in your initial post that you found various hacks online. Was CONVERT() one of the ones you were already looking into?

I’m sure there is a MySQL setting that can fix this for you. As mentioned, it works fine for me when I query MySQL from within PHP without having to do any type of conversions.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

What happens when you do:

SELECT CONVERT(UNHEX(HEX('string')) USING utf8mb4);

You can see from https://dev.mysql.com/doc/refman/8.0/en/mysql-command-options.html#option_mysql_binary-as-hex that it shows that as of MySQL 8.0.19, it displays binary data as hexadecimal when mysql is in interactive mode. You can disable it with the --skip-binary-as-hex flag when connecting via the command line.

I don't believe this is an issue if connecting via a web app and using an appropriate character set.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Sorry! I went on a bit of a tangent about BASE64 because I skimmed over your initial question and saw you were doing things such as UNHEX(HEX()).

Let me answer your question now: I think it has to do with the encoding you're using for your database. When I do SELECT UNHEX(HEX('string')); I get string back. I'm using MySQL 8 with a server charset of UTF-8 Unicode (utf8mb4).

What happens if, when connecting to MySQL from the command line, you add the flag --skip-binary-as-hex?

cored0mp commented: This showed promise, but did not fix the error. Instead I had to use the CONVERT() function +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

The reason I ask is because something we use here at DaniWeb is:

// Convert from Base 10 to Base 36
function encrypt_id($id = 0)
{    
    return base_convert($id, 10, 36);
}

// Convert from Base 36 to Base 10
function decrypt_id($id = 0)
{    
    return intval(base_convert($id, 36, 10));
}

This is PHP, but you get the point. I suspect python has a similar function.

And then the MySQL equivalent of those would be:

CONV(id, 10, 36) // From Base 10 to Base 36
CONV(id, 36, 10) // From Base 36 to Base 10

Base 10 system allows for the characters 0,1,2,3...9 (Hence 10 different characters used to represent the number)
Base 36 system allows for 0-9 as well as A-Z (Hence 36 different characters)
Base 62 system allows for 0-9, A-Z, and a-z, but php's native base_convert() function doesn't support it

We do this for integer ID #s because the encoded versions are both portable and fewer bytes, which serves us well in a couple of different areas. For example, instead of the number 987654321 we can send GC0UY9.

You should be able to use the same/similar algorithm for ASCII strings.

Base 64, which is essentially Base 62 plus + and / characters, is used a lot to encode/decode strings, such as to transport binary data over email. Therefore, there's a MySQL FROM_BASE64() and MySQL TO_BASE64() as well as, in PHP, there's base64_encode() and base64_decode(). A quick Google search showed that Python has similar functions e.g.:

import base64
string = …
cored0mp commented: Thanks! This helped. Ended up solving it with CONVERT (FROM_BASE64('TXkgY2F0IGxpa2VzIHRvIGNoYXNlIGVsZXBoYW50cyE=') USING utf8mb4) +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I suspect it's failing because of a 500 error.

Line 14 has $$key instead of $key. That's probably a typo. Also, that loop doesn't do anything since you're not passing the value into the loop by reference. You would want to do foreach ($_POST AS $key => &$val) instead if your goal is to overwrite the values in the $_POST array.

Line 19 is trying to pass variables into the MySQL query that are undefined. What is the value of $location, $theme, etc. meant to be?

phpiodore commented: yeah that's what I thought too! good catch! +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

This sounds to me like Rehoboam in Westworld Season 3.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Can you try adding a bunch of debug code to this?

Firstly, after line 10, try echo'ing out something like:

echo "ID found: " . $_POST['id'];

Perhaps the entire block is being skipped entirely.

The second thing is on line 11, we set $db = new DbController();. Are we sure that $db is now set to a valid MySQL connection? Where are you setting HOST, UESR, PASS, and DB? I'm not familiar with DbController() as I use PHP's MySQLi library to connect.

The third thing is on line 19, we are passing in $location, $theme, $description, and $id, but where are those variables being created? On line 10 we are passing in an 'id' as a $_POST request, but I don't see anywhere anything like:

// Set the $id variable to the value of $_POST['id'], or to 0 if 'id' was not sent in the HTTP request
$id = $_POST['id'] ?? 0;
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I have a slightly different attitude towards this stuff than you have. I honestly don't care at all about achieving 100% in PageSpeed Insights. To me, those are just numbers that an algorithm is using to count the number of good or bad techniques they discover on the page, but aren't necessarily a reflection of what end-users think of the page or what the performance or UI/UX experience is like at all. As you pointed out, it's showing anywhere from 98% to 100% for desktop performance, and also saying the core web vitals assessment failed.

Instead, I use the recommendations from PageSpeed Insights, WebPageTest.org, etc. to let me know about low hanging fruit (that's easy to change), or let me know where my big problem areas are so that I can investigate them further myself. But then I leave it up to my own investigation to decide whether it warrants being fixed, or is a non-issue in my book, etc.

As pointed out in my previous messages, my biggest problem with all of this is that DaniWeb relies on ads, and that's not going to change anytime soon. Ads are very resource-intensive, CPU-intensive, and bandwidth-intensive. That's also not going to change. Sometimes we run a campaign for a few months that has a very lightweight ad, and sometimes we don't. We're at the whim of ad agencies that inject all sorts of tracking pixels into their ads. Not to mention ad servers point to other ad servers that point to …

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

The Google Analytics javascript tag we use in our HTML <head> is:

<script async src="https://www.googletagmanager.com/gtag/js?id=G-3BQYMGHE7E"></script>
<script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());    
    gtag('config', 'G-3BQYMGHE7E');
</script>

Then, there are a handful of gtag() calls elsewhere on the page.

I'm confused by how async works in this context. How does the page know not to call any of the gtag() calls until after the async JS has completed loading? I thought that by adding async, it's non-blocking? Doesn't that mean the rest of the page continues?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

We are in the process of upgrading both the version of Codeigniter PHP framework we are using, as well as the version of PHP we're on. We are just putting some final touches and anticipate going live in the next few days. I'll update this thread when we do. If you spot any bugs or things look wonky, please be sure to let me know.

rproffitt commented: "Good luck. We're all counting on you." - Airplane +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I'm a fan of the Percona flavor of MySQL. DaniWeb used to do a lot of work with Percona back when they were a small startup and I had the cell number of the owner. Nowadays they're too big for us ;)

cored0mp commented: Thanks Dani! +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I code in PHP with MVC architecture. Each model and controller are their own class and there is one per file. Views are PHP templates, also one template (which typically represents either a full HTML page, or a large, reusable segment of an HTML page) per file.

rproffitt commented: This. Follow what works best for each language and of course your preferences. +17
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Glad you were able to get it working. I'll mark this question as solved.

Sorry that my initial post was so sparse, I was messaging you from my phone so I wasn't able to be as elaborate as I would have wanted.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I believe you need to connect to the appropriate database first, before issuing the create table command. From my understanding, it is not possible to specify a database name from within the create table command.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Can you show what code you have so far and where you're stuck?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

“Too many hours wasted” isn’t necessarily the opinion of those who are opening their wallets to fund the company.

For example, there’s a very old research study from over a decade ago (can no longer find it) where Amazon showcased that they increased their revenue multiple-fold by a small repositioning of their shopping cart buttons, and another study where another tiny tweak was able to decrease page speed by something like 100 milliseconds, and resulted in increased time on site by a factor of 10x, resulting in insurmountable revenue gains that were visible in the stock market.

As an engineer on a big team, you might get frustrated on why so much deliberating, and going back to the drawing board, and re-deliberating, and more drawing board, is happening over things as small as moving buttons by 10 pixels, or changing the font size from 14px to 14.5px, but it’s the butterfly effect in full swing.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Why use an app when a pad of paper and a #2 pencil will do?

Simply because it won’t do. Check out the full feature set of Figma and you’ll see what I mean.

rproffitt commented: Yes, I've seen that before. Too many hours wasted on such only to toss it out, pencil out a new UI along with discussions about UX. BTDT too often. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

You added the word responsive. We do that with a few sketches. No longer use wireframe apps.

Modern apps are responsive. Check out Figma, which is the one I hear about most often these days.

rproffitt commented: Why use an app when a pad of paper and a #2 pencil will do? +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Like it or not, if you bypassed the step of responsive design wire framing, you are not taking UI/UX into consideration the way you probably should, and are not giving it the focus and time and attention and expertise from a usability expert that it needs to ensure success.

That’s fine if that’s where your priorities lay, but your answer to the OP’s question should probably have been something akin to “we don’t because it’s not within scope.”

Similarly, I code in production because I don’t have the money to properly reproduce my production environment as a staging server. I can admit that I bypass the crucial step of QA testing.

rproffitt commented: You added the word responsive. We do that with a few sketches. No longer use wireframe apps. +17
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Rproffitt, I think maybe you’re misunderstanding the question. Or at least I hope you are.

If you are working as an independent UI/UX contractor for hire, then the client would come to you with their conversion goals (whether that’s strictly signups, user engagement, etc.), and as the UI/UX expert for hire, it’s your job to come up with wireframes and design language that best achieves the problem at hand.

If you work as part of an internal team, the process is much the same, only your client is a different team within your company.

I would hope that a UI/UX expert would push back on what the client wants the interface to look like, and instead advocate for what is going to perform the best based on their vast experience in this realm.

You see, as app creators, we have a great overall sense of all the features and functionality our app encases, and we want to optimize for giving the end-user maximum visibility into it all. That often results in clunky interfaces that are super-intuitive to us, but very unintuitive, confusing, and overwhelming to end-users.

Enter the UI/UX expert, who serves as a middleman between the backend and frontend developers, while the master they serve is the marketing department.

Ethanbrody commented: I was just curious to know about this topic as an researcher, you might be consider me as a beginner :). I found exactly what I want to know. Thanks +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

macOS 10.4.11, known as "Tiger," is a very old version of macOS

This question is 15 years old. That's why they were using such an old version at the time.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

What I have noticed though is that some very well-known websites now display on desktops in a very large font, or the appearance of one..I guess this is mobile first, but I find it really irritating.-

You can always use Ctrl (or Cmd, if on macOS) and + or - to zoom in or out to adjust font size.

stokes commented: Yes, of course Dani. I was referring to my local machine and the browser I use. +3
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Well, I don't think that's a missing feature. I think that's the whole point of blockchain.

rproffitt commented: And it's why we couldn't use blockchain. The data lives forever and would eat us alive in hosting the data. And yes,we are required to host the data. +17
handyyy commented: hi +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Why wouldn't I use that?

Because you hijacked a new member's introductory post with something you could only discover from google-stalking them.

rproffitt commented: Never intended that. I wanted to see what their company offered and the first link didn't work so I asked about it here. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Where did you get that URL from? It's not in the poster's signature nor in their profile, nor is there a link to it from the VertexMinds website.

rproffitt commented: I wonder if they are working on it now. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

NetDragon Websoft named the AI program Tang Yu as its CEO in August, tasked with supporting decision making for the company’s daily operations.

It sounds to me like it's a great publicity stunt. The AI program doesn't actually hold all of the responsibilities and decision-making requirements of an actual CEO. I'm curious what decisions it "supports". It sounds to me like this is just a publicity stunt when, in reality, the actual powers-that-be simply use AI to collate company data, etc. that help influence their decisions.

rproffitt commented: Having worked with so many c-suite people over the years, wait, I can't write what I want to here!!! +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

How many companies have an AI CEO?

My guess is none that make it to any sort of profitability. What kind of wacky question is this?

rproffitt commented: There's two in the news. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

React.js, being a front-end JS framework, means that the UI gets rendered dynamically by the web browser. For a very long time, search engine bots didn't have the ability to interpret javascript accurately. Therefore, when a webpage interface is generated entirely via javascript, search engine crawlers didn't have the ability to spider any content on the page at all.

Nowadays, Googlebot is much better with Javascript, but it's still not perfect. Therefore, if your front-end is dynamically generated via JS, it's recommended to use static site generation.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

No clue where that came from. Nothing on DaniWeb is even orange.

rproffitt commented: It's just interesting to me. Not a big issue at all. All around us we see buggy apps. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

What result are you getting versus what you’re expecting?

TENG JUN commented: The compare and loop was not working as it intended probably cause it was my first time coding assembly so i couldnt know where the exact problem. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

For the web (since that’s my area of expertise): It depends on what the app will do. Certain programming languages and technology stacks are more suited for things like real-time messaging, for example. Other technology stacks might be more suited to searching big data (billions and trillions of records).

However, if it’s just a simple interactive website, or even something such as what powers DaniWeb, it doesn’t make much of a difference. It comes down to the skill set and expertise of your development team, since most of the “magic” is in the front-end javascript, and that will be the case no matter what backend language is chosen.

However, I do notice you’re posting specifically asking about mobile development, which I’m afraid is out of my wheelhouse. If you’re writing an iOS app, then I suspect objective-c. If you’re writing an android app, I’m afraid I’m not sure what native languages it supports.

However, I do know there are frameworks nowadays where you only have to write one app and it can deploy across both iOS as well as android.

I’ll leave someone better versed than myself in mobile development to more properly answer this question.

JamesCherrill commented: For IOS Swift is replacing/ has replaced Objective C +16
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hello! I'm sorry you're dealing with the frustrating experience of watching traffic just slowly decline, week after week, month after month, with no idea what to do to stop the downward trend. I've been there! I get it.

From what I understand of what you're saying though, the number of relevant visitors to the local business have remained consistent, and it's traffic from foreign countries that decreased. If that's the case, it would make sense that Google would figure out that the business only caters to local customers, and stop sending irrelevant traffic. Also, isn't that beneficial for your client to not have to pay for higher hosting costs for visitors that are never going to purchase anything?

Outside of Google Analytics, do you use Google Search Console?

It's hard to provide more information without actually seeing your Google Analytics or Google Search Console reports. Can you provide screenshots?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I will do a little more research, but I don't think this is currently possible. However, I also must admit this is outside of my area of expertise. Voice searches typically cater to local brick and mortar places ... e.g. "OK Google, what is a good restaurant in the neighborhood?" or searches that someone would typically do while driving hands-free or on-the-go.

My SEO expertise, while spanning a long career, is limited to working on DaniWeb, where almost all traffic is from people using desktops.

Mindmade commented: Yeag Got It! +2
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I might be mistaken, but I’m not so sure this is possible. I haven’t seen anything in Google Analytics or Google Search Console that lets me know if a keyword was typed in or queried via voice. I don’t think that Google exposes this information through an API, either, meaning that there wouldn’t be any third-party SEO tools that are capable of presenting you with this information. Outside of Google, I don’t think Apple releases this information about Siri powered searches either.

Does most of your traffic come from mobile? I would guess that voice searches tend to be more often performed in the car or when out and about, or times when it makes more sense to be hands-free.

Mindmade commented: But if we need to optimize our keywords for voice searches what should we do, is there any way? +2
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I wish I could offer you some assistance, but unfortunately this topic is completely outside my wheelhouse. I’m sorry. :(

I’ll tweet your post and see if someone on my social comes to your rescue.

Clif40RD commented: Thanks for trying Dani, it seems I may have to look else where for guidance +6
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Well hopefully this gets resolved soon ... will be on the lookout because I'm super screwed if January hits and the message is not lying.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

The reddit post you're referring to is referring to a different notification that accounts see when they have GDPR enabled already. It's definitely a confusing experience because it doesn't acknowledge that GDPR is already set up, but this is congruent with the message that my Google Ad Manager (where I have set up GDPR) shows.

My concern is that my AdSense account specifically has a (different) notification that explicitly says "You're not currently using a Google-certified GDPR message ...", and doesn't seem to be talking to Ad Manager?

rproffitt commented: I agree. And my take is it's broken at the moment. I read a dozen such discussions and no resolution yet. +17
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Also, in AdSense > Sites, the site URL is an exact match for the site whose GDPR message is set up in Ad Manager.

I'm out of ideas??

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

OK, so it gets even weirder. I decide to cave and create a GDPR message from inside my Google AdSense account anyways, since it continuously prompts me to. However, it then DOES NOT LET ME create a GDPR message because it says: "This site is managed in Ad Manager. Go to Ad Manager to make changes."

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

For some context, I use Google Ad Manager for all display ads on my site. Within the Privacy & Messaging section of Ad Manager, I have GDPR messages enabled for my entire domain. The message is published and the reporting stats indicate a sizable usage.

Additionally, various ad units have the option enabled to "Maximize revenue of unsold inventory with AdSense". As such, I have a Google AdSense account that earns revenue.

However, when I log into said AdSense account, I am confronted with the following message:

You're not currently using a Google-certified GDPR message to collect consent for GDPR, which means your site/s will stop showing AdSense ads and receiving revenue in the EEA and the UK on January 16, 2024.

I do not have any AdSense tags directly installed anywhere on my domain. There should be no AdSense impressions that were not loaded through Ad Manager, and, subsequently, no EU-based AdSense impressions that loaded without Ad Manager passing them through its GDPR alert.

Additionally, the Access and authorization > Third parties section of Google AdSense shows that its connection to my Ad Manager account is active.

What can I do to ensure that AdSense continues to work in 2024?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hello!

I would create an INDEX on the orders table in this order: order_date, customer_id, order_id, product_id

I would also create an INDEX on the customers table for customer_id, the order_details table for order_id, and the products table for product_id.

I don't see any inefficiency in your query itself, but I would definitely create those indexes.

Let me know if this works :)

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hi and welcome to DaniWeb! :)

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hi and welcome :)

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

If you’re concerned, it should be simple to convert your existing code to use a link instead of a button and still have it look the same.

Personally, my convention is it should be a link if you’re navigating to a new page or fetching content. It should be a button if you’re making a POST request, or submitting data, such as a search query, a login, or even a one-click vote button that isn’t necessarily a part of a form. Googlebot should have no reason (nor ability) to populate forms, press buttons, or send data back to your servers.