30 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Violet_82

Hi guys, I seem to have an issue with a boolean method returining a value. Here is the code excerpt - irrelevant code omitted: public class StreamsTest { public static void main(String[] args) { String[] arr = new String[]{"a", "b", "c"}; //convert array to string with streams List<String> list = …

Member Avatar for masijade
0
2K
Member Avatar for Latrell_vie

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 …

Member Avatar for ddanbe
0
677
Member Avatar for Doogledude123

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 …

Member Avatar for Slavi
0
292
Member Avatar for it@61@sec

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 …

Member Avatar for it@61@sec
0
959
Member Avatar for moaz.amin.37

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 for Schol-R-LEA
0
378
Member Avatar for jj.dcruz

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",""); …

Member Avatar for jj.dcruz
0
208
Member Avatar for Derek_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 …

Member Avatar for Derek_4
0
325
Member Avatar for beastie805

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 …

Member Avatar for beastie805
0
682
Member Avatar for Anark10n

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 - …

Member Avatar for rubberman
0
322
Member Avatar for l.worboyz

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 …

Member Avatar for valdez25
0
305
Member Avatar for john.knapp

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() ' …

Member Avatar for john.knapp
0
528
Member Avatar for //Gonz

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 …

Member Avatar for //Gonz
0
245
Member Avatar for sapure
Member Avatar for sapure
0
244
Member Avatar for jongiambi

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 …

Member Avatar for vijayan121
0
284
Member Avatar for trishtren

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. …

Member Avatar for pritaeas
0
217
Member Avatar for viktor.baert

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 …

Member Avatar for viktor.baert
0
932
Member Avatar for |-|x

Does anyone know a good way to force javascript to evaluate all operands in a boolean expression? In particular, what I am tring to do is essentially this: return isValid(a) && isValid(b) && isValid(c); while this technically does work, the function is responsible for highlighting invalid areas on the form …

Member Avatar for |-|x
0
427
Member Avatar for 3FatCats

The assignment requires program to read from a file into an array, use two boolean functions to validate certain data (set to "true" when there are no errors) then output any errors to a separate file. Everything works fine except for validating the rate. All the numbers are read into …

Member Avatar for 3FatCats
0
241
Member Avatar for niall.lennon2

[CODE]class Date { private int day, month, year; // the date Date(int d, int m, int y){ day = d; month = m; year = y; } Date(){ }; void get() { day = Console.readInt(); month = Console.readInt(); year = Console.readInt(); } void put(){ System.out.println(day + "/" + month + …

Member Avatar for Ezzaral
0
165
Member Avatar for mistersalty

Hi this is my first post, but I've lurked for a while usually finding answers to my questions in other threads, I couldn't find this one so I broke my posting cherry to ask. I know I'm missing something, probably really simple, but possibly I'm doing this completely wrong. I'm …

Member Avatar for jee08
0
166
Member Avatar for Venku Tur'Mukan

print "Hello, World!" ;) Hi, everyone, Venku (a.k.a Python Newb) here. I just kind of randomly opened up Python today (I do that a lot), and I decided I would finally ask this: What does the "is" statement do in Python 2.7.1 (if the ver# matters)? I checked out the …

Member Avatar for Venku Tur'Mukan
0
792
Member Avatar for djbuclkle

I am currently writing a program in which you input a word and the program then outputs all of the different ways the characters can be moved round into anagrams. I have wrote a way of turning the command line argument into a char array using the toCharArray() now I …

Member Avatar for JamesCherrill
0
169
Member Avatar for gingerfish

i have this code, i need to have [B]for()[/B] inside this boolean method, but it shows an error that return method is missing. how can i solve it? [CODE] public static boolean findPrevious(int dataIdx, int featIdx, String data, String[][] array){ for(int i=0; i<dataIdx; i++) { if(array[i][featIdx] == data) return false; …

Member Avatar for Ezzaral
0
185
Member Avatar for hzp

[B]Edit: that was my mistake. i placed the codes in wrong line. i solved it by myself already. thanks for viewing.[/B]

Member Avatar for jonsca
0
132
Member Avatar for techie1991

The last time I was making a program, I wanted to input from user a boolean answer (to save space ;)) An input of 0/1 works good (0-false) and (1-true), but if the user inputs the boolean values as "true" and "false", it comes out to be an error. So, …

Member Avatar for techie1991
0
228
Member Avatar for vello

[CODE]a.cpp: In function ‘int main()’: a.cpp:39: error: no matching function for call to ‘find(int&, int)’ [/CODE] [CODE]#include <iostream> #include <fstream> using namespace std; int minutes, seconds; char temp; int array_l; bool* sees; int* a; int saade; int main() { ifstream sisf("raadio.sis"); ofstream valf("raadio.val"); /* * How many songs? */ sisf …

Member Avatar for arkoenig
0
196
Member Avatar for justinwarner

Hey guys, So, I need to add booleans on my project for the final piece. I have all of it done but the booleans. Basically, I checked about 10+ links on google, and none of them really explained how to do booleans. So, what I need is something that does …

Member Avatar for ~s.o.s~
0
147
Member Avatar for kimiko

hey there guys, just starting to learn java and i'm having a little trouble putting code to paper. don't really want to ask the teacher because hes a perv but lets not get into that. okay, i am supposed to make a GUI for electronic voting ballot paper thingy and …

Member Avatar for jon.kiparsky
0
182
Member Avatar for Zinderin
Member Avatar for crapgarden

Is this: A)[CODE]while (!isLegal(move, board))[/CODE] the same thing as: B)[CODE]while (isLegal(move,board) = !!)[/CODE] ?

Member Avatar for crapgarden
0
143

The End.