## algorithms – Dynamic programming for graph splitting

I have a graph which has edges between every vertices $$i$$ and $$j$$ such
that $$i < j$$. I need to divide the graph into two parts such that the
combined weight of the edges is minimum. For example there is a graph
of 4 vertices where each edge weight is the following

• $$w(1, 3) = 2$$
• $$w(1, 4) = 1$$
• $$w(3, 4) = 3$$
• $$w(1, 2) = 100$$
• $$w(2, 3) = 100$$
• $$w(2, 4) = 100$$

The solution would be $${2}, {1, 3, 4}$$.

The algorithm I came up was a brute force i.e. considering each
combination and return the minimum of it i.e. to take one vertex in one
group or include in other which leads to complexity $$O(2^n)$$.

I want to get the above problem to run in $$O(n^2)$$ solution. I did draw
a decision tree for the above problem and can see nodes being overlapped
i.e. $${1,2}, {3,4}$$ and $${3,4}, {1,2}$$ so I figured this is a
dynamic programming problem but I am not able to define the states or
maybe it is not a DP problem.

## storage – Unisphere dynamic pools. Does this mean I can lose more than 1 disk with a raid 5 configuration and 20 drives or how are spare space extents treated?

So emc has implemented dynamic pools which do away with hot spares and instead uses some drive extents as spare space on each drive.

When a drive fails, the contents are copied into this spare space (is it usable living on this spare space?).

When setting up a traditional system, you would normally have a couple hot spares so if a drive fails, it rebuilds onto these spares thus saving you a failure. (Raid 5 with a couple hot spares allows you to lose 3 drives at seperate times i believe).

With this dynamic pool, how does this work? If I have a 20 drive system and use raid 5 on a dynamic pool…what number of drives can I lose (at different times of course) and still be operational?

## algorithm – Assessing BigO/small o for forming a dynamic dictionary based on searched key and values pair

I am trying to create a dictionary with a file containing text based on a matched pattern. Lines containing `key_str` should become keys and subsequent lines not matching `key_str` should become values and get associated with keys in the dictionary. so i have below code working: But I need help and getting the Big O analysis. How could i say my logic is worth case, Best Case or good case? Also, which case is small o and which is big O

File: `file2dict.result-soa1`

``````ml1
/var
/home

cpuml2
/var
/home

``````

Output

``````my_dict: {ml1: ('/var','/home'), cpuml2: ('/var','/home')}
``````

Code:

``````import os
homedir = os.environ.get('HOME')

key_str = "ml"
my_dict = {}
val_list = ()
key = ''
with open(homedir + '/backup/file2dict.result-soa1') as file2dict:
for line in file2dict:
words = line.split()
for aWord in words:
if key_str in aWord:
if key:
my_dict(key) = val_list
val_list = ()
key = aWord
else:
key = aWord
else:
val_list.append(aWord)
my_dict(key) = val_list
print(my_dict)
``````

## Looking for details on Dynamic Range vs ISO

I have been reading up on maximizing dynamic range of digital sensors in order to get a rich image and soft roll-offs. One thing that I cannot wrap my head around are the following concepts and the combination of them:

1. Digital sensors tend to push multiple steps of dynamic range below 18% grey when the ISO is decreased. To maximize dynamic range in both shadows and highlights and get softer roll-off it seems right to shoot at higher ISO.

1. Simultaneously, there seems to be a pretty wide consensus that exposing to the right (ETTR) yields best results in terms of dynamic range for digital sensors. This indirectly implies lowering the ISO to keep highlight from clipping. Or must ETTR be combined with ND filters som these purposes?
2. Multiple sources suggest that shooting above native sensor ISO could yield further movement of dynamic range steps above 18% grey – could this really be true?
3. The chart shown in the image suggests that dynamic range in highlights/shadows is relative to 18% grey. Is that most often true?
4. This site and many others imply that overall dynamic range is lost at higher ISO: https://photonstophotos.net/Charts/PDR.htm.

The only conclusion I can positively draw is that light scenes should be shot at slightly higher ISO to maximize highlights dynamic range while dark scenes should be shot at low ISO to maximize shadow dynamic range. But I can’t figure out how to apply ETTR technique to this line of reasoning.

I am aware of the confusing nature of the question, but I cannot boil it down more due to my lack of further understanding in the topic. Any input is much appreciated.

## microsoft excel – Dynamic sheets reference + column ranges using only column number

I have multiple sheets simply named “2019”, “2021”, “2021”.
In each of those, I have columns whose first cell contains a currency code: “EUR”, “XRP”, “XBT”, etc.

Now I wanna create a new sheet in which a dynamic formula would take a year and a currency code as inputs and find the last filled value of the columnt starting with this currency code on the sheet named with the inputed year.

I can find the column number using MATCH(D5;’2021′!\$1:\$1;0), where D5 contains my currency code, but I don’t know how to make the sheet name dynamic (say I write 2021 in cell A1 on my new sheet, how do I put A1 in this formula instead).

I can find the last value of column O using OFFSET(‘2021’!O1;COUNTA(‘2021’!O:O)-1;0) but I wanna use the column number found previously instead.

I’m scratching my head over this, any help would be appreciated ^^

