text:
namespace blink {

class SpellCheckerTest : public SpellCheckTestBase {
 protected:
  unsigned LayoutCount() const {
    return Page().GetFrameView().LayoutCountForTesting();
  }
  DummyPageHolder& Page() const { return GetDummyPageHolder(); }

  void ForceLayout();
};

void SpellCheckerTest::ForceLayout() {
  LocalFrameView& frame_view = Page().GetFrameView();
  gfx::Rect frame_rect = frame_view.FrameRect();
  frame_rect.set_width(frame_rect.width() + 1);
  frame_rect.set_height(frame_rect.height() + 1);
  Page().GetFrameView().SetFrameRect(frame_rect);
  GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kTest);
}

TEST_F(SpellCheckerTest, AdvanceToNextMisspellingWithEmptyInputNoCrash) {
  SetBodyContent("<input placeholder='placeholder'>abc");
  UpdateAllLifecyclePhasesForTest();
  Element* input = GetDocument().QuerySelector("input");
  input->Focus();
  // Do not crash in advanceToNextMisspelling.
  GetSpellChecker().AdvanceToNextMisspelling(false);
}

// Regression test for crbug.com/701309
TEST_F(SpellCheckerTest, AdvanceToNextMisspellingWithImageInTableNoCrash) {
  SetBodyContent(
      "
"
      "

"
      ""
      "

"
      "zz zz zz"
      "
");
  GetDocument().QuerySelector("div")->Focus();
  UpdateAllLifecyclePhasesForTest();

  // Do not crash in advanceToNextMisspelling.
  GetSpellChecker().AdvanceToNextMisspelling(false);
}

// Regression test for crbug.com/728801
TEST_F(SpellCheckerTest, AdvancedToNextMisspellingWrapSearchNoCrash) {
  SetBodyContent("
  zz zz zz
");

  Element* div = GetDocument().QuerySelector("div");
  div->Focus();
  Selection().SetSelectionAndEndTyping(
      SelectionInDOMTree::Builder()
          .Collapse(Position::LastPositionInNode(*div))
          .Build());
  UpdateAllLifecyclePhasesForTest();

  GetSpellChecker().AdvanceToNextMisspelling(false);
}

TEST_F(SpellCheckerTest, SpellCheckDoesNotCauseUpdateLayout) {
  SetBodyContent("<input>");
  auto* input = To<HTMLInputElement>(GetDocument().QuerySelector("input"));
  input->Focus();
  input->SetValue("Hello, input field");
  GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kTest);

  Position new_position(input->InnerEditorElement()->firstChild(), 3);
  GetDocument().GetFrame()->Selection().SetSelectionAndEndTyping(
      SelectionInDOMTree::Builder().Collapse(new_position).Build());
  ASSERT_EQ(3u, input->selectionStart());

  EXPECT_TRUE(GetSpellChecker().IsSpellCheckingEnabled());
  ForceLayout();
  unsigned start_count = LayoutCount();
  GetSpellChecker().RespondToChangedSelection();
  EXPECT_EQ(start_count, LayoutCount());
}

TEST_F(SpellCheckerTest, MarkAndReplaceForHandlesMultipleReplacements) {
  SetBodyContent(
      "
"
      "spllchck"
      "
");
  Element* div = GetDocument().QuerySelector("div");
  Node* text = div->firstChild();
  EphemeralRange range_to_check =
      EphemeralRange(Position(text, 0), Position(text, 8));

  SpellCheckRequest* request = SpellCheckRequest::Create(range_to_check, 0);

  TextCheckingResult result;
  result.decoration = TextDecorationType::kTextDecorationTypeSpelling;
  result.location = 0;
  result.length = 8;
  result.replacements = Vector<String>({"spellcheck", "spillchuck"});

  GetDocument().GetFrame()->GetSpellChecker().MarkAndReplaceFor(
      request, Vector<TextCheckingResult>({result}));

  ASSERT_EQ(1u, GetDocument().Markers().Markers().size());

  // The Spelling marker's description should be a newline-separated list of the
  // suggested replacements
  EXPECT_EQ("spellcheck\nspillchuck",
            To<SpellCheckMarker>(GetDocument().Markers().Markers()[0].Get())
                ->Description());
}

TEST_F(SpellCheckerTest, GetSpellCheckMarkerUnderSelection_FirstCharSelected) {
  SetBodyContent(
      "
"
      "spllchck"
      "
");
  Element* div = GetDocument().QuerySelector("div");
  Node* text = div->firstChild();

  GetDocument().Markers().AddSpellingMarker(
      EphemeralRange(Position(text, 0), Position(text, 8)));

  GetDocument().GetFrame()->Selection().SetSelectionAndEndTyping(
      SelectionInDOMTree::Builder()
          .SetBaseAndExtent(Position(text, 0), Position(text, 1))
          .Build());

  DocumentMarkerGroup* result = GetDocument()
                                    .GetFrame()
                                    ->GetSpellChecker()
                                    .GetSpellCheckMarkerGroupUnderSelection();
  ASSERT_NE(nullptr, result);
  const DocumentMarker* marker = result->GetMarkerForText(To<Text>(text));
  ASSERT_NE(nullptr, marker);
  EXPECT_EQ(0u, marker->StartOffset());
  EXPECT_EQ(8u, marker->EndOffset());
}

TEST_F(SpellCheckerTest, GetSpellCheckMarkerUnderSelection_LastCharSelected) {
  SetBodyContent(
      "
"
      "spllchck"
      "
");
  Element* div = GetDocument().QuerySelector("div");
  Node* text = div->firstChild();

  GetDocument().Markers().AddSpellingMarker(
      EphemeralRange(Position(text, 0), Position(text, 8)));

  GetDocument().GetFrame()->Selection().SetSelectionAndEndTyping(
      SelectionInDOMTree::Builder()
          .SetBaseAndExtent(Position(text, 7), Position(text, 8))
          .Build());

  DocumentMarkerGroup* result = GetDocument()
                                    .GetFrame()
                                    ->GetSpellChecker()
                                    .GetSpellCheckMarkerGroupUnderSelection();
  ASSERT_NE(nullptr, result);
  const DocumentMarker* marker = result->GetMarkerForText(To<Text>(text));
  ASSERT_NE(nullptr, marker);
  EXPECT_EQ(0u, marker->StartOffset());
  EXPECT_EQ(8u, marker->EndOffset());
}

TEST_F(SpellCheckerTest,
       GetSpellCheckMarkerUnderSelection_SingleCharWordSelected) {
  SetBodyContent(
      "
"
      "s"
      "
");
  Element* div = GetDocument().QuerySelector("div");
  Node* text = div->firstChild();

  GetDocument().Markers().AddSpellingMarker(
      EphemeralRange(Position(text, 0), Position(text, 1)));

  GetDocument().GetFrame()->Selection().SetSelectionAndEndTyping(
      SelectionInDOMTree::Builder()
          .SetBaseAndExtent(Position(text, 0), Position(text, 1))
          .Build());

  DocumentMarkerGroup* result = GetDocument()
                                    .GetFrame()
                                    ->GetSpellChecker()
                                    .GetSpellCheckMarkerGroupUnderSelection();
  ASSERT_NE(nullptr, result);
  const DocumentMarker* marker = result->GetMarkerForText(To<Text>(text));
  ASSERT_NE(nullptr, marker);
  EXPECT_EQ(0u, marker->StartOffset());
  EXPECT_EQ(1u, marker->EndOffset());
}

TEST_F(SpellCheckerTest,
       GetSpellCheckMarkerUnderSelection_CaretLeftOfSingleCharWord) {
  SetBodyContent(
      "
"
      "s"
      "
");
  Element* div = GetDocument().QuerySelector("div");
  Node* text = div->firstChild();

  GetDocument().Markers().AddSpellingMarker(
      EphemeralRange(Position(text, 0), Position(text, 1)));

  GetDocument().GetFrame()->Selection().SetSelectionAndEndTyping(
      SelectionInDOMTree::Builder()
          .SetBaseAndExtent(Position(text, 0), Position(text, 0))
          .Build());

  DocumentMarkerGroup* result = GetDocument()
                                    .GetFrame()
                                    ->GetSpellChecker()
                                    .GetSpellCheckMarkerGroupUnderSelection();
  ASSERT_NE(nullptr, result);
  const DocumentMarker* marker = result->GetMarkerForText(To<Text>(text));
  ASSERT_NE(nullptr, marker);
  EXPECT_EQ(0u, marker->StartOffset());
  EXPECT_EQ(1u, marker->EndOffset());
}

TEST_F(SpellCheckerTest,
       GetSpellCheckMarkerUnderSelection_CaretRightOfSingleCharWord) {
  SetBodyContent(
      "
"
      "s"
      "
");
  Element* div = GetDocument().QuerySelector("div");
  Node* text = div->firstChild();

  GetDocument().Markers().AddSpellingMarker(
      EphemeralRange(Position(text, 0), Position(text, 1)));

  GetDocument().GetFrame()->Selection().SetSelectionAndEndTyping(
      SelectionInDOMTree::Builder()
          .SetBaseAndExtent(Position(text, 1), Position(text, 1))
          .Build());

  DocumentMarkerGroup* result = GetDocument()
                                    .GetFrame()
                                    ->GetSpellChecker()
                                    .GetSpellCheckMarkerGroupUnderSelection();
  ASSERT_NE(nullptr, result);
  const DocumentMarker* marker = result->GetMarkerForText(To<Text>(text));
  ASSERT_NE(nullptr, marker);
  EXPECT_EQ(0u, marker->StartOffset());
  EXPECT_EQ(1u, marker->EndOffset());
}

TEST_F(SpellCheckerTest,
       GetSpellCheckMarkerUnderSelection_CaretLeftOfMultiCharWord) {
  SetBodyContent(
      "
"
      "spllchck"
      "
");
  Element* div = GetDocument().QuerySelector("div");
  Node* text = div->firstChild();

  GetDocument().Markers().AddSpellingMarker(
      EphemeralRange(Position(text, 0), Position(text, 8)));

  GetDocument().GetFrame()->Selection().SetSelectionAndEndTyping(
      SelectionInDOMTree::Builder()
          .SetBaseAndExtent(Position(text, 0), Position(text, 0))
          .Build());

  DocumentMarkerGroup* result = GetDocument()
                                    .GetFrame()
                                    ->GetSpellChecker()
                                    .GetSpellCheckMarkerGroupUnderSelection();
  ASSERT_NE(nullptr, result);
  const DocumentMarker* marker = result->GetMarkerForText(To<Text>(text));
  ASSERT_NE(nullptr, marker);
  EXPECT_EQ(0u, marker->StartOffset());
  EXPECT_EQ(8u, marker->EndOffset());
}

TEST_F(SpellCheckerTest,
       GetSpellCheckMarkerUnderSelection_CaretRightOfMultiCharWord) {
  SetBodyContent(
      "
"
      "spllchck"
      "
");
  Element* div = GetDocument().QuerySelector("div");
  Node* text = div->firstChild();

  GetDocument().Markers().AddSpellingMarker(
      EphemeralRange(Position(text, 0), Position(text, 8)));

  GetDocument().GetFrame()->Selection().SetSelectionAndEndTyping(
      SelectionInDOMTree::Builder()
          .SetBaseAndExtent(Position(text, 8), Position(text, 8))
          .Build());

  DocumentMarkerGroup* result = GetDocument()
                                    .GetFrame()
                                    ->GetSpellChecker()
                                    .GetSpellCheckMarkerGroupUnderSelection();
  ASSERT_NE(nullptr, result);
  const DocumentMarker* marker = result->GetMarkerForText(To<Text>(text));
  ASSERT_NE(nullptr, marker);
  EXPECT_EQ(0u, marker->StartOffset());
  EXPECT_EQ(8u, marker->EndOffset());
}

TEST_F(SpellCheckerTest, GetSpellCheckMarkerUnderSelection_CaretMiddleOfWord) {
  SetBodyContent(
      "
"
      "spllchck"
      "
");
  Element* div = GetDocument().QuerySelector("div");
  Node* text = div->firstChild();

  GetDocument().Markers().AddSpellingMarker(
      EphemeralRange(Position(text, 0), Position(text, 8)));

  GetDocument().GetFrame()->Selection().SetSelectionAndEndTyping(
      SelectionInDOMTree::Builder()
          .SetBaseAndExtent(Position(text, 4), Position(text, 4))
          .Build());

  DocumentMarkerGroup* result = GetDocument()
                                    .GetFrame()
                                    ->GetSpellChecker()
                                    .GetSpellCheckMarkerGroupUnderSelection();
  ASSERT_NE(nullptr, result);
  const DocumentMarker* marker = result->GetMarkerForText(To<Text>(text));
  ASSERT_NE(nullptr, marker);
  EXPECT_EQ(0u, marker->StartOffset());
  EXPECT_EQ(8u, marker->EndOffset());
}

TEST_F(SpellCheckerTest,
       GetSpellCheckMarkerUnderSelection_CaretOneCharLeftOfMisspelling) {
  SetBodyContent(
      "
"
      "a spllchck"
      "
");
  Element* div = GetDocument().QuerySelector("div");
  Node* text = div->firstChild();

  GetDocument().Markers().AddSpellingMarker(
      EphemeralRange(Position(text, 2), Position(text, 10)));

  GetDocument().GetFrame()->Selection().SetSelectionAndEndTyping(
      SelectionInDOMTree::Builder()
          .SetBaseAndExtent(Position(text, 1), Position(text, 1))
          .Build());

  DocumentMarkerGroup* result = GetDocument()
                                    .GetFrame()
                                    ->GetSpellChecker()
                                    .GetSpellCheckMarkerGroupUnderSelection();
  EXPECT_EQ(nullptr, result);
}

TEST_F(SpellCheckerTest,
       GetSpellCheckMarkerUnderSelection_CaretOneCharRightOfMisspelling) {
  SetBodyContent(
      "
"
      "spllchck a"
      "
");
  Element* div = GetDocument().QuerySelector("div");
  Node* text = div->firstChild();

  GetDocument().Markers().AddSpellingMarker(
      EphemeralRange(Position(text, 0), Position(text, 8)));

  GetDocument().GetFrame()->Selection().SetSelectionAndEndTyping(
      SelectionInDOMTree::Builder()
          .SetBaseAndExtent(Position(text, 9), Position(text, 9))
          .Build());

  DocumentMarkerGroup* result = GetDocument()
                                    .GetFrame()
                                    ->GetSpellChecker()
                                    .GetSpellCheckMarkerGroupUnderSelection();
  EXPECT_EQ(nullptr, result);
}

TEST_F(SpellCheckerTest, GetSpellCheckMarkerUnderSelection_MultiNodeMisspell) {
  SetBodyContent(
      "
"
      "spllchck"
      "
");
  Element* div = GetDocument().QuerySelector("div");
  Node* first_text = div->firstChild();
  Node* second_text = first_text->nextSibling()->firstChild();
  Node* third_text = div->lastChild();

  GetDocument().Markers().AddSpellingMarker(
      EphemeralRange(Position(first_text, 0), Position(third_text, 3)));

  GetDocument().GetFrame()->Selection().SetSelectionAndEndTyping(
      SelectionInDOMTree::Builder()
          .SetBaseAndExtent(Position(second_text, 1), Position(second_text, 1))
          .Build());

  DocumentMarkerGroup* result = GetDocument()
                                    .GetFrame()
                                    ->GetSpellChecker()
                                    .GetSpellCheckMarkerGroupUnderSelection();
  ASSERT_NE(nullptr, result);
  const DocumentMarker* first_marker =
      result->GetMarkerForText(To<Text>(first_text));
  const DocumentMarker* second_marker =
      result->GetMarkerForText(To<Text>(second_text));
  const DocumentMarker* third_marker =
      result->GetMarkerForText(To<Text>(third_text));
  ASSERT_NE(nullptr, first_marker);
  EXPECT_EQ(0u, first_marker->StartOffset());
  EXPECT_EQ(3u, first_marker->EndOffset());
  ASSERT_NE(nullptr, second_marker);
  EXPECT_EQ(0u, second_marker->StartOffset());
  EXPECT_EQ(2u, second_marker->EndOffset());
  ASSERT_NE(nullptr, third_marker);
  EXPECT_EQ(0u, third_marker->StartOffset());
  EXPECT_EQ(3u, third_marker->EndOffset());
}

TEST_F(SpellCheckerTest, PasswordFieldsAreIgnored) {
  // Check that spellchecking is enabled for an input type="text".
  SetBodyContent("<input type=\"text\">");
  auto* input = To<HTMLInputElement>(GetDocument().QuerySelector("input"));
  input->Focus();
  input->SetValue("spllchck");
  GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kTest);
  EXPECT_TRUE(SpellChecker::IsSpellCheckingEnabledAt(
      Position(input->InnerEditorElement()->firstChild(), 0)));

  // But if this turns into a password field, this disables spellchecking.
  // input->setType(input_type_names::kPassword);
  input->setType("password");
  GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kTest);
  EXPECT_FALSE(SpellChecker::IsSpellCheckingEnabledAt(
      Position(input->InnerEditorElement()->firstChild(), 0)));

  // Some websites toggle between <input type="password"> and
  // <input type="text"> via a reveal/hide button. In this case, spell
  // checking should remain disabled.
  input->setType("text");
  GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kTest);
  EXPECT_FALSE(SpellChecker::IsSpellCheckingEnabledAt(
      Position(input->InnerEditorElement()->firstChild(), 0)));
}

}  // namespace blink


text:
#include <stdio.h>

/* Include a .c file.  This is usually considered bad practice in C,
   but this emulate a practice which is common in other languages.
   One such language is Ada and its concept of "separates", for instance.  */
#include "sep-proc.c"

int
main (void)
{
  say_hello ();
  return 0;
}

redpajama_set_name: RedPajamaGithub


text:
/*
    View logic for the header component
 */

Meteor.startup(function() {

  Template.componentHeader.events({
    'click .logout': function(event){
        event.preventDefault();
        Meteor.logout();
        window.location.href = "/";
    },

    'click .signup-link': function(event){
        $('ul.nav-tabs li:last-child').removeClass('active');
        $('ul.nav-tabs li:first-child').addClass('active');
        $('div.tab-content div.tab-pane:last-child').removeClass('active');
        $('div.tab-content div.tab-pane:first-child').addClass('active');
    },

    'click .login-link': function(event){
        $('ul.nav-tabs li:first-child').removeClass('active');
        $('ul.nav-tabs li:last-child').addClass('active');
        $('div.tab-content div.tab-pane:first-child').removeClass('active');
        $('div.tab-content div.tab-pane:last-child').addClass('active');
    }
  });

  Template.componentHeader.helpers({
    loggedIn: function() {
      return Meteor.userId() != null;
    },

    name: function() {
      if ((Meteor.userId() != null) && (Meteor.user() != null) && (Meteor.user().profile != null)) {
        return Meteor.user().profile.name;
      } else {
        return '';
      }
    }

  });
});


text:
<?php
date_default_timezone_set('Europe/Amsterdam');
define('APPLICATION_ENV', 'testing');
$rootPath = dirname(__FILE__).'/..';

require_once $rootPath.'/application/init.php';

$application = new Garp_Application(
	APPLICATION_ENV,
	APPLICATION_PATH.'/configs/application.ini'
);

$application->bootstrap();
Zend_Registry::set('application', $application);

$mem = new Garp_Util_Memory();
$mem->useHighMemory();

error_reporting(-1);
ini_set('display_errors', 'stdout');
ini_set('display_startup_errors', true);


text:
//
//  Copyright (c) 2016 Apple Inc. All rights reserved.
//

#import <XCTest/XCTestDefines.h>

NS_ASSUME_NONNULL_BEGIN

/*!
 * @class XCTestExpectation
 *
 * @discussion
 * Expectations represent specific conditions in asynchronous testing.
 */
@interface XCTestExpectation : NSObject {
#ifndef __OBJC2__
    id _internalImplementation;
#endif
}

/*!
 * @method -initWithDescription:
 * Designated initializer, requires a nonnull description of the condition the expectation is checking.
 */
- (instancetype)initWithDescription:(NSString *)expectationDescription NS_DESIGNATED_INITIALIZER;

/*!
 * @property expectationDescription
 * The human readable string used to describe the expectation in log output and test reports.
 */
@property (copy) NSString *expectationDescription;

/*!
 * @property inverted
 * If an expectation is set to have inverted behavior, then fulfilling it will have a similar effect that
 * failing to fulfill a conventional expectation has, as handled by the waiter and its delegate. Furthermore,
 * waiters that wait on an inverted expectation will allow the full timeout to elapse and not report
 * timeout to the delegate if it is not fulfilled.
 */
@property (getter=isInverted) BOOL inverted;

/*!
 * @property expectedFulfillmentCount
 * The expectedFulfillmentCount is the number of times -fulfill must be called on the expectation in order for it
 * to report complete fulfillment to its waiter. By default, expectations have a fufillmentCount of 1.
 * This value must be greater than 0 and is not meaningful if combined with @inverted.
 */
@property (nonatomic) NSUInteger expectedFulfillmentCount;

/*!
 * If set, calls to fulfill() after the expectation has already been fulfilled - exceeding the fulfillment
 * count - will raise. This is the legacy behavior of expectations created through APIs on XCTestCase
 * but is not enabled for expectations created using XCTestExpectation initializers.
 */
@property (nonatomic) BOOL assertForOverFulfill;

/*!
 * @method -fulfill
 *
 * @discussion
 * Call -fulfill to mark an expectation as having been met. It's an error to call
 * -fulfill on an expectation that has already been fulfilled or when the test case
 * that vended the expectation has already completed.
 */
- (void)fulfill;

@end

NS_ASSUME_NONNULL_END


text:
Tooltips

The tooltips can be positioned on the "tip-bottom", which is the default position, "tip-top", "tip-left", or "tip-right" of the target element by adding the appropriate class to them.

You can also use data-options to allow your show on small, medium, or large. For instance, this this tooltip will only show on....

Tool tips are accessible by using the appropriate ARIA tag.

SCSS: components/_tooltips

You can add your own custom class to style each tip differently. On a small device, the tooltips are full-width and bottom aligned.

			<textarea class="code">
has tool tip link
			</textarea>


text:
package edu.ucsd.xmlrpc.xmlrpc.server;

import java.io.IOException;
import java.io.OutputStream;

import edu.ucsd.xmlrpc.xmlrpc.common.ServerStreamConnection;
import edu.ucsd.xmlrpc.xmlrpc.common.XmlRpcStreamRequestConfig;

/** Abstract extension of {@link XmlRpcStreamServer} for deriving
 * HTTP servers.
 */
public abstract class XmlRpcHttpServer extends XmlRpcStreamServer {
	protected abstract void setResponseHeader(ServerStreamConnection pConnection, String pHeader, String pValue);

	protected OutputStream getOutputStream(ServerStreamConnection pConnection, XmlRpcStreamRequestConfig pConfig, OutputStream pStream) throws IOException {
		if (pConfig.isEnabledForExtensions()  &&  pConfig.isGzipRequesting()) {
			setResponseHeader(pConnection, "Content-Encoding", "gzip");
		}
		return super.getOutputStream(pConnection, pConfig, pStream);
	}
}


text:
\hypertarget{classtinyxml2_1_1_x_m_l_attribute}{}\section{tinyxml2\+:\+:X\+M\+L\+Attribute Class Reference}
\label{classtinyxml2_1_1_x_m_l_attribute}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}

{\ttfamily \#include $<$tinyxml2.\+h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item
const char $\ast$ \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a8124fbfd27f57150cc68d8a9207078c3}{Name} () const
\begin{DoxyCompactList}\small\item\em The name of the attribute. \end{DoxyCompactList}\item
const char $\ast$ \hyperlink{classtinyxml2_1_1_x_m_l_attribute_aa9b08c6e592b0c88117c46666dcc1af2}{Value} () const
\begin{DoxyCompactList}\small\item\em The value of the attribute. \end{DoxyCompactList}\item
const \hyperlink{classtinyxml2_1_1_x_m_l_attribute}{X\+M\+L\+Attribute} $\ast$ \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a7fd852d6185af90361ec1bc9a7681ad6}{Next} () const
\begin{DoxyCompactList}\small\item\em The next attribute in the list. \end{DoxyCompactList}\item
int \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a949d02a5888092cc68c1e29185301863}{Int\+Value} () const
\item
unsigned \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a4c7a179907836a136d1ce5acbe53389d}{Unsigned\+Value} () const
\begin{DoxyCompactList}\small\item\em Query as an unsigned integer. See \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a949d02a5888092cc68c1e29185301863}{Int\+Value()} \end{DoxyCompactList}\item
bool \hyperlink{classtinyxml2_1_1_x_m_l_attribute_afb444b7a12527f836aa161b54b2f7ce7}{Bool\+Value} () const
\begin{DoxyCompactList}\small\item\em Query as a boolean. See \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a949d02a5888092cc68c1e29185301863}{Int\+Value()} \end{DoxyCompactList}\item
double \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a336153e5aa1b7ccd6502fc249bfb3fd7}{Double\+Value} () const
\begin{DoxyCompactList}\small\item\em Query as a double. See \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a949d02a5888092cc68c1e29185301863}{Int\+Value()} \end{DoxyCompactList}\item
float \hyperlink{classtinyxml2_1_1_x_m_l_attribute_ae3d51ff98eacc1dc46efcfdaee5c84ad}{Float\+Value} () const
\begin{DoxyCompactList}\small\item\em Query as a float. See \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a949d02a5888092cc68c1e29185301863}{Int\+Value()} \end{DoxyCompactList}\item
\hyperlink{namespacetinyxml2_a1fbf88509c3ac88c09117b1947414e08}{X\+M\+L\+Error} \hyperlink{classtinyxml2_1_1_x_m_l_attribute_ad510a83c4ff2755844bb250b125d28ff}{Query\+Int\+Value} (int $\ast$value) const
\item
\hyperlink{namespacetinyxml2_a1fbf88509c3ac88c09117b1947414e08}{X\+M\+L\+Error} \hyperlink{classtinyxml2_1_1_x_m_l_attribute_ac93f5981adfd62ac4ea76bfa668ee2b4}{Query\+Unsigned\+Value} (unsigned int $\ast$value) const
\begin{DoxyCompactList}\small\item\em See Query\+Int\+Value. \end{DoxyCompactList}\item
\hyperlink{namespacetinyxml2_a1fbf88509c3ac88c09117b1947414e08}{X\+M\+L\+Error} \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a9e9b94369f182df72aaac9acd04afead}{Query\+Bool\+Value} (bool $\ast$value) const
\begin{DoxyCompactList}\small\item\em See Query\+Int\+Value. \end{DoxyCompactList}\item
\hyperlink{namespacetinyxml2_a1fbf88509c3ac88c09117b1947414e08}{X\+M\+L\+Error} \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a0872c05edea2a7cde4bd96c1e9cb2fc4}{Query\+Double\+Value} (double $\ast$value) const
\begin{DoxyCompactList}\small\item\em See Query\+Int\+Value. \end{DoxyCompactList}\item
\hyperlink{namespacetinyxml2_a1fbf88509c3ac88c09117b1947414e08}{X\+M\+L\+Error} \hyperlink{classtinyxml2_1_1_x_m_l_attribute_afb254627c296d1d70b755397d32fece8}{Query\+Float\+Value} (float $\ast$value) const
\begin{DoxyCompactList}\small\item\em See Query\+Int\+Value. \end{DoxyCompactList}\item
void \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a406d2c4a13c7af99a65edb59dd9f7581}{Set\+Attribute} (const char $\ast$value)
\begin{DoxyCompactList}\small\item\em Set the attribute to a string value. \end{DoxyCompactList}\item
void \hyperlink{classtinyxml2_1_1_x_m_l_attribute_ad86d7d7058d76761c3a80662566a57e5}{Set\+Attribute} (int value)
\begin{DoxyCompactList}\small\item\em Set the attribute to value. \end{DoxyCompactList}\item
void \hyperlink{classtinyxml2_1_1_x_m_l_attribute_ae70468c0f6df2748ba3529c716999fae}{Set\+Attribute} (unsigned value)
\begin{DoxyCompactList}\small\item\em Set the attribute to value. \end{DoxyCompactList}\item
void \hyperlink{classtinyxml2_1_1_x_m_l_attribute_ab3516def4fe058fe328f2b89fc2d77da}{Set\+Attribute} (bool value)
\begin{DoxyCompactList}\small\item\em Set the attribute to value. \end{DoxyCompactList}\item
void \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a9a65ab3147abe8ccbbd373ce8791e818}{Set\+Attribute} (double value)
\begin{DoxyCompactList}\small\item\em Set the attribute to value. \end{DoxyCompactList}\item
void \hyperlink{classtinyxml2_1_1_x_m_l_attribute_ae95e843313aaf5d56c32530b6456df02}{Set\+Attribute} (float value)
\begin{DoxyCompactList}\small\item\em Set the attribute to value. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item
class \hyperlink{classtinyxml2_1_1_x_m_l_attribute_ac2fba9b6e452829dd892f7392c24e0eb}{X\+M\+L\+Element}
\end{DoxyCompactItemize}

