joeforker

0

votes
0

answer
3

views

How do I increase the target size of a custom-checkbox in bootstrap 4?

I'm using forms inside list items in bootstrap 4 and have been using and a small event handler inside my form controls to make the entire clickable, instead of just the small label and checkbox. stretched-link increases the target to the nearest relatively positioned item. Unfortunately compared t...
joeforker
0

votes
1

answer
11

views

Do Docker buildkit builds appear in `docker images` and `docker ps`? Why not?

Recent versions of Docker include an overhauled build system called BuildKit that can be used with export DOCKER_BUILDKIT=1. I've noticed when it is running there is no trace of the builds in docker images or docker ps. Why not?
joeforker
1

votes
1

answer
77

views

How do I enable transactional DDL in pysqlite?

I am using pysqlite which, by default, does not enable transactional DDL (although DDL is transactional from the sqlite3 client). How do I enable transactional DDL within pysqlite?
joeforker
1

votes
1

answer
124

views

When did argparse stop showing 'short help' for no arguments?

Some versions of Python's argparse print the short help when no arguments are given, others don't. How do I get consistent behavior across Python versions?
joeforker
1

votes
1

answer
439

views

Does CouchDB have a “bulk get all revisions” feature?

I'm using CouchDB with PouchDB and have noticed that remote-remote replication (or replication to PouchDB) does a lot of /db/doc?revs=true&open_revs=all&attachments=true&_nonce=... Do any of CouchDB's bulk APIs fetch the revs and open_revs (revs=true&open_revs=all) of more than one document at a ti...
joeforker
2

votes
1

answer
19

views

In SDL2, when is SDL_JoystickInstanceID different than SDL_JoystickOpen(n)?

In SDL2 the documentation suggests that the number used to open the joystick (between 0 and SDL_NumJoysticks()) can be different than the SDL_JoystickID which; used to reference the stick in events. When are these numbers different?
joeforker
1

votes
1

answer
146

views

What is the id number for Brotli compression inside a ZIP archive?

The ZIP file format supports a number of compression algorithms and assigns them numbers, for example 0 is store, 8 is deflate, and 14 is lzma. What number indicates Brotli compression? Is there any additional zip-level metadata needed for this compression algorithm?
joeforker
1

votes
1

answer
59

views

Allowing normal users to download PloneFormGen CSV

We are using PloneFormGen's SaveDataAdapter, and would like users who are not site admins to be able to download the CSV. The normal permissions don't seem to allow this. Is this possible in PloneFormGen?
joeforker
1

votes
1

answer
0

views

Why does this code triple Set-Cookie with different Domain= options?

A web framework's cookie helper triple-sets a cookie with different Domain= like so, and no one remembers why. Set-Cookie: x=y; Path=/ Set-Cookie: x=y; Path=/; Domain=example.org Set-Cookie: x=y; Path=/; Domain=.example.org Why set the same cookie three times with different Domain=? Is this a workar...
joeforker
1

votes
1

answer
0

views

How do I distribute precompiled extension modules for Windows on pypi for multiple versions of Python?

I would like to distribute a precompiled C extension module for Python 2.6 and Python 2.7 for 32- and 64-bit versions of Python. How should I build and distribute that on pypi? Should I just use bdist_egg? Can I retain compatibility with pip? I notice ordinary bdist just creates a .zip that does not...
joeforker
1

votes
3

answer
0

views

What is the correct SharePoint CAML query to retrieve all items from a list?

For some reason I am trying to query SharePoint 2007 using CAML and web services with the Python suds library. The call looks like: listItems = client.service.GetListItems( listName, '', Raw(''), viewFields, 0, Raw(''' TRUE '''), None) For some reason, I get 0 results or an error with or but get...
joeforker
1

votes
1

answer
0

views

What is an efficient algorithm for performing Manchester encoding in software?

What's an efficient way to do Manchester encoding in software?
joeforker
1

votes
1

answer
60

views

In Plone, how do I fix Archetypes content that is missing the cmf_uid() annotation?

