ping pong demo build problem

Using stack 2.1.3 on Ubuntu 18.04 I received the following build errors after executing "stack build".
Sorry if this is obvious. I'm just starting to learn Haskell development.
ouroboros-network-framework      > Building executable 'demo-ping-pong' for ouroboros-network-framework-<IP_ADDRESS>..
ouroboros-network-framework      > [1 of 2] Compiling Network.TypedProtocol.PingPong.Codec.CBOR
ouroboros-network-framework      > [2 of 2] Compiling Main
ouroboros-network-framework      > Linking .stack-work/dist/x86_64-linux/Cabal-<IP_ADDRESS>/build/demo-ping-pong/demo-ping-pong ...
ouroboros-network-framework      > /home/shawn/.stack/snapshots/x86_64-linux/9a74558ec27b3341252693aaedb04f5d5cb773cb18d190aeaaca4ea13c222c20/8.6.5/lib/x86_64-linux-ghc-8.6.5/serialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd/libHSserialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd.a(Class.o):serialisezm0zi2zi1zi0zmFwxkEBqWdesHlC2a9XFtWd_CodecziSerialiseziClass_zdfSerialiseMapzuzdcdecode_info: error: undefined reference to 'cborgzm0zi2zi2zi1zmCPTBBL2ce7IyDD3kGHixI_CodecziCBORziDecoding_Decoder_con_info'
ouroboros-network-framework      > /home/shawn/.stack/snapshots/x86_64-linux/9a74558ec27b3341252693aaedb04f5d5cb773cb18d190aeaaca4ea13c222c20/8.6.5/lib/x86_64-linux-ghc-8.6.5/serialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd/libHSserialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd.a(Class.o):serialisezm0zi2zi1zi0zmFwxkEBqWdesHlC2a9XFtWd_CodecziSerialiseziClass_zdfSerialiseMapzuzdcdecode_info: error: undefined reference to 'cborgzm0zi2zi2zi1zmCPTBBL2ce7IyDD3kGHixI_CodecziCBORziDecoding_Decoder_con_info'
[... more similar errors...]

Forgot to mention that this is building the 1.8.0 tag.

Tried with 1.9.1 but still won't build on Ubuntu 18.04.
What am I missing?
ouroboros-network-framework> [2 of 2] Compiling Main
ouroboros-network-framework> Linking .stack-work/dist/x86_64-linux/Cabal-<IP_ADDRESS>/build/demo-ping-pong/demo-ping-pong ...
ouroboros-network-framework> /home/shawn/.stack/snapshots/x86_64-linux/9a74558ec27b3341252693aaedb04f5d5cb773cb18d190aeaaca4ea13c222c20/8.6.5/lib/x86_64-linux-ghc-8.6.5/serialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd/libHSserialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd.a(Class.o):serialisezm0zi2zi1zi0zmFwxkEBqWdesHlC2a9XFtWd_CodecziSerialiseziClass_zdfSerialiseMapzuzdcdecode_info: error: undefined reference to 'cborgzm0zi2zi2zi1zmCPTBBL2ce7IyDD3kGHixI_CodecziCBORziDecoding_Decoder_con_info'
ouroboros-network-framework> /home/shawn/.stack/snapshots/x86_64-linux/9a74558ec27b3341252693aaedb04f5d5cb773cb18d190aeaaca4ea13c222c20/8.6.5/lib/x86_64-linux-ghc-8.6.5/serialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd/libHSserialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd.a(Class.o):serialisezm0zi2zi1zi0zmFwxkEBqWdesHlC2a9XFtWd_CodecziSerialiseziClass_zdfSerialiseMapzuzdcdecode_info: error: undefined reference to 'cborgzm0zi2zi2zi1zmCPTBBL2ce7IyDD3kGHixI_CodecziCBORziDecoding_Decoder_con_info'
ouroboros-network-framework> /home/shawn/.stack/snapshots/x86_64-linux/9a74558ec27b3341252693aaedb04f5d5cb773cb18d190aeaaca4ea13c222c20/8.6.5/lib/x86_64-linux-ghc-8.6.5/serialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd/libHSserialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd.a(Class.o):serialisezm0zi2zi1zi0zmFwxkEBqWdesHlC2a9XFtWd_CodecziSerialiseziClass_zdfSerialiseIntMapzuzdcdecode_info: error: undefined reference to 'cborgzm0zi2zi2zi1zmCPTBBL2ce7IyDD3kGHixI_CodecziCBORziDecoding_Decoder_con_info'
ouroboros-network-framework> /home/shawn/.stack/snapshots/x86_64-linux/9a74558ec27b3341252693aaedb04f5d5cb773cb18d190aeaaca4ea13c222c20/8.6.5/lib/x86_64-linux-ghc-8.6.5/serialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd/libHSserialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd.a(Class.o):serialisezm0zi2zi1zi0zmFwxkEBqWdesHlC2a9XFtWd_CodecziSerialiseziClass_zdfSerialiseIntMapzuzdcdecode_info: error: undefined reference to 'cborgzm0zi2zi2zi1zmCPTBBL2ce7IyDD3kGHixI_CodecziCBORziDecoding_Decoder_con_info'
ouroboros-network-framework> /home/shawn/.stack/snapshots/x86_64-linux/9a74558ec27b3341252693aaedb04f5d5cb773cb18d190aeaaca4ea13c222c20/8.6.5/lib/x86_64-linux-ghc-8.6.5/serialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd/libHSserialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd.a(Class.o)(.text+0x1b8b): error: undefined reference to 'cborgzm0zi2zi2zi1zmCPTBBL2ce7IyDD3kGHixI_CodecziCBORziDecoding_zdfApplicativeDecoderzuzdcliftA2_closure'
ouroboros-network-framework> /home/shawn/.stack/snapshots/x86_64-linux/9a74558ec27b3341252693aaedb04f5d5cb773cb18d190aeaaca4ea13c222c20/8.6.5/lib/x86_64-linux-ghc-8.6.5/serialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd/libHSserialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd.a(Class.o)(.text+0x1b95): error: undefined reference to 'cborgzm0zi2zi2zi1zmCPTBBL2ce7IyDD3kGHixI_CodecziCBORziDecoding_zdfApplicativeDecoderzuzdcpure_closure'
ouroboros-network-framework> /home/shawn/.stack/snapshots/x86_64-linux/9a74558ec27b3341252693aaedb04f5d5cb773cb18d190aeaaca4ea13c222c20/8.6.5/lib/x86_64-linux-ghc-8.6.5/serialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd/libHSserialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd.a(Class.o)(.text+0x1d53): error: undefined reference to 'cborgzm0zi2zi2zi1zmCPTBBL2ce7IyDD3kGHixI_CodecziCBORziDecoding_zdfApplicativeDecoderzuzdcliftA2_closure'
ouroboros-network-framework> /home/shawn/.stack/snapshots/x86_64-linux/9a74558ec27b3341252693aaedb04f5d5cb773cb18d190aeaaca4ea13c222c20/8.6.5/lib/x86_64-linux-ghc-8.6.5/serialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd/libHSserialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd.a(Class.o)(.text+0x1d5d): error: undefined reference to 'cborgzm0zi2zi2zi1zmCPTBBL2ce7IyDD3kGHixI_CodecziCBORziDecoding_zdfApplicativeDecoderzuzdcpure_closure'
ouroboros-network-framework> /home/shawn/.stack/snapshots/x86_64-linux/9a74558ec27b3341252693aaedb04f5d5cb773cb18d190aeaaca4ea13c222c20/8.6.5/lib/x86_64-linux-ghc-8.6.5/serialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd/libHSserialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd.a(Class.o)(.text+0x25ff): error: undefined reference to 'cborgzm0zi2zi2zi1zmCPTBBL2ce7IyDD3kGHixI_CodecziCBORziDecoding_zdfApplicativeDecoderzuzdcliftA2_closure'
ouroboros-network-framework> /home/shawn/.stack/snapshots/x86_64-linux/9a74558ec27b3341252693aaedb04f5d5cb773cb18d190aeaaca4ea13c222c20/8.6.5/lib/x86_64-linux-ghc-8.6.5/serialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd/libHSserialise-<IP_ADDRESS>-FwxkEBqWdesHlC2a9XFtWd.a(Class.o)(.text+0x260c): error: undefined reference to 'cborgzm0zi2zi2zi1zmCPTBBL2ce7IyDD3kGHixI_CodecziCBORziDecoding_zdfApplicativeDecoderzuzdcpure_closure'
ouroboros-network-framework> collect2: error: ld returned 1 exit status
ouroboros-network-framework> gcc' failed in phase Linker'. (Exit code: 1)
--  While building package ouroboros-network-framework-<IP_ADDRESS> using:
/home/shawn/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_<IP_ADDRESS>_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-linux/Cabal-<IP_ADDRESS> build --ghc-options ""
Process exited with code: ExitFailure 1
--  While building package cardano-crypto-wrapper-1.3.0 using:
/home/shawn/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_<IP_ADDRESS>_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-linux/Cabal-<IP_ADDRESS> build --ghc-options ""
Process exited with code: ExitFailure 1
--  While building package small-steps-<IP_ADDRESS> using:
/home/shawn/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_<IP_ADDRESS>_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-linux/Cabal-<IP_ADDRESS> build --ghc-options ""
Process exited with code: ExitFailure 1

You might need to remove your .stack-work directory, or try cabal build - most of us use it with a great success.

I switched to building with cabal and now I get the following version conflict when building 1.9.3.
Looks like the version of base is newer than the maximum version specified by Win32-network.
I'm not sure why it's building Win32-network on UBuntu.
Any advice on this?
$ cabal build
Warning: Requested index-state2020-01-31T00:00:00Z is newer than
'hackage.haskell.org'! Falling back to older state (2020-01-30T23:28:20Z).
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: Win32-network-<IP_ADDRESS> (user goal)
[__1] next goal: base (dependency of Win32-network)
[__1] rejecting: base-<IP_ADDRESS>/installed-4.1... (conflict: Win32-network =>
base>=4.5 && <4.13)
[__1] rejecting: base-<IP_ADDRESS>, base-<IP_ADDRESS>, base-<IP_ADDRESS>, base-<IP_ADDRESS>,
base-<IP_ADDRESS>, base-<IP_ADDRESS>, base-<IP_ADDRESS>, base-<IP_ADDRESS>, base-<IP_ADDRESS>,
base-<IP_ADDRESS>, base-<IP_ADDRESS>, base-<IP_ADDRESS>, base-<IP_ADDRESS>, base-<IP_ADDRESS>,
base-<IP_ADDRESS>, base-<IP_ADDRESS>, base-<IP_ADDRESS>, base-<IP_ADDRESS>, base-<IP_ADDRESS>,
base-<IP_ADDRESS>, base-<IP_ADDRESS>, base-<IP_ADDRESS>, base-<IP_ADDRESS>, base-<IP_ADDRESS>,
base-<IP_ADDRESS>, base-<IP_ADDRESS>, base-<IP_ADDRESS>, base-<IP_ADDRESS> (constraint from
non-upgradeable package requires installed instance)
[__1] fail (backjumping, conflict set: Win32-network, base)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, Win32-network

I suspect that you're using the wrong ghc version. You should use ghc 8.6.5 when building.

It would help if there were clear instructions on how to setup a correct compila
tion environment on Ubuntu.
I installed haskell platform from the haskell website.
First the Ubuntu version which was too old and now the generic version which see
ms to be too new.
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.8.3

Take a look at https://github.com/input-output-hk/cardano-node/blob/master/doc/building-running.md . The instructions has improved since you filed this ticket.

Thanks for the reference to the update instructions.  That was very helpful.
Everything is building great now!
It would be good if there was a link to that page in the README.md file.
Also, I noticed that the usage message for chairman has 2 descriptions and the s
econd one misspells Shelley.
$ chairman --help
Chairman sits in a room full of Shelley nodes, and checks if they are all
behaving ...
Usage: chairman (-t|--timeout Time) [-p|--require-progress Blocks]
--socket-path FILEPATH --config NODE-CONFIGURATION
[--signing-key FILEPATH] [--delegation-certificate FILEPATH]
Chairman Shelly application checks if Shelly nodes find consensus.


How do I make percentages work? I'm struggling insanely

So I have a viewmodel for my calculator where I handle the calculator expressions. When user presses %, they see % but the calculator from my experience doesn't understand that, so I have internal expression which should translate it to *0.01.
The problem:
For example 50-10% does not work at all. It should be 45 on normal calculator but it results in 49.9 on mine for some reason. What's crazy is that only multiplication works, for example "2*4%=0.08" (which is correct). Other operators do not work " + , - , / ".
// Handles the percent operation
    private fun handlePercent() {
        val currentValue = currentExpression.value
        if (currentValue.isNotEmpty() && currentValue.last().isDigit()) {
            currentExpression.value += "%"
            internalExpression += "*0.01"
        }
    }

    // Preprocess percentages in the expression
    private fun preprocessPercentages(expression: String): String {
        val regex = Regex("(\\d+\\.?\\d*)%")
        return regex.replace(expression) { matchResult ->
            val percentageValue = matchResult.groupValues[1]

            // Find the preceding expression to use as the base for the percentage calculation
            val precedingExpression = expression.substring(0, matchResult.range.first).trimEnd()
            val lastOperatorIndex = precedingExpression.lastIndexOfAny(charArrayOf('+', '-', '*', '/'))

            // Extract base number and correct the expression
            val baseExpression = if (lastOperatorIndex != -1) {
                precedingExpression.substring(0, lastOperatorIndex).trim()
            } else {
                "1" // Default to multiplying by 1 if no operator is found
            }

            // Replace with the correct percentage calculation
            "($baseExpression * $percentageValue * 0.01)"
        }
    }

    private fun evaluateExpression() {
        if (!canEvaluateExpression()) return

        try {
            // Preprocess the expression to handle percentages correctly
            val processedExpression = preprocessPercentages(internalExpression)

            // Evaluate the processed expression
            val result = Keval.eval(processedExpression)

            // Convert the result to BigDecimal for precise rounding
            val bigDecimalResult = BigDecimal(result).setScale(9, RoundingMode.HALF_UP).stripTrailingZeros()

            // Convert to string, handling cases like "336.0" -> "336"
            resultExpression.value = if (bigDecimalResult.scale() <= 0) {
                bigDecimalResult.toPlainString()
            } else {
                bigDecimalResult.toString()
            }

            // Update currentExpression and internalExpression with the result
            currentExpression.value = resultExpression.value
            internalExpression = resultExpression.value

        } catch (e: KevalZeroDivisionException) {
            resultExpression.value = "Error: You can't divide by zero"
        } catch (e: KevalInvalidArgumentException) {
            resultExpression.value = "Error: Invalid argument"
        } catch (e: KevalInvalidExpressionException) {
            resultExpression.value = "Error: Invalid expression"
        } catch (e: KevalInvalidSymbolException) {
            resultExpression.value = "Error: Invalid symbol '${e.invalidSymbol}'"
        } catch (e: KevalDSLException) {
            resultExpression.value = "Error: Invalid DSL configuration"
        } catch (e: Exception) {
            resultExpression.value = "Error: Invalid calculation"
        }
    }
}

Result expression is what shows as result in little text like Samsung or Google calculator. Current expression is self-explanatory. Internal expression is what calculator translates to itself, for example the division symbol or percentage.
I'm dying at this point

It's quite simple actually

the % is not a percentage unary operator, but the "remainder/modulo" operator, like in most programming languages, including Kotlin, just like "multiplication" is * and not ×.
% is a binary operator which will return the remainder of the left operand divided by the right operand (again, like in most programming languages)
If you want % to be a "percentage unary operator", you need to provide your own implementation. Please refer to the section about customization in the README.
Here is an example:
val KEVAL_INSTANCE = Keval.create { // builder instance
    includeDefault() // this function includes the built-in resources

    unaryOperator { // this function adds a unary operator ; you can call it several times
        symbol = '%'
        isPrefix = false // make it postfix
        implementation = { it / 100 }
    }
}

KEVAL_INSTANCE.eval("2 * 4%") // 0.08

In fact, I recommend you don't use includeDefault() and implement all the operators you want yourself since you're making a calculator. The parser shouldn't bundle functions that will never be used.

As for the second issue, please refer to this issue comment: https://github.com/sosauce/CuteCalc/issues/64#issuecomment-1994596913

TLDR: not a bug, but misusage

By the way, if you do want contextual percentage (which again, in expression evaluators, is ambiguous and not normative), you could pretreat the string before passing it to Keval. But this is not in scope of Keval's goal, so it will never be a feature.

val KEVAL_INSTANCE = Keval.create {
   ...

    function { // declares a custom function
        name = "percent"
        arity = 2
        implementation = { (x, percent) -> x * (1 + (percent / 100)) }
    }
}

KEVAL_INSTANCE.eval("percent(50, -10)") // 45

Thank you so much. You're bringing my sanity down.
Well I successfully made it so basic expressions like 2/4% or 50-10% are giving me a correct answer. I have another problem which is that I have no idea how to make support for more complex percent expressions, like 5+5%+5% like you can do a lot of these percentages on samsung calculator
// Preprocess percentages in the expression
    private fun preprocessExpression(expression: String): String {
        val regex = Regex("(\\d+\\.?\\d*)([+\\-*/])(\\d+\\.?\\d*)%")
        return regex.replace(expression) { matchResult ->
            val baseValue = matchResult.groupValues[1]
            val operator = matchResult.groupValues[2]
            val percentageValue = matchResult.groupValues[3]

            // Convert to the percent function format
            when (operator) {
                "+" -> "percent($baseValue, $percentageValue)"
                "-" -> "percent($baseValue, -$percentageValue)"
                "*" -> "$baseValue * ($percentageValue / 100)"
                "/" -> "$baseValue / ($percentageValue / 100)"
                else -> matchResult.value // Leave unchanged if no operator matched
            }
        }
    }

    // Define a custom Keval instance with the custom percent function
    private val kevalInstance = Keval.create {
        includeDefault() // Include default operators and functions

        function { // Define the custom 'percent' function
            name = "percent"
            arity = 2
            implementation = { (x, percent) -> x * (1 + (percent / 100)) }
        }
    }

    private fun evaluateExpression() {
        if (!canEvaluateExpression()) return

        try {
            // Preprocess the expression to handle percentages correctly
            val processedExpression = preprocessExpression(internalExpression)

            // Use the custom Keval instance to evaluate the expression
            val result = kevalInstance.eval(processedExpression)

            // Convert the result to BigDecimal for precise rounding
            val bigDecimalResult = BigDecimal(result).setScale(9, RoundingMode.HALF_UP).stripTrailingZeros()

            // Convert to string, handling cases like "336.0" -> "336"
            resultExpression.value = if (bigDecimalResult.scale() <= 0) {
                bigDecimalResult.toPlainString()
            } else {
                bigDecimalResult.toString()
            }

            // Update currentExpression and internalExpression with the result
            currentExpression.value = resultExpression.value
            internalExpression = resultExpression.value

        } catch (e: KevalZeroDivisionException) {
            resultExpression.value = "Error: You can't divide by zero"
        } catch (e: KevalInvalidArgumentException) {
            resultExpression.value = "Error: Invalid argument"
        } catch (e: KevalInvalidExpressionException) {
            resultExpression.value = "Error: Invalid expression"
        } catch (e: KevalInvalidSymbolException) {
            resultExpression.value = "Error: Invalid symbol '${e.invalidSymbol}'"
        } catch (e: KevalDSLException) {
            resultExpression.value = "Error: Invalid DSL configuration"
        } catch (e: Exception) {
            resultExpression.value = "Error: Invalid calculation"
        }
    }

this is an extremely complex issue.
your samsung calculator can do it easily because it is not an expression evaluator. Like most calculators, it sequential : you enter a value, then an operator, and another operand, and it outputs the result, and then you can continue again.
this is effectively equivalent to calculating things left to right, ignoring any precedence.
in such case, there are no ambiguities.
but this is not our case here.
the only idea I have is to pretreat the string to add parentheses to the expression, with regex lookbacks. this still seems extremely hard to me.
the other solution is to make a sequential calculator, and not an evaluator. at which point, Keval has no purpose.

to put it into perspective, in the real world: if you look at scientific calculators, which are NOT sequential, but evaluators like Keval, they don't have the percentage operator, because of this issue with precedence.

Oooh... now I understand. Damn, do you know any sequential calculator libraries? I instantly loved Keval because of how simple & good it is, so maybe there's something also like this.


@conda-forge-admin,please add bot automerge

Additional comment:
No response

Hi! This is the friendly automated conda-forge-webservice.
I just wanted to let you know that I added bot automerge in conda-forge/jupyterlab-favorites-feedstock#4.


New implementation of CPU nd_range parallel for for new runtime with better performance

This adds support for nd_range parallel for on CPU to the new runtime, with a twist:
The implementation relies on boost.fiber (which is a new dependency once this is merged). However, work groups are initially processed only by a single fiber, which iterates across the work items. This is also the execution model at the heart of scoped and hierarchical parallelism and very efficient.
As soon as a barrier is encountered, dedicated fibers per work items are spawned automatically to guarantee that all work items can reach the barrier. The original fiber only processes the first work item onwards, and the newly spawned fibers process the other items.
This means that as long as no barriers are in nd_range parallel for kernels, they are now close to the performance of hierarchical and scoped parallelism. For a triad, I'm measuring between 85 and 95% percent performance of the other models - I suspect the remaining performance gap is because of slightly larger overheads (e.g. spawning the fiber).
Of course, once barriers are involved it will be not competitive performance-wise vs hierarchical and scoped because of the context switching overhead of the fibers.
Supersedes #279 and #280

@sbalint98 fyi, this introduces boost.fiber and boost.context as new dependencies.


Remove Types module

@MoOx I think we should remove the Types module before a release. It only contains two abstract types, edgeInsets and point, and there is a high chance it will conflict with a Types module in your project if you do open ReactNative;.

point is only used for the contentOffset prop in ScrollView + subclasses and could therefore be declared in the ScrollView module. (Maybe it should be renamed to contentOffset, too?)
edgeInsets is only used for some props in View + subclasses and could therefore be declared in the View module.

Alternatively, if we don't go that way, we could rename Types to ViewPropTypes instead.

