categories – How can you access category information from a topic?

I create a wordpress site to host my illustrations and comics, each series of comics is in its own category, so I would like to display the category information in the site via my theme / plugin that I create.

There are three things I would like to do:

  • Display the category title, description and a URL to its archive using its category ID.
  • Get the identifiers of the oldest and most recent article in this category so that I can add links to "Start Reading" and "Read Last"
  • Sort an array of Category IDs by date of the last post, so the last updated series can automatically float to the top of the list.

Is it possible to do this?

Bitcoin peer information

Why when I launch in the bitcoin-cli getpeerinfo node the list is an empty array? Should I allow time to connect other peers?

Microsoft Excel 2016 – Preservation of information entered by the user in a table from Power Pivot

Is there a way to keep the information entered by the user in a table from PowerPivot?

I have a read-only query pulling a large dataset and populating a Power Pivot table.

The table is imported into a spreadsheet using Data-> Existing Connections-> Table. I would like to be able to add a "Comments" column which would be updated manually by different users. I would like to keep this column when the query is refreshed – with comments not moving randomly from their records if the table is sorted, filtered, etc. before updating (each record has its unique identifier).

How can this be done?

information visualization – Visualize a simple workflow – content visualization

Consider using a Sankey diagram to visualize the workflow.

visualization of a security incident workflow

I've seen hierarchical graphs used to describe the workflow, but I always thought they were missing something – nodes that can have two parents, for example. A Sankey diagram solves this problem, and provides a trivial way to introduce the concept of the amount of volume that travels between "nodes". In addition, by definition, an organization chart is "a type of diagram that represents a workflow or process". Sankey's diagram seems to flow much more than a pie chart.

For more information, see the compelling case of David Pallmann for using Sankey diagrams to visualize the workflow.

I was able to create this workflow visualization in 10 minutes by forcing the Sankey demo from Highcharts and customizing the series data as follows:

    data: [
        ['Event Submission', 'Event Submission Close', 250],
        ['Event Submission', 'Create Incident', 750],
        ['Event Submission Close', 'Approve', 240],
        ['Event Submission Close', 'Reject', 10],
        ['Approve', 'After Action Review', 640],
        ['Create Incident', 'Contained', 400],
        ['Create Incident', 'Provide Analysis', 150],
        ['Create Incident', 'Incident Close', 125],
        ['Contained', 'Containment Approval', 370],
        ['Contained', 'Containment Rejection', 30],
        ['Incident Close', 'Approve', 110],
        ['Incident Close', 'Reject', 15],
        ['Containment Approval', 'Eradicated', 320],
        ['Containment Approval', 'Provide Analysis', 50],
        ['Eradicated', 'Eradication Approval', 315],
        ['Eradicated', 'Eradication Rejection', 5],
        ['Eradication Approval', 'Recovered', 315],
        ['Eradication Approval', 'Provide Analysis', 5],
        ['Recovered', 'Approve', 310],
        ['Recovered', 'Reject', 5]
    ]

Page not found – Information Security Stack Exchange

Battery exchange network

The Stack Exchange network includes 175 question and answer communities, including Stack Overflow, the largest and most reliable online community for developers who want to learn, share knowledge and develop their careers.

Visit Stack Exchange

hash – Argon2id Configuration – Information security stack exchange

I read an article on usage Argon2id in C # here.

Here is the code they wrote (slightly modified):

using System;
using System.Diagnostics;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using Konscious.Security.Cryptography;   

namespace Playground
{
    class Program
    {
        // No. of CPU Cores x 2.
        private const int DEGREE_OF_PARALLELISM = 16;

        // Recommended minimum value.
        private const int NUMBER_OF_ITERATIONS = 4;

        // 600 MB.
        private const int MEMORY_TO_USE_IN_KB = 600000;

        static void Main(string() args)
        {
            var password = "SomeSecurePassword";               
            byte() salt = CreateSalt();
            byte() hash = HashPassword(password, salt);                

            var otherPassword = "SomeSecurePassword";                                
            var success = VerifyHash(otherPassword, salt, hash);                
            Console.WriteLine(success ? "Passwords match!" : "Passwords do not match.");                
        }

        private static byte() CreateSalt()
        {
            var buffer = new byte(16);
            var rng = new RNGCryptoServiceProvider();
            rng.GetBytes(buffer);

            return buffer;
        }

        private static byte() HashPassword(string password, byte() salt)
        {
            var argon2id = new Argon2id(Encoding.UTF8.GetBytes(password));
            argon2id.Salt = salt;
            argon2id.DegreeOfParallelism = DEGREE_OF_PARALLELISM;
            argon2id.Iterations = NUMBER_OF_ITERATIONS;
            argon2id.MemorySize = MEMORY_TO_USE_IN_KB;

            return argon2id.GetBytes(16);
        }

