Vite's environment variables

Hi, I'm using ViteJs to develop React application. I tried adding znv then start the app but got the following error:
parse-env.ts:176 Uncaught Error: Errors found while parsing environment:
  [DEV]:
    Cannot read properties of undefined (reading '_def')
    (received true)
 ...

My usage is as following:
import { z } from 'zod'
import { parseEnv } from 'znv'

export const {  DEV: IS_DEVELOPMENT } = parseEnv(import.meta.env, { DEV: z.boolean().default(true) }

Note that instead of process.env usually used in CRA, ViteJs uses import.meta.env for environment variables which looks like the cause IMO. I tried another project using process.env and it works fine.
I read the document and I know the library supports process.env but hope to see Vite too.
In case you need to see my ViteJs config
import react from '@vitejs/plugin-react-swc'
import { defineConfig, loadEnv } from 'vite'
import tsconfigPaths from 'vite-tsconfig-paths'

export default defineConfig(({ mode }) => {
  // Load env file based on `mode` in the current working directory.
  // Set the third parameter to '' to load all env regardless of the `VITE_` prefix.
  const env = loadEnv(mode, process.cwd(), '')
  return {
    plugins: [react(), tsconfigPaths()],
    optimizeDeps: {
      // https://github.com/vitejs/vite/issues/8069
      include: ['react/jsx-runtime'],
    },
  }
})

I hade the same error Cannot read properties of undefined (reading '_def') without using vite.
But when trying to reproduce the error on. a simpliest project, the error disapear 😢 ...
Can you share your package.json ?

or just try updating your depencies versions ?

This is caused by using modules, zod provides an import map and exports different modules for es modules. That means if your project uses type: "module", it will provide the instances of another source file.
This: https://github.com/lostfictions/znv/blob/master/src/parse-env.ts#L121 check here will then fail, because znv uses require (which resolves to a different zod module).
To fix the problem znv should provide both es modules and commonjs modules.


Should ASE be a core dependency?

In equisolve/utils/convert.py, ase is used in the ase_to_tensormap() fxn. If not already installed, a ModuleNotFoundError is raised. Should ASE be a core dependency?

I don't think it should be, equisolve does not need ase to work. But the ase import should be guarded when defining the ase_to_tensormap function (if ase is not available, this function will never be used anyway)

We just do it like in chemiscope and make a HAS_ASE flag, as we also will do it with for torch


Luminosity

It seems that SDK 0.5 is pushing screen luminosity to the maximum which is, I find, a bit exaggerated: whites are blinding and dark tones are bleeding...
Will you fix it (from my experience 50% lum is the best) or give control over it or leave it as is (and I'll rework my lightmaps)?
My preference would be having control. Door scenes may require blinding whites.
Thanks!

-Door +Some

This seems like a good idea, although the results could vary across phone models.  Maybe the brightness level should be a user control (through the settings button), and all the SDK needs to do it make sure it is constant.

Each way had drawbacks and benefits. I'll vote with your choice. Could you just confirm that next release will not push brightness to max? Do that I don't rebuild my lightmaps for nothing 😀. It's really a pain to tune!😂

-vote +cope 😴

Not setting brightness to max is easy to do.  In the short term, it can be a developer setting.  That ought to be deliverable in the very near future.  (Notice I am not actually committing -- not allowed to.)

Thanks for the feedback. That's kind. I'll wait for a few days and see if something pops out before reworking lightmaps in Alien Apartment (my app).
PS: I posted also on G+ about this "issue": https://plus.google.com/108926424989499203010/posts/dbcqzp8MTZA
Cheers!
MiCk.

I had a look into the activity class (for the other issue) and saw brightness is set to 55f... Don't you meant .55f?
Cheers.
MiCk.

Interesting.  It is set to 1.0f in code.

Interesting. After tons of unity bugs now we have bugs in eclipse decompiler...

...Or not..
private void startImmersiveMode();
[...]
10  putfield android.view.WindowManager$LayoutParams.screenBrightness : float [55]
Sorry it seems I'm a pretty bad disassembled bytecode reader :(
(misinterpreted 55 as a value instead of a pointer).
Anyway, I'm still interested in having this value being adjustable from Mono in the SDK.
Thanks for your support.
Cheers.
MiCk.

Is there any ETA on a possible hotfix that would let devs choose not to force brightness?
It doesn't seem to be much important, but in fact it is because it wouldn't be any clever to release a game on android where 100% brightness is always forced (plus fixed 60fps for any sane cardboard app), as it will drain battery so fast that almost every user will complain.
Is there anything we can do on our end right now other than reverting to v0.4.10?

Sorry for the delay in response.  Things got pushed back.  Adjustable brightness is still TBD.

The more I think of it the more I see it as a killer function. I can imagine pushing lightness when player is in exterior and droping it when entering somewhere. That would be great!

So, I sorta solved this by adding my own plugin which inherits GoogleUnityActivity and changed the brightness to follow user's setting on the onCreate() function. So far I don't see any problem with it.
@smdol could you foresee any problem from inheriting the activity? Well, other than the not-future-change-compatible of course.

That seems like it will work, aside from future compatibility.

Hi @smdol!
Nothing around luminosity in 0.5.1?😕
Cheers.
MiCk.

The release notes indicate that the luminosity change is out:
"The SDK no longer forces Android screen brightness to maximum, which was
introduced in v0.5."
https://developers.google.com/cardboard/unity/release-notes
On Friday, July 24, 2015, MiCkSoftware<EMAIL_ADDRESS>wrote:

Hi @smdol https://github.com/smdol!
Nothing around luminosity in 0.5.1?😕
Cheers.
MiCk.
—
Reply to this email directly or view it on GitHub
https://github.com/googlesamples/cardboard-unity/issues/35#issuecomment-124814778
.

Omg @ReedL I've read carefully and still missed it. Going on vacations today. I need it! 😊

@smdol closing this issue.

Heh, NP, glad your issue got addressed! Enjoy your vacation!
On Saturday, July 25, 2015, MiCkSoftware<EMAIL_ADDRESS>wrote:

Omg @ReedL https://github.com/ReedL I've read carefully and still
missed it. Going on vacations today. I need it! 😊
—
Reply to this email directly or view it on GitHub
https://github.com/googlesamples/cardboard-unity/issues/35#issuecomment-124815628
.


Goby package management spec

Installation
Contained in Goby binary
Command usage
Normal installation:
goby install st0012/foo

File structure:

$GOBY_PATH

st0012

foo

.git/
lib/foo.gb
lib.gb

Require path:
require "foo"

Installation with version specified:
goby install st0012/foo -v 1.0.0

File structure:

$GOBY_PATH

st0012

foo.v1.0.0

.git/
lib/foo.gb
lib.gb

Require path:
require "foo"

Installation with sha specified:
goby install st0012/foo -v abc123

File structure:

$GOBY_PATH

st0012

foo.abc123

.git/
lib/foo.gb
lib.gb

Require path:
require "foo"

Publish a library
We have two ways to require gem's files
The Ruby way
Have a ENV["LOAD_PATH"] (using ENV because we don't have global variable) to record all the gem's load path
# lib.gb

lib = File.expand_path('../lib', __FILE__)
ENV["LOAD_PATH"].unshift(lib) unless ENV["LOAD_PATH"].include?(lib)

require "foo"

# lib/foo.gb

require "foo/bar"
require "foo/baz"

The simpler way
# lib/foo.gb

require_relative "./foo/bar"
require_relative "./foo/baz"

What do you mean "based on"? We will support versioning but we can't make sure the publisher follows semantic version

Just wondered if we should recommend Semantic Versioning or like that.

yep of course we'd recommend that

I would prefer require paths be full paths. i.e. st0012/foo -> require "st0012/foo"

@eliothedeman so if we're inside the library, like lib/foo.gb. Then we need to write something like require "st0012/foo/bar" for requiring lib/foo/bar.gb?

Yes, this makes name collisions impossible, as well as making it explicit what you are importing. There is a reason relative imports are banned in python at nearly all large companies. In my opinion, imports should always be absolute.

It's not worthy to add such tool at this stage, so closing this.


ordersHistory always displayed ?

Hi !
I just created an account on the demo.
I go to my account -> my orders
The empty table is displayed but I think that "No orders yet" that should be displayed.
What do you think ?
Here is the code :

Here is the debug : [https://dsh.re/4cee1]Screenshot
I think that we should check if ordersHistory is empty or not because it always exists.
What do you think ?

Here's the code that checked that :

 0">
Go PR ?

Sure, good idea

Ok @pkarw  let's go :)


Error: Windows cannot read the  setting from the unattend answer file

I just followed the instructions from your new video  to flash the Windows 11 image
For the unattend file I used the default IoT-LTSC-Like image you've provided. When I boot up Windows I get an error which says "Windows cannot read the  setting from the unattend answer file" and then the system reboots.
This is what it looks like:

Apparently some other people have reported this issue in YouTube comments, maybe something is wrong with the unattend file so I am creating an issue here.

This is interesting, I just downloaded the latest Windows 11 23H2 ISO and downloaded the IoT-LTSC-Like .xml file and used AnyBurn to create the ISO.
I am able to install Windows perfectly fine.
I'm not sure what the issue can be.

@umermasood I have just updated all of the files on the main branch to fix the formatting issues.
Please test it again and report back.

I tested the new file, still got the same error as this guy. I tested it with the standard file.

Someone on my Discord server just reported when using the Media Creation Tool to create the bootable USB, the file doesn't work.
They used AnyBurn+Ventoy and then it worked.
I also just tested using Rufus+Copying the .xml file to the usb flash drive and it worked.

I have the same error using rufus and dragging and dropping the .xml file. I will try Ventoy method now and see if I have any joy.

Really interested to find out what's causing this issue because I haven't encountered it at all.

I just reproduced this issue and that is because of using the arm64 answer file on a x64/amd64 based system.

Each file has 2 versions:
IoT-LTSC-Like
x64/amd64
arm64
Standard
x64/amd64
arm64
Each file has a comment that states which file it is, ex:

I am aware that @umermasood linked the correct x64/amd64 file when creating this issue, but when he created the issue, there were formatting issues in the XML files. I have updated and fixed that since. From all of my tests with all of the files, they all work perfectly fine, but I think you guys might be using the wrong version for your hardware.

I redownloaded the answer file and remade installation media with ventoy and can report everything went perfectly. My racing sim is eternally grateful!!

@raeffer Perfect! I'm closing this issue in that chase. Have fun!

I seem to still have this issue when trying this with windows 10


Use of mutation testing in cypress-localstorage-commands - Help needed

Hello there!
My name is Ana. I noted that you use the mutation testing tool strykerjs in the project.
I am a postdoctoral researcher at the University of Seville (Spain), and my colleagues and I are studying how mutation testing tools are used in practice. With this aim in mind, we have analysed over 3,500 public GitHub repositories using mutation testing tools, including yours! This work has recently been published in a journal paper available at https://link.springer.com/content/pdf/10.1007/s10664-022-10177-8.pdf.
To complete this study, we are asking for your help to understand better how mutation testing is used in practice, please! We would be extremely grateful if you could contribute to this study by answering a brief survey of 21 simple questions (no more than 6 minutes). This is the link to the questionnaire https://forms.gle/FvXNrimWAsJYC1zB9.
Drop me an e-mail if you have any questions or comments (anasan@us.es). Thank you very much in advance!!

Hello @belene ,
I have answered the questionnaire. Good luck with your study 😃


[Event Request] Table 38 "Purchase Header" - OnUpdatePurchLinesByFieldNoOnBeforeValidateFields

Hello. In table 38 Purchase Header, in the procedure UpdatePurchLinesByFieldNo, I would like to use the event publisher OnUpdatePurchLinesByFieldNoOnBeforeValidateFields to add my own code instead of the standard one inside the case of statement. But I need the parameters Rec and IsHandled, and a IsHandled flag to do so. Like this :
procedure UpdatePurchLinesByFieldNo(ChangedFieldNo: Integer; AskQuestion: Boolean)
...
OnUpdatePurchLinesByFieldNoOnBeforeValidateFields(PurchLine, xPurchLine, ChangedFieldNo, Rec, IsHandled);
if not IsHandled then
    case ChangedFieldNo of

With this event integration :
[IntegrationEvent(false, false)]
local procedure OnUpdatePurchLinesByFieldNoOnBeforeValidateFields(var PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line"; ChangedFieldNo: Integer; var PurchaseHeader : record "Purchase Header"; var IsHandled : boolean)
begin
end;

Do you think it could be possible ?
Thank you for your work.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


Cannot find module 'domain' when used with mocha-casperjs

On Node v5.x / npm v3.x,
The code:
var parallel = require('mocha.parallel');
produces the error:
Error: Cannot find module 'domain'
  /node_modules/mocha.parallel/index.js:2

If I manually npm install domain --save, and
ReferenceError: Can't find variable: System
  /node_modules/domain/dist/lib/Domain.js:1

Any idea how to resolve?

Hm, it's not an issue with the node or npm versions, since the domain api is still available:
$ node --version
v5.0.0
dstjules:~/git/mocha.parallel (master=)
$ npm --version
3.3.6
dstjules:~/git/mocha.parallel (master=)
$ npm test

><EMAIL_ADDRESS>test /Users/dstjules/git/mocha.parallel
> mocha test.js

  parallel
    ✓ runs specs in parallel (900ms)
    ✓ isolates parallel suite execution (1349ms)
...

If you just do:
var domain = require('domain');

Does it still error? If the code is being executed within casperjs/phantomjs (rather than node creating instances of casperjs/phantomjs), that might explain it.

Yes, if I do var domain = require('domain'), it still errors out in Domain.js saying Undefined variable: System. I think it may be because I'm running my tests using mocha-casperjs test.js, so this may not specifically be related to mocha.parallel

Yeah, sorry :( It's an issue with casperjs.
$ cat test.js
var domain = require('domain');

dstjules:~/Desktop
$ casperjs test.js
CasperError: Can't find module domain

  /usr/local/lib/node_modules/casperjs/bin/bootstrap.js:262 in patchedRequire
  test.js:1

So mocha.parallel won't work with it, as domains are required. Without domains, debugging's very difficult as it's hard to point an error as belonging to a specific test.


feat: pointer on linkbutton hover NP-1708

Makes the nice pointer appear when hovering over a button-link link-button.  Yuge!

literal tears of joy 💦

literal tears of joy 💦


cgit server

To ensure our continued self-reliance in case GitHub dies, we should install
cgit and mirror all of Python Discord's repositories. Ideally, all configuration
(including mirrors) should be managed in Ansible.

Addressed in #499


Some thoughts 🤔 💭

Hey everyone 👋🏻
SurrealDB will change the game. It would be great to have a well-tested, typed, and documented python library to use for future data science/ML projects. I would love to start contributing to this library. I was wondering what the roadmap is for 2023 and how I can get involved. I have been looking through the repository and wanted to highlight some areas we could improve. Let me know your thoughts! I am open to working on these areas. I believe having the below would give the repository a great baseline to allow for contributions to be more streamlined.
Sorry if some of these aspects of the repo have already been discussed! I couldn't find anything, so I thought it best to brain-dump everything here 😆
Also, could we open discussions for this repo? I am happy to discuss on this issue or in Discord - Thanks!
Code Formatting 💯
Some suggestions for code formatting:

isort
black
flake8
pydocstyle

Code Quality ✅
Some suggestions for code quality:

pytest
coverage

Documentation 📖
When it comes to documentation, I am not sure needs to align with the other SurrealDB libraries or not? Saying that we can agree on a documentation style. I would vote for Google Style and using MkDocs for the documentation itself.
GitHub Actions ⚗
Some suggestions for GitHub Actions:

Code formatting (black/isort).
Code quality (pytest/coverage/pydocstyle/flake8).
Run tests using Python 3.7, 3.8, 3.9, 3.10, 3.11
Run tests on macOS, Linux, and Windows.
CodeCov.
SonarCloud.
Branch protection rules.

Housekeeping 🧹
Some nice to haves to allow for easier contribution:

Automated labels.
PR templates.
Issue templates.
Document list of changes.
Contribution guidelines.

@Ce11an  Great ideas here, we should implement these. Feel free to make a pr if you're interested in implementing any of your suggestions

I don't think code quality is the best term for tests, I would think "Code Stability" may be better.
And possibly we could use Ruff as a rust-backed alternative to flake8, pydocstyle, and isort.
I also don't quite see the need nor use case to use SonarCloud here, just using GitHub actions would most likely suffice.

@CaedenPH - thanks for the docs link. Will happily work on some of these areas.
@VincentRPS - Hardest part of coding is naming anything 😆 Happy to change to stability. I have never used Ruff but the performance looks great. Happy to add this in.
I will make some additional issues to separate this ticket and link them back here.
Thanks 😃

jumped on this issue a little bit late, been busy recently... i'm in agreement with what was already said here, these are mostly things i planned to implement but never did. feel free to pr any of these if you wish, if not i'm happy to take over and implement them


Implement more cases for as_subchunks

The goal for this PR is for the fallback code to never be used unless explicitly enabled by the private keyword argument.

I released 1.5.2 with the changes here.


Can't resize legend

There's no way to resize the legend, making things difficult if you're taking a screenshot for a presentation

Thanks for filing @charliehawco - can you give an example?

Closing this for now until we can get some definition on this feature request.


write some bloody tests

I've not decided what to test yet, but it's worth adding the infrastructure for testing so that I can add more tests when I need to.

Thanks David.
I will see if I can come up with an integration test next week.  That may require some refactoring of the existing code in main.rs.  I hope that's okay.
Right now I am not sure how often an integration test should run.  I am thinking perhaps integration tests should only run when the Git main branch gets updated rather than every time a pull request is updated.  That way external HTTP requests remain limited.  Let me know if you have any preferences.

We already have a basic smoke test that happens on push to main https://github.com/alsuren/cargo-quickinstall/actions/runs/1883935307/workflow
Potentially we could run this test on pull requests as well?
(It already runs for all of the branches I make, but not for branches made in other people's forks, I think)
Honestly I'm happy to run on every push to every pull request. If you run get-stats.sh then you will see that it looks like someone has integrated it into their CI workflow already. Also, cargo-binstall is using quickinstall packages now, so I'm expecting the stats for this month to be a lot higher than last month. A few extra calls to test our own pull requests won't make much difference.

I forgot to close this when I merged your pr. Sorry about that. Feel free to make other pull requests, to add any tests you would find valuable.


Realm complains computed property's type in Unit test

I have a computed property, type of NSURL, as far as I know that computed property is not persist. So it should not be complained.

failed: caught "RLMException", "'NSURL' is not supported as an RLMObject property. All properties must be primitives, NSString, NSDate, NSData, RLMArray, or subclasses of RLMObject. See http://realm.io/docs/objc/api/Classes/RLMObject.html for more information."

class CFRealmBaseURL: Object {
    dynamic var path = ""

    override class func primaryKey() -> String? {
        return "path"
    }
}

class CFRealmProjectStatus: Object {
    dynamic var text = "一般任务" //"等待回复", "等待材料", "任务完成"
    dynamic var id = 0 //1, 2, -1

    override class func primaryKey() -> String? {
        return "id"
    }
}

class CFRealmCard: Object {
    dynamic var baseURL = CFRealmBaseURL()
    dynamic var projectType = ""
    dynamic var company = ""
    dynamic var projectNumber = ""
    dynamic var projectProcess = ""
    var relativeURL:NSURL {
        get {
            let path = [self.projectProcess, self.company, self.projectNumber, self.projectProcess].joinWithSeparator("/")
            return NSURL(fileURLWithPath: path, isDirectory: true, relativeToURL: NSURL(fileURLWithPath: self.baseURL.path, isDirectory: true))
        }

        set(newURL) {
            let paths = newURL.pathComponents!

            if let baseURLCount = newURL.baseURL?.pathComponents?.count {
                self.baseURL.path = newURL.baseURL!.absoluteString
                self.projectType = paths[baseURLCount]
                self.company = paths[baseURLCount + 1]
                self.projectNumber = paths[baseURLCount + 2]
                self.projectProcess = paths[Range(start: baseURLCount + 3, end: paths.endIndex)].joinWithSeparator("/")
            }
        }
    }

    dynamic var projectStatus = CFRealmProjectStatus()
    dynamic var projectSummary = ""
    let contactPersonList = List<CFRealmProjectContactPerson>()

    dynamic var createdDate = NSDate(timeIntervalSince1970: 0)

    func setCard(baseURLs:[NSURL], url:NSURL) {
        let fullPath = url.absoluteString
        for aBaseURL in baseURLs { //baseURLs is order by levels from deep to low
            let aBasePath = aBaseURL.absoluteString
            if fullPath.hasPrefix(aBasePath) {
                var path = fullPath
                path.removeRange(Range(start: aBasePath.startIndex, end: aBasePath.endIndex))
                self.relativeURL = NSURL(fileURLWithPath: path, isDirectory: true, relativeToURL: aBaseURL)
            }
        }
    }

I have to add the computed property to ignore list to stop the complain.
    override class func ignoredProperties() -> [String] {
        return ["relativeURL"]
    }

There's no way to determine at run-time whether or not a Swift class property has the default setters & getters, or custom getters & setters. So in this case, Realm has no other way of knowing that your relativeURL property should be ignored other than including it in ignoredProperties().

@jpsim can you clarify this in the doc writeups as well?  I was lead astray by a comment in the example code to believe that Realm auto-ignored all computed properties (not just computed properties that were objective c types).
Specifically talking about this code segment:
class Person: Object {
  dynamic var tmpID = 0
  var name: String { // computed properties are automatically ignored
    return "\(firstName) \(lastName)"
  }
  dynamic var firstName = ""
  dynamic var lastName = ""

  override static func ignoredProperties() -> [String] {
    return ["tmpID"]
  }
}

Is that comment inaccurate/incomplete and computed Objc type properties are automatically ignored?
As an aside, the error coming out of the Realm system was a little unhelpful.  I had to put a break point in to figure out which property in particular was sending this error.

I see how that could be confusing. I guess I just wouldn't refer to a property with a custom setter as a "computed property", which I only took to mean "properties whose getters return a value computed from other values".
I just updated the comment wording to say "read-only properties are automatically ignored". It should take 4-5 minutes to be updated on the live site.
Thanks for the tip @owenzhao and @tom-sparo.


pkg/sbom: force disable the license file analyzer

What does this PR do?
This PR forces the license analyzer (currently unused) to be disabled, and upgrades trivy to remove this analyzer upstream. The main goal of this is the removal of the license classifier dependency and the removal of its library of license files resulting in a sizable win in agent and system-probe binary size.
Motivation
Describe how you validated your changes

Possible Drawbacks / Trade-offs
Additional Notes

/merge


NServiceKit.Redis

1.This nuget (NServiceKit.Redis) is built  as a netframework libray  from redis database,Would you consider change a dotnetcore nuget or netstanderd nuget library?
2.When project inits, IKeyValueDatabase as a di item into the project

Thanks report this issue, we will fix it with #602.

Fixed.


Add a UI mini-tutorial to Sample Web UI to show users what is new in the most recent update

As a user of Open AMT Cloud Toolkit, I would like the Sample Web UI to show me a brief tutorial of the new features that were added in the most recent version that I am running.  This would be a one-time tutorial that would highlight the changes in the current version of Sample Web UI
Acceptance Criteria:

[ ] Sample Web UI will provide a small tutorial in the UI showcasing the features added in the current version.
- This would be small UI elements that provide a brief description of the change and are located near the changed item in the UI
- The element would have a close option to end the tutorial
- If there are multiple changes in the tutorial, the element will have a next button that will take them to the next tutorial step
[ ] The Sample Web UI will only show the tutorial once, on first use.

Here is a blog post doing a much better job of explaining what I'm looking for.  It also provides examples of apps that do this.  https://www.appcues.com/blog/the-5-best-walkthrough-examples


feat (Algebra/Group/WithZero): add WithZero.coeMonoidHom

This looks like the wrong approach to me; what you call coeMonoidHom is usually called map, and most map definitions actually fall out as a special case of lift:

Thanks, I have refactored it as suggested. Since the names WithZero.map and WithZero.lift are already taken (for additive maps), I have used WithZero.map' andWithZero.lift', but please let me know if you have other naming suggestions.

mapMonoidHom and liftMonoidHom would also be good names. Perhaps we should rename the existing defs in the same style, rather than picking favorites with '?

Looking more closely, I think the primed name is ok. Can you copy across some of the other API for the unprimed version?

maintainer merge

Could you move this out of Algebra.Group? Everything is supposed to be additivisable there. What about Algebra.GroupWithZero.WithZero?

Thanks!
bors merge


Using NewReaderFile does not include Decoder option

Using NewReaderFile does not include Decoder option.
Tried using this with the NewReaderFile, but the decoder were not registered.
r := NewReader(bytes.NewBufferString("name,birthday\nAlice,1980-12-30\nBob,1975-06-09"),
	Option{
		Decoders: map[string]interface{}{
			"date": func(s string) (time.Time, error) {
				return time.Parse("2006-01-02", s)
			},
	},
	})
var entry struct {
	Name  string    `name:"name"`
	Birth time.Time `name:"birthday" enc:"date"`
}
for r.Read(&entry) {
	fmt.Print(entry)
}
if err := r.Done(); err != nil {
	fmt.Printf("Failed: %v\n", err)
}

Output: Encoding "date" is not defined

Thank you for the report, Peter.
I tried to reproduce the issue but I could not
https://travis-ci.org/yunabe/easycsv/builds/432772665
Could you double-check the version on your computer is up-to-date?
If the test I added was broken in your environment, could you share the information of your environment (go version and go env outputs)?
Thanks!
yunabe

Sorry, my code example is only confusing. It's "NewReaderFile" that does not work with decoders.

Thanks, Peter. You were right.
I could reproduce the issue with NewReaderFile
https://travis-ci.org/yunabe/easycsv/builds/432884560

Thank you!


how can i install flutter in visual studio code

Steps to Reproduce

...
...
...

Logs

Hello @emmanuel-13 !
Thank you for posting.
Here, you can find all the instructions: https://flutter.dev/docs/development/tools/vs-code.
Hope it helps!


Library and secondary IDs

Hi all, (again about the library, sorry about that ;)....)
In the Pathvisio library, secondary identifiers of ChEBI are included as well (Marvin found this for bicarbonate). I think for a new Pathvisio release, we should remove these secondary IDs as a option; and replace all secondary ChEBIs with primary in WPs. Since the secondary IDs are not mapped via bridgeDB.
@marvinm2
@egonw
@mkutmon

After consulting with Jonathan, he told me that the library(search function in Pathvisio) uses the content of BridgeDB databases.
So, if any secondary metabolites IDs are being found in the "library", it is because they are in the metabolites bridgeDB file. We do not need a new Pv release for this change.
Is this something we want to include in the bridge file (I have other examples, where I could not create a mapping, because the secondary ID was used in a dataset....)?
Or do we just want the primary ones included, and another way to map the secondary to the primary IDs?

@DeniseSl22  did you move this issue to the bridgedb repo? then I close it here.

Nope not yet; I will do it right away :)
But it is a problem which we do not have the solution for right now (according to Chris and Egon)...

Moved to https://github.com/bridgedb/BridgeDb/issues/55


Strategy and attention using Prover, Representation learning

As a partial randomisation, we can generate provers with goals, term generators etc selected and with bounded entropy.
These can be used as tangents as in #224.
This is a natural bridge to representation learning #101

The larger goal is to have a fully autonomous system that generates tasks partly randomly from its state and partly by reacting to tasks.
For this, we should have an abstract trait giving all the possible communications in both directions: goals, explicit running instructions and results.
an interpreter handles, and also logs (possibly just to the screen).
human intervention can both adjust the strategy and give explicit instructions.
the strategic layer should also have a large table of proved results (which can be perhaps sought with unification).

Since there is now a CompositeProver including a GoalChomper and various stuff is being tried, there is no info in the above.


Spyder should not crash when 3rd party plugin fails to import

From<EMAIL_ADDRESS>on 2011-12-29T12:35:41Z
What steps will reproduce the problem?
1.Try to write plugin for Spyder using Spyder itself
2.At some point save it with syntax error
3.Restart Spyder What is the expected output? What do you see instead? Not only your plugin doesn't work, but it brings down Spyder as well, so you can't use the IDE to fix your plug.
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=898

From<EMAIL_ADDRESS>on 2011-12-29T09:53:03Z
Fixed by r6cb27392d845 .

From<EMAIL_ADDRESS>on 2011-12-29T09:53:11Z
Status: Fixed


Feat: support agent in Typescript templates

✅ support stream chat in OpenAIAgentWorker
✅ update engine of NextJs streaming template to use QueryEngineTool and OpenAIAgent
✅ update route handler of NextJs streaming template to response stream

add question to select other tools and load them in OpenAIAgent
support Express streaming template to use OpenAIAgent
support other vectordbs working with OpenAIAgent
use React Server Component (from "ai/rsc") to make awesome UI

We have OpenAI streaming coming on this PR:
https://github.com/run-llama/LlamaIndexTS/pulls
But thanks for the contribution, if you prefer to remove the commits related to streaming then we can review the rest, sounds pretty good


ECS Dashboard

Flecs by @SanderMertens has a beautiful dashboard: https://github.com/flecs-hub/flecs-dash (previous iteration here).

This could be adapted to work with Bevy ECS.

Sander:
I'd be happy to help 🙂 note that the project is still very much a work in progress
I imagine it wouldn't be too difficult to port as I think bevy & flecs work similarly under the hood (both archetypes), and all you need is the right REST interface to make the dashboard work

Isn't that against:

[...] the editor should be built in the engine. Godot uses this approach and it is so smart. Doing so dogfoods the engine's UI system and creates positive feedback loops. Improvements to the editor are also often improvements to the core engine. It also makes sure your engine is flexible enough to build tooling (and not just games). I personally consider building an engine's editor in another stack to be a missed opportunity (ex: the web, QT, native widgets).

Yes, but the editor is still far away. I think this is more a suggestion for a 3rd party crate, which could be used to debug ECS

Yeah this is a good idea, but integration should be a 3rd party plugin. The editor will (hopefully) eventually have dashboard-like functionality so thats what we would merge into this repo.

This is great. As well it could help dogfooding bevys own network implementation (hmmm not even sure if there is one) :)

@fopsdev currently networking is being prototyped and experimented with in external plugins https://github.com/bevyengine/awesome-bevy#networking

Short reference to the Bevy Remote Protocol: https://github.com/bevyengine/bevy/pull/14880
Back to the issue:
IMHO this would be a great addition to working in the editor, which i think is more asset focussed, to allow profiling at runtime. This could of course also be integrated into the editor, but I for one still prefere doing everything in code and would love to have a simple profiling protocol to hook into.


Cleanup zip file

Thank you for your nice gem :)
But, one problem happened.
If for some reason an error occurred during deployment, the zip file remained in the releases directory.
If the zip file remained in the releases directory, the capistrano cleanup task does not work properly, so the releases directory continues to increase, because the zip file name does not match /^\d{14}$/.
https://github.com/capistrano/capistrano/blob/92bfd1156820636921800534e70d633d16ddbe37/lib/capistrano/tasks/deploy.rake#L148-L178
We deal with this by defining a small capistrano task like above.
namespace :deploy do
  desc "Clean up releases directory"
  task :cleanup_releases_directory do
    on roles(:app) do
      releases = capture(:ls, releases_path, "-1")
      releases.lines do |release|
        unless release.match(/\d{14}$/)
          execute :rm, "-rf", File.join(releases_path, release)
        end
      end
    end
  end
end

before 'deploy:cleanup', 'deploy:cleanup_releases_directory'

I am glad if gem is corresponded to this!

@baado
Sorry for the late reply.
This issue has been fixed by #12.
Now the zip file will be saved in #{deploy_to}/net_storage_archives as documented in CHANGELOG.md
https://github.com/DeNADev/capistrano-net_storage/blob/ef70642919cf188b71b1335be286771dab84b0da/CHANGELOG.md#040-20220517
Capistrano::NetStorage will handle its generating files from now on.
Regarding the current zip file under #{deploy_to}/releases, if any, could you remove that manually?
The file deleting functionality for previous versions (< 0.4.0) has not been implemented in order to avoid false positives.

Thank you for your correspondence!
I also understand that there was some issues.
On the other hand, I am sorry to say that I am already not where this gem is needed, so there is no hurry to respond
Thank you! :)

Sorry for the late response.
We have found out that #12 is O.K. to solve this issue.

Thanks for addressing this issue!
And thank you for the mention!


Containerised Docker Image for the Power Platform on-premises Data Gateway

Hi,
Is this Gateway available as a Docker Image?
It'll be very useful in the scenario where the on-premises data endpoints are on Linux or running on Docker Containers
Thanks,

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

ID: 5c51a10c-d90c-7690-0979-cd8ce37234c8
Version Independent ID: 2da65f4c-f128-40b8-1a2b-5ae72c4252d6
Content: Install an on-premises data gateway
Content Source: data-integration/gateway/service-gateway-install.md
Product: on-premises-data-gateway
Technology: ****
GitHub Login: @arthiriyer
Microsoft Alias: arthii

It would be really great if we could run the gateway in an azure container connected to the on-premise infrastructure.

i have been dreaming of it since 3 -4 years and raised in multiple forums with Microsoft, i am guessing that is not the path they are taking forward

@zebrassimo & @zebrassimo @haneef95  et al - the Azure Container Instance can run Windows containers - so embracing linux is a red herring.
Seems like it's possible with what Synapse Integration Runtime to solve it's equivalent of the same problem.
Per Docker file - this runs on mcr.microsoft.com/windows/servercore:ltsc2019.
The question then to MS would then be "Is the same or similar setup approach possible with the Power BI Gateway?"

Porting to dotnetcore will need to be done

It's already done it seems: https://devblogs.microsoft.com/dotnet/azure-active-directorys-gateway-is-on-net-6-0/
They leap has also been made from IIS to HTTP.sys. Just need to give the users the option to use Kestrel, to tap into it's cross-platform-abliity.

@acds - Thanks. But, looking for Microsoft's officially supported image for this purpose.

Any updates on this?

Hi @haneef95
Thanks for your dedication to our documentation. Unfortunately, at this time we have been unable to review your issue in a timely manner and we sincerely apologize for the delayed response. Though the scope of our feedback channel here on GitHub covers specific documentation fixes, we can help redirect you to the right support channel to get an answer to your question: Power users community forum. Because this issue does not relate to documentation, we are closing this issue.


Animated tokens does not render

Nice fix!
Small bug: If the token is animated (webm-file) it does not render.

fixed in 1.0.1


HST Realignment

This HIP addresses the misalignment in the distribution of HNT emissions skewed by HST. This HIP proposes that HST emissions be reduced to 5% of HNT emissions. In doing so, a larger and more inclusive share of HNT will be emitted to current and future subDAOs, the primary engine of the Helium Network of Networks.

This has gotten pretty stale. I think it may make sense to close this as stale.


Breaks with vite-ssg on vercel build

Running build localy works great, but when pushing to vercel it breaks.
00:18:34.586  	vite v2.4.1 building SSR bundle for production...
00:18:34.633  	 > node_modules/vite-tsconfig-paths/dist/index.js:103:40: error: [plugin: vite:dep-scan] viteResolve is not a function

I have the same issue - not sure how to reproduce it locally either :/
Have switched to manual alias definitions for now, but would prefer to use this plugin.

Also seeing this same error on Cloudflare Pages on Node 14.

Having this issue too. It turns out it's possible to reproduce it locally by deleting the node_modules/.vite directory.
Running vite dev to recreate the directory fixes the issue, and then removing it again makes the issue return.

Fixed in v3.3.14


fix vite example

previous vite "fix" was making the build pass, but resulting app did not bundle lazily loaded modules properly, since they need to be marked as external in rollup which is used by vite for production builds

Love it. Thank you!


Stats for simulations spanning multiple nodes

Description and Motivation
Calculate simulation statistics (TotalMessageCount, TotalFailedMessages, FailedDeviceConnectionsCount, FailedTwinUpdates, Avg msg/sec) for simulation spanning multiple nodes.
Each VM will periodically (30 seconds) write its simulation stats to a common storage collection – one record per simulation per VM. On read, query for all records for a simulation and calculate the aggregate statistics.
Details:

Create a separate collection called “statistics” in cosmosDb (same db where we are other collections – Simulations, Nodes, Partitions, etc).
Each VM (node) will write stats for each simulation once every 30 seconds. There will be one storage record (document) per simulation per node.
Note: Avg msg/sec will not be stored in db, it will be a calculated prop.

E.g of statistics storage record-
"Id":"SimulationId_nodeId"
{
 \"Data\":"{

 \"SimulationId\":\"0000-00000-00000\",

 \"NodeId\":\"123245\",

 \"Statistics\":{\"TotalMessagesSent\":10000,\"TotalFailedMessages\":2, ,\"FailedDeviceTwinUpdatesCount\":1, ,\"FailedDeviceConnectionCount\":0}\"

}

Get Simulation API will read all records for a given simulation and calculate aggregate for each stats for all nodes and return aggregated results.

Change type

[ ] Bug fix
[X] New feature
[X] Enhancement
[ ] Breaking change (breaks backward compatibility)

Checklist:

[ ] All tests passed
[ ] The code follows the code style and conventions of this project
[ ] The change requires a change to the documentation
[ ] I have updated the documentation accordingly

This change is

can we remove this from Services.Models.SimulationPatch ?
public SimulationStatistics Statistics { get; set; }

and
public class SimulationStatistics
    {
        public long TotalMessagesSent { get; set; }
        public double AverageMessagesPerSecond { get; set; }
    }

can we remove this from Services.Models.SimulationPatch ?
public SimulationStatistics Statistics { get; set; }

and
public class SimulationStatistics
    {
        public long TotalMessagesSent { get; set; }
        public double AverageMessagesPerSecond { get; set; }
    }

removed


sometimes dubbo can choose wrong IP which hangs brave's integration test.

Adrian Cole @adriancole mentions on gitter.im:
fyi I noticed sometimes dubbo can choose wrong IP. for example hangs our integration tests openzipkin/brave#680
we use this approach when guessing
       Enumeration<NetworkInterface> nics = NetworkInterface.getNetworkInterfaces();
      if (nics == null) return builder.build();
      while (nics.hasMoreElements()) {
        NetworkInterface nic = nics.nextElement();
        Enumeration<InetAddress> addresses = nic.getInetAddresses();
        while (addresses.hasMoreElements()) {
          InetAddress address = addresses.nextElement();
          if (address.isSiteLocalAddress()) {
            builder.ip(address);
            break;
          }
        }
      }

https://github.com/openzipkin/brave/blob/master/brave/src/main/java/brave/internal/Platform.java#L63
anyway not sure it breaks other people as unit tests are one thing.. production use another
If I debugged right, we were getting this one which accidentally chose docker IP so hung trying to connect https://github.com/apache/incubator-dubbo/blob/master/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java#L193
but also depends a lot on my network. ex only happens sometimes (I change network a lot)

Dubbo will try to retrieve ip in the following orders:

outer configurations(e.g., system environment variables)
hosts mapping
guess by traversing the network` interface.

the interface that can connect to remote registry.
first interface has valid ip address.

As for guessing approach, Dubbo almost uses the same approach as zipkin/brave does: https://github.com/openzipkin/brave/blob/master/brave/src/main/java/brave/internal/Platform.java#L63, except for it does not  check if (address.isSiteLocalAddress()) {. I am not sure if  site-local addresses: 10/8, 172.16/12 and 192.168/16 the best choice for dubbo.
The deploy environment for dubbo varies, we highly recommend rely on the first two approaches, specifying the ip you want explicitly can be the best way, avoid guessing as it's unpredictable.  In a docker environment, bind the docker ip or host ip can depends, leave the choice to users.

We want people to test dubbo, like do good testing in junit etc. Making a
special flag to allow loopback for test only would be a very nice feature
and avoid all of this. Right now, it is impossible to use loopback in tests
due to production concerns that don't have anything to do with tests.

Good advice, we will take look at it.


fix: Adds yarn as a devDep

Summary
This PR adds yarn as a dev dependency. If you install a version of this package from git, (ex. github:lpsinger/react-uswds#dateFormat) the prepare script will run on npm install. This causes npm install to fail if yarn is not present on the user's machine.
From the npm docs:
NOTE: If a package being installed through git contains a prepare script, its dependencies and devDependencies will be installed, and the prepare script will be run, before the package is packaged and installed.

This would be appreciated. It was a necessary addition to our (hopefully temporary) fork in order for CI agents to run prepare when consuming the package via GitHub instead of npmjs. https://github.com/CSNW/react-uswds/commit/202dce5335d9bd28c5bd5335d0e2e8bc41e2d319

I added this change in #2716 in case that PR lands before this one to ensure folks get it asap

We're in the process of (pending some Github action changes) merging #2716 with this change incorporated, so I'm going to close this PR. Thanks for this @dakota002!


Docker container had been stopped suddenly

After 4 days of our last deployment, all of a sudden we saw that our backend is down and after checking production server I noticed that the docker container is not running anymore, I brought up the docker-compose and the problem has been fixed, but now our question is why this happened, and how we can prevent it, I know the problem is very vague but this is the only data we have
@geleeroyale  I couldn't find Moeshehab username so I assigned this issue to you

@geleeroyale @mohammadranjbarz - is this issue still relevant?

@geleeroyale @mohammadranjbarz - is this issue still relevant?

After changing deployments and docker structure by @mhmdksh  and @geleeroyale  I didn't see this error anymore, so we can move this issue to DONE

Yeah I think this is not relevant anymore, since now we have so much more visibility and reliability that if any of these issues happen again, we should be able to track the reason of why they were happening instead of leaving the issue open for 2 years haha.
This can be closed yes


treewide: lib.concatStrings (lib.intersperse ...) -> lib.concatStringsSep …

Update all usage of lib.concatStrings (lib.intersperse ...) to
lib.concatStringsSep. This produces the same result as per https://github.com/NixOS/nixpkgs/pull/135843,
however it yields a performance benefit on Nix versions that
support the builtins.concatStringsSep primop.

Motivation for this change
The concatStrings (intersperse ...) effectively produces an intermediate result(which has to be strict) of what builtins.concatStringsSep does internally then proceeds to concatenate it using concatStringsSep using an empty string as the separator, this is wasteful on Nix versions with support for builtins.concatStringsSep which can inline this iteratively without an intermediate result.
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 via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.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

[X] Fits CONTRIBUTING.md.

Since which nix version is this supported?

I believe it is supported since v1.10.

It looks like the builtin has been available for 6 years: https://github.com/NixOS/nix/commit/2e8fd4c5cdeb59ae2bd403aa5069993303e8388e https://github.com/NixOS/nixpkgs/commit/6f6f66ac98218ed3061c75375784d12c5fceb687
and the lib function was added in 2007: https://github.com/NixOS/nixpkgs/commit/c5e1ae5eaf0cc67f3ea626bd4160150fa6ba6d7b#diff-4aecbadc9933d0cd7e981c6f8589433c9b828e9d0db237151592010b5a5dbc4eR41

That's a lot earlier than I thought. Sounds like a good idea to do this then 👍.

Most of these could be further refactored to concatMapStringsSep, but not necessary of course.

I was going to do another treewide PR for that, but I wasn't sure as there is then a tradeoff for performance(specifically env allocations). I think it is better for the individual maintainer to balance maintainability and performance. What do you think?

I assume the performance impact would be negligible, but we could always take a look at ofborg's performance report if that's a concern.


Using Custom Type causes cPickle.PicklingError

This is my variable definition:

def position_comparator(first_position, second_position):
    # custom comparation of these two strings, returns float
    # ...
    return 0.0  # dummy result

fields = [
    {'field': 'url', 'type': 'String'},
    {'field': 'first_name', 'type': 'String'},
    {'field': 'last_name', 'type': 'String'},
    {'field': 'address', 'type': 'String'},
    {'field': 'positions', 'type': 'Custom', 'comparator': position_comparator}
]

data_d = readData(inputFile)

deduper = dedupe.Dedupe(fields)

deduper.sample(data_d, 15000)

and the .sample() call returns
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/pk6730/env/migration/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
    utility.execute()
  File "/home/pk6730/env/migration/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/pk6730/env/migration/local/lib/python2.7/site-packages/django/core/management/base.py", line 393, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/pk6730/env/migration/local/lib/python2.7/site-packages/django/core/management/base.py", line 444, in execute
    output = self.handle(*args, **options)
  File "/home/pk6730/env/migration/scraper/scraper_app/management/commands/deduplicate.py", line 507, in handle
    deduper.sample(data_d, 15000)
  File "/home/pk6730/env/migration/local/lib/python2.7/site-packages/dedupe/api.py", line 957, in sample
    self._loadSample(data_sample)
  File "/home/pk6730/env/migration/local/lib/python2.7/site-packages/dedupe/api.py", line 902, in _loadSample
    self.num_cores)
  File "/home/pk6730/env/migration/local/lib/python2.7/site-packages/dedupe/training.py", line 55, in __init__
    1))
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 251, in map
    return self.map_async(func, iterable, chunksize).get()
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 558, in get
    raise self._value
cPickle.PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed

If I don't use field with custom comparator, everything works fine. Is this a bug, or am I doing something wrong?
Thanks.

I can't reproduce. Can you post the full code that causes this error.
On Mon, Aug 24, 2015 at 5:22 AM Primož<EMAIL_ADDRESS>wrote:

This is my variable definition:
def position_comparator(first_position, second_position):
# custom comparation of these two strings, returns float
# ...
return 0.0  # dummy result
fields = [
{'field': 'url', 'type': 'String'},
{'field': 'first_name', 'type': 'String'},
{'field': 'last_name', 'type': 'String'},
{'field': 'address', 'type': 'String'},
{'field': 'positions', 'type': 'Custom', 'comparator': position_comparator}
]
data_d = readData(inputFile)
deduper = dedupe.Dedupe(fields)
deduper.sample(data_d, 15000)
and the .sample() call returns
Traceback (most recent call last):
File "./manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/home/pk6730/env/migration/local/lib/python2.7/site-packages/django/core/management/init.py", line 338, in execute_from_command_line
utility.execute()
File "/home/pk6730/env/migration/local/lib/python2.7/site-packages/django/core/management/init.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/pk6730/env/migration/local/lib/python2.7/site-packages/django/core/management/base.py", line 393, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/pk6730/env/migration/local/lib/python2.7/site-packages/django/core/management/base.py", line 444, in execute
output = self.handle(*args, **options)
File "/home/pk6730/env/migration/scraper/scraper_app/management/commands/deduplicate.py", line 507, in handle
deduper.sample(data_d, 15000)
File "/home/pk6730/env/migration/local/lib/python2.7/site-packages/dedupe/api.py", line 957, in sample
self._loadSample(data_sample)
File "/home/pk6730/env/migration/local/lib/python2.7/site-packages/dedupe/api.py", line 902, in _loadSample
self.num_cores)
File "/home/pk6730/env/migration/local/lib/python2.7/site-packages/dedupe/training.py", line 55, in init
1))
File "/usr/lib/python2.7/multiprocessing/pool.py", line 251, in map
return self.map_async(func, iterable, chunksize).get()
File "/usr/lib/python2.7/multiprocessing/pool.py", line 558, in get
raise self._value
cPickle.PicklingError: Can't pickle <type 'function'>: attribute lookup builtin.function failed
If I don't use field with custom comparator, everything works fine. Is
this a bug, or am I doing something wrong?
Thanks.
—
Reply to this email directly or view it on GitHub
https://github.com/datamade/dedupe/issues/411.

Here it is: https://gist.github.com/primoz-k/bd3baaaa5e4bcdfd3c6b
Let me know if you need anything else, thanks.

Just checking if you had a chance to look at this? I can not spot an obvious problem in my code. I'm using Python 2.7.6

Sorry. I made a note on this gist, but I guess it didn't notify you. Could
you provide some example data so that I can run you code. (Doesn't have to
be long and can be dummy data)
On Thu, Aug 27, 2015 at 3:04 AM Primož<EMAIL_ADDRESS>wrote:

Just checking if you had a chance to look at this? I can not spot an
obvious problem in my code. I'm using Python 2.7.6
—
Reply to this email directly or view it on GitHub
https://github.com/datamade/dedupe/issues/411#issuecomment-135333570.

I made a comment on gist, but as I did a little research, comments do not trigger notifications on gists, so I am just making sure that you will see it.

Great! I'll take a look.
On Fri, Aug 28, 2015 at 3:42 AM Primož<EMAIL_ADDRESS>wrote:

I made a comment on gist, but as I did a little research, comments do not
trigger notifications on gists, so I am just making sure that you will see
it.
—
Reply to this email directly or view it on GitHub
https://github.com/datamade/dedupe/issues/411#issuecomment-135683149.

Any progress? No pressure. :)

I can't run your example. It has many dependencies that you have not included included and you are not constructing cp objects from the csv file in a way that your comparator function seems to expect. Please update your code so that it runs until it gets to the error that you are seeing here.

Closing for now.
@primoz-k if you can provide a reproducible example, I'll be happy to take a look.

@fgregg Sorry for such a late reply. It was a problem in my code. If anybody else gets this error, they should inspect their custom comparator. It all works now, thanks.


README in crates.io

Added README.md reference to cargo.toml to reflect in crates.io
The README will be reflected when doing cargo publish

let's see if that works!


fix(payment): PAYPAL-0000 fix errors logging for GP

What?
Fix errors logging for GP
Why?
Because if we throw out any error, it will not be logged and that's confusing
Testing / Proof
The error in the screenshot simulated for the example
Error generated in checkout-sdk

@bigcommerce/team-checkout

Hey @bc-nick where is this error message in screenshot generated?

@animesh1987 I discovered this while moving google-pay-braintree to the an appropriate package. i could not to place an order and didn't see any error. This screenshot is an example of what I mean. We don't have such an error in prod.

We rarely need to update HAR files.
Could you please locate the missing things between the new and old HAR files?
Then add them here: https://github.com/bigcommerce/checkout-js/blob/6a5f20d1213275ffb5f8a20047840947ce20f33d/packages/test-framework/src/fixture/pageObject/playwright/PollyObject.ts#L121


[Checkbox] label out of sync with design

Summary
The "Enabled" label is different from Figma
Steps to reproduce

Clone the repo
Switch to the branch 113-historical-sync-settings/molecule
Run storybook

What is the current bug behavior?
The font color is #68738D with 16px
What is the expected correct behavior?
The font color should be #041836 with 18px
Relevant logs and/or screenshots
see design file, the link is in the FE Handbook

just FYI we never hardcode colors so #68738D should be in colors.js if not add it please

@DanielNgozika can I take this task?

@DanielNgozika can I take this task?

Hey man, I've already handled it.

No problem


.cab File Download for 1909

Is there a download link for the driver cab file for winver 1909?
The current one only works for 1809
Package doesn't match FOD for the current OS, package: Msix-PackagingTool-Driver-Package~31bf3856ad364e35~amd64~~10.0.17763.1,

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

ID: af06d0aa-a867-f314-640d-49b462850299
Version Independent ID: 1ab6ed42-0509-153c-ec6a-8bce23833c3b
Content: MSIX Packaging Tool Known Issues and Troubleshooting Tips - MSIX
Content Source: msix-src/packaging-tool/mpt-known-issues.md
Product: msix
GitHub Login: @sharlaakers
Microsoft Alias: shakers

Seems like the package could be installed after scanning for windows updates manually. Both a windows and .net sdk update have been installed


rvm_path vs rvm_custom_path

I'm a little confused as to why there is both rvm_path and rvm_custom_path. What is the difference between the two?

FWIW, the README currently mentions :rvm_custom_path as the way to specify the path but setting that has no effect on capistrano/bundler's bundle:install task Meanwhile, setting :rvm_path gets things pointed at the right place.
There are plenty of contradictory examples/docs out there; it's not obvious what you're supposed to actually do.

+1 for @mczepiel
which rvm
/usr/local/rvm/bin/rvm

And then the following deploy.rb works
set :rvm_type, :system
set :rvm_path, '/usr/local/rvm'

+1 for @mczepiel
which rvm
/usr/local/rvm/bin/rvm

And then the following deploy.rb works
set :rvm_type, :system
set :rvm_path, '/usr/local/rvm'


Feature Request - Container Scheduling so at least X number of instances are running on these hosts

At present you have the options to schedule where a services containers run based upon either host labels or container labels / names. You can then schedule the service to 'should run' or 'must run' based upon these tags.
In our scenario, we have a number of blade enclosures that contain our rancher hosts. I'd like to tell rancher to ensure that the service is running across both enclosures to ensure my service is resilient to an enclosure failure. This could be a common requirement if you wanted to span racks or perhaps even datacentres. Host labels seem an obvious choice, i'm not sure how it would be best presented through the UI but something along the lines of:
Always run at least one instance of this service on each of the following host labels. ___
This may or may not then affect the scale of the service i guess if you have more host labels than the scale of the service, again not sure how that would be best handled.

Maybee a good way is to add a minimal scale docker instance (under the scale docker).
For exemple you can scale 6 instances for this service and you should there is always at minimal 3 instances online. So if the counter is under 3 it'move on instance in other online node. I think it' can work in addition with host label.
You think it can asnwere of your problem ?

Don't think that would cut it i'm afraid @disaster37
In this scenario we are looking for guarantees that we have resources split across our physical boundaries. Scaling currently won't give us that guarantee plus we would be wasting resources keeping surplus containers online.

You can do soft anti-affinity to a container label to accomplish some of this.  If you add a scheduler rule for "should not have the container label io.rancher.stack_service.name=${stack_name}/${service_name}` then no two containers of the service will go to the same host until there are more instances of it than hosts.  This won't guarantee that they are e.g. in different datacenters though.
The global scale ("always run one container on each host") can also be used to run one (but not more) instance on every host that matches the scheduling rules

Thanks @vincent99 i'll give that a try, still think there would be value as a new feature but that might give us some protection in the meantime.

@vincent99 Just got around to testing this. I ended up using the following format in my docker compose to avoid the variable substitution picking up the values:
io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=stack_name/service_name

this issue is related to https://github.com/rancher/rancher/issues/2590 and this https://github.com/rancher/rancher/issues/2558

I believe we have introduced global scale with x number of containers on each host in the refactoring. @tfiduccia can you test it?

Yes, (but only in 2.0)

Version: 6/26 master (2.0)
Feature has been added to 2.0


Reverse geocoding for Arabic street names

Hi,
I have a problem in the reverse geocoding, I started  Traccar  with Mysql and it is worked , but the data stored at database in the address field have some ????
Example:
LAT:31.941313 LON:35.9534315
The result look like
Al Yarmouk, ?????, Amman, 009626, ??????
can any one support?

Looks like there is some encoding problem. You can try to set database connection encoding to UTF-8:
useUnicode=true&characterEncoding=utf8
You might need to change MySQL server encoding as well.

Hi Anton
where shall I add this code exactly? I tried to do but it did not worked with me

At the end of the database.url parameter in the config file.
So it should look something like this:
<entry key='database.url'>jdbc:mysql://localhost:3306/db?allowMultiQueries=true&useUnicode=true&characterEncoding=utf8</entry>

It worked :)

What version of traccar do you have, and how did you turn on reverse geocoding feature?
thanks

All recent versions support reverse geocoding. As for turning on reverse geocoding, see the config file documentation.

Thanks, it works ok. (use it with google api now)
However, is it possible to configure this to cut/remove the zip code and the country?

Currently it's not possible. If you really need it please create a separate thread for this feature request.

Address formatting has been available for some time now.


fixing missing ipmi import introduced by tpm-metadata

Except for the problem @henn pointed out, this looks good to me. Fix that and I'll approve.

Looks good, +1. (I would hit approve if I could find it on the mobile page...)

I merged this into master to fix the tests.
@kylehogan - could you look into why the test didn't fail even though it was receiving a strange type back? Are they being run properly?

Quoting Jason Hennessey (2017-01-27 16:44:09)

I merged this into master to fix the tests.
[1]@kylehogan - could you look into why the test didn't fail even
though it was receiving a strange type back? Are they being run
properly?

@henn, have a look at the implementation of ModelTest in
haas/test_common.py. The tests do two things;

Make sure the object's repr doesn't explode
Make sure committing the object to the db doesn't explode.

Neither of these things should be affected by returning the wrong
database model, so a false-success here would have been expected. In
this case it just ends up being a duplicate of the Node test.


linkerd-admin: Calculate success rate purely over success + failure

requests is measured in a different place from success and failures. requests counts the number of requests sent, whereas success and failures measure responses received.  Because of this, success can easily be greater than requests, which leads to odd success rate measurements.
This is easily fixed by calculating total requests as success + failure.

[Q] just curious, how could you receive more responses than requests sent?

:star: 📈

:star: :abcd:

@adleong in a let's say we have two time windows: t0 and t1:

In t0, the process sends 1000 request and receives 500 responses.
In t1, the process sends 100 requests, and receives 600 responses.

(Yes, this is a contrived example, but there's no reason this can't happen).

oh right, windows.


Nested multi throws <Redis::CommandError: ERR MULTI calls can not be nested>

While this would indeed be an error on redis-cli, the official redis-rb gem supports it.
 pry(main)> r = Redis.new
=> #<Redis client v4.0.2 for redis://<IP_ADDRESS>:6379/0
 pry(main)> r.multi do
 pry(main)*   r.set('foo', 'bar')
 pry(main)*   r.multi do
 pry(main)*     r.set('foo', 'baz')
 pry(main)*   end
 pry(main)* end
=> ["OK", "OK"]
 pry(main)> r.get('foo')
=> "baz"

Implemented in #151. Thanks @JeffLuckett!


(PUP-4044) Install directly to SUT in install_utils

This commit modifies the helpers in
lib/puppet/acceptance/install_utils.rb to install files directly
onto the target test host rather than installing them locally and
scp'ing them to the host.

CLA signed by all contributors.

This commit needs to be rebased now.

Otherwise :+1:

Rebased on top of 961f842

Can you update the commit message to reflect why this is an improvement? What problem is it fixing?

@MikaelSmith I have amended the commit message. Please let me know if that is satisfactory.

@joshcooper you filed the ticket on this; plan to review it?

closing in favor of: https://github.com/puppetlabs/puppet/pull/3835
which is applied against stable and has some other changes


Cypress/E2E: Fix email verification that works both with current, Cloud and parallel testing (part 2)

Summary
Fix email verification that works both with current, Cloud and parallel testing.
Note: Submitted on top of https://github.com/mattermost/mattermost-webapp/pull/7140 for ease of (code) review.
I'll handle the merging in sequence.

Holding off on merge now based on your comment above :)


Add timestamp field for Logstash & Kibana Visualization

Hey all.  I am trying to have a method of visualizing data from a SQL server using the ELK stack.   I am pulling the output of a SP in SQL into Elasticsearch using this JDBC River.
curl -XPUT 'localhost:9200/_river/report_posting_ops/_meta' -d '{
    "type": "jdbc",
    "schedule": "0 0/15 1-23 ? * *",
    "jdbc": {
            "url": "jdbc:sqlserver://host.example.com:1433;databaseName=dbname",
            "locale": true,
            "user": "dbuser",
            "password": "password@123",
            "sql": [
                    {
                            "callable": true,
                            "statement": "EXEC [Report].[usp_dashboard_operation_posting_trend_15min]"
                    }
                   ],
            "index": "sql_posting_ops",
            "type": "sql_posting_trends"
            }
    }'

And it works great for pulling the SQL reports out of SQL.
This is what the data looks like
{
 "_index": "sql_posting_ops",
  "_type": "jt_sql_posting_trends",
  "_id": "AUyAmhp4CW0VqTsqp8uI",
  "_score": 1,
  "_source": {
     "posting_status": "pending_confirm",
     "day_name": "Friday",
     "day_timeinterval": "2015-04-03 00:45:00",
     "posting_count": 14,
      "average_posting_count": 14,
      "average_posting_day_count": 45
 }

}
The issue is that I would like to create a time-stamped field out of the returned data so that I can crate time-indexed searches / visualizations using Kibana.  This requires something akin to a logstash-event time-stamp or an event field logstash date-filtered time stamp.   I would want to use the "day_timeinterval" field to do this.
Is there any way of using this JDBC river in order to add a timestamp that Kibana would recognize as valid?   Any help or ideas would be greatly appreciated.

You can configure ES date field mapping, like this
#!/bin/sh

/usr/local/mysql/bin/mysql -u root test <<EOT
drop table test;
create table test (
	id integer,
	d text
);
insert into test values (1, '2015-04-03 00:45:00');
EOT

curl -XDELETE 'localhost:9200/_river/my_test_river/'

curl -XDELETE 'localhost:9200/mytest'

curl -XPOST 'localhost:9200/_river/my_test_river/_meta' -d '
{
	"type" : "jdbc",
	"jdbc" : {
		"url" : "jdbc:mysql://localhost:3306/test",
		"user" : "",
		"password" : "",
		"sql" : "select *,id as _id from test",
		"index" : "mytest",
		"type" : "mydocs",
		"index_settings" : { },
		"type_mapping" : {
			  "mydocs" : {
				  "properties" : {
					   "d" : {
							"type" : "date",
							"format" : "yyyy-MM-dd HH:mm:ss"
					   }
				  }
			  }
		}
	}
}
'

echo "sleeping while river should run..."

sleep 5

curl -XGET 'localhost:9200/mytest/_mapping?pretty'

curl -XPOST 'localhost:9200/mytest/_search?pretty' -d '
{
	   "query": {
		  "match_all": {
		   }
	   }
}'

curl -XDELETE 'localhost:9200/_river/my_test_river/'

Much obliged! This makes everything much clearer!   I have these field mappings for my sql_postinog_ops ES index now and they work great!
      "day_timeinterval" : {
        "type" : "date",
        "format" : "yyyy-MM-dd HH:mm:ss"
      },

I swear I knew I was doing something against the grain with my prior course.  Thank you for your quick response!

Hey there.  Sorry to re-open this issue, but I am seeing something very strange with my data now.
It appears that the datetime is being filtered int a valid time interval, but it is 4 hours slow in Kibana.  Take a look here at one kibana event:

Any thoughts on why that could be happening?

Maybe you have to adjust the time zone with the parameter timezone, I do not know what time zone you use in the DB.

We would be using East Cost Standard -5GMT,  Should the stored procedure be altered to include that information, an then we can parse it with the timezone param, as you say.
I do not see anything about the timezone parameter on this documentation for field mapping though
http://www.elastic.co/guide/en/elasticsearch/reference/1.4/mapping-date-format.html
It is the doc I have been referencing for the different kinds of dates as well as for the JODA format.
Can I just use the date math which they show near the top?
IE:
      "day_timeinterval" : {
        "type" : "date",
        "format" : "yyyy-MM-dd HH:mm:ss  + 04h"
      },

Thank you so much for all your help by the way :)

