|
This is crossposted in Stack Overflow but hasn't gotten many views, or any answers.
I have a simple Perl script that uploads a file from an HTML form, and it does works. i.e Uploads a file from my local Mac HD to my web server via a webpage.
When I use OneDrive from any device, through Finder, or Word, Excel, etc.. it acts like just another HD, so I expected the same behavior with my perl . What I have noticed, however, if I try to upload files from Microsoft's OneDrive I am more likely to get the following info below. I have no problems using my OneDrive via Mac's Finder, or my iPhone, etc.
access.log
[14/Feb/2022:23:36:51 -0500] "POST /cgi-bin/upload2.pl HTTP/1.1" 408 487 "http://example.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15"
error.log
[Mon Feb 14 23:37:02.121496 2022] [cgi:error] [pid 3734:tid 140367391328000] (70007)The timeout specified has expired: [client -.-.-.-:58184] AH01225: Error reading request entity data, referer: http://example.com/
My Apache2 settings are:
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
At my slim level of knowledge of Apache, I am assuming that my problem is all about timing. If that's the case, can I change settings above to help? Or am I off base?
*One small thing I noticed, but I don't know if it means anything
My web browser says:
"Server timeout waiting for the HTTP request from the client. and it mentions port 80."
However, in the error.log it mentions port 58184. I don't know if that's normal, due to routers, other routine behavior.
|
|
|
|
|
Seems like here it is almost non existent.
Reddit has some, but not much.
Bjorn
|
|
|
|
|
Look up CSS rant ... The day I run into a big purple people eater and he asks me to stand up in his cabinet ... that's the day I'll write an article on progressive web applications.
modified 19-Feb-22 16:02pm.
|
|
|
|
|
There is no separate forum to discuss PWA development
|
|
|
|
|
i am new at express and i went through the documentation and i want to know what are the main usage of the req.route() in express it only gives me information about the route nothing else but what can i use it in real life.
What I have tried:
i have read in the main documentation but there is no details about usage of this method specifically
|
|
|
|
|
app.use() — Routes an HTTP request, where METHOD is the HTTP method of the request, such as GET, PUT, POST, and so on, in lowercase.
|
|
|
|
|
req.route() will give you the complete requested URL and the req.path will give you only the current page like /mypage.html
|
|
|
|
|
Hello, I am trying to teach myself web development and I found a form I wanted to duplicate on a roof construction website.
All my input boxes are centered except the last one that's a bit off and I cannot figure out why. The class is "powerwall-battery-input"
Please don't be like stack overflow and constantly criticize the format of my question because it has gotten old over there, which is why I am here.
Thanks
Here is my code:
<main class="calc-wrapper">
<!--
<form class="calc-form" action="form-results.html" method="get">
<label for="first-name" class="label first-name-label">
First Name
</label>
<input type="text" class="first-name-input" />
<label for="last-name" class="label last-name-label"> Last Name </label>
<input type="text" class="last-name-input" />
<!--
<label class="label addr-sec-label" for="addr-sec"
>Address Selection*</label
>
<input type="text" class="input" placeholder="Address" id="location" />
<input
type="text"
class="input"
placeholder="Apt, Suite, etc (optional)"
/>
<input type="text" class="input" placeholder="City" id="locality" />
<input
type="text"
class="input"
placeholder="State/Province"
id="administrative_area_level_1"
/>
<input
type="text"
class="input"
placeholder="Zip/Postal code"
id="postal_code"
/>
<input type="text" class="input" placeholder="Country" id="country" />
<div class="map" id="map"></div>
<!--
<div class="roof-complexity">
<label class="label roof-complexity-label" for="roof-complexity"
>Roof Complexity Type*</label
>
<select
class="roof-complexity-input"
id="roof-complexity-input"
name="roof-complexity"
>
<option selected disabled hidden>Select an Option</option>
<option id="simple" value="simple">Simple</option>
<option id="moderate" value="moderate">Moderate</option>
<option id="complex" value="complex">Complex</option>
</select>
</div>
<div class="system-size">
<label class="label system-size-label" for="system-size"
>Select System Size*</label
>
<button class="btn calc-form-btn system-size-minus-btn" type="button">
-
</button>
<input
class="system-size-input"
id="system-size-input"
value="4.0"
/>
<button class="btn calc-form-btn system-size-plus-btn" type="button">
+
</button>
</div>
<div class="powerwall-battery">
<label class="label powerwall-battery-label" for="powerwall-battery"
>Select Powerwall Battery Storage (in units)*</label
>
<button
class="btn calc-form-btn powerwall-battery-minus-btn"
type="button"
>
-
</button>
<input class="powerwall-battery-input" id="powerwall-battery-input" />
<button
class="btn calc-form-btn powerwall-battery-plus-btn"
type="button"
>
+
</button>
</div>
</form>
<!--
<div class="totals-section">
<label class="label roof-before-itc" for="roof-before-itc"
>Solar Roof Price Before Incentives</label
>
<input type="text" class="input" id="roof-price-before-itc" />
<label
class="label powerwall-price-before-itc"
for="powerwall-price-before-itc"
>Powerwall Price Before Incentives</label
>
<input class="input" id="powerwall-price-before-itc" value=" " />
<label class="label est-total-before-itc" for="est-total-before-itc"
>Estimated Total Price Before Incentives</label
>
<input type="text" class="input" id="est-total-before-itc" />
<label class="label est-itc" for="est-itc">Estimated Solar ITC</label>
<input type="text" class="input" id="est-itc" />
</div>
</main>
:root {
--mainFont: "Arial";
--textFont: "Open Sans", sans-serif;
--secondaryFont: "Raleway", sans-serif;
--primary: #4f5449;
--darkGray: #2f2e2e;
--lightGray: #ebebeb;
--white: #fff;
--black: #000;
--darkorange: orange;
}
*,
*:before,
*:after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
font-size: 62.5%;
}
body {
font-family: var(--mainFont);
font-size: 1.6rem;
line-height: 2;
}
.calc-wrapper {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}
.calc-form {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: 5rem;
margin-bottom: 5rem;
width: 50%;
padding: 5rem;
}
.first-name-input {
width: 50%;
padding: 2rem;
}
.last-name-input {
width: 50%;
padding: 2rem;
}
.sb-title {
font-family: var(--mainFont);
font-weight: bold;
}
.addr-sec-input {
width: 100%;
padding: 2rem;
}
.input {
width: 50%;
padding: 2rem;
text-align: center;
}
.label {
margin-top: 2rem;
font-weight: bold;
text-align: center;
display: block;
}
.home-size-input {
padding: 2rem;
text-align: center;
}
.roof-complexity-input {
padding: 2rem;
text-align: center;
}
.system-size {
display: block;
}
.system-size-input {
padding: 2rem;
text-align: center;
}
.powerwall-battery {
display: block;
}
.powerwall-battery-input {
padding: 2rem;
text-align: center;
}
.calc-form-btn {
background-color: var(--primary);
border: none;
color: var(--white);
padding: 0 1.5rem;
text-align: center;
text-decoration: none;
font-size: 2rem;
border-radius: 0.5rem;
cursor: pointer;
}
.totals-section {
border: var(--black);
border-style: solid;
background: var(--darkorange);
width: 50%;
margin-right: 5rem;
border-width: 1px;
padding: 5rem;
display: flex;
flex-direction: column;
align-items: center;
width: 25%;
}
.submit-section {
text-align: center;
margin-bottom: 5rem;
}
.submit-btn {
border-style: solid;
border-width: 1px 1px 1px 1px;
border-color: #FFFFFF;
color: #FFFFFF;
background-color: var(--primary);
padding: 4rem;
font-size: 2rem;
text-transform: uppercase;
border-radius: 1rem;
width: 10%;
}
.submit-btn {
cursor: pointer;
}
|
|
|
|
|
|
Using Asp.Net, javascript, jquery...
We have four environments in which we run our code - Dev, Test, QA, and Production.
The only environment in which we have access to the servers is Dev. The rest are maintained by our cloud provider.
In this case, the user clicks a button to navigate to another (local) page.
Recently, the Test environment has started redirecting from the desired page to the site's home page. All of the other environments work fine.
The desired page does in fact exist, and is in the expected location, but when the user clicks the button, he gets redirected to the home page (and the user is still logged in to the app). Again, this only happens in our Test environment.
Does anyone have any idea what could cause this to happen? An IIS setting perhaps?
".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 4-Feb-22 5:52am.
|
|
|
|
|
Message Closed
modified 5-Jul-22 7:59am.
|
|
|
|
|
That's fine and all, but I don't have any say - at all - as to which cloud provider we use, or where we host our web site.
Yes, I knew that using the cloud was the wrong thing to do. ALL of the devs on the team think that way.
BTW, I'm a DoD contractor, and we don't make those kinds of decisions. They pander to us by telling us to write up suggestions, etc, but in the end, they just toss that stuff in the trash and do what they want without regard for any rebuttal or warnings.
Finally, I don't appreciate your condescending tone.
".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 can't figure this out.
I have an array ...
And I want the array record with the minimum distance of 6, in which I calculated already. I figured PHP7 had a function to just select a record in an array, but I can't find it, or it's done some other way that I'm not familiar with.
Input word: mini-stonescape group iii - Lev Distance: 6 - Shortest: 6
Did you mean: stonescapes group iii
Smallest Distance: 6
array(16) {
[0]=>
array(3) {
["key"]=> string(10) "REF_PA_365"
["value"]=> string(21) "stonescapes group iii"
["distance"]=> int(6)
}
[1]=>
array(3) {
["key"]=> string(10) "REF_PA_364"
["value"]=> string(20) "stonescapes group ii"
["distance"]=> int(7)
}
[2]=>
array(3) {
["key"]=> string(10) "REF_PA_081"
["value"]=> string(19) "stonescapes group i"
["distance"]=> int(8)
}
As far as code goes, well I tried about 10 things with failure. So I deleted all my tries. I have nothing but an array. I just need a nudge, a keyword or something.
if ($distance <= $shortest || $shortest < 0) {
$closest = $value;
$shortest = $distance;
}
echo "Input word: $partDescription - Lev Distance: $distance - Shortest: $shortest\n";
if ($shortest == 0) {
echo "Exact match found: $closest\n\n";
$pValue = $closest;
} else {
echo "Did you mean: $closest\n\n";
$distances = array_column($comparisons, 'distance');
$smallestDistance = min($distances);
echo "Smallest Distance: $smallestDistance\n";
var_dump($comparisons);
echo "Best choice: $closest\n\n";
var_dump($pValue);
}
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
I think I figured it out ...
array_search return the index of the record I'm looking for.
And then just call the record by index number.
$distances = array_column($comparisons, 'distance');
$smallestDistance = $distances[0];
$idx = array_search($smallestDistance, $comparisons, true);
$comparison = $comparisons[$idx];
$pValue = $comparison['key'];
$closest = $comparison['value'];
break;
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
have anyone here used Robinhood API to make trading using C# program?
it sounds exciting to have access to Robinhood API to trade crypto currencies since I am a developer...
diligent hands rule....
modified 17-Jan-22 16:02pm.
|
|
|
|
|
Um ... Robin Hood ... didn't he steal from the rich?
I'm not sure I'd want to trust crypto (already a hiding place from crooks and con men) trading (ditto) with a package named after a famous robber!
Mind you, I suspect if you do write C# code to trade Crypto, you could lose your shirt even quicker than you could manually ...
"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!
|
|
|
|
|
to wear a shirt in my home, it is fine
diligent hands rule....
|
|
|
|
|
No, I prefer the Indiana Jones API
|
|
|
|
|
a quick google search:
Robinhood API - A Complete Guide - AlgoTrading101 Blog[^]
But to answer your question, no, I have not used the Robinhood API. I have a Robinhood account and I trade with Robinhood, just don't have the time now to look into their API - though it looks interesting.
I did not see any documentation that you can trade crypto currency through the API, but I did not review thourougly.
good luck.
|
|
|
|
|
thanks for this link!
I would like to try Crypto trading this year with small fraction of money in 2022...
diligent hands rule....
|
|
|
|
|
I haven't tried it yet but it sounds promising, maybe in a couple of months...
|
|
|
|
|
I want to create social media sharing links for Facebook, Twitter, Pinterest, Tumblr, LinkedIn, WhatsApp and other social media platforms. please suggest me an useful tool.
|
|
|
|
|
I want to create social media sharing links for Facebook, Twitter, Pinterest, Tumblr, LinkedIn, WhatsApp and other social media platforms. please suggest me an useful tool.
|
|
|
|
|
Is Dreamweaver still the best program to use for website development and design? I am trying to encourage a young person to consider becoming a developer and wonder what is the best program today for them to use to start learning on.
|
|
|
|
|
I'm sorry this answer is coming so late! I hope it's still useful. Dreamweaver is still around, but it no longer reigns supreme. Besides, it's not free and it's expensive.
An excellent code editor is Microsoft's Visual Studio Code. This is separate from the Visual Studio used to develop in C# and Visual Basic, and it's free to use. I'd post a link to download it but the link could change, plus it's hardly hard to find.
Now, to learn web development, I've recently come across a fantastic resource that was there, hiding in plain sight all the time. Forget the paid, online academies and check out the Mozilla Developer Network's free course on web development, starting here: Front-end web developer - Learn web development | MDN[^]
This is no two-hour video that rushes you through like one of those "ten countries in ten days" tours of Europe. It starts with HTML, goes on to CSS, and then Javascript. After you're done with HTML/CSS/Javascript, you can go on to Angular, React, etc. The course also includes numerous checkpoints where you can assess what you've learned, and there's a really friendly forum on Discourse, where you can ask questions if you get stuck.
The course has lots of encouraging language while pushing you to think like a software developer. I really can't speak highly enough of it.
|
|
|
|
|