Sample app redesign [Part 1]

Description of Change

Redesigned sample app;
Cleaned and refactored code;
Made XF version consistent across all solution projects;
Added a new "folder" - Extensions with single MarkupExtension that helps to work with local images.

Note: this is the first step of the sample app redesign.
Once this PR is merged, I will submit a follow-up PR with updates within #132
Bugs Fixed

Related to issue #129

API Changes
Added:

ImageResourceExtension

Behavioral Changes

PR Checklist

[ ] Has tests (if omitted, state reason in description)
[ ] Has samples (if omitted, state reason in description)
[X] Rebased on top of master at time of PR
[X] Changes adhere to coding standard
[ ] Updated documentation

@Depechie the sample is updated


Flow manager performance

This includes the suite for benchmarking flow manager. The .rspec file has a new configuration set to exclude these tests from a normal run, so it shouldn't affect previous workflows. These specs take a “LONG” time to run, so be wary of running all specs forcefully.

Disregard Travis CI, this is open for review.

After a cursory glance this looks OK to me.


InternalServerError: None

EdgeDB Version: 3.0+7d903be
EdgeDB CLI Version: 3.4.0+4d95a2c
OS Version: macOS 13.3.1

Steps to Reproduce:
Apply the schema below.
Run the query specified below.
Expected: success or failure with a concise message.
Observed: InternalServerError: None
Schema:
type Email {
   subject: str,
   threadId: str,
   date: datetime
}

Query:
select (
  select (
    group Email {subject, threadId, date}
     using threadId:=.threadId by threadId
  ){key,grouping,elements:=(select .elements order by .date limit 1)}
) {
  threadId := .elements.threadId,
  subject := .elements.subject
}

Seems to only show up when we are injecting type names.
(So \set display-typenames off or using a language binding client works around it.)
The particular failure is at:
    /home/sully/src/e/edgedb/edb/pgsql/compiler/clauses.py, line 125, in compile_materialized_exprs
        > assert mat_set.finalized

which is an excitingly novel way for a materialization bug to be exposed.


Replacing whisper with levelDB

Hi,
I was playing with the idea to replace the whisper code with a levelDB backend. I doubt that I will have the time to look into that soon, but maybe other people are interested to work on such a project?
In general to make such tasks easier it would be nice to have the storage backend as a plugin in the code so it is easier to replace it.  Right now there are whisper related pieces all over the code.
Thanks for your input,
Bernd

LevelDB was used as storage engine in older versions of InfluxDB.  I think it's worth starting with studying their experience.
Links:
https://www.influxdata.com/benchmarking-leveldb-vs-rocksdb-vs-hyperleveldb-vs-lmdb-performance-for-influxdb/
https://docs.influxdata.com/influxdb/v0.9/concepts/storage_engine/

Different storages require different approaches. It's unreasonable to develop a common solution based on go-carbon.
I will return to the problem only if there is a good candidate for the replacement of a whisper. May be for ceres. LevelDB is not good candidate.


Improved SQL alias support on columns

I have the use-case where I need to alias column names. I'm currently doing this:
type Report struct {
    First string `db:"FIRST_NAME as \"First\""'`
    Last string `db:"LAST_NAME as \"Last\""'`
}

This works, but if feels like a hack?
Assuming this is something you'd want to add to the library, would you recommend the above, or should we look at something like a new fieldopt

Thanks for the quick response!
I want to export to a CSV direct from PostgreSQL, so something like:
COPY (select column_a as A, column_b as B from some_table) TO '/tmp/some_file.csv' (format CSV, HEADER);

https://www.postgresql.org/docs/current/sql-copy.html
Using the HEADER option, the names of the column will be added as the first row of the CSV. I'd like to be able to control those names (more specifically, end-users will be downloading these generated CSV files, and so the field names need to be as understandable as possible). fieldtag / usetag is already helping me a lot because for one set of fields I can easily turn particular fields on/off.

It makes sense to me. I'll add a new struct field named fieldas to enable us to set alias name.
Here is a quick sample.
type T struct {
    ColumnA string `db:"column_a" fieldas:"A"`
}

var t = NewStruct(new(T))
sb := t.SelectFrom("some_table")
builder := Build("COPY ($?) TO '/path/to/file.csv' (FORMAT CSV, HEADER)")
sql, _ := builder.Build()
print(sql)

// Output:
// COPY (SELECT column_a AS A FROM some_table) TO '/path/to/file.csv' (FORMAT CSV, HEADER)

Feel free to share your thoughts on this design.

That sounds great to me 👍
One consideration I suppose is how you handle duplicate aliases. I noticed there was some code to check for duplicates so that may need to be extended?

If two struct fields have the same name defined by db tag, only the first field will be parsed and used. This is the only checks for duplication in Struct right now.
There is no special checks for the new fieldas tag so far in my mind. If you have any requirement on this part, feel free to let me know.

