Category Archives: Uncategorized

[디지털 테스터기] Hioki 3803 평균치 정류형, 염가 모델

한국어 사이트:http://www.hioki.co.kr

Hioki 3803 : 평균치 정류형, 염가 모델
Hioki 3804-50 : 평균치 정류형, 기본형 모델
Hioki 3805-50 : 실효값 정류형, 고기능 모델

Hioki 3803 디지털 테스터기
http://www.hioki.co.kr/hioki/HIOKI_Product_Cont.asp?Product_idx=153&ProductNum=3803&page_ch=07#01
- 직류 전압 : 400m/4/40/400/1000V(±0.6%rdg.±2dgt./모든레인지)

- 직류 전류 : 400μ/4m/40m/400m/10A(±1.5%rdg.±2dgt./DC 400μ~400mA)

- 교류 전압 : 400m/4/40/400/1000V (±2%rdg.±2dgt./4∼400V레인지)

- 교류 전류 : 400μ/4m/40m/400m/10A(±2%rdg.±2dgt./AC 400μ~400mA)

- 저항 : 400/4k/40k/400k/4M/40MΩ(±0.6%rdg.±3dgt./400∼400kΩ)

- 기타의 기능 : 도통(100dgt.이하로(에서) 버저음), 다이오드 체크

- 샘플 레이트 : 1.3회/s

- 전원 : 적층형망간건전지(6F22)×1/연속 사용 약 200시간

- 치수·질량 : 83W×178H×58D mm· 400g(홀더와 배터리 포함)

- 부속품 : 3851-10 테스트 리드 1개, 호르스타 1개,배터리(6F22) 1개

Hioki 3803 디지털 테스터기

[jQuery] editable table cells

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<style>
table {
	border-collapse:collapse;
	font-size:12px;
	margin:0 20px 20px 20px;
	border-top:2px solid #015287;
	width:480px;
}
th {
	border-bottom: 2px solid #015287;
	color: #D15600;
	font-size: 14px;
	font-weight: normal;
	text-align: left;
	padding: 3px 8px;
}
td {
	padding: 6px;
} 
</style>

      <form action="null" method="post">     
			  <table id="celebs">
          <thead>
            <tr>
              <th>ID</th>
              <th>Name</th>
              <th>Occupation</th>
              <th>Approx. Location</th>
              <th>Price</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>203A</td>
              <td>Johny Stardust</td>
              <td>Front-man</td>
              <td>Los Angeles</td>
              <td>$39.95</td>
            </tr>
            <tr>
              <td>141B</td>
              <td>Beau Dandy</td>
              <td>Singer</td>
              <td>New York</td>
              <td>$39.95</td>
            </tr>
            <tr>
              <td>2031</td>
              <td>Mo' Fat</td>
              <td>Producer</td>
              <td>New York</td>
              <td>$19.95</td>
            </tr>
            <tr>
              <td>007F</td>
              <td>Kellie Kelly</td>
              <td>Singer</td>
              <td>Omaha</td>
              <td>$11.95</td>
            </tr>
            <tr>
              <td>8A05</td>
              <td>Darth Fader</td>
              <td>DJ</td>
              <td>London</td>
              <td>$19.95</td>
            </tr>
            <tr>
              <td>6636</td>
              <td>Glendatronix</td>
              <td>Keytarist</td>
              <td>London</td>
              <td>$39.95</td>
            </tr>
          </tbody>
        </table>
      </form>
		</div>

<script>
$(document).ready(function() {
  TABLE.formwork('#celebs');
});

var TABLE = {};

TABLE.formwork = function(table){
  var $tables = $(table);
  
  $tables.each(function () {
    var _table = $(this);
    _table.find('thead tr').append($('<th class="edit">&nbsp;</th>'));
    _table.find('tbody tr').append($('<td class="edit"><input type="button" value="Edit"/></td>'))
  });
  
  $tables.find('.edit :button').live('click', function(e) {
    TABLE.editable(this);
    e.preventDefault();
  });
}

TABLE.editable = function(button) {
  var $button = $(button);
  var $row = $button.parents('tbody tr');
  var $cells = $row.children('td').not('.edit');
  
  if($row.data('flag')) { // in edit mode, move back to table
    // cell methods
    $cells.each(function () {
      var _cell = $(this);
      _cell.html(_cell.find('input').val());
    })
    
    $row.data('flag',false);
    $button.val('Edit');
  } 
  else { // in table mode, move to edit mode 
    // cell methods
    $cells.each(function() {
      var _cell = $(this);
      _cell.data('text', _cell.html()).html('');
      
      var $input = $('<input type="text" />')
        .val(_cell.data('text'))
        .width(_cell.width() - 16);
        
      _cell.append($input);
    })
    
    $row.data('flag', true);
    $button.val('Save');
  }
}
</script>

