NB: "initalized" in create_slideshow
191307
def render( content, ctx )
    
    ####################
    ## todo/fix: move ctx to Gen.initialize - why? why not?
    @name     = ctx[:name]

    @outdir   = ctx[:outdir]
    @srcdir   = ctx[:srcdir]
    @usrdir   = ctx[:usrdir]
    
    # run text filters
  
    config.text_filters.each do |filter|
      mn = filter.tr( '-', '_' ).to_sym  # construct method name (mn)
      puts "  run filter #{mn}..."
      content = send( mn, content )   # call filter e.g.  include_helper_hack( content )  
    end

    if config.takahashi?
      content = takahashi_slide_breaks( content )
    end

    # convert light-weight markup to hypertext

    content = markdown_to_html( content )
    content
  end
655630
function _initSlider() {
			_sliderVars.nodes.slider = _sliderVars.nodes.slider || document.querySelector('#slider');
			_sliderVars.nodes.handle = _sliderVars.nodes.handle || document.querySelector('#slideHandle');
			_sliderVars.nodes.leftResizeHandle = _sliderVars.nodes.leftResizeHandle || document.querySelector('#leftHandle');
			_sliderVars.nodes.rightResizeHandle = _sliderVars.nodes.rightResizeHandle || document.querySelector('#rightHandle');

			_sliderVars.nodes.handle.style.left = 0;
			_sliderVars.nodes.handle.style.width = '100%';

			//set the slider width
			_calculateSliderSize();

			_sliderVars.nodes.slider.addEventListener('mousedown', _onMouseDown);
		}
372950
function() {
	    var _layout = this.options.layout;

		for (var i = 0; i < this._slides.length; i++) {
			this._slides[i].updateDisplay(this.options.width, this.options.height, _layout);
			this._slides[i].setPosition({left:(this.slide_spacing * i), top:0});
		};

		this.goToId(this.current_id, true, false);
	}
166855
function init (directory, callback) {
  var source = path.join(__dirname, 'template');
  ncp(source, directory, callback);
}
353875
private void initializeAnimations() {
    Context context = getContext();
    rerouteSlideDownTop = AnimationUtils.loadAnimation(context, R.anim.slide_down_top);
    rerouteSlideUpTop = AnimationUtils.loadAnimation(context, R.anim.slide_up_top);
  }
703126
private void initGrid() {
        // Setting up images grid
        final int cols = getResources().getInteger(R.integer.images_grid_columns);

        views.grid.setLayoutManager(new GridLayoutManager(this, cols));

        gridAdapter = new PhotoListAdapter(this);
        gridAdapter.setLoadingOffset(PAGE_SIZE / 2);
        gridAdapter.setCallbacks(new EndlessRecyclerAdapter.LoaderCallbacks() {
            @Override
            public boolean canLoadNextItems() {
                return gridAdapter.canLoadNext();
            }

            @Override
            public void loadNextItems() {
                // We should either load all items that were loaded before state save / restore,
                // or next page if we already loaded all previously shown items
                int count = Math.max(savedPhotoCount, gridAdapter.getCount() + PAGE_SIZE);
                Events.create(FlickrApi.LOAD_IMAGES_EVENT).param(count).post();
            }
        });
        views.grid.setAdapter(gridAdapter);
    }
1361543
@Override protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_youtube_sample);
    ButterKnife.inject(this);
    initializeYoutubeFragment();
    initializeDraggablePanel();
    hookDraggablePanelListeners();
  }
