Just keep walking, preacher-man.

River ,'Jaynestown'


Buffistechnology 3: "Press Some Buttons, See What Happens."

Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!


Liese S. - Mar 09, 2016 8:02:30 am PST #24783 of 25496
"Faded like the lilac, he thought."

Cool cool. I'm home from my trip now, so I'm going to clean up the detritus that is my life as far as all the stuff that got left undone while I was gone, and then I'm going to sit down with it. Yay!


Gudanov - Mar 09, 2016 5:23:12 pm PST #24784 of 25496
Coding and Sleeping

I threw in a bunch of code real quick and probably broke all the things. It's the stuff to do authentication.


Gudanov - Mar 09, 2016 5:56:54 pm PST #24785 of 25496
Coding and Sleeping

Pfft. It wasn't all that broken. That adds support for registration and login. Logout will come later, I haven't implemented that yet for my wife's study, but all it will do is just delete the current session from the session table.

The cool thing is that the middleware layer in the Cerberus library (which I wrote real quick since I didn't like the library I found) will just take care of authenticating for the rest of the API and you don't have to worry about it. Another application-specific middleware layer will deal with updating the expiration time on the access token and the session so you don't need to deal with that either once it's in place.

One quick tip that can be confusing.

The $request and $response objects that you deal with in all the request controllers are immutable. So when you set something on them, you need to use the returned value. For example:

$response->withHeader('Content-type', 'application/json');
$value = $response->getHeader('Content-type');

Will result in $value being null.

You need to do this instead.

$response = $response->withHeader('Content-type', 'application/json');
$value = $response->getHeader('Content-type');

Which results in $value being 'application/json'

Another tip. To wipe out your database you can just run the command:

vendor/bin/propel sql:insert

from the noter/back directory. Which is handy since there is nothing that cleans out sessions yet.


Gudanov - Mar 10, 2016 3:40:19 pm PST #24786 of 25496
Coding and Sleeping

I pushed a bit more code. There's now support for basic CRUD operations through the REST api with authentication. I also added a setup.sh script to do all the stuff needed to get dependencies and generate the database support. There's also some sample data in a couple of csv files and a python script for turning that into SQL.

./csv2sql.py -u user@email.com -c categories.csv -n notes.csv > file.sql

There's a pre-generated SQL file there that will work just fine, but it expects a registered user with the email: gunnar@dog.com


DCJensen - Mar 12, 2016 1:39:22 pm PST #24787 of 25496
All is well that ends in pizza.

Anyone want a bargain smartphone with no contract?

$20 + free shipping, free minimal data talk and text.

[link]


Dana - Mar 14, 2016 4:23:03 pm PDT #24788 of 25496
I'm terrifically busy with my ennui.

My new phone is here! And it only took me four tries to enter the internet password correctly, even though I was staring right at it the whole time!


Gudanov - Mar 18, 2016 12:18:51 pm PDT #24789 of 25496
Coding and Sleeping

I've been too busy to get to the front-end, but I'm hoping to this weekend. I need to get a lot done on the front-end of my wife's study software and that's what gets adapted into my example.


omnis_audis - Mar 20, 2016 9:49:36 pm PDT #24790 of 25496
omnis, pursue. That's an order from a shy woman who can use M-16. - Shir

Printer question. I have a Brother HL-2140. Tonight I tried to print my taxes. After printing the first 6 pages, it jammed. I clear the jam, and resumed. It would print the first page, and kinda jam as it spit it out, and the second page would be stuck in the works. Clear the problem, try again. Same result. OK, then I tried printing just one page, and it still started to feed a second page and jammed. Why? I said print one page. OK, so I try to print using the front single feeder rather than the paper cassette. Works great, no problem. So I try from the paper cassette again, and it jammed again.

I suspect the drum is the issue. It's original drum, and the printer is 7 years old or so. I rarely use it. Lately, the most I print is a sheet for UPS to leave packages at the door.

1) Any clue what the problem is and how to fix it?

2) Should I just buy a replacement. Quill dot com has a HLL2320D on sale for $40.

I hate to throw something out that works.


DXMachina - Mar 21, 2016 4:14:04 am PDT #24791 of 25496
You always do this. We get tipsy, and you take advantage of my love of the scientific method.

I'm not sure it's the drum. The paper has to go past that whether it's coming from the cassette or the feeder. It sounds more likely that it's something to do with the paper pickup from the cassette. As printers age the rubber wheels that feed the paper get less pliable and misfeed.

A couple of things to try, if you haven't already. Make sure that there aren't any slivers of paper from the original jam still stuck in the printer. Since the single feed seems okay, that should narrow down the area you need to search.

Clear out the computer's print queue, then power down the printer completely to make sure there's nothing sticking around in its buffer. Turn it back on and print a test page from the cassette to see what happens. In Windows you can do that from general tab of the printer properties window. I don't know how to do it from a Mac, but it should be similar.

If the test page prints okay, check the print settings in your application to make sure that the width of your document is 8.5" or less (if not, that would explain the second sheet you're getting, although not the jams).


javachik - Mar 21, 2016 11:10:17 am PDT #24792 of 25496
Our wings are not tired.

I hate to throw something out that works.

But, it doesn't. Get the new one.