tag:blogger.com,1999:blog-9940044931503489132024-03-05T22:14:20.032-08:00LifeMesh: Life, IT & Gadgets| Life, Apps, Android, iPhone, iPad, Project Management, Ruby On Rails,PHP,JavaUnknownnoreply@blogger.comBlogger50125tag:blogger.com,1999:blog-994004493150348913.post-26586249092675213622013-06-08T03:04:00.003-07:002013-06-08T03:04:40.339-07:00Oracle Messages - Just for Fun <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Verdana;"></span><br />
<h2>
<span style="font-family: Verdana;">Some of the Oracle messages...</span></h2>
<span style="font-family: Verdana;">
</span><span style="font-family: Verdana; font-size: x-small;">Q. What if your Dad loses his car keys?<br />
A. 'Parent keys not found!'<br />
Q. What if your old girl friend spots you with your new one?<br />
A. 'Duplicate value on index!'<br />
Q. What if the golf ball doesn't get into the hole at all?<br />
A. 'Value larger than specified precision!'<br />
Q. What if you try to freak out with somebody else's girlfriend and being kicked out?<br />
A. 'Insufficient privileges on the specified object!'<br />
Q. What if you don't get any response from the girl next door?<br />
A. 'No data found!' or ' Query caused no rows retrieved!'<br />
Q. What if you get response from the girl next door and her Mom too?<br />
A. 'SELECT INTO returns too many rows!'<br />
Q. What if you dial a wrong number?<br />
A. 'Invalid number' or ' Object doesn't exist!'<br />
Q. What if you try to beat your own trumpet?<br />
A. 'Object is found mutating!'<br />
Q. What if you are too late to office and the boss catches you?<br />
A. 'Discrete transaction failed!'<br />
Q. What if you see 'theatre full' when you go to a movie?<br />
A. 'Maximum number of users exceeded!'<br />
Q. What if you don't get table in the lunch room?<br />
A. 'System out of tablespace!'<br />
Q. What if you need to go on a diet?<br />
A. ‘Invalid Body Size’<br />
</span></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-9988727043320159902013-03-29T23:06:00.000-07:002013-03-29T23:09:54.102-07:00Kochi Get GDG Chapter<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Google Developers Group (GDG), the non-profit community initiative
supported by Google Inc.. It will be soon launched at the Startup Village
here in Kochi this Statuday.<br />
<br />
What will GDG Kochi do ?<br />
<br />
The group once fired up will be catering
to the software developers community with events such as tech talks,
code contests and hack-athons.<br />
<br />
This would be the second GDG
in Kerala Trivandrum already has one and is the
and the 380th on the planet.<br />
<br />
<br />
The
first event will be "Android Bootcamp" its said.<br />
<br />
The activities of <a href="http://economictimes.indiatimes.com/topic/GDG%20Kochi">GDG Kochi</a> is supported by Uttam Tripathi, Programme Manager for Developer Relations at <a href="http://economictimes.indiatimes.com/topic/Google%20India">Google India</a> and Bhumika Kaushik, Developer Community Coordinator at Google India.</div>
Unknownnoreply@blogger.com5tag:blogger.com,1999:blog-994004493150348913.post-25046857221419313202013-03-29T23:00:00.005-07:002013-03-29T23:08:10.197-07:00Pascal Notes. Getting started.<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
Var declaration<br />
<br />
<br />
var,var,var .... : Type ;<br />
<br />
PChar = > Far ptr ( use for win call in API)<br />
<br />
<br />
<br />
<br />
GetMem = > malloc<br />
<br />
StrPcopy = > Copy String to Pointer<br />
<br />
StrCat() => Concatenates <br />
<br />
+ => Concatenate strings <br />
<br />
<br />
FreeMem => free()<br />
<br />
<br />
<br />
Arrays<br />
======<br />
A: Array [1..8] of integer;<br />
<br />
<br />
int A[8];<br />
<br />
<br />
<br />
Structures<br />
==========<br />
Type <br />
MyRec= record<br />
i: integer;<br />
d: Double;<br />
end;<br />
<br />
accessing a record( structures)<br />
===============================<br />
<br />
var N: MyRec<br />
ebgin<br />
N.i = 1000.1<br />
N.d = 333.4<br />
<br />
<br />
Pointers<br />
========<br />
Pointer is untyped <br />
<br />
Declare Pointers<br />
<br />
Declare Typed pointers (like C's *)<br />
<br />
e.g:<br />
<br />
PInt = ^Integer<br />
PMyClass = ^MyClass<br />
<br />
<br />
<br />
e.g<br />
<br />
Program PtrTest<br />
<br />
Type<br />
MyRec = record<br />
I: integer<br />
s:String<br />
R:Real<br />
End;<br />
<br />
PMyRrec = ^MyRec<br />
<br />
var<br />
Rec : PMyRec<br />
<br />
begin<br />
New(Rec) -> allocate c++ new<br />
<br />
Rec^.I:= 10; // ^. in pascal is the same as -> in C<br />
rec^.s:='xx';<br />
rec^.R:= 6.384<br />
<br />
Dispose (Rec) // free(ptr)<br />
<br />
End.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-44052319291743890702013-03-29T23:00:00.002-07:002013-03-29T23:00:11.445-07:00Some SCJP Notes<div dir="ltr" style="text-align: left;" trbidi="on">
<br />Java Rules<br /><br />class level variables are inited to default values<br /><br /><br /><br />&& or || <br /> are called Short circuit because<br />they do not evaluate the next expression if the condtion is false<br /><br /><br />array length is 0 based <br />String length is 1 based <br /><br />**SWITCH CASE <br /><br />ALL *case* statements,<br /> that are palced after the first case statment that evalautes to <br />*true* , will evaluates to true<br /><br />i.e <br /><br />switch (i)<br />{<br />case 1 :<br /> <br /><br />case 2:<br /> // assume this evalutes //to true<br />case 3:<br /><br />case default :<br /> //evalautes to // true <br />}<br /><br /><br />1) -source 1.4 to enable assertions<br /><br />2) assert :false makes disables assertiosn at runtime<br /><br />3) The assertion statement is defined in the form of Expression1 : Expression2; where Expression1 is a boolean expression and Expression2 is an expression that has a value<br /><br />4)Assertion are not to be used for argument checking in public methods as it is typically part of the published specifications of a method, and these specifications must be obeyed whether or not assertions are enabled or disabled.<br /><br />It is aslo not be used do any work that your application requires for correct operation.<br /><br />5) Switch can use only short and INT <br /><br />!!!!!EXAM WATCH <br /> ONE LINE statments after WHILE or FOR<br /><br />!!!!!!!!EXAM WATCH<br /> SWITCH inside a (WHILE or FOR) that does NOT use the LOOP counter<br /><br /><br />6) Local variable get stored on the stack ,Other objects on the STACK<br /><br /><br />7) An object is can garbage colelcted When an object becomes unreachable by any code NOT JUST OUT OF SCOPE because there can be objects in the outer loop that could be referecing it .<br /><br />!!EXAM WATCH<br /><br /> all primitives are a java keywords <br /> String is an OBJECT and is not a keyword.<br /><br /><br />!!Exam watch <br /><br />double cant be used with << opertor<br /><br /><br /><br />9 )if you yeald a thread it is stopped and goes into ready state<br /><br />10) you can not start a dead thread<br />!! EXAM WATCH ....<br /> SHORT does not have a declararion such as<br /> Short k = 35 S ; /// S ??? where did youget that <br /><br />7) inteface def constants must public static and final <br /><br /> all methods of the if needs to be declared by the NOn abstract class.<br /><br /><br />8)default type of decimal in java is double<br /><br />9) benefit of encapslation is to that the implementation of a class can be changed without breaking code that uses it.<br /><br />10) + and - are unary operators<br /><br />11) use left to right eval for ++ -- opertators .<br /><br />12) Objective of oops is encapsulation, inheritance, polymorphism<br /><br />!!!EXAM WATCH<br /><br /> An unsigned right shift >>> by a smaller positive amount (< total of bits of type) of a <br /> small negative number will result in a large positive number. <br /><br /><br />!!!EXAM WATCH<br /><br /> While assigning one type to the other the value should be in range and the precision of the type should not be lost.<br /> Precision includes sign and decimals. <br /><br /><br />!!!EXAM WATCH<br /> <br /> Construction of a sub class whose Parent Does Not have a Public-Default-Constructor.<br /><br /> CompileTime Error<br /><br /><br /><br />13) The default contstructors modifier is the same as the access to the class<br /><br />14) Transient and Static Vaiable are not Serializable<br /><br />15) String Class overrides the equals menthod. StringBuffer does NOT.<br /><br />15) Constructors and Static methods can not be overridden<br /><br />16) Static and private methods do not participate in polymorphism .<br /> Private - > Not Accessible .Static -> Can not be overriden <br /><br />17) The constructor of the base class is executed first.<br /><br />18) writing your own DEFAULT CONSTRRUCTOR has NO EFFECT.<br /><br />19) Nested classes can not be transient.<br /><br />20) Strangely enough you can define an inner class in an interface. <br />e.g<br />interface IFace { <br /> public class X { //It is not member inner class <br /> void method_Of_X() {<br /> System.out.println("Without static modifier, it is still static nested class."); <br /> } <br /> } <br /><br />21) anonymous class has one and only one constructor.<br /> You cannot explicitly define constructors for anonymous class, but compiler generates <br /> an constructor for it with the same signature as its parent constructor called.<br /><br /><br />22) Evaluations in java is from left to right . Beware of the i++ and the ++i operators.<br /><br /><br />23) Math class and Arrays are not serialzeable<br /><br /><br />24) Class level variables are inited to default values<br /><br />25)<br />&& or || <br /> are called Short circuit because<br />they do not evaluate the next expression if the condtion is false<br /><br />26)Length of strings and arrays are 1 based and the array indexes satrt from 0.<br /><br /><br />!!!EXAM WATCH<br /><br />**SWITCH CASE <br /><br />ALL *case* statements,<br /> that are palced after the first case statment that evalautes to <br />*true* , will evaluates to true<br /><br />i.e <br /><br />switch (i)<br />{<br />case 1 :<br /> <br /><br />case 2:<br /> // assume this evalutes //to true<br />case 3:<br /><br />case default :<br /> //evalautes to // true <br />}<br /><br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-29056185642573404682013-03-29T22:59:00.000-07:002013-03-29T22:59:11.938-07:00Getting OLD web Logic to start on XP - Loads Posix<div dir="ltr" style="text-align: left;" trbidi="on">
Recently had to visit a client get his old weblogic server to start on his Enterpirse network.<br />
<br />
He said "I just tried _07 (on WinXP) and I not sure but I think the error I'm getting now about 'libmuxer not found' didn' happen with _06. Is that a known problem?<br /><br />
Got it form my memory. The WLS was trying to load the Posix performance pack <br />So I told him this<br />
<br />
"You should be able to correct this with a vm arg: -Dos.name="windows 2000".<br />
<br />
<br />
<br />
<br />
<br />
Well, it feels good to have save a company and some good developers some valuable development time.<br /><br />
</div>
Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-994004493150348913.post-46048955424095556992013-03-29T22:54:00.001-07:002013-03-29T22:54:54.726-07:00Java Newbe - Code based interview questions <div dir="ltr" style="text-align: left;" trbidi="on">
. 1) class Super{ <br /><br />2) public float getNum(){return 3.0f;} <br /><br />3) } <br /><br />4) <br /><br />5) public class Sub extends Super{ <br /><br />6) <br /><br />7) } <br /><br />which method, placed at line 6, will cause a compiler error? <br /><br />A. public float getNum(){return 4.0f;} <br /><br />B. public void getNum(){} <br /><br />C. public void getNum(double d){} <br /><br />D. public double getNum(float d){return 4.0d;} <br /><br />/b <br /><br /><br />4. public class Foo{ <br /><br />public static void main(String args[]){ <br /><br />try{return;} <br /><br />finally{ System.out.println("Finally");} <br /><br />} <br /><br />} <br /><br />what is the result? <br /><br />A. print out nothing <br /><br />B. print out "Finally" <br /><br />C. compile error <br /><br />/b <br /><br /><br />12. public class Test{ <br /><br />public static void main(String[] args){ <br /><br />String foo=args[1]; <br /><br />Sring bar=args[2]; <br /><br />String baz=args[3]; <br /><br />} <br /><br />} <br /><br />java Test Red Green Blue <br /><br />what is the value of baz? <br /><br />A. baz has value of "" <br /><br />B. baz has value of null <br /><br />C. baz has value of "Red" <br /><br />D. baz has value of "Blue" <br /><br />E. baz has value of "Green" <br /><br />F. the code does not compile <br /><br />G. the program throw an exception <br /><br />/g <br /><br />/ArrayIndexOutOfBoundsException <br /><br /><br />27. public class SychTest{ <br /><br />private int x; <br /><br />private int y; <br /><br />public void setX(int i){ x=i;} <br /><br />public void setY(int i){y=i;} <br /><br />public Synchronized void setXY(int i){ <br /><br />setX(i); <br /><br />setY(i); <br /><br />} <br /><br />public Synchronized boolean check(){ <br /><br />return x!=y; <br /><br />} <br /><br />} <br /><br />Under which conditions will check() return true when called from a different class? <br /><br />A.check() can never return true. <br /><br />B.check() can return true when setXY is callled by multiple threads. <br /><br />C.check() can return true when multiple threads call setX and setY separately. <br /><br />D.check() can only return true if SychTest is changed allow x and y to be set separately. <br /><br />/c <br /><br /><br />public class Foo{ <br /><br />public static void main(String[] args){ <br /><br />StringBuffer a = new StringBuffer("A"); <br /><br />StringBuffer b = new StringBuffer("B"); <br /><br />operate(a,b); <br /><br />System.out.println(a + "," + b); <br /><br />} <br /><br />static void operate(StringBuffer x,StringBuffer y){ <br /><br />y.append(x); <br /><br />y = x; <br /><br />} // end operate <br /><br />} <br /><br /><br />What print? <br /><br /><br />a. "A,B" b. "A,A" c. "B,B" <br /><br />d. "AB,B" e. "AB,AB" f, "A,AB" <br /><br /><br />Answer: <br /><br />F <br /><br /><br />public class x implements Runnable{ <br /><br />private int x; <br /><br />private int y; <br /><br /><br />public static void main(String args[] ){ <br /><br />x that = new x(); <br /><br />(new Thread(that)).start(); <br /><br />(new Thread(that)).start(); <br /><br />} <br /><br />public synchronized void run(){ <br /><br />for( ; ; ){ <br /><br />x++; <br /><br />y++; <br /><br />System.out.Println("x=" + x + ", y=" +y); <br /><br />} <br /><br />} <br /><br /><br />a. An error at line 11 <br /><br />b. An error at line 7, 8 <br /><br />c. The program prints pairs of values for x and y that might not always be the same on the same line (for example "x=2, y=1") <br /><br />d. The program prints pairs of values for x and y that are always the same on the same line (for example "x=1, y=1") in addition, each value appears twice (for example "x=1, y=1" followed by "x=1, y=1") <br /><br />e. The program prints pairs of values for x and y that are always the same on the same line (for example "x=1, y=1") in addition, each value appears only once (for example "x=1, y=1", followed by "x=2, y=2) <br /><br /><br />1. public class x{ <br /><br />2. public object m(){ <br /><br />3. Object o=new Float(2.14F); <br /><br />4. Object [] oa=new Object[1]; <br /><br />5. oa[0]=o; <br /><br />6. o=null; <br /><br />7. return o; <br /><br />8. } // end m() method. <br /><br />9. } <br /><br /><br />When is the Float object creation in line 3 eligible for garbage collection ? <br /><br /><br />a. just after line 5 <br /><br />b. just after line 6 <br /><br />c. just after line 7 (that is , as the method returns) <br /><br />d. just after line 8 (that is, as the method ends) <br /><br /><br />1. abstract class AbstractIt{ <br /><br />2. abstract float getFloat(); <br /><br />3. } <br /><br />4. public class AbstractTest extends AbstractIt{ <br /><br />5. private float f1 = 1.0f; <br /><br />6. private float getFloat(){return f1} <br /><br />7. } <br /><br /><br />what result? <br /><br /><br />a. compile success <br /><br />b. An error at line 6 <br /><br />c. An error at line 4 <br /><br />d. An error at line 2 <br /><br /><br />Answer: <br /><br />b <br /><br /><br />2. import java.io.IOException; <br /><br /><br />public class ExceptionTest{ <br /><br />public static void main(String[] args){ <br /><br />try{ <br /><br />methodA(); <br /><br />}catch(IOException io){ <br /><br />System.out.println("caught IOException"); <br /><br />}catch(Exception e){ <br /><br />System.out.println("caught Exception"); <br /><br />} <br /><br />} <br /><br />public void methodA(){ <br /><br />throw new IOException(); <br /><br />} <br /><br />} <br /><br /><br />what result? <br /><br /><br />a. The code will not compile <br /><br />b. Output is "caught Exception" <br /><br />c. Output is "caught IOException" <br /><br />d. The program execute nomally whihout print a message <br /><br /><br />Answer: <br /><br />a <br /><br />non-static method methodA() cannot be refereced from a static context. <br /><br /><br />3. public class Foo{ <br /><br />public static void main(String[] args)[ <br /><br />try{ return;} <br /><br />finally{ System.out.println("Finally");} <br /><br />} <br /><br />} <br /><br /><br />what result? <br /><br /><br />a. Print nothing <br /><br />b. Print "Finally" <br /><br />c. Not compiled and will Exception thrown <br /><br />d. Not compile because catch block missing <br /><br /><br />Answer: <br /><br />b <br /><br /><br />4. 1. class A implements Runnable { <br /><br />2. int I; <br /><br />3. public void run () { <br /><br />4. try { <br /><br />5. Thread.sleep(5000); <br /><br />6. i=10; <br /><br />7. }catch(InterruptedException e) {} <br /><br />8. } <br /><br />9. } <br /><br />10. <br /><br />11. public class Test { <br /><br />12. public static void main (String args[]) { <br /><br />13. try { <br /><br />14. A a = new A(); <br /><br />15. Thread t = new Thread(a); <br /><br />16. t.start(); <br /><br />17. <br /><br />18. int j= a.i; <br /><br />19. <br /><br />20. }catch (Exception e) {} <br /><br />21. } <br /><br />22. } <br /><br /><br />Which statement at line 17 will ensure that j=10 at line 19 <br /><br /><br />A. a.wait(); B. t.wait(); C. t.join(); D. t.yield(); <br /><br />E. t.notify(); F. a.notify(); G. t.interrupt(); <br /><br /><br />Answer: <br /><br />C <br /><br /><br />5. 1. public class SyncTest { <br /><br />2. private int x; <br /><br />3. private int y; <br /><br />4. private synchronized void set X (int i){ x=i; } <br /><br />5. private synchronized void set Y (int i){ y=i; } <br /><br />6. public void setXY (int i) {set X(i); set Y(i); } <br /><br />7. public synchronized boolean check() {return X != Y; } <br /><br />8. } <br /><br /><br />Under which conditions will check() return when called from a different class. Choose one <br /><br /><br />A. check() can never return true <br /><br />B. check() can return true when set XY is called by multiple threads <br /><br />C. check() can true when multiple threads call set X and set Y separately <br /><br />D. check() can only return true if synchTest is changed to allow x and y to be set separately <br /><br /><br />Answer: <br /><br />C <br /><br /><br />6. Which is a method of the MouseMotionListener interface <br /><br /><br />A. public void mouseDragged(MouseEvent) <br /><br />B. public boolean mouseDragged(MouseEvent) <br /><br />C. public void mouseDragged(MouseMotionEvent) <br /><br />D. public boolean mouseDragged(MouseMotionEvent) <br /><br />E. public boolean mouseDragged(MouseMotionEvent) <br /><br /><br />Answer: <br /><br />A <br /><br /><br />7. AnInterface is an interface. <br /><br />AnAdapter0 is an non-Abstract, not-final with zero argument construter <br /><br />AnAdapter1 is an non-Abstract, not-final without zero argument construter, but with a constructor to take one argument. <br /><br /><br />Which will create Anonymous class (choose two) <br /><br /><br />a)AnAdapter0 a = new AnAdapter0(); <br /><br />b)AnAdapter1 a = new AnAdapter1(); <br /><br />c)AnAdapter0 a = new AnAdapter0(5); <br /><br />d)AnAdapter1 a = new AnAdapter1(5); <br /><br />e)AnInterface a = new AnInterface(5); <br /><br /><br />Ans: <br /><br />a and d are correct. B, c and e are wrong. <br /><br /><br />8. What is true about java.util.Arraylist (choose one) <br /><br /><br />a)The elements in the collection are ordered <br /><br />b)The collection is guaranteed to be immutable. <br /><br />c)The elements in the collection are guaranteed to be unique. <br /><br />d)The elements in the collection are accessed using a unique key <br /><br />e)The elements in the collection are guaranteed to be synchronized <br /><br /><br />Answer: <br /><br />A is correct. <br /><br />ArrayList implemnets all optional List operation. <br /><br />b is wrong because lists typically allow duplicate elements. C is wrong this is Set facility. D is wrong because this is Map facility. <br /><br />E is wrong, Note that this implementation is not synchronized. If multiple threads access an ArrayList instance concurrently, and at least one of the threads modifies the list structurally, it must be synchronized externally ( refer documents ) <br /><br /><br />9. 1.class A{ <br /><br />2. public int getNumber(int a){ <br /><br />3. return a +1; <br /><br />4. } <br /><br />5.} <br /><br />6.class B extends A{ <br /><br />7. public int getNumber(int a){ <br /><br />8. return a + 2; <br /><br />9. } <br /><br />10. public static void main(String args[]){ <br /><br />11. B b = new B(); <br /><br />12. System.out.println(b.getNumber(0)); <br /><br />13. } <br /><br />14.} <br /><br /><br />a)compilation succeed and 1 is printed <br /><br />b)compilation succeed and 2 is printed <br /><br />c)An error at line 8 cause compilation fail <br /><br />d)An error at line 12 cause compilation fail <br /><br /><br />Answer <br /><br />B is correct. <br /><br /><br />10. Which two are equivelant <br /><br /><br />a)16/2^2 <br /><br />b)16>>2 <br /><br />c)16>>>2 <br /><br />d)16/2 <br /><br />e)16*4 <br /><br /><br />Answer: <br /><br />b and c are correct. <br /><br /><br />11. public class TestAnonymous { <br /><br /><br />public static void main(String []args){ <br /><br />final StringBuffer s1=new StringBuffer(); <br /><br />final StringBuffer s2=new StringBuffer(); <br /><br /><br />new Thread(){ <br /><br />//Anonymous class <br /><br />public void run(){ <br /><br />synchronized(s1){ <br /><br />s1.append("A"); <br /><br /><br />synchronized(s2){ <br /><br />s2.append(“B?; <br /><br />System.out.println(s1); <br /><br />System.out.println(s2); <br /><br />} // end synch..(s2) <br /><br />} // end synch..(s1) <br /><br />} // end run <br /><br />}.start(); // end anonymous class <br /><br /><br />new Thread(){ <br /><br />//Anonymous class <br /><br />public void run(){ <br /><br /><br />synchronized(s2){ <br /><br />s2.append("C"); <br /><br /><br />synchronized(s1){ <br /><br />s1.append("D"); <br /><br />System.out.println(s2); <br /><br />System.out.println(s1); <br /><br />} // end synch..(s1) <br /><br />} // end synch..(s2) <br /><br />} // end run <br /><br />}.start(); // end anonymous class <br /><br />} // end main <br /><br />} // end Test class <br /><br /><br />What is the result? ( choose two ) <br /><br /><br />a)print ABBCAD <br /><br />b)print CDDACB <br /><br />c)print ADCBADBC <br /><br />d)The output is a not-deterministic point because of a possible deadlock condition <br /><br />e)The output is dependent on the threading model of the system the program is running on. <br /><br /><br />Answer: <br /><br />a and b are the correct answer <br /><br /><br />int i=1; <br /><br />int j=i++; <br /><br />if( (i>++j) && (i++==j) ) <br /><br />i += j; <br /><br /><br />What is the value of i after this code is finished? <br /><br /><br />Answer: <br /><br />i = 2 is the correct answer. <br /><br /><br />which two CANNOT directly cause a thread to stop executing? <br /><br /><br />a. exiting from a synchronized block <br /><br />b. calling the wait method <br /><br />c. calling the notify method on an object <br /><br />d. calling a read method on an InputStream object <br /><br />e. calling the setPriority method on a Thread object <br /><br /><br />Answer: <br /><br />I choose d and e <br /><br /><br />which is correct for declaring a character <br /><br />a. char c = "a"; <br /><br />b. char c = '\''; <br /><br />c. char c = ‘café’ <br /><br />d. char c = '\ucafe'; <br /><br />e. char c = 'u10100'; <br /><br />f. char c = (char)true; <br /><br /><br />Answer: <br /><br />b, d <br /><br /><br />public interface Foo { <br /><br />( ) int k=4; <br /><br />} <br /><br /><br />which one the right to describe int k = 4 in interface foo? (choose three) <br /><br /><br />a. abstract <br /><br />b. private <br /><br />c. volatile <br /><br />d. protected <br /><br />e. static <br /><br />f. public <br /><br />g. transient <br /><br />h. final <br /><br /><br />Answer: <br /><br />I choose e,f and h <br /><br /><br />switch(i) {} <br /><br />which one i will accept it? <br /><br /><br />a. byte <br /><br />b. long <br /><br />c. duoble <br /><br />d. float <br /><br /><br />Answer: <br /><br />A <br /><br />The accepted values for I are: byte, int, short, char <br /><br /><br />Given an Action Event which method allows you to identify the affected Component? <br /><br /><br />a. public Component getClass() b. pubilc Object getSource() <br /><br />c. public Component getSource() d. public component getTarget() <br /><br /><br />Answer: <br /><br />b <br /><br /><br />int i=1; int j=10; <br /><br /><br />do{ <br /><br />if(i>j) continue; <br /><br />j--; <br /><br />}while(++i<6 br=""><br /><br />After execution, what are the value for i and j? <br /><br /><br />a. i=6 and j=5 <br /><br />b.i=5 and j=5 <br /><br />c.i=6 and j=4 <br /><br />d.i=5 and j=6 <br /><br />e.i=6 and j=6 <br /><br /><br />Answer: <br /><br />correct answer is ( a ): i = 6 and j = 5 <br /><br /><br />String s="base"; <br /><br />s.substring(2,4); <br /><br />s.concat("xxxx"); <br /><br />s+="ball" <br /><br /><br />What is the result of s? (note: there was a TextField to write your answer into it ) <br /><br /><br />Answer: <br /><br />baseball <br /><br /><br />which statement is true? ( choose one ) <br /><br /><br />a. the Error class is a RuntimeException <br /><br />b. No exceptions are subclass of Error <br /><br />c. Any statement that may throw an Error must be enclosed in a try block <br /><br />d. Any statement that may throw an Exception must be enclosed in a try block <br /><br />e. Any statement that may throw a RuntimeException must be enclosed in a try block <br /><br /><br />Answer: <br /><br />I am not sure if < b > is correct or not. <br /><br /><br />byte b = 127; <br /><br />byte c = 126; <br /><br />byte a = b + c; <br /><br /><br />what is the result? <br /><br /><br />a. a will equal to 253 <br /><br />b. compile error <br /><br />c. exception at 1 <br /><br />d. exception at 2 <br /><br /><br />Answer: <br /><br />b is correct. compile error: possible loss of precision. To solve this problem, cast it <br /><br />byte a = (byte)(b + c); <br /><br /><br />28. <br /><br />import java.awt.*; <br /><br /><br />public class Test extends Frame { <br /><br />public static void main(String [] args) { <br /><br />new Test(); <br /><br />} <br /><br />Test () { <br /><br />add( new Label(“Hello? ); <br /><br />add( new TextField(“World? ); <br /><br />add( new Button(“Ok? ); <br /><br />pack(); <br /><br />show(); <br /><br />} <br /><br />} <br /><br /><br />what is the result? <br /><br /><br />a. compile error <br /><br />b. three components will appear, Label at North, TextField at South and Button at Center. <br /><br />c. only one Button at the Center <br /><br />d. Frame will appear, but nothing there <br /><br />e. exception will be thrown <br /><br /><br />Answer: <br /><br />C <br /><br /><br />String foo = “blue? <br /><br />boolean [] b = new boolean[10]; <br /><br />if(b[0]) <br /><br />foo = “green? <br /><br />System.out.println(“foo: ?+ foo); <br /><br /><br />What will foo print? <br /><br /><br />Answer: <br /><br />Foo: blue <br /><br /><br />String s = “hello? <br /><br />s.subString(0,4); <br /><br />s.concat(“world); <br /><br />System.out.println(“s: ?+ s); <br /><br /><br />What is the result? <br /><br /><br />Answer: <br /><br />S: hello <br /><br />Strings are immutable. <br /><br /><br />private class Test {………} <br /><br />public class Test2 extends Test {……..} <br /><br /><br />what is the result? (there are options to choose) <br /><br /><br />Answer: <br /><br />Compile error because private not allowed to declare classes. <br /><br /><br />32. <br /><br />protected class Test {……?} <br /><br />public class Test2 extends Test {……..} <br /><br /><br />what is the result? (there are options to choose) <br /><br /><br />Answer: <br /><br />Compile error because protected not allowed to declare classes. <br /><br /><br />78. Which will return an int value very nearer to and not greater than <br /><br />the given double value? <br /><br /><br />a) int a=(int)Math.max(double) <br /><br />b) int a=(int)Math.min(double) <br /><br />c) int a=(int)Math.ceil(double) <br /><br />d) int a=(int)Math.floor(double) <br /><br />e) int a=(int)Math.round(double) <br /><br /><br />Ans d <br /><br /><br />83. public static void main(String args[]) { <br /><br />int i=1; <br /><br />int j=10; <br /><br />do{ <br /><br />if(i>j) <br /><br />continue; <br /><br />j - -; <br /><br />} while(++i<6 br=""><br />System.out.println("i= "+i+" j= "+j); <br /><br />} <br /><br />What will be the output? <br /><br /><br />a) i=4 , j=5 <br /><br />b) i=5 , j=6 <br /><br />c) i=5 , j=5 <br /><br />d) i=4 , j=6 <br /><br />e) i=6 , j=5 <br /><br /><br />Ans e <br /><br /><br />Q#14 method of mousemotionlistener interface <br /><br />A. public void mouseDragged(MouseEvent) <br /><br />B. public boolean mouseDragged(MouseEvent) <br /><br />C. public void mouseDragged(MouseMotionEvent) <br /><br />D. public boolean mouseDragged(MouseMotionEvent) <br /><br />E. public boolean mouseDragged(MouseMotionEvent) <br /><br /><br />Answer: <br /><br />A <br /><br /><br />Q#19 output of the following program <br /><br />String foo = "blue"; <br /><br />boolean [] b = new boolean[10]; <br /><br />if(b[0]) { <br /><br />foo="yellow.";} <br /><br />System.out.println(foo); <br /><br />Ans-blue <br /><br /><br />246. Which of the following two declarations used to read a file <br /><br />called ‘Test.txt? <br /><br />a) RandomAcceesFile raf=new RandomAcceesFile(“Test.txt?; <br /><br />b) InputStream is = new FileInputStream(“Test.txt?; <br /><br />c) InputStream is = new <br /><br />DataInputStream(FileInputStream(“Test.txt?true)); <br /><br />d) FileInputStream fis = new FileInputStream(new File(“Test.txt?); <br /><br />e) FileoutputStream fos = new FileoutputStream(new File(“Test.txt?); <br /><br />f) OutputStream os = new FileoutputStream(new File(“Test.txt?false)); <br /><br /><br />Ans BD <br /><br /><br />252. How to append to file “Test.txt? (Select two) <br /><br />a) FileOutputStream fis = new FileOutputStream ( “Test.txt? true); <br /><br />b) OutputStream os = new FileOutputStream ( “Test.txt? “append?; <br /><br />c) FileOutputStream fis = new FileOutputStream ( “Test.txt? “true?; <br /><br />d) FileOutputStream fis = new FileOutputStream (new File( “Test.txt?); <br /><br />e) OutputStream os = new OutputStream (new File( “Test.txt?, true); <br /><br /><br />Ans AD <br /><br /><br />27.A socket object has been created and connected to a standard intern <br /><br />et sevice on a remote network server.Which construction give the most <br /><br />suitable means for reading ASCII data one line at a time from the sock <br /><br />et? <br /><br /><br />A.InputStream in=s.getInputStream(); <br /><br /><br />B.DataInputStream in=new DataInputstream(s.getInputStream()); <br /><br /><br />C.ByteArrayInputStream in=new ByteArrayInputStream(s.getInputStream()) <br /><br />; <br /><br /><br />D.BufferedReader in=new BufferedReader(new InputStreamReader(s.getInpu <br /><br />tStream())); <br /><br /><br />E.BufferedReader in=new BufferedReader(new InputStreamReader(s.getInpu <br /><br />tStream()),"8859-1"); <br /><br /><br />2. Which gets the name of the parent directory of file "file.txt"? <br /><br /><br />a. String name = File.getParentName("file.txt") <br /><br /><br />b. String name = (new File ("file.txt").getParent()); <br /><br /><br />c. String name = (new File ("file.txt").getParentName()); <br /><br /><br />d. String name = (new File ("file.txt").getParentFile()); <br /><br /><br />e. Directory dir = (new File ("file.txt").getParentDir()); <br /><br /><br />String name = dir.getName(); <br /><br />2. What are the range of values for a variable of type byte ?<br /><br /> a. 2^7 to 2^7 -1 <br /> b. 0 to 2^8 <br /> c. -2^8 to 2^8 <br /> d. -2^7 to 2^7 -1 <br /> e. -2^8 - 1 to 2^8 <br /><br />14? ???? ?? c<br /><br />int i=1;<br />int j = 2;<br />if(i ==1 || j==2)<br /> System.out.println("OK");<br /><br />?? || ???? | ???? ??? ??? ????.<br /><br /><br /><br /><br /><br /><br />55. Which can not be added to a Container ? (Choose two)<br /><br />? a. an Applet <br />? b. a Button <br />? c. a Window<br />? d. a Menu<br />? e. a Panel <br /><br />03] Which three are valid declare of a float?(Choose three)<br /><br />? a. float f=-1;<br />? b. float f=1.0;<br />? c. float f=42e1;<br />? d. float f=0.02f;<br />? e. float f=3.03d;<br />? f. float f=0x0123;<br /><br /><br /></6></6></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-91982952959021350922013-03-13T11:17:00.000-07:002013-03-13T11:17:04.963-07:00Hotmail User Get Scroogled?<div dir="ltr" style="text-align: left;" trbidi="on">
Did you know :<br />
<br />
<div class="headline" style="text-align: justify;">
Hotmail, Outlook Outage Of 2013 is still on. Rest of the services work Calendar is still down. The word on the street is Microsoft is still experimenting. Way to go guys. I guess this is one of those great things that MS is doing for the network admin community. Now every admin can say if MS whole system can go down so can our! Like they made customers accept bugs with the launch of 97. That cycle was not broken until they launched Win XP. Will there be repeats of this , who the heck knows. I pitty all those people who are running their office on office 360. Too bad. </div>
<div class="headline" style="text-align: left;">
<br /></div>
<div class="headline" style="text-align: left;">
This is not to say this can not happen with Google 'cause it has. Lets me know if and when you calendar and other services come back online!</div>
<div class="headline" style="text-align: left;">
<br /></div>
<div class="headline" style="text-align: left;">
<br /></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-15159488651904245932011-11-17T04:38:00.001-08:002011-11-17T04:39:08.193-08:00Gmail is Back in the Apple App Store<div dir="ltr" style="text-align: left;" trbidi="on">
Hello All iOS Users<br />
<br />
Gmail app is back with lots of fixes on notification. You will need iOS 4 + to use this app. <br />
<br />
<br />
<br />
<br />
http://gmailblog.blogspot.com/2011/11/gmail-app-for-ios-available-in-app.htm</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-23014394092855398402011-11-16T22:12:00.001-08:002011-11-16T22:41:54.285-08:00A Simple Guide to Migrating your Hosting to server such as EC2 or Rackspace Cloud..<div dir="ltr" style="text-align: left;" trbidi="on">
Weather you are doing this for the fun of it or doing for better availability, scalability or pricing; your domain may have the same importance.<br />
<br />
<b><br /></b><br />
<b>Here is a list of steps that can help and may not a be prefect solution all the time but covers many 'oh I should have thought about that stories'.</b><br />
<br />
<b>Stage one:</b><br />
<br />
Ensure that your DNS service allows you to lower you TTL to x seconds / minutes. <a href="http://www.dyndns.com/">DYNDNS </a><br />
is one such service that allows you to do that. If you are asking yourself why this should be done the reason is simple. TTL is how long before that new value is queried for. What this means is if your TTL is 30 Seconds, every 30 Seconds you can change your server address. So you potential loss of data is limited to that.<br />
<br />
<br />
<b>Stage two : </b><br />
Migrate your email before hand to google apps free or live. Before you set up this forward all mail to new box. This way all mail will still come to your email and will still be live during migration.<br />
<br />
<b>Stage 3:</b><br />
Before you start: <br />
<ul style="text-align: left;">
<li>Get All your passwords and access mechanisms such as VPN key etc ready and active.</li>
<li> Create a situation specific check list which you will need to check in the and before shouting "Im going home !!".</li>
</ul>
<br />
Copy all data and code and the works to new location and test
it. Recommendation use server to server transfer servers are on high bandwidth so its usually faster. Also saves you one step.<br />
Useful commands on Linux.<br />
<br />
<ul style="text-align: left;">
<li>scp</li>
<li>ssh</li>
<li>rsync</li>
</ul>
On Amazon EC2, you will need to allow port wise access to get the server accessible via you aws console.<br />
<br />
<br />
<br />
<br />
<br />
<b>Stage 4: </b><br />
<b> </b>Notify users on upcoming maintenance.<br />
<br />
<b>Stage 5: </b><br />
Put the old site on maintenance so that new data does not get added during migration after and repeat stage 3 for new data and files.<br />
<br />
<b>Tip:</b><br />
Have a team check and double check every thing. Get your bosses to sign off on working status so that the responsibility is joint. Expect migration issues due to human error. Address it pro-actively as far as possible.<br />
<br />
<b>Important:</b> <br />
Just one more thing have monitoring tools automatically notify you of downtime as you are in a new setup may be text or email you. Having a blackberry will help for push mails. It better for you to handle it before someone says hey server is down. Media Temple is infamous for <a href="http://www.mediatemple.net/">unannounced downtime</a>.<br />
<br />
Plan for the worst because the best will take care of itself.<br />
<br />
All the best for a safe migration!<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-44180969257981143522011-11-15T04:51:00.001-08:002011-11-15T04:54:30.601-08:00IOS 5.01 Update Released<div dir="ltr" style="text-align: left;" trbidi="on">
Hello iOS Lovers. iOS 5.0.1 is available for download.<br />
<br /><ul style="text-align: left;">
<li>Fixes Batter life </li>
<li>iCould </li>
<li> Voice over (Australian)</li>
</ul>
Let us see if Battery Life is better. But I will tell you what . Looks like WIFI is more active now.<br />
<br />
Let me know your experience. <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-65787036583490276032011-11-03T11:18:00.000-07:002011-11-06T22:54:09.290-08:00Apple Filesystem HFS+ is cool becase .....<div dir="ltr" style="text-align: left;" trbidi="on">
Here are some reasons why HFS is cool <br />
<br />
1) It has built in defgrag ( works when needed / possible )<br />
<br />
2) Shrink you Filesystem when need. This is a really cool feature!!! Microsoft must learn this trick. But for now MS can depend on GParted under Linux ;P. What is better it moves the recovery partition when system partition resizing! Intelligent resize! MS are you listening!!<br />
<br />
3) It can act as a version control system for your files ( want to go back to the old one 2 hours ago? 2 days or 2 months. Sure Time machine will allow you to do that )!<br />
<br />
Note: TM need HFS.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-10824322054340837232011-11-03T11:09:00.000-07:002011-11-03T11:09:20.125-07:00IOS 5.0.1 is in Beta<div dir="ltr" style="text-align: left;" trbidi="on">
<b>iOS 5.0.1 is now in Beta.</b><br />
<br />
<br />
Download from. http://developer.apple.com<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Apple says "<br />
<br />
<div style="color: #333333; font-family: Lucida Grande, Arial, Helvetica, Geneva, Verdana, sans-serif; font-size: 12px; line-height: 1.5em; padding: 20px 65px 0px 20px;">
iOS
5.0.1 beta is now available on the iOS Dev Center. It introduces a new
way for developers to specify files that should remain on device, even
in low storage situations.
</div>
<br /><br />
"<br />
<br />
Does this mean another XCode update ? God Forbid.<br />
<br />
<br />I also feel that Apple has started releasing unstable products. Is this a way to tell the world that the are still some capable hands in Apple. If it is, its definitely not working now!<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-40440063807807151932011-10-26T05:35:00.000-07:002011-11-15T04:56:10.961-08:00Create a Lion Recovery Disk using the Lion Recovery Disk Assistant<div dir="ltr" style="text-align: left;" trbidi="on">
Here is a good think that i like about <b>OSX Lion.</b>
My Mac came with built in rescue disk. Neat !<br />
<br />
Press Option Key during boot and it will turn up. This is not an alternate to backups. But people using macs seldom say they had a crash.<br />
<br />
This is for those time that you are unable to do that. So plan ahead and stay protected as possible. That could happen. So here is the solution. Needs to be done before hand.
Plugin you USB Dirve ( after backing up you data ). You will loose all of it.
Create at least 2 partitions one with 1GB and another with the rest of the space.
<b> </b><br />
<br />
<b>Here is a trick.</b> If you are going to use NTFS. make sure the second partition is the 1GB drive else Windows wont like it !
Lion Recovery Disk Assistant should be downloaded form <a href="http://support.apple.com/downloads/DL1433/en_US/RecoveryDiskAssistant.dmg">here</a>.<br />
<br />
Mount the DMG and run it.
Allow the app to run. Choose the 1GB partition and allow it to do its job.<br />
<br />
Test it by rebooting while holding the option key and choosing the orange recovery disk.<br />
<br />
Once booted you can<br />
<ol style="text-align: left;">
<li> Run Terminal</li>
<li>Repartition / Reformat</li>
<li> Use Safari</li>
<li>Restore from Time machine ( So take your backups !) </li>
</ol>
Recommended backup software: <br />
Carbon Copy (Donation ware -pay if you like it!) <br />
SuperDuper and ( Paid easy to user<br />
TimeMachine ( You already have it )<br />
<br />
Update: New Update of VBox Allows you to see device but does not hand it over to the VBox Guest OS.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-18812240608057147672011-10-26T05:21:00.000-07:002011-10-28T08:47:27.495-07:00Soultion to problem of mounting external disk drives on Virtual Box on Mac OS.<div dir="ltr" style="text-align: left;" trbidi="on">
Hey All !<br />
<br />
Are you a Mac OS user ( Lion Possibly). Did you ever think of virtual-izing the Win XP / Wind 7 on your machine with VirtualBox. Well then you have seen that the External drives ( thumb or external HDD) do not turn up or are greyed out ? How annoying !! I have lost a ton of time on that.<br />
<br />
Edit : <br />
<a href="https://www.virtualbox.org/ticket/9762">https://www.virtualbox.org/ticket/9762 </a><br />
<a href="http://draft.blogger.com/goog_2048387391"><br /></a><br />
<a href="http://draft.blogger.com/goog_2048387391"><br /></a><br />
Looks Like i am not the only one.<br />
<br />
<a href="https://forums.virtualbox.org/viewtopic.php?f=8&t=45376&p=205964#p205964">https://forums.virtualbox.org/viewtopic.php?f=8&t=45376&p=205964#p205964</a><br />
<br />
Well after a bit of reading forums and and experimenting here is what i realized / learnt.<br />
<br />
Note: VirtualBox (VB) will re-create /dev/vb* entries every boot ! Why ??? <br />
<br />
So any permission set on this via command line will be lost.<br />
<br />
To get your device to work you will need to do the following<br />
<br />
<br />
Create a file called runvb.sh in your home directory.<br />
<br />
<code>
# BEGIN SCRIPT <br />
# I call this by the name runvb.sh<br />
<br />
sudo kextunload -b com.apple.iokit.IOUSBMassStorageClass<br />#sudo kextunload -b com.apple.iokit.IOUSBMassStorageClass<br />#sudo kextunload -b com.apple.iokit.IOUSBMassStorageClass<br /># note the commented code above un-comment if you find the kext is not revived. <br /><br />sudo open -a VirtualBox.app<br />
## END SCRIPT <br />
</code>
Note : Unmount and unplug your device first.<br />
Once that happens. Plug in your device only after the VB fully loads.<br />
<br />
Try running this with sudo sh ./runvb.sh in the terminal .<br />
<br />
next time you want it unplug the device after unmount and restart VB via the script!<br />
<br />
Best of luck <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div style="text-align: left;">
<br /></div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-13780653444873017162010-07-22T01:58:00.000-07:002010-07-22T02:25:03.283-07:00Working with MySQL Partitions - Part 1 - Check if it is Enabled.Steps<br /><br />Ascertain MySQL is 5.1.16 or above for proper working of partitioning.<br />Commands:<br /><br />Show variables<br />Show plugins<br /><br /><br />e.g. :<br /><br />SHOW VARIABLES LIKE '%partition%';<br /><br />result:<br /><br />+-------------------+-------+<br />| Variable_name | Value |<br />+-------------------+-------+<br />| have_partitioning | YES |<br />+-------------------+-------+<br />1 row in set (0.00 sec)<br /><br />mysql> SHOW PLUGINS;<br />+------------+----------+----------------+---------+---------+<br />| Name | Status | Type | Library | License |<br />+------------+----------+----------------+---------+---------+<br />| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |<br />| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |<br />| ARCHIVE | ACTIVE | STORAGE ENGINE | NULL | GPL |<br />| BLACKHOLE | ACTIVE | STORAGE ENGINE | NULL | GPL |<br />| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |<br />| FEDERATED | DISABLED | STORAGE ENGINE | NULL | GPL |<br />| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |<br />| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |<br />| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |<br />| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |<br />| ndbcluster | DISABLED | STORAGE ENGINE | NULL | GPL |<br />+------------+----------+----------------+---------+---------+<br />11 rows in set (0.00 sec)<br /><br />At this point if you have partition enabled if the above result indicates the availability of the service.<br /><br />if you are doing a custom build please compile you need to compile the server using the --with-partition option.<br /><br />Once you have done this you be start the server and check again if the service is enabled. <br /><br />End of Step on. <br /><br />Creation of partitions is a relatively easy process.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-62545847401008617792010-03-25T02:33:00.000-07:002010-03-25T02:33:00.856-07:00PHP Goes HipHopPHP Performance has particular point of interest for many developers and companies. All the more true for FaceBook the second largest* site on the internet. <br />
<br />
Facebook recently released HPHP (HipHop).<br />
<br />
Supposedly, Facebook sees about a 50% reduction in CPU usage when serving equal amounts of Web traffic when compared to Apache and PHP. Facebook’s API tier can serve twice the traffic using 30% less CPU. Not Bad Eh?<br />
<br />
Final result : A binary with a built in web server. Note: It does not process .htaccess yet. <br />
<br />
HipHop has been developed on CentOS and Fedora, building on other operating systems may not currently be functional. Support will be added as soon as its ready.<br />
At the moment, HipHop can only run on 64 bits systems.<br />
<br />
HipHop currently supports PHP version 5.2 and will be updated to support 5.3. <br />
<br />
<br />
<br />
Should be on debian soon.<br />
<br />
<br />
HipHop for PHP transforms PHP source code into highly optimized C++. It was developed by Facebook and was released as open source in early 2010.<br />
<br />
You will need the following to build <br />
<br />
<br />
* cmake 2.6 is the minimum version<br />
* g++/gcc 4.1 is the minimum version<br />
* Boost 1.37 is the minimum version<br />
* flex<br />
* bison<br />
* re2c<br />
* libmysql<br />
* libxml2<br />
* libmcrypt<br />
* libicu 4.2 is the minimum version<br />
* openssl<br />
* binutils<br />
* libcap<br />
* gd<br />
* zlib<br />
* tbb Intel's Thread Building Blocks<br />
* Oniguruma<br />
<br />
Modifications/ Patches<br />
<br />
* libcurl<br />
* src/third_party/libcurl.fb-changes.diff<br />
* libevent 1.4<br />
* src/third_party/libevent.fb-changes.diff<br />
<br />
Pretty Nifty and Pretty Uber Cool !!<br />
<br />
Go HipHop!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-36323836522881807582009-06-22T07:01:00.000-07:002009-06-22T07:01:57.623-07:00Get Gmail ( java ) and Opera Mini to work on Samsung star or Tocco liteThis is for all those who have not been able to get the Gmail app to work on your Samsung Star Phone. Do NOT forget the read the section that is labeled "Important" especially if you use a Samsung Phone.<br />
<br />
<br />
For starters you need to have an internet access account with your mobile service provider such as T-Mobile, Airtel or Etisalat or any provider who offers the GPRS service.<br />
<br />
<br />
Second your set should be Java enabled <br />
<br />
Should have enough memory.<br />
<br />
First install the 2.0 version of Gmail<br />
<br />
At this point you will get error that tells you that you do not have the "appropriate certificate". <br />
<br />
Then install the 1.5 version (http://gmail.com/app/v1.5.0/L1/gmail-g.jar)<br />
<br />
This does the tick. <br />
<br />
What is better is , now you can install opera mini as well.<br />
<br />
IMPORTANT ::<br />
When you start an unsigned java app on your phone to protect your privacy it will ask you want to allow the application to connect to the internet. Choose end-call ( right soft key). If you are not using the Samsung touch screen phone choose yet / ok / enter. On the Samsung phone, This will cause the application to ask you if you want to quit , simply choose no. Remember that you will need to do this a ton of times in the initial week ( it is frustrating ) but keep at it and you will succeed. I had to do it approx 20 times. <br />
<br />
Also note, it is ideal to remove the proxy setting on the Airtel Mobile office. It slow the request down or kills it.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-39238457194654297672009-06-06T12:29:00.000-07:002009-06-06T12:31:07.821-07:00Relaiable Development Companies in IndiaJust wanted to list down some reliable software development and companies in India.<br />
<br />
<br />
<a href="http://Infy.com" rel="nofollow"> Infosys - Banking related and SAP</a><br />
<a href="http://www.wipro.com" rel="nofollow"> Wipro - Systems related and SAP</a><br />
<a href="http://www.rekonsult.com"> Real Consulting - Web Site Development</a><br />
<a href="http://www.mindtree.com" rel="nofollow"> Mind Tree - Telco related </a><br />
<a href="http://www.www.niit-tech.com/" rel="nofollow"> NIIT - Good Co work for. </a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-68871660771002424652009-05-21T21:01:00.000-07:002009-05-21T21:01:30.189-07:00Is PMBOK against Agile ?Development organizations work towards optimizing software development and delivery. Development teams generally use the Project Management Institute's "A Guide To The Project Management Body of Knowledge" a.k.a (PMBOK). <br />
<br />
They may also investigate Agile development methodologies such as Scrum or XP as their popularity. To Generalize Agile is a Delivery methodology. <br />
<br />
These clash, when it comes to earned value measurement and few other measurement parameters. PMBOK admits that the project requirement is only "Incremental clear" and will fully be clear only when nearing completion. This is in full alignment for PMBOK. So the truth is delivery is the KEY and marriage of PMBOK to agile is is what can set development process to achieve what it started out to do.<br />
<br />
The PBMOK talks about <br />
<br />
Initiating <br />
Planing <br />
Executing <br />
Controlling <br />
Closing<br />
<br />
<br />
Agile process <br />
<br />
Envision<br />
Speculate<br />
Explore<br />
Adapt<br />
Close<br />
<br />
So if you read the above carefully. One is written with the thought of bringing in formal note the other is about working with the client. Then the question what do you need. The answer is obvious we need both.<br />
<br />
For those who are in a relationship or are married clearly know that we need to accept the other instead of trying to get them to change. So I guess it is time for Agile and PMBOK to hug each other. <br />
<br />
Let me tell you this is a long term thing -yes pun intended ;) !Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-12829045742669967272007-03-17T03:05:00.000-07:002009-04-17T11:37:36.487-07:00Rolling With RailsHi all,<br /> Its been a while and I want to give you some good news. The good news is this . Ruby on Rails is HOT!!. Sure Is.<br /><br /><ul><li>Rails is a MVC imptementation for ruby on Windows / Linux<br /></li><li>Can Run under CGI / FastCGI </li><li>or as Standalone server such as Mongrel / WebBrick</li><li>Yes they can be clustered and can be tucked behind Apache via a PROXY ( more on this later ).</li><li>If Properly configured, its quite comparable. </li><li>Yes , there is a small effort of learning a language ( but is worth it)</li><li>Ruby developers prefer SVN as the version control mechanism</li><li>Supports popular DBs such as Oracle, MySQL and DB2 and more.</li></ul>In summary its a great framework for RAD based development.<br /><br />Check it out at<br /><br />http://rubyforge.org/<br /><br />:)Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-79134803744407810812006-11-01T08:27:00.001-08:002009-04-22T11:22:18.405-07:00Qucik MYSQL PHP Tips ( IN CLAUSE)MYSQL 4 does not allow IN (Select ...) .<br />
So what you do is execute a query , generate a long set of values in then execute the query .<br />
<br />
Cavet : SQL buffer can over flow<br />
<br />
<br />
MYSQL Supports ( Select ..... in ( .... ) )Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-7005794158144620082006-11-01T08:22:00.001-08:002009-04-17T11:11:08.419-07:00Understanding empty fucntion in PHPHere is a quick tip:<br /><br />empty and is_blank<br /><br />empty<br /><br /><code><span class="html"><span class="default">$var </span><span class="keyword">= 1</span><span class="default">0</span><span class="keyword">;<br /><br /></span><span class="comment">// Evaluates to true because $var is empty<br /></span><span class="keyword">if (empty(</span><span class="default">$var</span><span class="keyword">)) {<br /> echo </span><span class="string">'$var is either 0, empty, or not set at all'</span><span class="keyword">;<br />}<br />?><br /><br /><br /></span></span></code>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-4353677365486907972006-05-31T14:07:00.001-07:002009-04-17T11:11:50.207-07:00PHP easter egg<b><span style=";font-family:Arial;font-size:85%;" ><span style="color: rgb(77, 171, 77);">add ?=PHPE9568F36-D428-11d2-A769-00AA001ACF42 </span></span></b> to your PHP code and check it out .. should show a sweet dogie or something . This will work only if Expose PHP is on (php.ini) !Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-5030655924591538032006-05-23T02:21:00.001-07:002009-04-17T11:12:28.578-07:00Oracle and PHP Tutorial - Easy<div style="text-align: center;"><br /></div><ul style="text-align: center;"><li><a href="http://www.it-eye.nl/weblog/2005/10/31/oracle-xe-installation-on-debian/">Here is how to install Oracle XE</a></li></ul><br /><ul style="text-align: center;"><li><a href="http://www.oracle.com/pls/xe102/homepage"> Oracle's PHP tuorial</a></li></ul><br /><ul style="text-align: center;"><li><a href="http://adodb.sourceforge.net/">Here is one more using adodb</a></li></ul>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-994004493150348913.post-4913819578310350462006-05-21T07:27:00.001-07:002009-04-17T11:13:04.991-07:00PHP Interview Questions Part II hope this would be helpful for the jobseekers.<br /><br />This is <span style="font-weight: bold;">"three part" article<br /><br /><br /></span>1. What are the differences between Get and post methods in form submitting,<br />give the case where we can use get and we can use post methods ?<br /><br />Ans:<br />Get- sends requset in the form of qusery string and post hides the<br />data, and send directly to system.out<br /><br /><br />2. Who is the father of php and explain the php versions<br /><br />Ans: Rasmus Lerdorf<br /><br />3. How can we submit a form without a submit button<br /><br />Ans:<br /> 1. image button 2. button. 3. java script form.submit() function<br /><br />4. How many ways we can retrieve the date in result set of mysql using php<br /><br />Ans:<br /> 4 ways, 1. mysql_fetch_row. 2. mysql_fetch_array. 3.<br /> mysql_fetch_object 4. mysql_fetch_assoc<br /><br /><br />5. What is the difference between mysql_fetch_object and mysql_fetch_array<br /><br />Ans:<br />mysql_fetch_object -- Fetch a result row as an object<br />mysql_fetch_array -- Fetch a result row as an associative array, a<br />numeric array, or both.<br /><br /><br />6. What is the difference between $message and $$message<br /><br />Ans:<br /> $message- is a varibale. $$message is a variable inside varibale<br /><br /><br />7. How can we extract string 'abc.com ' from a string 'http://info@abc.com' using regular expression of php<br /><br />Ans:<br /><br />$line="http://info@abc.com";<br />if (eregi ("http://(.*)@(.*)", $line, $add))<br />echo $add[2];<br /><br /><br />8. How can we create a database using mysql<br /><br />Ans:<br />mysql_create_db in php. Create database name....<br /><br />9. What is the differences between require and include, include_once<br /><br />Ans:<br />include: warning require : fatal-error<br />include_once should be used in cases where the same file might be<br />included and evaluated more than once during a particular execution of a<br />script.<br /><br /><br />10. can we use include("myfile.php") two times in a php age "makeit.php"<br /><br />Ans:<br />yes we can include twice.<br /><br />11. what are the different tables present in mysql , which type of table is generated when we are creating a table in the following syntax : create table employee(eno int(2),ename varchar(10))<br /><br />Ans:<br />MYISAM, ISAM, MERGE, HEAP, INNODB, BERKLEYDB. The Default Type is<br />"MYISAM"<br /><br />12. Functions in IMAP, POP3 AND LDAP<br /><br />Ans:<br />Please check in the manual (some people say RTFM... no offence !)<br /><br /><br />15. Shopping cart online validation ie how can we configure the Nobel Pay<br /><br />Ans:<br />It is done thru curlfunction card details will be sent to the page in Nobel pay site which is already given to us by them. Only we have to send the parameters which is required for calling that page.Unknownnoreply@blogger.com1