Skip to content
cpp logo

C++

C++ is a popular and widely used mid-level language. It was designed as an extension of the C language.

Here are 19,232 public repositories matching this topic...

azl397985856
azl397985856 commented Sep 27, 2019

给定一个 N 叉树,找到其最大深度。

最大深度是指从根节点到最远叶子节点的最长路径上的节点总数。

例如,给定一个 3叉树 :

image

我们应返回其最大深度,3。

说明:

树的深度不会超过 1000。
树的节点总不会超过 5000。

来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/maximum-depth-of-n-ary-tree
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。

chriseth
chriseth commented Oct 2, 2019

When generating the Yul intermediate code of Solidity programs, strings are always translated to hex numbers. This prevents readability of IR code. Because of that, the code generator should detect if a string can be represented in printable ascii chars (for safety) and use that instead.

How to implement:

Add a function std::string formatAsStringOrNumber(std::string const& _value) in `l

skychef
skychef commented Oct 5, 2019

https://github.com/microsoft/vcpkg/blob/47c6b3f557f305969bb271d10ad4b0b0d936ad23/scripts/cmake/vcpkg_replace_string.cmake#L4

Does the function replace just the first instance matched or every single instance found inside the file?

Could the line

Replace a string in a file.

Be modified to reflect the exact behaviour please? I looked at the documentation at https://vcpkg.readthedocs

jackgerrits
jackgerrits commented Aug 14, 2019

As as a user I would expect all of the following calls to behave indentically. Only the first two calls works, the other two are incorrect. All of these should be able to parse a multiline example.

ex = vw.parse("| a:1 b:0.5\n0:0.1:0.75 | a:0.5 b:1 c:2")
print(ex)

ex = vw.parse("""| a:1 b:0.5
0:0.1:0.75 | a:0.5 b:1 c:2""")
print(ex)

ex = vw.parse("""
| a:1 b:0.5
0:0.1:0.75 | a:0
mattgodbolt
mattgodbolt commented Jun 23, 2019

Consider https://gcc.godbolt.org/z/O4aVOC - this fails with a linker error: undefined reference to std::filesystem::__cxx11::directory_iterator::operator*() const'`

It was pointed out on discord that if the executable comes first, the link succeeds, i.e. this is a link order issue.

Specifically:

/opt/compiler-explorer/gcc-8.3.0/bin/g++ -g -o /tmp/output.s -masm=intel -fdiagnostics
samwalshnz
samwalshnz commented Apr 6, 2019

User story:
I'm watching a YouTube video. The person speaking in the video pauses for a moment before sentences. The pauses are long enough to be considered as 'silent' to BackgroundMusic and therefore the music plays, but then the person speaking in the video continues speaking, triggering the music playback to stop. Note: there's also a delay between the moment the person starts speaking a

jroweboy
jroweboy commented Apr 3, 2019

Overview

As suggested in #4623, Citra should support binding a hotkey to activate the frontend microphone implementation. Games that use the microphone tend to enable the mic while launching, even if the game is not going to read the data from the shared page till much later.

My personal design suggestions for implementors:

Support for this feature should fully stop any input stre

kunaltyagi
kunaltyagi commented Oct 9, 2019

Your Environment

  • Operating System and version: CI Ubuntu 18.04
  • Compiler: gcc 5.4
  • PCL Version: HEAD

Context

Prevents #3379 from being merged

Current Behavior

Warning as reported by the CI

[ 67%] Building CXX object test/features/CMakeFiles/test_cvfh_estimation.dir/test_cvfh_estimation.cpp.o
/__w/1/s/apps/cloud_composer/src/cloud_view.cpp: In copy constructor 'pcl:
You can’t perform that action at this time.