/sqt/ - Stupid Questions Thread

Ask your stupid questions ITT.

Please take few seconds to Google it before asking and read the sticky first.

Old thread

Other urls found in this thread:

amazon.com/dp/B01N6VFLLZ
dungeonsanddevelopers.com/
theodinproject.com/
raspberrypi-spy.co.uk/2012/07/stepper-motor-control-in-python/
raspberrypi-spy.co.uk/2015/10/how-to-autorun-a-python-script-on-boot-using-systemd/
unix.stackexchange.com/questions/26047/how-to-correctly-add-a-path-to-path
twitter.com/NSFWRedditVideo

Is it possible to encrypt something such that how to decrypt it is publicly known, but no one can tweak it then re-encrypt it without it being identifiable to whoever decrypts it again?

I'm trying to figure out a safe way to distribute updates for a peer-to-peer program over itself.
Due to strange technical limitations, a peer must receive all information for the update from one peer.

I've dabbled in a bit of html and css and want to go further with web dev. I've mainly been using codecademy.
Looking to get into javascript and go from there, should I just keep banging it out with codecademy(get's kinda repetitive) or can Sup Forums recommend other ways to improve your programming skills?
Also, what would be good projects to work on to keep html and css fresh and improve on those aswell?

Randomly get pic error, yet I connect just fine after refreshing the page. Never happens on Arch, Windows 10, Android. Only on Ubuntu LTS (regardless of flavor). Thoughts?

amazon.com/dp/B01N6VFLLZ
does anyone know or can anyone find a better laptop for around this price? around 1500 limit, mostly for gaming
am i missing something about this one? is it too good to be true?

Complete this dungeonsanddevelopers.com/
and this
theodinproject.com/

What's wrong with my laptop?
The parts screen is sometimes pink toned. It's dynamic, changes as the video changes, or sometimes changes even when it's just the wallpaper.
At first I thought it was cable connection problem because if I move the screen it changes or disappears, but it's behavior is more consistent with gpu problem

ooh, these look enticing, I do like games. Thanks!

You'r welcome, the second one is great because you also have to do projects and such. Sure there is a bit of "setup" time, but overall I found this a very good experience where you get clear goals without have to repeat everything ad infinitum. And since you already did some codeacademy stuff, you can probably skip a lot of stuff too, and move through the curriculum quicker.

Enjoy and have fun user.

Anyone here got an EEE PC and can recommend a good, small and fast distro to run on it?

Currently using lubuntu on it (EEE PC 901) but it still feels a little bit slow.

Linux noob here, so Arch/Gentoo might be a bit too much for now (I'll save those for later)

I'm trying to open ports so people can connect to me. Used to be a pretty straight-forward process for be; access the router control panel via a browser and open sesame, but my ISP forced me to upgrade my modem to this weird pseudo-router modem which I can connect to via wi-fi, and it has its own gateway at 192.168.0.1. I tried opening them on the modem's gateway but no luck.

Is there any way to fix this?

>about to ask stupid question
>think very hard for a way to present it
>think how user is going to reply, with a link to extra documentation
>look up extra documentation
>question answered
Thank you, /sqt/.

bunselnlabs

I'm pretty new to Python and Raspberry/Linux and I'm trying to understand how a piece of code works so I can modify it to make a stepper motor run at the fastest possible speed.

The relevant part is
# Read wait time from command line
if len(sys.argv)>1:
WaitTime = int(sys.argv[1])/float(1000)
else:
WaitTime = 10/float(1000)

The way I understand it it reads a value from console sys.argv and then it does something with sys.argv[1] which in the end is the value that decides the WaitTime value and thus the rotation speed.
When I run the program from the included IDE the stepper motor runs slow as molases. However, when I use the command line and provide a parameter low enough (like 4) the motor runs super fast, which is what I want.
What I want to do is find out what I can do to hardcode the code so the motor runs at the highest speed, since I don't need to pick a variable speed.
The rest of the code is here
raspberrypi-spy.co.uk/2012/07/stepper-motor-control-in-python/

using a cron script for restarting services like nginx, mysql better than upstart/systemd that exit due to a memory deficiency?

Looks great, thanks user!

I'm a lossy whore. That being said, which one is better, MP3@320 or Vorbis@192 (OGG)?
Webm related. I'd go for OGG, but I want your opinions.

Have you tried UPnP (Universal Plug and Play).

If your ISP put you behind a NAT you're screwed and you will need a VPN, see if you can ping yourself with a proxy

It doesn't matter because the changes happen in regions you cannot hear unless you're a bat or a dog
Pick the smallest filesize

# Wait before moving on
time.sleep(WaitTime)


Comment out time.sleep(WaitTime) like this
# Wait before moving on
#time.sleep(WaitTime)

Didn't seem to do anything when launching from the IDE. Still runs slow.

I'm always seeing lines like these in my syslog:

postfix/smtpd[9443]: connect from dojo.census.shodan.io[80.82.77.139]
postfix/smtpd[9443]: lost connection after EHLO from dojo.census.shodan.io[80.82.77.139]
postfix/smtpd[9443]: disconnect from dojo.census.shodan.io[80.82.77.139] ehlo=1 commands=1

postfix/pickup[9501]: 200F6D41D88: uid=0 from=
postfix/cleanup[9564]: 200F6D41D88: message-id=
postfix/qmgr[591]: 200F6D41D88: from=, size=819, nrcpt=1 (queue active)
postfix/local[9566]: 200F6D41D88: to=, orig_to=, relay=local, delay=0.03, delays=0.02/0.01/0/0, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")


What exactly is happening here? Is there a security risk? Can I disable postfix without disrupting any internal notification stuff?

you can probably disconnect pppoe and set a wan port, then get your own router.

Excuse me if I use the wrong terminology, but are there any programming languages that let you compile you program with just a simple text editor? Similar to how batch files function.

I spent a month learning Java and I don't like compiling using Netbeans.

shodan is crawler that looks for security vulnerabilities, don't worry too much the internet is full of crawlers like google.

I guessing the IDE doesn't allow you to pass arguments so instead uses

WaitTime = 10/float(1000)

Change that to
WaitTime = 4/float(1000)

You're looking for an Interpreted language

What's with the rest about messages being send though?
Can I safely disable postfix then? I'm not using it and didn't explicitly install it. If there's no reason to keep it, I'd rather have those ports closed.

I found a way to call the script from another script that will be constantly running monitoring a folder for changes. It accepts parameters so in the end I solved it without fucking around with any code.
Thanks for the help user.
I'm really liking Python so far. Everything I could need it's already done and ready to use.

>Can I safely disable postfix then?
Sure, but is probably just running locally and listening on 127.0.0.1 only.

>I'd rather have those ports closed.
Are running some kind of firewall? if not, then by default all your ports are kinda open(and it looks like your network doesn't have a NAT or you're on a DMZ), you can use something like ufw to easily close ports

What is the best free antivirus?

common sense and malwarebytes

>Sure, but is probably just running locally and listening on 127.0.0.1 only.

Doesn't
>postfix/smtpd[9443]: connect from dojo.census.shodan.io[80.82.77.139]
indicate that someone can connect to it from the outside?

>Are running some kind of firewall?
No, should I? I was under the impression that there is no risk when there's no service listening on a port.

What's the best graphics card for a non gaming laptop?

Thank you

I saw a thread >>/qa/1478704 that said "Adobe dropping any and all support for Flash starting in 2020" (three years from now). If this happens will all flash games be unplayable? If not how would they be played

I have a phone repair business and I've got two iPhones that have been left behind by customers, an iPhone 6 and 5s, I have the pass code for both of them but not the icloud login details. is it possible to factory reset without? as I said I have the pass codes, but I guess it'll probably ask me to log into the their current icloud before I can restore?

here is a rare pepe in advance for ur help

fixed

So why is my script not initiating on startup?
There's like 20 different ways to do this shit

Is it safe to install the Windows 10 creators update?
During the time it officially released I read some articles saying it was broken or it broke some systems so I avoided it completely.

check the logs?

I don't know how
I'm pretty new to Linux.
Do you have a solid retard proof guide to do this? This script constantly runs scanning a folder and does certain actions depending on changes on the files (like edit, delete, open, etc.)

>indicate that someone can connect to it from the outside?
Oh yeah probably, that means all of your ports are exposed, you normally should have a NAT between.

>I was under the impression that there is no risk when there's no service listening on a port.
Thats true but as soon as a service start listening on a port it would be exposed to the internet and that is a security risk.

Is the script executable? is the python route defined?

Try running the script from console like this: ./script.sh

That's just how cryptography work. You have a private key that you use to encrypt your data, and everyone has the public key that he can use to decrypt. Nobody will be able to decrypt something that has not been encrypted with your key, so no-one can change the content of the package. Merely all cryptographic systems works this way. PGP, RSA,...
If you don't worry about encryption, you can just look into signing your data the same way.

Wait i didn't notice that it was the rc.local file.

You're probably running systemd that means rc.local is deprecated try this guide
raspberrypi-spy.co.uk/2015/10/how-to-autorun-a-python-script-on-boot-using-systemd/

Once you have the basics and patterns, I would recommande to start a 'real' project. Think of something and make it real, push it on github, someone may use it, keep track of it, or even give you advice or open pull requests so you can learn more.

Check ping 8.8.8.8
route -n
ifconfig
And see if all is right

Let's say I have a USB sound card connected to a Linux PC. How do I do let it use an ALSA device address like hw:1,0 permanently, i.e. the address no longer changes at each time I boot?

What smartphone has the best typing experience? Or smartphone + keyboard combo?

I believe some smartphones have a slower screen response time, some has worse accuracy, some maybe even too sensitive.

And what screen size would be optimal for my hands? From the base of my hand to the tip of my middle finger the length is 8,3", and from the same spot to my thumb it's almost 6".

I need to do lots of writing.

Color issues with screens (laptop too) generally is a cable issue. If it toggles when you move the screen, this seems to confirm this. To fix this, it looks like you have no other way than to open your laptop and check the two endings of the cable, I doubt it's on the screen part because it's generally well glued. However, opening your laptop can sometimes be shit to do depending on your model.

Nvidia or amd?

If the data is just signed, and not encrypted, then can't the data be changed without changing the signature?

Also, is there a term for when the focus is on tamper-proofing the data while making it publicly viewable, instead of making it publicly encryptable while viewable to only one person?

Have you tried Opus? Should be even better at these bitrates.

Not really...

>Friend tells me she has computer problems
>Says it's running slow
>And that it's giving off an odd smell
>Turn it on and do some basic tasks
>Start smelling something odd from the vents
>Smells like burning rubber and mints
>Check temperatures
>MFW


Now I opened it up and the thermal paste on the CPU was completely burnt to a crisp, looked like burnt marshmallows, I replaced the thermal paste and did a complete deep clean of the system both on the inside and outside, the temperatures went down, but only by 10-15 degrees, the CPU is still IDLING at 100c+

Is it fucked? The inside is completely clean, new paste, vents and fans are spotless, but it still runs at an ugodly temperature.

I wanna have the PSP Hand Held experience.

Should I buy a seperate phone and a separete bluetooth controller(because PPSSPP exists)

>OR

SHould I just buy a PSVITA (because it has backwards compatibilty)

c#
class smiley : Form
{
smiley( )
{
this.Text = "smiley";
this.BackColor = Color.White;
this.ClientSize = new Size(200, 100);
this.Paint += this.tekenScherm;

}

void tekenScherm (object obj, PaintEventArgs pea)
{
Pen blackpen = new Pen(Color.Black, 3);
pea.Graphics.DrawEllipse(blackpen, -125, -125, 250, 250);

// the black outer circle which doesnt move


// e = 100. Diagonal distance from (0,0) to starting point drawEllipse

// ey = factor * Cursor.Position.Y. Same for ex.
Cursor = new Cursor(Cursor.Current.Handle);
float e = 100; //=63
float factor = (e / (float)Math.Sqrt(Cursor.Position.X * Cursor.Position.X + Cursor.Position.Y * Cursor.Position.Y));
int ex = Cursor.Position.X * (int)factor;
int ey = Cursor.Position.Y * (int)factor;

// the small eye
pea.Graphics.DrawEllipse(blackpen, ex, ey, 50, 50);



}


static void Main()
{
Application.Run(new smiley());
}
}

the idea behind this, is that i want to have the little circle inside the big circle looking at the cursor like an eye would. but the little circle keeps compiling in the topleft corner.
what am i doing wrong??

Don't

GPD Win

>float e = 100; //=63

forgot to change this. should just be: float e = 100

Standalone flash player and download the game.

How do i get rid of the message that take up the whole screen on windows 8.1?

Like power is low or update availiable

Download the game? I will try but there was this one porn game I played where downloading (pirating) requided this sketchy 3rd party launcher to access a server or something...

I do believe the term you're looking for is more like 'signing'. Sure you can temper the data without changing the signature. However, the receiver will be able to see that this is not the correct signature for this data.
Also, when you use https and SSL certificates, everyone knows the public key, and can initiate communication with your server. The client and the server will create their own temporary keys based on your certificates.

Maybe it's started to burn well, int his configuration it doesn't have a long time to go.

I want to launch a .js file on startup of my computer
so I made a .bat file with
"node C:\Users\User\Desktop\TheFolder\index.js" in it
launched it and it gave a syntax error in the command prompt, but when I do "C:\Users\User\Desktop\TheFolder" and node index.js, its fine

Another method that I think should work is if I make a .bat that starts Node's CMD instead of Window's CMD but i'm not sure how

pls send help

Hello Sup Forums

Im a dumbass I just finished building my own ryzen PC

Here are the specs
ASUS-Prime a320m-k
AMD ryzen 5 1400
GTX 1050ti
8GB RAM DDR4 2666MHZ

Im sure i installed everything correctly, but when i try to start my pc there is no video signal on my monitor. I tried DVI and HDMI but no luck.

Yes i plugged the cables into the video card not the motherboard.

Any ideas i'm kinda clueless what to do now...

Could be a lot of things.
Is power supply good enough? Is it connected to MB, CPU, GPU ?
Is your mother board using your video card and not the motherboard output?

Alright, I see how it works now; but one thing I'm uncertain of is, how is the public key determined?
Is it kept related to the sender ID, so that it's impossible to trick someone into using a public key that works for a private key you have?

And if so, is it possible for me to generate a private key based off of a public key?

>Yes i plugged the cables into the video card not the motherboard.
then try the motherboard

do the fans spin up? are there beeping sounds?

The CPU doesnt have an integrated GPU. All the fans spin, the CPU fan, the video card fan and the fan in the case as well

The PSU is probably good enough, its a Seasonic G series 450 watt gold rated. The only thing I can still think of personally is that the mobo is indeed trying to use the onboard gpu that it does not even have... As far as I can see I have connected all the needed cables to the motherboard. For now I have connected just the bare minimum (pic related). Still nothing though

I dont have a speaker installed because i dont have any i might call a friend to ask if i can borrow one if nothing works

Why?

I need a portable power supply that's rechargeable for a raspberry pi, that also allows the raspberry pi to properly shutdown when the batteries are nearly depleted.

What are my options?

a udev rule might be able to do that

I want to buy a lan card, because it seems like the one on the motherboard is not acting properly.
Is there any reason to get a 1000Mbps lan card if my lan connection is like 75/40?

>2017
>Have not backstepped to static /dev/ despite all the RH cuckdoodelery.
>Not using more simple and less bloated device node manager like mdev

By not using 1) usb 'soundcard', 2) by using oss4 instead of alsa.

Local network? If you have a NAS or any kind of server GbE is well worth it considering is 10 times faster also unmanaged GbE switches are cheap.

How can I use ffmpeg to convert an entire directory of mp4 files in webms?

#!/bin/bash
for f in *.mp4
do
ffmpeg -i "$f" -an -qmax 20 -threads 4 -c:v libvpx "${f%%.gif}.webm" && rm "$f"
done

And how do I use that? Can I copy and paste it into the terminal?

>Implying that my potato can handle qmax 20 or that I have four or even two threads.

yeap, skip first line
it will delete original mp4 files
it will remove audio too

test on some directory with few mp4 and see..

Haven't used Windows for like 5 years. Do people still install shit like K-Lite Codecs for video playback? Or will MPC alone suffice on W10 LTSB?

It is just my PC and the cable from the ISP.

Why you can't glue audio from 30 fps video to a 25fps video without getting sync trouble?
The frames count is different but both last 1 sec.

Depends on your budget and what you need.

What is the best way to improve my discharge rate on Debian ? i use i3wm, tlp, powertop, i have desactivate a lot of useless thing(daemon, modules...) but i still get a discharge rate of 8W... my goal is 4W.

if you would like to use it more often
save it to a file, lets say all_mp4_to_webm.sh
put it somewhere, usually ~/bin
make the file executable
chmod +x all_mp4_to_webm.sh
and add that bin directory to execution path, so that its content is searched when you start writing in terminal
unix.stackexchange.com/questions/26047/how-to-correctly-add-a-path-to-path

then when you want to use it, you just go where you want to go, and call all_mp4_to_webm.sh

What could 'real' projects be? Whole website drafts or just smaller stuff like the things floating around on codepen etc. ?

it doesn't work, ffmpeg just hangs with a little >

post screenshot

Wait wait wait, I got. Thank! I removed the rm though.

Can I get spied on even when using a VPN or is it absolutely impossible?

For example lets say my modem and router both got hacked, the dns got changed and now they are using some dark dynamic dns that gives full remote access to all devices to the attacker.

If I use a vpn on my phone under this Orwellian scenario, am I still safe?

I locked myself out of sudo. I use Ubuntu 16.04 and typed sudo visudo into the terminal. On all three lines I changed ALL to my username. I thought that this would give me su abilities but now I can't even use the sudo command. What do I do now? Help a retard in need please.

>Can I get spied even when using a VPN
yes
>If I use a vpn on my phone under this Orwellian scenario, am I still safe?
no

HUEHUEHUEHUEHUEHUEHUEHUE

>safe
Will your computer explode? No.
Will you be part of a literal botnet? Yes.

Log in as root and fix it.

>su
Password:
su: Login failed