# **OLD** # [URL=http://s127.photobucket.com/user/yoda3ddd/media/codemap_zps4115ff7e.jpg.html][IMG]http://i127.photobucket.com/albums/p158/yoda3ddd/codemap_zps4115ff7e.jpg[/IMG][/URL] The Data Namespace Core Friend Module Func Public OkButton As Button Public CancelButton As Button Public ProgBar As ProgressBar Private Sub ProgressLoop() Do Func.ProgBar.PerformStep() Threading.Thread.Sleep(1) Loop End Sub #Region "Constants" Public Const DataRoot As String = "C:\AFormData\" Public Const IMG_PATH As String = "C:\AFormData\img" Public Const LoadImage As String = "C:\AFormData\img\codemap_zps4115ff7e.jpg" Public Const LINE_TERMINATOR As String = ">>" Public Const LoadImageX As Integer = 0 Public Const LoadImageY As Integer = 0 Public Const LoadBarFailedMessage As String = "Loading Bar Denied" Public Const ResizeMessage As String = "Current Form Resizing" Public Const NoCommandMsg As String = …

Member Avatar
Member Avatar
+0 forum 6

I have the following code and i dont understand why P4(3,7)is giving returnvalue true (1) , since here 7(ConTemp.XYCoord[1]) is bigger than 5 (ReCoordRo.XYCoord[1]), so i would like to know a way to monitor the boolean Rechteck1.contains(P4), watch windows doesnt give me that option, so how do i go about it ? Thx #include <iostream> #include <array> using namespace std; class Punkt { public: int XYCoord [2]={}; void setupCoord (int x, int y){ XYCoord[0]=x; XYCoord[1]=y; } }; class Rechteck { public: Punkt ReCoordLu,ReCoordRo; double flaeche(double x, double y){ double xy=x*y; return xy; } bool contains ( Punkt &p){ Punkt *ConTemp1=&p; …

Member Avatar
Member Avatar
+0 forum 2

I need a boolean to be stored with a String (or possibly a Path, not sure which one I want to use yet). I thought about using a Map, so I did some looking around and found out that LinkedHashMaps are the only type of Map that stay in Order when you do something with them. I could use two arrays, but I'm sure theres something better to use. Usually I would just make a helper class that stores the String, or Path, and the boolean and make Objects of this class. I know I could do this, but what's …

Member Avatar
Member Avatar
+0 forum 12

I have the following struct definition: struct finfo { string filename; long fsize; bool operator() (finfo i, finfo j){return (i.fsize > j.fsize);} } fstruct; And the following vector definition: vector<finfo> fdata; In the code I use the following statement to sort the vector elements by fsize: sort(fdata.begin(),fdata.end(),fstruct); This works perfectly well, but how can I sort by the field "filename" when i.fsize = j.fsize ? (The vector is filled by reading directory information, and putting the filenames and filesizes in the appropriate fields in the struct. If the filesize is equal I want to sort the files alphabetically by file …

Member Avatar
Member Avatar
+0 forum 3

Question. Name the law given and verify it using a truth table. X+ X’.Y=X+Y My Answewr give below X | Y | X’ | X’.Y | X+X’.Y | X+Y 0 | 0 | 1 | 0 | 0 | 0 0 | 1 | 1 | 1 | 1 | 1 1 | 0 | 0 | 0 | 1 | 1 1 | 1 | 0 | 0 | 1 | 1 Prove algebraically that X + X’Y = X + Y. L.H.S. = X + X’Y = X.1 + X’Y (X . 1 = X property of 0 …

Member Avatar
Member Avatar
+0 forum 1

i want to understand that what is bolean data type in c++. I tried to my best but i can not understand boolean data type plz help me

Member Avatar
Member Avatar
+0 forum 1

I cant figure out how to check the array for AND and OR. please, help, i got stuck my code: import java.util.Scanner; public class BooleanProduct import java.util.Scanner; public class BooleanProduct { public static void main(String[] args) { Scanner input = new Scanner(System.in); int[][] A = new int[10][10]; int[][] B = new int[10][10]; int[][] C = new int[10][10]; int m,n,p,q; System.out.println("Enter number of rows for matrix A : "); m = input.nextInt(); System.out.println("Enter number of columns for matrix A : "); n = input.nextInt(); System.out.println("Enter number of rows for matrix B : "); p = input.nextInt(); System.out.println("Enter number of columns for …

Member Avatar
Member Avatar
+0 forum 3

import java.util.Scanner; public class BooleanProduct { public static void main(String[] args) { Scanner input = new Scanner(System.in); int n = 10; int[][] A = new int[n][n]; int[][] B = new int[n][n]; //Fill A and B int m,n2,p,q; System.out.println("Enter number of rows for matrix A : "); m = input.nextInt(); System.out.println("Enter number of columns for matrix A : "); n2 = input.nextInt(); System.out.println("Enter number of rows for matrix B : "); p = input.nextInt(); System.out.println("Enter number of columns for matrix B : "); q = input.nextInt(); System.out.println("Enter elements for matrix A (by rows): "); for (int i=0 ; i < m …

Member Avatar
Member Avatar
+0 forum 4

Hi, is more than a week that i try to resolve this error on my app but i can't... The problem is the following : I have a menu and submenu table and i show this records in this mageMenu.chstml (list of menus and submenus to generate the menubar of my site) called in my _Layout.cshtml THIS IS WORKING FINE What is not working are all the pages where the tables called are linked to the tables menu and submenu... (Example My table Magazine and the table FORUM both have a menuID and submenuID), when i run the pages with …

Member Avatar
+0 forum 0

I had a programme to write for college in Java. I have missed the class so I won't be getting marked on it but wanted to get it done as I have an exam next we. I am really stuck. I have to create a costInsurance () method taking in the surcharges for 3 conditions yearBuilt, numberOfRooms and hasASpa. I gave a shot at the ageSurcharge but have no idea if this is right or not? public class Hotel{ private String name; private String address; private int yearBuilt; private int numberOfRooms; private boolean hasASpa; public Hotel(String nameIn, String addressIn, int …

Member Avatar
Member Avatar
+0 forum 4

So we were asked to reproduce the function generator and oscilloscope as a virtual instrument for our final exam. But I'd like to focus on the function generator. The audio generator GW Instek GAG-809/810 has only a single button for the waveform wherein the user would just press it repeatedly to show the desired waveform (i.e., sine wave, square wave). Yeap, the audio generator only have the two waveform but our professor wanted us to add the generator's feature, that is, for the users to be able to display the wave into sawtooth and triangle wave. So how do we …

Member Avatar
Member Avatar
+0 forum 1

i have a database at the links. so the problem it still insert between the time some friends suggested to loop all the data 1st then validate but im confused here. **any help would be great ** <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></title> </head> <body> <?php mysql_connect("localhost","root",""); mysql_select_db("windsor_reservation"); if(isset($_POST['reserve'])){ echo $stime = ($_POST['stime']); echo '----'; echo $etime = ($_POST['etime']); echo '<br>'; $chk = false; $date = date("Y-m-d"); if($stime < $etime){ $q = mysql_query("SELECT * FROM time WHERE `date`='$date' AND `stime`>='$stime' AND `etime`<='$etime'"); $count = mysql_num_rows($q); if($count > 0){ echo 'Time already taken choose another time please'; }else{ …

Member Avatar
Member Avatar
+0 forum 4

I am having trouble adding an item that will increase a player's energy in my BlueJ game. At the bottom of the createRooms() method in my game class I have added several items to rooms. At that point I tried setting boolean newEnergy equal to true. If the player types "use", they will receive 10 energy if boolean newEnergy is equal to true. I am not sure how I would set boolean newEnergy to true only when the energy item is still in the room. /** * Create all the rooms and link their exits together. */ private void createRooms() …

Member Avatar
Member Avatar
+0 forum 2

I need help reading a bool function from my HW assignment, I am not asking you to do complete my assignment for me. All I need help with is reading my bool function in main. Thank you for looking #include<iostream> #include<fstream> #include<string> using namespace std; struct StudentType {string studentName; int testScore;//Between 0 and 100 char grade; }; void PrintNameHeader(ostream& out); bool OpenInputFile(ifstream& inFile, string& infilename ); void Pause(); void ReadStudentData(ifstream& infile, StudentType student[], int& ); void AssignGrades(StudentType student[], int); int HighestScore(const StudentType student[], int ); void PrintNamesWithHighestScore(const StudentType student[], int); void DisplayAllStudents(const StudentType student[], int); void GetLowHighRangeValues(int& , int&); void …

Member Avatar
Member Avatar
+0 forum 5

Hi Every body Is my answer correct for this question - Obtain the minimal form for the following Boolean expression using Karnaugh map. F(U, V, W, Z) = ∑(0, 1, 2, 3, 6, 7, 8, 9, 10, 13, 15) My answer - ![a48a42f649b78dce10e6abdea215d087](/attachments/small/2/a48a42f649b78dce10e6abdea215d087.jpg "align-left") There are four pairs and one quad that reduce as given below: Pair-1(m7 + m6) reduces to U’VW Pair-2(m8 + m9) reduces to UV’W’ Pair-3(m13 + m15) reduces to UVZ Pair-4(m8 + m10) reduces to UV’Z’ Quad (m0 + m1 + m2 + m3) reduces to U’V’ Simplified Boolean expression for given K-map is F(U,V,W,Z) = …

Member Avatar
Member Avatar
+0 forum 1

Can someone help me with solving boolean expressions with the help of forward chaining. A good tutorial will also help me. Example: A.(A + B) = A A.(A + B) => A.A + A.B [Applying distributive law] A.A + A.B => A + A.B [Applying idempotency law] A + A.B => A.(1 + B) A.(1 + B) => A.(1) => A I have made huge efforts but still am unable to do this. The procedure would require parsing the boolean expression and then recursive rule checking. I was thinking about creating a binary tree of the expression and then doing …

Member Avatar
+0 forum 0

I am having trouble getting started with my program. I have writen the array but I am having trouble starting the if statemnent to fill the seats in the program. If they press 1 it needs to fill seats 1 through 5 if they press 2 it needs to fill seats 6 through 9. it cannot fill the same seat twice and if one section is filled it needs to go to the next. Any help would be appreciated. public class { final static int QUIT = 3 static Scanner console = new Scanner(System.in); public static void main(String[] args) { …

Member Avatar
Member Avatar
+0 forum 1

For the below program: import java.util.*; public class triangleLoop { public static void main (String[] args) { int height, row, col, spa; String leftOrRight; char hyp; Scanner kbd = new Scanner(System.in); System.out.println("Enter the desired height of the triangle: "); height = kbd.nextInt(); kbd.nextLine(); System.out.println("What side do you want the hypoteneuse on? Left or Right:"); leftOrRight = kbd.nextLine().toLowerCase(); if ((leftOrRight.compareTo("left")) || (leftOrRight.compareTo("right"))) { System.out.println("Only enter Left or Right!"); leftOrRight = kbd.nextLine().toLowerCase(); } hyp = leftOrRight.charAt(0); }} I want leftOrRight to be only "left" or "right" if its not i want the user to have to keep entering strings until it meets …

Member Avatar
Member Avatar
+0 forum 2

Pk, so here's the code I'm running for a checkboxlist object public void regSubjects(object sender, EventArgs e) { int courseCount = 0; for (int i = 0; i < coursesFound.Items.Count; i++) { if (coursesFound.Item[i].Selected) coursesCount++; } if ((courses < 4) && (courses > 6)) clabel.Text = string.Format("Choose between 4 - 6 subjects"); } Wierd thing is, if have only one condition in my final if, it works fine, if i have both, it doesn't pick it up, even if I nest the two conditions in their own if, it doesn't pick up on the error, just ignores it. Viusal Studio …

Member Avatar
Member Avatar
+0 forum 7

basically i am working on a project for uni, which is to create a form of an abacus model. - peg_array[] stores the number of counters/beads present in each of the pegs(lines) of the abacus. i am trying to use 2 boolean methods: "boolean removeCounter(int thisPeg)" "boolean removeCounter(int thisPeg)" thisPeg - An integer that refgers to any of the pegs in the abacus Please can someone help me solve this? All i am trying to do is to recognise where possible errors may occur and prevent them from happening. E.G. if conditions are true then add one counter to the …

Member Avatar
Member Avatar
+0 forum 6

Just a curious question, not important really. More for a discussion. Isn't using int i = 0; boolean count = false; pretty much the same thing when flagging? I mean when something goes right, change i = 1; count = true; and get the same result. What's the advantage of boolean over a simple int change? example: for (int i = 0; i < newArray.length; i++) { if (i == element) { count = true; newArray[i] = combinedInfo[i + 1]; } else if (count) newArray[i] = combinedInfo[i + 1]; else newArray[i] = combinedInfo[i]; } versus for (int i = 0; …

Member Avatar
Member Avatar
+0 forum 3

I want to create a method that is meant to protect against entering a wrong value for gender. The method **fineGender** below, will return true if the correct gender is entered and false otherwise. // postcondition: fineGender returns true if argument g equals M, m, F or f // and returns false otherwise. public static boolean fineGender(char g)

Member Avatar
Member Avatar
+0 forum 6

Hi everyone. I'm trying to verify whether the variables $username and $password_recovery (both are unique - impossible for them to be the same) both come from the same row in the rable 'users'. This is the query I am using: return (mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `username` = '$username' AND `recover_password` = $recover_password"), 0) == 1) ? true : false; (yes I know mysql_* functions are out of date, being depreceated etc). I am trying to get the query to return either true or false, but I am getting this error: Warning: mysql_result() expects parameter 1 to be resource, boolean …

Member Avatar
Member Avatar
+0 forum 4

Consider this: I have a user-defined stored procedure which returns a bit value as OUTPUT. In my calling code I want to check that value. I define it in my code as follows: Dim retval As New SqlParameter() retval.ParameterName = "@return" retval.SqlDbType = SqlDbType.Bit retval.Direction = ParameterDirection.Output DataCommand.Parameters.Add(retval) DataCommand.ExecuteNonQuery() ' now check the return value If Not (CBool(retval.Value)) Then Throw New ApplicationException("SQL returned FALSE. ") End If Which appears to get the desired results, in that my code hits the If statement and continues. However, if I change the If statement to `If Not (CBool(retval.SqlValue)) ...` I get an exception …

Member Avatar
Member Avatar
+0 forum 4

Good morning I have an event called "OptionChanged" that is triggered when one of many CheckBox's is changed. string cb = ((CheckBox)sender).Name.Remove(((CheckBox)sender).Name.Count() - 1); gets the name of the changed CheckBox, removes the last letter then copies it to a string. Now, i need to find the relevant bool (named exactly like the string) that has already been declared to change its value. Is this possible? Thanks

Member Avatar
Member Avatar
+0 forum 4

Boolean eminem = new Boolean("yes"); What does it mean & what does it create? Thanks.

Member Avatar
Member Avatar
+0 forum 2

I am trying to implement a function sameMonth from a class to compare two user entered months. My class is declared in a header file "Date.h": #include <iostream> using namespace std; class Date { private: string month; int day; int year; public: Date(); Date(string aMonth, int aDay, int aYear); void setMonth(string month); void setDay(int aDay); void setYear(int aYear); string getMonth(); int getDay(); int getYear(); void printDate(); bool sameMonth(string aMonth, string aMonth2); }; The function sameMonth itself exists in another file "Date.cpp" bool sameMonth(string aMonth, string aMonth2) { if (aMonth == aMonth2) { cout << "The two months entered are the …

Member Avatar
Member Avatar
+0 forum 1

Hello, I am hoping someone can help me understand a piece of code i found. Since php is not my primary language, and what i googled returned vague results, i am unsure exactly how a number or integer value can be used directly as a boolean in a while operation. function testfunction( $testparam ) { if( $testparam > 0x3F3F3FFF ) { $testparam &= 0x3F3F3FFF; } do { $testparam >>= 6; }while($testparam); } Basically i need to be able to understand the logic of the while loop here, does it check it testparam is > 0 and evaluate that as true …

Member Avatar
Member Avatar
+0 forum 1

I am new to Java (taking it to get warmed up for C and C+++ as I am very rusty.) I am writing a class that is suppose run the file DLTest.java(written by the instructor) that is suppose to keep track of two licenses with name and tickets. DrivingLicense, ().addTicket, ().name,().numTickets, and ().isSuspended are all objects in this class. My program is suppose to "name" driver one and two(Alice/Bob), tying their existing tickets(2/0) so that the DLTest can make this output: Alice does NOT have a suspended license Bob does NOT have a suspended license Bob and Alice are both …

Member Avatar
Member Avatar
+0 forum 4

Hello, I'm trying to make a very basic + - calculator in java using constructors after watching thenewboston video tutorial I tried to experiment with it. My litle project is almost finished my only problem is that the boolean I use is being reset after I assign it. If someone could take a look at I would really appriciate it. Also ignore the names of the class didn't bother to change it after the tutorial video. package bucky; public class tuna { private double num1; private double num2; private double awnser; public boolean plus; public tuna(double numbr1,double numbr2){ num1 = …

Member Avatar
Member Avatar
+0 forum 2

The End.