Posts

php - Secure streaming link -

i have problem secure , protect video link direct downloads. i trying make link http://server1.site.com/videos/123/456/789.mp4?key=0457043013fbd9ebae8ae3 where in key= can add user, session, id, or else, , in way protect direct download without proper key. http://server1.site.com/videos/123/456/789.mp4 how make work .htaccess ? on apache web server , don't know other way make this. this example : stream link , can downloaded http://pdl.vimeocdn.com/42891/829/162390948.mp4?aktimeoffset=0&aksessionid=3b9dcceb7a14b3436e0a7bfa0b40126b&token=1369110913_9c3017a9a1bbb77b1ca36c7b7c1eb70f but can't download http://pdl.vimeocdn.com/42891/829/162390948.mp4

asp.net - Unable to locate Global asax file in web app VS2012 -

i'm building web application in visual studio 2012. meet error such webforms unobtrusivevalidationmode requires scriptresourcemapping 'jquery'. please add scriptresourcemapping named jquery(case-sensitive). therefore after googling, says need edit parts in global asax file. however, i'm not able locate global asax file when create web app. i'm able find when create website. the global.asax file not required. here info microsoft. if right click on project , go add->new item , open wizard, can select web in left box , global application class in right box automatically add global.asax file in name box , can create easily. hope helps.

java - How to set the camera within a cube? -

Image
i have cube has different color each side-lock - public void display(glautodrawable drawable) { final gl gl = drawable.getgl(); gl.glclear(gl.gl_color_buffer_bit | gl.gl_depth_buffer_bit); ///// set camera ///// setcamera(gl, glu, 100); // /////// cube - start /////////// // cube // ----- render color cube ----- gl.glloadidentity(); // reset current model-view matrix gl.gltranslatef(0f, 0.0f, -7.0f); // translate right , // screen gl.glrotatef(anglecube, 1.0f, 1.0f, 1.0f); // rotate x, y , // z-axes gl.glbegin(gl.gl_quads); // of color cube // top-face gl.glcolor3f(0.0f, 1.0f, 0.0f); // green gl.glvertex3f(1.0f, 1.0f, -1.0f); gl.glvertex3f(-1.0f, 1.0f, -1.0f); gl.glvertex3f(-1.0f, 1.0f, 1.0f); gl.glvertex3f(1.0f, 1.0f, 1.0f); ...

javascript - multiple async mongo request in nodejs -

how write multiple queries in row? like a space.findone({ _id: id }, function(err, space) { user.findone({ user_id: userid }, function(err, user) { res.json({ space: space, user: user}); }); }); does not more requests , logic how done correctly? i heard promise, not know. thanks when i've had similar issue, i've used async library. async.parallel([ function(callback){ space.findone({ _id: id }, callback); }, function(callback){ user.findone({ user_id: userid },callback); } ], function(err, results){ res.json({space:results[0],user:results[1]}); }); you can use async.series if want sequential execution.

ruby on rails - ERROR -- : reaped #<Process::Status: pid 4335 exit 1> worker=0 -

i trying since 2 days deploy on vps (ubuntu 12.04 server (64 bits)) using : ruby (1.9.3-rc1), rails, capistrano, nginx , unicorn. i follow railscast tutorial ryan bates showing how deploy on vps scratch. actualy cap deploy:cold command seems work fine (as others) when try go on url fall on "we're sorry went wront" => default error page rails. in production logs : migrating createquestionanswers (20130317152603) migrating createregions (20130502212531) migrating addregionidtosection (20130502212557) migrating createannonceimages (20130510130906) migrating addattachmentimagetoannonceimages (20130510130925) migrating createformations (20130510195503) migrating createinscriptions (20130510195627) migrating addattachmentimagetoformations (20130511182928) migrating addparamstoinscription (20130514231201) migrating addpaypalidtoinscription (20130514234243) (0.3ms) select "schema_migrations"."version" "schema_migrations" connectin...

data binding - databinding in WPF using a base class for field creation in various forms -

i had application working fields being created in class each field generated separately in usual fashion public class requestprofileobject : inotifypropertychanged { public event propertychangedeventhandler propertychanged; private string strpassword; public string pwd { { return strpassword; } set { strpassword = value; // call onpropertychanged whenever property updated onpropertychanged("pwd"); } } //plus other code load data field , onpropertychanged //method } then saw needed able keep track of changes , came mechanism , other features needed. needless lot of repeated code caused me have bright idea of making class these object. public class etlbasefield : inotifypropertychanged { public event propertychangedeventhandler propertychanged; private string strfieldprime; private string strfield; private string strfieldname; ...

Prolog zodiacal and leap year -

i'm trying tell me zodiacal sign , if year leap year of in prolog and looks great it's shows me error when try cosnult here code /* 7. horóscopo horoscopo(signo,diaini,mesini,diafin,mesfin) <- son del signo signo los nacidos entre el dia ini/mesini y el diafin/mesfin */ horoscopo(aries,21,3,21,4). horoscopo(tauro,21,4,21,5). horoscopo(geminis,21,5,21,6). horoscopo(cancer,21,6,21,7). horoscopo(leo,21,7,21,8). horoscopo(virgo,21,8,21,9). horoscopo(libra,21,9,21,10). horoscopo(escorpio,21,10,21,11). horoscopo(sagitario,21,11,21,12). horoscopo(capricornio,21,12,21,1). horoscopo(acuario,21,1,21,2). horoscopo(piscis,21,2,21,3). mes(1,31,enero). mes(2,28,febrero). mes(3,31,marzo). mes(4,30,abril). mes(5,31,mayo). mes(6,30,junio). mes(7,31,julio). mes(8,31,agosto). mes(9,30,septiembre). mes(10,31,octubre). mes(11,30,noviembre). mes(12,31,diciembre). signo(dia,mes,signo) :-horoscopo(signo,d1,m1,d2,m2),((mes=m1,dia>=d1,mes(m1,d,_),dia=<d);(mes=m2,dia=<d2,d...