The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.
Hello,
Hi, as a senior react developer, I am looking for a new job opportunity.
Here are my skills and experiences.
Thanks
Hello devs pls I'll like to ask 'React' question I hope it's not an issue seeing that this a bootstrap room..
I get this error in my react app: ErrorOverlay.setEditor Handler is not a function at ./node_modules/react-dev-utils/webpackHotDevClient.js
What does this mean?
Could anyone help me with this?
sorry i'am beginner with react.
Hello,
We are senior IT Engineers. Please check at https://itdevs.wixsite.com/greate-it-solution
We have developed dozens of projects.
We strictly ensure qualification of our product and am always faithful to customer service.
We are very punctual and We have a good communication skills
Thanks
I'm new to Bootstrap, I've gone through various tutorials and really like what it offers.
One think i'm not grasping to well, is how to make the actual api call?
I have created and api in Go and now I want to start to send requests to it but I'm not finding allot of material on how exactly to do so, could you please point me towards a concrete example??
What I have now is I just created my own javascript file and I'm using the fetch api to do the actual call, I'm pretty sure there is an easier way to achieve this!
const createGlassBox = document.getElementById('createGlassBox');
if (createGlassBox) {
createGlassBox.addEventListener('submit', event => {
console.log("---createGlassBox---");
event.preventDefault();
var glassBoxId = document.getElementById('glassBoxId').value;
var localName = document.getElementById('localName').value;
var glassBoxData = document.getElementById('glassBoxData').value;
console.log("glassBoxId: ", glassBoxId);
console.log("localName: ", localName);
console.log("glassBoxData: ", glassBoxData);
var path = 'inventory/glassbox/' + glassBoxId + '/' + localName;
//const payload = { name: glassBoxId, localName: projectDescription };
//console.log("payload: ", payload);
//console.log("path: ", path)
const createGlassBoxResponse = apiCall("POST", path, glassBoxData, false);
console.log("createGlassBoxResponse: ", createGlassBoxResponse);
});
}
const apiCall = async (method, path, payload, isJson) => {
//preventDefault();
var url = 'http://127.0.0.1:8080/' + path
contentType = isJson ? 'application/json' : 'text/plain'
let options = {
//credentials: 'omit',
method,
headers: {
//'Content-Type': 'application/json',
'Content-Type': contentType,
//'Accept': 'application/json',
'Authorization': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6Im5ldyB1c2VybmFtZTIiLCJlbWFpbCI6InRvbW1pQGxhdXJhLm5ldCIsImV4cCI6MTY3MDM2Nzg4MH0.7QAO-KhjESRbHWSM6g8NL2_fXFTssI7LCDnRAuGvr28'
},
};
if ( method === 'POST' ) {
//url += '?' + ( new URLSearchParams( params ) ).toString();
//options.body = JSON.stringify( payload );
options.body = isJson ? JSON.stringify(payload) : payload;
}
console.log("options: ", options);
await fetch(url, options)
.then((response) => response.json())
.then((data) => {
console.log('Success:', data);
})
.catch((error) => {
console.error('Error:', error);
});
}
<?php
session_start();
// controllo della variabile di sessione
if (isset($_SESSION['post_added']) && $_SESSION['post_added']):
$robo = $_SESSION['email'];
?>
<div class="alert alert-primary mt-3 bg-dark" role="alert" id="alert-id">
<span class="closebtn" onclick="this.parentElement.style.display='none';">×</span>
Postato con successo!
</div>
<script>
$(document).ready(function() {
$(".dropdown-toggle").dropdown();
});
setTimeout(function() {
document.getElementById("alert-id").style.display = "none";
}, 3000);
</script>
<?php unset($_SESSION['post_added']); ?>
<?php endif; ?>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script type="text/javascript" src="style.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Forum" />
<link href="https://fonts.cdnfonts.com/css/oi" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js" integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.min.js" integrity="sha384-mQ93GR66B00ZXjt0YO5KlohRA5SY2XofN4zfuZxLkoj1gXtW8ANNCe9d5Y3eG5eD" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">JJ</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav me-auto">
<li class="nav-item active">
<a class="nav-link" href="index.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="inserisci_articolo.php">Scrivi</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contatti.php">Contatti</a>
</li>
<li class="nav-item">
<a class="nav-link" href="info.php">Info</a>
</li>
</ul>
<div class="d-flex">
<?php
if(empty($_SESSION['email'])){
echo "<a href='login.php' class='btn btn-secondary'>ACCEDI</a>";
}else{
echo "<p2 class='me-2 mt-2' style='color: rgba(255, 255, 255, 0.55);'>Benvenuto "."<span3 style='color:#fff'>".$_SESSION['email']."</span3>"."</p2>";
echo "<a href='logout.php' class='btn btn-secondary me-3'>LOGOUT</a>";
}
?>
</div>
</div>
</nav>
</head>
<body style='background: black;'>
<?php
// connessione al database
$host = 'localhost';
$user = 'my_thatjoe';
$password = '';
$dbname = 'my_thatjoe';
$conn = mysqli_connect($host, $user, $password, $dbname);
if (!$conn) {
die('Errore di connessione: ' . mysqli_connect_error());
}
// seleziona tutti gli articoli del blog
$query = "SELECT * FROM articles ORDER BY created_at DESC";
$result = mysqli_query($conn, $query);
if (mysqli_num_rows($result) > 0) {
while($row = mysqli_fetch_assoc($result)) {
$title = $row['title'];
$body = $row['body'];
$author = $row['author'];
$created_at = $row['created_at'];
$img = $row['pfp'];
// visualizza l'articolo
echo "<div class='box'>";
echo "<div class='row'>";
echo "<div class='col-2'>";
echo "</div>";
echo "<div class='col'>";
const positionElements = (elements, startDate, endDate) => {
// Get the width of the container element
const containerWidth = document.getElementById("container").offsetWidth;
// Calculate the number of days between the start and end dates
const totalDays = (endDate - startDate) / (1000 * 60 * 60 * 24);
// Higher-order function to calculate width and left position
const calculatePosition = (start, end) => {
const width = (end - start) / (1000 * 60 * 60 * 24) / totalDays * 100;
const left = (start - startDate) / (1000 * 60 * 60 * 24) / totalDays * 100;
return { width, left };
}
// Use map() to apply calculatePosition to each element
const elementPositions = elements.map(element => {
const { startDate, endDate } = element;
return calculatePosition(new Date(startDate), new Date(endDate));
});
// Use forEach() to set the style properties of each element
elementPositions.forEach((position, index) => {
elements[index].style.width = position.width + "%";
elements[index].style.left = position.left + "%";
});
}
Hello Everyone
I am new to open source contribution.
I already know java , my tech stacks & tools includes C, C++ , Python , Java, JavaScript , HTML , CSS , SQL , Bootstrap, ReactJS, ExpressJS, NodeJS & Git . I need a little help from your side to contribute to these amazing projects.
I need advice and help
Currently I am Final Year of my Engineering
_