578 Topics
| |
Just a couple of number tricks to check Go's mathematical abilities. If you have more, let's show them here. | |
Use Google's modern Go language (aka. golang) to convert a denary number (base 10) to a roman numeral. Just a good exercise to explore Go's map, slice, sort and for loop features. Note that in Go the **:=** is shorthand for assigning a type (by inference) and a value to … | |
For my own use, I'd like to develop a small Vector and a Matrix class, independent of some big libraries that exist out there. My question is: Should Vector and Matrix stay two independent entities or should I derive a Vctor frm a Matrix or a Matrix from a Vector? … | |
Greetings, I'm working on a class project for fractions and I'm stuck and cannot figure out where to go from here. We have a mandatory driver file we aren't supposed to change. See below for example output and the output I am actually getting. **Sample Output** Enter numerator; then denominator. … | |
I am trying to sort averages of scores in a class by pupil, from highest to lowest. My data is stored in text files like this: Charlie:0 Seema:2 Amber:4 Paige:5 Amber:8 Keith:1 Charlie:8 Seema:0 Charlie:9 Seema:3 Paige:0 Paige:4 Paige:4 Charlie:1 Keith:5 Keith:3 Here is my code so far: with open("class … | |
I need to check my code has all these requirements. The requirements for “main()” are: a. Use an object. b. Declare all required variables. c. Output user information. d. Input the radius 1 and radius 2 to be used to calculate the area of two circles. e. Use object Circle … | |
Hi everyone i need some help down here. i am trying to connect multiple db and at the same time i want to sum the value of the column. what i have right now is this SELECT SUM(total) as branch1sales FROM icm.sales UNION SELECT sum(total) as branch2sales FROM hism.sales its … | |
| I'm sure this is simple, but I'm having a time trying to figure out how to add two fields from two different tables together. <?php include_once('conn/db.php'); $query = "SELECT SUM(`sold`) AS total FROM veggies"; $stmt = $con->prepare( $query ); $stmt->execute(); while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){ extract($row); echo "<small><u>Plants Sold</u>: {$total}</small>"; } … |
Python helps in real life situation to automate things. This program helps you to prep up your kids ability to go over/under ten, which is essential not only by itself, but also when calculating with bigger numbers. Program is not any special, but shows how useful Python can be in … | |
Good day guys, I would just like to share my code and wanted to do something about it. This code shows a loop inside a loop initializing a two-dimensional array named arr with elements [2] and [5]. Here's my code: #include <iostream> #include <conio.h> using namespace std; int main () … | |
The .Net Framework uses by default radians in its trigonometry calculations. Find out how to convert degrees to radians to use with C# | |
Hello. I need to write a program to evaluate a definite integral with Simpson's composite rule. 1. ![fb9ac9a01f247c8a0ed8a606b7c10f4a](/attachments/small/4/fb9ac9a01f247c8a0ed8a606b7c10f4a.png "align-left") I know there is a Simpson's rule available in Scipy, but I really need to write it by the following scheme. 2. ![239643044a08379e5fe3747e13b2834e](/attachments/small/4/239643044a08379e5fe3747e13b2834e.png "align-left") , where a, b - limits of … | |
You may be wondering what a superfecta actually is, and the answer is: the most dangerous and serious threat to business. To clarify, the superfecta as defined by secure cloud hosting outfit FireHost is a group of four attack vectors that comprises of Cross-Site Request Forgery (CSRF), Cross-Site Scripting (XSS), … | |
Hey there, I'm having trouble getting my program to read every instruction to then execute it, as well as displaying everything correctly. Right now my program displays mainly garbage and for now I simply want it to be able to successfully run a simple addition program, so any advice or … | |
Create a form that accepts scores from the user, displays the total, count, and average of the scores, and displays a dialog box that lists the scores.This application should check the number entered by the user to make sure it is a valid integer from 0 to 100. If a … | |
Hello every one Can I have a better algorithm to find the nth prime number, where 1<= n <=5000000. for e.g., 1st prime number is 2. 10th prime number is 29. 100th prime number is 541. 1000th prime number is 7919. 10000th prime number is 104729. 100000th prime number is … | |
| Hi Guys, I'm Using Python 2.7.3 This is my txt file: TimeStamp,Irradiance 21/7/2014 0:00,0.66 21/7/2014 0:00,0.71 21/7/2014 0:00,0.65 21/7/2014 0:00,0.67 21/7/2014 0:01,0.58 21/7/2014 0:01,0.54 21/7/2014 0:01,0.63 21/7/2014 0:01,0.65 21/7/2014 0:02,0.64 21/7/2014 0:02,0.63 21/7/2014 0:02,0.63 21/7/2014 0:02,0.64 . . . . 22/7/2014 23:57,0.53 22/7/2014 23:58,0.69 22/7/2014 23:58,0.61 22/7/2014 23:58,0.65 22/7/2014 23:58,0.59 … |
Hi, I want to Count the number of occurences of data in a table, then multiply it in a value from other table, After that I want to sum up the product of count and the value from other table, As of now, I cant count and then multiple but … | |
Hello programmers! After covering the basics of STL, I decided to complete the following assignment: `Write a function template palindrome that takes a vector parameter and returns true or false according to whether the vector does or does not read the same forward a backward.` So, for example, a vector … | |
Calculate the total area and volume occupied by a cylinder. Correct or not? #include <stdio.h> #include <math.h> int main() { float At, V, r, h; printf("\n ===========Calculate the total area and volume occupied by a cylinder============\n"); printf("\n the base radius.......: "); scanf("%f", &r); printf("\n Cylinder height.: "); scanf("%f", &h); At … | |
I was doing the class tutorial to have matrix multiplication from two dimensional arrays: X (3x2) and Y (2x3). package t7; public class Q5 { public static void main(String[] args) { int[][] matrix_X = new int [3][2]; int[][] matrix_Y = new int [2][3]; int[][] result = new int [3][3]; for … | |
Good Day. Call me Angel. I'm havng trouble with **Live Edit Table**. Appears not to be working for me. I have this system. A small rental system actually, that would save the details for the rented properties. Here's the actual table: <img src="https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-xpa1/t1.0-9/10314749_882248248457445_2787632760191268129_n.jpg"> (other columns are trimmed) The admin has … | |
Optimizing Matrix Multiplication One time consuming task is multiplying large matrices. In this post we'll look at ways to improve the speed of this process. We'll be using a square matrix, but with simple modifications the code can be adapted to any type of matrix. The straight forward way to … | |
hello python developers, i recently started working on a simple xml rpc application, the simple version is completly working but when i wanted to extend it and add some more functionality i ran into some troubles. i want to register functions from different classes as server methods, i thought i … | |
This snippet shows how to find the complex roots of a polynomial using python (tested with python 2.6). You need the scipy or numpy module. | |
I am a new to assembly and i am asked to multiply two 3x3 matrices and then show the given result. I am having problem in multiplication as mov al,5 mov bl,6 imul bl but how to print it?? i know the result will be in ax register but i … | |
| Here is a simple Polynomial class. Its purpose is to show how one can [B]simply [/B]create a Polynomial class without using abstract datastructures such as linked lists etc. Each term is printed out in order of its power - from highest to lowest. Inspiration was taken from a Java source … |
Don’t know if this is ever been done before, or even if it is a good way to do it. I’ll just await your comments if any. What I mostly found on the web is that if you want to define a polynomial you need to have an array containing … | |
Hello i am new to assembly please help me i want to write a program in Linux assembly which can multiply and divide real binary and hexa decimal numbers(e.g 11010.11001 & A56.B5). . Please help me as soon as possible i will have to submit the assignment by tuesday please … | |
I get an error when I try to compile my code. I can't figure it out. It says it's not declared but I think it is declared. // // // This menu-driven program is used to allow the user to choose // an application to be executed. // // // … |
The End.