Exemple #1
0
NEVER_INLINE unsigned StringImpl::hashSlowCase() const {
  if (is8Bit())
    setHash(StringHasher::computeHashAndMaskTop8Bits(characters8(), m_length));
  else
    setHash(StringHasher::computeHashAndMaskTop8Bits(characters16(), m_length));
  return existingHash();
}
Exemple #2
0
//取得
Story* StoryManager::getByid(int id, int number = 1)
{
    auto story = Story::getInstance();
    
    
    sqlite3_stmt* stmt;
    char* sql = "SELECT * FROM `story` WHERE `id`= ? AND `number` = ?";
    const char *pzTest;
    sqlite3_prepare_v2(useDataBase, sql, std::strlen(sql), &stmt, &pzTest);
    sqlite3_reset(stmt);
    
    sqlite3_bind_int(stmt, 1, id);
    sqlite3_bind_int(stmt, 2, number);
    sqlite3_step(stmt);
    
    story->setId(sqlite3_column_int(stmt, 0));
    story->setHash((char*)sqlite3_column_text(stmt, 1));
    story->setTitle((char*)sqlite3_column_text(stmt, 2));
    story->setText((char*)sqlite3_column_text(stmt, 3));
    story->setNumer(sqlite3_column_int(stmt, 4));
    story->setNumberMax(sqlite3_column_int(stmt, 5));
    
    sqlite3_finalize(stmt);
    
    return story;
}
void ccPacketHandler::testPacket(byte receiver, byte sender)

{

    for (byte i = 0; i < _ccPacket.length; ++i) /// fill packet with zeros

    {

        _ccPacket.data[i] = i; /// set i-th byte := i for each byte in the packet

    }

    setReceiver(receiver); /// setting receiver

    setSender(sender); /// setting sender

    setAdminKey(TEST); /// setting administration key - default := 255

    setHash(ccHash()); /// hashing the data and saving in member _hash

}
Exemple #4
0
//複数の取得
std::vector<Story*> StoryManager::gets()
{
    sqlite3_stmt* stmt;
    auto sql = "select * from `story` WHERE `number` = 1";
    const char *pzTest;
    sqlite3_prepare_v2(useDataBase, sql, std::strlen(sql), &stmt, &pzTest);
    sqlite3_reset(stmt);
    
    std::vector<Story*> storyies;
    while (sqlite3_step(stmt) == SQLITE_ROW) {
        auto story = Story::getInstance();
        story->setId(sqlite3_column_int(stmt, 0));
        story->setHash((char*)sqlite3_column_text(stmt, 1));
        story->setTitle((char*)sqlite3_column_text(stmt, 2));
        story->setText((char*)sqlite3_column_text(stmt, 3));
        story->setNumer(sqlite3_column_int(stmt, 4));
        story->setNumberMax(sqlite3_column_int(stmt, 5));
        
        storyies.push_back(story);
    }
    sqlite3_finalize(stmt);
    
    return storyies;
}
Exemple #5
0
void ProofNode::set(ZZ hashOfNotIncluded, bool includedPos) {
    setHash(hashOfNotIncluded); rgtOrDwn = includedPos;
}
KernelCode::KernelCode(const KernelCode& kernelCode) {
	mFuncNum = kernelCode.mFuncNum;
	setName(kernelCode.mName);
	setHash(kernelCode.mHash);
}