C++ :: Determine Health Of A Power Transformer - Graphic User Interface?

Nov 27, 2014

I have a program I want to write that determines the health of a power transformer. I know the syntax of all the other code I might have to use but I'm not too sure of how to make it fit into a graphic interface like you see in any other windows program.

View 1 Replies


ADVERTISEMENT

C# :: Graphic User Interface - Dragging And Dropping Controls In Form

Mar 5, 2014

is there a difference when creating a graphic user interface dragging and dropping controls in the form and coding on source code, difference in a sense that the code will appear differently if the control is dragged then the code appears automatically on the source code as compared to typing it on source code?

View 2 Replies View Related

C++ :: Program To Check If User Presses Power Button On Computer

Jun 19, 2014

How you can make a c++ program that checks to see if the user presses the power button on their computer? And if so, how?

View 1 Replies View Related

C :: How To Create Graphical User Interface

Feb 25, 2013

How can i create a graphical user interface using c

View 10 Replies View Related

C++ :: Take User Input Selection Of Columns And Determine Array

Aug 29, 2013

I am writing code for a program that will take user input selection of columns and determine an array based on that.The number of columns will be user selected.The number of rows equals 3^(columns) <--exponent not XOR

- This is because each column has the possibility of having the numbers 0,1,or 2

For example, if the user were to select "4" columns, then the array would have 4 columns and 3^4=81 rows. Then I would like to populate this with all of the possible combinations of 0,1,2

i.e.
0000
0001
0002
0010
0011
0012
0020
0021
0022
0100
....
2220
2221
2222

how I would create the "For" Loop for this?

View 19 Replies View Related

C++ :: How To Set If Health 0 Game End

Mar 10, 2014

How i can set if health 0 game end?

#include <Windows.h>
#include <iostream>
#include <BluetoothAPIs.h>
#include <ws2bth.h>
bool Move(int xadj, int yadj);

void LoadMap();
void DrawScreen();

[Code] ....

View 3 Replies View Related

C++ :: Read User Input To Determine Different Discounts By Number Of Units Sold - Errors In Program

Jun 23, 2014

it will not run and im not sure why. I have a couple of errors, but I'm not sure why.

Here is my code.

//Reads input from user to determine different discounts by number of units sold

#include <iostream>
#include <string>
using namespace std;

