Пример #1
0
/*--------main---------------*/
    int main()
    {   
        printf("%s",banner);
        print("Starting sploit");
        memset(junk,0x41,99999);
         buildf(FIL3);
          print("File done!");
          getchar();
          return 0;
    }             
Пример #2
0
void kmp(void) {
	buildf();
	for(int i = 0, j = 0; j < n; j++) {
		// i = automaton's state, j = text position
		if(text[j] == patt[i]) {
			i++; // move to next state
			if(i == m) {
				printf("found match at index %d\n", j-m+1);
				i = f[i];
			}
		} else if(i) i = f[i], j--;
	}
}
Пример #3
0
void kmp(void) {
	buildf();
	for(int k = 0; k <= m2-n2; k++) {
		for(int i = 0, j = 0; j < m1; j++) {
			// i = automaton's state, j = text position
			if(strncmp(text[j]+k, patt[i], n2) == 0) {
				i++;
				if(i == n1) {
					printf("found match at (%d, %d)\n", j-n1+2, k+1);
					i = f[i];
				}
			} else if(i) i = f[i], j--;
		}
	}
}
bool BaseOfSupport::update(const Eigen::VectorXd& xi_k) {
    // Get feet corners
    Eigen::MatrixXd feetCorners;
    feetCorners = _stepController->getContact2DCoordinates();
    // Compute the bounding box of the current support configuration
    Eigen::Matrix2d minMaxBoundingBox;
    computeBoundingBox(feetCorners, minMaxBoundingBox);
    // Update right-hand side of constraints
    buildb(minMaxBoundingBox);
    buildf();
    // Matrices in the preview window s.t.
    // A*X <= fbar - B*xi_k
    // Therefore we can prebuild A, fbar and B which are not time-dependent
    buildfbar(_f);
    _rhs = _fbar - _B*xi_k;
    return true;
}