Xero Api ItemTrackingCategory throws a null reference error

I am trying to set the value of TrackingCategory on an invoice line item. My code is as follows:

                    LineItem li = new LineItem();
                    li.LineAmount = inv.LineItems(i).LineAmount;
                    li.ItemCode = inv.LineItems(i).ItemCode;
                    li.Description = inv.LineItems(i).Description;
                    li.AccountCode = inv.LineItems(i).AccountCode;
                    li.UnitAmount = inv.LineItems(i).UnitAmount;
                    var categories = inv.Categories.Where(c => c.TicketChargeLineId == inv.LineItems(i).TicketChargeLineId);
                    foreach(var c in categories)
                    {
                        if(c.Value != "")
                        {

                            ItemTrackingCategory tc = new ItemTrackingCategory();
                            tc.Name = c.Name;
                            tc.Id = c.Id;
                            tc.Option = c.Value;
                            li.Tracking.Add(tc);

                        }

                    }

                    lineItems.Add(li);

Errors in li.Tracking.Add(tc). It gives the error "Object reference not established to an instance of an object", however, tc is not null. Show an empty Guid for OptionId. Any help is really appreciated.

floating – Python real to dollar conversion error

Hello, I am trying to make a real converter for dollars and for normal values ​​it works, but it is giving error when I put the dollar * n10, write 420 reals or 840, the exact value of the example is in dollars:

Enter how many reais you have: 840

Enter the current price of the dollar: 4.20

You with $ 840.00 can buy $ 199.00 and have $ 4.20

Process terminated with exit code 0

I think it's because I am using float but I don't know how to do it differently, follow the code below:

r = float(input('Digite quantos reais você tem: '))

d = float(input('Digite a cotação atual do dolar: '))

