node.js – SyntaxError: JSON.parse: Unexpected character in row 1, column 1 of the JSON data – NodeJS vueJS

I am using an application with vuejs and node and need to get information about a .json file. However, the following error appears on the request:

SyntaxError: JSON.parse: Unexpected character in row 1, column 1 of the JSON data

My Json is correct, follow the code:

getCars(){

        fetch('../data/carros.json')
        .then(resp => resp.json())
        .then(data => console.log(data));
        }
    },

    mounted(){
       this.getCars();
}

Applications – Get nested data from the Firebase Cloud Firestore

I'm using Cloud Firestore for an Android app, but I don't know how to access my nested data like an array of a certain class. I have an object that can get what's in the first element (the one with & # 39; 0 & # 39;), I used the same structure in the real-time database and it works.

db.collection("Years").document("First Year").get()
            .addOnSuccessListener{dataSnapshot ->

               // 

            }
            .addOnFailureListener{exception ->
                Toast.makeText(baseContext, "Error ${exception.message}", Toast.LENGTH_SHORT).show()
            }

business

Graphics programming – creating hierarchical transformation matrices with motion detection data on a skeleton

I'm trying to draw the bones of a skeleton that is animated by motion detection data. I rotate the bones from "bone space" to "rotation axis space". Then apply the rotation of the current pose. Turn it back into "bone space" and then transform the vertices into the parent space of the bone. I draw an axis on each bone to test my current transformation matrix. With the code below it works almost great. The problem is that there appears to be a double axis (bone) that is pulled around the chest area, and it appears that the spine and certain joints are very slightly "squeezed" or rotated incorrectly. I feel that this has to do with the order of my matrix multiplication, but I cannot understand which transformation I am doing out of order.

    Matrix4 axes_space = skeleton_.BoneSpaceToRotAxesSpace(bone_name);
    Matrix4 thisPose = pose_.JointRotation(bone_name);
    Matrix4 bone_space = skeleton_.RotAxesSpaceToBoneSpace(bone_name);
    Matrix4 ctm = parent_transform * axes_space * thisPose * bone_space;

    Matrix4 S = Matrix4::Scale(Vector3(0.15,0.15,0.15));
    quick_shapes_.DrawAxes(ctm * S, view_matrix, proj_matrix);

    Matrix4 child_root_transform = ctm * Matrix4::Translation(skeleton_.BoneDirectionAndLength(bone_name));

    for (int i=0; i

EDIT: An image with the problem has been added. The arms should be straighter on their side, which would turn both shoulder axes equally. Instead, do they seem almost opposite? If instead I draw a ball for each bone, the problem is much more difficult to notice.

Rest position

sql – What * really * is the difference between relational and non-relational data?

I'm here right now: I know that relational data, as found in relational databases like MySQL or Postgres, is relational because there are relationships between the tables. This is the reason why RDBMS have rigid schemes. On the other hand, NoSQL databases offer a looser schema, but lose those relationships. But MongoDB, for example, provides official support (or at least blog posts) for associations between data (one-to-one, one-to-many, etc.).

Now I'm really not sure if the data I'm going to have in a project is relational and whether MongoDB would be a bad choice. People keep saying that you shouldn't use NoSQL databases unless you have one Specific Reason to use them over traditional RDBMS. But I really like MongoDB, especially for GraphQL. I work in JavaScript and love working with Mongoose.
On the other hand, my data structure seems to be relational (users have machines, machines are in rooms that also belong to users).

I'm pretty confused. Everyone goes on and on about the MERN / MEVN / MEAN stack and how great MongoDB with node I agree and love, but sometimes people tend to jump on the hype train too much. Can you give me your thoughts on this?

The SQL Server Polybase Data Movement Service stops after a few seconds

I've been scratching my head for some time to fix this problem. The SQL Server Polybase data movement service starts successfully, but stops after a few seconds. The operating system on our server was damaged last week and forced us to reload the operating system (Windows Server 2016 Data Center). This meant that I had to reinstall and reconfigure Microsoft SQL Server 2017 Enterprise. Since this cannot cause the data movement engine to start and continue to run, since I have some processes based on it, I really need some advice.

I found a Microsoft article that, when I look at error: 3409 (which I don't seem to find in the logs), relates to registry access. I have always installed and configured Microsoft SQL Server in such a way that only the service accounts for the engine and the agent are used and the other services are left to the default settings.

https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/database-engine-events-and-errors?view=sql-server-ver15

See logs

MSSQLSERVER_DET1_Dms_movement

2020/04/03 3:14:28 PM (Thread: 114900) (CommandManager: ErrorEvent) (Error, high):
Shared memory segment was not created or appended.
Microsoft.SqlServer.DataWarehouse.DataMovement.SharedMemory.NativeSharedMemoryException: The shared memory segment was not created or appended.
at Microsoft.SqlServer.DataWarehouse.DataMovement.SharedMemory.NativeSharedMemory.ThrowIfInvalid ()
at Microsoft.SqlServer.DataWarehouse.DataMovement.SharedMemory.NativeSharedMemory.SetDistributionCount (Int32 DistrCount)
at Microsoft.SqlServer.DataWarehouse.DataMovement.Nodes.DMSChannelMap.UpdateSharedMemoryDistributionCount ()
at Microsoft.SqlServer.DataWarehouse.DataMovement.Nodes.DMSChannelMap.AddDataChannelReceiver (String nodeName, DataChannelReceiver dataChannelReceiver)
at Microsoft.SqlServer.DataWarehouse.DataMovement.CommandManager.StartDataChannel (Int32 senderQueueSize, Int32 tcpBufferSize, HashSet`1 nodeToConnect)
at Microsoft.SqlServer.DataWarehouse.DataMovement.CommandManager.ProcessStartDataChannel (IMessage message)
at Microsoft.SqlServer.DataWarehouse.DataMovement.CommandManager.ProcessBaseMessage (IBaseMessage message)
2020/04/03 3:14:28 PM (Thread: 114900) (CommandManager: InformationEvent) (Info, Normal): Shutdown.
2020/04/03 3:14:28 PM (Thread: 12864) (DataChannelReceiver: InformationEvent) (Info, Normal): DataChannelReceiver DataChannelReceiver.Run – DET1: 1433: Localhost DET1: 1433 connected to RemoteHost DET1: 1433: Initiate the run Loop.
2020/04/03 3:14:28 PM (Thread: 114900) (GeneralInstrumentation: SynchronousLogEvent) (Info, Normal): DMS Exit () called: Forceful shutdown initiated …
2020/04/03 3:14:28 PM (Thread: 93816) (DMSDataChannelSenderClient: InformationEvent) (Info, Normal): DMSDataChannelClient created
2020/04/03 3:14:28 PM (Thread: 93816) (DataChannelSender: InformationEvent) (Info, Normal): Start the CreditFeedbackReceiver thread: CreditFeedbackReceiver.Run – DET1
2020/04/03 3:14:28 PM (Thread: 93816) (CommandManager: InformationEvent) (Info, Normal): Started data channel, node: DET1, type: sender
2020/04/03 3:14:28 PM (Thread: 84568) (CommandManager: InformationEvent) (Info, Normal): Started data channel, node: DET1, type: CreditFeedback

Shared memory segment was not created or appended.

magento2 – magento 2 problem "header already sent" if there is a large amount of data in the array and in the json_encode function in the Ajax controller

I develop functions in the Magento 2.3 version and call the controller function using the Ajax. The controller function returns product data and everything works fine when Customer is not logged on.

When we try to log in and return product data, the error is issued

"Exception: Warning: header information cannot be changed – header
already sent by (output started at
app / code / Magento2 / CustomProduct / Controller / Index / Index.php: 74) in
Provider / Magento / Framework / Stdlib / Cookie / PhpCookieManager.php online
148 in vendor / magento / framework / App / ErrorHandler.php: 61 "

Below is the array and json_encode

echo json_encode (array (& # 39; html_data & # 39; => $ html, & # 39; pro & # 39; => $ count));

Please help everyone, that's the strange problem.

woocommerce – Add Stripe Connect data to wc_stripe_payment_request

I use Stripe Connect to collect commission for sale on a Woocommerce website.

I need to add the following to the JSON payment request.

  'application_fee_amount' => (Gateway Based Fees Amount),
  'transfer_data' => (
    'destination' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
  ),

I found this code and modified it a little to adapt it to my purpose

//add_filter( 'woocommerce_stripe_request_body', 'add_application_fee', 20, 2 );
add_filter('wc_stripe_generate_payment_request', 'add_application_fee', 20, 3 );

function add_application_fee( $request, $api ) {

    //  Try to retrieve the order ID from the metadata

    $orderID = $request('metadata')('order_id');
    $order = wc_get_order($orderID);

    //  This filter is hit multiple times, so the order ID might not be available. If not, just return the request.

    if (!$order) {
        return $request;
    }

    //$applicationFee = $gateway_fee; //I need to find the value calculated by the woocommerce gateway based fees plugin. 
    $applicationFee = 2;  //  <- Use this for testing, I 
    $request('application_fee_amount') = $applicationFee;
    $request('transfer_data')('destination') = '{{CONNECTED_STRIPE_ACCOUNT_ID}}';
    return $request;
}

This does not result in errors, but the information is not added to the strip payment.

{
  "amount": "12766",
  "currency": "USD",
  "description": "Order 35215",
  "metadata": {
    "instance": "example.com",
    "order_id": "35215",
    "order_email": "example@gmail.com",
    "cart_hash": ""
  },
  "setup_future_usage": "off_session",
  "capture_method": "automatic",
  "confirmation_method": "manual",
  "customer": "cus_H1VGhq2aNJWokc"
}