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

For what it's worth, I've heard many good things about Apigee over the years, and haven't heard about any of the others you mentioned. Apigee looks to now be owned by Google.

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

Anyone have any interest in 3D 360 degree virtual reality video?

It's rather a sore subject. We hired a professional VR videographer to capture our wedding in 10K resolution 3D 360 degrees so we could relive the entire day on the Oculus for years to come.

There was a misunderstanding. Instead he captured it all in 11K 2D.

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

I think that website copied my color scheme LOL.

rproffitt commented: “Imitation is the sincerest form of flattery that mediocrity can pay to greatness.” - Oscar Wilde +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Yes, you should. The first one correctly converts & to &.

Both of these are equally valid:

// Version 1 converts & to & with htmlspecialchars()
$serps_url = $_SERVER['PHP_SELF'].'?'.http_build_query($array);
echo '<a href="' .htmlspecialchars($serps_url) .'">' ."<b>$i</b>" .'</a>';

// Version 2 converts & to &amp; with http_build_query()
$serps_url = $_SERVER['PHP_SELF'].'?'.http_build_query($array, '', '&amp;');
echo '<a href="' . $serps_url .'">' ."<b>$i</b>" .'</a>';

and this is not valid HTML:

// This produces HTML that includes & where it should be &amp;
$serps_url = $_SERVER['PHP_SELF'].'?'.http_build_query($array);
echo '<a href="' .$serps_url .'">' ."<b>$i</b>" .'</a>';
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Not anymore, jackdaniel. Google's Helpful Content Update that launched last week I think will put a stop to guest posts that include backlinks.

rproffitt commented: This makes one ask "Who moved the cheese?" +16
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I think you mean HTML, Javascript, and CSS?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member
jwatson commented: Thanks Dani for reply, That is only ebay listing tool, I am talking about a tool which work for all online stores like Etsy, Alibaba, Walmart, etc. +3
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Have you ever taken a look at Rosetta Code? It lists over 1,000 "programming tasks" ... e.g. reasonably short classroom exercises, and then presents the code to accomplish each task in many, many different languages.

These would be good exercises to go over with your class to follow the algorithms, and then see how those algorithms translate across programming languages.

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

Please help us to help you :)

Can you please show us the code you have so far, where you are stuck, what’s confusing you, and how we can help you to successfully complete your homework assignment. Much thanks!

