当前位置: 首页>>代码示例>>C++>>正文


C++ F函数代码示例

本文整理汇总了C++中F函数的典型用法代码示例。如果您正苦于以下问题:C++ F函数的具体用法?C++ F怎么用?C++ F使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了F函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: parseFileName

void  MyFunctionRequestHandler::upload(ESP8266WebServer& server, String requestUri, HTTPUpload& upload){
  //Serial.println(String(F("upload(")) + requestUri + String(F(")")));

  String filename = parseFileName(upload.filename);

  if (filename.endsWith(".bin")) { // handle firmware upload
    mbRebootRequired = true;
    if (upload.status == UPLOAD_FILE_START) {
      if (mDebug) Serial.println("Update: " + upload.filename);
      uint32_t maxSketchSpace = (ESP.getFreeSketchSpace() - 0x1000) & 0xFFFFF000;
      if (!Update.begin(maxSketchSpace)) { //start with max available size
        if (mDebug) Update.printError(Serial);
      }
    } else if (upload.status == UPLOAD_FILE_WRITE) {
      if (mDebug) Serial.print(".");
      if (Update.write(upload.buf, upload.currentSize) != upload.currentSize) {
        if (mDebug) Update.printError(Serial);
      }
    } else if (upload.status == UPLOAD_FILE_END) {
      miUploadSize = Update.size();
      if (Update.end(true)) { //true to set the size to the current progress
        if (mDebug) Serial.println(String(F("Update Success - uploaded: ")) + String(upload.totalSize) + String(F(".... rebooting now!")));
      } else {
        if (mDebug) Update.printError(Serial);
      }
      if (mDebug) Serial.setDebugOutput(false);
    } else if (upload.status == UPLOAD_FILE_ABORTED) {
      miUploadSize = Update.size();
      Update.end();
      if (mDebug) Serial.println(F("Update was aborted"));
    }

  } else { // handle file upload
    mbRebootRequired = false;
    if (upload.status == UPLOAD_FILE_START) {
      if (mDebug) Serial.println(String(F("uploading to SPIFFS: /")) + filename);
      mUploadFile = SPIFFS.open("/" + filename, "w");
    } else if (upload.status == UPLOAD_FILE_WRITE) {
      if (mDebug) Serial.print(".");
      if (mUploadFile.write(upload.buf, upload.currentSize) != upload.currentSize) {
        if (mDebug) Serial.println(String(F("ERROR writing file ")) + String(mUploadFile.name()) + String(F("to SPIFFS.")));
        mUploadFile.close();
      }
    } else if (upload.status == UPLOAD_FILE_END) {
      miUploadSize = upload.totalSize;
      if (mUploadFile.size() == upload.totalSize) {
        if (mDebug) Serial.println(String(F("Upload to SPIFFS Succeeded - uploaded: ")) + String(upload.totalSize) + String(F(".... rebooting now!")));
      } else {
        if (mDebug) Serial.println(String(F("Upload to SPIFFS FAILED: ")) + String(mUploadFile.size()) + String(F(" bytes of ")) + String(upload.totalSize));
      }
      mUploadFile.close();
      if (!upload.totalSize){
        if (mDebug) Serial.println("Removing: " + filename);
        SPIFFS.remove("/" + filename);
      }
    } else if (upload.status == UPLOAD_FILE_ABORTED) {
      miUploadSize = upload.totalSize;
      mUploadFile.close();
      if (mDebug) Serial.println(F("Upload to SPIFFS was aborted"));
    }
  }
}
开发者ID:Dynatrace,项目名称:ufo,代码行数:62,代码来源:MyRequestHandler.cpp

示例2: F

