Access Microsoft Graph API with Qt (using Qt Network Authentication) 

1. register a native application at the Microsoft Azure Active directory:
https://portal.azure.com






Make sure you start the redirect url with http://127.0.0.1 not http://localhost! More details here.

3. starting from the reddit example modify your dode with:

auto replyHandler = new QOAuthHttpServerReplyHandler(1337, this);
oauth2.setClientIdentifier("xxxxxx-a90c-494d-808e-3749796ae80f";);
oauth2.setReplyHandler(replyHandler);
oauth2.setAuthorizationUrl(QUrl("https://login.microsoftonline.com/common/oauth2/authorize";));
oauth2.setAccessTokenUrl(QUrl("https://login.microsoftonline.com/common/oauth2/token";));

[ hozzászólás ] ( 2 megtekintés ) [ 0 trackbackek ] permalink ( 2.9 / 120 )
Testing flashrom 


head -c 8388608 </dev/urandom > random.bin
date
./flashrom -p stlinkv3_spi:spispeed=12000 -w random.bin -c MX25L6406E/MX25L6408E
date
./flashrom -p stlinkv3_spi:spispeed=12000 -r random_read.bin -c MX25L6406E/MX25L6408E
date
diff random.bin random_read.bin


[ hozzászólás ] ( 1 megtekintés ) [ 0 trackbackek ] permalink ( 3.1 / 120 )
When saving belongsTo data does not work with CakePHP 3 

Make sure that you are exposed the belongsTo entity as an accessible field in the saved entity.

Example:

UnitType belongsTo BaseUnit (src/Model/Table/UnitType.php):

...
public function initialize(array $config)
{
...
$this->belongsTo('BaseUnits', [
'foreignKey' => 'base_unit_id',
'className' => 'Units',
'joinType' => 'INNER'
]);


BaseUnit added as an accessible field in src/Model/Entity/UnitType.php

protected $_accessible = [
'name' => true,
'base_unit_id' => true,
'base_unit' => true,
'created_by' => true,
'modified_by' => true,
'units' => true,
'item_types_attributes' => true,
'items' => true
];


Form:

<?php
echo $this->Form->control('name', ['label' => __('Mennyiségi egység neve (pld. térfogat)';)]);
?>
<h4><?= __('Alapértelmezett mértékegység';) ?></h4>
<?php
echo $this->Form->control('base_unit.name', ['label' => __('Mértékegység neve (pld. liter)';)]);
echo $this->Form->control('base_unit.short_name', ['label' => __('Mértékegység rövid neve (pld. l)';)]);
?>


Saved with the following method in the controller:

$unitType = $this->UnitTypes->newEntity();
if ($this->request->is('post';)) {
$unitType = $this->UnitTypes->patchEntity(
$unitType,
$this->request->getData(),
['associated' => ['BaseUnits']]
);
if ($this->UnitTypes->save($unitType)) {

[ hozzászólás ] [ 0 trackbackek ] permalink ( 2.8 / 126 )
Foxeer Box2 NMAP output 

[ hozzászólás ] ( 1 megtekintés ) [ 0 trackbackek ] permalink ( 3.2 / 186 )
Daily flashrom development lessons 

Generating random content with size:

head -c 524288 </dev/urandom > random.bin

Never trust autodetect, specify the flash name explicitly with -c. (My SST25LF040A was not detectable with autodetect)

Assert CS at the begining of spi_master::command and deassert befor leaving it.
[ hozzászólás ] [ 0 trackbackek ] permalink ( 3.1 / 320 )

<< <Előző | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Következő> >>

 
számláló