Unable to Autoplay Embedded Audio in PowerPoint File

I have some Microsoft PowerPoint files which were sent to me and contain what should be automatic playback audio and slide transitions. For some reason I cannot get the audio to auto-play. I can play back the audio fine in preview/edit mode but it will not autoplay the audio despite checking the audio playback options are set to “start automatically”. Occasionally (not every slide) it will start playing the first 1 second of audio and then cut out.

The PPT and audio were created on a Mac and I am on Windows 10 but the audio was recorded directly into PPT so it should be compatible. Furthermore, I have renamed a file to ZIP and opened up the Media directory and specifically determined the files are M4A AAC encoded files which should be Windows PPT compatible.

If I export the media on each slide and then re-import it the playback works fine (though the audio speaker graphic on the slide does change slightly making me think there is something going on there). However, this will be a large number of presentations/slides and manually exporting and re-importing the audio is not an option.

I explored creating a macro to do the export and re-import of the audio but it appears there is no currently supported VBA method to export embedded audio from slides..there is some indication it used to be supported as the Export method of the SoundFormat object but that appears to have been deprecated, see https://stackoverflow.com/a/8779992/8666467

Any ideas? I can create a sample presentation with a few slides demonstrating the issue if that would be helpful. Just let me know where to post it for easy accessibility.

postgresql 12 – Unable to delete a referenced row due to a trigger on a referencing table?

I ran into some problems in using triggers to ensure only deletions from cascading deletes,

CREATE TYPE status_type AS enum ('A');

CREATE TABLE parent(
    name VARCHAR(255) PRIMARY KEY
);

CREATE TABLE child(
    name VARCHAR(255) PRIMARY KEY
);

CREATE TABLE relation(
    childname VARCHAR(255) NOT NULL REFERENCES child (name) ON DELETE CASCADE,
    parentname VARCHAR(255) NOT NULL REFERENCES parent (name) ON DELETE CASCADE,
    status status_type NOT NULL,
    PRIMARY KEY (childname, parentname)
);

CREATE OR REPLACE FUNCTION prevent_deletes_when_status_A() RETURNS trigger AS $$
    BEGIN
        IF OLD.status='A' AND EXISTS (SELECT 1 FROM parent WHERE parent.name=OLD.parentname) THEN
            RAISE EXCEPTION 'Invalid DELETE';
        ELSE
            RETURN OLD;
        END IF;
    END;
$$ LANGUAGE plpgsql;

CREATE TRIGGER tr_onlycascading_fromParent
    BEFORE DELETE ON relation
    FOR EACH ROW EXECUTE PROCEDURE prevent_deletes_when_status_A();

INSERT into parent VALUES ('john');
INSERT into child VALUES ('doe');
INSERT into relation VALUES ('doe', 'john', 'A');
DELETE FROM child WHERE name='doe';

Why does this not work? I understand that it raises the exception message. However, the row in child should be deleted. Am I missing something here?

network – My 2017 iMac is unable to print! But my old Mac Mini prints just fine! Any insights?

Today, something weird is happening: when I try to print (from TextEdit) from my iMac (2017, Retina 4k, running Mojave, printing to a network-connected HP 3055), it ACTS like the document printed, but nothing comes out. I tried cycling power on the printer; no joy. I tried rebooting; no joy. I tried removing and reinstalling the printer; No joy. I tried printing from other applications (Preview, OpenOffice); no joy. From the “HP LaserJet 3055…” application, I CAN’T print a test page, but I CAN reach the printer’s web interface, and print a PCL font list from it.

When I copy the document that started this whole mess over to my old Mini (running Mountain Lion, I think), it prints FINE from there. But still no joy printing from my Mini.

Any insights?

Unable to get the source file of an error on react-native

I am debugging an application that throws me the error of

     ERROR    Error: Invalid hook call. Hooks can only be called inside of the body of a 
