Sunday, 28 May 2017

Facebook Grace Hopper Scholarship for women

Facebook Grace Hopper Scholarship for women



Application open for Facebook Grace Hopper Scholarship
Facebook always tries to empower woman in technology. To empower woman, facebook is very excited to announce the 2017 Facebook Grace Hopper Women in Computing Scholarship.
Thousands of remarkable women in technology will join facebook at Orlando from October 4-6, 2017 for its tenth year at the Grace Hopper Celebration of Women in Computing. This unique scholarship program will be awarded to 50 women excelling in Computer Science. Each recipient will have the opportunity not only to attend the Celebration, but to spend valuable days before the conference with Facebook engineers learning, collaborating, and preparing for the conference.
Eligibility
  1. The scholarship is open to all women excelling in Computer Science globally (open for any woman all over the world).
  2. You have to currently be enrolled at an educational institution in order to qualify for the scholarship (high school through post-doc students are eligible).
Highlights of award
  1. Facebook will pay registration fees for Grace Hopper Celebration
  2. Paid travel and lodging, including a pre-Grace Hopper Celebration program in Orlando that includes tech talks, mentoring sessions and networking events from October 1-7, 2017.
  3. Additional meal stipend.
  4. An invitation to a private reception with Facebook's Engineering Team during the Grace Hopper Celebration.
  5. For international applicants: If you are selected, you would be responsible for your own travel visa. Facebook would cover travel expenses.
Important dates
  1. Wednesday, June 15th, 11:59pm PST - Applications for the Facebook Grace Hopper Celebration Scholarship must be submitted in full. If you made any mistake in application, you can edit it till last last of submission.
  2. Friday, July 15th - Award recipients will be notified by email of their acceptance by midnight PST.
  3. Sunday, October 1st - Saturday October 7th - Dates scholarship recipients must be available.
If you have any questions, you can contact facebook gracehopper team to gracehopper@fb.com
You can apply for this scholarship at https://www.facebook.com/careers/program/gracehopper2017/apply/
As per feedback from many women who get this scholarship last year, they got opportunity to placed in several gaint MNC. They feel lucky to meet the person about whom they heard in media. So you have lots of opportunity, if you able to get this scholarship.

See more information at http://www.fbchandra.com

Tuesday, 23 May 2017

Facebook Executives

Facebook Executives


Facebook is a social networking company where people connect to their family, friends and to whom they want. It was founded in 2004. Its headquarters is at 1 Hacker Way, Menlo Park, California 94025. It has around 18,770 employees working by March 31, 2017. Its office is located in several places in US and outside US. In India, it is located in Hyderabad, Mumbai and New Delhi.
Mark Zuckerberg

He is founder, chairman and CEO (Chief Executive Officer) of facebook. He studied computer science at Harvard University later on moved started his own company facebook. He is very dynamic in nature and is responsible for setting the overall direction and product strategy for the company. He leads facebook design and core technology.

Sheryl Sandberg

She is COO (Chief Operating Officer) of facebook. Prior to Facebook, Sheryl was vice president of Global Online Sales and Operations at Google, chief of staff for the United States Treasury Department under President Clinton, a management consultant with McKinsey & Company, and an economist with the World Bank.
Sheryl received a BA summa cum laude from Harvard University and an MBA with highest distinction from Harvard Business School.
Sheryl serves on the boards of Facebook, the Walt Disney Company, Women for Women International, ONE, and SurveyMonkey.

Mike Schroepfer

He is CTO (Chief Technology Officer) and Vice President of Engineering in facebook. He leads technology team which works very hard to connect people to their relatives and friends. Prior to Facebook, he was vice president of engineering at Mozilla Corporation, where he led the global and open product development process behind Firefox. Mike was formerly a distinguished engineer at Sun Microsystems, which acquired his company, CenterRun. He began his career working at various startups, including a digital effects software startup where he developed software that has been used in several major motion pictures. Mike holds a bachelor's degree and a master's degree in computer science from Stanford University and has filed two US patents.

Chris Cox

He is CPO (Chief Product Officer) in facebook. Chris joined Facebook in 2005 as a software engineer and helped build the first versions of key Facebook features, including News Feed. He then became director of human resources, where he set the tone for Facebook's culture and drove the development of its mission, values and people strategy.
Chris holds a bachelor's degree in symbolic systems with a concentration in artificial intelligence from Stanford University.

David Wehner

