Prints each letter of a string in different colors. C#Counting the occurrence of each letter in a stringComparing different string-matching functionsGenerating Unique ColorsFinding the maximum pairwise difference in a collection of colorsExtension method splitting string on each capital letterComparing XML string with different formatsIncrementing colorsGenerating an image with all 15-bit colors, each used exactly onceUpdate SQL database, similar-but-different queries for each monthReturn Full Month Name From 3 Letter Month
Shortest amud or daf in Shas?
Driving a school bus in the USA
Why is choosing a suitable thermodynamic potential important?
Does a windmilling propeller create more drag than a stopped propeller in an engine out scenario
Is it possible to determine from only a photo of a cityscape whether it was taken close with wide angle or from a distance with zoom?
Does the usage of mathematical symbols work differently in books than in theses?
Largest memory peripheral for Sinclair ZX81?
FIFO data structure in pure C
Can more than one instance of Bend Luck be applied to the same roll by multiple Wild Magic sorcerers?
Who is frowning in the sentence "Daisy looked at Tom frowning"?
Using `printf` to print variable containing `%` percent sign results in "bash: printf: `p': invalid format character"
What's is the easiest way to purchase a stock and hold it
Why wear sunglasses in indoor velodromes?
Bookshelves: the intruder
Have the writers and actors of GOT responded to its poor reception?
Have GoT's showrunners reacted to the poor reception of the final season?
Appropriate liquid/solvent for life in my underground environment on Venus
How does this piece of code determine array size without using sizeof( )?
I recently started my machine learning PhD and I have absolutely no idea what I'm doing
Why do academics prefer Mac/Linux?
What color to choose as "danger" if the main color of my app is red
Parse a C++14 integer literal
RegEx with d doesn’t work in if-else statement with [[
Can ThermodynamicData be used with NSolve?
Prints each letter of a string in different colors. C#
Counting the occurrence of each letter in a stringComparing different string-matching functionsGenerating Unique ColorsFinding the maximum pairwise difference in a collection of colorsExtension method splitting string on each capital letterComparing XML string with different formatsIncrementing colorsGenerating an image with all 15-bit colors, each used exactly onceUpdate SQL database, similar-but-different queries for each monthReturn Full Month Name From 3 Letter Month
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
I'm practicing for my Technical Interview and I'm worried my code does not meet the bar. What can I do to improve this answer?
Here is the question: https://www.careercup.com/question?id=5739126414901248
Given
colors = ["red", "blue", "green", "yellow"]; and a string
str = "Lorem ipsum dolor sit amet";
write a function that prints each letter of the string in different colors. ex. L is red, o is blue, r is green, e is yellow, m is red, after the space, i should be blue.
My answer:
static void TestPrintColors()
string[] colors = new string[4] "red", "blue", "green", "yellow";
string str = "Lorem ipsum dolor sit amet";
PrintColors(colors, str);
static void PrintColors(string[] colors, string str)
char log;
ConsoleColor originalColor = Console.ForegroundColor;
int colorIndex = 0;
ConsoleColor currentColor = originalColor;
for (int i = 0; i < str.Length; i++)
log = str[i];
if (log == ' ')
Console.WriteLine(log);
continue;
switch(colors[colorIndex])
case "red":
currentColor = ConsoleColor.Red;
break;
case "blue":
currentColor = ConsoleColor.Blue;
break;
case "green":
currentColor = ConsoleColor.Green;
break;
case "yellow":
currentColor = ConsoleColor.Yellow;
break;
default:
currentColor = originalColor;
break;
colorIndex++;
if (colorIndex >= colors.Length)
colorIndex = 0;
Console.ForegroundColor = currentColor;
Console.WriteLine(log);
Console.ForegroundColor = originalColor;
c# performance
New contributor
Austin Taylor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
I'm practicing for my Technical Interview and I'm worried my code does not meet the bar. What can I do to improve this answer?
Here is the question: https://www.careercup.com/question?id=5739126414901248
Given
colors = ["red", "blue", "green", "yellow"]; and a string
str = "Lorem ipsum dolor sit amet";
write a function that prints each letter of the string in different colors. ex. L is red, o is blue, r is green, e is yellow, m is red, after the space, i should be blue.
My answer:
static void TestPrintColors()
string[] colors = new string[4] "red", "blue", "green", "yellow";
string str = "Lorem ipsum dolor sit amet";
PrintColors(colors, str);
static void PrintColors(string[] colors, string str)
char log;
ConsoleColor originalColor = Console.ForegroundColor;
int colorIndex = 0;
ConsoleColor currentColor = originalColor;
for (int i = 0; i < str.Length; i++)
log = str[i];
if (log == ' ')
Console.WriteLine(log);
continue;
switch(colors[colorIndex])
case "red":
currentColor = ConsoleColor.Red;
break;
case "blue":
currentColor = ConsoleColor.Blue;
break;
case "green":
currentColor = ConsoleColor.Green;
break;
case "yellow":
currentColor = ConsoleColor.Yellow;
break;
default:
currentColor = originalColor;
break;
colorIndex++;
if (colorIndex >= colors.Length)
colorIndex = 0;
Console.ForegroundColor = currentColor;
Console.WriteLine(log);
Console.ForegroundColor = originalColor;
c# performance
New contributor
Austin Taylor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
$begingroup$
Have you tested the code? If you have tested the code could you please provide the code that calls this function?
$endgroup$
– pacmaninbw
27 mins ago
add a comment |
$begingroup$
I'm practicing for my Technical Interview and I'm worried my code does not meet the bar. What can I do to improve this answer?
Here is the question: https://www.careercup.com/question?id=5739126414901248
Given
colors = ["red", "blue", "green", "yellow"]; and a string
str = "Lorem ipsum dolor sit amet";
write a function that prints each letter of the string in different colors. ex. L is red, o is blue, r is green, e is yellow, m is red, after the space, i should be blue.
My answer:
static void TestPrintColors()
string[] colors = new string[4] "red", "blue", "green", "yellow";
string str = "Lorem ipsum dolor sit amet";
PrintColors(colors, str);
static void PrintColors(string[] colors, string str)
char log;
ConsoleColor originalColor = Console.ForegroundColor;
int colorIndex = 0;
ConsoleColor currentColor = originalColor;
for (int i = 0; i < str.Length; i++)
log = str[i];
if (log == ' ')
Console.WriteLine(log);
continue;
switch(colors[colorIndex])
case "red":
currentColor = ConsoleColor.Red;
break;
case "blue":
currentColor = ConsoleColor.Blue;
break;
case "green":
currentColor = ConsoleColor.Green;
break;
case "yellow":
currentColor = ConsoleColor.Yellow;
break;
default:
currentColor = originalColor;
break;
colorIndex++;
if (colorIndex >= colors.Length)
colorIndex = 0;
Console.ForegroundColor = currentColor;
Console.WriteLine(log);
Console.ForegroundColor = originalColor;
c# performance
New contributor
Austin Taylor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
I'm practicing for my Technical Interview and I'm worried my code does not meet the bar. What can I do to improve this answer?
Here is the question: https://www.careercup.com/question?id=5739126414901248
Given
colors = ["red", "blue", "green", "yellow"]; and a string
str = "Lorem ipsum dolor sit amet";
write a function that prints each letter of the string in different colors. ex. L is red, o is blue, r is green, e is yellow, m is red, after the space, i should be blue.
My answer:
static void TestPrintColors()
string[] colors = new string[4] "red", "blue", "green", "yellow";
string str = "Lorem ipsum dolor sit amet";
PrintColors(colors, str);
static void PrintColors(string[] colors, string str)
char log;
ConsoleColor originalColor = Console.ForegroundColor;
int colorIndex = 0;
ConsoleColor currentColor = originalColor;
for (int i = 0; i < str.Length; i++)
log = str[i];
if (log == ' ')
Console.WriteLine(log);
continue;
switch(colors[colorIndex])
case "red":
currentColor = ConsoleColor.Red;
break;
case "blue":
currentColor = ConsoleColor.Blue;
break;
case "green":
currentColor = ConsoleColor.Green;
break;
case "yellow":
currentColor = ConsoleColor.Yellow;
break;
default:
currentColor = originalColor;
break;
colorIndex++;
if (colorIndex >= colors.Length)
colorIndex = 0;
Console.ForegroundColor = currentColor;
Console.WriteLine(log);
Console.ForegroundColor = originalColor;
c# performance
c# performance
New contributor
Austin Taylor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Austin Taylor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 1 hour ago
chicks
1,60321019
1,60321019
New contributor
Austin Taylor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 3 hours ago
Austin TaylorAustin Taylor
334
334
New contributor
Austin Taylor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Austin Taylor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$begingroup$
Have you tested the code? If you have tested the code could you please provide the code that calls this function?
$endgroup$
– pacmaninbw
27 mins ago
add a comment |
$begingroup$
Have you tested the code? If you have tested the code could you please provide the code that calls this function?
$endgroup$
– pacmaninbw
27 mins ago
$begingroup$
Have you tested the code? If you have tested the code could you please provide the code that calls this function?
$endgroup$
– pacmaninbw
27 mins ago
$begingroup$
Have you tested the code? If you have tested the code could you please provide the code that calls this function?
$endgroup$
– pacmaninbw
27 mins ago
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Don't worry about performance.
You're writing a handful of strings to the console, and it takes milliseconds. When you start writing tens of thousands of strings, and notice it taking seconds, then you can you start to look for optimizations. Until then, the cleanliness of your code is much more important.
Your function is too long.
This is a fifty-line function. It has the responsibilities of iterating through two lists in parallel, skipping spaces, parsing color names, setting the console color, writing to console, and resetting the console color when it's all done. That's a lot! Break it up into smaller functions.
Switch statements are ugly.
I don't mean that they are never appropriate, but ConsoleColor is an enum, and it's possible to parse enums (while ignoring case sensitivity). You should replace this switch statement with a function call.
Don't initialize variables until you need them.
With few exceptions, modern languages are very good about optimizing variable allocation. Putting char log = str[i] inside the loop will not result in additional memory usage, and it will save me (a potential reviewer or maintenance programmer) from having to think about that character before or after the loop.
Other tips...
You say this is practice for an interview, so it could be a good place for you to show off your knowledge of C#. With a little trouble, you could leverage Regular Expressions and LINQ to save you from manually manipulating array indexes. With a little more trouble, you could leverage IDisposable to ensure the original ForegroundColor is restored when all is said and done.
On the other hand, you could also shoot yourself in the foot attempting to do those things. If you don't honestly have in-depth knowledge about C#, it might be best just to aim for code that is as simple as possible. I think the best way to do that is to make small functions with clear names, to show you are thinking about the maintainability and reusability of your code.
$endgroup$
$begingroup$
Nicely said! Thank you for the great response! I would like to update my code and get feedback, what is the best way to do that? Sorry I'm, new here. Thank you!
$endgroup$
– Austin Taylor
1 hour ago
1
$begingroup$
Welcome to CodeReview! The usual rule is that you may make edits to your code until the first answer is posted. At this point, if you were to edit this question my answer would look silly. Please, feel free to post a follow-up question with your updated code, maybe linking back to this one for reference.
$endgroup$
– benj2240
48 mins ago
add a comment |
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
);
);
Austin Taylor 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');
);
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%2f220371%2fprints-each-letter-of-a-string-in-different-colors-c%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Don't worry about performance.
You're writing a handful of strings to the console, and it takes milliseconds. When you start writing tens of thousands of strings, and notice it taking seconds, then you can you start to look for optimizations. Until then, the cleanliness of your code is much more important.
Your function is too long.
This is a fifty-line function. It has the responsibilities of iterating through two lists in parallel, skipping spaces, parsing color names, setting the console color, writing to console, and resetting the console color when it's all done. That's a lot! Break it up into smaller functions.
Switch statements are ugly.
I don't mean that they are never appropriate, but ConsoleColor is an enum, and it's possible to parse enums (while ignoring case sensitivity). You should replace this switch statement with a function call.
Don't initialize variables until you need them.
With few exceptions, modern languages are very good about optimizing variable allocation. Putting char log = str[i] inside the loop will not result in additional memory usage, and it will save me (a potential reviewer or maintenance programmer) from having to think about that character before or after the loop.
Other tips...
You say this is practice for an interview, so it could be a good place for you to show off your knowledge of C#. With a little trouble, you could leverage Regular Expressions and LINQ to save you from manually manipulating array indexes. With a little more trouble, you could leverage IDisposable to ensure the original ForegroundColor is restored when all is said and done.
On the other hand, you could also shoot yourself in the foot attempting to do those things. If you don't honestly have in-depth knowledge about C#, it might be best just to aim for code that is as simple as possible. I think the best way to do that is to make small functions with clear names, to show you are thinking about the maintainability and reusability of your code.
$endgroup$
$begingroup$
Nicely said! Thank you for the great response! I would like to update my code and get feedback, what is the best way to do that? Sorry I'm, new here. Thank you!
$endgroup$
– Austin Taylor
1 hour ago
1
$begingroup$
Welcome to CodeReview! The usual rule is that you may make edits to your code until the first answer is posted. At this point, if you were to edit this question my answer would look silly. Please, feel free to post a follow-up question with your updated code, maybe linking back to this one for reference.
$endgroup$
– benj2240
48 mins ago
add a comment |
$begingroup$
Don't worry about performance.
You're writing a handful of strings to the console, and it takes milliseconds. When you start writing tens of thousands of strings, and notice it taking seconds, then you can you start to look for optimizations. Until then, the cleanliness of your code is much more important.
Your function is too long.
This is a fifty-line function. It has the responsibilities of iterating through two lists in parallel, skipping spaces, parsing color names, setting the console color, writing to console, and resetting the console color when it's all done. That's a lot! Break it up into smaller functions.
Switch statements are ugly.
I don't mean that they are never appropriate, but ConsoleColor is an enum, and it's possible to parse enums (while ignoring case sensitivity). You should replace this switch statement with a function call.
Don't initialize variables until you need them.
With few exceptions, modern languages are very good about optimizing variable allocation. Putting char log = str[i] inside the loop will not result in additional memory usage, and it will save me (a potential reviewer or maintenance programmer) from having to think about that character before or after the loop.
Other tips...
You say this is practice for an interview, so it could be a good place for you to show off your knowledge of C#. With a little trouble, you could leverage Regular Expressions and LINQ to save you from manually manipulating array indexes. With a little more trouble, you could leverage IDisposable to ensure the original ForegroundColor is restored when all is said and done.
On the other hand, you could also shoot yourself in the foot attempting to do those things. If you don't honestly have in-depth knowledge about C#, it might be best just to aim for code that is as simple as possible. I think the best way to do that is to make small functions with clear names, to show you are thinking about the maintainability and reusability of your code.
$endgroup$
$begingroup$
Nicely said! Thank you for the great response! I would like to update my code and get feedback, what is the best way to do that? Sorry I'm, new here. Thank you!
$endgroup$
– Austin Taylor
1 hour ago
1
$begingroup$
Welcome to CodeReview! The usual rule is that you may make edits to your code until the first answer is posted. At this point, if you were to edit this question my answer would look silly. Please, feel free to post a follow-up question with your updated code, maybe linking back to this one for reference.
$endgroup$
– benj2240
48 mins ago
add a comment |
$begingroup$
Don't worry about performance.
You're writing a handful of strings to the console, and it takes milliseconds. When you start writing tens of thousands of strings, and notice it taking seconds, then you can you start to look for optimizations. Until then, the cleanliness of your code is much more important.
Your function is too long.
This is a fifty-line function. It has the responsibilities of iterating through two lists in parallel, skipping spaces, parsing color names, setting the console color, writing to console, and resetting the console color when it's all done. That's a lot! Break it up into smaller functions.
Switch statements are ugly.
I don't mean that they are never appropriate, but ConsoleColor is an enum, and it's possible to parse enums (while ignoring case sensitivity). You should replace this switch statement with a function call.
Don't initialize variables until you need them.
With few exceptions, modern languages are very good about optimizing variable allocation. Putting char log = str[i] inside the loop will not result in additional memory usage, and it will save me (a potential reviewer or maintenance programmer) from having to think about that character before or after the loop.
Other tips...
You say this is practice for an interview, so it could be a good place for you to show off your knowledge of C#. With a little trouble, you could leverage Regular Expressions and LINQ to save you from manually manipulating array indexes. With a little more trouble, you could leverage IDisposable to ensure the original ForegroundColor is restored when all is said and done.
On the other hand, you could also shoot yourself in the foot attempting to do those things. If you don't honestly have in-depth knowledge about C#, it might be best just to aim for code that is as simple as possible. I think the best way to do that is to make small functions with clear names, to show you are thinking about the maintainability and reusability of your code.
$endgroup$
Don't worry about performance.
You're writing a handful of strings to the console, and it takes milliseconds. When you start writing tens of thousands of strings, and notice it taking seconds, then you can you start to look for optimizations. Until then, the cleanliness of your code is much more important.
Your function is too long.
This is a fifty-line function. It has the responsibilities of iterating through two lists in parallel, skipping spaces, parsing color names, setting the console color, writing to console, and resetting the console color when it's all done. That's a lot! Break it up into smaller functions.
Switch statements are ugly.
I don't mean that they are never appropriate, but ConsoleColor is an enum, and it's possible to parse enums (while ignoring case sensitivity). You should replace this switch statement with a function call.
Don't initialize variables until you need them.
With few exceptions, modern languages are very good about optimizing variable allocation. Putting char log = str[i] inside the loop will not result in additional memory usage, and it will save me (a potential reviewer or maintenance programmer) from having to think about that character before or after the loop.
Other tips...
You say this is practice for an interview, so it could be a good place for you to show off your knowledge of C#. With a little trouble, you could leverage Regular Expressions and LINQ to save you from manually manipulating array indexes. With a little more trouble, you could leverage IDisposable to ensure the original ForegroundColor is restored when all is said and done.
On the other hand, you could also shoot yourself in the foot attempting to do those things. If you don't honestly have in-depth knowledge about C#, it might be best just to aim for code that is as simple as possible. I think the best way to do that is to make small functions with clear names, to show you are thinking about the maintainability and reusability of your code.
answered 2 hours ago
benj2240benj2240
78618
78618
$begingroup$
Nicely said! Thank you for the great response! I would like to update my code and get feedback, what is the best way to do that? Sorry I'm, new here. Thank you!
$endgroup$
– Austin Taylor
1 hour ago
1
$begingroup$
Welcome to CodeReview! The usual rule is that you may make edits to your code until the first answer is posted. At this point, if you were to edit this question my answer would look silly. Please, feel free to post a follow-up question with your updated code, maybe linking back to this one for reference.
$endgroup$
– benj2240
48 mins ago
add a comment |
$begingroup$
Nicely said! Thank you for the great response! I would like to update my code and get feedback, what is the best way to do that? Sorry I'm, new here. Thank you!
$endgroup$
– Austin Taylor
1 hour ago
1
$begingroup$
Welcome to CodeReview! The usual rule is that you may make edits to your code until the first answer is posted. At this point, if you were to edit this question my answer would look silly. Please, feel free to post a follow-up question with your updated code, maybe linking back to this one for reference.
$endgroup$
– benj2240
48 mins ago
$begingroup$
Nicely said! Thank you for the great response! I would like to update my code and get feedback, what is the best way to do that? Sorry I'm, new here. Thank you!
$endgroup$
– Austin Taylor
1 hour ago
$begingroup$
Nicely said! Thank you for the great response! I would like to update my code and get feedback, what is the best way to do that? Sorry I'm, new here. Thank you!
$endgroup$
– Austin Taylor
1 hour ago
1
1
$begingroup$
Welcome to CodeReview! The usual rule is that you may make edits to your code until the first answer is posted. At this point, if you were to edit this question my answer would look silly. Please, feel free to post a follow-up question with your updated code, maybe linking back to this one for reference.
$endgroup$
– benj2240
48 mins ago
$begingroup$
Welcome to CodeReview! The usual rule is that you may make edits to your code until the first answer is posted. At this point, if you were to edit this question my answer would look silly. Please, feel free to post a follow-up question with your updated code, maybe linking back to this one for reference.
$endgroup$
– benj2240
48 mins ago
add a comment |
Austin Taylor is a new contributor. Be nice, and check out our Code of Conduct.
Austin Taylor is a new contributor. Be nice, and check out our Code of Conduct.
Austin Taylor is a new contributor. Be nice, and check out our Code of Conduct.
Austin Taylor 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');
);
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%2f220371%2fprints-each-letter-of-a-string-in-different-colors-c%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');
);
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');
);
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');
);
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
$begingroup$
Have you tested the code? If you have tested the code could you please provide the code that calls this function?
$endgroup$
– pacmaninbw
27 mins ago