ford fulkerson – Multi Source/Sink Max Flow Alternative Reduction

When solving a multi source/sink max flow problem, the classic reduction to the single source/sink problem is to add a new source and sink node with infinite capacities that connect to/from the existing source/sink nodes.

I was curious about an alternate reduction. It is kind of silly buy I just wanted to sanity check it.

Can I not group all the source nodes into one big source node, with all the outgoing edges of the original source nodes now added to the mega source node. We can collapse repeated edges by adding up their capacities. A similar thing can be done for sink nodes.

Does this approach fail catastrophically or sound reasonable?

password – Alternative to Keepass (too often conflicts)

Up to now I use Keepass and sync it via Nextcloud.

But I get this too often:

keepass-nextcloud-conflict

Translation of the error message:

server version downloaded, local copy renamed and not uploaded

There is a conflict.

Now I am looking for an alternative to solution.

Required features:

  • open source
  • sync to Ubuntu Linux
  • sync to Android
  • sync to Mac/iPhone would be nice (optional)
  • No conflicts if I edit different entries on two devices
  • GUI interface (command-line only is not a solution)

audit – What alternative standard for ISO 27001 can be used in Australia?

I am looking for alternatives, that are less strict and less time consuming, than ISO 27001. Australia is in the Commonwealth, so maybe Cyber Essentials Plus could work, but I do not know if that plays a part in it being recognized by the Australian Government. Any suggestions? Thanks!

Can we launch a deployment in Kubernetes with time limit if not then is any alternative available?


Your privacy


By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.




alternative to zbigz and filestream, cloud torrent that gives direct download | Proxies123.com

used zbigz = file system lack features, you have to manually select the file to get the download link. No Bulk Selection
filestream = almost perfect but when I remote upload it to filehost, the filename is random.

looking that generate direct download and remote upload to filehost that matches the filename.

Thank!

c++ – Improving constexpr invoke function C++17, alternative to std::invoke

I’ve learned that in C++17, std::invoke isn’t constexpr. To make a constexpr version, I could copy the implementation provided here: https://en.cppreference.com/w/cpp/utility/functional/invoke , OR I can complicate things by making my own version that relies on SFINAE, which may potentially be slow or have errors (which hopefully you’ll help me fix).

Below is my version:

template<std::size_t N> struct theCharArray{
  unsigned char theChar(N);  
};

template<class T> struct hasType;

template<class T, class U, class... Args> auto overloadInvoke(T f, U t1, Args&&... args)
-> theCharArray<(sizeof( hasType<decltype((static_cast<U&&>(t1).*f )(static_cast<Args&&>(args)...))>* ),1 )>;

template<class T, class U, class... Args> auto overloadInvoke(T f, U t1, Args&&... args)
-> theCharArray<(sizeof( hasType<decltype((t1.get().*f)(static_cast<Args&&>(args)...))>* ),2 )>;

template<class T, class U, class... Args> auto overloadInvoke(T f, U t1, Args&&... args)
-> theCharArray<(sizeof( hasType<decltype(((*static_cast<U&&>(t1)).*f)(static_cast<Args&&>(args)...))>* ),3 )>;

template<class T, class U> auto overloadInvoke(T f, U t1)
-> theCharArray<(sizeof( hasType<decltype(static_cast<U&&>(t1).*f)>* ),4 )>;

template<class T, class U> auto overloadInvoke(T f, U t1)
-> theCharArray<(sizeof( hasType<decltype(t1.get().*f)>* ),5 )>;

template<class T, class U> auto overloadInvoke(T f, U t1)
-> theCharArray<(sizeof( hasType<decltype((*static_cast<U&&>(t1)).*f)>* ),6 )>;

template <class T, class Type, class T1, class... Args>
constexpr decltype(auto) invoke(Type T::* f, T1&& t1, Args&&... args){
    constexpr auto chooseFxn = sizeof(overloadInvoke(f, t1, static_cast<Args&&>(args)...));
    if constexpr(chooseFxn == 1){
        return (static_cast<T1&&>(t1).*f )(static_cast<Args&&>(args)...);
    } else if constexpr(chooseFxn == 2){
        return (t1.get().*f)(static_cast<Args&&>(args)...);
    } else if constexpr(chooseFxn == 3){
        return ((*static_cast<T1&&>(t1)).*f)(static_cast<Args&&>(args)...);
    } else if constexpr(chooseFxn == 4){
        return static_cast<T1&&>(t1).*f;
    } else if constexpr(chooseFxn == 5){
        return t1.get().*f;
    } else {
        return (*static_cast<T1&&>(t1)).*f;
    }
}

