How to have a sliding animation from the bottom to the top with CSS?

I’ve spent the past hour trying to find a way to get a sliding animation from bottom to top using only CSS. It’s supposed to be a test tube with fluid filling it. (This is what I want it to look like), however during the animation it overflows around the edges at the bottom and doesn’t sit flush (like this).

HTML & CSS:

.testTube #border {
  width: 40px;
  height: 150px;
  margin-top: 15px;
  background-color: white;
  border: 2px solid black;
  border-radius: 5px 5px 25px 25px;
  position: absolute;
}

.testTube #fluidLeft {
  width: 20px;
  height: 100px;
  margin-left: 2px;
  background-color: #ff007f;
  border-radius: 0% 0% 0% 25px;
  position: absolute;
  animation-name: fluid;
  animation-direction: normal;
  animation-duration: 3s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.testTube #fluidRight {
  width: 20px;
  height: 0px;
  margin-left: 22px;
  background-color: #ff1a8c;
  border-radius: 0% 0% 25px 0%;
  position: absolute;
  animation-name: fluid;
  animation-direction: normal;
  animation-duration: 3s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes fluid {
  from {
    height: 0px;
    margin-top: 167px;
  }
  to {
    height: 100px;
    margin-top: 67px;
  }
}
<div class="testTube">
  <div id="border"></div>
  <div id="fluidLeft"></div>
  <div id="fluidRight"></div>
</div>

Go to Source
Author: Steven Jamieson

Fade-in Fade-out doesn’t work in WordPress

I have back-to-top script with an arrow icon which appears when scrolling down and disappears when the page content is on top. Works perfect, but when I insert the script in WordPress the scrollTop part of the script works but not the fade-in and fade-out effect.

Any solution?

jQuery('body').prepend('<a href="#" class="back-to-top">Back to Top</a>');
var amountScrolled = 300;
$(window).scroll(function() {
    if ( $(window).scrollTop() > amountScrolled ) {
        $('a.back-to-top').fadeIn('slow');
    } else {
        $('a.back-to-top').fadeOut('slow');
    }
});