I totally dislike generic name indeed.
Both solutions works for me, I would go to have something that require less maintenance & that's more obvious.
Moving things into proper module make sense. Not sure ViewPropTypes is a good idea as this will not match RN ViewPropTypes at all.

Ok, so I'll prepare a PR for View.edgeInsets and ScrollView.contentOffset later today or tomorrow. I think these are more obvious?

I agree @cknitt

Yeah looks good

I won't erase the above comment, but upon further testing in the simulator, everything seems to work fine.
I tested the build locally, and posted when that went without errors. Then, I wanted to make sure that the later definition did not in fact replace the earlier one. So, I tried that bit out on Try Reason (because I did not want to start the simulator) and it didn't work at all and I commented as above.

Upon further testing, my suggestion only seems to have issues on Try Reason because of an already known issue (see the note on foo##bar); it's perfectly fine as tested on the simulator.

I made the mistake of testing on Try Reason as I forgot the issue with ## accessors. First I posted a followup, that my code did not actually work, then posted again saying it does after I tested on the simulator.
For some reason, my later posts did not show up (apparently my first post is timestamped five hours in the future). Sorry about the duplicate posts (now deleted).

In keeping with https://github.com/reasonml-community/bs-react-native/blob/master/reason-react-native/CONTRIBUTING.md, I'd rather keep different types (abstract types for View props, Js.t types for events/callback params).
I have created PR #488 with the changes I suggested.

@sgny I have merged my PR now to get rid of the Types module, sorry for not addressing your comments.
If we made a ContentOffset module, then the user would need to use ContentOffset.contentOffset to create an instance, or maybe ContentOffset.t. Both feel a bit weird IMHO.

ContentOffset.t is better than ContentOffset.contentOffset.
I think we should not be afraid to have redundant types as soon as they are not explicitely the same (in this case that's more probably because inheritance, so no big deal to use ScrollView.something in VirtualizedList for example)

@cknitt That's alright. I don't contest that ContentOffset.t is a bit ugly - perhaps create or make would have been better - but anyway, that's settled already.
@MoOx They are actually the same type, since contentOffset and contentInset are keys in Event.scrollEvent and we need accessors in a callback and accordingly Js.t definition.
How about we add the equivalent Js.t type to ScrollView and revise Event to refer to that type instead?

@sgny you last edits make sense :)

Can we close this issue?

@MoOx @cknitt Should I revise Event as I proposed or not?

Using ScrollViewElement.contentOffset also feels a bit weird IMHO.
I think we should better revisit this after the release (and some feedback from others users). So from my point of view, this issue can be closed, and we should open a new one later when we want to revisit this.

Using ScrollViewElement.contentOffset also feels a bit weird IMHO.
I think we should better revisit this after the release (and some feedback from others users). So from my point of view, this issue can be closed, and we should open a new one later when we want to revisit this.

Just as with element (FlatList.element, etc.), we'd have FlatList.contentOffset etc.

We can revisit this later.


No documentation of which metadata is backed up

Currently one has to look into the source to find out which metadata is backed up:
    Name       string      `json:"name"`
    Type       string      `json:"type"`
    Mode       os.FileMode `json:"mode,omitempty"`
    ModTime    time.Time   `json:"mtime,omitempty"`
    AccessTime time.Time   `json:"atime,omitempty"`
    ChangeTime time.Time   `json:"ctime,omitempty"`
    UID        uint32      `json:"uid"`
    GID        uint32      `json:"gid"`
    User       string      `json:"user,omitempty"`
    Group      string      `json:"group,omitempty"`
    Inode      uint64      `json:"inode,omitempty"`
    Size       uint64      `json:"size,omitempty"`
    Links      uint64      `json:"links,omitempty"`
    LinkTarget string      `json:"linktarget,omitempty"`
    Device     uint64      `json:"device,omitempty"`

times seem to have nanosecond resolution. I don't know if ctime is restored.
In particular, xattrs (incl. POSIX acl and Linux capabilities), and ext[234] special flags are not backed up or restored as far as I can see.
I see no mention of efficient extraction of sparse files (this is quite easy to do when chunking).

You're right, that's not documented yet. Most default attributes are saved and restored, ctime is not restored, and no extended attributes like ACL or capabilities are saved. Sparse files are not handled in a special way yet, and aren't restored. I hope that answers the questions until we have documented this properly.

@fd0 do you see the documentation somewhat around https://github.com/restic/restic/blob/master/doc/design.rst#trees-and-data ?

Ah, hm. That doesn't sound like the right place, because it is already outdated. For example, the ACL/extended attributes are not included in the Design document. Maybe a list in the manual would be good as a reference. We can amend that when new data is saved.

https://github.com/restic/restic/blob/master/doc/manual.rst#under-the-hood-browse-repository-objects ?

According to #25 it seems like xattrs are saved now. Is this documented anywhere?

No, not yet. Somebody needs to step up and add a section to the manual :)


Bug - Profile Information Not Saving

Description
This bug was reported by a user:

I am trying to set up my profile and the Twitter handle field keeps defaulting to my email address. I tried adding my handle and leaving it blank, and each time I select Save Changes, it defaults back to my email address and gives me an error so I cannot proceed. I also lost my answer to the first question somewhere in the process of trying to fix the Twitter handle issue.

Sounds like Twig might be importing the wrong variable on page load? Perhaps it's actually not saving at all however.

This sucks, but the profile needs a much bigger re-build, so I'm inclined to leave it for now.

Duplicate of #1167


Backport fixes for warnings reported by code analyzers in .NET 9

Description
Backport fixes for warnings reported by code analyzers in .NET 9.
Quality checklist

[x] Your code complies with our Coding Style.
[x] You've updated unit and/or integration tests for your change, where applicable.
[ ] You've updated documentation for your change, where applicable.
If your change affects other repositories, such as Documentation, Samples and/or MainSite, add linked PRs here.
[ ] There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.
[ ] You've added required license files and/or file headers (explaining where the code came from with proper attribution), where code is copied from StackOverflow, a blog, or OSS.

/azp run Steeltoe.All


Mechanical belts and hand cranks make the game crash

When placing mechanical belts or hand cranks into the world the game crashes right away, producing a menacingly big crashlog
https://user-images.githubusercontent.com/70542437/146473093-52b0719f-f54b-4718-a18a-32cfd12e54c7.mp4
Lines 574 and 580 of KineticTileEntity:

cachedBoundingBox = makeRenderBoundingBox();

return this.getRenderBoundingBox();

I actually don't know if i should leave this open or not since the fix hasn't been merged yet so I'll just keep it open and wait until it gets automatically closed, thanks


Page refers to Cognitive Services "Linguistic Analysis API" but I can't find this API

This page has good information but it refers to the Cognitive Services "Linguistic Analysis API" and I can't find this API in the current Microsoft Cognitive Services Docs.
https://docs.microsoft.com/en-us/azure/cognitive-services/
In the "Language" category, there is "Language Understanding (LUIS)", "QnA Maker", Text Analytics" and "Translator" -- it's unclear which if any of these would be "Linguistic Analysis API".
devdivcodingdays

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: f8a51dd9-65b7-5039-06d0-d096ad51d0bb
Version Independent ID: 9c2c99ed-8d17-7865-e680-2107b7f0ebf1
Content: Choosing a natural language processing technology - Azure Architecture Center
Content Source: docs/data-guide/technology-choices/natural-language-processing.md
Service: architecture-center
Sub-service: azure-guide
GitHub Login: @ZoinerTejada
Microsoft Alias: pnp

Thanks for reporting - this issue is under review. This is a Microsoft Internal DevOps Bug ID # 461712

Hi @mikekistler
Sorry for the delay.
The ticket was created some years ago, and the article was updated several times since then. The “Linguistic Analysis API” is not mentioned anymore.  You could use the new version.
I will close the ticket, but feel free to re-open if additional clarification is needed.

#please-close


Corrupted sessions using outside network routing (NAT)

Empire Version
2.0 beta
OS Information (Linux flavor, Python version)
debian
Expected behavior and description of the error, including any actions taken immediately prior to the error. The more detail the better.
I have conducted following testing:
Local testing
I get an agent session
-> interact
-> sysinfo (I get information back)

Public testing using http and http_foreign on VPS (NAT)
I get an agent session
-> interact
-> sysinfo (nothing happens)
Also I have tried with other commands but it seems like that any session I get is not responsive afterwards
I have tested this couple of times with identical configuration in both scenarios
Is this the issue relating two listeners http and http_foreign?

Please see the solution presented in https://github.com/EmpireProject/Empire/issues/363 . Re-open if this is still a problem. Thanks

@xorrior  Hi. This is not the same issue.
In this case like I explained there is a response, and Empire gets a session. The difference is, when it is done over NAT, commands like "sysinfo" and others are not affecting the agent.
Thank you

@Gr3yCod3riX Can you give me some more info on your NAT setup

@xorrior
dns hostname / external port 33999
mapped to:
internal IP / internal port 1100

2 things:
I have testing using empire through a NAT setup. The only way it will work with different internal and external ports, is to treat the external host as a re-director. Can you confirm that your empire setup matches what is shown in #363 and then run empire with the --debug 2 flag. Post the output shown when issuing the sysinfo or any other command. You can also remove the -w hidden option in the launcher to show error messages received.

It looks like NAT is working. I have used the same setup from #363 with no problems. Now only interaction after the session has been established is not working. These are the screenshots with --debug 2 command.
### After session negotiation:

### Issuing sysinfo command

### Issuing ps command

Thank you

@Gr3yCod3riX I went ahead and tested this setup again. I did not have any issues sending commands and receiving results. I am not able to reproduce this issue. Are you its not possible there is something else preventing agent comms? Otherwise, I unfortunately don't have an answer for you.

@xorrior Yes, I will try to test this in some other environment and figure out what should be blocking agent interaction but yet establishing the initial agent session.

@Gr3yCod3riX I'm going to close this out for now. Feel free to comment if you have any additional info. I'm sorry that I don't have a solid answer for you at this time.


Address Mapping Warnings Shown During Schema Validation

This changeset should clears some angry, red warnings being shown when the command concrete5 orm:validate-schema is executed, like this one:

There are a few other warnings still being reported that are a bit trickier to fix, and I may address them in a separate PR.  If anyone else would like to tackle them, they are as follows:
* The association Concrete\Core\Entity\OAuth\Scope#codes refers to the owning side field Concrete\Core\Entity\OAuth\AuthCode#scopes which is not defined as association, but as field.
* The association Concrete\Core\Entity\OAuth\Scope#codes refers to the owning side field Concrete\Core\Entity\OAuth\AuthCode#scopes which does not exist.
* The association Concrete\Core\Entity\OAuth\Scope#tokens refers to the owning side field Concrete\Core\Entity\OAuth\AccessToken#scopes which is not defined as association, but as field.
* The association Concrete\Core\Entity\OAuth\Scope#tokens refers to the owning side field Concrete\Core\Entity\OAuth\AccessToken#scopes which does not exist.

These are marked on one side as relationships (@ORM\ManyToMany), but on the other side as type-specified fields (@ORM\Column).

(closed and re-opened to re-trigger AppVeyor check)

(and again, for travis-ci this time...)


[TextField] Validations and required prop.