function component. This could happen for one of the following reasons:
    1. You might have mismatching versions of React and the renderer (such as React DOM)
    2. You might be breaking the Rules of Hooks
    3. You might have more than one copy of React in the same app
    See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.
    (Fri Oct 23 2020 09:04:14.325)  ERROR    Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)

But it doesn’t say where is the source file of the error… since it is a big application I am having trouble finding where this error is located.

I am able to compile the application but the error happens on the initialization.
When I run the debugger it says the following on the developers console…

Unable to symbolicate stack trace: The stack is null

Plus the previous errors.
Any idea how I could locate the source file of this errors?
Thank you for your help!

digital – Unable to click pictures with nikon D3500

https://drive.google.com/drive/folders/1s_xLLeXyCNRJmyem2vkqLd-g9XnU3DZm?usp=sharing
here is the link of pictures and videos to my problems.

To describe it in words, my camera nikon d3500 is going half way click to autofocus but on full click is not taking any picture. Sometimes it shows error that Error. Press shutter release again. Even if this error is not displayed but still my camera is unable to take pictures.

I tried resetting the options but retouch menu is all greyed out, the reset menu in shooting menu is also greyed out. I also tried formatting the memory card and take the battery out for about 8 hours and re-insert it into the camera to reset the settings, but that did not work.

Unity Unable to blend 2D Light renderers

I’ve followed the documentation on Unity regarding 2D lighting. It said to turn on Alpha blending in the options. But this is how it turns out:
If Alpha blending is off:
when off

If Alpha blending is on:
when on

I’m not entirely sure why it’s turning black. These are my settings for the 2D light:
settings

I’ve checked my layers, specifically the tile map floor, and it’s on the Default layer.
tile map settings

I just want my lights to blend well.

sql server 2016 – Stored Procedure Signed by Certificate Unable to Add Members to Database Roles

I created a Stored Procedure that performs the Following tasks:

  • Creates database
  • Change owner to sa
  • Set recovery model
  • Creates users in database
  • Adds users to database roles.
  • Grants execute and view definition to users

I then created a certificate, Login from cert, user from cert, granted exec on SP to user, granted control server to login, added signature to sp by certificate.

When non sysadmins execute the SP everything works except for adding users to the database roles with error: Cannot alter the role ‘db_datareader’, because it does not exist or you do not have permission.

If I add the login to the sysadmin server role, when non sysadmins execute the SP it will work. Ideally the login would have minimal permissions to perform these functions. Is it possible to do this w/o granting sysadmin to the user?

Here is the code I used to create the certificate, login, user, signature, etc:

use master;
go

CREATE CERTIFICATE sp_CreateNewReportingDatabase_cert
ENCRYPTION BY PASSWORD = 'SuperSecretPassword'
WITH SUBJECT = 'Certificate for sp_CreateNewReportingDatabase',
    START_DATE = '20201015', EXPIRY_DATE = '21000101'
GO

CREATE LOGIN sp_CreateNewReportingDatabase_cert_user FROM CERTIFICATE sp_CreateNewReportingDatabase_cert;
GO
CREATE USER sp_CreateNewReportingDatabase_cert_user FROM CERTIFICATE sp_CreateNewReportingDatabase_cert;
GO
GRANT EXECUTE ON dbo.CreateNewReportingDatabase TO sp_CreateNewReportingDatabase_cert_user;
GO
GRANT CONTROL SERVER TO sp_CreateNewReportingDatabase_cert_user;
GO
ADD SIGNATURE TO (dbo).(CreateNewReportingDatabase) BY CERTIFICATE sp_CreateNewReportingDatabase_cert
WITH PASSWORD = 'SuperSecretPassword';
GO

Here is the code to create the stored proc:

CREATE OR ALTER PROC dbo.CreateNewReportingDatabase @DatabaseName NVARCHAR(50), @ReportingPod NVARCHAR(50) = NULL
AS
SET XACT_ABORT, NOCOUNT ON

