Kouhai
Kouhai
CC#
Created by Al3mid3x on 6/27/2024 in #help
✅ NullReferenceException for a array of bytes (image)
// GET: Products/Create
public IActionResult Create()
{
return View(new Product());
}
// GET: Products/Create
public IActionResult Create()
{
return View(new Product());
}
Should do the trick
14 replies
CC#
Created by Al3mid3x on 6/27/2024 in #help
✅ NullReferenceException for a array of bytes (image)
You need to provide a model instance to the view
14 replies
CC#
Created by Servant of Time on 6/14/2024 in #help
✅ Jittery CSS pan animation
We are all code monkeys aren't we :XD: And yeah having the background be absolute allows it to fill the parent div, though I guess it could be easier to do with flex
<div id="parent">
<div id="content">
<p></p>
<div class="hide-overflow fill-parent">
<div id="bgWrapper">
<div class="bg"></div>
<div class="bg"></div>
</div>
</div>
</div>
<div id="parent">
<div id="content">
<p></p>
<div class="hide-overflow fill-parent">
<div id="bgWrapper">
<div class="bg"></div>
<div class="bg"></div>
</div>
</div>
</div>
#parent {
position: relative;
width: 100vw;
}

#bgWrapper {
animation: translate 180s linear infinite;
width: 200%;
height: 100%;
display: flex;
flex-direction: row;
align-items: stretch;
}


.bg {
background-image: url('');
background-size: 10%;
flex-basis: 0;
flex-grow: 1;
}

.fill-parent
{
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}

.hide-overflow
{
z-index: -1;
overflow: hidden;
}

@keyframes translate {
0% {
transform: translateX(-50%)
}

to {
transform: translateX(0%)
}
}
#parent {
position: relative;
width: 100vw;
}

#bgWrapper {
animation: translate 180s linear infinite;
width: 200%;
height: 100%;
display: flex;
flex-direction: row;
align-items: stretch;
}


.bg {
background-image: url('');
background-size: 10%;
flex-basis: 0;
flex-grow: 1;
}

.fill-parent
{
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}

.hide-overflow
{
z-index: -1;
overflow: hidden;
}

@keyframes translate {
0% {
transform: translateX(-50%)
}

to {
transform: translateX(0%)
}
}
Though I think using absolute position is easier to reason about personally
34 replies
CC#
Created by Servant of Time on 6/14/2024 in #help
✅ Jittery CSS pan animation
Of course there might be a better way to do it :XD:
34 replies
CC#
Created by Servant of Time on 6/14/2024 in #help
✅ Jittery CSS pan animation
<div id="parent">
<div id="content">
<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. </p>
<div class="hide-overflow fill-parent">
<div id="bgWrapper" class="fill-parent">
<div id="bg" class="fill-parent"/>
<div id="bg" class="offset fill-parent"/>
</div>
</div>
</div>
<div id="parent">
<div id="content">
<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. </p>
<div class="hide-overflow fill-parent">
<div id="bgWrapper" class="fill-parent">
<div id="bg" class="fill-parent"/>
<div id="bg" class="offset fill-parent"/>
</div>
</div>
</div>
#parent {
position: relative;
width: 100vw;
}

#bgWrapper {
animation: translate 180s linear infinite;
}


#bg {
background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="36" height="72" viewBox="0 0 36 72"%3E%3Cg fill-rule="evenodd"%3E%3Cg fill="%239C92AC" fill-opacity="0.4"%3E%3Cpath d="M2 6h12L8 18 2 6zm18 36h12l-6 12-6-12z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
background-size: 10%;
}

.offset
{
transform: translateX(-100%);
}

.fill-parent
{
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}

.hide-overflow
{
z-index: -1;
overflow: hidden;
}

@keyframes translate {
0% {
transform: translateX(0px)
}

to {
transform: translateX(100%)
}
}
#parent {
position: relative;
width: 100vw;
}

#bgWrapper {
animation: translate 180s linear infinite;
}


