## mining theory – Why not use lowest block hash to determine which chain to build on top of in case of a temporary fork due to two blocks found roughly at same time?

It’s my understanding that if two miners find blocks at roughly the same time that other nodes on the network will use whichever valid block they see first as the extension of the main chain and the second block as a temporary fork building on a secondary chain.

The next block that is found (assuming it’s alone) will determine which chain (at least for now) should become the main chain.

I’m trying to understand why we don’t just let whichever block has the lower hash be the winner to extend the chain?

Is there some attack or break down of incentives if we do this that I am not seeing? Or is it just an arbitrarily decided solution and this one would (in theory) also work fine?

## complex geometry – Mathematical approach for “Chainmail tube” size depending on chain link parameters

I am not necessarily a maths genius and am currently stuck on the mathematical side of a project I am working on. The project is based around the design of a circle like structure made out of chainmail links similar to the picture here:Chainmail tube picture

I am interested in the relation between the circle size of the resulting “tube”, in contrast to the links diameter, thickness and rotational angle. Ideally, I want a function describing the relations between the parameters(Tube diameter, link thickness, diameter and angle) for both “kinds of links”(meaning the red and blue in this picture).

The problem might seem simple at first, but I am unsure how to approach this problem the correct way and was hoping someone would be able to help. My online research in this area was unfortunately not very successful as this problem seems very niche.

## dnd 5e – Can a druid wear Elven Chain?

dnd 5e – Can a druid wear Elven Chain? – Role-playing Games Stack Exchange

## algorithms – How to close an open polygonal chain in clock- or counterclockwise direction?

I have an algorithmic problem that I am hoping someone can help me out with:

Given: 3D triangle surface mesh, an open polygonal chain (blue).

Wanted: A line that closes the blue line in clockwise direction (green).

The green line provides a correct solution, the red line a wrong solution. Using a shortest path algorithm, the result will be randomly oriented depending on the mesh. How can I guarantuee that the resulting closed polygon is in clockwise direction, i.e. I always get the green line as a result? The direction of the blue line cannot be changed.

Edit: This is a different question that gave me an idea: https://stackoverflow.com/questions/1165647/how-to-determine-if-a-list-of-polygon-points-are-in-clockwise-order. Maybe it is possible to calculate (x2 − x1)(y2 + y1) for each edge and give penalties for edges where this is > 0 or < 0?

## algorithms – How to close an open polygonal chain such that the resulting enclosed area includes polygon B and excludes polygon C?

I have an algorithmic question for you:

Given: 3D triangle surface mesh, open polygonal chain A, closed polygon B, closed polygon C, all on the mesh.

Wanted: A line that closes A such that B lies within the enclosed area and C does not.

A correct solution would be the green line, a wrong solution would be the red line.

I am currently looking at it as a graph and walking through the graph with a shortest path algorithm. While I can guarantuee that the solution does not intersect polygons B and C by blocking the relevant edges, I have trouble finding a way to prescribe that they can/cannot be enclosed.

I realize I am asking two things at once, a] “how to include a given area?” and b] “how to exclude a given area?”. So if you have a solution for either one or even both questions, please let me know, I am grateful for any help!

## ☑️NEW – Free 10\$ airdrop OZC Smart chain (simple sign up) | Proxies123.com

#What is OZC?

OZC is a new generation Blockchain platform operating by O-DPoS (Open – Delegated Proof of Stake) consensus algorithm with the ability to scale many secondary Master Node clusters synchronized with 1 central Master Node cluster, helping to fast and low-cost transaction processing. In theory, OZC can handle more than 1 million transactions per second and is scalable to infinity.

#What problems does OZC solve?

There are 5 main problems that OZC solves: 1. Transaction processing speed 2. Fast transaction processing 3. Low transaction fees 4. Build user-friendly solutions 5. Minimize the consumption of energy and equipment to protect the environment and prevent waste.

#What makes it different to be successful?

OZC has three things that make the difference and the success of the project: 1. Green solution: instead of using the PoW consensus, it wastes too much unnecessary energy, wastes resources, and materials, and also impacts the environment. OZC uses the O-DPoS consensus algorithm as the leading OZC research and development team to save energy and reduce unnecessary safer environmental costs. 2. High and low transaction processing efficiency: With multi-group consensus transaction processing capability O-DPoS Master Node. OZC can manage a transaction volume in excess of 100 thousand per transaction at a near-zero cost. 3. Strong community: OZC is currently one of the largest projects with millions of users worldwide participating in the company and promotion. By coming to OZC, everyone can be given the opportunity to receive the greatest advantages and bring great value to society.

100X potential in top 20 coins in 2022

Claim your \$10 here:- ozc.org free airdrop

