Receiving an OutOfBounds for a method that needs to build a string through recursion, not sure whyScanner cannot be resolved to a typeHow can I “delimit” an integer from a given string?Why reading byte array to an Object throws java.io.StreamCorruptedException?Java - Method executed prior to Default ConstructorKeep getting this error message for my RockPaperScissor Program. How do I fix this error?I/P-a string S.O/P: For each digit start from 0-9,print count of their occurrence in S.Print10 lines,each line contain 2 space separated integersstringbuilder in for loop with if statementWould it make any difference giving arguments using scanner class instead of command line arguments?Why does my method say it must return a type string and gives me an error even though my method does return a type string

Connect neutrals together in 3-gang box (load side) with 3x 3-way switches?

Construct a pentagon avoiding compass use

Variation in the spelling of word-final M

Why do legislative committees exist?

Possible isometry groups of open manifolds

Remove intersect line for one circle using venndiagram2sets

Why does the trade federation become so alarmed upon learning the ambassadors are Jedi Knights?

What is the closed form of the following recursive function?

I quit, and boss offered me 3 month "grace period" where I could still come back

I do not have power to all my breakers

3D-Plot with an inequality condition for parameter values

Nested-Loop-Join: How many comparisons and how many pages-accesses?

Does optical correction give a more aesthetic look to the SBI logo?

Cherries + 2% salt + 1 week at room temperature =?

Why do mean value theorems have open interval for differentiablity while closed for continuity?

Are villager price increases due to killing them temporary?

Won 50K! Now what should I do with it

How to make "plastic" sounding distored guitar

How are "soeben" and "eben" different from one another?

Why didn't Al Powell investigate the lights at the top of the building?

Can I activate an iPhone without an Apple ID?

Too many spies!

Why doesn't Anakin's lightsaber explode when it's chopped in half on Geonosis?

Is it okay to retroactively change things when running a published adventure?



Receiving an OutOfBounds for a method that needs to build a string through recursion, not sure why


Scanner cannot be resolved to a typeHow can I “delimit” an integer from a given string?Why reading byte array to an Object throws java.io.StreamCorruptedException?Java - Method executed prior to Default ConstructorKeep getting this error message for my RockPaperScissor Program. How do I fix this error?I/P-a string S.O/P: For each digit start from 0-9,print count of their occurrence in S.Print10 lines,each line contain 2 space separated integersstringbuilder in for loop with if statementWould it make any difference giving arguments using scanner class instead of command line arguments?Why does my method say it must return a type string and gives me an error even though my method does return a type string






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am creating a method my compsci class that need to fulfill this task:
"Write a recursive method called String buildWeirdString(String s) While building the ‘forward’ part of the original string, it should not keep any digits that were part of the initial string - and while building the ‘backward’ part of the original string, it should not keep any letters of the alphabet that were part of the initial input. (you should find the reverseLine() method we did in class helpful) Tiny hint for ignoring case – there is a helpful method in the Character class that will tell you if a character is a letter or not. for example,

userinput:abCD123e!$f%
would produce the output:abCDe!$f%$!321



I don't exactly know how to use the Stringbuilder class because we haven't gone over it in class yet, but it seems like it would be useful for this application, so it is very likely my error is it its usage but it very well could be anywhere else.




This task begins at Static String buildWeirdString, the rest is other already completed tasks.




 package recursionPrograms;

import java.util.*;

public class recursion

public static void main(String[] args)
Scanner s = new Scanner(System.in);
Scanner st = new Scanner(System.in);
int b = 0;
int e = 0;
String str;
String string;
// exp
System.out.println("Base: ");
b = s.nextInt();
System.out.println("Exponent: ");
e = s.nextInt();
System.out.println(recPow(b, e));
// palidrome
System.out.println("String: ");
str = st.nextLine();
System.out.println(isPalindrome(str));
//string
System.out.println("String: ");
string = st.nextLine();
System.out.println(buildWeirdString(string));


public static double recPow(int base, int exp)
if (exp == 0)
return 1;
else if (exp < 0)
return 1 / (base * recPow(base, Math.abs(exp) - 1));
else
return base * recPow(base, exp - 1);



