Wiley  Mayer

Wiley Mayer

1600477200

How Much Should I Charge: Knowing Your Value

Getting your freelance or consulting web development business off the ground is tough. I know because I’m going through it firsthand as I start a side web development gig.

How much do websites cost?

This is the $1 million dollar question.

Offer cut-rate prices and you’ll attract bargain hunting customers who are more focused on cost than the value you’re bringing. Set the rates too high and without a portfolio or network to acquire clients and you’re left waiting for the phone to ring.

Searching the internet for the price of a website, you’ll find that cost can vary tremendously based on what the client is looking for and on the experience of the freelancer or web design firm.

#money #freelancing #consulting #web-development

What is GEEK

Buddha Community

How Much Should I Charge: Knowing Your Value

So erkennen Sie den Batteriestatus mit HTML, CSS und JavaScript

In dieser Anleitung lernen wir, wie man den Batteriestatus mit HTML, CSS & JavaScript erkennt. Um den Batteriestatus mit HTML, CSS & JavaScript zu erkennen. Sie müssen drei Dateien HTML, CSS & JavaScript erstellen 

1: Erstellen Sie zunächst eine HTML-Datei

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Detect Battery Status</title>
    <!-- Google Fonts -->
    <link
      href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500&display=swap"
      rel="stylesheet"
    />
    <!-- Stylesheet -->
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <div class="container">
      <div id="battery">
        <div id="charge"></div>
        <div id="charge-level"></div>
      </div>
      <div id="charging-time"></div>
    </div>
    <script src="script.js"></script>
  </body>
</html>

 

2: Erstellen Sie zweitens eine CSS-Datei

 

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Roboto Mono", monospace;
}
.container {
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
}
#battery {
  box-sizing: content-box;
  height: 7.8em;
  width: 17.5em;
  border: 0.6em solid #246aed;
  margin: auto;
  border-radius: 0.6em;
  position: relative;
  display: grid;
  place-items: center;
}
#battery:before {
  position: absolute;
  content: "";
  height: 5em;
  width: 1.1em;
  background-color: #246aed;
  margin: auto;
  top: 0;
  bottom: 0;
  right: -1.6em;
  border-radius: 0 0.3em 0.3em 0;
}
#charge {
  position: absolute;
  height: 6.5em;
  width: 16.25em;
  background-color: #246aed;
  top: 0.6em;
  left: 0.6em;
}
#charge-level {
  position: absolute;
  font-size: 3em;
  font-weight: 500;
}
#charging-time {
  text-align: center;
  font-size: 1.7em;
  margin-top: 1.4em;
}
.active {
  animation: charge-animation 3s infinite linear;
}
@keyframes charge-animation {
  0% {
    width: 0;
  }
  100% {
    width: 16.25em;
  }
}

 

3: Zuletzt erstellen Sie eine JavaScript-Datei

 

const chargeLevel = document.getElementById("charge-level");
const charge = document.getElementById("charge");
const chargingTimeRef = document.getElementById("charging-time");

window.onload = () => {
  //For browsers that don't support the battery status API
  if (!navigator.getBattery) {
    alert("Battery Status Api Is Not Supported In Your Browser");
    return false;
  }
};

navigator.getBattery().then((battery) => {
  function updateAllBatteryInfo() {
    updateChargingInfo();
    updateLevelInfo();
  }
  updateAllBatteryInfo();

  //When the charging status changes
  battery.addEventListener("chargingchange", () => {
    updateAllBatteryInfo();
  });

  //When the Battery Levvel Changes
  battery.addEventListener("levelchange", () => {
    updateAllBatteryInfo();
  });

  function updateChargingInfo() {
    if (battery.charging) {
      charge.classList.add("active");
      chargingTimeRef.innerText = "";
    } else {
      charge.classList.remove("active");

      //Display time left to discharge only when it is a integer value i.e not infinity
      if (parseInt(battery.dischargingTime)) {
        let hr = parseInt(battery.dischargingTime / 3600);
        let min = parseInt(battery.dischargingTime / 60 - hr * 60);
        chargingTimeRef.innerText = `${hr}hr ${min}mins remaining`;
      }
    }
  }

  //Updating battery level
  function updateLevelInfo() {
    let batteryLevel = `${parseInt(battery.level * 100)}%`;
    charge.style.width = batteryLevel;
    chargeLevel.textContent = batteryLevel;
  }
});

Sie haben jetzt erfolgreich eine Batteriezustandserkennungs-App mit HTML, CSS und JavaScript erstellt

Как определить состояние батареи с помощью HTML, CSS и JavaScript

В этом руководстве мы узнаем, как определить состояние батареи с помощью HTML, CSS и JavaScript. Чтобы определить состояние батареи с помощью HTML, CSS и JavaScript. Вам нужно создать три файла HTML, CSS и JavaScript 

