text:
#region Copyright
// <copyright file="Program.cs" company="OpenEngSB">
// Licensed to the Austrian Association for Software Tool Integration (AASTI)
// under one or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information regarding copyright
// ownership. The AASTI licenses this file 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.
// </copyright>
#endregion
using System;
using log4net;
using RuntimeTests.RuntimeTests;

namespace RuntimeTests
{
    public class Program
    {
        private static ILog logger = LogManager.GetLogger(typeof(Program));

        public static void Main(string[] args)
        {
            log4net.Config.BasicConfigurator.Configure();
            OSBRunTimeTestParent.OpenOSB();
            try
            {
                TestRuntimeJmsPort jms = new TestRuntimeJmsPort();
                TestRuntimeNetBridge net = new TestRuntimeNetBridge();
                TestRuntimeNetBridgeUserNameAndPassword bridge1 = new TestRuntimeNetBridgeUserNameAndPassword();
                TestRuntimeNetBridgeWrongUsernameAndPassword bridge2 = new TestRuntimeNetBridgeWrongUsernameAndPassword();
                TestRuntimeXLinkConnection xlink = new TestRuntimeXLinkConnection();

                jms.Init();
                net.Init();
                bridge1.Init();
                bridge2.Init();
                xlink.Init();

                try
                {
                    jms.TestACustomCreatedExceptionHandlerWhichReturnsAValueAsResultThatGetsInvokedWithIcomingPort();
                    jms.TestACustomCreatedExceptionHandlerWhichReturnsAValueAsResultThatGetsInvokedWithOutgoingPort();
                    jms.TestJmsOutgoingPortWithQueueNameExceptionHandler();
                    jms.TestJmsPortWithWrongUrlParameter();
                    jms.CleanUp();
                    logger.Info("Jms tests completed correctly");
                }
                catch (Exception ex)
                {
                    logger.Error("Error", ex);
                }

                try
                {
                    net.TestConnectToXlinkWithAConnectorThatIsNotregisteredConnectorAndAnalyseTheException();
                    net.TestConnectToXlinkWithNoncreatedAndNonregisteredConnectorAndCheckTheCorrectException();
                    net.TestCreateDeleteConnectorAndNoRegistrationWorksCorrectly();
                    net.TestCreateDeleteConnectorWithoutRegistrationWithUsernameAndPasswordWorksCorrectly();
                    net.TestCreateMoreConnectorAndStopAllWorksCorrectly();
                    net.TestCreateRegisterCloseRegisterWorksCorrectly();
                    net.TestCreateRegisterConnectorAndGetEventHandlerWithInvalitConnectorId();
                    net.TestCreateRegisterConnectXlinkDisconnectXlinkUnregisterDeleteConnectorOnADomainThatDoesNotSupportXlink();
                    net.TestCreateRegisterUnregisterDeleteConnectorWorksCorrectly();
                    net.TestCreateRegisterUnregisterDeleteWithoutCreateMethodConnectorWorksCorrectly();
                    net.CleanUp();
                    logger.Info(".Net Bridge tests completed correctly");
                }
                catch (Exception ex)
                {
                    logger.Error("Error", ex);
                }

                try
                {
                    bridge1.TestCreateDeleteConnectorAndNoRegistrationWorksCorrectlyWithUsernameAndPassword();
                    bridge1.TestCreateDeleteConnectorWithoutRegistrationWithUsernameAndPasswordWorksCorrectlyUsernameAndPassword();
                    bridge1.TestCreateRegisterEventHandlerUnregisterDeleteWorksCorrectlyWithUsernameAndPassword();
                    bridge1.TestCreateRegisterUnregisterDeleteConnectorWorksCorrectlyWithUsernameAndPassword();
                    bridge1.TestCreateRegisterUnregisterDeleteWithoutCreateMethodConnectorWorksCorrectlyWithUsernameAndPassword();
                    bridge1.CleanUp();
                    logger.Info(".Net Bridge tests completed correctly");
                }
                catch (Exception ex)
                {
                    logger.Error("Error", ex);
                }

                try
                {
                    bridge2.TestCreateConnectorWithWrongUsernameAndPassword();
                    bridge2.TestRegisterConnectorWithoutCreateAndWithWrongUsernameAndPassword();
                    bridge2.CleanUp();
                    logger.Info(".Net Bridge tests completed correctly");
                }
                catch (Exception ex)
                {
                    logger.Error("Error", ex);
                }

                try
                {
                    xlink.TestCreateRegisterConnecttoxlinkDisconnectfromXlinkUnregisterDeleteWithoutCreateMethodConnectorWorksCorrectly();
                    xlink.CleanUp();
                    logger.Info("Xlink tests completed correctly");
                }
                catch (Exception ex)
                {
                    logger.Error("Error", ex);
                }
            }
            finally
            {
                OSBRunTimeTestParent.CloseOSB();
            }
        }
    }
}


