text 这是一个很好的重读

这是一个很好的重读

stty.url
https://stackoverflow.com/a/17278776/4602592

text Instalar 7zip en cmd windows

保存自https://stackoverflow.com/questions/14122732/unzip-files-7-zip-via-cmd-command

Instalar 7zip en cmd windows
set PATH=%PATH%;C:\Program Files\7-Zip\
echo %PATH%
7z



https://stackoverflow.com/questions/14122732/unzip-files-7-zip-via-cmd-command

text 数组列出了массивысписки

py-arrays

\!h ----- Ассоциативный массив

https://pythonworld.ru/tipy-dannyx-v-python/slovari-dict-funkcii-i-metody-slovarej.html

d = {'dict': 1, 'dictionary': 2}

print(d)


\!h ----- перевод целого числа в двоичный код

a = 19
binary = []
while a != 0:
    binary.append(a % 2)
    a = a // 2
binary.reverse()
print(binary)

a = 19
print("Or simply: "+bin(a))

text 旋转圈在progress.pde

spinning circle in progress.pde
float[] time = new float[0];
float[][] wave = new float[0][0];
float[] wave1 = new float[0];
float[] wave2 = new float[0];
float[] wave3 = new float[0];
float[] wave4 = new float[0];
float[] wave5 = new float[0];
float[] wave6 = new float[0];
float[] wave7 = new float[0];
float[] wave8 = new float[0];
float[] wave9 = new float[0];
float[] x = new float[0];
float[] y = new float[0];
float gridx = 1000/3;
float gridy = 1000/3;
float distance = 1000/3;
int gridNumber = 3;
//float timeup = random(0, 0.1);
float timeup1 = 0.05;
float timeup2 = timeup1 *3.5;
float timeup3 = 0.05;
float timeup4 = timeup1 *3.5;
float timeup5 = 0.05;
float timeup6 = timeup1 *3.5;
float timeup7 = 0.05;
float timeup8 = timeup1 *3.5;
float timeup9 = 0.05;



void setup() {
  size(1000, 1000);
  ellipseMode(CENTER);
  //noLoop();
  
  
  // Define Time
/* can get rid of these if the time[] array works
float time1 = 0;
float time2 = 0;
float time3 = 0;
float time4 = 0;
float time5 = 0;
float time6 = 0;
float time7 = 0;
float time8 = 0;
float time9 = 0;

can get rid of these if the x[] and y[] arrays work
float x1 = 0;
float y1 = 0;
float x2 = 0;
float y2 = 0;
float x3 = 0;
float y3 = 0;
float x4 = 0;
float y4 = 0;
float x5 = 0;
float y5 = 0;
float x6 = 0;
float y6 = 0;
float x7 = 0;
float y7 = 0;
float x8 = 0;
float y8 = 0;
float x9 = 0;
float y9 = 0;
*/

// sets all parts of the time[] array to 0
for(int i=0;i<10;i++)
{
  time[i]=0; 
} 

// sets all parts of the x[] and y[] arrays to 0
for(int i=0;i<10;i++)
{
  x[i]=0;
  y[i]=0;
} 
  
  
}

