Proposal: Classifications using weaviate

Problem
Imagine the following schema:
------------                ------------
| FoodItem | --> ofType --> | FoodType |
------------                ------------

There are two food types in our data set:
{"name": "Savory"}, {"name": "Sweet"}

There are some food items like:
{"description": "finger-licking sweet ice-cream", "ofType": { "beacon": "...ref to FoodType/Sweet"} }
{"description": "the best schnitzel you ever ate", "ofType": { "beacon": "...ref to FoodType/Savory"} }

They are already classified as either Savory or Sweet through a cross-ref to FoodType.
Now we add a new food item which is unclassified:
{"description": "oh, how I love the icing on this cake", "ofType": null}

We know want weaviate to classify this newly added item (and possible more to either "FoodType/Savory" or "FoodType/Sweet")
Proposed API
@bobvanluijt can you post your proposed GQL snippet from your video here?
Core Ideas

The classification happens in real-time (Is this feasible? Up until what size? What if the size gets too big?)
A classification is always represented by a cross-ref, no cross-ref means unclassified.
There is no dedicated training period, the usual vectorizing "magic" at import time is sufficient

Great to see this issue, this might become an awesome feature.
Feedback to the core idea

For it doesn't have to be realtime, more about this below at point 3.
I would -as suggested- for now only work with cross-refs, but I would like to keep the possibility open.
This has all to do with indexing IMHO, i.e., if all would be indexed for classification on import time bullet 1 is possible, let's investigate in this thread.

Flow Suggestion
Below is a suggestion for the flow, all is open for discussion, including formats etc.
1. User requests classification with a GQL query
What we need to know from a user: A QUERY THAT ALLOWS TO CLASSIFY BASED ON A CLASS, MISSING DATA, AND A CLASSIFIER FIELD.
Example:
{
  Classify{
    Orders(classifierPath: ["description"]){
      MaterialGroupOne{
        ... on MaterialGroup{
          name
        }
      }
      MaterialGroupTwo{
        ... on MaterialGroup{
          name
        }
      }
      MaterialGroupThree{
        ... on MaterialGroup{
          name
        }
      }
    }
  }
}

2. Weaviate can now create the classifications.
Based on the GQL example above.

Weaviate goes over all Orders where MaterialGroupOne, MaterialGroupTwo and MaterialGroupThree are set.
Weaviate creates a classification index based on the vector representations per word in the Orders' description field. That representation looks like a nested array: [[VECTOR WORD 1], [VECTOR WORD 2], [etcetera]] e.g., [[1,1,1,1,1,...],[2,2,2,2,2,...],[etcetera]].
Weaviate goes over all Orders where MaterialGroupOne, MaterialGroupTwo or MaterialGroupThree are NOT set. For each Order that matches the previously mentioned setting, Weaviate looks at the description and creates a nested array for the description field as mentioned in the second bullet.
Weaviate matches the closest vector representation (the tests @fefi42 is currently working on).
Weaviate sets the relation.

Can we do this realtime?
We can do this realtime if Weaviate indexes all property fields as mentioned above on import time which seems a bit much. When kicking off the classification task though, Weaviate can just "start" doing this while the Weaviate makes relations over time.
Future thoughts
Would be cool if Weaviate "remembers" what were automated relations. So it can automatically reindex over time.

Copy/Paste from Hangouts discussion:
Functionality

Discussion: Actual classification:

Iterate over ever object where not all refs are set
Suggestion: Limit to cardinality=atMostOne for now
For each res, get k closest objects
Find most common reference
Update object with winner
Repeat at Step 3 for next object

Discussion: Mutate vs. Display classified (size vs. flexibility)

MVP vs NVP (see Proposal for two Iterations below)

API

GraphQL vs. REST, see pros and cons below

Suggestions for possible iterations:
MVP:

Single vector per class-object, no per property vector
Ignore any words not known to the contextionary
No "state management", i.e. classification will either run in the foreground or background, the user has no way of checking when it's complete other than looking at the results
Smarter splitting than just by space on vectorization
Rest API contains Meta info about classifciation (did a classifciation happen, confidence/distances, suggestion to be added to github issues) on GET /things/<id>?meta=true
Set minimum required confidence

NVP:
Single vector per property

Add "synonyms" via API (see Github Suggestion)
Parse numbers and SI units into words at import time
Better feedback to the user (classification ongoing, etc.)

REST vs GraphQL
Con GQL:

If process is async there are no results at first
Once process completed results can simply be viewed via GQL Get
If the process triggers data changes it is actually a mutation, so far we only have queries in the GQL API, all mutations are in REST only -> endpoint design to GitHub

->  strong preference for REST at the moment

Based on the discussion above, the following design decision need to be taken, once we decide to go through with this:

What does the REST API to start a classification (and get a status of an ongoing classification) look like?
Which fields become available on the REST APIs for GET /things and GET /things/<id> when the ?meta=true flag is set?
How do we calculate the confidence value?
How should text corpi be split up (currently very primitive by spaces)

To 3. We can either simply call it distance and just use what we get, or we could calculate some percentage out of the distance and call that confidence (in which case I would still save the distance separately.
How we can calculate the confidence depends on our distance metric. So far I used the cosine distance. This is probably not necessarily the best one. Maybe it would be good to offer different distance metrics in the future. I think it depends a bit on how our vectors work. If similar concepts are just different scales of the same vector then the cosine distance is probably good, but if the scale of the vector is meaningful then we should maybe use Euclidean distance or something.

To 4. How about splitting on most special characters - / . & # ??

Good point, and let's not forget Russian etc characters. (unicode)

We also have to think about put together words. This is very important in languages like German where words can be written together but also in other languages it happens often to create custom labels and descriptions.
I don't know if there is a machine learning model that already does that. Maybe a markov based model is already enough just splitting at the highest probability for a word to be complete.

That’s a great point! Would be interesting to know how we can split (for example) Donaudampfschiffahrtsgesellschaftskapitän. I assume the C11y will contain all individual words.


[Question] Do we want to promote the usage of Suave.AspNetCore as a best practice?

Right now, the scaffold uses Suave.AspNetCore as a dependency to run the suave application with kestrel as the webserver.
Kestrel has a lot of support and is very quick, which is a good thing.
But I'm not sure about the implications that this has on a larger application.
My only concern stems from https://github.com/dustinmoris/Suave.AspNetCore#error-handling-and-other-suave-config-settings

Suave.AspNetCore allows you to hook a Suave web application (WebPart) into the ASP.NET Core pipeline. Anything that was configured in the SuaveConfig was web server specific and required to run Suave's own web server via startWebServer. In ASP.NET Core there are other means to configure the same settings. For more information please check out the ASP.NET Core Fundamentals.

So we possible lose some suave config, but gain some aspnet kestrel config? Has anyone tried hooking up logary, or other working suave config settings to make sure that the api surface is similar/compatible.
While I don't doubt that Kestrel is a really good web server, I just want to make sure it is the right precedent to be setting, since it's possible to run suave on aspnet core without kestrel, and keep all of the configuration in the suave webserver.

In my opinion there's no need for Kestrel and I applaud @Banashek for bringing it up.

I'm in favour of keeping things as simple as possible in the scaffold/template. Please correct me if I'm wrong @Banashek, but I don't see anything in the code to run AspNetCore so I guess the dependency is not actually being used and we can just remove it.

Yeah, as far as I can notice it's starting Suave normally...
BTW, the face when people release full project with NuGet packages for the stuff I've hacked months ago and didn't do anything with it since it was not worth effort

Ah right my mistake on the actual usage of the library. I saw the dependency and a Program.fs and jumped to conclusions. Well at least the question was answered in the abstract then!

I think the dependency was in banashek's original sample and I put it in
paket.dependencies and paket.references. Not sure if it is still used.
Am 21.01.2017 01:47 schrieb "Banashek"<EMAIL_ADDRESS>
Closed #4
https://github.com/fable-compiler/fable-suave-scaffold/issues/4.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/fable-compiler/fable-suave-scaffold/issues/4#event-931507890,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNJeHlGs9oWDYTGTLeTKNrxrS2jZUks5rUVWQgaJpZM4LprNG
.


RC Can't generate PWM output and rotor not spin in PX4 pixhawk1

I use PX4 in pixhawk1.
Problem Description:
My RC controller can arm and disarm the PX4, but can't make rotor rotate.
Test Results: (may help you to locate where my problem is)
0. nsh> px4io start. I start px4io to use RC, otherwise RC can't be used.
1.I use nsh ' pwm test -p 1000 -a ' to make ESC know I'm starting. Then use ' pwm test -p 1200 -a ' or' pwm test -p 2000 -a ' to make rotor spin. It Spins! But, with RC controller, it makes no spin.
2. APM can successfully works on my pixhawk1.It means rotor, esc , pixhawk works. But it with PX4 does not work.
3. My pixhawk1 has 2 mb flash. Both px4_fmu-v2 and v3 were tried.
4. After arming, RC controller Can't make it spin. but give pwm test, it spins.Use RC no spins.
5. PX4io status shows change with RC controller changing. (in the line of 8 raw R/C inputs) But
controls 0: 0 0 0 0 0 0 0 0
controls 1: 0 0 0 0 0 0 0 0
controls 2: 0 0 0 0 0 0 0 0
controls 3: 0 0 0 0 0 0 0 0
6. RC calibration finished. Makes no difference.
7.Rotor can spins by using nsh> pwm test -p 1400 -a, so it means no error in ESC and rotor.
I have no idea what the problem is.  It cost me days on this issue. I really need a support.
Best Appreciation for your help!

Can you verify the exact version of PX4 you flashed? You can run ver all in the nsh console.
Which airframe did you configure (box in QGC)? This is the SYS_AUTOSTART parameter.

Hello @dagar  !
Thanks for your focus on my question.
Here's 'ver all' result:
HW arch: PX4_FMU_V3 HW type: V2 HW version: 0x00090008 HW revision: 0x00000000 FW git-hash: 161cf7f5d92abba0b1b862d7aaa0939cb69d42bb FW version: 1.8.0 0 (17301504) FW git-branch: master OS: NuttX OS version: Release 7.22.0 (118882559) OS git-hash: 166d898c70141d7ddb179b5ead1c5ea726574411 Build datetime: Dec  6 2018 12:42:05 Build uri: localhost Toolchain: GNU GCC, 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204] PX4GUID:<PHONE_NUMBER>003436333932355110001f0032 MCU: STM32F42x, rev. 3
I use AIrFrame "Quadrotor x"  "DJI Flame Wheel F450".
I'll appreciate to hear more instruction from you!
Thanks a lot !

I've solved this issue by update the Firmware with QGC.
I used to believe when I git pix4 I get the newest release, But maybe I'm wrong.
I use QGC- Firmware to get the newest verision 1.8.1
And it works


fix: puppeteer scroll to locator

