text:
@class NSFont;
#else
class NSFont;
#endif

// Container to allow serializing an NSFont over IPC.
struct CONTENT_EXPORT FontDescriptor {
  explicit FontDescriptor(NSFont* font);
  FontDescriptor(base::string16 name, float size);

  FontDescriptor() : font_point_size(0) {}

  // Return an autoreleased NSFont corresponding to the font description.
  NSFont* ToNSFont() const;

  // Name of the font.
  base::string16 font_name;

  // Size in points.
  float font_point_size;
};

#endif  // CONTENT_COMMON_MAC_FONT_DESCRIPTOR_H_

redpajama_set_name: RedPajamaGithub


text:
using UnityEngine;
using System.Collections;
using System;
using System.Runtime.InteropServices;

public class BorderlessWindow : MonoBehaviour {

	public int _window_x = 0;
	public int _window_y = 0;
	public int _window_w = 640;
	public int _window_h = 480;
	public bool _enable = false;

	long _defaultStyle;

	[DllImport("user32.dll")]
	static extern long GetWindowLong (IntPtr hwnd, int nIndex);

	[DllImport("user32.dll")]
	static extern IntPtr SetWindowLong (IntPtr hwnd, int nIndex, long dwNewLong);

	[DllImport("user32.dll")]
	static extern bool SetWindowPos (IntPtr hWnd, int hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);

	[DllImport("user32.dll")]
	static extern IntPtr GetForegroundWindow ();

	const uint SWP_SHOWWINDOW = 0x0040;
	const int GWL_STYLE = -16;

	void Start () {
		if (Application.platform != RuntimePlatform.WindowsPlayer) {
			_enable = false;
		}
		_defaultStyle = GetWindowLong (GetForegroundWindow (), GWL_STYLE);

		if (_enable) {
			EnableBorderlessWindow ();
		}
	}

	void Update () {
		if (Input.GetKeyDown (KeyCode.Space)) {
			ToggleBorderlessWindow();
		}
	}

	public void ToggleBorderlessWindow() {
		if (_enable) {
			DisableBorderlessWindow ();
		} else {
			EnableBorderlessWindow ();
		}
	}

	public void EnableBorderlessWindow() {
		if (Application.platform == RuntimePlatform.WindowsPlayer) {
			SetWindowLong (GetForegroundWindow(), GWL_STYLE, 8); // 8 -> WS_EX_TOPMOST
			SetWindowPos (GetForegroundWindow (), 0, _window_x, _window_y, _window_w, _window_h, SWP_SHOWWINDOW);
			_enable = true;
		}
	}

	public void DisableBorderlessWindow() {
		if (Application.platform == RuntimePlatform.WindowsPlayer) {
			SetWindowLong (GetForegroundWindow(), GWL_STYLE, _defaultStyle);
			SetWindowPos (GetForegroundWindow (), 0, _window_x, _window_y + 20, _window_w, _window_h, SWP_SHOWWINDOW);
			_enable = false;
		}
	}
}


text:
* `mix` build tool allows splitting codebase into multiple apps

* to create an umbrella project, need to call as `mix new many_things --umbrella` with `--umbrella` flag

> above creates 2 important directories `./apps/` (for child projects) and `./config/` (for umbrella config)

### Child Projects

* can create normal applications into `many_things/apps/` with `mix new thing_1`, `mix new thing_2`

* now in umbrella project root all typical mix commands like compile can be run for all

* individual tasks can still be run in specific app directories

### IEx

* `iex -S mix` in umbrella dir let's you interact with all projects

---


text:
using System;
using Akka;
using Akka.Persistence;
using Akkme.Shared.Infrastructure.Utils;

namespace Akkme.Shared.Infrastructure.Domain
{
    /// <summary>
    /// Base class used by all aggregate root types of actors.
    /// </summary>
    /// <typeparam name="TState"></typeparam>
    public abstract class AggregateRoot<TState> : ReceivePersistentActor
    {
        protected static readonly AkkmeSettings Settings = AkkmeSettings.Create(Context.System);
        protected Akkme Plugin { get; } = Akkme.Get(Context.System);
        protected TState State { get; set; }