Mighty_2 commented: using System; public class SwimmingWaterTemperatur { public static void Main() { while(true){ Console.Write("\nPlease enter the water temperatur +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

When I run getStats() on my PHP instance, it results in the following:

array (
  '10.143.27.235:11211' => 
  array (
    '����' => '',
    'pid' => 3602,
    'uptime' => 49804,
    'time' => 1663088274,
    'version' => '1.5.22',
    'libevent' => '2.1.8-stable',
    'pointer_size' => 64,
    'rusage_user' => 30.254434,
    'rusage_system' => 62.188442000000002,
    'max_connections' => 4096,
    'curr_connections' => 2,
    'total_connections' => 23609,
    'rejected_connections' => 0,
    'connection_structures' => 3167,
    'reserved_fds' => 40,
    'cmd_get' => 40992,
    'cmd_set' => 449861,
    'cmd_flush' => 0,
    'cmd_touch' => 0,
    'cmd_meta' => 0,
    'get_hits' => 8371,
    'get_misses' => 32621,
    'get_expired' => 11,
    'get_flushed' => 0,
    'delete_misses' => 0,
    'delete_hits' => 0,
    'incr_misses' => 0,
    'incr_hits' => 0,
    'decr_misses' => 0,
    'decr_hits' => 0,
    'cas_misses' => 0,
    'cas_hits' => 0,
    'cas_badval' => 0,
    'touch_hits' => 0,
    'touch_misses' => 0,
    'auth_cmds' => 0,
    'auth_errors' => 0,
    'bytes_read' => 15221200168,
    'bytes_written' => 310816593,
    'limit_maxbytes' => 6442450944,
    'accepting_conns' => 1,
    'listen_disabled_num' => 0,
    'time_in_listen_disabled_us' => 0,
    'threads' => 8,
    'conn_yields' => 226,
    'hash_power_level' => 17,
    'hash_bytes' => 1048576,
    'hash_is_expanding' => 0,
    'slab_reassign_rescues' => 0,
    'slab_reassign_chunk_rescues' => 0,
    'slab_reassign_evictions_nomem' => 0,
    'slab_reassign_inline_reclaim' => 0,
    'slab_reassign_busy_items' => 0,
    'slab_reassign_busy_deletes' => 0,
    'slab_reassign_running' => 0,
    'slabs_moved' => 0,
    'lru_crawler_running' => 0,
    'lru_crawler_starts' => 10557,
    'lru_maintainer_juggles' => 2063686,
    'malloc_fails' => 0,
    'log_worker_dropped' => 0,
    'log_worker_written' => 0,
    'log_watcher_skipped' => 0,
    'log_watcher_sent' => 0,
    'bytes' => 4544738368,
    'curr_items' => 133847,
    'total_items' => 137181,
    'slab_global_page_pool' => 0,
    'expired_unfetched' => 97,
    'evicted_unfetched' => 0,
    'evicted_active' => 0,
    'evictions' => 0,
    'reclaimed' => 4,
    'crawler_reclaimed' => 110,
    'crawler_items_checked' => 3211510,
    'lrutail_reflocked' => 0,
    'moves_to_cold' => 130364, …
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Keep in mind that Google Places also has a little dongle that it sends to brick and mortar places to hang above their doorframe. Google then "sees" any Android user that walks through the doors. I'm not sure what else they may use it for, but at a minimum, they use it in Google Maps to show when a store or restaurant's busiest time of the day is.

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

I'm not familiar with Payment UI. Is it a specific payment system or are you just generically referring to something such as Braintree or Stripe?

It seems like you might want something such as https://pub.dev/packages/flutter_stripe?

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

Move from index i to index (i+1)

I haven't looked at C++ in forever, but if you are at array[i] then can you just move to the next one by doing array[++i]?? My assumption would be that ++i would first increment i, and then trieve the array element at the incremented index.

Move from index i to index (i-1)

So then to go from index i to index i - 1 I suppose would be array[--i]?

Move from index i to index j, if a[i] == a[j]

Does that mean that we need to loop through all the elements in the array checking if they have the same value as a[i], so that we can find the value of j?

The first line of each test case contains a single integer T denoting the number of test cases. Each test consists of two lines. First line denotes N the number of elements in the array. Second line contains N space separated integers.

Sorry, I have no clue what this means? What test case is being referred to? Is this homework assignment a continuation of something that was explained in class? I don't understand what the contraints are. What is T, N, and Ai?

darshanghorpade commented: 1. T means number of test cases that is how many arrays you are going to enter +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

This sounds to me like something that can just be done in Microsoft Access alone. What would be the purpose of VB.net in this case? How do you imagine it to look?

It sounds to me you could create a handful of tables in a relational database: students, teachers, subjects, classes, and class rosters.

Every class has a teacher. Every student is assigned to multiple classes.

Student table:
StudentID (primary key)
First Name
Last Name
School Year (Freshman, Senior, etc.)

Subject table:
SubjectID (primary key)
Curriculum

Teacher table:
TeacherID (primary key)
Name

Class table:
ClassID (primary key)
TeacherID
SubjectID

Class roster table:
ClassID
StudentID
Grade (A+, B, etc.)

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

Just found this:

// This script is released to the public domain and may be used, modified and
// distributed without restrictions. Attribution not necessary but appreciated.
// Source: https://weeknumber.com/how-to/javascript

// Returns the ISO week of the date.
Date.prototype.getWeek = function() {
  var date = new Date(this.getTime());
  date.setHours(0, 0, 0, 0);
  // Thursday in current week decides the year.
  date.setDate(date.getDate() + 3 - (date.getDay() + 6) % 7);
  // January 4 is always in week 1.
  var week1 = new Date(date.getFullYear(), 0, 4);
  // Adjust to Thursday in week 1 and count number of weeks from date to week1.
  return 1 + Math.round(((date.getTime() - week1.getTime()) / 86400000
                        - 3 + (week1.getDay() + 6) % 7) / 7);
}

// Returns the four-digit year corresponding to the ISO week of the date.
Date.prototype.getWeekYear = function() {
  var date = new Date(this.getTime());
  date.setDate(date.getDate() + 3 - (date.getDay() + 6) % 7);
  return date.getFullYear();
}
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Sorry, I'm not understanding you. You would want it to be Javascript, not PHP. Something like this:

function updateInput()
{
    var dateInputField = document.getElementById('serviceDate'); // This is the Session Date input field
    var sessionDate = new Date(dateInputField.value); // This is the date entered in the input field
    var firstDayOfYear = new Date(sessionDate.getFullYear(), 0, 1); // This is January 1st, <year of sessionDate>

    // This logic is a little off, I found it via a Google search but there might be something better out there
    var dayOfYear = Math.floor((sessionDate - firstDayOfYear) / (24 * 60 * 60 * 1000));
    var weekOfYear = Math.ceil(( sessionDate.getDay() + 1 + dayOfYear) / 7);

    // Provided that the input box for the week has the ID serviceWeek
    document.getElementById('serviceWeek').value = weekOfYear;
}
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

If you want the week number to dynamically change when the end-user changes the Session Date, then you will want to use Javascript, not PHP, to update the week.

Can you please show the code you currently have for the javascript updateInput() function? What you would want to do is modify that function so that when serviceDate changes, you're also changing what populates in the Week field. That is, if I am understanding you correctly.

Nine_2 commented: I don't have javascript for that one since I can't get how to have the weeknumber date. I just saw that PHP code and that's what I'm trying to do. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I would argue that SEO can still be more effective than social media in terms of digital marketing. It depends on your product, I suppose. There’s a right fit for each audience and niche.

Jawass commented: So SEO extension will be good and activist cowriter as publishers have to get the right plugins for their project development. +2
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

According to this page, Google requires "as a rule of thumb" that the SXG expiration date is less than 1 day in the future if the content is JS, or otherwise 7 days in the future.

My external Javascript files are immutable. Why should they have a 1 day cache life? Currently I am doing something similar to max-age=3600, s-maxage=604800 for HTML files, and a flat max-age=2592000 for JS.

Is this not ideal?

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

I just saw in your profile that you’re in Bangladesh. You will want to use utf-8 for non-English email.

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

I’m not near my computer right now to double check, but if memory serves, I use UTF-8 for email and never had an issue.

It would be recommended to use something like utf8 or utf8mb4 if you have a global audience where the email body can contain non-Latin characters.

I wouldn’t say that iso-8859-1 is outdated, per se, but rather that it is only capable of handling Latin characters. Nowadays, it’s much more common to want the flexibility to include emojis in your content, etc. The other thing to consider is most databases use some variant of UTF-8, and you always want to be consistent when pulling data from one place and displaying it somewhere else. I remember a couple of years ago we ran into an issue where our database used one character set, and the database connection was set to a slightly different character set or collation or something like that. (I think one used utf8 and the other used utf8mb4, and it ended up causing some trouble when members had Asian-language usernames).

That was a very long story, typed on my iPhone, to say you should be perfectly safe using utf-8 for your email. Just limit your use of emojis and such because bulk email can get flagged as spam.

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

I was able to find URLDownloadToFile() but what is URLDownloadToFileA()? Is that a typo or a function you wrote?

toneewa commented: No typo. It's a built-in fuction. You'll see it in the header urlmon.h. Rare. It's not talked about much, but I remember switching to fix old code. +1
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hi,

Per our private chat, can you please give a little more detail in terms of where you are stuck or confused? Our goal is to help you complete the assignment, but also to teach you how to do it yourself, so you won’t need as much assistance next time.

queency zyrel commented: k. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Trying to get some insight into motivation so I can come up with ways to do a better job giving you what you want.

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

I don't know C++, but here's how I would set something like this up in PHP:

// All players have a name and belong to a team
class Player {
    private $name;
    private $team;

    // Create a new player by passing in their name and team
    public function __construct($name, $team) {
        $this->name = $name;
        $this->team = $team;
    }
}

// A baller is a type of player
class Baller extends Player {
    private $wickets = array();

    // Add the # of wickets for a tournament onto the array of wickets for this player
    public function new_tournament($wickets) {
        $this->wickets[] = $wickets;
    }

    // Print out a list of the number of wickets taken for this player in each tournament
    public function display() {
        print_r($this->wickets);
    }

    // Return a sum of this player's total wickets taken across all tournaments
    public function assessment() {
        return array_sum($this->wickets);
    }
}

// A batsman is another type of player
class Batsman extends Player {
    private $scores = array();

    // Add a new score for a tournament to the array of this player's tournament scores
    public function new_tournament($score) {
        $this->scores[] = $score;
    }

    // Return this player's average score across all of his tournaments
    public function assessment() {
        return array_sum($this->scores) / count($this->scores);
    }

    // Print out a list of this player's scores
    public function display() {
        print_r($this->scores);
    }
}

$player1 = new Batsman('Dave', 'Team DaniWeb');
$player2 = new Batsman('Joey', 'Team DaniWeb');
$player3 = new Baller('Mike', 'Team DaniWeb');

$player1->new_tournament(5);
$player3->new_tournament(1);
$player3->display();

This does almost everything that your assignment …

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

Is this a photoshop challenge for me?

Are your photoshop skills really good enough to be convincing? I have 15 years of PS experience and can barely make a convincing stick figure with Adobe Illustrator.

rproffitt commented: WooHoo! I guess we could have a contest! I'll be busy for a few days but maybe for the Meta? I'm more of a cartoon/meme maker at the moment. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I’m using the UA tag to populate both my original UA account as well as GA4, and the users and page view difference is absolutely astounding. Probably like a 20% discrepancy in UA’s favor. UA is set to exclude bots.

Is anyone else having a similar experience?

AussieWebmaster commented: also seeing more in UA - but maybe 10% - have to set up GA4 filters next +4
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I think I could have a sex change, and grow out a full beard, quicker than I could learn how to convincingly photoshop a photo of myself.

rproffitt commented: Is this a photoshop challenge for me? Since retiring I do a lot more graphic editing! +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

It’s also not Java.

The question was tagged both c++ and java. I don't think the OP has a preference, and can probably follow along with either.

JamesCherrill commented: Maybe, but the title is pretty clear +15
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Sounds good. Marking as solved.

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

If I look at the PHP.net manual, I see that the arg_separator is the third parameter to be passed into the function.

The second parameter, numeric prefix, is unrelated to what we are discussing.

The reason you are not realizing the difference in the example where it works versus the example where it doesn't work is because &amp; looks like '&' in your web browser. But if you go to View Source and actually investigate the HTML code that is being generated, you will see the difference. You always want your HTML code to have &amp; in it and never any & on its own, regardless of it's part of a link or not.

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

Just to follow up … The code I provided quickly here could easily be implemented with Memcached instead of Redis.

Please also don’t get caught up in the specific syntax I am using, as I’m using Codeigniter 3’s native redis library.

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

My comment was specific to this code snippet. Why would an embedded device run a Java based web server that requires a JRE, etc? Wouldn’t it be more appropriate to be written in C if you need such close control over memory management, etc?

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

Is code like this still necessary anymore with the JDK including a web server by default, then?

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

Can you provide an example of how someone can use this code in an editor? For example, a text editor class that actually utilizes this struct? Otherwise, on its own, there's not much value here. Why does the textnode need to include a pointer to the next textnode? What are you expecting gets stored in the new paragraph position? What is the purpose of a boolean for whether the node starts a paragraph or not?

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

Here is the function that I use here at DaniWeb to manage flood control. It keeps track of how often a specific user or IP address is making a request, and increments a counter. If there have been no requests after 5 minutes, the counter resets to 0. It returns false if the counter reaches more than 10 requests (in that 5 minute period).

Here is what the Codeigniter redis library looks like:

    /**
     * Get cache metadata
     *
     * @param   string  $key    Cache key
     * @return  array
     */
    public function get_metadata($key)
    {
        $value = $this->get($key);

        if ($value !== FALSE)
        {
            return array(
                'expire' => time() + $this->_redis->ttl($key),
                'data' => $value
            );
        }

        return FALSE;
    }




    /**
     * Save cache
     *
     * @param   string  $id Cache ID
     * @param   mixed   $data   Data to save
     * @param   int $ttl    Time to live in seconds
     * @param   bool    $raw    Whether to store the raw value (unused)
     * @return  bool    TRUE on success, FALSE on failure
     */
    public function save($id, $data, $ttl = 60, $raw = FALSE) { ... }



    /**
     * Increment a raw value
     *
     * @param   string  $id Cache ID
     * @param   int $offset Step/value to add
     * @return  mixed   New value on success or FALSE on failure
     */
    public function increment($id, $offset = 1) { ... }
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

This would seem to be outdated today as most systems are online.

I think the point of the code that jnbgames.dev has been posting lately are meant more as learning exercises than code snippets that could actually be utilized in production in the real world.

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

... Oh, but the good news is that phpMyAdmin was written in PHP, and since it's executing on your server, that means your server is correctly configured to execute php files.

You need to upload your PHP file(s) to your web server and then execute them directly from a web browser.

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

What are you calling a "server database php administrator" is actually phpMyAdmin, a php-based web script used to provide a user interface for MySQL databases.

The reason that it isn't working is because you are entering PHP code in a text area designed for SQL database queries. It is not able to interpret PHP code.

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

Sorry, I'm not understanding your retort. Are you agreeing with me that there's no such thing as good-natured trolls, or are you disagreeing with the Miriam-Webster dictionary?

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

Why is highScore a pointer?

int* highScore = 0;
Kate_12 commented: My assignment specifically requires it to be +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

The code you posted is not heeding my advice. My advice is that you don't need to use urlencode() or htmlspecialchars() if you are using http_build_query($array, '', &amp;'). (Note the semicolon at the end of the &amp;, as you left it off.)

The prefix string says what to use to separate query string parameters. The default would be & as in ?foo=1&bar=2&baz=3&bat=4. However, as previously explained, & is not valid HTML, so we would use htmlspecialchars() on the URL to convert it to ?foo=1&amp;bar=2&amp;baz=3&amp;bat=4. However, we don't need to do that if we just tell http_build_query() to use &amp; instead of & to begin with.

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

mysqli_error() refers to the last MySQLi function call of any type. mysqli_stmt_error() refers to the last MySQLi statement (an INSERT, DELETE, UPDATE, SELECT, etc.). This is just a stab in the dark, but my guess is that the difference is that mysqli_error() will also error on connection failures, while mysqli_stmt_error() will not.

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

Hello! Thank you for posting this.

Here at DaniWeb, we use the Markdown syntax for posting. (You can get to that page I just linked to by clicking the little question mark in the editor toolbar).

If you scroll down that page to where it says Lists, you can see:

Optionally, if you'd like to be lazy, as long as you start your list with 1. , Markdown will keep track of the line number for you, so you can prefix every line with 1. , for example.

This is a feature of the Markdown language, and not my own invention. The correct way to generate:

  1. Code Block 1:

     if(!mysqli_stmt_prepare($stmt,$sql_count))
         {
             echo __LINE__; echo '<br>';//DELETE
    
             echo 'Mysqli Error: ' .mysqli_stmt_error(); //DEV MODE.
             echo '<br>';
             echo 'Mysqli Error No: ' .mysqli_stmt_errno(); //DEV MODE.
             echo '<br>';
             die('Registration a Failure!');
     }
  2. Code block 2:

     if(!mysqli_stmt_prepare($stmt,$sql_count))
         {
             echo __LINE__; echo '<br>';//DELETE
    
             echo 'Mysqli Error: ' .mysqli_error(); //DEV MODE.
             echo '<br>';
             echo 'Mysqli Error No: ' .mysqli_errno(); //DEV MODE.
             echo '<br>';
             die('Registration a Failure!');
     }

Is as the following:

1. Code Block 1:

        if(!mysqli_stmt_prepare($stmt,$sql_count))
            {
                echo __LINE__; echo '<br>';//DELETE

                echo 'Mysqli Error: ' .mysqli_stmt_error(); //DEV MODE.
                echo '<br>';
                echo 'Mysqli Error No: ' .mysqli_stmt_errno(); //DEV MODE.
                echo '<br>';
                die('Registration a Failure!');
        }


1. Code block 2:

        if(!mysqli_stmt_prepare($stmt,$sql_count))
            {
                echo __LINE__; echo '<br>';//DELETE

                echo 'Mysqli Error: ' .mysqli_error(); //DEV MODE.
                echo '<br>';
                echo 'Mysqli Error No: ' .mysqli_errno(); //DEV MODE.
                echo '<br>';
                die('Registration a Failure!'); …
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

On line 69 of the code snippet you posted, you deleted game1.highScore.

Then, on line 70, you pass game1 into the function high_score().

When I look in that function beginning on line 269, I see you are setting game1.highScore to a value, and then returning a pointer to game1.highScore.

I'll be honest with you. I haven't looked at a single line of C++ code in twenty years. But, I have to ask, why delete game1.highScore, and then on the next line, set it to a new value. Can't you just overwrite its value? It looks like you're passing game1 into high_score() by reference so you should be overwriting the value of game1.highScore already, no?

What's the advantage to returning a pointer instead of just returning game1.highScore? Why is highScore a pointer to begin with? My stab-in-the-dark guess is that you're getting an error message because you're setting a value to game1.highScore inside the function to be an integer object, yet highScore has been defined as a pointer. And then you're returning that pointer.

I wish I could be more help, but I have been doing PHP for the past 20 years, which has syntax very similar to C++, but doesn't use pointers so explicitly.

Kate_12 commented: The high score after the deletion was to debug the program to see if the high score above was actually deleted +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hi,

If you look at the description for http_build_query then you can see that it: Generates a URL-encoded query string from the associative (or indexed) array provided.

In other words, the benefit to using http_build_query() is that it loops through all the elements in the array and adds urlencode() to each of them, so you don't have to waste lines of code doing it yourself.

You still need to use htmlspecialchars($serps_url) to convert the & character in the query string into &amp;.

However, if you refer to the PHP docs article I linked to earlier in this post, it looks like the http_build_query() function has thought of everything, and allows you to pass in the argument separator &amp; so that you don't have to use htmlspecialchars() either!

echo http_build_query($array, '', '&amp;');

... should do both urlencode() and do htmlspecialchars() for you.

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

Personally I use intval().

borobhaisab commented: Nowadays me too. Migrated from the 2nd example once I learnt about the intval. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

You didn’t change either of the things I said to change. I’m in the car now nowhere near a computer. When I get home in a few hours, I can try to make the corrections for you and show you updated code. In the meantime, try applying the two code changes I said to make in my last few posts.

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

Show Google that you’re back in action! Right now, Google thinks your company is most likely out of business. Prove to them that isn’t the case by showing how “active” your website is. Link to it from your Facebook, Twitter, or other social media accounts. Post about it on social every so often. Perhaps start a blog on your website with a new article once a week or so, so Google can see that there’s new content still being added to the website (and it’s not just an archive of past achievements of a defunct business). If you haven’t already done so, submit a Google Sitemap file to the Google search console, which is a listing of all pages on your domain along with a timestamp of when they were last updated. Basically, do everything you can to make as much noise as possible that things are still movin’ and shakin’.

Sam_837 commented: I spend the most time on Google post and I published it every week. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Honestly I put so little value into keyword research these days. But I live for Screaming Frog for site navigation.