text:
import {Component, Directive, Host, ElementRef, Optional, forwardRef, Inject} from 'angular2/angular2';

import {Ion} from '../ion';
import {Config} from '../../config/config';
import {MenuToggle} from '../menu/menu-toggle';
import {Navbar} from '../navbar/navbar';

/**
 * TODO
 */
export class ToolbarBase extends Ion  {

  constructor(
    elementRef: ElementRef,
    config: Config
  ) {
    super(elementRef, config);
    this.itemRefs = [];
    this.titleRef = null;
  }

  /**
   * @private
   */
  setTitleCmp(titleCmp) {
    this.titleCmp = titleCmp;
  }

  /**
   * @private
   */
  getTitleText() {
    return (this.titleCmp && this.titleCmp.getTitleText()) || '';
  }

  /**
   * @private
   */
  getTitleRef() {
    return this.titleCmp && this.titleCmp.elementRef;
  }

  /**
   * @private
   * A toolbar items include the left and right side `ion-nav-items`,
   * and every `menu-toggle`. It does not include the `ion-title`.
   * @returns {TODO} Array of this toolbar's item ElementRefs.
   */
  getItemRefs() {
    return this.itemRefs;
  }

  /**
   * @private
   */
  addItemRef(itemElementRef) {
    this.itemRefs.push(itemElementRef);
  }

}

/**
 * TODO
 */
@Component({
  selector: 'ion-toolbar',
  template:
    '<toolbar-background></toolbar-background>' +
    '<ng-content select="[menu-toggle]"></ng-content>' +
    '<ng-content select="ion-nav-items[primary]"></ng-content>' +
    '<ng-content select="ion-nav-items[secondary]"></ng-content>' +
    '<toolbar-content>' +
      '<ng-content></ng-content>' +
    '</toolbar-content>',
  host: {
    'class': 'toolbar'
  }
})
export class Toolbar extends ToolbarBase {
  constructor(
    elementRef: ElementRef,
    config: Config
  ) {
    super(elementRef, config);
  }

}

@Component({
  selector: 'ion-title',
  template:
    '
' +
      '<ng-content></ng-content>' +
    '
'
})
export class ToolbarTitle extends Ion {
  constructor(
    elementRef: ElementRef,
    @Optional() toolbar: Toolbar,
    @Optional() @Inject(forwardRef(() => Navbar)) navbar: Navbar
  ) {
    super(elementRef, null);
    toolbar && toolbar.setTitleCmp(this);
    navbar && navbar.setTitleCmp(this);
  }

  getTitleText() {
    return this.getNativeElement().textContent;
  }
}

/**
 * @private
 */
@Directive({
  selector: 'ion-nav-items,[menu-toggle]'
})
export class ToolbarItem extends Ion {
  constructor(
    elementRef: ElementRef,
    @Optional() toolbar: Toolbar,
    @Optional() @Inject(forwardRef(() => Navbar)) navbar: Navbar
  ) {
    super(elementRef, null);
    toolbar && toolbar.addItemRef(elementRef);
    navbar && navbar.addItemRef(elementRef);
  }
}