text:
using log4net;
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using Nini.Config;
using OpenSim.Framework;
using OpenSim.Framework.Console;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Services.Interfaces;
using OpenMetaverse;

namespace OpenSim.Services.Connectors
{
    public class AssetServicesConnector : IAssetService
    {
        private static readonly ILog m_log =
                LogManager.GetLogger(
                MethodBase.GetCurrentMethod().DeclaringType);

        private string m_ServerURI = String.Empty;
        private IImprovedAssetCache m_Cache = null;

        public AssetServicesConnector()
        {
        }

        public AssetServicesConnector(string serverURI)
        {
            m_ServerURI = serverURI.TrimEnd('/');
        }

        public AssetServicesConnector(IConfigSource source)
        {
            Initialise(source);
        }

        public virtual void Initialise(IConfigSource source)
        {
            IConfig assetConfig = source.Configs["AssetService"];
            if (assetConfig == null)
            {
                m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpanSim.ini");
                throw new Exception("Asset connector init error");
            }

            string serviceURI = assetConfig.GetString("AssetServerURI",
                    String.Empty);

            if (serviceURI == String.Empty)
            {
                m_log.Error("[ASSET CONNECTOR]: No Server URI named in section AssetService");
                throw new Exception("Asset connector init error");
            }
            m_ServerURI = serviceURI;

            MainConsole.Instance.Commands.AddCommand("asset", false, "dump asset",
                                          "dump asset <id> <file>",
                                          "dump one cached asset", HandleDumpAsset);
        }

        protected void SetCache(IImprovedAssetCache cache)
        {
            m_Cache = cache;
        }

        public AssetBase Get(string id)
        {
            string uri = m_ServerURI + "/assets/" + id;

            AssetBase asset = null;
            if (m_Cache != null)
                asset = m_Cache.Get(id);

            if (asset == null)
            {
                asset = SynchronousRestObjectRequester.
                        MakeRequest<int, AssetBase>("GET", uri, 0);

                if (m_Cache != null)
                    m_Cache.Cache(asset);
            }
            return asset;
        }

        public AssetMetadata GetMetadata(string id)
        {
            if (m_Cache != null)
            {
                AssetBase fullAsset = m_Cache.Get(id);

                if (fullAsset != null)
                    return fullAsset.Metadata;
            }

            string uri = m_ServerURI + "/assets/" + id + "/metadata";

            AssetMetadata asset = SynchronousRestObjectRequester.
                    MakeRequest<int, AssetMetadata>("GET", uri, 0);
            return asset;
        }

        public byte[] GetData(string id)
        {
            if (m_Cache != null)
            {
                AssetBase fullAsset = m_Cache.Get(id);

                if (fullAsset != null)
                    return fullAsset.Data;
            }

            RestClient rc = new RestClient(m_ServerURI);
            rc.AddResourcePath("assets");
            rc.AddResourcePath(id);
            rc.AddResourcePath("data");

            rc.RequestMethod = "GET";

            Stream s = rc.Request();

            if (s == null)
                return null;

            if (s.Length > 0)
            {
                byte[] ret = new byte[s.Length];
                s.Read(ret, 0, (int)s.Length);

                return ret;
            }

            return null;
        }

        public bool Get(string id, Object sender, AssetRetrieved handler)
        {
            string uri = m_ServerURI + "/assets/" + id;

            AssetBase asset = null;
            if (m_Cache != null)
                asset = m_Cache.Get(id);

            if (asset == null)
            {
                bool result = false;

                AsynchronousRestObjectRequester.
                        MakeRequest<int, AssetBase>("GET", uri, 0,
                        delegate(AssetBase a)
                        {
                            if (m_Cache != null)
                                m_Cache.Cache(a);
                            handler(id, sender, a);
                            result = true;
                        });

                return result;
            }
            else
            {
                //Util.FireAndForget(delegate { handler(id, sender, asset); });
                handler(id, sender, asset);
            }

            return true;
        }

        public string Store(AssetBase asset)
        {
            if (asset.Temporary || asset.Local)
            {
                if (m_Cache != null)
                    m_Cache.Cache(asset);

                return asset.ID;
            }

            string uri = m_ServerURI + "/assets/";

            string newID = string.Empty;
            try
            {
                newID = SynchronousRestObjectRequester.
                        MakeRequest<AssetBase, string>("POST", uri, asset);
            }
            catch (Exception e)
            {
                m_log.WarnFormat("[ASSET CONNECTOR]: Unable to send asset {0} to asset server. Reason: {1}", asset.ID, e.Message);
            }

            if (newID != String.Empty)
            {
                // Placing this here, so that this work with old asset servers that don't send any reply back
                // SynchronousRestObjectRequester returns somethins that is not an empty string
                if (newID != null)
                    asset.ID = newID;

                if (m_Cache != null)
                    m_Cache.Cache(asset);
            }
            return newID;
        }

