teleren/devto huggingface dataset:
How to Resolve QuickBooks Error Code 12007 Easily?
Tags: accounting, software, errors
Published: 2023-04-13 10:49:19

QuickBooks users who encounter payroll error code 12007 during a software update need not worry, as it is a simple issue to resolve. This error message typically indicates that the QuickBooks Desktop is having difficulty communicating with the internet or that the user's internet connection is experiencing technical problems. 

A range of factors may cause internet connectivity problems in QuickBooks, including incorrect settings configuration and improper internet connection setup. In this article, we will provide a detailed guide on how to troubleshoot and [fix QuickBooks update error 12007](https://www.axpertadvisors.com/quickbooks-error-12007/). Thus, keep reading ahead…!

A brief review of QuickBooks Error 12007

When there is a problem with your internet connection, all Windows applications that require internet access will encounter errors, not just QuickBooks Desktop software. Although different applications may display different error codes, QuickBooks will generate an error message indicating that a network timeout is preventing the software from accessing the server.

“Error 12007: A network timeout that is preventing QuickBooks from accessing the server”


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hvobgej2t4qsje4riqbw.png)

**What Causes QuickBooks Error 12007?**
Below are the possible causes behind to the payroll issues:
●	Your internet connection may be experiencing frequent outages or slow performance.
●	QuickBooks may not be configured correctly to use the computer's internet connection.
●	Your computer's Windows firewall or antivirus software could be blocking QuickBooks from downloading updates from the internet.
●	Internet Explorer may not be set as the default browser on your computer.
●	QuickBooks Desktop may not be installed correctly on your Windows operating system.

DIY Methods to Troubleshoot the QuickBooks Error 12007
To resolve this error, you can try the following solutions:
Method 1: Check your internet connection status
●	Open Internet Explorer and try to visit a safe website such as google.com.
●	If you can successfully access the internet, move on to the next troubleshooting step.
●	However, if you are experiencing issues accessing the internet, it is best to contact your IT professional.

