text:
#include <exception>
#include "MBPutils.h"
#include "../common/OutputFile.h"

void SaveSelectiveInputWeights(OutputFile & f, HostArray<cudafloat> & weights, HostArray<cudafloat> & bias) {
	int numWeights = weights.Length();

	for(int w = 0; w < numWeights; w++) {
		if (weights[w] != CUDA_VALUE(0.0) || bias[w] != CUDA_VALUE(0.0)) {
			f.WriteLine(bias[w]);
			f.WriteLine("0.0"); //delta
			f.WriteLine("0.0"); //deltaWithoutLearningMomentum
			f.WriteLine(INITIAL_LEARNING_RATE);

			f.WriteLine(weights[w]);
			f.WriteLine("0.0"); //delta
			f.WriteLine("0.0"); //deltaWithoutLearningMomentum
			f.WriteLine(INITIAL_LEARNING_RATE);
		}
	}
}

void SaveWeights(OutputFile & f, HostArray<cudafloat> & weights) {
	int numWeights = weights.Length();

	for(int w = 0; w < numWeights; w++) {
		f.WriteLine(weights[w]);
		f.WriteLine("0.0"); //delta
		f.WriteLine("0.0"); //deltaWithoutLearningMomentum
		f.WriteLine(INITIAL_LEARNING_RATE);
	}
}

void SaveMBPNetwork(const char * filename, BackPropagation * network, const char * trainfilename, const char * testfilename, float rmsStop, int epochs, bool MBP) {
	OutputFile f(filename);

	const char * MBPVersion = "Multiple Back-Propagation Version 2.2.1";

	f.WriteLine(MBPVersion);
	f.WriteLine("Multiple Back-Propagation can be freely obtained at http://dit.ipg.pt/MBP - This file was generated by the ATS.");
	f.WriteLine(trainfilename);
	f.WriteLine(testfilename);

	f.WriteLine("32"); // priority normal
	f.WriteLine("0"); // update screen

	f.WriteLine("1"); // delta bar delta
	f.WriteLine(network->GetUpStepSizeFactor());
	f.WriteLine(network->GetDownStepSizeFactor());
	f.WriteLine(network->GetMaxStepSize());

	f.WriteLine(network->GetRobustLearning());
	f.WriteLine(network->GetRobustFactor());
	f.WriteLine(1.0 + network->GetMaxPercentageRMSGrow()); // rmsGrowToApplyRobustLearning

	f.WriteLine("0.0"); // weightDecay

	f.WriteLine("0"); // autoUpdateLearning
	f.WriteLine("0"); // autoUpdateMomentum

	f.WriteLine("0.01"); //percentIncDecLearnRate
	f.WriteLine("0.01"); //percentIncDecMomentum
	f.WriteLine("0.01"); //percentIncDecSpaceLearnRate
	f.WriteLine("0.01"); //percentIncDecSpaceMomentum

	f.WriteLine(INITIAL_LEARNING_RATE); //mainNetLearningMomentumInformation.learningRate.value
	f.WriteLine("1000"); //mainNetLearningMomentumInformation.learningRate.decayEpochs
	f.WriteLine("1"); //mainNetLearningMomentumInformation.learningRate.decayPercentage

	f.WriteLine(network->GetMomentum()); //mainNetLearningMomentumInformation.momentum.value
	f.WriteLine("0"); //mainNetLearningMomentumInformation.momentum.decayEpochs
	f.WriteLine("0"); //mainNetLearningMomentumInformation.momentum.decayPercentage

	f.WriteLine(INITIAL_LEARNING_RATE); //spaceNetLearningMomentumInformation.learningRate.value
	f.WriteLine("1000"); //spaceNetLearningMomentumInformation.learningRate.decayEpochs
	f.WriteLine("1"); //spaceNetLearningMomentumInformation.learningRate.decayPercentage

	f.WriteLine(network->GetMomentum()); //spaceNetLearningMomentumInformation.momentum.value
	f.WriteLine("0"); //spaceNetLearningMomentumInformation.momentum.decayEpochs
	f.WriteLine("0"); //spaceNetLearningMomentumInformation.momentum.decayPercentage

	f.WriteLine("0"); //epochsStop
	f.WriteLine(rmsStop);
	f.WriteLine(epochs); // numberEpochsToStop

	f.WriteLine("0.0"); //spaceRmsStop

	f.WriteLine("1"); //batchTraining
	f.WriteLine("0"); //randomizePatterns

	f.WriteLine((MBP) ? 3 : 0); //Network Type

	//main network
	f.Write(network->GetNumberInputs());

	int numLayers = network->GetNumberLayers();
	for(int l = 0; l < numLayers; l++) {
		f.Write("-");
		f.Write(network->GetNumberNeurons(l));
	}
	f.WriteLine();

	//space network additional layers
	f.WriteLine("");

	// layers information
	for(int l = 0; l < numLayers; l++) {
		int numNeurons = network->GetNumberNeurons(l);

		f.WriteLine((l == 0 && MBP) ? numNeurons : 0); // NeuronsWithSelectiveActivation

		for(int n = 0; n < numNeurons; n++) {
			f.WriteLine("0"); // ActivationFunction
			f.WriteLine("1.0"); //ActivationFunctionParameter
		}
	}

	#ifndef GPUMLIB_DBN
	// space layers information
	if (MBP) {
		int numNeurons = network->GetNumberNeurons(0);
		for(int n = 0; n < numNeurons; n++) {
			f.WriteLine("0"); // ActivationFunction
			f.WriteLine("1.0"); //ActivationFunctionParameter
		}
	}
	#endif

	f.WriteLine("0"); //ConnectInputLayerWithOutputLayer main
	f.WriteLine("0"); //ConnectInputLayerWithOutputLayer space

	if (network->HasSelectiveInputs()) {
		HostArray<cudafloat> weights = network->GetSelectiveInputWeights();
		HostArray<cudafloat> bias = network->GetSelectiveInputBias();

		SaveSelectiveInputWeights(f, weights, bias);
	}

	for(int l = 0; l < numLayers; l++) {
		HostArray<cudafloat> weights = network->GetLayerWeights(l);
		SaveWeights(f, weights);
	}

	#ifndef GPUMLIB_DBN
	if (MBP) {
		MultipleBackPropagation * mbpnet = static_cast<MultipleBackPropagation *>(network);

		if (mbpnet->HasSelectiveInputs()) {
			HostArray<cudafloat> weights = mbpnet->GetSelectiveInputWeightsSpaceNetwork();
			HostArray<cudafloat> bias = mbpnet->GetSelectiveInputBiasSpaceNetwork();

			SaveSelectiveInputWeights(f, weights, bias);
		}

		HostArray<cudafloat> weights = mbpnet->GetLayerWeightsSpaceNetwork(0);
		SaveWeights(f, weights);
	}
	#endif

	f.WriteLine("0"); //epoch must be 0
	f.WriteLine("0"); //rmsInterval
	f.WriteLine("0"); //trainingTime
}

