Messsage from sigruna14 in MacGuyver - Skills & Academics #tech

JesseJames 2018-01-28 17:03:28  

Ok I got a question for all the computer gurus here. My wifi works on my tv my kids iPad and my phone. Won't work on my laptop. But I can use my hot spot on my phone to get the internet to work on the laptop... wth.

ThisIsChris 2018-01-28 19:47:52  

@JesseJames Does your laptop "see" your wifi and you just can't connect to it? Or does your laptop not even see the wifi?

JesseJames 2018-01-28 22:36:14  

It sees it connects and everything just won't load anything. But if I connect it to my hot spot on my phone it works

ThisIsChris 2018-01-28 23:45:15  

@JesseJames Hmm... 2 Qs:
1. Have you tried restarting your computer?
2. What model router do you have?

JesseJames 2018-01-28 23:51:16  

Yes I have restarted it it's always my go to lol. It's an arris. Server admin told me to check my drivers on the laptop and I'm going to try that later and see what it does. It's just odd to me the wifi is working on other devices and the laptop is working on the hotspot.

ThisIsChris 2018-01-28 23:57:43  

@JesseJames on the router (maybe on the bottom) there should be an "http://" followed by several numbers, possibly `` or `` or something similar. Write that into your laptop's web browser and see if that page loads. If that page DOES load then your computer is connecting to your router fine.

ThisIsChris 2018-01-29 00:15:15  

@JesseJames Also what OS do you use?

JesseJames 2018-01-29 00:21:26  

I think it's windows 10 pro. I will check that as soon as I get home. Thanks man.

ThisIsChris 2018-01-29 00:24:28  

@JesseJames You're welcome. Yeah so I would check that "http://" thing on your router. If you can connect, then the connection between your router and your computer is fine and it is something else. But if you can't connect to that address then as siggy said it is probably a device driver thing. Use that wifi you can get from the cell phone to run the driver update wizard in your system settings.

JesseJames 2018-01-29 00:26:33  

@ThisIsChris I sure will thanks bro appreciate it!

ThisIsChris 2018-01-29 00:27:19  

@JesseJames yw, let us know how it goes!

JesseJames 2018-01-29 02:34:44  

So I got home tried the http thing and it worked and now it's working just fine.

JesseJames 2018-01-29 02:34:50  
ThisIsChris 2018-01-29 02:36:52  

@JesseJames Cool, thanks for the update! Networking can be a finnicky thing. If that happens in the future I would try visiting that address again to see if that knocks it into shape

JesseJames 2018-01-29 02:39:28  

Is it possible that fixed something? If so what could it be?

ThisIsChris 2018-01-29 02:47:20  

There's a few things it could have been, all of them "bugs". When you connect to the internet, traffic goes from your computer to your router to your modem to your ISP, and then out to the rest of the world. Anywhere along that chain there could be problems getting traffic in or out. By connecting to that numerial address on your router, you were connecting to a website that is just on your router, so the traffic didn't have to go all the way to your ISP. In other words, you were *just* testing the connection between your computer and your router. This was simpler for the router then having to get traffic from the ISP and forward it to your computer, so by doing a simpler task it may have just reminded your router how to connect correctly to your computer, and then it was able to do the more complex task of forwarding you traffic from the real internet correctly

JesseJames 2018-01-29 02:48:45  

Ah. Just when I think I'm fairly good with computers. Lol.

ThisIsChris 2018-01-29 02:51:21  

haha to be fair without the manufacturer's code it's hard to know *exactly* what's going on, you just have some broad ideas of how things work and try poking around in them.

JesseJames 2018-01-29 03:51:19  

Does a hammer work for poking around?

ThisIsChris 2018-01-29 03:58:44  


sigruna14 2018-01-29 23:31:56  

char c[] = "Str";
c[1] = 'r';
printf("%s\n", c); //Output: Srr
How to get this to work with an array of strings? I have an array of strings (char*) and I need to modify individual characters of each string. I'm getting segfaulted because I had type `char**`. Now I know `char[]` works for individual strings but how can I extend that to arrays of them? I'm writing this in C btw.

John O - 2018-01-29 23:33:07  

@JesseJames what do you think?

JesseJames 2018-01-29 23:34:50  

@John O - obviously I know the answer but I think the outcome would be satisfying.

John O - 2018-01-29 23:35:06  

Ball peen or claw?

JesseJames 2018-01-29 23:41:31  

Hmm that's a tough one.

Why Tea 2018-01-29 23:46:17  

You not happy with StackOverflow answer, @sigruna14 ?

Why Tea 2018-01-29 23:46:50  

1st answer here is easier than me writing out pointer thingy data structure:

sigruna14 2018-01-29 23:50:29  

@Why Tea I'm not sure how that addresses what I'm trying to do here.

Why Tea 2018-01-29 23:51:25  

Then maybe I don't understand the question. "How do I create an array of strings" is your question, and the second answer in that StackOverflow pretty much covers it.

Why Tea 2018-01-29 23:51:45  

For multiple cases.

sigruna14 2018-01-29 23:51:52  

No, I know how to create an array of strings. My question is how to modify individual characters of the strings within said array.

Why Tea 2018-01-29 23:53:40  

The answer to that is in there if you read carefully.

sigruna14 2018-01-29 23:55:07  

char a[2][14];
strcpy(a[0], "blah");
strcpy(a[1], "hmm");```

sigruna14 2018-01-29 23:55:18  

You're talking about this? Wholesale string copy?

Why Tea 2018-01-29 23:56:55  

Are you wanting to hit the individual characters in the string and substitute? I think I did miss the gist of what the question is. You have variable length strings, in an array structure (pointers to a bunch of strings) but you want to change just individual characters at will?

sigruna14 2018-01-29 23:59:48  

It is an array of three strings, each of which is three characters long. It starts out with each string being `"000"`. I need to be able to reach in and change the zeroes to ones where necessary.

Why Tea 2018-01-30 00:00:36  


Why Tea 2018-01-30 00:01:01  

But you want to reach in and "touch" each one individually, at will.

Perihelion - CA 2018-01-30 00:01:20  

Pointer math

sigruna14 2018-01-30 00:01:23  


Perihelion - CA 2018-01-30 00:02:16  

Add data type size to array pointer to access each char