Why am I having several errors from javac not finding any packages from javaFx?

I am starting to learn how to make GUI with JavaFx and I was following the basics to run a simple “hello world” program with the book ‘JavaFx 9 by Example’ from Carl Dea.

But in the end, even though I just copied the source code and the bash commands, javac doesn’t acknowledge the javaFx packages.

This is not the first I code in Java, but it is the first time I am using the terminal in MacOs to compile it and run it.

At the same time I am learning JavaFx, I am also assimilating Bash. I read that MacOs have an old version of it; so I replace the one set up by default with a new version ‘5.0.7(1)-release’.

I do not know if it matters, but

$   echo "$  BASH_VERSION" 5.0.7(1)-release.  


$   bash -version GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17).  

Also, I downloaded and installed the most recent version of Java some days ago

$   java --version   java 12.0.1 2019-04-16 Java(TM) SE Runtime Environment (build 12.0.1+12) Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing) 

It may have to do with the Java Path, but if it is that I am not sure how to solve it.

The problem I believe is when importing the javaFx libraries:

import javafx.application.Application;  import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.stage.Stage; 

When I compile it, I get several errors.

Some of them are:

$   javac -d classes src/*.java   src/HelloWorld.java:2: error: package javafx.application does not exist.  import javafx.application.Application;                            ^ 

Basically, it seems that javac does not recognize or knows the existence of any package from javaFx.

This error mitigates to the Objects that want to be created using this class

symbol: class Application src/HelloWorld.java:20: error: cannot find symbol public void start(Stage stage) {                   ^ 

Finding the path to a file from terminal

I am trying to retrieve the path to a java class file. I have 2 projects in my eclipse: project_a and project_b. I navigated to project_a’s bin folder and tried the command locate WebPerformanceUtil.class. But it gives me two paths:

  1. /home/local/prasanth/eclipse/project_a/bin/com/web/utils/WebPerformanceUtil.class

  2. /home/local/prasanth/eclipse/project_b/bin/com/web/utils/WebPerformanceUtil.class

But I want only the path which contains the the bin folder of the project in which I’m working in.

Bully and reaver not finding anything in any network

I have been trying out reaver and bully on my network and friends network, multiple different routers, but none of them finds anything.

The command for reaver that I run is:

reaver -i wlan0mon -c 6 -b xx:xx:xx:xx:xx:xx -vv -N -L -S -K 1 

The output I get is below, it keeps saying receive timeout. I tried getting closer to the network, even sitting beside it, same problem:

[+] Switching wlan0mon to channel 6 [+] Waiting for beacon from xx:xx:xx:xx:xx:xx [+] Received beacon from xx:xx:xx:xx:xx:xx [+] Vendor: AtherosC [+] Trying pin "12345670" [+] Sending authentication request [!] Found packet with bad FCS, skipping... [+] Sending association request [+] Associated with xx:xx:xx:xx:xx:xx (ESSID: xxxxx) [+] Sending EAPOL START request [!] WARNING: Receive timeout occurred [+] Sending EAPOL START request 

The two last lines just keeps getting repeated. I tried different parameters too.

The bully command I run looks like this:

bully wlan0mon -b xx:xx:xx:xx:xx:xx -c 6 -v 3 -d    

The output:

[!] Bully v1.1 - WPS vulnerability assessment utility [P] Modified for pixiewps by AAnarchYY(aanarchyy@gmail.com) [+] Switching interface 'wlan0mon' to channel '6' [!] Using 'xx:xx:xx:xx:xx:xx' for the source MAC address [+] Datalink type set to '127', radiotap headers present [+] Scanning for beacon from 'xx:xx:xx:xx:xx:xx' on channel '6' [+] Got beacon for 'xxxx' (xx:xx:xx:xx:xx:xx) [+] Loading randomized pins from '/root/.bully/pins' [!] Restoring session from '/root/.bully/xxxxxxxxxxxx.run' [+] Index of starting pin number is '0000000' [+] Last State = 'NoAssoc'   Next pin '62121651' [+] Sent packet not acknowledged after 3 attempts [+] Tx(DeAuth) = 'Timeout'   Next pin '62121651' [+] Sent packet not acknowledged after 3 attempts [+] Tx( Auth ) = 'Timeout'   Next pin '62121651' [+] Sent packet not acknowledged after 3 attempts [+] Tx(DeAuth) = 'Timeout'   Next pin '62121651' [+] Sent packet not acknowledged after 3 attempts [+] Tx( Auth ) = 'Timeout'   Next pin '62121651' [+] Sent packet not acknowledged after 3 attempts [+] Tx( Assn ) = 'Timeout'   Next pin '62121651' [+] Sent packet not acknowledged after 3 attempts [+] Tx(DeAuth) = 'Timeout'   Next pin '62121651' [+] Sent packet not acknowledged after 3 attempts [+] Tx(DeAuth) = 'Timeout'   Next pin '62121651' 

Sometimes bully works and reaver too, (very rarely), but they never get anything, always pin not found. Am I doing something wrong?

I got tired of the errors and tried my own method, what I did was creating a list of all 8 digit combinations, so from 00000000 to 9999999, then I used aircrack to bruteforce the text file, and it actually found the pin for both routers, me and my friends router. I know that all WPS enabled routers has an 8 digit pin, and all 8 digit pins is listed in my text file, my problem however is, that not all WPS routers uses this pin, it can have a PSK that is different from the pin. I bruteforce the .cap file from airodump-ng.

So to sum up, these are my questions:

  1. Am I doing anything wrong with reaver / bully?
  2. Is it possible to get the WPS key by bruteforcing with my pin list, even though the router uses another password like “fj93jfo” instead of the 8 digit key, and the router is WPS enabled and not locked?

Finding $k$-th element in prefix of size $i$

Let’s say we are given array $ A$ of size $ n$ . We need to answer some numbers of queries. For each query we are given index $ i$ and integer value $ k$ , $ k \le i$ . If we take the first $ i$ elements of the array $ A$ and we sort them we should return the one on index $ k$ (we assume everything is 1 indexed).

I know that this can be solved in $ O(Q\log N)$ if $ Q$ is the number of our queries in offline way (we sort all queries by their index) and if we use persistent segment trees we can even make it work in online way (we can answer queries immediately), however I was wondering if there is simpler solution?

Finding the value of x in shapes, and finding the size of each unknown angle with algebra and variables [on hold]

CHAPTER 7 – SHAPES 1. Find the value of x. a) (3x −10)° (2x−5)° (x−5)° b) c) (x + 45)° (2x+40)° (2x+10)° (3 x )° 2. Find the size of each unknown angle. 3. Determine the value of x and find the size of each of the angles represented by an algebraic expression. 4. Determine the measure of each unknown angle.

What is the time complexity of the classic Bron-Kerbosch algorithm for finding cliques?

Bron-Kerbosch is an algorithm to find maximal cliques in a undirected graph. In pseudocode it’s the following (taken from wikipedia):

BronKerbosch1(R, P, X):    if P and X are both empty:        report R as a maximal clique    for each vertex v in P:        BronKerbosch1(R ⋃ {v}, P ⋂ N(v), X ⋂ N(v))        P := P \ {v}        X := X ⋃ {v} 

I have read that the time complexity of some modified versions of this algorithm is $ O(3^{n/3})$ , but I can’t seem to find the running time complexity of the simple version anywhere.

divide and conquer algorithm for finding a 3-colored triangle in an undirected graph with the following properties?

In an undirected Graph G=(V,E) the vertices are colored either red, yellow or green. Furthermore there exist a way to partition the graph into two subsets so that |V1|=|V2| or |V1|=|V2|+1 where the following conditions apply: either every vertex of V1 is connected to every vertex of V2 or no Vertex of V1 is connected to a vertex of V2 . This applies recursively to all induced subgraphs of V1 and V2

I can find all triangles in the Graph by multiplying the adjacency matrix with itself three times and step up the nodes corresponding to the non zero entries of the main diagonal. Then I can see if the nodes of the triangle are colored the right way. O(n^~2,8)! But given the unique properties of the graph I want to find a solution using divide and conquer to find the colored triangle. this is an example graph with the given properties. I need to find the bold triangle: this is an example graph with the given properties. I need to find the bold triangle

Blue boxes symbolize the partitions are fully connected, purple boxes mean no connection between the partitions There is no connection between the coloring of nodes and the partitions, also the partitions have to be computed on the fly

Finding when a turing machine accepts, rejects, loops and its partial function

Finding when a turing machine (a) accepts, (b) rejects, (c) loops (d) partial function under $ \Sigma = \{0, 1\}$ .

This is the turing machine:

enter image description here

(a) 0

(b) emptyset

(c) What is looping is it when the turing machine is stuck at some value constantly going left and right?

(d) im not sure how to write partial function but I got the regex for this is$ $ (0+1)^* 0 (0+1)^*$ $

any help appreciated.

Programmaticaly finding the Landau notation (Big O or Theta notation) of an algorithm?

I’m used to search for the Landau (Big O, Theta…) notation of my algorithms by hand to make sure they are as optimized as they can be, but when the functions are getting really big and complex, it’s taking way too much time to do it by hand. it’s also prone to human errors.

I spent some time on Codility (coding/algo exercises), and noticed they will give you the Landau notation for your submitted solution (both in Time and Memory usage).

I was wondering how they do that… How would you do it?

Is there another way besides Lexical Analysis or parsing of the code?

This question concerns mainly PHP and or JavaScript, but I’m opened to any language and theory.