#ifdef MNIST_SMALL_DATASET
void AnalyzeTestData(BackPropagation * network, HostMatrix<cudafloat> & inputs, HostMatrix<cudafloat> & desiredOutputs, ConfusionMatrix & cm, ConfusionMatrix & cm_small) {
	cm_small.Reset();
#else
void AnalyzeTestData(BackPropagation * network, HostMatrix<cudafloat> & inputs, HostMatrix<cudafloat> & desiredOutputs, ConfusionMatrix & cm) {
#endif
	HostMatrix<cudafloat> outputs = network->GetOutputs(inputs);

	cm.Reset();

	int nOutputs = outputs.Columns();
	int patterns = outputs.Rows();

	cout << endl;

	for(int p = 0; p < patterns; p++) {
		int predicted = -1;
		int correct = -1;

		double max = -1.0;

		if(nOutputs > 1) {
			for (int o = 0; o < nOutputs; o++) {
				if (desiredOutputs(p, o) >= CUDA_VALUE(0.5)) correct = o;

				double output = outputs(p, o);
				if (output > max) {
					predicted = o;
					max = output;
				}
			}
		} else {
			predicted = (outputs(p, 0) >= 0.5) ? 1 : 0;
			correct = (desiredOutputs(p, 0) >= 0.5) ? 1 : 0;
		}

		if (correct < 0) {
			throw exception();
		} else {
			cm.Classify(correct, predicted);

			#ifdef MNIST_SMALL_DATASET
			if (p >= patterns - 10000) cm_small.Classify(correct, predicted);
			#endif
		}
	}
}


text: To update the website push to here please.

redpajama_set_name: RedPajamaGithub


text:
package org.apache.sling.servlets.resolver.internal.helper;

import junit.framework.TestCase;

public class WeightedResourceTest extends TestCase {

    public void testEquality() {
        WeightedResource lr1 = new WeightedResource(0, null, 0, WeightedResource.WEIGHT_NONE);
        WeightedResource lr2 = new WeightedResource(0, null, 0, WeightedResource.WEIGHT_NONE);

        // expect same objects to be equal
        assertTrue(lr1.equals(lr1));

        // expect different instances to not be equal
        assertFalse(lr1.equals(lr2));
        assertFalse(lr2.equals(lr1));
        assertFalse(lr1.equals(null));
        assertFalse(lr2.equals(null));
    }

    public void testCompareToSelectors() {
        WeightedResource lr1 = new WeightedResource(0, null, 1, WeightedResource.WEIGHT_NONE);
        WeightedResource lr2 = new WeightedResource(1, null, 0, WeightedResource.WEIGHT_NONE);

        // expect the same objects to compare equal
        assertEquals(0, lr1.compareTo(lr1));
        assertEquals(0, lr2.compareTo(lr2));

        assertTrue(lr1.compareTo(lr2) < 0);
        assertTrue(lr2.compareTo(lr1) > 0);
    }

    public void testCompareToPrefix() {
        WeightedResource lr1 = new WeightedResource(0, null, 2, WeightedResource.WEIGHT_PREFIX);
        WeightedResource lr2 = new WeightedResource(1, null, 2, WeightedResource.WEIGHT_NONE);

        // expect the same objects to compare equal
        assertEquals(0, lr1.compareTo(lr1));
        assertEquals(0, lr2.compareTo(lr2));

        assertTrue(lr1.compareTo(lr2) < 0);
        assertTrue(lr2.compareTo(lr1) > 0);
    }

    public void testCompareToExtension() {
        WeightedResource lr1 = new WeightedResource(0, null, 2, WeightedResource.WEIGHT_EXTENSION);
        WeightedResource lr2 = new WeightedResource(1, null, 2, WeightedResource.WEIGHT_NONE);

        // expect the same objects to compare equal
        assertEquals(0, lr1.compareTo(lr1));
        assertEquals(0, lr2.compareTo(lr2));

        assertTrue(lr1.compareTo(lr2) < 0);
        assertTrue(lr2.compareTo(lr1) > 0);
    }

    public void testCompareToOrdinal() {
        WeightedResource lr1 = new WeightedResource(0, null, 0, WeightedResource.WEIGHT_NONE);
        WeightedResource lr2 = new WeightedResource(1, null, 0, WeightedResource.WEIGHT_NONE);

        // expect the same objects to compare equal
        assertEquals(0, lr1.compareTo(lr1));
        assertEquals(0, lr2.compareTo(lr2));

        assertTrue(lr1.compareTo(lr2) < 0);
        assertTrue(lr2.compareTo(lr1) > 0);
    }
}


text:
class WXDLLIMPEXP_FWD_CORE wxFrame;
class WXDLLIMPEXP_FWD_CORE wxWindow;

//--------------------------------------------------------------------------------
// wxBusyInfo
//                  Displays progress information
//                  Can be used in exactly same way as wxBusyCursor
//--------------------------------------------------------------------------------

class WXDLLIMPEXP_CORE wxBusyInfo : public wxObject
{
public:
    wxBusyInfo(const wxString& message, wxWindow *parent = NULL);

    virtual ~wxBusyInfo();

private:
    wxFrame *m_InfoFrame;

    wxDECLARE_NO_COPY_CLASS(wxBusyInfo);
};

#endif // wxUSE_BUSYINFO
#endif // _WX_BUSYINFO_H_


text:
if [[ $PWD != *sdks/python* ]]; then
  echo 'Unable to locate Apache Beam Python SDK root directory'
  exit 1
fi

# Go to the Apache Beam Python SDK root
if [[ $PWD != *sdks/python ]]; then
  cd $(pwd | sed 's/sdks\/python.*/sdks\/python/')
fi

set -o errexit
set -o pipefail

MODULE=$(ls -d -C apache_beam *.py)

usage(){ echo "Usage: $0 [MODULE|--help] # The default MODULE is $MODULE"; }

if test $# -gt 0; then
  case "$@" in
    --help) usage; exit 1;;
	 *)      MODULE="$*";;
  esac
fi

EXCLUDED_FROM_FUTURIZE_CHECK=(
# "apache_beam/path/to/excluded/file.py"
)
FUTURIZE_FILTER=$( IFS='|'; echo "${EXCLUDED_FROM_FUTURIZE_CHECK[*]}" )
echo "Checking for files requiring stage 1 refactoring from futurize"
futurize_results=$(futurize -j 8 --stage1 apache_beam 2>&1 | grep Refactored \
  || echo "")
if [ -n "$FUTURIZE_FILTER" ]; then
  futurize_filtered=$(echo "$futurize_results" | grep -Ev "$FUTURIZE_FILTER" \
  || echo "")
else
  futurize_filtered=${futurize_results}