        public bool UpdateContent(string id, byte[] data)
        {
            AssetBase asset = null;

            if (m_Cache != null)
                asset = m_Cache.Get(id);

            if (asset == null)
            {
                AssetMetadata metadata = GetMetadata(id);
                if (metadata == null)
                    return false;

                asset = new AssetBase();
                asset.Metadata = metadata;
            }
            asset.Data = data;

            string uri = m_ServerURI + "/assets/" + id;

            if (SynchronousRestObjectRequester.
                    MakeRequest<AssetBase, bool>("POST", uri, asset))
            {
                if (m_Cache != null)
                    m_Cache.Cache(asset);

                return true;
            }
            return false;
        }

        public bool Delete(string id)
        {
            string uri = m_ServerURI + "/assets/" + id;

            if (SynchronousRestObjectRequester.
                    MakeRequest<int, bool>("DELETE", uri, 0))
            {
                if (m_Cache != null)
                    m_Cache.Expire(id);

                return true;
            }
            return false;
        }

        private void HandleDumpAsset(string module, string[] args)
        {
            if (args.Length != 4)
            {
                MainConsole.Instance.Output("Syntax: dump asset <id> <file>");
                return;
            }

            UUID assetID;

            if (!UUID.TryParse(args[2], out assetID))
            {
                MainConsole.Instance.Output("Invalid asset ID");
                return;
            }

            if (m_Cache == null)
            {
                MainConsole.Instance.Output("Instance uses no cache");
                return;
            }

            AssetBase asset = m_Cache.Get(assetID.ToString());

            if (asset == null)
            {
                MainConsole.Instance.Output("Asset not found in cache");
                return;
            }

            string fileName = args[3];

            FileStream fs = File.Create(fileName);
            fs.Write(asset.Data, 0, asset.Data.Length);

            fs.Close();
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package scraper.api.domain;

import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.data.rest.core.annotation.RestResource;

import java.util.List;

@RepositoryRestResource
public interface BookmarkRepository extends CrudRepository<Bookmark, Long>
{
    @RestResource(path="url")
    List<Bookmark> findByUrl(@Param("text") String url);
}


text:
namespace blink {
class WebMouseEvent;
}

namespace content {
class RenderView;
struct WebPreferences;
}

namespace gfx {
class Size;
}

// This class implements the WebPlugin interface by forwarding drawing and
// handling input events to a WebView.
// It can be used as a placeholder for an actual plugin, using HTML for the UI.
// To show HTML data inside the WebViewPlugin,
// call web_view->mainFrame()->loadHTMLString() with the HTML data and a fake
// chrome:// URL as origin.

class WebViewPlugin : public blink::WebPlugin,
                      public blink::WebViewClient,
                      public blink::WebFrameClient {
 public:
  class Delegate {
   public:
    // Called to get the V8 handle used to bind the lifetime to the frame.
    virtual v8::Local<v8::Value> GetV8Handle(v8::Isolate*) = 0;

    // Called upon a context menu event.
    virtual void ShowContextMenu(const blink::WebMouseEvent&) = 0;

    // Called when the WebViewPlugin is destroyed.
    virtual void PluginDestroyed() = 0;

    // Called to enable JavaScript pass-through to a throttled plugin, which is
    // loaded but idle. Doesn't work for blocked plugins, which is not loaded.
    virtual v8::Local<v8::Object> GetV8ScriptableObject(v8::Isolate*) const = 0;

    // Called when the unobscured size of the plugin is updated.
    virtual void OnUnobscuredSizeUpdate(const gfx::Size& unobscured_size) {}
  };

  // Convenience method to set up a new WebViewPlugin using |preferences|
  // and displaying |html_data|. |url| should be a (fake) data:text/html URL;
  // it is only used for navigation and never actually resolved.
  static WebViewPlugin* Create(Delegate* delegate,
                               const content::WebPreferences& preferences,
                               const std::string& html_data,
                               const GURL& url);

  blink::WebView* web_view() { return web_view_; }

  // When loading a plugin document (i.e. a full page plugin not embedded in
  // another page), we save all data that has been received, and replay it with
  // this method on the actual plugin.
  void ReplayReceivedData(blink::WebPlugin* plugin);

  void RestoreTitleText();

  // WebPlugin methods:
  virtual blink::WebPluginContainer* container() const;
  virtual bool initialize(blink::WebPluginContainer*);
  virtual void destroy();

  virtual v8::Local<v8::Object> v8ScriptableObject(v8::Isolate* isolate);

  virtual void layoutIfNeeded() override;
  virtual void paint(blink::WebCanvas* canvas,
                     const blink::WebRect& rect) override;

  // Coordinates are relative to the containing window.
  virtual void updateGeometry(
      const blink::WebRect& window_rect,
      const blink::WebRect& clip_rect,
      const blink::WebRect& unobscured_rect,
      const blink::WebVector<blink::WebRect>& cut_outs_rects,
      bool is_visible);

  virtual void updateFocus(bool foucsed, blink::WebFocusType focus_type);
  virtual void updateVisibility(bool) {}

  virtual bool acceptsInputEvents();
  virtual bool handleInputEvent(const blink::WebInputEvent& event,
                                blink::WebCursorInfo& cursor_info);

  virtual void didReceiveResponse(const blink::WebURLResponse& response);
  virtual void didReceiveData(const char* data, int data_length);
  virtual void didFinishLoading();
  virtual void didFailLoading(const blink::WebURLError& error);

  // Called in response to WebPluginContainer::loadFrameRequest
  virtual void didFinishLoadingFrameRequest(const blink::WebURL& url,
                                            void* notifyData) {}
  virtual void didFailLoadingFrameRequest(const blink::WebURL& url,
                                          void* notify_data,
                                          const blink::WebURLError& error) {}

  // WebViewClient methods:
  virtual bool acceptsLoadDrops();

  virtual void setToolTipText(const blink::WebString&,
                              blink::WebTextDirection);

  virtual void startDragging(blink::WebLocalFrame* frame,
                             const blink::WebDragData& drag_data,
                             blink::WebDragOperationsMask mask,
                             const blink::WebImage& image,
                             const blink::WebPoint& point);

  // TODO(ojan): Remove this override and have this class use a non-null
  // layerTreeView.
  virtual bool allowsBrokenNullLayerTreeView() const;

  // WebWidgetClient methods:
  virtual void didInvalidateRect(const blink::WebRect&);
  virtual void didChangeCursor(const blink::WebCursorInfo& cursor);
  virtual void scheduleAnimation();

  // WebFrameClient methods:
  virtual void didClearWindowObject(blink::WebLocalFrame* frame);

  // This method is defined in WebPlugin as well as in WebFrameClient, but with
  // different parameters. We only care about implementing the WebPlugin
  // version, so we implement this method and call the default in WebFrameClient
  // (which does nothing) to correctly overload it.
  virtual void didReceiveResponse(blink::WebLocalFrame* frame,
                                  unsigned identifier,
                                  const blink::WebURLResponse& response);

 private:
  friend class base::DeleteHelper<WebViewPlugin>;
  WebViewPlugin(Delegate* delegate, const content::WebPreferences& preferences);
  virtual ~WebViewPlugin();

  // Manages its own lifetime.
  Delegate* delegate_;

  blink::WebCursorInfo current_cursor_;

  // Owns us.
  blink::WebPluginContainer* container_;

  // Owned by us, deleted via |close()|.
  blink::WebView* web_view_;

  // Owned by us, deleted via |close()|.
  blink::WebFrame* web_frame_;
  gfx::Rect rect_;

  blink::WebURLResponse response_;
  std::list<std::string> data_;
  bool finished_loading_;
  scoped_ptr<blink::WebURLError> error_;
  blink::WebString old_title_;
  bool focused_;
};

#endif  // COMPONENTS_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.anderes.edu</groupId>
    <artifactId>maven.modules</artifactId>
    <version>1.0.0-SNAPSHOT</version>
  </parent>

  <groupId>org.anderes.edu.maven.modules</groupId>
  <artifactId>domain</artifactId>

  <dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <scope>test</scope>
      </dependency>
  </dependencies>

</project>


text:
tinyMCE.addI18n('cs.codemagic',{
    code_title: "CodeMagic - zvýraznení syntaxe a formátování kódu",
    code_label: "Editovat kód",
    toggle_highlighting: "Zvýraznení kódu",
    toggle_autocompletion: "Doplňování kódu",
    search: "Hledat",
    replace: "Nahradit",
    undo: "Zpět",
    redo: "Opakovat",
    search_replace: "Hledat a nahradit",
    reintendt: "Zformátovat kód",
    nothing_found: "Hledaný výraz nebyl nalezen.",
    nothing_to_replace: "Není co nahradit."
});