I must correct myself, timezone parameter is for SQL datetime columns only.
Elasticsearch uses UTC timestamps. The stored procedure should be altered to UTC (no timezone) and everything will be fine.

So instead of having a timestamp including a timezone such as
timestamp: 01/01/2015 10:00:00 -05:00

I should have  the SP write time stamp in  UTC? Would the addition of '-05:00' not work?

As I'd imagine it, the JODA format for the time stamp added datetime would look like
MM/dd/yyyy HH:mm:ss Z

If you can not set UTC time, you have to specify a timezone, yes. Joda Z is for timezone without colon, ZZ is for timezone with colon.

Ok, thats great. I think I'll have the SP edited to include a zz timezone.

Hey @jprante
I have made some changes to my stored procedure, or rather the DBA guys did, and am now having a new issue.
The new timestamp format coming out of SQL looks like this:
2015-03-08 02:00:00 EST
As per the Joda documentation, I assumed that the 'z' character would match this pattern:
```z: time zone:                   text :         Pacific Standard Time; PST````
However, when I use a field mapping for my timestamp field like this:
            "type" : "date",
            "format": "yyyy-MM-dd HH:mm:ss z"
          }, ```

I get a pretty nasty "Illegal instant" Exception:

org.elasticsearch.index.mapper.MapperParsingException: failed to parse [day_timeinterval]
at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:416)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeValue(ObjectMapper.java:709)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:500)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:542)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:491)
at org.elasticsearch.index.shard.service.InternalIndexShard.prepareCreate(InternalIndexShard.java:392)
at org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:444)
at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:150)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:512)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:419)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.index.mapper.MapperParsingException: failed to parse date field [2015-03-08 02:15:00 EST], tried both date format [yyyy-MM-dd HH:mm:ss z], and timestamp number with locale []
at org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:621)
at org.elasticsearch.index.mapper.core.DateFieldMapper.innerParseCreateField(DateFieldMapper.java:549)
at org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:235)
at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:406)
... 12 more
Caused by: org.elasticsearch.common.joda.time.IllegalInstantException: Cannot parse "2015-03-08 02:15:00 EST": Illegal instant due to time zone offset transition (America/New_York)
at org.elasticsearch.common.joda.time.format.DateTimeParserBucket.computeMillis(DateTimeParserBucket.java:390)
at org.elasticsearch.common.joda.time.format.DateTimeFormatter.parseMillis(DateTimeFormatter.java:749)
at org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:615)```
Do you have any suggestions for how to handle this?  Would the ZZ / Z pattern solve this issue if the  stored procedure were changed?

You are referencing a datetime that does not exist due to daylight savings time changes.
Valid is 2015-03-08 01:59:59 EST, the next second is 2015-03-08 03:00:00 EST


Fix "loss_bbox" assert

When training with small batch sizes the assertion statement assert pred.size() == target.size() and target.numel() > 0 in the smooth_l1_loss and balanced_l1_loss loss functions will sometimes be triggered because none of the proposals in the whole batch corresponds to an object and thus the number of valid bbox_targets is 0 (hence target.numel() = 0`). This will break the training, which could otherwise resume normally.
I see two ways of fixing this:

Remove the target.numel() > 0 assertion statement. This will cause the loss functions to return an empty tensor tensor([], device='cuda:0', size=(0, 4), grad_fn=<SWhereBackward>) which will be turned into a nan when taking the mean in parse_losses in mmdet/api/train.py. I guess the assertion was added to avoid this nan, however in my experiments this was fixed somewhere downstream, such that the nan created no problems and training resumed normally.

Add an if statement if pos_inds.any(): in the BBoxHead modules loss function. Then if in one step no proposal covers any ground truth box losses['loss_bbox'] will not be created and it will automatically be ignored in parse_losses in mmdet/api/train.py.

I'd suggest using the second option, as it is cleaner and avoids potential problems if for any reason the downstream handling of the nan loss should fail in the future.

And it does not work.
The second fix leads to some errors when gathering results from multiple gpus. Guess this did not show up before because I tested the fix on a single gpu.

It would be great if this could be fixed at some point. I guess until then I will simply remove the assertion statement target.numel() > 0 but this is not a valid solution in the long term. Any suggestions how else this could be fixed?

Hey @michaelisc, did you figure out a solution to this? I've faced this issue as well.
Removing the assertion and allowing NaNs to propagate might lead to errors that will be hard to track...!

No. Sorry. I just accepted the NaNs because they only showed up in one experiment I have been doing.