Added validations prop to text fields that takes a function or array of functions. If any of the validation functions return false the errorText will be displayed.
Added required prop. If true, requiredText prop (defaults to "This field is required.") will be displayed when the field is empty.
Relevant: https://github.com/callemall/material-ui/pull/1497 https://github.com/callemall/material-ui/issues/1280

I note really sure that we want to add too much logic inside this UI component.
Maybe better to create a new component. @hai-cea What do you think?

@oliviertassinari agreed. Validation should be done outside of the TextField component imo.


Issue with dotfiles exclusion?

For some reason, the exclusion of dotfiles doesn't seem to be working for me?
In my config I have the same as the example: ignored: /[\/\\]\./
However, any edits with vim which create files such as .filename.swp or other dotfile events fire. Other exclusion rules seem to work properly.
Is something wrong with my configuration?
I'm using chokidar 1.6.1 and node 6.7.0 on OS X 10.11

Depends on the rest of what you're doing, but that regex from the example probably won't work for dotfiles directly in cwd because they won't be preceded with a path separator.
For that you might try ignored: /(^|[\/\\])\../

I checked this new readme locally, seems to do the right thing. Updated the readme. Closing the issue, but if you're still having problems with this one let me know.

Perfect, thank you!


Extractor regex error getting and not downloaded video

Hello i get this error. ERROR: Unable to extract nsig function code (caused by RegexNotFoundError('Unable to extract Initial JS player n function name; please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; see  https://github.com/ytdl-org/youtube-dl/#user-content-installation  on how to update. Be sure to call youtube-dl with the --verbose option and include the complete output.')); please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; see  https://github.com/ytdl-org/youtube-dl/#user-content-installation  on how to update. Be sure to call youtube-dl with the --verbose option and include the complete output.
youtube  | 1 - 2024-08-01 09:50:24,872 - WARNING - Video not downloaded and status 0
youtube  | 1 - 2024-08-01 09:50:24,886 - INFO - Download video status updated. Id: 401092, Status: 0
youtube  | 1 - 2024-08-01 09:50:24,887 - INFO - Video init completed for Video URL: https://www.youtube.com/watch?v=lXNwBV79BLI
youtube  | [youtube] lXNwBV79BLI: Downloading webpage
youtube  | WARNING: Unable to download webpage: <urlopen error EOF occurred in violation of protocol (_ssl.c:992)>
youtube  | [youtube] gKvfmzhIYc0: Downloading API JSON
youtube  | WARNING: Unable to download webpage: <urlopen error EOF occurred in violation of protocol (_ssl.c:992)>
youtube  | [youtube] 7I3l8w6m94U: Downloading API JSON
Can you fix pls

Hello, please follow #30839 as asked when reporting your problem (which looks like a known issue).

@dirkf Hello bro, I downloaded the library up to date and I use it. But there is still the same error. I looked at the fixed code and saw that it was in the library. Despite this, my code is indexed to the video

Fixed in master code and https://github.com/ytdl-org/ytdl-nightly/releases/tag/2024.08.02


Crash when i use #define ELPP_THREAD_SAFE

I am facing crash when i use this macro. My code snippet looks like this -
define ELPP_THREAD_SAFE
define ELPP_NO_DEFAULT_LOG_FILE
include "../easylogging++.h"
when i build it, i get follwing warning -
easylogging++.h(1029): warning C4100: 'ms' : unreferenced formal parameter
and i am very sure crash is due to the macro. As when i comment the line, //#define ELPP_THREAD_SAFE, crash goes off.
Is it because of the above warning ?
So please suggest what should i change/add ? Also the macro is  ELPP_THREAD_SAFE & not _ELPP_THREAD_SAFE, but many times in answers i found it as _ELPP_THREAD_SAFE.

Warning has nothing to do with crash
We've seen cases like this when u have macro in one file not in other. Why don't people define it as compiler option? I don't understand

still it is crashing when I am setting as compiler option in Project Properties-->C/C++ --> Preprocessor - ELPP_THREAD_SAFE

does it crash when you use macro (LOG(WARNING))?

can you run this sample? What platform are you using? (compiler and OS specifically)

i am using windows and when i used LOG(WARNING) it doesnt crash.
Now i tried this very liitle code - and its crashing -
#define ELPP_THREAD_SAFE
#include "easylogging++.h"
INITIALIZE_EASYLOGGINGPP
void main()
{
el::Logger* mainLogger = el::Loggers::getLogger("main");
mainLogger->warn("abc");
}
and when i comment the line #define ELPP_THREAD_SAFE, it works well.
Please tell me whats wrong.

try CLOG(WARN, "main") << "abc"

i tried CLOG(WARN, "main") << "abc";
compile errors -
Error	1	error C2275: 'el::base::Writer' : illegal use of this type as an expression
Error	2	error C3861: 'CWARN': identifier not found

what compiler is it? have you tried the sample i asked you to run?

also can you try to getLoggers("default") instead of getLoggers("main") in your original sample?
If this works then you have problem with registering the logger. try using valgrind to find whether it's getting enough memory to register new logger

this code also crashing -
#define ELPP_THREAD_SAFE
#include "easylogging++.h"
INITIALIZE_EASYLOGGINGPP
void main()
{
el::Logger* mainLogger = el::Loggers::getLogger("default");
mainLogger->warn("abc");
}

hmm what about pthread.cc sample? what compiler is this? what version of c++? what windows? if you don't provide enough details i'm afraid i won't be able to help you

windows 7 service pack 1
when i use std::cout << __cplusplus << endl; the output was 199711
and i am using default compiler of Visual studio 2013

CLOG(WARNING, "main") << "abc"; worked well with #define ELPP_THREAD_SAFE.
But when i use mainLogger->warn("abc"); it crashes. Thanks for your help.

@mkhan3189 you ask "Why don't people define it as compiler option? I don't understand"
It's because the documentation does not even make it clear that these flags need to be #defined before including easylogging++.h and the documentation calls them "Configuration Macros" which is the wrong word for a pre-processor configuration constant, imho.
btw. I found this thready trying to work out how to use these "macros"

I am re-opening this because I am also experiencing a crash when logging very
fast from many (~72) threads.
It seems to be some sort of race condition. What makes me say that is that when
I log the output to terminal, the program doesn't crash, but when I log to a file with
shell redirection, it does crash.
Platform: ubuntu 14.04 x86-64
CPU : 8 core Intel(R) Core(TM) i7-4910MQ CPU @ 2.90GHz
Compiler : clang++-3.6
Compile flags: -std=c++1 -g
This is not compiler-specific: the same crash also occurs
when compiling with  g++ version 4.8.4
Here are the flags all my code is compiled with:
-D_ELPP_THREAD_SAFE=1
-D_ELPP_DEBUG_ERRORS=1
-D_ELPP_STACKTRACE_ON_CRASH=1
-D_ELPP_FORCE_USE_STD_THREAD=1
-D_ELPP_LOGGING_FLAGS_FROM_ARG=1

Here's how I initialize the logging library:
INITIALIZE_EASYLOGGINGPP
static const char *getThreadId() {
    static std::atomic_int pool;
    static thread_local char tid[11];
    if(0==tid[0]) {
        sprintf(tid, "%04d", pool++);
    }
    return tid;
}

static void initLogging(
    int  argc,
    char *argv[]
) {
    el::Configurations conf;
    conf.setGlobally(el::ConfigurationType::Format, "%datetime{%s.%g} %tid %levshort %loc %func: %msg");
    el::Helpers::installCustomFormatSpecifier(el::CustomFormatSpecifier("%tid", getThreadId));
    conf.set(el::Level::Trace,   el::ConfigurationType::Enabled, "0");
    conf.set(el::Level::Debug,   el::ConfigurationType::Enabled, "1");
    conf.set(el::Level::Verbose, el::ConfigurationType::Enabled, "0");
    conf.set(el::Level::Info,    el::ConfigurationType::Enabled, "1");
    conf.set(el::Level::Warning, el::ConfigurationType::Enabled, "1");
    conf.set(el::Level::Error,   el::ConfigurationType::Enabled, "1");
    conf.set(el::Level::Fatal,   el::ConfigurationType::Enabled, "1");
    conf.setGlobally(el::ConfigurationType::MillisecondsWidth, "6");
    el::Loggers::reconfigureAllLoggers(conf);
    START_EASYLOGGINGPP(argc, argv);
}

