<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: move code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 25 Jul 2008 07:16:30 GMT</pubDate>
    <description>DZone Snippets: move code</description>
    <item>
      <title>Cursor styles used in CSS</title>
      <link>http://snippets.dzone.com/posts/show/5329</link>
      <description>Source: &lt;a href="http://www.javascriptkit.com/dhtmltutors/csscursors.shtml"&gt;Custom CSS Cursors&lt;/a&gt; [javascriptkit.com]&lt;br /&gt;&lt;code&gt;&lt;br /&gt;cursor: default;&lt;br /&gt;cursor: hand;&lt;br /&gt;cursor: pointer;&lt;br /&gt;cursor: pointer; cursor: hand;&lt;br /&gt;cursor: crosshair;&lt;br /&gt;cursor: text;&lt;br /&gt;cursor: wait;&lt;br /&gt;cursor: help;&lt;br /&gt;cursor: move;&lt;br /&gt;cursor: e-resize;&lt;br /&gt;cursor: ne-resize;&lt;br /&gt;cursor: nw-resize;&lt;br /&gt;cursor: n-resize;&lt;br /&gt;cursor: se-resize;&lt;br /&gt;cursor: sw-resize;&lt;br /&gt;cursor: s-resize;&lt;br /&gt;cursor: w-resize;&lt;br /&gt;cursor: progress;&lt;br /&gt;cursor: all-scroll;&lt;br /&gt;cursor: col-resize;&lt;br /&gt;cursor: no-drop;&lt;br /&gt;cursor: not-allowed;&lt;br /&gt;cursor: row-resize;&lt;br /&gt;cursor: url(mycursor.cur); /* Note: Only .cur and .ani file types are supported as of IE6. */&lt;br /&gt;cursor: vertical-text;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sun, 06 Apr 2008 23:37:30 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5329</guid>
      <author>jrobertson (James Robertson)</author>
    </item>
    <item>
      <title>Capturing the mousemove coordinates</title>
      <link>http://snippets.dzone.com/posts/show/5264</link>
      <description>Source code copied from &lt;a href="http://javascript.internet.com/page-details/mouse-coordinates.html"&gt;The JavaScript Source: Page Details: Mouse Coordinates&lt;/a&gt; [internet.com]&lt;br /&gt;Tested on Firefox.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;!-- ONE STEP TO INSTALL MOUSE COORDINATES:&lt;br /&gt;&lt;br /&gt;  1.  Copy the coding into the BODY of your HTML document  --&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- STEP ONE: Paste this code into the BODY of your HTML document  --&gt;&lt;br /&gt;&lt;br /&gt;&lt;BODY&gt;&lt;br /&gt;&lt;br /&gt;&lt;form name="Show"&gt;&lt;br /&gt;X &lt;input type="text" name="MouseX" value="0" size="4"&gt;&lt;br&gt;&lt;br /&gt;Y &lt;input type="text" name="MouseY" value="0" size="4"&gt;&lt;br&gt;&lt;br /&gt;&lt;/form&gt;&lt;br /&gt;&lt;br /&gt;&lt;script language="JavaScript1.2"&gt;&lt;br /&gt;&lt;!-- Original:  CodeLifter.com (support@codelifter.com) --&gt;&lt;br /&gt;&lt;!-- Web Site:  http://www.codelifter.com --&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- This script and many more are available free online at --&gt;&lt;br /&gt;&lt;!-- The JavaScript Source!! http://javascript.internet.com --&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- Begin&lt;br /&gt;  var IE = document.all?true:false;&lt;br /&gt;  if (!IE) document.captureEvents(Event.MOUSEMOVE)&lt;br /&gt;    document.onmousemove = getMouseXY;&lt;br /&gt;    &lt;br /&gt;  var tempX = 0;&lt;br /&gt;  var tempY = 0;&lt;br /&gt;  &lt;br /&gt;  function getMouseXY(e) {&lt;br /&gt;    if (IE) { // grab the x-y pos.s if browser is IE&lt;br /&gt;      tempX = event.clientX + document.body.scrollLeft;&lt;br /&gt;      tempY = event.clientY + document.body.scrollTop;&lt;br /&gt;    }&lt;br /&gt;    else {  // grab the x-y pos.s if browser is NS&lt;br /&gt;      tempX = e.pageX;&lt;br /&gt;      tempY = e.pageY;&lt;br /&gt;    }  &lt;br /&gt;    &lt;br /&gt;    if (tempX &lt; 0){tempX = 0;}&lt;br /&gt;    if (tempY &lt; 0){tempY = 0;}  &lt;br /&gt;    &lt;br /&gt;    document.Show.MouseX.value = tempX;&lt;br /&gt;    document.Show.MouseY.value = tempY;&lt;br /&gt;    &lt;br /&gt;    return true;&lt;br /&gt;  }&lt;br /&gt;//  End --&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;center&gt;&lt;br /&gt;&lt;font face="arial, helvetica" size"-2"&gt;Free JavaScripts provided&lt;br&gt;&lt;br /&gt;by &lt;a href="http://javascriptsource.com"&gt;The JavaScript Source&lt;/a&gt;&lt;/font&gt;&lt;br /&gt;&lt;/center&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- Script Size:  1.33 KB --&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;*update 10:55am 21-Mar-08*&lt;br /&gt;I have decided to use the following code instead as it looks a bit cleaner, and more up-to-date.&lt;br /&gt;Tested on Firefox 2 and IE 6.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;document.onmousemove = mouseMove;&lt;br /&gt;&lt;br /&gt;function mouseMove(ev){&lt;br /&gt;	ev           = ev || window.event;&lt;br /&gt;	var mousePos = mouseCoords(ev);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function mouseCoords(ev){&lt;br /&gt;	if(ev.pageX || ev.pageY){&lt;br /&gt;		return {x:ev.pageX, y:ev.pageY};&lt;br /&gt;	}&lt;br /&gt;	return {&lt;br /&gt;		x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,&lt;br /&gt;		y:ev.clientY + document.body.scrollTop  - document.body.clientTop&lt;br /&gt;	};&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Reference: &lt;a href="http://snipr.com/22a5e"&gt;How to Drag and Drop in JavaScript&lt;/a&gt; [webreference.com]</description>
      <pubDate>Thu, 20 Mar 2008 22:39:21 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5264</guid>
      <author>jrobertson (James Robertson)</author>
    </item>
    <item>
      <title>Move to values</title>
      <link>http://snippets.dzone.com/posts/show/1903</link>
      <description>This code will move two values.&lt;br /&gt;Written in Brainfuck.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Move two values&lt;br /&gt;Written by Davor Babic 2006&lt;br /&gt;davorb@gmail DOT com&lt;br /&gt;&lt;br /&gt;&gt;,[&gt;+&lt;]&gt;.&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Wed, 12 Apr 2006 04:27:18 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1903</guid>
      <author>davor (Davor Babic)</author>
    </item>
    <item>
      <title>Move a file</title>
      <link>http://snippets.dzone.com/posts/show/1285</link>
      <description>&lt;code&gt;&lt;br /&gt;    move-file: func [file source dest] [&lt;br /&gt;        either error? try [&lt;br /&gt;            write/binary dest/:file read/binary source/:file&lt;br /&gt;            delete source/:file&lt;br /&gt;        ] [false] [true]&lt;br /&gt;    ]&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Mon, 23 Jan 2006 02:07:19 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1285</guid>
      <author>gregg.irwin (Gregg Irwin)</author>
    </item>
    <item>
      <title>move function</title>
      <link>http://snippets.dzone.com/posts/show/1128</link>
      <description>&lt;code&gt;&lt;br /&gt;    ; Should this return the head of the series? I'm thinking no right now.&lt;br /&gt;    ; Should /skip be the default op and /to makes it absolute?&lt;br /&gt;    move: func [&lt;br /&gt;        "Moves the first instance of value, if found, to a new position in the series."&lt;br /&gt;        series [series!]&lt;br /&gt;        value&lt;br /&gt;        /head "Move to the head of the series"&lt;br /&gt;        /tail "Move to the tail of the series"&lt;br /&gt;        /to   "Move to an absolute position in the series"&lt;br /&gt;            index [number! logic! pair!] "Can be positive, negative, or zero"&lt;br /&gt;        /skip "Move forward or backward from the current position"&lt;br /&gt;            offset [number! logic! pair!] "Can be positive, negative, or zero"&lt;br /&gt;        /part "Move the given number of items"&lt;br /&gt;            range [number! series! pair!]&lt;br /&gt;        ;/all "move all instances of value" ; ???&lt;br /&gt;        /local pos dest sw*&lt;br /&gt;    ] [&lt;br /&gt;        sw*: system/words&lt;br /&gt;        either none? pos: find/only series value [none] [&lt;br /&gt;            either part [&lt;br /&gt;                value: copy/part pos range&lt;br /&gt;                remove/part pos range&lt;br /&gt;            ][&lt;br /&gt;                value: first pos&lt;br /&gt;                remove pos&lt;br /&gt;            ]&lt;br /&gt;            dest: any [&lt;br /&gt;                all [head  sw*/head series]&lt;br /&gt;                all [tail  sw*/tail series]&lt;br /&gt;                all [to    at series index]&lt;br /&gt;                all [skip  sw*/skip pos offset]&lt;br /&gt;            ]&lt;br /&gt;            either part [insert dest :value] [insert/only dest :value]&lt;br /&gt;        ]&lt;br /&gt;    ]&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Tue, 10 Jan 2006 06:22:51 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1128</guid>
      <author>gregg.irwin (Gregg Irwin)</author>
    </item>
  </channel>
</rss>