$('a.back-to-top, a.simple-back-to-top').click(function() {
    $('html, body').animate({
        scrollTop: 0
    }, 700);
    return false;
});
body {background:#FEF1D4; height:1000px}

.back-to-top {
    display: none;
    width: 4.75rem;
    height: 4.75rem;
    text-indent: -9999px;
    position: fixed;
    z-index: 1500;
    left: 0.5rem;
    bottom: 1rem;
    background: url(https://static.thenounproject.com/png/1920879-200.png) no-repeat center 43%;
    background-size: contain;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

This is the WordPress result:

enter image description here

Go to Source
Author: Danielillo

How to partition hard drive in Ubuntu 20.04

I’m literally brand-new to Linux and Ubuntu, so please forgive my ignorance and bear with me here. I purchased a Dell Inspiron 5593 recently and immediately installed Ubuntu 20.04 on it. Long story short, the keyboard is screwed up, and the place I bought it from won’t service Linux OS. Gotta be Windows/Mac OSX for some stupid reason.

So now I’m trying to partition the hard drive and reinstall Windows on the the partition. I’ve checked out GParted, but I haven’t been able to follow the documentation. For example, I don’t see any unallocated space on my disk, and I’m not willing to unmount my main disk without knowing what that will do to my computer.

Honestly at this point I’m ripping my hair out and would just appreciate some clear instructions on how to partition a hard drive in Ubuntu 20.04 because I’m clearly too technically illiterate to understand GParted’s documentation.

Go to Source
Author: Yehuda

Is it necessary to encrypt a JSON Web Token more than what is built-in?

As a developer I do have some understanding of OWASP, I am also a member of OWASP community, official due paying one. Anyway, what I may not understand is information security in that I am not a security engineer and so I pose the following question:

Is it necessary to encrypt and encode a JSON Web Token?

In my experience, no secure or confidential information should be in a JSON Web Token anyway, outside of the id and email of the user. I can imagine a customer such as a bank freaking out about that, but what can someone do with an email? The password is salted and hashed and also at least in the NodeJS world that is my wheelhouse, JSON Web Token is tamper resistant.

I can verify that a token was valid by using the signing signature and if it fails due to tampering then the services will no longer trust it, that simple no? Why would it be necessary to encrypt it, Encode it And whatever else an overzealous engineer can think of? What problem is it solving or what use case is it handling that is not already built-in? Is it because in other programming languages there are no libraries built-in that can run a jwt.verify() on the JWT?

Could the case described in this post be what the institution is trying to solve?

JWT(Json Web Token) Tampering

Go to Source
Author: Daniel

ssh connection “client_loop: send disconnect: Broken pipe” or “Connection reset by port 22”

I have been using ssh to access remote servers for many months, but recently I haven’t been able to establish a reliable connection. Sometimes I cannot login and get the message “Connection reset by port 22”, when I can login I get the error message “client_loop: send disconnect: Broken pipe” in a few minutes (even if the terminal is not idle).

My ~/.ssh/config file has:

Host *  

     ServerAliveInterval 300
     ServerAliveCountMax 2
     TCPKeepAlive yes

My /etc/ssh/sshd_config file has:

#ClientAliveInterval 300
#ClientAliveCountMax 3

I recently upgraded by xfinity plan to a faster speed and the problem started happening then. But xfinity insists the issue is on my end. Note that my roommate also has the same issue with ssh…

Is there something that I’m missing on my end? Any help would be greatly appreciated!
(I’m running on a Mac)

Go to Source
Author: Ashka Shah

How to use the i command in SQL-Shell?

I’m new to PostgreSQL and I wanted to use or run a specific file on the SQL-Shell on windows but I`m getting some errors of what I think is not making sense from my knowledge.

I ran the following…

i 'C: UsersUsernameDocumentsperson.sql' : No such file or directory

I don`t know why this is not functioning with the quotes and by default this file exists, which I downloaded from a website!

Through my experimentation, I ran the following again without quotes with a different error

i C: UsersUsernameDocumentsperson.sql : Permission denied

I don’t know why it says at first it doesn’t exist but later getting no permission over the file. My question is what is the problem with the following executions and is something wrong with my running?

I looked at this site and saw common problems but it couldn’t help me further!

Thanks!

Go to Source
Author: Gregory

Authoritative DNS for subdomain with dynamic IP

Is it possible to have an authoritative dns server that I host on my server that has a dynamic IP?

I use a dynamic dns client to update my IP with namecheap but want to have a DNS server I control as well. Is it possible for my subdomain ns1.sub.example.com to be on my server?

I would use the dynamic dns client to update ns1.sub.example.com

Update:
Looks like it works.
Dynamic DNS updates A record for main.example.com
NS points to subdomain and the name is the A record main.example.com
all queries are being forwarded to my dns server.

Go to Source
Author: uid500

Is there a way to get multiple share links from Google Drive in order?

I have 100s of files on my Google Drive where the files are sorted by name. All I want is the share link of each file in the order they appear in Google Drive.

I tried selecting all these files inside the folder and then click Share but it doesn’t respect the order of the files as they are displayed.

How can I do this?

Go to Source
Author: Joan Venge

What are the advantages of using AWS nameservers as opposed to servers provided by other registrars?

I am transfering a domain name from namecheap to aws route 53 service. AWS provides you with three options when transfering:

  1. Continue to use the name servers provided by the current registrar or
    DNS service.
  2. Import name servers from a Route 53 hosted zone that has
    the same name as the domain.
  3. Specify new name servers to replace the
    current registrar’s name servers (not recommended)

what is the advantage of using option 2 over the others. What is the difference in pros and cons between the options?

Go to Source
Author: YulePale

How does poker analysis software read the cards from the poker room client? [closed]

I would like to write some poker software similar to PokerTracker and Holdem Manager that will give real time stats during a game of poker, these programs somehow read the current cards being played and player names from the poker client software, I assumed it was from reading the log files from the poker client but when I tried it seems the log files are not updated in realtime, only after each game has completed.

How do they do it?

Go to Source
Author: user2096512

I am completely new to Java 8 and unable to refactor my Java 7 code:

my java 7 code is as below:

List reviewList=new ArrayList<>();

if(!reviewList.isEmpty()  &&  !(reviewList.contains(bookReview.getBookReview().get(0)))) {
    boolean flag=false;

   for(Review review:reviewList)
    {
      if(review.getUserId().equals(bookReview.getBookReview().get(0).getUserId()))
      {
        review.setRating(bookReview.getBookReview().get(0).getRating());
        review.setReviewText(bookReview.getBookReview().get(0).getReviewText());
        review.setBookId(bookReview.getBookReview().get(0).getBookId());
        review.setUserId(bookReview.getBookReview().get(0).getUserId());
        flag=true;
        break;
      }
    }
    if(flag==false)
    {
      reviewList.add(bookReview.getBookReview().get(0));
    }
}

Can anyone please help me

Go to Source
Author: Tanay Rahangdale

How to do left join , same table with different conditions per column

Hi i need information about how to merge both sentences

Sentence 1

select idlote from polizamovtos group by idlote having sum(cargo)-sum(abono) > 0

Sentence 2

SELECT SUM(cargo) as saldo FROM polizamovtos WHERE FECHAMOVTO='2020-01-01' GROUP BY IDLOTE

sentence 1 is the main filter

Hi, I attach more information

table polizamovtos
enter image description here

Output expected

idlote cargo
1 4000
3 4000
4 5000

Go to Source
Author: Sergio Rossetti

logrotate – file owner issue

I want to rotate the syslog for testing.

sudo logrotate -f /var/log/syslog
[sudo] password for stephen: 
error: Ignoring /var/log/syslog because the file owner is wrong (should be root or user with uid 0).

Owner is like this :

ll /var/log/syslog
-rw-r----- 1 syslog adm 268K 2020-08-01 08:39 /var/log/syslog

Okay but let’s try with a root shell.

#echo $UID
0
#logrotate -f /var/log/syslog
error: Ignoring /var/log/syslog because the file owner is wrong (should be root or user with uid 0).

Where is the error? What is the workaround?

Go to Source
Author: Stephen Boston

Arch Linux – Boot stucked after installing SDDM on amd laptop

newbie here, after installing SDDM booting is stuck at: Starting version 245.7-1-arch.When i boot without quiet parameter it’s stuck on Finished| Load/Save random seed.

When i boot with loglevel=7 no errors show after Load/Save random seed line.

I tried – reinstalling sddm, plasma. Installing rng-tools, haveged

UPDATE: Running sddm-greeter returns: GREETER: Could not load the Qt platform plugin “xcb” in “” even though it was found

Go to Source
Author: Lukáš Starinský

Traefik HTTPS ingress for application outside of cluster

I have an application that runs in it’s own vm on the same bare metal server. I also have a k8s setup which runs multiple applications behind traefik. I want to use the k8s traefik to reverse proxy the application running on the VM? Is that possible?

It looks like I can define a service which points to the IP address but it’s not recommended, instead it points to headless services but this doesn’t seem like it’ll work.

Go to Source
Author: digital