241 Topics
|
|
Hi , i would like to include a normal conventiional function in to my obcetive c project. I have tried putting the body of the function outside the implementation section , inside the @implemenation section. I know it wont be part of the class i'm defining , but do i … |
|
Here is my first program I'm working on. I have built a framework here showing the sort of output and user interaction I would like during runtime, but it feels grossly oversized and unintuitive. Here is the code: # This is an advanced guess the number game. import random # … |
|
Write a function (seat_type) that reads an input from the user that represents a seat class. The user should enter F: for a first class seat, C: for a business class seat, or Y: for an economy seat. The function should validate the user input to accept only F, C, … |
|
I have tested out my procedure on my home machine. It woks pretty well I know there is output from the sql. Now I want to try it out on the host. It gives no output. Here is my php code $bob="call seeker($profound)"; if (mysqli_multi_query($conn,$bob)) { echo "<hr>"; echo "<table><th>Section</th><th>Author</th><th>Title</th>"; … |
|
# This is an advanced guess the number game. import random # The very basis of this game. import math # Used for math.ceil import time # Used to split up long portions of text. def errorDisplay(errorCode): if errorCode == '1': print('\n\n\nError ' + errorCode + ': unlockedGameModes outside of … |
|
Hey Everyone, I previously had an issue with a date display format. I have a different question that deals with displaying singular or plural words using a version of an if statement that displays an "s" or displays nothing based on how many comments there are in a specific blog … |
|
str1=new String(data,0,data.Length()) why the zero is used in the string function please explain me the what this line says??? |
|
Hello. I am curious if it is possible to create functions dynamically in such a way, that (1) the names of the functions to be retrieved from an array and (2) these names could be used also inside the functions. I have a code that is solving the first problem, … |
|
Write a program that performs the least mean squares optimization. Given a large collection of data of the form (x0 x1 x2 x3 d), your task is to determine w0 w1 w2 w3. The LMS technique finds these weights by starting with some assumed weights, such asw0=w1=w2=w3=0, and finding the … |
|
If my goal is to consider f1 and f2 to hold the numerator and denominator of two fractions and multiply f1(9,8) by f2(2,3). i don't understand how to write the MultipliedBy function if I only have two member variables in the class it's self. I feel like i'm just missing … |
|
Hey guys, I just wanted to let everyone know that functions can be used very constructively and there are more to them then most think. Okay this example function is actually pulled from a class of mine so it would probably make more sense in my class but it should … |
|
I can't seem to find the error in this code. I don't know if I constructed the codes correctly, assuming that the error is corrected, I could get the correct value? /* Function for Right Triangle */ #include<stdio.h> #include<conio.h> #include<math.h> #define p printf #define s scanf double rightTriangle(double x, double … |
|
Hi everybody, I have this really little piece of code wich I want to implement inside wordpress: http://jsfiddle.net/YPAy6/9/ I simply need how or where to put the "function" and how to call it from a post in wordpress. Any idea? really thanks! PD: I'm loading all scripts from google's cdn … |
|
|
So i have write the following code (above) and now for the second part i am required to apply the Complex Number into finding the voltage across the Resistor in a series RLC circuit. The following tasks : Create an executable program Resonant Circuit, which allows you to output the … |
The function i am writing below is made to time how long it takes to process a function. // return type for func(pointer to func)(parameters for func), container eg.vector clock_t timeFuction(double(*f)(vector<double>), vector<double> v) { auto start = clock(); f(v); return clock() - start; } This is the function i want … |
|
I have 2 classes. AddressBook and SingleAddress. AddressBook is supposed to contain SingleAddress. I'm omitting the #include and some of the extra functions. Here's SingleAddress.h class SingleAddress { private: string lastName,firstName,strAdd,city,country,email; int postCode,homeNum,mobileNum; public: SingleAddress( string s1,string s2,string s3, string s4,string s5,string s6, int i1,int i2,int i3); string toString(); }; … |
|
I'm coding an inventory program in C and I need the variable "stock1" in more than two seperate functions I'm not sure as to how they're supposed to be manipulated and read by the seperate functions nor do I understand how to declare them If I declare them as global … |
|
#include <stdio.h> #include <string.h> #include <conio.h> #include<stdlib.h> int fstock1, fstock2, fstock3; int opt1, opt2, cCost, length, gTotal; int stock1= 5; int stock2= 10; int stock3= 15; //--------------------------------------------------------------------------------------------- void welcome() { system ("cls"); printf ("\n ||||''|| . ...\n"); printf (" |||| ||| |||''|| '||| |||. .|| ||| .||''||.\n"); printf (" |||| … |
|
Hi there, I'm reading a book on Javascript and trying to understand a few concepts that are about hasOwnProperty(), propertyIsEnumerable() and isPrototypeOf(). I don't understand when and how these methods are used. That would so appreciated if someone can explain them to me in a nutshell. This example is from … |
|
hey all i am new to all this languages and Computer sciences so if you help me i am trying to write a code and its constantly giving me errors here is the code at line 10 , 102 , 115 tell me how to fix it.. waiting... #include<iostream.h> void … |
|
i want solution of a c prog using functions ie to find lcm and gcd using functions in same program but to find lcm we will be using formula lcm=(a*b)/gcd; please help me out this is my code if modifiction are to be done then please send me modified code … |
|
Below you will find a game I written in my spare time from college. Any and all critique welcome. I plan to expand this to a console RPG later, and eventually GUI. All in C++. BTW, nice forums. //============================================================================ // Name : Monster Shot.cpp // Author : Dave T // … |
|
I have to write a program that accepts data for a class and then ouputs it in the main. so far i have this. #include<iostream> #include<string> #include<fstream> using namespace std; ifstream infile; class animal { string species; string family; string phylum; string desc; static int count; public: bool readIN(const string … |
|
The code I wrote is supposed to show the billing amount. It compiles fine and gives no runtime errors but fails to provide any output and gives the "Improper selection. Please Choose R or P" error regardless of what letter is typed. //switch statements //The program compiles fine and does … |
|
|
i want to query my database using php count to count the number of values in a table then count which value appears more times than the others. Im new to this kind of thing. |
So the task is relatively simple; create a program that will generate a random number, and then prompt the user to input a number. If the is lower or greater than the generated number, a message will display whether you're lower or higher than the number. The program also records … |
|
Hey im just wondering if or how i can split up my services **IService** namespace Phpwcfconsole { // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together. [ServiceContract] public interface IService { [OperationContract] string KundNyKund(Variables.Kunder … |
|
Hello everyone, I'm just wondering if there is another of calling functions in a different php file without making the app run strangley. So what I have got are a few forms without specifying their action. <?php 1- checking for the fields 2- if they are not empty and so … |
|
I am currently in an introductory c++ class and am working assignment that sorts data. We recently covered structs and I decided to use structs to approach the problem rather than create 3 arrays to hold the information from our data file. The trouble i'm having is when i'm trying … |
|
So I'm trying to right a code to output some simple data using classes. Everything works accept the retail price function. It's suppose to calculate and output the retail price but it only outputs 0 no matter what numbers I eneter. Can anyone give me some suggestions on how to … |
The End.