He is CFO (Chief Finance Officer), Vice President, Corporate Finance and Business Planning in facebook. He is responsible for core facebook product. Prior to becoming CFO in June 2014, Dave served as Facebook's vice president of Corporate Finance and Business Planning. From 2010 through 2012, Dave served as Chief Financial Officer of Zynga Inc. Before Zynga, Dave was a Managing Director at Allen & Company, an investment bank focused on media and technology, which he joined in 2001.
Dave holds a B.S. in Chemistry from Georgetown University, and a M.S. in Applied Physics from Stanford University.
 Find more post at http://www.fbchandra.com

Friday, 5 May 2017

Monkey man algorithm in PHP, who jumps and slip on wall

 

A monkey man caught inside a jail. He can jumps across the wall. He can jump 'X' meters, but due to slippery walls he falls 'Y' meters after each jump. To escape from jail, he has to cross 'N' number of walls, where height of each wall is given in an array.
Write a program to find total number of jumps, he has to make, to escape
Input Format
Your function will take three arguments, where:
Argument 1: An integer depicting X, which he can jump
Argument 2: An integer depicting Y, which he falls
Argument 3: An array of N integers having the height of each wall.
Constraints
1<=X<=109
1<=Y<=105
Output Format
Your program should return total number of jumps required to escape.

Sample Test Case
Test case 1
Sample Input 10 1 1 10
Sample Output 1
Explanation
Here monkey man can jump 10 meters high, but slides down by 1 meter. He has 1 wall to jump and the height of the wall is 10 meters. Since he jumps 10 meters in the first attempt he cross the wall easily in the first attempt only.
Test case 2
Sample Input 5 1 2 9 10
Sample Output 5
Explanation
Here, the monkey man can jump 5 meters high, but slides down by 1 meters. He has 2 walls to jump and the walls are 9 and 10 meters hight respectively.
While crossing the first wall, he takes 2 attempts, because during the first attempt he jumps 5 meters but slides down by 1 meters since he didn't cross the wall. In the next attempt he jumps 5 more meters from that position and this time he doesn't slide because he crossed the wall in this attempt because 4+5=9 and 9 meters is the actual height of the wall.
Similarly, while crossing the second wall, he takes 3 attempts because during his second attempt on this wall, he silides down by 1 meters since 4+5=9 and the height of the wall is 10 meters. During his third attempt, he was able to escape.


Solution
<?php
$x=5;
$y=1;
$z=array(9,10);
function jump($x,$y,$z) {
 $cnt=count($z);
 $cntjump=0;
 for($i=0;$i<$cnt;$i++) {
  $height=$z[$i];
  while($height>$x) {
   $height=$height-($x-$y);
   $cntjump++;   
  }
  $cntjump++;
 }
 return $cntjump;
}
$cnt = jump($x,$y,$z);
echo $cnt;
?>
Find more on http://www.fbchandra.com 







How to upload file using AJAX and PHP?

 

 

Simplest way to upload file is by using FormData. It is used in key/value pairs to send XMLHttpRequest. Initially FormData used to send all form elements data in key/value pair, but it can be used to send keyed data also. Data sent by FormData is in same format as used in form's submit() method. It sends upload data also, if we use multipart/form-data in form's encoding
index.html
<!Doctype HTML>
<html>
<head>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="main.js"></script>
</head>
<body>
<form name="frmUpdload" id="frmUpdload" method="POST" enctype="multipart/form-data">
 <input type="file" name="txtFile" class="txtFile" />
 <input type="submit" name="btnSubmit" value="Submit" />
</form>
</body>
</html>

main.js
$(document).ready(function() {
 $("form#frmUpdload").submit(function() {
  //Image validation start
  var file_name=$('.txtFile').val();
  var index_dot=file_name.lastIndexOf(".")+1;
  var ext=file_name.substr(index_dot);
  if(file_name=='') {
   alert('Please upload image');
  }
  else if(!(ext=='png' || ext=='jpg' || ext=='jpeg')) {
   alert('Please upload jpg or png image only');
  } //Image validation end
  else {
   //formdata object to send file upload data
   var formData = new FormData();
   formData.append('fileupload',$( '.txtFile' )[0].files[0], file_name);
   
   $.ajax({
    url: 'upload.php',
     data: formData,
     processData: false,
     contentType: false,
     type: 'POST',
     success: function(data){
     alert(data);
     }
   });
  }
  $('#frmUpdload')[0].reset();
  return false;
 });
});

upload.php
<?php
//print_r($_FILES); //Check all $_FILES variables
$files=$_FILES['fileupload'];
$tmp_name=$files['tmp_name'];
$name=$files['name'];
$destination=$name;
$res=move_uploaded_file($tmp_name, $destination);
if($res) {
 $msg='Uploaded successfully';
}
else {
 $msg='Error';
}
echo $msg;
?>
Find more post on http://www.fbchandra.com