Here's a gdb stack dump of the crash
#0  0x000000000060a060 in el::base::DefaultLogDispatchCallback::dispatch(std::string&&) (this=0xa5af00,
logLine=<unknown type in /home/emogenet/cncsim/cncsim, CU 0x5649bd, DIE 0x796df1>) at ./Log.h:4205
#1  0x0000000000609e2a in el::base::DefaultLogDispatchCallback::handle (this=0xa5af00, data=0x7fffcf0f9a00)
at ./Log.h:4179
#2  0x000000000041a83f in el::base::LogDispatcher::dispatch (this=0x7fffcf0f9ad0) at ./Log.h:4486
#3  0x000000000041b67a in el::base::Writer::triggerDispatch (this=0x7fffcf0f9d40) at ./Log.h:5054
#4  0x000000000041b432 in el::base::Writer::processDispatch (this=0x7fffcf0f9d40) at ./Log.h:5037
#5  0x000000000041ab44 in el::base::Writer::~Writer (this=0x7fffcf0f9d40, __in_chrg=) at ./Log.h:4923
#6  0x000000000068993d in LoaderThread::run (this=0x1f55b00) at LoaderThread.h:58
#7  0x00007ffff6cd6f6f in ?? () from /home/emogenet/sw/qt-5.5.1/lib/libQt5Core.so.5
#8  0x0000003000c08182 in start_thread (arg=0x7fffcf0fa700) at pthread_create.c:312
#9  0x00000030004fa47d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Here's the offending line (line 4205) :
(gdb) l
4200	                    ELPP_INTERNAL_ERROR("Log file for [" << LevelHelper::convertToString(m_data->logMessage()->level()) << "] "
4201	                        << "has not been configured but [TO_FILE] is configured to TRUE. [Logger ID: "
4202	                        << m_data->logMessage()->logger()->id() << "]", false);
4203	                }
4204	            }
4205	            if (m_data->logMessage()->logger()->m_typedConfigurations->toStandardOutput(m_data->logMessage()->level())) {
4206	                if (ELPP->hasFlag(LoggingFlag::ColoredTerminalOutput))
4207	                    m_data->logMessage()->logger()->logBuilder()->convertToColoredOutput(&logLine, m_data->logMessage()->level());
4208	                ELPP_COUT << ELPP_COUT_LINE(logLine);
Finally, to confirm the misbehavior, I ran it with valgrind.
It spits a whole bunch of "Invalid read of size 8":
==2935== Invalid read of size 8
==2935==    at 0x607832: el::LogDispatchData::logMessage() const (Log.h:3343)
==2935==    by 0x60A03D: el::base::DefaultLogDispatchCallback::dispatch(std::string&&) (Log.h:4205)
==2935==    by 0x609E29: el::base::DefaultLogDispatchCallback::handle(el::LogDispatchData const*) (Log.h:4179)
==2935==    by 0x41A83E: el::base::LogDispatcher::dispatch() (Log.h:4486)
==2935==    by 0x41B679: el::base::Writer::triggerDispatch() (Log.h:5054)
==2935==    by 0x41B431: el::base::Writer::processDispatch() (Log.h:5037)
==2935==    by 0x41AB43: el::base::Writer::~Writer() (Log.h:4923)
==2935==    by 0x615529: LoaderThread::LoaderThread(Eigen::Transform<float, 3, 2, 0> const&, std::string const&, STLObject**, unsigned char, unsigned char, unsigned char) (LoaderThread.h:41)
==2935==    by 0x614B10: Piece::load() (Machine.cpp:33)
==2935==    by 0x615397: Piece::draw() (Machine.h:34)
==2935==    by 0x614F36: Part::draw() (Machine.cpp:64)
==2935==    by 0x60233E: Machine::draw() (Machine.h:228)
==2935==  Address 0x1bcc6a00 is not stack'd, malloc'd or (recently) free'd
==2935==
==2935== Invalid read of size 8
==2935==    at 0x607832: el::LogDispatchData::logMessage() const (Log.h:3343)
==2935==    by 0x60A057: el::base::DefaultLogDispatchCallback::dispatch(std::string&&) (Log.h:4205)
==2935==    by 0x609E29: el::base::DefaultLogDispatchCallback::handle(el::LogDispatchData const*) (Log.h:4179)
==2935==    by 0x41A83E: el::base::LogDispatcher::dispatch() (Log.h:4486)
==2935==    by 0x41B679: el::base::Writer::triggerDispatch() (Log.h:5054)
==2935==    by 0x41B431: el::base::Writer::processDispatch() (Log.h:5037)
==2935==    by 0x41AB43: el::base::Writer::~Writer() (Log.h:4923)
==2935==    by 0x615529: LoaderThread::LoaderThread(Eigen::Transform<float, 3, 2, 0> const&, std::string const&, STLObject**, unsigned char, unsigned char, unsigned char) (LoaderThread.h:41)
==2935==    by 0x614B10: Piece::load() (Machine.cpp:33)
==2935==    by 0x615397: Piece::draw() (Machine.h:34)
==2935==    by 0x614F36: Part::draw() (Machine.cpp:64)
==2935==    by 0x60233E: Machine::draw() (Machine.h:228)
==2935==  Address 0x1bcc6a00 is not stack'd, malloc'd or (recently) free'd
==2935==
The offending line (3343) where the bad read occur:
inline const LogMessage* logMessage(void) const { return m_logMessage; }

Crash has nothing to do with thread as assert failure suggests, ypu remove file configuration somewhere but didnt unset to file config
If you look at this sample and uncomment lines in the end and run and if it crashes it's related to thread if not it's ur config that u change in one of the 72 threads
https://github.com/easylogging/easyloggingpp/blob/master/samples/STL/pthread.cpp

Crash has nothing to do with thread as assert failure suggests, ypu remove file configuration
somewhere but didnt unset to file config

I never change the logging configuration after I set it in the main.
I do not use external files for logging configuration, everything is done programatically.
The only thing I do in the threads is something like : LOG(DEBUG) << "hello";

If you look at this sample and uncomment lines in the end and run and if it crashes it's
related to thread if not it's ur config that u change in one of the 72 threads

I just downloaded the sample, and as you suggested, I uncommented the lines at the end
and compiled it. The sample program has the exact same problem mine has:
- when left to run to console, it does not crash
- when logging to a file via shell redirection, it crashes
Here's the stack dump under gdb:
#0  malloc_consolidate (av=av@entry=0x7ffff0000020) at malloc.c:4151
#1  0x000000300047fdf8 in _int_malloc (av=0x7ffff0000020, bytes=1024) at malloc.c:3423
#2  0x00000030004827b0 in __GI___libc_malloc (bytes=1024) at malloc.c:2891
#3  0x000000300ac5edad in operator new(unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00000000004241e8 in __gnu_cxx::new_allocatorel::Configuration*::allocate (this=0x7ffff00017d8, __n=128) at /usr/include/c++/4.8/ext/new_allocator.h:104
#5  0x000000000041ebff in std::_Vector_base<el::Configuration*, std::allocatorel::Configuration* >::_M_allocate (this=0x7ffff00017d8, __n=128) at /usr/include/c++/4.8/bits/stl_vector.h:168
#6  0x0000000000419670 in std::vector<el::Configuration*, std::allocatorel::Configuration* >::_M_emplace_back_aux<el::Configuration* const&> (this=0x7ffff00017d8) at /usr/include/c++/4.8/bits/vector.tcc:404
#7  0x0000000000415475 in std::vector<el::Configuration*, std::allocatorel::Configuration* >::push_back (this=0x7ffff00017d8, __x=@0x7ffff7fbe830: 0x7ffff0000e30) at /usr/include/c++/4.8/bits/stl_vector.h:911
#8  0x0000000000413f2b in el::base::utils::RegistryWithPred<el::Configuration, el::Configuration::Predicate>::registerNew (this=0x7ffff00017c8, ptr=0x7ffff0000e30) at easylogging++.h:2075
#9  0x0000000000409f41 in el::Configurations::unsafeSet (this=0x7ffff00017c8, level=el::Level::Global, configurationType=el::ConfigurationType::Format, value="%datetime %level [%logger] %msg") at easylogging++.h:2821
#10 0x00000000004096db in el::Configurations::set (this=0x7ffff00017c8, level=el::Level::Global, configurationType=el::ConfigurationType::Format, value="%datetime %level [%logger] %msg") at easylogging++.h:2561
#11 0x0000000000409782 in el::Configurations::set (this=0x7ffff00017c8, conf=0x646f50) at easylogging++.h:2573
#12 0x0000000000409597 in el::Configurations::setFromBase (this=0x7ffff00017c8, base=0x646270) at easylogging++.h:2513
#13 0x000000000040d117 in el::Logger::configure (this=0x7ffff0001620, configurations=...) at easylogging++.h:3445
#14 0x000000000040cbc1 in el::Logger::Logger (this=0x7ffff0001620, id="logger3", configurations=..., logStreamsReference=0x6462a8) at easylogging++.h:3398
#15 0x000000000040dd7a in el::base::RegisteredLoggers::get (this=0x646220, id="logger3", forceCreation=true) at easylogging++.h:3638
#16 0x00000000004131e8 in el::Loggers::getLogger (identity="logger3", registerIfNotAvailable=true) at easylogging++.h:5787
#17 0x0000000000404237 in write (thrId=0x42c055) at z.cpp:76
#18 0x0000003000c08182 in start_thread (arg=0x7ffff7fbf700) at pthread_create.c:312
#19 0x00000030004fa47d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Here's valgrind:
==28925== Thread 4:
==28925== Invalid read of size 1
==28925==    at 0x4A0B0E2: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28925==    by 0x300ACBBD34: std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
==28925==    by 0x410E36: el::base::DefaultLogBuilder::build(el::LogMessage const*, bool) const (easylogging++.h:4448)
==28925==    by 0x40FF47: el::base::DefaultLogDispatchCallback::handle(el::LogDispatchData const*) (easylogging++.h:4179)
==28925==    by 0x41168E: el::base::LogDispatcher::dispatch() (easylogging++.h:4486)
==28925==    by 0x412631: el::base::Writer::triggerDispatch() (easylogging++.h:5054)
==28925==    by 0x4122D2: el::base::Writer::processDispatch() (easylogging++.h:5026)
==28925==    by 0x411ACA: el::base::Writer::~Writer() (easylogging++.h:4923)
==28925==    by 0x403CD3: write(void*) (z.cpp:53)
==28925==    by 0x3000C08181: start_thread (pthread_create.c:312)
==28925==    by 0x30004FA47C: clone (clone.S:111)
==28925==  Address 0x4c8bfd8 is 24 bytes inside a block of size 34 free'd
==28925==    at 0x4A092BC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28925==    by 0x300ACBA32E: std::basic_string<char, std::char_traits, std::allocator >::~basic_string() (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
==28925==    by 0x404AA7: getThreadId_CustomVersion() (z.cpp:99)
==28925==    by 0x41C9C4: std::_Function_handler<char const* (), char const* ()()>::_M_invoke(std::_Any_data const&) (functional:2057)
==28925==    by 0x416DDD: std::function<char const ()>::operator()() const (functional:2471)
==28925==    by 0x410E1A: el::base::DefaultLogBuilder::build(el::LogMessage const*, bool) const (easylogging++.h:4448)
==28925==    by 0x40FF47: el::base::DefaultLogDispatchCallback::handle(el::LogDispatchData const*) (easylogging++.h:4179)
==28925==    by 0x41168E: el::base::LogDispatcher::dispatch() (easylogging++.h:4486)
==28925==    by 0x412631: el::base::Writer::triggerDispatch() (easylogging++.h:5054)
==28925==    by 0x4122D2: el::base::Writer::processDispatch() (easylogging++.h:5026)
==28925==    by 0x411ACA: el::base::Writer::~Writer() (easylogging++.h:4923)
==28925==    by 0x403CD3: write(void*) (z.cpp:53)
==28925==

I am also having this problem running on Ubuntu 16.04 LTS.    I am using G++ to compile.   I am thinking it may be a compiler problem.

I confirm the behaviour on Ubuntu 16.04LTS using GCC 5.4.0.
std::system_error on first log if using  -DELPP_THREAD_SAFE

I have the same behaviour. I get the below crash:
(gdb) bt #0  0x080e11f8 in __gnu_cxx::new_allocator<el::Configuration*>::construct<el::Configuration*, el::Configuration* const&> (this=0x811fdc8, __p=0x1) #1  0x080e0f57 in std::allocator_traits<std::allocator<el::Configuration*> >::construct<el::Configuration*, el::Configuration* const&> (__a=..., __p=0x1) #2  0x080e0d68 in std::vector<el::Configuration*, std::allocator<el::Configuration*> >::push_back (this=0x811fdc8, __x=@0xffffc944: 0x811f000) #3  0x080e0ac8 in el::base::utils::RegistryWithPred<el::Configuration, el::Configuration::Predicate>::registerNew (this=0x811fdac, ptr=0x811f000)     at Linux_i686/gcc_5/easyloggingpp_9.96.4/include/easylogging++.h:1501 #4  0xf7957cea in el::Configurations::unsafeSet(el::Level, el::ConfigurationType, std::string const&) () from Linux_i686/gcc_5/easyloggingpp_9.96.4/lib/libeasyloggingpp.so #5  0xf79555e6 in el::Configurations::set(el::Level, el::ConfigurationType, std::string const&) () from Linux_i686/gcc_5/easyloggingpp_9.96.4/lib/libeasyloggingpp.so #6  0xf7957ddd in el::Configurations::setGlobally(el::ConfigurationType, std::string const&, bool) () from Linux_i686/gcc_5/easyloggingpp_9.96.4/lib/libeasyloggingpp.so #7  0xf7955707 in el::Configurations::setToDefault() () from Linux_i686/gcc_5/easyloggingpp_9.96.4/lib/libeasyloggingpp.so #8  0xf795f835 in el::base::RegisteredLoggers::RegisteredLoggers(std::shared_ptr<el::LogBuilder> const&) () from Linux_i686/gcc_5/easyloggingpp_9.96.4/lib/libeasyloggingpp.so #9  0xf796149c in el::base::Storage::Storage(std::shared_ptr<el::LogBuilder> const&) () from Linux_i686/gcc_5/easyloggingpp_9.96.4/lib/libeasyloggingpp.so #10 0x080dacbb in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at myclass.cpp:19 #11 0x080dafb8 in _GLOBAL__sub_I__ZN2el4base9elStorageE () at myclass.cpp:552 #12 0x080e186b in __libc_csu_init () #13 0xf756ce13 in __libc_start_main (main=0x80da4cb <main(int, char**)>, argc=1, argv=0xffffcc34, init=0x80e1820 <__libc_csu_init>, fini=0x80e1880 <__libc_csu_fini>, rtld_fini=0xf7fe59b0 <_dl_fini>, stack_end=0xffffcc2c)     at ../csu/libc-start.c:266

Hey, also met this problem relation with '-DELPP_THREAD_SAFE', clear is thus without this flag my app won't crash... But I do wanna threads safe ...


Refactor GraphPlan

Earlier, GraphPlan worked only on the spare_tire problem. On all the other planning problems, it provided a wrong solution or no solution at all. For example: air_cargo gave the solution [Unload(C1, P1, JFK), Unload(C2, P2, SFO)]. This solution is incomplete. Furthermore, the graph for have_cake_and_eat_cake_too never contained the action Bake(Cake). This usually happened when either preconditions or effects of an action had negative clauses, since GraphPlan, Graph, Level and Action classes were built to handle two knowledge bases, one for positive clauses and one for negative clauses. In the Level class, these were sometimes mixed up into a single list causing errors in finding mutex links. Nomenclature of Persistence actions were problematic too.
This PR solved these problems as follows:

[x] A new class UnaryAction has been created that operates on a single knowledge base and negative preconditions and effects are preceeded by a Not in their name, similar to clauses in propositional logic.
[x] The Level, Graph and GraphPlan classes have been re-written, integrating the positive and negative knowledge bases into a single knowledge base.
[x] air_cargo, spare_tire, three_block_tower, have_cake_and_eat_cake_too have been re-written using UnaryActions and positive effects and preconditions.
[x] spare_tire_graphplan has been re-written with the above changes in mind
[x] have_cake_and_eat_cake_too_graphplan, three_block_tower_graphplan and air_cargo_graphplan functions solve their respective planning problems using GraphPlan.
[x] A refine_solution function was added to convert the unordered solutions to a linear solution, much like what a total-order planner would output.
[x] A shopping_problem and its solution was added as an example.
[x] Included tests for GraphPlan.
[x] Modified test_graph_call according to the points above.
[x] Tests have been added for all the newly added functions.
[x] The planning notebook has been re-written according to these changes.
[ ] A detailed notebook section for GraphPlan and its helper classes was added.

Closes #907
Closes #903
GraphPlan is fully functional now and gives the correct solution for all problems given in the book. (Though it gives incomplete solutions for complicated problems sometimes, which will be ironed out later)

Thanks for this work. A few questions:

Why use NotAt(x, y) -- couldn't you use ~ At(x, y) ?
I don't understand why you need a UnaryAction. How is this different from Action? I realize that there were bugs in the previous implementation that you fixed, but could you have done that by fixing Action rather than introducing UnaryAction?

I understand all your points. I'll take care of these in the next update.

Excellent! Thanks.
On Wed, May 9, 2018 at 8:52 PM Aman Deep Singh<EMAIL_ADDRESS>wrote:

I understand all your points. I'll take care of these in the next update.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aimacode/aima-python/pull/921#issuecomment-387944323,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEKvLOtJ7xfKNzWEWAe2VcqI7S10ttMTks5tw7mEgaJpZM4T3C3l
.

@norvig There is another problem. FolKB is used as a knowledge base in all planning problems, but when FolKB encounters a clause that doesn't begin with an alphabet, it raises and exception "Not a definite clause". Hence, ~At has to be represented as NotAt internally. This can be solved in the following ways:

Create a new PlanningKB class within planning.py to handle such clauses. This is a simple solution but would lead to duplication of code and there will be no real use of this class (apart from checking variable naming conventions).
Convert and reconvert back and forth between the two representations as and when required. This is a good solution, but requires quite a lot of work in a lot of places, even in the later algorithms.
Get rid of the idea of a knowledge base altogether and use a list to store the clauses.

What do you think will be the best solution?

Changing the definition of PDDL will break the later algorithms in the module, but since those algorithms require a revisit anyway (hierarchical_search doesn't work either), it will be better to remove the UnaryAction class right now and rebuild everything from the top down and refactor wherever required, as almost nothing works correctly in the planning module. I'm on it.

This is nice; good work.  A few things:

Action.convert does the same thing to two arguments; it would be better to have it do one thing, and call it twice.
The expression ~At(obj, loc) is a unary expression whose op is ~ and whose first arg is At(obj, loc): Expr('~', Expr('At', obj, loc)).  So you can leave things as you have them, or, I think it would be slightly better if you allowed the inputs to PDDL and Action to be either strings or Exprs, and you could do something like this:

def convert_literal(literal):
    """If a literal is of the form ~P(X), convert it to NotP(X)."""
    if literal.op == '~':
        arg = literal.args[0]
        return Expr('Not' + arg.op, arg.args[0])

@norvig I'll incorporate your points into the next update, thanks!


Add feature for load and slicing of split reads

Hi, I'm currently working uncalled4 with direct RNA sequencing data basecalled with dorado 0.5.0
I encountered endless Warning messages which saying failed to open read #### during uncalled4 align with simple parameter:
uncalled4 align --bam-in input.bam reference.fa /fast5/dir -o output.bam

The run ended with following counter status:
Counter({'Success': 90691, 'Missing signal': 6696, 'Alignment too short': 133})

I think current uncalled4 couldn't load dorado's split reads. I believe my work may be able to help supporting split read loading temporary.
I intended to re-declare ReadBuffer with trimmed signal when split read detected to prevent potential malfunction, which is inefficient way.
Somehow, my new run with modified version ended without any warning/error and no running time changes.
The new run's Counter status was:
Counter({'Success': 97123, 'Alignment too short': 397})

Please review my commit and consider merge if you are interested in.
Thanks.

Thank you very much! I have not tested with the latest Dorado version and wasn't aware of the split read update. That might explain both of the currently open issues. I will test this soon and get back to you


Device limit

Once i set device limit for user it is working fine user can only create device as per device limit.
if i add a group(with 5 device in it) to a user and user's device limit is of 2 device and user have not created any device and try to create a device it is giving device limit reached error but that should not be happen because user have not created any device yet. but what happening is a group already contain 5 device that's why it is not allowing user to add any more device.
this situation is confusing.
because user with only limit of 2 device can have a group of 5 or 10 device.

All linked devices are counted against the limit. Traccar doesn't save any information about the original creator of a device.

it store user and device into user_device table so we can count from there how many device is created by user and define a limit constraint base on that.

I think it makes more sense to count all devices. I don't see any good reason to not count the ones in the group.

the only problem is that group can have a device more than users limit.

also if user is allowed only for 2 device and admin can attach that user with 5 groups each with 5 device than user will have 25 device.

Also admin can link limitless number of devices to user directly. He is admin.

Yes, but admin can do anything, including changing any limits.

that is fine admin can do whatever but it has to be in proper format like if admin want user to have many devices he can increase users limit.
but if admin will attach a group with more device than users limit without increasing limit is not proper or systematic way.

what i think is users should allowed to create a device if there is limit for device no matter what group is assigned to them.
if user allowed for 2 device and he is already with a group consist of 5 device still he should be able to create 2 device. just a suggetion.

If you can explain the use case, we can consider it. Just saying that you think it's better is not a good argument.

one argument that i have is user with limit of 5 device can not be in a group which have more than 5 device if all the links are count because that violates a constraint of device limit.
what we can do is admin can assign as many group he want to assign to user but limit will be count on the devices users have created.
means if user have limit of 5 device then there can not be more than 5 record for that user in user_device table.
i dont have any problem with current system may be i am wrong just wanted to confirm that is it issue or feature.

As I said, I want some business case for why someone would need it. It is implemented as it is, to make the code simpler. Simpler code means less bugs and issues.


trace/mount: Not working for containers without SYS_ADMIN

The trace mount is not working for containers that don't have the SYS_ADMIN capability. I'm opening this issue in this repo to track this but it's not related to Inspektor Gadget:
Inspektor Gadget reproducer
Start the trace mount on a terminal
$ sudo ./ig trace mount
CONTAINER                         COMM             PID        TID        CALL

Run a container that executes umount (exact same thing happens with mount)
$ sudo docker run -ti --rm --cap-add SYS_ADMIN --name=admin ubuntu /bin/bash -c "umount /foo"
umount: /foo: no mount point specified.

The event is logged in the first terminal
CONTAINER                         COMM             PID        TID        CALL
admin                             umount           236605     236605     umount("/foo", ) = -2

Running the same container image without SYS_ADMIN doesn't log any event:
$ sudo docker run -ti --rm --name=standard ubuntu /bin/bash -c "umount /foo"
umount: /foo: must be superuser to unmount.

CONTAINER                         COMM             PID        TID        CALL
admin                             umount           236605     236605     umount("/foo", ) = -2

bpftrace reproducer
After going deep, I found out that it's not related to Inspektor Gadget, for some weird reason the sys_enter_umount is not invoked for the container without SYS_ADMIN:
$ sudo bpftrace -e 'tracepoint:syscalls:sys_enter_umount /comm=="umount"/ { printf("enter umount\n"); } tracepoint:syscalls:sys_exit_umount /comm=="umount"/ { printf("exit umount\n"); }'
Attaching 2 probes...

$ sudo docker run -ti --rm --cap-add SYS_ADMIN --name=admin ubuntu /bin/bash -c "umount /foo"
umount: /foo: no mount point specified.

Both tracepoints are called in this case:
...
enter umount
exit umount
...

$ sudo docker run -ti --rm --name=standard ubuntu /bin/bash -c "umount /foo"
umount: /foo: must be superuser to unmount.

Only the sys_exit_umount is called in this case:
...
exit umount
...

I reproduced it in both, 6.2.0-060200-generic and 5.15.0-58-generic kernel versions on amd64.

Can you strace the process? I think it runs stat() on "foo", or uses getuid(), it notices the problem and does not even try the mount/umount system call.

According to strace it does the syscall:
$ docker run -ti --rm --name=standard ubuntu /bin/bash -c "apt-get update && apt-get install strace -y && strace umount /foo"

...
umount2("/foo", 0)                      = -1 EPERM (Operation not permitted)
....

I don't have a 5.10 kernel available right now, I tried with 5.4.0-137-generic and the issue is the same. I'm wondering now how I tested it on https://github.com/inspektor-gadget/inspektor-gadget/pull/1099.

Try Docker with seccomp disabled. Docker configures seccomp without allowing mount when cap_sys_admin is not set. Then, it's blocked by seccomp before the tracepoint.

The capabilities gadget should clarify that in the documentation so that users know they have to disable seccomp when trying to find the capabilities required by a container. It will become a problem on Kubernetes too when seccomp becomes enabled by default in new versions.

$ sudo docker run -ti --rm --security-opt=seccomp:unconfined --name=admin ubuntu /bin/bash -c "umount /foo"
umount: /foo: no mount point specified.

works fine.
Now the point is: why the sys_exit_umount is tracepoint is triggered when using seccomp? If sys_enter_umount is not triggered I'd expect sys_exit_umount not to be triggered as well. Is this a standard behavior on the kernel?

I don't think that's the path as in this case the process in not being killed.
I think this is the reason. In syscall_trace_enter, trace_sys_enter is called after __secure_computing(). On syscall_exit_work, trace_sys_exit is always called. I'm wondering if this behavior is correct, IIUC ptrace is called in both cases.


Deprecate use of AbstractFilterPage preview fields

This commit deprecates the use of 4 preview-related fields on the AbstractFilterPage base page class: preview_title, preview_subheading, preview_description, and preview_image.
Previously on both regular post previews (example) and condensed post previews (example), the template would use preview_title if set, otherwise it would use title. With this change, these templates use Wagtail's built-in seo_title field if set, otherwise it will fall back to title.
Regular post previews now use search_description instead of preview_description for the post's description text. Regular post previews no longer render the preview_subheading field if defined.
Regular post previews no longer render the preview_image field; this will impact how some page results appear, for example.
Previously, the Elasticsearch-based search of AFPs indexed the preview_title, preview_subheading, and preview_description field as part of its index, and included those fields in its search. It no longer does. Search still includes both a page's title field and its content field.
Filterable list RSS feeds (example) now use search_description instead of preview_description to populate the <description> field in the feed XML.
Note that the preview fields mentioned above still exist in the database and no data will be lost with this PR. They have been removed from the Wagtail admin edit view and will no longer be visible to editors. A future PR will remove the fields completely.
This PR also deprecates the Page Preview Fields report previously available in Wagtail.
How to test this PR
Compare the production blog against localhost. Note the change with posts that previously had preview images, production vs. local. Confirm that local RSS feed still works.
Notes and todos
@csebianlander I note that some existing search_description fields don't use a closing period, for example here:

Is this something we should fix before this change goes out and, if so, is this something we can do via script?
Checklist

[x] PR has an informative and human-readable title
[x] Changes are limited to a single goal (no scope creep)
[x] Code follows the standards laid out in the CFPB development guidelines
[x] Future todos are captured in comments and/or tickets

Is this something we should fix before this change goes out and, if so, is this something we can do via script?

Hmmm probably? If you write up a script and do a test run (basically just to check for any terminal punctuation -- almost always a period but I suppose it could be an exclamation or question), I can review the results to ensure nothing wonky crops up.
Otherwise this works perfectly on my local!


Pauminku distance to line

PolyUtil.distanceToLine() was not correct. Added a test to prove it.
Method and related tests corrected.

It seems travis fails because the emulator doesn't respond, please consider review the pull request regardless of that

This may fix https://github.com/googlemaps/android-maps-utils/issues/519

@googlebot

@pauminku Looks like this has a few conflicts, would you be able to resolve?

@barbeau I've merged all changes from origin's master and solved the conflict. There're a lot of changes on this merge (more than 2 years), but the pull request is for only 2 files (1 model class and 1 test class).

Thanks @pauminku!


Update to 1.20.4

Added a new folder for 1.20.4

Deleted the config.yml because it was generated during the build and I forgot to remove it from my commit

seems fine to me, but i've removed the gradle's newer wrapper version so it won't conflict until plugin's recode. Thanks for the PR :)


Add accessibility section and All in One Accessibility module to it

Add accessibility section and All in One Accessibility module to it

Looks good.  Thanks @isalmanhaider


AdvancedSteamSessions missing dependency to plugin SteamSockets

I feel the plugin AdvancedSteamSessions is missing a dependency to plugin SteamSockets.
Without it and proper configuration dedicated servers in the internet are non-operational.
https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/Networking/HowTo/SteamSockets/

Steam sockets is not a requirement of steam and dedicated servers work without it.


using web audio api with shaka-player

Have you read the FAQ and checked for duplicate open issues?
Yes
What version of Shaka Player are you using?
2.5.10 shaka-player.ui.js
Please ask your question
Hello,
i am trying to use the web audio api along with shaka player.
the shakaplayer script/css is included in html head.
customizing the ui etc. and dash video playback works fine.
now i wanted to use the web audio api to do some processing on the dash-video's audio.
var audioContext = new AudioContext();
var videoElement = document.getElementbyId('video');  //<- videolement has id="video"
var audioSourceNode = audioContext.createMediaElementSource(videoElement);
audioSourceNode.connect(audioContext.destination);
result is, that when trying to play the video now, it stops playing after view frames (2-6) searching within the timeline is "working" picture shows at new timepostion but again stops playback after view frames

when i comment the part
" var audioSourceNode = audioContext.createMediaElementSource(videoElement);
audioSourceNode.connect(audioContext.destination); "
playback is working propper again.

as dash files i used the "angle-one" as well as own files - all with same behavior..
Anyone maybe any idea of what i am doing wrong? Thanks in advance for every Help.
kind regards
tom

I'm not very familiar with WebAudio myself, and I'm not certain if anyone else on the team is.  At least, we've never used it in this project.
What you're doing at least seems to follow the broad strokes of the examples on MDN: https://developer.mozilla.org/en-US/docs/Web/API/MediaElementAudioSourceNode
Does anyone in the community have any experience with WebAudio who could maybe take a look and advise?

Thanks for the quick response - i already checked https://developer.mozilla.org/en-US/docs/Web/API/MediaElementAudioSourceNode - and still now luck :(
so still - if anyone can help  - please :)
the purpose for the audioprocessing would be to render a sort of audiometer that displays the audiolevel of each channel of the audio, aswell as gives the opportunity to mute certian channels of the audio - so maybe if some even has a better idea than to use the web audio api...
Again THAAKS IN ADVANCE!

That makes sense to me.  Especially with 6-channel audio, muting a channel is fairly granular.  If you want to hear more music and less vocals, muting the center channels is a great way to do that.  It's much more complicated in stereo content.
We can leave this open as a question and hope that somebody in the community with WebAudio experience can make a suggestion.  Sorry we can't do more!

Though this is 1) old, 2) outside of Shaka Player, I now have some WebAudio experience I didn't have when this question was first asked.  So here's a code snippet that I hope you find helpful.  You can paste this into the debugger on the Shaka Player Demo to get a crude visualization of the audio levels for stereo content, as well as sliders that let you adjust the gain for left and right independently.
const container = document.createElement('div');
document.body.prepend(container);