        private static bool VerifyHash(string password, byte() salt, byte() hash)
        {
            var newHash = HashPassword(password, salt);
            return hash.SequenceEqual(newHash);
        }
    }
}

I have the following questions:

  1. On Konscious.Security cryptography. README page, instead of argon2id.GetBytes(16), they use argon2.GetBytes(128) which returns a longer value.

Assuming the configurations are the same, 128 safer approach than the 16 one because it's longer?

  1. From what I understand, the more memory we leave Argon2id the more secure it will be against custom hardware attacks.

So I guess even if 40 iterations with 70 MB and 4 iterations with 600 MB take about the same time, the higher memory cost of this last configuration is justified because it is more secure. Is it correct?

information visualization – Guidelines for creating connections between different areas of a user interface

Previous discussion What is an intuitive interface for making connections between user interface elements?

We have a web application called a genome browser, and we want to make connections between different areas of the genome. As this is a kind of application specific context, let's imagine a more general idea. Let's say you have two different graphics and you want to connect dots between them

So we can make fun of it like that

enter description of image here

Now what if, instead of just one bar graph at the top and bottom, we have two at the top and two at the bottom, where the two at the top are linked by their genomic region and the two below are linked by their genomic region. So now, if we want to make connections between them, there are a lot of cross-cutting elements

enter description of image here

Now at this point the user interface looks pretty chaotic. There are also other concerns like

  • connection lines must be drawn in an overlay, which really limits how we can interact with, because in HTML, overlays really mess up your event handling: you have to put pointer events: none on the overlay for click on the underlay, and can optionally turn it off to interact with the overlay, but this requires a manual toggle
  • what if we just render the connection lines regardless of the graphics at the top and bottom, because maybe we just care about the connections and the pattern that they do more than the actual bargraphs. in this case we can just render to a middle area rather than an overlay, but it gets a little confusing what "state" it is now in the app, how to activate it and disable if it is separated from the lines on the top and bottom?

These are just a few concerns. Overlay often results in at least some visual chaos and conceptual confusion, although it can also be helpful in some cases. Are there similar directives or user interfaces in other applications that have these type of problems?

REST API Obtain product information based on the name Magento 1.9

I have created a custom module but I can't seem to get products based on the name of the categories. If I pass only one name, it works.

app / etc / modules / Custom_Restapi.xml



    
        
            true
            local
            
                Mage_Api2
            
        
    

app / code / local / custom / Restapi / config.xml


    
        
            0.1.0
        
    
    
        
            
                Custom_Restapi_Model
            
        
    

application / code / local / custom / Restapi / api2.xml



    
        
            
                Rest API For Auctions
                10
            
        
        
            
                custom_restapi
                custom_restapi/api2_restapi
                Similar Machines API
                10
                
                    
                        1
            1
                    
                
                
                
                    
                        /similar-machines/:name
                        collection
                    
                
                1
            
        
    

app / code / local / custom / Restapi / model / Api2 / Restapi.php

application / code / local / custom / Restapi / model / Api2 / Restapi / Rest / Guest / V1.php

protected function _retrieveCollection($categoriesData)
{
    $cur_category = $fetchIds = $info = $names = array();
    $categoryName = $this->getRequest()->getParam('name');
    if (strpos($categoryName, "https://magento.stackexchange.com/#") !== false) {
        $names = explode("https://magento.stackexchange.com/#",$categoryName);
    }
    else{
        $names() = $categoryName;
    }
    $storeId = Mage::app()->getStore()->getStoreId();
    $_category = Mage::getResourceModel('catalog/category_collection')->addFieldToFilter('name', array('in'=>$names));

    if($_category->count() > 0)
    {
        foreach ($_category as $cateInfo)
        {
            $fetchIds() = $cateInfo->getEntityId();
        }

        $collection =
            Mage::getResourceModel('catalog/product_collection')
                ->setStoreId($storeId)
                ->addFieldToFilter('status',Mage_Catalog_Model_Product_Status::STATUS_ENABLED)
                ->joinField('category_id', 'catalog/category_product', 'category_id',
                    'product_id=entity_id', null, 'left')
                ->joinField('is_in_stock', 'cataloginventory/stock_item', 'is_in_stock', 'product_id=entity_id', 'is_in_stock=1', '{{table}}.stock_id=1', 'left')
                ->addAttributeToFilter('category_id', array('in' => $fetchIds))
                ->addAttributeToSelect(array('entity_id','sku','name','url_path','short_description','status','image','is_in_stock'));
        $collection->getSelect()->group('entity_id')->distinct(true);

        $collection->getSelect()->order(new Zend_Db_Expr('RAND()'));
        $collection->getSelect()->limit(30);

        if($collection->count() > 0)
        {
            foreach($collection as $product)
            {
                $productId = $product->getEntityId();
                //$img = $model->getAttributeRawValue($productId, 'thumbnail', $storeId);
                $info('data')($productId)('id') = $productId;
                $info('data')($productId)('name') = $product->getShortDescription();
                $info('data')($productId)('alt_name') = $product->getName();
                $info('data')($productId)('url') = Mage::getBaseUrl().$product->getUrlPath();
                $info('data')($productId)('img_info') = Mage::getModel('catalog/product_media_config')
                ->getMediaUrl($product->getImage());
            }
            $info('status') = "success";
            $info('has_data') = 1;
        }
        else{
            $info('data') = array();
            $info('status') = "success";
            $info('has_data') = 0;
        }
    }
    else{
        $info('data') = array();
        $info('status') = "success";
        $info('has_data') = 0;
    }

    $cur_category() = $info;

return json_encode($cur_category);
}


