pci dss – Which Authentication mechanism to choose for PCI-DSS system

I want to create Angular 9 + Spring Boot application with strong security complaint to PCI-DSS security standard.

Which security protocol is preferred for user sessions in order to have high security when we use Angular and Spring Boot:

  • Session cookies
  • OAuth2
  • OAuth2 + JWT
  • JWT

for now I’m thinking to secure the application using JWT. Can you share what issue might I have using JWT and is it a good choice?

Is there a search engine with reverse search mechanism: processing multiple queries and retrieving a single result for each of them?

A regular search engine retrieves a number of results matching a single query. I need one that does the opposite: enables to input a number of queries and displays a single match to each of them. If there is no match, I need to know it too. An implementation of this approach exists, but its application is limited to the database embedding it (PubMed). Batch Citation Matcher enables a user to identify unique content in databases covering material also present in PubMed. A user can submit a text file and the engine transforms the content of the file separated in a required way into a number of queries, then displays a table with queries in one column and the information on whether the text of the queries was found in a database being compared to PubMed in another column. Is there an analogues application which can be applied to any website?

notifications – alert mechanism in python, azure

I am looking for a suggestion, I am currently building an alert mechanism application.

I have a list of mails who are concerned to the update of the data, I am using flask, python, azure to develop the application.

to send the email to people I can send them using SMTP server in azure cloud and then using python or by installing an outlook server in the cloud and then connecting that with python and by creating a cron job in the azure server where it sees for the changes and reports the changes in a certain time and send the email to a group of people.

another way is, using azure notification hub ( which I got to know when seeing such an application present in azure services or not). But I don’t know if it works or not fully yet the usage.

I am seeking help in this regard whether to use azure inbuild notification hub/ azure monitor or creating own service.

edited: for the group of people, right now I have a list of user and there information ( organization data) , as I am learning azure, I don’t have access to activate directory ( where I think using that I can make the application scaleable and define the group policies (restriction access to a certain part of an application)), is there another way to do same.

thanks

product identification – What is this dark fantasy-themed RPG with a basic mechanism based on rolling d10s and grouping dice results to be under a specific sum?

A few years ago, I read an RPG that used the basic dice mechanism: roll a certain number of d10s, then organize the dice into sets, so that the dice in each set did not exceed the limit specified. The number of sets and the number of dice in each set were involved in determining the end result, but I'm pretty sure the actual numbers on the dice and their sum were irrelevant outside of limit the dice that could be grouped.

For example, if you rolled 12 dice with a limit of 8 and got 1, 2, 3, 3, 3, 4, 4, 4, 6, 7, 9, 9, you can group them as follows:

  • Five sets of two (1/7, 2/6, 3/4, 3/4, 3/4)
  • Two sets of three (1/3/4, 2/3/3)
  • A set of three and three sets of two (2/3/3, 1/7, 3/4, 4/4)
  • All other combinations that I may have missed, as long as the sum of the dice in each group is 8 or less

The 9 are not worth in any case, because they are higher than 8 alone.

The game was presented with a definite flavor of "dark fantasy" or "viking era", although I don't remember if it had a detailed or only implied framework. Many / most examples of the use of dice mechanics have been framed in a combat context, emphasizing that multiple groups of only two dice each would represent a burst of multiple rapid and weak hits, while one single group of, say, six dice is one powerful hit.

I know that "rolling a bunch of d10s and grouping them" may sound like ORE, but this system was definitely not ORE. In ORE, grouping is dictated by the dice that roll the same number as each other, while in the system I am trying to remember, the player chooses how he wishes to group the dice and, in the in the case of opposite throws, the throwing and regrouping is done in secret, creating a strategic element to try to guess how the other person will choose to group his dice (many small groups, a large group or a mixture of small big ones) so you can group yours together in the most effective way to counter them.

product identification – RPG with basic mechanism based on grouping the dice under a specific sum

