dnd 5e – If a Wizard fails to copy a spell from a Spellbook, when can they try again?

There is no arcana check required for copying from another spellbook.

The rules for copying spells:

When you find a wizard spell of 1st level or higher, you can add it to your spellbook if it is of a spell level you can prepare and if you can spare the time to decipher and copy it.

No check required means no failure is possible. As long as you spend the resources, you succeed.

The arcana check only comes into play when copying from a spell scroll:

A wizard spell on a spell scroll can be copied just as spells in spellbooks can be copied. When a spell is copied from a spell scroll, the copier must succeed on an Intelligence (Arcana) check with a DC equal to 10 + the spell’s level. If the check succeeds, the spell is successfully copied. Whether the check succeeds or fails, the spell scroll is destroyed.

python – Djang – Apache wsgi fails ModuleNotFoundError

My apache / wsgi config is correct (it runs py3.8 and executes the script).

The problem is that I can’t import either the settings file or my app.

My wsgi.py:

import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'timemanagement.settings')
application = get_wsgi_application()

Installed apps (in settings.py):

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'mod_wsgi.server',
    'timemanagementtool',
)

Error:

ModuleNotFoundError: No module named 'timemanagement'

If i specify in wsgi.py that:

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings')

It fails with:

ModuleNotFoundError: No module named 'timemanagement_tool'

Folder struture:

Root:        test/
apps:        test/timemanagement, test/timemanagement_tool
wsgi.py:     test/timemanagement/wsgi.py
settings.py: test/timemanagement/settings.py

postgresql – upgrade from 9.4 to 9.6 using pg_upgrade fails

I’m using pg_upgrade to upgrade postgresql from 9.4 to 9.6.Both versions are installed on windows server 2016.I followed the steps described in https://www.postgresql.org/docs/current/pgupgrade.html. Just as following:

 RUNAS /USER:postgres "CMD.EXE"
 SET PATH=%Path%;D:Program FilesPostresql 9.6bin;
 D:Program FilesPostresql 9.6bin>pg_upgrade.exe --old-datadir "D:/Program Files/Postgresql/data" --new-datadir "D:/Program Files/Postresql 9.6/data" --old-bindir "D:/Program Files/Postgresql/bin" --new-bindir "D:/Program Files/Postresql 9.6/bin"
 

After run I got this

check for "D:/Program Files/Postgresql/data/base" failed: No such file or directory
Failure, exiting

I’ve checked,the directory exists and “postgres” have all previliges. I’m new to postgresql,pls tell me how could I solve this.

sql server – SQL Trigger fails retrieve new record in second query

Any advice on this will be appreciated
This script created a table with new records.

My script is failing to assign the “Inserted” ID to the query but manually assigning a value works
(a) Tried Cast both side of the Where Clause to int
(b) Moved this section within the second BEGIN -END section

@MAIL_BODY = @MAIL_BODY +
    '<tr>' +
    '<td>' + @OrderID + '</td>' +
    '<td>' + @Description + '</td>' +
    '<td>' + @DiscountedPrice + '</td>' +
    '</tr>' FROM (dbo).(OrderItem) it INNER JOIN (dbo).(Product) pt on pt.ProductID=it.ProductID WHERE it.OrderID = @OrderID``

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER (dbo).(EMAILFINAL) 
   ON  (dbo).(Order)
AFTER INSERT
AS 

BEGIN
DECLARE @OrderID VARCHAR(3),
@inpToEmail VARCHAR(MAX),
@Description VARCHAR(MAX),
@DiscountedPrice VARCHAR(MAX),
@MAIL_BODY VARCHAR(MAX)

SELECT @OrderID = i.OrderID FROM inserted i;
IF (@OrderID IS NOT NULL)

SELECT @inpToEmail=dr.DistributorEmail from (dbo).(Distributor) dr
inner join (dbo).(User) Ur on ur.DistributorID=dr.DistributorID
inner join (dbo).(Order) odr on odr.UserID=Ur.UserID
where odr.OrderID= + @OrderID;

