giovedì 14 giugno 2018

use of memory arduino like board ide

The most straightforward answer is:
The difference here is that
char *s = "Hello world";
will place Hello world in the read-only parts of the memory and making s a pointer to that, making any writing operation on this memory illegal. While doing:
char s[] = "Hello world";
puts the literal string in read-only memory and copies the string to newly allocated memory on the stack. Thus making
s[0] = 'J';
legal.
A more lengthy explanation would include what segments the memory is stored in, and how much memory is allocated:
Example:                       Allocation Type:     Read/Write:    Storage Location:   Memory Used (Bytes):
===========================================================================================================
const char* str = "Stack";     Static               Read-only      Code segment        6 (5 chars plus '\0')
char* str = "Stack";           Static               Read-only      Code segment        6 (5 chars plus '\0')
char* str = malloc(...);       Dynamic              Read-write     Heap                Amount passed to malloc
char str[] = "Stack";          Static               Read-write     Stack               6 (5 chars plus '\0')
char strGlobal[10] = "Global"; Static               Read-write     Data Segment (R/W)  10
References

  1. What is the difference between char s[] and char *s in C?, Accessed 2014-09-03, <https://stackoverflow.com/questions/1704407/what-is-the-difference-between-char-s-and-char-s-in-c>
  2. Difference between declared string and allocated string, Accessed 2014-09-03, <https://stackoverflow.com/questions/16021454/difference-between-declared-string-and-allocated-string>

lunedì 7 maggio 2018

path in windows a 64 bit

Note for Windows users on 64-bit systems
Progra~1 = 'Program Files' Progra~2 = 'Program Files(x86)'
https://confluence.atlassian.com/display/DOC/Setting+the+JAVA_HOME+Variable+in+Windows



Set the JAVA_HOME Variable

To set the JAVA_HOME variable:
  1. Locate your Java installation directory
    If you didn't change the path during installation, it'll be something like C:\Program Files\Java\jdk1.8.0_65
  2. Do one of the following:
    Windows 7 – Right click My Computer and select Properties > Advanced 
    Windows 8 – Go to Control Panel > System > Advanced System SettingsWindows 10 – Search for Environment Variables then select Edit the system environment variables
  3. Click the Environment Variables button.
  4. Under System Variables, click New.
  5. In the Variable Name field, enter either:
    • JAVA_HOME if you installed the JDK (Java Development Kit)
      or
    • JRE_HOME if you installed the JRE (Java Runtime Environment) 
  6. In the Variable Value field, enter your JDK or JRE installation path .
    If the path contains spaces, use the shortened path name. For example, C:\Progra~1\Java\jdk1.8.0_65

     
    Note for Windows users on 64-bit systems
    Progra~1 = 'Program Files'Progra~2 = 'Program Files(x86)'
  7. Click OK and Apply Changes as prompted
You'll need to close and re-open any command windows that were open before you made these changes, as there's no way to reload environment variables from an active command prompt. If the changes don't take effect after reopening the command window, restart Windows.

Set the JAVA_HOME variable via the command line

If you would prefer to set the JAVA_HOME (or JRE_HOME) variable via the command line:
  1. Open Command Prompt (make sure you Run as administrator so you're able to add a system environment variable).
  2. Set the value of the environment variable to your JDK (or JRE) installation path as follows:
    setx -m JAVA_HOME "C:\Progra~1\Java\jdk1.8.0_XX"
    If the path contains spaces, use the shortened path name.
  3. Restart Command Prompt to reload the environment variables then use the following command to check the it's been added correctly. 
    echo %JAVA_HOME%
    You should see the path to your JDK (or JRE) installation. 
Last modified on Nov 14, 2017

giovedì 5 aprile 2018

apostrofi nei numeri - excel - openoffice - libreoffice


quando sbattete la testa con gli apostrofi nei numeri in excel di openoffice? si risolve così!!


Find '.+' (or similar) and Replace with '&' effectively re-enters the contents of cells. This can be used to 'strip' formatting automatically applied by Calc (often needed to 'clean' data imported from the clipboard or badly formatted files), for example, to convert text strings consisting of digits, into actual numbers (the cells must first be correctly formatted 'number'). The leading apostrophes, telling Calc to treat the numbers as text, are removed.

https://wiki.openoffice.org/wiki/Documentation/How_Tos/Regular_Expressions_in_Calc

lunedì 1 gennaio 2018

Google Chrome causing you 100 Disk Usage? This may be a fix for you.

I found my problem. It was a corrupt History file in Chrome.

I noticed the Clear Browsing Data (under More Tools) was not able to get a total for the "Browsing History" section.

Then from the Google Chrome Help Forum (Syd Hutchinson) I found this procedure:

Firstly make sure Chrome is switched off. Go into task manager and make double sure there are no instances of it running. If it has been open it is sometimes easier to close it and then reboot your machine to ensure it is closed. Now open file manager and go to C:\Users\*your id*\AppData\Local\Google\Chrome\User Data\Default. Replace *your id* with your user id. Now look for a file named History and delete it. Just that one file. If it was like mine it will probably be a large file. Mine was 500Mb. Close file manager and open Chrome and all should be ok. A new History file will be created and it will now be just a few kbs.

Deleting the one file "History" fixed the problem! Such a relief!

-Rick-

http://www.tomsguide.com/answers/id-2689679/google-chrome-causing-100-disk-usage-fix.html