1: Сначала создайте файл HTML

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Detect Battery Status</title>
    <!-- Google Fonts -->
    <link
      href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500&display=swap"
      rel="stylesheet"
    />
    <!-- Stylesheet -->
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <div class="container">
      <div id="battery">
        <div id="charge"></div>
        <div id="charge-level"></div>
      </div>
      <div id="charging-time"></div>
    </div>
    <script src="script.js"></script>
  </body>
</html>

 

2: Во-вторых, создайте файл CSS

 

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Roboto Mono", monospace;
}
.container {
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
}
#battery {
  box-sizing: content-box;
  height: 7.8em;
  width: 17.5em;
  border: 0.6em solid #246aed;
  margin: auto;
  border-radius: 0.6em;
  position: relative;
  display: grid;
  place-items: center;
}
#battery:before {
  position: absolute;
  content: "";
  height: 5em;
  width: 1.1em;
  background-color: #246aed;
  margin: auto;
  top: 0;
  bottom: 0;
  right: -1.6em;
  border-radius: 0 0.3em 0.3em 0;
}
#charge {
  position: absolute;
  height: 6.5em;
  width: 16.25em;
  background-color: #246aed;
  top: 0.6em;
  left: 0.6em;
}
#charge-level {
  position: absolute;
  font-size: 3em;
  font-weight: 500;
}
#charging-time {
  text-align: center;
  font-size: 1.7em;
  margin-top: 1.4em;
}
.active {
  animation: charge-animation 3s infinite linear;
}
@keyframes charge-animation {
  0% {
    width: 0;
  }
  100% {
    width: 16.25em;
  }
}

 

3: Наконец, создайте файл JavaScript

 

const chargeLevel = document.getElementById("charge-level");
const charge = document.getElementById("charge");
const chargingTimeRef = document.getElementById("charging-time");

window.onload = () => {
  //For browsers that don't support the battery status API
  if (!navigator.getBattery) {
    alert("Battery Status Api Is Not Supported In Your Browser");
    return false;
  }
};

navigator.getBattery().then((battery) => {
  function updateAllBatteryInfo() {
    updateChargingInfo();
    updateLevelInfo();
  }
  updateAllBatteryInfo();

  //When the charging status changes
  battery.addEventListener("chargingchange", () => {
    updateAllBatteryInfo();
  });

  //When the Battery Levvel Changes
  battery.addEventListener("levelchange", () => {
    updateAllBatteryInfo();
  });

  function updateChargingInfo() {
    if (battery.charging) {
      charge.classList.add("active");
      chargingTimeRef.innerText = "";
    } else {
      charge.classList.remove("active");

      //Display time left to discharge only when it is a integer value i.e not infinity
      if (parseInt(battery.dischargingTime)) {
        let hr = parseInt(battery.dischargingTime / 3600);
        let min = parseInt(battery.dischargingTime / 60 - hr * 60);
        chargingTimeRef.innerText = `${hr}hr ${min}mins remaining`;
      }
    }
  }

  //Updating battery level
  function updateLevelInfo() {
    let batteryLevel = `${parseInt(battery.level * 100)}%`;
    charge.style.width = batteryLevel;
    chargeLevel.textContent = batteryLevel;
  }
});

Вы успешно создали приложение для определения состояния батареи с использованием HTML, CSS и JavaScript.

Como detectar o status da bateria com HTML, CSS e JavaScript

Neste guia, aprenderemos como detectar o status da bateria com HTML, CSS e JavaScript. Para detectar o status da bateria com HTML, CSS e JavaScript. Você precisa criar três arquivos HTML, CSS e JavaScript 

1: Primeiro, crie um arquivo HTML

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Detect Battery Status</title>
    <!-- Google Fonts -->
    <link
      href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500&display=swap"
      rel="stylesheet"
    />
    <!-- Stylesheet -->
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <div class="container">
      <div id="battery">
        <div id="charge"></div>
        <div id="charge-level"></div>
      </div>
      <div id="charging-time"></div>
    </div>
    <script src="script.js"></script>
  </body>
</html>

 

2: Em segundo lugar, crie um arquivo CSS

 

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Roboto Mono", monospace;
}
.container {
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
}
#battery {
  box-sizing: content-box;
  height: 7.8em;
  width: 17.5em;
  border: 0.6em solid #246aed;
  margin: auto;
  border-radius: 0.6em;
  position: relative;
  display: grid;
  place-items: center;
}
#battery:before {
  position: absolute;
  content: "";
  height: 5em;
  width: 1.1em;
  background-color: #246aed;
  margin: auto;
  top: 0;
  bottom: 0;
  right: -1.6em;
  border-radius: 0 0.3em 0.3em 0;
}
#charge {
  position: absolute;
  height: 6.5em;
  width: 16.25em;
  background-color: #246aed;
  top: 0.6em;
  left: 0.6em;
}
#charge-level {
  position: absolute;
  font-size: 3em;
  font-weight: 500;
}
#charging-time {
  text-align: center;
  font-size: 1.7em;
  margin-top: 1.4em;
}
.active {
  animation: charge-animation 3s infinite linear;
}
@keyframes charge-animation {
  0% {
    width: 0;
  }
  100% {
    width: 16.25em;
  }
}

 