/*public function _create(array $data) {
    $categories = $data('categories');
    $collection =
            Mage::getResourceModel('catalog/product_collection')
                ->setStoreId($storeId)
                ->addFieldToFilter('status',Mage_Catalog_Model_Product_Status::STATUS_ENABLED)
                ->joinField('category_id', 'catalog/category_product', 'category_id',
                    'product_id=entity_id', null, 'left')
                ->joinField('is_in_stock', 'cataloginventory/stock_item', 'is_in_stock', 'product_id=entity_id', 'is_in_stock=1', '{{table}}.stock_id=1', 'left')
                ->addAttributeToFilter('category_id', array('in' => $categories))
                ->addAttributeToSelect(array('entity_id','sku','name','url_path','short_description','status','image','is_in_stock'));
        $collection->getSelect()->group('entity_id')->distinct(true);

        $collection->getSelect()->order(new Zend_Db_Expr('RAND()'));
        $collection->getSelect()->limit(30);

        return json_encode($collection);
}*/

}

I have to pass the category table to get the product collection
API: http://127.0.0.1/api/rest/products-info/
I want to convert to a post-rest API because the category names can contain space. What I need to improve in this code.

ubuntu – IKE authentication information is unacceptable

I have been trying to create an IKEv2 Strongswan VPN server (U5.7.2 / K5.3.0-42-generic) for two days on my personal VPS (Ubuntu 19.10) to do some tests before implementing it on the 39; Unifi equipment of my work (I hope it will be possible)

I used different tutorials and troubleshooting pages to do my conf

I use radius authentication (with a local freeradius server) for users

And I am faced with this stupid problem, I hope one of you can take 2 minutes to help me 🙂

I will try to be as talkative as possible, feel free to ask for more information if needed

My ipsec.conf:

config setup
  strictcrlpolicy=yes
  uniqueids=never
conn roadwarrior
  auto=add
  compress=no
  type=tunnel
  keyexchange=ikev2
  fragmentation=yes
  forceencaps=yes

  ike=aes256-sha1-modp1024,aes256gcm16-sha256-ecp521,aes256-sha256-ecp384
  esp=aes256-sha1,aes128-sha256-modp3072,aes256gcm16-sha256,aes256gcm16-ecp384

  dpdaction=clear
  dpddelay=180s
  rekey=no
  left=%any
  leftid=vps807542.ovh.net
  leftcert=vpn.example.com.crt.pem
  leftsendcert=always
  leftsubnet=0.0.0.0/0
  right=%any
  rightid=%any
  rightauth=eap-radius
  eap_identity=%identity
  rightdns=8.8.8.8,8.8.4.4
  rightsourceip=10.10.10.0/24
  rightsendcert=never

My ipsec.secrets:

vpsXXXXXX.ovh.net : RSA vpn.example.com.key.der

My ipsec.d / files:

~$ sudo ls /etc/ipsec.d/private/
vpn.example.com.key.der
~$ sudo ls /etc/ipsec.d/certs/
vpn.example.com.crt.pem
~$ sudo ls /etc/ipsec.d/cacerts/
vpnca.crt.der

I imported my vpnca.crt.der on my Mac, my Android (Strongswan client), my Windows 10 Enterprise and Windows 10 Standard from a friend

Everything works fine for my Mac and Android, but can't connect to Windows

In the swanctl –log:

14(CFG) selected peer config 'roadwarrior'
14(IKE) initiating EAP_IDENTITY method (id 0x00)
14(IKE) peer supports MOBIKE
14(IKE) authentication of 'vpsXXXXXX.ovh.net' (myself) with RSA signature successful
14(IKE) sending end entity cert "C=FR, O=Test Company, CN=vpsXXXXXX.ovh.net"
14(ENC) generating IKE_AUTH response 1 ( IDr CERT AUTH EAP/REQ/ID )
14(ENC) splitting IKE message (1996 bytes) into 2 fragments
14(ENC) generating IKE_AUTH response 1 ( EF(1/2) )
14(ENC) generating IKE_AUTH response 1 ( EF(2/2) )
14(NET) sending packet: from XX.XX.XX.XX(4500) to YY.YY.YY.YY(4500) (1248 bytes)
14(NET) sending packet: from XX.XX.XX.XX(4500) to YY.YY.YY.YY(4500) (816 bytes)

Side windows, the error displayed is the usual:

"IKE authentication credentials are unacceptable"

In the Event Viewer:

CoId={6C88B9D2-54F0-4671-A12D-B506DE75630F}: The user MYWORKDOMAINmyuser dialed a connection named VPN Connection which has failed. The error code returned on failure is 13801.

What I did on the Windows side:

  • Import CA certificate into local computer certificates -> Trusted Root Certification Authorities -> Certificates
  • Create the VPN connection under VPN settings:
    • Server name or address: vpsXXXXXX.ovh.net
    • VPN type: IKEv2
    • Type of login information: user and password
  • In the properties of the ncpa.cpl adapter:
    • Security:
      • Data encryption: optional encryption
      • Authentication: use the Extensible Authentication Protocol (EAP): Microsoft: secure password (EAP-MSCHAPv2) (encryption enabled)
    • Networking: IPv6 not controlled

My certificates were generated on the VPS server via these commands:

ipsec pki --gen --type rsa --size 4096 --outform pem > vpnca.key.pem
ipsec pki --self --flag serverAuth --in vpnca.key.pem --type rsa --digest sha1 
    --dn "C=FR, O=Test Company, CN=TEST VPS CA" --ca > vpnca.crt.der
ipsec pki --gen --type rsa --size 4096 --outform pem > vpn.example.com.key.pem
ipsec pki --pub --in vpn.example.com.key.pem --type rsa > vpn.example.com.csr
ipsec pki --issue --cacert vpnca.crt.der --cakey vpnca.key.pem --digest sha1 
    --dn "C=FR, O=Test Company, CN=vpsXXXXXX.ovh.net" 
    --san "vpsXXXXXX.ovh.net" --flag serverAuth --outform pem 
    < vpn.example.com.csr > vpn.example.com.crt.pem 
openssl rsa -in vpn.example.com.key.pem -out vpn.example.com.key.der -outform DER

cp vpnca.crt.der /etc/ipsec.d/cacerts
cp vpn.example.com.crt.pem /etc/ipsec.d/certs
cp vpn.example.com.key.der /etc/ipsec.d/private

The CA has these attributes:

Verison:
V3
Serial Number:
73fbd6a8d90a33db
Signature algorithm:
sha1RSA
Signature hash algorithm:
sha1
Issuer:
CN = TEST VPS CA
O = Test Company
C = FR
Valid from:
‎Friday, ‎March ‎27, ‎2020 3:15:29 PM
Valid to:
‎Monday, ‎March ‎27, ‎2023 3:15:29 PM
Subject:
CN = TEST VPS CA
O = Test Company
C = FR
Pulic key:
RSA (4096 bits)
Pulic key parameters:
05 00
Subject key identifier:
214851f1fe79e3719be0139fab1799a9d4a08561
Enhanced Key Usage:
Server Authentication (1.3.6.1.5.5.7.3.1)
Basic Constraints:
Subject Type=CA
Path Length Constraint=None
Key Usage:
Information Not Available
Thumbprint:
78e8cc49ab508b8f477b419d369873036be488b4

The

The VPS cert attributes:

Version:
3
Serial Number:
3611432227629166526
Signature Algorithm:
sha1WithRSAEncryption
Issuer:
C = FR, O = Test Company, CN = TEST VPS CA
Validity:
Not Before: Mar 27 14:15:31 2020 GMT
Not After : Mar 27 14:15:31 2023 GMT
Subject:
C = FR, O = Test Company, CN = vpsXXXXXX.ovh.net
Public Key Algorithm:
rsaEncryption
RSA Public-Key:
(4096 bit)
X509v3 extensions:
X509v3 Authority Key Identifier:
keyid:21:48:51:F1:FE:79:E3:71:9B:E0:13:9F:AB:17:99:A9:D4:A0:85:61
X509v3 Subject Alternative Name:
DNS:vpsXXXXXX.ovh.net
X509v3 Extended Key Usage:
TLS Web Server Authentication
Signature Algorithm:
sha1WithRSAEncryption

I hope you have enough information and that you can help me because I really don't understand why my Windows is not responding to the IKE_AUTH package …

Thanks for your help and be careful!