Why am I getting an error stating 'The certificate authority is invalid or incorrect' when opening my .NET 1.1 project i
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further I don't know the cause of the issue but I was able to resolve it. Adding the following line to the project's Web.Config file corrected the issue <identity impersonate="true" userName="<userName>" password="<pass>"/>
|
Opening one MySQL connection vs opening and closing a lot of connections?
Date : March 29 2020, 07:55 AM
will help you Not only is it expensive, but if you have multiple requests coming in for the script that are doing it simultaneously, you could end up bumping up against the connection limit on the server, such that further requests must wait or are denied. But the main thing, as @zerkms said, is that it's an expensive operation. About six months ago, I took a script that made repeated connections in a loop and moved the connection outside the loop, and the script's execution time dropped from 10-12 seconds to well under 1 second.
|
Closing Result is not correct in acounts opening and Closing Balance in SQL Query?
Tag : chash , By : Vodkat
Date : March 29 2020, 07:55 AM
Any of those help You've got a couple problems conspiring against you. First, you're summing and grouping on dates, but you're leaving the timestamps intact. Then, your UNION ALL is causing those to duplicate in your calculations. If you had other deposits on the same dates, you'd see those numbers inflate as well. You can also combine your summation query into one SELECT with some correlated subqueries, like so: SELECT dateadd(dd, datediff(dd, 0, a.TransDate), 0)
, ISNULL (SUM (a.Cr), 0) AS 'Total deposits'
, ISNULL (SUM (a.Dr), 0) AS 'Total withdrawals'
, ISNULL((SELECT SUM(Cr) from Ledger where dateadd(dd, datediff(dd, 0, TransDate), 0) <= dateadd(dd, datediff(dd, 0, a.TransDate), 0)), 0)
- ISNULL((SELECT SUM(Dr) from Ledger where dateadd(dd, datediff(dd, 0, TransDate), 0) <= dateadd(dd, datediff(dd, 0, a.TransDate), 0)), 0) as 'Closing Balance'
FROM Ledger a
where a.TransDate between '2014-02-14' and '2014-02-20'
GROUP BY dateadd(dd, datediff(dd, 0, a.TransDate), 0)
|
Closing and Opening a .exe with a batch file. Upon closing the program asks to save or not
Date : March 29 2020, 07:55 AM
I hope this helps you . You can add the /F parameter to taskkill to forcefully terminate the app. TaskKill /F /IM googleearth.exe
|
Replacing li tag if it's opening and closing tag lies in between span opening and closing tag
Tag : php , By : Singularity
Date : March 29 2020, 07:55 AM
it should still fix some issue This regex did the trick for me. Just swap second subgroup ($2) with whatever. For example: $html = 'lol <span style="background-color:limegreen;"> <br /> <li> this </li> </span> <br /> this is something <li"> This is new </li>';
$html = preg_replace('/(<span.+>.+)(<li>)(.+<\/li>.+<\/span>)/', '$1 replacement $3', $html);
lol <span style="background-color:limegreen;"> <br /> replacement this </li> </span> <br /> this is something <li"> This is new </li>
|