709403
public void init() {
        turnOff();
        // initialization
        command(setDisplayClock((byte) 0, (byte) 8));
        command(setMultiplexRatio(size.height));
        command(setDisplayOffset(0));           // no offset
        command(setDisplayStartLine(0));        // line #0
        command(setMemoryAddressingMode(MemoryAddressingMode.HORIZONTAL));
        command(setHorizontalFlip(false));
        command(setVerticalFlip(false));
        if (vccState == VCC.EXTERNAL) {
            command(setChargePump(false));
        } else {
            command(setChargePump(true));
        }
        int contrast = 0;
        boolean sequentialPins = true;
        boolean leftRightPinsRemap = false;
        if (size == Size.SSD1306_128_32) {
            contrast = 0x8F;
        } else if (size == Size.SSD1306_128_64) {
            if (vccState == VCC.EXTERNAL) {
                contrast = 0x9F;
            } else {
                contrast = 0xCF;
            }
            sequentialPins = false;
        } else if (size == Size.SSD1306_96_16) {
            if (vccState == VCC.EXTERNAL) {
                contrast = 0x10;
            } else {
                contrast = 0xAF;
            }
        }
        command(setCOMPinsConfig(sequentialPins, leftRightPinsRemap));
        command(setContrast((byte) contrast));
        if (vccState == VCC.EXTERNAL) {
            command(setPrechargePeriod((byte) 2, (byte) 2));
        } else {
            command(setPrechargePeriod((byte) 1, (byte) 15));
        }
        command(setVcomhDeselectLevel((byte) 3));
        command(DISPLAY_RESUME);
        command(setDisplayInverse(false));
        stopScrolling();
        display(); // synchronize canvas with display's internal buffer
        turnOn();
    }
352998
function () {
        var that = this;

        that.uniqueId = utils.uniqueId('i');

        that.createWrapper();
        that.notify('initialize');

        that.bindWindowEvents();

        that.setOptions();
        that.fixPosition();
    }
956461
public void init(CmsImagePreviewHandler handler) {

        m_handler = handler;
        m_propertiesTab = new CmsPropertiesTab(m_galleryMode, m_dialogHeight, m_dialogWidth, m_handler);
        m_tabbedPanel.add(m_propertiesTab, Messages.get().key(Messages.GUI_PREVIEW_TAB_PROPERTIES_0));
        if ((m_galleryMode == GalleryMode.editor) || (m_galleryMode == GalleryMode.widget)) {
            m_imageFormatTab = new CmsImageFormatsTab(m_galleryMode, m_dialogHeight, m_dialogWidth, handler, null);
            m_tabbedPanel.add(m_imageFormatTab, Messages.get().key(Messages.GUI_PREVIEW_TAB_IMAGEFORMAT_0));
        }
        if (getGalleryMode() == GalleryMode.editor) {
            m_imageEditorFormatsTab = new CmsImageEditorTab(m_galleryMode, m_dialogHeight, m_dialogWidth, handler);

            String hideFormatsParam = Window.Location.getParameter("hideformats");
            boolean hideFormats = "true".equals(hideFormatsParam);
            if (!hideFormats) {
                m_tabbedPanel.add(m_imageEditorFormatsTab, Messages.get().key(Messages.GUI_PREVIEW_TAB_IMAGEOPTIONS_0));
            }

            m_imageAdvancedTab = new CmsImageAdvancedTab(m_galleryMode, m_dialogHeight, m_dialogWidth, handler);
            if (!hideFormats) {
                m_tabbedPanel.add(m_imageAdvancedTab, Messages.get().key(Messages.GUI_PREVIEW_TAB_IMAGEADVANCED_0));
            }
        }
        m_tabbedPanel.addSelectionHandler(new SelectionHandler<Integer>() {

            public void onSelection(SelectionEvent<Integer> event) {

                Scheduler.get().scheduleDeferred(new ScheduledCommand() {

                    @SuppressWarnings("synthetic-access")
                    public void execute() {

                        updateClassForTab(event.getSelectedItem().intValue());
                    }
                });

            }
        });
    }
