92 Discussion / Question Topics
Remove Filter I am really confused as to how this works? You have a critique but where does the critique come in? Also is their a difference between activation on hidden nodes and output nodes? Does the critique come in during the hidden node? or the input node? Thanks | |
TITLE SHOULD ACTUALLY BE: how to get mouselistener to work on method in an class in java If I click a circle it should change the color of the circle. But, I am having difficult getting it to work. Help appreciated. Main just calls this class and calls the init … | |
I am trying to implement a hopfield net to learn patterns. This is what I current have.... I am current having it create a random number of patterns based on the number of neurons Next I am trying to make a weight matrix Should I have a seperate weight matrix … | |
Having problems with executing jobs using fork. The code is supposed to create one job and execute one job and repeat this multiple times. We are only supposed to use usleep in the jobgeneration() function. We are having trouble sleeping and executing ctrl-c in the execute job function. [CODE] #include … | |
[CODE] using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Win32; using System.Deployment; namespace RegisteryCheck { class Program { static void Main(string[] args) { ApplicationDeployment ab = new } } } [/CODE] ![]() | |
Any suggestions. I am assuming I use a registery but i dont' know which member to use. Thanks. | |
I have set the textbox to public so that another form can access it but when i run it in debug mode with the following line it gives me exception so it doesn't store correct directory. For example: If I enter D:\newfolder it gives me D:\\newfolder. Why does it add … | |
Take line below which is in batch file and convert it in C# so that I don't have to create a seperate file. Thanks! Any suggestions? I have spent way too long on this. Odbcconf /a {CONFIGDSN "Microsoft Access Driver (*.mdb)" "DSN=NexTest_CDMA_2009|Description=NexTest_CDMA_2009|DBQ=C:\prod\database\nextest_CDMA_2009.mdb"} | |
[CODE] //copy database files to target directory string fileName = "test.txt"; string targetPath = StaticFormInstances.choose.txtbxTargetDir.Text; string sourcePath = @"\\il93fil48\3GSM\release\testapplication_REL_01_00_09\database"; //Use Path Class to manipulate file and directory paths string sourceFile = System.IO.Path.Combine(sourcePath, fileName); string destFile = System.IO.Path.Combine(targetPath, fileName); //Create a new target folder if it doesn't exist if (!System.IO.Directory.Exists(targetPath)) { … | |
I was wondering how you do this. Would you have to use delegates and event handlers or can you do it through application.Run(object) and call that in the clickevent but I need to keep a reference to previous form. but that doesn't seem possible. | |
In the following code how to fix problem that the batch file won't get created. When I run in debug mode exception I get is "could not find part of path" Thanks [CODE] StreamWriter sw = null; try { if (AgilentNVisaDriver.Checked == false && RequiredDlls.Checked == false) { MessageBox.Show("Please select … | |
How to use bootstrapper manifest to create a prerequistie which runs another windows application installer before the setup.exe installer from the deployment project. Thanks. | |
how to have an executable run before deployment project executable? Thanks | |
how would you do that? Language similar to LISP I don't think you can use cons twice. really stuck. maybe (define a '('())) | |
I can write the recursion version correctly need help with writing a do loop in DrScheme. After the do loop the variable x is sent to car L intially and then is updated to first element of everything but first element in list. [CODE] (define (sumiteration L) (do ((x (car … | |
I have added a reference to dll file in VS 2008. Yet I still get an error. Not sure why, do I have to do some other changes to get it to work? | |
Here's the assignment: You are to create a single server (in either Java or C/C++) which can service both C/C++ and Java clients. The protocol of the server is as follows: 1. The client contacts the server. 2. The client performs a single send of a data packet containing the … | |
It is impossible in C++ since you have to use iterator to erase. Here's what I have: main.ccp [CODE] #include <iostream> #include <vector> #include "Mastermind.h" int main() { vector<int>* answer=new vector<int>(4); cout<<"enter an code\n"; for(int i=0; i<4; i++) { int k; cin>>k; answer->push_back(k); } //initalize population Mastermind a(5); //set answer … | |
starting to think that memory isn't big enough. the totalnumberofpegs i only set it to 0 in my code yet it changes it self somehow :(. please help i have tried everything. It shows that it is 0 in all other functions. main.cpp [CODE] #include <iostream> #include <ctime> #include <stdio.h> … | |
so i think i know where the problem is... it return garbage for code_pos even though i initalize and change values assigned to it. :( Please help. but don't know how to fix it. main.cpp [CODE] #include <iostream> #include <ctime> #include <stdio.h> #include "Mastermind.h" using namespace std; int main() { … | |
When i try it goes heywire and gives me 35 errors. all for the erase command. :( [CODE] for(int i=0; i<populationsize_; i++) { //check for black for(int j=answer_->front(); j!=answer_->back(); j++) { if(answer_[j]==population_[i][j]) { feedback_[i][j].push_back("Match"); for(int k=tempanswer_->at(i).front(); k!=tempanswer_->at(i).back(); k++) { //find first instance if(tempanswer_[i][k]==answer_[j]) { tempanswer_[i].erase(k); break; } } } } … | |
Need to calculate number of white pegs so I can write fitness function. It works sometimes and it doesn't work other times. I got the calculate number of black pegs to work. A black peg is correct position and color. A white peg is correct color wrong position. Colors are … | |
Here's my code. [CODE] (define L ()) (define (union L1 L2) ;continue until one list is empty (do() ((or (null? L1) (null? L2))) (cond ((<(car L1)(car L2)) (attach(car L1)(cdr L1)L2)) ((eq?(car L1)(car L2)) (attach(car L1)(cdr L1)(cdr L2))) (else(>(car L1)(car L2)) (attach(car L2)L1(cdr L2))) ) ) ;after which you continue to … | |
so far I can't figure out a way to write powerset in SML :(. I see a pattern for example powerset([1,2,3]) is [] [1] [2] [1,3] [3] [1,2] [2,3] [1,2,3] Here's what I have come up with: fun add(a,L)= [a]@L fun ps(L)= ps(tl L)@add(hd L, ps(tl L)); Any help appreciated. | |
I recently updated to windows 7 and since then I have been having this problem. Any help appreciated. | |
I plan on using the Bayesian method to try and solve the mastermind problem. The user will enter 4 numbers which represent the colors on the board from 6 different colors. After which the computer will randomly estimate the posterior probabilities for all events. ?Then continue with this scheme until … | |
When i run main it prints out gibberish not sure why. main.cpp [CODE] #include <iostream> #include <string> #include "phrase.h" #include "EA.h" #include <cstdlib> #include <time.h> int main() { phrase a; EA b; std::string phrase; int populationsize; std::cout<<"enter a population size\n"; std::cin>>populationsize; std::cin.ignore(); b.setpopulationsize(populationsize); std::cout<<"enter a string\n"; getline(std::cin,phrase); a.setphraselength(phrase); b.setlength(phrase); std::cout<<"the … | |
I am trying to create a double pointer. never done it before. Problem is currently in intializepopulation(); Error C2106 left of operand must be l-value. EA.h [CODE] #ifndef EA_H_INCLUDED #define EA_H_INCLUDED #include <string> #include "phrase.h" #include <iostream> class EA:public phrase { public: EA(); ~EA(); void setgenerationnumber(int generationnumber); int getgenerationnumber(); void … | |
its it skipping. This is the part of the code. :( cout<<"enter a string\n"; getline(std::cin,phrase); [CODE]#include <iostream> #include <string> #include "phrase.h" #include "EA.h" #include <cstdlib> #include <time.h> int main() { phrase a; EA b; std::string phrase; int populationsize; //int percentmutation; std::cout<<"enter a population size\n"; std::cin>>populationsize; b.setpopulationsize(populationsize); //std::cout<<"enter the percentage you … | |
Still having trouble install opencv. I used cmake doing what was told and it created files in a folder then i ran the install VC++ project. After which I went back to cmake and generated the examples. ran those. My path environment variable is C:\OpenCV2.0\bin, I was wondering whether it … | |
Please help me out with syntax mistakes [CODE] fun rappend(L1,L2) if null L2 then L1 else rappend(tl(L2) @ L1, hd(L2)) [/CODE] | |
I can write the recursion version correctly need help with writing a do loop in DrScheme. After the do loop the variable x is sent to car L intially and then is updated to first element of everything but first element in list. [CODE] (define (sumiteration L) (do ((x (car … | |
I got the files to build but with this link [url]http://www.site.uottawa.ca/~laganier/tutorial/opencv+directshow/cvision.htm[/url] the include files in step 2 don't show up anywhere. Help appreciated. | |
SO it says given the follwing relations father (X,Y) says that X is the father of Y mother (X,Y) says that X is the mother of Y female(X) says that X is female male(X) says that X is male Define a sister relation so that sister(X,Y) says that X is … | |
basically i have 4 files 2 contain the following data . Trying to find out data which is common and not common in both files and write it out to files common and not common. It almost works except for it doesn't compare the last item in the list before … | |
Here's what i have. Not sure what it is doing exactly. You pack a account object and then you write it to the buffer right? So shouldn't it print after i write it? Main #include <iostream> #include <iomanip> #include "account.h" #include "Lentext.h" #include "Deltext.h" using namespace std; int main() { … | |
[B][COLOR="Red"]a multilevel index using a B-tree is to be made for a file with 600,000 records. A block contains 1500 bytes, a key is 10 bytes, a pointer is 5 bytes and a data record is 100 bytes. [/COLOR][/B] [B]a)What is the order of the tree?(assume tree node=a disk block)[/B] … | |
gives me error on 3rd coded line in search(). [CODE] #ifndef MY_HT_CHAIN_H #define MY_HT_CHAIN_H #include <iostream> #include <vector> #include <list> using namespace std; class my_ht_chain { public: //constructor which creates a table of a certain size my_ht_chain(int initTableSize); //destructor ~my_ht_chain(); //insert a value based on key void insert(int key); //search … | |
Is my understanding of a vector list correct. vector<list<int>>. The vector holds a list of data type int? [CODE] class my_ht_chain { public: //constructor which creates a table of a certain size my_ht_chain(int size); //destructor ~my_ht_chain(); //insert a value based on key void insert(int key); //search for a value based … | |
Do I need a copy constructor? [CODE] #ifndef MY_MIN_PQ_H #define MY_MIN_PQ_H #include <iostream> #include <vector> using namespace std; class my_min_pq { public: //default constructor my_min_pq(); //destructor ~my_min_pq(); //insert element at end of sequence, and rearrange so minimum data at the front of array void enqueue(int data ,int priority); //removes data … | |
we are supposed to implement using STL vector and base it on priority and have have a data value So every time i enqueue i insert an in item into the end of the vector and if no space i modify. So do i reorder the list to place the … | |
i believe that it checks every nodes height and makes sure that the left -right is 1 or 0 or -1. It is supposed to return tree if tree is balanced which means that left-right is 0 or 1 or -1 at every node. [CODE] template <class KT, class DT> … | |
i get a stack error [CODE] template <class KT, class DT> void my_bst<KT,DT>::show_bst_structure() const { my_bst_node<KT,DT>* b=root; show_bst_structure(b,0); } template <class KT, class DT> void my_bst<KT,DT>::show_bst_structure(my_bst_node<KT,DT>*& p, int level) const { int i; if ( root == NULL ) { for ( i = 0; i < level; i++ ) … | |
Here's what I have so far [CODE] template <class KT, class DT> void my_bst<KT,DT>::show_bst_structure(my_bst_node<KT,DT>*& p) const { my_bst_node<KT,DT>* le=NULL; my_bst_node<KT,DT>* ri=NULL; //empty tree if(p==NULL) { cout<<"tree is empty\n"; } else { //print node key cout<<p->data<<endl; if(p->left!=NULL&&p->right!=NULL) { show_bst_structure(p->left); } else if(p->left!=NULL) { cout<<"enter left\n"; le=p->left; show_bst_structure(le); } else if(p->right!=NULL) { … | |
here is my code main [CODE] #include <iostream> #include "account.h" using namespace std; int main() { account a; return 0; } [/CODE] account.h [CODE] #include <iostream> #include "Lentext.h" #include "Deltext.h" #include <string> using namespace std; class account { private: char account_Number[11]; char name[1000]; char address[1000]; char city[16]; char state[3]; char … | |
I was wondering if any one had any suggestions for areas to research which tie with Artificial Intelligence. My interest is AI but since I haven't taken a class in AI. I can't do a project in that. | |
the delete must be by copying the data and then deleting if their are 2 nodes from that one root. CODE IS AT VERY END FOR THAT. CALLED REMOVE. Thanks. main [CODE] #include <iostream> #include "my_bst.h" using namespace std; int main() { my_bst<int,int> ab; ab.insert(4,1); ab.insert(2,2); ab.insert(6,3); ab.insert(1,4); ab.insert(3,5); ab.insert(5,6); … | |
1>c:\users\...\documents\visual studio 2008\projects\generic bst container\generic bst container\my_bst.h(80) : warning C4717: 'my_bst<int,int>::insert_sub' : recursive on all control paths, function will cause runtime stack overflow TEST.CPP #include <iostream> #include "my_bst.h" using namespace std; int main() { my_bst<int,int> ab; ab.insert(5,10); return 0; } MY_BST_NODE.H #ifndef MY_BST_NODE_H #define MY_BST_NODE_H #include <iostream> using namespace std; … | |
Error 1 error LNK2019: unresolved external symbol "public: __thiscall vector::my_vector<int>::~my_vector<int>(void)" (??1?$my_vector@H@vector@@QAE@XZ) referenced in function _main test.obj Error 2 error LNK2019: unresolved external symbol "public: __thiscall vector::my_vector<int>::my_vector<int>(void)" (??0?$my_vector@H@vector@@QAE@XZ) referenced in function _main test.obj Error 3 fatal error LNK1120: 2 unresolved externals C:\Users\...\Documents\Visual Studio 2008\Projects\Iterator and Generic Vector Container\Debug\Iterator and Generic Vector … | |
I have a dynamic array and i am trying to create a iterator class to support the list. I am adding begin and end. As well as a new class. error C2146: syntax error : missing ';' before identifier 'begin' Error 7 error C2146: syntax error : missing ';' before … |
The End.