**Final Words**
We hope that this article has provided you with helpful guidance on resolving QuickBooks Error 12007. However, if for any reason the error persists when updating or installing the software, we are here to assist you. Our [QuickBooks payroll error support](https://www.axpertadvisors.com/quickbooks-errors/) team have edge-cutting tools and technology to resolve various type of accounting issues.


Read Also : [How to Fix QuickBooks Error 15243](https://www.axpertadvisors.com/quickbooks-error-15243/)
Optional function in swift Protocol
Tags: swift, protocol, optional
Published: 2023-04-13 09:51:48

In this article we will check how to make the protocol functions optional for implementation. 

Let's create a protocol named Eatable and make our VegetableVC class conform to this. 

```Swift
protocol Eatable{
    func addItem()
}

class VegetableVC:Eatable{
    
}
```

You will get an error if you run with this code. Because the functions in protocol are of **Required type** by default i.e. whoever conforms to this will have to implement this.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n5rhzl0cecz4pacwhvzj.png)

So let's add the functions to remove this error.

```Swift
class VegetableVC:Eatable{
    func add() {
        
    }
}
```

But what if we want to add a function which is optional to implement? Let's check how to do it  - 

First lets add a new function as follow - `func delete()`

Now we have 2 approaches to achieve the optional implementation - 

**1. using extension** - In this we extend the protocol and provide a default implementation. 

```Swift
extension Eatable{
    func delete(){
        
    }
}
```

If you run the code now you see you don't get error even though VegetableVC class has not implemented the delete() method.

**2. using optional keyword** - In this approach we mark the function as optional using the keyword. 

```Swift
@objc protocol Eatable{
    func add()
    @objc optional func delete()
}
```
_You can see we have marked protocol and func with @objc becuase 'optional' can only be applied to members of an @objc protocol._

Delete the extension we added previously and run the program. 
It runs without any error.
i
Tags: nissan, car, showroom, bangalore
Published: 2023-04-13 10:08:23

[Nissan Magnite](https://www.suryanissan.co.in/)
 Latest Update Nissan Magnite value: The sub-4m SUV is priced between Rs 5.97 lakhs* and Turbo cvt starts from Rs 9.74,900 lakhs* (ex-kolkata). Nissan Magnite Variants: it's on the market in six varients: XE, XL, XV EXE., XV, XV Premium, and XV Premium (O). Nissan Magnite Seating Capacity: The Magnite could be a five-seater. Nissan Magnite Engine and Transmission: it's a petrol-only providing with 2 engine options: naturally aspirated 1-litre (72PS/96Nm) and a 1-litre turbo-petrol (100PS/160Nm). whereas the previous is mated to a 5-speed MT solely, the latter gets the selection of a 5-speed MT and CVT (152Nm with the CVT). Nissan Kicks When it comes to a power-packed performance, the new Nissan KICKS Turbo CVT
Máy hút bụi giường nệm sofa Xiaomi chất lượng
Published: 2023-04-13 09:36:59

Mua máy hút bụi giường nệm sofa Xiaomi chính hãng giá tốt tại Chiêm Tài Mobile.
https://chiemtaimobile.vn/hut-bui-giuong-nem-sofa-xiaomi/
Windows apps directories
Tags: winapi, windows, programming
Published: 2023-04-13 09:12:14

Where the app should store its per use data on Windows? 


If you go to your `C:\Users\<username>\AppData` you can see that there are 3 folders are there:

- `Local` 
- `LocalLow`
- `Roaming`

It looks like the folder `Local` is where the apps suppose to store their data now. You can get WinAPI `SHGetKnownFolderPath()` providing the `FOLDERID_LocalAppData` as known path id. I have found this discussion https://github.com/electron/electron/issues/1404 relevant. 

But what are the other folders?

The `LocalLow` is for processes that runs in a low integrity mode, this is where this "low" comes from. Processes that runs in low integrity mode are not allowed to access objects that has a higher integrity level, so they cannot write or read to `Local` therefore there is a directory for it.

The `Roaming` directory does work when there is enterprise and Activity Directory. Data in `Roaming` copied on computer from AD when user logs in. It sounded like a good idea that your are logging to another computer in office and still has your personal apps configuration. According to MS docs it is deprecated in Windows 11. 

Many dev apps on my computer do not use "AppData/Local" and save the data in %UserProfile% in a folder like "c:\Users\<username>\.vscode" and it seems to work fine for them.
My journey to become a FullStack developer
Tags: react, frontend, backend, learning
Published: 2023-04-13 08:46:49

Hey everyone! I just wanted to share my journey towards becoming a full-stack web developer with you all.

I have been a UX/UI designer for the past 10 years. However, I always had an interest in coding, I've done a few websites using Wordpress, HTML/CSS and also flash(😂). And, over the last five years, I began to learn JavaScript, which quickly became my favourite programming language.

Recently, I have been diving into frontend frameworks such as ReactJS, Vue, and Svelte. And, while they all have their strengths and weaknesses, I have found that I really enjoy working with ReactJS.

But, while I'm feeling pretty confident in my frontend skills, I'm still a little intimidated by backend development. I've started learning Python, but I'm finding it a bit challenging as a visual-first learner.

My main goal right now is to create more advanced projects with React before jumping into backend development. I want to feel comfortable with React and frontend frameworks before I start to tackle backend technologies like NodeJS, Express, PrismaJS, MongoDB, and others.

And, that's where this community comes in. I'm hoping to use this space to connect with other developers who can help me learn and grow my skills. I'm looking forward to sharing my projects with you all and learning from your experiences as well. So, if you have any tips or advice on how I can continue to develop my skills, please feel free to share!

Thanks for reading, and I'm excited to be a part of this community!
MOT Error Messages
Published: 2023-04-13 08:46:12

Errors may be caused by a variety of scenarios. All errors are logged in the database server log file. In addition, user-related errors are returned to the user as part of the response to the query, transaction or stored procedure execution or to database administration action.

Errors reported in the Server log include – Function, Entity, Context, Error message, Error description and Severity.
Errors reported to users are translated into standard PostgreSQL error codes and may consist of an MOT-specific message and description.
The following lists the error messages, error descriptions and error codes. The error code is actually an internal code and not logged or returned to users.

Errors Written the Log File
All errors are logged in the database server log file. The following lists the errors that are written to the database server log file and are not returned to the user. The log is located in the data folder and named postgresql-DATE-TIME.log.

Table 1 Errors Written Only to the Log File


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1091f62rth9w9h8gurqn.png)

Errors Returned to the User
The following lists the errors that are written to the database server log file and are returned to the user.

MOT returns PG standard error codes to the envelope using a Return Code (RC). Some RCs cause the generation of an error message to the user who is interacting with the database.

The PG code (described below) is returned internally by MOT to the database envelope, which reacts to it according to standard PG behavior.

 NOTE: %s, %u and %lu in the message are replaced by relevant error information, such as query, table name or another information.

%s – String
%u – Number
%lu – Number
Table 2 Errors Returned to the User and Logged to the Log File

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/08ywhfhp368duue0f9tu.png)
MOT Monitoring
Tags: opengauss
Published: 2023-04-13 08:45:47

All syntax for monitoring of PG-based FDW tables is supported. This includes Table or Index sizes (as described below). In addition, special functions exist for monitoring MOT memory consumption, including MOT Global Memory, MOT Local Memory and a single client session.