562029
function initJQueryEvents(){
    $('#searchDiv').parent().scroll(function() {
        if($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight - 100) {
            globalFunc.addNodesInList();
        }
    });

    $('#toggleLayout').click(function() {
        toggleLayout();
    });

    $("#sliderText").html("Context with <strong>2</strong> hops");

    $("#slider").slider({
        range: "max",
        min: 0,
        max: 10,
        value: 2,
        slide: function (event, ui){
            var strHops = " hop";
            if (ui.value > 1){
                strHops = " hops";
            }
            $("#sliderText").html("Context with <strong>" + ui.value + "</strong>" + strHops);
            NB_HOPS = ui.value;
        }
    });
}
232763
function(init) {
				var initHeight = function() {
					var h = 0;
					wrapper.siblings('div.elfinder-panel:visible').each(function() {
						h += $(this).outerHeight(true);
					});
					wrapper.height(wz.height() - h - wrapper._padding);
				};
				
				init && initHeight();
				
				restm && cancelAnimationFrame(restm);
				restm = requestAnimationFrame(function(){
					!init && initHeight();
					var wph, cwdoh;
					// fix cwd height if it less then wrapper
					cwd.css('height', 'auto');
					wph = wrapper[0].clientHeight - parseInt(wrapper.css('padding-top')) - parseInt(wrapper.css('padding-bottom')) - parseInt(cwd.css('margin-top')),
					cwdoh = cwd.outerHeight(true);
					if (cwdoh < wph) {
						cwd.height(wph);
					}
				});
				
				list && ! colResizing && (init? wrapper.trigger('resize.fixheader') : fixTableHeader());
				
				wrapperRepaint();
			}
916604
function init(){

    frameUnixTime = utils.getUnixTimeInMilliseconds();
    frameDuration = 0;
    frameDurationClone = 0;
    timeSinceStart = 0;
    playTimeSinceStart = 0;
    appActive = true;
    appPlaying = true;
    videoDuration = 0;
    videoPlaying = false;

}
905983
function _fnInitialise ( settings )
	{
		var i, iLen, iAjaxStart=settings.iInitDisplayStart;
		var columns = settings.aoColumns, column;
		var features = settings.oFeatures;
	
		/* Ensure that the table data is fully initialised */
		if ( ! settings.bInitialised ) {
			setTimeout( function(){ _fnInitialise( settings ); }, 200 );
			return;
		}
	
		/* Show the display HTML options */
		_fnAddOptionsHtml( settings );
	
		/* Build and draw the header / footer for the table */
		_fnBuildHead( settings );
		_fnDrawHead( settings, settings.aoHeader );
		_fnDrawHead( settings, settings.aoFooter );
	
		/* Okay to show that something is going on now */
		_fnProcessingDisplay( settings, true );
	
		/* Calculate sizes for columns */
		if ( features.bAutoWidth ) {
			_fnCalculateColumnWidths( settings );
		}
	
		for ( i=0, iLen=columns.length ; i<iLen ; i++ ) {
			column = columns[i];
	
			if ( column.sWidth ) {
				column.nTh.style.width = _fnStringToCss( column.sWidth );
			}
		}
	
		// If there is default sorting required - let's do it. The sort function
		// will do the drawing for us. Otherwise we draw the table regardless of the
		// Ajax source - this allows the table to look initialised for Ajax sourcing
		// data (show 'loading' message possibly)
		_fnReDraw( settings );
	
		// Server-side processing init complete is done by _fnAjaxUpdateDraw
		var dataSrc = _fnDataSource( settings );
		if ( dataSrc != 'ssp' ) {
			// if there is an ajax source load the data
			if ( dataSrc == 'ajax' ) {
				_fnBuildAjax( settings, [], function(json) {
					var aData = _fnAjaxDataSrc( settings, json );
	
					// Got the data - add it to the table
					for ( i=0 ; i<aData.length ; i++ ) {
						_fnAddData( settings, aData[i] );
					}
	
					// Reset the init display for cookie saving. We've already done
					// a filter, and therefore cleared it before. So we need to make
					// it appear 'fresh'
					settings.iInitDisplayStart = iAjaxStart;
	
					_fnReDraw( settings );
	
					_fnProcessingDisplay( settings, false );
					_fnInitComplete( settings, json );
				}, settings );
			}
			else {
				_fnProcessingDisplay( settings, false );
				_fnInitComplete( settings );
			}
		}
	}
