
Hi Habr, taking advantage of the situation, I will not miss a moment to congratulate you on the day of knowledge, and I hasten to submit to the Lynch court our new
test project related to this holiday.
What?
I will begin with an explanation of the name -
So, what is a corridor ?! According to Ozhegov's dictionary, one of the meanings of this word is “a narrow, long space connecting something with it”. What connects our corridor? And why at its end, as at the end of the well-known tunnel, the light is on? This corridor is designed to connect those who have problems with studying at the university, and those who can help to overcome such problems. If for some reason you cannot or do not want to complete course work, sample calculation, essay, etc. Or vice versa, you can offer your services in their fulfillment, then to you in our corridor!
It seems to us the project should be claimed, because Studying at the far 1st course, I almost did not close the blue TC window closer to the session, making coursework and laboratory fellow students, I think many of us can boast of such an experience.
For avoiding misunderstandings, I will make a reservation right away, I hope among the habrovchan there will be no “customers” in our project.Briefly about the main thing
There are two types of users on the project (as on most freelance exchanges): customers and performers. The first ones can add orders (projects) to comment on the performers and vote for them, the second ones can respond to orders, “specialize” in some area of ​​knowledge, and, actually, fulfill these orders).
Also, according to the URL of the order and the artist, a picture with a QR code is attached so that you can promote your services to a cool physicist / mathematician / chemist / biologist / itd. also offline, where so far all the studies at the university and happening.
')
Interesting
There is also a small one, a
chip with which you can take the integral (symbolic integration using tungsten), however, I did not manage to get an API-key for using full-fledged api in tungsten, so now everything works through self-knowledge (based on The code dynamically connects to the js script, which is an object created by the tungsten response lines to this request (because the browser’s security policy does not allow sending a request to direct tungsten), then we simply parse this output and p isu image with integral). In order that what is written above was more understandable:
connect js script using this function
function include_rpc(script_filename){
var html_doc = document .getElementsByTagName( 'head' ).item(0);
var js = document .createElement( 'script' );
js.setAttribute( 'language' , 'javascript' );
js.setAttribute( 'type' , 'text/javascript' );
js.setAttribute( 'src' , script_filename);
html_doc.appendChild(js);
js.onload = function (){
// ..
InterView();
}
return false ;
}
* This source code was highlighted with Source Code Highlighter .
with this URL
include_rpc ('http://gopnikam.net/cgi-bin/ACD.js?headers= (Content-Type = text / xml) & uri = (http://www.wolframalpha.com/input/?i=Integrate [ '+ func +'% 2C '+ def +']) ');
at this address we are waiting for the
AJAX Cross Domain library file
This is a perl script that accesses the tungsten server via http and transfers all the parameters of our integral and forms the output as a js object. In order to work normally with several URLs, you need to sharpen the file a bit, and change the response time. The conclusion is about
var ACD = new Object();
// ----------------------------------------------------------------
// ACD.request - FULL REQUEST THAT WAS SENT
// ----------------------------------------------------------------
ACD.request = '' ;
ACD.request += 'GET http:\/\/www.wolframalpha.com\/input\/?i=Integrate[%27%20+%20func%20+%20%27%2C%27%20+%20def%20+%20%27]\r\n' ;
ACD.request += 'Range: bytes=0-10239999\r\n' ;
ACD.request += 'User-Agent: Mozilla\/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.3pre) Gecko\/20090822 Ubuntu\/9.04 (jaunty) Shiretoko\/3.5.3pre FirePHP\/0.3\r\n' ;
ACD.request += 'Content-Type: text\/xml\r\n' ;
......
* This source code was highlighted with Source Code Highlighter .
Then I think it is clear what to do with it.
So what?
The idea does not come on schedule, and the idea to write something like that came at the end of August, well, I naturally wanted to have time for September 1, so the likelihood of nasty bugs is non-zero, for this you actually turned for help to you, dear Habroklegle.