It is recommended that the first record in the file should contain the following header:
Header stuff
This header line is required.
:rotate:
Sadly, not the first time I've come across this. The OMA DRM spec has the same thing, in fact it just said "optional" at one place, then "required" later. The system I worked on did not implement it and it worked fine on thousands of phones (seriously, the big carriers would make us test and provide proof of the system working with every phone they had sold for the last 5+ years, it was insane). Then, one day, one weird phone on some small Canadian carrier had actually implemented it as required and it took like a week to figure out wtf was going on.
That whole document had some really annoying formatting. There were lots of bullet lists that had a single bullet, or things like the above one, where it was a bullet list with one or two bullets that made sense as things to include or descriptors of the data, and then a bullet or two that really should have been in the heading.
Hey, I too would recommend you have it if it was required!
+1
Options
TraceGNU Terry Pratchett; GNU Gus; GNU Carrie Fisher; GNU Adam WeRegistered Userregular
edited May 2016
Howdy folks.
NARS2.0 is days from release.
Unlike NARS1.7 where several of the control functions for the system were inactive due to testing purposes 2.0 is coming out fully packaged with NAL-9 implemented to its fullest extent since the new decision making methods were implemented.
There is also going to be a dev break afterwards as we focus on pushing the new system to its limits and work on planning out our future development plans.
I figured it out. I'm pulling in data from a Pervasive DB which populates into a Postgres DB. For some reason some of the values they are sending me for some of the dates was "0002-11-01 BC", which, in Django, was an invalid year.
Is there any way to make github display more comment lines/words when displaying the recent commits?
When I used gerrit, you could see the first few lines of a commit comment, and when viewed in a widescreen monitor, it was easily enough to determine what happened with that commit. This made it easy to search through recent commits, to figure out who's recent push just caused a regression bug.
Under github, I have to manually click on the "..." link to display more of the commit comment, one by one, in order to figure out the same info, which painfully slows down the process. Particularly since nearly all bugs are prefixed by a tracking number, so nothing in the first few words are ever relevant to the actual changes made.
I honestly haven't touched github in a long time and generally do most of my stuff from a terminal so I'm not familiar with any GUI tools.
Speaking of git... not sure I posted this in March, but we've finally made the official switch to git and I cannot be happier with it.
good riddance, cvs
OK, so I wanna do a thing in python, and I've wasted entirely too much fucking time trying to figure out, but I'm now annoyed. So I come to ask you, Programming Thread, to show me how I can do the thing that's bothering me.
We're messing with Flask for some things at work. We're automating some bits of config/setup. Part of config/setup is generating a "secret key", which is basically just a random string. So I could do any myriad of things to generate this value. However, the quickstart guide suggests the following:
The problem with random is that it’s hard to judge what is truly random. And a secret key should be as random as possible. Your operating system has ways to generate pretty random stuff based on a cryptographic random generator which can be used to get such a key:
>>> import os
>>> os.urandom(24)
'\xfd{H\xe5<\x95\xf9\xe3\x96.5\xd1\x01O<!\xd5\xa2\xa0\x9fR"\xa1\xa8'
Just take that thing and copy/paste it into your code and you’re done.
Ok, I'll just copy and pa... waaaaaait a minute. I'm scripting, not copying and pasting.
But, not really thinking anything of it, I just stored the urandom output to a variable and wrote it to file like so:
>>> sk = os.urandom(24)
>>> f = open('config.py', 'w')
>>> f.write(sk)
>>> f.close()
GREAT! Now, what's my file look like?
$ cat config.py
????|?GkЖ&?ۦ=???Ʋ
Well, hmm. I kind of see what we've done there, but that's not what I want. I literally want to write the escaped string to file as it appears when you ... output (?*) it. I want my file to look like this:
What am I missing here? It's gotta be some text encoding/decoding thing that I'm just not sure how to express to Python, ja?
* This, for some reason, has me grinding my teeth:
>>> sk = os.urandom(24)
>>> sk
'\x04h\xa2\xf8\x8d"\xc0\x9b\xf0j\x0bj\xdbH\xea\xb02\xd1\xa48\xbd\xef?\xb1'
>>> print sk
h???"???j
j?H?2Ѥ8????
Also, yes, I totally could just use like "sk.encode('base64')" or "sk.encode('hex')" (or any variety of "select X random characters from this set") and write that to file, but as I said this silly, little thing has wasted a surprising amount of my time and now I'm compelled to figure out what. the. fuck. I'm not getting.
I honestly haven't touched github in a long time and generally do most of my stuff from a terminal so I'm not familiar with any GUI tools.
I use git log all the time, but it's annoying as hell, compared to gerrit's web interface. Once you get used to a good GUI web interface, you'll only drop into the command line when you are forced to do so. Being able to quickly scan the last 100 commit comments, then drill down into a side by side diff by just clicking on a comment, that will speed up your workflow by a factor of 10 compared to command line tools doing the same thing.
I honestly haven't touched github in a long time and generally do most of my stuff from a terminal so I'm not familiar with any GUI tools.
I use git log all the time, but it's annoying as hell, compared to gerrit's web interface. Once you get used to a good GUI web interface, you'll only drop into the command line when you are forced to do so. Being able to quickly scan the last 100 commit comments, then drill down into a side by side diff by just clicking on a comment, that will speed up your workflow by a factor of 10 compared to command line tools doing the same thing.
I feel significantly slower using github/gitlab diffs instead of cli. I haven't used gerrit for reviews and maybe its interface is better, but personally I feel more productive with glol / glgp .
Infid: What are you looking for? Do you mean specifically side by side visual diffs? Diff has a side-by-side option(-y), but I am not sure how this will pipe to a file.....
Edit: Also, unless I have a strong suspicion of where a bug was introduced, I prefer bisect to the usual log hunt.
Github's web interface is way worse than gerrit's web interface.
In gerrit, you can see the entire file side by side, with line differences highlighted, pre-scrolled to the first difference, with colored markers on the vertical scrollbar to track diffs not currently visible. It even highlights character by character differences, if only a few characters differ in the line.
The diff for github is just the linux diff command split side by side instead of top by bottom, so you only see 3 lines of above / below context for each change, skipping all other context, with no easy way to see a full file side by side, to get a clear picture of context.
From the gerrit wiki page, here's an example of how gerrit's diff works. Note that this is just 1 or 2 links away from gerrit's commit log list page. Note the built in commit comments by owner as mouse over text. The "skipped" lines can be filled in by clicking on it.
That's the kind of thing I want to generate, yes. A side by side diff that is meant to be consumed by a human rather than a machine.
Can Gerrit do that without hosting the repo? I'd prefer a tool that doesn't require a "server" although I could go through all that if I had to.
The end result is I want a package of HTML files that represents the whole changeset from one tag to another, that I can throw over the fence in an email zip. It's for a regulatory body review and so I want to keep all the commit level noise out of things. "Version A to version B, here is every change in detail so that you can sift it for backdoors." They don't care about the functional / logical breakdown of changes as much.
Gerrit works by pushing a normal patch to a special refs/for/branch-name thing that the gerrit server understands. So you'd set up a branch on your origin at the base, create a local branch tracking that branch, cherry-pick in the diff between the head and the base and then push that to gerrit, which will create the patch on its server. The non-changed portions will still be available for context if people want it because it knows the base revision
At least this is the way I've always seen gerrit used, I don't know if it operates any other ways
Does the other page have a keyup/keydown/keypress/input handler bound that's calling `event.preventDefault()`?
It shouldn't, but I haven't looked everywhere yet.
What happens is that I can't enter anything at all manually, and the datepicker instead instantly tells me the date is invalid. So something gets picked up.
So, I have been building something. So far it has taken about 3 months all told, doing a little bit every few weekends or so. Much of the time has been spent either waiting for parts to be delivered, or sitting in the bath trying to think in 3 dimensions and plan the hardware.
I present: Smart Mirror, IcyLiquid Edition
The software consists of a web app built with ReactJS (https://facebook.github.io/react/), connected to a websocket server written in PHP using Ratchet (https://socketo.me). There is another socket client running code that catches events from a hardware motion sensor, so the mirror can gracefully "sleep" when no one is looking at it.
The server has various "data sources" configured so it can poll regularly for updated weather, news, calendar events, traffic conditions, etc, and push those updates asynchronously to the UI via the websocket connection. I've built it so that multiple clients are supported, with the goal of expanding the number and type of connected devices in my house.
Overall pretty happy with it, I'm going to hang it from the ceiling using some cement anchors/hooks and 2 steel cables.
That's planned for a smaller, dedicated wall mounted device.
The mirror is intentionally non interactive because of finger smudges. I've thought about putting a gesture sensor on there, but I think I like it being purely an output device.
Posts
....Unfortunately I do not.
Sadly, not the first time I've come across this. The OMA DRM spec has the same thing, in fact it just said "optional" at one place, then "required" later. The system I worked on did not implement it and it worked fine on thousands of phones (seriously, the big carriers would make us test and provide proof of the system working with every phone they had sold for the last 5+ years, it was insane). Then, one day, one weird phone on some small Canadian carrier had actually implemented it as required and it took like a week to figure out wtf was going on.
NARS2.0 is days from release.
Unlike NARS1.7 where several of the control functions for the system were inactive due to testing purposes 2.0 is coming out fully packaged with NAL-9 implemented to its fullest extent since the new decision making methods were implemented.
There is also going to be a dev break afterwards as we focus on pushing the new system to its limits and work on planning out our future development plans.
no, I don't think so.
Not that *.min.js and *.min.css are onerous to type.
I have a Django view that accepts a GET request.
URL is:
The code:
So if the user searches for the year "2016" the URL looks like:
In Django I print out the year value:
But I get an Exception:
Django model:
It's a text field... So I'm not sure why I'm getting "out of range". The other filters work just fine, it's just year that blows up. What gives?
Damn it I'm going to have to post on StackOverflow aren't I?
I see lots of "request.META.get(...)" when I google it
I think it would be okay to turn off date validation for shit that low and make people use text fields.
Wish I knew.
When I used gerrit, you could see the first few lines of a commit comment, and when viewed in a widescreen monitor, it was easily enough to determine what happened with that commit. This made it easy to search through recent commits, to figure out who's recent push just caused a regression bug.
Under github, I have to manually click on the "..." link to display more of the commit comment, one by one, in order to figure out the same info, which painfully slows down the process. Particularly since nearly all bugs are prefixed by a tracking number, so nothing in the first few words are ever relevant to the actual changes made.
I honestly haven't touched github in a long time and generally do most of my stuff from a terminal so I'm not familiar with any GUI tools.
Speaking of git... not sure I posted this in March, but we've finally made the official switch to git and I cannot be happier with it.
good riddance, cvs
We're messing with Flask for some things at work. We're automating some bits of config/setup. Part of config/setup is generating a "secret key", which is basically just a random string. So I could do any myriad of things to generate this value. However, the quickstart guide suggests the following:
Ok, I'll just copy and pa... waaaaaait a minute. I'm scripting, not copying and pasting.
But, not really thinking anything of it, I just stored the urandom output to a variable and wrote it to file like so:
GREAT! Now, what's my file look like?
Well, hmm. I kind of see what we've done there, but that's not what I want. I literally want to write the escaped string to file as it appears when you ... output (?*) it. I want my file to look like this:
What am I missing here? It's gotta be some text encoding/decoding thing that I'm just not sure how to express to Python, ja?
* This, for some reason, has me grinding my teeth:
Also, yes, I totally could just use like "sk.encode('base64')" or "sk.encode('hex')" (or any variety of "select X random characters from this set") and write that to file, but as I said this silly, little thing has wasted a surprising amount of my time and now I'm compelled to figure out what. the. fuck. I'm not getting.
normally I'm not too hot on using repr for anything but debugging/logging stuff, but in this case it's literally (get it??) what you want
Must be a weird 2.x thing for Python. Try casting it to a string when you print?
I want to take an arbitrary git diff and share it for review externally, without giving anyone access to the repo online.
I feel significantly slower using github/gitlab diffs instead of cli. I haven't used gerrit for reviews and maybe its interface is better, but personally I feel more productive with glol / glgp .
Infid: What are you looking for? Do you mean specifically side by side visual diffs? Diff has a side-by-side option(-y), but I am not sure how this will pipe to a file.....
Edit: Also, unless I have a strong suspicion of where a bug was introduced, I prefer bisect to the usual log hunt.
In gerrit, you can see the entire file side by side, with line differences highlighted, pre-scrolled to the first difference, with colored markers on the vertical scrollbar to track diffs not currently visible. It even highlights character by character differences, if only a few characters differ in the line.
The diff for github is just the linux diff command split side by side instead of top by bottom, so you only see 3 lines of above / below context for each change, skipping all other context, with no easy way to see a full file side by side, to get a clear picture of context.
From the gerrit wiki page, here's an example of how gerrit's diff works. Note that this is just 1 or 2 links away from gerrit's commit log list page. Note the built in commit comments by owner as mouse over text. The "skipped" lines can be filled in by clicking on it.
Can Gerrit do that without hosting the repo? I'd prefer a tool that doesn't require a "server" although I could go through all that if I had to.
The end result is I want a package of HTML files that represents the whole changeset from one tag to another, that I can throw over the fence in an email zip. It's for a regulatory body review and so I want to keep all the commit level noise out of things. "Version A to version B, here is every change in detail so that you can sift it for backdoors." They don't care about the functional / logical breakdown of changes as much.
You get that by uploading a standard patch onto a base revision
You could upload the diff output from head to the old version to get something like what you want
Access to the repo isn't a problem so long as it can generate an access-less diff to export out.
What would be best to get started with that? I can definitely make a patch but I'd like to have the full contents in the diff.
At least this is the way I've always seen gerrit used, I don't know if it operates any other ways
jQuery date picker works on one page. On another page it won't let you enter date manually. Uses the same component.
Somebody shoot me.
It shouldn't, but I haven't looked everywhere yet.
What happens is that I can't enter anything at all manually, and the datepicker instead instantly tells me the date is invalid. So something gets picked up.
I present: Smart Mirror, IcyLiquid Edition
The software consists of a web app built with ReactJS (https://facebook.github.io/react/), connected to a websocket server written in PHP using Ratchet (https://socketo.me). There is another socket client running code that catches events from a hardware motion sensor, so the mirror can gracefully "sleep" when no one is looking at it.
The server has various "data sources" configured so it can poll regularly for updated weather, news, calendar events, traffic conditions, etc, and push those updates asynchronously to the UI via the websocket connection. I've built it so that multiple clients are supported, with the goal of expanding the number and type of connected devices in my house.
Overall pretty happy with it, I'm going to hang it from the ceiling using some cement anchors/hooks and 2 steel cables.
Heavily inspired (both in terms of concept, and the current iteration of the UI) by this Medium post https://medium.com/@maxbraun/my-bathroom-mirror-is-smarter-than-yours-94b21c6671ba#.9u7tc4s9d
The mirror is intentionally non interactive because of finger smudges. I've thought about putting a gesture sensor on there, but I think I like it being purely an output device.