const canvas = document.createElement('canvas');
container.appendChild(canvas);

const gainInput0 = createRangeInput();
container.appendChild(gainInput0);

const gainInput1 = createRangeInput();
container.appendChild(gainInput1);

const context = new AudioContext();

// A source node pulling audio from the video element.
const source = context.createMediaElementSource(video);

// A splitter to break stereo into two separate mono outputs.
const splitter = context.createChannelSplitter(2);
source.connect(splitter);

// Run the two separate channels through gain nodes
// to adjust their volume.
// Adjust each gain with an input element.

const gain0 = context.createGain();
gainInput0.oninput = () => gain0.gain.value = gainInput0.value;
splitter.connect(gain0, /* channel */ 0);

const gain1 = context.createGain();
gainInput1.oninput = () => gain1.gain.value = gainInput1.value;
splitter.connect(gain1, /* channel */ 1);

// Run the gain-adjusted streams through analyzers
// to let us visualize their volume levels.

const dataSize = 2048;  // Number of amplitude samples.

const data0 = new Uint8Array(dataSize);
const a0 = context.createAnalyser();
a0.fftSize = dataSize;
gain0.connect(a0);

const data1 = new Uint8Array(dataSize);
const a1 = context.createAnalyser();
a1.fftSize = dataSize;
gain1.connect(a1);