\subsection{Detailed Description}
An attribute is a name-\/value pair. Elements have an arbitrary number of attributes, each with a unique name.

\begin{DoxyNote}{Note}
The attributes are not X\+M\+L\+Nodes. You may only query the \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a7fd852d6185af90361ec1bc9a7681ad6}{Next()} attribute in a list.
\end{DoxyNote}

Definition at line 1034 of file tinyxml2.\+h.

\subsection{Member Function Documentation}
\hypertarget{classtinyxml2_1_1_x_m_l_attribute_afb444b7a12527f836aa161b54b2f7ce7}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Bool\+Value@{Bool\+Value}}
\index{Bool\+Value@{Bool\+Value}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Bool\+Value}]{\setlength{\rightskip}{0pt plus 5cm}bool tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Bool\+Value (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\label{classtinyxml2_1_1_x_m_l_attribute_afb444b7a12527f836aa161b54b2f7ce7}

Query as a boolean. See \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a949d02a5888092cc68c1e29185301863}{Int\+Value()}

Definition at line 1065 of file tinyxml2.\+h.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_a336153e5aa1b7ccd6502fc249bfb3fd7}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Double\+Value@{Double\+Value}}
\index{Double\+Value@{Double\+Value}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Double\+Value}]{\setlength{\rightskip}{0pt plus 5cm}double tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Double\+Value (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\label{classtinyxml2_1_1_x_m_l_attribute_a336153e5aa1b7ccd6502fc249bfb3fd7}

Query as a double. See \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a949d02a5888092cc68c1e29185301863}{Int\+Value()}

Definition at line 1071 of file tinyxml2.\+h.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_ae3d51ff98eacc1dc46efcfdaee5c84ad}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Float\+Value@{Float\+Value}}
\index{Float\+Value@{Float\+Value}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Float\+Value}]{\setlength{\rightskip}{0pt plus 5cm}float tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Float\+Value (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\label{classtinyxml2_1_1_x_m_l_attribute_ae3d51ff98eacc1dc46efcfdaee5c84ad}

Query as a float. See \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a949d02a5888092cc68c1e29185301863}{Int\+Value()}

Definition at line 1077 of file tinyxml2.\+h.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_a949d02a5888092cc68c1e29185301863}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Int\+Value@{Int\+Value}}
\index{Int\+Value@{Int\+Value}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Int\+Value}]{\setlength{\rightskip}{0pt plus 5cm}int tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Int\+Value (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\label{classtinyxml2_1_1_x_m_l_attribute_a949d02a5888092cc68c1e29185301863}
Int\+Value interprets the attribute as an integer, and returns the value. If the value isn\textquotesingle{}t an integer, 0 will be returned. There is no error checking; use \hyperlink{classtinyxml2_1_1_x_m_l_attribute_ad510a83c4ff2755844bb250b125d28ff}{Query\+Int\+Value()} if you need error checking.

Definition at line 1053 of file tinyxml2.\+h.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_a8124fbfd27f57150cc68d8a9207078c3}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Name@{Name}}
\index{Name@{Name}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Name}]{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Name (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}\label{classtinyxml2_1_1_x_m_l_attribute_a8124fbfd27f57150cc68d8a9207078c3}

The name of the attribute.

Definition at line 1068 of file tinyxml2.\+cpp.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_a7fd852d6185af90361ec1bc9a7681ad6}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Next@{Next}}
\index{Next@{Next}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Next}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf X\+M\+L\+Attribute}$\ast$ tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Next (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\label{classtinyxml2_1_1_x_m_l_attribute_a7fd852d6185af90361ec1bc9a7681ad6}

The next attribute in the list.

Definition at line 1045 of file tinyxml2.\+h.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_a9e9b94369f182df72aaac9acd04afead}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Query\+Bool\+Value@{Query\+Bool\+Value}}
\index{Query\+Bool\+Value@{Query\+Bool\+Value}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Query\+Bool\+Value}]{\setlength{\rightskip}{0pt plus 5cm}{\bf X\+M\+L\+Error} tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Query\+Bool\+Value (
\begin{DoxyParamCaption}
\item[{bool $\ast$}]{value}
\end{DoxyParamCaption}
) const}\label{classtinyxml2_1_1_x_m_l_attribute_a9e9b94369f182df72aaac9acd04afead}