static boolean isPalindrome(String str)
if (str.length() < 2)
return true;

if (str.charAt(0) == str.charAt(str.length() - 1))
return isPalindrome(str.substring(1, (str.length() - 1)));

return false;


static String buildWeirdString(String string)
StringBuilder stb = new StringBuilder();
StringBuilder stb2 = new StringBuilder();

if (string.length() == 0)
String rtrn = stb.toString() + stb2.reverse().toString();
return rtrn;

if (Character.isLetter(string.charAt(0)))

buildWeirdString(string.substring(1));
stb.insert(string.length() - 1,
Character.toString(string.charAt(0)));

if (!Character.isLetter(string.charAt(0)))
buildWeirdString(string.substring(1));
stb2.insert(string.length() - 1,
Character.toString(string.charAt(0)));

return null;




Desired results:
in: abc1d234
out: abcd4321



What happens:



Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 1
at java.lang.AbstractStringBuilder.insert(Unknown Source)
at java.lang.StringBuilder.insert(Unknown Source)
at recursionPrograms.recursion.buildWeirdString(recursion.java:62)
at recursionPrograms.recursion.buildWeirdString(recursion.java:61)
at recursionPrograms.recursion.buildWeirdString(recursion.java:61)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.main(recursion.java:25)









share|improve this question
























  • Your method buildWeirdString truly does what its name promises. First, the if (string.length() == 0) String rtrn = stb.toString() + stb2.reverse().toString(); return rtrn; ; since both StringBuilder instances are empty at this point, neither reversing one nor concatenating both makes any sense, the result will be just an empty string so why not return either, the argument string which you just proved to be an empty string, or just ""? Then, the only other return statement is the return null;, so regardless of what’s happening in the middle, there are only two possible results.

    – Holger
    Mar 27 at 16:57











  • But well, you’re never using the results of the recursive call anyway. The method creates two, initially empty StringBuilder instances, and if the argument is not an empty string, it does a recursive invocation, ignoring the result and trying to insert at string.length() - 1 into one of the StringBuilder instances. Since they are empty, any nonzero index will cause an exception.

    – Holger
    Mar 27 at 17:38











  • Gotcha, thank you for the help!

    – chris.macri
    Apr 3 at 15:22

















1















I am creating a method my compsci class that need to fulfill this task:
"Write a recursive method called String buildWeirdString(String s) While building the ‘forward’ part of the original string, it should not keep any digits that were part of the initial string - and while building the ‘backward’ part of the original string, it should not keep any letters of the alphabet that were part of the initial input. (you should find the reverseLine() method we did in class helpful) Tiny hint for ignoring case – there is a helpful method in the Character class that will tell you if a character is a letter or not. for example,

userinput:abCD123e!$f%
would produce the output:abCDe!$f%$!321



I don't exactly know how to use the Stringbuilder class because we haven't gone over it in class yet, but it seems like it would be useful for this application, so it is very likely my error is it its usage but it very well could be anywhere else.




This task begins at Static String buildWeirdString, the rest is other already completed tasks.




 package recursionPrograms;

import java.util.*;

public class recursion

public static void main(String[] args)
Scanner s = new Scanner(System.in);
Scanner st = new Scanner(System.in);
int b = 0;
int e = 0;
String str;
String string;
// exp
System.out.println("Base: ");
b = s.nextInt();
System.out.println("Exponent: ");
e = s.nextInt();
System.out.println(recPow(b, e));
// palidrome
System.out.println("String: ");
str = st.nextLine();
System.out.println(isPalindrome(str));
//string
System.out.println("String: ");
string = st.nextLine();
System.out.println(buildWeirdString(string));


public static double recPow(int base, int exp)
if (exp == 0)
return 1;
else if (exp < 0)
return 1 / (base * recPow(base, Math.abs(exp) - 1));
else
return base * recPow(base, exp - 1);



static boolean isPalindrome(String str)
if (str.length() < 2)
return true;

if (str.charAt(0) == str.charAt(str.length() - 1))
return isPalindrome(str.substring(1, (str.length() - 1)));

