Triangle side length problem

Two angles of a triangle measure 30 and 45 degrees. If the
side of the triangle opposite the 30-degree angle measures
6 2 units, what is the sum of the lengths of the two remaining
sides? Express your answer as a decimal to the nearest tenth. How do I solve this?

CHMOD Codechef problem

This is the question, I am not able to solve it even after spending 2 days. Initially what I thought – we should keep track of multiplication of array element so far with modulus. But this logic becomes wrong. Please help me to find the ways for solving this question.

vue.js – I have a problem using rootGetters in Nuxt.js

I think it’s a problem with rootGetters or data types.

// sheet.js

// character = Object
// number = 100

export const getters = {
  getNumber: state => {
    return Number(state.character.number); // its return 100
  }
};

and called getNumber to preview.js.

// preview.js
export const state = () => ({
  dummy: 0
});


export const getters = {
  numberIs: (state, rootGetters) => {
    return (state.dummy + rootGetters("sheet/getNumber")); // undefined
  }
};

and numberIs return undefined.
What did I miss?

problem with sign up to GitHub

I couldn’t sign up to GitHub.
The verification process keeps me in a loop,
although voice verification succeded and said I was verified
Thank you in advance
Hagit

magento2.3.3 – Problem with Customer Custom Attribute

I’m facing a problem with a new customer custom attribute. i added the new attribute with the following code

 //$this->customerSetupFactory MagentoCustomerSetupCustomerSetupFactory;
    $customerSetup = $this->customerSetupFactory->create(('setup' => $setup));
    $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
    $attributeSetId = $customerEntity->getDefaultAttributeSetId();
    //$this->attributeSetFactory MagentoEavModelEntityAttributeSetFactory
    $attributeSet = $this->attributeSetFactory->create();
    $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);
    $customerSetup->addAttribute(Customer::ENTITY, 'loyalty_total_points', (
        'type' => 'varchar',
        'label' => 'Loyalty Total Points',
        'input' => 'text',
        'required' => false,
        'visible' => true,
        'user_defined' => true,
        'is_user_defined' => true,
        'position' => 999,
        'system' => 0,
        'default' => 0,
        'source' => '',
        'backend' => '',
        'is_used_in_grid' => false,
        'is_visible_in_grid' => false,
        'is_filterable_in_grid' => false,
        'is_searchable_in_grid' => false,
    ));

    
    $attribute = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'loyalty_total_points')
        ->addData((
            'attribute_set_id' => $attributeSetId,
            'attribute_group_id' => $attributeGroupId,
            'used_in_forms' => ('adminhtml_customer'),
        ));

    $attribute->save();

But whenever I save a new value in the customer page via the Magento admin, I always see the default value (0). occasionally it shows an error like

"Invalid method Magento  Eav  Model  Entity  Attribute :: isScopeStore"

I tried clearing the caches, it no longer gives an error but still doesn’t save the attribute.

In addition to this, I tried to read it from the customer via code with:

$customer_attribute = $customer->getCustomAttribute($attribute_code)->getValue();

but without result

this being a site that I recently took over and I don’t know very well the configurations. I noticed however that other attributes are not saved as well. So I don’t know if the problem is the way I declared the attribute or there is some configuration problem on Magento side

What is the expected amount of rounds you’d have to wait before you get to 5 participants or less in this probability problem?

A lottery has 25 million participants. At each round a random number of participants is selected to participate in the next round. That number is uniformly distributed between 1 and the number of participants left. How many rounds should be expected on average to get to 5 participants?

Boot problem in Ubuntu 19.10

I use Ubuntu 19.10 and Windows 2010 on my pc and use Grub to switch between them. My Ubuntu OS was stuck on boot at:
dev sda5: clean, XXXXXX files, XXXXXX
Then I enabled console logging and found out that it was then stuck at

[ OK ] Started Update UTMP about System Runlevel Changes.

I tried uninstalling the NVIDIA driver in the root shell prompt. Then the boot got completed but it led my mouse to fail. It would recognise my keyboard and touch pad but mouse clicks were not recognised. I re-installed NVIDIA and encountered the same problem

 [ OK ] Started Update UTMP about System Runlevel Changes.

again.

Any help is appreciated.

algorithms – Why do we need MinHeap for Meeting Rooms 2 Leetcode problem

I came across this problem online which is a Leetcode premium problem. Most of the people are solving this using Minheap. To me using minHeap for this seems like repetitive way to solve a problem if we can achieve the same thing just by sorting the array based on startTimes & than checking if meeting(i).endTime > meeting(i+1).startTime. Increment if the aforementioned condition is true.

I don’t have access to leetcode premium so I can’t verify if the following solution would suffice.
Am I missing something here?

Problem Statement:
enter image description here

