Advice 1: How to reset the array

Arrays - one of the essential attributes of any programming language. Therefore, there is hardly a programmer who has never used them in their software products. They facilitate their creation. Various array operations sometimes occupy a large part of the program code. One of these operations is zero.
How to reset the array
Instruction
1
Null array in C/C++. When you initialize an array in the languages C and C++ array elements is assigned a random value, in difference, for example from languages like C# or Java. So hope that all elements will be equal to the specified value, is not necessary. For languages With and With++ there are several ways to reset the arrays. To do this, when it is created, use the following code: int array[10000];memset(array,0,10000);This code will create an array with 10000 elements and assigns each element a value of 0. Also, to create an array of zeros at initialization, use the more simple code: int array[100]={0};This code will create an array size of 100 elements and assign all elements set to 0. To reset the array, use for loops:i=0;for( i ; i < N ; i++ ) //where N is the size of the array{ array [ i ] = 0 ; //where array is the name of the array} This code iterates over the elements of the array from the first element to element number N, and assigns each element a value of 0. If you are using Visual C++ use the function ZeroMemory(). If you want to reset a string (string in C/C++ is a character array), you can just zero out the first element and the rest in the future will not be used.
2
Null array in Java. Unlike C/C++ in Java when you initialize an array as a class variable, all elements are assigned the value equal to 0 - if it is an array, false if it is an array of Booleans, null - if it is an array of objects. Therefore, in Java, is not necessary to manually reset the array when initializing. But, if you create the array as a class variable, and declare it in the function body or loop, the compiler does not guarantee that all values will be 0 (false, null). In this case, to reset the array, use the following loop:int array[] = new int[10000]; //create an array with 10000 элементовfor(int i = 0 ; i < array.length ; i++ ) { //loop through all array elements array[i] = 0 ; //assign each array value to 0}

Advice 2: How to reset the database 1C

Over time, the database is in "1C: Enterprise" is filled with obsolete or unnecessary data, which significantly hamper the operation of the software. In this regard, there is a need to reset it, saving the contents of directories.
How to reset the database 1C
Instruction
1
Run the program "1C: Enterprise". Make sure other users don't. To check this, run the program in normal mode. Enter the menu "Help" and select "About". Click "Monitor". A window will appear with a list of all users using at the moment 1C. When the program starts, check the "Exclusive mode".
2
Open the tool "process". Set the desired time period. Mark the documents will be nulled in the database. Select the processing type to "Mark for deletion". Click "Run". Click "Control", then "OK" and "Delete". Wait until it is finished. Reset base 1S by this method is a long and painstaking process.
3
Check out all the links because some of the documents may not be removed. For this select "Search links for object", select the type neudalimye files, hit "Search links". Mark the references to all the objects to be deleted and click "Delete".
4
Delete all files with the extension .dbf that begin with the letters dt and dh, directly from the database itself. Delete the file 1SCONST.DBF. Test 1C base, which will create the deleted file but with zeroed information. This method reset the database 1S faster than the previous one, but requires special care not to accidentally delete important documents.
5
Add a new database when you run the program "1C: Enterprise". Provide a link to an empty folder. Run the program in mode Configurator to automatically create a new database. Select "Load the modified configuration. In the resulting window, mark the file 1CV7.MD the current program. Further, using the "Convert data", move the guides in the clean database data. This method allows you to create a zeroed base 1C with the old guides without direct removal of old files.
Search
Is the advice useful?