return false;


static String buildWeirdString(String string)
StringBuilder stb = new StringBuilder();
StringBuilder stb2 = new StringBuilder();

if (string.length() == 0)
String rtrn = stb.toString() + stb2.reverse().toString();
return rtrn;

if (Character.isLetter(string.charAt(0)))

buildWeirdString(string.substring(1));
stb.insert(string.length() - 1,
Character.toString(string.charAt(0)));

if (!Character.isLetter(string.charAt(0)))
buildWeirdString(string.substring(1));
stb2.insert(string.length() - 1,
Character.toString(string.charAt(0)));

return null;




Desired results:
in: abc1d234
out: abcd4321



What happens:



Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 1
at java.lang.AbstractStringBuilder.insert(Unknown Source)
at java.lang.StringBuilder.insert(Unknown Source)
at recursionPrograms.recursion.buildWeirdString(recursion.java:62)
at recursionPrograms.recursion.buildWeirdString(recursion.java:61)
at recursionPrograms.recursion.buildWeirdString(recursion.java:61)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.main(recursion.java:25)









share|improve this question
























  • Your method buildWeirdString truly does what its name promises. First, the if (string.length() == 0) String rtrn = stb.toString() + stb2.reverse().toString(); return rtrn; ; since both StringBuilder instances are empty at this point, neither reversing one nor concatenating both makes any sense, the result will be just an empty string so why not return either, the argument string which you just proved to be an empty string, or just ""? Then, the only other return statement is the return null;, so regardless of what’s happening in the middle, there are only two possible results.

    – Holger
    Mar 27 at 16:57











  • But well, you’re never using the results of the recursive call anyway. The method creates two, initially empty StringBuilder instances, and if the argument is not an empty string, it does a recursive invocation, ignoring the result and trying to insert at string.length() - 1 into one of the StringBuilder instances. Since they are empty, any nonzero index will cause an exception.

    – Holger
    Mar 27 at 17:38











  • Gotcha, thank you for the help!

    – chris.macri
    Apr 3 at 15:22













1












1








1








I am creating a method my compsci class that need to fulfill this task:
"Write a recursive method called String buildWeirdString(String s) While building the ‘forward’ part of the original string, it should not keep any digits that were part of the initial string - and while building the ‘backward’ part of the original string, it should not keep any letters of the alphabet that were part of the initial input. (you should find the reverseLine() method we did in class helpful) Tiny hint for ignoring case – there is a helpful method in the Character class that will tell you if a character is a letter or not. for example,

userinput:abCD123e!$f%
would produce the output:abCDe!$f%$!321



I don't exactly know how to use the Stringbuilder class because we haven't gone over it in class yet, but it seems like it would be useful for this application, so it is very likely my error is it its usage but it very well could be anywhere else.




This task begins at Static String buildWeirdString, the rest is other already completed tasks.




 package recursionPrograms;

import java.util.*;

public class recursion

public static void main(String[] args)
Scanner s = new Scanner(System.in);
Scanner st = new Scanner(System.in);
int b = 0;
int e = 0;
String str;
String string;
// exp
System.out.println("Base: ");
b = s.nextInt();
System.out.println("Exponent: ");
e = s.nextInt();
System.out.println(recPow(b, e));
// palidrome
System.out.println("String: ");
str = st.nextLine();
System.out.println(isPalindrome(str));
//string
System.out.println("String: ");
string = st.nextLine();
System.out.println(buildWeirdString(string));


public static double recPow(int base, int exp)
if (exp == 0)
return 1;
else if (exp < 0)
return 1 / (base * recPow(base, Math.abs(exp) - 1));
else
return base * recPow(base, exp - 1);



static boolean isPalindrome(String str)
if (str.length() < 2)
return true;

if (str.charAt(0) == str.charAt(str.length() - 1))
return isPalindrome(str.substring(1, (str.length() - 1)));

return false;


static String buildWeirdString(String string)
StringBuilder stb = new StringBuilder();
StringBuilder stb2 = new StringBuilder();