void draw() {
  background(0);
  float radius = 100;


  stroke(255);
  noFill();

ellipse(100,width/2,radius*2, radius*2);
ellipse( width/2, 100, radius*2, radius*2);

/* can delete if the x,y and time arrays work
      x1 = radius * cos(time1);
      y1 = radius * sin(time1);
      x2 = radius * cos(time2);
      y2 = radius * sin(time2);
      x3 = radius * cos(time1);
      y3 = radius * sin(time1);
      x4 = radius * cos(time2);
      y4 = radius * sin(time2);
      x5 = radius * cos(time1);
      y5 = radius * sin(time1);
      x6 = radius * cos(time2);
      y6 = radius * sin(time2);
      x7 = radius * cos(time1);
      y7 = radius * sin(time1);
      x8 = radius * cos(time2);
      y8 = radius * sin(time2);
      x9 = radius * cos(time1);
      y9 = radius * sin(time1);
      */
      
for(int i=0;i<10;i++)
{
  myArray[i]=i; //loop through the remaining 98 elements.
  x[i] = radius * cos(time[i]);
  y[i] = radius * sin(time[i]);
} 

//maybe need to turn the wave arrays into a single 2d array and fit the below lines into the for loop

for(int i=0;i<10;i++)
{
  wave[i] = splice(wave[i], y[i], 0);
  // somehow got to figure out this alternating x and y situation
} 

      wave1 = splice(wave1, y1, 0);
      wave2 = splice(wave2, x2, 0);
      wave3 = splice(wave3, y1, 0);
      wave4 = splice(wave4, x2, 0);
      wave5 = splice(wave5, y1, 0);
      wave6 = splice(wave6, x2, 0);
      wave7 = splice(wave7, y1, 0);
      wave8 = splice(wave8, x2, 0);
      wave9 = splice(wave9, y1, 0);



      beginShape();
      for (int i = 0; i < wave1.length; i++) {
        //vertex(i+100, wave1[i]+width/2);
        vertex(wave2[i]+width/2, wave1[i]+width/2);
      }
      endShape(); 

 //     ellipse(x2, y, 5, 5);

      fill(random(255), random(255), random(255));
       ellipse(x1+100,y1+width/2, 8, 8);
       ellipse(x2+width/2, y2+100, 8, 8);

      time1 += timeup1; 
      time2 += timeup2;
      
    //gridx+=distance;
    
    //gridx = distance;
    //gridy+=distance;

}

text Windows管理

1.管理文件共享

ManagingFileSharing
###########
# icacls
Displays or modifies discretionary access control lists (DACLs) on specified files, 
and applies stored DACLs to files in specified directories.

For examples of how to use this command, see Examples.

Syntax

Copy
icacls <FileName> [/grant[:r] <Sid>:<Perm>[...]] [/deny <Sid>:<Perm>[...]] [/remove[:g|:d]] <Sid>[...]] [/t] [/c] [/l] [/q] [/setintegritylevel <Level>:<Policy>[...]]
icacls <Directory> [/substitute <SidOld> <SidNew> [...]] [/restore <ACLfile> [/c] [/l] [/q]]

Parameters
Parameter	Description
<FileName>	Specifies the file for which to display DACLs.
<Directory>	Specifies the directory for which to display DACLs.
/t	Performs the operation on all specified files in the current directory and its subdirectories.
/c	Continues the operation despite any file errors. Error messages will still be displayed.
/l	Performs the operation on a symbolic link versus its destination.
/q	Suppresses success messages.
[/save <ACLfile> [/t] [/c] [/l] [/q]]	Stores DACLs for all matching files into ACLfile for later use with /restore.
[/setowner <Username> [/t] [/c] [/l] [/q]]	Changes the owner of all matching files to the specified user.
[/findSID <Sid> [/t] [/c] [/l] [/q]]	Finds all matching files that contain a DACL explicitly mentioning the specified security identifier (SID).
[/verify [/t] [/c] [/l] [/q]]	Finds all files with ACLs that are not canonical or have lengths inconsistent with ACE (access control entry) counts.
[/reset [/t] [/c] [/l] [/q]]	Replaces ACLs with default inherited ACLs for all matching files.
[/grant[:r] <Sid>:[...]]	Grants specified user access rights. Permissions replace previously granted explicit permissions.
Without :r, permissions are added to any previously granted explicit permissions.
[/deny <Sid>:[...]]	Explicitly denies specified user access rights. An explicit deny ACE is added for the stated permissions and the same permissions in any explicit grant are removed.
[/remove[:g|:d]] <Sid>[...]] [/t] [/c] [/l] [/q]	Removes all occurrences of the specified SID from the DACL.
:g removes all occurrences of granted rights to the specified SID.
:d removes all occurrences of denied rights to the specified SID.
[/setintegritylevel [(CI)(OI)]<Level>:[...]]	Explicitly adds an integrity ACE to all matching files. Level is specified as:
- L[ow]
- M[edium]
- H[igh]

