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
Anastaziya [24]
2 years ago
12

State and give reason, if the following variables are valid/invalid:

Computers and Technology
1 answer:
rodikova [14]2 years ago
4 0

Answer:

See Explanation

Explanation:

Variable: daysInYear

Valid/Invalid: Valid

Reason: It begins with a letter; it is not a keyword, and it does not contain a hyphen

Variable: 4numberFiles

Valid/Invalid: Invalid

Reason: It begins with a number

Variable: Combination-month_game

Valid/Invalid: Invalid

Reason: It contains a hyphen

Variable: Suncity.school sec54

Valid/Invalid: Invalid

Reason: It contains a dot and it contains space

You might be interested in
Gian wants to add audio to his presentation whichaude ves not supported
Soloha48 [4]

Answer:

TIFF file is not audio format file rather it is graphic container that stores raster images.

Explanation:

Gain can add all other audio files (MIDI, MP3, Windows media audio file) to his presentation.

What are MIDI, MP3 and WMA :

MIDI:

Musical Instrument Digital Interface (MIDI) is a protocol that is designed for recording and playback music on digital synthesizers that is supported by many computer sound cards. Gian can add MIDI audio format file in his presentation.

MP3:

This audio file format technology compress a sound technology into very small file while preserving the original quality of sound when it is played. Gian can add this audio format in presentation to play audio in presentation.

WMA

This audio format is developed by Microsoft. It contains a series of audio codecs and their corresponding audio formats.

Gian can add WMA extension audio file to his presentation to play audio.

3 0
3 years ago
What is another term for additive manufacturing
Ira Lisetskai [31]

Answer:

Contact Us. Additive manufacturing (AM) or additive layer manufacturing (ALM) is the industrial production name for 3D printing, a computer controlled process that creates three dimensional objects by depositing materials, usually in layers.

Explanation:

6 0
3 years ago
What is the real meaning of hack and crack?
vovangra [49]
Hack means hack computer and crack means I guess your behind
7 0
3 years ago
Which of the threats discussed in this chapter should receive Charlie’s attention early in his planning process?Ethical Decision
ratelena [41]

Answer:

Explanation:

1. Before the discussion at the start of this chapter, how do Fred, Gladys, and Charlie each perceive the scope and scale of the new information security effort? Did Fred’s perception change after that?

Answer:

Before the discussion, Fred, Gladys, and Charlie focused on other ends in regards to information security. Fred was more concerned with adding additional software to fix the malware issues when clearly there were easier steps that need to be taken

2. How should Fred measure success when he evaluates Gladys’ performance for this project? How should he evaluate Charlie’s performance?

Answer:

Gladys’s performance should be based on the new security measures and protocol that she has in place for the organization. This of course, is putting a lot of trust into Charlie’s performance as she was the one to introduce Charlie with his new plan on the organization’s new security. She practically had him nominated for CIO.

3. Which of the threats discussed in this chapter should receive Charlie’s attention early in his planning process?

Answer:

Before considering outside threats, internal threats should be looked into early in the planning process. Internal threats does not necessarily mean that the employees have malicious intent, but the case of human error and failure can also be a negative contribution to cyber security. Creating a security program and education end users by creating a security policy guidance is one of the the best ways to prevent simple cyber security issues from starting

Instead of Charlie being named CISO, suppose instead that Fred hired his son-in-law, an unemployed accountant, to fill the role. Assuming the person had no prior experience or preparation for a job in information security, did Fred make an ethical choice? Explain your answer.

Answer:

Absolutely not! By hiring an unexperienced family member over a trained professional, Fred is letting his emotions get the better of him. Fred should consult with Gladys on whether his son-in-law is good candidate for the position or not. Rather than sacrifice company security, Fred could possibly find his son-in-law a position in the companies’ financial or human resources departments.

8 0
3 years ago
Given a string variable string 's;', implement a tokenizer to identify the unique tokens contained in this string, identify all
Flauer [41]

Answer:

#include <iostream>

#include <string>

#include <vector>

#include <cctype>

#include <algorithm>

using namespace std;

void matrixInit( vector< vector<int> >& matrix, int numRows, int numCols);

struct TokenFreq{

string token;

int freq;

};

string spaces(string& istr, string& newstr);

void printVector(vector<TokenFreq> & tfVec);

void getTokenFreqVec( string& istr, vector<TokenFreq> & tfVecVec);

void selectionSort( vector<TokenFreq> & tokFreqVector );  

void insertionSort( vector<TokenFreq> & tokFreqVector );

//main

int main(int argc, const char * argv[]) {

 

vector<vector<int> > matrix;

matrixInit(matrix, 3, 4);

 

string ostr1 = " I do keep the main points straight in my head most of the time, and I do know where to find the details when I need them. by Bjarne Stroustrup";

string ostr2 = " ";

string ostr3 = "Your time is limited, so don’t waste it living someone else’s life.Stay Hungry. Stay Foolish.";

//string ostr = ostr2;

string istr;

 

cout << "Enter the text: ";

getline(cin, istr);

vector<TokenFreq> tfVec;

getTokenFreqVec(istr, tfVec);

selectionSort(tfVec);

insertionSort(tfVec);

return 0;

}

//-----

