Posts

java - How exactly works this Spring Security example? -

i pretty new in spring security , have doubt related configuration found tutorial. this spring-security.xml file used spring security configuration project: <?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:security="http://www.springframework.org/schema/security" xsi:schemalocation="http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <security:http> <security:intercept-url pattern="/springlogin" access="permitall"/> <security:intercept-url pattern="/dospringlogin" access="permitall"/> <security:intercept-url pattern=...

Sendgrid Web API set multiple users in reply_to field with C# -

i´m using sendgrid email service library c# , trying set multiple users in replyto field. this code sends e-mail var msg = new sendgridmessage() { subject = somesubject, = new mailaddress("from@mail.com", "from name"), = new mailaddress[] {new mailaddress("destination@mail.com","destinationname")}, bcc = new mailaddress[] { new mailaddress("bccdestination@mail.com", "bccdestinationname"), }, replyto = new mailaddress[]{ new mailaddress("someone@email.com", "jhon doe"), new mailaddress("jsmith@email.com", "jhon smith"), }, html = somehtml }; when check email sended, , try answer it, appears first mail address (someone@email.com) added , there no trace of second 1 (jsmith@email.com). can do?

libgdx - Java / box2DLights - Wrong light position -

Image
i'm using libgdx project , more precisely box2dlights. my problem following 1 : when want put new "pointlight" it's on center of screen. , if change coordinates, doesn't work. inside "show()" method : box2d.init(); world = new world(new vector2(0, 0), true); rh = new rayhandler(world); rh.setambientlight(1.2f, 0.2f, 0.2f, 0.1f); pl = new pointlight(rh, 100, new color(1,1,1,1),(float) 0.5,0,0); inside "render()" method : gdx.gl.glclearcolor(0f, 0f, 0f, 1f); gdx.gl.glclear(gl20.gl_color_buffer_bit); world.step(delta, 8, 3); renderer.begin(shapetype.filled); (solarsystem ss : solarsystemlist) { if(ss.getcolor() <= 15) colorss = color.yellow; else if(ss.getcolor() > 15 && ss.getcolor() < 31) colorss = color.orange; else if(ss.getcolor() > 30 && ss.getcolor() < 46) colorss = color.red; else if(ss.getcolor() > 45) colorss = c...

html - Making a div fade in and out on link hover -

what i'm trying on hovering on link want invisible image fade in. when user stops hovering fades out again. works on hover image appears not work not fade in or out, image appears or disappears. my html: <div class="hover_img"><a href="#">action menu<span><img src="img/screenshot/actionmenu.jpg" alt="image" height="50" /></span></a></div> my css: .hover_img { display:inline } .hover_img { position:static; } .hover_img span { position:fixed; bottom: 40%; right: 0; display:none; z-index:99; opacity: 0.0; transition: opacity 1s ease-in-out; -moz-transition: opacity 1s ease-in-out; -webkit-transition: opacity 1s ease-in-out; } .hover_img a:hover span { display:block; opacity: 1.0; transition: opacity .55s ease-in-out; -moz-transition: opacity .55s ease-in-out; -webkit-transition: opacity .55s ease-in-out; } remove display:none; , display:block; . transition opacity work...

osx - Failed with running subprocess from Python launcher without terminal window on Mac -

my ultimate goal run python script (the code need call subprocess ) without terminal. i tried python launcher on mac. code works correctly when "run in terminal window" checked. (notice shell=false default here.) however, won't run subprocess correctly when uncheck option. i tried run in mac os automator ( run shell script ) — negative too. here small sample code. import subprocess open("record","w") f: subprocess.call(["which","ipython"], stdout = f) # line fails subprocess.call(["open","."]) # line works if run terminal, creates record file, shows ipython path. when run automator or python launcher without terminal window, creates empty file.

Rock Paper Scissors javascript using matrix -

hello new here , taking javascript course @ university software development degree. running issue in rock paper scissors lizard spock final project. professor has given qunit tests can check our code not @ understanding how errors show me whats wrong don't understand how code work. far have created objects , gave them properties , methods. created matrix capture , retain variations of win conditions. don't understand how create final method need: getwinner. in our rubric states following: "method evaluate won game. should update wins, losses, , rate of each player. should set "winner" property name of winning player." here game.js file working on. @ bottom stumped how start getwinner function. have started not responding unit tests. can post code if need well. other file object. var game = function(){ this.running = false; this.name = "rpsls"; this.players = []; this.addplayer = function(name){ var player = new player(name); ...

c++ - invalid conversion from 'int' to int* [-fpermissive] -

previously had implemented , worked: int *train_x = (int *)mxgetdata(in_a);// pointer 6th argument matrix train_x (int = 0; < 6; i++) { (int j = 0; j < 6; j++) { cout << train_x[6 * + j] << endl; } } int sizetrain_x1 = mxgetm(in_a); int sizetrain_x2 = mxgetn(in_a); i manage check if correct sizes following , good. cout <<"training input numofcollum:\n"<< sizetrain_x1 << endl; cout << "training input numofrows:\n"<<sizetrain_x2 << endl; but when trying entire program following initialization compilation error: for (int epoch = 0; epoch<training_epochs; epoch++) { (int = 0; i<train_s; i++) { rbm.contrastive_divergence(train_x[i], learning_rate, k); } } here error message: rbm.cpp: in function ‘void mexfunction(int, mxarray**, int, const mxarray**)’: rbm.cpp:570:64: error: invalid conversion ‘int’ ‘int*’ [-fpermissive] rbm.cpp:81:6...