Author Archives: Robins

SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. Error code 0xC020801C,0xC02…

The error info:
[Excel Destination [20]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.   The AcquireConnection method call to the connection manager “Excel Connection Manager” failed with error code 0xC0209303.   There may be error messages posted before this with more information on why the AcquireConnection method call failed.
[SSIS. Pipeline] Error: Excel Destination failed validation and returned error code 0xC020801C.

The solution:
1. Click Project in the solution,

2. Do the following on the project property form

flutter, Unable to buy item, Error response code: 7 & flutter_inapp_purchase

Problem description: Flutter_inapp_purchase payment repository, error occurred when clicking to buy the managed item;

W/BillingClient(25436): Unable to buy item, Error response code: 7
E/DoobooUtils(25436): Error Code : 7
I/ Flutter (25436): [Price: 65.99, monthPrice: 5.50]
I/ Flutter (25436): [Price: 29.99, monthPrice: 10.00]
I/ Flutter (25436): [Price: 149.99, monthPrice:]
D/FA (25436): Logging Events (FE): HWPurchaseSelect, Bundle[{source=, ga_event_origin(_O)=app, ga_screen_class(_SC)=MainActivity, ga_screen_id(_SI)=-2672549720685398148, Purchase_month =lifetime}]
I/flutter (25436): kiit0611==== 3 responseCode: 7, debugMessage: Item is already owned., code: E_ALREADY_OWNED, message: You already own this item.

The error is obvious: you already have this item, indicating that the current account logged into Google Play has already purchased this item.
Solutions:
Change your Google Play account directly and clear the Google Account cache (clear the Google Play cache). To buy again, sometimes you need to restart the phone.

This problem usually occurs on the ios side, but if it does occur in Google, it can be solved according to the above method. However, it is important to note that when using the library, the code looks like this:

FlutterInappPurchase.instance.clearTransactionIOS();

/// google order confirmation operation.
/// If the purchase transaction is not confirmed within a further 3 days, the user will automatically receive a refund, along with
// Google Play will revoke that purchase transaction
if (Platform.isAndroid) {
  FlutterInappPurchase.instance
      .acknowledgePurchaseAndroid(productItem.purchaseToken);
  FlutterInappPurchase.instance
      .consumePurchaseAndroid(productItem.purchaseToken);
}

The screenshot is as follows:

Please have such code. FlutterInappPurchase.instance .consumePurchaseAndroid(productItem.purchaseToken); That means consume it, or else it will always be there and report errorCode = 7.

The source code in the Flutter_inapp_Purchase payment repository is as follows: See the red comment.

/// Consumes a purchase on `Android`.
///
/// No effect on `iOS`, whose consumable purchases are consumed at the time of purchase.
///
/// if you already invoked [getProducts],you ought to invoked this method to confirm you have consumed.
/// that means you can purchase one IAPItem more times, otherwise you'll receive error code : 7
///
/// in DoobooUtils.java error like this:
/// case BillingClient.BillingResponseCode.ITEM_ALREADY_OWNED:
///        errorData[0] = E_ALREADY_OWNED;
///        errorData[1] = "You already own this item.";
///        break;
Future<String> consumePurchaseAndroid(String token, { String developerPayload }) async {
  if (_platform.isAndroid) {
    String result =
        await _channel.invokeMethod('consumeProduct', <String, dynamic>{
      'token': token,
      'developerPayload': developerPayload,
    });
    return result;
  } else if (_platform.isIOS) {
    return 'no-ops in ios';
  }
  throw PlatformException(
      code: _platform.operatingSystem, message: "platform not supported");
}

Keep in mind that google-enabled phones can sometimes get weird with lots of accounts and caches (clear the Goole Play cache), so it’s best to switch accounts, clear the cache, and restart the phone.

Dell Error Code for Failed Hard Disk

You have a Dell workstation. It’s under warranty. The event log has a bunch of errors with source “Disk”. CHKDSK reports bad sectors.
You KNOW the hard disk is failing, but Dell Support wants you to boot from a diagnostic CD and run some tests to generate an error code, which could take hours. You’re on the clock charging your customer for your time. Time is money.
You can tell the Dell technician that you have run the diagnostics utility, and that it generated this error code:
Error Code 4400:011B
Msg: Block 253122 (feel free to change up the block number for variety)
Medium error (3-1101)
Read retries Exhausted.
More recently, from an Optiplex 780:

Error Code 0142

Error Code 2000-0142

Hard Drive 0

Self Test Unsuccessful Status 79

Error Code 0F00:1332

Disk-Block 126377466

Interrupt Request (IRQ) did not set in time.

One of these will get you a new hard disk shipped from Dell.

When Wireshark grabs packets, IP check sum error is displayed

During the packet capture process, it is found that many TCP packets sent from the local host (client) are reported with IP Checksum error, but the application is normal, and the packets returned from the server are all normal, which is very strange.
As shown in the figure, many black items, black is usually the package in question:

5.23 EtherealTCP checksum errors are found during packet capture

Q:
TCP checksum errors found when grabbing packets with Ethereal on Windows platform.
But the response from the application layer tells me that the TCP checksum is OK for this message.

A: 2000-03
Network Card Configuration->Advanced->Rx Checksum Offload/Tx Checksum Offload.
It is likely that your two settings are Enable, just adjust them to Disable at the cost of reduced network performance.

The computation of TCP/UDP/IP checksums is typically done by the operating system's TCP/IP stack.
After these two locations are set to Enable, the protocol stack no longer performs the checksum calculations, but rather the NIC itself.
If no Rx Checksum Offload/Tx Checksum Offload entries are found in the aforementioned locations.
There are two possibilities, one is that the network card itself does not support this feature, and the other is that the driver of the network card does not provide a configuration item, the latter case is the most common.

In fact, the problem has nothing to do with what kind of Sniffer software is used.

Solutions:
Disable the Checksum Offload (the idea is to let the network card hardware compute the Checksum itself, rather than handing it over to the OPERATING system’s TCP/IP stack) by changing the properties of the card:

When Checksum Offload is disabled, the captured package displays much more cleanly:

Nginx: How to Use Error_Page

Error_page is touched, and it’s logged here
1. Error_page syntax
Grammar:

error_page code [ code... ] [ = | =answer-code ] uri | @named_location 

Default value:

no 

Use fields:
HTTP, Server, location, if field in location
Example 2.
The nginx directive error_page is designed to display a predefined URI when an error occurs, such as:

error_page 502 503 /50x.html;
location = /50x.html {
    root /usr/share/nginx/html;
}   

This actually creates an internal redirect, which returns the contents of 50x.html when the visit appears 502 or 503. Notice if you can find the 50x.html page, so add a location to make sure you find your custom 50x page.
Can we also define the return state in this case by ourselves, such as:

error_page 502 503 =200 /50x.html;
location = /50x.html {
    root /usr/share/nginx/html;
}   

In this way, when the user accesses 502 and 503, the return status of the user is 200 and the content is 50x.html.
When the error_page is followed by something other than a static message, such as proxyed Server or FastCGI/ UWSGI /SCGI Server, the status returned by the server (200, 302, 401, or 404) can also be returned to the user.

error_page 404 = /404.php;
location ~ \.php$ {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
}   

You can also set a named location and do the corresponding processing inside.

error_page 500 502 503 504 @jump_to_error;
location @jump_to_error {    
    proxy_pass http://backend;
}

It also handles error pages by having clients redirect 302, 301, etc. The default status code is 302.

error_page 403      http://example.com/forbidden.html;
error_page 404 =301 http://example.com/notfound.html;

Meanwhile, error_page can only respond once in a request, and the corresponding nginx has another configuration that controls this option: recursive_error_pages
default to false, which controls whether error_page can trigger multiple times in a request.
2. Nginx custom 404 error page configuration has no difference between equals sign
Error_page 404 /404. HTML displays custom 404 page content and normally returns a 404 status code. Error_page 404 = /404.html displays custom 404 page content but returns a 200 status code. Error_page 404 /404. PHP if it is a dynamic 404 error page containing header code (such as a 301 jump), it will not execute properly. Returns the 404 code normally. Error_page 404 = /404.php If it is a dynamic 404 error page that contains header code (such as a 301 jump), the equal sign configuration executes normally, and returns a status code defined in PHP. However, if the PHP definition returns a 404 status code, the 404 status code can be returned normally, but the custom page content cannot be displayed (the default 404 page appears), in this case, consider using the 410 code instead (header(“HTTP/1.1 410 Gone”); Normal return 410 status code, and can normally display custom content).

example

server  {
    listen 80;
    server_name  test.com;
    index       index.html index.htm;

    location/{ 
        proxy_pass http://online;
        error_page 404 = @fallback;
        proxy_intercept_errors on;
    }
    location @fallback {
        proxy_pass http://backend;
    }
}

upstream online {
         server 192.168.88.18:80;
         server 192.168.88.28:80;
}

upstream backend {
         server 192.168.88.38:80;
}

example
Limit_req traffic limit is set in the nginx configuration, so many requests return 503 error Code. For the purpose of improving the user experience, we want to return normal Code 200 and frequent operation information:

location  /test {
  ... 
  limit_req zone=zone_ip_rm burst=1 nodelay; 
  error_page 503 =200 /dealwith_503?callback=$arg_callback;
}
location /dealwith_503{ 
  set $ret_body '{"code": "V00006","msg": "Operate too often, please sit down and have a cup of tea."}';
   if ( $arg_callback != "" ) 
   { 
       return 200 'try{$arg_callback($ret_body)}catch(e){}'; 
   } 
   return 200 $ret_body; 
}

How to solve runtime error r6016

2019 Unicorn enterprise heavily recruited Python engineer standard & GT; > >

Insufficient thread data space
The operating system does not give the program enough memory to complete the _BEGINThread call.

When a new thread starts, the library must create an internal database for the thread. When the database cannot be expanded in the memory provided by the operating system, the thread will not start and the processing of the call will stop.
You can try setting your virtual memory a little bit bigger:
Computer attributes –& GT; Advanced – & gt; Performance (Setting)–& GT; Advanced – & gt; Virtual memory (change..)
Set your virtual memory value higher

Reproduced in: https://my.oschina.net/u/2381604/blog/597812

C++ ERROR redefinition of ‘class ***’

The error is as follows:
BaseSmoothingAlgorithm. H: 4:7: error: redefinition of “class BaseSmoothingAlgorithm ‘
BaseSmoothingAlgorithm. H: 4:7: error: the previous definition of ‘class BaseSmoothingAlgorithm’
Troubleshooting steps:
1. Find whether there are fewer classes “; “after the definition of the class. ; Find one after another, not this type of error
2. There are no macros to prevent them from being included more than once
#ifndef _BASESMOOTHINGALGORITHM_H_
#define _BASESMOOTHINGALGORITHM_H_
#include “BaseSmoothingAlgorithm.h”
#endif
To solve

Python keyerror exception

If you don’t know if there’s a key value in dict, you’d better use it

dict.get(key)
If you read with dict[key] it will report a KeyError exception,

Dict. Get method mainly provides a function to return the default value if the value of corresponding key is not obtained.

And dict[key] actually calls the method with ___
D.get(key[, d]) -> D[K] if K in D, else D. defaults to None

Mysql error 1452 – Cannot add or update a child row: a foreign key constraint fails

Today, when you add a foreign key to a mysql table, you always report an error. Here is the SQL statement:

Alter table A  

Add constraint FK_1 Foreign Key (‘ relation_ID ‘) References B(‘ id ‘) on UPDATE Cascade on DELETE Cascade

Error code: 1452
See the table is also no problem, and the field of RELATION_ID is no foreign key ah ~~~
Finally, a solution is found in Google. The general method is as follows:

mysql> SET foreign_key_checks = 0;

mysql> alter table tblUsedDestination add constraint f_operatorId foreign key(iOperatorId) references tblOperators (iOperatorId); Query
OK, 8 rows affected (0.23 sec) Records: 8  Duplicates: 0  Warnings: 0

mysql> SET foreign_key_checks = 1;

Make foreign_key_checks invalid first, then add foreign keys to the table, and finally make foreign_key_checks effective!
There is a reason for foreign_key_checks. If you cannot add a foreign key because it violates the constraint, you should correct the data first. Turning off checks and then adding keys puts you in an inconsistent state. Foreign key checks add overhead, and if you don’t want to use them, use myisam instead of

SQL error: 156, sqlstate: S1000 error encountered in Hibernate

I encountered such a mistake today
Util. SQL Error JDBCExceptionReporter 77) : 156. SQLState: S1000
(util. JDBCExceptionReporter 78) near the keyword ‘plan for grammar mistakes.
.
Caused by: java.sql.sqlexception: syntax error near keyword ‘plan’.
…….
The web search explanation is caused by some values that have the same name as the key field in SQL2005.
Solution: Just change the plan name to something else, such as EMPPLAN

