46
Hardware / Re:Poraďte klávesnici a myš s jednoduchým přepínáním mezi PC
« kdy: 08. 02. 2023, 23:16:15 »
Vôbec nie práve naopak. S tým prepínačom na usb-c / hdmi to nie je zla idea.
Tato sekce Vám umožňuje zobrazit všechny příspěvky tohoto uživatele. Prosím uvědomte si, že můžete vidět příspěvky pouze z oblastí Vám přístupných.
public function rules(): array
{
return [
'planed_day' => ['required', 'string', 'min:2', 'max:60'],
'device_id' => ['required','numeric','gt:0'],
'day_position' => ['required','numeric'],
'value' => ['required','numeric','min:0', 'max:1000'],
'device_parameter' => ['required','string','min:2', 'max:60'],
];
}
class CsvImport implements ToModel, WithHeadingRow
{
/**
* @param array $row
*
* @return \Illuminate\Database\Eloquent\Model|null
*/
public function rules(): array
{
return [
'1' => 'integer:day_position'
];
}
public function model(array $row)
{
return new Csv([
'planed_day' => $row['planed_day'],
'device_id' => $row['device_id'],
'day_position' => $row['day_position'],
'value' => $row['value'],
]);
}
}
sys.dont_write_bytecode=True
output_path = os.path.dirname(__file__)
parser = ap.ArgumentParser(description="Config.txt path")
parser.add_argument("--config")
args, leftovers = parser.parse_known_args()
if args.config is not None:
Config_file = os.path.join(args.config)
if args.config is None:
Config_file = os.path.join(output_path, 'config.txt')
fail_update = False
time_now = datetime.now()
current_time_day = time_now.strftime("%d_%m_%Y")
current_time_day = str(current_time_day)
current_time = time_now.strftime("%H:%M:%S")
current_time = str(current_time)
logging_file_string = 'App_'+current_time_day+'.log'
logging_file = os.path.join(output_path, '/log/'+logging_file_string)
filepath = os.path.join('C:\log', logging_file_string)
if not os.path.exists('C:\log'):
os.makedirs('C:\log')
try:
logging.basicConfig(filename=filepath , filemode='a', format='%(asctime)s - %(message)s', datefmt='%d-%b-%y %H:%M:%S')
logging.warning('App Started')
except:
print('Logging failed')
# Load Configuration Data
config = ConfigParser()
config.read(Config_file)
config.sections()
# Debug Option
guix_config = config['APP']['GUI']...
Pokial je to one directory program funguje spravne. Teda nacita konfig s umiestnenia kde je C:\Dev\config ked je ale ten isty program skompilovany do jedneho exe tak ukazuje cestu C:\xxxxx\AppData\Local\Temp\MEI_xxx kde je rozpakovany comu rozumiem ale nerozumiem tomu preco? Na starej masine som normalne kompiloval a slo to ako malo a tu to je ta zahada.
SqlCommand command = new SqlCommand("Select * from test WHERE DT_Start > @from and Location = @location ", backup_cnn);
command.Parameters.AddWithValue("@from", FromDate);
command.Parameters.AddWithValue("@location", Location);
SqlDataAdapter adapters = new SqlDataAdapter();
adapters.SelectCommand = command;
DataTable tables6 = new DataTable();
adapters.Fill(tables6);
dataGridView6.DataSource = tables6;
To mi funguje ako ma. Ale dajme tomu ze mi to vracia stlpec chyba kde je ciselny kod a rad by som ho zmenil takze pouzijem toto DataTable tables6 = new DataTable();
adapters.Fill(tables6);
foreach (DataRow dr in tables6.Rows) // search whole table
{
if (dr['chyba'] == 76) // if id==2
{
dr["chyba"] = " Chyba 1"; //change the name
//break; break or not depending on you
}
}
dataGridView6.DataSource = tables6;
Problemje ze mi to upravuje len prvy vysledok a ked je viacero riadkov s rovnakym ID pre chybu upravuje len jednu.