See Query\+Int\+Value.

Definition at line 1130 of file tinyxml2.\+cpp.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_a0872c05edea2a7cde4bd96c1e9cb2fc4}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Query\+Double\+Value@{Query\+Double\+Value}}
\index{Query\+Double\+Value@{Query\+Double\+Value}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Query\+Double\+Value}]{\setlength{\rightskip}{0pt plus 5cm}{\bf X\+M\+L\+Error} tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Query\+Double\+Value (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{value}
\end{DoxyParamCaption}
) const}\label{classtinyxml2_1_1_x_m_l_attribute_a0872c05edea2a7cde4bd96c1e9cb2fc4}

See Query\+Int\+Value.

Definition at line 1148 of file tinyxml2.\+cpp.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_afb254627c296d1d70b755397d32fece8}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Query\+Float\+Value@{Query\+Float\+Value}}
\index{Query\+Float\+Value@{Query\+Float\+Value}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Query\+Float\+Value}]{\setlength{\rightskip}{0pt plus 5cm}{\bf X\+M\+L\+Error} tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Query\+Float\+Value (
\begin{DoxyParamCaption}
\item[{float $\ast$}]{value}
\end{DoxyParamCaption}
) const}\label{classtinyxml2_1_1_x_m_l_attribute_afb254627c296d1d70b755397d32fece8}

See Query\+Int\+Value.

