Tumgik
#system.out.println(text)
thesaintelectric · 6 months
Text
i get *why* java is written as it is but i think making me write out 'System.out.println(text);' (case sensitive) is a kind of violence.
3 notes · View notes
Text
Tumblr media
</> Sideblog for @seaside-lovers
</> Exploring being POSIC + possibly objectum
</> Blog is mostly SFW; anything spicy will be tagged #suggestive
</> My object partner is a PS2 named Seven (they/them) + my object best friend is a blanket named Jean (she/her)
</> Other special objects in my life
</> I'm attracted to robots, gaming systems (especially PS1 + PS2), technology, factory machinery, armor, and Java (programming language)
</> Tagging system
magnavox.txt - original posts
System.out.println(); - text only posts
img - any posts w/ images
tech - general tag for anything that doesn't fall under the below tags
robots
computers
gaming systems
machinery
</> I love learning about tech + programming but my memory is unfortunately horrendous so I usually don't retain it much :( I do love learning about it, though
Tumblr media
1 note · View note
codemaster-or-kr · 15 days
Link
0 notes
icodeforfun · 3 months
Text
I am so dumb
It hurts. My brain just blank out at the questions.
✅ Do some research: Now that you know the basics of a web developer's environment, compare and contrast it with a web designer's environment.
Web developer:
CMD line
Text Editors/IDEs: Developers use text editors (e.g., Visual Studio Code, Sublime Text) or Integrated Development Environments (IDEs) (e.g., Visual Studio, IntelliJ) for coding.
Version Control Systems: Tools like Git help developers manage and track changes in the codebase.
Command-Line Interface (CLI): Developers often use the command line for tasks such as running scripts, version control operations, and package management.
Both:
Editors - VS code
web browser
Web designers:
Adobe photoshop
Graphic Design Software: Designers use tools like Adobe Photoshop, Adobe XD, Sketch, Figma, or other graphic design software to create visual elements, layouts, and prototypes.
Wireframing Tools: Designers often use tools like Balsamiq or Adobe XD for creating wireframes and mockups.
So I just use ChatGTP like a sore loser instead of thinking and researching on my own.
🚀 Challenge
Compare some programming languages. What are some of the unique traits of JavaScript vs. Java? How about COBOL vs. Go?
Java and JavaScript are both programing languages. JavaScipt is uniquely used for building websites in web development whereas Java can be used for building anything.
Tumblr media
I just copied this from the internet. I never heard of COBOL and Go so I copied this blurb from the internet:
COBOL is a verbose and established language, primarily used in the business domain, while Go is a relatively modern and versatile language designed for efficient concurrency and scalability in a wide range of applications.
Huhhhh, I only wanted to know things when I need it instead of plain interest.
Review & Self Study
Study a bit on the different languages available to the programmer. Try to write a line in one language, and then rewrite it in two others. What did you learn?
Java: System.out.println("Hello World!");
Python: print("Hello World!")
Java script (used ChatGtp): console.log("Hello, World!");
Ruby (used ChatGtp): puts "Hello, World!"
I finally finished the first lesson! It was a pain in the ass!! Goodbye Lesson 1: Introduction to Programming and Tools of the Trade!
0 notes
Bitches and bros and non binary hoes, heute liebe freunde reden wir über etwas sehr komplexes, nämlich zeit. Was ist zeit? Wieso ist zeit und wozu ist zeit? 
Mais maintenant je vais essayer d’expliquer wie zeit funktioniert (aus einer neurodivergenten perspektive(als person mit adhs)).
Zeit ist für mich etwas sehr kompliziertes, weil ich wie viele Menschen mit Adhs kein Zeitgefühl habe beziehungsweise ein eingeschränktes, denn Aufmerksamkeitsdefizit Hyperaktivitätsstörung kommt mit einer art “Zeitblindheit”  oder einer kurzsichtigkeit für Zeit.
10 sekunden können für uns vergehen wie 15 minuten und 15 minuten wie 10 sekunden.
Und das macht Dinge planen sehr schwer vorallem wenn es kein morgen und kein gestern gibt, kurz gesagt gibt es die zeit “jetzt” und die zeit “nicht jetzt” was plantechnisch wohl so gut funktioniert wie schwarz weiß fotographie und so kommt man oft in die situation das man gefühlt 15 Dinge bis morgen fertig machen muss und es ist genau 21 uhr und ich muss um spätestens 23 uhr schlafen uff aber die Rettung scheint nah zu sein weil wir leben ja in einer zeit mit chat gpt und so also nahm ich meinen essay anfang und gab ihn chat gpt und heraus kam trommelwirbel ein text der garnicht nach mir klang also muss ich jetzt weiter selbst schreiben und denke mir system.out.println(finished_essay); aber das funktioniert hier nicht, mies.
Um ehrlich zu sein, vermag mein präfrontaler kortex weder die struktur noch die art des schreibens eines sogenannten essays verraten aber glücklicherweise leben wir in einer zeit in der jemand das in wenigen metrisch anerkannten kurzen zeiteinheiten recherchieren kann mit einem browser der sich allgemein google nennt.
Generell lässt sich also sagen das zeit sehr kompliziert ist und für jeden anders funktioniert
1 note · View note
jeremy-ken-anderson · 6 months
Text
The Devil You Know
I'm trying to grok Python and one thing I'm running into - and I'm aware it's quite small in the scheme of things - is its default to adding space into text.
In Java or C# if you say
x = 5; System.out.println("I have" + x + "apples.");
Your output will be
I have5apples.
So you learn to include the spaces yourself. System.out.println("I have " + x + " apples.");
But in Python you can have the opposite problem, where if you want to say "This sentence goes on and on..." with a loop making the "and on" part repeat several times? So far I've only learned this as an option:
print("This sentence goes on") for x in range(6): print("and on")
but this will actually print the following:
This sentence goes on and on and on and on and on and on and on
Which...It's legible! But I don't know yet how you'd make it a single line, and getting rid of excess space seems more involved than adding missing space, to me. But like I said, that's probably a matter of the stuff I'm already better-trained in, more than one way or the other being Objectively Easier. The Devil You Know.
0 notes
poojatw · 6 months
Text
Java, one of the most popular programming languages, has been the backbone of countless applications and software solutions. In this article, we will explore three fundamental aspects of Java programming: the Java console, output mechanisms, and the different types of casting.
Java Console:
The Java console, often referred to as the command-line interface or terminal, is a text-based environment where Java applications can be run and interacted with directly. It is a powerful tool for programmers, as it allows for real-time testing, debugging, and quick execution of Java code without the need for a graphical user interface.
Programmers can use the Java console to input data, execute code, and view the program's output. It is particularly useful for debugging and testing small code snippets, making it an essential part of the Java development toolkit.
Java Output:
In Java, output is the information or results that a program generates, which is typically displayed to the user or saved in files. The most common method for displaying output in Java is by using the System.out object and its println() or print() methods. These methods allow you to send text and data to the standard output stream, which is usually the console or terminal.
For example, to print "Hello, World!" to the Java console, you can use the following code:
javaCopy code
System.out.println("Hello, World!");
Java's output capabilities are versatile and can be used for various purposes, including displaying user prompts, debugging information, and generating reports.
Types of Casting in Java:
Casting in Java refers to the process of converting one data type into another. Java supports two types of casting: implicit (automatic) casting and explicit (manual) casting.
Implicit Casting: This type of casting occurs when a smaller data type is converted into a larger data type without the need for explicit instructions. For example, converting an int to a double is an implicit casting.
javaCopy code
int x = 5; double y = x; // Implicit casting from int to double
Explicit Casting: Explicit casting is required when you want to convert a larger data type into a smaller data type. This type of casting must be done manually, and it carries the risk of data loss due to potential loss of precision.
javaCopy code
double a = 123.456; int b = (int) a; // Explicit casting from double to int
Understanding the nuances of casting is vital in Java programming, as it helps ensure data integrity and compatibility when working with different data types.
In conclusion, the Java console, output methods, and types of casting are integral aspects of Java programming. They allow developers to interact with their code, display results to users, and handle different data types effectively. Whether you're a beginner or an experienced Java programmer, a good grasp of these fundamentals is essential for writing robust and efficient Java applications.
1 note · View note
tkxell · 6 months
Text
Selenium WebDriver is a popular open-source web automation framework. It allows you to control a web browser from within your test scripts, making it easy to automate tasks such as navigating to web pages, entering text, clicking buttons, and selecting options from drop-down menus.
Setting Up Selenium
To set up Selenium, you will need to install the following:
A programming language (e.g., Java, Python, C#, or JavaScript)
The Selenium WebDriver bindings for your chosen programming language
Web browser drivers for the browsers you want to automate
You can download the Selenium WebDriver bindings and web browser drivers from the Selenium website.
Once you have installed the necessary software, you need to configure Selenium. This involves setting the following environment variables:
SELENIUM_WEBDRIVER_CHROME_DRIVER_PATH (if using Chrome)
SELENIUM_WEBDRIVER_GECKO_DRIVER_PATH (if using Firefox)
SELENIUM_WEBDRIVER_EDGE_DRIVER_PATH (if using Edge)
SELENIUM_WEBDRIVER_SAFARI_DRIVER_PATH (if using Safari)
You can set these environment variables in your operating system's environment settings or in your IDE.
Writing Your First Selenium Test
Once you have configured Selenium, you can start writing your first Selenium test. Here is a simple example in Java:
Java
import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class MyFirstSeleniumTest { public static void main(String[] args) { // Create a WebDriver instance WebDriver driver = new ChromeDriver(); // Navigate to Google driver.get("https://www.google.com"); // Find the search bar WebElement searchBar = driver.findElementById("q"); // Enter the search term "Selenium" searchBar.sendKeys("Selenium"); // Click the search button searchBar.submit(); // Wait for the search results page to load driver.wait(1000); // Print the title of the search results page System.out.println(driver.getTitle()); // Close the browser driver.quit(); } }
To run this test, simply compile it and run the main class. Selenium will start a Chrome browser, navigate to Google, enter the search term "Selenium", click the search button, wait for the search results page to load, and print the title of the search results page.
1 note · View note
javacodingtips · 9 months
Text
What are the 5 steps of Java programming?
Tumblr media
The process of java programming course involves several steps to create, compile, and run Java programs. Here are the five main steps of Java programming:
Write Java Code
Use a text editor or an Integrated Development Environment (IDE) to write your Java code. Java programs are organized into classes, with each class containing methods.
Save the Java File
Save your Java code in a file with a .java extension. The filename should match the name of the class containing the main method, which serves as the entry point of your program. Compile the Java Code:
Open a terminal or command prompt and navigate to the directory where your Java file is located. Compile the Java code using the Java Compiler (javac command)
javac YourClassName.java This step generates bytecode and creates a .class file. Run the Java Program:
After successfully compiling the Java code, you can run the program using the Java Virtual Machine (JVM): Copy code java YourClassName Replace YourClassName with the actual name of your class. View Output:
If your Java program produces output (e.g., using System.out.println()), you'll see the output displayed in the terminal or command prompt.
0 notes
rhythmicsystem · 10 months
Text
We've been working on a java library to interface with pluralkit, which has been interesting, since we've never made a library before. It's going well though, and will make our future projects a lot easier lol
Example usage: (note: subject to change, we're still very early in writing it, and getting help from friends who have actually taken CS or done code far longer than us to make it more usable)
public static void main( String[] args ) throws IOException, InterruptedException { PKJava pkJava = new PKJava(); pkJava.setAuthToken(token); List<MemberObject> members = pkJava.requestMembers(systemID); for (MemberObject member : members) { System.out.println("Name:\n- " + member.getName()); System.out.println("Display name:\n- " + member.getDisplay_name()); System.out.println("Proxy tags:\n- " + member.getProxy_tags()); System.out.println("Color:\n- #" + member.getColor()); System.out.println("\n"); } } (Home-made syntax highlighting lol) Plain text version with no colors, lol: ```
public static void main( String[] args ) throws IOException, InterruptedException { PKJava pkJava = new PKJava(); pkJava.setAuthToken(token); List<MemberObject> members = pkJava.requestMembers(systemID); for (MemberObject member : members) { System.out.println("Name:\n- " + member.getName()); System.out.println("Display name:\n- " + member.getDisplay_name()); System.out.println("Proxy tags:\n- " + member.getProxy_tags()); System.out.println("Color:\n- #" + member.getColor()); System.out.println("\n"); } } ```
1 note · View note
dodigests · 6 years
Text
anyone know what doyoungs java knowledge is
6 notes · View notes
glasssnowdrop · 6 years
Text
HellA YES ITS THE WEEKEND I CAN FinallY UPDATE THIS BLOG
- sorry ive been busy with work ill reply to asks and upload translations soon
25 notes · View notes
3c65 · 2 years
Text
package ti;
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; import java.nio.charset.Charset; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.regex.Matcher; import java.util.regex.Pattern;
import org.jsoup.Connection; import org.jsoup.Jsoup; import org.jsoup.nodes.Document;
import com.google.common.base.Joiner; import com.google.common.base.Splitter; import com.google.common.collect.Collections2; import com.google.common.collect.Lists;
public class InstagramReplicator { public static InstagramReplicator newInstance(String instagramUser, String tumblrUser, String tagName) throws IOException { return new InstagramReplicator(instagramUser, tumblrUser, tagName); } public void doUpdate() throws IOException { System.out.println("Checking for updates: instagramUser=" + instagramUser);    for(String instagramUrl : loadInstagramUrls()) {    if(!currentImages.contains(instagramUrl))    {        submitPostToTumblr                (                    loadInstagramPost(instagramUrl)                );                currentImages.add(instagramUrl);                if(currentImages.size() > 100)        {            currentImages.remove(currentImages.get(0));        }    } } } private List<String> loadInstagramUrls() throws IOException {    List<String> instagramUrls = findMatches        (            Jsoup.connect("http://instagram.com/" + instagramUser).get().outerHtml(),            "\"link\":\"(http:\\\\/\\\\/instagram\\.com\\\\/p\\\\/[^\\\\]*\\\\/)\"",            true        );        Collections.reverse(instagramUrls);        //System.out.println(instagramUser + " - " + instagramUrls);        return instagramUrls; } private Post loadInstagramPost(String postUrl) throws IOException { System.out.println("Loading post: postUrl=" + postUrl);     String docText = Jsoup.connect(postUrl).get().outerHtml(); //System.out.println("doctext=" + docText); String caption = "<p>" + findMatch(docText, "\"caption\":\"(.*?[^\\\\])\"", false) + "</p>"; String tagRegEx = "#([A-Za-z0-9_]+)"; String userRegEx = "@([A-Za-z0-9_]+)"; List<String> tags = Lists.newArrayList(); tags.addAll(findMatches(caption, tagRegEx, false)); tags.addAll(findMatches(caption, userRegEx, false)); //caption = caption.replaceAll(tagRegEx, "<a href=\\\\\"http://www.gramfeed.com/instagram/tags#$1\\\\\">$0</a>"); caption = caption.replaceAll(userRegEx, "<a href=\\\\\"http://instagram.com/$1\\\\\">$0</a>"); if(docText.contains("\"is_video\":true")) {    caption += "<p><a href=\\\"" + postUrl + "\\\">Watch Video</a></p>"; } return new Post        (            postUrl,            findMatch(docText, "\"display_src\":\"([^\"]*)\"", true), //imageUrl            caption,            Joiner.on(",").join(tags)        ); } private void submitPostToTumblr(Post post) throws IOException { System.out.println("Submitting post: post=" + post); try        {            HttpURLConnection connection = (HttpURLConnection) new URL("http://www.tumblr.com/svc/post/update").openConnection();
           connection.setDoOutput(true);            connection.setDoInput(true);            connection.setInstanceFollowRedirects(false);            connection.setRequestMethod("POST");            connection.setRequestProperty("Cookie", tumblrCookie);            connection.setRequestProperty("X-tumblr-puppies", getSecureFormKey());            connection.setRequestProperty("X-tumblr-form-key","OdhVH6QQTBzl9IZZDViXwyj5vOU");            connection.setRequestProperty("Origin","http://www.tumblr.com");            connection.setRequestProperty("Accept-Encoding","gzip,deflate,sdch");            connection.setRequestProperty("Host","www.tumblr.com");            connection.setRequestProperty("Accept-Language","en-US,en;q=0.8");            connection.setRequestProperty("User-Agent","Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36");            connection.setRequestProperty("Content-Type","application/json");            connection.setRequestProperty("Accept","application/json, text/javascript, */*; q=0.01");            connection.setRequestProperty("Referer","http://www.tumblr.com/new/photo");            connection.setRequestProperty("X-Requested-With","XMLHttpRequest");            connection.setRequestProperty("Connection","keep-alive");            connection.setRequestProperty("DNT","1");            connection.setUseCaches(false);
           OutputStream output = connection.getOutputStream();                        output.write            (                ("{\"form_key\":\"OdhVH6QQTBzl9IZZDViXwyj5vOU\",\"context_id\":\"\",\"context_page\":\"dashboard\","                + "\"editor_type\":\"rich\",\"is_rich_text[one]\":\"0\",\"is_rich_text[two]\":\"1\",\"is_rich_text[three]\":\"0\","                + "\"channel_id\":\"" + tumblrUser +                "\",\"post[slug]\":\"\","                + "\"post[source_url]\":\"" + post.postUrl +                "\",\"post[date]\":\"\",\"post[three]\":\"" + post.postUrl +                "\",\"MAX_FILE_SIZE\":\"10485760\",\"post[type]\":\"photo\","                + "\"post[two]\":\"" + post.caption +                "\",\"post[tags]\":\"" + Joiner.on(",").join(userTags, post.tags, instagramUser, "instagram").replace('_', ' ') +                "\",\"post[publish_on]\":\"\",\"post[state]\":\"0 3\",\"post[photoset_layout]\":\"1\",\"post[photoset_order]\":\"o1\","                + "\"images[o1]\":\"" + post.imageUrl + "\",\"photo_src[]\":\"" + post.imageUrl +                "\"}").getBytes(Charset.forName("UTF-8"))            );            output.close();
           InputStream input = connection.getInputStream();            while(input.read() != -1) {}
           System.out.println("Post submission complete, httpStatusCode=" + connection.getResponseCode());
           input.close();        } catch (IOException e)        {    if(consecutiveTumblrErrors++ > 10)    {        System.err.println("FATAL: Too many consecutive tumblr failures, shutting down");        System.exit(1);    }        throw e;        } consecutiveTumblrErrors = 0; } private String getSecureFormKey() throws IOException {        Connection connection = Jsoup.connect("http://www.tumblr.com/svc/secure_form_key")                .header("Cookie", tumblrCookie)                .header("X-tumblr-form-key","OdhVH6QQTBzl9IZZDViXwyj5vOU")                .header("Origin","http://www.tumblr.com")                .header("Accept-Encoding","gzip,deflate,sdch")                .header("Host","www.tumblr.com")                .header("Accept-Language","en-US,en;q=0.8")                .header("User-Agent","Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36")                .header("Content-Type","application/json")                .header("Accept","application/json, text/javascript, */*; q=0.01")                .header("Referer","http://www.tumblr.com/new/photo")                .header("X-Requested-With","XMLHttpRequest")                .header("Connection","keep-alive")                .header("DNT","1")                .header("Content-Length", "0");        connection.post();        String secureFormKey = connection.response().header("X-tumblr-secure-form-key");        System.out.println("secureFormKey=" + secureFormKey);
       return secureFormKey; }
private String findMatch(String string, String regex, boolean isUrl) {    List<String> matches = findMatches(string, regex, isUrl);        if(matches.isEmpty())    {        return "";    }        return matches.get(0); } private List<String> findMatches(String string, String regex, boolean isUrl) {       Matcher matcher = Pattern               .compile(regex)               .matcher(string);
          List<String> matches = Lists.newArrayList();
          while(matcher.find())           {               matches.add               (                   matcher                       .group(1)                       .replace                       (                           (isUrl ? "\\" : ""),                           ""                       )                               );           }
          return matches; } //nested classes private class Post {        public Post(String postUrl, String imageUrl, String caption, String tags) { this.postUrl = postUrl; this.imageUrl = imageUrl; this.caption = caption; this.tags = tags; } @Override        public String toString() {            return "Post [postUrl=" + postUrl + ", imageUrl=" + imageUrl                    + ", caption=" + caption + ", tags=" + tags + "]";        }
       private final String postUrl; private final String imageUrl; private final String caption; private final String tags; }   //constructors
   private InstagramReplicator(String instagramUser, String tumblrUser, String tagName) throws IOException    {        this.instagramUser = instagramUser;        this.tumblrUser = tumblrUser;        this.userTags = tagName;        currentImages = loadInstagramUrls();
      /* currentImages.removeAll        (            Splitter                .on(',')                .trimResults()                .omitEmptyStrings()                .splitToList                (                )        );*/
   }
   //attributes
   private final String instagramUser;    private final String tumblrUser;    private final String userTags;    private final List<String> currentImages;
   //static
   public static void main(String[] args) throws IOException    {        Executors.newScheduledThreadPool(0).scheduleWithFixedDelay        (            new Runnable()            {                List<InstagramReplicator> replicators = Lists.newArrayList                (                    InstagramReplicator.newInstance("willaaaahh", "willaaaahhh", "willa holland"),                    InstagramReplicator.newInstance("emmaroberts", "emmaroberts9", "emma roberts"),                    InstagramReplicator.newInstance("tfarm7", "tfarm11", "taissa farmiga"),                    InstagramReplicator.newInstance("taylorswift", "taylorswift26", "taylor swift,taylorswift13"),                    InstagramReplicator.newInstance("yelyahwilliams", "yelyahwilliams-instagram", "hayley williams"),
                   InstagramReplicator.newInstance("MileyCyrus", "mileycyrus-instagram", "miley cyrus"),                    //InstagramReplicator.newInstance("badgalriri", "badgalriri-instagram", "rihanna"),                    InstagramReplicator.newInstance("beyonce", "beyonce-instagram", "beyonce knowles"),                    InstagramReplicator.newInstance("caradelevingne", "caradelevingne-instagram", "cara delevingne"),                    InstagramReplicator.newInstance("nickiminaj", "nickiminaj-instagram", "nicki minaj"),                    InstagramReplicator.newInstance("emmyrossum", "emmyrossum-instagram", "emmy rossum"),                    InstagramReplicator.newInstance("tigersjaw", "tigersjaw-instagram", "tigers jaw,brianna collins"),                    InstagramReplicator.newInstance("tayjardine", "tayjardine-instagram", "tay jardine,taylor jardine,we are the in crowd"),                    InstagramReplicator.newInstance("lordemusic", "lordemusic-instagram", "lorde")                );
               Iterator<InstagramReplicator> replicatorIterator = replicators.iterator();
               @Override                public void run()                {                    if(!replicatorIterator.hasNext())                    {                        replicatorIterator = replicators.iterator();                    }
                   InstagramReplicator replicator = replicatorIterator.next();
                   try                    {                        replicator.doUpdate();                    }                    catch (Throwable e)                    {                        e.printStackTrace();                    }                }            },            0,            5,            TimeUnit.SECONDS        );    } private static int consecutiveTumblrErrors = 0; private static final String tumblrCookie = ""; }
19 notes · View notes
Text
I'm in AP Computer Science and here are my favorite comments and variables that I've left in my code and tuned in for a grade
// I am going to apolize in adance I could not get an array to work at all and I've been stuggling for hours well this may be an array and I'm just tired my dogs woke me up at 6:00 and I've been very disordented all day
// I really loath these bulding but I can't put in text so here are the names of the Ugly bulidings and thier heights // first up is Lincon Plaza // second is Edgar Hoover Buliding // third is Liverpool Metro Catherdral // fourth is Zizkov TV Tower // fifth is really called 432 park avenue but the numders broke the code and this is hard enough as is to get 10 pieces to all work together pre array which still won't work
//wow its 10:54 at night and I took 10 mg of meletoin and not 4 mg I don't know if you'll actually read this if so don't show this in frount of the class I still can't tell if this is an array I've watched that video 2 in full but rewinded it so many times I'm so confused but I started late at night so I couldn't get any help
// also have to say there are some UGLY bulidings that i find so terrible looking but really look up those bulidings they are so weird
// I'm only making one new line becuase I would hate for this to be at a number not ending in 5 or 0 it would just be weird I do hope that my nonsense comments on this code made you laugh just in the hopes of extra credit well anyway see you on Monday
ugly [0] = 1; ugly [1] = 2; ugly [2] = 3; ugly [3] = 4; ugly [4] = 5;
System.out.println ("So I spent the whole summer in this hot buliding but eveyone kept on complaining it was too cold when it really wasn't.");
public static void main(String[] arges){ System.out.println("Poke ball go WWWhHHHHHHHEEEEEEEEEEEEE");
5 notes · View notes
kranthicynixit · 3 years
Text
selenium online training | selenium online courses
Apache Ant with Selenium and flash testing overview
When producing a full software product, numerous third-party APIs, their class route, the cleaning of previous binary executable files, the compilation of our source code, the execution of source code, the development of reports and the deployment code base, etc. You need to take care of everything. It would take an immense amount of time if these tasks are performed one by one manually, and the process will be vulnerable to errors.   selenium online training
Apache ANT with Selenium
The meaning of a building tool like Ant comes here.
The benefit of creating an Ant
The application life cycle is generated by Ant, i.e. clean, compile, dependency set, run, report, etc.
The third-party API dependency can be set by Ant, i.e. the classpath of another Jar file is set by the Ant build file.
For End to End Delivery and deployment, a full application is developed.
It is a simple build tool where you can use the XML file to make all configurations and which can be executed from the command line.
As the configuration is separate from the actual application logic, it makes the code safe.
How to install Ant for installation
The following steps are taken to mount Ant in Windows
Step 1)
Download the .zip file from apache-ant-1.9.4-bin.zip to http:/ant.apache.org/bindownload.cgi
Step 2)
Unzip the folder and go to the root of the unzipped folder and copy the path.
Step 3)
Go to Start -> Machine -> right-click here and choose 'Properties' and then click Advanced Device Settings
Step 4)
This opens a new window. Click on the 'Factor Environment...' icon.
Step 5)
Click 'New...' and set the name of the variable as 'ANT HOME' and the value of the variable as the root path to the unzipped folder, and then click OK.
Step 6)
Now select the 'Path' variable from the list, and then click Edit' and add;%ANT HOME%\bin.
You can restart the machine once and now you are ready to use the Ant build tool.
Step 7)
Use the command line to verify your version of Ant:
Ant-Version Build.xml comprehension
The most critical component of the Ant compilation tool is Build.xml. For a Java project, all tasks related to cleaning, setup, compilation, and deployment are specified in this XML format file. If we use the command line or any IDE plugin to execute this XML file, all the instructions written in this file will be executed sequentially.
Inside a sample build.XML, let's understand the code.
The project tag is used to define a project name and an attribute-based on it. The foundation is an application's root directory.
●        Property tags are used in the build.xml file as variables to be used in further steps.
<property name="build.dir" value="${basedir}/build"/>
          <property name="external.jars" value=".\resources"/>
 <property name="ytoperation.dir" value="${external.jars}/YTOperation"/>