[jQuery] Jcrop » the jQuery Image Cropping Plugin

참조: http://deepliquid.com/content/Jcrop.html

Feature Overview

  • Attaches unobtrusively to any image
  • Supports aspect ratio locking
  • Supports minSize/maxSize setting
  • Callbacks for selection done, or while moving
  • Keyboard support for nudging selection
  • API features to create interactivity, including animation
  • Support for CSS styling
  • New: Experimental touch support (iOS, Android, etc)

관련글
* Java and Javascript JCrop (JQuery plugin) image cropper

* Crop Image using Jcrop jQuery plug-in ,JSP and Servlet

* Crop image on the client side with JCrop and HTML5 canvas element

[jQuery] animated navigation(Bouncy animated menu)

<div id="navigation">
  <ul>
    <li id="home" style="height: 20px; display: block; overflow: hidden;">
      <a href="#">Home</a>
    </li>
    <li style="height: 20px; display: block; overflow: hidden;">
      <a href="#">Buy Now!</a>
    </li>
    <li style="height: 20px; display: block; overflow: hidden;">
      <a href="#">About Us</a>
    </li>
    <li style="height: 20px; display: block; overflow: hidden;">
      <a href="#">Gift Ideas</a>
    </li>
  </ul>
</div>

<script type="text/javascript">
$(document).ready(function(){
  $( '#navigation li' ).hover(function(){
    $( this )
    .stop( true )
    .animate(
      {height: '60px'},
      {duration: 600, easing: 'easeOutBounce'}
      )
  },function(){
    $( this ) 
    .stop( true )
    .animate(
      {height:'20px'},
      {duration:600, easing: 'easeOutCirc'}
      )
  });
});
</script>

[jQuery] jQuery Termifier

JQuery in Action 2nd edition: chapter 8

jquery.termifier.js

(function($){

  $.fn.termifier = function(actionURL,options) {
    var settings = $.extend({
      origin: {top:0,left:0},
      paramName: 'term',
      addClass: null,
      actionURL: actionURL
    },options||{});
    this.click(function(event){
      $('div.termifier').remove();
      $('<div>')
        .addClass('termifier' +
          (settings.addClass ? (' ') + settings.addClass : ''))
        .css({
          position: 'absolute',
          top: event.pageY - settings.origin.top,
          left: event.pageX - settings.origin.left,
          display: 'none'
        })
        //.click(function(event){
        //  $(this).fadeOut('slow');
        //})
        .appendTo('body')
        .append(
          $('<div>').load(
            settings.actionURL,
            encodeURIComponent(settings.paramName) + '=' +
              encodeURIComponent($(event.target).text()),
            function(){
              $(this).closest('.termifier').fadeIn('fast');
            }
          )
        );
    });
    this.addClass('termified');

    return this;
  };
	$(document).click(function(event){
			if(!$(event.target).is('.termifier,.termifier div')){
				//$('div.termifier').remove();
				$('div.termifier').fadeOut('normal');
			}
	});
 
})(jQuery);

jquery-termifier.html

<!DOCTYPE html>
<html>
  <head>
    <title> 2 The Boot Closet &mdash; Phase 4b</title>
    <link rel="stylesheet" type="text/css" href="../../styles/core.css">
    <link rel="stylesheet" type="text/css" href="bootcloset.css">
    <script type="text/javascript" src="../../scripts/jquery-1.4.js"></script>
    <script type="text/javascript" src="jquery.termifier.js"></script>
    <script type="text/javascript">
      $(function() {
        $('#bootChooserControl')
          .load('/jqia2/action/fetchBootStyleOptions');

        $('#bootChooserControl').change(function(event){
          $('#productDetailPane').load(
            '/jqia2/action/fetchProductDetails',
            $('#bootChooserControl').serialize(),
            function(){ $('abbr')
              .termifier(
                '/jqia2/action/fetchTerm',
                {
                  addClass: 'fancy',
                  origin: {top: 28, left: 2}
                }
              );
            }
          );
          $('#colorChooserControl').load(
            '/jqia2/action/fetchColorOptions',
            $('#bootChooserControl').serialize(),
            function(){
              $('#colorChooserControl').attr('disabled',false);
              $('#sizeChooserControl')
                .attr('disabled',true)
                .find('option').remove();
            }
          );
        });

        $('#colorChooserControl').change(function(event){
          $('#sizeChooserControl').load(
            '/jqia2/action/fetchSizeOptions',
            $('#bootChooserControl,#colorChooserControl').serialize(),
            function(){
              $('#sizeChooserControl').attr('disabled',false);
            }
          );
        });

        $('#selectionsPane').change(function(event){
          $('[value=""]',event.target).remove();
        });

        $('body').ajaxComplete(function(event,xhr,options){
         if (options.url.indexOf('fetchProductDetails') != -1) {
           $('div.termifier').remove();
         }
        });

      });
    </script>
  </head>

  <body>

    <div id="pageContent">

      <h1>Choose your boots</h1>

      <div>

        <div id="selectionsPane">
          <label for="bootChooserControl">Boot style:</label>
          <select id="bootChooserControl" name="style"></select>
          <label for="colorChooserControl">Color:</label>
          <select id="colorChooserControl" name="color" disabled="disabled"></select>
          <label for="sizeChooserControl">Size:</label>
          <select id="sizeChooserControl" name="size" disabled="disabled"></select>
        </div>

        <div id="productDetailPane"></div>

      </div>

    </div>

  </body>

