[Solved] How to get the smallest list?

I dont know how you named your Lists, so I’m just going to call them List a, b, c and d. public List<?> getLongestList(List<?> a, List<?> b, List<?> c, List<?> d) { if (a.size() >= b.size() && a.size() >= c.size() && a.size() >= d.size()) return a; if (b.size() >= a.size() && b.size() >= c.size() && … Read more

[Solved] “callback is not defined” in node js

You don’t need a callback in this case, because you’re at the end of your route, so to speak. So instead, you could do something like handle it with sending an error message to your rendered page. var express = require(‘express’); var router = express.Router(); var mysql_db = require(‘../db/db_con’)(); var pool = mysql_db.init(); /* GET … Read more

[Solved] How to create geometric shapes in html

I’m sure there are more elegant ways to accomplish what you’re looking for, but it can be accomplished using SVG, z-Index, Opacity and Clipping. Run the code and I think you’ll see it matches. The colors might not be exact but they’re close enough to show you what goes where. You can also separate the … Read more

[Solved] when I pressed the login button without entering username & password, browser’s top left corner display message like this “Invalid Info” [closed]

Not sure what you want to do tho but maybe display a simple alert ? function showAlert(){ $( “#dialog” ).dialog({modal: true}); } <link rel=”stylesheet” href=”https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css”> <script src=”https://code.jquery.com/jquery-1.12.4.js”></script> <script src=”https://code.jquery.com/ui/1.12.1/jquery-ui.js”></script> <body> <input type=”button” value=”ClickMe” onClick=’showAlert()’> <div id=”dialog” title=”” style=”display: none;”> <p>Alert box. wrong username password!.</p> </div> </body> 3 solved when I pressed the login button without … Read more

[Solved] why am I getting this erroneous output?

If i understand the problem correctly it should take first int then scan the n lines and creating sort of 2 dimension list/array or so then should accept int of questions about what is in position (x,y) in this 2 dimensional object covering what is out of bounds as an “ERROR!”. import java.util.ArrayList; import java.util.Scanner; … Read more

[Solved] Extract all numbers in brackets with Python [closed]

Regex can do that: s = “asd[123]348dsdk[45]sdhj71[6789]sdfh” import re s_filter=” “.join(re.findall(r”\[(\d+)\]”,s))) print(s_filter) Output: 123 45 6789 Pattern explained: \[ \] are the literal square brackets (\d+?) as as few numbers inside them as capture group re.findall finds them all and ‘ ‘.join(iterable)combines them back into a string. 2 solved Extract all numbers in brackets with … Read more

[Solved] Why do I get a wrong answer in this C code?

You are invoking some very undefined behavior. The variable a in the function is at an address (probably on the stack) that is normally only accessible to the function. Decrementing that address results in an undefined location. You don’t know what’s there at all, so you have no idea what incrementing it by 8 will … Read more

[Solved] Why is the circle not round bootstrap and fontawesome?

Introduction Bootstrap and FontAwesome are two of the most popular web development frameworks used to create responsive websites. They are both powerful tools that allow developers to quickly and easily create beautiful, modern websites. However, one issue that can arise when using these frameworks is that the circle elements may not appear round. This can … Read more

[Solved] I keep getting error that says main is not defined. I just want it to run. It’s supposed to let me enter the description, price, and unit [closed]

I keep getting error that says main is not defined. I just want it to run. It’s supposed to let me enter the description, price, and unit [closed] solved I keep getting error that says main is not defined. I just want it to run. It’s supposed to let me enter the description, price, and … Read more