Click Here I have got the number to increase with a button and using an update panel it doesnt create a page that flickers (not what i wanted lol) but yes everytime a backend operation takes place, i need to increase the number by one and then after 8 hours, reset to zero just like the progress bar below (which is written in ccs, no java)

Sorry about the questions but i dont know where to start with the code behind ... any help would be much appreciated. :)


So you want a number in the web page to increment when a backend operation takes place? To do this 'on the fly' would require you to implement server-sent events or write something custom with websockets, which might be a little advanced for you at the moment.

I'd suggest creating a new endpoint in your backend that returns the correct number that you can poll for. So your web page, every few seconds, would ask the backend for the new number and display it. The response should look something like this {"operation_count": 34}.

Then you have two independent bits of functionality that you can test in isolation.

With regards to your progress bar, just use the standard element.


Here is a pic of my project

Basically what i am trying to achive here is as follows (I am very new to programming)

I have done the front end, now its the back end that is troubling me......

first of all... i have css that is creating a progress bar, this is fine but i am not sure how to code it so that it resets after 8 hours continuesly...
i tryed to add an updatepanel to stop it from resetting after a postback, but i could not solve it,..

Second problem is... I have a large number in the middle of the screen, what i need it to do is.... increment by one when an operation is executes (i.e on a packing station, when it has been scanned in to complete) this number should increment by one! .....

