Results: 1578
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
Adds exceptions so that unauthorized users will be able to see all posts and individual post
public function __construct() {
    $this->middleware('auth', ['except'=>['index', 'show']]);
}
by Valeri Tandilashvili
5 years ago
0
Laravel
auth
Laravel From Scratch
0
git commit amend
change commit name or add some changes in previous commit
git commit -amend -m "comment"
by Luka Tatarishvili
5 years ago
0
Git
commands
Git Tutorials
0
Button types with html examples
<button type="button" class="btn btn-primary">Primary</button>
<button type="button" class="btn btn-secondary">Secondary</button>
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-danger">Danger</button>
<button type="button" class="btn btn-warning">Warning</button>
<button type="button" class="btn btn-info">Info</button>
<button type="button" class="btn btn-light">Light</button>
<button type="button" class="btn btn-dark">Dark</button>

<button type="button" class="btn btn-link">Link</button>
Special classes for different button types:
btn-primary
btn-secondary
btn-success
btn-danger
btn-warning
btn-info
btn-light
btn-dark
by Valeri Tandilashvili
5 years ago
0
Bootstrap
buttons
Bootstrap official doc
0
.container
class sets a max-width at each responsive breakpoint
by Valeri Tandilashvili
5 years ago
0
Bootstrap
layout
Bootstrap v5: Getting Started (Buttons, Responsive Columns, Accordion)
0
Two columns with equal width on all devices and viewport (from
xs
to
xl
)
<div class="row">
    <div class="col">
      1 of 2
    </div>
    <div class="col">
      2 of 2
    </div>
  </div>
Three equal width columns
<div class="row">
    <div class="col">
      1 of 3
    </div>
    <div class="col">
      2 of 3
    </div>
    <div class="col">
      3 of 3
    </div>
  </div>
by Valeri Tandilashvili
5 years ago
0
Bootstrap
layout
Bootstrap official doc
0
The column in the middle has specified width and the rest of the space is divided equally for the other columns
<div class="container">
  <div class="row">
    <div class="col">
      1 of 3
    </div>
    <div class="col-6">
      2 of 3 (wider)
    </div>
    <div class="col">
      3 of 3
    </div>
  </div>
  <div class="row">
    <div class="col">
      1 of 3
    </div>
    <div class="col-5">
      2 of 3 (wider)
    </div>
    <div class="col">
      3 of 3
    </div>
  </div>
</div>
by Valeri Tandilashvili
5 years ago
0
Bootstrap
layout
Bootstrap official doc
0
CSS Animations
Example 1: Bouncing Ball Animation:
<!DOCTYPE html>
<html>
<head>
  <style>
    @keyframes bounce {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-100px); }
    }
    .ball {
    	border-radius: 30px;
      width: 50px;
      height: 50px;
      background-color: red;
      position: relative;
      animation: bounce 2s ease-in-out infinite;
    }
  </style>
</head>
<body>
  <div class="ball"></div>
</body>
</html>
The ball moves up and down in a continuous loop. The position: relative is used to keep the ball within its container. Example 2: Sequential Animation:
<!DOCTYPE html>
<html>
<head>
  <style>
    @keyframes slide-in {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(0); }
    }
    @keyframes fade-in {
      0% { opacity: 0; }
      100% { opacity: 1; }
    }
    .card {
      width: 300px;
      height: 200px;
      background-color: #007bff;
      color: white;
      animation: slide-in 1s ease-in-out forwards, fade-in 1s ease-in-out forwards 1s;
    }
  </style>
</head>
<body>
  <div class="card">Sequential Animation</div>
</body>
</html>
This example combines two animations (slide-in and fade-in) to create a sequential animation effect on a card. The forwards keyword ensures that the final state of the animations is maintained after they finish. Example 3: Animated Typing Effect:
<!DOCTYPE html>
<html>
<head>
  <style>
    .typing {
      font-family: monospace;
      overflow: hidden;
      white-space: nowrap;
      border-right: 3px solid;
      animation: typing 3s steps(40) infinite, blink 0.75s step-end infinite;
    }
    @keyframes typing {
      from { width: 0; }
      to { width: 100%; }
    }
    @keyframes blink {
      50% { border-color: transparent; }
    }
  </style>
</head>
<body>
  <div class="typing">Hello, I'm a typing effect.</div>