Definition at line 1139 of file tinyxml2.\+cpp.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_ad510a83c4ff2755844bb250b125d28ff}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Query\+Int\+Value@{Query\+Int\+Value}}
\index{Query\+Int\+Value@{Query\+Int\+Value}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Query\+Int\+Value}]{\setlength{\rightskip}{0pt plus 5cm}{\bf X\+M\+L\+Error} tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Query\+Int\+Value (
\begin{DoxyParamCaption}
\item[{int $\ast$}]{value}
\end{DoxyParamCaption}
) const}\label{classtinyxml2_1_1_x_m_l_attribute_ad510a83c4ff2755844bb250b125d28ff}
Query\+Int\+Value interprets the attribute as an integer, and returns the value in the provided parameter. The function will return X\+M\+L\+\_\+\+N\+O\+\_\+\+E\+R\+R\+O\+R on success, and X\+M\+L\+\_\+\+W\+R\+O\+N\+G\+\_\+\+A\+T\+T\+R\+I\+B\+U\+T\+E\+\_\+\+T\+Y\+P\+E if the conversion is not successful.

Definition at line 1112 of file tinyxml2.\+cpp.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_ac93f5981adfd62ac4ea76bfa668ee2b4}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Query\+Unsigned\+Value@{Query\+Unsigned\+Value}}
\index{Query\+Unsigned\+Value@{Query\+Unsigned\+Value}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Query\+Unsigned\+Value}]{\setlength{\rightskip}{0pt plus 5cm}{\bf X\+M\+L\+Error} tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Query\+Unsigned\+Value (
\begin{DoxyParamCaption}
\item[{unsigned int $\ast$}]{value}
\end{DoxyParamCaption}
) const}\label{classtinyxml2_1_1_x_m_l_attribute_ac93f5981adfd62ac4ea76bfa668ee2b4}

See Query\+Int\+Value.

Definition at line 1121 of file tinyxml2.\+cpp.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_a406d2c4a13c7af99a65edb59dd9f7581}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Set\+Attribute@{Set\+Attribute}}
\index{Set\+Attribute@{Set\+Attribute}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Set\+Attribute}]{\setlength{\rightskip}{0pt plus 5cm}void tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Set\+Attribute (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{value}
\end{DoxyParamCaption}
)}\label{classtinyxml2_1_1_x_m_l_attribute_a406d2c4a13c7af99a65edb59dd9f7581}

Set the attribute to a string value.

Definition at line 1157 of file tinyxml2.\+cpp.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_ad86d7d7058d76761c3a80662566a57e5}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Set\+Attribute@{Set\+Attribute}}
\index{Set\+Attribute@{Set\+Attribute}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Set\+Attribute}]{\setlength{\rightskip}{0pt plus 5cm}void tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Set\+Attribute (
\begin{DoxyParamCaption}
\item[{int}]{value}
\end{DoxyParamCaption}
)}\label{classtinyxml2_1_1_x_m_l_attribute_ad86d7d7058d76761c3a80662566a57e5}

Set the attribute to value.

Definition at line 1163 of file tinyxml2.\+cpp.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_ae70468c0f6df2748ba3529c716999fae}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Set\+Attribute@{Set\+Attribute}}
\index{Set\+Attribute@{Set\+Attribute}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Set\+Attribute}]{\setlength{\rightskip}{0pt plus 5cm}void tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Set\+Attribute (
\begin{DoxyParamCaption}
\item[{unsigned}]{value}
\end{DoxyParamCaption}
)}\label{classtinyxml2_1_1_x_m_l_attribute_ae70468c0f6df2748ba3529c716999fae}

Set the attribute to value.

Definition at line 1171 of file tinyxml2.\+cpp.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_ab3516def4fe058fe328f2b89fc2d77da}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Set\+Attribute@{Set\+Attribute}}
\index{Set\+Attribute@{Set\+Attribute}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Set\+Attribute}]{\setlength{\rightskip}{0pt plus 5cm}void tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Set\+Attribute (
\begin{DoxyParamCaption}
\item[{bool}]{value}
\end{DoxyParamCaption}
)}\label{classtinyxml2_1_1_x_m_l_attribute_ab3516def4fe058fe328f2b89fc2d77da}

Set the attribute to value.

Definition at line 1179 of file tinyxml2.\+cpp.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_a9a65ab3147abe8ccbbd373ce8791e818}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Set\+Attribute@{Set\+Attribute}}
\index{Set\+Attribute@{Set\+Attribute}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Set\+Attribute}]{\setlength{\rightskip}{0pt plus 5cm}void tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Set\+Attribute (
\begin{DoxyParamCaption}
\item[{double}]{value}
\end{DoxyParamCaption}
)}\label{classtinyxml2_1_1_x_m_l_attribute_a9a65ab3147abe8ccbbd373ce8791e818}

Set the attribute to value.

Definition at line 1186 of file tinyxml2.\+cpp.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_ae95e843313aaf5d56c32530b6456df02}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Set\+Attribute@{Set\+Attribute}}
\index{Set\+Attribute@{Set\+Attribute}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Set\+Attribute}]{\setlength{\rightskip}{0pt plus 5cm}void tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Set\+Attribute (
\begin{DoxyParamCaption}
\item[{float}]{value}
\end{DoxyParamCaption}
)}\label{classtinyxml2_1_1_x_m_l_attribute_ae95e843313aaf5d56c32530b6456df02}

Set the attribute to value.

