#homework-help (Discord ID: 387060078433271808) in MacGuyver - Skills & Academics, page 3

753 total messages. Viewing 250 per page.
Prev | Page 3/4 | Next

2018-09-28 20:23:04 UTC

no it should be null at the last node

2018-09-28 20:24:32 UTC

// Inserts the specified element at the specified position in this list.
// Shifts the element currently at that position (if any) and any subsequent
// elements to the right (adds one to their indices).
// if(index < 0 or index > this.size), throws IndexOutOfBoundsException.

// E.g, if this list is [dummy]->["A"]->["B"]->["C"] with size = 3.
// add(0,D) will result in [dummy]->["D"]->["A"]->["B"]->["C"].
// Continuing on the previous add() call, add(1,"E") will
// change the existing list to [dummy]->["D"]->["E"]->["A"]->["B"]->["C"].
public void add(int index, Object o) {
ListNode newNode = new ListNode(o);
newNode.next = get(index);
get(index - 1).next = newNode;

2018-09-28 20:24:37 UTC

maybe this method is messed up

2018-09-28 20:25:25 UTC

no wait that one should be okay

2018-09-28 20:25:46 UTC

//Add the object e to the end of this list.
// it returns true, after e is successfully added.
public boolean add(Object e) {
ListNode newNode = new ListNode(e);
newNode.next = null;
get(this.size - 1).next = newNode;
return true;

2018-09-28 20:25:55 UTC

this one might be the one with the problem

2018-09-28 20:26:56 UTC

why --?

2018-09-28 20:27:04 UTC

ya lol I just noticed that

2018-09-28 20:27:07 UTC

that's definitely a mistake

2018-09-28 20:27:19 UTC

doesn't fix the null pointer exception though

2018-09-28 20:27:35 UTC

is there a stack trace?

2018-09-28 20:28:57 UTC


2018-09-28 20:29:02 UTC

Exception in thread "main" java.lang.NullPointerException
at MyLinkedList$ListNode.access$3(MyLinkedList.java:11)
at MyLinkedList.contains(MyLinkedList.java:59)
at MyLinkedListTester.testContains(MyLinkedListTester.java:119)
at MyLinkedListTester.main(MyLinkedListTester.java:216)


2018-09-28 20:32:32 UTC

this is what I have on the contains method now

2018-09-28 20:32:38 UTC

// Returns true if this list contains the specified element o.
// More formally, returns true if and only if this list contains at least one element e
// such that (o==null ? e==null : o.equals(e)).
// Note: you have to handle the case where a list node stores null data element.
public boolean contains(Object o) {
for (int i = 0; i < size; i++) {
if (o == null && get(i).data == null) {
return true;
else if (Objects.equals(get(i).data, o)) {
return true;
return false;

2018-09-28 20:33:27 UTC

@ThisIsChris Do you know how to fix this stuff?

2018-09-28 20:33:35 UTC

or know who does?

2018-09-28 20:34:25 UTC

where do you get the null?

2018-09-28 20:34:44 UTC

what line

2018-09-28 20:35:03 UTC

the same line as the if statement

2018-09-28 20:35:18 UTC

should I paste the entire files in here or would that be too big?

2018-09-28 20:35:57 UTC

for (int i = 0; i < index && cur != null; ++i)

2018-09-28 20:37:15 UTC

zip them and email to [email protected]

2018-09-28 20:38:06 UTC

It's too late for that

2018-09-28 20:38:12 UTC

since it has to be turned in soon

2018-09-28 20:38:14 UTC

but thanks

2018-09-28 20:38:22 UTC

I'll just see what I can get fixed now

2018-09-28 20:38:33 UTC

try changes to that for loop

2018-09-28 20:39:15 UTC

okay thanks

2018-09-28 20:39:34 UTC

what would cause the for look to cause a null pointer exception?

2018-09-28 20:40:01 UTC

I suspect cur is null

2018-09-28 20:40:08 UTC

and the recursion

2018-09-28 20:40:11 UTC

```public ListNode get(int index) throws IndexOutOfBoundsException{
ListNode cur = head;
for (int i = 0; i < index && cur != null; i++) {
if (i == index) {
return get(i);
cur = cur.next;
return null;

2018-09-28 20:47:54 UTC

```return get(i);```

2018-09-28 20:48:01 UTC

the recursion

2018-09-28 20:48:04 UTC

oh ya

2018-09-28 20:48:07 UTC

and what is head

2018-09-28 20:48:09 UTC

that's definitely messing something up

2018-09-28 20:48:15 UTC

head is defined earlier

2018-09-28 20:48:27 UTC

member var?

2018-09-28 20:48:36 UTC

public MyLinkedList() {
this.head = new ListNode(null); //with a dummy head node
this.size = 0;

2018-09-28 20:48:49 UTC

okay that exception is fixed I think

2018-09-28 20:49:01 UTC

maybe let's see if we can do anything with one more thing

2018-09-28 20:49:26 UTC

is this linked list or tree node?

2018-09-28 20:49:31 UTC

linked list

2018-09-28 20:49:41 UTC

huh I get a null pointer exception from somewhere else, too

2018-09-28 20:49:47 UTC

Exception in thread "main" java.lang.NullPointerException
at MyLinkedList$ListNode.access$2(MyLinkedList.java:11)
at MyLinkedList.add(MyLinkedList.java:205)
at MyLinkedListTester.testAddLast(MyLinkedListTester.java:42)
at MyLinkedListTester.main(MyLinkedListTester.java:214)

2018-09-28 20:50:17 UTC

public static void testAddLast() { //passed

2018-09-28 20:51:10 UTC

//Add the object e to the end of this list.
// it returns true, after e is successfully added.
public boolean add(Object e) {
ListNode newNode = new ListNode(e);
newNode.next = null;
get(this.size - 1).next = newNode;
return true;

2018-09-28 20:51:17 UTC

any glaring problems here?

2018-09-28 20:51:55 UTC

that get() could return null

2018-09-28 20:52:16 UTC


2018-09-28 20:52:22 UTC

any ideas on how to fix that?

2018-09-28 20:52:39 UTC

after init()

2018-09-28 20:52:53 UTC

how many nodes in list3

2018-09-28 20:53:04 UTC

println after init()

2018-09-28 20:53:19 UTC


2018-09-28 20:53:33 UTC

what is size

2018-09-28 20:53:42 UTC

should be 4

2018-09-28 20:55:09 UTC

I see

2018-09-28 20:55:24 UTC

list3.add("C") will throw

2018-09-28 20:55:51 UTC

because last node was null

2018-09-28 20:56:27 UTC

and when you get it... and attempt to set next

2018-09-28 20:56:34 UTC

the data was null, not the node itself I think

2018-09-28 20:56:43 UTC

ahh ok

2018-09-28 20:56:53 UTC

it must be the size then

2018-09-28 20:57:11 UTC

get(this.size - 1) is returning null

2018-09-28 20:58:54 UTC

ListNode last = get(this.size - 1);
if (last != null) {
last.next = newNode;
return true;
return false;

2018-09-28 20:59:42 UTC


2018-09-28 21:02:13 UTC

this would only happen adding first node to list I would think

2018-09-28 21:02:18 UTC

what is this class?

2018-09-28 21:02:22 UTC

data structures?

2018-09-28 21:02:27 UTC

or Java class?

2018-09-28 21:03:39 UTC

Data Structures

2018-09-28 21:04:23 UTC

I actually have a Java developer certificate but it was a long time ago so I have to relearn everything

2018-09-28 21:04:36 UTC

Got it same time as I graduated high school

2018-09-28 21:04:38 UTC

when I took that class we used C

2018-09-28 21:04:56 UTC

1999 😉

2018-09-28 21:05:47 UTC

Java was its own class back then - the OOP class

2018-09-28 21:13:02 UTC

I had to take a 3 part Java series to get into this class

2018-09-28 21:13:10 UTC

It was part of my certificate

2018-09-28 21:24:09 UTC


2018-09-28 21:24:20 UTC

it's a good line of work

2018-10-01 19:56:08 UTC

I need help factoring a math problem @here

2018-10-01 19:56:30 UTC

-x^2 + 5x + 14

2018-10-01 19:57:20 UTC

(-x - 2)(x - 7)

2018-10-01 19:57:37 UTC

I have meeting in 3 mins

2018-10-01 19:57:47 UTC

but that is close

2018-10-01 19:59:26 UTC

@Warren H What class is that for?

2018-10-01 20:00:26 UTC

Have you been taught any particular methods for factoring?

2018-10-01 20:01:53 UTC

@Jacob it's for college learning support math

2018-10-01 20:02:29 UTC

Not really all I've learned is the "what adds to give us the middle term and multiplies to give us the third term

2018-10-01 20:03:28 UTC

Okay, well first try writing out this (-x )(x ), think of a few number that multiply to form 14, and see which of those can be added or subtracted to form 5

2018-10-01 20:04:51 UTC

In this case, 7*2 is 14, and 7-2 is 5. So, you put the 7 and the 2 in those parentheses and change the signs as needed.

2018-10-01 20:05:44 UTC


2018-10-01 20:06:43 UTC

(-x + 7)(x - 2) would create a negative 14, so, although that would work for the 5x, it wouldn't work for the 14. So the right answer is the one Paradigm Slide gave.

2018-10-01 20:06:59 UTC

Honestly, this is largely just process of elimination, unless someone knows a better way

2018-10-01 20:07:40 UTC

So before that wouldnt you write it as
-x^2+7x-2x+14? Factor out the -x, but then what happens to the x attached to the 7 and 2?

2018-10-01 20:08:29 UTC

-x(-x+7)(x-2)(x+14) ?

2018-10-01 20:31:56 UTC

It would be written out as -x^2-2x+7x-14

2018-10-01 22:58:49 UTC

@Warren H so if you have (-x-a)(x-b) for some a,b then a*b = 14 and b-a = 5. The solution from inspection is a = 2 and b=7.

2018-10-01 23:31:00 UTC

@ThisIsChris i imagined completing the square to be something different. iirc completeing the square is transforming a quadratic into the form (ax+b)^2+c

2018-10-01 23:33:39 UTC

@YourFundamentalTheorum you're right my bad

2018-10-10 14:46:50 UTC

If any of you nibbas need help with Econ or Statistics Im your guy.

2018-10-10 14:47:17 UTC

Or business stuff in general.

2018-10-10 18:30:41 UTC

@Sam Anderson <@&387091385075105804> role'd

2018-10-11 04:53:26 UTC

<@&387091385075105804> Is anyone who is good that statistics online?

2018-10-11 04:53:55 UTC

This isn't homework help, I just need to check the math on something and thought that this would be the best place to ask

2018-10-11 04:54:16 UTC

I'm okay at stats. What's the question?

2018-10-11 04:55:43 UTC

26% of the US population are immigrants and their children. A typical successful technology startup has 2.09 cofounders. Based on this data alone, how many of these companies would we expect to be founded or co-founded by immigrants or their children? Is it just 26*2.09?

2018-10-11 04:56:16 UTC

I'm trying to refute the argument that immigrants are uniquely innovative because around 40% of Fortune 500 companies were founded or co-founded by an immigrant

2018-10-11 05:01:06 UTC

This is outside my wheelhouse as far as stats go. I can say that the term "immigrants" is far to vague to make assumptions from.

2018-10-11 05:01:32 UTC

I get what you're trying to do, I just don't think you have enough data right now

2018-10-11 05:01:46 UTC

I think that kind of depends. First off, successful startup doesn't necessarily mean fortune 500 company. Even if we were to make that assumption, we don't know exactly what percentage of cofounders are immigrants, because those 40% of the companies could all have more than one, or just one immigrant cofounder

2018-10-11 05:01:49 UTC

An immigrant from Somalia is going to be very different from an immigrant from Canada.

2018-10-11 05:02:32 UTC

@Nicholas1166 - NY Is it enough to prove that the statistic given in the argument is meaningless?

2018-10-11 05:03:32 UTC

To be honest friend, I don't know. That's a subjective question. The main issue is that you're extrapolating the startup company cofounder number onto the fortune 500 companies. If fortune 500 companies had, say, only one founder on average, or ten, it would tremendously disrupt your data

2018-10-11 05:05:26 UTC

Also, like micbwilli said, immigrant is a very broad term. You could also try splitting up immigrants by national origin, which I think would prove a similar point. If that data isn't available, you might be able to find data on immigrant entrepreneurship pre and post 1965, which would also probably be useful

2018-10-11 05:07:55 UTC


2018-10-11 05:08:39 UTC

I'm trying to phrase it in a way to sound like I'm not necessarily *disproving* it, I'm just using the available data to show that 40% really isn't that amazing

2018-10-11 05:08:59 UTC

If I could find the average number of co-founders among Fortune 500 companies, that would solve it pretty easily

2018-10-11 05:10:39 UTC

Maybe I could mitigate this by finding the average number of co-founders in the top 10 Fortune 500 companies?

2018-10-11 05:10:48 UTC

Because I'm definitely not sitting here and counting up all 500

2018-10-11 07:23:10 UTC

Number of founders per company is going to be highly variable

2018-10-11 07:24:29 UTC

Plenty in the fortune 10 will have one founder

2018-10-11 07:24:39 UTC

Like Sam Walton, Steve Jobs, etc

2018-10-11 21:30:05 UTC

@Jacob make the sample size argument

2018-10-11 21:32:51 UTC

the top 500 companies isn't a bad sample size tbh

2018-10-11 21:33:01 UTC


2018-10-11 21:33:05 UTC

this is what I have right now

2018-10-11 21:33:09 UTC

The US has around 350 mil people. Versus the 8 bil on the world. For these purposes lets exclude all Blacks from populations that can do this lol

2018-10-11 21:35:46 UTC

I'm not sure I follow the logic here

2018-10-11 21:36:06 UTC

Vc once i finish pooping?

2018-10-11 21:38:02 UTC

1. Assume for not revealing your power level in this class that the same proportion of all pops have the capability to be tech startups.

2018-10-11 21:38:20 UTC

ya sure

2018-10-11 21:38:28 UTC

oh this isn't for class

2018-10-11 21:38:42 UTC

I'm trying to start writing articles for America First Media

2018-10-11 21:38:53 UTC

Good idea

2018-10-11 21:38:55 UTC

I should too

2018-10-11 21:39:19 UTC

that would be cool if you do

2018-10-11 21:39:25 UTC

we could review each others' articles

2018-10-11 21:40:09 UTC

im in vc

2018-10-11 21:42:44 UTC

okay give me a minute

2018-10-11 21:43:06 UTC


2018-10-11 21:43:12 UTC

I forgot I lost my earphones

2018-10-11 21:43:22 UTC

uhhhhhh not sure if I can do this right now

2018-10-11 21:44:25 UTC

okay I'll just get in for a bit right now

2018-10-11 21:44:34 UTC

while I'm home

2018-10-11 21:54:47 UTC

@ophiuchus That's true, but I rephrased it so it's not a specific claim, I'm just saying that it's fairly normal for businesses to have more than one co-founder, so if they're 26% of the population, co-founding 40% of companies isn't amazing

2018-10-18 03:02:03 UTC

@here ummm Im kind of stumped on this homework question. I really don't know how to respond without revealing my power levels and getting a bad grade because of it.

2018-10-18 03:02:10 UTC


2018-10-18 03:03:11 UTC

Drop that class right now!

2018-10-18 03:04:10 UTC

Actually don't take my advice. I never went to college.

2018-10-18 03:04:21 UTC


2018-10-18 03:04:24 UTC

I wish I could

2018-10-18 03:04:52 UTC

The prof is black of course 🙃

2018-10-18 03:05:02 UTC

I'm taking a Cultural Studies class right now which deals with a lot of these topics. I personally am fairly open about my beliefs and still get good grades from the liberal professor.

2018-10-18 03:05:22 UTC

Say that those congressmen built their political careers when demographics were more on their side.

2018-10-18 03:05:33 UTC

I'm not saying this is going to work every time, but, theoretically, public school professors aren't supposed to downgrade you for political beliefs

2018-10-18 03:05:48 UTC

It’ll take years to phase in “diverse” congressmen.

2018-10-18 03:06:00 UTC

@Jacob I'm more concerned with self doxxing

2018-10-18 03:06:08 UTC

If any of you are interested, I can upload some of my assignments. I'm pretty hardcore in them.

2018-10-18 03:06:49 UTC

I hope she wouldn't give a bad grade, but she warned us she would report any in appropriate discussion

2018-10-18 03:07:25 UTC

I had a similar question to yours last quarter. My argument was that minorities are largely here because the founding stock let them come here, so we don't have any obligation to guarantee them representation.

2018-10-18 03:07:34 UTC

But, again, I don't know what your school is like

2018-10-18 03:07:51 UTC

So I'm not necessarily saying you should risk it

2018-10-18 03:08:00 UTC

That's ballsy to write in college, to be honest

2018-10-18 03:08:27 UTC

You can always try being really literal, and kind of avoid the question. I don't know what the essence of the assignment is

2018-10-18 03:09:41 UTC

@Nicholas1166 - NY very ballsy indeed. The teacher is black, and we have a pretty diverse group of thought.

2018-10-18 03:09:46 UTC

It's for a government class

2018-10-18 03:10:18 UTC

Do you want to represent your views, or are you full incognito and just want to do the assignment?

2018-10-18 03:11:07 UTC

I've gotten perfect grades on all my reading notes in my cultural studies class, and this is what I've written about:
> Colonization is not the source of poverty in Africa, and did not make Europeans rich
> Segregation did not make blacks poor
> If we have to ensure minority representation, do we have to ensure white representation?

2018-10-18 03:11:31 UTC

Last quarter I did a speech on why mass immigration sucks and got a good grade. This quarter I'm doing another one.

2018-10-18 03:12:28 UTC

I also challenged my professor and argued that there is a biological basis for race, and had the whole class gang up on my. I have audio if anyone is curious.

2018-10-18 03:13:25 UTC

I think that qualifies for beast mode chief

2018-10-18 03:13:52 UTC

My school let in so many chinese students that I don't even have to redpill, they're doing it for me

2018-10-18 03:14:48 UTC

That being said, every campus is different. My school is right wing enough that their won't be too much backlash, and a large part of my social life is IE, so I don't care if students judge me for my beliefs. You might have good reasons to care, and you shoudn't put that at risk just to be a badass.

2018-10-18 03:15:19 UTC

@Jacob - could you brief me, or give me a good, concise resource on your colonization point so I can use that argument and back it up?

2018-10-18 03:15:30 UTC

No, you're absolutely right. You need to have a read on your audience

2018-10-18 03:15:38 UTC

I can post the document if you would like @Aleis⊕ccidentalis

2018-10-18 03:15:40 UTC

My campus is very left wing

2018-10-18 03:15:47 UTC

That'd be great!

2018-10-18 03:16:22 UTC


2018-10-18 03:17:04 UTC

I largely built on Ryan Faulk's work

2018-10-18 03:17:58 UTC

thanks so much. I go to an overwhelmingly Liberal university and I need more intellectual ammo for when I cause tension in the classroom

2018-10-18 03:19:05 UTC

@Aleis⊕ccidentalis Just be careful. I don't want to make it sound like everyone should do it just because I did it. My campus is largely apolitical, and fairly right wing. I don't know if I would have risked all this at a different school.

2018-10-18 03:19:13 UTC

You've got a unique writing style, really cuts straight to the point. I wonder if those statistics (development, infant mortality, etc.) vary depending on the colonizing nation. For example, I wonder if British colonies, as a collective whole, fared better than Belgian or French ones

2018-10-18 03:19:36 UTC

Yes, I believe they do, though I don't remember exactly

2018-10-18 03:20:52 UTC

Absolutely...so far I've been great about masking myself until an appropriate time to strike. Especially if I can put it in a way that sounds appealing to Leftists

2018-10-18 03:21:03 UTC

oh I do that, too, sometimes

2018-10-18 03:21:19 UTC

it's good to find common ground with them

2018-10-18 03:22:06 UTC

It can be a lot of fun to use their own values against them. I like to talk about how immigration harms the third world through brain drain.

2018-10-18 03:24:40 UTC

I think creating waterproof arguments for our idea is pretty vital, although there's one possible confliction I've noticed within the argument. Overall, I think it's a good piece, I'm just playing devil's advocate here. It would make sense that a colonizing nation would hold onto colonies containing valuable natural resources for longer durations of time. It also makes sense that they would send some of their own natives to create a stable government, loyal to the home nation. These colonies would be held onto most fiercely, and might be the last do decolonize. Since they are so resource rich, they naturally have better GDP outcomes than sparse colonies that were abandoned earlier

2018-10-18 03:24:42 UTC

I recently brought up how the demand for institutional diversity actually dilutes the identity of minority groups, and how it forces them to live amongst people they don't want to be around, rather than a homogeneous community of their own kind.

2018-10-18 03:44:58 UTC

@Nicholas1166 - NY Ryan addresses that in his video. I don't remember the exact data, but, as an example, South Africa was pretty barren before it got settled, and it's way more advanced than other African countries.

2018-10-18 04:01:36 UTC

With regards to that homework question, I'd simply point out that majority black districts have almost exclusively black representatives, so it's not surprising that, when most districts and states are majority white, they'll mostly have white representatives

2018-10-18 05:01:32 UTC


2018-10-18 05:01:43 UTC

okay am I just dumb or does anyone else find these instructions kind of confusing

2018-10-18 05:01:46 UTC


2018-10-18 05:01:59 UTC


2018-10-18 05:02:20 UTC

what does "write the summary of the method interface(signature)" mean?

2018-10-18 05:02:48 UTC

and what is "the recursive definition or your recursive solution"?

2018-10-18 05:06:49 UTC

so if your function is
def fibonacci(n):
if n == 0 or n == 1:
return n
return fibonacci(n-1) + fibonacci(n-2)
Then 1. the function signature is `fibonacci(n)`. (In Java this probably looks more like `public int fibonacci(int n)`
2. the base case is
if n==0 or n ==1:
return n
3. the recursive part is
if not(n==0 or n==1):
return fibonacci(n-1) + fibonacci(n-2)

2018-10-18 05:08:25 UTC

@ThisIsChris Thanks a lot

2018-10-18 05:08:33 UTC

okay this should be pretty easy

2018-10-18 05:12:11 UTC

lmao IllegalArgumentException reminds me of that "illegal opinions" meme with Merkel

2018-10-18 05:14:03 UTC


2018-10-18 05:14:09 UTC

@Jacob you're welcome

2018-10-18 20:54:41 UTC

@ThisIsChris I'm doing chain rule in Calculus 1 and would like to know how to do the problem: cot^2(sinx)

2018-10-18 21:42:32 UTC

1. set `y = sin(x)`
2. the derivative of `cot^2(y)` is `-1/sin^2(y)`
3. so the derivative of `cot^2(sinx)` with respect to `x` is the derivative of `cot^2(y)`with respect to `x` which is `(-1/sin^2(y)) * (dy/dx)`
4. `dy/dx = cos(x)`
5. the derivative of `cot^2(sinx)` with respect to `x` is
`(-1/sin^2(y)) * (dy/dx)`
`(-1/sin^2(sin(x))) * (cos(x))`

2018-10-19 03:20:35 UTC

@ThisIsChris Thank you so much.

2018-10-19 03:21:04 UTC

@GDoctor You're welcome!

2018-10-23 00:01:30 UTC

Anybody know how to calculate a MONTHLY average from QUARTERLY costs? I have to write a C++ program that does that...

2018-10-23 00:01:41 UTC
2018-10-23 03:49:41 UTC

@GDoctor I'm not sure I understand the assignment. Since there's 3 months in a quarter then wouldn't the monthly average of a quarter be the quarterly costs divided by 3?

2018-10-23 16:36:19 UTC

Anyone know how to transform a multivariate regression so that you can do a t test of B1 + 2B2 = 0 and B1 + B2 = 1? I already got it for B1 = B2

2018-10-23 16:37:10 UTC

Base regression formula is Y = B0 + B1X1 + B2X2 + error

2018-10-23 17:18:03 UTC

<@&387091385075105804> ^^^

2018-11-20 06:14:15 UTC

Can someone take a look at a Java assignment for me?

2018-11-20 06:14:25 UTC


2018-11-20 06:14:58 UTC


2018-11-20 06:14:59 UTC

I'm supposed to write a get method for a hashtable. It seems way too simple so I'm wondering if I'm missing something.

2018-11-20 06:15:33 UTC


2018-11-20 06:15:38 UTC


2018-11-20 06:16:10 UTC

Are get methods for hashtables really that complex that this warrants an entire assignment?

2018-11-20 06:16:20 UTC

Or am I overthinking it and this is actually really easy?

2018-11-20 19:03:51 UTC

@Jacob In the future can you put this stuff into pastebin?

2018-11-20 19:33:44 UTC


2018-12-25 17:05:49 UTC

Jacob, you posted an essay about immigration a while back. I just read it recently and I have some feedback to help you improve your writing. I was thinking we could go through it via audio, or if you prefer, I can write it out.

2018-12-25 17:33:06 UTC

Yes, I'll find some time

2019-01-20 00:34:55 UTC

Can anyone explain how to create a cout statement in C++ that'll print a number array each time it's sorted?

2019-01-20 00:35:22 UTC

@ThisIsChris perhaps?

2019-01-20 05:51:17 UTC

<@&387091385075105804> ^^^

2019-01-20 05:51:49 UTC

@GDoctor You want the array printed after sorting or before sorting?

2019-01-20 05:52:33 UTC

I'm sad that my skills are never needed when I see the AE call. It's never something I have experience with. 😟

2019-01-20 05:59:26 UTC

@micbwilli what are some of the topics you like?

2019-01-20 06:00:38 UTC

Biology and Chemistry are mostly what I know.

2019-01-20 06:51:04 UTC

@ThisIsChris the assignment calls for output after each "pass" through an array during a sort, (any kind of sort can be used).

2019-01-20 06:54:17 UTC

@GDoctor OK that makes sense! what code do you have so far?

2019-01-20 06:58:53 UTC

Not much, just the boilerplate #include, main function and the array initialized. I jist wanna know how to get it to print after each pass and not just after sorting is done.

2019-01-20 07:13:43 UTC

@GDoctor can you paste the code? put it between three back ticks both above and below the code:
x = 3

2019-01-20 07:15:24 UTC


2019-01-20 07:21:03 UTC


using namespace std;

int main()
const int NUMINTS = 20;
int randomNumbers[NUMINTS] = { 24, 9, 88, 15, 22, 38, 10, 76, 62, 54,
51, 39, 10, 13, 66, 89, 99, 100, 33, 75, };

2019-01-20 07:21:19 UTC


using namespace std;

int main()
const int NUMINTS = 20;
int randomNumbers[NUMINTS] = { 24, 9, 88, 15, 22, 38, 10, 76, 62, 54,
51, 39, 10, 13, 66, 89, 99, 100, 33, 75, };

2019-02-14 01:26:18 UTC

Can anyone help with a bit of statistics? Here's the problem: if P(A|B) = 0.7 and P(A'|B') = 0.3, are A and B independent or dependent? I'm not sure if I should use Baye's Theorem or something else to relate the two statements <@&387091385075105804>

2019-02-14 01:32:36 UTC

@Jakob-NY My first thought here is that P(A'|B') = 0.3 means that P(A|B') = 0.7 since P(A|B') = 1 - P(A'|B')

2019-02-14 01:33:02 UTC

Oh gotta go dig deep in the textbooks for this

753 total messages. Viewing 250 per page.
Prev | Page 3/4 | Next