Problem
With the puppeteer helper using I.scrollTo() on an element that's well below the viewport won't scroll to the element. The browser will remain in the upper area of the page instead.
Solution
The elementCoordinates returned by _clickablePoint() are viewport coordinates  (not window coordinates). Since we have already scrolled to the element via _scrollIntoViewIfNeeded(), we need scrollBy (not scrollTo) those coordinates to bring the element to the top the way webdriver does.
Problem 2
When switching to an iframe, scroll is not correctly applied.
Solution 2
Using executeScript instead of this.page.evaluate, since executeScript uses the current context (_locate, _scrollIntoViewIfNeeded and _clickablePoint use the it as well).

Thanks!


add info box

Could add a info button to show/hide? Right now just hiding with media query.

@jpoehnelt has this been tested on mobile?


[narrow-toast] Add max-width to toasts.

Trello: https://trello.com/c/ZGlV9fQT/129-bug-cannot-click-on-header-login-logout-logo-when-toast-is-visible

Screenshot with new CSS edits shown:

This is not a huge deal, but it gets a bit weird / off-center and cut-off on smaller screen sizes.

The toast has a min-width of 30rem so I suppose I can make that the max-width as well and we would get a bit more space than we currently do. I can give it a whirl quick and see how that works.

@jgerigmeyer I made some edits to the width of the toast at different screen sizes. Check it out when you have a second.


Adds environment blog post and documentation

Closes #596 and closes #577
https://envpost.wedeploy.io/blog/introducing-project-environments/
https://envpost.wedeploy.io/docs/intro/environments/

Just started reviewing :) :octocat: Sent from GH.

Just started reviewing :) :octocat: Sent from GH.


Handle login logout when Refresh token expires

I am using DRF with dj-rest-auth JWT HttpOnly Cookie. I found some strange behavior To Logout we have to provide valid access token, only then it will logout and delete the httpOnly cookie from client. If we do not provide valid access token Its still logout but doesn't delete httponly cookie from client. This becomes critical when refresh token expires now we do not have valid access and refresh token so we cant logout with valid token hence httponly cookie remain there in the client browser (can't delete it from client becoz its httpOnly). As we have invalid token, when i make login request again it throws 401 unauthorized error until i manually remove all cookies from the client.  Its now a loop neither i can login nor i can logout until I remove the cookie manually from client. The same can be tested using Postman.
settings.py
REST_AUTH = {
    'TOKEN_MODEL': None,
    'PASSWORD_RESET_USE_SITES_DOMAIN': True,
    'OLD_PASSWORD_FIELD_ENABLED': True,
    'LOGOUT_ON_PASSWORD_CHANGE': False,
    'USE_JWT': True,
    'JWT_AUTH_COOKIE': 'access',
    'JWT_AUTH_REFRESH_COOKIE': 'refresh',
    'JWT_AUTH_REFRESH_COOKIE_PATH':'/',
    'JWT_AUTH_SECURE':False,
    'JWT_AUTH_HTTPONLY':True,
    'JWT_AUTH_SAMESITE':'Lax',
    'JWT_AUTH_RETURN_EXPIRATION':True,

    # Custom Registration to Add First and Last Name Field
    'REGISTER_SERIALIZER': 'accounts.serializers.CustomRegisterSerializer',

    # Custom Login to Remove Username
    'LOGIN_SERIALIZER': 'accounts.serializers.CustomLoginSerializer',

    # Custom User Detail to Remove Username and add is_staff
    'USER_DETAILS_SERIALIZER': 'accounts.serializers.CustomUserDetailsSerializer',
}

SIMPLE_JWT = {
    "ACCESS_TOKEN_LIFETIME": timedelta(minutes=1),
    "REFRESH_TOKEN_LIFETIME": timedelta(minutes=2),      # To check what will happen when refresh token expires
    "ROTATE_REFRESH_TOKENS": False,
    "BLACKLIST_AFTER_ROTATION": False,
    "UPDATE_LAST_LOGIN": True,
}

yeah, I also wonder how do I refresh token if the refresh_token removed from response (http-only)


Add Local Storage Provider in the Liqo Controller Manager

Description
This pr adds the Liqo storage provisioner in the controller manager in order to provide local virtual volumes
Ref #944
How Has This Been Tested?

[x] locally on KinD

/test

/test

/merge


PyYAML 3.12 -> 3.13

Installing metaci_cli is currently failing due to a mismatch between CumulusCI's dependency on PyYAML being set to an older version.
Increase to 3.13 to resolve.

Why are we pinning specific versions rather than minimum versions in setup.py?

I'm open to pinning minimum versions but wonder if that should be done as a more holistic change to ensure we understand the implications and set minimum versions in the right way to avoid major releases breaking things unexpectedly.

Hmm, we want specific version pins when installing cumulusci as a CLI tool, but when installing as a dependency of something like MetaCI we'd like the downstream package to be able to override the pins when necessary. This is tricky...

Yeah, I'm not sure that's the ideal but it's kinda the contract we've created with anything built on top of cumulusci for now.  It's probably something we should change but we need to ensure that doesn't break other tooling using cumulusci like MetaCI and the metaci_cli.

The thing I've seen that we could consider would be to use minimum pins in setup.py, but avoid accidental version bumps for direct consumers by recommending that people install using a requirements.txt file that we publish, instead of just doing pip install cumulusci

I'm thinking we're getting close to having reason to split cci and CumulusCI into separate eggs...

Hmm, maaayybe -- but if we do that I'd strongly advocate for keeping them in the same repository since changes in one often require changes in the other.


Missing support for HTTP HEAD request for akka-http and http4s

Support for HTTP HEAD is missing for akka-http and http4s (See code comments below):
In guardrail/modules/scala-http4s/src/main/scala/dev/guardrail/generators/scala/http4s/Http4sServerGenerator.scala:
  def httpMethodToHttp4s(method: HttpMethod): Target[Term.Name] = method match {
    case HttpMethod.DELETE => Target.pure(Term.Name("DELETE"))
    case HttpMethod.GET    => Target.pure(Term.Name("GET"))
    case HttpMethod.PATCH  => Target.pure(Term.Name("PATCH"))
    case HttpMethod.POST   => Target.pure(Term.Name("POST"))
    case HttpMethod.PUT    => Target.pure(Term.Name("PUT"))
    case HttpMethod.HEAD   => Target.pure(Term.Name("HEAD"))  // <------- Need to add this!
    case other             => Target.raiseUserError(s"Unknown method: ${other}")
  }

And in guardrail/modules/scala-akka-http/src/main/scala/dev/guardrail/generators/scala/akkaHttp/AkkaHttpServerGenerator.scala
  def httpMethodToAkka(method: HttpMethod): Target[Term] = method match {
    case HttpMethod.DELETE  => Target.pure(q"delete")
    case HttpMethod.GET     => Target.pure(q"get")
    case HttpMethod.PATCH   => Target.pure(q"patch")
    case HttpMethod.POST    => Target.pure(q"post")
    case HttpMethod.PUT     => Target.pure(q"put")
    case HttpMethod.OPTIONS => Target.pure(q"options")
    case HttpMethod.HEAD    => Target.pure(q"head")  // <----- Need to add this!
    case other              => Target.raiseUserError(s"Unknown method: ${other}")
  }

I haven't tested this yet, but assume this is what is needed.

This looks correct, can you open a PR with the proposed change?

See https://github.com/guardrail-dev/guardrail/pull/1686

scala-akka-http-v0.76.0
scala-http4s-v0.76.0

have now been released. Please add something similar to
libraryDependencies += "dev.guardrail" %% "guardrail-scala-akka-http" % "0.76.0"

to your project/guardrail.sbt in order to manually upgrade that module and get this functionality sooner, it will get picked up in the next sbt-guardrail release.

Closing, thank you again!


Improve Exception handling and CallError responses

This PR is to improve the exception handling in validating messages and to make the CallError messages closer to the OCPP spec. Quick overview:

Added missing NotSupported to the exception list.
Changed usage of NotImplemented to NotSupported when a handler doesn't exist.
Use the default description and moved additional information to details
Reduce the usage of ValidationError as it is not a valid OCPP error type, doesn't generate a CallError, and crashes the code when handling messages. I've tried to replace them with relevant OCPP error types.

❤


allowedGroups query

Hi,
I have a question regarding the User matching in given DN's of allowed Groups.
I have openLDAP roles, they look like this:
dn: uid=1234,ou=roles,ou=test,ou=test_service,o=some_org,c=some_country
description: some description
o: my_test
displayName: test_role
uid: 1234
cn: test_role
ou: test_role
objectClass: organizationalUnit
objectClass: OpenLDAPou
objectClass: uidObject
objectClass: spCategory
mail: some_mail@address
member: uid=member1,ou=users,ou=test,ou=test_service,o=some_org,c=some_country
member: uid=member2,ou=users,ou=test,ou=test_service,o=some_org,c=some_country

users look like this:
dn: uid=member1,ou=users,ou=test,ou=test_service,o=some_org,c=some_country
displayName::1274z90==
cn:: 12oi8u51395i==
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: spPerson
sn: Name
employeeNumber: 1852375
givenName:: 1274z90==
ou: abbreviation
mail<EMAIL_ADDRESS>uid: member1

relevant plugin yaml config is like:
attribute: uid
baseDn: ou=users,ou=test,ou=test_service,o=some_org,c=some_country
allowedGroups:
  - "uid=1234,ou=roles,ou=test,ou=test_service,o=some_org,c=some_country"

The user authentication works fine, but it doesn't seem to find the user as members:
DEBUG: ldapAuth: 2023/02/14 09:14:44 restricted.go:52: No session found!
Why it doesn't match? Does it query for another attribute than member maybe? Could I work around somehow with a searchfilter?
Cheers!
And thanks a lot for sharing this plugin!

Hello, @etSpark
The group filter used to find members in a group can be checked here:
https://github.com/wiltonsr/ldapAuth/blob/7878b9501d4f8dd0a354b61b2eafad08e7f180b6/ldapauth.go#L267-L271
It uses the three most common attribute names for groups in OpenLDAP and AD: member, uniqueMember and memberUid.
You can check and make some tests using examples page.

Thanks @wiltonsr !
The group filter should fit for the ldap server I am faced with, then.
If I query this ldap via linux ldapsearch with the baseDN I provided in the allowedGroups and the userDN + filter for the attribute member - I get an entry back.
Looking at the logs I posted at the end of my initial comment:
The line Searching Group .. with User .. is understandable, comes from https://github.com/wiltonsr/ldapAuth/blob/7878b9501d4f8dd0a354b61b2eafad08e7f180b6/ldapauth.go#L273
and it got the right parameters.
But where do the next two log lines come from?
ERROR: ldapAuth: 2023/02/14 09:14:49 restricted.go:51: %!s(<nil>)
DEBUG: ldapAuth: 2023/02/14 09:14:49 restricted.go:52: [<nil>]

They don't seem to got catched by:
https://github.com/wiltonsr/ldapAuth/blob/7878b9501d4f8dd0a354b61b2eafad08e7f180b6/ldapauth.go#L290

But where do the next two log lines come from?
ERROR: ldapAuth: 2023/02/14 09:14:49 restricted.go:51: %!s(<nil>)
DEBUG: ldapAuth: 2023/02/14 09:14:49 restricted.go:52: [<nil>]