Definition at line 1193 of file tinyxml2.\+cpp.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_a4c7a179907836a136d1ce5acbe53389d}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Unsigned\+Value@{Unsigned\+Value}}
\index{Unsigned\+Value@{Unsigned\+Value}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Unsigned\+Value}]{\setlength{\rightskip}{0pt plus 5cm}unsigned tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Unsigned\+Value (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\label{classtinyxml2_1_1_x_m_l_attribute_a4c7a179907836a136d1ce5acbe53389d}

Query as an unsigned integer. See \hyperlink{classtinyxml2_1_1_x_m_l_attribute_a949d02a5888092cc68c1e29185301863}{Int\+Value()}

Definition at line 1059 of file tinyxml2.\+h.

\hypertarget{classtinyxml2_1_1_x_m_l_attribute_aa9b08c6e592b0c88117c46666dcc1af2}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!Value@{Value}}
\index{Value@{Value}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{Value}]{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ tinyxml2\+::\+X\+M\+L\+Attribute\+::\+Value (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}\label{classtinyxml2_1_1_x_m_l_attribute_aa9b08c6e592b0c88117c46666dcc1af2}

The value of the attribute.

Definition at line 1073 of file tinyxml2.\+cpp.

\subsection{Friends And Related Function Documentation}
\hypertarget{classtinyxml2_1_1_x_m_l_attribute_ac2fba9b6e452829dd892f7392c24e0eb}{}\index{tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}!X\+M\+L\+Element@{X\+M\+L\+Element}}
\index{X\+M\+L\+Element@{X\+M\+L\+Element}!tinyxml2\+::\+X\+M\+L\+Attribute@{tinyxml2\+::\+X\+M\+L\+Attribute}}
\subsubsection[{X\+M\+L\+Element}]{\setlength{\rightskip}{0pt plus 5cm}friend class {\bf X\+M\+L\+Element}\hspace{0.3cm}{\ttfamily [friend]}}\label{classtinyxml2_1_1_x_m_l_attribute_ac2fba9b6e452829dd892f7392c24e0eb}

Definition at line 1036 of file tinyxml2.\+h.

The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item
/mnt/windows/data/programming/crapengine2/source/core/include/xml/\hyperlink{tinyxml2_8h}{tinyxml2.\+h}\item
/mnt/windows/data/programming/crapengine2/source/core/source/xml/\hyperlink{tinyxml2_8cpp}{tinyxml2.\+cpp}\end{DoxyCompactItemize}


text:
/********************************************************************************
* Auteurs		: Quentin Walter et Oscar Da Silva
* Date			: Mars 2014
* Nom			: liste.c
* Description	: TP AlgSd, HEIG-VD Fee
* Resume		: Fichier avec les fonctions primitives vues en cours
/*******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include "liste.h"

/* Initialise la liste : pas d'élément */
void initListe (typeElt **ptPrem) {
	*ptPrem = NULL;
}

/* Allouer la mémoire pour un nouvel élément */
/* Initialiser le champ val */
typeElt *creerElt (typeDonnee valeur){
	typeElt *nouveau;

	/* Allocation de la mémoire pour le nouvel élément */
	nouveau = (typeElt *) malloc (sizeof (typeElt));
	if (nouveau != NULL) {
		nouveau->val = valeur; // Initialisation de la donnée
	}
	return nouveau;
}

/* Lire la valeur stockée dans l'élément */
typeDonnee valElt (typeElt *element) {
	return (element->val);
}

/* Lire le pointeur suivant dans l'élément */
typeElt *suivantElt (typeElt *element){
	return (element->suivant);
}

/* Insèrer un élément après l'élément courant */
/* Resultat : 1 si ok 0 si allocation mémoire impossible */
/* ptPrem est l'adresse du pointeur sur le premier de la liste */
/* courant sera égal à NULL si on veut insérer en début de liste */
void insereElt (typeElt **ptPrem, typeElt *courant, typeElt *nouveau) {

	if (courant == NULL) {
		/* Le nouvel élément doit être inséré en début de liste */
		nouveau->suivant = *ptPrem;
		*ptPrem = nouveau;
	} else {
		/* Le nouvel élément est inséré derrière l'elt courant */
		nouveau->suivant = courant->suivant;
		courant->suivant = nouveau;
	}
}

/* Détruire l'élément placé derrière l'élément courant */
/* Résultat : valeur stockée dans l'élément détruit */
/* ptPrem est l'adresse du pointeur sur le premier de la liste */
/* Precedent sera égal à NULL pour détruire le premier de la liste */
void detruireElt (typeElt **ptPrem, typeElt *courant){
	typeElt *elt;

	if (courant == NULL) {
		/* Enlever le premier de la liste */
		elt = *ptPrem;                        /* Garder l'adresse du premier élément */
		*ptPrem = elt->suivant;               /* Premier pointera sur le 2ème élément */
	} else {
		elt = courant->suivant;                /* Element à enlever */
		courant->suivant = elt->suivant;       /* Modifier le pointeur du precedent */
	}
	free (elt);  /* Liberer la mémoire pour l'élément détruit */
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EmbASP-CSharp v7.1.0: base.Output Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

EmbASP-CSharp v7.1.0

base

Output

Public Member Functions |
Properties |
List of all members

base.Output Class Reference

Inheritance diagram for base.Output:

Public Member Functions

 	Output ()

 	Output (string initial_output)

 	Output (string @out, string err)

virtual object 	Clone ()

Properties

virtual string 	ErrorsString [get, set]

virtual string 	OutputString [get, set]

Constructor & Destructor Documentation

◆ Output() [1/3]

          base.Output.Output
          (
          	)

◆ Output() [2/3]

          base.Output.Output
          (
          string
          initial_output	)

◆ Output() [3/3]

          base.Output.Output
          (
          string @
          out,

          string
          err

          )

inline

Member Function Documentation

◆ Clone()

          virtual object base.Output.Clone
          (
          	)

inlinevirtual

Property Documentation

◆ ErrorsString

          virtual string base.Output.ErrorsString

getset

◆ OutputString

          virtual string base.Output.OutputString

getset

The documentation for this class was generated from the following file:

embasp-csharp/it/unical/mat/embasp/base/Output.cs

<address class="footer">
Generated by  1.9.0
</address>


text:
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace PHPRedmineAPI;

use PHPRedmineAPI\exceptions\ErrorResponseException;
use PHPRedmineAPI\exceptions\ExecutingException;
use PHPRedmineAPI\models;

/**
 * Description of RedmineAPI
 *
 * @author muriano
 */
class RedmineAPI
{

    private $debug = FALSE;
    private $urlScheme = NULL;
    private $urlHost = NULL;
    private $urlPort = NULL;
    private $urlUser = NULL;
    private $urlPass = NULL;
    private $urlPath = NULL;
    private $site = '';
    private $requestMethod = 'xml';

    /**
     * Constructor of class
     */
    public function __construct($url, $requestMethod = 'xml', $debug = FALSE)
    {

        if ($url == '') {
            throw new ExecutingException('Empty $url is not allowed');
        }

        $this->parseURL($url)->generateSiteURL();

        $this->requestMethod = $requestMethod;
        $this->debug = $debug;
    }

    /**
     * Set authentication type with an username and password
     * @param string $username
     * @param string $password
     * @return \PHPRedmineAPI\RedmineAPI
     */
    public function setAuthenticationByUsername($username, $password)
    {

        $this->urlUser = $username;
        $this->urlPass = $password;

        $this->generateSiteUrl();

        return $this;
    }

    /**
     * Sets authentication with an API Key.
     * @param string $apikey
     * @return \PHPRedmineAPI\RedmineAPI
     */
    public function setAuthenticationByAPIKey($apikey) {
        $this->urlUser = $apikey;
        $this->urlPass = NULL;

        $this->generateSiteUrl();

        return $this;
    }

    /**
     * Sets format for requested data
     * @param type $requestMode

     * {@code 'xml'}    string    Set request format as XML

     * {@code 'json'}   string    Set request format as JSON

     *
     * @throws ExecutingException
     */
    public function setRequestMode($requestMode) {
        switch ($requestMode) {
            case 'xml':
            case 'json':
                $this->requestMethod = $requestMode;
                break;
            default:
                throw new ExecutingException("Invalid request method: {$requestMode}");
        }
    }

    /**
     * Set debug mode On/Off
     * @param boolean $debug

     * {@code TRUE}    boolean   Debug enable

     * {@code FALSE}   boolean   Debug disable

     */
    public function setDebug($debug = TRUE) {
        $this->debug($debug);
    }

    /**
     * Get the complete list of issue or a issue by id
     *
     * @param mixed $id Key to search.

     * {@code 'all'}    Get all instances.

     * {@code integer}  Get intance for issue with this id.

     *
     * @param array $filter

     * {@key 'project_id'}      integer   Get issues from the project with the given id (a numeric value, not a project identifier).

     * {@key 'subproject_id'}   mixed     Get issues from the subproject with the given id. You can use project_id = XXX & subproject_id = !* to get only the issues of a given project and none of its subprojects.

     * {@key 'tracker_id'}      integer   Get issues from the tracker with the given id.

     * {@key 'status_id'}       string    Get issues with the given status id only. Possible values: open, closed, * to get open and closed issues, status id

     * {@key 'assigned_to_id'}  mixed     Get issues which are assigned to the given user id. me can be used instead an ID to fetch all issues from the logged in user (via API key or HTTP auth)

     * {@key 'cf_x'}            mixed     Get issues with the given value for custom field with an ID of x. (Custom field must have 'used as a filter' checked.)

     *
     * @param array $sort

     * {@key 'field'}           string    Where 'field' must be a field from this resource and value for this key must be 'ASC' for ascending sort or 'DESC' for descending sort.

     *
     * @param integer $offset Skip this number of resources in response. (Optional)

     *
     * @param integer $limit Number of resources per page. (Optional)

     *
     * @return mixed
     */
    public function getIssues($id = 'all', $filter = array(), $sort = array(), $offset = null, $limit = null) {

        $issues = new models\Issue($this->site, $this->requestMethod);
        return $this->find($issues, $id, $filter, $sort, $offset, $limit);

    }

    /**
     * Returns a list of users.
     *
     * @param mixed $id Key to search.

     * {@code 'all'}    Get all instances.

     * {@code integer}  Get intance for issue with this id.

     *
     * @param array $filter

     * {@key 'status'}          integer   Get only users with the given status. Default is 1 (active users)

     * {@key 'name'}            string    filter users on their login, firstname, lastname and mail ; if the pattern contains a space, it will also return users whose firstname match the first word or lastname match the second word.

     * {@key 'group_id'}        string    Get only users who are members of the given group

     *
     * @param array $sort

     * {@key 'field'}           string    Where 'field' must be a field from this resource and value for this key must be 'ASC' for ascending sort or 'DESC' for descending sort.

     *
     * @param integer $offset Skip this number of resources in response. (Optional)

     *
     * @param integer $limit Number of resources per page. (Optional)

     *
     * @link http://www.redmine.org/projects/redmine/repository/entry/trunk/app/models/principal.rb#L22-25  See app/models/principal.rb for a list of available statuses.
     *
     * @return mixed
     *
     */
    public function getUsers($id = 'all', $filter = array(), $sort = array(), $offset = null, $limit = null) {

        $users = new models\User($this->site, $this->requestMethod);
        return $this->find($users, $id, $filter, $sort, $offset, $limit);
    }

    /**
     * Returns a list of projects
     *
     * @param mixed $id Key to search.

     * {@code 'all'}    Get all instances.

     * {@code integer}  Get instance for projects with this id.

     * {@code string'}  Get instance for projects with this identifier.

     *
     * @param array $filter

     * {@key 'include'}         string    Fetch associated data (If provided). Possible values: trackers, issue_categories, enabled_modules. Values should be separated by a comma ",".

     *
     * @param array $sort

     * {@key 'field'}           string    Where 'field' must be a field from this resource and value for this key must be 'ASC' for ascending sort or 'DESC' for descending sort.

     *
     * @param integer $offset Skip this number of resources in response. (Optional)

     *
     * @param integer $limit Number of resources per page. (Optional)

     *
     * @link http://www.redmine.org/projects/redmine/repository/entry/trunk/app/models/principal.rb#L22-25  See app/models/principal.rb for a list of available statuses.
     *
     * @return mixed
     *
     */
    public function getProjects($id = 'all', $filter = array(), $sort = array(), $offset = null, $limit = null) {

        $projects = new models\Project($this->site, $this->requestMethod);
        return $this->find($projects, $id, $filter, $sort, $offset, $limit);

    }

    /**
     * Returns a list of contacts
     * @param mixed $id Key to search.

     * {@code 'all'}    Get all instances.

     * {@code integer}  Get instance for contact with this id.

     *
     * @param array $filter

     * {@key project_id }       mixed       Get contacts from the project with the given id/identifier.

     * {@key assigned_to_id}    integer     Get contacts from the user with the given id.

     * {@key search}            string      Get contacts with the given search string.

     * {@key tags}              string      Get contacts with the given tag.

     * {@key include}           string      When selecting a contact by id, fetch associated data (If provide). Possible
     *                                      values: notes, contacts, deals, issues. Values should be separated by
     *                                      a comma.
     *
     * @param array $sort
     * {@key 'field'}           string      Where 'field' must be a field from this resource and value for this key must
     *                                      be 'ASC' for ascending sort or 'DESC' for descending sort.

     * @param integer $offset               Skip this number of resources in response.      OPTIONAL
     *
     * @param integer $limit                Number of resources per page.       OPTIONAL
     *
     * @return mixed
     *
     */
    public function getContacts($id = 'all', $filter = array(), $sort = array(), $offset = null, $limit = null) {

        $contacts = new models\Contact($this->site, $this->requestMethod);
        return $this->find($contacts, $id, $filter, $sort, $offset, $limit);

    }

    public function getAttachment($id)
    {
        $attachment = new models\Attachment($this->site, $this->requestMethod);
        return $this->find($attachment,$id);

    }

    /**
     * Create a new resource of type "User"
     *
     * @param string $login             Login name for this user
     *
     * @param string $password          Login password for this user
     *
     * @param string $firstname         User's first name
     *
     * @param string $lastname          User's last name
     *
     * @param string $mail              User's email. This method does not check if is valid.
     *
     * @param string $mailNotification  Sends email notification to this
     * {@code 'only_my_events'}   string  Sends mail only when a event that relates to this user is updated.
     * {@code 'all'}              string  Sends mail when any issue on public or user related events are updated.
     * {@code 'none'}             string  Never sends mail to this user
     *
     * @param integer $authSourceId     Authentication type.
     *
     * @param integer $mustChangePasswd Must this user change his password on first login?
     * {@code 1}                  integer TRUE. User must change the password.
     * {@code 0}                  integer FALSE. User must not change the password.
     *
     * @return \PHPRedmineAPI\models\User|boolean
     */
    public function createUser($login, $password, $firstname, $lastname, $mail, $mailNotification = 'only_my_events', $authSourceId = NULL, $mustChangePasswd = NULL) {

        $mustChangePasswd = ($mustChangePasswd !== 1) ? 0 : 1;

        $params = array(

            'login' => $login,
            'password' => $password,
            'firstname' => $firstname,
            'lastname' => $lastname,
            'mail' => $mail,
        );

        if ($authSourceId !== NULL) {
            $params['auth_source_id'] = $authSourceId;
        }

        if ($mailNotification !== NULL) {
            $params['mail_notification'] = $mailNotification;
        }

        if ($mustChangePasswd !== NULL) {
            $params['must_change_passwd'] = $mustChangePasswd;
        }

        $user = new models\User($this->site, $this->requestMethod, $params);

        try {
            $this->create($user);
            return $user;
        } catch (ErrorResponseException $e) {
            $this->debug($e->getMessage());
            $this->debug($e->getResponseHeaders());
            $this->debug($e->getResponseBody());
            return false;
        } catch (\Exception $e) {
            $this->debug($e->getMessage());
            return false;
        }
    }

    /**
     * Create a resource of type "Contact"
     * @api
     *
     * @param mixed     $projectId              Project where contact will be attached to
     *
     * @param string    $firstName              Contact name
     *
     * @param array     $optionalParameters     Array with key/values for the rest of parameters for this contact.

     *

     *
{@key company}               string      Company name string.

     *
{@key phone}                 string      Phone number.

     *
{@key email}                 string      Email.

     *
{@key website}               string      Website URL.

     *
{@key skype_name}            string      Username in skype.

     *
{@key birthday}              string      Date of birth, format: yyyy-mm-dd

     *
{@key last_name}             string      Last name.

     *
{@key middle_name}           string      Middle name.

     *
{@key background}            string      Text about this contact.

     *
{@key job_title}             string      Job title.

     *
{@key tag_list}              string      Tags to applied to this contact. Separated by a comma.

     *
{@key is_company}            boolean     True/False if contact is (or not) a company.

     *

     *  {@key address_attributes}       array       Address lines data.
     *

     *
{@key street}           string      Street

     *
{@key city}             string      City

     *
{@key country_code}     string      ISO code for country (e.g. ES, RU, UK)

     *
{@key postcode}         string      Post/Zip code

     *

     *

     *
{@key assigned_to_id}        string      ID of the user assigned to contact.

     *

     *  {@key custom_fields}            array       Custom fields
     *

     *
{@key field_id}         string      Value for field, where  field_id is a valid identifier for field.

     *

     *

     *
{@key visibility}            string      "0" - Project settings. "1" - Public. "2" - Private

     *

     *
     * @link http://www.redmine.org/projects/redmine/wiki/Rest_api#Working-with-custom-fields See Custom Fields
     *
     * @return \PHPRedmineAPI\models\Contact|boolean
     *
     */
    public function createContact($projectId, $firstName, $optionalParameters = array())
    {
        $requiredParams = array(
            'project_id' => $projectId,
            'first_name' => $firstName,
        );

        $params = array_merge($optionalParameters, $requiredParams);
        $contact = new models\Contact($this->site, $this->requestMethod, $params);

        try {
            $this->create($contact);
            return $contact;
        } catch (ErrorResponseException $e) {
            $this->debug($e->getMessage());
            $this->debug($e->getResponseHeaders());
            $this->debug($e->getResponseBody());
            return false;
        } catch (\Exception $e) {
            $this->debug($e->getMessage());
            return false;
        }

    }

    /**
     * Create a helpdesk ticket
     * @param array         $issue      Issue attributes. Any other field use on createIssue() could be used.

     * {@key project_id}    integer     Identifier for project which issue will be created.

     * {@key tracker_id}    string      New ticket tracker

     * {@key description}   string      New ticket description

     *
     * @param array         $contact    Contact attibutes.  Any other field use on createContact() could be used.
     *
     * @see self::createIssue()
     * @see self::createContact()
     */
    public function createHelpdeskTicket($issue, $contact)
    {

        $params = array(
            'issue' => $issue,
            'contact' => $contact,
        );

        $ticket = new models\HelpdeskTicket($this->site, $this->requestMethod, $params);

        try {
            $this->create($ticket);
            return $ticket;
        } catch (ErrorResponseException $e) {
            $this->debug($e->getMessage());
            return false;
        } catch (\Exception $e) {
            $this->debug($e->getMessage());
            return false;
        }

    }

    public function setHelpdeskResponse($issueId, $content, $statusId = null)
    {

        $params = array(
            'issue_id' => $issueId,
            'content' => $content,
        );

        if ($statusId !== null && is_int($statusId)) {

            $params['status_id'] = $statusId;

        }

        $emailNote = new models\HelpdeskEmailNote($this->site, $this->requestMethod, $params);

        try {
            $this->create($emailNote);
            return $emailNote;
        } catch (ErrorResponseException $e) {
            $this->debug($e->getMessage());
            return false;
        } catch (\Exception $e) {
            $this->debug($e->getMessage());
            return false;
        }

    }

    /**
     * Sends a response to a customer.
     * @param integer   $issueId    Ticket ID.
     * @param string    $content    Email message content.
     * @param integer   $statusId   Set ticket status to this after successfull sent.
     * @return boolean|\PHPRedmineAPI\models\EmailNote
     */
    public function sendEmailNote($issueId, $content = '', $statusId = null) {
        $params = array(
            'issue_id' => $issueId,
            'content' => $content,
        );

        if ($statusId !== NULL) {
            $params['status_id'] = $statusId;
        }

        $emailNote = new models\HelpdeskEmailNote($this->site, $this->requestMethod, $params);

        try {
            $this->create($emailNote);
        } catch (ErrorResponseException $e) {
            $this->debug($e->getMessage());
            $this->debug($e->getResponseHeaders());
            $this->debug($e->getResponseBody());
            return false;
        } catch (\Exception $e) {
            $this->debug($e->getMessage());
            return false;
        }

        return $emailNote;
    }

    /**
     * Build a valid site url to connect to.
     * @throws ExecutingException
     */
    public function generateSiteURL() {

        if ($this->urlScheme == NULL) {
            throw new ExecutingException('Invalid URL Scheme');
        }

        if ($this->urlHost == NULL) {
            throw new ExecutingException('Invalid URL Host');
        }

        $authString = '';

        if ($this->urlUser !== NULL) {
            $authString .= $this->urlUser;
        }

        if ($this->urlPass !== NULL) {
            $authString .= ':' . $this->urlPass;
        }

        if ($authString !== '') {
            $authString .= '@';
        }

        $url = "{$this->urlScheme}://{$authString}{$this->urlHost}";

        if ($this->urlPort !== NULL) {
            $url .= ':' . $this->urlPort;
        }

        if ($this->urlPath !== NULL) {
            $url .= $this->urlPath;
        }

        $this->debug($url);

        $this->site = $url . '/';
    }

    /**
     *
     * Uploads a file and returns a file token that can be used
     * to associate with issues
     *
     * @param string $filePath
     *      Path for the file to upload
     *
     * @throws Exception
     *      If given file path is not accesible or doesn't exists.
     *
     * @throws Exception
     *      Raises exception from {@link self::uploadFileContent() called method }.
     *
     * @return string
     *      File token created by Redmine.
     */
    public function uploadFile($filePath)
    {

        $this->debug("Url Given: {$filePath}");

        $realFilePath = realpath($filePath);

        if ($realFilePath === false) {

            throw new \Exception("Can't access to {$filePath}");

        }

        $this->debug("Upload file from: {$realFilePath}");

        $fileContent = file_get_contents($realFilePath);

        try {
            return $this->uploadFileContent($fileContent);
        } catch (\Exception $e) {
            throw $e;
        }

    }

    /**
     * Uploads a file from its content and returns a file token that can be used
     * to associate with issues.
     *
     * @param string $fileContent
     * @return string
     * @throws Exception
     */
    public function uploadFileContent($fileContent)
    {

        $this->generateSiteURL();

        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $this->site . 'uploads.' . $this->requestMethod);
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/octet-stream'));
        curl_setopt($ch, CURLOPT_POSTFIELDS, $fileContent);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

        $result = curl_exec($ch);

        if (($curlError = curl_error($ch)) != '') {
           $this->debug("Error: " . $curlError) ;
        }

        curl_close($ch);

        if (trim($result) == '') {
            throw new Exception("Server response is null");
        }

        $xml = simplexml_load_string($result);

        $this->debug($xml);

        return $xml->token;

    }

    // Private Methods.

    /**
     * Formats an $sort type array to be a string formatted sort parameter
     *
     * @param array $sort   With the form $sort[field] = asc|desc
     *
     * @return string
     */
    private function prepareSortField($sort) {

        if (is_array($sort) && count($sort) > 0) {

            $aSort = array();

            foreach ($sort as $key => $value) {

                $aSort[] = $key . ':' . ( strtoupper(trim($value)) == strtoupper('desc')) ? 'desc' : 'asc';
            }

            return implode(',', $aSort);
        }

        return '';
    }

    /**
     * Prepare a resource $resource to call to its find method.
     *
     * @param \ActiveResource $resource
     * @param mixed $id
     * @param array $filter
     * @param array $sort
     * @param mixed $offset
     * @param mixed $limit
     * @return object
     */
    private function find($resource, $id, $filter = array(), $sort = array(), $offset = null, $limit = null) {

        $id = ($id == null) ? 'all' : $id;

        if (count($sort) > 0) {
            $filter['sort'] = $this->prepareSortField($sort);
        }

        if ($offset !== NULL && is_int($offset)) {
            $filter['offset'] = $offset;
        }

        if ($limit !== NULL && is_int($limit)) {
            $filter['limit'] = $limit;
        }

        return $resource->find($id, $filter);
    }

    /**
     * Prepare a resource to call to its create method.
     * @param object $resource
     * @return object
     * @throws ErrorResponseException
     */
    private function create($resource) {

        $successfulResponse = array('200', '201');

        $resource->save();

        if (array_search($resource->response_code, $successfulResponse) === FALSE) {
            throw new ErrorResponseException($resource);
        }

        return $resource;
    }

    /**
     * Parse an URL and take its components
     * @param string $url
     * @throws ExecutingException
     */
    private function parseURL($url) {

        $urlPart = parse_url($url);

        if (!is_array($urlPart) || $urlPart === FALSE) {
            throw new ExecutingException("URL {$url} is seriously malformed");
        }

        $this->urlScheme = (isset($urlPart['scheme'])) ? $urlPart['scheme'] : 'http';
        $this->urlHost = $urlPart['host'];
        $this->urlPort = (isset($urlPart['port'])) ? $urlPart['port'] : null;
        $this->urlPath = (isset($urlPart['path'])) ? $urlPart['path'] : null;
        $this->urlUser = (isset($urlPart['user'])) ? $urlPart['user'] : null;
        $this->urlPass = (isset($urlPart['pass'])) ? $urlPart['pass'] : null;

        try {
            $this->generateSiteURL();
        } catch (ExecutingException $e) {
            throw $e;
        } catch (Exception $e) {
            throw $e;
        }

        return $this;
    }

    /**
     * If $this->debug is true, uses the error flux to send messages.
     * @param mixed $log
     * @return mixed
     */
    private function debug($log) {

        if ($this->debug) {
            return $this->sendDebug($log);
        }

        return null;
    }

    /**
     * Uses the error flux to send messages.
     * @param mixed $log
     * @return bool
     */
    private function sendDebug($log) {

        switch (gettype($log)) {

            case 'boolean':
                $logText = ($log) ? 'True' : 'False';
                break;

            case 'array':
                $logText = "Array: " . print_r($log, true);
                break;

            case 'object':
                $logText = "Object (" . get_class($log) . "): " . json_encode($log);
                break;

            case 'unknown type':
                $logText = "Type is unknow";
                break;

            case 'NULL';
                $logText = "NULL";
                break;

            default:
                $logText = $log;
        }

        error_log($logText);
    }

}


text:
learnyounode-solutions
======================

My own solutions for nodejs [rvagg/learnyounode](https://github.com/rvagg/learnyounode "rvagg/learnyounode") tutorial


text:
package com.topwise.fenciinone;

import android.app.Application;
import android.util.Log;

import com.topwise.fenciinone.action.BaiduSearchAction;
import com.topwise.fenciinone.action.CopyAction;
import com.topwise.fenciinone.action.ShareAction;
import com.topwise.fenciinone.service.ListenClipboardService;

/**
 * Created by topwise on 17-4-2.
 */

public class App extends Application {

    /**
     * 这里才是应用程序的真正入口
     */
    @Override
    public void onCreate() {
        super.onCreate();
        Log.d("guohao","[app.onCreate]");
        //在此处配置百度查找Action
        Fenci.registerAction(Fenci.ACTION_SEARCH, BaiduSearchAction.create());
        //在此处配置复制Action
        Fenci.registerAction(Fenci.ACTION_COPY, CopyAction.create());
        //在此处配置分享Action
        Fenci.registerAction(Fenci.ACTION_SHARE, ShareAction.create());
        //启动监听剪贴板服务
        //ListenClipboardService.start(this);

    }
}


text:
<!DOCTYPE html>

<title>How do I change the Email tool permissions?</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="sakai.mailsender" name="description">
<meta content="permissions, roles" name="search">
<link href="/library/skin/tool_base.css" media="screen" rel="stylesheet" type="text/css" charset="utf-8">
<link href="/library/skin/morpheus-default/tool.css" media="screen" rel="stylesheet" type="text/css" charset="utf-8">
<link href="/sakai-help-tool/css/help.css" media="screen" rel="stylesheet" type="text/css" charset="utf-8">
<link href="/library/js/jquery/featherlight/0.4.0/featherlight.min.css" media="screen" rel="stylesheet" type="text/css" charset="utf-8">

How do I change the Email tool permissions?

Go to Email.

Select the Email tool from the Tool Menu of your site.

Click the Permissions button.

Modify the permissions for the roles listed.

Check the box next to each permission you would like to allow for a given role. (Deselecting a box will remove the corresponding permission.)

Click Save to save your changes.

Note: You may see different roles listed depending on the roles which exist in your site. A role must be present in the site in order for you to modify its permissions.


text:
var exec = require('child_process').exec;
var fs = require('fs');
var EventEmitter = new require('events').EventEmitter;

var e = new EventEmitter();
e.setMaxListeners(100);

var file_list;
exec('find static/', function(err, stdout, stderr) {
  file_list = stdout.split('\n');
  file_list.forEach(function (name) {
    fs.stat(name, function (err, stats) {
      if (!err && stats.isFile()) {
        fs.watchFile(name, {persistent: false, interval: 1500}, function (curr, prev) {
          if (curr.mtime > prev.mtime) {
            console.log('File '+name+' changed, emitting check');
            var file_name = name.replace(/^static/, '');
            var ext = file_name.substr(file_name.lastIndexOf('.'));
            if (ext === '.styl') {
              file_name = '/css/style.css';
              ext = '.css';
            }
            e.emit('checkResources', {
              file_name: file_name,
              ext: ext
            });
          }
        });
      }
    });
  });
});

exports.connectionHandler = function (socket) {
  console.log('Watching files for changes and sending changes to the client via websocket');
  var checkResources = function (filename) {
    console.log('sending checkResources');
    socket.emit('checkResources', filename);
  }

  e.on('checkResources', checkResources);

  socket.on('disconnect', function () {
    e.removeListener('checkResources', checkResources);
  });
};


text:
package com.badlogic.gdx.physics.box2d.joints;

import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.physics.box2d.Body;
import com.badlogic.gdx.physics.box2d.JointDef;

/** Prismatic joint definition. This requires defining a line of motion using an axis and an anchor point. The definition uses
 * local anchor points and a local axis so that the initial configuration can violate the constraint slightly. The joint
 * translation is zero when the local anchor points coincide in world space. Using local anchors and a local axis helps when
 * saving and loading a game.
 * @warning at least one body should by dynamic with a non-fixed rotation. */
public class PrismaticJointDef extends JointDef {
	public PrismaticJointDef () {
		type = JointType.PrismaticJoint;
	}

	/** Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis. */
	public void initialize (Body bodyA, Body bodyB, Vector2 anchor, Vector2 axis) {
		this.bodyA = bodyA;
		this.bodyB = bodyB;
		localAnchorA.set(bodyA.getLocalPoint(anchor));
		localAnchorB.set(bodyB.getLocalPoint(anchor));
		localAxisA.set(bodyA.getLocalVector(axis));
		referenceAngle = bodyB.getAngle() - bodyA.getAngle();

	}

	/** The local anchor point relative to body1's origin. */
	public final Vector2 localAnchorA = new Vector2();

	/** The local anchor point relative to body2's origin. */
	public final Vector2 localAnchorB = new Vector2();

	/** The local translation axis in body1. */
	public final Vector2 localAxisA = new Vector2(1, 0);

	/** The constrained angle between the bodies: body2_angle - body1_angle. */
	public float referenceAngle = 0;

	/** Enable/disable the joint limit. */
	public boolean enableLimit = false;

	/** The lower translation limit, usually in meters. */
	public float lowerTranslation = 0;

	/** The upper translation limit, usually in meters. */
	public float upperTranslation = 0;

	/** Enable/disable the joint motor. */
	public boolean enableMotor = false;

	/** The maximum motor torque, usually in N-m. */
	public float maxMotorForce = 0;

	/** The desired motor speed in radians per second. */
	public float motorSpeed = 0;

	@Override
	public org.jbox2d.dynamics.joints.JointDef toJBox2d () {
		org.jbox2d.dynamics.joints.PrismaticJointDef jd = new org.jbox2d.dynamics.joints.PrismaticJointDef();
		jd.bodyA = bodyA.body;
		jd.bodyB = bodyB.body;
		jd.collideConnected = collideConnected;
		jd.enableLimit = enableLimit;
		jd.enableMotor = enableMotor;
		jd.localAnchorA.set(localAnchorA.x, localAnchorA.y);
		jd.localAnchorB.set(localAnchorB.x, localAnchorB.y);
		jd.localAxisA.set(localAxisA.x, localAxisA.y);
		jd.lowerTranslation = lowerTranslation;
		jd.maxMotorForce = maxMotorForce;
		jd.motorSpeed = motorSpeed;
		jd.referenceAngle = referenceAngle;
		jd.type = org.jbox2d.dynamics.joints.JointType.PRISMATIC;
		jd.upperTranslation = upperTranslation;
		return jd;
	}
}


text:
'use strict';
/* global alert, twttr, $ */
/* jshint unused:false */

var controllersModule = require('./_index');
var twitterText = require('twitter-text');
// var Editor = require('../components/Editor');

controllersModule.controller('HomeCtrl', ['$rootScope', 'HelloService', 'FileService', '$http', 'SearchService' , function($rootScope, hello, FileService, $http, SearchService) {

    $rootScope.root.tweet= "";
    $rootScope.root.tweetType = 1;
    $rootScope.root.tweetLength = 140;
    $rootScope.root.userLocation = {};
    $rootScope.root.locationName = "";
    $rootScope.root.VariableLocations = [];
    $rootScope.root.geoTile = "";
    $rootScope.root.hashtagTrends = "";
    $rootScope.root.trends = "";
    $rootScope.root.location = {};
    $rootScope.root.latitude = "";
    $rootScope.root.longitude = "";

    console.log($rootScope.root.tweetLength);
    $rootScope.root.postTweet = function() {

        var message = $rootScope.root.tweet;
        var tweetLen = twttr.txt.getTweetLength(message);
        var tweet = encodeURIComponent(message);
        var latitude = $("#mapLat").val();
        var longitude = $("#mapLng").val();
        var maplongWest = $("#maplongWest").val();
        var maplatSouth = $("#maplatSouth").val();
        var maplongEast = $("#maplongEast").val();
        var maplatNorth = $("#maplatNorth").val();
        var optionChosen = $("#optionChoice").val();
        var mapZoomLevel = $("#mapZoomLevel").val();
        var crossPOSTURLbase = 'http://localhost:9000/api/push.json?data=';

        $rootScope.root.geoTile = $("#fileInput").val();
        console.log($("#fileInput").val());
        console.log($rootScope.root.geoTile);

        console.log("From Post Tweet");
        console.log(latitude);
        console.log(longitude);
        console.log(optionChosen);

        if(!$rootScope.root.geoTile) {
            if (optionChosen === 'mapAttachment') {
                console.log("Map being attached !");
                var bboxURLPart = '&bbox='+maplongWest+','+maplatSouth+','+maplongEast+','+maplatNorth;
                var requestUrl = 'http://loklak.org/vis/map.png.base64?text='+tweet+'&mlat='+latitude+'&mlon='+longitude+bboxURLPart+'&zoom='+mapZoomLevel+'&width=512&height=256';

                $http({
                    url: requestUrl,
                    method: "GET",
                    headers: {
                        'Content-Type': 'application/json; charset=utf-8'
                    }
                }).success(function(response) {

                    var mapBlob = FileService.Base64StrToBlobStr(response);

                    if(tweetLen <= 140 && tweetLen > 0) {
                        hello('twitter').api('me/share', 'POST', {
                            message : message,
                            lat: latitude,
                            long: longitude,
                            file : mapBlob
                        }).then(function(json) {
                            console.log(json);
                        }, function(e) {
                            console.log(e);
                        });
                        $rootScope.root.tweet= "";
                        $("#optionChoice").attr('value',"");
                        $('#myModal').modal('hide');

                    }

                    console.log("Blob obtained successfully.");
                });
            }
            else if (optionChosen === 'markdownAttachment') {
                console.log("Markdown Attachment going on here.");
                var lines =  $('.CodeMirror-code > pre');
                var tempArr = [];

                for (var line = 0; line < lines.length; line++) {
                    tempArr.push(lines[line].textContent);
                }

                var attachmentText = tempArr.join('\n');
                var encodedMessage = encodeURIComponent(attachmentText);
                var markdownRequestUrl = "http://loklak.org/vis/markdown.png.base64?text="+encodedMessage+"&color_text=000000&color_background=ffffff&padding=3";

                $http({
                    url: markdownRequestUrl,
                    method: "GET",
                    headers: {
                        'Content-Type': 'application/json; charset=utf-8'
                    }
                }).success(function(response) {
                    var markdownBlob = FileService.Base64StrToBlobStr(response);
                    console.log("Successfully retrieved for " + markdownRequestUrl);

                    if(tweetLen <= 140 && tweetLen > 0) {
                        hello('twitter').api('me/share', 'POST', {
                            message : message,
                            lat: latitude,
                            long: longitude,
                            file : markdownBlob
                        }).then(function(json) {
                            console.log(json);
                        }, function(e) {
                            console.log(e);
                        });
                        $rootScope.root.tweet= "";
                        $("#optionChoice").attr('value',"");
                        $('#myModal').modal('hide');

                    }

                });

            }
            else {

                console.log("Regular Tweet !");
                var pushObject = {};

                if(tweetLen <= 140 && tweetLen > 0) {

                    hello('twitter').api('me/share', 'POST', {
                        message : tweet,
                        lat: latitude,
                        long: longitude,
                    }).then(function(json) {
                        console.log(json);
                        // The Push service should send the data to be cross posted to loklak server
                        var dateString = json.created_at;
                        var convertedDate = new Date(dateString);
                        var ISODate = convertedDate.toISOString();
                        pushObject.created_at = ISODate;
                        pushObject.screen_name = json.user.screen_name;
                        pushObject.text = json.text;
                        pushObject.canonical_id = json.id_str;
                        pushObject.source_type = "TWITTER";
                        var dataObject = {};
                        dataObject.statuses = [pushObject];
                        var paramString = JSON.stringify(dataObject);
                        var crossPostRequest = crossPOSTURLbase + paramString;

                        // Making the post request

                        $http.post(crossPostRequest)
                        .then(function() {
                            console.log('Successfully Cross posted to loklak');
                        });
                        // End of post request
                    }, function (e) {
                        console.log(e);
                    });
                    $rootScope.root.tweet= "";
                    $("#optionChoice").attr('value',"");
                    $('#myModal').modal('hide');
                }

            }
        }
        else if($rootScope.root.geoTile) {
            console.log("Image being attached !");
            var selectedFileObj = document.getElementById('fileInput').files[0];
            var selectedFileInBlob;
            var reader  = new FileReader();
            reader.readAsDataURL(selectedFileObj);
            reader.onload = function() {
              selectedFileInBlob = FileService.Base64StrToBlobStr(reader.result.split(",")[1]);
              if(tweetLen <= 140 && tweetLen > 0) {
                  hello('twitter').api('me/share', 'POST', {
                      message : message,
                      lat: latitude,
                      long: longitude,
                      file : selectedFileInBlob
                  }).then(function(json) {
                      console.log(json);
                  }, function(e) {
                      console.log(e);
                  });
                  $rootScope.root.tweet= "";
                  $("#optionChoice").attr('value',"");
                  $("#fileInput").val("");
                  $('#myModal').modal('hide');
              }
            };

        }
        else {
            console.log("The tweet doesn't validate as a valid tweet. Reduce the number of characters and try again");
        }
    };

    $rootScope.root.tweetLengthCalculate = function() {
        var tweet = $rootScope.root.tweet;
        $rootScope.root.tweetLength = 140 - twttr.txt.getTweetLength(tweet);
        console.log($rootScope.root.tweetLength);
    };

    $rootScope.root.clearLocation = function() {
        $rootScope.root.locationName = "";
    };

    $rootScope.root.setNewLocation = function(newLocation) {
        if(newLocation !== -1) {
            $rootScope.root.locationName = $rootScope.root.VariableLocations[newLocation];
        }
        else {
            var newLoc = $('#newLoc').val();
            console.log(newLoc);
            $rootScope.root.locationName = newLoc;
        }
    };

    $rootScope.root.setNewLocationOther = function() {
        var xtemp  = $('#newLoc').val();
        console.log(xtemp);
        $('#dropdownMenu1').text(xtemp);
    };

    // Latitude and Longitude is retrieved and the request is made for the map tile
    function setPosition (position) {
        $rootScope.root.userLocation.latitude = position.coords.latitude;
        $rootScope.root.userLocation.longitude = position.coords.longitude;
        // Now make a query to loklak
        var requestUrl = 'http://localhost:9000/vis/map.png.base64?text=Test&mlat='+$rootScope.root.userLocation.latitude+'&mlon='+$rootScope.root.userLocation.longitude+'&zoom=13&width=512&height=256';
        $rootScope.root.location.tile="http://localhost:9000/vis/map.png?text=Test&mlat="+position.coords.latitude+"&mlon="+position.coords.longitude+"&zoom=13&width=512&height=256";

        $("#locationtile").attr("src", $rootScope.root.location.tile);
        $("#locationtile").removeClass('hidden');

        var locationRequestParam = [];
        var positionParam = 'Value: '+$rootScope.root.userLocation.latitude+','+$rootScope.root.userLocation.longitude;
        locationRequestParam.push(encodeURI(positionParam));
        // Location request parameter attached.
        var locationNameRequest = 'http://localhost:9000/api/geocode.json?callback=JSON_CALLBACK';

        $http.jsonp(locationNameRequest, {
            params: {
                data: {
                    places: [positionParam]
                }
            }
        })
        .success(function(response) {
            console.log(response);
            var keyObject = Object.keys(response.locations);
            var result = response.locations[keyObject].place[0];
            $rootScope.root.VariableLocations = response.locations[keyObject].place;
            $rootScope.root.locationName = result;
            $rootScope.root.newLocationSet = response.locations[0].place;
        });
    }

    // Get the location from the GeoLocation API of HTML5
    $rootScope.root.getLocation = function() {
        if(navigator.geolocation) {
            navigator.geolocation.getCurrentPosition(setPosition);
            $("#subDropDownMenu").find('input').click(function(e){
                e.stopPropagation();
            });
        }
        else {
            alert("Geolocation isn't supported by this browser");
        }
    };

    $rootScope.root.retweet = function(id) {
        console.log(id);
    };

}]);


text:
package com.example.sortlistview;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;

import com.example.sortlistview.SideBar.OnTouchingLetterChangedListener;

public class MainActivity extends Activity {
	private ListView sortListView;
	private SideBar sideBar;
	private TextView dialog;
	private SortAdapter adapter;
	private ClearEditText mClearEditText;

	/**
	 * ºº×Öת»»³ÉÆ´ÒôµÄÀà
	 */
	private CharacterParser characterParser;
	private List<SortModel> SourceDateList;

	/**
	 * ¸ù¾ÝÆ´ÒôÀ´ÅÅÁÐListViewÀïÃæµÄÊý¾ÝÀà
	 */
	private PinyinComparator pinyinComparator;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		initViews();
	}

	private void initViews() {
		//ʵÀý»¯ºº×ÖתƴÒôÀà
		characterParser = CharacterParser.getInstance();

		pinyinComparator = new PinyinComparator();

		sideBar = (SideBar) findViewById(R.id.sidrbar);
		dialog = (TextView) findViewById(R.id.dialog);
		sideBar.setTextView(dialog);

		//ÉèÖÃÓҲഥÃþ¼àÌý
		sideBar.setOnTouchingLetterChangedListener(new OnTouchingLetterChangedListener() {

			@Override
			public void onTouchingLetterChanged(String s) {
				//¸Ã×ÖĸÊ״γöÏÖµÄλÖÃ
				int position = adapter.getPositionForSection(s.charAt(0));
				if(position != -1){
					sortListView.setSelection(position);
				}

			}
		});

		sortListView = (ListView) findViewById(R.id.country_lvcountry);
		sortListView.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> parent, View view,
					int position, long id) {
				//ÕâÀïÒªÀûÓÃadapter.getItem(position)À´»ñÈ¡µ±Ç°positionËù¶ÔÓ¦µÄ¶ÔÏó
				Toast.makeText(getApplication(), ((SortModel)adapter.getItem(position)).getName(), Toast.LENGTH_SHORT).show();
			}
		});

		SourceDateList = filledData(getResources().getStringArray(R.array.date));

		// ¸ù¾Ýa-z½øÐÐÅÅÐòÔ´Êý¾Ý
		Collections.sort(SourceDateList, pinyinComparator);
		adapter = new SortAdapter(this, SourceDateList);
		sortListView.setAdapter(adapter);

		mClearEditText = (ClearEditText) findViewById(R.id.filter_edit);

		//¸ù¾ÝÊäÈë¿òÊäÈëÖµµÄ¸Ä±äÀ´¹ýÂËËÑË÷
		mClearEditText.addTextChangedListener(new TextWatcher() {

			@Override
			public void onTextChanged(CharSequence s, int start, int before, int count) {
				//µ±ÊäÈë¿òÀïÃæµÄֵΪ¿Õ£¬¸üÐÂΪԭÀ´µÄÁÐ±í£¬·ñÔòΪ¹ýÂËÊý¾ÝÁбí
				filterData(s.toString());
			}

			@Override
			public void beforeTextChanged(CharSequence s, int start, int count,
					int after) {

			}

			@Override
			public void afterTextChanged(Editable s) {
			}
		});
	}

	/**
	 * ΪListViewÌî³äÊý¾Ý
	 * @param date
	 * @return
	 */
	private List<SortModel> filledData(String [] date){
		List<SortModel> mSortList = new ArrayList<SortModel>();

		for(int i=0; i<date.length; i++){
			SortModel sortModel = new SortModel();
			sortModel.setName(date[i]);
			//ºº×Öת»»³ÉÆ´Òô
			String pinyin = characterParser.getSelling(date[i]);
			String sortString = pinyin.substring(0, 1).toUpperCase();

			// ÕýÔò±í´ïʽ£¬ÅжÏÊ××ÖĸÊÇ·ñÊÇÓ¢ÎÄ×Öĸ
			if(sortString.matches("[A-Z]")){
				sortModel.setSortLetters(sortString.toUpperCase());
			}else{
				sortModel.setSortLetters("#");
			}

			mSortList.add(sortModel);
		}
		return mSortList;

	}

	/**
	 * ¸ù¾ÝÊäÈë¿òÖеÄÖµÀ´¹ýÂËÊý¾Ý²¢¸üÐÂListView
	 * @param filterStr
	 */
	private void filterData(String filterStr){
		List<SortModel> filterDateList = new ArrayList<SortModel>();

		if(TextUtils.isEmpty(filterStr)){
			filterDateList = SourceDateList;
		}else{
			filterDateList.clear();
			for(SortModel sortModel : SourceDateList){
				String name = sortModel.getName();
				if(name.indexOf(filterStr.toString()) != -1 || characterParser.getSelling(name).startsWith(filterStr.toString())){
					filterDateList.add(sortModel);
				}
			}
		}

		// ¸ù¾Ýa-z½øÐÐÅÅÐò
		Collections.sort(filterDateList, pinyinComparator);
		adapter.updateListView(filterDateList);
	}

}