PRINT @inpToEmail

SET @MAIL_BODY = '<table border="1" align="left" cellpadding="2" cellspacing="0" style="color:black;font-family: Helvetica, Arial, sans-serif;text-align:left;">' +
    '<tr>
    <th>OrderID</th>
    <th>Feature</th>
    <th>Cost($)</th>
    </tr>'

SELECT
    @MAIL_BODY = @MAIL_BODY +
        '<tr>' +
        '<td>' + CAST((OrderID) AS VARCHAR(11)) + '</td>' +
        '<td>' + CAST((ProductName) AS VARCHAR(50)) + '</td>' +
        '<td>' + CAST((DiscountedPrice)  AS VARCHAR(11)) + '</td>' +
        '</tr>'
  FROM (dbo).(Order_Product)
  where Orderid = @OrderID

BEGIN
    SET NOCOUNT ON;

declare 
@HtmlHeader nvarchar(500),
@body nvarchar(max),
@inpEmailProfiler VARCHAR(50) ='Notifications',
@inpBodyFormat VARCHAR(5) ='HTML',
@inpSubjectLine NVARCHAR(MAX)='Quotation'

SELECT  

@MAIL_BODY = @MAIL_BODY +
        '<tr>' +
        '<td>' + @OrderID + '</td>' +
        '<td>' + @Description + '</td>' +
        '<td>' + @DiscountedPrice + '</td>' +
        '</tr>'
 FROM (dbo).(OrderItem) it
INNER JOIN (dbo).(Product) pt on pt.ProductID=it.ProductID
WHERE it.OrderID = @OrderID

SELECT @MAIL_BODY = @MAIL_BODY + '</table>' + 
'<br/>' + '<br/>' + '<br/>' + '<br/>' + 'Kind regards,' +
 '<br/>' + 'Kvikna ehf.'

EXEC msdb.dbo.sp_send_dbmail
@profile_name = @inpEmailProfiler,
@recipients = @inpToEmail,
@body_format='HTML',
@body = @MAIL_BODY,
@subject = @inpSubjectLine;  

END
END

How glusterfs work on client end if specified node fails

I have 3 node glusterfs 1 for arbitrary.

if I have mounted glusterfs from node1 (native client used) if node1 fail how it’s move on node2.

How can I define in client FSTAB & confused about backupvolfile-server option & i have to give arbitrary node details in client FSTAB ????

How arbitrary works in glusterfs ??

KR
LN

finite element method – Mesh Refinement for interpolation of f[x,y] fails for all but the simplest f

I would like to interpolate a function, f(x,y,z), on a mesh of the unit cube, starting with a coarse tetrahedral mesh and refining tetrahedra as needed to reduce the interpolation error below a tolerance. The problem: DiscretizeRegion(Cuboid(),MeshRefinementFunction->mrf) ignores my mrf. In an attempt to understand, I have simplified to a toy version of the problem (2D, on a square instead of a cube, with a simple form for f). I discovered that of the following 5 mathematically equivalent forms for f, the last works and the others do not:

fDirect({x_, y_}) = Cos(2*Pi*x)*Sin(2*Pi*y)
fDelayed({x_, y_}) := Cos(2*Pi*x)*Sin(2*Pi*y)
fEmbedded1 = Function({p}, fDirect(p))
fEmbedded2 = fDirect(#1) & 
fPureFun = Function({p}, Cos(2*Pi*p((1)))*Sin(2*Pi*p((2))))

Here is what the unrefined mesh looks like:

sq = DiscretizeRegion(bm, MaxCellMeasure -> Infinity)

Coarse mesh of unit square without refinement

The resulting mesh has 4 nodes and 2 triangular elements.

Now we define a refinement function. For the toy problem I have adopted a simplified form of the error estimate. I check the error only at the center of each tetrahedron. The center is at Mean(vertices). The true value there is f(Mean(vertices)). My “interpolated value” there is just the mean of f at the individual vertices, Mean(f/@vertices). When Abs(error)>tolerance, the function returns True. A diagnostic print statement lets us see when the mesh refinement function is called.

This does not work for the first definition of f. Here is what that looks like:

 Print("fDirect")
 mrf = Function({vertices, area}, 
   Module({fest, ftrue, error, tolerance, test}, 
    fest = Mean(fDirect /@ vertices); 
    ftrue = fDirect(Mean(vertices)); 
    error = fest - ftrue; tolerance = 0.43; 
    test = Abs(error) > tolerance; 
    Print({vertices, area, fest, ftrue, error, tolerance, test}); 
    test
    )
   ); 
sq = DiscretizeRegion(bm, MeshRefinementFunction -> mrf, 
  MaxCellMeasure -> Infinity)
Print("The mesh has ", Length(mc = MeshCoordinates(sq)), " nodes.")
Print("The mesh has ", 
 Length(mcells = MeshCells(sq, 2)), " triangular cells.")

Failed mesh refinement using a direct definition of f(x,y)

Notice that the mrf is called only once (there is output for only one diagnostic Print()) despite that there are two triangles. In that one call the error exceeds tolerance and the mrf returns true (i.e., do a refinement), yet there is no subsequent refinement. Definitions 2 – 4 produce the same result.

It does work for definition 5. Here is what it’s supposed to look like when it works:

mrf = Function({vertices, area}, 
   Module({fest, ftrue, error, tolerance, test},
    fest = Mean(fPureFun /@ vertices);
    ftrue = fPureFun(Mean(vertices));
    error = fest - ftrue;
    tolerance = 0.43;
    test = Abs(error) > tolerance;
    Print({vertices, area, fest, ftrue, error, tolerance, test});
    test));
sq = DiscretizeRegion(bm, MeshRefinementFunction -> mrf, 
  MaxCellMeasure -> (Infinity))
Print("The mesh has ", Length(mc = MeshCoordinates(sq)), " nodes.")
Print("The mesh has ", 
 Length(mcells = MeshCells(sq, 2)), " triangular cells.")

Working mesh refinement with f defined as a pure function

In the working case, we get a diagnostic print output for each cell of the mesh with repeats for several iterations, until all triangular elements have interpolation error estimates below tolerance.

It seems odd that the change that makes a difference here is a difference in the definition of f, which is internal to a module within a function definition. This seems a failure of encapsulation.

Definitions 3 and 4 were attempts to hide one of the apparently unacceptable forms of definition inside of the acceptable pure function definition form, but this did not work.

Unfortunately, my non-toy version of f is not easily written as a pure function (the one mode that worked above). That function is the end result of tens of pages of development within the notebook. It calls a number of functions, uses a numerical differential equation solver, an iterative root finder,… It’s not a simple function, which is why I want to tabulate and interpolate it.

Is this a bug? Is there a workaround–another way to access mesh refinement within Mathematica? Or would this work if only I did it correctly? (How does one do it correctly?)

drac – Connecting to remote console on Dell iDRAC on R815 fails

iDRAC uses RC4 which is now considered insecure.

It is disabled in:

/usr/lib/jvm/java-11-openjdk-amd64/conf/security/java.security

Remove RC4 from:

jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, DH keySize < 1024, 
    EC keySize < 224, 3DES_EDE_CBC, anon, NULL

And then it works.

sql server – SQL Query fails when content of a single parameter change

Im very puzzled about this issue.. I have a SQL Server database with many records and it is used by my website. When the website user searches for a specific record, the SQL command gets a timeout. The only thing that is different between searches is the parameter.
Everything works within SQL Management Studio. Using newest version of SQL Server Express on a Windows Server 2016.

This fails with a timeout:

Query: SELECT * FROM dbo.v_MyView WHERE 1=@ONE AND Name LIKE @name Order by dbo.v_MyView.Date Desc OFFSET (0) ROWS FETCH NEXT (10) ROWS ONLY
Parameters: @ONE 1, @name flop%

This works:

Query: SELECT * FROM dbo.v_MyView WHERE 1=@ONE AND Name LIKE @name Order by dbo.v_MyView.Date Desc OFFSET (0) ROWS FETCH NEXT (10) ROWS ONLY
Parameters: @ONE 1, @name bandit%

Notice that it is only the content of the parameter @name that changes. searching for “flop%” fails and searching for “bandit%” works.

active directory – Drive mapping fails for admins even with EnableLinkedConnections

I’m experiencing an issue whose cause I’m aware of but to which I’ve not been able to find a workaround.

We know that since UAC was introduced, the EnableLinkedConnections registry entry needs to be 1 in order for administrator accounts to play nicely with mapped drives.

I’ve set up some drive mappings in a domain. Access to the drive is by using non-AD credentials, and since Microsoft idiotically removed the ability to provide credentials in GPPs, I had to resort to a login script (the creds are in plain-text, so not really any more secure, but besides the point – it was easier than deploying the creds to Credential Vault).

Here is the deal:

  • The logon script runs for users who are not domain admins, and the drives get mapped
  • Domain admins do not see the drives in Explorer
  • The drives are mapped for domain admins using their administrator tokens (see picture)

enter image description here

It appears this is because logon scripts execute with the administrator token, not the standard token. However, I have a Group Policy Preference which sets EnableLinkedConnections to 1 in the Registry.

I’ve used gpresult /r and RSOP to confirm that my GPOs are applying (and the drives being mapped as the admin token does confirm this). I’ve confirmed in the Local Registry that EnableLinkedConnections is indeed 1.

As a hacky workaround, I tried using GPPs to create an instant Scheduled Task that would run the logon script on the domain controller. Doesn’t work. No drives mapped in Explorer.

I have also tried playing with Group Policy settings for administrators, including disabling UAC for administrators and enabling/disabling Admin Approval Mode. No difference.

Why is EnableLinkedConnections failing to work properly here, and how can this be fixed? I’ve worked with EnableLinkedConnections before using Local Group Policy on non-domain joined machines and have not had issues like this before with it.

If I navigate to the SYSVOL share on the DC manually once I log in and find the login script and run it, the drives get mapped. It seems something with Group Policy is kinking out weirdly during login.

oracle 12c – Import with Network link fails with ORA-01400

Oracle 12.1.0.2.0

Setup a simple Import using Network Link, into same database
Using REMAP_TABLE and REMAP_SCHEMA options.

Full import.prm file is:

  NETWORK_LINK=mylink
  NOLOGFILE=YES
  CONTENT=DATA_ONLY
  TABLES=SCHEMA_A.MY_TAB
  REMAP_TABLE=SCHEMA_A.MY_TAB:NEW_TAB
  REMAP_SCHEMA=SCHEMA_A:SCHEMA_B

Source table has 7 rows, target has 0.

Running it, results in error:

  ORA-31693: Table data object "SCHEMA_B"."NEW_TAB":"P1" failed to load/unload and is being skipped due to error:
  ORA-01400: cannot insert NULL into ("SCHEMA_B"."NEW_TAB"."LOAD_TIMESTMP")

The column: LOAD_TIMESTMP in both tables is defined as:

  LOAD_TIMESTMP     NOT NULL   TIMESTAMP(6)

Checking the source table, there is data in all 7 rows.

Doing a manual insert .. select .. works fine:

  SQL > insert into SCHEMA_B.NEW_TAB
    2  select * from SCHEMA_A.MY_TAB;

  7 rows created.

  Elapsed: 00:00:00.00
  SQL > commit;

  Commit complete.

  Elapsed: 00:00:00.00
  SQL >
  

Why would import fail doing this ?

But insert/select proves that there’s nothing wrong with the data ??