text:
/*
  This file is licensed to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/

using System.Xml;
using NUnit.Framework;

namespace net.sf.xmlunit.diff {

    [TestFixture]
    public class ElementSelectorsTest {
        private const string FOO = "foo";
        private const string BAR = "bar";
        private const string SOME_URI = "urn:some:uri";

        private XmlDocument doc;

        [SetUp] public void CreateDoc() {
            doc = new XmlDocument();
        }

        private void PureElementNameComparisons(ElementSelector s) {
            XmlElement control = doc.CreateElement(FOO);
            XmlElement equal = doc.CreateElement(FOO);
            XmlElement different = doc.CreateElement(BAR);
            XmlElement controlNS = doc.CreateElement(BAR, FOO, SOME_URI);

            Assert.IsFalse(s(null, null));
            Assert.IsFalse(s(null, control));
            Assert.IsFalse(s(control, null));
            Assert.IsTrue(s(control, equal));
            Assert.IsFalse(s(control, different));
            Assert.IsFalse(s(control, controlNS));
            Assert.IsTrue(s(doc.CreateElement(FOO, SOME_URI), controlNS));
        }

        [Test] public void ByName() {
            PureElementNameComparisons(ElementSelectors.ByName);
        }

        [Test] public void ByNameAndText_NamePart() {
            PureElementNameComparisons(ElementSelectors.ByNameAndText);
        }

        private void ByNameAndText_SingleLevel(ElementSelector s) {
            XmlElement control = doc.CreateElement(FOO);
            control.AppendChild(doc.CreateTextNode(BAR));
            XmlElement equal = doc.CreateElement(FOO);
            equal.AppendChild(doc.CreateTextNode(BAR));
            XmlElement equalC = doc.CreateElement(FOO);
            equalC.AppendChild(doc.CreateCDataSection(BAR));
            XmlElement noText = doc.CreateElement(FOO);
            XmlElement differentText = doc.CreateElement(FOO);
            differentText.AppendChild(doc.CreateTextNode(BAR));
            differentText.AppendChild(doc.CreateTextNode(BAR));

            Assert.IsTrue(s(control, equal));
            Assert.IsTrue(s(control, equalC));
            Assert.IsFalse(s(control, noText));
            Assert.IsFalse(s(control, differentText));
        }

        [Test] public void ByNameAndText() {
            ByNameAndText_SingleLevel(ElementSelectors.ByNameAndText);
        }

        [Test] public void ByNameAndTextRec_NamePart() {
            PureElementNameComparisons(ElementSelectors.ByNameAndTextRec);
        }

        [Test] public void ByNameAndTextRec_Single() {
            ByNameAndText_SingleLevel(ElementSelectors.ByNameAndTextRec);
        }

        [Test] public void ByNameAndTextRec() {
            XmlElement control = doc.CreateElement(FOO);
            XmlElement child = doc.CreateElement(BAR);
            control.AppendChild(child);
            child.AppendChild(doc.CreateTextNode(BAR));
            XmlElement equal = doc.CreateElement(FOO);
            XmlElement child2 = doc.CreateElement(BAR);
            equal.AppendChild(child2);
            child2.AppendChild(doc.CreateTextNode(BAR));
            XmlElement equalC = doc.CreateElement(FOO);
            XmlElement child3 = doc.CreateElement(BAR);
            equalC.AppendChild(child3);
            child3.AppendChild(doc.CreateCDataSection(BAR));
            XmlElement noText = doc.CreateElement(FOO);
            XmlElement differentLevel = doc.CreateElement(FOO);
            differentLevel.AppendChild(doc.CreateTextNode(BAR));
            XmlElement differentElement = doc.CreateElement(FOO);
            XmlElement child4 = doc.CreateElement(FOO);
            differentElement.AppendChild(child4);
            child4.AppendChild(doc.CreateTextNode(BAR));
            XmlElement differentText = doc.CreateElement(FOO);
            XmlElement child5 = doc.CreateElement(BAR);
            differentText.AppendChild(child5);
            child5.AppendChild(doc.CreateTextNode(FOO));

            ElementSelector s = ElementSelectors.ByNameAndTextRec;
            Assert.IsTrue(s(control, equal));
            Assert.IsTrue(s(control, equalC));
            Assert.IsFalse(s(control, noText));
            Assert.IsFalse(s(control, differentLevel));
            Assert.IsFalse(s(control, differentElement));
            Assert.IsFalse(s(control, differentText));
        }

        [Test] public void ByNameAndAllAttributes_NamePart() {
            PureElementNameComparisons(ElementSelectors.ByNameAndAllAttributes);
        }

        [Test] public void ByNameAndAllAttributes() {
            XmlElement control = doc.CreateElement(FOO);
            control.SetAttribute(BAR, BAR);
            XmlElement equal = doc.CreateElement(FOO);
            equal.SetAttribute(BAR, BAR);
            XmlElement noAttributes = doc.CreateElement(FOO);
            XmlElement differentValue = doc.CreateElement(FOO);
            differentValue.SetAttribute(BAR, FOO);
            XmlElement differentName = doc.CreateElement(FOO);
            differentName.SetAttribute(FOO, FOO);
            XmlElement differentNS = doc.CreateElement(FOO);
            differentNS.SetAttribute(BAR, SOME_URI, BAR);

            Assert.IsTrue(ElementSelectors.ByNameAndAllAttributes(control,
                                                                  equal));
            Assert.IsFalse(ElementSelectors.ByNameAndAllAttributes(control,
                                                                   noAttributes));
            Assert.IsFalse(ElementSelectors.ByNameAndAllAttributes(noAttributes,
                                                                   control));
            Assert.IsFalse(ElementSelectors.ByNameAndAllAttributes(control,
                                                                   differentValue));
            Assert.IsFalse(ElementSelectors.ByNameAndAllAttributes(control,
                                                                   differentName));
            Assert.IsFalse(ElementSelectors.ByNameAndAllAttributes(control,
                                                                   differentNS));
        }

        [Test] public void ByNameAndAttributes_NamePart() {
            PureElementNameComparisons(ElementSelectors
                                       .ByNameAndAttributes(new string[] {}));
            PureElementNameComparisons(ElementSelectors
                                       .ByNameAndAttributes(new XmlQualifiedName[] {}));
            PureElementNameComparisons(ElementSelectors.ByNameAndAttributes(BAR));
            PureElementNameComparisons(ElementSelectors
                                       .ByNameAndAttributes(new XmlQualifiedName(BAR,
                                                                                SOME_URI)));
        }

        [Test] public void ByNameAndAttributes_String() {
            XmlElement control = doc.CreateElement(FOO);
            control.SetAttribute(BAR, BAR);
            XmlElement equal = doc.CreateElement(FOO);
            equal.SetAttribute(BAR, BAR);
            XmlElement noAttributes = doc.CreateElement(FOO);
            XmlElement differentValue = doc.CreateElement(FOO);
            differentValue.SetAttribute(BAR, FOO);
            XmlElement differentName = doc.CreateElement(FOO);
            differentName.SetAttribute(FOO, FOO);
            XmlElement differentNS = doc.CreateElement(FOO);
            differentNS.SetAttribute(BAR, SOME_URI, BAR);

            Assert.IsTrue(ElementSelectors.ByNameAndAttributes(BAR)(control,
                                                                    equal));
            Assert.IsFalse(ElementSelectors.ByNameAndAttributes(BAR)(control,
                                                                     noAttributes));
            Assert.IsTrue(ElementSelectors.ByNameAndAttributes(FOO)(control,
                                                                    noAttributes));
            Assert.IsTrue(ElementSelectors.ByNameAndAttributes(new string[] {})
                          (control, noAttributes));
            Assert.IsFalse(ElementSelectors.ByNameAndAttributes(BAR)(noAttributes,
                                                                     control));
            Assert.IsFalse(ElementSelectors.ByNameAndAttributes(BAR)(control,
                                                                     differentValue));
            Assert.IsFalse(ElementSelectors.ByNameAndAttributes(BAR)(control,
                                                                     differentName));
            Assert.IsFalse(ElementSelectors.ByNameAndAttributes(BAR)(control,
                                                                     differentNS));
        }

        [Test] public void byNameAndAttributes_QName() {
            XmlElement control = doc.CreateElement(FOO);
            control.SetAttribute(BAR, BAR);
            XmlElement equal = doc.CreateElement(FOO);
            equal.SetAttribute(BAR, BAR);
            XmlElement noAttributes = doc.CreateElement(FOO);
            XmlElement differentValue = doc.CreateElement(FOO);
            differentValue.SetAttribute(BAR, FOO);
            XmlElement differentName = doc.CreateElement(FOO);
            differentName.SetAttribute(FOO, FOO);
            XmlElement differentNS = doc.CreateElement(FOO);
            differentNS.SetAttribute(BAR, SOME_URI, BAR);

            Assert.IsTrue(ElementSelectors.ByNameAndAttributes(new XmlQualifiedName(BAR))
                          (control, equal));
            Assert.IsFalse(ElementSelectors.ByNameAndAttributes(new XmlQualifiedName(BAR))
                           (control, noAttributes));
            Assert.IsTrue(ElementSelectors.ByNameAndAttributes(new XmlQualifiedName(FOO))
                          (control, noAttributes));
            Assert.IsTrue(ElementSelectors.ByNameAndAttributes(new XmlQualifiedName[] {})
                          (control, noAttributes));
            Assert.IsFalse(ElementSelectors.ByNameAndAttributes(new XmlQualifiedName(BAR))
                           (noAttributes, control));
            Assert.IsFalse(ElementSelectors.ByNameAndAttributes(new XmlQualifiedName(BAR))
                           (control, differentValue));
            Assert.IsFalse(ElementSelectors.ByNameAndAttributes(new XmlQualifiedName(BAR))
                           (control, differentName));
            Assert.IsFalse(ElementSelectors.ByNameAndAttributes(new XmlQualifiedName(BAR))
                           (control, differentNS));
        }

        [Test] public void ByNameAndAttributesControlNS_NamePart() {
            PureElementNameComparisons(ElementSelectors
                                       .ByNameAndAttributesControlNS());
            PureElementNameComparisons(ElementSelectors
                                       .ByNameAndAttributesControlNS(BAR));
        }

        [Test] public void ByNameAndAttributesControlNS() {
            XmlElement control = doc.CreateElement(FOO);
            control.SetAttribute(BAR, SOME_URI, BAR);
            XmlElement equal = doc.CreateElement(FOO);
            equal.SetAttribute(BAR, SOME_URI, BAR);
            XmlElement noAttributes = doc.CreateElement(FOO);
            XmlElement differentValue = doc.CreateElement(FOO);
            differentValue.SetAttribute(BAR, SOME_URI, FOO);
            XmlElement differentName = doc.CreateElement(FOO);
            differentName.SetAttribute(FOO, SOME_URI, FOO);
            XmlElement differentNS = doc.CreateElement(FOO);
            differentNS.SetAttribute(BAR, SOME_URI + "2", BAR);
            XmlElement noNS = doc.CreateElement(FOO);
            noNS.SetAttribute(BAR, BAR);

            Assert.IsTrue(ElementSelectors.ByNameAndAttributesControlNS(BAR)
                          (control, equal));
            Assert.IsFalse(ElementSelectors.ByNameAndAttributesControlNS(BAR)
                           (control, noAttributes));
            Assert.IsTrue(ElementSelectors.ByNameAndAttributesControlNS(FOO)
                          (control, noAttributes));
            Assert.IsTrue(ElementSelectors.ByNameAndAttributesControlNS()
                          (control, noAttributes));
            Assert.IsTrue(ElementSelectors.ByNameAndAttributesControlNS(BAR)
                          (noAttributes, control));
            Assert.IsFalse(ElementSelectors.ByNameAndAttributesControlNS(BAR)
                           (noAttributes, noNS));
            Assert.IsFalse(ElementSelectors.ByNameAndAttributesControlNS(BAR)
                           (control, differentValue));
            Assert.IsFalse(ElementSelectors.ByNameAndAttributesControlNS(BAR)
                           (control, differentName));
            Assert.IsFalse(ElementSelectors.ByNameAndAttributesControlNS(BAR)
                           (control, differentNS));
            Assert.IsFalse(ElementSelectors.ByNameAndAttributesControlNS(BAR)
                           (control, noNS));
        }

    }
}

redpajama_set_name: RedPajamaGithub


text:
package org.zstack.header.storage.snapshot;

import org.zstack.header.storage.primary.PrimaryStorageEO;
import org.zstack.header.vo.ForeignKey;
import org.zstack.header.vo.ForeignKey.ReferenceOption;
import org.zstack.header.vo.Index;
import org.zstack.header.vo.ResourceVO;
import org.zstack.header.vo.ShadowEntity;
import org.zstack.header.volume.VolumeEO;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 */
@MappedSuperclass
public class VolumeSnapshotAO extends ResourceVO implements ShadowEntity {
    @Column
    @Index
    private String name;

    @Column
    private String description;

    @Column
    private String type;

    @Column
    @ForeignKey(parentEntityClass = VolumeEO.class, onDeleteAction = ReferenceOption.SET_NULL)
    private String volumeUuid;

    @Column
    private String format;

    @Column
    @ForeignKey(parentEntityClass = VolumeSnapshotTreeEO.class, onDeleteAction = ReferenceOption.CASCADE)
    private String treeUuid;

    @Column
    @ForeignKey(parentEntityClass = VolumeSnapshotEO.class, onDeleteAction = ReferenceOption.SET_NULL)
    private String parentUuid;

    @Column
    @ForeignKey(parentEntityClass = PrimaryStorageEO.class, onDeleteAction = ReferenceOption.SET_NULL)
    private String primaryStorageUuid;

    @Column
    private String primaryStorageInstallPath;

    @Column
    private int distance;

    @Column
    private long size;

    @Column
    private boolean latest;

    @Column
    private boolean fullSnapshot;

    @Column
    private String volumeType;

    @Column
    @Enumerated(EnumType.STRING)
    private VolumeSnapshotState state;

    @Column
    @Enumerated(EnumType.STRING)
    private VolumeSnapshotStatus status;

    @Column
    private Timestamp createDate;

    @Column
    private Timestamp lastOpDate;

    @Transient
    private VolumeSnapshotAO shadow;

    public VolumeSnapshotAO getShadow() {
        return shadow;
    }

