instruction
stringlengths
71
95.1k
I'm a newbie in servlet API. I have a test task to create a very simple web app with one home page and an authorization form. The requirement is to use filter somewhere in my app. Given that it's a super simple app, I implemented basic login and registration functions right in my filter (it was a much simpler way for m...
In order to get a hang of the ECS paradigm of game making, I decided to try my hand at making a clone of Tetris. I am using the specs crate for Rust in order to facilitate this. The game is on a non-standard 10x10 grid, played in the terminal (although the rendering function is omitted because it's 100 lines long and n...
I'm a bit of a novice in terms of coding. I have to print to the console any tweets from a file that mentions a specific word like "Uber". This image below is what I have done so far. It prints how many times uber is mentioned in a line. But I need it to print the actual tweets themselves. else if (choice == 4) {...
I wrote this as an aid to count money that is in a cash box. are there any flaws in the code or any improvements I can make. from decimal import Decimal def moneyfmt(value, places=2, curr='', sep=',', dp='.', pos='', neg='-', trailneg=''): """Convert Decimal to a money formatted string. places: ...
https://leetcode.com/problems/merge-two-sorted-lists/ Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: Input: 1->2->4, 1->3->4 Output: 1->1->2->3->4->4 using Microsoft.VisualStudio.TestTools.UnitTesting; namespace So...
I have a simple brute-force search function: function run_query(search_data::Vector{Float64}, query::Vector{Float64}, search_f::Function)::Tuple{Float64, Int} current_best = Inf loc = -1 q_len = length(query) for d_i in 1:(length(data) - q_len) dist = search_f(data[d_i:d_i+q_len-1], query) ...
The following code clears 11 columns that contain lists that are used for data validation on another worksheet. This list is constantly changing due to records being added/removed from the source data. Basically I'm checking every value in a column, and if it meets all of my criteria I'm adding it to my data validation...
Rarely is the exact value of a double needed to be printed and only its leading significant digits, after rounding, are needed. It is a curiosity to see the exact value of a double as all finite double are exact. (Even if the math used on them generates mathematical approximation.) An exact decimal output can be used...
I was given this problem during an interview. And I solved it using Python. Would like to get feedback to see how I can improve my interview response. Busiest Time in The Mall The Westfield Mall management is trying to figure out what the busiest moment at the mall was last year. You’re given data extracted from th...
I would like to receive feedback on my coding interview for the following problem: Bracket Match A string of brackets is considered correctly matched if every opening bracket in the string can be paired up with a later closing bracket, and vice versa. For instance, “(())()” is correctly matched, whereas “)(“ and...
I was given this question during an interview. It is similar to two sum problems and I would like to ask for feedback for my solution. Merging 2 Packages Given a package with a weight limit limit and an array arr of item weights, implement a function getIndicesOfItemWeights that finds two items whose sum of weigh...
I have a simple task that I can't find an elegant solution to. Say I have two arrays and I want to find which one is shorter and create variables for both their lengths (specifying them as long and short). Here's an inelegant way to do it: l1 = len(arr1) l2 = len(arr2) if l1 < l2: short_arr = arr1 long_arr = a...
For a programming challenge I was doing, I needed to traverse a list of lists, and while writing the standard 2D traversal function, I thought why not generalise it, so I did. Here's my best effort: My Code def rTraverse(lst, f = lambda x: x): #Traverse a list and any of its (non self referential) sublists recur...
I've written a function to sort an array that interweaves an arrays values in the way of if you had two separate arrays [1,2,3,4,5] on one side and [6,7,8,9,0] on the other and it becomes [1, 6, 2, 7, 3, 8, 4, 9, 5, 0]. The code works, but I'm wondering how it can be cleaned up and be more performant without the need f...
I've been tasked with writing a windows form application that offers some options to modify the drawing of shapes within another window. I have very little experience with event-driven programming and I'd like to improve my skill. using System.Collections.Generic; using System.ComponentModel; using System.Data; using S...
I'm working on AI tic-tac-toe that computer make a move and I wanted to know that I correctly implemented the minimax algorithm. Please someone check my code to identify a problem or any kind of bug. Any help would be greatly appreciated. I wanted to know that my code is correctly running the minimax algorithm accordin...
I am exporting a List of virtual servers to a CSV file. The users submits filters and the applications generates FilterDTOs containing a map of the attribute and the corresponding value. The idea was to 'undock' the filter and the simple DTOs that contained all the variables from the export, so the export does not need...
I have to: 1) Apply the Observer-Observable pattern to the original code. 2) starting from the original code, I have to suppose that the modification of the array fields (slot machine numbers) should be done in parallel by 3 NumberGenerator threads instead of just one. My output seems to work fine but I'm wondering if ...
I am a beginner Python developer and I wrote a python script which reads releases data from Github for a specific release of a repository and write those release details to a specific file in google sheet. I used Github package for reading data from github API and gspread package for writing data to google sheet file. ...
I am currently developing a Task Scheduler to run different methods at a certain time. In general it is a Spring-boot application an task execution/scheduling is just a very tiny piece of the whole project. My idea is to define several Runnables that execute depending on a CronTrigger. In the Runnable I create an obje...
I've following code that insert single row in if (rows == 1) { part and inside loop it is batch insert. So I'm thinking to skip single insert and have it in batch insert code. private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { int rows = jTable.getRowCount(); if (rows == 1) { ...
I have created a simple version of the classic game Hunt the Wumpus in C++. The rules for the game can be found on Code Golf SE. The rules of the game are (from PPCG): The player starts in a random room on an icosahedral map (thus there are 20 rooms in total, connected to each other like the faces of an icosahedron, a...
I'm new to programming and even more new to C++. Anyway, I started to watch and read some tutorials and resources I found on the web. I created this program to offer the user a coffee, expecting an answer of O (for "oui") or N (for "non"): #include <iostream> #include <string> using namespace std; int main() { ...
I'm looking for improvement / advice / reviews on how I can improve this code. I feel like there is a better way or more efficient way of doing this and I am over looking it. The Plugin I made is very simple: It stores a list of Postcodes that the admin inputs into a textarea - 1 Per Line. Plugin creates a text input ...
The following code is part of the front-end of a micro webservice for users to allow them to register MAC addresses of their network devices and administrators to enable those and to generate a dhcpd.conf file for a firewall application. You can find the whole project here. macreg.js /* (C) 2018 Richard Neumann <ma...
The aim of the program is to read the yahoo finance website in order to find potentially profitable stocks based on their past performance. I have some code that works but I think it is of poor quality. I am trying to scrape data from a website. If the internet connection fails, the program should wait 5 seconds before...
Codewars Kata in Question. An anagram is a word, a phrase, or a sentence formed from another by rearranging its letters. An example of this is "angel", which is an anagram of "glean". Write a function that receives an array of words, and returns the total number of distinct pairs of anagramic words inside it. S...
I have written a program in golang which checks the mongodb is running or not using commands. But I'm not sure that the program is sufficient or there is something that needs to change in the program. Can you review my code so I can be sure that my code does not have any error or doesn't break if there is any problem a...
I have a task to write the function: int read_palindrome(); // input comes from stdin which will read one line from standard input and returns 1 if the line is a palindrome and 0 otherwise. A line is terminated by the newline character (’\n’) and the does not include the newline. There are requirements to be met: Th...
I programmed a chess AI in Python. It uses the alpha-beta algorithm with move ordering. I want it to be able to look further than depth 4, without increasing calculation time. I am wondering how I possibly could improve the efficiency of my code. I have a feeling that my code does a lot of unnecessary calculations. kin...
This is a simple and clean script for sorting a specific column in a table. You could edit and parametrize it to add more customization, but I wanted to share the base concept. Base concept (I think its a pretty cool 3 line code): t = document.getElementById('myTable'); [...t.tBodies[0].rows] //Transforming HTMLCollect...
I have a folder with zip files that contain CSVs for each day. Each CSV contains rows with IPs and a company ID. I want to calculate a distribution of the number of firms accessed. Meaning that I want to know how many users accessed only 1 firm, 2 firms and so on. The code asks for a specific date interval and then on...
To support a demonstration I'm going to be doing, I need a short C# program that can be unit tested. I decided to make a FizzBuzz split into a few methods: using System; namespace FizzBuzz { class FizzBuzzer { public static void Main() { FizzBuzzer fizzBuzzer = new FizzBuzzer(); ...
Would like feedback on my SQL (1) efficiency and (2) readability, and if the conditions I featured in my CASE statement could be transferred to a join, etc. Here's the problem I'm solving: Say you have a table bst with a column of nodes and column or corresponding parent nodes: node Parent 1 2 2 5 3 ...
I am teaching programming (in this case - 1 on 1 tutoring of a teenager interested in programming) and this code will be a final stage of a progression toward program generating a nice image of Sierpiński's triangle. Any comments how this code can be improved are welcomed! But problems with unclear code that break stan...
Purpose: After you've submitted a resume and cover letter for a job position, you haven't heard anything back, so you decided to send a follow up email. The script generates the follow up e-mail based on this template. """ followupemail.py A script to generate a follow up e-mail after a job application submis...
I've attempted to solve a small coding challenge I found online as a nice way to begin learning Rust. The largest challenge I feel going in with Rust is how working with strings is so fundamentally different from any other programming language I've used before. The challenge was this: Write a function that takes two s...
I started learning Python 2 about a week ago, using Codecademy and Stack Overflow answers to help me learn. I wrote a code to calculate the user's free time based on user sleep and work time. It also lets the user decide whether to see percentage of free time. It's not fancy; I never intend to actually use it. It works...
I made a password generator class in C++. I am not as familiar with C++ as I am with C, so I am looking for ways to move to a C++ mindset. I am also trying to use embedded practices like avoiding allocating memory on the fly and other non-deterministic stuff. I'll include the source file first, followed by the header, ...
At work, I find myself frequently crunching CSVs with headers prone to change names and location. I have a solution, but with no opportunity for code review I was hoping SE could offer a look header_indexer was built to allow me to us the same parsing code among spreadsheets where the data is known, but it's location p...
Just had this as a practice test problem and I'm curious how to optimize for performance. Thanks! The greatest common divisor (GCD), also called the highest common factor (HCF) of N numbers is the largest positive integer that divides all numbers without giving a remainder. Write an algorithm to determin the GCD of N p...
I've tried implementing Locality Sensitive Hash, the algorithm that helps recommendation engines, and powers apps like Shazzam that can identify songs you heard at restaurants. LSH is supposed to run far quicker than vanilla Nearest Neighbor, but alas mine is 10x slower. Can I get a hand? Times: nearest neighbor: 0.00...
I have coded a web-based Excel file builder and sender, that serves the file over Http(example links in code). I would like to see improvements and any suggestions you might have. using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Spreadsheet; using System; using System.C...
I wrote a updater_thread() and a reader_thread(), and used lock_guard to protect a global instance. Question I've never used lock_guard. In this code, is lock_guard used properly? Is this code thread-safe? Code #include <iostream> #include <thread> #include <mutex> #include <iterator> #include <algorithm> #include ...
This is built with Python 2.7.15. The goal of this script is to count the number of words spoken by each Senator on the floor of Congress between given dates. It pulls from the Congressional Record, cuts out the sections not spoken on the floor (eg lists of Amendments) and returns a count of words by senator. The curre...
I was solving this problem at Pramp and I have trouble figuring out the algorithm for this problem. I'll paste the problem description and how I kind of solved it. It's the correct solution. It is similar to the edit distance algorithm and I used the same approach. I just wanted to see what are other ways to solve th...
i attempted to create a way (not sure if already implemented by someone) by which when i update a property of an object. it returns a new reference of the object with the new value. i have a usecase in my mind for that purpose you can say i want to use it. for some example reference you can consider redux reducer whe...
Let's assume I have a class PhoneNumber which accepts phone numbers in the format "123-456-789" (3 groups with 3 digits each, split by dashes). Now, I want to extend the class PhoneNumber with a static Parse and TryParse method. What is the best way to do so while keeping following requirements: Code reuse between Par...
I'm not much familiar with Task Api programming in C#. Can anyone review my following code? The following is a ElapsedEventHandler of a System.Timers.Timer. In this event, I'm getting pending notifications from database and sending them. After I send the notification, I update that notification in database by setting H...
Given a list of numbers and a number \$k\$, return whether any two numbers from the list add up to \$k\$. For example, given [10, 15, 3, 7] and k of 17, return true since 10 + 7 is 17. How can I improve the solution below? package com.alpha; import java.util.HashMap; import java.util.Map; public class DailyCodingProb...
I registered a CustomMapAnnotationView and a ClusterView: the first one simply extends MKMarkerAnnotationView and overrides annotation this way: override var annotation: MKAnnotation? { willSet { // CustomMapAnnotation is based on MKPointAnnotation if let c = value as? CustomMapAnnotation { ...
What am I doing? UDP/TCP server in Python (2.7 / 3.7) How am I doing? Using threads Where am I going to execute it? In a virtual machine running linux in AWS or Google Cloud or Azure () What is going to received? Streaming data simultaneously from many devices (we could say a few thousand devices) What con...
Coming from Python, JavaScript and PHP, I'd like to learn to write Ruby in the way it's "supposed to". Well-written Python code is called "Pythonic", so I'd like to know how idiomatic my Ruby code is. I've had great help from Rubocop, slapping my face if I didn't write properly, but I still feel some things can be done...
I am currently working on a bigger project where I found a part of it which seems very ugly to me from the code. I stripped out the algorithm and made a working code, so it can be reviewed. I have a data structure which contains several containers with several different objects: struct Data { std::vector<TypeA> a; ...
Now that async generators are available in the platforms I care about, I figured I'd try porting Python's ingenious with construct to JS as a utility. My first stab looks like this: type Index = string | symbol | number; function isIndex(obj: any): obj is Index { return ( typeof obj === 'string' || ...
I am trying to use aiohttp library in python to download information from url. I have about 300 000 urls. They are saved in file "my_file.txt". When I get web page, I extract pairs of a question and an answer from ask.fm. (it is a website where you can post an anonymous question to some user, and get an answer). And th...
I like Node.js and typescript a lot, but i'm still pretty much a newbie with streams. I know how to use them, but I have trouble understanding how the work, what are the consequences of using them, etc. I've made a wrapper (feel free to use it, it's on NPM) around the stream, using array like functions, while keeping t...
This program takes two numbers M(<10k) and N (<100) and finds the smallest number greater than M whose sum of digits = N. Additionally, as per the question's requirements, it prints the number of digits in the printed number. Example: M = 919 , N = 34 Required number = 7999 as 7+9+9+9 = 34 /** *Takes M...
I have modified my implementation of RFC 1951 "Deflate" compression to use two threads. One thread performs the LZ77 matching, looking for sequences of at least three bytes that occur earlier in the input bytes, the other thread does the rest - compression with Huffman coding. It works very well, giving a speed-up of a...
The first function makes 2 players const Player = (name,mark) => { return {name, mark} } let player1 = Player('Player 1', '<div>X</div>'); let player2 = Player('Player 2', '<div>O</div>'); The rest of the code which runs the game const gameBoard = (() => { board = [["","",""],["","",""],["","",""]]; let whichPlaye...
My task was to create a Python script and connect to various TLS sites and grab the expiry dates. I've done this with openssl and ssl modules just fine. In my mind I was wanting to create a web page as a dashboard. I've done that. It's as simple as it gets I think (which I am happy with): But I ended up doing a for lo...
My objective is computing a table of primes up to n, where n is a natural number passed as an argument to the prime_table function. Here is src/lib.rs: #![feature(vec_remove_item)] // Return a vector containing all the products between i and natural numbers beyond 2. // The vector only includes products which are not ...
After learning the concept of steganography, I've decided to code an application for it in PHP out of all languages, using the Least Significant Bit technique. A pixel of a colored image generally has 3 channels, one for Red, one for Green and one for Blue. 8 bits are usually used to encode the value for each channel,...
I am pretty new to Python. I am writing this program to randomly generate sentences based on the n-gram language. It takes me very long to run this with the large input file I have, so it is very hard for me to check my work. I guess my problem is that, when I need two words as the history and based on the count of wor...
This is likely my first useful piece of Rust code. Planning to crate-ify it. It works. #[macro_use] extern crate failure; use std::collections::HashMap; use std::fs::File; use std::io::prelude::*; use std::path::Path; use std::env::temp_dir; use mio::{Events, Poll}; use mio_httpc::{CallBuilder, Httpc, HttpcCfg, Simpl...
Given an array of integers, return a new array such that each element at index i of the new array is the product of all the numbers in the original array except the one at i. For example, if our input was [1, 2, 3, 4, 5], the expected output would be [120, 60, 40, 30, 24]. If our input was [3, 2, 1], the expected outpu...
I am trying to optimize my reducer code, preferably into one-liner with high-order-functions. Reducer should return new array with names of groups, with new number. Below are correct inputs and outputs: Input: | Output: | [] | ['A1'] ['A1'] | ['A1', 'A2...
I'm under no illusion that this is at all the best way or even a good way of doing this. It's simply a working solution. Tips, opinions, suggestions, insults, death threats, let's hear it. <?php require_once '../include/include.php'; include FUNCTIONS.DS.'functions.php'; $getPage = CurlPage($URL); $getPage1httpCode = ...
I am running a script to identify polygons that overlap with other polygons within the same layer. I have managed to do this with the code below but the problem is that it is very slow (about 3 seconds per feature). Is there anything I can do to improve its performance? arcpy.CreateFeatureclass_management("results.gdb...
I've got this code to loop through each cell in Column A and check the cell value. If the value matches the if criteria it moves the entire row to the correct Sheet and then replaces the Column A cell with an X. This makes a call to the server for every cell and I'm curious if there is a way for me to optimize it simil...
I have implemented below code for binary search tree implementation using shared pointer. At present, I have considered only integers. It supports insertion and deletion of values. Also, a print method is implemented for inorder traversal. Please review and provide your suggestions. class Bst { struct node { ...
SplitSort SplitSort is a rather simple Inv-adaptive and Rem-adaptive sorting algorithm described in Splitsort — an adaptive sorting algorithm by Christos Levcopoulos and Ola Petersson. The paper actually contains two algorithms: a smart out-of-place version, and a simpler in-place version which removes a few of the alg...
Good day. So, I need to find the number of integers between 1 and K (inclusive) satisfying the following condition, modulo (10^9)+7: The sum of the digits in base ten is a multiple of D Here is my code: k = int(input()) d = int(input()) count = 0 for i in range(1,k+1): hello = sum(list(map(int,str(i)))) if (he...
I've created a simple demo that creates new elements on a page. After clicking the button, new elements are created, and when clicking remove, the relevant element is deleted. Each element has a 'data-id' data attribute, which matches the id object property that's also created. Check out the code on this page, or see t...
So I made a simple shellcode that will kill all your process. Now I would like to know, can it be done in some better way? It contains 13 bytes. Thanks for all your feedback Assembly: global _start section .text _start: xor rax, rax add al, 0x3e dec rdi push 0x9 pop rsi syscall Equi...
I needed a function for sorting two corresponding arrays. So I wrote this code to sort N corresponding arrays! The really "metaprogrammy" way to do it would be to use std::sort with a custom zip_iterator, but since zip_iterator's operator* returns a "proxy reference" type which is not Regular, and std::sort doesn't see...
I am making a Chip8 emulator and I started out with making a class for handling the memory map. So main the execution will read from this memory object and write to it. /include/Chip8.h #ifndef CHIP8_H #define CHIP8_H // File for keeping holding Chip8 system variables #include <iostream> #include <exception> namespac...
As an educational exercise, I would like to make this code more efficient, with fewer lines, without using other standard functions. The goal here is to convert a number to X base and display it, (sample for hexadecimal) including 0x0 => 0, or 0x4096 => 4096. int print_hex(int number, int base) { int i; ...
I have a resource (e.g., current program configuration) that I want to handle in a single class instance, but want to hide the fact that there is, in effect, a singleton class by using a proxy class. Reasons for not using a singleton directly include: don't want users of the class to have to change code if I move away ...
y is the value I am searching for. Is this the correct implementation for binary search? y= 3 x= range(0,100) left = 0 right = len(x)-1 mid=int((left+right)/2) while x[mid]!=y: if x[mid]>y: right = mid mid=int((left+right)/2) if x[mid]<y: left = mid mid=int((left+right)/2)
Extremely rough and laggy clock I purposely made the timer interval less than a second in hopes for making things run smoothly but it even worsened the situation! I thought of making the seconds hand run on milliseconds but it still didn't do the job and there was difference between the clock and the label text. public...
I want to implement classes in a project that will support the loading of configuration data from a JSON file. The JSON file is in the following form. Please be as critical as you can be. I'm a junior developer and I want to learn how to write clean code. [ { "teamIdentity": "team01", "projectIdentities": [ ...
I feel like this code can be written in a better way but don't know how. Any help would be really appreciated. mod string_man { pub fn first_ch(txt: &String) -> char { txt.chars().next().unwrap() } pub fn pigify(txt: &String) -> String { let frstch = first_ch(txt); match frstch { ...
I'm new in Go and excited with its easy-to-use concurrency implementation. However I'm not sure if I'm doing it right in Golang way. Consider the code where I spawn process(i int, ch chan int) every loop as separate goroutine. Then the result which comes from the channel will be consumed by consume(ch chan int, wg *syn...
So with OpenGL(and I'm assuming other GPU APIs) you create different buffers/programs/etc that live on the GPU and you are given a handle to them when created. For instance, if you want a buffer to store data, you must first generate it then you are presented with a handle to it to be used to push data to it as well as...
I'm very new to React.js and have to start converting an entire website at my work. It's fun, but I'm hoping to get some feedback about how I tackled building this navigation component as I don't fully understand best practices when it comes to structuring components as well as proper state and props management. I have...
This code checks if the given integer is a palindrome. If it is, prints given integer is a palindrome else, not a palindrome: from collections import deque def polindrome(input): d = deque() d.extendleft(str(input)) result = int(''.join(d)) if input == result : return input , 'is a polindrome' else : ret...
I need someone with experience to judge my first project to let me know what I have to work on. I recently started learning C++ using resources like Solo Learn and Bucky's tutorials on YouTube hoping to eventually gain enough experience to find a job in software development. #include <iostream> #include <string> using ...
I had implemented a URL shortener with Python and a database. Please review the database part of the code. The idea is to create an MD5 hash of the URL in question and then store it in a database. The hex digits of the MD5 hash is then encoded with a large base encoding i.e base 62 encoding or base 128 encoding to do a...
To teach myself how to do meta-programming using Prolog, I've been playing around with translating ABNF syntax into DCG syntax. I'm still at the lexing and tokenising stage, but hope to advance to the "yacc" stage soon. Using Json, since it is defined in ABNF at https://trac.ietf.org/trac/json/browser/abnf/json.abnf?re...
I am a java developer and I am trying to learn Go. I tried to make a simple code that take numbers from a .txt file and make print them in a prettier format. That is: 0613228745 -> 06 13 22 87 45 06.13.22.87.45 -> 06 13 22 87 45 06-13-22-87-45 -> 06 13 22 87 45 06 13 228 745 -> 06 13 22 87 45 0 613 228 745 -> 06 ...
I am somewhat new to programming. I've written a program that takes user input accepting voltages and resistors, and calculating total resistance/current/voltage in the circuit. I am looking for ways to improve my coding, whether it be improving its time/space complexity or making better comments to make it more mainta...
I am creating an app in html5 for mobile, and I have all the information of the items inside an array with 887 entries. Each entry have 32 key with values, some with more than one value. I am using a for loop to iterate the array, and when I find the entry that match the html element it shows the item information with ...
I need to map a sequence of bits that represents a float into a sequence of bytes by this rule: the value 1 maps to the value 255 and the value 0 maps to the value 0. This is the code I have now: int FloatToBit(int *buffer, int startIndex, float value) { int fl = *(int*)&value; int i = 0; for (; i < sizeof(float)...
I'm trying to make a function that requests a number from 0 to 9 to the user and that is robust. I've been looking at code to guide me and most fail to find any of these situations, usually due to the use of cin: If the user enters spaces before or after the number, the entry is valid If you end the input (Ctrl+Z in W...
I wrote a memory bus struct in golang to allow systems to interact with each other without knowing anything about the receiver. This is for a game engine. I know it's not good to write games in garbage collected languages like golang, but I enjoy writing in golang so whatever. But since golang has a garbage collector ...
I recently became interested in back end web frameworks in python, but I didn't want to use django or flask. (I want to make something similar to django or flask) So I decided to make my own. This is what I have so far. I have been programming for nearly two years and I mostly do c++. But I would like to improve my pyt...
I've made a simple login API request which gets a token as a response. I had to use Toast a few times. Is is possible to make it with only two Toasts Successful/Failed? public void login(View view){ RequestQueue queue = Volley.newRequestQueue(this); String URL = "http://10.0.2.2:8000/api/login"; StringReque...
Based on this article, I wrote a small "Guess my number" game in Hexagonal architecture which interacts with a Java Swing GUI adapter. Any feedback is appreciated. Main.java package piovezan.hexaguessnumber; public class Main { public static void main(String[] args) { int numberToGuess = 5; GuiGue...
I am new to automation. I have automated few test cases for a mobile app using appium and wanted to know the areas where my code can be improved further. package org.fltmobile.easychecklist; import java.io.File; import java.net.MalformedURLException; import java.net.URL; import java.util.Arrays; import java.util.HashS...