Huge two list data should be compared using c# and must ensure performance improves

I have a two list contains huge data and had the following code which I used till now. But have some doubts regarding this, due to lot of confusion about the data is compared or not in the list items. Here I am using sequence Equal to compare the data I have two questions, somewhere I found that sequenceEqual will compare the data in the lists. So used it. 1. Will sequenceEqual compares the data in the lists 2. better way of code to improve performance. As per understanding I kept only three items in both the lists but our requirement has huge data itmes in the lists. so need to improve performance

bool value = false;         List<string> list1 = new List<string>();         list1.Add("one");         list1.Add("two");         list1.Add( "three" );          List<string> list2 = new List<string>() { "one", "two", "three" };         list2.Add("one");         list2.Add("two");         list2.Add("three");         list1.Sort();         list2.Sort();         if (list1.SequenceEqual(list2))         {             value = true;         }         else         {             value = false;         }         return value; 

Is hardcoded object properties in the angular template perform better in browser when compared to having a pipe to read value

I am working on an Angular project which contains 24 modules and due to customer requirements, there are always changes to the code.

We have 2 approaches in hand

  1. Using the object with keys directly in the template itself. Sample code looks like : {{ object?.property1?.property2 }}

  2. I have written a pipe which takes the object and the path to get the value from. I have stored the path value in the constant. In the future, we want to drive these constants from the database. Sample code looks like: {{ object | deepFind: PROPERTY1_PROPERTY2_PATH }}

Here PROPERTY1_PROPERTY2_PATH is a constant and it contains the value of ‘property1.property2’;

I have written a sample in stackblitz https://stackblitz.com/edit/angular-jsqhk4

I tried to validate the performance difference between these 2 approaches But I didn’t find any difference in rendering times.

I tried to use Chrome Dev Tools Performance Tab and the deepfind method just took 7ms.

I was unable to figure out to which approach we need to vote for?

<ul>     <!-- Approach 1 -->     <li *ngFor="let widget of serverResponse.widgets">         {{ widget?.title }}     </li>     <!-- Approach 2 -->     <li *ngFor="let widget of serverResponse | deepFind: WIDGET_CONSTANTS?.WIDGETS_LIST">         {{ widget | deepFind: WIDGET_CONSTANTS?.WIDGET_HEADING }}     </li> </ul>  

I have multiple questions on this problem

  1. I didn’t find any way to calculate the performance of the angular 2 template rendering. So, I tried the naive approach to check the bottom up and see what is the performance of the pipe. Please suggest me a way to check the performance to calculate angular 2 template rendering.
  2. I know that this should be an impure pipe. What is the performance decrease using more pipes in the template rather than hardcoded object properties?. Because here just I showed only 2 pipes but in my project is more than 100 times.
  3. What will a better approach to handle this case for future maintenance, code readability and standard way to handle this problem?
  4. I know that I am passing objects to the pipe what is affect the on performance when compared to passing a primitive value?
  5. We are nowhere hardcoding the object keys in the ts file also. I need a better solution to have a solution to handle in the template as well as ts file.
  6. What are the other approaches to the above problem?​

Is there evidence that text in a table vertically aligned middle is easier to read compared to vertically aligned top?

I have an html table and there is one column that is much taller than the others and I am trying to get a recommendation if I should be vertically aligning the rest of the columns to the top or middle. For example, below the rest of the columns are vertically aligned middle (since its only the 2nd column that is forcing the row height.

mockup

download bmml source – Wireframes created with Balsamiq Mockups

Is there any evidence if this is better than having the table vertically aligned to top (versus middle)?

Will doubling the price & damage of grenades make them balanced compared to other weapons?

Context: I’m running a group through the Dead Suns adventure path. This is the first time any of us have used Starfinder. One of the party members is an ysoki envoy who would like to focus on grenades for damage (inspired by this question). It’s a party of 6, so I routinely give bonuses to named/solo foes and increase the number of mooks in encounters.

The group has reached level 5, and we’ve noticed that grenades just don’t do a whole lot, though. Our solarian routinely wallops enemies for 30+ damage per round, and can Supernova for 6d6 damage. Meanwhile the envoy is chucking around looted Mk1 grenades that do 1d6 or 1d8 damage or purchased Mk2 grenades that do 1d12 or 2d6 damage. In a recent fight, their enemy was able to make effective use of grenades only because 5 mooks threw grenades at the same time (and even then most of the party members struck took about 15 damage, since the saves were easy).

Proposal: I’m thinking about adding an “Elite” version of all damage-dealing grenades that costs twice as much and deals twice as much damage. As an example, the Mk1 Shock Grenade is a level 1 item costing 130 credits that deals 1d8 damage; the Elite Mk1 Shock Grenade would also be a level 1 item but would cost 260 credits and deal 2d8 damage. Foes important enough to have a name who carry grenades would carry the elite versions, while faceless mooks would use the normal versions.

Looking at later levels, an Elite Mk5 Frag Grenade would be a level 14 item costing 37.5k credits and dealing 20d6 damage. That sounds like a lot of damage, but almost any character could spend 72.3k credits and proficiently wield an Advanced Seeker Rifle, a level 14 longarm that deals 6d8 damage per shot. It seems like elite grenades would be highly effective from an action economy perspective, but too expensive to be used casually (which is how grenades probably should work, really).

Is this a viable change or am I overlooking anything?

WiFi on Ubuntu 19.04 is insanely slow compared to Windows 10

I have just freshly installed Ubuntu 19.04 on a partition on my hard drive and am dual booting with Windows 10. I ran internet speed tests on both operating systems and got a download rate of 104mb/s on Windows 10. However, on Ubuntu (version 19.04) I am only getting 4mb/s. I’m not sure if this is a driver problem or a bug with Ubuntu itself. Help me please!

WiFi card info: lspci-

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15d0 00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Device 15d1 00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge 00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15d3 00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge 00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15db 00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15dc 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61) 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51) 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15e8 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15e9 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ea 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15eb 00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ec 00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ed 00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ee 00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ef 01:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Device 43d5 (rev 01) 01:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] Device 43c8 (rev 01) 01:00.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43c6 (rev 01) 02:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43c7 (rev 01) 02:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43c7 (rev 01) 02:05.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43c7 (rev 01) 02:06.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43c7 (rev 01) 02:07.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43c7 (rev 01) 04:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8812AE 802.11ac PCIe Wireless Network Adapter (rev 01) 07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15) 08:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] (rev c8) 08:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 15de 08:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Device 15df 08:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15e0 08:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15e1 08:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Device 15e3 09:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 61) 