3: Por último, crie um arquivo JavaScript

 

const chargeLevel = document.getElementById("charge-level");
const charge = document.getElementById("charge");
const chargingTimeRef = document.getElementById("charging-time");

window.onload = () => {
  //For browsers that don't support the battery status API
  if (!navigator.getBattery) {
    alert("Battery Status Api Is Not Supported In Your Browser");
    return false;
  }
};

navigator.getBattery().then((battery) => {
  function updateAllBatteryInfo() {
    updateChargingInfo();
    updateLevelInfo();
  }
  updateAllBatteryInfo();

  //When the charging status changes
  battery.addEventListener("chargingchange", () => {
    updateAllBatteryInfo();
  });

  //When the Battery Levvel Changes
  battery.addEventListener("levelchange", () => {
    updateAllBatteryInfo();
  });

  function updateChargingInfo() {
    if (battery.charging) {
      charge.classList.add("active");
      chargingTimeRef.innerText = "";
    } else {
      charge.classList.remove("active");

      //Display time left to discharge only when it is a integer value i.e not infinity
      if (parseInt(battery.dischargingTime)) {
        let hr = parseInt(battery.dischargingTime / 3600);
        let min = parseInt(battery.dischargingTime / 60 - hr * 60);
        chargingTimeRef.innerText = `${hr}hr ${min}mins remaining`;
      }
    }
  }

  //Updating battery level
  function updateLevelInfo() {
    let batteryLevel = `${parseInt(battery.level * 100)}%`;
    charge.style.width = batteryLevel;
    chargeLevel.textContent = batteryLevel;
  }
});

Você criou com sucesso um aplicativo de detecção de integridade da bateria usando HTML, CSS e JavaScript

Duck Hwan

1656582263

HTML, CSS 및 JavaScript로 배터리 상태를 감지하는 방법

이 가이드에서는 HTML, CSS 및 JavaScript를 사용하여 배터리 상태를 감지하는 방법을 배웁니다. HTML, CSS 및 JavaScript로 배터리 상태를 감지합니다. HTML, CSS, JavaScript 3개의 파일을 생성해야 합니다. 

1: 먼저 HTML 파일을 만듭니다.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Detect Battery Status</title>
    <!-- Google Fonts -->
    <link
      href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500&display=swap"
      rel="stylesheet"
    />
    <!-- Stylesheet -->
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <div class="container">
      <div id="battery">
        <div id="charge"></div>
        <div id="charge-level"></div>
      </div>
      <div id="charging-time"></div>
    </div>
    <script src="script.js"></script>
  </body>
</html>

 

2: 둘째, CSS 파일 생성

 

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Roboto Mono", monospace;
}
.container {
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
}
#battery {
  box-sizing: content-box;
  height: 7.8em;
  width: 17.5em;
  border: 0.6em solid #246aed;
  margin: auto;
  border-radius: 0.6em;
  position: relative;
  display: grid;
  place-items: center;
}
#battery:before {
  position: absolute;
  content: "";
  height: 5em;
  width: 1.1em;
  background-color: #246aed;
  margin: auto;
  top: 0;
  bottom: 0;
  right: -1.6em;
  border-radius: 0 0.3em 0.3em 0;
}
#charge {
  position: absolute;
  height: 6.5em;
  width: 16.25em;
  background-color: #246aed;
  top: 0.6em;
  left: 0.6em;
}
#charge-level {
  position: absolute;
  font-size: 3em;
  font-weight: 500;
}
#charging-time {
  text-align: center;
  font-size: 1.7em;
  margin-top: 1.4em;
}
.active {
  animation: charge-animation 3s infinite linear;
}
@keyframes charge-animation {
  0% {
    width: 0;
  }
  100% {
    width: 16.25em;
  }
}

 

3: 마지막으로 JavaScript 파일 생성

 

const chargeLevel = document.getElementById("charge-level");
const charge = document.getElementById("charge");
const chargingTimeRef = document.getElementById("charging-time");

window.onload = () => {
  //For browsers that don't support the battery status API
  if (!navigator.getBattery) {
    alert("Battery Status Api Is Not Supported In Your Browser");
    return false;
  }
};

