bull and cow game Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Guess a random number between a selected intervalGame Loop and FPSListening to modifications on variablesMulti-player game server accessing and querying MongoDBGolf some Code with A-RayImplementation of stackBasic word guessing gameKata calisthenicsFollow-up 2: Copy File, remove spaces in specific linesDynamically Generating XML Deserialization Classes / Code: Part I, Reading
The test team as an enemy of development? And how can this be avoided?
How do you cope with tons of web fonts when copying and pasting from web pages?
Marquee sign letters
How do I find my Spellcasting Ability for my D&D character?
Flight departed from the gate 5 min before scheduled departure time. Refund options
Can I take recommendation from someone I met at a conference?
Should man-made satellites feature an intelligent inverted "cow catcher"?
Is the Mordenkainen's Sword spell underpowered?
Pointing to problems without suggesting solutions
Any stored/leased 737s that could substitute for grounded MAXs?
"Destructive power" carried by a B-52?
Can I cut the hair of a conjured korred with a blade made of precious material to harvest that material from the korred?
As a dual citizen, my US passport will expire one day after traveling to the US. Will this work?
why doesn't university give past final exams' answers
My mentor says to set image to Fine instead of RAW — how is this different from JPG?
Why are two-digit numbers in Jonathan Swift's "Gulliver's Travels" (1726) written in "German style"?
Is honorific speech ever used in the first person?
Why can't fire hurt Daenerys but it did to Jon Snow in season 1?
Is there a spell that can create a permanent fire?
New Order #6: Easter Egg
Restricting the Object Type for the get method in java HashMap
Why did Bronn offer to be Tyrion Lannister's champion in trial by combat?
Are there any irrational/transcendental numbers for which the distribution of decimal digits is not uniform?
Why are current probes so expensive?
bull and cow game
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Guess a random number between a selected intervalGame Loop and FPSListening to modifications on variablesMulti-player game server accessing and querying MongoDBGolf some Code with A-RayImplementation of stackBasic word guessing gameKata calisthenicsFollow-up 2: Copy File, remove spaces in specific linesDynamically Generating XML Deserialization Classes / Code: Part I, Reading
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
In a game of Bulls and Cows game, I want to be able to have a list of all guess and be able to remove the item from the list base on the result of each guess made by the AI. For instance, if the first generated guess was 2 bulls and 1 cow. i want to be able to check all the remaining number in the list to see which code match up bulls and 1 cows when the second guess is made. the numbers on the list that do not match should be remove from the list to ensure that each guess is consistance. currently the computer can make a guess when the user provide the secret number. But i need some direction to create a method that house the list of the possible random guess.
public static int computeCows(String a, String b)
int countCows=0;
for (int i = 0; i < a.length(); i++)
for (int j = 0; j < b.length(); j++)
if (i != j)
if (a.charAt(i) == b.charAt(j))
countCows++;
return countCows;
public static int computeBulls(String a, String b)
int countBulls=0;
for (int i = 0; i < a.length(); i++)
if (a.charAt(i) == b.charAt(i))
countBulls++;
return countBulls;
public String generateRandomGuess()
int randomGuess = 1;
String computerGeneratedGuess = "";
randomGuess = (int) ((Math.random() * 9000) + 1000);
computerGeneratedGuess = Integer.toString(randomGuess);//System.out.print((randomGuess));
return computerGeneratedGuess;
public static void main(String[] args)
String SecretCode = "";
boolean checkpoint = true;
int bulls;
int cows;
int guesses = 1;
Scanner keybord = new Scanner(System.in);
System.out.println("Enter secret code:");
SecretCode = keybord.nextLine();;
BcCount comguess=new BcCount();
BcCount bull=new BcCount();
BcCount cow=new BcCount();
while (checkpoint)
try
// System.out.print("Enter guess " + ": n");
//String guessedNumber = keybord.nextLine();
//bulls =computeBulls(guessedNumber, bull.generateRandomGuess() );
//cows = computeBulls(guessedNumber, cow.generateRandomGuess());
int combulls = computeBulls(SecretCode, bull.generateRandomGuess());
int comcows = computeCows(SecretCode, cow.generateRandomGuess());
String cumputerguess = comguess.generateRandomGuess();
if (guesses >= 7)
System.out.println("Computer guess: " + cumputerguess);
System.out.println(" Result: Bulls = " + combulls + "tCows = " + comcows + "n");
System.out.println("The game was a Draw!");
System.out.println("The correct computer secret was: " + cumputerguess);
System.out.println("The correct user secret was: " + SecretCode);
checkpoint = false;
// else if (bull == 4)
// System.out.println("You guess: " + guessedNumber);
// System.out.println(" Result: Bulls = " + bulls + "tCows = " + cows);
// System.out.println(" You won with!:)" + "n");
checkpoint = false;
else
System.out.println("Computer guess: " + cumputerguess);
System.out.println(" Result: Bulls = " + combulls + "tCows = " + comcows + "n");
guesses++;
catch(NumberFormatException e)
System.out.println(" Error: your guess should not contain non-digits." + e.getMessage());
catch(StringIndexOutOfBoundsException e)
System.out.println(" Error: Make sure your guess is four digit " + e.getMessage());
java
New contributor
$endgroup$
add a comment |
$begingroup$
In a game of Bulls and Cows game, I want to be able to have a list of all guess and be able to remove the item from the list base on the result of each guess made by the AI. For instance, if the first generated guess was 2 bulls and 1 cow. i want to be able to check all the remaining number in the list to see which code match up bulls and 1 cows when the second guess is made. the numbers on the list that do not match should be remove from the list to ensure that each guess is consistance. currently the computer can make a guess when the user provide the secret number. But i need some direction to create a method that house the list of the possible random guess.
public static int computeCows(String a, String b)
int countCows=0;
for (int i = 0; i < a.length(); i++)
for (int j = 0; j < b.length(); j++)
if (i != j)
if (a.charAt(i) == b.charAt(j))
countCows++;
return countCows;
public static int computeBulls(String a, String b)
int countBulls=0;
for (int i = 0; i < a.length(); i++)
if (a.charAt(i) == b.charAt(i))
countBulls++;
return countBulls;
public String generateRandomGuess()
int randomGuess = 1;
String computerGeneratedGuess = "";
randomGuess = (int) ((Math.random() * 9000) + 1000);
computerGeneratedGuess = Integer.toString(randomGuess);//System.out.print((randomGuess));
return computerGeneratedGuess;
public static void main(String[] args)
String SecretCode = "";
boolean checkpoint = true;
int bulls;
int cows;
int guesses = 1;
Scanner keybord = new Scanner(System.in);
System.out.println("Enter secret code:");
SecretCode = keybord.nextLine();;
BcCount comguess=new BcCount();
BcCount bull=new BcCount();
BcCount cow=new BcCount();
while (checkpoint)
try
// System.out.print("Enter guess " + ": n");
//String guessedNumber = keybord.nextLine();
//bulls =computeBulls(guessedNumber, bull.generateRandomGuess() );
//cows = computeBulls(guessedNumber, cow.generateRandomGuess());
int combulls = computeBulls(SecretCode, bull.generateRandomGuess());
int comcows = computeCows(SecretCode, cow.generateRandomGuess());
String cumputerguess = comguess.generateRandomGuess();
if (guesses >= 7)
System.out.println("Computer guess: " + cumputerguess);
System.out.println(" Result: Bulls = " + combulls + "tCows = " + comcows + "n");
System.out.println("The game was a Draw!");
System.out.println("The correct computer secret was: " + cumputerguess);
System.out.println("The correct user secret was: " + SecretCode);
checkpoint = false;
// else if (bull == 4)
// System.out.println("You guess: " + guessedNumber);
// System.out.println(" Result: Bulls = " + bulls + "tCows = " + cows);
// System.out.println(" You won with!:)" + "n");
checkpoint = false;
else
System.out.println("Computer guess: " + cumputerguess);
System.out.println(" Result: Bulls = " + combulls + "tCows = " + comcows + "n");
guesses++;
catch(NumberFormatException e)
System.out.println(" Error: your guess should not contain non-digits." + e.getMessage());
catch(StringIndexOutOfBoundsException e)
System.out.println(" Error: Make sure your guess is four digit " + e.getMessage());
java
New contributor
$endgroup$
add a comment |
$begingroup$
In a game of Bulls and Cows game, I want to be able to have a list of all guess and be able to remove the item from the list base on the result of each guess made by the AI. For instance, if the first generated guess was 2 bulls and 1 cow. i want to be able to check all the remaining number in the list to see which code match up bulls and 1 cows when the second guess is made. the numbers on the list that do not match should be remove from the list to ensure that each guess is consistance. currently the computer can make a guess when the user provide the secret number. But i need some direction to create a method that house the list of the possible random guess.
public static int computeCows(String a, String b)
int countCows=0;
for (int i = 0; i < a.length(); i++)
for (int j = 0; j < b.length(); j++)
if (i != j)
if (a.charAt(i) == b.charAt(j))
countCows++;
return countCows;
public static int computeBulls(String a, String b)
int countBulls=0;
for (int i = 0; i < a.length(); i++)
if (a.charAt(i) == b.charAt(i))
countBulls++;
return countBulls;
public String generateRandomGuess()
int randomGuess = 1;
String computerGeneratedGuess = "";
randomGuess = (int) ((Math.random() * 9000) + 1000);
computerGeneratedGuess = Integer.toString(randomGuess);//System.out.print((randomGuess));
return computerGeneratedGuess;
public static void main(String[] args)
String SecretCode = "";
boolean checkpoint = true;
int bulls;
int cows;
int guesses = 1;
Scanner keybord = new Scanner(System.in);
System.out.println("Enter secret code:");
SecretCode = keybord.nextLine();;
BcCount comguess=new BcCount();
BcCount bull=new BcCount();
BcCount cow=new BcCount();
while (checkpoint)
try
// System.out.print("Enter guess " + ": n");
//String guessedNumber = keybord.nextLine();
//bulls =computeBulls(guessedNumber, bull.generateRandomGuess() );
//cows = computeBulls(guessedNumber, cow.generateRandomGuess());
int combulls = computeBulls(SecretCode, bull.generateRandomGuess());
int comcows = computeCows(SecretCode, cow.generateRandomGuess());
String cumputerguess = comguess.generateRandomGuess();
if (guesses >= 7)
System.out.println("Computer guess: " + cumputerguess);
System.out.println(" Result: Bulls = " + combulls + "tCows = " + comcows + "n");
System.out.println("The game was a Draw!");
System.out.println("The correct computer secret was: " + cumputerguess);
System.out.println("The correct user secret was: " + SecretCode);
checkpoint = false;
// else if (bull == 4)
// System.out.println("You guess: " + guessedNumber);
// System.out.println(" Result: Bulls = " + bulls + "tCows = " + cows);
// System.out.println(" You won with!:)" + "n");
checkpoint = false;
else
System.out.println("Computer guess: " + cumputerguess);
System.out.println(" Result: Bulls = " + combulls + "tCows = " + comcows + "n");
guesses++;
catch(NumberFormatException e)
System.out.println(" Error: your guess should not contain non-digits." + e.getMessage());
catch(StringIndexOutOfBoundsException e)
System.out.println(" Error: Make sure your guess is four digit " + e.getMessage());
java
New contributor
$endgroup$
In a game of Bulls and Cows game, I want to be able to have a list of all guess and be able to remove the item from the list base on the result of each guess made by the AI. For instance, if the first generated guess was 2 bulls and 1 cow. i want to be able to check all the remaining number in the list to see which code match up bulls and 1 cows when the second guess is made. the numbers on the list that do not match should be remove from the list to ensure that each guess is consistance. currently the computer can make a guess when the user provide the secret number. But i need some direction to create a method that house the list of the possible random guess.
public static int computeCows(String a, String b)
int countCows=0;
for (int i = 0; i < a.length(); i++)
for (int j = 0; j < b.length(); j++)
if (i != j)
if (a.charAt(i) == b.charAt(j))
countCows++;
return countCows;
public static int computeBulls(String a, String b)
int countBulls=0;
for (int i = 0; i < a.length(); i++)
if (a.charAt(i) == b.charAt(i))
countBulls++;
return countBulls;
public String generateRandomGuess()
int randomGuess = 1;
String computerGeneratedGuess = "";
randomGuess = (int) ((Math.random() * 9000) + 1000);
computerGeneratedGuess = Integer.toString(randomGuess);//System.out.print((randomGuess));
return computerGeneratedGuess;
public static void main(String[] args)
String SecretCode = "";
boolean checkpoint = true;
int bulls;
int cows;
int guesses = 1;
Scanner keybord = new Scanner(System.in);
System.out.println("Enter secret code:");
SecretCode = keybord.nextLine();;
BcCount comguess=new BcCount();
BcCount bull=new BcCount();
BcCount cow=new BcCount();
while (checkpoint)
try
// System.out.print("Enter guess " + ": n");
//String guessedNumber = keybord.nextLine();
//bulls =computeBulls(guessedNumber, bull.generateRandomGuess() );
//cows = computeBulls(guessedNumber, cow.generateRandomGuess());
int combulls = computeBulls(SecretCode, bull.generateRandomGuess());
int comcows = computeCows(SecretCode, cow.generateRandomGuess());
String cumputerguess = comguess.generateRandomGuess();
if (guesses >= 7)
System.out.println("Computer guess: " + cumputerguess);
System.out.println(" Result: Bulls = " + combulls + "tCows = " + comcows + "n");
System.out.println("The game was a Draw!");
System.out.println("The correct computer secret was: " + cumputerguess);
System.out.println("The correct user secret was: " + SecretCode);
checkpoint = false;
// else if (bull == 4)
// System.out.println("You guess: " + guessedNumber);
// System.out.println(" Result: Bulls = " + bulls + "tCows = " + cows);
// System.out.println(" You won with!:)" + "n");
checkpoint = false;
else
System.out.println("Computer guess: " + cumputerguess);
System.out.println(" Result: Bulls = " + combulls + "tCows = " + comcows + "n");
guesses++;
catch(NumberFormatException e)
System.out.println(" Error: your guess should not contain non-digits." + e.getMessage());
catch(StringIndexOutOfBoundsException e)
System.out.println(" Error: Make sure your guess is four digit " + e.getMessage());
public static int computeCows(String a, String b)
int countCows=0;
for (int i = 0; i < a.length(); i++)
for (int j = 0; j < b.length(); j++)
if (i != j)
if (a.charAt(i) == b.charAt(j))
countCows++;
return countCows;
public static int computeBulls(String a, String b)
int countBulls=0;
for (int i = 0; i < a.length(); i++)
if (a.charAt(i) == b.charAt(i))
countBulls++;
return countBulls;
public String generateRandomGuess()
int randomGuess = 1;
String computerGeneratedGuess = "";
randomGuess = (int) ((Math.random() * 9000) + 1000);
computerGeneratedGuess = Integer.toString(randomGuess);//System.out.print((randomGuess));
return computerGeneratedGuess;
public static void main(String[] args)
String SecretCode = "";
boolean checkpoint = true;
int bulls;
int cows;
int guesses = 1;
Scanner keybord = new Scanner(System.in);
System.out.println("Enter secret code:");
SecretCode = keybord.nextLine();;
BcCount comguess=new BcCount();
BcCount bull=new BcCount();
BcCount cow=new BcCount();
while (checkpoint)
try
// System.out.print("Enter guess " + ": n");
//String guessedNumber = keybord.nextLine();
//bulls =computeBulls(guessedNumber, bull.generateRandomGuess() );
//cows = computeBulls(guessedNumber, cow.generateRandomGuess());
int combulls = computeBulls(SecretCode, bull.generateRandomGuess());
int comcows = computeCows(SecretCode, cow.generateRandomGuess());
String cumputerguess = comguess.generateRandomGuess();
if (guesses >= 7)
System.out.println("Computer guess: " + cumputerguess);
System.out.println(" Result: Bulls = " + combulls + "tCows = " + comcows + "n");
System.out.println("The game was a Draw!");
System.out.println("The correct computer secret was: " + cumputerguess);
System.out.println("The correct user secret was: " + SecretCode);
checkpoint = false;
// else if (bull == 4)
// System.out.println("You guess: " + guessedNumber);
// System.out.println(" Result: Bulls = " + bulls + "tCows = " + cows);
// System.out.println(" You won with!:)" + "n");
checkpoint = false;
else
System.out.println("Computer guess: " + cumputerguess);
System.out.println(" Result: Bulls = " + combulls + "tCows = " + comcows + "n");
guesses++;
catch(NumberFormatException e)
System.out.println(" Error: your guess should not contain non-digits." + e.getMessage());
catch(StringIndexOutOfBoundsException e)
System.out.println(" Error: Make sure your guess is four digit " + e.getMessage());
public static int computeCows(String a, String b)
int countCows=0;
for (int i = 0; i < a.length(); i++)
for (int j = 0; j < b.length(); j++)
if (i != j)
if (a.charAt(i) == b.charAt(j))
countCows++;
return countCows;
public static int computeBulls(String a, String b)
int countBulls=0;
for (int i = 0; i < a.length(); i++)
if (a.charAt(i) == b.charAt(i))
countBulls++;
return countBulls;
public String generateRandomGuess()
int randomGuess = 1;
String computerGeneratedGuess = "";
randomGuess = (int) ((Math.random() * 9000) + 1000);
computerGeneratedGuess = Integer.toString(randomGuess);//System.out.print((randomGuess));
return computerGeneratedGuess;
public static void main(String[] args)
String SecretCode = "";
boolean checkpoint = true;
int bulls;
int cows;
int guesses = 1;
Scanner keybord = new Scanner(System.in);
System.out.println("Enter secret code:");
SecretCode = keybord.nextLine();;
BcCount comguess=new BcCount();
BcCount bull=new BcCount();
BcCount cow=new BcCount();
while (checkpoint)
try
// System.out.print("Enter guess " + ": n");
//String guessedNumber = keybord.nextLine();
//bulls =computeBulls(guessedNumber, bull.generateRandomGuess() );
//cows = computeBulls(guessedNumber, cow.generateRandomGuess());
int combulls = computeBulls(SecretCode, bull.generateRandomGuess());
int comcows = computeCows(SecretCode, cow.generateRandomGuess());
String cumputerguess = comguess.generateRandomGuess();
if (guesses >= 7)
System.out.println("Computer guess: " + cumputerguess);
System.out.println(" Result: Bulls = " + combulls + "tCows = " + comcows + "n");
System.out.println("The game was a Draw!");
System.out.println("The correct computer secret was: " + cumputerguess);
System.out.println("The correct user secret was: " + SecretCode);
checkpoint = false;
// else if (bull == 4)
// System.out.println("You guess: " + guessedNumber);
// System.out.println(" Result: Bulls = " + bulls + "tCows = " + cows);
// System.out.println(" You won with!:)" + "n");
checkpoint = false;
else
System.out.println("Computer guess: " + cumputerguess);
System.out.println(" Result: Bulls = " + combulls + "tCows = " + comcows + "n");
guesses++;
catch(NumberFormatException e)
System.out.println(" Error: your guess should not contain non-digits." + e.getMessage());
catch(StringIndexOutOfBoundsException e)
System.out.println(" Error: Make sure your guess is four digit " + e.getMessage());
java
java
New contributor
New contributor
New contributor
asked 1 min ago
sumsum
11
11
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "196"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
sum is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f217878%2fbull-and-cow-game%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
sum is a new contributor. Be nice, and check out our Code of Conduct.
sum is a new contributor. Be nice, and check out our Code of Conduct.
sum is a new contributor. Be nice, and check out our Code of Conduct.
sum is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Code Review Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f217878%2fbull-and-cow-game%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown