star rating for workers in a flutter app using NODE JS with MYSQL - mysql

anyone can help me in my flutter project. I designed a page that shows star rating for a worker, from one to five and I want to write a suitable function in node js file with MYSQL database in phpMyAdmin, the query of the function aims to take the input rate from the user and send it to the database according to the id or username of the worker and calculate the average rating from multiple users for the same worker

Related

How do I make it possible that my spring boot application updates the created_by automatically when I have when say adding products to a product table

Dears, I am able to create a rest api that saves, deletes and updates products or asserts and within the asserts entity class I have a created_by field mapped to a database table which I can only update by typing my name every time to show that I am the one who have created it, but however this is not what I want, I have got a rest api that simply asks for my username and password and validate against the users table in the database.
So I want the this userid to continue to linger into the application session as long as the rest api app is running and then when I create new asserts(products) the methods defined for saving those products should automatically save that currently running user_id in memory.
I have no idea how I can accomplish this. Please any ideas.
I have created my entity classes for Asserts, Users and I can perform all CRUD actions on them successfully but the problem is on saving the user automatically without manually saving the user_id everytime an assert(product) is added, deleted, or updated.

Notifications in webapplication using mysql servlet and jsp

I am developing a webapplication which is a cab booking system.
The working is when the customer books a cab the request information will sit into the database. The admin will view it in the web-application and book cab for the customer.
What I want to do is the admin must get a notification that will show the total number of requests received for every 1 min.
How can I do this? What is that I need to use for doing this?
I'm using servlets,jsp and mysql.
Any help would be much appreciated!Thanks!
You need to maintain the time-stamp feature in database side,based on time-stamp we will get the latest requests comming from customer.and also you need to use the ajax calling.

Working with multiple facebook apps user id v1.0 and v2.0

We're using multiple Facebook apps for our product, in V1.0 we used to get the same user id for all apps. We save accounts collection in our db in which we save Facebook id in and creating new accounts for users in which we don't have their FB id already.
Last week we've created a new app, when we started to use it we found out that we're getting a different id for existing users and we're creating a new account for them in our db. (This happened because the new app was created on v2.0 as explained here - https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids)
I read that we can use business manager in order to define all apps and get all the user id for all apps under the same business (https://developers.facebook.com/docs/apps/for-business), but I couldn't find how can I connect these ids to the original id.
I saw a hack that once I have app_scoped_id, I can make a another FB api call to get the original id (Get Facebook User ID from app-scoped User ID) but this means I keep managing the FB ids on our db, is this a good approach? or should I move on to manage the app scope ids? how can I get them for my V1.0 apps before this transition takes place? can I migrate my data in db (when having FB global ids only)? or do I must have a user access token in order to get this info?
Thanks!
Ilana

Updating Woocommerce Orders Programmatically

I have an eCommerce site running Woocommerce on top of Wordpress, and the company running it has changed there shipping system to an external company who stores the products in their warehouse and ships the products when they are bought.
In terms of automation, downloading information on new orders and sending it to the shipping company is fine, but when they respond to me with an XML of the orders sent and the associated tracking numbers, I need to be able to have a system that automatically updates the orders (including sending out the emails necessary). However, the only way I currently know how to do that is to update the MySQL database. But with that method, the automated email system is overridden and ignored.
Does anyone know how I can update orders statues and other information programmatically, which would allow Woocommerce's internal functions to be executed in the same way as manually logging into the admin side and updating the order?
Found a solution to this yet?
The code below works to mark an order as complete, but does not execute other actions as you describe in the admin
// create a new checkout instance and order id
$checkout = new WC_Checkout();
$this_order_id = $checkout->create_order();
$order = new WC_Order($this_order_id);
$order->update_status('completed');

ios/Android targeted push notifications in AIR app

I was wondering if it is possible to have multiple custom push notifications setup in a single AIR App.
What I am trying to do is allow users to setup custom alerts based on information they would like to receive for example say user 1 would like to know when new actions or drama movies are released on DVD, user 2 would like to know when new comedies are released, user 3 would like to know when any new movie is released.
This is a simple example and there are possibly 1000's of options (postcode/zip information).
Thanks
Technically, there's nothing that wouldn't allow you to do this.
The implementation is mostly backend related though, let me just quickly draft a design for that here;
The user's device registers for push notifications at your backend service.
Your service takes the user's id stores in a DB and passes the device token to the corresponding push notification server.
Once the registration is completed, the user selects what items he'd like to get notified of (naturally your backend service has to know this information as well to store it in the DB).
As soon as a new action movie (or whatever kind of information the user registered for) is available, your service looks in the DB what users registered for that kind of movies and sends a message via push.
So a simple database and some server side scripting will get you going.