What are the best and most efficient tools to create a point-of-sales system?

Iā€™m a junior developer currently doing freelancing jobs. I have to create a point-of-sales system for a restaurant that can enable the establishment to recieve orders from customers and then convert the data to useful information such as summary of sales and inventory. Currently my plan is to use VB.net to create the user interface and connect it to an online database specifically MySQL where customer orders can be recorded. I would need to do this in the next 10 days. Any additional suggestions, recommendations, and advice to contribute more efficiency would be very much appreciated šŸ™‚

All topic

How can I create a function that prints out the number of deletions it has to make to remove char that are the same in a string?

This is the assignment. How can I make this?

Problem 1.1 : String Cleanup
You have been provided with a string s. Your task is to remove any matching adjacent characters and return the minimum number of deletions required to achieve this.

For example, here below are the wanted output:
AABBBBCCDD return 6
AAAAAA return 5
ABABABABA return 0

So I don’t want to count all the deletions of letters that are repeated in a string, only the one’s that are next to each other

All topic

Create custom post when order is placed

I want to create a custom post of type fundraiser-purchase when payment for an order is successfully completed. I also want to use some of the order details in the post content, including date, value and name of coupon code.

I’m trying to use the following code, but it doesn’t appear to want to work for me, and I’m not sure how to get the name of the coupon?

// Create custom post when placing order
// =============================================================================
function create_fundraiser_purchase_post($order_status, $order_id, $post, $checkout ) {

    $order = wc_get_order( $order_id );

    $order_data = $order->get_data();

    $order_id = $order_data['id'];
    $order_date_created = $order_data['date_created']->date('F j, Y');
    $order_discount_total = $order_data['discount_total'];
    $order_total = $order_data['cart_tax'];

    $title = 'Fundraiser Purchase' . $order_id . $order_date_created;

    $my_post = array(
        'post_title'    => $title,
        'post_content'  => 'Content',
        'post_status'   => 'publish',
        'post_type' => 'fundraiser-purchase'
    );

    $new_post_id = wp_insert_post( $my_post );

}
add_action( 'woocommerce_payment_complete_order_status', 'create_fundraiser_purchase_post', 10, 2 );

Code is loosely based on https://stackoverflow.com/questions/39401393/how-to-get-woocommerce-order-details and https://stackoverflow.com/questions/44977174/get-coupon-discount-type-and-amount-in-woocommerce-orders

Any clues what I might be doing wrong?

All topic

How do I create an applescript that when I log into my computer it automatically reopens my script

The script I have helps with my computers ability to edit videos. I only use my computer for editing. the script just activates a program that I have made. I want to be able open my computer after it been shut down and the program opens/runs automatically reopening the program.

I have tried to use the system preferences “open at log in” but that doesn’t work is there any other way?

All topic

How to Create local user in LDAP enabled linux systems

During my application install, I used to create a new group and a new user using the ‘groupadd’ and ‘useradd’ commands

groupadd my_group
useradd -r -s /sbin/nologin -g my_group my_user

But in one of the Linux machines, where the LDAP is enabled (the LDAP server is not running on this machine, but it’s configured for LDAP client), I find that the ‘groupaddanduseradd` commands are adding the group and user into the LDAP and not as local user / group.

I didn’t want to add the user/group to LDAP, as I actually needed a local user, who will be owning my applications config file and one of the process will be run using the new user. I don’t thing that LDAP user’s can be used for chown commands to change the file ownerships.

On googling, I found that there is a luseradd / lgroupadd command which can add the user locally. But this tools are present in only RHEL by default. So on other distros like Ubuntu and SUSE, it’ is not present by default and needs to be explicitly installed. So i can not rely on this luseradd/lgroupdadd utilities.

I don’t want to manually add the user and group in /etc/group and /etc/passwd file as it is a hack and it involves generating a unique group id and user id for my new group and user.

  1. Is there any other alternative to add a local user which can be used across all linux distros ?

  2. What is the best check to see if my machine is LDAP enabled ? I want to use this check to decide if I have to use useradd/groupadd commands or not.

All topic

Still cannot use `react-native link` after ejecting a Create React Native App

I started with a create-react-native app. Then, I wanted to add a dependency. So, I ran react-native link:

`react-native link` can not be used in Create React Native App projects. If you need to include a library that relies on custom native code, you might have to eject first. See https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md for more information.

So, I ran npm run eject and it successfully ejected. There are many changes to the package.json and some scripts have been added.

But, if I now run react-native link, I still get the same error!! How can I successfully run this command? How does it determine that I’m still using create-react-native?

I’m guessing there’s some flag somewhere that still says it’s using create-react-native, but I don’t know where it is. Any help is appreciated.

All topic

Create Tar On Ubuntu And Mac With Same MD5

I have a folder of files which I am trying to tar into an archive. I have the same files on a Mac and on a Ubuntu machine. If I run an rsync it shows that the directories are the same, but if I tar them and then take a MD5 sum the results are different. I have tried with both GNU tar and BSD tar on the Mac. Is there some option that has to be used to make the result come out the same?

Thanks.

All topic

How to create/animate a Theraband?

I’m working on animations of characters performing different activities, and several of these include a Theraband. If you aren’t familiar, it is a length of stretchy elastic. The basic shape is simply a flat strip, but I am having trouble making the physics right. I also need to attach it to the hands of a character to stretch and demonstrate the activity. Help please? I am very new to Blender and I know there is an answer for this challenge out there, and am looking forward to having it figured out. Thanks!!

All topic

QGIS. Dissolve polygons to create new layer with stats. Not working

I’m using QGIS 3.2.1 (Bonn)

I’m trying to dissolve and create statistics from a group of polygons, but QGIS is not making it. I do not know if I’m missing something or the software has a bug. These are my steps:

1- Select a group of polygons from a layer

2- Use the “Dissolve” tool of the GDAL add-on.

3- Characteristics to dissolve:

Input layer: “Census ratios”, check.

Selected features only, check.

Dissolve field, “Dissolve_” (I have created a column with the same attribute “AAA” for all rows for this purpose), check.

Compute stats for attribute, check.
Attribute selected: Total population (it is an interger64 field), check.

Now take a look at the console: Dissolve_, SUM(Dissolve_) AS sum, MIN(Dissolve_) AS min, MAX(Dissolve_) AS max, AVG(Dissolve_) AS avg FROM layer_name GROUP BY Dissolve_” -f “ESRI Shapefile”

Is using the Dissolve_ field to calculate the stats. Why? I don’t know.

enter image description here

Then go, and the results are crearly wrong. I want to summarize the TOTAL_POPULATION field, not the one used to dissolve the polygons (DISSOLVE_).

enter image description here

Is QGIS failing because of a bug? Or i’m doing something wrong?

Note: I’ve tried with ArcMap and it goes OK, but i need to work with QGIS.

All topic

Create On Ubuntu And Mac With Same MD5

I have a folder of files which I am trying to tar into an archive. I have the same files on a Mac and on a Ubuntu machine. If I run an rsync it shows that the directories are the same, but if I tar them and then take a MD5 sum the results are different. I have tried with both GNU tar and BSD tar on the Mac. Is there some option that has to be used to make the result come out the same?

Thanks.

All topic