1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
coldgirl [10]
3 years ago
11

What does getfenv() do?

Computers and Technology
2 answers:
mariarad [96]3 years ago
5 0

Answer: getfenv() is a type of function. Particually a envirotment function. for a lua coding.

Explanation: What this does it goes thourgh  line of code in a particular order.

This means. getfenv is used to get the current environment of a function. It returns a table of all the things that function has access to. You can also set the environment of a function to another environment.

Forgot to include examples of where this could be used. Although not very common uses, there are some. In the past Script Builders used getfenv to get the environment of a script, and setfenv to set the environment of a created script’s environment to a fake environment, so they couldn’t affect the real one. They could also inject custom global functions.

Not entirely sure if this uses getfenv or setfenv, but the use in Crazyman32’s AeroGameFramework is making the environment of each module have access to other modules without having to require them, and having access to remotes without having to directly reference them.

yarga [219]3 years ago
5 0

Answer: ummm, who knows

Explanation:

You might be interested in
Alice and Bob decide to communicate using NTRUEncrypt with parameters (N, p, q) = (7, 3, 29). Alice’s public key is h(x) = 3 + 1
Andrei [34K]

Answer:

Security Innovation NTRU cryptographic software invention and reference source code for NTRUEncrypt are released to public domain under CCO 1.0 license.

Invention U.S. Patent No. U.S. Issue Date U.S. Application No. U.S. Filing Date Countries

Public key cryptosystem method and apparatus 6,081,597 Jun 27, 2000 08/914,449 Aug 19, 1997 US, Japan, Canada, Australia, Israel, China, Europe

Ring-based public key cryptosystem method 6,298,137 Oct 2, 2001 09/543,708 Apr 5, 2000 US, Europe, Canada

Speed enhanced cryptographic method and apparatus 7,031,468 Apr 18, 2006 09/939,531 Aug 24, 2001 US, Europe, Canada

Explanation:

4 0
3 years ago
Objective:This assignment is designed to give you experience with thinking about algorithm analysis and performanceevaluation.Pr
wolverine [178]

Answer:

Check the explanation

Explanation:

#include<stdio.h>

/*Function to return max sum such that no two elements

are adjacent */

int FindMaxSum(int arr[], int n)

{

 int incl = arr[0];

 int excl = 0;

 int excl_new;

 int i;

 for (i = 1; i < n; i++)

 {

    /* current max excluding i */

    excl_new = (incl > excl)? incl: excl;

    /* current max including i */

    incl = excl + arr[i];

    excl = excl_new;

 }

  /* return max of incl and excl */

  return ((incl > excl)? incl : excl);

}

/* Driver program to test above function */

int main()

{

 int arr[] = {5, 5, 10, 100, 10, 5};

 printf("%d \n", FindMaxSum(arr, 6));

 getchar();

 return 0;

}

7 0
3 years ago
In your opinion is it more beneficial to have many folders or is it better to nest subfolders
Semmy [17]
I dont think it matters just as long you have all your things to work it doesnt matter if you have to tape it on your back
7 0
3 years ago
Letter Frequency Write a function that will take a string and return a count of each letter in the string. For example, "my dog
Nostrana [21]

Answer:

Check the explanation

Explanation:

Code to copy:

// ConsoleApplication7.cpp : Defines the entry point for the console application.

//

#include "stdafx.h"

#include <iostream>

#include <cstring>

#include <string>

using namespace std;

int * letterFrequency(char s[]);

int main()

{

  int *freq_letters;

  char *s = new char[100];

  freq_letters = new int[26];

  //To read the input string in order to find the frequency of each letter

  cout << "Enter a string: ";

  cin.getline(s, ' ');

  //call the function to find the occurrence of each alphabet

  freq_letters = letterFrequency(s);

  //Display the count

  cout << "Letter Frequency " << endl;

  for (int i = 0; i < 26; i++)

  {

      //Constriant to check if the letter appeared at least once in the string and so printing the frequency of its occurence

      if (freq_letters[i] != 0)

      cout << " " << static_cast<char>(i + 'a') << " " << freq_letters[i] << endl;

  }

  system("pause");

  return 0;

}

//Define the function to find occurrence of each letter in the input string

int * letterFrequency(char s[])

{

  int *occurrence_array;

//to store the output of occurrences for each alphabet

  occurrence_array = new int[26];

// to store the count of occurrence for each letter temporarily

  int letter_count;

  // for loop to check the occurrence for all 26 alphabets

 

  for (int i = 0; i < 26; i++)

  {

      letter_count = 0;

      for (int j = 0; j < strlen(s); j++)

      {

          /*comparing the ascii values of each alphabet with every character from the string by converting it to lower case i.e. case insensitive*/

          if (int('a') + i == int(tolower(s[j])))

              letter_count++;

      }

      occurrence_array[i] = letter_count;//To store the count calculated for each alphabet

  }

  return occurrence_array;

}

The following below code screenshot and output shows that when the string is entered, the output will shows each lettercount irrespective of whether the letter is in capitals or small and does not count non-letter characters (i.e spaces, punctuations etc.)

6 0
4 years ago
To illustrate a point in a Word document with a simple chart, what commands should you select?
Pavel [41]

insert -> chart - then it will open a window and on the left panel you can select the type of the chart you want.

8 0
3 years ago
Read 2 more answers
Other questions:
  • You can execute three main types of linux commands. what are they?
    8·1 answer
  • Which type of communication is usually handwriten
    11·2 answers
  • George, a user, has contacted you to complain that his issue has not been resolved. He has already contacted your department twi
    9·1 answer
  • Which one of the following characteristics or skills of a ScrumMaster are closelyaligned with coaching?Select one:
    5·1 answer
  • When you print a worksheet or use the Page Setup dialog box, Excel inserts __ breaks that show the boundaries of what will print
    7·1 answer
  • What makes these Pokémon special?
    9·2 answers
  • Scenario
    7·1 answer
  • QUESTION 10
    10·2 answers
  • Light the<br> Spark hop<br> Answer if ur a baddie;)))
    9·2 answers
  • Are there any apps in the App Store that allow people to ask a question about any topic and have skilled professionals answer it
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!