They don't seem to got catched by:
https://github.com/wiltonsr/ldapAuth/blob/7878b9501d4f8dd0a354b61b2eafad08e7f180b6/ldapauth.go#L290

ERROR log comes from here:
https://github.com/wiltonsr/ldapAuth/blob/7878b9501d4f8dd0a354b61b2eafad08e7f180b6/ldapauth.go#L188-L195
and DEBUG from here:
https://github.com/wiltonsr/ldapAuth/blob/7878b9501d4f8dd0a354b61b2eafad08e7f180b6/ldapauth.go#L305-L306
They are printing the err that happened in search:
https://github.com/wiltonsr/ldapAuth/blob/7878b9501d4f8dd0a354b61b2eafad08e7f180b6/ldapauth.go#L287

@etSpark I can reproduce your issue.
That happens when the user doesn't belong to any group.
traefik  | DEBUG: ldapAuth: 2023/02/14 16:09:12 restricted.go:51: AllowedGroups => '[ou=mathematicians2,dc=example,dc=com ou=italians2,ou=scientists,dc=example,dc=com]'
traefik  | DEBUG: ldapAuth: 2023/02/14 16:09:12 restricted.go:51: Username => ''
traefik  | DEBUG: ldapAuth: 2023/02/14 16:09:18 restricted.go:51: Session details: &{ map[] 0xc000f3e680 true {0xc0014f4c60 {0xc001161f40 0xc001e98448 406}} ldapAuth_session_token}
traefik  | DEBUG: ldapAuth: 2023/02/14 16:09:18 restricted.go:52: No session found! Trying to authenticate in LDAP
traefik  | DEBUG: ldapAuth: 2023/02/14 16:09:18 restricted.go:51: Host: ldap.forumsys.com
traefik  | DEBUG: ldapAuth: 2023/02/14 16:09:18 restricted.go:51: Connect Address: ldap.forumsys.com:389
traefik  | DEBUG: ldapAuth: 2023/02/14 16:09:18 restricted.go:51: Running in Bind Mode
traefik  | DEBUG: ldapAuth: 2023/02/14 16:09:18 restricted.go:51: Authenticating User: uid=tesla,dc=example,dc=com
traefik  | DEBUG: ldapAuth: 2023/02/14 16:09:18 restricted.go:51: Searching Group: 'ou=mathematicians2,dc=example,dc=com' with User: 'uid=tesla,dc=example,dc=com'
traefik  | DEBUG: ldapAuth: 2023/02/14 16:09:19 restricted.go:51: Searching Group: 'ou=italians2,ou=scientists,dc=example,dc=com' with User: 'uid=tesla,dc=example,dc=com'
traefik  | ERROR: ldapAuth: 2023/02/14 16:09:19 restricted.go:51: %!s(<nil>)
traefik  | DEBUG: ldapAuth: 2023/02/14 16:09:19 restricted.go:52: [<nil>]

I will try to fix ASAP.

Hello, @etSpark
I released v.0.0.21. Please test and let me know if the problem persists.

Hi @wiltonsr,
tested and yes the logging works fine now!
Before I get the User not in any of the allowed group, I now get LDAP Result Code 32 "No Such Object"
So for some reason it does not find the dn of the group in my case.
I need to use a bindDN with bindPassword, maybe it doesn't utilize those when trying to get the group DN? Just guessing.. I need to dig deeper.
Thanks for improving the logging!


Paste multiple line text sometimes corrupted in Cygwin bash shell

Windows Terminal version
1.11.2921.0
Windows build number
10.0.19042.1466
Other Software
GNU bash, version 4.4.12(3)-release (x86_64-unknown-cygwin)
Steps to reproduce
Add a profile for Cygwin.
            {
                "commandline": "C:\\cygwin64\\bin\\bash.exe -l",
                "guid": "{09ff2493-xxxx-4ee9-xxxx-d7f90bb2xxxx}",
                "hidden": false,
                "icon": "C:\\cygwin64\\Cygwin-Terminal.ico",
                "name": "Cygwin"
            },

Open Cygwin bash shell in a Terminal tab window and execute vi /tmp/temp.txt and then paste multiple line text. For example:
this is a sample text to test Windows terminal copy-paste issue, line 1
this is a sample text to test Windows terminal copy-paste issue, line 2
this is a sample text to test Windows terminal copy-paste issue, line 3
this is a sample text to test Windows terminal copy-paste issue, line 4
this is a sample text to test Windows terminal copy-paste issue, line 5
this is a sample text to test Windows terminal copy-paste issue, line 6
this is a sample text to test Windows terminal copy-paste issue, line 7
this is a sample text to test Windows terminal copy-paste issue, line 8
this is a sample text to test Windows terminal copy-paste issue, line 9
this is a sample text to test Windows terminal copy-paste issue, line 10
this is a sample text to test Windows terminal copy-paste issue, line 11
this is a sample text to test Windows terminal copy-paste issue, line 12
this is a sample text to test Windows terminal copy-paste issue, line 13
this is a sample text to test Windows terminal copy-paste issue, line 14
this is a sample text to test Windows terminal copy-paste issue, line 15
this is a sample text to test Windows terminal copy-paste issue, line 16
this is a sample text to test Windows terminal copy-paste issue, line 17
this is a sample text to test Windows terminal copy-paste issue, line 18
this is a sample text to test Windows terminal copy-paste issue, line 19
this is a sample text to test Windows terminal copy-paste issue, line 20
this is a sample text to test Windows terminal copy-paste issue, line 21
this is a sample text to test Windows terminal copy-paste issue, line 22
this is a sample text to test Windows terminal copy-paste issue, line 23
this is a sample text to test Windows terminal copy-paste issue, line 24
this is a sample text to test Windows terminal copy-paste issue, line 25
this is a sample text to test Windows terminal copy-paste issue, line 26
this is a sample text to test Windows terminal copy-paste issue, line 27
this is a sample text to test Windows terminal copy-paste issue, line 28
this is a sample text to test Windows terminal copy-paste issue, line 29
this is a sample text to test Windows terminal copy-paste issue, line 30
this is a sample text to test Windows terminal copy-paste issue, line 31
this is a sample text to test Windows terminal copy-paste issue, line 32
this is a sample text to test Windows terminal copy-paste issue, line 33
this is a sample text to test Windows terminal copy-paste issue, line 34
this is a sample text to test Windows terminal copy-paste issue, line 35
this is a sample text to test Windows terminal copy-paste issue, line 36
this is a sample text to test Windows terminal copy-paste issue, line 37
this is a sample text to test Windows terminal copy-paste issue, line 38
this is a sample text to test Windows terminal copy-paste issue, line 39
this is a sample text to test Windows terminal copy-paste issue, line 40

Expected Behavior
The text pasted in Cygwin bash shell as is.
Actual Behavior
The text pasted in Cygwin bash shell corrupted sometimes. There is no such issue when using mintty.
https://user-images.githubusercontent.com/3469040/153351084-b25930f9-11c4-4886-9ce7-a889aa468207.mp4

Weird. Does this repro with the vintage console host, conhost.exe by any chance?

Weird. Does this repro with the vintage console host, conhost.exe by any chance?

The same.

Please note that this issue cannot be reproduced by using ssh.exe in System32\OpenSSH\ with the conhost.exe. However, if using the same ssh.exe with bash.exe, it can be reproduced.

Also happens in 1.12.10982.0.
No issue with cmd and power shell.

Looks same issue with #6901
When Copying, Line Wrapped Text Is Inconsistently Broken Into Multiple Lines #6901


add push_order/2

Coverage remained the same at 100.0% when pulling b52dcebf5b74e1cc00b8bfb8843a8bbd01b9833d on sortable-tables into 54dd6fd3296317f8fac245006c1d2fe602af896f on main.


Integration tests

This PR aims to add integration tests to rusty-hermit. This PR consists mostly of the framework necessary, and only contains some basic tests, which realistically don't have a very high quality.  None of the rusty-demo tests have been moved here either (yet).
The PR mainly adds hermit_test_runner.py which can run the integration tests built by cargo test --target [...] either on uhyve or on qemu.
There are still a couple of open ToDos and points that might need some discussion / rework, so I'm opening this as a draft. I'll also improve the Description of the PR next week when I have a bit more time.
Usage
Running Tests
The integration tests can executed by calling:
cargo test --tests --no-fail-fast -Z build-std=core,alloc --target x86_64-unknown-hermit-kernel [-- [Test Runner arguments]]
Valid Test Runner arguments currently include:

--bootloader_path=some/path: This implicitly uses qemu to execute the tests. If absent uhyve will be used.
--uhyve_path=some/path: Optional, use if uhyve is not in PATH
-v: Optional, always prints the stdout/stderr of the test, regardless of test failure
-vv: Optional, In addition to -v this also runs the test in verbose mode (i.e. uhyve -v)
--gdb: Enables gdb on port 1234 and stops the test executable at the hermit entrypoint.
--num_cores: Controls the number of CPU cores the test runner uses. Defaults to 1.

This implicitly also executes the unit-tests, however the testrunner currently skips the unit-tests with a warning, since they are currently broken and result in a bootloop.
Writing Tests
Integration tests are written in the top-level of the tests folder. The common mod provides shared functionality that the tests can use. This includes an exit function, that all tests should use to exit, since it ensures that an exit code is passed to the runner regardless of whether qemu or uhyve is used. If you want to use a test_runner you can use #[test_case]
Existing Tests (Host)
The existing Unit-tests can still be run on the host OS via: cargo test --lib. In the future the unit-tests also should be able to run on hermit, but this is currently broken, due to a bootloop, directly after entering hermit.
Demo Tests
I added some basic tests, which demonstrate how a test could look like.

@jschwe I added a workaround for uyhve. However, the number of environment variables is still limited. Does it work for you.


#[List] validation attribute not working - syntax error, unexpected token "list"

I think you guys need to update the docs about the List validation attribute.
I tried using it for my current project and I was getting a syntax error, unexpected token 'list'.
I then took a peak at the code source and it looks like it should be changed to:
`use Spatie\LaravelData\Attributes\Validation\ListType;
    #[ListType]
    public array $disabled_list = [],`

Not really a bug, but thought I'd share in case anyone else runs in to this issue.

Done


Partial wildcards fix

Fix for #102.

Coverage decreased (-1.4%) to 97.46% when pulling 98b3302d9f7bef7becaacd0a86b2ba48e90ddcfb on fix/partial-wildcards into 79aaea6c382b78ab7012d8ab7bfe73f2342bc77c on master.

Coverage decreased (-1.4%) to 97.46% when pulling 98b3302d9f7bef7becaacd0a86b2ba48e90ddcfb on fix/partial-wildcards into 79aaea6c382b78ab7012d8ab7bfe73f2342bc77c on master.

Coverage decreased (-1.4%) to 97.46% when pulling 98b3302d9f7bef7becaacd0a86b2ba48e90ddcfb on fix/partial-wildcards into 79aaea6c382b78ab7012d8ab7bfe73f2342bc77c on master.