DECLARE @SqlCommand NVARCHAR(2000);

--Error Checking
IF @ReportingPod NOT LIKE 'TAC(_)NTAnalysis-%' AND (@DatabaseName LIKE 'Reporting(_)%' OR @DatabaseName LIKE '(_)Salesforce')
    BEGIN
        RAISERROR('For Reporting_<client> and <client>_Salesforce databases you must populate @ReportingPod with a value that follow formate TAC_NTAnalysis-<reportingpod> Contact DBA',16,1)
        SET NOEXEC ON --Stops running the script --I believe that this requires sysadmin rights.
    END
ELSE IF (@DatabaseName LIKE 'Reporting(_)%' OR @DatabaseName LIKE '(_)Salesforce') AND @ReportingPod IS NULL
    BEGIN
        RAISERROR('For Reporting_<client> and <client>_Salesforce databases you must populate @ReportingPod with a value that follow formate TAC_NTAnalysis-<reportingpod> Contact DBA',16,1)
        SET NOEXEC ON --Stops running the script --I believe that this requires sysadmin rights.        
    END
ELSE IF EXISTS (
    SELECT (name)
    FROM sys.databases
    WHERE (name) = @DatabaseName
    )
    BEGIN
        RAISERROR('There is already a detabase with that name!',16,1)
        SET NOEXEC ON --Stops running the script --I believe that this requires sysadmin rights.
    END
    
--Execute Scrips
ELSE
BEGIN
    --Create the database
    PRINT 'Creating database ' + @databasename;
    SET @SqlCommand = N'CREATE DATABASE (' + @DatabaseName + ')'    
    EXEC dbo.sp_executesql @SqlCommand

    -- change owner to sa
    PRINT 'Switching owner to sa';
    SET @SqlCommand = N'ALTER AUTHORIZATION ON DATABASE::(' + @DatabaseName + ') TO (sa);'
    EXEC dbo.sp_executesql @SqlCommand;
    
    -- set recovery model to simple
    IF @DatabaseName LIKE 'Reporting(_)%' OR @DatabaseName LIKE '%(_)Salesforce'
        BEGIN
            PRINT 'Setting recovery model to simple';
            SET @SqlCommand = N'ALTER DATABASE (' + @DatabaseName + ') SET RECOVERY SIMPLE;'
            EXEC dbo.sp_executesql @SqlCommand
        END
    ELSE PRINT 'Revoery model not modified from default';

    -- Create users for ServiceAccount and reportingPod in Reporting_ databases.
    IF @DatabaseName LIKE 'reporting(_)%' OR @DatabaseName LIKE '%(_)Salesforce'
        BEGIN
            SET @SqlCommand = N'
                USE (' + @DatabaseName + ')
                IF NOT EXISTS(
                    SELECT (name)
                    FROM sys.database_principals
                    WHERE
                        (type) NOT IN (''s'',''r'')
                        AND (NAME) = ''TAC_NTServiceAccount''
                )
                BEGIN
                    PRINT ''Creating (TAC_NTServiceAccount) user''
                    CREATE USER (TAC_NTServiceAccount) FOR LOGIN (TAC_NTServiceAccount)
                END         

                IF NOT EXISTS(
                    SELECT (name)
                    FROM sys.database_principals
                    WHERE
                        (type) NOT IN (''s'',''r'')
                        AND (NAME) = ''' + @ReportingPod + '''
                )
                BEGIN
                    PRINT ''Creating ' + @ReportingPod + ' user''
                    CREATE USER (' + @ReportingPod +  ') FOR LOGIN (' + @ReportingPod + ');
                END'
            EXEC sp_executesql @SqlCommand;
        END
    ELSE PRINT 'Skipping the creation of the ServiceAccount and Reporting POD database principals'

    ---Grant role membership for ServiceAccount
    IF @DatabaseName LIKE 'Reporting(_)%'
    BEGIN
        PRINT 'Adding !gampelan to roles: reader, writer, ddladmin';
        SET @SqlCommand = N'
        USE (' + @DatabaseName + ')
        ALTER ROLE db_datareader ADD MEMBER (TAC_NTServiceAccount)
        ALTER ROLE db_datawriter ADD MEMBER (TAC_NTServiceAccount)
        ALTER ROLE db_ddladmin ADD MEMBER (TAC_NTServiceAccount)
        '
        EXEC sp_executesql @SqlCommand
    END
    ELSE IF @DatabaseName  LIKE '%(_)salesforce'
    BEGIN
        PRINT 'Adding ServiceAccount to roles: reader';
        SET @SqlCommand = N'
        USE (' + @DatabaseName + ')
        ALTER ROLE db_datareader ADD MEMBER (TAC_NTServiceAccount)
        '
        EXEC sp_executesql @SqlCommand
    END


    --Grant role membership for ReportingPod
    IF @DatabaseName  LIKE 'Reporting(_)%' AND @ReportingPod LIKE 'TAC_NTAnalysis%'
    BEGIN
        PRINT 'Adding ' + @ReportingPod + ' to roles: reader';
        SET @SqlCommand = N'
        USE (' + @DatabaseName + ')
        ALTER ROLE db_datareader ADD MEMBER (' + @ReportingPod + ')'
        EXEC sp_executesql @SqlCommand
    END
    ELSE IF @DatabaseName  LIKE '%salesforce' AND @ReportingPod LIKE 'TAC_NTAnalysis%'
    BEGIN
        PRINT 'Adding ' + @ReportingPod + ' to roles: reader';
        SET @SqlCommand = N'
            USE (' + @DatabaseName + ')
            ALTER ROLE db_datareader ADD MEMBER (' + @ReportingPod + ')'    
        EXEC sp_executesql @SqlCommand
    END
    
    --Grant execute and view definition for ReportingPod
    IF @DatabaseName  LIKE '%(_)Salesforce' OR @DatabaseName  LIKE 'Reporting(_)%'
    BEGIN
        PRINT 'Granting execute and view definition to ' + @ReportingPod;   
        SET @SqlCommand = N'
        USE (' + @DatabaseName + ')
        GRANT EXECUTE TO (' + @ReportingPod + ');
        GRANT VIEW DEFINITION TO (' + @ReportingPod + ');'  
        EXEC dbo.sp_executesql @SqlCommand;
    END