void selectionSort( vector<TokenFreq> & tokFreqVector ){

TokenFreq temp;

int min;

 

for( int i = 0; i < int(tokFreqVector.size()-1); i++){

min = i;

for (int j = i+1; j <int(tokFreqVector.size()); j++){

if (tokFreqVector[j].freq < tokFreqVector[min].freq)

min = j;

}

if(min!=i)

{

temp = tokFreqVector[i];

tokFreqVector[i] = tokFreqVector[min];

tokFreqVector[min] = temp;

}

}

cout<<"-----selectionSort------------------"<<endl;

printVector(tokFreqVector);

}

void insertionSort( vector<TokenFreq> & tokFreqVector ){

TokenFreq temp;

int max;

 

for( int i = 0; i < int(tokFreqVector.size()-1); i++){

max = i;

for (int j = i+1; j < int(tokFreqVector.size()); j++){

if (tokFreqVector[j].freq > tokFreqVector[max].freq)

max = j;

}

if(max!=i)

{

temp = tokFreqVector[i];

tokFreqVector[i] = tokFreqVector[max];

tokFreqVector[max] = temp;

}

}

cout<<"-----insertionsort------------------"<<endl;

printVector(tokFreqVector);

}

string spaces(string& istr, string & newstr){

int j;

//Check double space and create new string with lowercase

for (int i = 0; i < int(istr.length()); ++i){

istr[i] = tolower(istr[i]);

if (isspace(istr[i])){

//check double space again

j = i+1;

while(true){

if (istr[j] == '\342') istr[j]=' ';

if (istr[j] == '\200') istr[j]=' ';

if (istr[j] == '\224') istr[j]=' ';

if(isspace(istr[j])) j++;

else break;

}

i=j-1;

newstr = newstr + istr[i];

}else

newstr = newstr + istr[i];

}

return newstr;

}

void getTokenFreqVec( string& istr, vector<TokenFreq> & tfVec){

string newstr;

int curr_beg = 0;

int curr_end = 0;

string word;

bool check = false;

int index=0;

 

//call func spaces to get new string

newstr = spaces(istr, newstr);

//cout << newstr << endl;

//cout << endl;

//cout << newstr << "||" << endl;

string tempstr = newstr;

 

if(newstr != " "){

tfVec.push_back(TokenFreq());

}

for (int i = 0; i < int(newstr.length()); ++i){

if(isspace(newstr[i])){

check = false;

 

curr_end = i;

word = tempstr.substr(curr_beg, curr_end - curr_beg);

curr_beg = i + 1;

 

for (int j = 0; j < int(tfVec.size()); j++){

if (tfVec[j].token == word){

tfVec[j].freq++;

check = true;

 

break;

}

}//end-for;

if (check == false && i!=(int(newstr.length())-1)){

//cout <<"**"<< word <<"**"<<word.length()<< endl;

tfVec[index].token=word;

tfVec[index].freq=1;

index++;

tfVec.push_back(TokenFreq());

}

word = "";

//add last value

}

}//end-for

 

if(!isspace(newstr[int(newstr.length())-1])){

word = tempstr.substr(curr_beg, curr_end - (int(newstr.length())-1));

tfVec[index].token=word;

tfVec[index].freq=1;

//tfVec.push_back(TokenFreq());

}

 

printVector(tfVec);

}

void printVector(vector<TokenFreq> & tfVec){

 

cout << "size= {" << tfVec.size() << endl;

for (int i = 0; i < int(tfVec.size()); i++){

cout << " [" << i << "] = (token = \""<< tfVec[i].token <<"\", freq = " << tfVec[i].freq << ")" << endl;

//cout << tfVec[i].token<<endl;;

}

cout << endl;

}

void matrixInit( vector< vector<int> >& matrix, int numRows, int numCols){

int i;

int j;

matrix.resize(numRows, vector<int>(numCols) );

for(i = 0; i< numRows; i++ ){

for(j = 0; j < numCols; j++ )

matrix[i][j] = i*j;

}

 

cout << "size of matrix is: " << numRows << "x" << numCols << endl;

for (i = 0; i < numRows; i++){

for (j = 0; j < numCols; j++){

cout<< "matrix[" << i << "][" << i << "]=" << matrix[i][j] << endl;

}

}

cout << endl;

}

Explanation:

3 0
3 years ago
Other questions:
  • Is anyone else experiencing the wording::nonifacation::glitch about the "5 hours ago" thingy to whenever you answer a question o
    7·2 answers
  • What does zooming do? A. Changes your view of the Frame Editor to be closer or farther away B. Changes your view of the Event Ed
    12·1 answer
  • What is the difference between a sequential program and an event-driven program?
    9·1 answer
  • Encapsulation is the process of “packaging” information prior to transmitting it from one location to another. true or false
    14·1 answer
  • A(n) _____ is money paid for work.<br><br> A. raise <br> B. allowance<br> C. wage<br> D. grant
    14·2 answers
  • as measuring the current, the shunt resistance of a galvanometer is needed to be zero. so why don't we put a wire parallel to th
    9·1 answer
  • a) Before writing any code, you should go through a design process. Try to do so carefully – either follow a top-down approach,
    15·1 answer
  • Llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
    7·1 answer
  • An information system is the set of steps that needs to be followed to ensure that software development proceeds in an orderly f
    13·1 answer
  • What is problem scoping
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!