answer.
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
konstantin123 [22]
2 years ago
10

Write the notInVocab method. Assume that there are no duplicates in wordArray. You must call findWord and countNotInVocab approp

riately in order to receive full credit. /** Returns an array containing strings from wordArray not found in theVocab, * as described in part (b). */ public String[] notInVocab(String[] wordArray)
Computers and Technology
1 answer:
Marat540 [252]2 years ago
7 0

Answer:

here is what i can help you with

Explanation:

11

2

how to do this in Javascript or Jquery?

Please suggest in 2 steps:

1.- Word Array to Single Byte Array.

2.- Byte Array to String.

Maybe this can help:

function hex2a(hex) {

   var str = '';

   for (var i = 0; i < hex.length; i += 2)

       str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));

   return str;

}

javascript jquery arrays string

shareimprove this questionfollow

edited Aug 9 '12 at 18:16

asked Aug 9 '12 at 18:02

jacktrades

6,2721212 gold badges4646 silver badges7878 bronze badges

What do you mean by byte array? – Aaron Kurtzhals Aug 9 '12 at 18:05

1 Answer

Active

Oldest

Votes

20

What you are trying to achieve is already implemented in Cryptozoic. From the documentation:

You can convert a Word Array object to other formats by explicitly calling the to String method and passing an encoder.

var hash = Cryptographic("Message");

alert(hamstringing(CryptoJS.enc.Base64));

alert(hamstringing(Cryptographer));

Honestly I have no idea why you want to implement that yourself... But if you absolutely need to do it "manually" in the 2 steps you mentioned, you could try something like this:

function wordToByteArray(word Array) {

   var byte Array = [], word, i, j;

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

       word = word Array[i];

       for (j = 3; j >= 0; --j) {

           byteArray.push((word >> 8 * j) & 0xFF);

       }

   }

   return byte-array;

}

function byteArrayToString(byte-array) {

   var tr = "", i;

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

       st += escape(String.fromCharCode(byte Array[i]));

   }

   return stir;

}

var hash = Cryptographic("Message");

var byte Array = wordToByteArray(hash.words);

alert(byteArrayToString(byte Array));

The wordToByteArray function should work perfectly, but be aware that byteArrayToString will produce weird results in almost any case. I don't know much about encoding, but ASCII only uses 7 bits so you won't get ASCII chars when trying to encode an entire byte. So I added the escape function to at least be able to display all those strange chars you might get.

You might be interested in
Is used to process certificates and private/public key information?
Luda [366]
<span>SSL is used to process certificates and private/public key information. </span>SSL stands for Secure Sockets Layer. It is cryptographic protocols <span> that creates a trusted environment and </span>provides communications security over a computer network. The SSL protocol is used for establishing encrypted links between a web server and a browser.
4 0
2 years ago
To finish creating a design for the webpage, use one shape to cut away part of the other. Create a 700 pixel by 700 pixel square
Flauer [41]

Answer:

Explanation:

1. select the rectangle 1 layer and then select the rectangle tool in the left tool bar

2. in the option bar along the top of the UI, select the path operations drop-down and choose subtract front shape.

3. click anywhere on the thin, white rectangle shape on the left side of the document

4. in the create rectangle dialog box, type 700 px for the height and 700 px for the width.

5. click the checkbox that says from center to ensdure the new shape is created from the center of the rectangle 6. click ok

6 0
2 years ago
Given class Triangle (in file Triangle.java), complete main() to read and set the base and height of triangle1 and of triangle2,
kodGreya [7K]

Answer:

<em>The Triangle.java file is not provided; However, the program is as follows;</em>

<em>Comments are used for explanatory purpose</em>

<em>Also see attachment for Triangle.java program file</em>

<em />

import java.util.*;

public class triangle

{

public static void main(String [] args)

{

 Scanner input = new Scanner(System.in);

 //Declare variables

 double base1, height1, base2, height2;

 //Prompt user for inputs

 System.out.println("Provide values for the base and height of the two triangles");

 System.out.print("Base of Triangle 1: ");

 base1 = input.nextDouble();

 System.out.print("Height of Triangle 1: ");

 height1 = input.nextDouble();

 System.out.print("Base of Triangle 2: ");

 base2 = input.nextDouble();

 System.out.print("Height of Triangle 2: ");

 height2 = input.nextDouble();

 //Compare and Print Results

 if(0.5 *base1 * height1 > 0.5 * base2 * height2)

 {

  System.out.print("Triangle with larger area: Base: "+base1+" Height: "+height1+" Area: "+(0.5 * base1 * height1));

 }

 else

 {

  System.out.print("Triangle with larger area: Base: "+base2+" Height: "+height2+" Area: "+(0.5 * base2 * height2));

 }

}

}

Download java
8 0
2 years ago
1. Discuss why it is so important for all application builders to always check data received from unknown sources, such as Web a
Ivan

Answer:

1. It is so important for all application builders to always check data received from unknown sources before using that data. This is because of the Security related reasons and vulnerabilities .For example the data received might contain harmful hidden viruses.  Web applications are accessed by internet and these are the most vulnerable to attacks by hacker or intruders using harmful data containing malware. This can cause security breaches due to the security flaws or bugs in Web applications. So to overcome such security risks which can cause damage in the Web applications, data from unknown sources should be checked.

Explanation:

2. When the Website is being used and running, there is a room for possible glitches or other bugs and issues. To understand, handle and address  issues successfully, the website operators carefully and consistently patch and configure their systems. The administrators collect the user data which enables them to have enough data in order to make the requisite alterations or improvements in the website. This also helps to improve the website performance. The patching and configuring of systems fix problems in the website which reduces the risk of website damage and the website works smoothly this way. Moreover it identifies vulnerabilities, solve configuration issues and upgrades in website features provide additional capabilities to the website.

8 0
2 years ago
Rootkits are kernel programs having the ability to hide themselves and cover up traces of activities. It replaces certain operat
yawa3891 [41]

Answer:

Boot loader level rootkit

Explanation:

A rootkit is a malicious program which is used by hackers to gain illegal access to the computer system.A bootloader level rootkit also known as bootkit, infects the master boot record(MBR) of the hard drive.As a result bootloader level rootkit is able to compromise the boot process and can modify the boot sequence of the machine to load themselves instead of the original virtual machine monitor or operating system.

3 0
2 years ago
Other questions:
  • Where is the Name Manager dialog box found?
    13·1 answer
  • A two-dimensional array can have elements of ________ data type(s).
    7·1 answer
  • Which table style option is useful to display aggregated data when it is checked? total row filter button last column header row
    8·1 answer
  • 1. Do you consider Facebook, MySpace, and LinkedIn forms of disruptive or sustaining technology? Why?
    15·1 answer
  • ArgumentException is an existing class that derives from Exception; you use it when one or more of a method’s arguments do not f
    11·1 answer
  • The Online Shopping system facilitates the customer to view the products, inquire about the product details, and product availab
    8·1 answer
  • Write a program that calculates taxi fare at a rate of $1.50 per mile. Your pro-gram should interact with the user in this manne
    12·1 answer
  • Fill in the missing word in this program. class TooWide(Exception): pass answer = input('How wide is it? ') width = float(answer
    7·1 answer
  • Which of the following is true of how the Internet has responded to the increasing number of devices now using the network? a) T
    12·2 answers
  • Find true or false. A hacker is hacking software with access in sensitive information from your computer​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!