|
NeverJustHere wrote: unusable
It worked as intended.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
statements about how JavaScript is not a programming language are implicit questions about programming languages, and, an invitation to post OT discussion on the Lounge.
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
|
|
|
|
|
All languages - including English (*) - are programming languages, and therefore statements in English are also prohibited in the Lounge.
(*) English is used in many places to program people.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Genau!
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
|
Nice!
I don't know how practical this is (think of the ambiguities in English and most other natural languages), but it's certainly an idea worth playing with.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Oh please do not advertise it ...
|
|
|
|
|
Hi, Dan,
fyi: my first response was tongue-in-cheek
I respectfully disagree: imho, all spoken human languages have nothing in common with so called computer "programming" languages ... even if their semantics are to some degree modeled on human languages. I take off the table such weird experiments as Esperanto, and Daniel Everett's linguistic hypothesis that the Piraha language has no ambiguity [^], [^].
I do think you could "fudge" the Sapir-Whorf linguistic hypothesis [^] to partially apply to the way that programmers who reach a high level of mastery in one computer dialect may tend to view learning a new paradigm in terms of what they have internalized ... which may lead to cognitive dissonance / "culture shock" ... I'm thinking of the rants you sometimes see as OO devotees bounce off FP, and the reverse.
I believe it is a serious mistake to use any other term than "finite instruction set" for what are called today computer "programming" languages
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
modified 4-Sep-20 2:53am.
|
|
|
|
|
Looking at the possibility of trying to post to a website with c# that has a wizard with multiple steps and I'm looking through the JS file and it is over 130,000 lines long when pretty-printed in Chome's dev tools.
130,000+ lines!!!
Of course it is a government website from Communist California, so that explains some of it.
If anyone has tips on how to use c# to post to a website with steps, to automate submitting something I'd love to hear it. I think it isn't even worth trying.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
modified 2-Sep-20 15:59pm.
|
|
|
|
|
ZurdoDev wrote: JS file and it is over 130,000 lines long
So ridiculous!! For all those people who don't understand OOP. This is what OOP was for.
Do you mean something like the following?
from: How to: Send data by using the WebRequest class | Microsoft Docs[^]
using System;
using System.IO;
using System.Net;
using System.Text;
namespace Examples.System.Net
{
public class WebRequestPostExample
{
public static void Main()
{
WebRequest request = WebRequest.Create("http://www.contoso.com/PostAccepter.aspx ");
request.Method = "POST";
string postData = "This is a test that posts this string to a Web server.";
byte[] byteArray = Encoding.UTF8.GetBytes(postData);
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
WebResponse response = request.GetResponse();
Console.WriteLine(((HttpWebResponse)response).StatusDescription);
using (dataStream = response.GetResponseStream())
{
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
Console.WriteLine(responseFromServer);
}
response.Close();
}
}
}
|
|
|
|
|
raddevus wrote: Do you mean something like the following? Sort of. I have done that before; however, what I need is a website that has multiple steps which means I have to somehow check the response after simulating the next button and figure out how it all works. I think I also have to include any cookies the site wants to include.
I feel like it's way more work than it's worth, unless I am missing something.
And then of course, if they ever change their site then my code would break.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
raddevus wrote: So ridiculous!! For all those people who don't understand OOP. This is what OOP was for.
That's actually just the preferred deployment method these days. The source code is indeed OOP. The code will be and it will rely on various plug-ins that will be OOP too. When it comes to deploying the site a process like webpack is used which takes all of the code in all of the linked js files, so both your code and also all the plug-ins you use, it then minifies the code and puts it all in a single file. So the file itself might be large, but it's the amalgamation of all the source js files stuck together. webpack does other shenanigans too which protects your plug-ins from each other and enforces a far more granular and modular way of coding.
|
|
|
|
|
F-ES Sitecore wrote: a process like webpack is used which takes all of the code in all of the linked js files, so both your code and also all the plug-ins you use, it then minifies the code and puts it all in a single file
That's a very good point. That probably is what is happening.
|
|
|
|
|
There are probably only 200 lines of unique code and a lot of cut and paste.
"Time flies like an arrow. Fruit flies like a banana."
|
|
|
|
|
Matthew Dennis wrote: There are probably only 200 lines of unique code copied from SO and a lot of cut and paste 128,000 lines of desperation to get that working.
"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!
|
|
|
|
|
Automating a site in "steps" is no different from automating a single page. The only trick you might be missing is that you need to implement a cookie container so that subsequent requests send any sessionesque cookies to the ongoing pages.
HttpWebRequest.CookieContainer Property (System.Net) | Microsoft Docs[^]
Other than that you just need to worry about things that require javascript, if you need js you'll want to use some kind of headless browser.
edit: any redirects the site issues can be implemented by looking at the response headers, one will be a "location" header and you just request that url next. That's if the web client you use doesn't auto-process redirects.
|
|
|
|
|
F-ES Sitecore wrote: the web client you use doesn't auto-process redirects. It would be all C#. No web client.
Thanks. Good info.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
ZurdoDev wrote: Of course it is a government website from Communist California, so that explains some of it. You betcha!
Why not goose-step your code over to non-communist Alabama - where the governor realizes that the money they make from keeping their university open far outweighs the spread of COVID and the cost of bodybags. He's no commie! There's money at stake!
Hell - looking for communist states? Look no further than most of the Southern US, Littlehands Country, where they get more aid from the federal government than they pay in taxes - or as it's also known, REDISTRIBUTION OF THE WEALTH . . . money collected from states like New York, California - much of the Blue northeast. Hey - even Moscow Mitch comes from a communist stronghold when it comes to collecting welfare from the REAL STATES.
But don't you worry about it. "D" will tell you it ain't so and then that makes everything better.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
You smoke a lot don't you.
W∴ Balboos, GHB wrote: that the money they make from keeping their university open far outweighs the spread of COVID and the cost of bodybags. Nope. Lots of universities are 100% online and charge the same amount so opening for face to face has nothing to do with money.
I guess you missed the announcement that only 6% of the COVID deaths can be 100% attributed to covid. The rest had other factors.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
ZurdoDev wrote:
I guess you missed the announcement that only 6% of the COVID deaths can be 100% attributed to covid. The rest had other factors
I guess you keep listening to the lying jackass.
That other factors concept? It doesn't change the fact that they'd not have died without having gotten COVID. Your (and his) reasoning is like blaming underlying illness to a person killed when hit by a car.
He says stuff like that because he knows his audience will never spit - always swallows.
And the two billion dollar? Not tuition and fees but the dependent business and other such economic impact. Hell - it's obvious there's not worried about tuition: the students are already considered expendable by this governor's reasoning. On the other hand . . . WTF do I care - the survivors will grow up to be Louisiana red-necks, anyway!
And here's a table of the most federal-welfare-dependent states. It doesn't take into account how much was taken from the - can be found elsewhere on the page. https://wallethub.com/edu/states-most-least-dependent-on-the-federal-government/2700/[^]
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
modified 2-Sep-20 15:41pm.
|
|
|
|
|
W∴ Balboos, GHB wrote: I guess you keep listening to the lying jackass. The CDC made the statement. Your emotions are getting the better of you. Just stick to facts and leave the whiny emotions for the soapbox.
W∴ Balboos, GHB wrote: that they'd not have died without having gotten COVID. Not true. You never hear of anyone dying from the flu. They die from pneumonia or other complications.
Someone with heart failure that gets covid because they are in the hospital did not die from covid and would have died anyway.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
|
This would be a .Net core app service running on Azure so I don't think that applies. Thank you though.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
Do magicians dump their assistants because they think it's time they saw other people?
"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!
|
|
|
|
|
Or, ".. more people saw them"
"Time flies like an arrow. Fruit flies like a banana."
|
|
|
|