I'll merge #79 by the end of tomorrow, if there is no more feedback. Just FYI @danielnitsche

Looks great thanks!


[Bug]: text_embedding_inference. JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Bug Description
I tried running the code snippet in this example
https://docs.llamaindex.ai/en/stable/examples/embeddings/text_embedding_inference/
I got the following error
JSONDecodeError                           Traceback (most recent call last)
<ipython-input-26-a7c0f9477fcc> in <cell line: 13>()
     11
     12
---> 13 embeddings = embed_model.get_text_embedding("Hello World!")
     14 print(len(embeddings))
     15 print(embeddings[:5])

8 frames
/usr/lib/python3.10/json/decoder.py in raw_decode(self, s, idx)
    353             obj, end = self.scan_once(s, idx)
    354         except StopIteration as err:
--> 355             raise JSONDecodeError("Expecting value", s, err.value) from None
    356         return obj, end

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Version
Using the colab notebook provided
Steps to Reproduce
Running the colab notebook here
https://docs.llamaindex.ai/en/stable/examples/embeddings/text_embedding_inference/
Relevant Logs/Tracbacks
No response

This does not help. As I am using your example

@nitskoh Looks like the very first step is to deploy the embedding server which sounds like a paid option as described here.
cc: @namin @tobi

Its not paid, but you need to deploy it somewhere before you can use it (local docker, was, etc.)

Thanks for the note, @logan-markewich. Which of the deployment methods have you used?


New feature: Enable pausing a product executor for maintenance

Current situation
When doing a backend update (PDS-Solution, Checkmarx, ...) then the backend is unreachable for a short amount of time.
As a workaround, we currently stop the job scheduling on the server and wait until the job queue is empty.
During this time all incoming jobs get queued. After starting job scheduling again, it can take much time until the queue is processed.
Imagine, we have 10 backends attached, then while working on one, the other nine are idle, but could process scans.
Wanted
A possibility to "pause" an executor.

no new jobs will be run using this executor
wait until the currently active jobs of this executor are done

After ending the "pause"

the jobs waiting for this executor are continued

Interesting idea.
But the proposal of "pausing" an executor would also have following impacts.

we would need an overview over all paused executors
we would need start,stop,status per product executor (configuration)
every product executor would need to periodically check if it (respectively its configuration) paused or not.
Talking about configurations -  this problematic because every product executor config for product X may not work because
product X is updated (when directly connected via adaper). When we are talking about PDS, we can talk about configuration level.
PDS solutions : scripts already started would be still running while "paused" - because pausing the scripts would be too much effort

At PDS side we could do following:

rest call to PDS and set as "paused". stores in database. so pause/unpause + status rest operations necessary
a paused PDS would still execute its running job
a paused PDS would deny new job queuing and no longer starts new jobs. The job queue deny would result in a dedicated "paused" error result so PDS product executor would know that the product delegation server is just paused. In this case the PDS product exeuctors should have a resilience consultant implementation which just would do n retries with pauses of x minutes.
in combination with current queue status (already available) it is possible to automate a deployment (pause + wait until jobs done than start new deployment + after it + unpause...)
when #1415  has been done and also #1416 only nessus and netsparker implementations are not PDS variants. And those will be either deprecated or also migrated in future. So using PDS here again gives us multiple possiblitilies.


Vertical scroll bar

Commit: 2274226ff8958ebf560bd1d558fded5632ea2c5f
Steps to reproduce

Open HiGlass

Observed behavior

There is a vertical scroll bar of ~10px

Expected behavior

This scroll bar should not be there, i.e., the main container shouldn't overflow.

PS: This scroll bar is unrelated to the style updates of flekschas/style-header-and-menu

Should be fixed in more recent releases. Reopen if you notice this again.


Is "spiderable" actually required?

Is spiderable necessary to this package specifically?
I am currently hosting my app in a PaaS that uses docker and hence require the use of alternative phantomjs-using packages such as ongoworks: spiderable. The dependency of liberation:shareit makes it impossible to work as it installs spiderable, that currently crashes with that setup.
My hosting provider currently proposed a workaround with a fork of your package that modifies the dependency: https://github.com/Soulou/meteor-shareit/commit/9cd6e94890ab12ed36e20c1b13df146112894375
Is the spiderable necessary in "imply". It seems to me that it's just a "nice to have" that could just be mentionned in the documentation and not added in the requirements so that the user can choose which spiderable to use.

Thanks you @fafournier  for your PR. )


Mock UDFContext which can be used without Executor

Background