        private int _eventCount = 0;

        protected AggregateRoot()
        {
            var path = Self.Path;
            PersistenceId = path.Parent.Name + "/" + path.Name;

            Recover<SnapshotOffer>(offer =>
            {
                if (offer.Snapshot is TState)
                    State = (TState) offer.Snapshot;
            });
            Recover((Action<IDomainEvent>)UpdateState);
        }

        public sealed override string PersistenceId { get; }

        public abstract void UpdateState(IDomainEvent domainEvent);

        protected void Emit<TEvent>(TEvent domainEvent, Action<TEvent> handler = null) where TEvent : IDomainEvent
        {
            Persist(domainEvent, e =>
            {
                UpdateState(e);
                SaveSnapshotIfNecessary();
                handler?.Invoke(e);
            });
        }

        private void SaveSnapshotIfNecessary()
        {
            _eventCount = (_eventCount + 1) % Settings.SnapshotAfter;
            if (_eventCount == 0)
            {
                SaveSnapshot(State);
            }
        }
    }
}


text:
import React from 'react';
import { connect } from 'react-redux';
import { selectLogId } from '../Actions/logIdsActions';
import { showOverlay, hideOverlay } from '../Actions/glabal';
import GameSelect from './GameSelect';
import QuestionSelect from './QuestionSelect';
import { fetchVariables } from '../Actions/gamesActions';
import Graph from './Graph';

// @connect(state => ({
//     games: state.games
// }))
class Stats extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            currentQuestion: null,
            groups: [],
        };
    }
    componentWillMount() {
        this.props.dispatch(selectLogId(this.props.routeParams.LogId));
    }
    componentWillReceiveProps(nextProps) {
        if (this.props.routeParams.LogId !== nextProps.routeParams.LogId) {
            this.props.dispatch(selectLogId(nextProps.routeParams.LogId));
        }
    }
    onRefSelect(data) {
        this.props.dispatch(fetchVariables(data));
    }
    onQuestionSelect(question) {
        this.setState({
            currentQuestion: question,
        });
    }

    onGamesChange(curr) {
        //    curr = curr.filter(g => g && g[0] ? g : false);
        this.setState({
            groups: curr,
        });
    }
    genAll() {
        this.props.dispatch(showOverlay());
        this.refs.graph.genAll().catch(err => {
            alert(err);
        }).then(() => {
            this.props.dispatch(hideOverlay());
        });
    }
    render() {
        const { groups, currentQuestion } = this.state;
        return (

{ this.props.routeParams.LogId }

              <GameSelect games={ this.props.games }
                          onChange={ this.onGamesChange.bind(this) }
                          onRefSelect={ this.onRefSelect.bind(this) } />
              <QuestionSelect onQuestionSelect={ this.onQuestionSelect.bind(this) }
                              snapshot={ this.props.snapshot }
                              value={ this.state.currentQuestion } />
              <button onClick={ this.genAll.bind(this) }>
                Generate all
              </button>
              <Graph groups={ groups }
                     logId={ this.props.routeParams.LogId }
                     question={ currentQuestion }
                     ref="graph"
                     snapshot={ this.props.snapshot } />

            );
    }
}
export default connect(state => ({
        games: state.games.available,
        snapshot: state.variables.snapshot,
}))(Stats);


text:
id: 5900f40a1000cf542c50ff1d
challengeType: 5
title: 'Problem 158: Exploring strings for which only one character comes lexicographically after its neighbour to the left'
videoUrl: ''
localeTitle: ''
---

## Description
undefined

## Instructions
undefined

## Tests

```yml
tests:
  - text: ''
    testString: 'assert.strictEqual(euler158(), 409511334375, "<code>euler158()</code> should return 409511334375.");'

```

## Challenge Seed

```js
function euler158() {
  // Good luck!
  return true;
}

euler158();

```

## Solution

```js
// solution required
```