move

Raphael JS : how to move/animate a path object?

守給你的承諾、 提交于 2019-11-27 05:34:10
问题 Somehow this doesn't work... var paper = Raphael("test", 500, 500); var testpath = paper.path('M100 100L190 190'); var a = paper.rect(0,0,10,10); a.attr('fill', 'silver'); a.mousedown( function() { testpath.animate({x: 400}, 1000); }); I can move rects this way but not paths, why is that, and how do I move a path object then?! 回答1: With the latest version of Raphael, you can do this: var _transformedPath = Raphael.transformPath('M100 100L190 190', 'T400,0'); testpath.animate({path:

Move Constructor vs Copy Elision. Which one gets called?

爱⌒轻易说出口 提交于 2019-11-27 03:35:26
问题 I have two pieces of code here to show you. They are two classes and each one provides a Move Constructor and a function which returns a temporary. In the first case, the function returning a temporary calls the Move Constructor In the second case, the function returning a temporary just tells the compiler to perform a copy elision I'm confused: in both cases I define a Move Constructor and a random member function returning a temporary. But the behavior changes, and my question is why . Note

Repeated std::move on an boost::asio socket object in C++11

亡梦爱人 提交于 2019-11-27 02:10:47
问题 I am exploring using boost::asio along with C++11 features. In particular, I am focusing on an example called "async_tcp_echo_server.cpp", located here (code is also shown at the end of my question): http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/example/cpp11/echo/async_tcp_echo_server.cpp My question involves the tcp::socket member socket_ of the server class. In the do_accept() method of the server class, socket_ is passed to async_accept() . (According to the asio documentation,

Android ACTION_MOVE Threshold

旧时模样 提交于 2019-11-27 01:38:09
I'm writing an app that involves writing on the screen using one's finger, or eventually a stylus. I have that part working. On ACTION_DOWN, starts drawing; on ACTION_MOVE, adds line segments; on ACTION_UP, finishes line. The problem is that after ACTION_DOWN, apparently the pointer needs to move more than 10 pixels away from where it started (basically a 20x20 box around the starting point) in order to begin sending ACTION_MOVE events. After leaving the box, the move events are all quite accurate. (I figured out the 10 pixel thing by testing it.) Since this is meant to be used for writing or

How can I add moving effects to my controls in C#?

不问归期 提交于 2019-11-27 01:12:26
I have a Panel In my C# form and I have a button. When I click on the Button the invisible Panel Shows. Instead of that I want the Panel to move in or slide in. For example when you click on a combobox the dropdown list doesnt just pop in. I want my Panel to appear like that. How can I do that ? Window animation is a built-in feature for Windows. Here's a class that uses it: using System; using System.ComponentModel; using System.Windows.Forms; using System.Runtime.InteropServices; public static class Util { public enum Effect { Roll, Slide, Center, Blend } public static void Animate(Control

move marker on google maps api 2

十年热恋 提交于 2019-11-27 00:47:30
问题 How do I move marker on Google maps api V2 ? I am using below code but it does not move marker on the map. What am I doing wrong here ? This should work when location changes, so I have added onLocationChanged method and in that, am getting location details and trying to move marker on new details, but this doesn't work. Here is my code: import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesUtil; import com.google.android.gms.maps

Usage of std::forward vs std::move

情到浓时终转凉″ 提交于 2019-11-27 00:05:57
问题 I always read that std::forward is only for use with template parameters. However, I was asking myself why. See the following example: void ImageView::setImage(const Image& image){ _image = image; } void ImageView::setImage(Image&& image){ _image = std::move(image); } Those are two functions which basically do the same; one takes an l-value reference, the other an r-value reference. Now, I thought since std::forward is supposed to return an l-value reference if the argument is an l-value

Moveable/draggable <div>

☆樱花仙子☆ 提交于 2019-11-26 23:56:02
This is my updated and modified script, it works completely, except I would like to universalize it... observe the **** how can I make it so that I don't have to do function(e){BOX.Draggable.elemen = e.target || e.srcElement; elementDraggable(e); everytime I need to use the dragable function for a different element? window.onload = addListeners; var BOX = function(){ return{ Draggable: function(){} }; }(); function addListeners(){ document.getElementById('div').addEventListener('contextmenu', menumove, false); **document.getElementById('div').addEventListener('mousedown', function(e){BOX

Moving files lose history in TFS 2013

穿精又带淫゛_ 提交于 2019-11-26 20:56:45
问题 I'm using VS2013 Update 4 with TFS 2013 Update 4. In Source Control Explorer, whenever I move a file from one folder to another I can see that the file's history is preserved in the new location. However, that history is gone when I check-in the pending changes. The same thing happens when I try to run "tf move" command. So, how can you move a file in TFS and still keep the file's history? 回答1: When a file is renamed correctly, the History is not "Gone", it's associated to the "old name"

How do I move a single folder from one Subversion repository to another repository?

核能气质少年 提交于 2019-11-26 18:03:42
I have a "docs" folder in a Subversion repository named "project". I've come to the conclusion that it should really be kept under a separate Subversion repository named "project_docs". I'd like to move the "docs" folder ( and all of its revisions ) to the "project_docs" repository. Is there a way to do this? Samuel If you have access the repository itself (not a working copy), you should be able to dump the current repository, filter it to only include information about the docs folder, and load it into the other repository. Would be something like this: svnadmin dump /svn/old_repos > .