void MyFunctionRequestHandler::infoHandler(ESP8266WebServer& server) {

  String json = F("{");
  json += '"'; json += F("heap"); json += '"';
  json += ':';
  json += '"'; json +=  String(ESP.getFreeHeap()); json += '"';
  json += F(", "); 
  json += '"'; json += F("ssid"); json += '"';
  json += ':';
  json += '"'; json +=  String(WiFi.SSID()); json += '"';
  json += F(", "); 
  json += '"'; json += F("ipaddress"); json += '"';
  json += ':';
  json += '"'; json +=  WiFi.localIP().toString(); json += '"';
  json += F(", "); 
  json += '"'; json += F("ipgateway"); json += '"';
  json += ':';
  json += '"'; json +=  WiFi.gatewayIP().toString(); json += '"';
  json += F(", "); 
  json += '"'; json += F("ipdns"); json += '"';
  json += ':';
  json += '"'; json += WiFi.dnsIP().toString(); json += '"';
  json += F(", "); 
  json += '"'; json += F("ipsubnetmask"); json += '"';
  json += ':';
  json += '"'; json +=  WiFi.subnetMask().toString(); json += '"';
  json += F(", "); 
  json += '"'; json += F("macaddress"); json += '"';
  json += ':';
  json += '"'; json +=  WiFi.macAddress(); json += '"';
  json += F(", "); 
  json += '"'; json += F("hostname"); json += '"';
  json += ':';
  json += '"'; json +=  WiFi.hostname(); json += '"';
  json += F(", "); 
  json += '"'; json += F("apipaddress"); json += '"';
  json += ':';
  json += '"'; json +=  WiFi.softAPIP().toString(); json += '"';
  json += F(", "); 
  json += '"'; json += F("apconnectedstations"); json += '"';
  json += ':';
  json += '"'; json += String(WiFi.softAPgetStationNum()); json += '"';
  json += F(", "); 
  json += '"'; json += F("wifiautoconnect"); json += '"';
  json += ':';
  json += '"'; json += String(WiFi.getAutoConnect()); json += '"';
  json += F(", "); 
  json += '"'; json += F("firmwareversion"); json += '"';
  json += ':';
  json += '"'; json += String(FIRMWARE_VERSION); json += '"';
  json += '}';
  
  server.sendHeader(F("cache-control"), F("private, max-age=0, no-cache, no-store"));
  server.send(200, F("text/json"), json);
}
开发者ID:Dynatrace,项目名称:ufo,代码行数:55,代码来源:MyRequestHandler.cpp

示例3: ASSURE_OPTION

