Tag : python

The front-end encapsulates the FormData object post to the back-end nodejs. nodejs uses formidable to parse the request. Up to this point, there has been no problem. nodejs can successfully parse the request and print out the desired data. However, I wanted to send the data obtained after parsing the request to the python server ..

Read more

var SomeModel = Backbone.Model.extend({ validation: { email: { required: true, pattern: ’email’, msg: ‘Please enter a valid email’ bracket }, validate: function(attr){ console.log(attr); bracket }); var some = new SomeModel(); some.set(’email’, ‘test’, {validate: true}); console.log(some); Can you help me write an example? I wrote a test according to the instructions. I don’t know how to ..

Read more

The first way is to store custom events directly in __onfireEvents var __onfireEvents = {}; function _bind(eventName, callback, is_one, context) { if (typeof eventName ! == string_str || typeof callback ! == function_str) { Throw new Error(‘args:’ plus string_str plus’,’ plus function_str plus’); bracket if (! hasOwnKey(__onfireEvents, eventName)) { __onfireEvents[eventName] = {}; bracket __onfireEvents[eventName][ plus ..

Read more

My thinking is <vedio src=’/xx/api’> The back end transmits video file data (binary) to the front end, and then changes the corresponding header.However, I did not succeed in my attempt, and I did not find any relevant information on the Internet.I don’t know what the problem is. Perhaps the desired effect is this http://hc.yinyuetai.com/uploads/videos/common/B7D20154766D39739AF193BCE138419F.flv? sc\u003d0743670c523be875\u0026br\u003d759\u0026vid\u003d2561631\u0026aid\u003d311\u0026area\u003dHT\u0026vst\u003d2 ..

Read more

Why does everyone advocate writing scripts in Python? Does Python have any special advantages? I feel as if PHP has no qualitative advantages.Node.js is asynchronous, so it is more suitable for writing scripts, but Python? Why? Because I am preparing to write scripts recently, I am struggling with which language to write Python/PHP.Experienced friends ask ..

Read more

Scenario recurrence process: Machine A LAN Address: 192.168.9.8 Machine B LAN Address: 192.168.9.9 Configure the hosts addresses of machines a and b respectively: Address of Configuration Machine A: 192.168.9.8-> a.site.com Address of Configuration Machine B: 192.168.9.9-> b.site.com Machine A is the front-end js code, starts the service, and requests machine B (on behalf of the ..

Read more

To help friends get a program, it is post in an easy language environment. I will pass a string of JSON with Chinese to node server. The string is as follows {“itemdata”: {“ntype”: “1”, “NBA oyou”: “0”, “szitemid”: “536347062406”, “title”: “autumn and winter new women’s clothing Korean version of semi-high collar fur women’s padded slim ..

Read more