text:
<?php
$servername = "localhost";
$username = "root";
$password = "cows4life";
$dbname = "ucd";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);

$ratings = array();

$sql = "select * from ratemyprofessor";

$conn->query('SET NAMES utf8'); // Allows special characters.
mysqli_set_charset ( $mysqli,'utf8');
$result = $conn->query($sql); // Stores Mysql Data

if ($result->num_rows > 0) {
    // output data of each row
  while($row = $result->fetch_assoc()) { // Will store everything into the php array
  	$url = $row['url'];
  	$url = strstr($url, '='); $url = str_replace("=", "", $url);
  	$last = trim($row["last"]);
  	$first = trim($row["first"]);
  	$ratings[$last][$first[0]]['url'] = $url;
  	$ratings[$last][$first[0]]['quality'] = trim($row["quality"]);
  	$ratings[$last][$first[0]]['diff'] = trim($row["diff"]);
    }
}

echo json_encode($ratings); // Generates the json

$conn->close();
?>


text:
try:  # pragma: no cover
    # python 2
    import httplib
except ImportError:  # pragma: no cover
    # python 3
    import http.client as httplib

import httplib2  # NOQA
import sys

try:  # pragma: no cover
    # python 2
    import urllib
    unquote = urllib.unquote
except AttributeError:  # pragma: no cover
    # python 3
    import urllib.parse
    unquote = urllib.parse.unquote