void
Style::drawComboBox(const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const
{
    ASSURE_OPTION(cmb, ComboBox);
    OPT_ENABLED OPT_HOVER OPT_FOCUS
    SAVE_PAINTER(Pen|Brush|Alias);
    if ( widget && widget->inherits("WebView") ) {
        // paints hardcoded black text bypassing the style?! grrr...
        const_cast<QStyleOptionComboBox*>(cmb)->palette.setColor(QPalette::Window, QColor(230,230,230,255));
        widget = 0;
    }

    animStep = !widget ? MAX_STEPS*hover : Animator::Hover::step(widget);

    QRect ar;
    const QComboBox *combo = widget ? qobject_cast<const QComboBox*>(widget) : NULL;
    if ((cmb->subControls & SC_ComboBoxArrow) && (!combo || combo->count() > 0)) {   // do we have an arrow?
        ar = subControlRect(CC_ComboBox, cmb, SC_ComboBoxArrow, widget);
        const int dx = (F(2) & ~1) / 2;
        ar.translate(cmb->direction == Qt::LeftToRight ? -dx : dx, 0);
    }

    const bool listShown = combo && combo->view() && ((QWidget*)(combo->view()))->isVisible();
    if (listShown) { // this messes up hover
        hover = hover || QRect(widget->mapToGlobal(RECT.topLeft()), RECT.size()).contains(QCursor::pos()); // TODO Qt5, avoid asking for the cursor pos
        animStep = MAX_STEPS;
    }

    QColor c = hasFocus ? FCOLOR(Highlight) : (cmb->editable ? FCOLOR(Text) : FCOLOR(WindowText));
    if (cmb->editable) {
        drawLineEditFrame(option, painter, widget);
        c = FX::blend(FCOLOR(Base), c, MAX_STEPS, 1 + 2*animStep);
    } else {
        const int icon = cmb->currentIcon.isNull() ? 0 : cmb->iconSize.width() + F(4);
        QFont fnt(painter->font());
        fnt.setBold(true);
        int text = QFontMetrics(fnt).width(cmb->currentText);
        if (text)
            text += F(4);

        if (!(text+icon)) // webkit etc.
            text = ar.left() - (F(16) + RECT.x());

        painter->setRenderHint(QPainter::Antialiasing, true);
        painter->setPen(QPen(hasFocus ? FCOLOR(Highlight) : FX::blend(FCOLOR(Window), c, 4, 1), FRAME_STROKE));
        painter->setBrush(Qt::NoBrush);

        const int y = ar.y() + ar.height()/2;
        const int da = animStep * 168 / MAX_STEPS;
        if (option->direction == Qt::LeftToRight) {
            DRAW_SEGMENT(ar, 16*(120 - da/2), 16*(192+da));
            painter->drawLine(RECT.x() + icon + text + F(6), y, ar.left()-F(2), y);
        } else {
            DRAW_SEGMENT(ar, 16*(30 + da/2), -16*(192+da));
            painter->drawLine(RECT.right() - (icon + text + F(6)), y, ar.right()+F(2), y);
        }
        c = FX::blend(FCOLOR(Window), FCOLOR(WindowText), MAX_STEPS - animStep, 1 + animStep);
    }

    if (!isEnabled) {
        RESTORE_PAINTER
        return;
    }
开发者ID:cazimi,项目名称:virtuality,代码行数:63,代码来源:input.cpp

示例4: F

 ~AutoPtr() {
   if (mPtr)
     F(mPtr);
 }
开发者ID:kenberland,项目名称:mozilla-gnome-keyring,代码行数:4,代码来源:GnomeKeyring.cpp

示例5: F

  { "-seed",   OPT_INT,     &seed,   "Seed for random parameters." },
  { "-points", OPT_INT,     &points, "Number of points to produce." },
  { "-f0",     OPT_DOUBLE,  &f0,     "Initial fish population." },
  { "-s0",     OPT_DOUBLE,  &s0,     "Initial shark population." },
  { "-a",      OPT_DOUBLE,  &a,      "Fish growth rate." },
  { "-b",      OPT_DOUBLE,  &b,      "Shark consumption rate." },
  { "-c",      OPT_DOUBLE,  &c,      "Fish nutritional value." },
  { "-d",      OPT_DOUBLE,  &d,      "Shark death rate." },
  { "-dt",     OPT_DOUBLE,  &dt,     "Time step increment." },
  { NULL,      OPT_NULL,    NULL,    NULL }
};

char help_string[] = "\
Integrates the two-species Lotka-Volterra predator-prey system, \
\
dF/dt = F(a - bS), dS/dt = S(cF - d), \
\
according to the specified parameters.\
";

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

/* The two differential equations to integrate. */

void myfunc(double x, double y, double *xx, double *yy)
{
  *xx = x * (a - b * y);
  *yy = y * (c * x - d);
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
开发者ID:Stray,项目名称:CBofN,代码行数:31,代码来源:lotka.c

示例6: errorPrint

//------------------------------------------------------------------------------
void SdFatBase::errorPrint(Print* pr, char const* msg) {
  pr->print(F("error: "));
  pr->println(msg);
  errorPrint(pr);
}
开发者ID:0x1abin,项目名称:Gamebuino,代码行数:6,代码来源:SdFat.cpp

示例7: open

/*
* Open for reading
*
* Returns true on success
*/
boolean SimpleConfig::open(boolean write)
{
  mlog.WARNING(F("SimpleConfig::base class called"));
  return false;
}
开发者ID:digitalfotografen,项目名称:Arduino-Thingspeak,代码行数:10,代码来源:SimpleConfig.cpp

示例8: close

/*
* Close file
*/
boolean SimpleConfig::close()
{
  mlog.WARNING(F("SimpleConfig::base class called"));
  // if writeMode, then remember to terminate file 
  return false;
}
开发者ID:digitalfotografen,项目名称:Arduino-Thingspeak,代码行数:9,代码来源:SimpleConfig.cpp

示例9: LAYOUT_65_ansi

   * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
   * │ TAB │  Q  │  W  │  E  │  R  │  T  │  Y  │  U  │  I  │  O  │  P  │  [  │  ]  │  \  │█████│END  │
   * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
   * │CAPSL│  A  │  S  │  D  │  F  │  G  │  H  │  J  │  K  │  L  │  ;  │  '  │▒▒▒▒▒│ENTER│█████│PG_UP│
   * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
   * │LSHFT│▒▒▒▒▒│  Z  │  X  │  C  │  V  │  B  │  N  │  M  │  ,  │  .  │  /  │▒▒▒▒▒│RSHFT│ UP  │PG_DN│
   * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
   * │LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│
   * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
   */

  /* 0: ANSI qwerty */
  [_BL] = LAYOUT_65_ansi(
        KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
        KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \
        F(2),   KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,       KC_ENT,     KC_PGUP, \
        KC_LSPO,     KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,    KC_RSPC, KC_UP, KC_PGDN, \
        KC_LCTL, KC_LALT, KC_LGUI,            KC_SPC,            KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),


  /* 1: Locking arrow keys to WASD for when you need dedicated arrow keys
   *  ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
   *  │     │     │     │     │     │     │     │     │     │     │     │     │     │▒▒▒▒▒│▒▒▒▒▒│     │
   *  ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
   *  │     │     │ Up  │     │     │     │     │     │     │     │     │     │     │     │▒▒▒▒▒│     │
   *  ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
   *  │     │Left │Down │Right│     │     │     │     │     │     │     │     │▒▒▒▒▒│     │▒▒▒▒▒│     │
   *  ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
   *  │     │▒▒▒▒▒│     │     │     │     │     │     │     │     │     │     │▒▒▒▒▒│     │     │     │
   *  ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
   *  │     │     │     │█████│█████│█████│     │█████│█████│█████│     │     │     │     │     │     │
开发者ID:Depariel,项目名称:qmk_firmware,代码行数:31,代码来源:keymap.c

示例10: DATA_INTEGER

Type objective_function<Type>::operator() ()
{
  DATA_INTEGER(minAge);         
  DATA_INTEGER(maxAge);         
  DATA_INTEGER(minYear);        
  DATA_INTEGER(maxYear);        
  DATA_ARRAY(catchNo);        
  DATA_ARRAY(stockMeanWeight);
  DATA_ARRAY(propMature);     
  DATA_ARRAY(M);              
  DATA_INTEGER(minAgeS);        
  DATA_INTEGER(maxAgeS);        
  DATA_INTEGER(minYearS);       
  DATA_INTEGER(maxYearS);       
  DATA_SCALAR(surveyTime);     
  DATA_ARRAY(Q1);  

  PARAMETER_VECTOR(logN1Y);
  PARAMETER_VECTOR(logN1A);
  PARAMETER_VECTOR(logFY);
  PARAMETER_VECTOR(logFA);
  PARAMETER_VECTOR(logVarLogCatch);
  PARAMETER_VECTOR(logQ);
  PARAMETER(logVarLogSurvey);  

  int na=maxAge-minAge+1;
  int ny=maxYear-minYear+1;
  int nas=maxAgeS-minAgeS+1;
  int nys=maxYearS-minYearS+1;

  // setup F
  matrix<Type> F(ny,na);
  for(int y=0; y<ny; ++y){
    for(int a=0; a<na; ++a){
      F(y,a)=exp(logFY(y))*exp(logFA(a));
    }
  }
  // setup logN
  matrix<Type> logN(ny,na);
  for(int a=0; a<na; ++a){
    logN(0,a)=logN1Y(a);
  } 
  for(int y=1; y<ny; ++y){
    logN(y,0)=logN1A(y-1);
    for(int a=1; a<na; ++a){
      logN(y,a)=logN(y-1,a-1)-F(y-1,a-1)-M(y-1,a-1);
      if(a==(na-1)){
        logN(y,a)=log(exp(logN(y,a))+exp(logN(y,a-1)-F(y-1,a)-M(y-1,a)));
      }
    }
  }
  matrix<Type> predLogC(ny,na);
  for(int y=0; y<ny; ++y){
    for(int a=0; a<na; ++a){
      predLogC(y,a)=log(F(y,a))-log(F(y,a)+M(y,a))+log(Type(1.0)-exp(-F(y,a)-M(y,a)))+logN(y,a);
    }
  }

  Type ans=0; 
  for(int y=0; y<ny; ++y){
    for(int a=0; a<na; ++a){
      if(a==0){
        ans+= -dnorm(log(catchNo(y,a)),predLogC(y,a),exp(Type(0.5)*logVarLogCatch(0)),true);
      }else{
        ans+= -dnorm(log(catchNo(y,a)),predLogC(y,a),exp(Type(0.5)*logVarLogCatch(1)),true);
      }
    }
  }

  matrix<Type> predLogS(nys,nas);
  for(int y=0; y<nys; ++y){
    for(int a=0; a<nas; ++a){
			int sa        = a+(minAgeS-minAge);
			int sy        = y+(minYearS-minYear);
			predLogS(y,a) = logQ(a)-(F(sy,sa)+M(sy,sa))*surveyTime+logN(sy,sa);
			ans          += -dnorm(log(Q1(y,a)),predLogS(y,a),exp(Type(0.5)*logVarLogSurvey),true);
    }
  }

  vector<Type> ssb(ny);
  ssb.setZero();
  for(int y=0; y<=ny; ++y){
    for(int a=0; a<na; ++a){
    	std::cout<<y<<" "<<a<<" "<<"\n";
      ssb(y)+=exp(logN(y,a))*stockMeanWeight(y,a)*propMature(y,a);
    }
  }

  ADREPORT(ssb);
  return ans;
}
开发者ID:DanOvando,项目名称:Feb2016,代码行数:91,代码来源:poll.cpp

示例11: T

void T(void) {
	affiche_balise_ouvrante(__func__, TRACE_XML);
	F();
	Tprime();
	affiche_balise_fermante(__func__, TRACE_XML);
}
开发者ID:mschimek,项目名称:cours-compilation,代码行数:6,代码来源:analyseur_syntaxique_mini.c

示例12: ANSI_KEYMAP

   * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
   * │ ESC │  1  │  2  │  3  │  4  │  5  │  6  │  7  │  8  │  9  │  0  │  -  │  =  │▒▒▒▒▒│BKSPC│DEL  │
   * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
   * │ TAB │  Q  │  W  │  E  │  R  │  T  │  Y  │  U  │  I  │  O  │  P  │  [  │  ]  │  \  │█████│END  │
   * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
   * │CAPSL│  A  │  S  │  D  │  F  │  G  │  H  │  J  │  K  │  L  │  ;  │  '  │▒▒▒▒▒│ENTER│█████│PG_UP│
   * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
   * │LSHFT│▒▒▒▒▒│  Z  │  X  │  C  │  V  │  B  │  N  │  M  │  ,  │  .  │  /  │▒▒▒▒▒│RSHFT│ UP  │PG_DN│
   * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
   * │LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│
   * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
   */

  /* 0: ANSI qwerty */
  [_BL] = ANSI_KEYMAP(
        F(4),   KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
        KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \
        F(2),   KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,       KC_ENT,     KC_PGUP, \
        KC_LSFT,     KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,    KC_RSFT, KC_UP, KC_PGDN, \
        KC_LCTL, KC_LALT, KC_LGUI,            KC_SPC,            KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),


  /* 1: Locking arrow keys to WASD for when you need dedicated arrow keys
   *  ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
   *  │     │     │     │     │     │     │     │     │     │     │     │     │     │▒▒▒▒▒│▒▒▒▒▒│     │
   *  ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
   *  │     │     │ Up  │     │     │     │     │     │     │     │     │     │     │     │▒▒▒▒▒│     │
   *  ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
   *  │     │Left │Down │Right│     │     │     │     │     │     │     │     │▒▒▒▒▒│     │▒▒▒▒▒│     │
   *  ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
   *  │     │▒▒▒▒▒│     │     │     │     │     │     │     │     │     │     │▒▒▒▒▒│     │     │     │
开发者ID:npoirey,项目名称:qmk_firmware,代码行数:31,代码来源:keymap.c

示例13: sendHandshake

void SocketIOClient::sendHandshake(char hostname[]) {
	client.println(F("GET /socket.io/1/ HTTP/1.1"));
	client.print(F("Host: "));
	client.println(hostname);
	client.println(F("Origin: Arduino\r\n"));
}
开发者ID:ApioLab,项目名称:Objects,代码行数:6,代码来源:SocketIOClient.cpp

示例14: PushCallStack

inline void
TrtrsmLLN
( UnitOrNonUnit diag, F alpha, const Matrix<F>& L, Matrix<F>& X,
  bool checkIfSingular )
{
#ifndef RELEASE
    PushCallStack("internal::TrtrsmLLN");
#endif
    // Matrix views
    Matrix<F> 
        LTL, LTR,  L00, L01, L02,
        LBL, LBR,  L10, L11, L12,
                   L20, L21, L22;
    Matrix<F> 
        XTL, XTR,  X00, X01, X02,
        XBL, XBR,  X10, X11, X12,
                   X20, X21, X22;

    Matrix<F> Z11;

    // Start the algorithm
    ScaleTrapezoid( alpha, LEFT, LOWER, 0, X );
    LockedPartitionDownDiagonal
    ( L, LTL, LTR,
         LBL, LBR, 0 );
    PartitionDownDiagonal
    ( X, XTL, XTR,
         XBL, XBR, 0 );
    while( XBR.Height() > 0 )
    {
        LockedRepartitionDownDiagonal
        ( LTL, /**/ LTR,  L00, /**/ L01, L02,
         /*************/ /******************/
               /**/       L10, /**/ L11, L12,
          LBL, /**/ LBR,  L20, /**/ L21, L22 );

        RepartitionDownDiagonal
        ( XTL, /**/ XTR,  X00, /**/ X01, X02,
         /*************/ /******************/
               /**/       X10, /**/ X11, X12,
          XBL, /**/ XBR,  X20, /**/ X21, X22 );

        //--------------------------------------------------------------------//
        Trsm( LEFT, LOWER, NORMAL, diag, F(1), L11, X10, checkIfSingular );
        TrtrsmLLNUnb( diag, F(1), L11, X11 );
        Gemm( NORMAL, NORMAL, F(-1), L21, X10, F(1), X20 );
        Z11 = X11;
        MakeTrapezoidal( LEFT, LOWER, 0, Z11 );
        Gemm( NORMAL, NORMAL, F(-1), L21, Z11, F(1), X21 );
        //--------------------------------------------------------------------//

        SlideLockedPartitionDownDiagonal
        ( LTL, /**/ LTR,  L00, L01, /**/ L02,
               /**/       L10, L11, /**/ L12, 
         /*************/ /******************/
          LBL, /**/ LBR,  L20, L21, /**/ L22 );

        SlidePartitionDownDiagonal
        ( XTL, /**/ XTR,  X00, X01, /**/ X02,
               /**/       X10, X11, /**/ X12, 
         /*************/ /******************/
          XBL, /**/ XBR,  X20, X21, /**/ X22 );
    }
#ifndef RELEASE
    PopCallStack();
#endif
}
开发者ID:jimgoo,项目名称:Elemental,代码行数:67,代码来源:LLN.hpp

示例15: readln

/*
* Read one null terminated line from file to buff
*
* Returns line length, NULL on failure
*/
int SimpleConfig::readln(char *buff, int maxlen)
{
  mlog.WARNING(F("SimpleConfig::base class called"));
  buff[0] = '\0';
  return NULL;
}
开发者ID:digitalfotografen,项目名称:Arduino-Thingspeak,代码行数:11,代码来源:SimpleConfig.cpp


注:本文中的F函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。