Go to advanced search

by quarkjuggler
Tue Jul 16, 2019 7:09 am
Forum: Beginners
Topic: IP connection by key
Replies: 3
Views: 167

IP connection by key

I want to put an RPi on my mailbox with a switch that detects when mail is delivered, then honk a horn inside the house by way of my WiFi and another RPi. How do I dothis? Is there maybe a public service with fixed IP address to which I could send an identifier by which one RPi could request the ser...
by quarkjuggler
Tue Apr 04, 2017 9:28 am
Forum: Beginners
Topic: pdf in Chromium scrambled
Replies: 0
Views: 233

pdf in Chromium scrambled

O.K., so I did the sudo apt-get update and the sudo apt-get dist-upgrade, and my problem persists. Here's a sample what I'm talking about: http://www.ti.com/lit/ds/symlink/sn74ls374.pdf Everything is reasonable until page 6, when Chrome goes berserk! (I take that back: On page 1, stuff goes off the ...
by quarkjuggler
Mon Apr 03, 2017 5:54 am
Forum: Beginners
Topic: move with gimp
Replies: 7
Views: 1019

Re: move with gimp

Yes, that's the pain I'm talking about. --And my wife has interest in art, but more with physical paint, canvas, and paintbrush, so with mixed emotions, I've encouraged her to look into gimp. I've warned her about how difficult it is to do even the smallest things, so I guess I've done my duty. I mi...
by quarkjuggler
Tue Mar 28, 2017 9:19 pm
Forum: Beginners
Topic: move with gimp
Replies: 7
Views: 1019

Re: move with gimp

Nothing I could do would move the layer, but a message advised me to try ctrl, shift, and alt. Again, nothing worked, but with shift-alt, I got a message saying that it couldn't move anything because nothing was selected. So I went back and selected the object. With shift-alt, I was able to move it!...
by quarkjuggler
Tue Mar 28, 2017 3:10 pm
Forum: Beginners
Topic: move with gimp
Replies: 7
Views: 1019

Re: move with gimp

Hi, topguy. It was nice to hear from you. It's the second-hand for a clock. Its background on this level is transparent. I want to position it to align with the hour hand and minute hand below to make a "sprite" thing. It hadn't occurred to me to cut 'n' paste. I'm super-new to gimp, so I might try ...
by quarkjuggler
Tue Mar 28, 2017 10:12 am
Forum: Bare metal, Assembly language
Topic: Simple assembler question
Replies: 13
Views: 4662

Re: Simple assembler question

Thanks, ghans! I don't know if you noticed the dates, but the post you answered was very old! Since then, I've moved on to python (--good language, IMO!), and I'm quite involved in a huge project (huge in my scheme of things). When I finish, I would still like to swing back to bash and see if I can'...
by quarkjuggler
Tue Mar 28, 2017 9:43 am
Forum: Beginners
Topic: move with gimp
Replies: 7
Views: 1019

move with gimp

Hope someone can help! I've got a .xcf file that has two layers. The one layer has an image that I would like to move to the right. I select the object, then activate the move tool, and select tool option to move by selection, but all I can move is the selection, not its contents. One discussion gro...
by quarkjuggler
Thu Feb 16, 2017 9:24 am
Forum: Beginners
Topic: Ogranizing Python program
Replies: 6
Views: 1386

Re: Ogranizing Python program

Thanks, DougieLawson! You've inspired me to change a bunch of stuff, so I'll disappear for awhile again.

--John
by quarkjuggler
Thu Feb 16, 2017 2:23 am
Forum: Beginners
Topic: Ogranizing Python program
Replies: 6
Views: 1386

Re: Ogranizing Python program

On the iSeries, back before they went with 'free' code, everything was in columns -- very easy to parse, so I had a program that would treat a program like a bill of material, to put like what you're talking about, but upside down, since the mainline had to be first. I'd like to do something like th...
by quarkjuggler
Wed Feb 15, 2017 4:09 am
Forum: Beginners
Topic: Ogranizing Python program
Replies: 6
Views: 1386

Ogranizing Python program

Is there an accepted way to properly sequence the functions in a python module based on which are referenced by what others? Perhaps there's software to do it? Efficiency is not nearly as important to me as readability. I've got 50 functions so far, and I'm sure to have a bunch more before I'm done,...
by quarkjuggler
Fri Feb 10, 2017 8:35 am
Forum: Beginners
Topic: SQL mystery
Replies: 2
Views: 783

Re: SQL mystery

Thanks, shuckle! I was under the impression that variables local to a function were available to functions called by that function, but obviously not. I've written about 2000 lines of code so far, so now I get to go back and do some proofreading!
by quarkjuggler
Fri Feb 10, 2017 7:49 am
Forum: Beginners
Topic: SQL mystery
Replies: 2
Views: 783

SQL mystery

Why does this work... import sqlite3 dconn = sqlite3.connect('w/usrdta') johnCsr = dconn.cursor() def b(): johnCsr.execute('select * from formulas') x = johnCsr.fetchone() print(x) def main(): b() johnCsr.close() dconn.close() ...whereas this does not... import sqlite3 def b(): johnCsr.execute('sele...
by quarkjuggler
Sat Dec 24, 2016 9:05 pm
Forum: Python
Topic: My first module
Replies: 9
Views: 1593

Re: My first module

Thanks, Paeryn, for sharing your knowledge! That does the trick!
by quarkjuggler
Sat Dec 24, 2016 12:12 pm
Forum: Python
Topic: My first module
Replies: 9
Views: 1593

Re: My first module

What exactly do you want dir to give you? I read the help(f) page, and indeed, that was useful. It brought in only the top-level function (and a class that I had added). My triple-quote comments were there, which made me feel good. I had expected that dir(f) would do what it does, unless I override...
by quarkjuggler
Tue Dec 20, 2016 6:23 pm
Forum: Python
Topic: My first module
Replies: 9
Views: 1593

Re: My first module

elParaguayo: You make a good point. --And there's another example of a predefined "dunder" name. Heck, all I wanted to do was cut down my "dir()" list for my "module", and instead I've had my introduction to the "dunder-world". I think for now, my answer to dir(f) being too long will be "Don't do th...
by quarkjuggler
Tue Dec 20, 2016 4:11 am
Forum: Python
Topic: My first module
Replies: 9
Views: 1593

Re: My first module

import makes the code in the module available, it doesn't execute it. Actually,... It does execute any statements that are not in a function. And of course, it executes the 'def' statements, which is what defines the functions to make them available to the interactive environment. Well, it's perhap...
by quarkjuggler
Mon Dec 19, 2016 6:33 pm
Forum: Python
Topic: My first module
Replies: 9
Views: 1593

Re: My first module

Thank you for your guidance. I've been in and out of several tutorials, and I think I read something wrong. Evidently, __init__.py is used at the package level, and __init__(self,...) is used on the class level, and I must have assumed that the function was available at the module level, but I guess...
by quarkjuggler
Mon Dec 19, 2016 4:48 pm
Forum: Python
Topic: My first module
Replies: 9
Views: 1593

My first module

here's my code, called a.py:

Code: Select all

def __init__():
    print('Initializing')
def myMethod():
    print('My method')
When I tell python "import a", it does so without error, but why doesn't it print "Initializing"?
by quarkjuggler
Wed Dec 07, 2016 12:05 am
Forum: Raspbian
Topic: 'import CGI' brings up ghost from past
Replies: 3
Views: 798

Re: 'import CGI' brings up ghost from past

My question to you then becomes: How do I find the pipe of requests, and how can I empty it? I tried replacing the bogus page with a redirect back to the page that started it. I watched it loop for a total of about five minutes, so my guess is that there is not any queue that needed emptying. It su...
by quarkjuggler
Tue Dec 06, 2016 4:05 am
Forum: Raspbian
Topic: 'import CGI' brings up ghost from past
Replies: 3
Views: 798

Re: 'import CGI' brings up ghost from past

This might be the source of my problem: Earlier, I was trying to get my Pi to run my application in kiosk mode. My application was running fine, so I thought that it was not at all likely to fail, and if it did, I would try to loop back and start the browser over. In my script to bring up the browse...
by quarkjuggler
Mon Dec 05, 2016 9:49 pm
Forum: Raspbian
Topic: 'import CGI' brings up ghost from past
Replies: 3
Views: 798

Re: 'import CGI' brings up ghost from past

I see that folks in the perl world are also having trouble with this module:http://www.perlmonks.org/bare/?node_id=744270 This site has another link in the comments section to something simpler.
by quarkjuggler
Mon Dec 05, 2016 8:38 pm
Forum: Raspbian
Topic: 'import CGI' brings up ghost from past
Replies: 3
Views: 798

'import CGI' brings up ghost from past

Hi, folks! I think it's a bug in a python module. Here's my server: #!/usr/bin/python3.4 #!/usr/bin/env /usr/bin/python3.4 from http.server import HTTPServer as \ Srv, CGIHTTPRequestHandler as CGI import os os.chdir("/home/pi/") srv = Srv(('', 8000), CGI) srv.serve_forever() Here's my request handle...
by quarkjuggler
Sat Dec 03, 2016 11:32 pm
Forum: C/C++
Topic: chmod u+s -- Then what??
Replies: 10
Views: 1988

Re: chmod u+s -- Then what??

Hey, thanks for everything, jojopi and Gordon. I should let you two off the hook. I have more problems, but they are not related to authority, so if I'm not able to resolve them, I'll start a different thread. I think I've got my direction with sudoers and visudo. I shall study "Defaults env_reset"....
by quarkjuggler
Sat Dec 03, 2016 1:54 pm
Forum: C/C++
Topic: chmod u+s -- Then what??
Replies: 10
Views: 1988

Re: chmod u+s -- Then what??

P.S. -- jojopi: I just read about LD_PRELOAD. Good heavens! Then you said: Use a whitelist of known safe variables, rather than a blacklist of known dangerous ones. I'm not sure I understood this. Did you mean that I remove the "all" from sudo and just list the commands that can be executed? I don't...
by quarkjuggler
Sat Dec 03, 2016 6:36 am
Forum: C/C++
Topic: chmod u+s -- Then what??
Replies: 10
Views: 1988

Re: chmod u+s -- Then what??

When I ordered my RTC, I didn't even know there was an NTP, and I didn't know that there was a program to handle I2C. I'm learning piece by piece what is being handed to me. there are postings about some system or other who thought they had a better idea of how time handling works than the people wh...

Go to advanced search