json.net – Newtonsoft.json JsonConvert.SerializeObject – Serialize only first level – MaxDepth does not work for serialization

I just need to serialize the first level of an object from JsonConvert.SerializeObject. I tried MaxDepth = 1, but this property is only for deserialization.

Desired behavior (property bar missing or null):

class Foo
{
    public int First { get; set; } = 123;
    public string Second { get; set; } = "smurf";
    public DateTime Third { get; set; } = DateTime.Now;
    public Bar Bar { get; set; } = new Bar { Fourth = 999 };

}

class Bar
{
    public int Fourth { get; set; }
}

void Test(){
    var foo = new Foo();
    var jsonResult = JsonConvert.SerializeObject(foo);

    // jsonResult: 
    // {
    //    "First": 123,
    //    "Second": "smurf",
    //    "Third": "6.4. 2020 7:16",
    // }
}

How should I set up JsonConvert.SerializeObject to ignore child non-primitive objects when serializing? Many thanks.

What does this verb output at OpenVPN client level 11 tell us about the SSH connection that hangs / blocks?

After setting up OpenVPN we can connect via SSH (e.g. up to 10.8.0.9), but the SSH connection hangs, usually after about 2 minutes. The SSH connection exists from Ubuntu 18 under WSL to Ubuntu 18 under Digital Ocean.

  • Many suggest that this is an MTU problem and we have adjusted it fragment and the mssfix up to 1200 on all clients and servers.
  • We used ping, traceroute, and tracepath to check the MTU between hosts and the MTU comes around 1500.
  • We tried to set it manually tun0 MTU at 1400 With sudo ip link set dev tun0 mtu 1400 on all client and server hosts.
  • To rule out firewall causes, we have temporarily deactivated the firewall.

None of this solves the stands / slopes. With all of the changes above, we can still connect via SSH, but within minutes the SSH connection hangs.

We have hired our local VPN clients verb to 11. This is the output when the VPN is actively blocking / hanging. What clues, if any, does this issue give us about what causes the hang?

us=52848 UDP write returned 112
us=52924 PO_CTL rwflags=0x0001 ev=5 arg=0x55f0cef4c168
us=53000 PO_CTL rwflags=0x0001 ev=6 arg=0x55f0cef4c068
us=53032 I/O WAIT TR|Tw|SR|Sw (4/92829)
us=91180 PO_WAIT(1,0) fd=6 rev=0x00000001 rwflags=0x0001 arg=0x55f0cef4c068
us=91300  event_wait returned 1
us=91313 I/O WAIT status=0x0004
us=91325  read from TUN/TAP returned 84
us=91377 TUN READ (84)
us=91414 FRAG_OUT len=84 type=0 seq_id=0 frag_id=0 frag_size=0 flags=0x00000000
us=91427 TLS: tls_pre_encrypt: key_id=0
us=91471 tls_prepend_opcode_v2
us=91503 ENCRYPT IV: 000001ca c1f70e33 9b725bd5
us=91611 ENCRYPT FROM: 00000000 45000054 e8fe4000 40013d85 0a080005 0a080011 080071f2 0c2d000(more...)
us=91677 ENCRYPT AD: 48000008 000001ca
us=91787 ENCRYPT TO: 48000008 000001ca fda00e43 93938a26 d2f6b551 a96d0ced 95ce1caf cb4b087(more...)
us=91899 PO_CTL rwflags=0x0003 ev=5 arg=0x55f0cef4c168
us=91999 PO_CTL rwflags=0x0000 ev=6 arg=0x55f0cef4c068
us=92101 I/O WAIT Tr|Tw|SR|SW (3/92829)
us=92197 PO_WAIT(0,0) fd=5 rev=0x00000004 rwflags=0x0002 arg=0x55f0cef4c168
us=92287  event_wait returned 1
us=92358 I/O WAIT status=0x0002
us=92525 UDP WRITE (112) to (AF_INET)xxx.xxx.xxx.xxx:1194: P_DATA_V2 kid=0 DATA 00000800 0001cafd a00e4393 938a26d2 f6b551a9 6d0ced95 ce1cafcb 4b0874b(more...)

The slope usually lasts more than five minutes. During this time ping no longer returns results and SSH is frozen. As soon as the slope dissolves on its own, both will ping and the SSH connection also works.

Get permissions at SharePoint list item level using C # CSOM

I'm developing C # CSOM code that sets item-level (folder) permissions in a SharePoint 2016 on-premise document library. I have managed to assign folders to groups, and some folders have subfolders that break inheritance and have a different group than the parent folder. After setting permissions on all folders, I run the following code to identify the groups assigned to each folder:

ListItems = docLibrary.GetItems(CamlQuery.CreateAllItemsQuery());
                clientContext.Load(ListItems, a => a.IncludeWithDefaultProperties(b => b.HasUniqueRoleAssignments, b => b.Folder, b => b.Folder.Name
                    , b => b.DisplayName, b => b("FileRef"), b => b("FileLeafRef")),
                    permsn => permsn.Include(a => a.RoleAssignments.Include(roleAsg => roleAsg.Member.LoginName,
                            roleAsg => roleAsg.RoleDefinitionBindings.Include(roleDef => roleDef.Name,
                            roleDef => roleDef.Description))));
                clientContext.ExecuteQuery();

Then examine the role assignments. I'm expecting a role assignment for the parent folder because I've only assigned one group to this folder. However, I see (in one case) 45 role assignments, which (I believe) represent the total number of role assignments for all subfolders of the parent folder. Like this:

Enter the image description here
And I don't know how to query the role assignments to find out which folder they're assigned to.
Can you help me identify only the group assigned to a specific folder?
Thank you so much!

general topology – line and level not homeomorphic

I studied Kahn's topology and came across this exercise.
All of the solutions I've looked up mention the connection, but the connection comes in the next chapter, so I figured there had to be another way.
The question asks the fact that if X and Y are homeomorphic and X-x is a disjoint union of two open sets, y s exists. t Y-y is a disjoint union of two open sets.
Intuitively, I understand that the line would be disjoint if I took out a point, but I am completely lost, as I can show that a plane without a point cannot be the disjoint union of open sets.

Set theory – monotonous subsets of innumerable level sets

To let $ S $ be a myriad of points in the Euclidean plane. Define a subset of $ S $ be monotonous upwards if every two points define a line with a non-negative slope, and downward monotone if every two points determine a line with a negative or infinite slope. It follows from the Erdős-Dushnik-Miller theorem that one or more of the following three things happen:

  • $ S $ contains an innumerable upward monotonous subset
  • $ S $ contains an innumerable downward monotonous subset
  • $ S $ contains both a countably infinite upward monotonous subset and a countable infinite downward monotonous subset

(This can be seen as an infinite version of the Erdős-Szekeres theorem about the existence of square root monotonous subsets of finite point sets in the plane.)

My question is about sets $ S $ this only satisfies the third option: $ S $ has no countless monotonous subsets, but countable monotonous subsets in both directions. Is it known that there are quantities or that there are no quantities? $ S $ what is it true for How can they be constructed if they are known to exist? Alternatively, both the existence and the non-existence of such a set are $ S $ known to be consistent?

Boy Scouts 1e – Can a 3rd level Aegis do "Improved Damage" to Astral Skin?

No.

Especially,

Unless otherwise stated, an adjustment cannot be selected more than once.

You cannot make 2 × adjustments unless specified in the adjustment description. Very little Adjustments say that. For example,

speed

The Aegid's land speed is increased by 5 feet. This adjustment can be selected up to five times. Its effects stack up.

(Emphasis Mine)

Do you see where it says "This adjustment can be selected up to five times"? That means you can have 2 × speed (or 1 × or 3 × or 4 × or 5 ×, but not 6 ×).

When an adjustment is made Not Say "This adjustment can be selected (more than once)", then you can only do it once.

Improved damage says nothing about being taken multiple times. You can only take improved damage once.

Second, on the subject of muscles,

(Brawn) can be selected a second time from level 5.

You are not 5th level. You are 3rd level. Therefore this statement does not apply. Since this is not the case and the other statements about repeated muscle intake also do not apply, there is no longer any statement that says you can take it multiple times. So you can't. In stage 3, you can only take improved damage once.

Third, not all adjustments cost the same. Even if you could take more damage or build muscle multiple times, you couldn't afford it – they cost 2 adjustment points each time, so 1 × Darkvision, 2 × Improved Damage, 2 × Muscle Power costs 9 adjustment points. You only have five.

You can add 1 × Darkvision, 1 × Improved Damage and 1 × Muscle Mass to your Astral Skin. This costs all 5 of your adjustment points. These are in addition to the 2 × speed, 1 × quick and 1 × dodge that can already be found on the astral skin.

Your final astral skin would then give you

  • darkvision 60 feet (adaptation of darkvision)
  • +1 damage with light weapons, +2 damage with one-handed weapons and +3 damage with two-handed weapons (improved damage)
  • +2 strength (muscle mass)
  • + 10 feet of movement (2 × speed)
  • +2 dexterity (nimble)
  • Dodging

Adjust the level of difficulty for miners – Bitcoin Stack Exchange

I want to do solo mining, I have six Antminers 1 s17 56TH, 3 pieces S17 per 53TH and 2 pieces S17 + 68 TH, then they work now for 400 TH to do solo mining on BTC or BCH, increase chance Find block? For example, for 6 miners write different levels of difficulty d = 50000 d = 100000 d = 200000 d = 300000 d = 400000 d = 500000 then does it help? And pools accept my adjustments?