JAVA command line: “file not found exception” when I enter two-words-long command? (when I enter one-word-command, it works fine.)How do I parse command line arguments in Java?Noob question, passing in a file name / directory into command line in JavaHow to read a large text file line by line using Java?order by not working in javaWorking on a java based chatting application using threadingjava command line compilationHow do I write a code template for eclipse?Would it make any difference giving arguments using scanner class instead of command line arguments?run java program in terminal through command linejava exception - why does it catch?

What is the difference between singing and speaking?

Can I summon an otherworldly creature with the Gate spell without knowing its true name?

Which European Languages are not Indo-European?

Why would Ryanair allow me to book this journey through a third party, but not through their own website?

Defining the standard model of PA so that a space alien could understand

What is a Power on Reset IC?

I know that there is a preselected candidate for a position to be filled at my department. What should I do?

Alternatives to achieve certain output format

Why did Jon Snow do this immoral act if he is so honorable?

What does $!# mean in Shell scripting?

USPS Back Room - Trespassing?

Specific alignment within beginalign environment

Is it truly impossible to tell what a CPU is doing?

Can I connect my older mathematica front-end to the free wolfram engine?

Pirate democracy at its finest

My employer faked my resume to acquire projects

Why does Mjolnir fall down in Age of Ultron but not in Endgame?

Do I need full recovery mode when I have multiple daily backup?

How should I introduce map drawing to my players?

Is there an online tool which supports shared writing?

Why most published works in medical imaging try reducing false positives?

How to patch glass cuts in a bicycle tire?

Can the product of any two aperiodic functions which are defined on the entire number line be periodic?

How to let other coworkers know that I don't share my coworker's political views?



JAVA command line: “file not found exception” when I enter two-words-long command? (when I enter one-word-command, it works fine.)


How do I parse command line arguments in Java?Noob question, passing in a file name / directory into command line in JavaHow to read a large text file line by line using Java?order by not working in javaWorking on a java based chatting application using threadingjava command line compilationHow do I write a code template for eclipse?Would it make any difference giving arguments using scanner class instead of command line arguments?run java program in terminal through command linejava exception - why does it catch?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















my code aims to provide 1) simple, and 2) detailed type answers to a command that I type on Mac command line, depending on the command that I enter (I want to distinguish by the number of words I enter, however, the command line only executes for one-word-long command, and throws the exception for two-words-long command).



When I enter java <filename> <input>, I want it to produce a simple version, which I programmed, and when I enter java <filename> --verbose <input>, I want it to produce a detailed version, which I have also programmed.



The simple version works fine, but the detailed version throws an error, indicating the error involves scanner. Here is the snippet of the code (just for the reference. Here is the command line output.



public class Test 
public static Scanner scan;
public static void main(String args[])
//To check the length of args --> I take "check" array as an input for my method "eachCycleFCFS".
for (int a = 0; a < args.length; a++)
check.add(args[a]);

try
String fileAddress = args[0];
File fileInput = new File(fileAddress); //Read
scan = new Scanner(fileInput);
int numProcesses = scan.nextInt();
...
for (int m = 0; m < numProcesses; m++)
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
int io = scan.nextInt();
...



catch (Exception e)
e.printStackTrace();
System.out.printf(" Error: File not foundd. n");


public static void eachCycleFCFS (Queue<Process> processes, int numProcesses, Process[] allProcesses, Process[] original, Process[] realOriginal, ArrayList<String> check)
File fileInput = new File("random-numbers.txt");
Scanner randomInput = null;
try
randomInput = new Scanner(fileInput);
catch (FileNotFoundException e)
// TODO Auto-generated catch block
e.printStackTrace();


if (check.size() == 2)
if (check.get(0).contains("verbose"))
//Produce the detailed output


else
//Produce the simple output

while (terminatedProcesses != numProcesses)
if (check.size() == 2)
if (check.get(0).equals("--verbose"))
//Produce the detailed output








For the one-word-long command, the code should produce the simple output that I programmed. For the two-word-long command, the code should produce one more block of information on top of the simple output.
The simple version is fine.
The detailed version says this:



blahblahblah$ java Scheduling2 --verbose input-1.txt
java.io.FileNotFoundException: --verbose (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.util.Scanner.<init>(Scanner.java:611)
at Scheduling2.main(Scheduling2.java:18)
Error: File not found.


Thank you for your help and let me know if I can add more information to make it easier for you, please :)!










share|improve this question
























  • Oh I get what you mean.. it is because I name every argument as "fileaddress". Do you know how I can modify my code? I have no idea how to fix this issue... and thank you for picking it out! really helps.

    – Alex Kang
    Mar 24 at 3:03






  • 1





    If your command line will contain a argument that happens to be a string which contains whitespaces then enclose that argument in Quotation Marks ("My Command", myOtherCommand, "And Yet another Command").

    – DevilsHnd
    Mar 24 at 3:10











  • check.get(0).contains("verbose") first of all, according to your example the first argument (0) is always the filename and secondly what if the filename contains the word "verbose"? So this code is double bad. May I suggest you start by doing some proper validation of the program arguments so you from the start knows what you have and preferable assigning each argument to its own variable like String filename and boolean isVerbose and pass them as arguments to other methods when needed instead of being dependent of the order of items in an array which leads to very fragile code .

    – Joakim Danielson
    Mar 24 at 9:11


















0















my code aims to provide 1) simple, and 2) detailed type answers to a command that I type on Mac command line, depending on the command that I enter (I want to distinguish by the number of words I enter, however, the command line only executes for one-word-long command, and throws the exception for two-words-long command).



When I enter java <filename> <input>, I want it to produce a simple version, which I programmed, and when I enter java <filename> --verbose <input>, I want it to produce a detailed version, which I have also programmed.



The simple version works fine, but the detailed version throws an error, indicating the error involves scanner. Here is the snippet of the code (just for the reference. Here is the command line output.



public class Test 
public static Scanner scan;
public static void main(String args[])
//To check the length of args --> I take "check" array as an input for my method "eachCycleFCFS".
for (int a = 0; a < args.length; a++)
check.add(args[a]);

try
String fileAddress = args[0];
File fileInput = new File(fileAddress); //Read
scan = new Scanner(fileInput);
int numProcesses = scan.nextInt();
...
for (int m = 0; m < numProcesses; m++)
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
int io = scan.nextInt();
...



catch (Exception e)
e.printStackTrace();
System.out.printf(" Error: File not foundd. n");


public static void eachCycleFCFS (Queue<Process> processes, int numProcesses, Process[] allProcesses, Process[] original, Process[] realOriginal, ArrayList<String> check)
File fileInput = new File("random-numbers.txt");
Scanner randomInput = null;
try
randomInput = new Scanner(fileInput);
catch (FileNotFoundException e)
// TODO Auto-generated catch block
e.printStackTrace();


if (check.size() == 2)
if (check.get(0).contains("verbose"))
//Produce the detailed output


else
//Produce the simple output

while (terminatedProcesses != numProcesses)
if (check.size() == 2)
if (check.get(0).equals("--verbose"))
//Produce the detailed output








For the one-word-long command, the code should produce the simple output that I programmed. For the two-word-long command, the code should produce one more block of information on top of the simple output.
The simple version is fine.
The detailed version says this:



blahblahblah$ java Scheduling2 --verbose input-1.txt
java.io.FileNotFoundException: --verbose (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.util.Scanner.<init>(Scanner.java:611)
at Scheduling2.main(Scheduling2.java:18)
Error: File not found.


Thank you for your help and let me know if I can add more information to make it easier for you, please :)!










share|improve this question
























  • Oh I get what you mean.. it is because I name every argument as "fileaddress". Do you know how I can modify my code? I have no idea how to fix this issue... and thank you for picking it out! really helps.

    – Alex Kang
    Mar 24 at 3:03






  • 1





    If your command line will contain a argument that happens to be a string which contains whitespaces then enclose that argument in Quotation Marks ("My Command", myOtherCommand, "And Yet another Command").

    – DevilsHnd
    Mar 24 at 3:10











  • check.get(0).contains("verbose") first of all, according to your example the first argument (0) is always the filename and secondly what if the filename contains the word "verbose"? So this code is double bad. May I suggest you start by doing some proper validation of the program arguments so you from the start knows what you have and preferable assigning each argument to its own variable like String filename and boolean isVerbose and pass them as arguments to other methods when needed instead of being dependent of the order of items in an array which leads to very fragile code .

    – Joakim Danielson
    Mar 24 at 9:11














0












0








0








my code aims to provide 1) simple, and 2) detailed type answers to a command that I type on Mac command line, depending on the command that I enter (I want to distinguish by the number of words I enter, however, the command line only executes for one-word-long command, and throws the exception for two-words-long command).