679662
function _fnInitialise ( oSettings )
		{
			var i, iLen, iAjaxStart=oSettings.iInitDisplayStart;
			
			/* Ensure that the table data is fully initialised */
			if ( oSettings.bInitialised === false )
			{
				setTimeout( function(){ _fnInitialise( oSettings ); }, 200 );
				return;
			}
			
			/* Show the display HTML options */
			_fnAddOptionsHtml( oSettings );
			
			/* Build and draw the header / footer for the table */
			_fnBuildHead( oSettings );
			_fnDrawHead( oSettings, oSettings.aoHeader );
			if ( oSettings.nTFoot )
			{
				_fnDrawHead( oSettings, oSettings.aoFooter );
			}
		
			/* Okay to show that something is going on now */
			_fnProcessingDisplay( oSettings, true );
			
			/* Calculate sizes for columns */
			if ( oSettings.oFeatures.bAutoWidth )
			{
				_fnCalculateColumnWidths( oSettings );
			}
			
			for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
			{
				if ( oSettings.aoColumns[i].sWidth !== null )
				{
					oSettings.aoColumns[i].nTh.style.width = _fnStringToCss( oSettings.aoColumns[i].sWidth );
				}
			}
			
			/* If there is default sorting required - let's do it. The sort function will do the
			 * drawing for us. Otherwise we draw the table regardless of the Ajax source - this allows
			 * the table to look initialised for Ajax sourcing data (show 'loading' message possibly)
			 */
			if ( oSettings.oFeatures.bSort )
			{
				_fnSort( oSettings );
			}
			else if ( oSettings.oFeatures.bFilter )
			{
				_fnFilterComplete( oSettings, oSettings.oPreviousSearch );
			}
			else
			{
				oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
				_fnCalculateEnd( oSettings );
				_fnDraw( oSettings );
			}
			
			/* if there is an ajax source load the data */
			if ( oSettings.sAjaxSource !== null && !oSettings.oFeatures.bServerSide )
			{
				var aoData = [];
				_fnServerParams( oSettings, aoData );
				oSettings.fnServerData.call( oSettings.oInstance, oSettings.sAjaxSource, aoData, function(json) {
					var aData = (oSettings.sAjaxDataProp !== "") ?
					 	_fnGetObjectDataFn( oSettings.sAjaxDataProp )(json) : json;
		
					/* Got the data - add it to the table */
					for ( i=0 ; i<aData.length ; i++ )
					{
						_fnAddData( oSettings, aData[i] );
					}
					
					/* Reset the init display for cookie saving. We've already done a filter, and
					 * therefore cleared it before. So we need to make it appear 'fresh'
					 */
					oSettings.iInitDisplayStart = iAjaxStart;
					
					if ( oSettings.oFeatures.bSort )
					{
						_fnSort( oSettings );
					}
					else
					{
						oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
						_fnCalculateEnd( oSettings );
						_fnDraw( oSettings );
					}
					
					_fnProcessingDisplay( oSettings, false );
					_fnInitComplete( oSettings, json );
				}, oSettings );
				return;
			}
			
			/* Server-side processing initialisation complete is done at the end of _fnDraw */
			if ( !oSettings.oFeatures.bServerSide )
			{
				_fnProcessingDisplay( oSettings, false );
				_fnInitComplete( oSettings );
			}
		}
251772
private void initializeDraggablePanel() {
    draggablePanel.setFragmentManager(getSupportFragmentManager());
    draggablePanel.setTopFragment(youtubeFragment);
    MoviePosterFragment moviePosterFragment = new MoviePosterFragment();
    moviePosterFragment.setPoster(VIDEO_POSTER_THUMBNAIL);
    moviePosterFragment.setPosterTitle(VIDEO_POSTER_TITLE);
    draggablePanel.setBottomFragment(moviePosterFragment);
    draggablePanel.initializeView();
    Picasso.with(this)
        .load(SECOND_VIDEO_POSTER_THUMBNAIL)
        .placeholder(R.drawable.xmen_placeholder)
        .into(thumbnailImageView);
  }
1310477
function () {
        var data = this.data;
        var targetEl = this.data.target;

        // Only set up once.
        if (targetEl.dataset.setImageFadeSetup) { return; }
        targetEl.dataset.setImageFadeSetup = true;

        // Create animation.
        targetEl.setAttribute('animation__fade', {
            property: 'material.color',
            startEvents: 'set-image-fade',
            dir: 'alternate',
            dur: data.dur,
            from: '#FFF',
            to: '#000'
        });
    }