fi
count=${#futurize_filtered}
if [ "$count" != "0" ]; then
  echo "Some of the changes require futurize stage 1 changes."
  echo "The files with required changes:"
  echo "$futurize_filtered"
  echo "You can run futurize apache_beam --stage1 to see the proposed changes."
  exit 1
fi
echo "No future changes needed"

# Following generated files are excluded from lint checks.
EXCLUDED_GENERATED_FILES=(
"apache_beam/io/gcp/internal/clients/bigquery/bigquery_v2_client.py"
"apache_beam/io/gcp/internal/clients/bigquery/bigquery_v2_messages.py"
"apache_beam/runners/dataflow/internal/clients/dataflow/dataflow_v1b3_client.py"
"apache_beam/runners/dataflow/internal/clients/dataflow/dataflow_v1b3_messages.py"
"apache_beam/io/gcp/internal/clients/storage/storage_v1_client.py"
"apache_beam/io/gcp/internal/clients/storage/storage_v1_messages.py"
"apache_beam/coders/proto2_coder_test_messages_pb2.py"
apache_beam/portability/api/*pb2*.py
)

FILES_TO_IGNORE=""
for file in "${EXCLUDED_GENERATED_FILES[@]}"; do
  if test -z "$FILES_TO_IGNORE"
    then FILES_TO_IGNORE="$(basename $file)"
    else FILES_TO_IGNORE="$FILES_TO_IGNORE, $(basename $file)"
  fi
done
echo "Skipping lint for generated files: $FILES_TO_IGNORE"

echo "Running pylint --py3k for modules $( printf "%s " "${MODULE}" ):"
pylint -j8 $( printf "%s " "${MODULE}" ) \
  --ignore-patterns="$FILES_TO_IGNORE" --py3k


text:
      <title>ActiveMQ Artemis Spring Example</title>
      <link rel="stylesheet" type="text/css" href="../../../common/common.css" />
      <link rel="stylesheet" type="text/css" href="../../../common/prettify.css" />

ActiveMQ Artemis Spring Example

This examples shows how to setup and run an embedded JMS server within a Spring ApplicationContext using ActiveMQ Artemis along with ActiveMQ Artemis configuration files.

Example step-by-step

YOU MUST DOWNLOAD THE SPRING LIBRARIES TO RUN THIS EXAMPLE!!!  You must also modify the build.xml file to include the spring jars.  You'll see the placeholder that is already there.

To run the example, simply type mvn verify -Pexample from this directory


text:
var chai = require('chai'),
		sinonChai = require('sinon-chai'),
		expect = chai.expect,
		mockrequire = require('mockrequire'),
		sinon = require('sinon'),
		q = require('q');

chai.use(sinonChai);

describe('When converting file', function () {
	var ebookr, pandoc, fs, deferConverted;

	beforeEach(function () {
		fs = {
			readFileSync: sinon.spy(function () {
				return '**test**';
			}),
			unlinkSync: sinon.spy(),
			writeFileSync: sinon.spy()
		};
		deferConverted = q.defer();
		pandoc = {
			convert: sinon.spy(function () { return deferConverted.promise; })
		};
		var randomstring = {
			generate: function () {
				return 'tmp';
			}
		};
		ebookr = mockrequire('../lib/ebookr', {
			'extend': require('extend'),
			'./ebookr/converter': mockrequire('../lib/ebookr/converter', {
				'fs': fs,
				'randomstring': randomstring,
				'util': require('util'),
				'q': require('q'),
				'./pandoc': pandoc
			})
		}).new();
	});

	describe('With no output file given', function () {
		var promise;

		beforeEach(function () {
			promise = ebookr.convertFile(['test.md']);
		});

		it('should read file', function () {
			expect(fs.readFileSync).to.have.been.calledWith('test.md', 'utf-8');
		});

		it('should create tmp file with rendered content', function () {
			expect(fs.writeFileSync).to.have.been.calledWith('tmp.md', '**test**');
		});

		it('should return content as a promise', function () {
			expect(promise.then).to.exist;
		});

		it('should delete tmp file afterwards', function (done) {
			deferConverted.resolve('test');
			deferConverted.promise.then(function () {
				expect(fs.unlinkSync).to.have.been.calledWith('tmp.md');
				done();
			})
		});

		it('should execute pandoc', function () {
			expect(pandoc.convert).to.have.been.calledWith('tmp.md');
		});
	});

	describe('With multiple files given', function () {
		it('should read all files', function () {
			ebookr.convertFile(['test.md', 'test2.md']);
			expect(fs.readFileSync).to.have.been.calledWith('test.md', 'utf-8');
			expect(fs.readFileSync).to.have.been.calledWith('test2.md', 'utf-8');
		});
	});
});


text:
<!doctype html>

    <meta charset="UTF-8">
    <title>新增地址</title>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="viewport"
          content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">
    <link rel="stylesheet" href="{{ asset('/member/css/font-awesome.min.css') }}"/>
    <link rel="stylesheet" href="{{ asset('/member/css/style.css') }}"/>

    <form action="/member/address/pay-store" method="GET">

                收货人
                <input type="text" name="name" class="name" value="" placeholder="名字">

                联系电话
                <input type="text" name="phone" class="phone" value="" placeholder="手机或固话">

                选择地区

                        <select name="province" id="province" readonly="true"></select>

                        <select name="city" id="city" readonly="true"></select>

                        <select name="district" id="district" readonly="true"></select>

                详细地址
                <textarea type="text" name="address" class="detail-address" value="" placeholder="街道门牌信息"></textarea>

                邮政编码
                <input type="text" name="zip_code" class="zip-code" value="" placeholder="邮政编码(选填)">

                <input type="submit" class="btn" value="保存">

    </form>

        保存

        取消


text:
template <class Object>
CStateBurerAntiAim<Object>::CStateBurerAntiAim(Object* obj) : inherited(obj) {
    m_allow_anti_aim = false;
}

template <class Object>
void CStateBurerAntiAim<Object>::initialize() {
    inherited::initialize();
    m_allow_anti_aim = true;
    this->object->control().activate(ControlCom::eAntiAim);
    m_allow_anti_aim = false;

    VERIFY(this->object->get_anti_aim()->is_active());
}

template <class Object>
void CStateBurerAntiAim<Object>::execute() {
    this->object->face_enemy();
    this->object->set_action(ACT_STAND_IDLE);
}

template <class Object>
void CStateBurerAntiAim<Object>::finalize() {
    inherited::finalize();
}

template <class Object>
void CStateBurerAntiAim<Object>::critical_finalize() {
    inherited::critical_finalize();
}

template <class Object>
bool CStateBurerAntiAim<Object>::check_start_conditions() {
    return this->object->get_anti_aim()->check_start_condition();
}

template <class Object>
bool CStateBurerAntiAim<Object>::check_completion() {
    if (!this->object->get_anti_aim()->is_active()) {
        return true;
    }

    return false;
}


text:
using System.ComponentModel;
using System.IO;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Project;

namespace ClojureExtension.Project.Configuration
{
	[ComVisible(true)]
	[Guid("EBAF977F-39E1-481D-BFB8-13C960B55D6E")]
	public class GeneralPropertyPage : SettingsPage
	{
		private string _defaultNamespace;
		private string _clojureVersion;
		private string _targetFile;
		private string _startupArguments;
		private string _clojureLoadPath;

		public GeneralPropertyPage()
		{
			Name = "General";
		}

		[Description("Clojure Version")]
		[DisplayName("Clojure Version")]
		[Category("Clojure")]
		public string ClojureVersion
		{
			get { return _clojureVersion; }

			set
			{
				_clojureVersion = value;
				IsDirty = true;
			}
		}

		[Category("Running")]
		[DisplayName("Startup File")]
		[Description("Startup File")]
		public string TargetFile
		{
			get { return _targetFile; }
			set
			{
				_targetFile = value;
				IsDirty = true;
			}
		}

		[Category("Running")]
		[DisplayName("Startup Arguments")]
		[Description("Startup Arguments")]
		public string StartupArguments
		{
			get { return _startupArguments; }
			set
			{
				_startupArguments = value;
				IsDirty = true;
			}
		}

		[Category("Running")]
		[DisplayName("Clojure Load Path")]
		[Description("Clojure Load Path")]
		public string ClojureLoadPath
		{
			get { return _clojureLoadPath; }
			set
			{
				_clojureLoadPath = value;
				IsDirty = true;
			}
		}

		[Category("Project")]
		[DisplayName("Project File")]
		[Description("Project File")]
		public string ProjectFile
		{
			get { return Path.GetFileName(ProjectMgr.ProjectFile); }
		}

		[Category("Project")]
		[DisplayName("Project Folder")]
		[Description("Project Folder")]
		public string ProjectFolder
		{
			get { return Path.GetDirectoryName(ProjectMgr.ProjectFolder); }
		}

		public override string GetClassName()
		{
			return GetType().FullName;
		}

		protected override void BindProperties()
		{
			_defaultNamespace = ProjectMgr.GetProjectProperty("RootNamespace", false);
			_clojureVersion = ProjectMgr.GetProjectProperty("ClojureVersion", false);
			_targetFile = ProjectMgr.GetProjectProperty("StartupFile", false);
			_startupArguments = ProjectMgr.GetProjectProperty("StartupArguments", false);
			_clojureLoadPath = ProjectMgr.GetProjectProperty("ClojureLoadPath", false);
		}

		protected override int ApplyChanges()
		{
			ProjectMgr.SetProjectProperty("RootNamespace", _defaultNamespace);
			ProjectMgr.SetProjectProperty("ClojureVersion", _clojureVersion);
			ProjectMgr.SetProjectProperty("StartupFile", _targetFile);
			ProjectMgr.SetProjectProperty("StartupArguments", _startupArguments);
			ProjectMgr.SetProjectProperty("ClojureLoadPath", _clojureLoadPath);
			IsDirty = false;
			return VSConstants.S_OK;
		}
	}
}


text:
START_ATF_NAMESPACE
    typedef ITypeLib *LPTYPELIB;
END_ATF_NAMESPACE


text:
package com.github.sitemindr.controller;

import com.github.sitemindr.entity.PersonAuthority;
import com.github.sitemindr.entity.Person;
import com.github.sitemindr.entity.Site;
import com.github.sitemindr.util.Notifier;
import com.github.sitemindr.util.PingResult;
import com.github.sitemindr.util.Pinger;
import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;
import com.googlecode.objectify.ObjectifyService;
import static com.googlecode.objectify.ObjectifyService.ofy;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/cron")
public class CronController {

    private static Logger logger = Logger.getLogger(Notifier.class.getName());
    static {
        ObjectifyService.register(Person.class);
        ObjectifyService.register(Site.class);
    }

    @RequestMapping(value = "/httpget/{website}/", method = RequestMethod.GET)
    public String httpGet(@PathVariable String website, ModelMap model) {
        if (isUserAthorized()) {
            PingResult result = Pinger.doHttpGet(website, 10);
            updateSite(website, result.isOk());
            model.addAttribute("message", result.getMessage());
        }
        return "list";
    }

    @RequestMapping(value = "/httpgetall", method = RequestMethod.GET)
    public String httpGetAll(ModelMap model) {
        for (Site site : getSites()) {
            PingResult result = Pinger.doHttpGet(site.getFqdn(), site.getWaitTimeout());
            updateSite(site.getFqdn(), result.isOk());
            System.out.println(site.getFqdn());
            model.addAttribute("message", result.getMessage());
        }
        return "list";
    }

    private boolean isUserAthorized() {
        PersonAuthority authority = userAuthority();
        switch (authority) {
            case USER:
            case ADMINISTRATOR:
                return true;
            default:
                return false;
        }
    }

    private PersonAuthority userAuthority() {
        if (ofy().load().type(Person.class).count() <= 1) {
            return PersonAuthority.ADMINISTRATOR;
        }
        PersonAuthority result = PersonAuthority.NONE;
        UserService userService = UserServiceFactory.getUserService();
        User currentUser = userService.getCurrentUser();
        if (currentUser != null) {
            Person person = ofy().load().type(Person.class).id(currentUser.getEmail()).now();
            if (person == null) {
                person = new Person();
                person.setEmail(currentUser.getEmail());
                person.setAuthority(PersonAuthority.NONE);
            } else {
                result = person.getAuthority();
            }
            person.setUpdated(new Date());
            ofy().save().entity(person).now();
        }
        return result;
    }

    private List<Site> getSites() {
        List<Site> list = new ArrayList<>();
        Iterable<Site> sites = ofy().load().type(Site.class);
        for (Site site : sites) {
            list.add(site);
        }
        return list;
    }

    private List<Person> getInterestedParties() {
        List<Person> list = new ArrayList<>();
        Iterable<Person> persons = ofy().load().type(Person.class);
        for (Person person : persons) {
            list.add(person);
        }
        return list;
    }

    private void updateSite(String url, Boolean available) {

        Logger.getLogger(Notifier.class.getName()).log(Level.INFO, "updating {0}", url);
        Site site = ofy().load().type(Site.class).id(url).now();
        boolean wasAvailable = false;
        if (site == null) {
            site = new Site();
            site.setFqdn(url);
            updateInterestedParty("test", "test@here.com", "test@here.com");
        } else {
            wasAvailable = site.isAvailable();
        }
        logger.log(Level.INFO, "{0} was {1}available", new Object[]{url, wasAvailable ? "" : "not "});
        logger.log(Level.INFO, "{0} is {1}available", new Object[]{url, site.isAvailable() ? "" : "not "});
        site.setAvailable(available);
        if (available) {
            site.setLastAvailable(new Date());
        } else {
            site.setLastUnavailable(new Date());
        }
        ofy().save().entity(site).now();
        if ((available && !wasAvailable) || (!available && wasAvailable)) {
            Notifier.notifyInterestedParties(site, getInterestedParties());
        }
    }

    private void updateInterestedParty(String name, String email, String notifyEmail) {
        logger.log(Level.INFO, "updating interested party: {0}", name);
        Person person = new Person();
        person.setName(name);
        person.setEmail(email);
        person.setNotifyEmail(notifyEmail);
        ofy().save().entity(person).now();
    }

}


text:
<?php

defined('PHPFOX') or exit('NO DICE!');

?>

	{img server_id=$aFeaturedImage.server_id path='photo.url_photo' file=$aFeaturedImage.destination suffix='_240' max_width=240 max_height=240}

{if Phpfox::getParam('photo.ajax_refresh_on_featured_photos')}

{/if}


text:
namespace Microsoft.Azure.Management.TrafficManager.Fluent.Models
{

    /// <summary>
    /// Defines values for TrafficRoutingMethod.
    /// </summary>
    public static class TrafficRoutingMethod
    {
        public const string Performance = "Performance";
        public const string Priority = "Priority";
        public const string Weighted = "Weighted";
        public const string Geographic = "Geographic";
        public const string MultiValue = "MultiValue";
        public const string Subnet = "Subnet";
    }
}


text:
![Haxe logo](../img/haxe_nodejs_logos.png)

JavaScript is **one** of the targets you can use when you work with [Haxe](http://haxe.org/).
And JavaScript is becoming one of the most powerful and [popular](https://github.com/blog/2047-language-trends-on-github) languages you can learn.

![](https://cloud.githubusercontent.com/assets/2623954/9098640/f15e22b4-3b7f-11e5-9496-12b6d811f0ea.jpg)

One of the reasons it's becoming so popular is Node.js!
With node you write JavaScript for the back-end.

With JavaScript and node.js you are able to write front-end AND back-end.

You would say the (Haxe) documentation about the JavaScript target would we **very** big.

**Well, you guessed it, it's not.**
The information scattered across the web on blogs, forums, tweets, etc.

![](http://www.reactiongifs.com/r/do.gif)

I can bitch about it, or do something about it... I choose the second.

----

There used to be a website (an old one, from when Haxe spelled "haXe") that got you started.

But that is no more. So I decided to get some of that back.
Based upon the information from the old site and my own need to document this.

---

I started with the information from the old site. A simple copy, paste. Most of the content of this site/book is from different sources (with permission of the writers). Eventually (that means in the future) I will rewrite it (or not).

The rewrite will focus on getting the old information/tutorials updated to current use of Haxe and JavaScript.
*And more motivational gif :D !*

----

### Original Haxenode.org?
You can find the original data at the github account of [theRemix](https://github.com/theRemix/haxenode.org/tree/ajaxloaded/views) in `.jade` files


text:
package com.example.jingbin.cloudreader.view.bigimage;

import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.app.ActivityCompat;
import androidx.core.app.ActivityOptionsCompat;
import androidx.core.app.SharedElementCallback;
import androidx.viewpager.widget.PagerAdapter;
import androidx.core.view.ViewCompat;
import androidx.viewpager.widget.ViewPager;
import androidx.appcompat.app.AppCompatActivity;
import android.util.SparseArray;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;

import com.bumptech.glide.Glide;
import com.example.jingbin.cloudreader.R;
import me.jingbin.bymvvm.rxbus.RxBus;
import com.example.jingbin.cloudreader.app.RxCodeConstants;
import com.github.chrisbanes.photoview.PhotoView;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created on 2017/10/2.
 *
 * @author ice
 * @GitHub https://github.com/XunMengWinter
 */

public class BigImagePagerActivity extends AppCompatActivity {

    public static final String KEY_IMAGE_URLS = "image_urls";
    public static final String KEY_ENTER_INDEX = "enter_index";
    public static Integer sExitIndex;

    private List<String> mImageUrls;
    private int mEnterIndex;

    private ViewPager mViewPager;
    private SparseArray<PhotoView> mPhotoViewMap;

    public static void startThis(final AppCompatActivity activity, List<View> imageViews, List<String> imageUrls, int enterIndex) {
        Intent intent = new Intent(activity, BigImagePagerActivity.class);
        intent.putStringArrayListExtra(KEY_IMAGE_URLS, (ArrayList<String>) imageUrls);
        intent.putExtra(KEY_ENTER_INDEX, enterIndex);

        ActivityOptionsCompat optionsCompat
                = ActivityOptionsCompat.makeSceneTransitionAnimation(activity, imageViews.get(enterIndex), imageUrls.get(enterIndex));

        try {
            ActivityCompat.startActivity(activity, intent, optionsCompat.toBundle());
        } catch (IllegalArgumentException e) {
            e.printStackTrace();
            activity.startActivity(intent);
        }

        ActivityCompat.setExitSharedElementCallback(activity, new SharedElementCallback() {
            @Override
            public void onMapSharedElements(List<String> names, Map<String, View> sharedElements) {
                super.onMapSharedElements(names, sharedElements);
                /* 这个方法会调用两次,一次进入前,一次回来前。 */
                if (sExitIndex == null) {
                    return;
                }

                int exitIndex = sExitIndex;
                sExitIndex = null;

                if (exitIndex != enterIndex
                        && imageViews.size() > exitIndex
                        && imageUrls.size() > exitIndex) {
                    names.clear();
                    sharedElements.clear();
                    View view = imageViews.get(exitIndex);
                    String transitName = imageUrls.get(exitIndex);
                    if (view == null) {
                        activity.setExitSharedElementCallback((SharedElementCallback) null);
                        return;
                    }
                    names.add(transitName);
                    sharedElements.put(transitName, view);
                }
                activity.setExitSharedElementCallback((SharedElementCallback) null);
            }
        });
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_view_big_image);

        mViewPager = (ViewPager) findViewById(R.id.very_image_viewpager);

        //延迟动画
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            postponeEnterTransition();
        }

        mEnterIndex = getIntent().getIntExtra(KEY_ENTER_INDEX, 0);
        mImageUrls = getIntent().getStringArrayListExtra(KEY_IMAGE_URLS);
        if (mImageUrls == null) {
            return;
        }

        mPhotoViewMap = new SparseArray<>();
        //                imageView.setLayoutParams(new ViewGroup.LayoutParams(
        //                        ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
        //                    View view = getLayoutInflater().inflate(R.layout.dialog_save_image, null);
        //
        //                    AlertDialog alertDialog = new AlertDialog.Builder(BigImagePagerActivity.this)
        //                            .setView(view)
        //                            .create();
        //
        //                    TextView textView = (TextView) view.findViewById(R.id.save_image_tv);
        //                    textView.setOnClickListener(v1 -> {
        //                        saveImage(pv.getDrawable(), imageUrl);
        //                        alertDialog.dismiss();
        //                    });
        //                    alertDialog.show();
        PagerAdapter mPagerAdapter = new PagerAdapter() {
            @Override
            public int getCount() {
                return mImageUrls.size();
            }

            @Override
            public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {
                return view.equals(object);
            }

            @NonNull
            @Override
            public Object instantiateItem(@NonNull ViewGroup container, int position) {
                PhotoView photoView = new PhotoView(container.getContext());
//                imageView.setLayoutParams(new ViewGroup.LayoutParams(
//                        ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
                String imageUrl = mImageUrls.get(position);
                Glide.with(BigImagePagerActivity.this).load(imageUrl).into(photoView);

                if (mPhotoViewMap.get(position) != null) {
                    mPhotoViewMap.remove(position);
                }
                mPhotoViewMap.put(position, photoView);

                photoView.setOnViewTapListener((view, x, y) -> {
                    onBackPressed();
                });

                photoView.setOnLongClickListener(v -> {
                    PhotoView pv = (PhotoView) v;
                    if (pv.getDrawable() == null) {
                        return false;
                    }

//                    View view = getLayoutInflater().inflate(R.layout.dialog_save_image, null);
//
//                    AlertDialog alertDialog = new AlertDialog.Builder(BigImagePagerActivity.this)
//                            .setView(view)
//                            .create();
//
//                    TextView textView = (TextView) view.findViewById(R.id.save_image_tv);
//                    textView.setOnClickListener(v1 -> {
//                        saveImage(pv.getDrawable(), imageUrl);
//                        alertDialog.dismiss();
//                    });

//                    alertDialog.show();
                    return true;
                });

                if (position == mEnterIndex) {
                    ViewCompat.setTransitionName(photoView, mImageUrls.get(position));
                    setStartPostTransition(photoView);
                }

                container.addView(photoView);
                return photoView;
            }

            @Override
            public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
                if (mPhotoViewMap.get(position) != null) {
                    mPhotoViewMap.remove(position);
                }
                container.removeView((View) object);
            }
        };

        mViewPager.setAdapter(mPagerAdapter);
        mViewPager.setCurrentItem(mEnterIndex);
        mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
            @Override
            public void onPageScrolled(int i, float v, int i1) {

            }

            @Override
            public void onPageSelected(int i) {
                RxBus.getDefault().post(RxCodeConstants.JUMP_CURRENT_POSITION, i);
            }

            @Override
            public void onPageScrollStateChanged(int i) {

            }
        });
    }

    @Override
    public void finishAfterTransition() {
        sExitIndex = mViewPager.getCurrentItem();
        if (sExitIndex != mEnterIndex) {
//            RxBus.getDefault().post(RxCodeConstants.JUMP_CURRENT_POSITION,sExitIndex);
//            Intent data = new Intent();
//            data.putExtra("sExitIndex", sExitIndex);
//            setResult(RESULT_OK, data);
            setSharedElementCallback(sExitIndex, mPhotoViewMap.get(sExitIndex));
        }
        super.finishAfterTransition();
    }

    private void setSharedElementCallback(final int exitIndex, final View sharedView) {
        setEnterSharedElementCallback(new SharedElementCallback() {
            @Override
            public void onMapSharedElements(List<String> names, Map<String, View> sharedElements) {
                String transitName = mImageUrls.get(exitIndex);
                names.clear();
                sharedElements.clear();
                names.add(transitName);
                sharedElements.put(transitName, sharedView);
            }
        });
    }

    @Override
    public void onActivityReenter(int resultCode, Intent data) {
        super.onActivityReenter(resultCode, data);
    }

    public void setStartPostTransition(final View sharedView) {
        sharedView.getViewTreeObserver().addOnPreDrawListener(
                new ViewTreeObserver.OnPreDrawListener() {
                    @Override
                    public boolean onPreDraw() {
                        sharedView.getViewTreeObserver().removeOnPreDrawListener(this);
                        //延迟结束,启用动画
                        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                            startPostponedEnterTransition();
                        }
                        return false;
                    }
                });
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <title>Builder Test Suite</title>

  <link rel="stylesheet" href="../libs/qunit/qunit.css" media="screen">