END
GO

opengl – Unable to create Shader Object for Geometry Shader (GL_GEOMETRY_SHADER)

I am just starting with OpenGL using c++ on Ubuntu 18.04. The problem I have is that when I try to link Geometry Shader in my main program, the following function call is failing

GLuint ShaderObj = glCreateShader(ShaderType);

when ShaderType = GL_GEOMETRY_SHADER.
The error log thrown is: “Error creating shader type 36313”.
Here, 36313 is the enum value for GL_GEOMETRY_SHADER.

The following are the version details of my setup.

    GLX version: 1.4
        Max core profile version: 4.6
        Max compat profile version: 3.0
        Max GLES1 profile version: 1.1
        Max GLES(23) profile version: 3.1
    OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.8
    OpenGL core profile shading language version string: 4.60
    OpenGL version string: 3.0 Mesa 20.0.8
    OpenGL shading language version string: 1.30
    OpenGL ES profile version string: OpenGL ES 3.1 Mesa 20.0.8
    OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

The following is my hardware information

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09)
    Subsystem: Dell HD Graphics 5500
    Kernel driver in use: i915
    Kernel modules: i915
--
08:00.0 3D controller: NVIDIA Corporation GF117M (GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M) (rev a1)
    Subsystem: Dell GeForce 820M
    Kernel driver in use: nouveau
    Kernel modules: nvidiafb, nouveau

I think this might be some version error. But I am not sure. I would be really really grateful if someone could help me out with this.