I'm using Plone 4.3 with relstorage and I've somehow managed to lose the cmf_uid annotation on some of my content objects. This prevents collective.iterate from being able to check in content. Is there an easy way to have Plone walk through the database and re-add cmf_uid where it is missing? Alread...
joeforker
1

votes
1

answer
83

views

CouchDB _replicator database requires a password for the local target?

I'm using the CouchDB _replicator database and am surprised to find that I have to put a full URL to localhost:5984 with username and password in the 'target' field; just the database name by itself doesn't work. Does CouchDB just work this way or am I doing something wrong?
joeforker
1

votes
1

answer
473

views

Cargo command to print the list of target files?

What is the command to get cargo to print the list of files it would output after running cargo build?
joeforker
1

votes
1

answer
20

views

Does CouchDB share map functions used by multiple views?

CouchDB's documentation says it supports multiple views with the same map function but different reduce functions. If both views are in the same design document then the map function will only be computed once. Is this correct? Does the database compare the text of JavaScript map functions to decide...
joeforker
1

votes
2

answer
677

views

How do I link relative to a Pylons application root?

In Pylons I have a mako template linking to /static/resource.css. How do I automatically link to /pylons/static/resource.css when I decide to map the application to a subdirectory on my web server?
joeforker
2

votes
1

answer
885

views

How do I make a normal HTTP request with a suds transport?

My suds transport is configured to perform authentication against a service. I would like to reuse the transport to make GET and POST requests against the same server with the same authentication. Is there a way to make a normal HTTP request with the suds transport?
joeforker
4

votes
7

answer
3.4k

views

What's a good mathematical sets implementation in JavaScript?

Where is a good mathematical sets implementation for JavaScript? It should include efficient implementations of intersection, union, complement, and (for bonus points) the Cartesian product. No, it's not homework. I got a yubikey, it is a USB keyboard that types a sequence chosen from 16 keycodes to...
joeforker
5

votes
2

answer
353

views

How do I embed IPython with working generator expressions?

Certain list comprehensions don't work properly when I embed IPython 0.10 as per the instructions. What's going on with my global namespace? $ python >>> import IPython.Shell >>> IPython.Shell.IPShellEmbed()() In [1]: def bar(): pass ...: In [2]: list(bar() for i in range(10)) ---------------------...
joeforker
18

votes
4

answer
9.5k

views

At which n does binary search become faster than linear search on a modern CPU?

Due to the wonders of branch prediction, a binary search can be slower than a linear search through an array of integers. On a typical desktop processor, how big does that array have to get before it would be better to use a binary search? Assume the structure will be used for many lookups.
joeforker
18

votes
12

answer
7.8k

views

How do you grep through code that lives in many different directories?

I'm working on a Python program that makes heavy use of eggs (Plone). That means there are 198 directories full of Python code I might want to search through while debugging. Is there a good way to search only the .py files in only those directories, avoiding unrelated code and large binary files?
joeforker
19

votes
4

answer
9.9k

views

How do I get rpmbuild to download all of the sources for a particular .spec?

I am adding some sources to an existing rpm .spec file by URL and don't have them downloaded yet. Is there a way to get rpmbuild to download the sources rather than doing it manually?
joeforker
2

votes
2

answer
828

views

How do I send and receive real-time signals `sigqueue()` in Python?

Python provides a signals module and os.kill; does it have a facility for sigqueue() (real-time signals with attached data)? What are the alternatives?
joeforker
2

votes
1

answer
685

views

How do I define a SQLAlchemy relation representing the latest object in a collection?

I have a SQLAlchemy model with a one-to-many relationship between table x and table y. The record (if any) with the greatest id in table y where y.x_id = x.id is special. Class X and class Y map tables x and y. I know how to define X.all_y (ORDER BY y.id). How do I define X.latest_y equivalent to X....
joeforker
2

votes
2

answer
290

views

What is the difference between a Zope utility defined with a factory versus a component?

It's a little confusing that ZCML registrations for Zope utilities can accept a component or a factory. versus What is the difference?
joeforker
5

votes
6

answer
7.2k

views

