In python
1.4. Write To a Text File Create a function that writes to a text file whatever data the user enters via keyboard. The user will first be asked to give the filename. Keep asking the user to enter data until they type Return without entering text. If the text file already exists then the data entered by the user is appended to the existing text file. The file you will write to will be named write_to_text_file.txt. Function name: create_text_file() Parameters/arguments: a filename Returns: 1 if a new text file was created, 0 if an existing text file was appended to
In: Computer Science
Point out the security risks involved in allowing fragmented packets to pass through a firewall, and note how to mitigate this threat by preventing fragmented packets altogether.
In: Computer Science
SecDevOps - Over the past 5–10 years there has been a shift in product and service development to use more agile methodologies to provide more continuous delivery.
QUESTION 1:
Considering the article below: Comment on at least two (2) security concerns with a DevOps model and how these concerns can be alleviated with a strong implementation of SecDevOps considerations.
-----------------------------------------------
Agility has become an unavoidable necessity in a fast-moving technology environment, but achieving it can be a challenge for organizations and their development teams. The DevOps philosophy provides a road map; following it is not always as easy.
Even more crucial than the need to transform the development process is the need to protect against ever more sophisticated threats and attacks. But some organizations are finding that agility and security can go hand in hand. SecDevOps is an approach to development that puts security right at the heart of DevOps by making it integral to the development cycle.
SecDevOps: Bridging the Gap Between Security and Agility
According to CIO Insight, organizations such as the endowment-based Dana Foundation have found the SecDevOps approach to be an effective way to bring security into DevOps. The result is faster development cycles and more robust security.
The Dana Foundation is primarily engaged in two fields: web activities related to grant management and publishing and outreach operations, including an annual brain awareness week. James Rutt, the company’s chief information officer (CIO), told CIO Insight that the organization was primarily concerned with “code quality and code security,” with a particular focus on protecting against known code vulnerabilities listed in the Open Web Application Security Project (OWASP) Top 10, such as cross-site scripting and forgery.
The SecDevOps approach helped the company speed up its development process while reducing code vulnerabilities by 40 to 50 percent. This impressive performance shows why and how security and agility can form a perfect partnership.
Building Security Into the DevOps Cycle
Experts have been preaching for years that security needs to be built in, not bolted on after the fact. But the combination of conventional, prolonged development cycles with a fluid security environment has made built-in security almost impossible to achieve. After all, if new versions of a software package were only released every couple of years, the security environment would be radically transformed between two successive versions. Developers had no choice but to bolt on new security features.
In the world of DevOps, the software development cycle has become dramatically faster — so much faster, in fact, that code development can now match the pace of new security challenges. Developers are no longer focused on fixing existing code to handle new security threats. Instead, they are constantly building new code as part of the DevOps cycle, which means that new security features can be built in as part of the overall development process. This is exactly what the security community has been preaching all along.
SecDevOps is not a magic trick, but a natural, organic way to approach new security needs in the context of ongoing code development. This is very good news for organizations that are shifting into the DevOps era.
In: Computer Science
How many ways are there to arrange the letters a, b, c, d, e, and f such that a is not directly followed by either b or c? For example, “abdef c” and “acdef b” are both invalid, but “adbcef” is valid.
In: Computer Science
>>>>>C#<<<<<
A. Number Frequency-Arrays
Random Numbers-Methods
B. Word Count -String Processing
[01]
C. Recursion
By using recursion, write a program to:
D. Matrix Manipulation
Write a C# program to Perform Matrix Multiplication. [02]
Note:-
The matrix multiplication can be performed only if:
In: Computer Science
In: Computer Science
Explain when and how the following are constructed and used.
software engineering
a. Data Flow Diagrams
b. Activity Diagrams
In: Computer Science
The Strings Object in particular is full of useful classes and methods. You can parse and manipulate strings using several methods of the String class. These methods enable you to count characters, find and extract characters and substrings, replace characters and substrings, combine characters and substrings, and compare strings.
Questions to answer:
1. Identify three such methods and discuss how they are used. Then use them in simple relevant examples
2. As you research the String class, what are some of the most
popular uses of substring searching in use today?
3. Are there any uses of strings not covered by the String class or
mentioned in the prompt?
4. Are there other classes that inherit from the String
class?
5. How does the String class extend or support the Array class?
In: Computer Science
Answer as soon as possible
Given a number, find the sum of all the unique multiples of
particular
numbers up to but not including that number.
If we list all the natural numbers below 20 that are multiples of 3
or 5, we
get 3, 5, 6, 9, 10, 12, 15, and 18.
The sum of these multiples is 78.
Given Code:
public int getSumOfMultiples(int i, int[] set) {
// Solution
return 0;
}
In: Computer Science
Write a program in C that reads prompts the user for a positive integer and then prints out that number in base 16, base 8 and base 2.
In: Computer Science
[Computer Science Question]
Compare and Contrast the trade-offs associated with using C++ in
comparison to Python. How do the characteristics of the languages
impact the amount of memory each language occupies. How do memory
considerations impact each languages real world
implementations?
In: Computer Science
In this assignment you must submit TWO different programs both of which accomplish the same thing but in two different ways.
Using NetBeans, create a program that prompts the user for a sentence. Then the program displays the position of where the lowercase letter 'a' appears everywhere in the sentence. Here is a sample of the input and output:
Enter a sentence
for the night is dark and full of terrors.
The lowercase letter 'a' appears at character position 18
The lowercase letter 'a' appears at character position
22
Write TWO different programs that accomplishes the above using different techniques. Take a look at the JavaDocs for the String methods available to you. For example, one way is you might use the 'charAt()' method while your second program uses 'indexOf()'.
please send me the solution in java as soon as possible.
In: Computer Science
what is the time complexity of those ?
//TODO - Question 18
public static int[][] fillRandomArray4(int n) {
int[][] arr = new int[n][n];
for(int i = 0; i < arr.length;
i++) {
arr[i] = new
int[] {(int)(Math.random() * 101),
(int)(Math.random() *
101),
(int)(Math.random() *
101)};
}
return arr;
}
//TODO - Question 19
public static int factorial(int n) {
if(n == 1 || n == 0) {
return 1;
}
return n * factorial(n-1);
}
//TODO - Question 20 - assume str.length() == n
public static boolean isPalindrome(String str) {
if(str.length() == 0 ||
str.length() == 1) {
return
true;
}
if(str.charAt(0) !=
str.charAt(str.length()-1)) {
return
false;
} else {
return
isPalindrome(str.substring(1,str.length()-1));
}
}
In: Computer Science
Given the following inheritance Diagram structure: Fruit: Apple and Orange, Apple: GoldenDelicious and MacIntosh Create a C++ Program that simulate the inheritance structure above. Fruit class should have at least two attributes name and color, getters and setters in addition to a method display() just to display the fruit details. Define the classes Apple, Orange, GoldenDelicious and MacIntosh All of which you can choose the attributes, constructors and methods of your choice, but all should have a redefinition of the method display() In the main create different objects of different classes, assign names and colors and demonstrate the dynamic binding call of the method display using (Polymorphism) GoldenDelicious MacIntosh Fruit Apple Orange
In: Computer Science
Execute SQL queries to get the countries in which the population has fallen from one year to the next, and the years in which it has occurred. Dump the output in the following format:
| country | year | population | year | population |
| 1 | 2005 | 82500849 | 2006 | 82437995 |
| 1 | 2006 | 82437995 | 2007 | 82314906 |
(...)
And so on.
These are the SQL files:
Tables: pastebin.com/xw0j1NAM
Data: pastebin.com/hnpFT3QR
In: Computer Science