LDAP: error code 32 – No Such Object

Ldap: error code 32-no Such Object
ldap: error code 32-no Such Object
is calling
this. ldaptemplate. create(ldapUser);
was reported wrong. After searching for a long time, I did not find the reason. Finally, I saw a blog and realized that the configured base in the ldap context should not be added to the dn of the node

<ldap:context-source id="contextSource"
                  password="${ldap.password}"
                  url="${ldap.url}"
                  username="${ldap.username}"
                  base="${ldap.base}" />

 @Entry(objectClasses = { "person", "inetOrgPerson", "organizationalPerson", "top" }, base="o=sf")
public class LdapUser {

For example, dn is o=sf,dc=aa,dc=com
ldap: base of contin-source is configured as dc=aa, base of dc=com
Entry is configured as o=sf, and can no longer be configured as o=sf,dc=aa,dc=com

Out of bag error in Random Forest

The RandomForestClassifier in Sklearn has one parameter:

oob_score : bool (default=False)
Whether to use out-of-bag samples to estimate the generalization accuracy.

In Chinese, it is called ‘out of pocket error’. This parameter means: use OOB to measure test error.


About oob explanation, there is a more comprehensive explanation on stackoverflow: oob explanation
let me tell you my understanding:

RF needs to sampling from the original feature set and then split to generate a single tree. The training sample of each tree is derived from the original training set Boostraping. Due to the way boostraping is put back in the sample, the training set varies from tree to tree and is only a part of the original training set. For the TTH tree, the data in the original training set that is not in the TTH tree can be tested using the TTH tree. Now n(n is the size of the original data set) trees are generated, and the training sample size of each tree is N-1. For the ith tree, its training set does not include (xi, Yi) this sample. Use all the trees (N-1) that do not contain the (xi, YI) sample, and the result of VOTE is the test result of the final (xi, YI) sample.

This allows you to test while training, and experience shows that:

out-of-bag estimate is as accurate as using a test set of the same size as the training set.

Oob is an unbiased estimate of a test error.
To sum up: suppose Zi=(xi,yi).

The out-of-bag (OOB) error is the average error for each Zi calculated using predictions from the trees that do not contain Zi in their respective bootstrap sample. This allows the RandomForestClassifier to be fit and validated whilst being trained.


reference
OOB explanation on stackoverflow
sklearn OOB explanation on stackoverflow