/* step4() deals with -ic-, -full, -ness etc. similar strategy to step3.
549874
private final void step4() {
        switch (sb.charAt(k)) {
        case 'e':
            if (ends("icate")) 
                r("ic");
            else if (ends("ative"))
                r("");
            else if (ends("alize")) 
                r("al");
            break;
        case 'i':
            if (ends("iciti")) 
                r("ic");
            break;
        case 'l':
            if (ends("ical")) 
                r("ic");
            else if (ends("ful")) 
                r("");
            break;
        case 's':
            if (ends("ness")) r("");
            break;
        }
    }
1187831
public function step4()
    {
        // Search for the longest among the suffixes "a   e   i   ie   ă " and, if it is in RV, delete it.
        if ( ($position = $this->search(array('a', 'ie', 'e', 'i', 'ă'))) !== false) {
            if ($this->inRv($position)) {
                $this->word = Utf8::substr($this->word, 0, $position);
            }
        }

        return true;
    }
526089
function step1 ( srcs ) {
				var map = Object.create ( null );
				function next ( source, parts, map ) {
					var part = parts.shift ();
					if ( !parts.length ) {
						map [ part ] = source;
					} else {
						map [ part ] = map [ part ] || Object.create ( null );
						next ( source, parts, map [ part ]);
					}
				}
				srcs.forEach ( function ( source ) {
					next ( source, source.split ( "/" ), map );
				});
				return map;
			}
1047794
function(oRoadMap){
		var counter = 0;
		var aSteps = oRoadMap.getSteps();
		for (var i = 0; i < aSteps.length; i++) {
			if (aSteps[i].getVisible()) {
				counter++;
				if (aSteps[i].getExpanded()) {
					counter++; //End of Expanded Step
					var aSubSteps = aSteps[i].getSubSteps();
					for (var j = 0; j < aSubSteps.length; j++) {
						if (aSubSteps[j].getVisible()) {
							counter++;
						}
					}
				}
			}
		}
		return counter;
	}
1022710
private final void step5() {
        if (k == 0) {
            return;
        }
        
        switch (b[k - 1]) {
            case 'a':
                if (endWith("al")) {
                    break;
                }
                return;
            case 'c':
                if (endWith("ance")) {
                    break;
                }
                if (endWith("ence")) {
                    break;
                }
                return;
            case 'e':
                if (endWith("er")) {
                    break;
                }
                return;
            case 'i':
                if (endWith("ic")) {
                    break;
                }
                return;
            case 'l':
                if (endWith("able")) {
                    break;
                }
                if (endWith("ible")) {
                    break;
                }
                return;
            case 'n':
                if (endWith("ant")) {
                    break;
                }
                if (endWith("ement")) {
                    break;
                }
                if (endWith("ment")) {
                    break;
                }
                /* element etc. not stripped before the m */
                if (endWith("ent")) {
                    break;
                }
                return;
            case 'o':
                if (endWith("ion") && j >= 0 && (b[j] == 's' || b[j] == 't')) {
                    break;
                }
                if (endWith("ou")) {
                    break;
                }
                return;
            /* takes care of -ous */
            case 's':
                if (endWith("ism")) {
                    break;
                }
                return;
            case 't':
                if (endWith("ate")) {
                    break;
                }
                if (endWith("iti")) {
                    break;
                }
                return;
            case 'u':
                if (endWith("ous")) {
                    break;
                }
                return;
            case 'v':
                if (endWith("ive")) {
                    break;
                }
                return;
            case 'z':
                if (endWith("ize")) {
                    break;
                }
                return;
            default:
                return;
        }
        if (m() > 1) {
            k = j;
        }
    }
1340629
private double handleCase4() {
		if( bracket ) {
			return SearchInterpolate.cubic2(fp, gp, stp, fy, gy, sty);
		} else if( stp > stx ) {
			return stmax;  // see comment in case 3 about stmax and stmin
		} else {
			return stmin;
		}
	}
44996
function (parts, target) {
      var o = target !== undefined ? target : Global;      
      for (var i = 0; i < parts.length; ++i)
        o = step(o, parts[i]);
      return o;
    }
1327595
def _step3(self, word):
        """"""

        ch = word[-1]

        if ch == 'e':
            if word.endswith("icate"):
                return word[:-3] if self._m(word, len(word)-6) else word
            elif word.endswith("ative"):
                return word[:-5] if self._m(word, len(word)-6) else word
            elif word.endswith("alize"):
                return word[:-3] if self._m(word, len(word)-6) else word
            else:
                return word
        elif ch == 'i':
            if word.endswith("iciti"):
                return word[:-3] if self._m(word, len(word)-6) else word
            else:
                return word
        elif ch == 'l':
            if word.endswith("ical"):
                return word[:-2] if self._m(word, len(word)-5) else word
            elif word.endswith("ful"):
                return word[:-3] if self._m(word, len(word)-4) else word
            else:
                return word
        elif ch == 's':
            if word.endswith("ness"):
                return word[:-4] if self._m(word, len(word)-5) else word
            else:
                return word

        else:
            return word
132407
function step3(token) {
    var r1 = getR1(token);

    if (!r1)
        return token;

    var r1Match = r1.match(/(leg|eleg|ig|eig|lig|elig|els|lov|elov|slov|hetslov)$/);

    if (r1Match) {
        return token.replace(new RegExp(r1Match[1] + '$'), '');
    }

    return token;
}
1103960
private final void step6() {
        j = k;
        if (b[k] == 'e') {
            int a = m();
            if (a > 1 || a == 1 && !cvc(k - 1)) {
                k--;
            }
        }
        if (b[k] == 'l' && doublec(k) && m() > 1) {
            k--;
        }
    }