Inheritance options for the integrity ACE may precede the level and are applied only to directories.
[/substitute <SidOld> [...]]	Replaces an existing SID (SidOld) with a new SID (SidNew). Requires the Directory parameter.
/restore <ACLfile> [/c] [/l] [/q]	Applies stored DACLs from ACLfile to files in the specified directory. Requires the Directory parameter.
/inheritancelevel:[e|d|r]	Sets the inheritance level: 
e - Enables enheritance 
d - Disables inheritance and copies the ACEs 
r - Removes all inherited ACEs


Remarks
SIDs may be in either numerical or friendly name form. If you use a numerical form, affix the wildcard character * to the beginning of the SID.
icacls preserves the canonical order of ACE entries as:
Explicit denials
Explicit grants
Inherited denials
Inherited grants
Perm is a permission mask that can be specified in one of the following forms:

A sequence of simple rights:

F (full access)

M (modify access)

RX (read and execute access)

R (read-only access)

W (write-only access)

A comma-separated list in parenthesis of specific rights:

D (delete)

RC (read control)

WDAC (write DAC)

WO (write owner)

S (synchronize)

AS (access system security)

MA (maximum allowed)

GR (generic read)

GW (generic write)

GE (generic execute)

GA (generic all)

RD (read data/list directory)

WD (write data/add file)

AD (append data/add subdirectory)

REA (read extended attributes)

WEA (write extended attributes)

X (execute/traverse)

DC (delete child)

RA (read attributes)

WA (write attributes)

Inheritance rights may precede either Perm form, and they are applied only to directories:

(OI): object inherit

(CI): container inherit

(IO): inherit only

(NP): do not propagate inherit

Examples
To save the DACLs for all files in the C:\Windows directory and its subdirectories to the ACLFile file, type:


Copy
icacls c:\windows\* /save aclfile /t
To restore the DACLs for every file within ACLFile that exists in the C:\Windows directory and its subdirectories, type:


Copy
icacls c:\windows\ /restore aclfile
To grant the user User1 Delete and Write DAC permissions to a file named "Test1", type:


Copy
icacls test1 /grant User1:(d,wdac)
To grant the user defined by SID S-1-1-0 Delete and Write DAC permissions to a file, named "Test2", type:


Copy
icacls test2 /grant *S-1-1-0:(d,wdac)



#######
# Work use:

ICACLS C:\Domains\ /remove Everyone /T /C

Το δοκίμασα στο PC μου και κατήργησε τον everyone από το φάκελο-παράμετρο στην εντολή και στους υποφακέλους, αφήνοντας άθικτους τους άλλους shared users.

Δεν καταργεί τον everyone όταν υπάρχει στο: δεξί κλικ στο φάκελο > Properties > Sharing > Advance Sharing > Permissions

text H1-H6标题

info about h1-h6
- Preferably you should just use a single <h1> per page — this is the top level heading, and all others sit below this in the hierarchy.

- Make sure you use the headings in the correct order in the hierarchy. Don't use <h3>s to represent subheadings, followed by <h2>s to represent sub-subheadings — that doesn't make sense and will lead to weird results.

- Of the six heading levels available, you should aim to use no more than three per page, unless you feel it is necessary. Documents with many levels (i.e. a deep heading hierarchy) become unwieldy and difficult to navigate. On such occasions, it is advisable to spread the content over multiple pages if possible.

text 交易控制

回滚

transactionRollback
$this->db->trans_start();

$this->db->trans_rollback();

$this->db->trans_complete();

text 在Mac OS X的终端上启动Pentaho Kettle

Pentaho Kettle的App在Mac OS X下无法双击启动,此种情况可从命令行启动。

launch_pentaho_kettle_on_the_terminal_of_mac_os_x
进入data-integration所在目录,执行脚本./spoon.sh,等待一会儿既可启动。

如需双击启动:
sudo xattr -dr com.apple.quarantine + data integration App所在路径