While implementing a Wrapper for the UDFContext, we recognized that having a standalone MockUDFContext would be beneficial (https://github.com/exasol/advanced-analytics-framework/pull/21/files#r875043826)
You should be able to create UDFContext without needing to use the MockExecutor. This has the benefit you are in a normal environment and tools like pytest work without limitations
The currently existing, MockContext has the issue it is implemented to handle multiple groups. The standalone MockUDFContext would be only able to handle single group

Acceptance Criteria

Provide a standalone Mock UDFContext which provides all the functionality as the integrated Mock UDFContext.

In the following example, we already use the existing MockContext as a Standalone Context. The main issue, that still exists is, that we need to call the private method _next_group. Wrapping the existing Context should be a suitable solution for this issue.

Besides the Executor, the MockExaEnvironment still expects a function as input, maybe we should allow here also strings as input.


Invoke-Command error message on localhost loopback

Steps to reproduce
Invoke-Command -ComputerName localhost -ScriptBlock { dir }
Expected behavior
Directory contents are presented.
Actual behavior
PS C:\Program Files\PowerShell\6.0.0-beta.1> Invoke-Command -ComputerName localhost -ScriptBlock { dir }
[localhost] Connecting to remote server localhost failed with the following error message : Access is denied. For more
information, see the about_Remote_Troubleshooting Help topic.
    + CategoryInfo          : OpenError: (localhost:String) [], PSRemotingTransportException
    + FullyQualifiedErrorId : AccessDenied,PSSessionStateBroken

If using the loopback adapter to localhost is prohibited unless elevated, the error message should include that information. It clearly knows the problem. Not sure of the implications on Linux.
Environment data

> $PSVersionTable
PSVersion                      6.0.0-beta
PSEdition                      Core
BuildVersion                   <IP_ADDRESS>
CLRVersion
GitCommitId                    v6.0.0-beta.1
OS                             Microsoft Windows 10.0.15063
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

This appears to be a security restriction by design on Windows.

I am getting same error
but if remove ComputerName then, it will work, but I think it's not a loopback work

ComputerName  is implemented as remoting that requires elevated rights.

Does not work using "Run as Administrator." What elevated rights are required?

Did you set remoting up?

Well, you need to enlist the localhost (with its hostname) to use remoting.
There are the steps that I follow:
(1) Start a new powershell window with administrator privilegies (Run as Administrator)
(2) Retrive your localhost name with the command: hostname, in my example its name is "PROCDB01"
(3) Enlist this hostname in the list of trusted servers with a comman like this:
procdb01 is the localhost
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "procdb01,procdb02,procdb03,procdb04,procdb05"
(4) Activate Remoting with these commands:
Winrm qc
Enable-PSRemoting
(5) Test it
Invoke-Command -ComputerName procdb01 -ScriptBlock {hostname}
Invoke-Command -ComputerName localhost -ScriptBlock {hostname}
Note: I'am using this version:
PS > $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14393.2828
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.2828
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>


[SPARK-39189][PYTHON] Support limit_area parameter in pandas API on Spark

What changes were proposed in this pull request?
interpolate supports param limit_area
Why are the changes needed?
to increase api coverage
Does this PR introduce any user-facing change?
yes, one param added
How was this patch tested?
updated UT

@zhengruifeng mind showing the example of this argument usage in the PR description?

@HyukjinKwon Sure! will update soon

Merged to master.

thanks all!


Launch Checklist

Step 0: Prep the Repo (@kytrinyx)

[x] Create the repository
[x] Create starter issues
[x] Turn on Travis CI for the track
[x] Integrate Travis CI with the track

Step 1: Implement Exercises

[x] Implement at least 10 problems

See the contributing guide for the details about the format of an exercise.
The short version is:

a test suite
an example solution, named with example (case-insensitive) in the filename
a section in the "exercises" key of the config.json file with the slug, topics, and difficulty level.

The topics can be an empty list, and the difficulty level is from 1 to 10, and can default to 1 until we know more about the exercises.
"exercises": [
  {
    "slug": "hello-world" ,
    "difficulty": 1,
    "topics": []
  }
]

Step 2: Add the Track to Exercism (@kytrinyx)

[x] Add prolog as a submodule in trackler
[x] Update x-api and deploy

This means that it will show up on http://exercism.io/languages and http://exercism.io/languages/prolog
Step 3: Make the Track Ready for Launch

[x] Define test_pattern in config.json
[ ] Add a language icon or logo + attribution
[ ] Write documentation
[ ] Find track mentors
[ ] Add track mentors on the site (@kytrinyx)

test_pattern
The exercism.io website links to the exercise implementations, so it needs to know how to recognize the filename(s) for the test suite.
The "test_pattern" value in the config.json file should be a string that can be compiled as a regular expression, and which will match on the file or files that comprise the test suite of an exercise.
If the test filenames contain the word "test" (case insensitive) then the "test_pattern" key can be deleted.
Language Icon and Attribution
We try to create a language icon that has the exercism colors, and is recognizably similar to the language icon. Sometimes this isn't possible due to copyright issues.
The Exercism colors are:

#D81D4E (pink)
#212121 (charcoal)

The icon is used throughout the site in order to identify the language track, and to identify code that has been submitted to that track.
See http://exercism.io/languages for all the existing icons.
Icon
If image assets are not your strong suit, just find a reasonable image to start from, along with the information about the licensing, and we'll figure out the colorization thing (I've written some scripts to help me do this part).
The logo should be named icon.png and live under img/ in this repository. If you know how, go ahead and make an SVG as well.
Attribution
The attribution goes in the README.md file.
If the icon we have based this on is not in the public domain, we need to provide information about license and provenance. If we require permission to use and/or change the icon, then we need to obtain that permission before we can use it.
Documentation
The documentation is used in the http://exercism.io/languages/prolog section to help people get started with the track.
The files live in the docs/ directory here in this repository, and gets served to the site via the x-api. It should contain at minimum:

INSTALLATION.md - about how to get the language set up locally.
TESTS.md - about how to run the tests for the exercises.

Some nice to haves:

ABOUT.md - a short, friendly blurb about the language. What types of problems does it solve really well? What is it typically used for?
LEARNING.md - a few notes about where people might want to go to learn the language from scratch.
RESOURCES.md - references and other useful resources.

Find Track Mentors
Usually in order to see someone's solution you have to have submitted the exercise yourself. Track mentors can access all of the solutions in a given language. Track mentors can therefore help review solutions that people submit on the website in the beginning when few people have submitted solutions to exercises.
Ideally we should have a handful of people who are willing to check Exercism regularly to give people feedback, in order to start the track off on the right note.
The first track mentor needs to be added manually by @kytrinyx, but after that there's a section in the account where existing track mentors can invite new ones.
The most successful tracks are where each submission receives feedback quickly, preferably within the first 24 hours.
In addition, the most interesting and useful conversations start when reviewers do not direct users to do specific things, but rather ask questions challenging people to think about different aspects of their solution, or explore aspects of the language.
Referencing existing blog posts and style guides seems to work well when making specific recommendations.
Prepare for Open Source Contributions
Once the track is live and active, it will often get new contributions.

[ ] Read the maintainer documentation
[ ] "Watch" the xprolog repository
[ ] Find a second maintainer

We've got a few years of experience maintaining language tracks on Exercism. Here's what we have learned:

Maintaining a Track
Reviewing a Pull Request

There's more stuff in the contributing guide, as well. We're working on turning that into better, more focused maintainer documentation.
Launch!

[ ] Toggle "active" to true in config.json
[ ] Mention it in the next "Behind the Scenes" newsletter (@kytrinyx)

I'm in on this one! W00t!

@parkerl Yay :-) :tada:
(also, do you see how much better the launch checklist has gotten lately?)

Yes it is fantastic!

@kytrinyx I forget, do you need to setup the Travis integration? When I go there it auto pulls my credentials which is not correct. I was able to turn on the track in Travis.

@parkerl yepp, you've got access to do this. Thanks!

I'm wondering if we should use the SWI Prolog logo and SWI Prolog for attribution. Unfortunately, I think the track is vendor specific, and will not work with any other flavor of prolog. I guess that begs the question of renaming the track to reflect this?

Sweet! The SWI Prolog logo is here with many different file types. http://plainicon.com/download-icon/50300/prolog

Something's different about the Prolog track here... where's the JSON object that determines the name that appears, because it should begin with a capital letter.

@catb0t thanks for catching that. It is here if you want to put in a quick PR https://github.com/exercism/xprolog/blob/master/config.json

Yeah, it uses the language key from the config.

@qjd2413 how are you? Wondering if you are still interested in helping launch and maintain this track. We are so close but we just need the final details. Hope you are well.

Sorry for disappearing! Got distracted by finals week and forgot all about this. Other than documentation, what can I help out with?

We need the track image and the documentation. After that we're going to need someone who can check in on the site and participate in the conversations on people's solutions.

I'm kinda sorta community manager for SWI-Prolog. The 'Owlie' logo is BSD licensed, but I think I can legitimately give you an okey dokey to use it.

@Anniepoo ❤ That's excellent news. Thank you!

Realizing I should be clearer.  We'd be more than happy if you used Owlie as your prolog symbol. If you need a vector artwork version, contact me at<EMAIL_ADDRESS>

@Anniepoo thank you!

Quick note.  I updated the original issue here with a link to the new launch guide, which should help it not get so woefully outdated.


[WIP]  Use pr-cleanroom for AppVeyor

pr-cleanroom is currently not available for Ubuntu 16.04. Once https://github.com/personalrobotics/pr-cleanroom/issues/10 is resolved, let's use pr-cleanroom for AppVeyor build tests.
Depends on: #360

Close in favor of #362


Make sure the list of hovered ids is unique.