    @PreUpdate
    private void preUpdate() {
        lastOpDate = null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public String getParentUuid() {
        return parentUuid;
    }

    public void setParentUuid(String parentUuid) {
        this.parentUuid = parentUuid;
    }

    public VolumeSnapshotState getState() {
        return state;
    }

    public void setState(VolumeSnapshotState state) {
        this.state = state;
    }

    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    public Timestamp getLastOpDate() {
        return lastOpDate;
    }

    public void setLastOpDate(Timestamp lastOpDate) {
        this.lastOpDate = lastOpDate;
    }

    public String getVolumeUuid() {
        return volumeUuid;
    }

    public void setVolumeUuid(String volumeUuid) {
        this.volumeUuid = volumeUuid;
    }

    public VolumeSnapshotStatus getStatus() {
        return status;
    }

    public void setStatus(VolumeSnapshotStatus status) {
        this.status = status;
    }

    public boolean isLatest() {
        return latest;
    }

    public void setLatest(boolean latest) {
        this.latest = latest;
    }

    public boolean isFullSnapshot() {
        return fullSnapshot;
    }

    public void setFullSnapshot(boolean fullSnapshot) {
        this.fullSnapshot = fullSnapshot;
    }

    public String getPrimaryStorageUuid() {
        return primaryStorageUuid;
    }

    public void setPrimaryStorageUuid(String primaryStorageUuid) {
        this.primaryStorageUuid = primaryStorageUuid;
    }

    public String getPrimaryStorageInstallPath() {
        return primaryStorageInstallPath;
    }

    public void setPrimaryStorageInstallPath(String primaryStorageInstallPath) {
        this.primaryStorageInstallPath = primaryStorageInstallPath;
    }

    public void setVolumeType(String volumeType) {
        this.volumeType = volumeType;
    }

    public String getVolumeType() {
        return volumeType;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public int getDistance() {
        return distance;
    }

    public void setDistance(int distance) {
        this.distance = distance;
    }

    public String getTreeUuid() {
        return treeUuid;
    }

    public void setTreeUuid(String treeUuid) {
        this.treeUuid = treeUuid;
    }

    @Override
    public void setShadow(Object o) {
        shadow = (VolumeSnapshotAO) o;
    }
}


text:
layout: blog
script: |

  $('.carousel').carousel({
      interval: 5000 //changes the speed
  });

---

{% include portfolio/carousel.html %}

Project Description

		{{content}}

{% include portfolio/related-project.html %}


text:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Recent & Upcoming Talks on Jonas Adler</title>
    <link>http://jonasadler.com/talk/</link>
    <description>Recent content in Recent & Upcoming Talks on Jonas Adler</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <copyright>&copy; 2018</copyright>
    <lastBuildDate>Sun, 01 Jan 2017 00:00:00 +0000</lastBuildDate>

	<atom:link href="http://jonasadler.com/talk/index.xml" rel="self" type="application/rss+xml" />

    <item>
      <title>Invited Talk: Deep learning for inverse problems. Where are we, and how far can we go?</title>
      <link>http://jonasadler.com/talk/2019gamm/</link>
      <pubDate>Mon, 18 Feb 2019 00:00:00 +0000</pubDate>

      <guid>http://jonasadler.com/talk/2019gamm/</guid>
      <description></description>
    </item>

    <item>
      <title>Invited Talk: Deep Posterior Sampling</title>
      <link>http://jonasadler.com/talk/2019basp/</link>
      <pubDate>Mon, 04 Feb 2019 00:00:00 +0000</pubDate>

      <guid>http://jonasadler.com/talk/2019basp/</guid>
      <description></description>
    </item>

    <item>
      <title>Contributed Talk: Deep Bayesian Inversion</title>
      <link>http://jonasadler.com/talk/2019dlip/</link>
      <pubDate>Tue, 22 Jan 2019 00:00:00 +0000</pubDate>

      <guid>http://jonasadler.com/talk/2019dlip/</guid>
      <description></description>
    </item>

    <item>
      <title>Invited Talk: Recent advances in using machine learning for image reconstruction</title>
      <link>http://jonasadler.com/talk/2018nyu/</link>
      <pubDate>Wed, 12 Dec 2018 00:00:00 +0000</pubDate>

      <guid>http://jonasadler.com/talk/2018nyu/</guid>
      <description></description>
    </item>

    <item>
      <title>Oral: Task adapted reconstruction for inverse problems</title>
      <link>http://jonasadler.com/talk/2018medneurips/</link>
      <pubDate>Sat, 08 Dec 2018 00:00:00 +0000</pubDate>

      <guid>http://jonasadler.com/talk/2018medneurips/</guid>
      <description></description>
    </item>

    <item>
      <title>Invited talk: Deep Learning for Image Reconstruction</title>
      <link>http://jonasadler.com/talk/2018unibath/</link>
      <pubDate>Sun, 04 Nov 2018 00:00:00 +0000</pubDate>

      <guid>http://jonasadler.com/talk/2018unibath/</guid>
      <description></description>
    </item>

    <item>
      <title>Invited talk: Deep Learning for Image Reconstruction</title>
      <link>http://jonasadler.com/talk/2018icmsec/</link>
      <pubDate>Fri, 19 Oct 2018 00:00:00 +0100</pubDate>

      <guid>http://jonasadler.com/talk/2018icmsec/</guid>
      <description></description>
    </item>

    <item>
      <title>Invited talk: Learned Iterative Reconstruction for CT</title>
      <link>http://jonasadler.com/talk/2018siam_ct/</link>
      <pubDate>Fri, 08 Jun 2018 00:00:00 +0100</pubDate>

      <guid>http://jonasadler.com/talk/2018siam_ct/</guid>
      <description></description>
    </item>

    <item>
      <title>Invited talk: Learning to solve inverse problems with ODL</title>
      <link>http://jonasadler.com/talk/2018siam_odl/</link>
      <pubDate>Fri, 08 Jun 2018 00:00:00 +0100</pubDate>

      <guid>http://jonasadler.com/talk/2018siam_odl/</guid>
      <description></description>
    </item>

    <item>
      <title>Invited talk: What Can We Expect? Computable Upper Bounds to Machine Learning in Inverse Problems Using MCMC</title>
      <link>http://jonasadler.com/talk/2018hpsc/</link>
      <pubDate>Fri, 23 Mar 2018 00:00:00 +0000</pubDate>

      <guid>http://jonasadler.com/talk/2018hpsc/</guid>
      <description></description>
    </item>

    <item>
      <title>Contributed talk: Learned iterative reconstruction</title>
      <link>http://jonasadler.com/talk/2018ssba/</link>
      <pubDate>Fri, 09 Mar 2018 00:00:00 +0000</pubDate>

      <guid>http://jonasadler.com/talk/2018ssba/</guid>
      <description></description>
    </item>

    <item>
      <title>Poster: Learning to solve inverse problems using Wasserstein Loss</title>
      <link>http://jonasadler.com/talk/2017nips/</link>
      <pubDate>Sat, 09 Dec 2017 00:00:00 +0000</pubDate>

      <guid>http://jonasadler.com/talk/2017nips/</guid>
      <description></description>
    </item>

    <item>
      <title>Contributed talk: Learned forward operators: Variational regularization for black-box models</title>
      <link>http://jonasadler.com/talk/2017generative_models_parameter/</link>
      <pubDate>Tue, 31 Oct 2017 00:00:00 +0000</pubDate>

      <guid>http://jonasadler.com/talk/2017generative_models_parameter/</guid>
      <description></description>
    </item>

    <item>
      <title>Invited talk: Learned iterative reconstruction schemes, theory and practice</title>
      <link>http://jonasadler.com/talk/2017variationalmethodsml/</link>
      <pubDate>Mon, 18 Sep 2017 00:00:00 +0100</pubDate>

      <guid>http://jonasadler.com/talk/2017variationalmethodsml/</guid>
      <description></description>
    </item>

    <item>
      <title>Invited talk: Using deep learning to reconstruct multi-modal images - A primal dual scheme with examples in PET-MRI</title>
      <link>http://jonasadler.com/talk/2017aip/</link>
      <pubDate>Wed, 31 May 2017 00:00:00 +0100</pubDate>

      <guid>http://jonasadler.com/talk/2017aip/</guid>
      <description></description>
    </item>

    <item>
      <title>ODL: A python library for inverse problems</title>
      <link>http://jonasadler.com/talk/2015ieeemic/</link>
      <pubDate>Sun, 15 Nov 2015 00:00:00 +0000</pubDate>

      <guid>http://jonasadler.com/talk/2015ieeemic/</guid>
      <description></description>
    </item>

  </channel>
</rss>


text:
/**
 * @author Nikos Arechiga
 * @author Anuradha Vakil
 * Toyota InfoTechnology Center, USA
 * 465 N Bernardo Ave, Mountain View, CA 94043
 */
package dl.syntax;

import dl.semantics.*;
import java.util.*;

public class ComparisonFormula extends dLFormula {
	boolean debug = false;

// Constructors and field getters
	public ComparisonFormula( String inequality, String lhs, String rhs ) {
		this.operator = new Operator( inequality );

		arguments = new ArrayList<>();
		arguments.add( Term.parse( lhs ) );
		arguments.add( Term.parse(rhs));
	}

	public ComparisonFormula ( Operator inequality, Term lhs, Term rhs ) {
		operator = inequality; //

		arguments = new ArrayList<dLStructure>();
		arguments.add( lhs );
		arguments.add( rhs );
	}

	public ComparisonFormula ( String inequality, Term lhs, Term rhs ) {
		operator = new Operator(inequality); //

		arguments = new ArrayList<dLStructure>();
		arguments.add( lhs );
		arguments.add( rhs );
	}

	public ComparisonFormula() {
	}

	public Operator getInequality() {
		return (Operator)operator;
	}

	public Term getLHS() {
		//return ((Term)(arguments.get(0))).clone();
		return (Term)(getArgument(0));
	}

	public Term getRHS() {
		//return ((Term)(arguments.get(1))).clone();
		return (Term)(getArgument(1));
	}

	//public void setInequality( Operator inequality ) {
	//	operator = inequality;
	//}
	//
	//public void setInequality( String inequality ) {
	//	operator = new Operator( inequality );
	//}
// Substitution method
	public ComparisonFormula substitute( Valuation substitution ) {
		ComparisonFormula substitutedFormula  = new ComparisonFormula( getInequality().clone(),
						getLHS().substitute( substitution ),
						getRHS().substitute( substitution ) );
		if( debug ) {
			System.out.println("Returning ComparisonFormula: " + substitutedFormula.toString() );
		}
		return substitutedFormula;
	}

	public ComparisonFormula replace( Replacement replacement ) {
		return new ComparisonFormula( getInequality().clone(),
								getLHS().replace( replacement ),
								getRHS().replace( replacement ) );
	}

// Clone method
	public ComparisonFormula clone() {
		return new ComparisonFormula( getInequality().clone(),
						getLHS().clone(),
						getRHS().clone());
	}

// String methods
	public String toString () {
		return "( " + getLHS().toString()
				+ " " + getInequality().toString() + " "
				+ getRHS().toString() + " )";
	}

	public String todRealString () {
		String returnString;

		if ( operator.equals( new Operator("!=") )) {
			// dReal doesn't know this operator, so convert to inequalities
			ComparisonFormula avoidLeft = new ComparisonFormula(
								"<",
								this.getLHS(),
								this.getRHS() );
			ComparisonFormula avoidRight = new ComparisonFormula(
								">",
								this.getLHS(),
								this.getRHS() );
			OrFormula avoidPoint = new OrFormula( avoidLeft, avoidRight );

			returnString = avoidPoint.todRealString();
		} else if ( operator.equals( new Operator("=="))) {
			returnString = "( ="
					+ " " +getLHS().todRealString()
					+ " " +getRHS().todRealString() + ")";

		} else {
			returnString =  "(" + this.getOperator().toString()
				+ " " +getLHS().todRealString()
				+ " " +getRHS().todRealString() + ")";
		}

		// Doesn't know "==" either
		returnString.replace("==", "=");

		return returnString;

	}

// Assorted convenience functions
	public boolean isFirstOrder() {
		return true;
	}

	public boolean isPropositionalPrimitive() {
		return true;
	}

	public boolean isStatic() {
		return true;
	}

	public boolean isQuantifierFree() {
		return true;
	}

// Useful, arithmetic, linearity-related functions
	public boolean isLinearIn( ArrayList<RealVariable> variables ) {
		return getLHS().isLinearIn( variables )
							&& getRHS().isLinearIn( variables );
	}

	public boolean isAffineIn( ArrayList<RealVariable> variables ) {
		return getLHS().isAffineIn( variables )
							&& getRHS().isAffineIn( variables );
	}

// Logic
	public ComparisonFormula negate() {
		ComparisonFormula returnFormula = null;

		if ( operator.equals( new Operator("<=") ) ) {
			returnFormula = new ComparisonFormula(">",
															this.getLHS().clone(),
															this.getRHS().clone() );

		} else if ( operator.equals( new Operator("<") )) {
			returnFormula = new ComparisonFormula(">=",
														this.getLHS().clone(),
														this.getRHS().clone() );

		} else if ( operator.equals( new Operator("==") )
				|| operator.equals( new Operator("=") )
			) {
			returnFormula = new ComparisonFormula("!=",
														this.getLHS().clone(),
														this.getRHS().clone() );

		} else if ( operator.equals( new Operator("!=") )) {
			returnFormula = new ComparisonFormula("==",
														this.getLHS().clone(),
														this.getRHS().clone() );

		} else if ( operator.equals( new Operator(">") )) {
			returnFormula = new ComparisonFormula("<=",
														this.getLHS().clone(),
														this.getRHS().clone() );

		} else if ( operator.equals( new Operator(">=") )) {
			returnFormula = new ComparisonFormula("<",
														this.getLHS().clone(),
														this.getRHS().clone() );

		} else {
			throw new UnknownInequalityException( operator.toString() );
		}

		return returnFormula;
	}

	public Set<RealVariable> getBoundVariables() {
		return new HashSet<RealVariable>();
	}

	public Set<RealVariable> getFreeVariables() {
		HashSet<RealVariable> freeVariables = new HashSet<RealVariable>();
		freeVariables.addAll( getLHS().getFreeVariables() );
		freeVariables.addAll( getRHS().getFreeVariables() );
		return freeVariables;
	}

	public Set<RealVariable> getDynamicVariables() {
		return new HashSet<RealVariable>();
	}

}


text:
#include <pthread.h>
#include <limits.h>

#include "postgres.h"

#include "libpq/libpq-be.h"
#include "cdb/cdbvars.h"
#include "miscadmin.h"
#include "pgtime.h"
#include "postmaster/syslogger.h"

#ifndef _WIN32
#define mythread() ((unsigned long) pthread_self())
#else
#define mythread() ((unsigned long) pthread_self().p)
#endif

/*
 * We can't use elog to write to the log if we are running in a thread.
 *
 * So, write some thread-safe routines to write to the log.
 *
 * Ugly:  This write in a fixed format, and ignore what the log_prefix guc says.
 */
static pthread_mutex_t send_mutex = PTHREAD_MUTEX_INITIALIZER;

#ifdef WIN32
static void
			write_eventlog(int level, const char *line);

/*
 * Write a message line to the windows event log
 */
static void
write_eventlog(int level, const char *line)
{
	int			eventlevel = EVENTLOG_ERROR_TYPE;
	static HANDLE evtHandle = INVALID_HANDLE_VALUE;

	if (evtHandle == INVALID_HANDLE_VALUE)
	{
		evtHandle = RegisterEventSource(NULL, "PostgreSQL");
		if (evtHandle == NULL)
		{
			evtHandle = INVALID_HANDLE_VALUE;
			return;
		}
	}

	ReportEvent(evtHandle,
				eventlevel,
				0,
				0,				/* All events are Id 0 */
				NULL,
				1,
				0,
				&line,
				NULL);
}
#endif							/* WIN32 */

static void
get_timestamp(char *strfbuf, int length)
{
	pg_time_t	stamp_time;
	char		msbuf[8];
	struct timeval tv;

	gettimeofday(&tv, NULL);
	stamp_time = tv.tv_sec;

	pg_strftime(strfbuf, length,
	/* leave room for microseconds... */
	/* Win32 timezone names are too long so don't print them */
#ifndef WIN32
				"%Y-%m-%d %H:%M:%S        %Z",
#else
				"%Y-%m-%d %H:%M:%S        ",
#endif
				pg_localtime(&stamp_time, log_timezone));

	/* 'paste' milliseconds into place... */
	sprintf(msbuf, ".%06d", (int) (tv.tv_usec));
	strncpy(strfbuf + 19, msbuf, 7);
}

void
write_log(const char *fmt,...)
{
	char		logprefix[1024];
	char		tempbuf[25];
	va_list		ap;

	fmt = _(fmt);

	va_start(ap, fmt);

	if (Logging_collector && gp_log_format == 1)
	{
		char		errbuf[2048];	/* Arbitrary size? */

		vsnprintf(errbuf, sizeof(errbuf), fmt, ap);

		/* Write the message in the CSV format */
		write_message_to_server_log(LOG,
									0,
									errbuf,
									NULL,
									NULL,
									NULL,
									0,
									0,
									NULL,
									NULL,
									NULL,
									false,
									NULL,
									0,
									0,
									true,
									NULL,
									false);

		va_end(ap);
		return;
	}

	get_timestamp(logprefix, sizeof(logprefix));
	strcat(logprefix, "|");
	if (MyProcPort)
	{
		const char *username = MyProcPort->user_name;

		if (username == NULL || *username == '\0')
			username = "";
		strcat(logprefix, username);	/* user */
	}

	strcat(logprefix, "|");
	if (MyProcPort)
	{
		const char *dbname = MyProcPort->database_name;

		if (dbname == NULL || *dbname == '\0')
			dbname = "";
		strcat(logprefix, dbname);
	}
	strcat(logprefix, "|");
	sprintf(tempbuf, "%d", MyProcPid);
	strcat(logprefix, tempbuf); /* pid */
	strcat(logprefix, "|");
	sprintf(tempbuf, "con%d cmd%d", gp_session_id, gp_command_count);
	strcat(logprefix, tempbuf);

	strcat(logprefix, "|");
	strcat(logprefix, ":-THREAD ");
	if (pthread_equal(main_tid, pthread_self()))
		strcat(logprefix, "MAIN");
	else
	{
		sprintf(tempbuf, "%lu", mythread());
		strcat(logprefix, tempbuf);
	}
	strcat(logprefix, ":  ");

	strcat(logprefix, fmt);

	if (fmt[strlen(fmt) - 1] != '\n')
		strcat(logprefix, "\n");

	/*
	 * We don't trust that vfprintf won't get confused if it is being run by
	 * two threads at the same time, which could cause interleaved messages.
	 * Let's play it safe, and make sure only one thread is doing this at a
	 * time.
	 */
	pthread_mutex_lock(&send_mutex);
#ifndef WIN32
	/* On Unix, we just fprintf to stderr */
	vfprintf(stderr, logprefix, ap);
	fflush(stderr);
#else

	/*
	 * On Win32, we print to stderr if running on a console, or write to
	 * eventlog if running as a service
	 */
	if (pgwin32_is_service())	/* Running as a service */
	{
		char		errbuf[2048];	/* Arbitrary size? */

		vsnprintf(errbuf, sizeof(errbuf), logprefix, ap);

		write_eventlog(EVENTLOG_ERROR_TYPE, errbuf);
	}
	else
	{
		/* Not running as service, write to stderr */
		vfprintf(stderr, logprefix, ap);
		fflush(stderr);
	}
#endif
	pthread_mutex_unlock(&send_mutex);
	va_end(ap);
}


text:
def main():

    import os
    import argparse

    from qap.script_utils import csv_to_pandas_df, read_txt_file, \
                                 qap_csv_correlations

    parser = argparse.ArgumentParser()

    parser.add_argument("old_csv", type=str, \
                            help="path to the QAP CSV output file from a " \
                                 "previous run or version")

    parser.add_argument("new_csv", type=str, \
                            help="path to the QAP CSV output file from the " \
                                 "current run or version")

    parser.add_argument("--replacements", type=str, \
                            help="text file containing column name pairs " \
                                 "to be updated/renamed in the old CSV - " \
                                 "ex. 'subject,Participant' on one line to " \
                                 "rename the 'subject' column to " \
                                 "'Participant'")

    args = parser.parse_args()

    # run it!
    old_data = csv_to_pandas_df(args.old_csv)
    new_data = csv_to_pandas_df(args.new_csv)

    if args.replacements:
    	replacements = read_txt_file(args.replacements)
    else:
        replacements = None

    correlations_dict = qap_csv_correlations(old_data, new_data, replacements)

    print "\nQAP Results Correlations (Pearson's r)"
    print "Previous dataset: %s" % os.path.abspath(args.old_csv)
    print "Current dataset: %s\n" % os.path.abspath(args.new_csv)
    for key in sorted(correlations_dict.keys()):
    	print "%s: %f" % (key, correlations_dict[key][0])
    print "\n"

if __name__ == "__main__":
    main()


text:
package denominator.clouddns;

import java.net.URI;
import java.util.ArrayList;
import java.util.Map;

import denominator.model.Zone;
import feign.Body;
import feign.FeignException;
import feign.Headers;
import feign.Param;
import feign.RequestLine;

class RackspaceApis {

  static <X> ListWithNext<X> emptyOn404(Pager<X> pagingFunction, URI nullOrNext) {
    try {
      return pagingFunction.apply(nullOrNext);
    } catch (FeignException e) {
      if (e.getMessage().indexOf("status 404") != -1) {
        return new ListWithNext<X>();
      }
      throw e;
    }
  }

  @Headers("Content-Type: application/json")
  interface CloudIdentity {

    @RequestLine("POST /tokens")
    @Body("%7B\"auth\":%7B\"RAX-KSKEY:apiKeyCredentials\":%7B\"username\":\"{username}\",\"apiKey\":\"{apiKey}\"%7D%7D%7D")
    TokenIdAndPublicURL apiKeyAuth(URI endpoint, @Param("username") String username,
                                   @Param("apiKey") String apiKey);

    @RequestLine("POST /tokens")
    @Body("%7B\"auth\":%7B\"passwordCredentials\":%7B\"username\":\"{username}\",\"password\":\"{password}\"%7D%7D%7D")
    TokenIdAndPublicURL passwordAuth(URI endpoint, @Param("username") String username,
                                     @Param("password") String password);
  }

  interface CloudDNS {

    @RequestLine("GET /limits")
    Map<String, Object> limits();

    @RequestLine("GET /status/{jobId}?showDetails=true")
    Job getStatus(@Param("jobId") String jobId);

    @RequestLine("POST /domains")
    @Body("%7B\"domains\":[%7B\"name\":\"{name}\",\"emailAddress\":\"{email}\",\"ttl\":{ttl}%7D]%7D")
    @Headers("Content-Type: application/json")
    Job createDomain(@Param("name") String name, @Param("email") String email,
                     @Param("ttl") int ttl);

    @RequestLine("PUT /domains")
    @Body("%7B\"domains\":[%7B\"id\":\"{id}\",\"emailAddress\":\"{email}\",\"ttl\":{ttl}%7D]%7D")
    @Headers("Content-Type: application/json")
    Job updateDomain(@Param("id") String id, @Param("email") String email, @Param("ttl") int ttl);

    @RequestLine("DELETE /domains/{id}")
    Job deleteDomain(@Param("id") String id);

    /**
     * Note this doesn't make sense to return anything except one or none, as duplicate domains
     * aren't permitted in the create api.
     */
    @RequestLine("GET /domains?name={name}")
    ListWithNext<Zone> domainsByName(@Param("name") String name);

    @RequestLine("GET")
    ListWithNext<Zone> domains(URI href);

    @RequestLine("GET /domains")
    ListWithNext<Zone> domains();

    @RequestLine("GET")
    ListWithNext<Record> records(URI href);

    @RequestLine("GET /domains/{domainId}/records")
    ListWithNext<Record> records(@Param("domainId") int id);

    @RequestLine("GET /domains/{domainId}/records?name={name}&type={type}")
    ListWithNext<Record> recordsByNameAndType(@Param("domainId") int id,
                                              @Param("name") String nameFilter,
                                              @Param("type") String typeFilter);

    @RequestLine("POST /domains/{domainId}/records")
    @Body("%7B\"records\":[%7B\"name\":\"{name}\",\"type\":\"{type}\",\"ttl\":\"{ttl}\",\"data\":\"{data}\"%7D]%7D")
    @Headers("Content-Type: application/json")
    Job createRecord(@Param("domainId") int id, @Param("name") String name,
                     @Param("type") String type, @Param("ttl") int ttl, @Param("data") String data);

    @RequestLine("POST /domains/{domainId}/records")
    @Body("%7B\"records\":[%7B\"name\":\"{name}\",\"type\":\"{type}\",\"ttl\":\"{ttl}\",\"data\":\"{data}\",\"priority\":\"{priority}\"%7D]%7D")
    @Headers("Content-Type: application/json")
    Job createRecordWithPriority(@Param("domainId") int id, @Param("name") String name,
                                 @Param("type") String type, @Param("ttl") int ttl,
                                 @Param("data") String data, @Param("priority") int priority);

    @RequestLine("PUT /domains/{domainId}/records/{recordId}")
    @Body("%7B\"ttl\":\"{ttl}\",\"data\":\"{data}\"%7D")
    @Headers("Content-Type: application/json")
    Job updateRecord(@Param("domainId") int domainId, @Param("recordId") String recordId,
                     @Param("ttl") int ttl, @Param("data") String data);

    @RequestLine("DELETE /domains/{domainId}/records/{recordId}")
    Job deleteRecord(@Param("domainId") int domainId,
                     @Param("recordId") String recordId);
  }

  interface Pager<X> {

    ListWithNext<X> apply(URI nullOrNext);
  }

  static class TokenIdAndPublicURL {

    String tokenId;
    String publicURL;
  }

  static class Job {

    String id;
    String status;
    String errorDetails;
    String resultId;
  }

  static class Record {

    String id;
    String name;
    String type;
    Integer ttl;
    Integer priority;
    private String data;

    public String data() {
      if ("AAAA".equals(type)) {
        return data.toUpperCase();
      }

      return data;
    }

    public void data(String data) {
      this.data = data;
    }

    // toString ordering
    @Override
    public String toString() {
      return new StringBuilder(name).append(type).append(ttl).append(data).append(priority)
          .toString();
    }
  }

  static class ListWithNext<X> extends ArrayList<X> {

    private static final long serialVersionUID = 1L;
    URI next;
  }
}


text:
<?php
include "inc/configuration.php";
?>
<!DOCTYPE HTML>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="style.css" />
<title>Prize Banker - Testimonials</title>

Contact Us

Testimonials

VIPs

Invite Friends

About Us

Home

Testimonials

Checkout our Members Testimonials

										<?php
										if ($_GET['video']){
											echo "";
										}else{
										$query = mysql_query("select * from testimonial ORDER BY id DESC LIMIT 1") or die(mysql_error());
										$row = mysql_fetch_assoc($query);
										$code = $row['code'];
										echo "";

										}
										?>

							<?php
							$query = mysql_query("select * from testimonial ORDER BY id DESC") or die(mysql_error());
							while ($row = mysql_fetch_assoc($query)){
								$title = $row['title'];
								$embed_code = $row['code'];
								echo "

";
							}
							?>

                © Copyright 2013 - All Rights Reserved to Prize Banker™

                Terms & Policies     |
                Contact Us


text:
require 'spec_helper'

module Ecm
  describe Subscriptions do
    it "should be valid" do
      Subscriptions.should be_a(Module)
    end
  end
end


text:
package com.newsblur.fragment;

import android.app.LoaderManager;
import android.content.Loader;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.os.Bundle;
import android.app.DialogFragment;
import android.app.Fragment;
import android.util.Log;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.Display;
import android.view.LayoutInflater;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnCreateContextMenuListener;
import android.view.ViewGroup;
import android.widget.ExpandableListView;
import android.widget.ExpandableListView.OnChildClickListener;
import android.widget.ExpandableListView.OnGroupClickListener;

import com.newsblur.R;
import com.newsblur.activity.AllStoriesItemsList;
import com.newsblur.activity.FeedItemsList;
import com.newsblur.activity.ItemsList;
import com.newsblur.activity.SavedStoriesItemsList;
import com.newsblur.activity.SocialFeedItemsList;
import com.newsblur.database.DatabaseConstants;
import static com.newsblur.database.DatabaseConstants.getStr;
import com.newsblur.database.FolderListAdapter;
import com.newsblur.domain.Feed;
import com.newsblur.domain.SocialFeed;
import com.newsblur.util.AppConstants;
import com.newsblur.util.FeedSet;
import com.newsblur.util.FeedUtils;
import com.newsblur.util.PrefConstants;
import com.newsblur.util.StateFilter;
import com.newsblur.util.UIUtils;

public class FolderListFragment extends NbFragment implements OnGroupClickListener, OnChildClickListener, OnCreateContextMenuListener, LoaderManager.LoaderCallbacks<Cursor> {

    private static final int SOCIALFEEDS_LOADER = 1;
    private static final int FOLDERFEEDMAP_LOADER = 2;
    private static final int FEEDS_LOADER = 3;
    private static final int SAVEDCOUNT_LOADER = 4;

	private FolderListAdapter adapter;
	public StateFilter currentState = StateFilter.SOME;
	private SharedPreferences sharedPreferences;
    private ExpandableListView list;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		adapter = new FolderListAdapter(getActivity());
	}

    @Override
    public synchronized void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
		sharedPreferences = getActivity().getSharedPreferences(PrefConstants.PREFERENCES, 0);
        if (getLoaderManager().getLoader(FOLDERFEEDMAP_LOADER) == null) {
            getLoaderManager().initLoader(SOCIALFEEDS_LOADER, null, this);
            getLoaderManager().initLoader(FOLDERFEEDMAP_LOADER, null, this);
            getLoaderManager().initLoader(FEEDS_LOADER, null, this);
            getLoaderManager().initLoader(SAVEDCOUNT_LOADER, null, this);
        }
    }