When I enter java <filename> <input>, I want it to produce a simple version, which I programmed, and when I enter java <filename> --verbose <input>, I want it to produce a detailed version, which I have also programmed.



The simple version works fine, but the detailed version throws an error, indicating the error involves scanner. Here is the snippet of the code (just for the reference. Here is the command line output.



public class Test 
public static Scanner scan;
public static void main(String args[])
//To check the length of args --> I take "check" array as an input for my method "eachCycleFCFS".
for (int a = 0; a < args.length; a++)
check.add(args[a]);

try
String fileAddress = args[0];
File fileInput = new File(fileAddress); //Read
scan = new Scanner(fileInput);
int numProcesses = scan.nextInt();
...
for (int m = 0; m < numProcesses; m++)
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
int io = scan.nextInt();
...



catch (Exception e)
e.printStackTrace();
System.out.printf(" Error: File not foundd. n");


public static void eachCycleFCFS (Queue<Process> processes, int numProcesses, Process[] allProcesses, Process[] original, Process[] realOriginal, ArrayList<String> check)
File fileInput = new File("random-numbers.txt");
Scanner randomInput = null;
try
randomInput = new Scanner(fileInput);
catch (FileNotFoundException e)
// TODO Auto-generated catch block
e.printStackTrace();


if (check.size() == 2)
if (check.get(0).contains("verbose"))
//Produce the detailed output


else
//Produce the simple output

while (terminatedProcesses != numProcesses)
if (check.size() == 2)
if (check.get(0).equals("--verbose"))
//Produce the detailed output








For the one-word-long command, the code should produce the simple output that I programmed. For the two-word-long command, the code should produce one more block of information on top of the simple output.
The simple version is fine.
The detailed version says this:



blahblahblah$ java Scheduling2 --verbose input-1.txt
java.io.FileNotFoundException: --verbose (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.util.Scanner.<init>(Scanner.java:611)
at Scheduling2.main(Scheduling2.java:18)
Error: File not found.


Thank you for your help and let me know if I can add more information to make it easier for you, please :)!










share|improve this question
















my code aims to provide 1) simple, and 2) detailed type answers to a command that I type on Mac command line, depending on the command that I enter (I want to distinguish by the number of words I enter, however, the command line only executes for one-word-long command, and throws the exception for two-words-long command).



When I enter java <filename> <input>, I want it to produce a simple version, which I programmed, and when I enter java <filename> --verbose <input>, I want it to produce a detailed version, which I have also programmed.