// Merge the output together into a stereo stream.
const merger = context.createChannelMerger();
a0.connect(merger, /* channel */ 0, /* destinationChannel */ 0);
a1.connect(merger, /* channel */ 0, /* destinationChannel */ 1);

// Connect that to the audio output device.
merger.connect(context.destination);

// Every frame, visualize the audio.
const drawingContext = canvas.getContext('2d');
requestAnimationFrame(draw);

function createRangeInput() {
  const input = document.createElement('input');
  input.type = 'range';
  input.max = 1;
  input.min = 0;
  input.step = 0.01;
  input.value = 1;
  input.style.orient = 'vertical';
  return input;
}

function maxVolume(data) {
  // The data array has many values over time,
  // where 128 is the middle of the sine wave,
  // 0 is the bottom, and 255 is the top.
  // Map these values to an absolute value from the center,
  // then take the maximum.  This is what we graph.
  return Math.max.apply(null,
      Array.from(data).map((x) => Math.abs((x - 128) / 128)));
}

function draw() {
  requestAnimationFrame(draw);

  // Get audio analysis data.
  a0.getByteTimeDomainData(data0);
  a1.getByteTimeDomainData(data1);

  // Compute the max volume in this time slice.
  const max0 = maxVolume(data0);
  const max1 = maxVolume(data1);

  // Draw one column for the left, one for the right.
  drawingContext.clearRect(0, 0, canvas.width, canvas.height);
  drawingContext.fillStyle = 'red';
  drawingContext.fillRect(
      0, canvas.height,
      canvas.width / 2, -max0 * canvas.height);
  drawingContext.fillRect(
      canvas.width / 2, canvas.height,
      canvas.width / 2, -max1 * canvas.height);
}

I hope this is helpful!  I'm going to go ahead and close the issue now.


JSON RPC calls that return a transaction have "input": null

Expected Behavior
JSON RPC calls like eth_getTransactionByHash and eth_getBlockByHash return transaction objects. The "input" property of a transaction object should be "0x" if the transaction data is an empty array of bytes.
Current Behavior
The "input" property of transaction objects is currently set to null if the transaction data is an empty array of bytes. This doesn't seem to be permitted by the JSON RPC spec and causes compatibility issues.
Possible Solution
It looks like the issue is in using nullableRpcDataHexString when the field isn't nullable:
https://github.com/trufflesuite/ganache-core/blob/0c3979d088e4de63798fef157532fd43aec18280/lib/utils/txhelper.js#L26
Steps to Reproduce
In the truffle console:
web3.eth.getAccounts().then(ethaccounts => accounts = ethaccounts)
web3.eth.sendTransaction({from: accounts[0], to: accounts[1], value: web3.utils.toWei('10', "ether"), gas:50000, data: '0x'})

Then use, e.g., a eth_getBlockByNumber(0x1, true) JSON RPC call to get the block containing the new transaction.
Context
The rust-web3 crate experiences parsing errors when receiving responses to its JSON RPC request due to the unexpected null value.
Your Environment
ganache-cli & ganache-core, both on latest commit of develop branch.
Tested on Mac OS X.

Thanks @timmclean for reporting this.  We've issued a fix and it's just in time for our next release!

Awesome thanks!!


[Enterprise InfluxDB] Document default config locations for influxd-meta

What products and version are you using?
Will be introduced in influxd-meta 1.3.
The influxd-meta binary, if no configuration is specified, will check the INFLUXDB_META_CONFIG_PATH. If that environment variable is set, the path will be used as the configuration file. If unset, the binary will check the ~/.influxdb and /etc/influxdb folder for an influxdb-meta.conf file. If it finds that file at either of the two locations, the first will be loaded as the configuration file automatically.
This matches a similar behavior that the open source and data node versions of InfluxDB already follow.

Add content to the administration/configuration page.

done