Table and Index Sizes
The size of tables and indexes can be monitored by querying pg_relation_size.

For example

Data Size

""
select pg_relation_size('customer');
Index

""
select pg_relation_size('customer_pkey');
MOT GLOBAL Memory Details
Check the size of MOT global memory, which includes primarily the data and indexes.

""
select * from mot_global_memory_detail();
Result –

""
numa_node  | reserved_size        | used_size
----------------+----------------+-------------
-1            | 194716368896      | 25908215808
0             | 446693376         | 446693376
1             | 452984832         | 452984832
2             | 452984832         | 452984832
3             | 452984832         | 452984832
4             | 452984832         | 452984832
5             | 364904448         | 364904448
6             | 301989888         | 301989888
7             | 301989888         | 301989888
Where –

-1 is the total memory.

0..7 are NUMA memory nodes.

MOT LOCAL Memory Details
Check the size of MOT local memory, which includes session memory.

""
select * from mot_local_memory_detail();
Result –

""
numa_node  | reserved_size      | used_size   
----------------+----------------+-------------
-1            | 144703488       | 144703488
0             | 25165824        | 25165824
1             | 25165824        | 25165824
2             | 18874368        | 18874368
3             | 18874368        | 18874368
4             | 18874368        | 18874368
5             | 12582912        | 12582912
6             | 12582912        | 12582912
7             | 12582912        | 12582912
Where –

-1 is the total memory.
0..7 are NUMA memory nodes.
Session Memory
Memory for session management is taken from the MOT local memory.

Memory usage by all active sessions (connections) is possible using the following query –

""
select * from mot_session_memory_detail();
Result –

""
sessid                   | total_size | free_size | used_size
---------------------------------––––––-+-----------+----------+----------
1591175063.139755603855104 | 6291456    | 1800704   | 4490752
 
Legend –

total_size – is allocated for the session
free_size – not in use
used_size – In actual use
The following query enables a DBA to determine the state of local memory used by the current session –

""
select * from mot_session_memory_detail() 
 where sessid = pg_current_sessionid();
Result –
MOT Vacuum
Tags: opengauss
Published: 2023-04-13 08:45:18

Use VACUUM for garbage collection and optionally to analyze a database, , as follows –

[PG]

In Postgress (PG), the VACUUM reclaims storage occupied by dead tuples. In normal PG operation, tuples that are deleted or that are made obsolete by an update are not physically removed from their table. They remain present until a VACUUM is done. Therefore, it is necessary to perform a VACUUM periodically, especially on frequently updated tables.

[MOT Extension]

MOT tables do not need a periodic VACUUM operation, since dead/empty tuples are re‑used by new ones. MOT tables require VACUUM operations only when their size is significantly reduced and they do not expect to grow to their original size in the near future.

For example, an application that periodically (for example, once in a week) performs a large deletion of a table/tables data while inserting new data takes days and does not necessarily require the same quantity of rows. In such cases, it makes sense to activate the VACUUM.

The VACUUM operation on MOT tables is always transformed into a VACUUM FULL with an exclusive table lock.

Supported Syntax and Limitations

Activation of the VACUUM operation is performed in a standard manner.

""
VACUUM [FULL | ANALYZE] [ table ]; 
Only the FULL and ANALYZE VACUUM options are supported. The VACUUM operation can only be performed on an entire MOT table.

The following PG vacuum options are not supported:

FREEZE
VERBOSE
Column specification
LAZY mode (partial table scan)
Additionally, the following functionality is not supported –

AUTOVACUUM
MOT Recovery
Published: 2023-04-13 08:44:54

The main objective of MOT Recovery is to restore the data and the MOT engine to a consistent state after a planned shutdown (for example, for maintenance) or an unplanned crash (for example, after a power failure).

MOT recovery is performed automatically with the recovery of the rest of the openGauss database and is fully integrated into openGauss recovery process (also called a Cold Start).

MOT recovery consists of two stages –

Checkpoint Recovery – First, data must be recovered from the latest Checkpoint file on disk by loading it into memory rows and creating indexes.

WAL Redo Log Recovery – Afterwards, the recent data (which was not captured in the Checkpoint) must be recovered from the WAL Redo Log by replaying records that were added to the log since the Checkpoint that was used in the Checkpoint Recovery (described above).

The WAL Redo Log recovery is managed and triggered by openGauss.

In order to shorten the RTO (secondary node recovery at a failover event) and to speed-up the cold-start, the MOT Engine supports process parallelization of both Redo Log Recovery and Checkpoint Recovery.

Configure the parallel_recovery_workers and parallel_recovery_queue_size settings to change how the Redo Log Recovery (log replay) parallelization works. This effects the RTO.
Configure the checkpoint_recovery_workers setting to change how the Checkpoint Recovery parallelization works. This mostly affects the cold-start time.
See the RECOVERY (MOT) section for additional description and defaults values.
MOT External Support Tools
Tags: opengauss
Published: 2023-04-13 08:43:52