	@Override
	public Loader<Cursor> onCreateLoader(int id, Bundle args) {
        switch (id) {
            case SOCIALFEEDS_LOADER:
                return dbHelper.getSocialFeedsLoader(currentState);
            case FOLDERFEEDMAP_LOADER:
                return dbHelper.getFolderFeedMapLoader();
            case FEEDS_LOADER:
                return dbHelper.getFeedsLoader(currentState);
            case SAVEDCOUNT_LOADER:
                return dbHelper.getSavedStoryCountLoader();
            default:
                throw new IllegalArgumentException("unknown loader created");
        }
	}

    @Override
	public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
        try {
            switch (loader.getId()) {
                case SOCIALFEEDS_LOADER:
                    adapter.setSocialFeedCursor(cursor);
                    break;
                case FOLDERFEEDMAP_LOADER:
                    adapter.setFolderFeedMapCursor(cursor);
                    break;
                case FEEDS_LOADER:
                    adapter.setFeedCursor(cursor);
                    break;
                case SAVEDCOUNT_LOADER:
                    adapter.setSavedCountCursor(cursor);
                    break;
                default:
                    throw new IllegalArgumentException("unknown loader created");
            }
            checkOpenFolderPreferences();
        } catch (Exception e) {
            // for complex folder sets, these ops can take so long that they butt heads
            // with the destruction of the fragment and adapter. crashes can ensue.
            Log.w(this.getClass().getName(), "failed up update fragment state", e);
        }
    }

	@Override
	public void onLoaderReset(Loader<Cursor> loader) {
		; // our adapter doesn't hold on to cursors
	}

	public void hasUpdated() {
        if (isAdded()) {
		    getLoaderManager().restartLoader(SOCIALFEEDS_LOADER, null, this);
		    getLoaderManager().restartLoader(FOLDERFEEDMAP_LOADER, null, this);
		    getLoaderManager().restartLoader(FEEDS_LOADER, null, this);
		    getLoaderManager().restartLoader(SAVEDCOUNT_LOADER, null, this);
        }
	}

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View v = inflater.inflate(R.layout.fragment_folderfeedlist, container);
        list = (ExpandableListView) v.findViewById(R.id.folderfeed_list);
        list.setGroupIndicator(getResources().getDrawable(R.drawable.transparent));
        list.setOnCreateContextMenuListener(this);

        Display display = getActivity().getWindowManager().getDefaultDisplay();
        list.setIndicatorBounds(
                display.getWidth() - UIUtils.convertDPsToPixels(getActivity(), 20),
                display.getWidth() - UIUtils.convertDPsToPixels(getActivity(), 10));

        list.setChildDivider(getActivity().getResources().getDrawable(R.drawable.divider_light));
        list.setAdapter(adapter);
        list.setOnGroupClickListener(this);
        list.setOnChildClickListener(this);

        // Main activity needs to listen for scrolls to prevent refresh from firing unnecessarily
        list.setOnScrollListener((android.widget.AbsListView.OnScrollListener) getActivity());

        return v;
    }

	public void checkOpenFolderPreferences() {
        // make sure we didn't beat construction
        if ((this.list == null) || (this.sharedPreferences == null)) return;

		for (int i = 0; i < adapter.getGroupCount(); i++) {
			String groupName = adapter.getGroupName(i);
			if (sharedPreferences.getBoolean(AppConstants.FOLDER_PRE + "_" + groupName, true)) {
				this.list.expandGroup(i);
			} else {
				this.list.collapseGroup(i);
			}
		}
	}

	@Override
	public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
		MenuInflater inflater = getActivity().getMenuInflater();
		ExpandableListView.ExpandableListContextMenuInfo info = (ExpandableListView.ExpandableListContextMenuInfo) menuInfo;
		int type = ExpandableListView.getPackedPositionType(info.packedPosition);

		switch(type) {
		case ExpandableListView.PACKED_POSITION_TYPE_GROUP:
            int groupPosition = ExpandableListView.getPackedPositionGroup(info.packedPosition);
            if (! adapter.isRowSavedStories(groupPosition) ) {
			    inflater.inflate(R.menu.context_folder, menu);
            }
			break;

		case ExpandableListView.PACKED_POSITION_TYPE_CHILD:
			inflater.inflate(R.menu.context_feed, menu);
			break;
		}
	}

	@Override
	public boolean onContextItemSelected(MenuItem item) {
		ExpandableListView.ExpandableListContextMenuInfo info = (ExpandableListView.ExpandableListContextMenuInfo) item.getMenuInfo();
        int childPosition = ExpandableListView.getPackedPositionChild(info.packedPosition);
        int groupPosition = ExpandableListView.getPackedPositionGroup(info.packedPosition);

		if (item.getItemId() == R.id.menu_delete_feed) {
			String folderName = adapter.getGroup(groupPosition);
			DialogFragment deleteFeedFragment;
            if (groupPosition == 0) {
                deleteFeedFragment = DeleteFeedFragment.newInstance(adapter.getSocialFeed(adapter.getChild(groupPosition, childPosition)), folderName);
            } else {
                deleteFeedFragment = DeleteFeedFragment.newInstance(adapter.getFeed(adapter.getChild(groupPosition, childPosition)), folderName);
            }
			deleteFeedFragment.show(getFragmentManager(), "dialog");
			return true;
		} else if (item.getItemId() == R.id.menu_mark_feed_as_read) {
            String feedId = adapter.getChild(groupPosition, childPosition);
            if (groupPosition == 0) {
                SocialFeed socialFeed = adapter.getSocialFeed(feedId);
                FeedUtils.markFeedsRead(FeedSet.singleSocialFeed(socialFeed.userId, socialFeed.username), null, null, getActivity());
            } else {
                FeedUtils.markFeedsRead(FeedSet.singleFeed(feedId), null, null, getActivity());
            }
			return true;
		} else if (item.getItemId() == R.id.menu_mark_folder_as_read) {
			if (!adapter.isFolderRoot(groupPosition)) {
				String folderName = adapter.getGroup(groupPosition);
                FeedUtils.markFeedsRead(FeedUtils.feedSetFromFolderName(folderName, getActivity()), null, null, getActivity());
			} else {
                FeedUtils.markFeedsRead(FeedSet.allFeeds(), null, null, getActivity());
			}
			return true;
		}

		return super.onContextItemSelected(item);
	}

	public void changeState(StateFilter state) {
		currentState = state;
        adapter.changeState(state);
		hasUpdated();
	}

	@Override
	public boolean onGroupClick(ExpandableListView list, View group, int groupPosition, long id) {
        if (adapter.isFolderRoot(groupPosition)) {
			Intent i = new Intent(getActivity(), AllStoriesItemsList.class);
			i.putExtra(ItemsList.EXTRA_STATE, currentState);
			startActivity(i);
			return true;
        } else if (adapter.isRowSavedStories(groupPosition)) {
            Intent i = new Intent(getActivity(), SavedStoriesItemsList.class);
            startActivity(i);
            return true;
        } else {
            if ((group != null) && (group.findViewById(R.id.row_foldersums) != null)) {
                String groupName = adapter.getGroupName(groupPosition);
                if (list.isGroupExpanded(groupPosition)) {
                    group.findViewById(R.id.row_foldersums).setVisibility(View.VISIBLE);
                    sharedPreferences.edit().putBoolean(AppConstants.FOLDER_PRE + "_" + groupName, false).commit();
                } else {
                    group.findViewById(R.id.row_foldersums).setVisibility(View.INVISIBLE);
                    sharedPreferences.edit().putBoolean(AppConstants.FOLDER_PRE + "_" + groupName, true).commit();
                }
            }
			return false;
		}
	}

	@Override
	public boolean onChildClick(ExpandableListView list, View childView, int groupPosition, int childPosition, long id) {
        String childName = adapter.getChild(groupPosition, childPosition);
		if (groupPosition == 0) {
            SocialFeed socialFeed = adapter.getSocialFeed(childName);
			Intent intent = new Intent(getActivity(), SocialFeedItemsList.class);
			intent.putExtra(SocialFeedItemsList.EXTRA_SOCIAL_FEED, socialFeed);
			intent.putExtra(ItemsList.EXTRA_STATE, currentState);
			getActivity().startActivity(intent);
		} else {
            Feed feed = adapter.getFeed(childName);
			String folderName = adapter.getGroup(groupPosition);
			Intent intent = new Intent(getActivity(), FeedItemsList.class);
			intent.putExtra(FeedItemsList.EXTRA_FEED, feed);
			intent.putExtra(FeedItemsList.EXTRA_FOLDER_NAME, folderName);
			intent.putExtra(ItemsList.EXTRA_STATE, currentState);
			getActivity().startActivity(intent);
		}
		return true;
	}

}