Where is DaggerApplicationComponent class

Hi, i'm not find DaggerApplicationComponent in packages.

Hi @joniltonsilva, you have to make the project. You'll find the option in Build menu. This class is created automatically by Dagger and does not exist until you make or build the project for the first time.

Thanks for answering manusoft; appreciated!


User Desires Checklist

Checklist to review how or if the library can address certain possible user needs / requirements easily.
These could be eventually turn into examples/demos or be integrated into the demo page.

[ ] I want some continuous vertical curvy lines at the sides of the page (no or only a few loops).
[ ] I want the lines to fill in progressively.
[ ] I want some (2-3 per viewport) large blobs behind my content.
[ ] I want to fill in an area with N (24-32) small loops.
[ ] I want to fill in an area with N (24-32) small lines (like pen marks).
[ ] I want to fill in an area with multicolor confetti.

[ ] I want one blob behind my content that matches the size of my content
[ ] I want one huge blob (more than screen height) partially off the side of the screen
[ ] I want a horizontal loopy line as a separator between pieces of content (e.g. section on the page)
[ ] I want a huge loopy line in the background of all my content stretching vertically along the entire page


Webhook implementation of resource.ExternalClient

What problem are you facing?

Currently folks wishing to add support for a new managed resource to Crossplane must write Go. Specifically, they must author a type that satisfies managed.ExternalClient in order to CRUD external resources, and instantiate a managed.Reconciler that uses said managed.ExternalClient.
How could Crossplane help solve your problem?

It should be possible to model the parameters and results of the managed.ExternalClient methods as a JSON REST webhook. If Crossplane supported an ExternalClient-to-webhook adaptor folks would be able to implement managed resource CRUD logic in their language of choice behind the webhook.

I think the challenging part of this feature is how to get the REST endpoints registered so that they are called by the controller. I imagine that we'd have a CRD like ExternalClientRegistration that will allow you to specify which managed resource CRs you'd like to reconcile and what URLs that each of the ExternalClient methods should call.
We'd probably create an ExternalClient on-the-fly with functions designated to call the URL endpoints given in the ExternalClientRegistration.
There is also the fact that there has to be an actual manager up and running to register that controller. Maybe crossplane pod itself could watch ExternalClientRegistration instances and do the necessary stuff.

I'd also question whether we should do this at all. In the best scenario, here is what the developer will do to implement a managed resource reconciler:

An HTTP server that will take actions against the cloud provider API with the information it gets from endpoints.
That HTTP server will have to implement an authorization path itself; fetch the Provider object, read secret and authorize to the cloud API. Note that it will have to do this for every call since the calls are completely separate as opposed to current managed reconciler where you auth once and it's used in the subsequent calls to cloud provider API.
The conversion methods from Crossplane struct to provider API struct. This has to be done in either case.

The advantage is that they can write this HTTP server in any language they want. However, I feel like this is more important when you develop an application rather than a provider stack. Maybe early prototypes of the provider stack would be in this webhook form but eventually they'd write a Go version (assuming mid-sized cloud provider or one of big 4).
So, I'm not sure. Maybe there are scenarios where we expand the definition of managed resource and the audience isn't limited to providers anymore, then it'd make more sense to me.

I mostly agree with your points. Some notes:

The conversion methods from Crossplane struct to provider API struct. This has to be done in either case.

I don't think we'd need to write conversion methods. I suspect we wouldn't even need to write Go API types. I believe it would be possible to write an adaptor from *unstructured.Unstructured to resource.Managed using the new fieldpath.Paved type. I believe we could then effectively encode all or part of the API type as JSON and pass it to the webhook.

That HTTP server will have to implement an authorization path itself; fetch the Provider object, read secret and authorize to the cloud API. Note that it will have to do this for every call since the calls are completely separate as opposed to current managed reconciler where you auth once and it's used in the subsequent calls to cloud provider API.

Currently each reconcile fetches the credentials and then uses them to form a managed.ExternalClient. One option would be to (presuming we connected to our webhook via mTLS or similar) fetch these credentials from a Crossplane Provider kind as usual, then include them in each webhook request.
API wise I'd imagine something like the below. We may want to use a different kind of request/response for each operation (e.g. Observe, Create, etc) or have the request subobject have different shapes depending on what kind of request we're dealing with.
{
  "apiVersion": "webhook.crossplane.io/v1alpha1",
  "kind": "ExternalOperationRequest",
  "uid": "uid-of-this-request",
  "request": {
    "apiVersion": "database.example.org/v1alpha2",
    "kind": "FancyDBInstance",
    "name": "kubernetes-name-of-the-object",
    "external-name": "external-name-of-the-object",
    "credentials": { "...": "..." },
    "operation": "Create",
    "forProvider": { "json-encoded": "for-provider-substruct" }
  }
}

{
  "apiVersion": "webhook.crossplane.io/v1alpha1",
  "kind": "ExternalOperationResponse",
  "uid": "uid-of-the-request-that-triggered-this-response",
  "response": {
    "operation": "Create",
    "external-name": "external-name-of-the-object",
    "forProvider": { "json-encoded": "late-initialized-for-provider-substruct" },
    "atProvider": { "json-encoded": "at-provider-substruct" },
    "connection": { "json-encoeded": "connection-details"},
    "error": ""
  }
}

Just found this old issue and realized it has a lot of similarities to https://github.com/hasheddan/crisscross

@hasheddan Yeah, I had meant to cross link this issue with Crisscross the other day but couldn't find it. From what I understand Crisscross basically solves this issue.

@negz yep! However, I also imagine crisscross doing things like "read-only" loops to send connection details to alternative locations, other day 2 operations, etc.

@hasheddan @negz @muvaf @jbw976 is there an official method to do this now? I mean literally a CRUD provider?


ASDA login recaptcha issue

Most of the time this error is present and is hard to solve

error: Auth failed. The website is thinks this could be a bot, and is showing a Recaptch check. Try logging in yourself, and this might go away

Unfortunatly back at the recaptch problem now. Authenticating on Chromium via remote desktop did solve it. Can't regenerate capthcha on desktop browser login any more either.

In the absence of a permanent fix, could someone please explain how the manual authentication works? I'm logged in to Asda with desktop Chrome but the bot is still seeing authentication failures almost all the time. Should I be logging in with Chromium somehow?

Anyone have any idea to get around the below error message?

error: Auth failed. The website is thinks this could be a bot, and is showing a Recaptch check. Try logging in yourself, and this might go away

For at least 24 hours the ReCAPTCHA issue went away for me, for no reason that I could see.  So that was great while it lasted. Following a restart, it's back again. I'm again logged in via desktop Chrome, though I have the impression the session times out relatively quickly.
In the meantime I've been seeing a new error: #79.


Added example for fullscreen image using Angular 2

small update to readme

Thanks, but this is not meant to be an Angular guide. One example is enough. Angular users should be able to do the rest from that example and their experience.


Unable to get to internet

I've tried to run it several time and keep getting this error.
🐦 BrowsingAgent 🛠 Executing Function
Function(arguments='{"url":"https://google.com/search?q=social+media+post+creation+and+analytics+API+for+Twitter+and+LinkedIn"}', name='ReadURL')
🐦 ReadURL ⚙Function Output
Error: Message: Service /Users/vlada/.wdm/drivers/chromedriver/mac64/120.0.6099.109/chromedriver-mac-arm64/chromedriver unexpectedly exited. Status code was: -9

Try quitting chrome before using the browsing agent. Let me know if this helps. @vlada-kopric

yes, it did help.


minification of three.dart project breaks it

I'm attaching simple three.dart demo, which gets broken by "pub build", but it works after "pub build --mode=something".
How to reproduce:
Download: https://dl.dropboxusercontent.com/u/6822278/bugreport-minify-three-js.zip
Run:
pub get
pub build --mode=devel (to omit minification)
Then open build/web/index.html you should se "3D forest". So far so good.
Now run:
pub build
Try to open build/web/index.html - you will see error in Chrome console:
Uncaught TypeError: Cannot read property 'toString' of null
Expected behavior:
The result should be the same, only after "pub build" JS should be smaller.
Conslusion:
There might me something wrong with three.dart library, however this is very unexpected behavior. Minification shouldn't influence final JS.
Version:
pub --version
Pub 1.12.1

I looked at this. This is not a problem with the minification, but with the order of evaluation.
In the release-version, the html-file executes the JavaScript before the html-page is completely created. Therefore the call to document.querySelector("#webgl") returns undefined which leads to the null-pointer exception that you are seeing.
If I replace the index.html in the release build with the one from the debug build, everything works.
I'm not sure what the correct approach is, but I'm ccing a few people that know more about this.
/cc @sigmundch @vsmenon
Minor side note: please include the pubspec.lock the next time to make sure we are testing with the same version.

You should be able to fix this by moving your script tag to the very end of the body of the html file (just before the  and after the element with id="webgl").  That would be the most portable solution across multiple browsers.
Basically, the release version is starting more quickly than the debug one.  If the script code is at the bottom of the page, you shouldn't notice a semantic difference.

Thanks for superquick response, clearly you are right, works for me now. I'll contact the author of the original three.dart example I started from and let him know.
However this kind of inconsistent behavior is very confusing ... is there anything what can be done?

some kind of warning when accessing DOM before it's fully loaded?
more strict evaluation in Dartium (it worked in Dartium too)
some super-smart transformer / best practice enforcer for Pub?

I can fill out a feature request somewhere if you want (and if you see any possible solution).
Thanks!

The release behavior is consistent with the HTML5 spec - which requires scripts to be executed synchronously (unless marked defer or async) as the page is parsed.  In some cases, folks want to access the DOM early for perf / page load reasons.
The bug here is the Dartium lazy behavior - but it will be very difficult to fix (Dartium processes import and part directives via async requests - in dart2js, it's all compiled into one file and easier to load).
A lint / transformer sounds like a good idea.  I understand that the Dart-Polymer transformer is already moving scripts to the end.  @sigmundch @pq @kevmoo might have some ideas here.

some super-smart transformer / best practice enforcer for Pub?

I believe you are using it :-), it just needs a bug fix.
If I understand correctly, it appears that the problem actually originated from the dart_to_js_script_rewritter transformer you use in your pubspec. The transformer replaces the Dart + browser/dart.js script tags, by a tag that just loads the .js code. But it only does so when you use --mode=release (that's why you didn't see the problem in debug mode). The default way you had written the original code was actually OK and didn't have issues because the browser/dart.js script ensures that we don't load the .js code until after DOMContentLoaded.
The fix would be to improve the rewriter transformer to add a defer keyword to the script tag. That would guarantee that the timing is correct after removing the browser/dart.js file.
I filed https://github.com/Workiva/dart_to_js_script_rewriter/issues/21 in the rewriter repo to track this. /cc @sethladd who I believe maintains the rewriter.

Closing this issue as this is tracked now by the issue in dart_to_js_script_rewriter


Suggestion: please update to 1.19.4

please update to 1.19.4

#189 Fortunately, I don't believe in users getting left behind
Fingers crossed for approval!

At this time, there are no plans to update to 1.19.4.


Communicate that all data stays local to machine

On opening screen, add cloud with line through it and text stating data remains local / is never uploaded to the cloud.

Fixed in merge https://github.com/KitwareMedical/VolView/pull/214