A few years ago, I read an RPG that used the basic dice mechanism: roll a certain number of d10s, then organize the dice into sets, so that the dice in each set did not exceed the limit specified. The number of sets and the number of dice in each set were involved in determining the end result, but I'm pretty sure the actual numbers on the dice and their sum were irrelevant outside of limit the dice that could be grouped.

Many / most examples of the use of dice mechanics have been framed in a combat context, emphasizing that multiple groups of only two dice each would represent a burst of multiple rapid and weak hits, while one single group of, say, six dice is one powerful hit.

I know that "rolling a bunch of d10s and grouping them" may sound like ORE, but this system was definitely not ORE. In ORE, grouping is dictated by the dice that roll the same number as each other, while in the system I am trying to remember, the player chooses how he wishes to group the dice and, in the in the case of opposite throws, the throwing and regrouping is done in secret, creating a strategic element to try to guess how the other person will choose to group his dice (many small groups, a large group or a mixture of small big ones) so you can group yours together in the most effective way to counter them.

unit – How to set up a city entry mechanism

I'm planning a game played on a 2-D card, where some places are "cities". When the player enters a city, he enters a high resolution map of that city; when it leaves the city, it returns to the world map in low resolution (as for example in Ultima 4). My question is how to implement this I / O mechanism in Unity? I thought of two approaches:

  1. The world map and each of the city maps is a different scene. The input / output of a city is implemented by loading the appropriate scene using the scene manager.

  2. There is only one scene, but the maps are geographically separated. For example, the world map is in coordinates 1 … 256, the city A map is in coordinates 301 … 364, the map of city B is in 401 … 464, etc. The entry / exit of a city is implemented by moving the reader and the camera to the appropriate map.

Is there a better approach? What approach is commonly used to implement this mechanism?

design patterns – Ease of using the scales as a filter or sorting mechanism

I searched for a website (page link here) and noticed it at the bottom of the page (one of the few times that I managed to scroll that far ):

enter description of image here

It shows a toggle used to sort comments added to the bottom of an article, which I have never seen before (at least used in this scenario).

This is a different model than those usually used for tables, i.e. drop-down lists for filtering or header rows for sorting. I think of the user-friendliness of this design template and whether it is an item specifically created for the first mobile design of a long page.

Any other example of a similar implementation that someone has chosen on other types of sites?

python – Monte Carlo simulation of the "DNA Mutation" game mechanism

The Space Station 13 game (based on Paradise Station code) contains a DNA mechanic. Each carbon-based life form with DNA has 55 "blocks" which can be modified in a DNA modifier, conferring on the crowd disabilities or superpowers once they reach a certain threshold.

DNA blocks are 16-digit numbers in base 16 of 000 at FFF. The activation thresholds are different for each type of mutation (handicaps and minor powers have lower thresholds), but if a block is set to a hexadecimal value DAC or above, all mutations in this block are guaranteed active.

Here is an example of the DNA modification process:

  1. A creature enters the DNA modifier.
  2. The geneticist examines the creator's first block of DNA. It is set to 357.
  3. The geneticist selects the first digit of the block, 3and radiates it.
  4. The number 3 is replaced by the number 9.
  5. 957 is below the threshold of DAC. The geneticist radiates the first digit again, until it is at least D.
  6. If the first digit is above D, the process ends. If it is D, the geneticist irradiates this block until it is A or more. Then the third block, until it is C or more.
  7. The process continues until a value of DAC or above is reached.
    (If the first irradiation had resulted E57, that would have stopped him early.)

I would like to know how many attempts, on average, it takes to irradiate a block DAC. Not all numbers can change to another number and the probability table is not uniform. Fortunately, I have access to the source code for Paradise Station, and so I can accurately simulate the process.

The game is written in a rather awkward language called DreamMaker – I don't really know how to work with it. The function responsible for the irradiation of only one is called miniscramble, its source code is below:
(slightly modified to be more readable, the definitions were not there originally)