Builder Test Suite


text:
div.innerHTML = "_<style type=\"text/css\">body {background-color: red; }</style>";
div.removeChild(div.firstChild);


text:
package org.intellij.plugins.relaxNG.validation;

import com.intellij.codeInsight.daemon.Validator;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.xml.XmlDocument;
import com.intellij.psi.xml.XmlFile;
import com.intellij.psi.xml.XmlTag;
import com.thaiopensource.util.PropertyMapBuilder;
import com.thaiopensource.validate.Schema;
import com.thaiopensource.validate.ValidateProperty;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.xml.sax.ContentHandler;
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXParseException;

public final class XmlInstanceValidator {
  private static final Logger LOG = Logger.getInstance(XmlInstanceValidator.class);

  private XmlInstanceValidator() {
  }

  public static void doValidation(@NotNull final XmlDocument doc, final Validator.ValidationHost host, final XmlFile descriptorFile) {
    try {
      final Schema schema = RngParser.getCachedSchema(descriptorFile);
      if (schema == null) {
        // did not manage to get a compiled schema. no validation...
        return;
      }

      final ErrorHandler eh = MyErrorHandler.create(doc, host);
      if (eh == null) {
        return;
      }

      final PropertyMapBuilder builder = new PropertyMapBuilder();
      builder.put(ValidateProperty.ERROR_HANDLER, eh);

      final ContentHandler handler = schema.createValidator(builder.toPropertyMap()).getContentHandler();
      doc.accept(new Psi2SaxAdapter(handler));

    } catch (ProcessCanceledException e) {
      throw e;
    } catch (RuntimeException e) {
      LOG.error(e);
    } catch (Exception e) {
      LOG.info(e);
    }
  }