navigator.getBattery().then((battery) => {
  function updateAllBatteryInfo() {
    updateChargingInfo();
    updateLevelInfo();
  }
  updateAllBatteryInfo();

  //When the charging status changes
  battery.addEventListener("chargingchange", () => {
    updateAllBatteryInfo();
  });

  //When the Battery Levvel Changes
  battery.addEventListener("levelchange", () => {
    updateAllBatteryInfo();
  });

  function updateChargingInfo() {
    if (battery.charging) {
      charge.classList.add("active");
      chargingTimeRef.innerText = "";
    } else {
      charge.classList.remove("active");

      //Display time left to discharge only when it is a integer value i.e not infinity
      if (parseInt(battery.dischargingTime)) {
        let hr = parseInt(battery.dischargingTime / 3600);
        let min = parseInt(battery.dischargingTime / 60 - hr * 60);
        chargingTimeRef.innerText = `${hr}hr ${min}mins remaining`;
      }
    }
  }

  //Updating battery level
  function updateLevelInfo() {
    let batteryLevel = `${parseInt(battery.level * 100)}%`;
    charge.style.width = batteryLevel;
    chargeLevel.textContent = batteryLevel;
  }
});

이제 HTML, CSS 및 JavaScript를 사용하여 배터리 상태 감지 앱을 성공적으로 만들었습니다.

Comment détecter l'état de la batterie avec HTML, CSS et JavaScript

Dans ce guide, nous apprendrons comment détecter l'état de la batterie avec HTML, CSS et JavaScript. Pour détecter l'état de la batterie avec HTML, CSS et JavaScript. Vous devez créer trois fichiers HTML, CSS et JavaScript 

1 : Tout d'abord, créez un fichier HTML

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Detect Battery Status</title>
    <!-- Google Fonts -->
    <link
      href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500&display=swap"
      rel="stylesheet"
    />
    <!-- Stylesheet -->
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <div class="container">
      <div id="battery">
        <div id="charge"></div>
        <div id="charge-level"></div>
      </div>
      <div id="charging-time"></div>
    </div>
    <script src="script.js"></script>
  </body>
</html>

 

2 : Deuxièmement, créez un fichier CSS

 

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Roboto Mono", monospace;
}
.container {
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
}
#battery {
  box-sizing: content-box;
  height: 7.8em;
  width: 17.5em;
  border: 0.6em solid #246aed;
  margin: auto;
  border-radius: 0.6em;
  position: relative;
  display: grid;
  place-items: center;
}
#battery:before {
  position: absolute;
  content: "";
  height: 5em;
  width: 1.1em;
  background-color: #246aed;
  margin: auto;
  top: 0;
  bottom: 0;
  right: -1.6em;
  border-radius: 0 0.3em 0.3em 0;
}
#charge {
  position: absolute;
  height: 6.5em;
  width: 16.25em;
  background-color: #246aed;
  top: 0.6em;
  left: 0.6em;
}
#charge-level {
  position: absolute;
  font-size: 3em;
  font-weight: 500;
}
#charging-time {
  text-align: center;
  font-size: 1.7em;
  margin-top: 1.4em;
}
.active {
  animation: charge-animation 3s infinite linear;
}
@keyframes charge-animation {
  0% {
    width: 0;
  }
  100% {
    width: 16.25em;
  }
}

 

3 : Enfin, créez un fichier JavaScript

 

const chargeLevel = document.getElementById("charge-level");
const charge = document.getElementById("charge");
const chargingTimeRef = document.getElementById("charging-time");

window.onload = () => {
  //For browsers that don't support the battery status API
  if (!navigator.getBattery) {
    alert("Battery Status Api Is Not Supported In Your Browser");
    return false;
  }
};

navigator.getBattery().then((battery) => {
  function updateAllBatteryInfo() {
    updateChargingInfo();
    updateLevelInfo();
  }
  updateAllBatteryInfo();

  //When the charging status changes
  battery.addEventListener("chargingchange", () => {
    updateAllBatteryInfo();
  });

  //When the Battery Levvel Changes
  battery.addEventListener("levelchange", () => {
    updateAllBatteryInfo();
  });

  function updateChargingInfo() {
    if (battery.charging) {
      charge.classList.add("active");
      chargingTimeRef.innerText = "";
    } else {
      charge.classList.remove("active");

      //Display time left to discharge only when it is a integer value i.e not infinity
      if (parseInt(battery.dischargingTime)) {
        let hr = parseInt(battery.dischargingTime / 3600);
        let min = parseInt(battery.dischargingTime / 60 - hr * 60);
        chargingTimeRef.innerText = `${hr}hr ${min}mins remaining`;
      }
    }
  }

  //Updating battery level
  function updateLevelInfo() {
    let batteryLevel = `${parseInt(battery.level * 100)}%`;
    charge.style.width = batteryLevel;
    chargeLevel.textContent = batteryLevel;
  }
});

Vous avez maintenant créé avec succès une application de détection de la santé de la batterie en utilisant HTML, CSS et JavaScript