text:
package org.jboss.pnc.rest.endpoints;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;

@Path("/build-records")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public class BuildRecordAliasEndpointImpl {

    @GET
    @Path("/{id}")
    public Response getSpecific(@PathParam("id") String id, @Context UriInfo uriInfo) {
        // redirects to new Rest-api endpoint
        return Response.status(Response.Status.MOVED_PERMANENTLY)
                .location(uriInfo.getBaseUriBuilder().path("/builds").path("/" + id).build())
                .build();
    }
}


text:
import * as React from 'react';
import { IconBaseProps } from 'react-icon-base';
export default class MdLandscape extends React.Component<IconBaseProps> { }


text:
using namespace Gaffer;

void GafferTest::testFilteredRecursiveChildIterator()
{
	NodePtr a = new Node( "a" );
	NodePtr b = new Node( "b" );
	FloatPlugPtr c = new FloatPlug( "c" );
	NodePtr d = new Node( "d" );
	NodePtr e = new Node( "e" );
	CompoundPlugPtr f = new CompoundPlug( "f" );
	FloatPlugPtr g = new FloatPlug( "g" );
	FloatPlugPtr h = new FloatPlug( "h", Plug::Out );

	a->addChild( b );
	a->addChild( d );
	a->addChild( e );

	b->addChild( c );

	e->addChild( f );
	e->addChild( h );

	f->addChild( g );

	// a - b - c
	//   - d
	//   - e - f - g
	//       - h

	std::vector<NodePtr> nodes;
	for( RecursiveNodeIterator it( a.get() ); it != it.end(); it++ )
	{
		nodes.push_back( *it );
	}

	GAFFERTEST_ASSERT( nodes.size() == 3 );
	GAFFERTEST_ASSERT( nodes[0] == b );
	GAFFERTEST_ASSERT( nodes[1] == d );
	GAFFERTEST_ASSERT( nodes[2] == e );

	// This demonstrates the use of both the main predicate and also the
	// recursion predicate in the FilteredRecursiveChildIterator. The main
	// predicate specifies that we will only visit plugs, but the recursion
	// predicate specifies that we'll recurse over everything to find them.
	//////////////////////////////////////////////////////////////////////////

	typedef FilteredRecursiveChildIterator<PlugPredicate<>, TypePredicate<GraphComponent> > DeepRecursivePlugIterator;
	std::vector<PlugPtr> plugs;
	for( DeepRecursivePlugIterator it( a.get() ); it != it.end(); it++ )
	{
		plugs.push_back( *it );
	}

	GAFFERTEST_ASSERT( plugs.size() == 8 ); // there's also the user plug per node
	GAFFERTEST_ASSERT( plugs[0] == a->userPlug() );
	GAFFERTEST_ASSERT( plugs[1] == b->userPlug() );
	GAFFERTEST_ASSERT( plugs[2] == c );
	GAFFERTEST_ASSERT( plugs[3] == d->userPlug() );
	GAFFERTEST_ASSERT( plugs[4] == e->userPlug() );
	GAFFERTEST_ASSERT( plugs[5] == f );
	GAFFERTEST_ASSERT( plugs[6] == g );
	GAFFERTEST_ASSERT( plugs[7] == h );

	typedef FilteredRecursiveChildIterator<PlugPredicate<Plug::Invalid, FloatPlug>, TypePredicate<GraphComponent> > DeepRecursiveFloatPlugIterator;
	plugs.clear();
	for( DeepRecursiveFloatPlugIterator it( a.get() ); it != it.end(); it++ )
	{
		plugs.push_back( *it );
	}

	GAFFERTEST_ASSERT( plugs.size() == 3 );
	GAFFERTEST_ASSERT( plugs[0] == c );
	GAFFERTEST_ASSERT( plugs[1] == g );
	GAFFERTEST_ASSERT( plugs[2] == h );

	typedef FilteredRecursiveChildIterator<PlugPredicate<Plug::Out, FloatPlug>, TypePredicate<GraphComponent> > DeepRecursiveOutputFloatPlugIterator;
	plugs.clear();
	for( DeepRecursiveOutputFloatPlugIterator it( a.get() ); it != it.end(); it++ )
	{
		plugs.push_back( *it );
	}

	GAFFERTEST_ASSERT( plugs.size() == 1 );
	GAFFERTEST_ASSERT( plugs[0] == h );

	// This demonstrates the use of a more restrictive recursion predicate
	// which only allows recursion into plugs - this allows us to avoid
	// recursing to plugs owned by child nodes of the node we're interested in.
	//////////////////////////////////////////////////////////////////////////

	typedef FilteredRecursiveChildIterator<PlugPredicate<>, PlugPredicate<> > ShallowRecursivePlugIterator;
	plugs.clear();
	for( ShallowRecursivePlugIterator it( a.get() ); it != it.end(); it++ )
	{
		plugs.push_back( *it );
	}
	GAFFERTEST_ASSERT( plugs.size() == 1 ); // there's also the user plug per node
	GAFFERTEST_ASSERT( plugs[0] == a->userPlug() );

	plugs.clear();
	for( ShallowRecursivePlugIterator it( b.get() ); it != it.end(); it++ )
	{
		plugs.push_back( *it );
	}
	GAFFERTEST_ASSERT( plugs.size() == 2 ); // there's also the user plug per node
	GAFFERTEST_ASSERT( plugs[0] == b->userPlug() );
	GAFFERTEST_ASSERT( plugs[1] == c );

	plugs.clear();
	for( ShallowRecursivePlugIterator it( e.get() ); it != it.end(); it++ )
	{
		plugs.push_back( *it );
	}
	GAFFERTEST_ASSERT( plugs.size() == 4 );
	GAFFERTEST_ASSERT( plugs[0] == e->userPlug() );
	GAFFERTEST_ASSERT( plugs[1] == f );
	GAFFERTEST_ASSERT( plugs[2] == g );
	GAFFERTEST_ASSERT( plugs[3] == h );
}