nixos: add programs.smartctl.enable option

Description of changes
This option adds a smartctl setuid wrapper, available to users in the
smartctl group.
I've had this in my nixos-config.git repo for 2+ years. Should we add it to NixOS?

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Are there any security implications?

Can you provide examples of distributions where this is implemented? It seems of quite niche use. Also the SUID approach is inherently less secure than adding a rule to security.sudo.extraRules. Is it really needed in nixpkgs?

Or using the capabilities mechanism is also better than suid.

Can you provide examples of distributions where this is implemented?

Not right now. From prior experience, this type of thing is out of scope from most FHS distributions. (AFAIR, they just tell users to manually tweak permission bits on existing package files.)

It seems of quite niche use.

Perhaps. But it seems to be needed for https://gallery.munin-monitoring.org/plugins/munin-2.0/hddtemp_smartctl/ and https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/blob/master/smartmon.py. (Those two I've had first hand experience with.)

Also the SUID approach is inherently less secure than adding a rule to security.sudo.extraRules.

Why? (I'm here to learn.)

Is it really needed in nixpkgs?

That's what I'm asking the community. I don't have strong opinion.

Or using the capabilities mechanism is also better than suid.

I'll look into that.

Can you provide examples of distributions where this is implemented?

Not right now. From prior experience, this type of thing is out of scope from most FHS distributions. (AFAIR, they just tell users to manually tweak permission bits on existing package files.)

I'm pretty sure that no legacy distro encourages manual permission tweaking on files covered by package manager. Doesn't mean that you can't, of course.

It seems of quite niche use.

Perhaps. But it seems to be needed for https://gallery.munin-monitoring.org/plugins/munin-2.0/hddtemp_smartctl/ and https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/blob/master/smartmon.py. (Those two I've had first hand experience with.)

A more idiomatic approach would be to add wrapping as a dependency of such derivations, rather that enabling it globally via a module.

Also the SUID approach is inherently less secure than adding a rule to security.sudo.extraRules.

Why? (I'm here to learn.)

SUID is a blanket permission granting. The only "authorizing" thing is group membership, having that you basically have root. Sudo allows for more fine-grained and explicit approach: you can tweak users, groups, hosts etc. capabilities allow not having full root in the first place, only the needed bits. smartctl is not only a monitoring tool, it can change the device (in a potentially destructive way).

Is it really needed in nixpkgs?
That's what I'm asking the community. I don't have strong opinion.

I'm certainly not convinced, at least in this form.

Or using the capabilities mechanism is also better than suid.

I'll look into that.

After many attempts I got it working with capabilities = "cap_dac_override,cap_sys_admin+p" on a system with an NVMe drive. However, that failed in a scary way on a SATA system:
$ /run/wrappers/bin/smartctl -a /dev/sda
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.15.50] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

Probable ATA device behind a SAT layer
Try an additional '-d ata' or '-d sat' argument.
(successful exit)

IOW, with capabilities I managed to cripple smartctl -- it neither got a permission denied nor showed the expected output.
If we continue with capabilities instead of setuid, how do we know we don't break smartctl like that for some hardware? Is it worth it? (I'm leaning towards "not" now.)

A more idiomatic approach would be to add wrapping as a dependency of such derivations, rather that enabling it globally via a module.

Like having a service that gets started with a custom smartctl wrapper first in $PATH that runs sudo $real_smartctl and have the nixos module configure sudoers accordingly?
I guess that could work.
(Potential downside: each module must implement their own wrappers.)
Note that an architecture like that seems stricter than what we have today -- several modules use security.wrappers today:
$ git grep -l security.wrappers nixos/modules | wc -l
68

Like having a service that gets started with a custom smartctl wrapper first in $PATH that runs sudo $real_smartctl and have the nixos module configure sudoers accordingly?

I like this approach, what about creating something like a per systemd service secutiry.wrapper option, just like systemd.services.<name>.path but with an extra step of wrapping.

After many attempts I got it working with capabilities = "cap_dac_override,cap_sys_admin+p" [...]

I originally thought I could use strace to find the syscalls that were lacking permissions, but one cannot run strace on nixos setuid- or capabilities wrappers. And doing sudo strace [...] as a workaround bypasses every permission check, so it's useless.
Any ideas? Or it while (program_behaves_badly()) { try_new_capabilities(); } the best we can do?

After many attempts I got it working with capabilities = "cap_dac_override,cap_sys_admin+p" on a system with an NVMe drive. However, that failed in a scary way on a SATA system:

For the record, this seems to work for both SATA and NVMe drives: capabilities = "cap_dac_override,cap_sys_admin,cap_sys_rawio+p".
(But who knows if there are other capabilities required for other interfaces?)

Let's say I want to run smartctl with capabilities instead of full root access, but want to use sudo for auth. Is that possible? If we use a "jump" user/group, perhaps? Does it make sense?

Like having a service that gets started with a custom smartctl wrapper first in $PATH that runs sudo $real_smartctl and have the nixos module configure sudoers accordingly?

I like this approach, what about creating something like a per systemd service secutiry.wrapper option, just like systemd.services.<name>.path but with an extra step of wrapping, together with countermeasures to avoid other processes calling the wrapper directly. (This sounds more and more like a few lines in the sudoers file as I'm typing, oops)

sudo logs an entry to the system journal each time it is invoked. Isn't that a bit spammy to have for services?


React 18 strict mode docs are inconsistent about how unmount and remount actually works (and whether it's simulated)

Problem
The React v18.0 release article states the following about React 18's new strict mode behavior. Emphasis is my own:

To help surface these issues, React 18 introduces a new development-only check to Strict Mode. This new check will automatically unmount and remount every component, whenever a component mounts for the first time, restoring the previous state on the second mount.

However, in the following code demo, I'm able to use a ref to keep track of the number of times that useEffect runs, which I would not be able to do if the component were truly unmounting since refs are destroyed: https://codesandbox.io/s/run-mount-logic-only-once-zpywhc?file=/src/App.js.
import { useEffect, useRef } from "react";

export default function App() {
  const hasMounted = useRef(false);

  useEffect(() => {
    if (hasMounted.current === false) {
      hasMounted.current = true;
      console.count("mounted");
    }
  }, []);

  return <></>;
}

If the component truly unmounted and remounted and then restored state on the second mount, then the ref would not persist because 1) refs are not state (and hence not restored as described in the above quote), and 2) refs are normally destroyed on unmount. In that case, we would see the following logs:
mounted: 1
mounted: 2

However, what we actually see is:
mounted: 1

Which seems to suggest that React is not actually unmounting and remounting every component.
But later on, the same article clarifies that React simulates unmounting and remounting:

With Strict Mode in React 18, React will simulate unmounting and remounting the component in development mode:

Which makes a lot more sense: Effects are invoked twice to simulate an unmount and remount, but components are not truly unmounted. The React docs on Fixing bugs found by re-running Effects in development further clarify this:

When Strict Mode is on, React will also run one extra setup+cleanup cycle in development for every Effect. This may feel surprising, but it helps reveal subtle bugs that are hard to catch manually.

Suggestion:
There are two possibilities as far as I can tell:

React does actually unmount and remount components, and it restores not only "state" but also anything within the scope of the component (e.g., refs).
(More likely) React simulates remounting by simply invoking every effect twice.

Either way, I think it would be helpful to update all docs to be consistent. There's already quite a lot of misinformation out there on this subject and I've come across so many articles that claim React unmounts and remounts in strict mode on v18. For example, AG Grid's React 18 - Avoiding Use Effect Getting Called Twice article starts with the following:

React 18 introduced a huge breaking change, when in Strict Mode, all components mount and unmount, then mount again.

Yeah I can understand the confusion. Mount and unmount is not rigorously defined, so the difference between "actual" mount/unmount and "simulated" mount/unmount is unclear. For example, if state isn't cleaned up when doing the unmount, does that mean it's actually unmounted either?
That being said, the intent of the feature is to simulate actually unmounting and remounting the component, with the state restored on second mount, the way Fast Refresh does, or some future features will. For refs specifically, we intend to update Strict Mode to also destroy and re-create refs during the simulated unmount/remount, since this is the behavior that will happen in production features: https://github.com/facebook/react/pull/25049. We're still rolling this change out and I don't have a timeline for when it will land, but the idea is that we're simulating an actual unmount/remount.

@rickhanlonii In the meantime, would it be possible to keep this issue open to update the website docs to be consistent?
Also, does this mean that devs shouldn't use the isMounted ref pattern since that will eventually break once React destroys and recreates refs?

Sorry, which part need updated?

I noted this in my original post, but:

To help surface these issues, React 18 introduces a new development-only check to Strict Mode. This new check will automatically unmount and remount every component, whenever a component mounts for the first time, restoring the previous state on the second mount.

vs.

With Strict Mode in React 18, React will simulate unmounting and remounting the component in development mode:

This difference in wording can cause some confusion, and it's an important distinction—because at the moment, a true unmount will destroy refs, while a simulated unmount does not. Everyone I asked (both at work and online) couldn't give me an answer because they were equally confused.

I don't understand how the word "simulated" matters. In strict mode, all the behaviors are obviously simulated because they're not real behaviors. But even if there was a difference, there should be not difference between a "simulated" unmount and a "real" unmount (the ref bug notwithstanding).
So it's not clear what the suggestion here is. If it's to add "simulated", sure I guess, but that doesn't change the meaning because "simulated" doesn't imply "doesn't include refs/state". If it's to remove "simulated" from the blog post, what would you call what Strict Mode does?

Is the ref persisting actually a bug? If it's a bug that's going to be fixed it doesn't matter, but if refs are handled differently between dev and prod, even if it's a minor difference, that's important to know. It could lead to some confusing behaviour. Also it could be that using a ref like that is considered an undesirable side effect, and something to avoid, which would also be good to know.

(the ref bug notwithstanding).

I have the same question as @jorjordandan—does this mean that "refs not getting destroyed" is actually a bug? If so, maybe it would be worth discouraging the "isMounted" ref pattern prominently in the docs somewhere. I've seen some tutorials suggesting that as a workaround (as opposed to disabling strict mode). But it sounds like that's a hacky workaround that will eventually break. Either way, it seems important enough to clarify in the docs.

So it's not clear what the suggestion here is. If it's to add "simulated", sure I guess, but that doesn't change the meaning because "simulated" doesn't imply "doesn't include refs/state". If it's to remove "simulated" from the blog post, what would you call what Strict Mode does?

The only reason I found the first description (the one without "simulated") confusing is because of the ref behavior—my (mis)understanding was that refs are preserved between these unmounts and remounts intentionally, in contrast to how ordinary remounts work in all other scenarios (state and refs are destroyed). But again, it sounds like that wasn't the intention?

StrictMode should simulate the prod behavior so it's a known gap we intend to fix.

maybe it would be worth discouraging the "isMounted" ref pattern prominently in the docs somewhere

