|
|
Hi John,
I've not done this on a pi but I have on a similar sbc.
First off you need the dotnet sdk and runtimes installed ( plenty of info on Google )
Get the applications ( api, websites or whatever ) working under dotnet first ( dotnet run ) before involving docker.
Install docker.io and docker-compose.
I can post a Dockerfile and docker-compose.yml file on here which with very little modifications would dockerize your programs
Let me know if you want them
"Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Hello, I am searching a developer or teams to do several customisation on my company's website. I need to update some features, Create a custom, holiday-themed logo and new banner advertisements . Needless to say the person should be a professional that is reliable and keeps me up to date regarding the projects.
|
|
|
|
|
This is not a code-by-request site: If you want someone to write your code, you have to pay - I suggest you go to Freelancer.com and ask there.
But be aware: you get what you pay for. Pay peanuts, get monkeys.
The idea of "development" is as the word suggests: "The systematic use of scientific and technical knowledge to meet specific objectives or requirements." BusinessDictionary.com[^]
That's not the same thing as "have a quick google and give up if I can't find exactly the right code".
So either pay someone to do it, or learn how to write it yourself. We aren't here to do it for you.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I'm having a helluva time setting a background image. In the firefox dev console, I get this:
The image “https://localhost:44306/Images/banner_background2.jpg” cannot be displayed because it contains errors.
I'm using the bootstrap jumbotron and overriding that class to my site.css file, and it can't seem to find the image I'm specifying. Since it was in the css file, I couldn't use url.Content .
I also tried setting the style in the div, but that doesn't seem to be working either.
This is what I have right now (in Index.cshtml):
<div class="jumbotron" style="border-radius:0.75rem; background:no-repeat url('../Images/banner_background.jpg');">
... some content
</div>
Intellisense guided me to the image file, so I don't understand what I'm doing wrong. The div is about 250px tall. I've tried to use quotes around the filename, and no quotes, and I've also tried to use a tilde instead of ../ .
Just for grins, I tried opening the image with firefox from windows explorer, and it opens fine.
EDIT===============================================
It turns out that for an ASP.Net Core web app, images have to be placed into a folder in the wwwroot directory. That's the only way I could get it to work... WTF?
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
modified 2-Nov-21 10:00am.
|
|
|
|
|
Hey there!!!
Im trying to attach image upload to bootstrap card(home.php) as well place the image in gallery(gallery.php). When I hit submit Im taken to a blank page instead of seeing image displayed on home page. Here is my code:
```
<div class="modal-body">
<form action="upcontent.php" method="post" enctype="multipart/form-data">
Upload Image
<input type="file" name="image" id="image">
<div>
<textarea name="comments" id="comments" style="font-family:sans-serif;font-size:1.2em;">
</textarea>
</div>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<input type="submit" value="Submit" name="submit">
</form>
<div class="row row-cols-1 row-cols-md-2 g-4">
<?php
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$mysqli = new mysqli("'');
$query = "SELECT username,comment,image FROM tbl_member ORDER BY ID DESC";
$result = $mysqli->query($query);
// Loop thru comments and display all of them
while($row = $result->fetch_array(MYSQLI_ASSOC) ) {
printf("%s (%s)\n", $row["username"], $row["comment"],$row["image"]);
?>
<div class="col">
<a href="pro.php">
<div class="card">
<img src="<?php echo $fetch['location']?>" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title"><?php echo $row["username"];?></h5>
<p class="card-text"><?php echo $row["comment"];?></p>
</div>
</div>
</a>
</div>
</div>
<?PHP
}
?>
```
```
<?php
require_once 'conn.php';
if(ISSET($_POST['upload'])){
$image_name = $_FILES['image']['name'];
$image_temp = $_FILES['image']['tmp_name'];
$image_size = $_FILES['image']['size'];
$ext = explode(".", $image_name);
$end = end($ext);
$allowed_ext = array("jpg", "jpeg", "gif", "png");
$name = time().".".$end;
$path = "img/".$name;
if(in_array($end, $allowed_ext)){
if($image_size > 5242880){
echo "<script>alert('File too large!')</script>";
echo "<script>window.location = 'home.php'</script>";
}else{
if(move_uploaded_file($image_temp, $path)){
mysqli_query($conn, "INSERT INTO `image` VALUES('', '$name', '$path')") or die(mysqli_error());
echo "<script>alert('Image uploaded!')</script>";
echo "<script>window.location = 'home.php'</script>";
}
}
}else{
echo "<script>alert('Invalid image format!')</script>";
echo "<script>window.location = 'home.php'</script>";
echo "<script>window.location = 'gallery.php'</script>";
}
}
?>
```
Thank ya
|
|
|
|
|
|
$mysqli = new mysqli("'');
This will cause issues if it is not just a typo on your question.
"Five fruits and vegetables a day? What a joke!
Personally, after the third watermelon, I'm full."
|
|
|
|
|
Hey all ;)
I took on an already made script for image gallery..goal is to have images uploaded within home page form a gallery for the user( think of FB..each member has their own pic gallery created from what was uploaded either on the dash or profile page). Again I want to make sure the images uploaed from the dropdown button not only shows up underneath on the home page but on image gallery page.
Thank ya :)
File upload code from Home page:
```
<div class="dropdown">
<button onclick="myFunction()" class="dropbtn">Upload Photo/Text</button>
<div id="myDropdown" class="dropdown-content">
<form action="upcontent.php" method="post" enctype="multipart/form-data">
<input type="file" name="fileToUpload" id="fileToUpload">
<br><br>
Words: <textarea name="comment" rows="5" cols="40"><?php echo $comment;?></textarea>
<input type="submit" value="Submit" name="submit">
</form>
</div>
</div>
```
Code from gallery page
```
<div class='container'>
<div class="gallery">
<?php
$image_extensions = array("png","jpg","jpeg","gif");
$dir = 'img/';
if (is_dir($dir)){
if ($dh = opendir($dir)){
$count = 1;
while (($file = readdir($dh)) !== false){
if($file != '' && $file != '.' && $file != '..'){
$thumbnail_path = "img/thumbnail/".$file;
$image_path = "img/".$file;
$thumbnail_ext = pathinfo($thumbnail_path, PATHINFO_EXTENSION);
$image_ext = pathinfo($image_path, PATHINFO_EXTENSION);
if(!is_dir($image_path) &&
in_array($thumbnail_ext,$image_extensions) &&
in_array($image_ext,$image_extensions)){
?>
<!-- Image -->
<a href="<?php echo $image_path; ?>">
<img src="<?php echo $thumbnail_path; ?>" alt="" title=""/>
</a>
<!-- --- -->
<?php
if( $count%4 == 0){
?>
<div class="clear"></div>
<?php
}
$count++;
}
}
}
closedir($dh);
}
}
?>
</div>
</div>
```
|
|
|
|
|
Give me some tips to build a perfect mobile application and find the best way.
|
|
|
|
|
Start with an idea. Then you are well on your way.
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
I have an existing WPF app with a BL and DAL all written in .Net 4.5.2,
I'm now trying to call the DAL from a new Asp.Net Core 5.0 Web API. I pass through the Controller into the BL fine, but when I hit the line that calls into the DAL it throws
System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.'
System.Data.Linq isn't in the WPF app's bin folder because it's a .net assembly. I tried copying it into the Web API's Bin folder but that didn't work.
Is there some problem with me calling a .Net 5 Core Wab API from a WPF app?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
As far as I know, no, you cannot use a .NET Framework 4.5.2 .DLL in a .NET Core 5 app.
You could migrate the 4.5.2 code to .NET Standard 2, then you could use it in both Framework and Core apps, but this solution is not ideal.
You best solution would be to migrate your WPF and libraries to .NET Core 5.
|
|
|
|
|
Wow, that $ucks.
The end goal is to stand up an API so I can hit it from both the WPF app and a Xamarin Forms app. I could still do this using a .Net Framework Web API.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
I'm convinced that Core is a steaming pile of shit. But that's just me.
Now, instead of having one common assembly, I have to have two - one for framework, and one for whore core, which defeats the purpose of having a common library.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
#realJSOP wrote: Now, instead of having one common assembly, I have to have two
Or have one that targets .NET Standard 2.0, which should generally work in .NET Framework 4.7.2 or later, .NET Core 2.0 or later, and .NET 5/6/etc.
.NET Standard | Microsoft Docs[^]
And if you really need to use features which aren't available in .NET Standard, you can target multiple frameworks in a single project[^] (so long as it's a new "SDK"-style project). It's a PITA, but it works.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I just need to get an API up & running. I have no reason to target .Net Core, so .Net Framework would be fine.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
|
I could stand up a .Net Core API using a new DAL with EF and slowly port things over.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Instead of doing all that, just roll your own DAL and do either sql queries or stored procs to get/put data. You have much more control in a smaller package without having to understand or deal with how Microsoft thinks the world of database access should work.
Generally speaking all ORM tools are garbage.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I'm working on an ASP.Net Web API.
I found this article. It seems pretty straightforward, but it's a few years old. Is this still the way to secure a Web API? If not, can someone point me in the right direction?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
You could set up a table in your database that contains authorization data (like an GUID that serves as an api key, and even further, api method name(s) that can be used by the key.
You'd have to manually maintain the table unless you took the time to write a tool to assist you.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Thanks!
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
i have add elements to navbar app.blade view after login
Link 1 link 2 link 3 --------------------User<>
|
|
|
|
|
I'm trying to set up a Web API and connect to it from a Xamarin Forms app. The API works, but the Xamarin Forms app wants the Web API to HTTPS.
So, I created a Self-Signed cert in IIS and installed my Web API using HTTPS and that cert.
When I click Browse in IIS, I get
There is a problem with this website’s security certificate.
The security certificate presented by this website was issued for a different website's address.
I click Continue and everything seems fine, and I can hit the API with Postman.
But when I try to hit it from my Xamarin Forms app, I get
Javax.Net.Ssl.SSLHandshakeException:
'java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.'
I'm out of my league here. I really know nothing about certs and setting up HTTPS. Can someone help a blind man?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|