Solved

java  string challenge issue

Posted on 2014-11-12
43
244 Views
Last Modified: 2014-12-05
Hi,

I tried below example
http://codingbat.com/prob/p143825

I wrote like below
public String nonStart(String a, String b) {
StringBuilder sb1=null;
String aFirst=null;
String bFirst=null;
  if(a.length()>1&&b.length()>1){
  aFirst=a.substring(1,a.length());
    bFirst=b.substring(1,b.length());
  return aFirst+bFirst;
  
  }
  return null;
}

Open in new window

it is pasing some and failing in some test cases

Expected	Run		
nonStart("Hello", "There") → "ellohere"	"ellohere"	OK	    
nonStart("java", "code") → "avaode"	"avaode"	OK	    
nonStart("shotl", "java") → "hotlava"	"hotlava"	OK	    
nonStart("ab", "xy") → "by"	"by"	OK	    
nonStart("ab", "x") → "b"	"null"	X	    
nonStart("x", "ac") → "c"	"null"	X	    
nonStart("a", "x") → ""	"null"	X	    
nonStart("kit", "kat") → "itat"	"itat"	OK	    
nonStart("mart", "dart") → "artart"	"artart"	OK	    
other tests
X	

Open in new window

please advise on how to fix and improve my code. thanks in advance
0
Comment
Question by:gudii9
  • 19
  • 15
  • 6
  • +2
43 Comments
 

Assisted Solution

by:Vsevolod Geraskin
Vsevolod Geraskin earned 125 total points
ID: 40438705
Please try a quick solution below.

public String nonStart(String a, String b) {
  String result="";
  String aFirst=null;
  String bFirst=null;
  
  if(a.length()>1) result=a.substring(1,a.length());
  if(b.length()>1) result+=b.substring(1,b.length());
  
  return result;
}

Open in new window


If you initialize result to null instead, you will need a null check as well.
0
 
LVL 35

Assisted Solution

by:mccarl
mccarl earned 125 total points
ID: 40438869
Because they specify a constraint that the lengths of the strings will be at least 1, you can simply do this...
public String nonStart(String a, String b) {
  return a.substring(1) + b.substring(1);
}

Open in new window


You don't need to specify the length of the substring because there are 2 versions of substring, one that takes the 2 parameters that you are using, and one that takes only 1 parameter, and just returns the remaining part of the original string from whatever index that you specify. It even works for a string that is only 1 character long, it just returns the empty string (you may remember that we looked at this in a previous question of yours)
0
 
LVL 84

Expert Comment

by:ozo
ID: 40438871
What is the purpose of the test on line 5?
0
 
LVL 7

Author Comment

by:gudii9
ID: 40440359
I am realizing line 5 is not needed based on above comments.
public String nonStart(String a, String b) {
  String result="";
  String aFirst=null;
  String bFirst=null;
  
  if(a.length()>1) result=a.substring(1,a.length());
  if(b.length()>1) result+=b.substring(1,b.length());
  
  return result;
}

Open in new window


In the above code I see aFirst and bFirst are declared as null where as result is empty string within double quotes. I wonder why it is different in case of result?
  String result="";
  String aFirst=null;
  String bFirst=null;

when i write as below by defining aFirst and bFirst as "" similar to result all tests passed.
public String nonStart(String a, String b) {
  String result="";
  String aFirst="";
  String bFirst="";
 
  if(a.length()>1) result=a.substring(1,a.length());
  if(b.length()>1) result+=b.substring(1,b.length());
 
  return result;
}

when i wrote all three variables as null as below then few test cases failied
public String nonStart(String a, String b) {
  String result=null;
  String aFirst=null;
  String bFirst=null;
  
  if(a.length()>1) result=a.substring(1,a.length());
  if(b.length()>1) result+=b.substring(1,b.length());
  
  return result;
}

Open in new window


test case results
Expected	Run		
nonStart("Hello", "There") → "ellohere"	"ellohere"	OK	    
nonStart("java", "code") → "avaode"	"avaode"	OK	    
nonStart("shotl", "java") → "hotlava"	"hotlava"	OK	    
nonStart("ab", "xy") → "by"	"by"	OK	    
nonStart("ab", "x") → "b"	"b"	OK	    
nonStart("x", "ac") → "c"	"nullc"	X	    
nonStart("a", "x") → ""	"null"	X	    
nonStart("kit", "kat") → "itat"	"itat"	OK	    
nonStart("mart", "dart") → "artart"	"artart"	OK	    
other tests
OK	  

Open in new window

0
 

Expert Comment

by:Vsevolod Geraskin
ID: 40440736
You still need to initialize result to an empty string at some point, since one of the conditions is an empty string rather than null: nonStart("a", "x") → "";
public String nonStart(String a, String b) {
  String result=null;
  String aFirst=null;
  String bFirst=null;
  
  if(a.length()>1) {
    result=a.substring(1,a.length());
  } else {
    result = "";
  }
  
  if(b.length()>1) result+=b.substring(1,b.length());

  
  return result;

}

Open in new window

0
 
LVL 31

Assisted Solution

by:awking00
awking00 earned 125 total points
ID: 40441069
public String nonStart(String a, String b) {
if (a.length() == 1 && b.length() > 1) {
 return b.substring(1,b.length())
{ else if (a.length() == 1 && b.length() > 1) {
 return a.substring(1,a.length())
} else if (a.length() > 1 && b.length() > 1) {
 return a.substring(1,a.length()) + b.substring(1,b.length())
}
return null;
}
0
 
LVL 7

Author Comment

by:gudii9
ID: 40441216
public String nonStart(String a, String b) {
  String result=null;
  String aFirst=null;
  String bFirst=null;
  
  if(a.length()>1) {
  result=a.substring(1,a.length());
  }
  else{
  
  return "";
  }
  if(b.length()>1) {
  result+=b.substring(1,b.length());
  }
 
  return result;
}

Open in new window


i wrote as above still failing one test cases as below. please advise
Expected	Run		
nonStart("Hello", "There") → "ellohere"	"ellohere"	OK	    
nonStart("java", "code") → "avaode"	"avaode"	OK	    
nonStart("shotl", "java") → "hotlava"	"hotlava"	OK	    
nonStart("ab", "xy") → "by"	"by"	OK	    
nonStart("ab", "x") → "b"	"b"	OK	    
nonStart("x", "ac") → "c"	""	X	    
nonStart("a", "x") → ""	""	OK	    
nonStart("kit", "kat") → "itat"	"itat"	OK	    
nonStart("mart", "dart") → "artart"	"artart"	OK	    
other tests
OK	    

Open in new window

0
 
LVL 84

Expert Comment

by:ozo
ID: 40441220
awking00: Did you actually try that?
0
 
LVL 84

Expert Comment

by:ozo
ID: 40441238
gudii9: Do yo see the difference between  return ""; and result = "";?
0
 
LVL 7

Author Comment

by:gudii9
ID: 40441458
No. Both looks same to me
0
 
LVL 84

Expert Comment

by:ozo
ID: 40441686
They don't look the same to java
nonStart("x", "ac") → "c"      ""      X      
nonStart("x", "ac") → "c"      "c"      OK
0
 
LVL 7

Author Comment

by:gudii9
ID: 40442741
I still do not see the difference what java is seeing. when i run as below

public class Test31 {

      /**
       * @param args
       */
      public static void main(String[] args) {
            // TODO Auto-generated method stub
            String str1=nonStart("x", "ac");    
            String str2=nonStart("x", "ac");
            System.out.println("str1 is"+str1);
            System.out.println("str2 is"+str2);

      }
      
      public static String nonStart(String a, String b) {
              String result=null;
              String aFirst=null;
              String bFirst=null;
             
              if(a.length()>1) {
              result=a.substring(1,a.length());
              }
              else{
             
              return "";
              }
              if(b.length()>1) {
              result+=b.substring(1,b.length());
              }
             
              return result;
            }


}

i got output as below
str1 is
str2 is   //here i expected to see "c" as per your above comment but failed to see that and got same output as above line

Does it mean eclipse also thinking like me not the java way?
Please advise
0
 
LVL 31

Expert Comment

by:awking00
ID: 40442981
guidii9
The method nonStart(String a, String b) is going to return the same value every time, as it should, no matter how many variables you assign it to. In your example, you're passing in values of "x" and "ac" and assigning the return value to two variables, str1 and str2. In your method, the first if statement says "if the length of String a (i.e. "x") is greater than 1 then return a.substring(1, a.length()) and, if not return "" (i.e. an empty string). Since the length of "x" is not greater than 1, it returns the empty string. Once your method returns a value, it is done and doesn't evaluate any expressions that follow. Therefore, any time the first parameter has a length of 1, it will always return the empty string.

ozo,
Yes, I did but without the copy and paste error :-) It was supposed to be -
public String nonStart(String a, String b) {
if (a.length() == 1 && b.length() > 1) {
 return b.substring(1,b.length())
{ else if (a.length() > 1 && b.length() == 1) {
 return a.substring(1,a.length())
} else if (a.length() > 1 && b.length() > 1) {
 return a.substring(1,a.length()) + b.substring(1,b.length())
}
return null;
}
0
 
LVL 7

Author Comment

by:gudii9
ID: 40456189
public class Test31 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		String str1 = nonStart("x", "ac");
		String str2 = nonStart("x", "ac");
		System.out.println("str1 is" + str1);
		System.out.println("str2 is" + str2);

	}

	public static String nonStart(String a, String b) {
		if (a.length() == 1 && b.length() > 1) {
			
		}
		 return b.substring(1,b.length())
		{ else if (a.length() > 1 && b.length() == 1) {
		 return a.substring(1,a.length())
		} else if (a.length() > 1 && b.length() > 1) {
		 return a.substring(1,a.length()) + b.substring(1,b.length())
		}
		return null;
		}
}
}

Open in new window


above giving error as
Exception in thread "main" java.lang.Error: Unresolved compilation problem:

      at Test31.main(Test31.java:7)


please advise
0
 
LVL 84

Expert Comment

by:ozo
ID: 40456339
Test31.java:19: ';' expected
		 return b.substring(1,b.length())
		                                 ^
Test31.java:20: 'else' without 'if'
		{ else if (a.length() > 1 && b.length() == 1) {
		  ^
Test31.java:21: ';' expected
		 return a.substring(1,a.length())
		                                 ^
Test31.java:23: ';' expected
		 return a.substring(1,a.length()) + b.substring(1,b.length())
		                                                             ^

Open in new window

0
 
LVL 31

Expert Comment

by:awking00
ID: 40457222
public static String nonStart(String a, String b) {
            if (a.length() == 1 && b.length() > 1) {
           Nothing is being done within the curly brackets      
            } => This closing bracket needs to be moved to before the next else if section replacing the opening bracket that exists there now, see below remove this bracket statement

             return b.substring(1,b.length())
remove this bracket =>{ else if (a.length() > 1 && b.length() == 1) {
             return a.substring(1,a.length())
            } else if (a.length() > 1 && b.length() > 1) {
             return a.substring(1,a.length()) + b.substring(1,b.length())
            }
            return null;
            }
0
 
LVL 7

Author Comment

by:gudii9
ID: 40457382
public class Test31 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		String str1 = nonStart("x", "ac");
		String str2 = nonStart("x", "ac");
		System.out.println("str1 is" + str1);
		System.out.println("str2 is" + str2);

	}

	public static String nonStart(String a, String b) {
		if (a.length() == 1 && b.length() > 1) {

		 return b.substring(1,b.length());
		}
		
		else if (a.length() > 1 && b.length() == 1) {
		 return a.substring(1,a.length());
		} 
		
		else if (a.length() > 1 && b.length() > 1) {
		 return a.substring(1,a.length()) + b.substring(1,b.length());
		}
		
		return null;
		}
	
}
}

Open in new window


when i changed i got output
str1 isc
str2 isc

Seems now program is happy
0
 
LVL 7

Author Comment

by:gudii9
ID: 40457389
public String nonStart(String a, String b) {
		if (a.length() == 1 && b.length() > 1) {

		 return b.substring(1,b.length());
		}
		
		else if (a.length() > 1 && b.length() == 1) {
		 return a.substring(1,a.length());
		} 
		
		else if (a.length() > 1 && b.length() > 1) {
		 return a.substring(1,a.length()) + b.substring(1,b.length());
		}
		
		return null;
		
	

}

Open in new window


still i am failing one
Expected	Run		
nonStart("Hello", "There") → "ellohere"	"ellohere"	OK	    
nonStart("java", "code") → "avaode"	"avaode"	OK	    
nonStart("shotl", "java") → "hotlava"	"hotlava"	OK	    
nonStart("ab", "xy") → "by"	"by"	OK	    
nonStart("ab", "x") → "b"	"b"	OK	    
nonStart("x", "ac") → "c"	"c"	OK	    
nonStart("a", "x") → ""	"null"	X	    
nonStart("kit", "kat") → "itat"	"itat"	OK	    
nonStart("mart", "dart") → "artart"	"artart"	OK	    
other tests
OK	   

Open in new window


please advise
0
 
LVL 84

Expert Comment

by:ozo
ID: 40457398
You are returning "null" when you want to return ""
0
 
LVL 84

Expert Comment

by:ozo
ID: 40457413
And you have  4 separate cases where you only need 1
0
 
LVL 7

Author Comment

by:gudii9
ID: 40457515
public String nonStart(String a, String b) {
		
		 return a.substring(1) + b.substring(1);
		
		
	

}

Open in new window


above one works with one line

public String nonStart(String a, String b) {
		if (a.length() == 1 && b.length() > 1) {

		 return b.substring(1,b.length());
		}
		
		else if (a.length() > 1 && b.length() == 1) {
		 return a.substring(1,a.length());
		} 
		
		else if (a.length() > 1 && b.length() > 1) {
		 return a.substring(1,a.length()) + b.substring(1,b.length());
		}
		
		return "";
		
	

}

Open in new window


above code passed all tests
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 7

Author Comment

by:gudii9
ID: 40457529
public String nonStart(String a, String b) {
		if (a.length() == 1 && b.length() > 1) {

		 return b.substring(1,b.length());
		}
		
		else if (a.length() > 1 && b.length() == 1) {
		 return a.substring(1,a.length());
		} 
		
		else if (a.length() > 1 && b.length() > 1) {
		 return a.substring(1,a.length()) + b.substring(1,b.length());
		}
		

                if (a.length() == 1 && b.length()== 1) {
		return "";
		}

	return null;

}

Open in new window

above also passed all test cases
0
 
LVL 7

Author Comment

by:gudii9
ID: 40457547
They don't look the same to java
nonStart("x", "ac") → "c"      ""      X      
nonStart("x", "ac") → "c"      "c"      OK

Open in new window


i did not get above point.

when i ran my java program as below by passing above two arguments in both lines,
 i get same output as below


str1 is-->c
str2 is-->c


Can you please advise on what you mean by
They don't look the same to java
0
 
LVL 84

Expert Comment

by:ozo
ID: 40457593
My comment in http:#a40441686 was in response to the "No. Both looks same to me" in http:#a40441458
because the code in http:#a40441216 results in
  nonStart("x", "ac") → "c"      ""      X  
when tested, but changing  the
  return "";
in line 11 to
  result= "";
would result in
  nonStart("x", "ac") → "c"      "c"      OK
like the code in http:#a40440736

Thus the difference between  return ""; and result = "";
causes the difference between
nonStart("x", "ac") → "c"      ""      X  
and    
nonStart("x", "ac") → "c"      "c"      OK
0
 
LVL 7

Author Comment

by:gudii9
ID: 40457732
Thus the difference between  return ""; and result = "";
so one is result other is return which is being assigned to "" which are completely two different things.
I thought difference is with some space or with double quote etc
0
 
LVL 7

Author Comment

by:gudii9
ID: 40457748
public String nonStart(String a, String b) {
  String result=null;
  String aFirst=null;
  String bFirst=null;
  
  if(a.length()>1) {
  result=a.substring(1,a.length());
  }
  else{
  
  return "";
  }
  if(b.length()>1) {
  result+=b.substring(1,b.length());
  }
 
  return result;
}

Open in new window



above is wrong and  below is correct

public String nonStart(String a, String b) {
  String result=null;
  String aFirst=null;
  String bFirst=null;
  
  if(a.length()>1) {
    result=a.substring(1,a.length());
  } else {
    result = "";
  }
  
  if(b.length()>1) result+=b.substring(1,b.length());

  
  return result;

}

Open in new window

0
 
LVL 7

Author Comment

by:gudii9
ID: 40457754
i see mistake clear and loud now.
Since i am returning result from my method in the else i should assign result ="" not return ""
0
 
LVL 84

Expert Comment

by:ozo
ID: 40457776
More to the point, since result may yet need to be modified in line 12, you don't want to return before that has a chance to happen.
0
 
LVL 7

Author Comment

by:gudii9
ID: 40458085
More to the point, since result may yet need to be modified in line 12, you don't want to return before that has a chance to happen.
if a length is 1 then i have to return "" right before even reaching line 12

public String nonStart(String a, String b) {
  String result=null;
  String aFirst=null;
  String bFirst=null;
 
  if(a.length()>1) {
    result=a.substring(1,a.length());
  } else {
    result = "";
  }
 
  if(b.length()>1)
  {
  result+=b.substring(1,b.length());

  }
  else {
    result = "";
  }
  return result;

}



when i modified code one test case failed

Expected	Run		
nonStart("Hello", "There") → "ellohere"	"ellohere"	OK	    
nonStart("java", "code") → "avaode"	"avaode"	OK	    
nonStart("shotl", "java") → "hotlava"	"hotlava"	OK	    
nonStart("ab", "xy") → "by"	"by"	OK	    
nonStart("ab", "x") → "b"	""	X	    
nonStart("x", "ac") → "c"	"c"	OK	    
nonStart("a", "x") → ""	""	OK	    
nonStart("kit", "kat") → "itat"	"itat"	OK	    
nonStart("mart", "dart") → "artart"	"artart"	OK	    
other tests
X	    

Open in new window


i wonder why.(all i did was put else loop for b also)
when i say >= all are passing.
  if(b.length()>=1)
  {
  result+=b.substring(1,b.length());

But i never put in a condition check like that.
0
 
LVL 84

Expert Comment

by:ozo
ID: 40458096
if a length is 1 then i have to return ""
not if b.length()>1

else for b
can destroy the result that you got from a
0
 
LVL 31

Expert Comment

by:awking00
ID: 40458127
Why not forget about "result"? You have variables aFirst and bFirst declared, use them to evaluate your strings a and b seperately since that's what you're doing anyway.
if(a.length()>1) {
aFirst=a.substring(1);  ==> Note - the substring method only needs a begin index to get the rest of the string
  } else {aFirst = "";}
if(b.length()>1) {
bFirst=b.substring(1);
  } else {bFirst = "";}
return aFirst + bFirst;
}

So what this says in layman's terms is if str a is 1 character make the first part an empty string otherwise make if the substring of a starting at the second character, then it does the same thing for str b and returns their concatenation.
0
 
LVL 7

Author Comment

by:gudii9
ID: 40469798
public String nonStart(String a, String b) {
  
  String aFirst="";
  String bFirst="";
  
  if(a.length()>1) {
    aFirst=a.substring(1,a.length());
  } else {
    aFirst= "";
  }
  
  if(b.length()>1){ 
  bFirst=b.substring(1,b.length());}
  else {
    bFirst= "";
  }

  
  return aFirst+bFirst;

}

Open in new window


I wrote as above. I passed all tests. So this updated code looks good right?

i see first if else to check aString is greater than 1 or not.  (if yes do substring on it and assign to it if no assign to ""..but i already have to assign to "" at the top)

second if else to check aString is greater than 1 or not. (if yes do substring on it and assign to it if no assign to ""..but i already have to assign to "" at the top)

Do you suggest instead as below

public String nonStart(String a, String b) {
  
  String bFirst="";
  String bFirst="";
  
  if(a.length()>1) {
    aFirst=a.substring(1,a.length());
  } else {
    aFirst=aFirst ;
  }
  
  if(b.length()>1){ 
  bFirst=b.substring(1,b.length());}
  else {
    bFirst= bFirst;
  }

  
  return aFirst+bFirst;

}

Open in new window


but above code giving error as

Compile problems:


Error:      String bFirst="";
             ^^^^^^
Duplicate local variable bFirst


see Example Code to help with compile problems

please advise
0
 
LVL 84

Expert Comment

by:ozo
ID: 40469830
On the former example, I might test >=1 instead of >1,
which would then become unnecessary since the challenge stipulates that "The strings will be at least length 1."

On the latter example, I might change one of
  String bFirst="";
  String bFirst="";
to aFirst

I might also eliminate the noop of
   bFirst= bFirst;
0
 
LVL 31

Expert Comment

by:awking00
ID: 40470356
>>Error:      String bFirst="";
             ^^^^^^
Duplicate local variable bFirst<<

This is because of what I've been telling you about String objects being immutable. Once you have assigned bFirst the value of an empty string (""), it can not be changed (the same for aFirst), so you can not later modfify it to b.substring(1). You need to initialize the variables aFirst and bFirst to null and not to "".
0
 
LVL 84

Expert Comment

by:ozo
ID: 40470363
You need to initialize the variables aFirst and bFirst to null and not to "".
In the context of this challenge, that is untrue.
0
 
LVL 7

Author Comment

by:gudii9
ID: 40470526
public String nonStart(String a, String b) {
  
  String aFirst="";
  String bFirst="";
  
  if(a.length()>1) {
    aFirst=a.substring(1,a.length());
  } else {
    aFirst="" ;
  }
  
  if(b.length()>1){ 
  bFirst=b.substring(1,b.length());}
  else {
    bFirst= "";
  }

  
  return aFirst+bFirst;

}

Open in new window


i initialized aFirst and bFirst both to "" and all test cases passed.

public String nonStart(String a, String b) {
  
  String aFirst=null;
  String bFirst=null;
  
  if(a.length()>1) {
    aFirst=a.substring(1,a.length());
  } else {
    aFirst="" ;
  }
  
  if(b.length()>1){ 
  bFirst=b.substring(1,b.length());}
  else {
    bFirst= "";
  }

  
  return aFirst+bFirst;

}

Open in new window


I also tried initializing aFirst and bFirst to null as above. Even then all then all test cases passed. Which approach is preferred.
0
 
LVL 84

Expert Comment

by:ozo
ID: 40470726
Between those two choices, I think I'd prefer the one that would have worked even if it had been used with the code in http:#a40469798
0
 
LVL 7

Author Comment

by:gudii9
ID: 40480677
so initializing as below is better
 String aFirst="";
  String bFirst="";

Open in new window

 

compared to initializing as below right

 String aFirst=null;
  String bFirst=null;

Open in new window


Please advise
0
 
LVL 84

Expert Comment

by:ozo
ID: 40480720
Initializing String aFirst=""; would make aFirst="" ; in line 9 unnecessary.

On the other hand, imposing extra conditions on your code can be a way of checking for errors.
0
 
LVL 7

Author Comment

by:gudii9
ID: 40481348
Initializing String aFirst=""; would make aFirst="" ; in line 9 unnecessary

so i should write as below? But it seems not working as below

public String nonStart(String a, String b) {
  
  String aFirst="";
  String bFirst="";
  
  if(a.length()>1) {
    aFirst=a.substring(1,a.length());
  } else {
    aFirst ;
  }
  
  if(b.length()>1){ 
  bFirst=b.substring(1,b.length());}
  else {
    bFirst;
  }

  
  return aFirst+bFirst;

}

Open in new window

0
 
LVL 31

Expert Comment

by:awking00
ID: 40481526
Since you already set the values of aFirst and bFirst to "", the only time you want something different is when the length is > 1, so you don't need the else statements.
String aFirst="";
String bFirst="";
 
  if(a.length()>1) {
    aFirst=a.substring(1,a.length());
  }
  if(b.length()>1){
  bFirst=b.substring(1,b.length());
}
 
  return aFirst+bFirst;
}
0
 
LVL 7

Author Comment

by:gudii9
ID: 40481699
Since you already set the values of aFirst and bFirst to "",

 return aFirst+bFirst;

i thought it should add "" and "" and give "  "(one space and other space should add up two spaces right.

I see output as empty string only
nonStart("a", "x") → ""	""	OK	   

Open in new window


please advise
0
 
LVL 84

Accepted Solution

by:
ozo earned 125 total points
ID: 40482130
" " is one space
" " + " " -> "  "  (1+1=2 spaces)

"" is empty, with no space
"" + "" -> ""  (0+0=0 spaces)
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Navigation is an important part of web design from a usability perspective. But it is often a pain when it comes to a developer’s perspective. By navigation, it often means menuing. This is less theory and more practical of how to get a specific gro…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now