backend

Matplotlib says fig.canvas is None, so I can't use fig.canvas.draw

懵懂的女人 提交于 2019-12-22 22:56:44
问题 I haven't used Matplotlib much. Based on someone's advice, I'm trying to write some plotting codes using object-oriented paradigms as much as possible---and therefore trying to use pure Matplotlib (i.e. not relying on pyplot) to generate some simple figures. A stripped-down version of my code looks like this: import matplotlib as mpl time = [0,1,2,3,4] cell = [1,2,1,2,1] sample = [3,2,3,4,4] (figHt, figWd) = (5, 8) # in lBorderWidth = bBorderWidth = rBorderWidth = tBorderWidth = 0.1 lbwh =

Read POST form in Angular submitted by external websites

余生颓废 提交于 2019-12-22 09:30:34
问题 I am developing a website with Java for the backend and Angular for frontend. There is a situation when some external websites may send data to my website using POST form. For instance, ▼ General Request URL: https://myangularwebsite/ Request Method: POST ... ▼ Request Headers Content-Type: application/x-www-form-urlencoded Host: myangularwebsite Origin: https://externalwebsite Referer: https://externalwebsite/send.form?id=0 ... ▼ Form data ID: 0000000 TIME: 2017.06.04 11:53:58 SIGNATURE: ..

Change matplotlib backend in Python virtualenv

旧街凉风 提交于 2019-12-22 08:45:16
问题 I've installed a virtualenv with pyenv using Python v2.7.12. Inside this virtualenv, I installed matplotlib v1.5.1 via: pip install matplotlib with no issues. The problem is that a simple import matplotlib.pyplot as plt plt.scatter([], []) plt.show() script fails to produce a plot window. The backend that I see in the virtualenv using: import matplotlib print matplotlib.rcParams['backend'] is agg , which is apparently the root cause of the issue. If I check the backend in my system-wide

OSError: [Errno 18] Invalid cross-device link

泄露秘密 提交于 2019-12-22 01:12:34
问题 I'm working with django 1.6.5 and python 2.7. I have import feature in my app and I get error: OSError: [Errno 18] Invalid cross-device link I have problem with this part of code: os.rename(db_temp, settings.DATABASES['bookmat']['NAME']) code in settings: 'bookmat': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': '/my_projects/book/db/bookmat.sqlite3', }, 回答1: os.rename only works if source and destination are on the same file system. You should use shutil.move instead. 回答2: I think rename

Add columns in admin order list on woocommerce 3.3

大兔子大兔子 提交于 2019-12-22 00:27:50
问题 Related to: Add columns to admin orders list in WooCommerce backend Is it possible to add only one new column in admin Order list instead. For the content of this column my-column1 I will like to have 2 custom fields like: $my_var_one = get_post_meta( $post_id, '_the_meta_key1', true ); $my_var_two = get_post_meta( $post_id, '_the_meta_key2', true ); To finish is it possible to position this new column after the order_number ? Any help is appreciated. 回答1: Updated - It can be done this way: /

Are clean URLs a backend or a frontend thing

若如初见. 提交于 2019-12-21 13:13:17
问题 What do you think.. are clean URLs a backend or frontend 'discipline' 回答1: If we're talking url's being 'clean' from an end user experience then I'm going to break the mould a bit and say that url's in general are not intuitive and they never will be, they are intended to be machine readable. There is no standard to the format of a url such that when navigating from site to site humans will never ever remember how to reach a resource purely through remembering urls and their 'friendly syntax'

Including CSS File in TYPO3 Backend?

廉价感情. 提交于 2019-12-21 05:21:50
问题 I am trying to include my cascading style sheet into my TYPO3 extension. I created the extension with "kickstarter". This is the way I tried to include it: $this->doc->getPageRenderer()->addCssFile(t3lib_extMgm::extRelPath('myExt') . 'res/css/my_stylesheet.css'); I added that line at the end of the main() method. So what am I doing wrong? The path including the file does definately exist. Thank you. 回答1: And if You would like to include CSS file in other module than Yours, without to modify

Concerns about separating front-end and back-end with a NodeJS UI server [closed]

倾然丶 夕夏残阳落幕 提交于 2019-12-21 04:42:37
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . During the last months, we at work have been looking for a solution to the following problem: front-end developers can't easily modify the appearance of the website without the help of back-end devs. Our culture as a team is mostly based on full-stack frameworks such as

In a java REST API, using PATCH vs PUT to update an entity

夙愿已清 提交于 2019-12-21 01:25:26
问题 I am about to start development on a new rest api in Java. My question is about the use of PATCH - Why? Lets say, we have an entity named Address.java public class Address { @Id private Long id @NotNull private String line1; private String line2; //optional @NotNull private String city; @NotNull private String state; } To create a new Address, I would do this http request: POST http://localhost:8080/addresses with the following request: { "line1" : "mandatory Address line 1", "line2" :

Google app engine cannot instantiate task queues more than the back end instances defined in backends.yaml in Google app engine

不羁的心 提交于 2019-12-20 16:52:12
问题 I have defined the backend configuration as follows. backends: - name: mybackend class: B8 options: public, dynamic instances: 6 And Um creating more than 6 taskqueue instances and given the target to my backend. class TestHandlerTest(RequestHandler): def get(self): for x in range(0, 100): taskqueue.add(url='/testhandler/', method='GET', params={'x': x}, target='mybackend') return Response() class TestHandler(RequestHandler): def get(self): time.sleep(420) x = self.request.args.get('x')