Пример #1
0
void User::setPassword(QString password)
{
    this->clearPass = password;
    this->password = crypt(password.toAscii(), "KG");
    qDebug("Done with crypt now........");
    setChanges();
}
Пример #2
0
void MLPSimulatedAnnealingTrainingSettings::initSATS(double minTemperature, int numberOfChanges, double sCondition, double To, double minNoise, double maxNoise, double tdf)
{
	setMinTemperature(minTemperature);
	setChanges(numberOfChanges);
	setLocalMinimunCondition(sCondition);
	setTo(To);
	setMinNoise(minNoise);
	setMaxNoise(maxNoise);
	setTempDecrementFactor(tdf);
}
Пример #3
0
MLPSimulatedAnnealingTrainingSettings MLPSimulatedAnnealingTrainingSettings::operator =(const MLPSimulatedAnnealingTrainingSettings &mlpsa)
{
	setChanges(mlpsa.getChanges());
	setLocalMinimunCondition(mlpsa.getLocalMinimumCondition());
	setMaxNoise(mlpsa.getMaxNoise());
	setMinNoise(mlpsa.getMinNoise());
	setMinTemperature(mlpsa.getMinTemperature());
	setTempDecrementFactor(mlpsa.getTempDecrementFactor());
	setTo(mlpsa.getTo());
	return *this;
}
Пример #4
0
void load_snap(struct z80snapshot *snap) {

  int bucle;

  switch(snap->type) {
  case 0: // 48k
    cmpt.mode128k=0; // 48K mode
    cmpt.issue=snap->issue;
    ResetComputer();
    break;
  case 1: // 128k
    cmpt.mode128k=1; //2; // +2 mode
    cmpt.issue=3;
    ResetComputer();
//    printf("Pager: %X\n",snap->pager);
    OutZ80(0x7FFD,snap->pager);
    break;
  default:
    break;
  }

  _z80_set_A(snap->A);
#ifdef MASCARA_AF
  _z80_set_F(snap->F&MASCARA_AF);
#else
  _z80_set_F(snap->F);
#endif
  _z80_set_B(snap->B);
  _z80_set_C(snap->C);
  _z80_set_D(snap->D);
  _z80_set_E(snap->E);
  _z80_set_H(snap->H);
  _z80_set_L(snap->L);
  _z80_set_A1(snap->AA);
  _z80_set_F1(snap->FF);
  _z80_set_B1(snap->BB);
  _z80_set_C1(snap->CC);
  _z80_set_D1(snap->DD);
  _z80_set_E1(snap->EE);
  _z80_set_H1(snap->HH);
  _z80_set_L1(snap->LL);
  _z80_set_IX(snap->IX);
  _z80_set_IY(snap->IY);
  _z80_set_SP(snap->SP);
  _z80_set_PC(snap->PC);
  _z80_set_I(snap->I);
  _z80_set_R(snap->R&0x7F);

#ifdef USE_RAZE
  z80_set_reg(Z80_REG_IFF1,snap->IFF1);
  z80_set_reg(Z80_REG_IFF2,snap->IFF2);
  z80_set_reg(Z80_REG_IM,snap->Imode);
  if (snap->IFF1)
	  z80_set_reg(Z80_REG_IRQLine,1);
#else
  if(snap->IFF1)
#ifdef USE_YAZE
    yaze_IFF|=3;
#else
    procesador.IFF|=(IFF_1|IFF_EI);
#endif
  if(snap->IFF2)
#ifdef USE_YAZE
    yaze_IFF|=2;
#else
    procesador.IFF|=IFF_2;
#endif

  switch(snap->Imode) {
  case 0:
#ifdef USE_YAZE
    yaze_IFF&=~3;
#else
    procesador.IFF&=~(IFF_IM1|IFF_IM2);
#endif
    break;
  case 1:
#ifdef USE_YAZE
    yaze_IFF=(yaze_IFF&~2)|1;
#else
    procesador.IFF=(procesador.IFF&~IFF_IM2)|IFF_IM1;
#endif
    break;
  case 2:
#ifdef USE_YAZE
    yaze_IFF=(yaze_IFF&~1)|2;
#else
    procesador.IFF=(procesador.IFF&~IFF_IM1)|IFF_IM2;
#endif
    break;
  }
#endif
  cmpt.border=snap->border+16;

  switch(snap->type) {
  case 0: // 48K

    for(bucle=0;bucle<16384;bucle++) {
      cmpt.memoria[bucle+147456]=snap->page[0][bucle];
      cmpt.memoria[bucle+98304]=snap->page[1][bucle];
      cmpt.memoria[bucle+114688]=snap->page[2][bucle];
    }
    
    cmpt.ay_emul=0;
    break;
  case 1: // 128K

    for(bucle=0;bucle<16384;bucle++) {
      cmpt.memoria[bucle+65536]=snap->page[0][bucle];
      cmpt.memoria[bucle+81920]=snap->page[1][bucle];
      cmpt.memoria[bucle+98304]=snap->page[2][bucle];
      cmpt.memoria[bucle+114688]=snap->page[3][bucle];
      cmpt.memoria[bucle+131072]=snap->page[4][bucle];
      cmpt.memoria[bucle+147456]=snap->page[5][bucle];
      cmpt.memoria[bucle+163840]=snap->page[6][bucle];
      cmpt.memoria[bucle+180224]=snap->page[7][bucle];
    }
    cmpt.ay_emul=-1;
    for(bucle=0;bucle<16;bucle++)
      cmpt.ay_registers[bucle]=snap->ay_regs[bucle];
    cmpt.ay_latch=snap->ay_latch;
    break;
  default:
    break;
  }
  setChanges();
}