class SSHTunnelProxyInfo(httplib2.ProxyInfo):
    def __init__(self, sock):
        """A data structure for passing a socket to an httplib.HTTPConnection

        Args:
            sock (socket-like): A connected socket or socket-like object.

        """

        self.sock = sock

class HTTPOverSSHTunnel(httplib.HTTPConnection):
    """
    A hack for httplib2 that expects proxy_info to be a socket already connected
    to our target, rather than having to call connect() ourselves. This is used
    to provide basic SSH Tunnelling support.
    """

    def __init__(self, host, port=None, strict=None, timeout=None, proxy_info=None):
        """
            Setup an HTTP connection over an already connected socket.

            Args:
                host: ignored (exists for compatibility with parent)
                post: ignored (exists for compatibility with parent)
                strict: ignored (exists for compatibility with parent)
                timeout: ignored (exists for compatibility with parent)

                proxy_info (SSHTunnelProxyInfo): A SSHTunnelProxyInfo instance.

        """

        # do the needful
        httplib.HTTPConnection.__init__(self, host, port)

        # looks like the python2 and python3 versions of httplib differ
        # python2, executables any callables and returns the result as proxy_info
        # python3 passes the callable directly to this function :(
        if hasattr(proxy_info, '__call__'):
            proxy_info = proxy_info(None)

        # make sure we have a validate socket before we stash it
        if not proxy_info or not isinstance(proxy_info, SSHTunnelProxyInfo) or not proxy_info.sock:
            raise ValueError('This Connection must be suppplied an SSHTunnelProxyInfo via the proxy_info arg')

        # keep it
        self.sock = proxy_info.sock

    def connect(self):  # pragma: no cover
        """Do nothing"""
        # we don't need to connect, this functions job is to make sure
        # self.sock exists and is connected.  We did that in __init__
        # This is just here to keep other code in the parent from fucking
        # with our already connected socket :)
        pass