text:
/**
 *
 */
md5buster.DecryptionResultsItemView = Marionette.ItemView.extend({
    tagName: 'li',
    className: 'decryption-item',
    ui: {
        copyButton: '#copy-button'
    },
    events: {
        'click @ui.copyButton': 'copyDecryption'
    },
    getTemplate: function ()
    {
        /** @namespace md5buster.templates.decryptionResultItemView */
        return _.template( md5buster.templates.decryptionResultItemView );
    },
    onShow: function ()
    {
        /** did the whole textarea thing to parse the html entities ( i.e. ă which is ? */
        this.ui.copyButton.attr( 'title', $('<textarea />').html( md5buster.app.utilityFunctions.translateTerm( 'dp.ctc' ) ).text() );
    },
    copyDecryption: function ( e )
    {
        e.preventDefault();
        md5buster.app.utilityFunctions.copyTextToClipboard( this.model.get( 'decryption' ) );
    }
});

/**
 *
 */
md5buster.DecryptionResultsEmptyView = Marionette.ItemView.extend({
    tagName: 'h3',
    className: 'text-center',
    initialize: function ()
    {
        md5buster.app.utilityFunctions.enableViewTranslationSupport( this );
    },
    getTemplate: function ()
    {
        return _.template('');
    }
});

/**
 *
 */