sudo lshw -class network-

*-network                         description: Wireless interface        product: RTL8812AE 802.11ac PCIe Wireless Network Adapter        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:04:00.0        logical name: wlp4s0        version: 01        serial: 18:31:bf:c5:d8:7d        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless        configuration: broadcast=yes driver=rtl8821ae driverversion=5.0.0-15-generic firmware=N/A ip=192.168.1.5 latency=0 link=yes multicast=yes wireless=IEEE 802.11        resources: irq:57 ioport:e000(size=256) memory:fcd00000-fcd03fff   *-network        description: Ethernet interface        product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:07:00.0        logical name: enp7s0        version: 15        serial: 40:b0:76:42:a8:45        size: 10Mbit/s        capacity: 1Gbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=half firmware=rtl8168h-2_0.0.2 02/26/15 latency=0 link=no multicast=yes port=MII speed=10Mbit/s        resources: irq:35 ioport:d000(size=256) memory:fcc04000-fcc04fff memory:fcc00000-fcc03fff 

What are the counterparts of the asynchronous model compared to the thread model?

According to this article:

In Which We Begin at the Beginning

The asynchronous model is always better than the thread model, since it achieves the same, consuming less resources, and even more important (at least for me), it is simpler, and less data-race prone.

Remembering the infamous JavaScript’s callback hell, it seems to me that the thread model might handle ‘transactions’ better than the asynchronous model (I mean, operations made of several requests, one after the other, that must be executed atomically). Is this correct?

Is there any problem that arises with the asynchronous model that does not with the thread model?

What’s the battery performance of Apple’s latest MacBook Air like compared to the 2016 MacBook Pro?

Apple’s 2016 MacBook Pro 13-inch, 2.9GHz Intel Core i5, 8GB, 512GB SSD has always had poor battery performance. If I am lucky it will last 4 to 5 hours but more like 3 to 4. Apple have replaced the battery twice. I have also spent time with them going it in detail to increase performance but with no real luck.

The previous MacBook Pro model, before they launched the new thinner design, was a dream. Battery easily lasted 8/9 hours or more. No issues whatsoever. The new model pales beside it.

The Touch Bar is annoying at best.

The latest MacBook Air looks like a potential successor. Specs: 13-inch, 1.6GHz Dual-Core i5, 512GB, 16GB, 512GB SSD

Is battery life significantly better to warrant an upgrade?

Why are Solars so powerful compared to other Outsiders in D&D?

Going through a number of D&D books that feature the Solar I noted that it is amongst the most powerful monsters in the book, frequently only matched in level and power by the likes of the Tarrasque. When you compare them to the other top level Outsiders it won’t be much of a contest if pitted against each other, like how for example a 3.5e Pit Fiend is no match for a Solar. This seems to be consistent through a number of editions and endures to this very day.

I am wondering if there is any reason for the Solar to be one of the most badass beings in the books? Is this based on historical equivalents of Monster Manuals (grimoires that detail how to summon demons, some of whom mentioned to never ever try summoning angels because they’d wreck your face)? Or is there another reason why the Solars are consistently some of the most badass monsters in Dungeons & Dragons?

Variable and slow internet speed on my Mac compared to other devices connected on the same network

Background.: I have a 40 Mbps Ethernet connection hooked directly to my iMac running on Mojave.

I use the Mac as a router to share the internet connection from Ethernet to other devices using WiFi.

Problem.: Now the problem is, the ‘other’ devices are easily hitting 15-20 Mbps download speeds, on the contrary my Mac being directly connected to the Ethernet can only reach download speeds up to 4 Mbps!

I don’t know what’s the reason behind this.