text Javascript参考

Javascript Reference
https://developer.mozilla.org/en-US/docs/Web/JavaScript

text 3圈绘图machine.pde

3 circle drawing machine.pde
PVector v1 = new PVector();
PVector v2 = new PVector();

float time = 0;
float time2 = 0;
float time3 = 0;
float time4 = 0;

float[] wave = new float[0];
float[] wave2 = new float[0];
float[] wave3 = new float[0];
float[] wave4 = new float[0];
float[] wave5 = new float[0];
float[] wave6 = new float[0];
float[] wave7 = new float[0];

float x = 0;
float y = 0;
float x2 = 0;
float y2 = 0;
float x3 = 0;
float y3 = 0;
float x4 = 0;
float y4 = 0;

float timeup = random(0.0, 0.2);
float time2up = random(0.0, 0.2);
float time3up = random(0.0, 0.2);
float time4up = random(0.0, 0.2); 

float  xlerp = 0;
float  ylerp = 0;
float  xlerpnew = 0;
float  ylerpnew = 0;

float xyr1 = random(0,5);
float xyr2 = random(0,5);
float xyr3 = random(0,5);
float xyr4 = random(0,5);
float xyr5 = random(0,5);
float xyr6 = random(0,5);
float xyr7 = random(0,5);
float xyr8 = random(0,5);


void setup() {
  size(1000, 1000);
  ellipseMode(CENTER);
  //noLoop();
}

void draw() {
  background(36, 47, 64);
  float radius = 100;


  stroke(204, 164, 59);
  noFill();


//  ellipse(100, width/2, radius*2, radius*2);
//  ellipse( width/2, 100, radius*2, radius*2);
//  ellipse( width-100, width/2, radius*2, radius*2);


  x = radius*xyr1 * cos(time);
  y = radius*xyr2 * sin(time);
  x2 = radius*xyr3 * cos(time2);
  y2 = radius*xyr4 * sin(time2);
  x3 = radius*xyr5 * cos(time3);
  y3 = radius*xyr6 * sin(time3);
  x4 = radius*xyr7 * cos(time4);
  y4 = radius*xyr8 * sin(time4);
  wave = splice(wave, y, 0);
  
  wave2 = splice(wave2, x2, 0);
  wave3 = splice(wave3, x3, 0);
  
  wave4 = splice(wave4, lerp(x3+100, x4+width/2, 0.5), 0);
  wave5 = splice(wave5, lerp(y3+width/2, y4+100, 0.5), 0);
  
  xlerp = lerp(x3+100, x4+width/2, 0.5);
  ylerp = lerp(y3+width/2, y4+100, 0.5);
  
  xlerpnew = lerp(xlerp, x3+width-100, 0.5);
  ylerpnew = lerp(ylerp, y3+width/2, 0.5);
 
  wave6 = splice(wave6, lerp(xlerp, x3+width-100, 0.5), 0);
  wave7 = splice(wave7, lerp(ylerp, y3+width/2, 0.5), 0);
  
  //ellipse(xlerpnew, ylerpnew, 8, 8);


pushMatrix();
translate(0-100,0+100);
  beginShape();
  for (int i = 0; i < wave.length; i++) {
    //vertex(wave2[i]+gridx, wave[i]+gridy);
    //vertex(wave4[i], wave5[i]);
    vertex(wave6[i], wave7[i]);
  }
  endShape(); 
  popMatrix();


  //THese are the little circles on the circles

 // ellipse(x+100, y+width/2, 8, 8);
  //ellipse(x2+width/2, y2+100, 8, 8);
 // ellipse(x3+width-100, y3+width/2, 8, 8);

  // line(x+100,y+width/2, x2+width/2, y2+100);
  lerp(x+100, x2+width/2, 0.5);
  lerp(y+width/2, y2+100, 0.5);

  time += timeup; 
  time2 -= time2up;
  time3 += time3up;
  time4 -= time4up;
}

void mouseClicked() {
save("patterns"+frameCount+".png");
}