Enjoy it 🙂

## blockchain fork – Choosing main chain based on difficulty

If a node observes a fork in the bitcoin chain, then the node will choose the chain that has the highest difficulty (sum of `difficulty` in each block of the chain).

But the `difficulty` changes only once every 2016 blocks. So, if a fork occurs somewhere in between, then the `difficulty` is the same for both the side chains right? How does the node pick the main chain then? Just randomly?

## beginner – Python yahoo finance option chain scraper

This is my 1st python program I’ve actually written and I have little to no background in the language I just figured I could learn and do something that interested me at the same time.

So, I’m not a book learner. I can’t just sit down and read a bunch of technical documents and stuff like that so I’m sure a lot of this code is unconventional at best and just plain bad at worst. I learn best by doing, so now that I got this program to work I want to learn how to make it better.

The goal of the program is to load the yahoo finance options page for each ticker in a file that I created and then pull all of the call options data for each expiration date and then load all of that data into a sql database to be queried later

I added the multi-processing to try and make it faster but it seems to have just slowed it down so I gotta figure that part out

``````import logging
import pyodbc
import config
import yahoo_fin as yfin
import asyncio
import multiprocessing
import time
from yahoo_fin import options
from datetime import datetime, date
from selenium import webdriver

def main():

def init_selenium():
driver = webdriver.Chrome(config.CHROME_DRIVER)
return driver

def yfin_options(symbol):
logging.basicConfig(filename='yfin.log', level=logging.INFO)
logging.basicConfig(filename='no_options.log', level=logging.ERROR)

try:
# get all options dates (in epoch) from dropdown on yahoo finance options page
dates = get_exp_dates(symbol)

# iterate each date to get all calls and insert into sql db
for date in dates:
arr = yfin.options.get_calls(symbol, date)

arr_length = len(arr.values)

i = 0

for x in range(0, arr_length):
strike: str = str(arr.values(i)(2))
volume = str(arr.values(i)(8))
open_interest = str(arr.values(i)(9))
convert_epoch = datetime.fromtimestamp(int(date))
try:
sql_insert(symbol, strike, volume, open_interest, convert_epoch)
i += 1
except Exception as insert_fail:
print("I failed at sqlinsert {0}".format(insert_fail))
file_name_dir = "C:\temp\rh\options{0}{1}.xlsx".format(symbol, date)
logging.info(arr.to_excel(file_name_dir))

except Exception as e:
f.write(symbol)
f.write('n')

def sql_insert(symbol, strike, volume, open_interest, exp_date):
conn_string = ('Driver={SQL Server};'
'Server=DESKTOP-7ONNV8L;'
'Database=optionsdb;'
'Trusted_Connection=yes;')

conn = pyodbc.connect(conn_string)
cursor = conn.cursor()

insert_string = """INSERT INTO dbo.options (Ticker, Strike, Volume, OpenInterest, expDate)
VALUES
(?, ?, ?, ?, ?)"""

cursor.execute(insert_string, symbol, strike, volume, open_interest, str(exp_date))

conn.commit()

def get_exp_dates(symbol):
url = "https://finance.yahoo.com/quote/" + symbol + "/options?p=" + symbol
chromedriver = init_selenium()
chromedriver.get(url)
# Yahoo Finance options dropdown class name (find better way to do this)
select_dropdown = chromedriver.find_element_by_css_selector("div(class='Fl(start) Pend(18px)') > select")
options_list = (x for x in select_dropdown.find_elements_by_tag_name("option"))
dates = ()
for element in options_list:
dates.append(element.get_attribute("value"))

return dates

file1 = open(config.TICKER_FILE, 'r')

count = 0

ticker_arr = ()
# loop to read each ticker in file
for line in lines:
count += 1
line = line.strip('n')
line = line.strip()
ticker_arr.append(line)

return ticker_arr

if __name__ == "__main__":
pool = multiprocessing.Pool()

# input list
# pool object with number of element
pool = multiprocessing.Pool(processes=4)

pool.map(yfin_options, inputs)

pool.close()
pool.join()
``````

## Chain rule problems

Given- f'(x)= $$e^sqrt x$$ I want to find f'(x²) I know the answer is $$e^x$$ but there is no explaination given so someone provide me proper expalination.
Thanks a ton.

## Discrete Markov chain (stationary and limiting distribution)

Question 1, 2 and 3

Hi, in discrete markov chain, if a stationary distribution exists, the limiting distribution is the stationary distribution. Therefore, question 1 and 2 share the same answer, that is, pi = 1/4(1, 1, 1, 1), derived from the formula pi = pi (P). Then isnt question 3 asking for the same thing too? If not, how do I solve question 3? What are they asking for?