This fixes an issue where a Drop Target would be returned multiple times
by document.elementsFromPoint(), triggering an invariant violation in
react-dnd because the same target ID would be present multiple times.

Thank you for submitting this pull request, however I do not see a valid CLA on file for you. Before we can merge this request please visit https://yahoocla.herokuapp.com/ and agree to the terms. Thanks! :smile:


Update grpc-api, grpc-okhttp, grpc-stub to 1.54.0

About this PR
📦 Updates

io.grpc:grpc-api
io.grpc:grpc-okhttp
io.grpc:grpc-stub

from 1.48.2 to 1.54.0
📜 GitHub Release Notes - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "io.grpc" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "io.grpc" }
}]

labels: library-update, early-semver-minor, semver-spec-minor, commit-count:1

Superseded by #277.


Core Data

is there any way to make ObjectMapper models work with core data
i want to save the data without make another model for core data

@engmohamedsalah Refer to this comment and code which works well for me: https://github.com/Hearst-DD/ObjectMapper/issues/68#issuecomment-105831195


Information about Building with Elastic Inference is removed from readme.rst

Hi team, can you check why the information provided in "Building the SageMaker Elastic Inference MXNet container" https://github.com/aws/sagemaker-mxnet-container/blob/e8f4a6a7904541fb4a651bb7d86b5c85496abb67/README.rst#building-the-sagemaker-elastic-inference-mxnet-container is removed in latest versions?
This link (https://github.com/aws/sagemaker-mxnet-container#building-the-sagemaker-elastic-inference-mxnet-container) is still referred in: https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html
Thanks

Hi @pcolazurdo , thanks for using SageMaker!
Yes, we've separated the mxnet-training and mxnet-inference containers. The information you are looking for is now in sagemaker-mxnet-serving-container and the "Building the SageMaker Elastic Inference MXNet container" is here: https://github.com/aws/sagemaker-mxnet-serving-container#amazon-elastic-inference-with-mxnet-in-sagemaker

Thanks for the answer, I'll open a PR for the AWS doc team to fix the link in the https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html page unless you have access to it too?


Why is enable_coroutine set to false?

In .vendor/fomo/framework/src/Servers/Http.php, I see that enable_coroutine is hardcoded to false. Is there a reason for this?
I'm trying to use the PDO connection pool feature of Swoole and it depends on that setting being set to true. Without it, I'm getting this error: API must be called in the coroutine in @swoole/library/core/ConnectionPool.php:67. Maybe, I'm doing something wrong.
Also thanks for this framework.

I've created two simple services based on raw PDO class just for test purposes. One of them is using the connection pool and the difference of queries per second between the two are enormous. Connection pool perfroms 17K requests and the other one is around 10.1K.
There is not much difference when using the DB class with or without enable_coroutine: 9.5K (false) vs 9.3K (true). I guess that class does not utilize pooling and if it did, maybe it would perform a lot better. But this is not something I really consider. The framework performs already really well. But, IMO, enable_coroutine should be something that can be set using env files or through the server.php config file.

You can manually set enable_coroutine to true to test through the following file to see the difference in speed.
https://github.com/fomo-framework/framework/blob/master/src/Servers/Http/server


Create Functionality for Getting Vertex Coordinates from the "Polygons" That Make Up Masks (On Hold).

Dingrui has requested that functionality for extracting vertex coordinate values from echograms masks be created. Pairs of coordinate values (ping time, depth) allow him to plot a mask on an echogram in echoshader.
The tasks that resolve this issue are the following:

[ ] Functionality for extracting vertex coordinate values from xarray mask objects.
[ ] Example of functionality in notebook or test.

I think this would be rather easy to compute with OpenCV? I'll add to 0.3.0 since I think this would be quick.


Backspace forces cursor to end of file

I'm noticing strange behavior on the codapi playground site that I can't reproduce if I run a snippet locally.
https://codapi.org/javascript/
Repro steps
Enter the following code:
const greet = (name) => {
    console.log(5);
}

greet("World");

Place the cursor after the 5 and hit the Backspace key on your keyboard.
Expected
Deletes 5 and cursor remains between parentheses.
Actual
Deletes 5 and cursor jumps to the end of the file.
I did it with an on-screen keyboard just for demo, but it happens with a physical keyboard as well.
https://github.com/nalgeon/codapi-js/assets/7783288/8ebd0ac9-3841-4baf-a06e-1da468626c89
Environment
Windows 10 + Firefox 125

Looks really weird 😅 I'm pretty sure it's not related to Codapi itself, but to CodeJar — the editor the playground uses. The bug is reproduced with your steps in Firefox on the CodeJar's main page. I'll report it to the maintainer. Thank you!

I'm closing this issue, because it is not related to the Codapi widget (it does not use CodeJar), and it is only reproduced on the Codapi website (it does use CodeJar). So the Codapi widget users are not affected in any way.


Feature: Add personal_decryptMessage method.

We could simply match the API for parity_decryptMessage but without the platform-specific prefix:
https://github.com/paritytech/parity/wiki/JSONRPC-parity-module#parity_decryptmessage
Would be a de-facto implementation of EIP 130:
https://github.com/ethereum/EIPs/issues/130#issuecomment-309389060

Should be inter-compatible with a paired method on eth-sig-util:
https://github.com/MetaMask/eth-sig-util/issues/2

Hey, is there any update on this.
I've got a small dapp which requires this decryption. I understand EIP130 is not yet implemented. I've built a javascript/browser implementation to perform the encryption/decryption (https://github.com/sigp/ecies-parity) to match Parity's implementation.
I had intended to use the parity-chrome extension, which injects parity's web3 which contains the decrypt method, however Parity is no longer supporting this officially. Metamask seems to be the primary browser extension to interact with dapps.
In it's current form, my dapp will have to get the private key to be entered directly (not ideal), but a metamask decryption feature would resolve this.
I understand this feature is not implemented in other clients, but I could make a pull request to implement this to metamask if it were still desired.

Since we have effectively deprecated this package in favor of json-rpc-engine and its related packages and are no longer incorporating new changes, I'm going to close this. If we still want this feature we might consider adding it to eth-json-rpc-middleware.


Update clamxav to 2.14_3295

After making all changes to the cask:

[x] brew cask audit --download {{cask_file}} is error-free.
[x] brew cask style --fix {{cask_file}} reports no offenses.
[x] The commit message includes the cask’s name and version.

Updated url

Thank you for the contribution. It was merged directly as 2acbcdda7842f2e094df0f7c6ec4828f91cbea13. Your contribution is still credited to you.


Rename function callback in globals.dart

Is your feature request related to a problem? Please describe.
The name onListChanged, and ToDoListChangedCallback were copied from the to-do list example app.
Describe the solution you'd like
These names should be changed to situation-appropriate names.

Resolved by #43


The code seems to be too complex

Rot13 is a straightforward algorithm - it basically shifts letters by 13 positions. Why not just use basic math over chars? An example from Rosetta Code https://rosettacode.org/wiki/Rot-13#Nim adapted to strings (and a bit optimized with preallocation):
import std/strutils

# func means proc with a {.noSideEffect.} pragma
func rot13(str: string): string =
  result = newString(str.len)
  # iterate over each char in the string, giving its index and the char itself
  for i, c in str:
    result[i] =
      case toLowerAscii(c)
      of 'a'..'m': chr(ord(c) + 13)
      of 'n'..'z': chr(ord(c) - 13)
      else: c

echo rot13("hello world")
echo rot13("HELLO WOrld")

# rot13(rot13(x)) will return the original string x
# because that's how rot13 works
echo rot13(rot13("hello world"))
echo rot13(rot13("HELLO WOrld"))

pr's are welcome

didn't know anyone will take interest over this simple project, I am a very beginner with Nim :sweat_smile: and this project was just meant for practice :sweat_smile:
btw, for the code, .. it was on purpose to be re-usable for other rotation ciphers, not only rot13 :blush:

I have accepted this change. Thank you very much for mentioning a better approach @Yardanico ...
I learned something from the code itself. :blush:


Remove linux based xfail for Doggie after compiler fix

In This PR

Remove xfail for compiler crash on linux. The fix was landed here: https://github.com/apple/swift/pull/60902

Will close the associated swift issue once this is merged.
I've verified the issue is fixed with the newest swiftlang/swift:nightly-focal docker image. You can see the project UPASSing here on CI: https://ci.swift.org/job/swift-source-compat-suite-ubuntu-2004/56/testReport/junit/(root)/build/_Doggie__5_0__965946__Swift_Package/

@swift-ci test


Swift 4

This will update the following to swift 4:

[x] Package
[x] Code
[x] Swift templates

Note that this doesn't include the move to Codable


Add zellij slides

Here are the slides for the talk I gave - thanks again, had lots of fun!

Thanks, merged.


Theme support for graphiql

How can apply themes to graphiql? https://github.com/graphql/graphiql#applying-an-editor-theme
http://dev.apollodata.com/tools/graphql-server/graphiql.html
Thanks

we can add support for that but its not supported at the moment (pretty cool first time I'm seeing this to be honest)


BUG: (logs) trying to read id field of undefined guild

Also from the most recent deployment:
(node:28564) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of null
    at Client.client.on (/home/pinanostaff/pinano/library/client_events.js:31:63)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:28564) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 12)

Line 31 is the following:
if (!client.settings.pinano_guilds.includes(message.guild.id))
So we have a guildless message?

Ah, these are DMs. If you try to DM your bot, it'll ignore your messages because of this.
But also, it appears that commands like stats also assume that your message has a guild. Perhaps we need the concept of a default guild or a way to specify the guild you are DM'ing for stats for.

Fixed in #83


Cellar system: Improve usage of HDD by Hunter

Instead of unpacking cache/source archives to the root directory it's possible to unpack it once and create links instead. This is similar to homebrew.

Results of my test with android-ndk-r10e-api-19-armeabi-v7a-neon-hid-sections-lto + Release configuration.
Total build time after introducing change in ogles_gpgpu submodule is 34 minutes 55 seconds (cache hit everywhere).
Next timings from build log:

Unpack time of the regular 3rd parties is low, biggest is OpenCV (10 sec) and Boost (2 sec)
ogles_gpgpu build from scratch (21 sec)
Various dependencies of Android SDK (7 packages) unpacked in 29 sec in total
The biggest part is Android SDK itself - 110 sec

All unpack operations: 10 + 2 + 29 + 110 = 151 sec
I've copied Android SDK cache archive for testing. Extract by tar xf takes the same amount of time (about 110 sec).
If instead of creating archive we will use links time will be:

2.4 sec create directories (mkdir <dir>)
22.2 sec create files (ln <cellar/file> <root/file>)

So instead of 110 sec we will have 24.6 sec, i.e. minus 80%.
Expected new timing after this feature introduced will be: 151 x 0.2 = 30.2 sec
In total update of the ogles_gpgpu will cost 30.2 (unpack) + 21 (build) = 51.2 sec
But since we are changing the root directory (config-id changed) we have to update -I/path/to/headers flags and all Drishti binaries will be rebuild even if there is no changes in ogles_gpgpu headers.
Note: LTO is an expensive feature, same toolchain without LTO shows 12 minutes (time for Drishti build only).

Planning to use Bash script on Linux and OSX for now. For Windows it will remain the same (copy file). CMake feature: https://gitlab.kitware.com/cmake/cmake/issues/16926 can be used in future, hopefully will work on Windows too.

https://github.com/ruslo/hunter/releases/tag/v0.19.0

On my test Boost link takes longer than unpack (it's now 6 sec instead of 2).
Android SDK as expected 19 sec.
Real time:
-
Generate: 0:01:12.102801s
Build: 0:11:59.754139s
-
Total: 0:13:11.857547s
-
SUCCESS

https://github.com/elucideye/drishti/pull/460

CMake feature: https://gitlab.kitware.com/cmake/cmake/issues/16926 can be used in future, hopefully will work on Windows too

I forgot about it, reopen :)

Thanks!

CMake feature: https://gitlab.kitware.com/cmake/cmake/issues/16926 can be used in future, hopefully will work on Windows too

I forgot about it, reopen :)