if (string.length() == 0)
String rtrn = stb.toString() + stb2.reverse().toString();
return rtrn;

if (Character.isLetter(string.charAt(0)))

buildWeirdString(string.substring(1));
stb.insert(string.length() - 1,
Character.toString(string.charAt(0)));

if (!Character.isLetter(string.charAt(0)))
buildWeirdString(string.substring(1));
stb2.insert(string.length() - 1,
Character.toString(string.charAt(0)));

return null;




Desired results:
in: abc1d234
out: abcd4321



What happens:



Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 1
at java.lang.AbstractStringBuilder.insert(Unknown Source)
at java.lang.StringBuilder.insert(Unknown Source)
at recursionPrograms.recursion.buildWeirdString(recursion.java:62)
at recursionPrograms.recursion.buildWeirdString(recursion.java:61)
at recursionPrograms.recursion.buildWeirdString(recursion.java:61)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.main(recursion.java:25)









share|improve this question
















I am creating a method my compsci class that need to fulfill this task:
"Write a recursive method called String buildWeirdString(String s) While building the ‘forward’ part of the original string, it should not keep any digits that were part of the initial string - and while building the ‘backward’ part of the original string, it should not keep any letters of the alphabet that were part of the initial input. (you should find the reverseLine() method we did in class helpful) Tiny hint for ignoring case – there is a helpful method in the Character class that will tell you if a character is a letter or not. for example,

userinput:abCD123e!$f%
would produce the output:abCDe!$f%$!321



I don't exactly know how to use the Stringbuilder class because we haven't gone over it in class yet, but it seems like it would be useful for this application, so it is very likely my error is it its usage but it very well could be anywhere else.




This task begins at Static String buildWeirdString, the rest is other already completed tasks.




 package recursionPrograms;

import java.util.*;

public class recursion

public static void main(String[] args)
Scanner s = new Scanner(System.in);
Scanner st = new Scanner(System.in);
int b = 0;
int e = 0;
String str;
String string;
// exp
System.out.println("Base: ");
b = s.nextInt();
System.out.println("Exponent: ");
e = s.nextInt();
System.out.println(recPow(b, e));
// palidrome
System.out.println("String: ");
str = st.nextLine();
System.out.println(isPalindrome(str));
//string
System.out.println("String: ");
string = st.nextLine();
System.out.println(buildWeirdString(string));


public static double recPow(int base, int exp)
if (exp == 0)
return 1;
else if (exp < 0)
return 1 / (base * recPow(base, Math.abs(exp) - 1));
else
return base * recPow(base, exp - 1);



static boolean isPalindrome(String str)
if (str.length() < 2)
return true;

if (str.charAt(0) == str.charAt(str.length() - 1))
return isPalindrome(str.substring(1, (str.length() - 1)));

return false;


static String buildWeirdString(String string)
StringBuilder stb = new StringBuilder();
StringBuilder stb2 = new StringBuilder();

if (string.length() == 0)
String rtrn = stb.toString() + stb2.reverse().toString();
return rtrn;

if (Character.isLetter(string.charAt(0)))

buildWeirdString(string.substring(1));
stb.insert(string.length() - 1,
Character.toString(string.charAt(0)));

if (!Character.isLetter(string.charAt(0)))
buildWeirdString(string.substring(1));
stb2.insert(string.length() - 1,
Character.toString(string.charAt(0)));

return null;




Desired results:
in: abc1d234
out: abcd4321



What happens:



Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 1
at java.lang.AbstractStringBuilder.insert(Unknown Source)
at java.lang.StringBuilder.insert(Unknown Source)
at recursionPrograms.recursion.buildWeirdString(recursion.java:62)
at recursionPrograms.recursion.buildWeirdString(recursion.java:61)
at recursionPrograms.recursion.buildWeirdString(recursion.java:61)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.buildWeirdString(recursion.java:57)
at recursionPrograms.recursion.main(recursion.java:25)






java recursion stringbuilder






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 26 at 6:27









Patrick Parker

3,5582 gold badges10 silver badges35 bronze badges




3,5582 gold badges10 silver badges35 bronze badges