  private static final class MyErrorHandler implements ErrorHandler {
    private final Validator.ValidationHost myHost;
    private final Document myDocument;
    private final PsiFile myFile;

    private MyErrorHandler(XmlDocument doc, Validator.ValidationHost host) {
      myHost = host;
      myFile = doc.getContainingFile();
      myDocument = PsiDocumentManager.getInstance(myFile.getProject()).getDocument(myFile);
    }

    @Override
    public void warning(SAXParseException exception) {
      RngSchemaValidator.handleError(exception, myFile, myDocument, new RngSchemaValidator.ValidationMessageConsumer() {
        @Override
        public void onMessage(@NotNull PsiElement context, @NotNull String message) {
          myHost.addMessage(context, message, Validator.ValidationHost.ErrorType.WARNING);
        }
      });
    }

    @Override
    public void error(SAXParseException exception) {
      RngSchemaValidator.handleError(exception, myFile, myDocument, new RngSchemaValidator.ValidationMessageConsumer() {
        @Override
        public void onMessage(@NotNull PsiElement context, @NotNull String message) {
          myHost.addMessage(context, message, Validator.ValidationHost.ErrorType.ERROR);
        }
      });
    }

    @Override
    public void fatalError(SAXParseException exception) {
      RngSchemaValidator.handleError(exception, myFile, myDocument, new RngSchemaValidator.ValidationMessageConsumer() {
        @Override
        public void onMessage(@NotNull PsiElement context, @NotNull String message) {
          myHost.addMessage(context, message, Validator.ValidationHost.ErrorType.ERROR);
        }
      });
    }

    @Nullable
    public static ErrorHandler create(XmlDocument doc, Validator.ValidationHost host) {
      final XmlTag rootTag = doc.getRootTag();
      if (rootTag == null) {
        return null;
      }
      return new MyErrorHandler(doc, host);
    }
  }
}


text:
package com.microsoft.azure.management.network;

import java.util.List;

/**
 * AddressSpace contains an array of IP address ranges that can be used by
 * subnets of the virtual network.
 */
public class AddressSpace {
    /**
     * A list of address blocks reserved for this virtual network in CIDR
     * notation.
     */
    private List<String> addressPrefixes;

    /**
     * Get the addressPrefixes value.
     *
     * @return the addressPrefixes value
     */
    public List<String> addressPrefixes() {
        return this.addressPrefixes;
    }

    /**
     * Set the addressPrefixes value.
     *
     * @param addressPrefixes the addressPrefixes value to set
     * @return the AddressSpace object itself.
     */
    public AddressSpace withAddressPrefixes(List<String> addressPrefixes) {
        this.addressPrefixes = addressPrefixes;
        return this;
    }

}


text:
var expect = require("chai").expect;

module.exports = function (helpers) {
  var component = helpers.mount(require.resolve("./index"), {});
  var children = component.getEl("root").children;
  expect(children.length).to.equal(2);

  expect(children[0].getAttribute("data-foo")).to.equal("true");
  expect(children[0].getAttribute("data-bar")).to.equal(null);

  expect(children[1].getAttribute("data-foo")).to.equal(null);
  expect(children[1].getAttribute("data-bar")).to.equal("true");

  component.state.swapped = true;
  component.update();

  children = component.getEl("root").children;

  expect(children.length).to.equal(2);

  expect(children[0].getAttribute("data-foo")).to.equal(null);
  expect(children[0].getAttribute("data-bar")).to.equal("true");

  expect(children[1].getAttribute("data-foo")).to.equal("true");
  expect(children[1].getAttribute("data-bar")).to.equal(null);
};


text:
// Copyright 2015 The Bazel Authors. All rights reserved.
//
// Licensed 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.
package com.google.devtools.build.lib.skyframe;

import static com.google.common.collect.ImmutableSetMultimap.flatteningToImmutableSetMultimap;

import com.google.auto.value.AutoValue;
import com.google.common.base.Preconditions;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSetMultimap;
import com.google.common.collect.ImmutableSortedSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
import com.google.devtools.build.lib.bugreport.BugReport;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.cmdline.RepositoryMapping;
import com.google.devtools.build.lib.cmdline.RepositoryName;
import com.google.devtools.build.lib.cmdline.ResolvedTargets;
import com.google.devtools.build.lib.cmdline.SignedTargetPattern;
import com.google.devtools.build.lib.cmdline.TargetParsingException;
import com.google.devtools.build.lib.cmdline.TargetPattern;
import com.google.devtools.build.lib.events.Event;
import com.google.devtools.build.lib.events.ExtendedEventHandler;
import com.google.devtools.build.lib.packages.NonconfigurableAttributeMapper;
import com.google.devtools.build.lib.packages.Rule;
import com.google.devtools.build.lib.packages.Target;
import com.google.devtools.build.lib.packages.TargetUtils;
import com.google.devtools.build.lib.packages.Type;
import com.google.devtools.build.lib.pkgcache.AbstractRecursivePackageProvider.MissingDepException;
import com.google.devtools.build.lib.pkgcache.CompileOneDependencyTransformer;
import com.google.devtools.build.lib.pkgcache.FilteringPolicies;
import com.google.devtools.build.lib.pkgcache.FilteringPolicy;
import com.google.devtools.build.lib.pkgcache.LoadingPhaseCompleteEvent;
import com.google.devtools.build.lib.pkgcache.ParsingFailedEvent;
import com.google.devtools.build.lib.pkgcache.TargetParsingCompleteEvent;
import com.google.devtools.build.lib.pkgcache.TestFilter;
import com.google.devtools.build.lib.repository.ExternalPackageHelper;
import com.google.devtools.build.lib.skyframe.TargetPatternPhaseValue.TargetPatternPhaseKey;
import com.google.devtools.build.lib.skyframe.TargetPatternValue.TargetPatternKey;
import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.build.skyframe.SkyFunction;
import com.google.devtools.build.skyframe.SkyFunction.Environment;
import com.google.devtools.build.skyframe.SkyKey;
import com.google.devtools.build.skyframe.SkyValue;
import com.google.devtools.build.skyframe.SkyframeIterableResult;
import com.google.devtools.build.skyframe.SkyframeLookupResult;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Takes a list of target patterns corresponding to a command line and turns it into a set of
 * resolved Targets.
 */
final class TargetPatternPhaseFunction implements SkyFunction {

  private final ExternalPackageHelper externalPackageHelper;

  public TargetPatternPhaseFunction(ExternalPackageHelper externalPackageHelper) {
    this.externalPackageHelper = externalPackageHelper;
  }

