The post how to stop execution of a code until a Jwindow is closed? appeared first on IT Answers.

]]>The post blocking permission inhertiance in Windows Server 2003 appeared first on IT Answers.

]]>The post blocking permission inhertiance in Windows Server 2003 appeared first on IT Answers.

]]>The post How to create a (visual) window baseclass without xaml appeared first on IT Answers.

]]>I want to create a window baseclass that contains 3 elements:

– a ribbon control (ie devcomponents wpf ribbon)

– a region to contain child form controls

– a statusbar

This way, all windows that inherit from this window will automatically provide these controls (and soms functions).

I created a lookless windowbase.cs file that adds a 3-row grid to the window in the constructor containing a ribbon in row 0 and a statusbar in row 2.

2 problems arrise when using this strategy:

1/ The child form does not show any inherited controls during design time. This is a lesser problem, since the ribbon control and status bar can be modified from code-behind in the constructor.

2/ After adding controls to the child window, the xaml cannot be parsed anymore.

I guess a need to add something like a contencontrol, to be added to row 1 from the code behind, but previous attempts all led to a inparsable xaml file.

Am I missing something obvious here?

Visual inheritance is pretty basic in winforms, but I guess this work-around should be possible too…

The post How to create a (visual) window baseclass without xaml appeared first on IT Answers.

]]>The post doesn’t work block policy inheritance on OU domain controller appeared first on IT Answers.

]]>I applied some policy under administrative tamplates on domain level , however applied same policies to OU domain controller , even checked block policy inheritance any suggestion

thanks in advance

The post doesn’t work block policy inheritance on OU domain controller appeared first on IT Answers.

]]>The post Java Program appeared first on IT Answers.

]]>Find the 4th prime number Z such that Z=NumberOfDigits(R) where Z is prime AND R is prime AND

where R=2p-1 where P is prime.

Example the 1st prime number Z is 2, because 2=NumberOfDigits(31) because 2 is prime and because

31=25-1 and because 5 is prime.

We are looking for the 2nd,3rd, 4th prime number Z in the Mageua Senoko series as well as its

corresponding R and P values.

Hints:

1 The 4th Z corresponds to a very large M. Take this into account when doing the calculation.

2 Please programme the solution to this problem in JAVA – We require your code

3 Computational efficiency is important.

4 Object orientation and inheritance MUST be used. i.e. Z is a prime, and a subset (subclass) of R,

R is also prime and a subset of P which is also prime.

My solution:

public class PrimeZ {

int firstPrimeNumOfZ=2;

int SecondPrimeNumOfZ;

int thirdPrimeNumOfZ;

int fourthPrimeNumOfZ;

long valueP;

long valueR;

public int getFourthPrimeNumOfZ() {

return fourthPrimeNumOfZ;

}

public void setFourthPrimeNumOfZ(int fourthPrimeNumOfZ) {

this.fourthPrimeNumOfZ = fourthPrimeNumOfZ;

}

public int getSecondPrimeNumOfZ() {

int firstPrimeNumOfZ=2;

int R=31;

int P=5;

R =(int) (Math.pow(firstPrimeNumOfZ, P)-1);

return SecondPrimeNumOfZ;

}

public void setSecondPrimeNumOfZ(int secondPrimeNumOfZ) {

SecondPrimeNumOfZ = secondPrimeNumOfZ;

}

public int getThirdPrimeNumOfZ() {

int P=0;

int R =(int) (Math.pow(firstPrimeNumOfZ, P)-1);

return thirdPrimeNumOfZ;

}

public void setThirdPrimeNumOfZ(int thirdPrimeNumOfZ) {

this.thirdPrimeNumOfZ = thirdPrimeNumOfZ;

}

public long getValueP() {

return valueP;

}

public void setValueP(long valueP) {

this.valueP = valueP;

}

public long getValueR() {

int P = 0;

int R =(int) (Math.pow(firstPrimeNumOfZ, P)-1);

return valueR;

}

public void setValueR(long valueR) {

this.valueR = valueR;

}

class PrimeR extends PrimeZ {

public int getPrimeR(){

int R;

int firstPrimeNumOfZ = 2;

int P=5;

{

R =(int) (Math.pow(firstPrimeNumOfZ, P)-1);

}

return R;

}

}

class PrimeP extends PrimeZ {

public int getPrimeP() {

int R=10;

int firstPrimeNumOfZ = 2;

int P = 0;

{

R =(int) (Math.pow(firstPrimeNumOfZ, P)-1);

}

return P;

}

}

public int formulsForTheAppl(int value,int powerOf){

int firstPrimeNumOfZ = 2;

int R = 31;

int P=5;

R =(int) (Math.pow(firstPrimeNumOfZ, P)-1);

if (Math.pow(value, powerOf)== 0){ /* pow(x, 0) returns 1 */

return 1;

}

else{

return (int) (Math.pow(value, powerOf – 1) * value);

}

}

public static void main(String[] args){

PrimeZ objPrime = new PrimeZ();

//PrimeR objPrimer = new PrimeR();

System.out.println(“The SecondPrimeNumOfZ is:” +objPrime.fourthPrimeNumOfZ);

System.out.println(“The thirdPrimeNumOfZ is:” +objPrime.fourthPrimeNumOfZ);

System.out.println(“The fourthPrimeNumOfZ is:” +objPrime.fourthPrimeNumOfZ);

//System.out.println(“The new value of PrimeR is:” + objPrimer.getPrimeR);

// System.out.println(“The new value of PrimeP is:”+((PrimeP) objPrime).getPrimeP());

}

}

am I doing the right thing?

The post Java Program appeared first on IT Answers.

]]>