asked Mar 26 at 1:37









chris.macrichris.macri

61 bronze badge




61 bronze badge












  • Your method buildWeirdString truly does what its name promises. First, the if (string.length() == 0) String rtrn = stb.toString() + stb2.reverse().toString(); return rtrn; ; since both StringBuilder instances are empty at this point, neither reversing one nor concatenating both makes any sense, the result will be just an empty string so why not return either, the argument string which you just proved to be an empty string, or just ""? Then, the only other return statement is the return null;, so regardless of what’s happening in the middle, there are only two possible results.

    – Holger
    Mar 27 at 16:57











  • But well, you’re never using the results of the recursive call anyway. The method creates two, initially empty StringBuilder instances, and if the argument is not an empty string, it does a recursive invocation, ignoring the result and trying to insert at string.length() - 1 into one of the StringBuilder instances. Since they are empty, any nonzero index will cause an exception.

    – Holger
    Mar 27 at 17:38











  • Gotcha, thank you for the help!

    – chris.macri
    Apr 3 at 15:22

















  • Your method buildWeirdString truly does what its name promises. First, the if (string.length() == 0) String rtrn = stb.toString() + stb2.reverse().toString(); return rtrn; ; since both StringBuilder instances are empty at this point, neither reversing one nor concatenating both makes any sense, the result will be just an empty string so why not return either, the argument string which you just proved to be an empty string, or just ""? Then, the only other return statement is the return null;, so regardless of what’s happening in the middle, there are only two possible results.

    – Holger
    Mar 27 at 16:57











  • But well, you’re never using the results of the recursive call anyway. The method creates two, initially empty StringBuilder instances, and if the argument is not an empty string, it does a recursive invocation, ignoring the result and trying to insert at string.length() - 1 into one of the StringBuilder instances. Since they are empty, any nonzero index will cause an exception.

    – Holger
    Mar 27 at 17:38











  • Gotcha, thank you for the help!

    – chris.macri
    Apr 3 at 15:22
















Your method buildWeirdString truly does what its name promises. First, the if (string.length() == 0) String rtrn = stb.toString() + stb2.reverse().toString(); return rtrn; ; since both StringBuilder instances are empty at this point, neither reversing one nor concatenating both makes any sense, the result will be just an empty string so why not return either, the argument string which you just proved to be an empty string, or just ""? Then, the only other return statement is the return null;, so regardless of what’s happening in the middle, there are only two possible results.

– Holger
Mar 27 at 16:57





Your method buildWeirdString truly does what its name promises. First, the if (string.length() == 0) String rtrn = stb.toString() + stb2.reverse().toString(); return rtrn; ; since both StringBuilder instances are empty at this point, neither reversing one nor concatenating both makes any sense, the result will be just an empty string so why not return either, the argument string which you just proved to be an empty string, or just ""? Then, the only other return statement is the return null;, so regardless of what’s happening in the middle, there are only two possible results.

– Holger
Mar 27 at 16:57













But well, you’re never using the results of the recursive call anyway. The method creates two, initially empty StringBuilder instances, and if the argument is not an empty string, it does a recursive invocation, ignoring the result and trying to insert at string.length() - 1 into one of the StringBuilder instances. Since they are empty, any nonzero index will cause an exception.

– Holger
Mar 27 at 17:38





But well, you’re never using the results of the recursive call anyway. The method creates two, initially empty StringBuilder instances, and if the argument is not an empty string, it does a recursive invocation, ignoring the result and trying to insert at string.length() - 1 into one of the StringBuilder instances. Since they are empty, any nonzero index will cause an exception.

– Holger
Mar 27 at 17:38













Gotcha, thank you for the help!

– chris.macri
Apr 3 at 15:22





Gotcha, thank you for the help!

– chris.macri
Apr 3 at 15:22












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: "1"
;
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55348669%2freceiving-an-outofbounds-for-a-method-that-needs-to-build-a-string-through-recur%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




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • 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.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55348669%2freceiving-an-outofbounds-for-a-method-that-needs-to-build-a-string-through-recur%23new-answer', 'question_page');

);

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







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript