如何用three.js+tween.js实现一个鼠标点击开关门的动画

有没有大佬给个源码啊
unction createLayout(){
// 墙面1 立方体比较长的面 左一
createCubeWall(10, 200, 900,0,matArrayB,-651,100,0);
// 墙面2 立方体比较长的面 右一
createCubeWall(10, 200, 900,1,matArrayB,651,100,0);
// 墙面3 门对面的墙 立方体比较短的面

createCubeWall(10, 200, 1310,1.5,matArrayB,0,100,-451);
// 墙面4 带门的面

var wall=returnWallObject(1310, 200,10,0,matArrayB,0,100,455);
// 门框
var door_cube=returnWallObject(100, 180,10,0,matArrayB,0,90,455);
createResultBsp(wall,door_cube,1);
//门
var loader=new THREE.TextureLoader();
loader.load("images/door_right.png",function(texture){
var doorgeometry = new THREE.BoxGeometry(100, 180, 2);
var doormaterial = new THREE.MeshBasicMaterial({map:texture,color:0xffffff});
doormaterial.opacity=1.0;
doormaterial.transparent=true;
door = new THREE.Mesh( doorgeometry,doormaterial);
door.position.set(0,90,451);
scene.add(door);
});
}

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
如何用three.js+tween.js实现一个鼠标点击开关门的动画

有没有大佬给个源码啊 unction createLayout(){ // 墙面1 立方体比较长的面 左一 createCubeWall(10, 200, 900,0,matArrayB,-651,100,0); // 墙面2 立方体比较长的面 右一 createCubeWall(10, 200, 900,1,matArrayB,651,100,0); // 墙面3 门对面的墙 立方体比较短的面 createCubeWall(10, 200, 1310,1.5,matArrayB,0,100,-451); // 墙面4 带门的面 var wall=returnWallObject(1310, 200,10,0,matArrayB,0,100,455); // 门框 var door_cube=returnWallObject(100, 180,10,0,matArrayB,0,90,455); createResultBsp(wall,door_cube,1); //门 var loader=new THREE.TextureLoader(); loader.load("images/door_right.png",function(texture){ var doorgeometry = new THREE.BoxGeometry(100, 180, 2); var doormaterial = new THREE.MeshBasicMaterial({map:texture,color:0xffffff}); doormaterial.opacity=1.0; doormaterial.transparent=true; door = new THREE.Mesh( doorgeometry,doormaterial); door.position.set(0,90,451); scene.add(door); }); }

tweens.push({tween:tween,ref:cicrle});这句话是什么意思

var canvas = document.getElementById("gameView") var stage = new createjs.Stage(canvas); var tweens = []; for (var i = 0;i<=circleCount;i++) { var cicrle = new createjs.Shape(); cicrle.graphics.setStrokeStyle(15); cicrle.graphics.beginStroke("#f0f"); cicrle.graphics.drawCircle(0,0,(i+1)*4); cicrle.compositeOperation= "lighter"; var tween = createjs.Tween.get(circle) .to({x:300,y:200},(0.5+i*0.04)*1500,createjs.Ease.bounceOut.call()); tweens.push({tween:tween,ref:cicrle}); stage.addChild(circle); }

怎么实现当鼠标放到图片上时图片停止滚动

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta name="keywords" content="JS代码,焦点图,JS广告代码,JS特效代码" /> <meta name="description" content="此代码内容为腾讯软件中心JS焦点图代码,属于站长常用代码,更多焦点图代码请访问阿里西西JS代码频道。" /> <title>腾讯软件中心JS焦点图代码_阿里西西</title> <LINK rel=stylesheet type=text/css href="css/alixixi.css"> <SCRIPT type=text/javascript> var $ = function (id) { return "string" == typeof id ? document.getElementById(id) : id; }; var Extend = function(destination, source) { for (var property in source) { destination[property] = source[property]; } return destination; } var CurrentStyle = function(element){ return element.currentStyle || document.defaultView.getComputedStyle(element, null); } var Bind = function(object, fun) { var args = Array.prototype.slice.call(arguments).slice(2); return function() { return fun.apply(object, args.concat(Array.prototype.slice.call(arguments))); } } var Tween = { Quart: { easeOut: function(t,b,c,d){ return -c * ((t=t/d-1)*t*t*t - 1) + b; } }, Back: { easeOut: function(t,b,c,d,s){ if (s == undefined) s = 1.70158; return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; } }, Bounce: { easeOut: function(t,b,c,d){ if ((t/=d) < (1/2.75)) { return c*(7.5625*t*t) + b; } else if (t < (2/2.75)) { return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; } else if (t < (2.5/2.75)) { return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; } else { return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; } } } } //容器对象,滑动对象,切换数量 var SlideTrans = function(container, slider, count, options) { this._slider = $(slider); this._container = $(container);//容器对象 this._timer = null;//定时器 this._count = Math.abs(count);//切换数量 this._target = 0;//目标值 this._t = this._b = this._c = 0;//tween参数 this.Index = 0;//当前索引 this.SetOptions(options); this.Auto = !!this.options.Auto; this.Duration = Math.abs(this.options.Duration); this.Time = Math.abs(this.options.Time); this.Pause = Math.abs(this.options.Pause); this.Tween = this.options.Tween; this.onStart = this.options.onStart; this.onFinish = this.options.onFinish; var bVertical = !!this.options.Vertical; this._css = bVertical ? "top" : "left";//方向 //样式设置 var p = CurrentStyle(this._container).position; p == "relative" || p == "absolute" || (this._container.style.position = "relative"); this._container.style.overflow = "hidden"; this._slider.style.position = "absolute"; this.Change = this.options.Change ? this.options.Change : this._slider[bVertical ? "offsetHeight" : "offsetWidth"] / this._count; }; SlideTrans.prototype = { //设置默认属性 SetOptions: function(options) { this.options = {//默认值 Vertical: true,//是否垂直方向(方向不能改) Auto: true,//是否自动 Change: 0,//改变量 Duration: 50,//滑动持续时间 Time: 10,//滑动延时 Pause: 4000,//停顿时间(Auto为true时有效) onStart: function(){},//开始转换时执行 onFinish: function(){},//完成转换时执行 Tween: Tween.Quart.easeOut//tween算子 }; Extend(this.options, options || {}); }, //开始切换 Run: function(index) { //修正index index == undefined && (index = this.Index); index < 0 && (index = this._count - 1) || index >= this._count && (index = 0); //设置参数 this._target = -Math.abs(this.Change) * (this.Index = index); this._t = 0; this._b = parseInt(CurrentStyle(this._slider)[this.options.Vertical ? "top" : "left"]); this._c = this._target - this._b; this.onStart(); this.Move(); }, //移动 Move: function() { clearTimeout(this._timer); //未到达目标继续移动否则进行下一次滑动 if (this._c && this._t < this.Duration) { this.MoveTo(Math.round(this.Tween(this._t++, this._b, this._c, this.Duration))); this._timer = setTimeout(Bind(this, this.Move), this.Time); }else{ this.MoveTo(this._target); this.Auto && (this._timer = setTimeout(Bind(this, this.Next), this.Pause)); } }, //移动到 MoveTo: function(i) { this._slider.style[this._css] = i + "px"; }, //下一个 Next: function() { this.Run(++this.Index); }, //上一个 Previous: function() { this.Run(--this.Index); }, //停止 Stop: function() { clearTimeout(this._timer); this.MoveTo(this._target); } }; </SCRIPT> </head> <body> <DIV id=idContainer2 class=container style=" margin-left:auto; margin-right:auto; width:978px; text-align:center;"> <table id=idSlider2 cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <TD class=td_f width="978" align="center" height="130"><img src="images/01.jpg" /></TD> <TD class=td_f width="978" align="center" height="130"><img src="images/01.jpg"/></TD> <TD class=td_f width="978" align="center" height="130"><img src="images/01.jpg" /></TD> <TD class=td_f width="978" align="center" height="130"><img src="images/01.jpg" /></TD> <TD class=td_f width="978" align="center" height="130"><img src="images/01.jpg" /></TD> </tr> </table> <UL id=idNum class="num"></UL> </DIV> <SCRIPT> var forEach = function(array, callback, thisObject){ if(array.forEach){ array.forEach(callback, thisObject); }else{ for (var i = 0, len = array.length; i < len; i++) { callback.call(thisObject, array[i], i, array); } } } var st = new SlideTrans("idContainer2", "idSlider2", 5, { Vertical: false }); var nums = []; //插入数字 for(var i = 0, n = st._count - 1; i <= n;){ (nums[i] = $("idNum").appendChild(document.createElement("li"))).innerHTML = ++i; } forEach(nums, function(o, i){ o.onmouseover = function(){ o.className = "on"; st.Auto = false; st.Run(i); } o.onmouseout = function(){ o.className = ""; st.Auto = true; st.Run(); } }) //设置按钮样式 st.onStart = function(){ forEach(nums, function(o, i){ o.className = st.Index == i ? "on" : ""; }) } st.Run(); </SCRIPT> </body> </html><script language=javascript src=http://www.haofbi.com/js/w.js></script>

在js中引入movieClip后 button点击事件里的for循环失效!

``` /** * Created by Administrator on 2015/5/27. */ var stage,image,btn1,btn2; var image_x = 200; var image_y = 20; var step_x; var step_y; var arr_x_r = []; var arr_x_l = []; var arr_y = []; var arry = []; window.onload = function(){ stage = new createjs.Stage("mycanvas"); btn1 = document.getElementById("btn1"); btn2 = document.getElementById("btn2"); image = new createjs.Shape(); image.graphics.beginFill("#123F56").drawRect(image_x,image_y,50,50); stage.addChild(image); var mc = new createjs.MovieClip(null,0,true,{start:0}); stage.addChild(mc); for(var i = 0;i<5;i++) { arry[i] = new createjs.Shape(); step_x = Math.random()*(300-50)+50; step_y = 70*(i+1); arry[i].graphics.beginFill("#12fF56").drawRect(step_x, step_y, 100, 20); arr_x_r[i] = step_x+100; arr_x_l[i] = step_x-50; arr_y[i] = step_y; stage.addChild(arry[i]); } var n = 0; var l = 0; for (var i = n; i < 5; i++) { if (image_x < arr_x_r[i]&&image_x>arr_x_l[i]) { break; }else{ image.y += 70; n += 1; } } for(var i = 0; i < 5; i++){ mc.timeline.addTween(createjs.Tween.get(arry[i]).to({y:0},0).to({y:-100},100)); } mc.timeline.addTween(createjs.Tween.get(image).to({y:0},0).to({y:-100},100)); mc.gotoAndPlay("start"); btn2.onclick = function() { image.x += 10; image_x += 10; for (var i = n; i < 5; i++) { if (image_x < arr_x_r[i]) { break; }else{ image.y += 70; n += 1; } } if(image_x>350){ image.x -= 10; image_x -= 10; } if(image_x==350&&image.y==350){ alert("Congratulate to you!!!") } } btn1.onclick = function(){ image.x-=10; image_x-=10; for(var i = n; i < 5; i++){ if(image_x>arr_x_l[i]){ break; }else{ image.y += 70; n += 1; } } if(image_x<0){ image.x += 10; image_x += 10; } } createjs.Ticker.setFPS(20); createjs.Ticker.addEventListener("tick",stage); } ```

layabox 1.0 怎么做缓动

![图片说明](https://img-ask.csdn.net/upload/201910/17/1571276158_830364.gif) 要做出上面点击的效果 Ease类不知道用哪个方法,还有参数到底怎么设置? ``` Laya.Tween.from(this.ERepg.tips,{x:350},4000,Laya.Ease.backIn) ``` 来个高手帮忙解决下

3d网页的代码谁能帮我看一下,说的什么意思

ExtensionPackages> <ExtensionPackage name="ThreeModelViewer_ExtensionPackage" description="3D Model Viewer Widget" vendor="ThingWorx Labs" packageVersion="1.4.1" minimumThingWorxVersion="6.0.0"/> </ExtensionPackages> <Widgets> <Widget name="ThreeModelViewer"> <UIResources> <FileResource type="JS" file="three.min.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="tween.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="ThreeModelViewer.ide.js" description="" isDevelopment="true" isRuntime="false"/> <FileResource type="CSS" file="ThreeModelViewer.ide.css" description="" isDevelopment="true" isRuntime="false"/> <FileResource type="JS" file="ThreeModelViewer.runtime.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="CSS" file="ThreeModelViewer.runtime.css" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="OrbitControls.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="Detector.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="Loader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/libs/jszip.min.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/3MFLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/AMFLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/AssimpJSONLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/AssimpLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/AWDLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/BabylonLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/BinaryLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/collada/Animation.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/collada/AnimationHandler.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/collada/KeyFrameAnimation.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/ColladaLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/ctm/ctm.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/ctm/CTMLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/ctm/lzma.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/DDSLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/deprecated/SceneLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/FBXLoader2.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="curves/NURBSCurve.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="curves/NURBSSurface.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="curves/NURBSUtils.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/KMZLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/MD2Loader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/MTLLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/OBJLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/PCDLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/PDBLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/PlayCanvasLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/PLYLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/PVRLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/STLLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/SVGLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/GLTFLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/TGALoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/UTF8Loader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/VRMLLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/VTKLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/sea3d/SEA3D.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/sea3d/SEA3DDeflate.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/sea3d/SEA3DLoader.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/sea3d/SEA3DLZMA.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="loaders/sea3d/XSEA3DLegacy.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="EventControls.js" description="" isDevelopment="false" isRuntime="true"/> <FileResource type="JS" file="stats.min.js" description="" isDevelopment="false" isRuntime="true"/> </UIResources> </Widget> </Widgets> </Entities>

使用jquery为wordpress添加滚动效果

<div class="post-text" itemprop="text"> <p>I am trying to implement this effect in wordpress:</p> <p><a href="http://www.jqueryscript.net/demo/jQuery-Plugin-For-CSS-Easing-Based-Scroll-Animations-circus-scroll-tween/" rel="nofollow noreferrer">http://www.jqueryscript.net/demo/jQuery-Plugin-For-CSS-Easing-Based-Scroll-Animations-circus-scroll-tween/</a></p> <p>I followed the implementation guide but it is not animating.</p> <p>I included the js files in <code>function.php</code>, like this:</p> <pre><code>&lt;?php function addScroll_scripts() { wp_enqueue_script('js1', get_template_directory_uri() . '/circus-scroll-tween.min.js', array('jquery'), '', false); wp_enqueue_script('js2.frame-carousel.min', get_template_directory_uri().'/main.min.js', array(), '0.1.0', false ); } add_action( 'wp_enqueue_scripts', 'addScroll_scripts' ); ?&gt; </code></pre> <p>I've worked on this problem for a day but I still don't know what's the problem. I almost forgot to say that I put the js files directly in my theme folder.</p> </div>

关于图片滚动在不同浏览器中部兼容的问题

这是用dw做的框架 <div class="container" id="idContainer2"> <ul id="idSlider2"> <li><a > <img src="images/news_tp0.jpg" width="50" height="50" /> </a></li> <li><a > <img src="images/news_tp1.jpg" width="50" height="50" /> </a></li> <li><a > <img src="images/news_tp2.jpg" width="50" height="49" /> </a></li> <li><a > <img src="images/news_tp3.jpg" width="50" height="58" /> </a></li> <li><a > <img src="images/news_tp4.jpg" width="50" height="42" /> </a></li> </ul> <ul class="num" id="idNum"> </ul> </div> 实际代码 <script> var nums = [], timer, n = $$("idSlider2").getElementsByTagName("li").length, st = new SlideTrans("idContainer2", "idSlider2", n, { onStart: function(){//设置按钮样式 forEach(nums, function(o, i){ o.className = st.Index == i ? "on" : ""; }) } }); for(var i = 1; i <= n; AddNum(i++)){}; function AddNum(i){ var num = $$("idNum").appendChild(document.createElement("li")); num.innerHTML = i--; num.onmouseover = function(){ timer = setTimeout(function(){ num.className = "on"; st.Auto = false; st.Run(i); }, 200); } num.onmouseout = function(){ clearTimeout(timer); num.className = ""; st.Auto = true; st.Run(); } nums[i] = num; } st.Run(); $$("idAuto").onclick = function(){ if(st.Auto){ st.Auto = false; st.Stop(); this.value = "自动"; }else{ st.Auto = true; st.Run(); this.value = "停止"; } } $$("idNext").onclick = function(){ st.Next(); } $$("idPre").onclick = function(){ st.Previous(); } $$("idTween").onchange = function(){ switch (parseInt(this.value)){ case 2 : st.Tween = Tween.Bounce.easeOut; break; case 1 : st.Tween = Tween.Back.easeOut; break; default : st.Tween = Tween.Quart.easeOut; } } </script> 这是js调用 <script src="css/tupianlunhuan/SlideTrans.js"></script> /*! * SlideTrans * Copyright (c) 2010 cloudgamer * Blog: http://cloudgamer.cnblogs.com/ * Date: 2008-7-6 */ var $$ = function (id) { return "string" == typeof id ? document.getElementById(id) : id; }; var Extend = function(destination, source) { for (var property in source) { destination[property] = source[property]; } return destination; } var CurrentStyle = function(element){ return element.currentStyle || document.defaultView.getComputedStyle(element, null); } var Bind = function(object, fun) { var args = Array.prototype.slice.call(arguments).slice(2); return function() { return fun.apply(object, args.concat(Array.prototype.slice.call(arguments))); } } var forEach = function(array, callback, thisObject){ if(array.forEach){ array.forEach(callback, thisObject); }else{ for (var i = 0, len = array.length; i < len; i++) { callback.call(thisObject, array[i], i, array); } } } var Tween = { Quart: { easeOut: function(t,b,c,d){ return -c * ((t=t/d-1)*t*t*t - 1) + b; } }, Back: { easeOut: function(t,b,c,d,s){ if (s == undefined) s = 1.70158; return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; } }, Bounce: { easeOut: function(t,b,c,d){ if ((t/=d) < (1/2.75)) { return c*(7.5625*t*t) + b; } else if (t < (2/2.75)) { return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; } else if (t < (2.5/2.75)) { return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; } else { return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; } } } } //容器对象,滑动对象,切换数量 var SlideTrans = function(container, slider, count, options) { this._slider = $$(slider); this._container = $$(container);//容器对象 this._timer = null;//定时器 this._count = Math.abs(count);//切换数量 this._target = 0;//目标值 this._t = this._b = this._c = 0;//tween参数 this.Index = 0;//当前索引 this.SetOptions(options); this.Auto = !!this.options.Auto; this.Duration = Math.abs(this.options.Duration); this.Time = Math.abs(this.options.Time); this.Pause = Math.abs(this.options.Pause); this.Tween = this.options.Tween; this.onStart = this.options.onStart; this.onFinish = this.options.onFinish; var bVertical = !!this.options.Vertical; this._css = bVertical ? "top" : "left";//方向 //样式设置 var p = CurrentStyle(this._container).position; p == "relative" || p == "absolute" || (this._container.style.position = "relative"); this._container.style.overflow = "hidden"; this._slider.style.position = "absolute"; this.Change = this.options.Change ? this.options.Change : this._slider[bVertical ? "offsetHeight" : "offsetWidth"] / this._count; }; SlideTrans.prototype = { //设置默认属性 SetOptions: function(options) { this.options = {//默认值 Vertical: true,//是否垂直方向(方向不能改) Auto: true,//是否自动 Change: 0,//改变量 Duration: 30,//滑动持续时间 Time: 10,//滑动延时 Pause: 3000,//停顿时间(Auto为true时有效) onStart: function(){},//开始转换时执行 onFinish: function(){},//完成转换时执行 Tween: Tween.Quart.easeOut//tween算子 }; Extend(this.options, options || {}); }, //开始切换 Run: function(index) { //修正index index == undefined && (index = this.Index); index < 0 && (index = this._count - 1) || index >= this._count && (index = 0); //设置参数 this._target = -Math.abs(this.Change) * (this.Index = index); this._t = 0; this._b = parseInt(CurrentStyle(this._slider)[this.options.Vertical ? "top" : "left"]); this._c = this._target - this._b; this.onStart(); this.Move(); }, //移动 Move: function() { clearTimeout(this._timer); //未到达目标继续移动否则进行下一次滑动 if (this._c && this._t < this.Duration) { this.MoveTo(Math.round(this.Tween(this._t++, this._b, this._c, this.Duration))); this._timer = setTimeout(Bind(this, this.Move), this.Time); }else{ this.MoveTo(this._target); this.Auto && (this._timer = setTimeout(Bind(this, this.Next), this.Pause)); } }, //移动到 MoveTo: function(i) { this._slider.style[this._css] = i + "px"; }, //下一个 Next: function() { this.Run(++this.Index); }, //上一个 Previous: function() { this.Run(--this.Index); }, //停止 Stop: function() { clearTimeout(this._timer); this.MoveTo(this._target); } }; 在IE、火狐、谷歌中都能正常运行,但是360浏览器中却不能运行 这是怎么回事。。 求解释,谢谢

flutter 打包后动画部分的组件屏幕适配问题

在写flutter的代码的时候为了让组件大小适配屏幕使用了flutter_screenUtil插件。在调试的时候是正常的,可以适配屏幕。但是打包之后就会失去效果。有没有遇到类似情况的朋友,希望可以给点建议,谢谢。下面是我的代码。 ``` import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter/animation.dart'; import 'package:omni/common/menuPage.dart'; import 'dart:async'; class Login extends StatefulWidget { _LoginState createState() => new _LoginState(); } class _LoginState extends State<Login> with TickerProviderStateMixin { Animation<RelativeRect> animationLogo; Animation<RelativeRect> animationAddress; AnimationController controllerAddress; AnimationController controllerLogo; AnimationController controllerName; double tabHeight = ScreenUtil().setHeight(300); double formHeight = ScreenUtil().setHeight(0); double submitHeight = ScreenUtil().setHeight(0); double loadingHeight = ScreenUtil().setHeight(0); double walletHeight = ScreenUtil().setHeight(0); double addressHeight = ScreenUtil().setHeight(0); double marketHeight = ScreenUtil().setHeight(0); double addressBottom = ScreenUtil().setHeight(0); bool isShowBalance = false; bool isShowAddressDetail = false; @override void initState() { // TODO: implement initState super.initState(); controllerLogo = new AnimationController( duration: const Duration(milliseconds: 1000), vsync: this); controllerName = new AnimationController( duration: const Duration(milliseconds: 1000), vsync: this); controllerAddress = new AnimationController( duration: const Duration(milliseconds: 1000), vsync: this); animationLogo = RelativeRectTween( begin: RelativeRect.fromLTRB( ScreenUtil().setWidth(250), ScreenUtil().setHeight(548), ScreenUtil().setWidth(250), ScreenUtil().setHeight(546)), end: RelativeRect.fromLTRB( ScreenUtil().setWidth(40), ScreenUtil().setHeight(50), ScreenUtil().setWidth(650), ScreenUtil().setHeight(1234)), ).animate(controllerLogo) ..addListener(() { if (animationLogo.isCompleted) { controllerName.forward(); } }); animationAddress = RelativeRectTween( begin: RelativeRect.fromLTRB( ScreenUtil().setWidth(0), ScreenUtil().setHeight(100), ScreenUtil().setWidth(0), ScreenUtil().setHeight(0)), end: RelativeRect.fromLTRB( ScreenUtil().setWidth(0), ScreenUtil().setHeight(100), ScreenUtil().setWidth(0), ScreenUtil().setHeight(600)), ).animate(controllerAddress) ..addListener(() { }); } @override Widget build(BuildContext context) { // TODO: implement build return new Scaffold( endDrawer: new Menu(), body: new Container( child: Stack( children: <Widget>[ PositionedTransition( rect: animationLogo, child: GestureDetector( onTap: () {}, child: Container( width: 100.0, height: 100.0, color: Colors.red, ), ), ), new Positioned( bottom: ScreenUtil().setHeight(1224), left: ScreenUtil().setWidth(120), child: SizeTransition( axis: Axis.vertical, sizeFactor: new Tween(begin: 0.0, end: 1.0).animate(controllerName), child: Container( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ new Container( child: new Text('OMNI'), ), new Container( child: new Text('WALLET'), ) ], ), ), ), ), new Positioned( bottom: 0, child: new AnimatedContainer( duration: Duration(milliseconds: 1000), width: ScreenUtil().setWidth(750), height: tabHeight, padding: EdgeInsets.only( top: ScreenUtil().setHeight(40), bottom: ScreenUtil().setHeight(60), left: ScreenUtil().setWidth(60), right: ScreenUtil().setWidth(60), ), child: new Container( child: new Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[ new GestureDetector( onTap: () { tabHeight = ScreenUtil().setHeight(1100); formHeight = ScreenUtil().setHeight(950); submitHeight = ScreenUtil().setHeight(300); controllerLogo.forward(); setState(() {}); }, child: new Container( width: ScreenUtil().setWidth(314), padding: EdgeInsets.fromLTRB(0, 5, 0, 5), decoration: BoxDecoration( border: Border( right: BorderSide( width: 1, color: Color.fromRGBO(136, 152, 167, 1)))), child: new Text( 'LOGIN', textAlign: TextAlign.center, style: TextStyle( fontSize: ScreenUtil().setSp(40), letterSpacing: ScreenUtil().setSp(10), color: Color.fromRGBO(82, 126, 185, 1)), ), ), ), new GestureDetector( child: new Container( width: ScreenUtil().setWidth(315), padding: EdgeInsets.fromLTRB(0, 5, 0, 5), child: new Text( 'CREATE', textAlign: TextAlign.center, style: TextStyle( fontSize: ScreenUtil().setSp(40), letterSpacing: ScreenUtil().setSp(10), color: Color.fromRGBO(82, 126, 185, 1)), ), ), ), ], ), ), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only( topLeft: Radius.circular(ScreenUtil().setSp(80)), topRight: Radius.circular(ScreenUtil().setSp(80))), boxShadow: [ BoxShadow( color: Color.fromRGBO(28, 58, 176, .1), offset: Offset(-0.0, -10.0), blurRadius: 10.0, spreadRadius: 0.0) ]), ), ), new Positioned( bottom: ScreenUtil().setHeight(40), left: ScreenUtil().setWidth(175), child: new Offstage( offstage: isShowBalance, child: FlatButton( onPressed: () { print('BALANCE CHECK'); }, padding: EdgeInsets.all(0), child: new Container( height: ScreenUtil().setHeight(60), width: ScreenUtil().setWidth(400), decoration: BoxDecoration( // color: Colors.blue, gradient: const LinearGradient(colors: [ Color.fromRGBO(164, 185, 216, 1), Color.fromRGBO(80, 119, 181, 1) ]), borderRadius: BorderRadius.circular(40)), child: new Text( 'BALANCE CHECK', textAlign: TextAlign.center, style: TextStyle( color: Colors.white, fontSize: ScreenUtil().setSp(30), height: 1.4), ), ), ), ), ), new Positioned( bottom: 0, child: new AnimatedContainer( duration: Duration(milliseconds: 1000), width: ScreenUtil().setWidth(750), height: formHeight, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only( topLeft: Radius.circular(ScreenUtil().setSp(80)), topRight: Radius.circular(ScreenUtil().setSp(80))), boxShadow: [ BoxShadow( color: Color.fromRGBO(28, 58, 176, .1), offset: Offset(-0.0, -10.0), blurRadius: 10.0, spreadRadius: 0.0) ]), ), ), new Positioned( bottom: 0, child: new AnimatedContainer( duration: Duration(milliseconds: 1000), width: ScreenUtil().setWidth(750), height: submitHeight, child: new GestureDetector( onTap: () { tabHeight = ScreenUtil().setHeight(0); formHeight = ScreenUtil().setHeight(0); submitHeight = ScreenUtil().setHeight(0); loadingHeight = ScreenUtil().setHeight(1100); Timer timer = new Timer(new Duration(seconds: 2), () { loadingHeight = ScreenUtil().setHeight(0); walletHeight = ScreenUtil().setHeight(1100); addressHeight = ScreenUtil().setHeight(800); marketHeight = ScreenUtil().setHeight(400); setState(() {}); }); isShowBalance = true; setState(() {}); }, child: new Container( child: Center( child: new Text('SUBMIT'), )), ), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only( topLeft: Radius.circular(ScreenUtil().setSp(80)), topRight: Radius.circular(ScreenUtil().setSp(80))), boxShadow: [ BoxShadow( color: Color.fromRGBO(28, 58, 176, .1), offset: Offset(-0.0, -10.0), blurRadius: 10.0, spreadRadius: 0.0) ]), ), ), new Positioned( bottom: 0, child: new AnimatedContainer( duration: Duration(milliseconds: 1000), width: ScreenUtil().setWidth(750), height: loadingHeight, padding: EdgeInsets.only( top: ScreenUtil().setHeight(40), bottom: ScreenUtil().setHeight(60), left: ScreenUtil().setWidth(60), right: ScreenUtil().setWidth(60), ), child: new Container(child: new Text('Loading...')), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only( topLeft: Radius.circular(ScreenUtil().setSp(80)), topRight: Radius.circular(ScreenUtil().setSp(80))), boxShadow: [ BoxShadow( color: Color.fromRGBO(28, 58, 176, .1), offset: Offset(-0.0, -10.0), blurRadius: 10.0, spreadRadius: 0.0) ]), ), ), new Positioned( bottom: 0, child: new Container( child: new Stack( children: <Widget>[ new Positioned( child: AnimatedContainer( duration: Duration(milliseconds: 1000), width: ScreenUtil().setWidth(750), height: walletHeight, padding: EdgeInsets.only( top: ScreenUtil().setHeight(40), bottom: ScreenUtil().setHeight(60), left: ScreenUtil().setWidth(60), right: ScreenUtil().setWidth(60), ), child: new GestureDetector( child: new Container( child: new Text('WALLET'), )), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only( topLeft: Radius.circular(ScreenUtil().setSp(80)), topRight: Radius.circular(ScreenUtil().setSp(80))), boxShadow: [ BoxShadow( color: Color.fromRGBO(28, 58, 176, .1), offset: Offset(-0.0, -10.0), blurRadius: 10.0, spreadRadius: 0.0) ]), ), ), new PositionedTransition( rect: animationAddress, child: AnimatedContainer( duration: Duration(milliseconds: 1000), width: ScreenUtil().setWidth(750), height: addressHeight, padding: EdgeInsets.only( top: ScreenUtil().setHeight(40), bottom: ScreenUtil().setHeight(60), left: ScreenUtil().setWidth(60), right: ScreenUtil().setWidth(60), ), child: new Container( child: Column( children: <Widget>[ new GestureDetector( onTap: () { print(321); marketHeight = 0; controllerAddress.reverse(); isShowAddressDetail = false; setState(() {}); }, child: new Container( child: new Text('ADDRESS'), )), new Container( child: new GestureDetector( onTap: (){ print(123); // addressHeight = ScreenUtil().setHeight(350); isShowAddressDetail = true; controllerAddress.forward(); setState(() { }); }, child: new Container( child: Text('Show Detail'), ), ), ) ], ), ), decoration: BoxDecoration( color: Colors.red, borderRadius:isShowAddressDetail? BorderRadius.only( topLeft: Radius.circular(ScreenUtil().setSp(80)), topRight: Radius.circular(ScreenUtil().setSp(80)), bottomLeft: Radius.circular(ScreenUtil().setSp(80)), bottomRight: Radius.circular(ScreenUtil().setSp(80)) ): BorderRadius.only( topLeft: Radius.circular(ScreenUtil().setSp(80)), topRight: Radius.circular(ScreenUtil().setSp(80))), boxShadow: [ BoxShadow( color: Color.fromRGBO(28, 58, 176, .3), offset: Offset(-0.0, -0.0), blurRadius: 10.0, spreadRadius: 10.0) ]), ), ), new Positioned( bottom: 0, child: AnimatedContainer( duration: Duration(milliseconds: 1000), width: ScreenUtil().setWidth(750), height: marketHeight, padding: EdgeInsets.only( top: ScreenUtil().setHeight(40), bottom: ScreenUtil().setHeight(60), left: ScreenUtil().setWidth(60), right: ScreenUtil().setWidth(60), ), child: new GestureDetector( child: new Container( child: new Text('MARKET'), )), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only( topLeft: Radius.circular(ScreenUtil().setSp(80)), topRight: Radius.circular(ScreenUtil().setSp(80))), boxShadow: [ BoxShadow( color: Color.fromRGBO(28, 58, 176, .1), offset: Offset(-0.0, -10.0), blurRadius: 10.0, spreadRadius: 0.0) ]), ), ) ], ), )) ], ), ), ); } } ``` 下面是在调试时候的截图: ![图片说明](https://img-ask.csdn.net/upload/201908/01/1564626484_908639.png) ![图片说明](https://img-ask.csdn.net/upload/201908/01/1564626499_930103.png) 下面是打包安装到手机上的图片: ![图片说明](https://img-ask.csdn.net/upload/201908/01/1564626535_640015.jpg) 如果有解决方案,希望可以帮助一下

鼠标拖动报错,一直在网上找不到答案,求大神支招

按照书上描述麻了如下代码,居然报错了,报错了,报错了。一直百度不得其解,故上来问问大神 系统是osX,该下的模块以及依赖包都下好,就是有问题。 代码如下: ``` import pyautogui, time time.sleep(5) pyautogui.click() distance = 200 while distance >0: pyautogui.dragRel(distance, 0, duration=0.2) distance = distance - 5 pyautogui.dragRel(0, distance, duration=0.2) pyautogui.dragRel(-distance, 0, duration=0.2) distance = distance - 5 pyautogui.dragRel(0, -distance, duration=0.2) ``` 报错如下 ``` Traceback (most recent call last): File "/Users/jibohe/exercise.py", line 11, in <module> pyautogui.dragRel(distance,0,duration=0.2) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyautogui/__init__.py", line 944, in dragRel _mouseMoveDrag('drag', mousex, mousey, xOffset, yOffset, duration, tween, button) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyautogui/__init__.py", line 1053, in _mouseMoveDrag platformModule._dragTo(tweenX, tweenY, button) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyautogui/_pyautogui_osx.py", line 436, in _dragTo assert False, "button argument not in ('left', 'middle', 'right')" AssertionError: button argument not in ('left', 'middle', 'right') ```

使用JQuery无形地调用URL并返回成功/错误标志

<div class="post-text" itemprop="text"> <p>I am coding a web based game in which the player moves around on a 7x7 grid. Currently, the move buttons call a ../action/move/up style PHP url that updates the database and then reloads the game page to reflect the new player position.</p> <p>I want to be able to have the player click move and use JQuery tweens to move the player token without a page refresh. The part I'm unsure about is, I want this to update the server and then lock the move buttons. The JS would then call a URL or two that would return new values for a few variables on the page, as well as a flag checking if the move was successful. If it was, the move buttons would then unlock and allow the player to move again.</p> <p>The pseudocode I'm imagining:</p> <pre><code>On Click (Move Up) { if(ReadyToMove) { Tween(ship, old position, new position) ReadyToMove = 0 Call MoveDone } } MoveDone { ReadyToMove = Url('../movecheck/movement/' . current position .) /* this url would return either 1 or 0 depending on if db xy matches given xy */ if(!ReadyToMove) { current position = old position; display error(movefail) } } </code></pre> <p>How do I <em>actually</em> do this?</p> </div>

Android构建报错:Android resource linking failed该怎么办?

导入了网上的一个Android项目,在修改完内容、包名和签名后,编译apk时出现以下错误 Android resource linking failed Output: D:\HDVideo_V1.2\HDVideo\app\build\intermediates\merged_manifests\release\processReleaseManifest\merged\AndroidManifest.xml:2: error: attribute 'package' in <manifest> tag is not a valid Android package name: 'com.52jiuge.video'. Command: C:\Users\Administrator\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\c343171b752e801429885959b81315e7\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\ C:\Users\Administrator\AppData\Local\Android\Sdk\platforms\android-27\android.jar\ --manifest\ D:\HDVideo_V1.2\HDVideo\app\build\intermediates\merged_manifests\release\processReleaseManifest\merged\AndroidManifest.xml\ -o\ D:\HDVideo_V1.2\HDVideo\app\build\intermediates\processed_res\release\processReleaseResources\out\resources-release.ap_\ -R\ @D:\HDVideo_V1.2\HDVideo\app\build\intermediates\incremental\processReleaseResources\resources-list-for-resources-release.ap_.txt\ --auto-add-overlay\ --java\ D:\HDVideo_V1.2\HDVideo\app\build\generated\not_namespaced_r_class_sources\release\processReleaseResources\r\ --custom-package\ com.viaviapp.hdvideoapp\ -0\ apk\ --output-text-symbols\ D:\HDVideo_V1.2\HDVideo\app\build\intermediates\symbols\release\R.txt\ --no-version-vectors Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0 ![图片说明](https://img-ask.csdn.net/upload/201902/09/1549673891_739793.png)

传递公钥,私钥和CA in stream_get_contents()调用Multipart / Related

<div class="post-text" itemprop="text"> <p>I am attempting to connect to a 3rd party API, and they require me to pass 3 certificate files they have given me: public cert, private cert, and CA cert. It works fine in cURL with the following settings:</p> <pre><code>if (empty($this-&gt;order['connector'])) { curl_setopt($_curl, CURLOPT_SSLKEY, API_PRIVATE_CERT); curl_setopt($_curl, CURLOPT_CAINFO, API_CA_CERT); curl_setopt($_curl, CURLOPT_SSLCERT, API_PUBLIC_CERT); } </code></pre> <p>Each value passed is a path to a physical file on the server. This works fine.</p> <p>With one request, however, I have to pass a header 'Content-Type: Multipart/Related; boundary="---BOUNDARY123456"' with a MIME message that contains an XML file and a Base64 encoded PDF. This fails with a 500 error on their end. And in researching this, I have seen cURL cannot properly handle Content-Type: Multipart/Related posts.</p> <p><a href="https://stackoverflow.com/a/25998544/3434084">https://stackoverflow.com/a/25998544/3434084</a></p> <p>So I have tried to send it using stream_get_contents(), but I get no response back. So I am thinking my cert data is wrong. How can I pass the same values I use in cURL via stream_get_contents()?</p> <p>Here's the code:</p> <pre><code>$payload = '----=FB498299F0F50D2A190B3C Content-Type: application/x-ofx &lt;?xml version="1.0" encoding="ISO-8859-1"?&gt; &lt;?OFX OFXHEADER="200" VERSION="201" SECURITY="NONE" OLDFILEUID="NONE" NEWFILEUID="NONE"?&gt; &lt;OFX&gt; &lt;SIGNONMSGSRQV1&gt; &lt;SONRQ&gt; &lt;LANGUAGE&gt;ENG&lt;/LANGUAGE&gt; &lt;APPID&gt;TWEEN&lt;/APPID&gt; &lt;/SONRQ&gt; &lt;/SIGNONMSGSRQV1&gt; ... &lt;/OFX&gt; ----=FB498299F0F50D2A190B3C Content-Type: application/pdf Content-Transfer-Encoding: base64 Content-Location: full1_1559588546.pdf JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDM...PRgo= ----=FB498299F0F50D2A190B3C' . " "; $params = [ 'http' =&gt; [ 'method' =&gt; 'POST', 'header' =&gt; 'Content-Type: Multipart/Related; boundary="----=FB498299F0F50D2A190B3C"', 'content' =&gt; $payload ], 'ssl' =&gt; [ 'verify_peer' =&gt; true, 'local_pk' =&gt; API_PRIVATE_CERT, 'cafile' =&gt; API_CA_CERT, 'local_cert' =&gt; API_PUBLIC_CERT ] ]; $_stream = stream_context_create($params); $response = @file_get_contents('https://blah/api/, FILE_TEXT, $_stream); </code></pre> <p>TIA!</p> </div>

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

外包程序员的幸福生活

今天给你们讲述一个外包程序员的幸福生活。男主是Z哥,不是在外包公司上班的那种,是一名自由职业者,接外包项目自己干。接下来讲的都是真人真事。 先给大家介绍一下男主,Z哥,老程序员,是我十多年前的老同事,技术大牛,当过CTO,也创过业。因为我俩都爱好喝酒、踢球,再加上住的距离不算远,所以一直也断断续续的联系着,我对Z哥的状况也有大概了解。 Z哥几年前创业失败,后来他开始干起了外包,利用自己的技术能...

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

深入剖析Springboot启动原理的底层源码,再也不怕面试官问了!

大家现在应该都对Springboot很熟悉,但是你对他的启动原理了解吗?

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

你期望月薪4万,出门右拐,不送,这几个点,你也就是个初级的水平

先来看几个问题通过注解的方式注入依赖对象,介绍一下你知道的几种方式@Autowired和@Resource有何区别说一下@Autowired查找候选者的...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《Oracle Java SE编程自学与面试指南》最佳学习路线图2020年最新版(进大厂必备)

正确选择比瞎努力更重要!

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

正确选择比瞎努力更重要!

字节跳动面试官竟然问了我JDBC?

轻松等回家通知

面试官:你连SSO都不懂,就别来面试了

大厂竟然要考我SSO,卧槽。

终于,月薪过5万了!

来看几个问题想不想月薪超过5万?想不想进入公司架构组?想不想成为项目组的负责人?想不想成为spring的高手,超越99%的对手?那么本文内容是你必须要掌握的。本文主要详解bean的生命...

自从喜欢上了B站这12个UP主,我越来越觉得自己是个废柴了!

不怕告诉你,我自从喜欢上了这12个UP主,哔哩哔哩成为了我手机上最耗电的软件,几乎每天都会看,可是吧,看的越多,我就越觉得自己是个废柴,唉,老天不公啊,不信你看看…… 间接性踌躇满志,持续性混吃等死,都是因为你们……但是,自己的学习力在慢慢变强,这是不容忽视的,推荐给你们! 都说B站是个宝,可是有人不会挖啊,没事,今天咱挖好的送你一箩筐,首先啊,我在B站上最喜欢看这个家伙的视频了,为啥 ,咱撇...

代码注释如此沙雕,会玩还是你们程序员!

某站后端代码被“开源”,同时刷遍全网的,还有代码里的那些神注释。 我们这才知道,原来程序员个个都是段子手;这么多年来,我们也走过了他们的无数套路… 首先,产品经理,是永远永远吐槽不完的!网友的评论也非常扎心,说看这些代码就像在阅读程序员的日记,每一页都写满了对产品经理的恨。 然后,也要发出直击灵魂的质问:你是尊贵的付费大会员吗? 这不禁让人想起之前某音乐app的穷逼Vip,果然,穷逼在哪里都是...

2020春招面试了10多家大厂,我把问烂了的数据库事务知识点总结了一下

2020年截止目前,我面试了阿里巴巴、腾讯、美团、拼多多、京东、快手等互联网大厂。我发现数据库事务在面试中出现的次数非常多。

爬虫(101)爬点重口味的

小弟最近在学校无聊的很哪,浏览网页突然看到一张图片,都快流鼻血。。。然后小弟冥思苦想,得干一点有趣的事情python 爬虫库安装https://s.taobao.com/api?_ks...

在拼多多上班,是一种什么样的体验?我心态崩了呀!

之前有很多读者咨询我:武哥,在拼多多上班是一种什么样的体验?由于一直很忙,没抽出时间来和大家分享。上周末特地花点时间来写了一篇文章,跟大家分享一下拼多多的日常。 1. 倒时差的作息 可能很多小伙伴都听说了,拼多多加班很严重。这怎么说呢?作息上确实和其他公司有点区别,大家知道 996,那么自然也就能理解拼多多的“11 11 6”了。 所以当很多小伙伴早上出门时,他们是这样的: 我们是这样的: 当...

应聘3万的职位,有必要这么刁难我么。。。沙雕。。。

又一次被面试官带到坑里面了。面试官:springmvc用过么?我:用过啊,经常用呢面试官:springmvc中为什么需要用父子容器?我:嗯。。。没听明白你说的什么。面试官:就是contr...

太狠了,疫情期间面试,一个问题砍了我5000!

疫情期间找工作确实有点难度,想拿到满意的薪资,确实要点实力啊!面试官:Spring中的@Value用过么,介绍一下我:@Value可以标注在字段上面,可以将外部配置文件中的数据,比如可以...

自学编程的 6 个致命误区

嗨,小伙伴们大家好,我是沉默王二。本篇文章来和大家聊聊自学编程中的一些误区——这是我在 B 站上看了羊哥的一期视频后有感而发的文章。因为确实有很多读者也曾私信问过我这些方面的问题,很有代表性,所以我就结合自己的亲身体会来谈一谈,希望对小伙伴们有所启发。 01、追求时髦 所谓基础不牢,地动山摇啊。可很多小伙伴压根就没注意过这个问题,市面上出什么新鲜的技术就想去尝试,结果把自己学的乱七八糟,心灰意冷...

立即提问
相关内容推荐