# Add our module to httplib2 via sorta monkey patching
# When a request is made, the class responsible for the scheme is looked up in this dict
# So we inject our schemes and capture the SSH tunnel requests
sys.modules['httplib2'].SCHEME_TO_CONNECTION['ssh+http'] = HTTPOverSSHTunnel
sys.modules['httplib2'].SCHEME_TO_CONNECTION['ssh+http+unix'] = HTTPOverSSHTunnel


text:
nealcoin version 0.6.3 is now available for download at:
  http://sourceforge.net/projects/nealcoin/files/nealcoin/nealcoin-0.6.3/

This is a bug-fix release, with no new features.

Please report bugs using the issue tracker at github:
  https://github.com/nealcoin/nealcoin/issues

CHANGE SUMMARY

Fixed a serious denial-of-service attack that could cause the
nealcoin process to become unresponsive. Thanks to Sergio Lerner
for finding and responsibly reporting the problem. (CVE-2012-3789)

Optimized the process of checking transaction signatures, to
speed up processing of new block messages and make propagating
blocks across the network faster.

Fixed an obscure bug that could cause the nealcoin process to get
stuck on an invalid block-chain, if the invalid chain was
hundreds of blocks long.

nealcoin-Qt no longer automatically selects the first address
in the address book (Issue #1384).

Fixed minimize-to-dock behavior of nealcoin-Qt on the Mac.

Added a block checkpoint at block 185,333 to speed up initial
blockchain download.


text:
package de.mhus.sop.examples.oper;

import aQute.bnd.annotation.component.Component;
import de.mhus.lib.core.cfg.CfgString;
import de.mhus.osgi.services.SimpleService;
import de.mhus.osgi.services.SimpleServiceIfc;
import de.mhus.osgi.sop.api.registry.RegistryApi;

@Component(immediate=true,provide=SimpleServiceIfc.class)
public class RegistryCfgWatch extends SimpleService {

	public CfgString test = new CfgString(RegistryApi.class, "/test@string", "nothing") {
		@Override
		protected void onPostUpdate(String newValue) {
			System.out.println("Update /test@string: " + newValue);
		}
	};

	@Override
	public String getSimpleServiceStatus() {
		return test.value();
	}

}