Waiting for CMake 3.9:

https://gitlab.kitware.com/cmake/cmake/issues/16926#note_275176

Moving to 0.6 milestone

This seems to be working well for me so far.

https://github.com/ruslo/polly/pull/159
Close?

Close?

No, the file(LINK ...) feature can only be discussed after 3.9 release. Nothing is implemented at this moment in CMake.

This is a matter of replacing the current internal (opitonal) hunter python scripts with CMake's file(LINK ...) command, right?

This is a matter of replacing the current internal (opitonal) hunter python scripts with CMake's file(LINK ...) command, right?

Yes


[TW#20821] RMT crashes with too large clk_div and idle_threshold

Environment

Development Kit:      [none]
Core (if using chip or module): [ESP-WROOM32 & Widora-AIR]
IDF version (git rev-parse --short HEAD to get the commit id.):
//f586f5e6
Development Env:		[Make]
Operating System:		[Windows & Ubuntu]
Power Supply:         [USB]

Problem Description
Unable to use xRingbufferReceive to get RMT item with some value combinations of rx_config.idle_threshold and clk_div. For example, when clk_div is 80 with rx_config.idle_threshold larger than 10000, RMT shows error when calling xRingbufferReceive.
Expected Behavior
Calling xRingbufferReceive returns a series of rmt_item32_t, which represent the pulse pattern from chosen gpio pin.
Actual Behavior
RMT shows error with code 0x13000040.
Steps to repropduce
The following code is a minimal example. It only produces error with the selected pin attached to a signal source like the following photo:

Code to reproduce this issue
#include "driver/gpio.h"
#include "driver/rmt.h"
#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#include "freertos/ringbuf.h"

void app_main() {
    // Setup RMT
    rmt_config_t rmt_rx;
    rmt_rx.channel = RMT_CHANNEL_0;
    rmt_rx.rmt_mode = RMT_MODE_RX;
    rmt_rx.gpio_num = GPIO_NUM_5;
    rmt_rx.mem_block_num = 1;
    rmt_rx.clk_div = 80;
    rmt_rx.rx_config.filter_en = 0;
    rmt_rx.rx_config.idle_threshold = 10000;
    rmt_config(&rmt_rx);
    rmt_driver_install(rmt_rx.channel, 1000, 0);
    ESP_LOGI("IR", "RMT driver installed");

    // Get RMT buffer handle
    RingbufHandle_t rb = NULL;
    rmt_get_ringbuf_handle(rmt_rx.channel, &rb);

    rmt_rx_start(rmt_rx.channel, 1);
    ESP_LOGI("IR", "RMT started");

    size_t rx_size = 0;
    uint32_t duration, level;
    while (1) {
        rmt_item32_t *item = (rmt_item32_t *)xRingbufferReceive(rb, &rx_size, 1000);
        ESP_LOGI("IR", "%d", (uintptr_t)item);
        if (item) {
            vRingbufferReturnItem(rb, (void *)item);
        }
    }
}

Debug Logs
I (18) cpu_start: Starting scheduler on PRO CPU.
D (0) intr_alloc: Connected src 25 to int 2 (cpu 1)
I (0) cpu_start: Starting scheduler on APP CPU.
D (19) heap_init: New heap initialised at 0x3ffe0440
D (19) heap_init: New heap initialised at 0x3ffe4350
D (19) intr_alloc: Connected src 16 to int 12 (cpu 0)
D (20) rmt: Rmt Rx Channel 0|Gpio 5|Sclk_Hz 80000000|Div 80|Thresold 10000|Filter 97
D (21) intr_alloc: Connected src 47 to int 13 (cpu 0)
I (21) IR: RMT driver installed
I (21) IR: RMT started
E (130) rmt: RMT[0] ERR
E (130) rmt: status: 0x13000040
I (1021) IR: 0
I (2021) IR: 0
I (3021) IR: 0

Other items if possible

[ ] sdkconfig file (attach the sdkconfig file from your project folder)
[ ] elf file in the build folder (note this may contain all the code details and symbols of your project.)
[ ] coredump (This provides stacks of tasks.)

Upon further testing I found that the problem might come from idle_threshold.
In my experiment, I tried different clk_div values (8, 10, 20, 40, 80). All of the clk_div values has a special idle_threshold value, which I named "crash point". If idle_threshold is below "crash point", RMT works fine. If idle_threshold is larger than "crash point", RMT crashes on first signal arriving. Although it sounds strange, "crash point" is always around ticks equivalent to 4960~4970us no matter what clk_div is, even if the number of ticks does not exceed maximum of 15-bit integer which stores the measurements.
In my project I need to measure pulses around 7000us with precision of 1us. However it seems that RMT does not support measuring any pulse longer than 5000us. I cannot find any datasheet related to RMT. The register holding the status code is not documented anywhere on the Internet.
Is this a hardware issue? Or is there any other ways to measure pulses? Thanks ahead for any help!

Hi, @imxieyi
Did you mean that you need to measure the 148Hz pulses ?

@koobest Yes. Actually in my specific project I need to measure the 7000us gap between 100us pulses.

Hi, @imxieyi,
If the maximum low level of your measured pulse lasts longer than idle_threshold, it will be OK, otherwise it will go wrong. in you configuration above, if the low level is less than 10000us，an error will occurs.

I don't think this is related, but for those searching through github issues, I wanted to leave a note.
E (130) rmt: status: 0x13000040

I still don't know what exactly this error means, but I encountered it when trying to decode 38KHz IR packets from an air conditioner remote that sends rather large packets. I ended up having to use more memory blocks for the IR channel I was using.
rmt_rx.mem_block_num = 1;

This means the configured channel (of which there are 8), will receive 1 memory block (64 x 32 bits) from the shared RMT memory block (512 x 32 bits). You can specify more blocks if you need more memory. There are rules for how you specify the extra blocks, you can read about it here

The 8 channels share a 512x32-bit RAM block which can be read and written by the processor cores over the APB bus, as well as read by the transmitters and written by the receivers.
Note: If memory block number of one channel is set to a value greater than 1, this channel will occupy the memory block of the next channel. Channel 0 can use at most 8 blocks of memory, accordingly channel 7 can only use one memory block.

Additionally, I had to increase the ringbuffer size to accommodate the larger packets I was receiving:
// rmt_driver_install(rmt_rx.channel, 1000, 0);
rmt_driver_install(rmt_rx.channel, 3000, 0); // Set the ringbuffer size to 3000 bytes

Again, likely not related to the original issue posted here, but this was the only place I found that mentioned the error status of 0x13000040

Hi, @bschwind, Please see the issue, https://github.com/espressif/esp-idf/issues/1175

Hi @koobest
Sorry, it probably wasn't clear but I solved my issue and was just providing information for others searching for this error. Indeed it was a full memory error and increasing the number of blocks resolved it.
Thanks!