898178
def step_four
      redirect_to '/checkout/step-one'   and return if !logged_in?
      redirect_to '/checkout/step-two'   and return if @order.shipping_address.nil? || @order.billing_address.nil?
      redirect_to '/checkout/step-three' and return if @order.shipping_method_code.nil?
      
      # Make sure all the variants still exist      
      @order.line_items.each do |li|
        v = Variant.where(:id => li.variant_id).first
        if v.nil? || v.status == 'Deleted'
          render :file => 'caboose_store/checkout/deleted_variant'
          return
        end
      end
      
      case CabooseStore::payment_processor
        when 'authorize.net'
          @sim_transaction = AuthorizeNet::SIM::Transaction.new(
            CabooseStore::authorize_net_login_id,
            CabooseStore::authorize_net_transaction_key,
            @order.total,
            :relay_url => "#{CabooseStore::root_url}/checkout/relay/#{@order.id}",
            :transaction_type => 'AUTH_ONLY',
            :test => true
          )
        when 'payscape'
          @form_url = CabooseStore::PaymentProcessor.form_url(@order)
      end
    end
1228864
private function step3a()
    {
        if ($this->searchIfInRv(array('a', 'e', 'i', 'o', 'à', 'è', 'ì', 'ò')) !== false) {
            $this->word = Utf8::substr($this->word, 0, -1);

            if ($this->searchIfInRv(array('i')) !== false) {
                $this->word = Utf8::substr($this->word, 0, -1);
            }
            return true;
        }
        return false;
    }
1105995
function(n){

    	if(!_.isNumber(n)){
            return;
	    }

        // Avoid stepping over
        if(this._data[this._itr + n] === undefined){
            return;
        }

        // Advance num steps
        this._itr += n;
    }
934968
def step4(self):
        """"""
        if self.b[self.k - 1] == 'a':
            if self.ends("al"): pass
            else: return
        elif self.b[self.k - 1] == 'c':
            if self.ends("ance"): pass
            elif self.ends("ence"): pass
            else: return
        elif self.b[self.k - 1] == 'e':
            if self.ends("er"): pass
            else: return
        elif self.b[self.k - 1] == 'i':
            if self.ends("ic"): pass
            else: return
        elif self.b[self.k - 1] == 'l':
            if self.ends("able"): pass
            elif self.ends("ible"): pass
            else: return
        elif self.b[self.k - 1] == 'n':
            if self.ends("ant"): pass
            elif self.ends("ement"): pass
            elif self.ends("ment"): pass
            elif self.ends("ent"): pass
            else: return
        elif self.b[self.k - 1] == 'o':
            if (self.ends("ion") and
                (self.b[self.j] == 's' or self.b[self.j] == 't')):
                pass
            elif self.ends("ou"):
                pass
            # takes care of -ous
            else:
                return
        elif self.b[self.k - 1] == 's':
            if self.ends("ism"): pass
            else: return
        elif self.b[self.k - 1] == 't':
            if self.ends("ate"): pass
            elif self.ends("iti"): pass
            else: return
        elif self.b[self.k - 1] == 'u':
            if self.ends("ous"): pass
            else: return
        elif self.b[self.k - 1] == 'v':
            if self.ends("ive"): pass
            else: return
        elif self.b[self.k - 1] == 'z':
            if self.ends("ize"): pass
            else: return
        else:
            return
        if self.m() > 1:
            self.k = self.j
995150
@Override
    public void step(INDArray parameters, INDArray searchDirection, double step) {
        Nd4j.getBlasWrapper().level1().axpy(searchDirection.length(), step, searchDirection, parameters);
    }
1323679
static public void inner4( GrayF32 intensity , GrayF32 derivX , GrayF32 derivY, GrayF32 output )
	{
		final int w = intensity.width;
		final int h = intensity.height-1;

		BoofConcurrency.loopFor(1,h,y->{
			int indexI = intensity.startIndex + y*intensity.stride+1;
			int indexX = derivX.startIndex + y*derivX.stride+1;
			int indexY = derivY.startIndex + y*derivY.stride+1;
			int indexO = output.startIndex + y*output.stride+1;

			int end = indexI + w - 2;
			for( ; indexI < end; indexI++ , indexX++, indexY++, indexO++ ) {
				int dx,dy;

				if( derivX.data[indexX] > 0 ) dx = 1; else dx = -1;
				if( derivY.data[indexY] > 0 ) dy = 1; else dy = -1;

				float middle = intensity.data[indexI];

				// suppress the value if either of its neighboring values are more than or equal to it
				if( intensity.data[indexI-dx-dy*intensity.stride] > middle || intensity.data[indexI+dx+dy*intensity.stride] > middle ) {
					output.data[indexO] = 0;
				} else {
					output.data[indexO] = middle;
				}
			}
		});
	}
164521
def step(self, y, u, t, h):
		
		k1 = h * self.func(t, y, u)
		k2 = h * self.func(t + .5*h, y + .5*h*k1, u)
		k3 = h * self.func(t + .5*h, y + .5*h*k2, u)
		k4 = h * self.func(t + h, y + h*k3, u)
		return y + (k1 + 2*k2 + 2*k3 + k4) / 6.0