43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for engrjawad

What is a flag in java? when do we need it in our program? what it is used for?

Software Development java
Member Avatar for jalpesh_007
0
185
Member Avatar for dean.ong.14

` print "Welcome to my quiz" begin = raw_input("would you like to begin?: ") if begin =="yes": print "A)True" print "B)False" q1 = raw_input("Is Steve Jobs is the founder of Apple?") if q1 == "A" or q1 == "a": print "well done! you got it right!" else: print "thanks for …

Software Development apple python
Member Avatar for 铃
0
116
Member Avatar for naui95

Hi there, how can I split a string into variables?? better: string s = "one,two,three,four"; // Split string on character comma. string[] words = s.Split(','); foreach (string word in words) { Console.WriteLine(word); } how can I put an incrasing variable (for n splitted words) instead of 'Console.WriteLine(word)' thanks

Software Development
Member Avatar for JOSheaIV
0
271
Member Avatar for Jsplinter

I understand how to write a function to loop through a vector<double> and calculate the mean and standard deviation of its values, but I was wondering if there is a library which I could simply #include<> and then just call a function to compute such values.

Software Development c++
Member Avatar for Jsplinter
0
267
Member Avatar for cacadi

So i am doing a program that opens a file that contains grades and shows the average, total, etc.. But at the end I am supposed to make a histogram that would look something like this A= * * B= * * * C= * * * * * * …

Software Development c c# c++
Member Avatar for rstralberg
0
465
Member Avatar for Stuugie

Hi all, I have a procedure that compares release dates to file download dates. I have a download folder that is added to a string Dim strFilePath = "\EconomicDBTemp\DownloadedCSVs\" I've removed the directory but the folder DownloadedCSVs is where I need to search each csv file. However, I am unsure …

Software Development vb.net
Member Avatar for Stuugie
0
180
Member Avatar for tet3828

I have two forms that share data between eachother. 1. In Designer view of Form2 I establish a public variable. public bool isMyFormValid 2. When I attempt to access the variable in Form1 like this... if (Form2.isMyFormValid = true) { //do this} C Sharp no likey... I get this message: …

Software Development visual-basic visual-studio
Member Avatar for tet3828
0
186
Member Avatar for MARKAND911

I have created threads dynamically. static void Main(string[] args) { int ThreadCount = Convert.ToInt32(ConfigurationManager.AppSettings["Threads"]); List<Thread> th = new List<Thread>(); for (int i = 0; i < ThreadCount; i++) { Thread t = new Thread(print); th.Add(t); } foreach (Thread t in th) { t.Start(); } } public void print() { console.writeline("123"); …

Software Development
Member Avatar for Momerath
0
117
Member Avatar for chandnigandhi

please suggest me turbo c version for windows 7,32 bit which supports full screen mode and also supports graphics functionality....as soon as possible....

Software Development c
Member Avatar for Ancient Dragon
0
101
Member Avatar for HBovenkamp

Good day, I keep running into a very persistent "Could not fine installable ISAM" error when trying to connect to an Excel sheet (office 2010) by opening an OledbConnection Here's my connection string: Dim strCon As String strCon = "Provider=Microsoft.ACE.OLEDB.12.0;ACE OLEDB:Database Password=" & strEnter & ";Data Source= " & strExcel …

Software Development microsoft-office vb.net
Member Avatar for HBovenkamp
0
2K
Member Avatar for ja3n

Hi, I am trying to solve a maze using queues(no recursion) What I've done so far is that I can figure out whether or not the maze can be solved. What my next step should be is to list out STEP BY STEP how the maze will be solved. For …

Software Development c queue
Member Avatar for ja3n
0
3K
Member Avatar for SphirosOkelli

I have been working on a program for class- yes this is homework. I have completed the program, it runs- yay newbie me- but it does not run correctly. I am working with functions, wether referenced or not, and I have passed several values to a function inorder to calculate …

Software Development c++ file-stream ios
Member Avatar for SphirosOkelli
0
111
Member Avatar for ktsangop

Hello everyone. As the title suggests i need to implement a type of timer based function inside a UI Thread in MFC. Although CWinThread is a UI Thread and has a message pump it does not have a Timer function as CWnd::OnTimer Is there any way i can implement a …

Software Development c++
Member Avatar for ktsangop
0
770
Member Avatar for phorce

Hello, So basically, I am trying to create a system based on the Singleton Pattern and I'm confused. If I have an Animal class, as well as a Cat class which is derived from Animal and then using a Singleton class will create a single object of which-ever class has …

Software Development c++
Member Avatar for L7Sqr
0
228
Member Avatar for TheQuestor

I need some help here. I am writing a little desktop app that monitors my ToDo database and whilst it works great when run once, it kind of freaks out when I run it from a timer. As in all the labels start repeating. Below is the entire code. Imports …

Software Development vb.net
Member Avatar for TheQuestor
0
387
Member Avatar for hacker260

i need help finish this program for an assignment, It should play the Rock, Paper, Scissors game. The nextPlay methoded needs to be filled in with nested switches. thanks for your help import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Rps extends JFrame implements ActionListener { private final char moves[] …

Software Development java java-swing
Member Avatar for stultuske
0
305
Member Avatar for Hojjat.Mojallal

Hi I've tried the code below to merge 2 linked list which f1 and f2 are the first nodes in the initial lists and the "first" is the first node in the result list. But it doesn't work! [CODE] node *merge(node *first,node *f1, node *f2,int n1,int n2){ int n=n1+n2; while(n-- …

Software Development c++ linked-list
Member Avatar for mandeepsukhwinderparmar
0
4K
Member Avatar for mahela

In my project I have a datagrid with 2 columns namely "codes" and "description".there are details under code and description columns.I wanted to print the datagrid.please help me.

Software Development visual-basic
Member Avatar for mahela
0
91
Member Avatar for dancks

I don't know jack about Visual Studio, and I'd like to keep it that way because I like doing stuff on the command line, I have my preferences. But my teacher uses it to compile and I'm curious what I did wrong because gcc didn't throw anything. So, code (Without …

Software Development c c++ linked-list visual-studio
Member Avatar for dancks
0
202
Member Avatar for kenomote

Hey guys its me again...im having some problems modifying the data in the DataGridView The error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where UserID='3'' at line 1 and it highlight this …

Software Development dataset vb.net
Member Avatar for kenomote
0
123
Member Avatar for kenomote

Hey guys i need some help on how to create a connection of a relationship between two forms...for example I have a DataGridView on another form....with a search button.. if i click the search button another window will pop out with a text box lable "Look For:" and a combobox …

Software Development seo vb.net
Member Avatar for kenomote
0
343
Member Avatar for kenomote

Hey guys im having problem with the registration form that i created the error shows after i tried some error handling if the username already exists this is the error message: `{"Invalid attempt to Read when reader is closed."}` and this is the error highlight `While mydr.Read()` Heres my code …

Software Development vb.net
Member Avatar for kenomote
0
255
Member Avatar for Goldfinch

I was trying to building a java project with a run function. Problem is, the build file is located at the base directory and file with the main method is in the /contents/username/ subdirectory - I can't seem to properly call the file even though when I run Ant compile, …

Software Development java
Member Avatar for Goldfinch
0
175
Member Avatar for valorien

Hi Everyone. I'd appreciate your help writing better code. I have a list of ~1000 values: list_of_values = [0x123D, 0x844F, 0x33E9, ....., 0xFFFF, 0xFFFF, 0xFFFF] The last values in the list will always be 0xFFFF, but I don't know how many exactly. What I want is to get rid of …

Software Development python
Member Avatar for valorien
0
152
Member Avatar for s_danielsz

(Before I ask my question, I have tried looking through google and the site already, and didn't find anything relevant to what my problem was. All I was finding was more complex than my current level.) Anyway, my problem is that I'm getting an "expression must have (pointer-to-) function type …

Software Development c++
Member Avatar for Ancient Dragon
0
668
Member Avatar for hwoarang69

public class j_01_FLOW_06 extends JApplet implements ActionListener { //Choice shoplist = new Choice(); //ButtonGroup bg_group = new ButtonGroup(); CheckboxGroup cg_group = new CheckboxGroup(); JCheckBox cb_i1 = new JCheckBox("fafa"); JCheckBox cb_2 = new JCheckBox("wfw"); JCheckBox cb_3 = new JCheckBox("Computer"); String s_value[]={"white sox","red sox","mets","cordianls","blue jays"}; JList l_list = new JList(s_value); Container c; …

Software Development java
Member Avatar for hwoarang69
0
242
Member Avatar for hwoarang69

public class J_01_FLOW_08 extends JApplet implements ActionListener { String s_value[]={"white sox","red sox","mets","cordianls","blue jays"}; JList l_list = new JList(s_value); JLabel l_label = new JLabel(); Container c; FlowLayout flow = new FlowLayout(); public void init() { c = getContentPane(); c.setLayout(flow); c.add(l_list); c.add(b); l_list.addActionListener(this); } public void actionPerformed(ActionEvent e) { String pick = …

Software Development java
Member Avatar for JamesCherrill
0
166
Member Avatar for hwoarang69

so i now awt is the old version. which is Applet swing is the new version which is JApplet. code at bottom, is it normal to mix awt and swing? for ex i am using continer which is awt. and let say i dont want to mix awt with swing …

Software Development java java-swing
Member Avatar for hwoarang69
0
241
Member Avatar for daino

Would anyone know what the PNG Include directory variable should be for CMAKE. I can't seem to find a Cmake module to search for PNG in the program which depends on LIBPNG (unlike all it's other dependencies). I've been using PNG_INCLUDE_DIR but CMAKE doesn't seem to recognise it? thanks.

Software Development c++
Member Avatar for daino
0
9K
Member Avatar for caswimmer2011

Hi, I am making a program to open the application TextEdit on a mac (not a specific file, just open the program). I have been researching it, but have not come across much help. I have seen that I should use Runtime or Desktop classes, but i'm not sure which …

Software Development java java-netbeans os-x
Member Avatar for caswimmer2011
0
331
Member Avatar for Enders_Game

Pretty self explanatory code. Why doesn't it work! #include <stdio.h> int main() { __asm__("number dw 0"); // declare number? printf("%d",number); __asm__("mov %eax,number" "inc %eax" "mov number,%eax"); printf("%d",number); return 0; } cc ex1.c -o ex1 ex1.c: In function ‘main’: ex1.c:22:17: error: ‘number’ undeclared (first use in this function) ex1.c:22:17: note: each …

Software Development assembly c c++
Member Avatar for Enders_Game
0
290
Member Avatar for vishalonne

Hi Everybody I am trying to create a template class here is the code I trying to just add and multiply 2 number. But I am not able to do so using template class. class calc { public: template <class T> T multiply(T x, T y); T add(T x, T …

Software Development c++
Member Avatar for mike_2000_17
0
213
Member Avatar for Ismail Issa

Hey guys. i am new to c# and i was wondering if you could give me a hand. it is about sets.So far i have 3 textboxes,one for set a one for b and another for result.i also have 3 buttons one for union one for difference,element found in a …

Software Development c c# c++
Member Avatar for ddanbe
0
116
Member Avatar for triumphost

Ok I know the difference between delete and delete[] BUT this question just all of a sudden popped in my head since "NOTHING" happens when I use delete[] for all purposes. Now I know when to use one or the other but it still for some odd reason bothers me …

Software Development c++
Member Avatar for mitrmkar
0
180
Member Avatar for omgnametaken

Hey guys. I have two questions about my code(which has no errors but isnt giving the output i want)...Is it possible to have an if statement in my 3rd constructor? Also why is my output giving the filepath instead of outputting calcutations? Thanks for having a look public class order …

Software Development java
Member Avatar for omgnametaken
0
115
Member Avatar for xianamersu

I'm trying to make a video store program that allows customers to search for videos and either buy or rent them. I have already made a class with 3 subclasses, VHS, DVD and VCD. for the meantime,When video objects are first put into the store, the status should be “IN”. …

Software Development java
0
77
Member Avatar for daino

How do I set the CMAKE_INCLUDE_PATH? Also... How to I set the CMAKE_LIBRARY_PATH? All i know about CMAKE is that is is a GUI with very limited options. Where do I put these variables and why do I set them? How do I set them? Thanks

Software Development c++ gui
Member Avatar for daino
0
11K
Member Avatar for ThomsonGB

I have been using the Jove editor by Jonathan Payne for many years. If You are not familiar with Jove - Jove stands for Jonathans own version of EMACS. I love using it. In the 80s I had my own version of jove with a lot of my own personal …

Software Development c visual-studio
Member Avatar for ThomsonGB
0
345
Member Avatar for tedy.jd

I was doing xaml with vb coding in vb 2010 I create a datagrid and linked itemssource with table adapter, and also I modify a columns to checkbox datagrid columns. Problem now is I checked the checkbox value in the columns in datagrid but through button check the data grid …

Software Development vb.net
Member Avatar for tedy.jd
0
300
Member Avatar for Hopp3r

Ok, so I've recently been learning to code in c++, but I'm getting a little confused on how you read files to functions. For instance, say that I have one file with a list of other files in it. The information within the second set of files (each file) contains …

Software Development c++
Member Avatar for triumphost
0
3K
Member Avatar for Elixir42

I have searched on the internet for a 'working' double to char* does anyone have any idea? I need to pass the string to a function that takes a char* as an argument.

Software Development c++
Member Avatar for Elixir42
0
3K
Member Avatar for MasterHacker110

I am trying to make a program that will check the remaining number of an item left in stock and that will, if someone buys it, subtract the amount of the item bought and then re-write it into the database... (Something like what they use in some stores) How do …

Software Development c++
Member Avatar for Lucaci Andrew
0
418
Member Avatar for ranam

I want to know how exactly to add the button at the top of the search to note as the search criteria is for example asc to desc or vise versa ![kk[](/attachments/large/1/kk[.JPG "kk[") that is here i need a icon beside the colors to show me when i search weather …

Software Development c++
Member Avatar for ranam
0
162
Member Avatar for themaj

I am trying to insert new records into an Access DB and getting some weird stuff. I get the data from a DBF table and load that into a dataset table and DataGridView with no problems. Then I loop through the ds.table and insert it into the DB with this …

Software Development dataset microsoft-access vb.net
Member Avatar for Reverend Jim
0
206
Member Avatar for sobias

Hi guys, Finally I've registered after being a very long visitor for this awesome community. I have this problem which consumed 2 days of my time trying to figure out how to solve it. And your help is needed guys. The problem says: Transfer elemenents from Stack1 to Stack2 , …

Software Development data-structure java
Member Avatar for Taywin
0
8K
Member Avatar for somjit{}

this is my code, from the book *Head First Java* ... class Echo { int count=0; void hello() { System.out.println("Helloooo....."); } } public class EchoTestDrive { public static void main(String[] args) { Echo e1 = new Echo(); Echo e2 = new Echo(); // output 10 //Echo e2 = e1; // …

Software Development java
Member Avatar for somjit{}
0
180
Member Avatar for kenomote

Hey guys im having this error on my codes but seems to work on the other new projects it always highlight the .ExecuteNonQuery `{"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at …

Software Development vb.net
Member Avatar for kenomote
0
458
Member Avatar for ised

Write a nested for loop that displays the following outpout: 1 1 2 1 1 2 4 2 1 1 2 4 8 4 2 1 1 2 4 8 16 8 4 2 1 1 2 4 8 16 32 16 8 4 2 1 1 2 4 8 …

Software Development display python
Member Avatar for ised
0
3K
Member Avatar for Nan0_Zor

Hi, i have a problem making my program share infos with his clone... Let me explain :) I execute my program twice, and i want it to share text like a messenger (on a single computer) and the problem is, i don't want it to be one program with 2 …

Software Development vb.net
Member Avatar for Nan0_Zor
0
140
Member Avatar for 1bung100

I have created a simple client server chat program using socket. I used to run Client program and Server program separately in two eclipse and chat is done through console only. The logic is as below: System1Class (Server) | System2Class (Client) 1) SendThreadSys1 Class | 1) SendThreadSys2 Class 2) ReceivedThreadSys1 …

Software Development client-server java
Member Avatar for 1bung100
0
1K

The End.