An operation is taking longer than expected

After mounting successfully the app and listing all my files at the root, I see this error message.

@beaufortfrancois How many files does your root directory have? And, could you capture the console output in the DevTools at the time?

I just figured out it occurs when Background page comes inactive and I launch the files.app again. Here's my JS console log:
onGetMetadataRequested: thumbnail=false
dropbox_fs.js:89 Object
extensions::uncaught_exception_handler:8 Error in event handler for fileSystemProvider.onGetMetadataRequested: TypeError: Cannot read property 'getMetadata' of null
    at DropboxFS.onGetMetadataRequested (chrome-extension://innelajgegmmacdlfnbceflcodcimonk/dropbox_fs.js:90:25)
    at null.<anonymous> (chrome-extension://innelajgegmmacdlfnbceflcodcimonk/dropbox_fs.js:197:14)
dropbox_fs.js:88 onGetMetadataRequested: thumbnail=false
dropbox_fs.js:89 Object
extensions::uncaught_exception_handler:8 Error in event handler for fileSystemProvider.onGetMetadataRequested: TypeError: Cannot read property 'getMetadata' of null
    at DropboxFS.onGetMetadataRequested (chrome-extension://innelajgegmmacdlfnbceflcodcimonk/dropbox_fs.js:90:25)
    at null.<anonymous> (chrome-extension://innelajgegmmacdlfnbceflcodcimonk/dropbox_fs.js:197:14)
background.js:16 Resumed
dropbox_fs.js:88 onGetMetadataRequested: thumbnail=false
dropbox_fs.js:89 Object
dropbox_fs.js:88 onGetMetadataRequested: thumbnail=false
dropbox_fs.js:89 Object
dropbox_fs.js:88 onGetMetadataRequested: thumbnail=false
dropbox_fs.js:89 Object

Will go deeper and let you know.

OK. So here's a simple fix that is obviously not enough:
  DropboxFS.prototype.onGetMetadataRequested = function(options, successCallback, errorCallback) {
    console.log("onGetMetadataRequested: thumbnail=" + options.thumbnail);
    console.log(options);

    // Resume first!
    this.resume(function() {

      this.dropbox_client_.getMetadata(
        options.entryPath, options.thumbnail, function(entryMetadata) {
          successCallback(entryMetadata);
        }.bind(this), errorCallback);
    }.bind(this));
  };

@beaufortfrancois Hmm... Yes, your code (add the resume() call) will work, but I guess that this way is not good. Well, I think that this root reason is that onGetMetadataRequested event occurs before completing of the resuming process. That is, each event listener for FSP should be registered after completing of mounting or resuming process. Currently, when the background context is loaded, then the event handlers are registered. I guess that this timing is bad.

@beaufortfrancois I could not reproduce this issue... Do you have steps to reproduce this issue completely?

Let me know if I can help furthermore.

Sorry, I have a fever (39.1 degree)...

@beaufortfrancois Haha, thanks. I thought a good solution to fix this issue, as the result, I decided that your idea is better. I just created the pull request, and it will be maged, if you confirm it. https://github.com/yoichiro/chromeos-filesystem-dropbox/pull/6

Sorry, I just merged #6 diff to the master branch. If you find any issue, feel free to let me know that.

Just rebased and this is working great! Nice work @yoichiro!


Fix typo Update README

Fix typo Update README

Summary by CodeRabbit

Documentation

Corrected the reference from "SHA-512" to "SHA-2" in the README file for improved accuracy.

Take a look at the pull request


Potentially improper handling of multiple Set-Cookie in HTTP response

Using tracy-windows-4.0-amd64.exe.zip , I did look at the commits since release but couldn't see anything referencing HTTP response handling, HTTP headers, or cookies.
I've used Tracy for a few engagements and am just doing some training for new colleagues at work. I've set up DVWA and Tracy to show an example of injecting XSS indicators and tracking them in the Tracy framework. DVWA has a security level which is controlled by the "security" cookie, and a session ID "PHPSESSID".
I noticed that routing through Tracy, I cannot change the security level of the application from Low, Medium, High, or Impossible.
Having a look at Wireshark, I can see the following:
46	120.511468	192.168.X.X	192.168.X.Y	HTTP	132	POST /DVWA/security.php HTTP/1.1  (application/x-www-form-urlencoded)
[...]
HTML Form URL Encoded: application/x-www-form-urlencoded
    Form item: "security" = "high"
    Form item: "seclev_submit" = "Submit"
    Form item: "user_token" = "01a328956934173e21b1a4bdba954fdb"

and the response:
49	120.512861	192.168.X.Y	192.168.X.X	HTTP	485	HTTP/1.1 302 Found
[...]
Set-Cookie: PHPSESSID=aj7jekt7i7214cv21ptvvp9ej3; path=/\r\n
Set-Cookie: security=high\r\n

The response in the browser however is missing the second Set-Cookie for the security level. The following is taken from the Network tab in Developer Tools in Firefox.
HTTP/1.1 302 Found
Cache-Control: no-store, no-cache, must-revalidate
Connection: Keep-Alive
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Date: Wed, 15 May 2019 07:02:34 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=100
Location: /DVWA/security.php
Pragma: no-cache
Server: Apache/2.4.29 (Ubuntu)
Set-Cookie: PHPSESSID=aj7jekt7i7214cv21ptvvp9ej3; path=/

If I bypass the Tracy proxy, the HTTP requests to and from the server are identical in Wireshark, and the correct Set-Cookie header is seen in the Firefox network tab, and the security level changes as it should do.
Could this indicate some mis-handling of multiple Set-Cookie headers by Tracy? It seems odd that the Go proxy is not as transparent as to remove headers from the response. Unfortunately I'm in a corporate Windows environment, and so it's difficult to build Tracy from source, I'll spin up a Linux VM and see if I can get any further as time permits.

I've tested this with a minimal http server in Go:
package main

import (
        "fmt"
        "time"
        "net/http"
)
func main() {
        http.HandleFunc("/", func (w http.ResponseWriter, r *http.Request) {

                addCookie(w, "test1", "123")
                addCookie(w, "test2", "456")
                fmt.Fprintf(w, "Welcome!")
        })

        http.ListenAndServe(":9999", nil)
}

func addCookie(w http.ResponseWriter, name, value string ) {

        expire := time.Now().AddDate(0, 0, 1)
        cookie := http.Cookie{
                Name: name,
                Value: value,
                Expires: expire,
        }
        http.SetCookie(w, &cookie)
}

Response from standard connection to server:
HTTP/1.1 200 OK
Set-Cookie: test1=123; Expires=Wed, 15 May 2019 14:39:23 GMT
Set-Cookie: test2=456; Expires=Wed, 15 May 2019 14:39:23 GMT
Date: Tue, 14 May 2019 14:39:23 GMT
Content-Length: 8
Content-Type: text/plain; charset=utf-8

Response routed through Tracy:
HTTP/1.1 200 OK
Content-Length: 8
Content-Type: text/plain; charset=utf-8
Date: Tue, 14 May 2019 14:37:23 GMT
Set-Cookie: test1=123; Expires=Wed, 15 May 2019 14:37:23 GMT

Thanks for reporting this issue. I can't be leave we never ran into this before.
It looks like at https://github.com/nccgroup/tracy/blob/master/proxy/proxy.go#L690 we only copy the first value out of the key. So, if it's set-cookie only the first set-cookie will be in the header.

I think it's because there aren't many http response headers that have duplicates in an http response and I was just being silly. but great catch @knodesec! I'll merge this now. Also, if you need any help with Tracy for your training, let us know and we would be happy to help. Always looking for more adoption.

Fixed in 1820a9c

@knodesec if you would like me to build you a fresh binary with the new changes, shoot me some contact information and I can get that to you. Otherwise, I push a new release here in a little bit.

I'm OK with waiting for an upcoming release, thanks for the quick response and fix.

@knodesec a new release has been pushed. Please check it out and verify that it fixes the issue for you.


Persistent attachments in Mailable

Laravel Version: 5.8.* & 6.7.*
PHP Version: 7.3.10
Database Driver & Version: MariaDB 10.4.8

Description:
If you run render() prior to sending the email, it will double the attachments.
Steps To Reproduce:
namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Storage;

class RegisterReminder extends Mailable
{
    use Queueable, SerializesModels;

    public function __construct() {}

    public function build()
    {
        return $this->from( [
            'address' => config( 'mail.from.address' ),
            'name'    => config( 'mail.from.name' ),
        ] )
                    ->view( 'mail.patient.reminder' )
                    ->subject( 'Some reminder with attachments' )
                    ->attach( Storage::disk( 'resources' )->path( 'pdf-with-something.pdf' ), [
                        'as'   => 'PDF With Something.pdf',
                        'mime' => 'application/pdf',
                    ] );
    }
}

use App\Mail\RegisterReminder;
use Illuminate\Support\Facades\Mail;

// Generate new email
$mailTemplate = new RegisterReminder();

// Obtain the content of the mail, for other purposes.
$mailContent = $mailTemplate->render();

// Add mail to the queue
Mail::to<EMAIL_ADDRESS>)
    ->queue( $mailTemplate->onQueue( 'emails' ) );

Result:
One email with 2 attachments (both same name / content)
Expected:
One email, with one attachment
However, if you comment out $mailContent = $mailTemplate->render();, you'll receive the same email but with only one attachment.
Note: it does not matter if I send the mail via a database queue, or send the mail directly. Both methods provide two attachments if the email is rendered before sending, and one attachment if it is not rendered.
Note: diskAttachments, rawAttachments, callbacks will most likely behave the same as attachments.
I think it would make sense if these array variables are cleared in e.g. render()

This is because both the render and send method of the Mailable will call Container::getInstance()->call([$this, 'build']);. So when you first render the mailable and later send it it'll call it twice and everything that happens inside the build method will happen twice. There can only be one from, one view and one subject so those don't get duplicated, just overwritten. But the attach method will attach the pdf again a second time and thus it'll appear twice when sending.
First question: is there anything preventing you from calling $mailContent = $mailTemplate->render(); after the mailable's been sent? In that case you won't get the issue I suspect.
Second consideration is wether this is a bug at all. We could clear out all things set in the build method before calling Container::getInstance()->call([$this, 'build']); in send and render but that would be a little unpractical and perhaps even unwanted in some occasions.
One other thing you can do is to reset the attachment array in the build method. I think this will be the easiest solution for now.
    public function build()
    {
        $this->attachments = [];

        return $this->from( [
                'address' => config( 'mail.from.address' ),
                'name'    => config( 'mail.from.name' ),
            ] )
            ->view( 'mail.patient.reminder' )
            ->subject( 'Some reminder with attachments' )
            ->attach( Storage::disk( 'resources' )->path( 'pdf-with-something.pdf' ), [
                'as' => 'PDF With Something.pdf',
                'mime' => 'application/pdf',
            ] );
    }

Resetting the attachments in the build was the solution I went with. My reason for running render prior to send ceased to exist when I switched to queuing the mails, but would also work.
However, I can't think of any reason why someone would want to have the same attachment twice in the same email; it is unexpected behaviour. Thus I stick with it being a bug and I think resetting all (array) variables prior to rendering is the best option.
I expected the below example to increase the amount of attachments on each run, however it did not...
$mt = new RegisterReminder();
for( $i=1; $i<10; $i++ ) {
    Mail::to( User::find( $i )->email )->queue( $mt->onQueue( 'emails' ) );
}

Instead, it sent the first mail to user 1, the second email to both user 1 and 2, and the 3rd to user 1,2 and 3, etc.

@JBtje we've added a fix which will prevent adding duplicate files: https://github.com/laravel/framework/commit/3c8ccc2fb4ec03572076e6df71608f6bbb7d71e1
Thanks for reporting.


Requesting API from mobile.twitter.com domain blocked by Chrome

Running TBC from mobile.twitter.com is blocked with this console message:

Cross-Origin Read Blocking (CORB) blocked cross-origin response  with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details.

seems changes on Chrome prevents ajax request. https://www.chromium.org/Home/chromium-security/extension-content-script-fetches
running in twitter.com domain (with new UI) works normally. also, running in Firefox works normally. (both twitter.com and mobile.twitter.com)

Hi @gaeulbyul 💙! Can you see if this works? https://github.com/satsukitv/twitter-block-chain/pull/32

Great! It works well! :+1:  :blue_heart:

sweet thank you!!! just uploaded the new version.


Support for parameters after rest parameters

I want to be able to do this:
function promisify(fn: (...args: Array<mixed>, cb: (error: mixed, result: mixed) => mixed)) {
  return (...args) => new Promise((resolve, reject) => {
    fn(...args, (error, result) => {
      if (error) reject(error);
      else resolve(result);
    });
  });
}

But this is currently unsupported by Flow. Are there any other options other than making different signatures and then making an intersection of them?

While this could be useful for function types, it's not supported by Ecmascript, so it would hard to implement such a type, i. e. this:
function fn (...args: Array<mixed>, cb: (error: mixed, result: mixed) => mixed) {}

is invalid

It's not invalid (at least in Babel). I've implemented such function here.

You're right, it is unsupported by Ecmascript. Still, it could describe valid function signatures without having to do this:
(arg1: mixed, cb: (error: mixed, result: mixed) => mixed) & (arg1: mixed, arg2: mixed, cb: (error: mixed, result: mixed) => mixed) & ...

If it's unsupported by Ecmascript, could it be still implemented in Flow?

This is not allowed in ECMAScript and we are not going to implement it until it is in ECMAScript since we don’t add language features. Only type annotations.


not possible to geht javascript snippet

Hey,
the way like described in https://docs.microsoft.com/en-us/azure/application-insights/app-insights-javascript#add-the-sdk-script-to-your-app-or-web-pages is not possible anymore. I can not find the snippet under "getting started" where I can get the snippet from to put it into my one page application?
Is there a best practice way to use application insights for react applications which are compiled to only HTML/js files?

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

ID: d56ecb14-9e66-5313-a381-d2824ec3d1e2
Version Independent ID: ff056ac8-ae76-be10-6895-757333a28e05
Content: Azure Application Insights for JavaScript web apps
Content Source: articles/application-insights/app-insights-javascript.md
Service: application-insights
GitHub Login: @mrbullwinkle
Microsoft Alias: mbullwin

Thanks for reporting! I have assigned the issue to the author to investigate and update as appropriate.

@aumanjoa When I go to "Getting Started" then click on "Monitor and Diagnose Client Side application" I see the script there. Is that what you were looking for ?

Please finde here my screenshot of the "getting Started" if I select ApplicationInsichts for Node.js

Please finde here my screenshot of the "getting Started" if I select ApplicationInsichts for "General"

#in-process

@aumanjoa Thank you for the screenshots it helps a lot.
The UI experience varies slightly based on the Application Type selection. Since your Application Insights resource is of the Application Type Node.js your Getting started experience is different than if an alternate application type were selected.
So it looks like at some point between when the doc was originally authored we changed the underlying UI experience for the Node.js app type Getting started, but left it the same for the other app types, and didn't properly update the docs to reflect the change.
This is why @cecilphillip commented that he was not seeing an issue as he likely tested with an App Type of .NET.
At the moment, under the hood App Type selection has little to no impact on monitoring of the underlying app with App Insights. So you could technically select an App Type  of .NET and then successfully instrument a Node.js app. The only substantial change as of today is certain options get lit up in the UI based on the features that particular App Type's SDK supports. (This of course may change in the future.)
I will update the docs to properly reflect the changes in the UI for that app type. Thank you so much for bringing this to our attention!
In the meantime, the code you are looking for is below, just swap in your instrumentation key and you should be good to go.
<!--
To collect end-user usage analytics about your application,
insert the following script into each page you want to track.
Place this code immediately before the closing </head> tag,
and before any other scripts. Your first data will appear
automatically in just a few seconds.
-->
<script type="text/javascript">
var appInsights=window.appInsights||function(a){
  function b(a){c[a]=function(){var b=arguments;c.queue.push(function(){c[a].apply(c,b)})}}var c={config:a},d=document,e=window;setTimeout(function(){var b=d.createElement("script");b.src=a.url||"https://az416426.vo.msecnd.net/scripts/a/ai.0.js",d.getElementsByTagName("script")[0].parentNode.appendChild(b)});try{c.cookie=d.cookie}catch(a){}c.queue=[];for(var f=["Event","Exception","Metric","PageView","Trace","Dependency"];f.length;)b("track"+f.pop());if(b("setAuthenticatedUserContext"),b("clearAuthenticatedUserContext"),b("startTrackEvent"),b("stopTrackEvent"),b("startTrackPage"),b("stopTrackPage"),b("flush"),!a.disableExceptionTracking){f="onerror",b("_"+f);var g=e[f];e[f]=function(a,b,d,e,h){var i=g&&g(a,b,d,e,h);return!0!==i&&c["_"+f](a,b,d,e,h),i}}return c
  }({
      instrumentationKey:"<your instrumentation key>"
  });

window.appInsights=appInsights,appInsights.queue&&0===appInsights.queue.length&&appInsights.trackPageView();
</script>

In answer to your second question, we don't currently offer specific best practice guidance around instrumenting  React.js based apps, but if there is enough customer interest it is certainly something we would explore documenting in the future.

@aumanjoa
We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.


KBFS; fuse device not found

after running run_keybase, I cloudn't find any subfolders but /keybase folder. I took a look keybase.kbfs.log and found fuse error.
my log id: 5aca1bf9c5327525bcf9811c

seems same as #2202, mine is Arch linux.

Restarting OS fixed this problem; I guess the problem was that kernel hadn't loaded fuse module. However,  following error persists:
2016-08-01T15:36:54.599044 ? [WARN kbfs connection.go:518] 15c MDServerRemote: connection error: "dial tcp 54.164.100.***:443: getsockopt: connection timed out"; retrying in 1m25.619208215s

This might be the problem of my proxy. The result was frozen terminal and error like could not open ".": System call interuption when press C-c (sorry, it might be not precise, due to my translated error messages).

Hi @imunolion, thanks for the report.  Can you successfully ping mdserver.kbfs.keybase.io from behind your proxy?  How about telnet mdserver.kbfs.keybase.io 443?

Ping and Telnet both timeouts with my corporate proxy. Seems simply blocked. My two suggestion:

writing this limitation for KBFS clearly. At first glance, I will think, "hey, its a file system, why doesn't work with proxy!!". Of cause, its a network file system, this behavior is natural.

setting proper time out(or retry limmit) for KBFS. At least it shouldn't hang users terminal. It will be critical for users using neither X nor terminal multiplexer.