</body>
</html>
The typing animation gradually reveals the text by increasing the width of the border, and the blink animation simulates the blinking cursor. Example 4: Animated Gradient Background:
<!DOCTYPE html>
<html>
<head>
  <style>
    body {
      margin: 0;
      height: 100vh;
      background: linear-gradient(-45deg, #007bff, #00ff00, #ff0000, #ffc107);
      background-size: 400% 400%;
      animation: gradient 10s ease infinite;
    }
    @keyframes gradient {
      0%, 100% { background-position: 0 50%; }
      25% { background-position: 100% 50%; }
      50% { background-position: 50% 100%; }
      75% { background-position: 0 50%; }
    }
  </style>
</head>
<body>
</body>
</html>
This example animates a gradient background by changing the background-position at different keyframes. The result is a visually striking and dynamic background. Example 5: Image Gallery with Hover Effect:
<!DOCTYPE html>
<html>
<head>
  <style>
    .image-container {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }
    .image {
      width: 200px;
      height: 150px;
      overflow: hidden;
      position: relative;
      transition: transform 0.3s ease-in-out;
    }
    .image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .image:hover {
      transform: scale(1.1);
    }
    .caption {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      color: white;
      padding: 5px;
      opacity: 0;
      transition: opacity 0.3s ease-in-out;
    }
    .image:hover .caption {
      opacity: 1;
    }
  </style>
</head>
<body>
  <div class="image-container">
    <div class="image">
      <img src="https://shorturl.at/fjsOQ" alt="Image 1">
      <div class="caption">Beautiful Landscape</div>
    </div>
    <div class="image">
      <img src="https://shorturl.at/muvW9" alt="Image 2">
      <div class="caption">City Skyline</div>
    </div>
    <div class="image">
      <img src="https://shorturl.at/bkwBE" alt="Image 3">
      <div class="caption">Sunny Beach</div>
    </div>
  </div>
</body>
</html>
This example creates an image gallery with a hover effect. When you hover over an image, it scales up and reveals a caption. The transition property is used to smoothly animate the scaling and opacity changes.
by Luka Tatarishvili
2 years ago
0
CSS
css
0
SMPP Delivery status format differences between Silknet & Magti
/id:(.*?) submit date:(.*?) done date:(.*?) stat:(.*?) err:(.*)/
The result of the above format is:
7439722864896249924 sub:001 dlvrd:001
/id:(.*?) (?:sub:\d+ dlvrd:\d+ )?submit date:(.*?) done date:(.*?) stat:(.*?) err:(.*)/
The result:
7439722864896249924
by Valeri Tandilashvili
4 months ago
0
PHP
preg_match
SMPP
0
SMPP SMS-Off UTF8 Support CODE
function getString(&$ar, $maxlen = 255, $firstRead = false, $encoding = 3)
{
	$s = "";
	$i = 0;
	$rep = 1;
	if ($encoding == 8) {
		$rep = 2;
	}
	do {
		$c = 0;
		for($rc = 0; $rc < $rep; $rc ++) {
			$c += ($firstRead && $i == 0) ? current($ar) : next($ar);
			$i++;
		}
		if ($encoding == 8) {
            if ($c >= 224 && $c <= 256) {
                $c += 4080;
            }
		}
		if ($c != 0) {
			$s .= mb_chr($c);
		}
	} while ($i < $maxlen && $c != 0);
	
	return $s;
}

$ar = unpack("C*", hex2bin('0001013939353539383235313533340000013930323237000000000000000008004a004800650079002010d010d110d210d310d410d510d610d710d810d910da10db10dc10dd10de10df10e010e110e210e310e410e510e610e710e810e910ea10eb10ec10ed10ee10ef10f00204000200a2'));

$service_type = getString($ar, 6, true); // 6

$source_addr_ton = next($ar); // 7
$source_addr_npi = next($ar); // 8
$source_addr = getString($ar, 21); // 29

$dest_addr_ton = next($ar); // 30
$dest_addr_npi = next($ar);
$destination_addr = getString($ar, 21); // 52

$esmClass = next($ar);
$protocolId = next($ar);
$priorityFlag = next($ar);
next($ar); // schedule_delivery_time
next($ar); // validity_period 
$registeredDelivery = next($ar);
next($ar); // replace_if_present_flag 
$dataCoding = next($ar); // 60
next($ar); // sm_default_msg_id 
$sm_length = next($ar);
$message = getString($ar, $sm_length, false, $dataCoding);

var_dump('encoding: '.$dataCoding, 'length: ' . $sm_length, 'msg:' . $message);
by Valeri Tandilashvili
4 months ago
0
PHP
SMPP
0
Permission problem - composer install/update
1 ./vendor/bin/sail exec laravel.test bash 2 mkdir -p /var/www/html/vendor/setasign 3 chmod -R 777 /var/www/html/vendor 4 chown -R sail:sail /var/www/html/vendor 5 exit 6 ./vendor/bin/sail composer require mpdf/mpdf
by Luka Tatarishvili
5 months ago
0
MySQL
0
Results: 1578