The simple version works fine, but the detailed version throws an error, indicating the error involves scanner. Here is the snippet of the code (just for the reference. Here is the command line output.



public class Test 
public static Scanner scan;
public static void main(String args[])
//To check the length of args --> I take "check" array as an input for my method "eachCycleFCFS".
for (int a = 0; a < args.length; a++)
check.add(args[a]);

try
String fileAddress = args[0];
File fileInput = new File(fileAddress); //Read
scan = new Scanner(fileInput);
int numProcesses = scan.nextInt();
...
for (int m = 0; m < numProcesses; m++)
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
int io = scan.nextInt();
...



catch (Exception e)
e.printStackTrace();
System.out.printf(" Error: File not foundd. n");


public static void eachCycleFCFS (Queue<Process> processes, int numProcesses, Process[] allProcesses, Process[] original, Process[] realOriginal, ArrayList<String> check)
File fileInput = new File("random-numbers.txt");
Scanner randomInput = null;
try
randomInput = new Scanner(fileInput);
catch (FileNotFoundException e)
// TODO Auto-generated catch block
e.printStackTrace();


if (check.size() == 2)
if (check.get(0).contains("verbose"))
//Produce the detailed output


else
//Produce the simple output

while (terminatedProcesses != numProcesses)
if (check.size() == 2)
if (check.get(0).equals("--verbose"))
//Produce the detailed output








For the one-word-long command, the code should produce the simple output that I programmed. For the two-word-long command, the code should produce one more block of information on top of the simple output.
The simple version is fine.
The detailed version says this:



blahblahblah$ java Scheduling2 --verbose input-1.txt
java.io.FileNotFoundException: --verbose (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.util.Scanner.<init>(Scanner.java:611)
at Scheduling2.main(Scheduling2.java:18)
Error: File not found.


Thank you for your help and let me know if I can add more information to make it easier for you, please :)!







java terminal system






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 24 at 8:46









Mr Lister

36k1078121




36k1078121










asked Mar 24 at 2:42









Alex KangAlex Kang

75




75












  • Oh I get what you mean.. it is because I name every argument as "fileaddress". Do you know how I can modify my code? I have no idea how to fix this issue... and thank you for picking it out! really helps.

    – Alex Kang
    Mar 24 at 3:03






  • 1





    If your command line will contain a argument that happens to be a string which contains whitespaces then enclose that argument in Quotation Marks ("My Command", myOtherCommand, "And Yet another Command").

    – DevilsHnd
    Mar 24 at 3:10











  • check.get(0).contains("verbose") first of all, according to your example the first argument (0) is always the filename and secondly what if the filename contains the word "verbose"? So this code is double bad. May I suggest you start by doing some proper validation of the program arguments so you from the start knows what you have and preferable assigning each argument to its own variable like String filename and boolean isVerbose and pass them as arguments to other methods when needed instead of being dependent of the order of items in an array which leads to very fragile code .

    – Joakim Danielson
    Mar 24 at 9:11


















  • Oh I get what you mean.. it is because I name every argument as "fileaddress". Do you know how I can modify my code? I have no idea how to fix this issue... and thank you for picking it out! really helps.

    – Alex Kang
    Mar 24 at 3:03






  • 1





    If your command line will contain a argument that happens to be a string which contains whitespaces then enclose that argument in Quotation Marks ("My Command", myOtherCommand, "And Yet another Command").

    – DevilsHnd
    Mar 24 at 3:10











  • check.get(0).contains("verbose") first of all, according to your example the first argument (0) is always the filename and secondly what if the filename contains the word "verbose"? So this code is double bad. May I suggest you start by doing some proper validation of the program arguments so you from the start knows what you have and preferable assigning each argument to its own variable like String filename and boolean isVerbose and pass them as arguments to other methods when needed instead of being dependent of the order of items in an array which leads to very fragile code .

    – Joakim Danielson
    Mar 24 at 9:11

















Oh I get what you mean.. it is because I name every argument as "fileaddress". Do you know how I can modify my code? I have no idea how to fix this issue... and thank you for picking it out! really helps.

– Alex Kang
Mar 24 at 3:03





Oh I get what you mean.. it is because I name every argument as "fileaddress". Do you know how I can modify my code? I have no idea how to fix this issue... and thank you for picking it out! really helps.

– Alex Kang
Mar 24 at 3:03




1




1





If your command line will contain a argument that happens to be a string which contains whitespaces then enclose that argument in Quotation Marks ("My Command", myOtherCommand, "And Yet another Command").

– DevilsHnd
Mar 24 at 3:10





If your command line will contain a argument that happens to be a string which contains whitespaces then enclose that argument in Quotation Marks ("My Command", myOtherCommand, "And Yet another Command").

– DevilsHnd
Mar 24 at 3:10













check.get(0).contains("verbose") first of all, according to your example the first argument (0) is always the filename and secondly what if the filename contains the word "verbose"? So this code is double bad. May I suggest you start by doing some proper validation of the program arguments so you from the start knows what you have and preferable assigning each argument to its own variable like String filename and boolean isVerbose and pass them as arguments to other methods when needed instead of being dependent of the order of items in an array which leads to very fragile code .

– Joakim Danielson
Mar 24 at 9:11






check.get(0).contains("verbose") first of all, according to your example the first argument (0) is always the filename and secondly what if the filename contains the word "verbose"? So this code is double bad. May I suggest you start by doing some proper validation of the program arguments so you from the start knows what you have and preferable assigning each argument to its own variable like String filename and boolean isVerbose and pass them as arguments to other methods when needed instead of being dependent of the order of items in an array which leads to very fragile code .

– Joakim Danielson
Mar 24 at 9:11













1 Answer
1






active

oldest

votes


















0














Thing is you always take filename from your fist argument:



String fileAddress = args[0];
File fileInput = new File(fileAddress); //Read


But in this case your first argument (e.g. args[0]) is "--verbose". So new File("--verbose") fails with FileNotFoundException, because indeed file "--verbose" doesn't exist in current directory.



What you probably want to do there is skip arguments that start with --, e.g.



int argNum = 0;
while(argNum<args.length && args[argNum].startsWith("--"))
argNum++;

if(!(argNum < args.length))
throw new IllegalArgumentException("Please pass file path in parameters");

String fileAddress = args[argNum];
File fileInput = new File(fileAddress); //Read





share|improve this answer























    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%2f55320295%2fjava-command-line-file-not-found-exception-when-i-enter-two-words-long-comman%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









    0














    Thing is you always take filename from your fist argument:



    String fileAddress = args[0];
    File fileInput = new File(fileAddress); //Read


    But in this case your first argument (e.g. args[0]) is "--verbose". So new File("--verbose") fails with FileNotFoundException, because indeed file "--verbose" doesn't exist in current directory.



    What you probably want to do there is skip arguments that start with --, e.g.



    int argNum = 0;
    while(argNum<args.length && args[argNum].startsWith("--"))
    argNum++;

    if(!(argNum < args.length))
    throw new IllegalArgumentException("Please pass file path in parameters");

    String fileAddress = args[argNum];
    File fileInput = new File(fileAddress); //Read





    share|improve this answer



























      0














      Thing is you always take filename from your fist argument:



      String fileAddress = args[0];
      File fileInput = new File(fileAddress); //Read


      But in this case your first argument (e.g. args[0]) is "--verbose". So new File("--verbose") fails with FileNotFoundException, because indeed file "--verbose" doesn't exist in current directory.



      What you probably want to do there is skip arguments that start with --, e.g.



      int argNum = 0;
      while(argNum<args.length && args[argNum].startsWith("--"))
      argNum++;

      if(!(argNum < args.length))
      throw new IllegalArgumentException("Please pass file path in parameters");

      String fileAddress = args[argNum];
      File fileInput = new File(fileAddress); //Read





      share|improve this answer

























        0












        0








        0







        Thing is you always take filename from your fist argument:



        String fileAddress = args[0];
        File fileInput = new File(fileAddress); //Read


        But in this case your first argument (e.g. args[0]) is "--verbose". So new File("--verbose") fails with FileNotFoundException, because indeed file "--verbose" doesn't exist in current directory.



        What you probably want to do there is skip arguments that start with --, e.g.



        int argNum = 0;
        while(argNum<args.length && args[argNum].startsWith("--"))
        argNum++;

        if(!(argNum < args.length))
        throw new IllegalArgumentException("Please pass file path in parameters");

        String fileAddress = args[argNum];
        File fileInput = new File(fileAddress); //Read





        share|improve this answer













        Thing is you always take filename from your fist argument:



        String fileAddress = args[0];
        File fileInput = new File(fileAddress); //Read


        But in this case your first argument (e.g. args[0]) is "--verbose". So new File("--verbose") fails with FileNotFoundException, because indeed file "--verbose" doesn't exist in current directory.



        What you probably want to do there is skip arguments that start with --, e.g.



        int argNum = 0;
        while(argNum<args.length && args[argNum].startsWith("--"))
        argNum++;

        if(!(argNum < args.length))
        throw new IllegalArgumentException("Please pass file path in parameters");

        String fileAddress = args[argNum];
        File fileInput = new File(fileAddress); //Read






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 24 at 8:59









        mvmnmvmn

        1,8941625




        1,8941625





























            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%2f55320295%2fjava-command-line-file-not-found-exception-when-i-enter-two-words-long-comman%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