#define HIGH_SCRAMBLE prob((rs*10))
#define MED_SCRAMBLE  prob((rs*10)-(rd))
#define LOW_SCRAMBLE  prob((rs*5)+(rd)))
/proc/miniscramble(input,rs,rd)
    var/output
    output = null
    if(input == "C" || input == "D" || input == "E" || input == "F")
        output = pick(HIGH_SCRAMBLE;"4",HIGH_SCRAMBLE;"5",HIGH_SCRAMBLE;"6",HIGH_SCRAMBLE;"7",LOW_SCRAMBLE;"0",LOW_SCRAMBLE;"1",MED_SCRAMBLE;"2",MED_SCRAMBLE;"3")
    if(input == "8" || input == "9" || input == "A" || input == "B")
        output = pick(HIGH_SCRAMBLE;"4",HIGH_SCRAMBLE;"5",HIGH_SCRAMBLE;"A",HIGH_SCRAMBLE;"B",LOW_SCRAMBLE;"C",LOW_SCRAMBLE;"D",LOW_SCRAMBLE;"2",LOW_SCRAMBLE;"3")
    if(input == "4" || input == "5" || input == "6" || input == "7")
        output = pick(HIGH_SCRAMBLE;"4",HIGH_SCRAMBLE;"5",HIGH_SCRAMBLE;"A",HIGH_SCRAMBLE;"B",LOW_SCRAMBLE;"C",LOW_SCRAMBLE;"D",LOW_SCRAMBLE;"2",LOW_SCRAMBLE;"3")
    if(input == "0" || input == "1" || input == "2" || input == "3")
        output = pick(HIGH_SCRAMBLE;"8",HIGH_SCRAMBLE;"9",HIGH_SCRAMBLE;"A",HIGH_SCRAMBLE;"B",MED_SCRAMBLE;"C",MED_SCRAMBLE;"D",LOW_SCRAMBLE;"E",LOW_SCRAMBLE;"F")
    if(!output) output = "5"
    return output

My program simulates the attempt to get each block 000800 (values ​​above 800 do not occur in creatures at the start of a turn) at least DAC, using the strategy described above. It is written in Python 3 and generates a CSV file with two columns: the block being processed and the time required to send it to the DAC, with an average of 4096 attempts. the miniscramble_table is my direct translation of the DreamMaker code above.

from random import random
from functools import reduce
import itertools


print("This program will calculate how many attempts it takes to get to DAC from every block 000-800, on average.")
block_attempts = input("How many attempts should be made per block? (default 4096, more is more accurate)")

if not block_attempts:
    block_attempts = 4096
else:
    try:
        block_attempts = int(block_attempts)
    except ValueError:
        print("ERR: Could not parse that number. Using 4096.")
user_bound = input("What should be the upper bound on the dataset? (default 800, lower is faster but less comprehensive)")
if not user_bound:
    user_bound = '800'
else:
    try:
        user_bound = (char for char in user_bound)
        assert(len(user_bound) == 3)
    except:
        print("ERR: Could not parse that bound. Using 800.")

user_target = input("What should be the target value for a block? (default DAC)")
if not user_target:
    user_target = ('D','A','C')
else:
    try:
        user_target = (char for char in user_target)
        assert(len(user_target) == 3)
    except: # bad, but like, c'mon
        print("ERR: Could not parse that bound. Using 800.")

# Generate a probability table. This is ugly because it's based off BYOND code.
def miniscramble_table(letter, rad_strength, rad_duration):
  HIGH_SCRAMBLE = rad_strength*10
  MED_SCRAMBLE  = rad_strength*10 - rad_duration
  LOW_SCRAMBLE  = rad_strength*5 + rad_duration

  picks = (("5"),(1.0)) # default, I guess.
  if (letter in ("C",  "D", "E", "F")):
    picks = ("4", "5", "6", "7", "0", "1", "2", "3")
    probs = (*(HIGH_SCRAMBLE) * 4, *(LOW_SCRAMBLE) * 2, *(MED_SCRAMBLE) * 2)

  if (letter in ("8",  "9", "A", "B", "4", "5", "6", "7")):
    picks = ("4", "5", "A", "B", "C", "D", "2", "3")
    probs = (*(HIGH_SCRAMBLE) * 4, *(LOW_SCRAMBLE) * 4)

  if (letter in ("0",  "1", "2", "3")):
    picks = ("8", "9", "A", "B", "C", "D", "E", "F")
    probs = (*(HIGH_SCRAMBLE) * 4, *(MED_SCRAMBLE) * 2, *(LOW_SCRAMBLE) * 2)

  total = sum(probs)
  probs = map(lambda n: n/total, probs) # sums to 1

  # make the output nicer to work with...
  out = ()
  prev = 0
  for pick, prob in zip(picks, probs):
    out.append((pick, prob+prev))
    prev += prob
  return out