#bg {
background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="36" height="72" viewBox="0 0 36 72"%3E%3Cg fill-rule="evenodd"%3E%3Cg fill="%239C92AC" fill-opacity="0.4"%3E%3Cpath d="M2 6h12L8 18 2 6zm18 36h12l-6 12-6-12z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
background-size: 10%;
}

.offset
{
transform: translateX(-100%);
}

.fill-parent
{
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}

.hide-overflow
{
z-index: -1;
overflow: hidden;
}

@keyframes translate {
0% {
transform: translateX(0px)
}

to {
transform: translateX(100%)
}
}
34 replies
CC#
Created by Servant of Time on 6/14/2024 in #help
✅ Jittery CSS pan animation
:ThumbsUp:
34 replies
CC#
Created by Servant of Time on 6/14/2024 in #help
✅ Jittery CSS pan animation
You might also wanna set star-pattern-container overflow to hidden, or set bgWrapper's overflow to hidden
34 replies
CC#
Created by Servant of Time on 6/14/2024 in #help
✅ Jittery CSS pan animation
:ThumbsUpSmile: Also, forgot to mention, because bgWrapper's position is absolute the parent; which would be your star-pattern-container needs to have a relative position
34 replies
CC#
Created by Servant of Time on 6/14/2024 in #help
✅ Jittery CSS pan animation
I'd personally do something like
<div id="bgWrapper" style="
animation: translate 180s linear infinite;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: -1;">
<div id="bg" style="
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url(/assets/starpattern-CL68Kahl.svg);
background-size: 10%;
"></div>
<div id="bgOffset" style="
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url(/assets/starpattern-CL68Kahl.svg);
background-size: 10%;
transform: translateX(-100%);
"></div>
</div>
<div id="bgWrapper" style="
animation: translate 180s linear infinite;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: -1;">
<div id="bg" style="
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url(/assets/starpattern-CL68Kahl.svg);
background-size: 10%;
"></div>
<div id="bgOffset" style="
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url(/assets/starpattern-CL68Kahl.svg);
background-size: 10%;
transform: translateX(-100%);
"></div>
</div>
@keyframes translate {
0% {
transform: translateX(0px)
}

to {
transform: translateX(100%)
}
}
@keyframes translate {
0% {
transform: translateX(0px)
}

to {
transform: translateX(100%)
}
}
Which is a bit dirty, but it works and translateX is much more performant than background-position-x
34 replies
CC#
Created by Garfield on 6/14/2024 in #help
✅ Can't start a C# code
Hmmm, if you're using visual studio code it'll be a bit different from visual studio Do you have the devkit extension installed?
34 replies
CC#
Created by Garfield on 6/14/2024 in #help
✅ Can't start a C# code
Are you using visual studio?
34 replies
CC#
Created by Garfield on 6/14/2024 in #help
✅ Can't start a C# code
Specifically you want a console project in this case
34 replies
CC#
Created by Garfield on 6/14/2024 in #help
✅ Can't start a C# code
Okay, for C# you can't run files, you have to run projects
34 replies
CC#
Created by Garfield on 6/14/2024 in #help
✅ Can't start a C# code
How are you trying to run it? Did you create a new project in visual studio?
34 replies
CC#
Created by Max on 6/8/2024 in #help
Screenshot and save to file
Selenium would be the best option then, login in using selenium and make it take a screenshot
16 replies
CC#
Created by Max on 6/8/2024 in #help
Screenshot and save to file
If you want to only capture the screen of a website, do as Pluto said here
16 replies
CC#
Created by Max on 6/8/2024 in #help
Screenshot and save to file
If you want a cross-platform solution it'll be quite challenging, for me the best solution was to use this library, which is actually for screen capturing https://github.com/DarthAffe/ScreenCapture.NET
16 replies
CC#
Created by Ares on 6/3/2024 in #help
how difficult would this be to do?
$vps
14 replies
CC#
Created by Ares on 6/3/2024 in #help
how difficult would this be to do?
Yes, I think we have a tag here for VPS
14 replies
CC#
Created by Ares on 6/3/2024 in #help
how difficult would this be to do?
So yes, it's possible to make it into a web app
14 replies