Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here

You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Stack Tech

The Stack Tech Logo The Stack Tech Logo

The Stack Tech Navigation

Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help

admin

Ask admin
0 Followers
1 Question
Home/ admin/Answers
  • About
  • Questions
  • Polls
  • Answers
  • Best Answers
  • Asked Questions
  • Groups
  • Posts
  • Comments
  • Followers Questions
  • Followers Answers
  • Followers Posts
  • Followers Comments
  1. Asked: April 26, 2022In: Language

    Deleting all files from a folder using PHP?

    admin
    Added an answer on April 26, 2022 at 10:55 am

    This code from http://php.net/unlink: /** * Delete a file or recursively delete a directory * * @param string $str Path to file or directory */ function recursiveDelete($str) { if (is_file($str)) { return @unlink($str); } elseif (is_dir($str)) { $scan = glob(rtrim($str,'/').'/*'); foreach($scan as $Read more

    This code from http://php.net/unlink:

    /**
     * Delete a file or recursively delete a directory
     *
     * @param string $str Path to file or directory
     */
    function recursiveDelete($str) {
        if (is_file($str)) {
            return @unlink($str);
        }
        elseif (is_dir($str)) {
            $scan = glob(rtrim($str,'/').'/*');
            foreach($scan as $index=>$path) {
                recursiveDelete($path);
            }
            return @rmdir($str);
        }
    }
    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  2. Asked: April 26, 2022In: Language

    Deleting all files from a folder using PHP?

    admin
    Added an answer on April 26, 2022 at 10:55 am

    If you want to delete everything from folder (including subfolders) use this combination of array_map, unlink and glob: array_map( 'unlink', array_filter((array) glob("path/to/temp/*") ) );

    If you want to delete everything from folder (including subfolders) use this combination of array_map, unlink and glob:

    array_map( ‘unlink’, array_filter((array) glob(“path/to/temp/*”) ) );

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  3. Asked: April 25, 2022In: Programming

    What is the friend keyword in C++?

    admin
    Added an answer on April 25, 2022 at 7:35 pm

    The friend keyword in C++ allows the programmer to declare friend functions and classes. class frnd{ private: void somefunc(); }; int frndFUNC(int a) {} class A{ friend class frnd; friend int frndFUNC(int a); }; Some important points about friend functions and classes: Declarations of friend functioRead more

    The friend keyword in C++ allows the programmer to declare friend functions and classes.

    class frnd{
    	private:
    		void somefunc();
    };
    
    int frndFUNC(int a) {}
    
    class A{
    	friend class frnd;
    	friend int frndFUNC(int a);
    };
    
    
    

    Some important points about friend functions and classes:

    1. Declarations of friend functions and classes are always made inside the class definition(can be anywhere either in public and private)
    2. Friend functions and classes are declared by the implementor i.e. only the class can define its friend functions and classes, a function or class cannot declare itself a friend of a class
    3. Friend classes can access the data members of the class but not vice versa i.e. Class frnd can access the data members of class A but class A cannot access members of class frnd.
    4. Friend functions are not inherited.
    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  4. Asked: April 25, 2022In: Python

    What does HttpResponse do in Django?

    admin
    Added an answer on April 25, 2022 at 7:33 pm

    The correct answer is b) Returns a string with HTML response

    The correct answer is b) Returns a string with HTML response

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  5. Asked: April 14, 2022In: Company

    Responsive solution for long URLs (that exceed the device width)

    admin
    Added an answer on April 14, 2022 at 6:15 pm

    Because your <a> tag is being displayed as block or inline-block.

    Because your <a> tag is being displayed as block or inline-block.

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  6. Asked: April 14, 2022In: Company

    Responsive solution for long URLs (that exceed the device width)

    admin
    Added an answer on April 14, 2022 at 6:15 pm

    For me the solution word-wrap: break-word did the trick only after I added a max-width to the anchor tag. Specific to my design: a {word-wrap: break-word; max-width:300px;}

    For me the solution word-wrap: break-word did the trick only after I added a max-width to the anchor tag. Specific to my design:

    a {word-wrap: break-word; max-width:300px;}

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  7. Asked: March 28, 2022In: Programming

    Select the command that installs Django?

    admin
    Added an answer on March 28, 2022 at 6:25 pm

    d) pip install Django

    d) pip install Django

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  8. Asked: March 28, 2022In: Programming

    What does HttpResponse do in Django?

    admin
    Added an answer on March 28, 2022 at 6:24 pm

    b) Returns a string with an HTML response

    b) Returns a string with an HTML response

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 14
  • Answers 13
  • Best Answers 0
  • Users 3
  • Popular
  • Answers
  • admin

    Responsive solution for long URLs (that exceed the device width)

    • 2 Answers
  • admin

    What is the friend keyword in C++?

    • 2 Answers
  • admin

    Deleting all files from a folder using PHP?

    • 2 Answers
  • Стол офисный купить Павлоград
    Стол офисный купить Павлоград added an answer Привет! Я мог бы поклясться, что уже был на этом… May 2, 2022 at 10:33 am
  • admin
    admin added an answer This code from http://php.net/unlink: /** * Delete a file or recursively… April 26, 2022 at 10:55 am
  • admin
    admin added an answer If you want to delete everything from folder (including subfolders)… April 26, 2022 at 10:55 am

Top Members

admin

admin

  • 1 Question
  • 6 Points

Trending Tags

django language python

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

The Stack Tech is a platform for discussing technical questions, and finding their answers by the tech community.

About Us

Legal Stuff

Help

Follow

Powered by Numetive