```
def getClaimsByYear(dates, claims, desiredYear):
claimsInYear = []
for i in range(len(dates)):
dates = dates(i)
claim = claims(i)
parts = date.split("/")
year = int(parts[2])
```

]]>```
#include<iostream.h>
char *TESTmarks(char *t){
char marks [] = {'.',';',':','!',',','?'};
char *newm=new char [strlen(t)];
for( int i = 0;i<strlen(t);i++)
{
for(int k = 0;k<=7 ;k++)
{
if(t[i] == marks[k])
t[i] = ' ';
}
}
return t;
}
main()
{
char t[50];
cin>>t;
cout<<TESTmarks(t);
}
```

]]>```
double Node::ConvertChar(char key[])
{
double value;
value=atof(key);
return value;
}
void Node::ConvertFormula(string formula,int resistor,vector <Resistor> &Res,vector <double> &OpArray){
int Operator=resistor-2;
resistor=resistor-1;
int length=formula.length();
int j=length-4;
double resistance;
while(length>0)
{
char temp[3]; int x=1;
for(int i=2;i>=0;i--)
{
temp[i]=formula[length-x];
x++;
}
resistance=ConvertChar(temp);
Res[resistor].SetResistance(resistance);
resistor--;
while(j>0)
{
if(formula[j]=='+')
{
OpArray[Operator]=-1.0;
}else
{
OpArray[Operator]=-2.0;
}
Operator--;
j=j-4;
}
length=length-4;
}
}
Node* Node::StoreFormula(int Tcomponent,vector <Resistor> &Res,vector <double> &OpArray,int Operator) {
node* root=NULL; int x=Operator-1;
for(int i=Tcomponent;i>0;i--)
{
if(i%2==0)
{
double OperatorValue=OpArray[x];
root=insertNode(root,OperatorValue);
x--;
}else
{
root=insertNode(root,Res[Operator].getResistance());
Operator--;
}
}
return root;
}
Node* Node::GenerateRandomCircuit(Node* root,vector <Resistor>&Res,vector <double>&OpArray,int& resistor,int& Operator) {
resistor=RandomResistor();
Operator=resistor-1;
Res.resize(resistor);
OpArray.resize(Operator);
SetRandomResistance(resistor,Res,Operator);
SetOperator(OpArray,Operator);
int Tcomponent=Operator+resistor;
root=StoreFormula(Tcomponent,Res,OpArray,Operator);
return root;
}
Node* Node::EnterFormula(Node* root,vector <Resistor>&Res,vector <double>&OpArray,int& resistor,int& Operator) {
int length; string formula; int i;
int Tcomponent;
cout<<"Enter circuit formula : ";
cin>>formula;
length=formula.length();
Operator=0; i=length-4;
while(i>0)
{
if(formula[i]=='+'||'/')
{
Operator++;
}
i=i-4;
}
resistor=(length-Operator)/3;
Tcomponent=Operator+resistor;
Res.resize(resistor);
OpArray.resize(Operator);
ConvertFormula(formula,resistor,Res,OpArray);
root=StoreFormula(Tcomponent,Res,OpArray,Operator);
return root;
}
```

**Can anyone explain the coding? Because i am having problem to understand it and by the way this program is about binary tree**

The following specifications must met:

1) Total number of resistors in the circuit is between 3 and 8.

2) The circuit network layout is restricted only to the one which can be expressed by a circuit

formula. ]]>

I've been preparing a project (Periodic table of Elements), so user by clicking on elements can access to another form which showing the element properties. Also, the user can search the element based on name, atomic number, year of discovered, and sign.

Don't have a clue how to connect labels in one form with strings and integers in the other, also dunno how to code a "Search"; wanna make for example "a name" from one form appear in the other form's label by searching it by name. It should be easy. Could someone teach me how to have it done?

]]>