I am ok with the database set up and where to pull the data from... i am just having trouble in coding it too allow me to increment by one once a operation has been executed... (i dont want a button adding.... and both of the two functions need to have partial updates ...

here is my html so far ...

(I know it is messy, i am learning)

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="testlayout.aspx.cs" Inherits="testlayout" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <script runat="server" type="text/c#"></script> <head runat="server"> <title></title> <link href="Styles/Split2.css" rel="stylesheet" /> <link href="Styles/ProgressBar.css" rel="stylesheet" /> <style type="text/css">
    .center {
    .labelstyle {
   text-align: center;
    } ...

hi can any one help me i search for a solution for about one weak and i can't find it :

$dbhandle = mysqli_connect('localhost', 'root', 'toor', 'helmi');

mysqli_query($dbhandle,"SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'");


the problem is :

Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in C:\xampp\htdocs\db_connect.php on line 3

Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in C:\xampp\htdocs\db_connect.php on line 5

Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, boolean given in C:\xampp\htdocs\authentication.php on line 9

pealse help me !


Dear All!

I want to introduce a useful tool for PostgreSQL, called dbForge Studio for PostgreSQL.

The main idea behind this tool is to create, develop, and execute queries, edit and adjust the code to your requirements in a convenient and user-friendly interface.

Take a look at its project page:


If you have enough free time to download and use it, tell me what you think.

Thanks for reading this,
Jordan Sanders

Re: in Programming

OK, that's good.
In my experience, licencing per-machine for small companies is full of problems. The client has a hardware crash and needs to run the app on another machine immediately; the app is on a couple of machines and an employee copies it to another machine not realising he's making an unlicenced copy; they only need to run one copy of the app at any one time, but it could be on either of 2 machines; the list goes on.
Given that you have, and want to keep, good relations then maybe you should look at licensing the client company based on their expected number of simultaneous users, with annual reviews. Burn the company name into the code you ship to them, and relax.


@raj_30: Permit me to point you toward the Daniweb Forum Posting Rules before proceeding, as you just broke some of them. As a new member, you will be forgiven - mostly - for these mistakes, but you really don't want to make one of the regulars remind of these again.

  • Do not hijack old forum threads by posting a new question as a reply to an old one
  • Do not post the same question multiple times
  • Do provide evidence of having done some work yourself if posting questions from school or work assignments
  • Do post in full-sentence English
  • Do not write in all uppercase or use "leet", "txt" or "chatroom" speak

This last two are generally considered to also cover the practice of posting a series of fragmentary posts in the manner of a chat room or Twitter feed. As my own post demonstrates, you are not limited to 144 (or even 288) bytes of plain text, and posting sentences separately which could be part of a single post is irritating and inappropriate. Note also that you can edit posts up to 30 minutes after they have been submitted, so typos can be corrected after the fact as well (up to a point; we will forgive it if you simply didn't notice it until after that 30 minute window).

This forum is also unlike a chat room in that it can take hours or even days before someone gets around to reading and replying to ...

Re: in Programming

Like I said, you can incorporate a check at install and/or startup time that accesses a licence server that you control. In your licence server you can check which copy of the code it is, how many copies are running etc, and permit or refuse the app to continue running.
Alternatively you can require the client machine's MachineGuid/MAC etc and burn that into the version you ship to them. Your code can check that it's running on the machine that it was licensed for.
But the first thing to consider is your relationship with the client. If you don't mind antagonising them then just implement aomething in your sofyware and shut down their unlicenced copy/copies. But if you want to keep then as happy clients (and a good reference for future new clients) you need to resolve this by discussion and negotiation.



I am trying to resize image with bootstrap. Can anyone help me explain this phenomena: https://getbootstrap.com/docs/4.0/content/images/ ?

I am trying to resize the image on cell phone into smaller one with the same proportion.

I thought this code will be successful:


<!DOCTYPE html> <html> <head> <title>ABL Home</title> <link href= "styles.css" rel="stylesheet" type="text/css" media="screen"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <link rel="stylesheet" href="custom.css"> </head> <center><img src="images/Logo.jpg"></center> <hr> <br> <?php include('nav.php'); ?> <center><img src="images/Slide_Chicken.jpg" class="img-fluid" alt="Responsive image"><br><br>

The the code on the bottom. Why the image does not resize as I wish? It shows a horizontal scroll instead of resizing it.

This is strange.

Please help me out. Thanks in advance.

Re: in Programming

You can incorporate a check at instal and/or startup that accesses a licence server that you control.
Send a formal letter explaining the problem and offering a discounted price for the second install. if the client is honest they will respond suitably and you can negotiate. If they won’t cooperate then you have a problem. You can get lawyers involved but then your relationship with the client is destroyed.


Dear Friends,
I developed Desktop application in C# .Net for client. client purchased software and installed it one than more system without my permission. How to restict him to not installed software on Multiple systems?


Before proceeding, it should be mentioned that the header file "stdafx.h" is specific to the Windows Visual C++ compiler. Given that the professor has stated that the submitted code will be compiled using GCC under Linux, the inclusion of that header will be a showstopper for you - and one which is entirely unnecessary, as you don't use anything referenced in the header.

Now, to be fair to you, I need to note that the Visual Studio IDE will insert that into certain kinds of C++ projects automatically, on the assumption that the code is for Windows and only Windows. This is the sort of thing a novice cannot be expected to know, so it isn't your fault that you missed it.

Still, I recommend you remove it for now, and be on the lookout for it in the future.

I would recommend removing <cstdio> from the header and type implementation file as well, as it isn't actually used in either of those (yet). You probably will need it in the implementations of the functions pointed to by ItemPrinter() and PriorityPrinter(), but right now, it doesn't need to be there until you have something that actually uses the C Standard I/O library.

On a similarly pedantic and administrative note, I would recommend getting the unfilled information sections in the comments of the provided code before you go any further. It is a picayune and annoying thing, I know, but the sort of professors who give these kinds of pre-built ...

Votes + Comments
Good catch on system header. That would have been awkward :-/
Thank you this helps alot! alot of good tips!

Hi yall!

I have to create a priority queue with out using built in librarys. I have tried to write a bit of code so far, however I dont know if it works and am a little confused on a few things.

What follows this line is the main cpp file of the project.....

#include <cstdio>
#include "stdafx.h"
#include "pqueue.h"

using namespace std;

//Structure PQCell holds an item (item), priority (priority) and
//a pointer to the next item in the priority queue.

struct PQCell 
    ItemType item;
    PriorityType priority;
    PQCell* node;

    PQCell() : item(0), priority(0), node()

//Checks the the first element of the linked list (q) for
//a NULL value. If the list is empty this first element will be NULL.

bool isEmpty(const PriorityQueue& q)
    if (q.next == NULL)
        return false;
    return true;

void insertCell(PriorityQueue& L, ItemType x, PriorityType p)
    PQCell cell;
    cell.item = x;
    cell.priority = p;

void insert(PriorityQueue& q, ItemType x, PriorityType p)
    insertCell(q, x, p);

int main()

    return 0;

What follows this line is the header file that is supposed to accompany the main cpp file...

// CSCI 2530
// Assignment: ***
// Author:     ***
// File:       ***
// Tab stops:  ***

// **Say what this program does here.  (replace this comment)**

#include <cstdio>
using namespace std;

struct PQCell;

//Type definitions

typedef const char* ItemType;
typedef double      PriorityType;
typedef void(*ItemPrinter)(ItemType);
typedef void(*PriorityPrinter)(PriorityType);

struct PriorityQueue

    PriorityQueue* next;

        next = NULL;
    } ...

The screenshot starts by saying it is a phpmyadmin sql dump. Although we can't see the entire lines of code, it looks as if it is starting with the table definitions before the data itself is added. You will have to look for the create statements yourself to confirm this. you should also check for insert commands in the file.

So if it has been done correctly, all you need to do is change the name from database.txt to database.sql, and using phpmyadmin click on the import button, select your file and see what happens. Or copy and paste it into the sql query box in phpmyadmin. sometimes you get problems with file sizes however, and things run slow or grind to a halt.

To work successfully, the tables need to be created and populated in the correct order. IE if a table has three foreign keys it refers to, their tables must be created first so the foreign keys' source tables exist. You might have to run the import a couple of times if you get problems.

If you keep getting the errors, then sorry, but it's a bad dump file.

However it is much MUCH if you use a proper database backup plugin to create a backup of the site then restore it to the new site's server. That way any plugins and images are transfered as well.


I got a mysql database "backup" that someone made and I have to use it, trying to get a website back online. Its a Joomla web database. The person gave me a file "database.txt" (not database.sql) which opens with Notepad. Trying to "import" in phpmyadmin does not work and just gives out errors like

" Ending quote ' was expected. (near "" at position 4438), and " 42 values were expected, but found 21. (near "(" at position 3967)

I'm attaching 2 screeshots here so that you guys can see the contents of this file,somewhere it says mysql dumping, making me feel that the file was created by mysqldump, but I wonder why it shows up as .txt and not .sql file.

Is there a way I can still get this database into my server (offline or online)? I will appreciate a guide or an online tutorial on how to accomplish this. I really do need the database.


Attachments dbexport-1.PNG 60.23 KB

Hi @nishto,

Have you tried this query in a mysql CLI and confirmed the select fetches data properly?
To me, the SQL statement is not right:
"SELECT a.in_no, a.client, a.add, a.Date, a.subTotal a.gTotal, b.id, b.item, b.quantity, b.price from invoice a, invoiceItems b where a.in_no = b.in_id AND in_no = '$invID' ";
You have in_no = $invID: I believe you should have a.in_no, but not sure if it is a requirement.

Also, if you are expecting to have multiple results, I would suggest to declare $result as array and store the information through a while loop, otherwise, your fist match of the query is your only fetched data. Also, when showing the data you will need to loop through the resulted array to display data.
For testing purpouses, you can console.log the object to see how many entryes are there.

Hopefully this helps.