# Month February 2009

## [Solved] function not stopping [closed]

Your problem comes from a bad use of switch See Switch/Case documentation. Your menu switch/case will triggered every cases switch(1) { case 1 : cout << ‘1’; // prints “1”, case 2 : cout << ‘2’; // then prints “2”…

## [Solved] Split string by n when n is random

I figured it out. string = ‘123456789’ splitted = [] prev = 0 while True: n = random.randint(1,3) splitted.append(string[prev:prev+n]) prev = prev + n if prev >= len(string)-1: break print splitted 0 solved Split string by n when n is…

## [Solved] Phone number validation regex for length and numeric values [duplicate]

Try the regular expression ^\\d{10,15}\$ Here \d is a predefined character class for digits{10, 15} quantifier stands for a repeat of 10 to 15 times of the previous pattern Ex: String input = “1234567890”; Pattern pattern = Pattern.compile(“^\\d{10,15}\$”); if (pattern.matcher(input).find())…

## [Solved] how to break 10 digit number into two 5 digit number in c?

If you have char arr[10] = “1234567890” as per your question, note that it is not a string since it has no room for the NUL terminator (would need size 11, or left empty [] for the compiler to count…

## [Solved] Formatting a number with exactly two decimals in JavaScript

To format a number using fixed-point notation, you can simply use the toFixed method: (10.8).toFixed(2); // “10.80” var num = 2.4; alert(num.toFixed(2)); // “2.40” Note that toFixed() returns a string. IMPORTANT: Note that toFixed does not round 90% of the…

## [Solved] Explain the javascript

This looks a bit like minimised code, where function call are often shortened by creating lookup tables, so you can save some bits on long function calls like Element.dispatchEvent and instead minimise it to e[l(p)]. The variable _0x76ed32 holds the…

## [Solved] How to add a button to my PHP form that deletes rows from my MYSQL database [duplicate]

In your html view page some change echo “<td><a href=””‘>Delete</a></td>”; like bellow: <?php while(\$row = mysql_fetch_array(\$result)) { echo “<tr>”; echo “<td>” . \$row[‘name’] . “</td>”; echo “<td>” . \$row[‘id’] . “</td>”; echo “<td>” . \$row[‘rollnumber’] . “</td>”; echo “<td>” .…

## [Solved] How to retrieve integer value from field in selenium?

Looking at your code you are trying to print the element itself. System.out.println(FatherNum); If you want to print the value of that field , you can do it by : System.out.println(FatherNum.getAttribute(“value”)); OR String Fathernum= FatherNum.getAttribute(“value”); System.out.println(Fathernum); See the doc for…

## [Solved] How do I generate number pattern in triangular form

Fairly simple: use two loops, one for counting up and one for counting down. Print literal “0” between the two. #include <stdio.h> int main() { for (int i = 0; i < 10; i++) { for (int j = 10…

## [Solved] How do I generate number pattern in triangular form

Introduction Generating number patterns in a triangular form can be a fun and creative way to explore mathematics. It can also be a great way to practice problem-solving skills. In this article, we will discuss how to generate number patterns…

## [Solved] How to retrieve integer value from field in selenium?

Introduction Retrieving integer values from fields in Selenium can be a tricky task. Fortunately, there are a few methods that can be used to make this process easier. In this article, we will discuss how to retrieve integer values from…

## [Solved] How to add a button to my PHP form that deletes rows from my MYSQL database [duplicate]

Introduction Adding a button to a PHP form that deletes rows from a MySQL database can be a useful way to manage data. This tutorial will provide step-by-step instructions on how to add a button to a PHP form that…

## [Solved] Explain the javascript

Introduction JavaScript is a scripting language that is used to create interactive web applications. It is a powerful language that can be used to create dynamic web pages, create games, and even create mobile applications. JavaScript is a popular language…

## [Solved] Formatting a number with exactly two decimals in JavaScript

Introduction Formatting numbers with exactly two decimals in JavaScript can be a tricky task. Fortunately, there are a few different methods that can be used to achieve this. In this article, we will discuss the various ways to format a…

## [Solved] how to break 10 digit number into two 5 digit number in c?

Breaking a 10 digit number into two 5 digit numbers can be a tricky task. However, with the right approach, it can be done in C programming language. In this article, we will discuss the steps to break a 10…