</html>

bootcloset.css:

body {
  font-family: 'Verdana',sans-serif;
  font-size: 10pt;
  background: url('images/backg.png') repeat;
  color: white;
}

#banner {
  margin-left: 32px;
}

#pageContent {
  width: 720px;
  margin: 0 0 0 32px;
  border: 8px ridge #362c24;
  background-color: #46403c;
  padding: 16px;
}

#pageContent h1 {
  margin: 0 0 18px 0;
  padding: 0;
  color: #eda633;
}

#productDetailPane {
  font-size: 0.9em;
  margin-top: 20px;
}

#productDetailPane>div {
  margin-bottom: 6px;
}

#productDetailPane label {
  float: left;
  font-weight: bold;
  width: 9em;
  text-align: right;
  color: #ffdeae;
  margin-right: 8px;
}

#bootChooserControl {
  width: 188px;
}

#colorChooserControl {
  width: 138px;
}

#sizeChooserControl {
  width: 122px;
}

select+label {
  margin-left: 18px;
}

abbr.termified {
  text-decoration: underline;
  color: aqua;
  cursor: pointer;
}

div.termifier {
  background-color: cornsilk;
  width: 256px;
  color: brown;
  padding: 8px;
  font-size: 0.8em;
}

div.termifier.fancy {
  background: url('images/termifier.bubble.png') no-repeat transparent;
  width: 256px;
  height: 104px;
}

div.termifier.fancy div {
  height: 86px;
  width: 208px;
  overflow: auto;
  color: black;
  margin-left: 24px;
}
<div id="productDetailPane">
	<div>
	<label>Features:</label>
	<abbr class="termified">Full-grain</abbr>
	<abbr class="termified">oil-tanned</abbr>
	leather. Nylon mesh lining. Ortholite sock liner. EVA midsole. T84V Rubberlon outsole.
	</div>
</div>
...
<div class="termifier fancy" style="position: absolute; top: 277px; left: 280px;">
<div> A method of leather tanning in which oils or fats are used to cure the leather. Such leather is usually very supple and has a matte or "oily" finish and is not generally polishable. </div>
</div>

[jQuery] Iterating through properties and collections: for, for-in, each loop

For arrays, we iterate over their elements
using the for loop; for objects, we iterate over their properties using the for-in loop.
We can code examples of each as follows:

var anArray = ['one','two','three'];
for (var n = 0; n < anArray.length; n++) {
//do something here
}
var anObject = {one:1, two:2, three:3};
for (var p in anObject) {
//do something here
}

This $.each() unified syntax can be used to iterate over either arrays or objects using the same format.

var anArray = ['one','two','three'];
$.each(anArray,function(n,value) {
//do something here
});
var anObject = {one:1, two:2, three:3};
$.each(anObject,function(name,value) {
//do something here
});

$.each(container,callback)
Iterates over the items in the passed container, invoking the passed callback function for each.

Parameters:
- container: (Array|Object) An array whose items, or an object whose properties, are to be
iterated over.

- callback : (Function) A function invoked for each element in the container. If the container
is an array, this callback is invoked for each array item; if itâs an object, the
callback is invoked for each object property.
The first parameter to this callback is the index of the array element or the name
of the object property. The second parameter is the array item or property value.
The function context (this) of the invocation is also set to the value passed as
the second parameter.

- Returns: The container object.