def miniscramble(letter, rad_strength, rad_duration):
  r = random()
  table = miniscramble_table(letter, rad_strength, rad_duration)
  output = filter(lambda entry: entry(1) >= r, table)
  # print(r)
  return list(output)(0)(0)

# tries to get from `initial` to at least `letters` with specified settings
# returns # of attempts to get there.
def scramble_to(initial=('3','5','7'), target=user_target, settings=(10,2), log=False):
  current = list(initial) # what are we looking at
  # letter-iterable to base10 number
  def concat_letters(letters): 
    return int(reduce(lambda x,y: x+y, letters, ''), 16)

  for attempts in enumerate(itertools.repeat(0)):
    if log: print(f'Miniscramble #{attempts(0)}:', ''.join(current))
    if concat_letters(current) >= concat_letters(target):
      if log: print(f'Done with {attempts(0)} miniscrambles!')
      return attempts(0) # done, since we're above/at the target!
    for i in range(3):
      if int(current(i), 16) < int(target(i), 16):
        current(i) = miniscramble(current(i), *settings)
        break # 1 `enumerate` per attempt

results = {}
def unactivated(seq):
  return int(''.join(seq), 16) < int(user_bound, 16) # blocks never start activated, so default is 800

dataset = filter(unactivated, (seq for seq in itertools.product((_ for _ in '0123456789ABCDEF'), repeat=3)))
for block in dataset: # go through a sample set of blocks, 54 in all
  # Give each block lots of attempts for bigger sample size. default=4096
  intermediate = ()
  for _ in range(block_attempts):
    intermediate.append(scramble_to(initial=block, target=('D','A','C'), settings=(1,2)))
  results(block) = (sum(intermediate)/len(intermediate)) # average it out

# Convert results to CSV

out = ()
for k,v in results.items():
    out.append(f'{"".join(k)},{v}n')
filename = input('nDone. Where should the results be saved? (leave blank to not save) ')
if filename:
    with open(filename, 'w') as outfile:
        (outfile.write(line) for line in out)
else:
    print("Not saving.")

I plotted the results using Excel:
The intrigue generated. Title: How many times do you have to press the key

nikon – How to remove this mounting mechanism?

I bought some old lenses (all the lenses mounted on the M42 lens). I decided to try to convert them to work on a Nikon SLR, infinite focus and all. I succeeded on my first lens (first photos), replacing the mounting mechanism with a 3D print, it works perfectly. It’s awesome!

New mounting plate

However, I also have another lens, which I have high hopes for as it focuses beyond the infinite when held by my D3200. The problem is, however, that I cannot find a way to disassemble the mounting plate to replace it. I tried to unscrew the side screws, this revealed a few Philips head screws around the opening ring, but I don't know if it is for the mounting plate or not. Anyone who has experience with these? Or is he able to tell me if these screws are actually for the mounting plate?

Top view
Side view 1
Side view 2

Thanks in advance!

Jan-Willem

execution plan – Index usage mechanism in a query that has two conditions

If we have a request like this
select * from employee where name = 'test' and salary = 500
and we had two indexes, one of them was on name
The other on salary
Instead of a multi-attribute index

will the execution plan be like this?
– get the line which name = & # 39; test & # 39; using the index on the name
– then from the result get the lines which salary = 500 using the index on slaray

or he will not use indecisives because there is no index (name, salary) ???