template< class F, class... Args>
constexpr decltype(auto) invoke(F&& f, Args&&... args){
    return static_cast<F&&>(f)(static_cast<Args&&>(args)...);
}

I test the code here. How the SFINAE works is it checks all possible ways to invoke the arguments, and returns a struct whose size is determined by which invocation is well-formed, which I use to take the size of.

website design – UI / UX alternative to a Dashboard, with more functions?

We have an app that works in two separate pages. It involves sharing content and presenting information with other users. The secondary, optional (but highly recommended) page is called a dashboard. From this there are metrics which show user connection status, and whether they have submitted requests for certain things, etc. Visually, it presents a quick way to see the status of all users.

So far, it’s clearly a dashboard. However, from this dashboard there is also the option to do actions like chat, edit, assign groups, etc. This seems to be going beyond a typical dashboard’s remit of presenting data. We don’t want to confuse users or make them miss features by limiting the second page to only a ‘dashboard’.

So my questions are:

  1. is there a better name for this UI/UX element than ‘Dashboard’?
  2. am I misguided in thinking a dashboard is just for viewing information, not carrying out actions/tasks?

Any thoughts on this would be very appreciated. Redesigning the app to separate data visualization features from action features is not possible.

tables – Is there a good alternative to zebra stripes when rows use drag-and-drop reordering?

This answer gives pretty good evidence that in a table with multiple columns, zebra stripes are the most effective way to make it easy to see which rows are which in the table. Sometimes in tables, we offer drag-and-drop to reorder whole rows, and there are a few existing questions on visual cues for that.

The two features don’t really interact well, because dropping a row potentially changes the colour of the dropped item and all the items between the old and new locations. This might make it visually confusing to see the result of the reordering, and disrupt the user’s mental connection between the colour and the row.

Is there a way to get the same benefit of zebra stripes without making drag-and-drop awkward? I’m happy with a completely different technique if it’s shown to work as well, or with a refinement to the stripes or drag-and-drop cues that avoid the problem without losing the benefit, or even with some evidence that it’s not a problem in the first place.

Questions for anyone running Blesta (or another WHMCS alternative)

Hi all – I realize Blesta has lots of opportunities for customization, at least based on what I have read. Before I go down any possible cus… | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1842538&goto=newpost

combinatorics – Alternative way to calculate number of edges in Turán-graphs?

We define a Turán-graph
$$T_n(r) = K_{lceilfrac{n}{r}rceil, ldots,lceilfrac{n}{r}rceil, lfloorfrac{n}{r}rfloor, ldots, lfloorfrac{n}{r}rfloor}$$

with $n bmod r$ many subsets $V_i$ that contain $lceilfrac{n}{r}rceil$ many vertices and $r- (n bmod r)$ many $lfloorfrac{n}{r}rfloor$ vertices. We calculate the number of edges in such a graph as follows $$t_n(r) = left( 1 – frac{1}{r}right)frac{n^2}{2} – frac{q(r-q)}{2r}$$

My thoughts:

We can think of Turán-graphs as $r$-partit graphs. So for some $T_n(r) = K_{V_1, V_2, ldots, V_r}$ with $$e_{i} = binom{i}{2}$$ representing the number of edges in some complete graph $K_i$.

Hence, we can calculate the number of edges as follows:
begin{align*}
t_n'(r) &= e_{n} – e_{V_1} – e_{V_2} – ldots – e_{V_r} \
&= binom{n}{2} – binom{V_1}{2} – binom{V_2}{2} – ldots -binom{V_r}{2}end{align*}

Question:

This seems way more simple to me than the formula given above. If $t_n'(r)$ works correct (couldn’t prove it wrong nor right), why bother using $t_n(r)$?