The following external openGauss tools have been modified in order to support MOT. Make sure to use the most recent version of each. An overview describing MOT-related usage is provided below. For a full description of these tools and their usage, refer to the openGauss Tools Reference document.

gs_ctl (Full and Incremental)
This tool is used to create a standby server from a primary server, as well as to synchronize a server with another copy of the same server after their timelines have diverged.

At the end of the operation, the latest MOT checkpoint is fetched by the tool, taking into consideration the checkpoint_dir configuration setting value.

The checkpoint is fetched from the source server's checkpoint_dir to the destination server's checkpoint_dir.

Currently, MOT does not support an incremental checkpoint. Therefore, the gs_ctl incremental build does not work in an incremental manner for MOT, but rather in FULL mode. The Postgres (disk-tables) incremental build can still be done incrementally.

gs_basebackup
gs_basebackup is used to prepare base backups of a running server, without affecting other database clients.

The MOT checkpoint is fetched at the end of the operation as well. However, the checkpoint's location is taken from checkpoint_dir in the source server and is transferred to the data directory of the source in order to back it up correctly.

gs_dump
gs_dump is used to export the database schema and data to a file. It also supports MOT tables.

gs_restore
gs_restore is used to import the database schema and data from a file. It also supports MOT tables.
Retrying an Aborted Transaction
Tags: opengauss
Published: 2023-04-13 08:43:37

In Optimistic Concurrency Control (OCC) (such as the one used by MOT) during a transaction (using any isolation level) no locks are placed on a record until the COMMIT phase. This is a powerful advantage that significantly increases performance. Its drawback is that an update may fail if another session attempts to update the same record. This results in an entire transaction that must be aborted. These so called Update Conflicts are detected by MOT at the commit time by a version checking mechanism.

 NOTE: A similar abort happens on engines using pessimistic concurrency control, such as standard PG and the openGauss disk-based tables, when SERIALIZABLE or REPEATABLE-READ isolation level are used.

Such update conflicts are quite rare in common OLTP scenarios and are especially rare in our experience with MOT. However, because there is still a chance that they may happen, developers should consider resolving this issue using transaction retry code.

The following describes how to retry a table command after multiple sessions attempt to update the same table simultaneously. You may refer to the OCC vs 2PL Differences by Example section for more detailed information. The following example is taken from TPC-C payment transaction.

""
int commitAborts = 0;
 
while (commitAborts < RETRY_LIMIT) {
                
    try {                        
        stmt =db.stmtPaymentUpdateDistrict;
        stmt.setDouble(1, 100);
        stmt.setInt(2, 1);
        stmt.setInt(3, 1);
        stmt.executeUpdate();
 
        db.commit();                     
                    
        break;
    }              
    catch (SQLException se) {
        if(se != null && se.getMessage().contains("could not serialize access due to concurrent update")) {
            log.error("commmit abort = " + se.getMessage());
            commitAborts++;
            continue;
        }else {
            db.rollback();
        }
            
        break;
    }
}
Loop on static content to upsert many rows in Oracle SQL
Tags: oracle, sql, programming, database
Published: 2023-04-13 08:01:43

Sometimes you just want to add many test rows into your Oracle DB, by iterating over fixed content. If your DB already has some rows which you then need to update, then what you're looking for is the upsert (update or insert) operation.

Here's one example how to do this in Oracle SQL, without creating a temporary table:
```
begin
for i in (select * from table(sys.dbms_debug_vc2coll('1234','5678')))
loop
merge into my_target_table target
using (
  select i.COLUMN_VALUE as acc_no,
  'N' as static_val,
  '1' as another_static_field
  from dual
  ) temp on (target.acc_no = temp.acc_no)
when matched then
  update set target.MY_FIELD_TO_UPDATE = temp.static_val, target.SECOND_FIELD = temp.another_static_field
when not matched then
  insert values (temp.acc_no, temp.static_val, temp.another_static_field);
end loop;
end;
/
```

All parts of this syntax are necessary, including the ending / which signifies the end of the anonymous PL/SQL code block, so you can execute it in e.g. SQuirrel SQL.
`sys.dbms_debug_vc2coll('1234','5678')` this call outputs whatever list of data you need to loop over
`from dual` using the special dual table keyword, we don't have to create a table to hold our static data, it will be in memory only
`when matched then` the matched directive allows us to do the upsert operation (update when already existing, insert when new)
`i.COLUMN_VALUE` pay special attention to the .COLUMN_VALUE field, which is how Oracle allows us to access each single value that is being looped over