print('Você com {:.2f} reais pode comprar {:.2f} dólares e te sobram {:.2f} reais'.format(r, r // d, r % d))

javascript – Reference error not captured: the graphic is not defined

I am following the documentation of Chats.js to implement graphics in my code, the structure of my HTML is very simple


  
     //Esse eu baixei através da documentação deles
    
  
  
    
  

And in my javascript index.js is the following

var ctx = document.getElementById('myChart');
var myChart = new Chart(ctx, {
    type: 'bar',
    data: {
        labels: ('Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'),
        datasets: ({
            label: '# of Votes',
            data: (12, 19, 3, 5, 2, 3),
            backgroundColor: (
                'rgba(255, 99, 132, 0.2)',
                'rgba(54, 162, 235, 0.2)',
                'rgba(255, 206, 86, 0.2)',
                'rgba(75, 192, 192, 0.2)',
                'rgba(153, 102, 255, 0.2)',
                'rgba(255, 159, 64, 0.2)'
            ),
            borderColor: (
                'rgba(255, 99, 132, 1)',
                'rgba(54, 162, 235, 1)',
                'rgba(255, 206, 86, 1)',
                'rgba(75, 192, 192, 1)',
                'rgba(153, 102, 255, 1)',
                'rgba(255, 159, 64, 1)'
            ),
            borderWidth: 1
        })
    },
    options: {
        scales: {
            yAxes: ({
                ticks: {
                    beginAtZero: true
                }
            })
        }
    }
});

But when I execute the code in my browser nothing happens, when I inspect the elements with the browser console and go to the index.js file I see the following error message Uncaught ReferenceError: Chart is not defined , as I see that the import is correct because the chart.js file is being imported, am I doing something wrong?

magento2 – Magento 2 signs static files that show a CSS / JS 404 error in SEO reports

I am using the version number in the file paths in Magento 2, but it shows 404 errors in the SEO reports after running the Magento deployment command due to the version number of the change of deployment command every time

I have also added the following code in the Robots.txt file

`Disallow: /pub/static/`

But still, it shows up in 404 errors in SEO reports. I cannot disable the Sign Static Files function from the administrator side.

Please let me know how we can solve this problem.

nodejs – What error do you see in my code ?, I am practicing with forms with node and javascript

I am trying to print a message on the screen and on the console when entering values ​​in two inputs using nodejs and javascript but according to the console I have an error in the "dataString + = data" part, could you help me with that? psdt: I am using POST method in the form.

I am trying to print a message on the screen and on the console when entering values ​​in two inputs using nodejs and javascript but according to the console I have an error in the "dataString + = data" part, could you help me with that? psdt: I am using POST method in the form.

I am trying to print a message on the screen and on the console when entering values ​​in two inputs using nodejs and javascript but according to the console I have an error in the "dataString + = data" part, could you help me with that? psdt: I am using POST method in the form.

I am trying to print a message on the screen and on the console when entering values ​​in two inputs using nodejs and javascript but according to the console I have an error in the "dataString + = data" part, could you help me with that? psdt: I am using POST method in the form.

Here is the code:

'use strict'

const http = require('http').createServer(webServer);
const port = 3000;
const fs = require('fs').readFileSync('public/index.html');
const queryString = require('querystring');
const util = require('util');
const dataString = ''; 


function webServer(req, res){
    if(req.method == 'GET'){
        res.writeHead(200, {'Content-type': 'text/html'});
        res.end(fs);
    };

    if(req.method == 'POST'){
        req.on('data', function(data){
            dataString += data
        }).on('end', function(){
            console.log(`los valores que enviaste son: ${dataString}`);
            res.end(`los valores que enviaste son: ${dataString}`);
        });
    };
};

http.listen(port);
{
  "name": "form",
  "version": "1.0.0",
  "description": "Formulario",
  "main": "index.js",
  "dependencies": {
    "express": "^4.17.1"
  },
  "devDependencies": {},
  "scripts": {
    "start": "node index.js"
  },
  "author": "EMIT",
  "license": "ISC"
}

    
        Formulario
        
    
    
        

Should an error be added in late work?

Should an error be added in late work?

Probably with special rules like

  • a commercial value of 0
  • no complexity assessment
  • may be urgent or not
  • can be added in the current sprint

plug-in development – Error "Call a member function switch_to_locale () in null" during insert_with_markers

Having a problem with my plugin updating the htaccess file. The code that used to do that is:

insert_with_markers($htaccess_file, $marker, $lines);

The parameters used in that function have been previously defined correctly. Your error message is:

    Uncaught Error: Call to a member function switch_to_locale() on null 
in /home2/path/to/site/fstraptest/wp-includes/l10n.php:1582

I tried to make sure that several functions used by switch_to_locale () are loaded:

if (! function_exists('get_home_path')) 
        {include_once(ABSPATH . 'wp-admin/includes/file.php');}
    if (! function_exists('insert_with_markers')) 
        {include_once(ABSPATH . 'wp-admin/includes/misc.php');}
    if (! function_exists('switch_to_locale')) 
        {
        include_once(ABSPATH . 'wp-admin/includes/l10n.php');
        include_once(ABSPATH . 'wp-includes/class-wp-locale-switcher.php');
        }
    if (! function_exists('got_mod_rewrite')) 
        {include_once(ABSPATH . 'wp-admin/includes/misc.php');}
    if (! function_exists('is_multisite')) 
        {include_once(ABSPATH . 'wp-admin/includes/load.php');}

But that did not solve the problem.

This is with WP 5.3, PHP 7.3.11. Similar code has worked before; This may have started with WP 5.3, but I'm not sure.

Google has not helped with this error. The language of the site is "en-US". The add-in has no language file. The theme has been changed to "Twenty-Thirteen"; The error also occurs in other subjects, so it does not seem to depend on the subject.

list view: Sharepoint Online threshold error even with indexed column

I have a large list in SPO with 40k elements and I have made some indexed columns.

When I create a simple view (no classification, group, etc.) with only filtering in an indexed column, some things still give a threshold error.

This is only when the filtered return data is above 400 elements.

Are there any additional limitations for Sharepoint Online?

Confrontation error & # 39; Something went wrong. Try again or refresh the page & # 39; when adding the OOTB custom list web part to the site page in SharePoint online

I encountered the following error when I try to add a custom list web part on the site page in the SharePoint online subsite.

Something went wrong. Try again or refresh the page.

enter the description of the image here

Any ideas on what is causing this problem?

Please help.

Thanks in advance.

JQuery, AJAX, PHP When passing large amounts of data, an error occurs

I am trying to pass enough data from a page using AJAX to a PHP script. This works well for some small amounts of data, but fails with the following error when there is more data.

"PHP Warning:  Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0,"

The JQuery that I am using is:

var data = $flowchart.flowchart('getData');

$.ajax({
    type: "post", 
    cache: false,
    data: data,
    url: "test.php?name=" +  encodeURIComponent(name) + "&action=" + action,
    success: function(data) {
        console.log (data)
    }
}); 

data is effectively a json data string.

eg:
sites: 0: {fromOperator: "SiteA", fromConnector: "output_1", fromSubConnector: "0", toOperator: "location1", toConnector: "input_1", …} 1: {fromOperator: "SiteA", fromConnector: "output_2", fromSubConnector: "0", toOperator: "location2", toConnector: "input_1", …} 2: {fromOperator: "start", fromConnector: "output_1", fromSubConnector: "0", toOperator: "SiteA", toConnector: "input_1", …}

and read in PHP simply using:

// Values from data.
$sites = (isset($_POST('sites')) && count($_POST('sites')) > 0) ? $_POST('sites') : NULL;
$staff = (isset($_POST('staff')) && count($_POST('staff')) > 0) ? $_POST('staff') : NULL;

How can I pass large amounts of data linking this but still reference in PHP using $_POST('sites') AND $_POST('staff') etc?

I thought I would have to do something with JSON, but I can find out what.

Thank you