md5buster.DecryptionResultsCollectionView = Marionette.CollectionView.extend({
    tagName: 'ul',
    className: 'decryption-results',
    childView: md5buster.DecryptionResultsItemView,
    emptyView: md5buster.DecryptionResultsEmptyView,
    getTemplate: function ()
    {
        return _.template('

');
    }
});

/**
 * decrypt page
 */
md5buster.DecryptPage = Marionette.LayoutView.extend({
    className: 'decrypt-page',
    model: new md5buster.DecryptPageModel,
    regions: {
        resultsArea: '#results-area'
    },
    ui: {
        recaptcha: '#decrypt-recaptcha',
        decryptForm: '#decrypt-form',
        hash: '#hash',
        textToDecrypt: '#text-to-decrypt',
        submitButton: '#submit-button',
        newSearchButton: '#new-search-button',
        tryAgainButton: '#try-again-button',
        ajaxErrorMessage: '#ajax-error',
        mainFieldset: '#main-fieldset',
        loadingFieldset: '#loading-fieldset',
        resultFieldset: '#result-fieldset',
        errorFieldset: '#error-fieldset'
    },
    events: {
        'blur @ui.hash': 'showHashValidity',
        'keyup @ui.hash': 'showHashValidity',
        'click @ui.submitButton': 'decryptHash',
        'submit': 'decryptHash',
        'click @ui.newSearchButton': 'resetDecryptForm',
        'click @ui.tryAgainButton': 'resetDecryptForm'
    },
    initialize: function ()
    {
        md5buster.app.utilityFunctions.enableViewTranslationSupport( this );
    },
    getTemplate: function ()
    {
        /** @namespace md5buster.templates.decryptPage */
        return _.template( md5buster.templates.decryptPage );
    },
    onShow: function ()
    {
        md5buster.app.radio.broadcast( 'global', 'page:change', 'decrypt' );
        this.startPlaceholderAnimationLoop();
        this.enableGoogleRecaptcha();
    },
    onDestroy: function ()
    {
        grecaptcha.reset( this.model.get( 'recaptchaWidgetId' ) );
    },
    enableGoogleRecaptcha: function(){
        this.model.set({ recaptchaWidgetId: md5buster.app.utilityFunctions.renderRecaptchaWidget( this.ui.recaptcha ) });
    },
    startPlaceholderAnimationLoop: function ()
    {
        var placeholderText = 'ex: 0cc175b9c0f1b6a831c399e269772661',
            length = placeholderText.length,
            _this = this;
        function startTyping( count ){
            setTimeout(function (){
                var typingLine = count != length ? '|' : '';
                if( !_this.isDestroyed ){
                    _this.ui.hash.attr('placeholder', placeholderText.slice( 0, count ) + typingLine );
                    if( count != length ){
                        startTyping( count +1 );
                    } else {
                        loop( 10000 );
                    }
                }
            }, 50 );
        }
        function loop( delay ){
            setTimeout(function (){
                startTyping( 1 );
            }, delay );
        }
        loop( 50 );
    },
    isValidMD5Hash: function ()
    {
        return (/^[a-z0-9]+$/i.test( this.ui.hash.val() ) && this.ui.hash.val().length == 32);
    },
    showHashValidity: function ()
    {
        if(  this.ui.hash.val().length > 0 ){
            if( this.isValidMD5Hash() ) {
                this.ui.hash.addClass('valid').closest('.form-group').removeClass('error');
            } else {
                this.ui.hash.removeClass('valid').closest('.form-group').addClass('error');
            }
        } else {
            this.ui.hash.removeClass('valid');
        }
    },
    decryptHash: function ( e )
    {
        e.preventDefault();
        var valid = true;
        if( !this.isValidMD5Hash() ) {
            valid = false;
            this.ui.hash.closest('.form-group').addClass('error');
        }
        if( !md5buster.app.utilityFunctions.isRecaptchaTestCompleted( this.model.get( 'recaptchaWidgetId' ) ) ){
            valid = false;
            this.ui.recaptcha.closest('.form-group').addClass('error');
        } else {
            this.ui.recaptcha.closest('.form-group').removeClass('error');
        }
        if( valid ){
            this.ui.mainFieldset.css({ display: 'none' });
            this.ui.loadingFieldset.css({ display: 'block' });
            $.ajax({
                context: this,
                method: 'POST',
                url: md5buster.apiRoutes.DECRYPT_URL,
                data: {
                    hash: this.ui.hash.val(),
                    securityCode: md5buster.app.utilityFunctions.getRecaptchaTestResponse( this.model.get( 'recaptchaWidgetId' ) )
                },
                dataType: 'json'
            }).done( function ( response ) {
                this.resultsArea.show( new md5buster.DecryptionResultsCollectionView({
                    /** @namespace response.payload */
                    collection: new md5buster.DecryptionResultsCollection( response.payload )
                }));
                this.ui.textToDecrypt.text( this.ui.hash.val() );
                this.ui.loadingFieldset.css({ display: 'none' });
                this.ui.resultFieldset.css({ display: 'block' });

            }).fail( function ( jqXHR ) {
                this.ui.ajaxErrorMessage.html( md5buster.app.utilityFunctions.composeAjaxErrorMessages( jqXHR ) );
                this.ui.loadingFieldset.css({ display: 'none' });
                this.ui.errorFieldset.css({ display: 'block' });
            });
        }
    },
    resetDecryptForm: function ( e )
    {
        e.preventDefault();
        grecaptcha.reset( this.model.get( 'recaptchaWidgetId' ) );
        this.ui.hash.val('').removeClass('valid').closest('.form-group').removeClass('error');
        this.ui.textToDecrypt.text('');
        this.ui.ajaxErrorMessage.html('');
        this.ui.errorFieldset.css({ display: 'none' });
        this.ui.resultFieldset.css({ display: 'none' });
        this.resultsArea.reset();
        this.ui.loadingFieldset.css({ display: 'none' });
        this.ui.mainFieldset.css({ display: 'block' });
    }
});