Yeah, maybe. We have docs for handling the common cases and using a ref is not one of the ways to handle it.
It's important to understand what is actually happening in prod when you use a ref isMounted pattern, because it's probably not what you want anyway (even if we were to keep the current ref behavior).
In features like Fast Refresh and eventually Offscreen, we will unmount and remount the component, restoring the state that was last used. This is a benefit of those features, not just something React is imposing on you unnecessarily. In Fast Refresh, you don't want state like controlled input fields or filter settings to reset every time you change some CSS. So we unmount and remount the component, using the same state as before. In Offscreen, if you open a modal and close it, you probably don't want all the things behind the modal to reset.
With the features in mind, consider some common cases of using effects, and how the isMounted ref hack breaks them:

Fetching data: with the current behavior, where refs are not destroyed, the ref ensures that you only fetch the data once. But in the case of Offscreen, where you navigate away from a tab (for example) and back, you will very likely want to run the effect again to get the latest data since it may be stale (and if it actually unmounted, it would have refreshed).
Logging: Another common one is avoiding logging, but i more unfortunate, but the recommendation is to just log twice and have the logging infra ignore/handle the duplication. In dev, logging shouldn't do anything and/or have deduping built in. Better explanation here.

So even if we were going to persist refs, you wouldn't want to use the isMounted pattern. Hopefully the explanation above helps understand how this is a necessary constraint to get the benefits of the features, not something being imposed arbitrarily.

Today I remembered this popular Reactathon 2022 talk by @davidkpiano that mentioned the ref workaround for strict mode. This may or may not have been the first time we saw the ref trick mentioned, but I remember it got a lot of attention on Twitter at the time and there were various discussions about this behavior and the proposed escape hatch.

Just revisiting this issue because I think we're underestimating just how widespread this pattern (anti-pattern?) may be at this point.

Docs added here: https://github.com/reactjs/react.dev/pull/6846


"only_once" not respected by "Sleep switch".

When lights are already on, they seem to turn to the sleep settings when the sleep mode switch is turned on.
I would expect lights to stay in their current state and only go to sleep mode after being turned off and on again.
Is this achievable in any way?

This is actually by design.
Setting these all have the same effect:

turning light on and off
turning the adaptive lighting switch on and off
turning sleep mode switch on and off

It would be much more difficult to implement tracking only_once in all cases.

Would there not be a way for the "to sleep settings" action call on the bulbs check that they are not on?

Yes, that is possible, however, I would need to implement it in a way that it is configurable because I do not want to change the current behavior (which people rely on).
Currently, I do not find it worth the trouble given the exploding number of configuration options.
What is your use-case if I might ask? 😄

My use-case is very specific, so probably won't apply to much, but here I go;
I host events very regularly in my house, events where the lights have saturated colors.
I would like to enable the "Sleep mode" when the main users or the house are asleep ( Partners and Squatters ), while keeping the lights that are still on in their original color until that room is emptied by the remaining guests, turning to a "sleep mode" color when motion is re-detected
( This will incentivize the guests to remain in the already occupied rooms and slowly make more and more rooms darker. )
My goal will all of this is to automate the programmed death of the party, where people are cordially pushed out by automated means.

I might be able to implement only_once differently where it marks a light as manually_control. Then I could provide an option where one selects how manually control is reset. However, it might be a while until I find the time for this.

Sounds like a cool use case.
I might be able to implement only_once differently where it marks a light as manually_control. Then I could provide an option where one selects how manually control is reset. However, it might be a while until I find the time for this.

I'm a patient person!


Chat sanitizer explodes when sending only a smiley over radio.

Description
Steps to reproduce:

Type ;lol, ;:), ;:( or any other smiley into chat.
Say command fails to execute!

[ERRO] con: localhost@JoeGenero: ExecuteError - say ";lol":
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at System.String.get_Chars(Int32 index)
   at Content.Server.Chat.Managers.ChatManager.EntitySay(EntityUid source, String message, Boolean hideChat) in /home/vera/Projects/space-station-14/Content.Server/Chat/Managers/ChatManager.cs:line 169
   at Content.Server.Chat.Commands.SayCommand.Execute(IConsoleShell shell, String argStr, String[] args) in /home/vera/Projects/space-station-14/Content.Server/Chat/Commands/SayCommand.cs:line 68
   at Robust.Server.Console.ServerConsoleHost.ExecuteInShell(IConsoleShell shell, String command) in /home/vera/Projects/space-station-14/RobustToolbox/Robust.Server/Console/ServerConsoleHost.cs:line 100

This does not happen when you type things like ;haha lol or just lol (or any other smiley) over local chat.
cc @moonheart08

wh


Offline sync

Closes #82

Duplications is not concerning, these are two files from different parts of the project. Please see sonar for more info.


Add Sourcekit LSP Support

Is your feature request related to a problem? Please describe.
Unable to use https://github.com/apple/sourcekit-lsp
Describe the solution you'd like
Liek all the other LSP's please integrate Sourcekit LSP • Swift language
Describe potential alternatives you've considered
No response
Additional context
No response

I need this too. Thanks for consideration.

Hello! Sourcekit comes bundled with the Swift toolchain itself. Packaging it as a standalone package in Mason is not in scope. It also relies on output from other tools in your toolchain, so managing it outside of the toolchain would likely cause a lot of issues.


QD Support for ZC EM P2P API

Fixed by this(https://github.com/UIUC-PPL/charm/pull/2353/commits/da0bb5448a39618a2ad2b634ee9b9526437cc8da) commit in this(https://github.com/UIUC-PPL/charm/pull/2353) PR

#2353 has been merged


Remove -p option when compiling and watching ts files

This should solve https://github.com/Microsoft/vscode-languageserver-node-example/issues/15

Hi @XVincentX, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;

As outlines in the issue tsc -p . === tsc. To be more explicit I would like to keep this. Before closing waiting for response in the issue.

I'll verify once at home but it was not working withouth that flag!

I thought I answered here...anyway I tested it another time and it's not working with the flag

@XVincentX, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.
Thanks, MSBOT;

@XVincentX I tested it again today and it works for me with -p. If it still doesn't for you can you provide a GitHub repository with your setup that demonstrates the problem?

I'm not getting this problem anymore.
I guess we can safely archive this!

This example is deprecated. Use the language server samples in this repository instead: https://github.com/Microsoft/vscode-extension-samples


Add snapshot tests for secure connversation welcome screen

Okay I see this comment https://github.com/salemove/ios-sdk-widgets/pull/553#discussion_r1145170318 but it's hidden under resolved changes. Those explanations need to be in the commits for the future, and still I don't know if all changes made here were done because the snapshot appeared empty. For example the text view use of mainQueue.async seems like something different. Maybe this PR could have benefited from 2-3 commits, the couple of first ones fixing issues with the snapshots, and the last one with the code for the snapshots themselves.

Okay I see this comment #553 (comment) but it's hidden under resolved changes. Those explanations need to be in the commits for the future, and still I don't know if all changes made here were done because the snapshot appeared empty. For example the text view use of mainQueue.async seems like something different. Maybe this PR could have benefited from 2-3 commits, the couple of first ones fixing issues with the snapshots, and the last one with the code for the snapshots themselves.

@gersonnoboa updated and separated for 3 commits.


Add software infrastructure

This pull request adds the initial infrastructure for OpenTurbine. The following primary components are added:

Online documentation
CMake cross-platform build system
Continuous integration through GitHub Actions
Testing driven by CTest using the Google Test framework

Since OpenTurbine itself is not yet formulated as a software framework, I've created a simple 1D heat conduction solver to test all systems. The infrastructure described here will be expanded as OpenTurbine is further developed, but this should serve as the foundation for ongoing development.
Documentation
The documentation is hosted through GitHub Pages and built and deployed automatically when any file in docs/ is modified. It uses the Jupyter Book framework that is built on top of Sphinx. Jupyter Book in particular allows for writing documentation in markdown or restructured text. It has support for additional markdown features through MyST and it integrates with all Sphinx extensions plus additional extensions specific to this framework.
The config file is at docs/_config.yml. The section sphinx: allows for using any configuration parameters used directly in Sphinx. This should be familiar to the ExaWind team as most ExaWind projects also use Sphinx.
A basic structure for the documentation can be seen at https://exawind.github.io/openturbine/intro.html.
Note: I will be adding to the documentation over the coming week as this pulls request is finalized.
CMake
The build system entirely uses CMake, and the project was adapted from AMR-Wind. Some key features are:

Version generation based on git status
Automatic setting of vendor-specific compiler flags
Linking to dependencies (currently Kokkos and Google Test)
Multitarget build configuration to support improved testing

OpenTurbine-specific CMake variables are generally prefixed with oturb and flags/settings are prefixed with OTURB. The currently included targets are given in the table below.

Target
Type
Description

openturbine
Exe
Primary executable including the main

openturbine_obj
Lib
Library including all code used by main

openturbine_unit_tests
Exe
Unit test driver executable including all tests and links to the Google Test

In addition to the typical CMake flags, the following flags are available for specific hardware: OTURB_ENABLE_<TYPE> for each of CUDA, DPCPP, OPENMP, ROCM. OTURB_PRECISION can be DOUBLE or SINGLE. OTURB_ENABLE_ALL_WARNINGS adds -Wall or equivalent compiler flag. OTURB_ENABLE_TESTS adds the testing infrastructure to the build.
Continuous integration
Automated testing is configured through GitHub Actions at .github/workflows/ci.yaml. The first step in the workflow is to run a static linter on the whole project with clang-format. If any changes are required, this step and the entire CI run will fail. The following step builds the project and runs the full test suite. Kokkos is installed through Spack, and Spack is directly configured in the workflow.
To save time installing dependencies, the entire ~/.spack directory is cached. If there's a cache miss (for example, if a dependency has changed, the cache exceed its stale shelf life of a week, or if the cache limit of 10GB is exceeded), Actions will reinstall Spack and Kokkos, and this will take about 20 minutes. The workflow must finish successfully in order for the cache to save, so it can be useful to remove all other steps in the workflow if the cache needs to be repopulated.
See the test results live at https://github.com/Exawind/openturbine/actions.
Testing
The test suite uses the Google Test framework and is integrated with CTest. All unit test files are included in tests/unit_tests/. The test driver is utest_main.cpp, and this collects all the other tests and creates the support needed to filter, run, and report tests. A help menu can be seen with ./openturbine_unit_tests --help. All tests are integrated into CTest through the listing at tests/CMakeLists.txt.
TODO

[ ] Add basic compiling instructions and dependencies to the documentation including README
[ ] Add more details on expectations from developers, reviewers, and users
[ ] Create stubs in the documentation for API, input file, tutorials, etc

Doesn't have to be in this PR, but I think we should add CodeQL as soon as possible. https://github.com/Exawind/amr-wind/pull/761


[PROPOSAL] Add circuit breaker to java client

Problem
In the wild, we've seen users of openlineage-spark request support to kill / pause metadata collection if resource usage (i.e. JVM) exceeds some threshold T. For example:

MEM threshold > 20%
Garbage collection CPU threshold > 10%

Adding a circuit breaker to our java client would prevent the OL integration from exhausting resources on the system it’s deployed (at scale, we've seen performance degradation of production spark clusters 😭). In other words, low free memory and high cpu time on garbage collecting would trip the “Circuit Breaker” (see Circuit breaker for Java custom instrumentation  from New Relic that can inspire our solution).
Add circuitBreaker to openlineage.yml
circuitBreaker:
  enabled: <bool>        # Enables the circuit breaker
  memoryThreshold: <int> # MEM threshold percentage as INT
  gcCpuThreshold: <int>  # Garbage collection CPU threshold percentage as INT
transport:
  type: <type>
  # ... transport specific configuration

We don't have to author our own circuit breaker, and can leverage the resilience4j lib. to create a CircuitBreakerRegistry.
Example usage of circuitBreaker
# Enable 'circuitBreaker' with specific memory threshold only
circuitBreaker:
  enabled: true
  memoryThreshold: 20 # Trip 'circuitBreaker' when MEM threshold > 20
transport:
  type: HTTP
  url: http://localhost:5000
  auth:
    type: api_key
    api_key: f38d2189-c603-4b46-bdea-e573a3b5a7d5

When the circuit breaker is "tripped", the integration would suspend metadata collection. An open question would be, do we want metadata collection to resume when the memory threshold < 20?

(at scale, we've seen performance degradation of production spark clusters 😭)

@wslulciuc are you saying that emitting events is heavy, serialization, or just collection?

... are you saying that emitting events is heavy, serialization, or just collection?

Yeah, great clarification question @mobuchowski. The performance degradation (at least in the scenario I've seen) is serialization.

... are you saying that emitting events is heavy, serialization, or just collection?

Yeah, great clarification question @mobuchowski. The performance degradation (at least in the scenario I've seen) is serialization.

When the circuit breaker happens, what are the outcome of that? I would like the OL even to still emit, but with error facet stating the extraction was halted due to the resource constraint that fired the circuit breaker. We currently do not have means to show the error facet, but it is being planned.

I think with https://github.com/OpenLineage/OpenLineage/issues/2375 we want to have generic interface that would enable multiple use cases: both CPU, memory or even some custom mechanism.
circuitBreaker:
  type <string>          # Defines the class of Circuit Breaker that's enabled - Service Loader driven https://docs.oracle.com/javase/8/docs/api/java/util/ServiceLoader.html
  minimumMemoryAvailable: <int> # Example conf: free memory threshold percentage as INT
  timeout: <int>  # Example conf: limit OL processing to this amount in seconds
transport:
  type: <type>
  # ... transport specific configuration

The same would be configurable via Spark config.
spark.openlineage.circuitbreaker.type - io.openlineage.circuitbreaker.SimpleCircuitBreaker
spark.openlineage.circuitbreaker.minimumMemoryAvailable - 20
spark.openlineage.circuitbreaker.timeout - 30

From my side, we'd like to see simple implementation that does a "filter" check on a start of a job: emit OL event only if there's some % of a free memory in the system on a event start. If not, then just log the fact. The CPU timeout circuit breaker could be contained in the same implementation.
Other circuit breakers could define their own config in spark.openlineage.circuitbreaker namespace.

Hey @mobuchowski, I like the idea of multiple circuit breakers in a single namespace.
As per this issue, I have some concerns if java client is proper location for the feature. Not only we want to prevent serializing and emitting OL event, but we also want to prevent extracting lineage metadata from the plan.
My initial idea was to write a generic spark metric system based circuit breaker, that would allow any limits based on driver metrics emitted:
spark.openlineage.circuitbreaker.whateverMetric.greaterThan=20
spark.openlineage.circuitbreaker.memory.remainingMem_MB.lessThan=100

but I found that somehow complex when compared to your approach.
Starting with SimpleCircuitBreaker makes sense to me.


Crash on Startup

Hello,
There seems to be an issue between this mod and the ZAWA mod

https://paste.dimdev.org/jupupifubu.mccrash

Fixed in new build. Reference commit : https://github.com/StrikerRockers-Mods/VanillaTweaks/commit/ea7399d7dbc10f149afb6306900920b693f6bc51


Use https in convenience script example

Secured the example installation code that many people will just copy paste

Proposed changes

Unreleased project version (optional)

Related issues (optional)

Deploy preview for modest-edison-79d82e ready!
Built with commit 4e8ca69e80a9f2e03cecb3685629190c9d770f1e
https://deploy-preview-7157--modest-edison-79d82e.netlify.com


Split out IPythonEnvsFinder.

For #

[ ] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
[ ] Title summarizes what is changing.
[ ] Has a news entry file (remember to thank yourself!).
[ ] Appropriate comments and documentation strings in the code.
[ ] Has sufficient logging.
[ ] Has telemetry for enhancements.
[ ] Unit tests & system/integration tests are added/updated.
[ ] Test plan is updated as appropriate.
[ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
[ ] The wiki is updated with any design decisions/details.

@karthiknadig, for kicks I threw this together.  Does IPythonEnvsFinder seem right?
FWIW, splitting it out is leading to a ton of churn and extra boilerplate code.

stale


drivers: serial: nrf uarte: Fix for the RX byte counter

In case of the following sequence of UART events:

UART_ENDRX
UART_RXRDY
TIMER_RXTIMEOUT

The application receives one more byte that was received, due to RX counter alignment upon ENDRX event.
The proposed fix moves the RX byte counter alignment to the RX timeout event handler.
Signed-off-by: Tomasz Chyrowicz<EMAIL_ADDRESS>

@tomchy I think this one can be taken out of draft.


Clarify what when applies to

Summary
Clarify what when clauses apply to in F#.
See discussion at https://github.com/Microsoft/visualfsharp/issues/4666

I addressed the feedback and did a few formatting changes. But this text is full of "Note that...". It could probably be reviewed to remove those. They seem unnecessary in some cases.


Interaction prompt does not animate in Shadow DOM in some browsers

Description
The animation prompt does not render properly in Safari or Firefox.
What it's supposed to look like:

What it looks like:

(it's also not animating in firefox)
I believe the issue is related to Shadow DOMs. SVG transforms seem to not have consistent behaviour when inside of a Shadow DOM. I isolated the issue to show that it is not related to model viewer:
Live Demo
https://codepen.io/pushmatrix/pen/XQmrvx
On Firefox the animation doesn't even happen. On Safari the animation happens, but some elements are off.
Here's a more minimal one with just a rotating triangle:
https://codepen.io/pushmatrix/pen/ZZbzPo.
The animation doesn't work on Firefox.
You can also see this behaviour in model viewer by loading it in Safari or Firefox, and clicking the model viewer to get focus, and waiting for the prompt to appear.
Browser Affected

[ ] Chrome
[ ] Edge (not tested)
[x] Firefox 66.0.2
[ ] Helios (not tested)
[ ] IE (not tested)
[x] Safari 12.0.3

OS

[ ] Android (not tested)
[x] iOS 12.2
[ ] Linux (not tested)
[x] MacOS 10.14.3
[ ] Windows (not tested)

Versions
This is version agnostic. The svg animation issue is happening regardless of whether it is in the model viewer or not.

Great catch. Due to weirdness in compositing, we are talking about potentially switching this prompt to an animated GIF or something like that. Either way, we will get this fixed.

FYI I was able to adjust the SVG for the near term so that it looks less broken when the animations don't play:

This type of interaction prompt was removed quite awhile ago.


[TASK] Implement reusable Alert component

Overview
The goal is to implement the reusable Alert organisms component
Task Deliverable

[x] Implement the component under Alert
[x] Add a provider for the toast notifications with a programmatic interface

[x] useAlert hook

[x] Support toast/notification stacking
[x] Add story book with examples for the component
[x] Document each component with examples

<AlertProvider>
..
<Alert
varaint="success"
message="The address was copied"
/>
..
<AlertProvider/>

Links

Alert component figma desgin
https://tailwindcss-radix.vercel.app/#toast

Closes in PR https://github.com/webb-tools/webb-dapp/pull/694


Map parsing issue?

There are a lot of maps in the dev env that appear to not be parsing all strings. One example is 1cor1.ar.cf.svg. Please investigate to determine why.

I wasn't able to reproduce due to database cleanup, but i have an assumption that it was newly loaded map, and no any words were translated after the map was loaded, so translation routines wasn't triggered.
So i've added automatic transalation of newly loaded map to all languages which have at least one translated word from original map translated to.
PR
https://github.com/etenlab/crowd.rocks/pull/166

It looks like that was it. Thanks Ihor.


encoding/gob: Encode not called for wrapped struct with only zero values inside

What version of Go are you using (go version)?
1.19
What operating system and processor architecture are you using?
Initially found on Windows 10, x64, but also reproducible on go.dev/play
What did you do?
Create a struct with single int-typed private field and a custom GobEncode() method for it.
Use said struct in another struct as a public field, and try to encode the external struct with gob.
Overly simplified version: https://go.dev/play/p/iRRTIzvixOk
What did you expect to see?
GobEncode() gets called on Structy when the wrapping struct is encoded.
What did you see instead?
GobEncode() did not get called.

Doing more experimentation (see https://go.dev/play/p/gugr1jzmAtz):

inp1: if the struct isn't a field in another struct the function gets called
inp2: (original case)
inp3: if the value in the struct is not 0, the encode function gets called
inp4: the function does not get called regardless of other fields having (non-zero) value in the wrapping struct
inp5: the function gets called if the wrapping struct has a pointer for the wrapped struct
inp6: the internal struct has multiple fields, all zero valued, the custom GobEncode is not called
inp7: the other internal field has a non-zero value, GobEncode is called

My guess is that this behavior is related to the struct being the zero value of its type. I'm not entirely convinced if this is a bug or just an "expected" side-effect of zero values, in the later case it would be good to call this out in the documentation for GobEncode(), as this doesn't really feel like complete control. It is definitely confusing at first glance that it only happens in some of the cases.
Some context on the actual use case this is coming from:

The struct with the private field is an enum-like type, the goal is to prevent invalid values showing up ~ever (so 0 has to be one of the valid ones, as someone can create the struct itself, but not directly set the value - it isn't perfect, but much better than just creating a type that is just int, where one can use any constant as a value).
The encoding actually maps the values to the strings versions of the enum values in GobEncode(), so the enum to int mapping can change without needing to keep the two sides talking in sync / compiled from the same version (the code for this part is generated)

As a workaround I can add a second field containing a dummy non-zero value to the enum struct, (luckily when the enum struct is inside another one there is some other processing done on it before being output, so even if a completely zero struct is created the dummy field can still be filled in before being handed to gob).

The package does not encode zero values. This is expected behavior, however undesired in this case.


Is there a way to suppress duplicate key errors using ruamel's allow_duplicate_keys in Yamale ?

Hi, thanks for using Yamale. As you're probably aware, duplicate keys are not allowed within the yaml specification: https://yaml.org/spec/1.2/spec.html#id2764044

The content of a mapping node is an unordered set of key: value node pairs, with the restriction that each of the keys is unique.

For that reason, Yamale won't be supporting this feature natively.
You may be able to patch the function used for parsing: https://github.com/23andMe/Yamale/blob/master/yamale/readers/yaml_reader.py#L14-L17
Unfortunately, I won't be able to help with the details on patching.


Enhance Admin Page with Doctor CRUD Functionalities

User Story
As an admin,
I want  to have CRUD functionalities (Create, Read, Update, Delete) for managing doctors on the admin page,
so that I can efficiently add, edit, view, and remove doctor records as needed.

Acceptance Criteria

[ ] Criterion 1: A list of doctors should be displayed on the admin page loaded from the database.
[x] Criterion 2: An "Add Doctor" button should be present on the admin page. Clicking this button should create a new row in the doctor table for inputting new doctor information.
[x] Criterion 3: Each doctor row should have "Edit" and "Delete" buttons.
[x] Criterion 4: When "Edit" is pressed, a dialogue box should open up to allow modifications to the doctor's information.
[ ] Criterion 5: All basic error cases should be handled for adding and editing a doctor's data.
[ ] Criterion 6:  Ensure that the "Add Doctor" functionality successfully adds new doctor records to the database.
[ ] Criterion 7:  Ensure that the "Edit Doctor" functionality updates the existing doctor records in the database correctly.
[ ] Criterion 8:  Ensure that the "Delete Doctor" functionality removes the selected doctor record from the database.
[ ] Criterion 9: Postman tests should be created to automate the addition of multiple doctors for testing purposes. These tests should ensure that all CRUD functionalities work correctly.

Additional Information

Example JSON payloads for Postman tests.
Guidelines on how to handle validation errors and edge cases (e.g., duplicate entries, invalid data).

Notes

Dependencies: This user story depends on the setup of the backend API endpoints for CRUD operations on doctor records.
Related Issues: #32 #31

For now, I’ll use SSN in the routers for doctors CRUD functionalities as the backend expects it but we can later on change it to _id.

Cannot display unhashed passwords for now except for those edited manually.

Later on, need to hash the passwords which are updated by the admin.

For now we have a hard-coded admin automatically created once the server starts.
username:  admin123
password:  iamtheadmin


LangFlow + llama-cpp-python + Metal build (m2 max) = fail

Prerequisites
Please answer the following questions for yourself before submitting an issue.

[x] I am running the latest code. Development is very rapid so there are no tagged versions as of now.
[x] I carefully followed the README.md.
[x] I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
[x] I reviewed the Discussions, and have a new bug or useful enhancement to share.

Expected Behavior
Everything should be working.
Current Behavior
followed official Metal build method here.
LangFlow console gives:
llama_init_from_file: kv self size  =  400.00 MB
ggml_metal_init: allocating
ggml_metal_init: using MPS
ggml_metal_init: loading '/opt/homebrew/lib/python3.10/site-packages/llama_cpp/ggml-metal.metal'
ggml_metal_init: error: Error Domain=MTLLibraryErrorDomain Code=3 "Compiler encountered XPC_ERROR_CONNECTION_INVALID (is the OS shutting down?)" UserInfo={NSLocalizedDescription=Compiler encountered XPC_ERROR_CONNECTION_INVALID (is the OS shutting down?)}

then crash.
I know this could be a bug in LangFlow but I think it's also worth mentioning here.
Environment and Context
Please provide detailed information about your computer setup. This is important in case the issue is not reproducible except for under certain specific conditions.

Physical (or virtual) hardware you are using, e.g. for Linux:

Macbook Pro M2 Max

Operating System, e.g. for Linux:

Ventura 13.4

SDK version, e.g. for Linux:

Python 3.10.12
GNU Make 3.81

The error looks to be from llama.cpp and specific to the Apple Metal code.

The error looks to be from llama.cpp and specific to the Apple Metal code.

i also have a METAL build of llama.cpp running without any problem.
so i guess this something in llama-cpp-python or between llama-cpp-python and langflow.

llama.cpp$ egrep -R ggml_metal_init .
./ggml-metal.h:struct ggml_metal_context * ggml_metal_init(void);
./ggml-metal.m:struct ggml_metal_context * ggml_metal_init(void) {

Have you confirmed that the git hash of your llama.cpp and and the one in llama-cpp-python/vendor/llama.cpp are similar in date?
llama.cpp$ git log | head -3
commit bbca06e26949686d61a5126332680ba3cccf235c
Author: Johannes Gäßler<EMAIL_ADDRESS>Date:   Wed Jun 21 23:49:25 2023 +0200

i think it might be an issue coming from langflow.
python3 -m llama_cpp.server --model $MODEL  --n_gpu_layers 1

runs without any problem.

i think it might be an issue coming from langflow.
python3 -m llama_cpp.server --model $MODEL  --n_gpu_layers 1

runs without any problem.
ps, langflow seems to have fixed this issue in a recent update.
thank you. i'm closing this issue.

@trivita  i know its closed but want to highlight some findings.
Scenario with Langflow --> With metal GPU, langflow (latest) will not work
llama-cpp-python = 0.2.6
langchain=0.0.256
langflow=0.4.19
working with cpu installation of llama-cpp and giving response in 1-2 mins.
llama-cpp-python=0.1.81
langflow=0.4.19
langchain=0.0.256
Scenario without Langflow --> But on terminal if you build with only langchain and llama-cpp-python (with metal gpu it is working and giving response in 5 secs)
llama-cpp-python=0.2.6
langchain=0.0.274
issue is bascially langflow doesnt support version higher than 0.0.256 of langchain.  if langflow supports 0.0.274 of langchain ,metal gpu will work really awesome and langflow Ui will give resposne much much faster.
System Used is M1 pro 32gb.


Uniform styling in footer

Restyling footer:

Uniform font size of the theme.
Clear styling on different resolutions.
Content hasn't changed

High res footer

Low resolution

Looks good generally. I want to try it our locally before approving.
In the future, I think we might be better of moving the CSS and some other static web site files to our CDN - see https://github.com/apache/incubator-pekko-sbt-paradox/issues/84


Default column width change

I played around with it until I found some default values that look decent; but I dont know if you want to do it this way. I'll submit it just in case you do. No worries if you want to reject it.

Ignore this PR. My apologies. Will resubmit properly.


Implement Fake Process

Hello !
A Fake Process will be awesome.
This is an example of a fake process command line :
trcpy(argv[0],FAKE); // fake the proccess name.
while(fgets(buff,sizeof(buff),fp))
{
c=strchr(buff,'n');
if(c!=NULL) *c='.';
if (!(fork()))
{
where=0;
// printf("--> attacking %s",buff);
for (i=0; i<count; i=i+2){
// printf("--> Trying %s:%s %sn",a[i],a[i+1],buff);
checkauth(a[i],a[i+1],buff); // try to auth
}
exit(0);
this is taken from
https://github.com/MrMugiwara/against-cracker/blob/master/against.py
Of course, this is py, but i guess this can also be done in C.
Thank you, Brother !

Hello !
A Fake Process will be awesome.
This is an example of a fake process command line :
trcpy(argv[0],FAKE); // fake the proccess name.
while(fgets(buff,sizeof(buff),fp))
{
c=strchr(buff,'n');
if(c!=NULL) *c='.';
if (!(fork()))
{
where=0;
// printf("--> attacking %s",buff);
for (i=0; i<count; i=i+2){
// printf("--> Trying %s:%s %sn",a[i],a[i+1],buff);
checkauth(a[i],a[i+1],buff); // try to auth
}
exit(0);
this is taken from
https://github.com/MrMugiwara/against-cracker/blob/master/against.py
Of course, this is py, but i guess this can also be done in C.
Thank you, Brother !

Your code is ANSI C, not Python :laughing:
But yes, the way to change the process name on UNIX systems are writing on memory where argv[0] is allocated. :+1:

Other possible solutions:
pthread_setname_np(pthread_self(), "newName");

prctl(PR_SET_NAME, (unsigned long)"newName", 0, 0, 0);

prctl(PR_SET_NAME, (unsigned long)"newName", 0, 0, 0);

First, thank you for the quick response.
Second, where should i place this line ?
"prctl(PR_SET_NAME, (unsigned long)"newName", 0, 0, 0);"

_<

Other Linux-standard possible solutions:
* [`pthread_setname_np`](https://linux.die.net/man/3/pthread_setname_np)(pthread_self(), "newName"); is probably the better method, it comes from `glibc` and might be portable to other non-Linux systems

* [`prctl`](https://linux.die.net/man/2/prctl)(PR_SET_NAME, (unsigned long)"newName", 0, 0, 0);

Hello again, Brother!
As above, I'm asking you about those lines :D
where should i place them ?
cbrutekrag.c ?
is there anything else to insert ?
can you give me an example ?
Thank you so much brother !
Note: my coding skills are horrible :))))

I also got plenty of errors when i tried to add prctl or pthread_setname_np


"Numbers will have maximum of 10 digits."

The largest integer that can be stored is 4,294,967,295 on a 32 bit machine that doesn't support 64 bit addition (I would assume). Will we have to consider numbers larger than this, and/or is the server machine 64 bit? (It would take more effort to do.)
"The words and numbers may be separated by spaces, commas, period, new-line character, parenthesis, etc." Can we assume that each valid number and its category (m, h, d) will be separated by a space and only 1 space? If the separation can be more than 1 whitespace, then it would take considerably more effort to distinguish between certain situations such as "...since then, 100.days have passed..." and "...she went from 0 to 100. Days have passed since then." This particular situation would require that "minute, minutes, hour, hours, day, days" can start with capitol letters, but others might not.

No, you will not have to consider numbers larger than that.


Feature request: add support for Jruby

I'm closing this, as I've already opened an issue on JRuby's github. Nothing to be done on sdkman but a single API call from my side when they are ready for us.


No some symbols in ukrainian texts with Sony devices

There are missing symbols on Sony devices with Android 4.3 (Tested on Sony Xperia SP and Sony Xperia V). Should be fonts related issue in WebView, but I'm not sure. Look to screenshot attached:

@merlin-zaraza Thanks! There are some changes been committed recently in regards to fonts and Cyrillic compatibility. Are you ok if I add you to fabric beta so you can test?

I'm already in beta :)
Also I can build from sources.

@merlin-zaraza You are probably in Play Store beta which is kinda slow in rollouts. I can add you to fabric beta which is very fast.

Ok, please add me.

@merlin-zaraza What's your email? (you can send me email to<EMAIL_ADDRESS>

"Lato" font still has issues. The rest seems fixed.
Will test on one more device when being at home.

@merlin-zaraza Is that only "Sony Xperia Z" or Nexus 6p also have this issue?

Only "Sony Xperia Z"

BTW, you can use Genymotion https://github.com/codepath/android_guides/wiki/Genymotion-2.0-Emulators-with-Google-Play-support

@merlin-zaraza Were you able to reproduce it in Genymotion?

I have Sony Xperia V at home and firstly reproduced in this device yesterday.
Today I left my Xperia V at home, so I've created Sony Xperia Z with Android 4.3 in Genymotion and able to reproduce it. It seems common issue for Sony devices.

Ah i see. Thanks
On Thu, Nov 10, 2016 at 9:26 AM, Vitalii Cherniak<EMAIL_ADDRESS>wrote:

I have Sony Xperia V at home and firstly reproduced in this device
yesterday.
Today I left my Xperia V at home, so I've created Sony Xperia Z with
Android 4.3 in Genymotion and able to reproduce it. It seems common issue
for Sony devices.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Adventech/sabbath-school-android-2/issues/50#issuecomment-259702852,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AD6v4punYUhHYwUrmaAgIJnWctyY2A1Sks5q8yl9gaJpZM4KumQk
.

Issued new beta in fabric with fixes

It fixed now. Thanks.


Temporarily restore playground sample until next release

for ResourceNameParameter to be available.

No changes needing a change description found.

You can try these changes at https://cadlplayground.z22.web.core.windows.net/typespec-azure/prs/744/
Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/typespec-azure/prs/744/


Widgets positions not updated while removing

Hi,
Thanks for the angular version. Why isn't the position of every widget updated when one of them is removed ?
On the demo, if you add 2 widgets under those which exist

and then remove the 2 first one, grid height is well updated but widgets stay where they are

and I need to drag them manually or to add a new widget to force their new position.
Is there a way to force the update ?
Thanks.

I solved this by modifying the "destroy" function to call Gridstack's batchUpdate() and commit() methods before and after removing the item, respectively.

This is a bug that got introduced in gridstack.js v0.2.5. We're going to fix it there. See https://github.com/troolee/gridstack.js/issues/411 for more info.

Fixed!


Simplify Embeddings

Right now, we have 2 layers of Embedding objects -- the layers themselves and the model.
In PyTorch, the model just does an empty sub-class on most Embeddings but then register_embeddings on the model.  In TF the models currently

own an underlying layer and exercise their forward call(x)
provide additional state recording functionality
provide shallow graph copy support since the embeddings are created in another graph
provide placeholder creation functionality, and also register_embeddings on the model.
provide an underlying .encode(x) that is called by call(x) in the base

We would like to eliminate most of this and push down other parts into layers.

at a minimum, we'd like a similar inheritance to PyTorch b/c its less confusing about where to derive than owning a sub-object.  Ideally, we could eliminate the baseline Model embeddings altogether and register_embeddings directly in the base Embeddings layers
the functionality for state recording on Embeddings models is critical to rehydrate them properly.  We could either try and push this down into layers, or do some mixing in to get the functionality later
the reference seems not to matter much anymore, perhaps only mattered for multi-GPU (especially in 1.x).  Distributed mode is supported currently only with eager, and this seems to be a non-issue (need to verify)
The placeholder creation functionality seems like it could be externalized.  Instead of having a classmethod producing the placeholder on demand (and also we do this inside .encode(x) if x is None), it seems that we could have the embeddings just declare their required number of dimensions and possibly their dtype if it needs an override.  An external baseline.tf.placeholder_for(embedding) seems like it could solve the coupling issue,  and we would modify the Embeddings to not allow a null argument for x.  This would change the API slightly but not really have much negative impact that I can think of
Eliminate encode(x) as its use is legacy

The #560 PR is a rather simple as it mainly refactors *Models to inherit *Embeddings
Covers 1. with inheritance, 2. as a mixin and 3. provisionally (though needs more testing to verify)


Update form select to allow simpler selection of multiple items

Need to be able to have easy way to select multiple items in a form drowpdown.

https://mdbootstrap.com/docs/standard/extended/multiselect/

Completed


Unit Tests

Unit tests would be awesome. Any idea how to integrate them best? Create an OSX Xcode project with a test target? Or use Swift Package Manager?

It has been a long time, but I am getting back into it and I will be preparing unit tests with S4 version, making it more stable and safe. Moving this to a new ticket. Thank you


Add const-generic IndexedParallelIterator::arrays

arrays<N>() works like chunks(N) without remainder, and yielding [Item; N] rather than allocated Vec<Item>.
There's no sequential precedent for this yet, but it's proposed in itertools#549. It may also be useful in places that would want Itertools::tuples (#971), because arrays are a first-class alternative to homogeneous tuples.

I missed that the standard library now has an unstable Iterator::array_chunks -- rust-lang/rust#100450.


Data types cannot be colorized

System information:

Operating system (distribution) and version Win10 Home
DBeaver version 7.0.3 EA

Describe the problem you're observing:
Data types cannot be colorized
Steps to reproduce, if exist:

Open a table with a content in Data Editor
Select Colorize Data Types in its context menu.

Actual result: no visible changes.

Fixed

I still can reproduce the issue ( DBeaver	<IP_ADDRESS>004181046	org.jkiss.dbeaver.core.product	null)

Preferences change handle fixed

verified


Allow template tags to use the v-text directive

Version
2.5.16
Reproduction link
https://jsfiddle.net/ey867nzs/2/
Steps to reproduce
Create a Vue app and display a string using mustache syntax, v-text on a div element, and v-text on a template element.
What is expected?
The string is displayed by all three methods.
What is actually happening?
The string is displayed by mustache syntax and v-text on a div element, but the string is not displayed by the v-text on a template element.

This is a feature request similar to #7726. I created a new issue since the other one is closed, it is 2 years old, and I have reasons for requesting this feature that were not provided in that issue.
A problem with mustache syntax is that the UI could get cluttered with curly braces if there is a delay in rendering or if there is a bug. A problem with using v-text on a DOM element is that undesired CSS styles could get applied to the DOM element. Allowing v-text to be used on template elements would avoid these problems.

A problem with mustache syntax is that the UI could get cluttered with curly braces if there is a delay in rendering or if there is a bug.

That shouldn't happen in production anyway.
v-text sets the textContent of an element, it cannot work on template

What do you mean, "That shouldn't happen in production anyway?"

A problem with mustache syntax is that the UI could get cluttered with curly braces if there is a delay in rendering or if there is a bug.

That shouldn't happen in production anyway.
v-text sets the textContent of an element, it cannot work on template

What do you mean, "That shouldn't happen in production anyway?"

I meant a bug breaking your app shouldn't be a scenario in production. If your are using in html templates, you can hide them with v cloak

What about a delay in rendering and CSS issues with using a DOM element?

I guess you're addressing the delay in rendering with v-cloak, but CSS issues with using a DOM element still hasn't been addressed.
Vue.js has been a great reactive JavaScript tool. 2 years ago, at work, we were looking around at front-end web development framework options. Vue.js seemed like the way to go because of its incremental adoptability. I'm glad we chose it. Vue.js' two main competitors are Angular and React. I've used Angular a little bit, and I prefer Vue.js. I have never used React. I don't know if the other two allow text interpolation in template tags or something similar to avoid mustache syntax. If they don't and Vue.js does, then Vue.js will have an edge over them. If they do, then Vue.js will bridge a gap.


VCK5000 Vivado ES1 Links Permission

I already got approved for the vck5000 secure site, but the links mentioned in the readme are broken. They redirected to the vck5000 base page.
I even tried with wget for the pdf's but they are not working. Kindly provide these files.
https://github.com/Xilinx/Vitis-AI/blob/122649108b673b6579c86291619b6ec8fd664d35/setup/vck5000/README.md?plain=1#L152-L159
Thanks & Regards,
Omkar Bhilare

Hi Omkar,
If you are using the VCK5000 ES card. Please refer to the Vitis AI 1.4.1 release:
https://github.com/Xilinx/Vitis-AI/tree/1.4/setup/vck5000
for VCK5000 prod card, please refer to the 2.0 release.
https://github.com/Xilinx/Vitis-AI/tree/master/setup/vck5000
May I know which pdf you are looking for?

Hi @ombhilare999, It looks like you have found the tutorial for vck5000, please reopen this issue if you have any other questions. thanks！


Reject migration if umzug can't find the migration method

Rationale: you will never have a no-op migration. Currently, if the up or down methods can't be found when running a migration, Umzug replaces the method body with Promise.resolve() and tells you that the migration was run correctly. (It wasn't.)
This PR rejects the migration if you try to run it but that function doesn't exist.

My contributions to this code block were tiny, just swept in from https://github.com/sequelize/umzug/pull/76. But I heartily endorse this contribution. ;)

Do I need to create an issue in order to get this pulled in? I couldn't find any details on contributing, but I know different repositories have different processes...

LGTM, merging :+1:


Custom sound volume

Expected Behaviour
play sounds at same volume as default sounds
Actual Behaviour
Can barely hear custom sounds
Reproduce Scenario (including but not limited to)
Ask for sample file
Steps to Reproduce
Install a custom sound file
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS 9.x
iOS 10.x
Android 23+
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Various
Cordova CLI version and cordova platform version
5.2
Plugin version
1.8.1 on XDK
Similar request
#1176
I've adjusted my custom sounds and on a laptop or desktop they play at the same volume as the default sounds on either platform. However when the sounds are actually played on the device they are barely audible.

Sadly, there is no way to adjust the volume of the notification. This behaviour is controlled by the operating system.


influx bc and new input for submerged island case

new input for submerged island case

one update for influx bc

UPDATE_00005
by Cheng Zhang
02/06/2017
■Changes
·Changed influx boundary condition to impose fixed flux.

Cheng, could you s=describe what the nature of the error and change are?  Does this affect just the nonhydrostatic case or both cases.  More detail.

Jim, in the old version,  I simply impose velocity at influx boundary
condition, so a subcritical flow will happen near boundary. Under this
situation, the surface elevation at the bore and velocity after the bore
are hard to predict. When I ran the hydrostatic case before, I spend a lot
of time to find that in which condition the water depth in front of island
is 0.054 and velocity is 0.115, under which the oscillation phenomenon will
happen. When non-hydrostatic pressure is turned on,  the condition near the
boundary is changed,  so with old version I need much more time to find the
suitable elevation and velocity in front of the island (non-hydrostatic
case is much more time-consuming). So this time I impose flux rather than
velocity,  and then the subcritical flow will not happen. With this way the
velocity in front of island is generally same to the velocity near boundary
and thus phenomenon will happen again.
On Sat, Jun 3, 2017 at 8:52 AM JimKirby<EMAIL_ADDRESS>wrote:

Cheng, could you s=describe what the nature of the error and change are?
Does this affect just the nonhydrostatic case or both cases. More detail.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/JimKirby/NHWAVE/pull/22#issuecomment-305973288, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AV3AQ1AkdwHzyTSVecsC08KqvQjSWSL_ks5sAVb7gaJpZM4Nu1Lm
.


django.db.utils.OperationalError: table actstream_action has no column named data

django.db.utils.OperationalError: table actstream_action has no column named data

I think you need to run the migrate command properly

if you have the jsonfield setting enabled you must install the jsonfield backport app also
pip install django-activity-stream[jsonfield]


link in Readme.rst broken

Link "read the documentation on GitHub" broken: results in page not found.

Internal Jira reference: https://jira.arm.com/browse/IOTBTOOL-559

This looks like a duplicate of https://github.com/ARMmbed/mbed-cli/issues/946