int main() {
//Declaration and Initialization of variables
int quantity;
double discount,price = 99.00,totalCost;

[Code] ....

View 1 Replies View Related

C/C++ :: How To Accumulate Reduction In Health Points In The Loop

Feb 22, 2014

How to accumulate the reduction in health points in the loop. I have structured my program so it calls to 2 functions during the loop. These are the playerStrike() and computerStrike(). They seem to be looping well with the one exception that the counters reset back to 100 health points each time. I know it's reloading the original variable amount but how to prevent it from doing this.

#include <iostream>
#include <iomanip>
#include <cmath>
#include <ctime>
#include <cstdlib>
using namespace std;
//function prototypes
void playerStrike();
void computerStrike();

[Code] ...

View 3 Replies View Related

C :: Graphic Library For Plots (2D And 3D)

Dec 28, 2014

Any common and good library for plots ? (2D and 3D)

View 1 Replies View Related

C++ :: Embed Image With Graphic?

Apr 16, 2014

How can some one embed image in C++ with graphic?

View 2 Replies View Related

C++ :: Serialize And Deserialize Graphic Objects

Oct 30, 2013

I'm trying to serialize and deserialize graphic objects, but it doesen't work. What exactly is wrong? Here you can find the code (.cpp and .h):

void zeichenFeld::serialize(QFile &file)
{
vector<struct myDrawingObject *>::iterator pos;
QTextStream out(&file);

[Code].....

View 2 Replies View Related

C Sharp :: Graphic Pen 1 Sided Width?

Apr 28, 2012

I am drawing two circle (inner circle and outer circle) using DrawElipse method. I have created two pen object named OuterPen and InnerPen and creating Outer Circle using OuterPen and Inner Circle using InnerPen. Problem that I am facing is that when I increase the size of outer pen lets say 10px then it overlaps the inner circle and inner circle is hide. How can I increase the size of OuterPen outwards and not inwards so that it don't overlap the inner circle?

View 3 Replies View Related

C++ :: VGA VRAM Graphic Mode Reading / Writing Pixels?

Jan 21, 2013

tell me where the errors in the below code are?

Extra info:

getrowsize() gives the size of a row in bytes (see VGA CRTC register).
getVRAMMemAddrSize() gives the size of a pixel in memory (1=byte,2=word,4=dword)
set/getBitPlaneBit(startaddr,plane,offset,bit[,on when writing]) sets/gets a bit on a specific bit plane offset (start addr is the start address register from VGA,
plane is the plane to read/write,
offset is the offset within the plane,
bit is the bit to read/write (0-7),
[on(when writing) is the value of the bit)]

[code]....

View 2 Replies View Related

C++ :: Exponential Power Function

Nov 13, 2013

Main is supposed to be sending values to the power function.Write a prototype and function for calculating powers of numbers.This version should have an integer return type and take two integer inputs, for the base and the exponent. It should do the following:

• handle negative bases
• return an error on negative exponents (we’re not doing those yet)
• handle zero exponents

Call your function from a nested loop in main(), which calls the function using every combination of negative, zero and positive numbers for both base and exponent. This will test your function without the user having to input all the data.Any code which calls the library pow() function will lose half of the assignment points.

#include <iostream>
using namespace std;
int power (int, int);
int main() {
int size = 10;
int test[size];
int base;

[code].....

View 1 Replies View Related

C++ :: Compute And Output Power Set

Oct 30, 2013

I am trying to do a compute and output a power set program. The numbers will be input through a file. How to do a power set. Here is my code :

#include <iostream>
#include <fstream>
#include <string>
#include <ostream>
using namespace std;
int main () {
string array[21]; // creates array to hold names

[Code] .....

View 1 Replies View Related

C++ :: Creating Recursive Function That Will Print Out A Number To A Power

Apr 9, 2013

I am trying to create a recursive function that i can call on in order to take a user inputed base and exponent and give final answer this is what i have but im completely lost after this i dont even know how to continue. What i have so far

#include <iostream>
using namespace std;
int Exp(int x,int y){
if(base <= 1 || exp == 0) return 1;
if(exp == 1) return base;
int main(){
int number, exp;

[Code] .....

After i set the base situations im not sure how to get the function to make the function take the base to the exponent recursively.

View 3 Replies View Related

C++ :: Lagrange Interpolation Formula - Substitute Values Into Power

May 7, 2013

I did a function for lagrange interpolation formula. However i`m stuck on how do i substitute values into the power. Here is my code snippet :

for(int i=1;i<getSecretShare+1;i++) {
//calculateValue=getSecret+(10*p)+(2 * pow(p,2));
int storeThreshold=getThreshold;
calculateValue=getSecret+(10*i)+(2 * pow(i,2));
calculateFinalValue=calculateValue % 17 ;
cout<<"the calculated value is "<<calculateFinalValue<<endl;
}

The formula that i want to implement is that a + a1x^1 + a2x^2 + a(t-1) ^t-1

I have gotten the substitution of the x value out. However, i am stuck on how do i calculate the values according to the threshold which the user keys in. For example if the user keys in 3.

It will into account the no. of shares to generate which is for example 5 in this case, then it will then take into account the threshold keyed in , which is 3, i will then calculate using the formula using the no. of shares and also threshold.
if the threshold is 3 and the number of shares to generate is 5. I should have the following:

y(1) = 13 + a1(1)^1 +a2(1)^2
y(2) = 13 + a2(2)^1 +a2(2)^2

the power depends on the threshold which is t-1, 3-1 =2

So I will have to generate two a values based on that and also calculate them according to the power that is dependent on the threshold the first value being to the power of 1 and the 2nd being to the power of 2 if the threshold is 4.

Then I will generate 3 a values and then calculate them :

y(1) = 13 + a1(1)^1 + a2(1)^1 + a3(1)^3

and so on..

View 4 Replies View Related

C :: Detect CPU Power Button Press Event In Console Application

Feb 5, 2015

I am using Windows 7 32bit OS and want to detect the CPU power button press event in my console application developing in C language.

I configured the power button setting to "Do Nothing" which is in "Choose what the power button does" options in Control Panel->Hardware and Sound->Power Options. So now i want to detect this power button press event and do some processing in my application then i will initate shut down from application itself. Looking for windows API details which will detect the power button press event.

View 2 Replies View Related

C++ :: Equation That Determines The Lowest Possible Cost For Laying Power Line

Apr 9, 2013

I need an equation that determines the lowest possible cost for laying power line.

The variables are as follows:

1. The width of a river
2. The distance a factory is downstream from a station on the other side of the river.
3. The cost for laying line underwater.
4. The cost for laying line on land.

All these variables will be user input each use of program.

View 4 Replies View Related

C# :: How To Manually Control The Temperature Of High Power Leds Using PID Controller

Mar 20, 2015

how to manually control the temperature of High Power Leds using PID controller. I have two GUIs,one reads the temperature from the Led while the second is used to ON/OFF the Leds and at the same time controls the Led brightness using slider control.The GUI that reads the temperature has a PID controller application on it.The output from this controller is what i want to use to increase or decrease the Led brightness which invariable changes the Led temperature.How to go about using this PID controller to control the Led brightness is what i have not been able to grasp well.The slider on the GUI is scaled from 0% to 100%.My thinking is that the output from the controller should be in percentage which will make me to adjust the slider accordingly.My question is that will this type of arrangment produce an output that will efficiently control the Led brightness. how to accomplish that. Attached to this post is a modified code of a tutorial on PID controller which i found on the net. a tutorial on how to develop a graph. i wish to display the Setpoint,Process value and the output value on a graph.

View 2 Replies View Related

C++ :: Program To Find Shortest Path Between Vertices Using Matrix Power Multiplications

Feb 24, 2013

given matrix A find shortest path between vertices using matrix power multiplications untill u get nonzero values,use adjacency matrix

View 1 Replies View Related

C# :: Static In Interface

Jul 1, 2014

I have the following scenario: I plan to have an xml configuration file.I have a trader that lunch few strategies, each have different configurations. I plan to have all configuration reside in the same file as different nodes.

Now I want that each strategy will hard code the name of node it will loop up for its parameters. Since those paramters are requered for the init and I use DI (configuration are passed in the constructor) I want to make it static.

So this would be something like.

public class Strategy: Base_strategy{
public const string _conf_name = "XXX";
public static string get_conf_name(){

[Code]....

Since other people will code strategies, I want each strategy to implement this static function. I wanted to do this in an interface so that anyone coding new strategy,implementing the base strategy will have to code this static function as part of the contract.

View 5 Replies View Related

C/C++ :: How To Interface Database With ATM Project

Jun 5, 2014

I had a project to create an ATM with a database of 100 customers, i wasn't able to interface the real program with the database. I have submitted the project already. Here is the database and the ATM program

#include <stdio.h>
int main(void) {
int account, pin;

[Code]....

View 1 Replies View Related

C/C++ :: Use Analog Device Through USB Interface

Sep 25, 2014

I am supposed to write a C program to send through USB interface to the analog device AD9914. Now I am doing the USB interface part where my computer has to detect the AD when it is plugged in and send the signals to it. I have to write the program to detect the device when it is plugged in. What kind of functions can I use? I know that the registry stores the device when it is plugged in. What functions are available to read?

View 2 Replies View Related

C++ :: Impact Of Interface Changed?

Oct 28, 2014

I am not 100% confident that changing the existing interfaces will not be error-prone. Should I discard the new changes for ease of use or Adapt to new changes but having a higher risk of introducing new bugs?

old

Code:
///ContactResultCallback is used to report contact points
structContactResultCallback {
short intm_collisionFilterGroup;
short intm_collisionFilterMask;

[Code] ....

New:

Code:
///ContactResultCallback is used to report contact points
structContactResultCallback {
short intm_collisionFilterGroup;
short intm_collisionFilterMask;

[Code] ....

View 1 Replies View Related

C :: Low Level Library To Interface With The Mouse?

Mar 6, 2015

I want to track the mouse movement. I know that GTk+ provides some powerful libraries for creating GUI, that will, among other things, enable me to write handlers for mouse movement events, but I'm looking for a simpler, more compact capabilities for now.

Is there a low level C library that will enable me to interface with the mouse?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved