43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Blondeamon

[CODE]public String expandTemplateTopic(String remark) { String random_word = findKeyWord(remark); String str=" "; String kok2=" "; int num1=0; int num2=0; int num3=0; //find a random template int number = generator.nextInt(sentenceList.size()); String argument=sentenceList.get(number).getTemplate(); //split it into words using space as delimiter List ls=new LinkedList(); String[] array =argument.split (" "); //find if there …

Software Development java
Member Avatar for masijade
0
161
Member Avatar for twoshots

I've just started learning Python but have hit a little issue when instancing a class. I seem to get errors like: AttributeError: type object 'Stuff' has no attribute 'a' or: AttributeError: class 'Stuff' has no attribute 'a' Clearly I'm missing something fairly fundamental :/ A quick test program shows what …

Software Development python
Member Avatar for twoshots
0
122
Member Avatar for sravan953

Hey All, I have made a program called "Pymailer", I have even made a GUI version... now what I want to do is to convert it to .exe format... how do I do it? I googled for some info, but in vain!

Software Development gui python
Member Avatar for sravan953
0
1K
Member Avatar for t_simpson

I'm a student but I'm not asking anyone to do my work for me, however I would like a little help if possible please. For part of my assignment I have to create a program that will issue a bepp of the value ( frequency and duration ) that the …

Software Development c++ session windows-vista
Member Avatar for t_simpson
0
75
Member Avatar for Sachin_coder

private bool OpenDbConnection(SqlConnection sql_con_obj) { try { SqlConnection.ClearPool(sql_con_obj); SqlConnection.ClearAllPools(); if (sql_con_obj.State == ConnectionState.Closed || sql_con_obj.State == ConnectionState.Broken) { sql_con_obj.ConnectionString = "Data Source=.;Initial Catalog=Practice;User ID=sa;Password=sa"; sql_con_obj.Open(); return true; } else { return false; } } catch (Exception ex) { ShowMessage(ex.Message); } } I get following error on execution: Error 1 '_Default.OpenDbConnection(System.Data.SqlClient.SqlConnection)': …

Software Development open-source
Member Avatar for ddanbe
0
137
Member Avatar for 12d3

Hi, I've created a class called [B]MyClass[/B] which just contains some data: [CODE]public class MyClass { #region Private Variables private string _ValueA; private string _ValueB; #endregion public MyClass(string ValueA, string ValueB) { _ValueA= ValueA; _ValueB= ValueB; } public string ValueA { get { return _ValueA; } set { _ValueA= value; …

Software Development
Member Avatar for ddanbe
0
139
Member Avatar for kv123

Hi, Is this valid in C++?? struct A{...}; class B: public A{...}; Thanks!

Software Development c++
Member Avatar for YousefAB
0
128
Member Avatar for schnell

I have "Vertex" class pointers in a list. I want to delete these pointers and free up the memory. I deleted the pointers in the first for loop and set these pointers to 0. but just to check whether the pointers have really been deleted and set to NULL, I …

Software Development c++
Member Avatar for schnell
1
113
Member Avatar for stoymigo

Hi, when installing VS 2008 C++ application on a pc , does the pc need the .net framework? -Thanks

Software Development c++
Member Avatar for stoymigo
0
112
Member Avatar for AutoPython

Okay, I wrote a simple calculator, not in GUI form, but a calculator for simple stuff. So I'm wondering, would this layout be considered OO? I think this is how it works. Now I do know that I didn't use an object to handle the class since it just wasn't …

Software Development gui python
Member Avatar for AutoPython
0
216
Member Avatar for AirGear

guys, i have a project that needs using GUI in cpp. my lecturer suggests me to use Microsoft Visual Studio 6 and create a MFC based application. But i don't really understand how to use it. Can anyone please give me a link that can explain about that MFC stuff? …

Software Development c++ gui visual-studio
Member Avatar for pspwxp fan
0
138
Member Avatar for FREEZX

I need to "decode" a string into numbers. it should convert 1=ij 2=abc 3=def 4=gh 5=kl 6=mn 7=prs 8=tuv 9=wxy 0=oqz so i made a code where i use a dynamic string array which should get filled up according to the above table, but when i try to print the …

Software Development c++
Member Avatar for FREEZX
0
106
Member Avatar for dinilkarun

Hi Friends, I need to write a piece of code to identify if an Excel session(the process which is listed in the Task Manager) is already running or not?. Can anyone guide me with this? Any help will be much appreciated! Regards, Dinil

Software Development python session
Member Avatar for dinilkarun
0
145
Member Avatar for FriQenstein

Hello all, I have an app that I'm building, slowly as I learn, and I'm having some issues with the JDialog implementation. I'm using NetBeans which generates pretty much everything except for the gutsy bits of code needed... (i.e. code for button actions, etc) I have my main application which …

Member Avatar for FriQenstein
0
1K
Member Avatar for stoymigo

Hi , i there is VB 6 app that our client has which must be converted to VB.NET/C# . The application is a database application and application logic is stored in VB6 code and about 8 stored procedures. There is a Test environment and there is a Production environment which …

Software Development vb.net visual-basic
Member Avatar for stoymigo
0
268
Member Avatar for aalice

In this assignment you to implement a short C program that works with factorization of integers. You will write a C program that computes and prints out the sum of all natural numbers below 100,000 that are multiples of 3,5 or 7. In Detail If you are asked to sum …

Software Development c
Member Avatar for BestJewSinceJC
0
94
Member Avatar for linxpert

Hi guys, Please help me here. I want to obtain the individual data in rows and columns from my database. I mean after loading the data in a data table.... I think I need some attributes of the data table, so as to obtain data from the rows and columns

Software Development vb.net
Member Avatar for linxpert
0
134
Member Avatar for raghunayak

Hi all, This is my first post here. Basically I want to use friend classes across namespace. eg: [CODE]#include <iostream> namespace NamespaceA { class ClassA { public: friend class ClassB; void print( ) { std::cout<<std::endl<<data<<std::endl; } private: int data; }; }; namespace NamespaceB { class ClassB { public: ClassB() { …

Software Development c++
Member Avatar for raghunayak
0
2K
Member Avatar for shroomiin

Hey everyone. I am supposed to create a program that will input the miles driven and gallons used for each tank full of gas. program has to calculate and display the miler per gallon obtained for each tankful and print the combined miles per gallon for all tank fulls up …

Software Development java
Member Avatar for BestJewSinceJC
0
107
Member Avatar for restrictment

How do I add an array? I tried this: [code] #include <iostream> #include <cstdlib> using namespace std; int main() { int i, numEntered, total; int number[10]; for (i = 0; i <= 9; i++) { cout<<"Number: "; cin>>number[i]; numEntered = number[i]; } for (int i = 0; i < 10; …

Software Development c++
0
82
Member Avatar for vtsmokey88

The problem I'm having is that I have a min heap class that is created with java generics. In the class where I use the min heap class(call it sorter) I have a float array, which is full of primitive float values. The constructor for the min-heap class takes a …

Software Development java
Member Avatar for BestJewSinceJC
0
123
Member Avatar for Gem74

when I compile, there are no errors, but when I run the program it tells me there are build errors and then "the system cannot find the file specified." I have copied and restarted a new project, then new item and still get same error message. Can someone tell me …

Software Development c c# c++
Member Avatar for Gem74
0
203
Member Avatar for noey699

First of all I would like to point out that all my values are correct in boxes[5][4] which contains the two x and y values needed for each box. boxes[0][0] and boxes[0][1] are the x and y value for the top left of the rectangle. boxes[0][2] and boxes[0][3] are the …

Software Development c++
Member Avatar for noey699
0
139
Member Avatar for OldQBasicer

I put some variable declarations in the module of my project. Of the six variables, two of them remained unavailable to the code on the form... I got an error message. Those two, which are within a FOR...NEXT loop have to be declared in the form code for the thing …

Software Development vb.net
Member Avatar for OldQBasicer
0
197
Member Avatar for Lida_pink

How can I check whether the first and last letter of a string are same or not? And if yes, a message should be shown using MsgBox. Thanks in advance, Lida

Software Development visual-basic
Member Avatar for vb5prgrmr
0
132
Member Avatar for mejohnm

I cannot get my array to convert to int. I tried some ways but always ran into errors. Here is my program as it stands now. Can anyone give me some pointers??? [code] using System; using System.Collections.Generic; using System.Collections; using System.Linq; using System.Text; using System.IO; namespace sortingarray { class Program …

Software Development seo visual-studio
Member Avatar for mejohnm
0
167
Member Avatar for NatalyC

Hello everybody, :) I'm trying to import an access database to mySQL by using c#, I'm using this software: MS Access to MySQL from Bullzip, and it seems to be working ok; by using c#, I can display all data from tables, using this connection: [CODE] private void btndisplayBooks_Click(object sender, …

Software Development c# microsoft-access mysql
Member Avatar for NatalyC
0
2K
Member Avatar for ihatehippies

I have a Syncing program that, while idle, crawls through the sub-directories of the sources and destinations saved to a 'sync profile'. It starts a new thread and walks the directories calculating the divergence between the sources and directories. I want this feature to have little impact on computer performance …

Software Development python
Member Avatar for ihatehippies
0
120
Member Avatar for kaylors

Hey, I've been doing this little program to check if a number is a Keith number, and for some reason it's not working. I've gone over the code a few times but still can't detect the error. Could you please help? [CODE]static boolean isKeith(int n) { int sz=Func.sumDg(n); int arr[]=new …

Software Development java
Member Avatar for javaAddict
0
123
Member Avatar for dads

I have to make some bookmarks so I quickly knocked up the script below and ran it. It created the files fine but with a with an incorrect ip in the second file The second bookmark created should be named York.URL which it is but the ip address of the …

Software Development python
Member Avatar for slate
0
113
Member Avatar for Diamonddrake

I have a class that in one of its methods creates a new thread that makes some http requests, serializes the results, packs them up in an event object and then it Should call broadcast an event returning its data. but I can't figure out how. the class is not …

Software Development
Member Avatar for Diamonddrake
0
157
Member Avatar for Odc

Hi there, I am trying to read integers from a file and store them into an array but I have no idea how to do it. The file is a text document whos contents are arranged like an adjacency list. Here is an example file: 0 : 2,4,5,6,10 1 : …

Software Development c
Member Avatar for Odc
0
118
Member Avatar for itzaaron

This program collects 3 numbers from the user and then simple adds the total and spits out a response. problem is the final output is blank, it just says 'The total is: '_____ but nothing there. Whats wrong?? [CODE]#include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int …

Software Development c++
Member Avatar for itzaaron
0
173
Member Avatar for pyprog

The following code should return the longest odd-length palindrome in a string centered at the index. So in a string 'asradarer' it should return 'radar'. Can you explain to me what the problem here is? [CODE]def get_odd_palindrome_at(word, index): num = 1 new_word = "" while index < len(word): if word[index …

Software Development python
Member Avatar for vegaseat
0
903
Member Avatar for bol0gna

My file directory is full of filenames with "male" and "female" being part of them. I want to loop through the directory and distinguish between the two. [CODE] import os maleDataSets = 0 femaleDataSets = 0 females = [] males = [] filePath = "Dataset/parameter feature vectors" for file in …

Software Development dataset file-system python
Member Avatar for vegaseat
0
199
Member Avatar for cgeier

I am trying to write a program to display the unicode character when a user enters a unicode character code. ex: If the user enters: "\u00C3" in the textfield, I want to display a capital "A" with a tilda (~) over the top of it. Here's my code so far: …

Software Development display java java-swing
Member Avatar for cgeier
0
2K
Member Avatar for amishraa

the char character for grade are coming up with weird ascii like characters instead of the letter grades. Please help! //declaration string first, last; int prog1, prog2,prog3,prog4, prog5, test1, test2; int totalpts, progavg, testavg, courseavg; char grade; //executables totalpts = (prog1+prog2+prog3+prog4+prog5+test1+test2); progavg = (prog1+prog2+prog3+prog4+prog5)/5; testavg = (test1+test2)/2; courseavg = (progavg+testavg)/2; …

Software Development c++
Member Avatar for amishraa
0
207
Member Avatar for lewashby

I the following program, can someone please explain these two lines. "def __init__(self, master):, & Frame.__init__(self, master)" One other thing. Shouldn't the method "update_count" use a return to return the new count? thanks. [CODE]# Click Counter # Demonstrates binding an event with an event handler from Tkinter import * class …

Software Development gui python tkinter
Member Avatar for vegaseat
0
199
Member Avatar for xfrolox

Ok i add a SplashScreen1 then i put it to show, i go to Application Events and i add this [CODE]Partial Friend Class MyApplication Protected Overrides Function OnInitialize( _ ByVal commandLineArgs As _ System.Collections.ObjectModel.ReadOnlyCollection(Of String) _ ) As Boolean My.Application.MinimumSplashScreenDisplayTime = 4000 Return MyBase.OnInitialize(commandLineArgs) End Function End Class End Namespace[/CODE] …

Software Development vb.net
0
172
Member Avatar for nevets04

Heres the situation so far.I'm in 9th grade and I've been programming in python. I enjoy python however, my high school doesn't offer any courses for python. In 11th and 12th grade, I can take C++. So here's my question: Should I: A) Learn python for the next to years …

Software Development python
Member Avatar for vegaseat
0
215
Member Avatar for thebluestar

[CODE=C] #include<stdio.h> #include<conio.h> #include<string.h> int main() { //int a[10]={2,5,1,7,0,10,145,14,15,9}; int a[10]={1,2,3,4,5,6,7,8,9,10}; int tem,i=0,j,isTRUE=0; for(j=0; j<10; j++) { if(a[j]<a[j+1]) { isTRUE=1; break; } isTRUE=0; } if(isTRUE) printf("inorder\n"); else printf("ASEorder\n"); getch(); return 0; } [/CODE] Here's my source code about checking an array is ordered or not But it didn't work properly, …

Software Development c
Member Avatar for kvprajapati
0
6K
Member Avatar for gdr969

I have program than finds the minimum temperature of every month, but i can't find a way for it to find the minimum temperature that is higher than 0, i can't just use min() cos if the month has temperature that is lower than 0 it is also counted.

Software Development python
Member Avatar for gdr969
0
152
Member Avatar for nccsbim071

Hi I am developing FTP Clinet application that downloads files from the specified server i sent the LIST command and server returned a list of file names in following order: -rw-r--r-- 1 devubas devubas 24 Sep 5 2008 .bash_logout now the problem is how do i extract the filename fom …

Software Development
Member Avatar for nccsbim071
0
156
Member Avatar for leokuz

[COLOR="Green"]How can I use [U][B]wildcard/s[/B][/U] for the attachment filename. Part of the filename changes but the characters 8 and 9 (counting from the left to right) always present and always either [COLOR="Red"][B]LK[/B][/COLOR] or [COLOR="Red"][B]KL[/B][/COLOR]. Currently files are PDF type, thus with extension [COLOR="Red"][B]PDF[/B][/COLOR] but might be different in the future …

Software Development pdf vb.net
Member Avatar for leokuz
0
985
Member Avatar for mrrko

Ok, here's the problem [i]Write a program that gives and takes advice on program writing. The program starts by writing a piece of advice to the screen and asking the user to type in a different piece of advice. The program then ends. The next person to run the program …

Software Development c++
Member Avatar for manojlogu001
0
152
Member Avatar for Fenrir190

I did some searching and I think it might be a buffer overflow but I'm not sure. Could someone tell me what's wrong with this? [CODE]SafeGuard:: SafeGuard(int agent) { for(int index = 0; index < 26; index++) { upperCase[index] = 'A' + index; lowerCase[index] = 'a' + index; } for(int …

Software Development c++
Member Avatar for r.stiltskin
0
120
Member Avatar for dima shawahneh

hello every one im searching for a method to detect image concavity that is ..a concave exists in this image or not .. and its degree thanks..

Software Development image
Member Avatar for dima shawahneh
0
238
Member Avatar for Carrots

Hi, I'm storing base class pointers in a vector, the pointers are pointing to objects from the derived class ( Leads ). I'm unable to access the 'getter' functions of the derived class. How can this be done? I'm trying to save the derived objects in a text file (database.txt) …

Software Development c++ ide visual-studio
Member Avatar for Carrots
0
121
Member Avatar for Zooker

The error occured in this program after I changed to option explicit and got rid of all the dollar signs and percent signs and switched to 10 or 12 character variables as showed in MSB Exaples!! Public Sub CreateDir() Drv = App.Path ChDir Drv Select Case intRegg Case 1 Message …

Software Development visual-basic
Member Avatar for vb5prgrmr
0
367
Member Avatar for RobBrown

Hello, I am having a hard time with a loop for pulling information from a txt file and averaging it together. My problem is that the loop only reads one line and then quits, so it is only averaging one number. the program prints all the data and then shows …

Software Development c++ file-stream file-system
Member Avatar for RobBrown
0
340

The End.