What are some good resources for getting started with COBOL programming? [closed]

I'm thinking about learning COBOL. Where should I start?
joeforker
5

votes
4

answer
13.5k

views

How do I do HTTP GET and POST in Progress/OpenEdge ABL?

The Progress docs spill plenty of ink on SOAP, but I'm having trouble finding the example for a simple HTTP GET/POST with Progress ABL. How do I GET and POST strings to/from a URL? Can the URL be https://? Can Progress provide HTTP Basic or HTTP Digest authentication?
joeforker
3

votes
5

answer
2.1k

views

When is forward error correction a good idea for packets?

Systems could use UDP and employ forward error correction to transmit the whole message, without retransmits, even if a few packets are lost. Does this ever work well in practice or is the extra overhead too much of a waste?
joeforker
3

votes
4

answer
169

views

What's the best way to record the type of every variable assignment in a Python program?

Python is so dynamic that it's not always clear what's going on in a large program, and looking at a tiny bit of source code does not always help. To make matters worse, editors tend to have poor support for navigating to the definitions of tokens or import statements in a Python file. One way to c...
joeforker
4

votes
1

answer
545

views

How do I build the 32-bit pypy JIT in 64-bit Linux?

Pypy's JIT will compile on 64-bit Linux ever since it grew 64-bit support, but what if I wanted to compile a 32-bit version? How should I cross-compile a 32-bit JITting pypy on that machine?
joeforker
21

votes
3

answer
10.4k

views

How do I INSERT INTO t1 (SELECT * FROM t2) in SQLAlchemy?

In SQLAlchemy, how do I populate or update a table from a SELECT statement?
joeforker
3

votes
1

answer
2.4k

views

How do I map an X11 keysym to a Unicode character?

X11 maps keycodes to keysyms and then maps keysyms to Unicode. What's a good way to retrieve keysym to Unicode mappings in a program?
joeforker
11

votes
7

answer
19.6k

views

What is the gstreamer caps syntax?

What is the syntax for caps, specifying media capabilities, in gstreamer? Caps are strings that specify the type of media allowed and look like 'audio/x-raw-int,...' but I haven't been able to find good documentation on exactly what is allowed in a caps string.
joeforker
2

votes
5

answer
1.1k

views

Why does avr-gcc bother to save the register state when calling main()?

The main() function in an avr-gcc program saves the register state on the stack, but when the runtime calls it I understand on a microcontroller there isn't anything to return to. Is this a waste of RAM? How can this state saving be prevented?
joeforker
3

votes
2

answer
70

views

How do I set relative URLs in an ATDocument using Plone's setText()?

I am trying to write a script to rewrite links in a Plone ATDocument. When I call getText() and dereference all the UID links by calling portal_transforms.convertTo('text/x-html-safe') the URLs are all rewritten as 'http://foo/Plone/...' (literally, 'foo', as the domain name). When I save the text w...
joeforker
2

votes
3

answer
941

views

How does windowing work in qt embedded?

How does windowing work in qt embedded, where Qt is drawing directly to a framebuffer instead of through a separate windowing system? Can I run multiple programs at once? Do I get compositing and the little [x] button, maximizing and so forth?
joeforker
6

votes
2

answer
2.4k

views

What is the best way to clear Plone's CSS cache?

I am using Plone and CacheFu behind an Apache caching reverse proxy. Plone combines multiple CSS files into one file such as name-of-css-file-cachekey1234.css where 1234 is a random number, and it may take an hour for CSS changes made on the filesystem to show up on the site. How can I see those cha...
joeforker
6

votes
4

answer
2.4k

views

What is the correct way to backup ZODB blobs?

I am using plone.app.blob to store large ZODB objects in a blobstorage directory. This reduces size pressure on Data.fs but I have not been able to find any advice on backing up this data. I am already backing up Data.fs by pointing a network backup tool at a directory of repozo backups. Should I si...
joeforker
3

votes
3

answer
353

views

Can a template in a CMF skin be overridden by a Zope 3 browser:page?

I'm trying to override a view provided by a CMF skin layer with a
joeforker

View additional