## nginx – domain name getting connection refused where as dynamic domain name website loading fine

i have got a ubuntu 20.04 focal server running with ufw firewall
i have got nginx running with php8.0-fpm and all needed packages with mysql server

all accessible from outside internal network using dynamic domain name

but when i point my domain to it by either the ip or by the dynamic domain name im getting err_connection_refused but from the dynamic domain name all loads happy

i have check access logs and the domain is showing as connecting
no error logs with nginx. php not logging errors even though i have enabled it to.

when i first setup nginx i could access the basic html page and phpinfo.php located in var/www/html

i have now pointed web server to e107 within var/www/html/e107

when i setup e107 i ran the install.php and could access from both domain and dynamic domain. once setup completed it then became inaccessible to the domain but works as it should on the dynamic domain name and via public ip.

if i switch the root folder back to var/www/html and restart nginx the basic index.html works fine and so does phpinfo.php.

i have spent hours scrolling through forums for a solution and not found any.

i have a feeling its php related or e107 cms stopping the access from the domain but i dont know where to start as i haven’t been able to find any solutions to similar issues on forums.

any help would be greatly appricated

Objective:

I have an android application (main) from which I want to download (jar, apk, or any sort of package) and load the package dynamically and start the main activity of my loaded package from my main application.

The solutions I have tried:

I have followed this blog post and try to load the app using DexClassLoader
know how to call the main activity of the loaded apk.

I have followed this plugin(https://github.com/DroidPluginTeam/DroidPlugin), which is telling me that I can dynamically load the apk from the server, and then I can install it in the background and then can run it by any communication method (broadcasting, AIDL, etc.) but while following the plugin, I have encountered an error (sort of I/O error while opening APK), it’s not able to open my apk for installation.

I don’t know if whatever I tried is correct or not and I am not an android guy, instead, I am a unity guy and trying to run my games (I have almost 50) within android applications. There is no choice of loading the game statically in the android project because it severely increases the size.

Please recommend me an approach to achieve this task or if anyone can guide me on how to solve the problems that I am facing.

## 8 – How to get a dynamic delta token in a multi-value field via views

Here’s the situation…

• I have a multi-value PHOTOS field in views. The image ALTs are all unique.
• These photos are output into a slideshow, and I’m building a custom caption for each slide (photo) by combining HTML and TOKENS.
• Unfortunately, I’m only able to grab specific Delta numbers within the token list… such as (node:field_photos:0:alt) or (node:field_photos:1:alt). But this obviously only passes that single Delta image’s ALT to all of the multi-value images.

**It’s required that these images remain in the same multi-value row and NOT in their own individual rows.

Is there any way to define a dynamic Delta based on the actual image shown? Something like (node:field_photos:?:alt)

In Drupal 7, there was a Compound Token module, which seemed like it may work. But in Drupal 8, I haven’t been able to find anything close to a solution.

Any help would be greatly appreciated. Thanks!

## Is it not easy to find dynamic ip?

Using dynamic ip to collect network data, is it possible to avoid the monitoring and restriction of the gateway? Because it is often necessary to collect information to create big data resources.

## functions – How to functionally create N*n lists of ordered pairs of TimeSeries using Outer (or similar) where n is dynamic / recursive?

I have the following complex nested iteration situation.

• I begin with a list, `data`, that comprises 16 TemporalData objects

• Each TemporalData object contains 2 paths. Let’s call them `v` and `r`. They have a common date index, so the date paths in each path are both the same length.

• I partition each of the paths in the TemporalData objects in `data` into 20 day periods, offset by 1 / overlapping by 19.

``````partitionedSets = Partition(#, 20, 1) & /@ data((#))("DatePaths") & /@ Range@Length@data;
``````
• `partitionedSets` now contains 16 lists of 2 lists (representing `v` and `r`) that vary in length as follows. `vLengths` and `rLengths` will always return the same values
``````
vLengths = Length@partitionedSets((#, 1)) & /@ Range@16

(*{216, 216, 215, 214, 213, 212, 212, 212, 211, 210, 209, 208, 207,
207, 207, 206}*)

``````
• The output of the first list of `partitionedSets` looks like this:

`partitionedSets((1, All, 1))`

• Now, for each of the 16 lists of `v` and `r` series, I want to create a Date indexed set of “zipped together” ordered pairs of `v` and `r`. This is easy enough to do manually. For example, to get the first set of `orderedPairs` from the first `partitionedSet` of the first TemporalData object in `data`:
``````orderedPairs = MapThread(List, {partitionedSets((1, 1, 1, All, 1)),
partitionedSets((1, 2, 1, All, 2))})})
``````

The problem I have is when I attempt to gather all combinations of 16x2xn lists into lists of ordered pairs. This is because the value of `n` depends on the Length of the combination of `v` or `r` and the `partitionedSet` I am currently iterating through. I know the solution is to use `Outer` — and I can get it to work if I arbitrarily limit `n` in this case to 200.

``````dumb = Outer(MapThread(List,
{partitionedSets((#1, 1, #2, All, 1)),
But what I am really trying to achieve is to make this same code work where the value for the second slot `#2` in `Outer` is dynamic / recursive (really should be something like `Range@vlengths((#))&/@Range@Length@vLengths` – but this fails.)