  @Override
  public TargetPatternPhaseValue compute(SkyKey key, Environment env) throws InterruptedException {
    TargetPatternPhaseKey options = (TargetPatternPhaseKey) key.argument();
    WorkspaceNameValue workspaceName = (WorkspaceNameValue) env.getValue(WorkspaceNameValue.key());
    ImmutableSortedSet<String> notSymlinkedInExecrootDirectories =
        externalPackageHelper.getNotSymlinkedInExecrootDirectories(env);
    if (env.valuesMissing()) {
      return null;
    }

    RepositoryMappingValue repositoryMappingValue =
        (RepositoryMappingValue) env.getValue(RepositoryMappingValue.key(RepositoryName.MAIN));
    if (repositoryMappingValue == null) {
      return null;
    }

    // Determine targets to build:
    List<String> failedPatterns = new ArrayList<>();
    List<ExpandedPattern> expandedPatterns =
        getTargetsToBuild(
            env, options, repositoryMappingValue.getRepositoryMapping(), failedPatterns);
    ResolvedTargets<Target> targets =
        env.valuesMissing()
            ? null
            : mergeAll(expandedPatterns, !failedPatterns.isEmpty(), env, options);

    // If the --build_tests_only option was specified or we want to run tests, we need to determine
    // the list of targets to test. For that, we remove manual tests and apply the command-line
    // filters. Also, if --build_tests_only is specified, then the list of filtered targets will be
    // set as build list as well.
    ResolvedTargets<Target> testTargets = null;
    if (options.getDetermineTests() || options.getBuildTestsOnly()) {
      testTargets =
          determineTests(
              env,
              options.getTargetPatterns(),
              options.getOffset(),
              repositoryMappingValue.getRepositoryMapping(),
              options.getTestFilter());
      Preconditions.checkState(env.valuesMissing() || (testTargets != null));
    }

    Map testExpansionKeys = new LinkedHashMap<>();
    if (targets != null) {
      for (Target target : targets.getTargets()) {
        if (TargetUtils.isTestSuiteRule(target) && options.isExpandTestSuites()) {
          Label label = target.getLabel();
          SkyKey testExpansionKey = TestsForTargetPatternValue.key(ImmutableSet.of(label));
          testExpansionKeys.put(label, testExpansionKey);
        }
      }
    }
    Map<SkyKey, SkyValue> expandedTests = env.getValues(testExpansionKeys.values());
    if (env.valuesMissing()) {
      return null;
    }

    ImmutableSet<Target> filteredTargets = targets.getFilteredTargets();
    ImmutableSet<Target> testsToRun = null;
    ImmutableSet<Target> testFilteredTargets = ImmutableSet.of();

    if (testTargets != null) {
      // Parse the targets to get the tests.
      if (testTargets.getTargets().isEmpty() && !testTargets.getFilteredTargets().isEmpty()) {
        env.getListener().handle(Event.warn("All specified test targets were excluded by filters"));
      }

      if (options.getBuildTestsOnly()) {
        // Replace original targets to build with test targets, so that only targets that are
        // actually going to be built are loaded in the loading phase. Note that this has a side
        // effect that any test_suite target requested to be built is replaced by the set of *_test
        // targets it represents; for example, this affects the status and the summary reports.
        Set<Target> allFilteredTargets = new HashSet<>();
        allFilteredTargets.addAll(targets.getTargets());
        allFilteredTargets.addAll(targets.getFilteredTargets());
        allFilteredTargets.removeAll(testTargets.getTargets());
        allFilteredTargets.addAll(testTargets.getFilteredTargets());
        testFilteredTargets = ImmutableSet.copyOf(allFilteredTargets);
        filteredTargets = ImmutableSet.of();

        targets =
            ResolvedTargets.<Target>builder()
                .merge(testTargets)
                .mergeError(targets.hasError())
                .build();
        if (options.getDetermineTests()) {
          testsToRun = testTargets.getTargets();
        }
      } else /*if (determineTests)*/ {
        testsToRun = testTargets.getTargets();
        targets =
            ResolvedTargets.<Target>builder()
                .merge(targets)
                // Merging in all testsToRun guarantees that targets that will be built (because
                // they are tests) are not considered to be "filtered out", even if they were
                // initially filtered out. We can't merge in testTargets because its set of
                // filteredTargets could include targets that we're building but not testing.
                .merge(ResolvedTargets.<Target>builder().addAll(testsToRun).build())
                .mergeError(testTargets.hasError())
                .build();
        filteredTargets = targets.getFilteredTargets();
      }
      if (testsToRun != null) {
        // Note that testsToRun can still be null here, if buildTestsOnly && !shouldRunTests.
        if (!targets.getTargets().containsAll(testsToRun)) {
          throw new IllegalStateException(
              String.format(
                  "Internal consistency check failed; some targets are scheduled for test execution"
                      + " but not for building (%s)",
                  Sets.difference(testsToRun, targets.getTargets())));
        }
      }
    }

    if (targets.hasError()) {
      env.getListener().handle(Event.warn("Target pattern parsing failed."));
    }

    maybeReportDeprecation(env.getListener(), targets.getTargets());

    ResolvedTargets.Builder expandedLabelsBuilder = ResolvedTargets.builder();
    ImmutableMap.Builder<Label, ImmutableSet> testSuiteExpansions =
        ImmutableMap.builderWithExpectedSize(expandedTests.size());
    for (Target target : targets.getTargets()) {
      Label label = target.getLabel();
      if (TargetUtils.isTestSuiteRule(target) && options.isExpandTestSuites()) {
        SkyKey expansionKey = Preconditions.checkNotNull(testExpansionKeys.get(label));
        ResolvedTargets testExpansion =
            ((TestsForTargetPatternValue) expandedTests.get(expansionKey)).getLabels();
        expandedLabelsBuilder.merge(testExpansion);
        testSuiteExpansions.put(label, testExpansion.getTargets());
      } else {
        expandedLabelsBuilder.add(label);
      }
    }
    ResolvedTargets targetLabels = expandedLabelsBuilder.build();
    ResolvedTargets<Target> expandedTargets =
        TestsForTargetPatternFunction.labelsToTargets(
            env, targetLabels.getTargets(), targetLabels.hasError());
    Set<Target> testSuiteTargets =
        Sets.difference(targets.getTargets(), expandedTargets.getTargets());
    ImmutableSet testsToRunLabels = null;
    if (testsToRun != null) {
      testsToRunLabels =
          testsToRun.stream().map(Target::getLabel).collect(ImmutableSet.toImmutableSet());
    }
    ImmutableSet removedTargetLabels =
        testSuiteTargets.stream().map(Target::getLabel).collect(ImmutableSet.toImmutableSet());

    TargetPatternPhaseValue result =
        new TargetPatternPhaseValue(
            targetLabels.getTargets(),
            testsToRunLabels,
            targets.hasError(),
            expandedTargets.hasError(),
            workspaceName.getName(),
            notSymlinkedInExecrootDirectories);

    env.getListener()
        .post(
            new TargetParsingCompleteEvent(
                targets.getTargets(),
                filteredTargets,
                testFilteredTargets,
                options.getTargetPatterns(),
                expandedTargets.getTargets(),
                ImmutableList.copyOf(failedPatterns),
                mapOriginalPatternsToLabels(expandedPatterns, targets.getTargets()),
                testSuiteExpansions.buildOrThrow()));
    env.getListener()
        .post(new LoadingPhaseCompleteEvent(result.getTargetLabels(), removedTargetLabels));
    return result;
  }

  /**
   * Emit a warning when a deprecated target is mentioned on the command line.
   *
   *
Note that this does not stop us from emitting "target X depends on deprecated target Y"
   * style warnings for the same target and it is a good thing; depending on a target and
   * wanting to build it are different things.
   */
  private static void maybeReportDeprecation(
      ExtendedEventHandler eventHandler, Collection<Target> targets) {
    for (Rule rule : Iterables.filter(targets, Rule.class)) {
      if (rule.isAttributeValueExplicitlySpecified("deprecation")) {
        eventHandler.handle(
            Event.warn(
                rule.getLocation(),
                String.format(
                    "target '%s' is deprecated: %s",
                    rule.getLabel(),
                    NonconfigurableAttributeMapper.of(rule).get("deprecation", Type.STRING))));
      }
    }
  }