<property name="src.dir"value="${basedir}/src"/>
 ●        Goal tags are used as steps to be performed sequentially. The name attribute is the target's name. In a single build.xml, you can have different targets
●        The path tag is used to logically bundle all files that are in the commonplace
●        Path element tag sets the generic location root path where all files are stored.
●        The path convert tag is used to convert all common file paths within the path tag to the classpath format of the framework.
●        Used to set classpath for various third party jars in our project files tag
●        The echo tag is used on the console to print text.
●        The Delete tag cleans data from the designated folder
●        A new directory will be created with the mkdir tag
●        Used to compile java source code and transfer .class files to a new folder, javac tag
●        The jar tag creates a jar file from the .class files
●        The manifest tag will set your key execution class to
●        The attribute 'depends' used to make one goal depend on another destination
●        The java tag executes the main function from the jar created in the target compile portion.
Run Ant using the plugin Eclipse
Go to build.xml file to run Ant from eclipse -> right-click file -> Run as... -> click Build file -> right-click file -> Run as... -> click Build file
EXAMPLE:
We will take a small sample program that will very clearly demonstrate the features of Ant. Our project architecture is going to look like follows.
We have 4 goals here in this example.
Class route setting for external jars,
Clean code, previously complied with,
Compile current Java code for yourself
Run the code, run it
AntClass.class
TestAnt's package;
Java.util.Date import;
AntClass Public Class {
Static public void main(String...s){
System.out.println('HELLO PROGRAM  ANT');
System.out.println("DATE IS TODAY->"+ currentDate());;"
}
Public static String currentDate(){
Fresh Date().toString() returns;;
}
}
Construct.xml
How to execute code for TestNG using Ant
Here we will construct a class using the TestNG method and set the Testing classpath in build.xml.
Now we'll create another testng.xml file to run the test method and call this file from the build.xml file.
Step 1)
In the testing kit, we build the "AntClass.class"
TestAnt's package;
Java.util.Date import;
Org.testng.annotations.Test imports;
AntClass Public Class {
The @Test
AntTestNGMethod(){{ Public Void
System.out.println('HELLO PROGRAM ANT');
System.out.println("DATE IS TODAY->"+ currentDate());;"
}
Public static String currentDate(){
Fresh Date().toString() returns;;
}
}
Step 2)
Construct a target for this class to be loaded into Build.xml
Step 3)
Create testng.xml
Testng.xml for checking
rg/testng-1.0.dtd" ">
Step 4)
In Build.xml, create a Target to run this TestNG code.
Step 5)
Absolute Build.xml Complete
Selenium Ant with Web driver:
We have discovered so far that we can place all third-party jars in a specific place in the system using ANT and set their direction for our project. Using this approach, we set all of our project's dependencies in a single place and make it more stable for compilation, execution, and deployment.
Similarly, we can easily discuss selenium dependency in build.xml for our testing projects using selenium, and we don't have to manually add a classpath to our program.
So now you can disregard the conventional way to set classpaths for the project listed below.
EXAMPLE:
The previous example we are going to change is
Step 1)
In the resource folder, set the selenium. jars property to a selenium-related container.
Step 2)
Add the selenium files to the set classpath target
Step 3)
Build.xml Com
Step 4)
Update the previously generated AntClass.java class to a new code.
TestAnt's package;
The java. util.List import;
Org.openqa.selenium.By import
Org.openqa.selenium.WebDriver Import;
Org.openqa.selenium.WebElement Import;
Org.openqa.selenium.firefox.FirefoxDriver importation;
Org.testng.annotations.Test imports;
AntClass Public Class {
The @Test
AntTestNGMethod(){{ Public Void
Driver for WebDriver = new FirefoxDriver();
driver.get;
List listAllCourseLinks = driver.findElements(By.xpath("/div[@class='canvas-middle']/a"));););
For(WebElement WebElement: listAllCourseLinks){ WebElement WebElement: listAllCourseLinks
System.out.println(webElement.getAttribute("href"));
}
}
}
Step 5)
The production after successful execution looks like this.
Flash testing varies from other component components
Flash is a technology that is obsolete. Capturing a flash-object is challenging as it is distinct from HTML. Flash is also an embedded SWF file that is (Small Web Format). Accessing Flash artifacts on a mobile device is often challenging.
Flash creation is more complex than SEO (Search Engine Optimization) HTML page development because flash is not completely readable by the search engine. Advanced technologies such as HTML 5 are, however, applied to solve problems such as performance and security.
Check it with the flash application.
There are two methods of testing Flash Applications:
Manual
By running test cases manually, you can test the Flash object as it is quick and easy to test. You ensure that the flash works properly as planned after bug fixation and provide sign-off.
Automation:
Use any automation method such as Selenium, SoapUI, TestComplete, etc to write a script and execute the script.
Conclusion
The key difference between flash and other elements, as described above is that Flash is embedded in SWF files, while other elements are embedded in HTML files. This is why, compared to flash, HTML is simple to catch. You can learn more about Ant build and flash test in selenium through Selenium online training.
2 notes · View notes
questpondjava · 4 years
Text
What is Java ? Uses and Prerequisites
What is Java
This Java Tutorial is For?
What are Prerequisites to Learn Java?
Tools required for Learning Java
Creating a Hello World Program in Java
Uses of Java Programming Language
Types of Java Applications
What is Java
Java is a high-level programming language that was first developed in 1981 by a group of people led by James Gosling. The Language was first called 'Oak' however; it was later retitled as 'Java' in 1995. Java is the completely robust and platform-independent language that makes it the most popular choice among the developers.
This Java Tutorial is For?
If coding excites you but you are overwhelmed with a cumbersome material present on the internet, this is the place for you.
If you are a professional who is here to enhance your familiarity regarding Java, this tutorial will improve your knowledge with just theory but also with the practical programs.
What are Prerequisites to Learn Java?
It is important to know what a computer program is and what computer programming languages are. Let us define them before we move ahead.
Suggested Read: 100 Best Resources To Learn Java.
Computer Program: It is a set of instructions that performs a precise task. It is executed by a computer in its central processing unit.
Programming Language: It is a computer language designed to give instructions to the computer and fetch the results. It is also used to create programs to control the behavior of the computer and to present algorithms.
Tools required for Learning Java
In order to learn java efficiently, it is required to execute java programs on the computer, which requires the following software to be installed.
Java Development Kit (JDK).
Text Editor: Notepad / Eclipse
Creating a Hello World Program in Java
public class HelloWorld { public static void main(String []args) { System.out.println("Hello World! From Java" ); } }
Uses of Java Programming Language
There are numerous uses of java out of which some of them are as follows:
Operating Systems
Desktop Applications such as acrobat reader, media player, antivirus, etc.
Web Applications such as irctc.co.in.
Enterprise Applications such as insurance applications.
Mobile Applications, Embedded System, Smart Card, Robotics, Games, etc.
Tumblr media
Types of Java Applications
The Four major types of applications can be made with the help of Java Programming are:
1)Standalone Application
Standalone applications are also known with two different names i.e. desktop application or window-based application. These types of applications can be used only after installing them on that specific machine. In order to create standalone Applications, AWT and Swings are used. E.g. open office.
2)Web Application
Web Application runs on the server. It creates dynamic pages. There are several technologies such as, servlet, JSP, struts, JSF, etc. that can be utilized to create a java web application. E.g. Gmail.
3)Enterprise Application
Enterprise Application is distributed in nature. It has the advantage of high-level security, load balancing, and clustering. In Java, EJB is used for creating enterprise applications.
4)Mobile Application
Mobile Applications are run on mobile devices. Presently Android and Java ME are used for creating mobile devices. Furthermore, even gaming applications are made with the help of java. E.g. Picsart, Truecaller.
Also Read: 30 Best Java Developer Interview Questions
1 note · View note