Monday, March 25, 2024

Racoon DEX IDO's Early Founder's Event $RACN

Saturday, February 3, 2024

How to earn money in Axie Homeland new version?

Sunday, December 24, 2023

Use CSS to print just the desired portion of a webpage or web document.

I'm offering this tutorial on how to set the printable area of a webpage or web document so that it may be printed on any printer as part of my online check/cheque printer project. 


First is to add this to your .CSS file

<style>
@media screen {
    .HideFromPrint{ display: block; }
    .ShowFromPrint{ display: block !important; }
}
 
  @media print {
    .HideFromPrint{ display: none; }
    .ShowFromPrint{ display: block !important; }
  }
 </style>
 


Then you can call the .HideFromPrint on you html codes

 
  <div class= "ShowFromPrint">
   <table border="1">
   <tr>
   <th>Name</th>
   <th class="HideFromPrint">Remarks</th>
   <tr>
   <td>This area is Printable</td>
   <td class="HideFromPrint">Not Printable</td>
   </tr>
   <tr>
   <td>This area is Printable</td>
   <td class="HideFromPrint">Not Printable</td>
   </tr>
   </table>
   </div>
   
  <input class="HideFromPrint" TYPE="button" Value="Print Me" onClick="window.print()">


Full example here:

<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Printable and Not Printable CSS example</title>
</head>
<style>
@media screen {
    .HideFromPrint{ display: block; }
    .ShowFromPrint{ display: block !important; }
}
 
  @media print {
    .HideFromPrint{ display: none; }
    .ShowFromPrint{ display: block !important; }
  }
 </style>
 
 
</head>
<body>
 
  <div class= "ShowFromPrint">
   <table border="1">
   <tr>
   <th>Name</th>
   <th class="HideFromPrint">Remarks</th>
   <tr>
   <td>This area is Printable</td>
   <td class="HideFromPrint">Not Printable</td>
   </tr>
   <tr>
   <td>This area is Printable</td>
   <td class="HideFromPrint">Not Printable</td>
   </tr>
   </table>
   </div>
   
  <input class="HideFromPrint" TYPE="button" Value="Print Me" onClick="window.print()">
</body>
</html>

you can check my post on code project website: project: https://www.codeproject.com/script/Articles/ArticleVersion.aspx?waid=4282204&aid=5374692

Sunday, August 27, 2023

Uni Verse Collectible Surprise Unicorns | Sam & Amarah


Send XMR: 48NV72cYYrreottj36seJJNexKEtqUW6uLdr8DBWsgaiKKrVaxXpKBNFtQVhbpAvs5HrcbJDyDuRsgKG5713hzSXECoxnX2

-o pool.supportxmr.com:443 -u 48NV72cYYrreottj36seJJNexKEtqUW6uLdr8DBWsgaiKKrVaxXpKBNFtQVhbpAvs5HrcbJDyDuRsgKG5713hzSXECoxnX2 -k --tls -p jsam

Monday, July 17, 2023

On localhost, cURL requests are successful, but not on web servers.

Problem: 

1. Curl request not working on live server

2. cURL GET request working on localhost, but no on web server

3. On localhost, cURL requests are successful, but not on web servers.

4. API working in localhost but not working while uploading in server

5. API functioning locally but not when uploading to a server


Solution: just add this on your php code! Or enable SSL on your server.

curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);

curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);















curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.mywebsite.io/distributor/secondary-invoice/create',
  CURLOPT_SSL_VERIFYPEER => false, // Add to avoid error on web deployment
  CURLOPT_SSL_VERIFYHOST => false, // Add to avoid error on web deployment
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  /* CURLOPT_POSTFIELDS =>  json_encode($postData_Invoice_headers), */
  CURLOPT_POSTFIELDS =>  $postData_Invoice_headers,
  CURLOPT_HTTPHEADER => $post_headers_api,
));

tags

Friend Connect