public int minMeetingRooms(List<Interval> intervals) {
        // Write your code here
        
        if(intervals == null || intervals.size() == 0)
            return 0;
            
        Collections.sort(intervals, (meeting1, meeting2) -> meeting1.start-meeting2.start);
        
        int rooms = 1;
        
        for(int i=0; i<intervals.size()-1; i++) {
            if(intervals.get(i).end > intervals.get(i+1).start)
                rooms++;
        }
        
        System.out.println("rooms required: "+ rooms);
        
        return rooms;
    }

macos – Help – Macbook pro 2017 – Catalina os 10.15.6 repeating kernel panic (black screen) and apple staff cant find the problem

Macbook pro with latest catalina os keeps crashing after fresh install.
apple lab was not able to find the issue and hoping maybe someone will
attaching the kernel report
thanks

panic(cpu 1 caller 0xffffff80112469aa): Kernel trap at 0xffffff8011656240, type 6=invalid opcode, registers:
CR0: 0x0000000080010033, CR2: 0x00000001050a9000, CR3: 0x00000002612b5023, CR4: 0x00000000003626e0
RAX: 0x00000000000008a0, RBX: 0x00000000ffffffff, RCX: 0xffffff80341f7cd0, RDX: 0xffffff801115f7b9
RSP: 0xffffff81242c3c00, RBP: 0xffffff81242c3d10, RSI: 0xffffff8034c99570, RDI: 0x0000000000000000
R8: 0x0000000140000100, R9: 0x0000000000020000, R10: 0x0000000000000000, R11: 0xffffff81242c3b78
R12: 0xffffff8035763680, R13: 0x00000000000008a0, R14: 0xffffff80116569e0, R15: 0x0000000000007d09
RFL: 0x0000000000010246, RIP: 0xffffff8011656240, CS: 0x0000000000000008, SS: 0x0000000000000010
Fault CR2: 0x00000001050a9000, Error code: 0x0000000000000000, Fault CPU: 0x1, PL: 1, VF: 0

Backtrace (CPU 1), Frame : Return Address
0xffffff81242c3660 : 0xffffff801111a65d
0xffffff81242c36b0 : 0xffffff8011254a75
0xffffff81242c36f0 : 0xffffff80112465fe
0xffffff81242c3740 : 0xffffff80110c0a40
0xffffff81242c3760 : 0xffffff8011119d27
0xffffff81242c3860 : 0xffffff801111a117
0xffffff81242c38b0 : 0xffffff80118c1abc
0xffffff81242c3920 : 0xffffff80112469aa
0xffffff81242c3aa0 : 0xffffff80112466a8
0xffffff81242c3af0 : 0xffffff80110c0a40
0xffffff81242c3b10 : 0xffffff8011656240
0xffffff81242c3d10 : 0xffffff80116571e8
0xffffff81242c3de0 : 0xffffff8011657388
0xffffff81242c3e10 : 0xffffff7f927baaf9
0xffffff81242c3ea0 : 0xffffff801162703b
0xffffff81242c3f40 : 0xffffff8011784c37
0xffffff81242c3fa0 : 0xffffff80110c1206
Kernel Extensions in backtrace:
com.apple.kec.pthread(1.0)(C9486906-995B-3F43-A336-95AAF9FA5BA1)@0xffffff7f927b9000->0xffffff7f927c2fff

BSD process name corresponding to current thread: opendirectoryd

Mac OS version:
19G73

Kernel version:
Darwin Kernel Version 19.6.0: Sun Jul 5 00:43:10 PDT 2020; root:xnu-6153.141.1~9/RELEASE_X86_64
Kernel UUID: 783946EA-6F11-3647-BF90-787AEA14B954
Kernel slide: 0x0000000010e00000
Kernel text base: 0xffffff8011000000
__HIB text base: 0xffffff8010f00000
System model name: MacBookPro14,1 (Mac-B4831CEBD52A0C4C)
System shutdown begun: NO
Panic diags file available: YES (0x0)

System uptime in nanoseconds: 16263902016
last loaded kext at 14128222407: >AudioAUUC 1.70 (addr 0xffffff7f949e0000, size 28672)
loaded kexts:

AudioAUUC 1.70
!AGraphicsDevicePolicy 5.2.6
@AGDCPluginDisplayMetrics 5.2.6
@fileutil 20.036.15
!AHV 1
|IOUserEthernet 1.0.1
|IO!BSerialManager 7.0.6f7
!AHDAHardwareConfigDriver 283.15
AGPM 111.4.4
X86PlatformShim 1.0.0
!APlatformEnabler 2.7.0d0
pmtelemetry 1
!AUpstreamUserClient 3.6.8
!AHDA 283.15
@Dont_Steal_Mac_OS_X 7.0.0
AGDCBacklightControl 5.2.6
!A!IKBLGraphics 14.0.7
ACPI_SMC_PlatformPlugin 1.0.0
!AThunderboltIP 3.1.4
!ABacklight 180.3
!AGFXHDA 100.1.429
!ASMCLMU 212
AirPort.BrcmNIC 1400.1.1
!AFIVRDriver 4.1.0
eficheck 1
!ACameraInterface 7.6.0
!A!ISlowAdaptiveClocking 4.0.0
!A!IPCHPMC 2.0.1
!AMCCSControl 1.14
!A!IKBLGraphicsFramebuffer 14.0.7
@filesystems.autofs 3.0
!AFileSystemDriver 3.0.1
!AVirtIO 1.0
@filesystems.hfs.kext 522.100.5
@!AFSCompression.!AFSCompressionTypeDataless 1.0.0d1
@BootCache 40
@!AFSCompression.!AFSCompressionTypeZlib 1.0.0
!ATopCaseHIDEventDriver 3430.1
@filesystems.apfs 1412.141.1
@private.KextAudit 1.0
!ASmartBatteryManager 161.0.0
!AACPIButtons 6.1
!ARTC 2.0
!ASMBIOS 2.1
!AACPIEC 6.1
!AAPIC 1.7
$!AImage4 1
@nke.applicationfirewall 303
$TMSafetyNet 8
@!ASystemPolicy 2.0.0
|EndpointSecurity 1
!AGraphicsControl 5.2.6
|IOAVB!F 850.1
DspFuncLib 283.15
@kext.OSvKernDSPLib 529
@plugin.IOgPTPPlugin 840.3
|IOEthernetAVB!C 1.1.0
!AHDA!C 283.15
|IOHDA!F 283.15
IOPlatformPluginLegacy 1.0.0
@!AGPUWrangler 5.2.6
!ABacklightExpert 1.1.0
|IONDRVSupport 576.1
!ASMBusPCI 1.0.14d1
|IO!BHost!CUARTTransport 7.0.6f7
|IO!BHost!CTransport 7.0.6f7
!A!ILpssUARTv1 3.0.60
!A!ILpssUARTCommon 3.0.60
!AOnboardSerial 1.0
|IO80211!F 1200.12.2b1
mDNSOffloadUserClient 1.0.1b8
corecapture 1.0.4
|IOSkywalk!F 1
X86PlatformPlugin 1.0.0
|IOSlowAdaptiveClocking!F 1.0.0
IOPlatformPlugin!F 6.0.0d8
!AThunderboltEDMSink 4.2.3
!AThunderboltDPOutAdapter 6.2.6
!ASMBus!C 1.0.18d1
@!AGraphicsDeviceControl 5.2.6
|IOAccelerator!F2 438.7.3
|IOGraphics!F 576.1
@kext.triggers 1.0
|IOAudio!F 300.2
@vecLib.kext 1.2.0
|IOSerial!F 11
|IOSurface 269.11
@filesystems.hfs.encodings.kext 1
!AActuatorDriver 3440.1
!AHIDKeyboard 209
!AHS!BDriver 3430.1
IO!BHIDDriver 7.0.6f7
|IO!B!F 7.0.6f7
|IO!BPacketLogger 7.0.6f7
!AMultitouchDriver 3440.1
!AInputDeviceSupport 3440.8
!AHSSPIHIDDriver 59
!AThunderboltDPInAdapter 6.2.6
!AThunderboltDPAdapter!F 6.2.6
!AThunderboltPCIDownAdapter 2.5.4
!AHPM 3.4.4
!A!ILpssI2C!C 3.0.60
!AHSSPISupport 59
!AThunderboltNHI 5.8.6
|IOThunderbolt!F 7.6.1
!AXsanScheme 3
!A!ILpssSpi!C 3.0.60
!A!ILpssDmac 3.0.60
|IONVMe!F 2.1.0
!A!ILpssGspi 3.0.60
!A!ILpssI2C 3.0.60
usb.!UXHCIPCI 1.2
usb.!UXHCI 1.2
usb.!UHostPacketFilter 1.0
|IOUSB!F 900.4.2
!AEFINVRAM 2.1
!AEFIRuntime 2.1
|IOSMBus!F 1.1
|IOHID!F 2.0.0
$quarantine 4
$sandbox 300.0
@kext.!AMatch 1.0.0d1
DiskImages 493.0.0
!AFDEKeyStore 28.30
!AEffaceable!S 1.0
!ASSE 1.0
!AKeyStore 2
!UTDM 489.120.1
|IOSCSIBlockCommandsDevice 422.120.3
!ACredentialManager 1.0
KernelRelayHost 1
!ASEPManager 1.0.1
IOSlaveProcessor 1
|IOTimeSync!F 840.3
|IONetworking!F 3.4
|IOUSBMass!SDriver 157.140.1
|IOSCSIArchitectureModel!F 422.120.3
|IO!S!F 2.1
|IOUSBHost!F 1.2
!UHostMergeProperties 1.2
usb.!UCommon 1.0
!ABusPower!C 1.0
|CoreAnalytics!F 1
!AMobileFileIntegrity 1.0.5
@kext.CoreTrust 1
|IOReport!F 47
!AACPIPlatform 6.1
!ASMC 3.1.9
watchdog 1
|IOPCI!F 2.9
|IOACPI!F 1.4
@kec.pthread 1
@kec.Libm 1
@kec.corecrypto 1.0