  /**
   * Interprets the command-line arguments by expanding each pattern to targets and populating the
   * list of {@code failedPatterns}.
   *
   * @param env the Starlark environment
   * @param options the command-line arguments in structured form
   * @param failedPatterns a list into which failed patterns are added
   */
  private static List<ExpandedPattern> getTargetsToBuild(
      Environment env,
      TargetPatternPhaseKey options,
      RepositoryMapping repoMapping,
      List<String> failedPatterns)
      throws InterruptedException {
    TargetPattern.Parser parser =
        new TargetPattern.Parser(options.getOffset(), RepositoryName.MAIN, repoMapping);
    FilteringPolicy policy =
        options.getBuildManualTests()
            ? FilteringPolicies.NO_FILTER
            : FilteringPolicies.FILTER_MANUAL;
    List<TargetPatternKey> patternSkyKeys = new ArrayList<>(options.getTargetPatterns().size());
    for (String pattern : options.getTargetPatterns()) {
      try {
        patternSkyKeys.add(
            TargetPatternValue.key(SignedTargetPattern.parse(pattern, parser), policy));
      } catch (TargetParsingException e) {
        failedPatterns.add(pattern);
        // We post a PatternExpandingError here - the pattern could not be parsed, so we don't even
        // get to run TargetPatternFunction.
        env.getListener().post(PatternExpandingError.failed(pattern, e.getMessage()));
        // We generally skip patterns that don't parse. We report a parsing failed exception to the
        // event bus here, but not in determineTests below, which goes through the same list. Note
        // that the TargetPatternFunction otherwise reports these events (but only if the target
        // pattern could be parsed successfully).
        env.getListener().post(new ParsingFailedEvent(pattern, e.getMessage()));
        try {
          env.getValueOrThrow(TargetPatternErrorFunction.key(e), TargetParsingException.class);
        } catch (TargetParsingException ignore) {
          // We ignore this. Keep going is active.
        }
        env.getListener().handle(Event.error("Skipping '" + pattern + "': " + e.getMessage()));
      }
    }

    SkyframeIterableResult resolvedPatterns = env.getOrderedValuesAndExceptions(patternSkyKeys);
    List<ExpandedPattern> expandedPatterns = new ArrayList<>(patternSkyKeys.size());

    for (TargetPatternKey pattern : patternSkyKeys) {
      TargetPatternValue value;
      try {
        value = (TargetPatternValue) resolvedPatterns.nextOrThrow(TargetParsingException.class);
      } catch (TargetParsingException e) {
        String rawPattern = pattern.getPattern();
        String errorMessage = e.getMessage();
        failedPatterns.add(rawPattern);
        env.getListener().post(PatternExpandingError.failed(rawPattern, errorMessage));
        env.getListener().handle(Event.error("Skipping '" + rawPattern + "': " + errorMessage));
        continue;
      }
      if (value == null) {
        continue;
      }
      // TODO(ulfjack): This is terribly inefficient.
      ResolvedTargets<Target> asTargets =
          TestsForTargetPatternFunction.labelsToTargets(
              env, value.getTargets().getTargets(), value.getTargets().hasError());
      if (asTargets == null) {
        continue;
      }
      expandedPatterns.add(ExpandedPattern.of(pattern, asTargets));
    }

    return expandedPatterns;
  }

  /** Merges expansions from all patterns into a single {@link ResolvedTargets} instance. */
  private static ResolvedTargets<Target> mergeAll(
      List<ExpandedPattern> expandedPatterns,
      boolean hasError,
      Environment env,
      TargetPatternPhaseKey options)
      throws InterruptedException {
    ResolvedTargets.Builder<Target> builder = ResolvedTargets.builder();
    builder.mergeError(hasError);

    for (ExpandedPattern expansion : expandedPatterns) {
      if (expansion.pattern().isNegative()) {
        builder.filter(Predicates.not(Predicates.in(expansion.resolvedTargets().getTargets())));
      } else {
        builder.merge(expansion.resolvedTargets());
      }
    }

    ResolvedTargets<Target> result =
        builder.filter(TargetUtils.tagFilter(options.getBuildTargetFilter())).build();
    if (options.getCompileOneDependency()) {
      EnvironmentBackedRecursivePackageProvider environmentBackedRecursivePackageProvider =
          new EnvironmentBackedRecursivePackageProvider(env);
      try {
        result =
            new CompileOneDependencyTransformer(environmentBackedRecursivePackageProvider)
                .transformCompileOneDependency(env.getListener(), result);
      } catch (MissingDepException e) {
        return null;
      } catch (TargetParsingException e) {
        try {
          env.getValueOrThrow(TargetPatternErrorFunction.key(e), TargetParsingException.class);
        } catch (TargetParsingException ignore) {
          // We ignore this. Keep going is active.
        }
        env.getListener().handle(Event.error(e.getMessage()));
        return ResolvedTargets.failed();
      }
      if (environmentBackedRecursivePackageProvider.encounteredPackageErrors()) {
        result = ResolvedTargets.<Target>builder().merge(result).setError().build();
      }
    }
    return result;
  }

  /**
   * Interpret test target labels from the command-line arguments and return the corresponding set
   * of targets, handling the filter flags, and expanding test suites.
   *
   * @param targetPatterns the list of command-line target patterns specified by the user
   * @param repoMapping the repository mapping to apply to repos in the patterns
   * @param testFilter the test filter
   */
  private static ResolvedTargets<Target> determineTests(
      Environment env,
      List<String> targetPatterns,
      PathFragment offset,
      RepositoryMapping repoMapping,
      TestFilter testFilter)
      throws InterruptedException {
    TargetPattern.Parser parser =
        new TargetPattern.Parser(offset, RepositoryName.MAIN, repoMapping);
    List<TargetPatternKey> patternSkyKeys = new ArrayList<>();
    for (String pattern : targetPatterns) {
      try {
        patternSkyKeys.add(
            TargetPatternValue.key(
                SignedTargetPattern.parse(pattern, parser), FilteringPolicies.FILTER_TESTS));
      } catch (TargetParsingException e) {
        // Skip.
      }
    }
    SkyframeLookupResult resolvedPatterns = env.getValuesAndExceptions(patternSkyKeys);
    if (env.valuesMissing()) {
      return null;
    }

    List<SkyKey> expandedSuiteKeys = new ArrayList<>();
    for (TargetPatternKey key : patternSkyKeys) {
      TargetPatternValue value;
      try {
        value = (TargetPatternValue) resolvedPatterns.getOrThrow(key, TargetParsingException.class);
        if (value == null) {
          BugReport.sendBugReport(
              new IllegalStateException(
                  "TargetPatternValue " + key + " was missing, this should never happen"));
          return null;
        }
      } catch (TargetParsingException e) {
        // Skip.
        continue;
      }
      expandedSuiteKeys.add(TestsForTargetPatternValue.key(value.getTargets().getTargets()));
    }
    Map<SkyKey, SkyValue> expandedSuites = env.getValues(expandedSuiteKeys);
    if (env.valuesMissing()) {
      return null;
    }

    ResolvedTargets.Builder<Target> testTargetsBuilder = ResolvedTargets.builder();
    for (TargetPatternKey pattern : patternSkyKeys) {
      TargetPatternValue value;
      try {
        value =
            (TargetPatternValue) resolvedPatterns.getOrThrow(pattern, TargetParsingException.class);
        if (value == null) {
          BugReport.sendBugReport(
              new IllegalStateException(
                  "TargetPatternValue " + pattern + " was missing, this should never happen"));
          return null;
        }
      } catch (TargetParsingException e) {
        // This was already reported in getTargetsToBuild (maybe merge the two code paths?).
        continue;
      }

      TestsForTargetPatternValue expandedSuitesValue =
          (TestsForTargetPatternValue)
              expandedSuites.get(TestsForTargetPatternValue.key(value.getTargets().getTargets()));
      if (pattern.isNegative()) {
        ResolvedTargets<Target> negativeTargets =
            TestsForTargetPatternFunction.labelsToTargets(
                env,
                expandedSuitesValue.getLabels().getTargets(),
                expandedSuitesValue.getLabels().hasError());
        testTargetsBuilder.filter(Predicates.not(Predicates.in(negativeTargets.getTargets())));
        testTargetsBuilder.mergeError(negativeTargets.hasError());
      } else {
        ResolvedTargets<Target> positiveTargets =
            TestsForTargetPatternFunction.labelsToTargets(
                env,
                expandedSuitesValue.getLabels().getTargets(),
                expandedSuitesValue.getLabels().hasError());
        testTargetsBuilder.addAll(positiveTargets.getTargets());
        testTargetsBuilder.mergeError(positiveTargets.hasError());
      }
    }

    testTargetsBuilder.filter(testFilter);
    return testTargetsBuilder.build();
  }

  private static ImmutableSetMultimap<String, Label> mapOriginalPatternsToLabels(
      List<ExpandedPattern> expandedPatterns, Set<Target> includedTargets) {
    return expandedPatterns.stream()
        .filter(expansion -> !expansion.pattern().isNegative())
        .collect(
            flatteningToImmutableSetMultimap(
                expansion -> expansion.pattern().getPattern(),
                expansion ->
                    expansion.resolvedTargets().getTargets().stream()
                        .filter(includedTargets::contains)
                        .map(Target::getLabel)));
  }

  /** Represents the expansion of a single target pattern. */
  @AutoValue
  abstract static class ExpandedPattern {

    static ExpandedPattern of(TargetPatternKey pattern, ResolvedTargets<Target> resolvedTargets) {
      return new AutoValue_TargetPatternPhaseFunction_ExpandedPattern(pattern, resolvedTargets);
    }

    abstract TargetPatternKey pattern();

    abstract ResolvedTargets<Target> resolvedTargets();
  }
}


text:
#include <fxmin.hpp>

#pragma warning(push)
#pragma warning(disable:4100) //unreferenced parameter

FxSystemThread::FxSystemThread(
    __in PFX_DRIVER_GLOBALS FxDriverGlobals
    ) :
    FxNonPagedObject(FX_TYPE_SYSTEMTHREAD, 0, FxDriverGlobals)
{
    UfxVerifierTrapNotImpl();
}

FxSystemThread::~FxSystemThread()
{
    UfxVerifierTrapNotImpl();
}

NTSTATUS
FxSystemThread::_CreateAndInit(
    __out FxSystemThread** SystemThread,
    __in PFX_DRIVER_GLOBALS FxDriverGlobals,
    __in WDFDEVICE Device,
    __in MdDeviceObject DeviceObject
    )
{
    UfxVerifierTrapNotImpl();

    return STATUS_NOT_IMPLEMENTED;
}

//
// Create the system thread in order to be able to service work items
//
// It is recommended this is done from the system process context
// since the threads handle is available to the user mode process
// for a temporary window. XP and later supports OBJ_KERNELHANDLE, but
// DriverFrameworks must support W2K with the same binary.
//
// It is safe to call this at DriverEntry which is in the system process
// to create an initial driver thread, and this driver thread should be
// used for creating any child driver threads on demand.
//
BOOLEAN
FxSystemThread::Initialize()
{
    UfxVerifierTrapNotImpl();
    return FALSE;
}

NTSTATUS
FxSystemThread::CreateThread(
    VOID
    )
{
    UfxVerifierTrapNotImpl();
    return STATUS_NOT_IMPLEMENTED;
}

// This is called to tell the thread to exit.
//
// It must be called from thread context such as
// the driver unload routine since it will wait for the
// thread to exit.
//
BOOLEAN
FxSystemThread::ExitThread()
{
    UfxVerifierTrapNotImpl();
    return FALSE;
}

BOOLEAN
FxSystemThread::ExitThreadAsync(
    __inout FxSystemThread* Reaper
    )
{
    UfxVerifierTrapNotImpl();
    return FALSE;
}

BOOLEAN
FxSystemThread::QueueWorkItem(
    __inout PWORK_QUEUE_ITEM WorkItem
    )
{
    UfxVerifierTrapNotImpl();
    return FALSE;
}

//
// Attempt to cancel the work item.
//
// Returns TRUE if success.
//
// If returns FALSE, the work item
// routine either has been called, is running,
// or is about to be called.
//
BOOLEAN
FxSystemThread::CancelWorkItem(
    __inout PWORK_QUEUE_ITEM WorkItem
    )
{
    UfxVerifierTrapNotImpl();
    return FALSE;
}

VOID
FxSystemThread::Thread()
{
    UfxVerifierTrapNotImpl();
}

VOID
FxSystemThread::Reaper()
{
    UfxVerifierTrapNotImpl();
}

VOID
FxSystemThread::StaticThreadThunk(
    __inout PVOID Context
    )
{
    UfxVerifierTrapNotImpl();
}

VOID
FxSystemThread::StaticReaperThunk(
    __inout PVOID Context
    )
{
    UfxVerifierTrapNotImpl();
}

#pragma warning(pop)


text:
class Api::Json::OrganizationsController < Api::ApplicationController
  include CartoDB

  ssl_required :show, :users

  # Fetch info from the current user orgranization
  def show
    data = current_user.organization ? organization_presenter.to_poro : {}

    render json: data
  end

  # Return user list of current user organization
  def users
    data = current_user.organization ? organization_presenter.to_poro[:users] : {}

    render json: data
  end

  private

  def organization_presenter
    ::OrganizationPresenter.new(current_user.organization)
  end

end


text:
@interface WYQRootViewController : WYQBaseViewController

@end


text:
DropWizard Example
======

##Shipping Calculation Service using Netuitive Metrics

Down load the repository and update the API Key in shippingservice.yaml with your Custom Integration API Key from Netuitive.

Build the project using gradle

```
C:\ShippingService> gradlew clean build packageJar
```
or
```
$ ./gradlew clean build packageJar
```

Next run the application using the following command
```
 java -jar ./build/libs/dropwizard_shipping_service_with_metrics-1.0-SNAPSHOT-standalone.jar server shippingservice.yaml
```

Your service should now be running on [localhost:8080](http://localhost:8080)

Try the following interactions

[http://localhost:8080/calculate?weight=1](http://localhost:8080/calculate?weight=1)

[http://localhost:8080/calculate?weight=2](http://localhost:8080/calculate?weight=2)

[http://localhost:8080/calculate?weight=10](http://localhost:8080/calculate?weight=10)


text:
use protocol_derive::{Decode, Encode};

#[derive(Clone, PartialEq, Debug, Encode, Decode)]
#[protocol(id = 890)]
pub struct ChannelEnablingMessage<'a> {
    pub channel: u8,
    pub enable: bool,
    pub _phantom: std::marker::PhantomData<&'a ()>,
}

#[derive(Clone, PartialEq, Debug, Encode, Decode)]
#[protocol(id = 892)]
pub struct EnabledChannelsMessage<'a> {
    pub channels: &'a [u8],
    pub disallowed: &'a [u8],
}

#[derive(Clone, PartialEq, Debug, Encode, Decode)]
#[protocol(id = 891)]
pub struct ChannelEnablingChangeMessage<'a> {
    pub channel: u8,
    pub enable: bool,
    pub _phantom: std::marker::PhantomData<&'a ()>,
}


text:
package com.sematext.ag.solr;

import com.sematext.ag.PlayerConfig;
import com.sematext.ag.PlayerRunner;
import com.sematext.ag.solr.sink.SimpleXMLDataSolrSink;
import com.sematext.ag.source.FiniteEventSource;
import com.sematext.ag.source.SimpleSourceFactory;
import com.sematext.ag.source.dictionary.DataDictionaryEventSource;

/**
 * Class used for starting {@link SimpleXMLDataSolrSink} using dictionary.
 *
 * @author sematext, http://www.sematext.com/
 */
public final class DictionaryDataSolrPlayerMain {
  private DictionaryDataSolrPlayerMain() {
  }

  public static void main(String[] args) {
    if (args.length < 4) {
      System.out.println("Usage: solrUrl eventsCount dictionaryFile fieldName:type [fieldName:type] ...");
      System.out.println("The following types are available:");
      System.out.println(" * text");
      System.out.println(" * numeric");
      System.out.println(" * date");
      System.out
          .println("Example: http://localhost:8983/solr/core/update 10000 dictionary.txt id:numeric title:text published:date");
      System.exit(1);
    }

    String solrUrl = args[0];
    String eventsCount = args[1];
    String dictionaryFile = args[2];

    StringBuilder fields = new StringBuilder();
    fields.append(args[3]);
    if (args.length > 4) {
      for (int i = 4; i < args.length; i++) {
        fields.append(" ").append(args[i]);
      }
    }

    PlayerConfig config = new PlayerConfig(SimpleSourceFactory.SOURCE_CLASS_CONFIG_KEY,
        DataDictionaryEventSource.class.getName(), FiniteEventSource.MAX_EVENTS_KEY, eventsCount,
        DataDictionaryEventSource.DICTIONARY_FILE_NAME_KEY, dictionaryFile, DataDictionaryEventSource.FIELDS_KEY,
        fields.toString(), PlayerRunner.SINK_CLASS_CONFIG_KEY, SimpleXMLDataSolrSink.class.getName(),
        SimpleXMLDataSolrSink.SOLR_URL_KEY, solrUrl);
    PlayerRunner.play(config);
  }
}


text:
<!DOCTYPE html>

<title>MathJax TeX Test Page</title>
<link href="https://ameliachu.github.io/assets/css/bootstrap.min.css" rel="stylesheet">

When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$

" $\subseteq$ "Let $x \in A \setminus (B \cup C) \Rightarrow  x \in A $ and $x \notin B \cup C \Rightarrow$ since $x \notin B$ and $x \notin C$ , moreover, since $x \in A$ then $ x \in A \setminus B $ similarily $x \in A \setminus C$

"$\supseteq$ " Let $x \in (A \setminus B)_{\wedge}(A \setminus C) \Rightarrow a \in (A \setminus B)$ and $x \in (A \setminus C) \Rightarrow (x \in A$ and $x \in B )$

Definition: Let $A, B$ be two non-empty sets; a relation

3a) $A, B, C$ sets. prove that $A\setminus (B\cup C) = (A\setminus B)_{\wedge}(A \setminus C)$

Proof:

" $\subseteq$ "Let $x \in A \setminus (B \cup C) \Rightarrow  x \in A $ and $x \notin B \cup C \Rightarrow$ since $x \notin B$ and $x \notin C$ , moreover, since $x \in A$ then $ x \in A \setminus B $ similarily $x \in A \setminus C$

"$\supseteq$ " Let $x \in (A \setminus B)_{\wedge}(A \setminus C) \Rightarrow a \in (A \setminus B)$ and $x \in (A \setminus C) \Rightarrow (x \in A$ and $x \in B )$


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace NativeDLLWrappers.Kernel32
{
    /// <summary>
    /// Class responsible for Kernel32 DLL functionality.
    /// </summary>
    public static class Kernel32
    {
        /// <summary>
        /// Retrieves the calling thread's last-error code value. The last-error code is maintained
        /// on a per-thread basis. Multiple threads do not overwrite each other's last-error code.
        /// https://msdn.microsoft.com/en-us/library/windows/desktop/ms679360%28v=vs.85%29.aspx
        /// Error codes: https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx
        /// </summary>
        /// <returns></returns>
        [DllImport("Kernel32.dll", SetLastError = true)]
        public static extern uint GetLastError();
    }
}