Windows Support

This may be as simple as importing and initializing colorama.
import colorama
colorama.init()

Ah, sorry, I just saw this now. I'm afraid I don't have a Windows machine, but any PRs for this would be welcome!

It seems that this is resolved with #7. Should this be closed now?

I can confirm tbvaccine works fine on Windows 10 x64

Yep, thank you! Can I ask how you found TBVaccine? I'm getting lots of comments today.

Personally I was waiting for my ModernGL release to appear on the pypi list
I was browsing random packages while waiting. I opened tbvaccine as well. I found it really really useful for my development.

@skorokithakis I have noticed your issue with a suggestion of merge with better-exceptions project on their issue tracker, and since I have had an issue with better-exceptions working with Dask Distributed, I decided to give TBVaccine a try. BTW, TBVaccine worked OK, though the extra information doesn't seem to be sane/helpful #11.

I see, thank you! I'll get to #11 soon, although I don't use Distributed, so if you could take a look and see why it might be reporting weirdness, it would really help.

@skorokithakis Unfortunately, I don't have time at the moment, and to be honest, it is not a showstopper for me, so I am not sure I will be able to spend some time on digging into it soon. I reported the bug only with a hope that it will help you to improve TBVaccine (it might be that Dask case is not very specific and it only helped to identify a potential problem).
Cheers!

Ah, that's fine, thank you. The exception-getting code is pretty straightforward, so I don't think it's a general problem. It's more likely that Dask is doing something weird with exceptions, but I'll have a look anyway, just in case.


calculator selection via args

In line with the command line argument:
data_weight=0
we want to have one for qm calculator, e.g. default:
calculator=gaussian

Running qm calculation by wrapper is a temporary choice.
now some people are using gaussian, we add gaussian as a calculator.
later people want to use NWCHEM or ADF, then we need to add NWCHEM or ADF as a calculator.
Then our code QR is affected by the QM software people are using.
P.S The tight integration will be our focus as we have discussed and agreed. we may choose a python qm software, like PyQuante or Serenity, after we get nice result from p26 calculation.

I agree with what you say, but we can support this ASE integration with a calculator chosen as a command line argument in the meantime. I will at this later today.


Input manager refactor

Description
PR makes changes to the handling of inputs, refactoring the code-base, and changing all database calls to pythonic versions, inline with upcoming conda recipe changes. It prepares commec for the json output update.
Tested in fast mode, and unit tests, requires testing with proper blastn / blastx / and diamond databases on AWS before merging.
Restructured code base into modular file system

config: Contains input and output related parameters and configurations. Including the configuration of default settings for each database being called.
screeners: contains the logic for checking the outputs of database calls. Currently in a state where further refactoring is required to take some logic out of screen.py, and put into the check_*.py files.
tests: Contains all relevant unit test information.
tools: Contains handlers for all databases used, as well as generic tools used for general database parsing, such as BlastTools.
utils: Currently contains orphaned scripts, and static library of file tools, all of which is planned to be folded into other parts of the code base.
screen.py
split.py
flag.py
cli.py

Major changes

entry point renamed to cli.py to reflect its function.
environment.yml updated to ensure that diamond 2.1.9 is used for diamond based searches.
Added database handlers, with deal with managing the directory, file, input and output, and command line calls of all database calls for hmm, cmscan, diamond, blastx, blastn etc.
Added unit tests for databases, and IO parameters
Added IO parameter class to hold and parse all input information, and serve as general hub of input and parsed user settings/configurations.
Updated screen_database.py to use the database handler tools, and defaults for how databases are called.
Default user imports are now set within the ScreenInputParameters dataclass, and are used as defaults when declaring arguments in screen.py to remove double hard-coding.

Issues:

Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] Refactor (non-breaking change to code or documentation which should not change functionality)

Commit made to address previous comments and issues.

Running on my AWS instance, I got the following output to start off:
commec screen ./false-positive-fastas/TN_108.fasta -t 8 -d /home/ec2-user/cm-dbs/ -o ./refactor-false-positives/
 Validating Inputs...
Translate nucleic acid sequences
 Validating Inputs...
Bad database file!
Bad database file!
>> STEP 1: Checking for biorisk genes...
        ...running hmmscan
        ...checking hmmscan results
                 --> Biorisks: no hits detected, PASS

 STEP 1 completed at 2024-09-06 02:39:30
 >> STEP 2: Checking regulated pathogen proteins...
        ...running blastx

in a case where I am fairly confident the database file is not bad, since I just used it for other screening. Can we modify this to:

Validate databases before translating the input query
More descriptively log which database file is bad, and how (e.g. directory doesn't exist? file not found?)
Abort the run if a database is bad

Addressed previous comments and suggestions in latest series of commits. See change logs =)


Order t-shirts

Place the order for event t-shirts.

Price $6/shirt - 200 participant and 24 organizers


opencomposite: unstable-2024-02-05 -> unstable-2024-02-16

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for opencomposite is: Reimplementation of OpenVR, translating calls to OpenXR
meta.homepage for opencomposite is: https://gitlab.com/znixian/OpenOVR
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found unstable-2024-02-11 in filename of file in /nix/store/rfbxdbyc9kx7prrplsj71a7hj6rh2wig-opencomposite-unstable-2024-02-11

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath
opencomposite
opencomposite-helper

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/rfbxdbyc9kx7prrplsj71a7hj6rh2wig-opencomposite-unstable-2024-02-11 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A opencomposite https://github.com/r-ryantm/nixpkgs/archive/6a2bdf5a8f9d0ef7cbeac46fa380abc93a5440fd.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/6a2bdf5a8f9d0ef7cbeac46fa380abc93a5440fd#opencomposite

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/rfbxdbyc9kx7prrplsj71a7hj6rh2wig-opencomposite-unstable-2024-02-11
ls -la /nix/store/rfbxdbyc9kx7prrplsj71a7hj6rh2wig-opencomposite-unstable-2024-02-11/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages built:

opencomposite
opencomposite-helper

Maintainer pings
cc @Scrumplex for testing.

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for opencomposite is: Reimplementation of OpenVR, translating calls to OpenXR
meta.homepage for opencomposite is: https://gitlab.com/znixian/OpenOVR
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found unstable-2024-02-16 in filename of file in /nix/store/kza4lhh54b701zd6j3ya482gakqiizq6-opencomposite-unstable-2024-02-16

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath
opencomposite
opencomposite-helper

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/kza4lhh54b701zd6j3ya482gakqiizq6-opencomposite-unstable-2024-02-16 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A opencomposite https://github.com/r-ryantm/nixpkgs/archive/39c261e380094a722242060fd6d90c6948421972.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/39c261e380094a722242060fd6d90c6948421972#opencomposite

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/kza4lhh54b701zd6j3ya482gakqiizq6-opencomposite-unstable-2024-02-16
ls -la /nix/store/kza4lhh54b701zd6j3ya482gakqiizq6-opencomposite-unstable-2024-02-16/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' run on x86_64-linux 1

2 packages built:

opencomposite
opencomposite-helper

Maintainer pings
cc @Scrumplex for testing.


How to construct the linear form ( Q, \nabla v) for a given MatrixCoefficient Q and vector-valued v?

Hi,
I need to construct the linear form (Q , \nabla v) := \int_\Omega \sum_{i,j=1}^d Q_ij * dv_i/dx_j, where Q is a given MatrixCoefficient and v are (H^1)^d FE trial functions. I did not find this linear form in the list on the MFEM website and in the documentation.
Is this linear form already implemented in mfem?

I don't think this is implemented yet. It should be relatively easy to add, with implementation very similar to DomainLFGradIntegrator: https://github.com/mfem/mfem/blob/5b81176e18b5cb42ca63adfc984928df07cce1e7/fem/lininteg.hpp#L122-L123

Ok, this is my version of VectorDomainLFGradIntegrator:
class VectorDomainLFGradIntegrator : public mfem::LinearFormIntegrator
{
  private:
    mfem::MatrixCoefficient *Q;
    mfem::DenseMatrix dshape;
    mfem::DenseMatrix Qmat;

  public:
    VectorDomainLFGradIntegrator(mfem::MatrixCoefficient *Q_, const mfem::IntegrationRule *ir = NULL)
      : mfem::LinearFormIntegrator(ir), Q(Q_) { };

    virtual void AssembleRHSElementVect(const mfem::FiniteElement &el,
                                        mfem::ElementTransformation &Tr,
                                        mfem::Vector &elvect)
    {
      int vdim = Q->GetVDim();
      int dof  = el.GetDof();

      dshape.SetSize(dof, vdim);
      elvect.SetSize(dof*vdim);
      elvect = 0.0;

      double val1,val2;

      const mfem::IntegrationRule *ir = IntRule;
      if (ir == NULL)
      {
        int intorder = 2*el.GetOrder();
        ir = &mfem::IntRules.Get(el.GetGeomType(), intorder);
      }

      // loop over quadrature points
      for (int i = 0; i < ir->GetNPoints(); i++)
      {
        const mfem::IntegrationPoint &ip = ir->IntPoint(i);

        Tr.SetIntPoint(&ip);
        val1 = Tr.Weight() * ip.weight;

        el.CalcPhysDShape(Tr, dshape); // el_(i,j) = d phi_i / dx_j evaluated in physical space at point described by Tr
        Q->Eval (Qmat, Tr, ip); // Evaluate Q at ip

        // loop over spatial components
        for (int k = 0; k < vdim; k++)
        {
          // loop over shape functions
          for (int s = 0; s < dof; s++)
          {
            val2 = 0.0;
            // contribution of the kth component of shape function s: \sum_p=1^vdim  Q_kp * dphi_s / dx_p
            for (int p = 0; p < vdim; p++)
            {
              val2 += Qmat(k,p)*dshape(s,p);
            }
            elvect(dof*k+s) +=  val1 * val2; // += ip.weight * Tr.Weight() * \sum_p=1^vdim  Q_kp * dphi_s / dx_p
          }
        }
      }
    };

    using mfem::LinearFormIntegrator::AssembleRHSElementVect;
};

I tested it by choosing a vector function u, where I can calculate \nabla u by hand.  Afterwards, I compared the distance of the trueDof vectors F and Au to each other and it is always less than 1e-13 for different element orders and mesh refinements.


Better UI to make it feel modern

Use Materialize CSS to enhance the components used in the website like buttons, hover effect, etc.

Hey, I'm a UX/UI Designer & Developer I would like to work on this issue.

Hey, I'm a UX/UI Designer & Developer I would like to work on this issue.

Sure, feel free to contribute


FUIAuthBaseViewController_Internal.h not found

After having seen that the swift package manager is now supported on the latest master commit, I wanted to give it a go. Unfortunately, the FUIAuthBaseViewController_Internal.h cannot be found during build (and clean build).
Following screenshot shows the error:

Thanks for filing, the issue should now be fixed.


Cesium3DTileFeature doesn't use the first parameter

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/Cesium3DTileFeature.js#L46
The first parameter for Cesium3DTileFeature is a tileset, but this parameter isn't used anywhere

This is fixed in https://github.com/AnalyticalGraphicsInc/cesium/pull/4665, so we could just wait until that's merged.

Cool, thanks @lilleyse.  I just opened this issue because I wasn't sure if anyone else caught it.


Support Proxy protocol to allow Rancher to run behind ELB

In order to support putting Rancher behind an ELB, we must support the Proxy protocol.
This is because ELB does not support websockets when ran in http(s) mode.
Here's a link to the protocol: http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt

Note that this is different than #1554. That issue is dealing with the Rancher LB service, not the configuration of Rancher itself.

+1 for this

We support proxy protocol now and Rancher behind ELB supporting only proxy protocol would work fine now.


Implement jax.numpy.argpartition

Fixes https://github.com/google/jax/issues/2079

With this I think we can close Issue #70!!


Provide "routeId" as prop to top level route component

Describe the problem
Sometimes when you're using beforeNavigation and afterNavigation you want to know if you're arriving at or leaving the current page. Let's make a hypothetical app with two routes, where A route has some changes you can make you'd want to confirm before abandoning.
/routes/a/+page.svelte
/routes/b/+page.svelte
In the former we could have something like this:
<script>
  import { beforeNavigate } from '$app/navigation';

  beforeNavigate(({from, to, cancel}) => {
    if (to.routeId != 'a' && dirty) {
      cancel();
      alert('Save changes before leaving');
    }
  });

It's unfortunate to have to hard code the routeId. There is $page.route but that's not the "lexically" current route, i.e. it will update as soon as you've navigated.
Would it make sense to pass a prop for routeId into the component for comparison? Then the code would look like:
<script>
  import { beforeNavigate } from '$app/navigation';

  export let routeId;

  beforeNavigate(({from, to, cancel}) => {
    if (to.routeId != routeId && dirty) {
      cancel();
      alert('Save changes before leaving');
    }
  });

Describe the proposed solution
See above.
Alternatives considered
Maybe checking if the routeIds are the same on to/from is good enough, like to check for leaving the page it could be something like:
beforeNavigate(({from, to, cancel}) => {
  if (from.routeId != to.routeId) {
    // leaving page
  }
});

Because when arriving at the page the "beforeNavigate" won't have been registered yet.
I think this logic would run afoul of the non-local transitions extending the page lifecycle though.
Importance
nice to have
Additional Information
No response

You're right that from.route.id !== to.route.id is sufficient (side-note: routeId was replaced with route.id in #7450), for both beforeNavigate and afterNavigate. Given that, I don't think there's all that much value in adding a prop, when it would only apply to pages (not layouts) and you'd have to manually pass it down to components below the route component.

I think this logic would run afoul of the non-local transitions extending the page lifecycle though.

Not sure I follow?

Ah, I see. Oof. The fact that afterNavigate can be called on the page we just left is a bigger bug than any potential confusion around route IDs, albeit not one I'm sure that we can solve. I think we probably want to discourage non-local out transitions altogether, as they're somewhat problematic. That whole area is due for a rethink when Svelte 4 comes along.
So I don't think it changes the equation — you always have the option of hardcoding the route ID, and if we get round to making the type of route.id an enum that only includes the routes in your app then I reckon we're covered.

Sounds good. Let me close.


STOR-1119, STOR-751: CSI migration for vSphere and Azure file are GA

CC @openshift/storage

/jira refresh

/assign @gnufied

/lgtm

For reviewers, this would be nice to have before rebase to Kubernetes 1.26 lands. The feature gates are beta (enabled) in upstream Kubernetes 1.25 and we disable them in 4.12 via these feature gates. They are GA in 1.26 and cannot be disabled there. Using them as --feature-gate on cmdline results in warnings.

CSI migration for vSphere and Azure File are currently Tech Preview, so we can use related jobs to confirm the feature is working:
vSphere

https://testgrid.k8s.io/redhat-openshift-ocp-release-4.12-informing#periodic-ci-openshift-release-master-nightly-4.12-e2e-vsphere-ovn-techpreview
Generic ephemeral tests should be fixed with https://github.com/openshift/origin/pull/27588. Waiting for a job run that confirms that.

Azure File

https://testgrid.k8s.io/redhat-openshift-ocp-release-4.12-informing#periodic-ci-openshift-release-master-ci-4.12-e2e-azure-sdn-techpreview
Azure File tests are passing, job is failing for unrelated reasons.

Placeholder PRs to bump openshift/api:
KCM operator: https://github.com/openshift/cluster-kube-controller-manager-operator/pull/672
Apiserver operator: https://github.com/openshift/cluster-kube-apiserver-operator/pull/1414
Scheduler operator: https://github.com/openshift/cluster-kube-scheduler-operator/pull/450
MCO: https://github.com/openshift/machine-config-operator/pull/3443
Because of the carry-patches we have in k/o, the ordering which these PRs merge doesn't matter much, but we will merge MCO last because to make the operation more atomic (Attach Detach Controller (KCM) will effectively enable the CSI migration only after the Kubelet does that).

Thanks @bertinatto @jsafrane for the additional context, you may merge this when you are ready
/approve

/label docs-approved
/label px-approved

/label qe-approved
This is required to merge for the k8s 1.26 rebase.


BitmapText now reset texture unit on flush

Fixes a bug

Describe the changes below:
When a flush happen while BitmapText / DynamicBitmapText is rendering characters  the textureUint was not update.

👍


merge from arlac77/npm-package-template

package.json

chore(package<EMAIL_ADDRESS>chore(scripts): cover@#overwrite c8 -x 'tests/**/*.mjs' --temp-directory build/tmp ava && c8 report -r lcov -o build/coverage --temp-directory build/tmp
chore(package): set $.ava.require='esm' as in template
chore(package): set $.ava.files='tests/*-test.mjs' as in template
chore(package): set $.ava.extensions='mjs' as in template

.travis.yml

chore(travis): remove node versions 12.6.0
chore(travis): add node versions -10,-11,-12,12.7.0

:tada: This PR is included in version 8.1.81 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Initial packets lost during unknown SSRC probing

We seem to lose the first packet when doing unknown SSRC detection. For example, when identifying simulcast tracks via rid + mid extension the first packet is never delivered to the track.
Example
This image showcases the issue. On the left is a packet capture from Chrome's perspective and on the right is the result of querying a packet capture taken from an interceptor. Note that the initial packet, sequence number 24698, is missing in the capture while the second packet, sequence number 24699, does appear in the capture.

Notes
The read that consumes the initial packet happens here https://github.com/webrtc-rs/webrtc/blob/e60607fa269f20fc002347f32e0d5b756f5b92e3/webrtc/src/peer_connection/peer_connection_internal.rs#L964 I believe

A PR that attempts to fix this https://github.com/webrtc-rs/webrtc/pull/387

The above screen shot if flawed since the RTP captures we use are based on interceptors. Currently it will always miss the first packet, even with #387 I verified via read_rtp and reading the code that we do still miss at least one packet

Done in #387


Fix indent

Now equal to the original file.

We don't respect the original file, we have our own phpcs ;)

But the en file stays original?

it's my fault

Ok. I see you've updated it.


Hi

Beginner here, How can I use this in my telegram? Thanks

Hi @breeze143. In order to use this bot, you need to start https://github.com/AUTOMATIC1111/stable-diffusion-webui on your PC, create a telegram bot https://core.telegram.org/bots/tutorial#getting-ready and copy your API key to appsettings.json (TelegramBotApiKey). And also you'll need to create a chat and allow your bot to write messages in this chat (then save ID of this chat to MediaCacheGroupChatId)

Ok thanks

Thank you for showing interest in my project. I understand that a video guide could be helpful for beginners. However, I'm afraid I won't be able to create one at this time.
Please bear in mind that this repository is more of a proof of concept and was created mainly for fun. It is not designed as a ready-to-use product, and so, the setup process may require a bit of technical knowledge and tinkering.


Port commands to new CAF config options

This PR replaces option_declaration_set and friends with CAF's new abstraction for config options and values. Also obsoletes #195.
@mavam please do not merge yet until branch topic/ce-0002 lands in CAF master.

[ch2748]
@mavam This is ready to merge now.


Bug with sandbox API security tests always returning success (200) even if token is blank

Team Raid6
In the sandbox API tests, there is an issue with the security tests - as shown below, the top test (for testing if the number/token match) has a different assert case than the bottom test (a negative test with a blank token)

When testing with replacing the token with a blank token in the top case, the top case still works. Should the top case be replaced with response.data.status instead of response.status?

http status codes are different from status code returned in the body. This hasn't been standardized yet.
This means the http call returned 200, as the server was up. the Backend handled the call. API exit codes are different.


have your domain been bought by someone else?

the link to http://absurdjs.com/ in your readme seems to be something completely different...

https://absurdjs.krasimirtsonev.com/ is also not found... 404


Use F1 font for card headers

Cheers 🍻

Ah you made it work? Lets try it out 👍

It was working for a second there but now its not working anymore :(

Please check again :)

Yes this is working! I am currently working on the changes needed to make the unit tests working again


Speeding up DNS requests

Hi,
I needed a simple local DNS server to help me resolve internal names like ip-<IP_ADDRESS>.*.internal locally to the implied IP address. RubyDNS worked well for this and have a simple script working and resolving the names as expected. I've configured a RubyDNS server as the first entry via network manager / resolv.conf in linux.
However my DNS requests are resolving significantly more slowly when requesting a regular record. I'm no DNS expert but assume that generally on a host some caching mechanism is employed and that's why I'm so much slower when running the script.
Is the caching assumption correct regarding the slowdown? If so should I just use a map and some sort of timer to expire the records in that map? Can you give me other advice regarding my resolver or DNS configuration?
Thanks again for providing this DNS solution!
require 'rubydns'

  INTERFACES = [
      [:udp, "<IP_ADDRESS>", 53],
      [:tcp, "<IP_ADDRESS>", 53],
  ]

  IN = Resolv::DNS::Resource::IN

# Use upstream DNS for name resolution.

  def getResolver(ipaddress,port)
    return RubyDNS::Resolver.new([[:udp,ipaddress,port],[:tcp,ipaddress,port]])
  end

  #GOOGLE_DNS = RubyDNS::Resolver.new([[:udp, "<IP_ADDRESS>", 53], [:tcp, "<IP_ADDRESS>", 53]])
  # TODO: get these from resolv.conf or network manager
  NET_1 = getResolver("<IP_ADDRESS>",53)
  #NET_2 = getResolver("<IP_ADDRESS>",53)

# Start the RubyDNS server
  RubyDNS::run_server(INTERFACES) do
    single_ip_match_group = /ip-([^.]*).*/ #internal/
    match(single_ip_match_group) do |transaction, match_data|
      logger.info("matched ")
      logger.info(match_data[1].to_s)
      ip = match_data[1].to_s.gsub("-",".")
      transaction.respond!(ip)
    end

    # Default DNS handler
    otherwise do |transaction|
      logger.info("not matched")
      transaction.passthrough!(NET_1)
    end
  end

Thanks for your detailed report. I will take a look at it, at my earliest convenience.

In the first instance, can you try using dig to go directly to the upstream server and then via your RubyDNS server and report back the latency?

Hi @ioquatix ,
I didn't mention before I'm not sure that it's DNS resolution that is causing my issues. What I've noticed is when I use the rubydns resolver script and try to visit a website it's very slow to load vs. without; using either firefox or chrome . Then I assumed this was related to DNS resolution, but you might know better than me.
Regarding your questions
While running the rubydns script with a slightly different DNS server IP:

; <<>> DiG 9.10.3-P4-Debian <<>> slashdot.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42406
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;slashdot.org.			IN	A

;; ANSWER SECTION:
slashdot.org.		44	IN	A	<IP_ADDRESS>

;; Query time: 93 msec
;; SERVER: <IP_ADDRESS>#53(<IP_ADDRESS>)
;; WHEN: Thu Feb 22 16:51:12 PST 2018
;; MSG SIZE  rcvd: 57

Without running RubyDNS script:
dig slashdot.org

; <<>> DiG 9.10.3-P4-Debian <<>> slashdot.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13114
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;slashdot.org.			IN	A

;; ANSWER SECTION:
slashdot.org.		300	IN	A	<IP_ADDRESS>

;; Query time: 25 msec
;; SERVER: <IP_ADDRESS>#53(<IP_ADDRESS>)
;; WHEN: Thu Feb 22 16:52:27 PST 2018
;; MSG SIZE  rcvd: 57

Not sure if I made this clear or not, but I'm setting this ruby resolver as my first entry (<IP_ADDRESS>) via network-manager to resolv.conf. (ignoring dhcp assigned <IP_ADDRESS> as the first entry to resolv.conf)
@ioquatix Could it be that the resolver <IP_ADDRESS> above doesn't resolve all my requests, is timing out; so I'm cycling through my other resolvers from resolv.conf, and that's causing the delay?
However, I would think this would not be the case because <IP_ADDRESS> is normally my first resolver assigned by dhcp / network-manager when I don't override (as mentioned above), and I would then expect the same timeout when not using the script.
Maybe I should try logging the passthrough?

@ioquatix Any ideas regarding this?

My kids have been sick this week, so I haven't had much spare time, but rest assured I appreciate your continued interest in this performance problem and I certainly want to look into it.

@drocsid did you put localhost or <IP_ADDRESS> as dns server?
running examples/basic-dns.rb
query takes 1s:
$ time dig @localhost -p 5300 example.com
..
;; Query time: 23 msec
dig @localhost -p 5300 example.com  0.00s user 0.01s system 0% cpu 1.037 total

query takes 0.03s:
$ time dig @<IP_ADDRESS> -p 5300 example.com
..
;; Query time: 23 msec
dig @<IP_ADDRESS> -p 5300 example.com  0.00s user 0.01s system 25% cpu 0.031 total

Judging by
;; Query time: 25 msec

in the sample output from @drocsid I'm going to assume your assessment is correct @Matti - thanks for adding to the discussion. I believe this is now resolved!

I think this has something to do with ipv6?

What makes you say that?

I have a vague memory that using "localhost" instead of <IP_ADDRESS> starts some ipv6 madness - I think that's whats going on here: first resolves are done with ipv6 that times out in 1s and then ipv4 is fast as expected


UTF-8 is a supported schema encoding in WMF5, Test-xDscSchema should be updated

Either this or New-xDscResource should produce schema.mof in ASCII format to comply with GH contribution tests

I don't think this is an either or... The default should probably be Ascii, for backwards compatibility.  Do you want to file the issue?

Opened an issue: https://github.com/PowerShell/xDSCResourceDesigner/issues/49


Cleanup of clients of layers.moveLayer

Just a little cleanup.
cc// @xavijam

Frontend tests were OK :+1: (details)

This is not part of #4251.


Auto-generate native Java-interfacing files

Overview
This is a feature request and an another take on #80 .
Consider adding a tool that takes a Java source file with native methods or a native C header of such file, produced by javac, and turns it into a Rust-template. Basically:
X.java --> (X.rs, X-human-readable.rs)

Such a tool may produce a single template file, similar to what one currently writes by hand, or a couple of files:

An intermediate, always re-generated, low-level .rs file, that has the methods with signatures as required by C-JNI. Such file might have some boilerplate that is required to guarantee safe operations (catches panics, converts errors into Java exceptions, etc., see the primary issue #80)
Optionally, a user-facing template file. This one is generated once, has human-readable identifiers, possibly, exactly matching the names of Java methods (e.g., nativeCreate instead of Java_com_example_company_NativePeerProxy_nativeCreate). Such methods might also enjoy some conversions that are performed by the code in intermediate file (e.g., jint -> i32, again, see #80).

If there is a user-facing file, intermediate one calls its functions.
Requirements

Standard-compliance or reasonable restrictions. I.e., such a tool must be able to handle whatever javac -h produces. Restrictions may apply on method names (e.g., method names that contain only ASCII symbols).
Ease of use: using such a tool must be simpler than copy-pasting javac -h output.
Good UX:

Reasonable defaults, works out-of-the box.
Descriptive error messages when things go wrong at FFI boundary, since FFI is hard.
User-facing template that is IDE-friendly (macros hidden in intermediate file).
Refactoring-friendly: must work reasonably when native methods are added/renamed/have their signatures modified.
Build integration: whatever build-system you are using, the tool must integrate nicely (e.g., Gradle/Maven/Ant/Bazel/Cargo).

Low or moderate overhead: ideally, you get extra safety for no extra performance or complexity cost.
Works on popular OSes.

Criteria

Low or moderate complexity: no knowledge of :rocket: science required to implement and maintain.
Maintainable: when this library updates, it's easy and well-known how to modify the tool.
Permissive license.

Possible approaches

GNU-fu: Awk & friends, taking a javac -h output.

Don't have to reinvent the wheel to process text files.
Need to un-mangle method names to produce good user-facing file.
Not cross-platform.

Rust-fu: a CLI-tool taking javac -h output.

Might plug better than ^ into Cargo.
Might reinvent the wheel.

Java-fu: Java compiler plug-ins (aka processor, annotation processors).

Plugs natively into the compiler, therefore, works with anything you use to invoke javac.
Have programmatic access to source-file structure. Don't have to parse things.
Have to generate .rs files by hand.

See also

JNR might do something similar under the hood: https://github.com/jnr/jnr-ffi

For a similar reason I ended up writing https://github.com/viperproject/jni-gen
Our approach inspects the JVM by reflection at Rust's compile time and generates wrappers for methods listed in a whitelist in build.rs (see here for an example). We introduced the whitelist because we choose to generate a wrapper for every inherited method, thus increasing a lot the size of the generated code.
An example of the generated bindings: https://viperproject.github.io/prusti-dev/viper_sys/wrappers/index.html
Some problems that we found:

Java methods can be overloaded. How to choose the corresponding name in Rust?
Java method names allow more characters than function names in Rust. How to translate them?
How to handle inherited Java methods? Should the user know what is the base class that implements it, or should a wrapper be generated in all inheriting classes?

The end result works fine, but there is a lot that can be improved. For example, the whitelist in build.rs may be intimidating at a first glance, the name of the method parameters is not preserved and so on.

Federico, thank you for sharing your experience!
Just to avoid any confusion: are you talking about the opposite use-case -- creating native proxies of Java objects? I think that deserves a separate issue, it would be great if you submit one! There might be something the library can provide to ease that task.
We actually have both use-cases, yours on smaller scale, just a couple of hand-written proxies. They look like this:
// Pseudo-code
struct JavaFooProxy {
  // A global reference to the Java object.
  foo: GlobalRef;

  // An abstraction that allows you to execute some code with JNIEnv in a thread-safe manner.
  //
  // How it provides a context (JNIEnv) -- is an implementation detail.
  // For example, it may:
  //   - Always attach/detach threads, which is VERY costly.
  //   - Keep a couple of attached threads and pass the lambda to them,
  //   - Rely on the fact that your app never creates more than N threads
  //     and never `detach` them (a benign leak).
  executor: Executor;

  def bar() {
    executor.with_context((env : JNIEnv) -> {
        env.call_method(foo, "bar", BAR_SIGNATURE, …);
    }
  }
}

Regarding method name translation, you might find useful the JNI rules (that's the opposite use-case, but there might be some solutions that you may re-use): https://docs.oracle.com/javase/9/docs/specs/jni/design.html#resolving-native-method-names

Oh, I got it the other way around. Yes, I meant creating native proxies of Java objects. I just opened an issue to track it (#82).
Thanks for the suggestions!


References

@mwernimont : could you take the ref text in the siteText.yaml and put it in an accordion style table? @eread-usgs said you did it for one of the other vizzes.

@ldecicco-USGS What is considered reference text in the siteText.yaml (all of it?) and where would you want this accordion table?

I was referring to the references I added starting on line:
https://github.com/USGS-VIZLAB/great-lakes-microplastics/blob/master/data/siteText.yaml#L104
I'd want it at the very bottom...but above the footer. Does that make sense?

It does indeed


[ZEPPELIN-2084] z.show doesn't show dataframe

What is this PR for?
following may/may not display the result
z.show(sc.parallelize((1 to 1000000).toList).toDF, 1000000)

it was because of column information is not refreshed as data refresh in TableVisualization.
What type of PR is it?
Bug Fix
Todos

[x] - fix bug

What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-2084
How should this be tested?
run followings multiple times. and see if it displays result every time.
z.show(sc.parallelize((1 to 1000000).toList).toDF, 1000000)

Questions:

Does the licenses files need update? no
Is there breaking changes for older versions? no
Does this needs documentation? no

CI failure is not related to this change.
Merge to master and branch-0.7 if no more more comments.


Could not find input file .../________________empty.ts. This is probably an issue of gulp-typescript.

[21:57:35] Starting 'build.dev'...
[21:57:35] Starting 'build.assets.dev'...
[21:57:35] Finished 'build.assets.dev' after 57 ms
[21:57:35] Starting 'build.html_css'...
[21:57:36] Finished 'build.html_css' after 385 ms
[21:57:36] Starting 'build.js.dev'...
Could not find input file /Users/user/Projects/company/www.domain.com/assets/________________empty.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = ".../"
sources = ["________________empty.ts"]
[21:57:36] Finished 'build.js.dev' after 38 ms
[21:57:36] Starting 'build.index.dev'...
[21:57:36] gulp-inject 4 files into index.html.
[21:57:36] gulp-inject 2 files into index.html.
[21:57:36] gulp-inject 12 files into index.html.
[21:57:36] Finished 'build.index.dev' after 32 ms
[21:57:36] Finished 'build.dev' after 514 ms
Your gulpfile:
// --------------
// Build dev watch.
gulp.task('build.dev.watch', (done: any) =>
  runSequence('build.dev',
              'watch.dev',
              done));

tsconfig.json
{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "declaration": false,
    "removeComments": true,
    "noLib": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "sourceMap": true,
    "pretty": true,
    "allowUnreachableCode": false,
    "allowUnusedLabels": false,
    "noImplicitAny": true,
    "noImplicitReturns": true,
    "noImplicitUseStrict": false,
    "noFallthroughCasesInSwitch": true
  },
  "exclude": [
    "node_modules",
    "dist",
    "typings/browser.d.ts",
    "typings/browser",
    "src"
  ],
  "compileOnSave": false
}

Project based on https://github.com/mgechev/angular2-seed
run: npm run build.dev.watch
Periodically take off an error message

Can you post the gulp task that compiles typescript?

Or could you create a minimal example that reproduces this, and upload the .zip here on GitHub? That would make it a lot easier for me to debug this.

Unfortunately, this error occurs only when the project is large and I have not yet figured out how it guaranteed to repeat.
All scripts here: https://github.com/mgechev/angular2-seed
All scripts have not changed, only the written components, html templates and css

I tried the repository that you linked, but that doesn't show the error. So what must I change to make it fail? You may also mail your full project privately to me.

Same here, with large project.
Console:
cmd.exe /c gulp -b "D:\Projects\Web" --color --gulpfile "D:\Projects\Web\Gulpfile.js" default
(node:14024) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[19:00:31] Using gulpfile D:\Projects\Web\Gulpfile.js
[19:00:31] Starting 'default'...
INFO: Server started at <IP_ADDRESS>:3000
INFO: Started watching files in 'src' folder.
[19:00:32] Finished 'default' after 504 ms
INFO: src\app\actions\accounts\accounts-actions.ts: changed, running tasks...
[19:00:45] Starting '_ts'...
[19:00:54] Starting '_live-reload'...
[19:00:54] Finished '_live-reload' after 5.48 ms
[19:00:54] Finished '_ts' after 9.57 s
INFO: src\app\actions\accounts\accounts-actions-creators.ts: changed, running tasks...
[19:03:39] Starting '_ts'...
Could not find input file D:\Projects\Web\src\app\________________empty.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "D:/Projects/Web/src/app/"
sources = ["________________empty.ts"]
[19:03:41] Starting '_live-reload'...
[19:03:41] Finished '_live-reload' after 5.4 ms
[19:03:41] Finished '_ts' after 1.93 s
INFO: src\app\actions\accounts\accounts-actions-creators.ts: changed, running tasks...
[19:04:16] Starting '_ts'...
[19:04:22] Starting '_live-reload'...
[19:04:22] Finished '_live-reload' after 3.64 ms
[19:04:22] Finished '_ts' after 5.7 s

Dependencies:
"devDependencies": {
  "connect-livereload": "0.5.4",
  "del": "2.2.0",
  "express": "4.13.4",
  "gulp": "3.9.1",
  "gulp-autoprefixer": "3.1.0",
  "gulp-replace": "0.5.4",
  "gulp-sass": "2.3.1",
  "gulp-sourcemaps": "1.6.0",
  "gulp-typescript": "2.13.4",
  "gulp-uglify": "1.5.3",
  "jspm": "0.16.34",
  "path": "0.12.7",
  "replace-ext": "0.0.1",
  "tiny-lr": "0.2.1",
  "tsconfig-glob": "0.4.3",
  "tsd": "0.6.5",
  "typescript": "1.8.10"
}

Typescript configuration:
{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es5",
        "noImplicitAny": true,
        "preserveConstEnums": true,
        "removeComments": false,
        "sourceMap": true,
        "inlineSources": true,
        "noExternalResolve": true,
        "jsx": "react"
    },
    "filesGlob": [
        "./src/**/*.ts*"
    ],
    "files": [
      /* 251 files list */
    ]
}

Could you upload your full project as a zip here?

Same here. Big project and can't upload it or find a way to reproduce it.
Only thing is that if I run the gulp-typescript directly it doesn't happen (to me) but it does happen when coming form a watch task, after the first iteration. :/
[17:59:46] Starting 'tsc-app'...
[17:59:46] Typescript Changed node_modules/angular2/typings/browser.d.ts
[17:59:47] Typescript Changed 1 item
Could not find input file /Volumes/HHD/Projects/18Techs/Weather/twc_cms_wu/docroot/sites/all/modules/wu/node_modules/angular2/typings/________________empty.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "/Volumes/HHD/Projects/18Techs/Weather/twc_cms_wu/docroot/sites/all/modules/wu/node_modules/angular2/typings/"
sources = ["________________empty.ts"]
[17:59:47] Finished 'tsc-app' after 441 ms
[17:59:47] Starting 'tsc'...
[17:59:47] Typescript Changed node_modules/angular2/typings/browser.d.ts
[17:59:47] Typescript Changed src/settings.ts
/Volumes/HHD/Projects/18Techs/Weather/twc_cms_wu/docroot/sites/all/modules/wu/src/________________empty.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "/Volumes/HHD/Projects/18Techs/Weather/twc_cms_wu/docroot/sites/all/modules/wu/src/"
sources = ["________________empty.ts"]
[17:59:48] TypeScript: emit succeeded

@diestrin is there something special with your watch tasj? Do you use gulp-changed or something like that?

Using simplr-gulp: https://github.com/QuatroCode/simplr-gulp/tree/dev
test-fails.zip
Error coming from watch task. (gulp default).

Yes @ivogabe. I was trying to debug it but couldn't get to the root problem. This is my gulp task
function compileTS(src, dest, project, onlyChanged) {
  return gulp.src([
    'node_modules/angular2/typings/browser.d.ts',
    `${src}/**/**.ts`,
    `!${appSrc}/node_modules/**/*`
  ])
  .pipe(gulpif(!!onlyChanged, changed(src, { extension: '.js' })))
  .pipe(gulpif(!!onlyChanged, debug({title: 'Typescript Changed'})))
  .pipe(sourcemaps.init())
  .pipe(ts(project))
  .pipe(sourcemaps.write('.', {
    includeContent: false
  }))
  .pipe(gulp.dest(dest + '/src'))
  .pipe(ignore('*.js.map'))
  .pipe(ignore('*.spec.js'))
  .pipe(renameExtension('.min.js'))
  .pipe(minifyJS(uglifyOptions))
  .pipe(gulp.dest(dest + '/src'));
}

I think it's the same issue as https://github.com/ivogabe/gulp-typescript/issues/307#issuecomment-218995719. Does it only show the error when a new compilation is triggered, but no files were changed? If so, then it is probably the same.

mmm just tested and it happens on both, when there's changes and when there's no changes

Same was happening here on angular2-seed project.
I refreshed my tools:
sudo npm i ts-node -g
and
typings install
I suppose it is something wrong in the file list returned by the glob, somewhere in the results list there is an item "________________empty", might be some left overs from typings.
Just happen to see all problems listed here related to typings/tsd
if nothing works try to wipe your typings folder and install it again and give some feedback, mine was solved with the commands above only...

Same problem here in an large Aurelia project.
Looks like it happens the first time a file change is detected by the watch task.

I can reproduce it by using the angular2-seed project. If you change an arbitrary file (app.component.html) and it happens on the second change/live-reload. I reverted back to version 2.12.1 and the issue no longer happens.

Still able to reproduce this issue on my project which is based on angular2-seed.
My project is using,  "gulp-typescript": "2.13.4"

@brijeshamin The bug is fixed, but hasn't been released through npm yet.

The fix was released in v2.13.5

I'm still seeing this once in a while on watch recompiles. Using latest version 2.13.6. Hard to reproduce, it only happens once in a while when editing files. Normally I discover it when logic does not change in the app, but often I end up doing many changes before I realize it's the gulp build process that have failed.

I'm afraid that I can't fix it without some more info.. Could you debug it? Or post your gulpfile and tsconfig?

I was experiencing this same issue and found a solution that seems to work (I have triggered multiple watch re-compiles and they have been stable).
The problem seems to be that I was re-using the tsProject object across recompiles. I was able to fix it by forcing my compile task to re-create that object each time.
My original configurations
gulpfile.js
const gulp = require('gulp');
const ts = require('gulp-typescript');

// PROBLEM: defined at top-level and re-used across watch recompiles
const tsProject = ts.createProject('tsconfig.json');

gulp.task('compile', () => {
      const tsResult = gulp
      .src([ /** CODE_FILES, TYPINGS_FILE **/ ])
      .pipe(ts(tsProject));

    return tsResult.js.pipe(gulp.dest('compiled/src'));
});

gulp.task('watch', () => {
  gulp.watch([ /** files **/], [ 'compile' ])
})

Fix
gulpfile.js
const gulp = require('gulp');
const ts = require('gulp-typescript');

gulp.task('compile', () => {
   // Fix: Recreate tsProject per compile;
   const tsProject = ts.createProject('tsconfig.json');
    const tsResult = gulp
      .src([ /** CODE_FILES, TYPINGS_FILE **/ ])
      .pipe(ts(tsProject));

    return tsResult.js.pipe(gulp.dest('compiled/src'));
});

gulp.task('watch', () => {
  gulp.watch([ /** files **/], [ 'compile' ])
})

I've run into this problem myself on<EMAIL_ADDRESS>on a larger project developing an Angular 2 components library where there's two separate TSProjects with two separate build tasks and two separate watch tasks (component library itself and the demo application consuming the component library). Using the mgechev/angular2-seed as a base, I found that the problem seems to be solved in the complex seed project by forcing the tsProject file to be not cached by contra/gulp-cached and (similar to @GeorgeTaveras1231's solution above) moving the tsProject definition into a constant inside of the task itself so it gets recreated every time gulp-watch runs the originally defined gulp-typescript task.
The bigger issue that I'd like to understand is why re-using the TSProject is a problem with incremental compilation. This issue is clearly separate from the one fixed in 2.13.5, as this is a problem specifically when files are changed, but it may be actually working as intended and not even be a bug.

I don't know yet when this error occurs since I haven't got a reproduction for this. I already fixed it in other situations, so I'd like to see your project code to debug it. Could you send it here or by email, or create some example project that reproduces it? Moving tsProject into the task function is not the real solution since that breaks incremental compilation. I do advise to not use gulp-cached since unchanged files must also be recompiled. Type info from one file can modify the output of other files and affects type checking of other files.

Realistically, I can't easily provide a repro of it due to time constraints and confidentiality of the files in question, but the general gist would be:

Make a copy of mgechev/angular2-seed
Implement a second build and watch step for a different set of files from the core application files.
Run watchers and see the build fail at the gulp-typescript step.

If I get time this week, I'll try to create a demo repo that has the same issue.

I'll see if I have some time to check that. A quick question, is the same tsProject used in two compilations at the same time? And is the error shown for ________________empty.ts only, or for other files?
Is the contents of tools confidential too? If not, you might could replace the contents of src of your project with some placeholder code and that will probably demonstrate the same issue.

Okey, now I get this error from build task.
gulp-typescript-empty-error.zip

Run npm install
Start default command: gulp.

And not-working task will show you a error message:
Could not find input file D:\test\src\start.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "D:/test/src/"
sources = ["start.ts"]
Could not find input file D:\test\src\________________empty.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "D:/test/src/"
sources = ["________________empty.ts"]

Difference between working and not-working tasks are only in tsconfig.json file.

@GiedriusGrabauskas I had to add 'use strict'; at the top of gulpfile.js, but apart from that - that's a working repro. Good job!
@ivogabe could you take a look at that one? We already have a repro, which will make it way easier to solve the bug.

Not sure how helpful this comment is but I had a project that had multiple TypeScript projects being created and running concurrently.  I had a glob pattern set to typings/**/*.d.ts in gulp.src and it was giving me this error.  I removed that pattern and moved it to the tsconfig.json and it's running fine now.

Ah I think I found it it seems to be due to index.d.ts being empty and only having comments like this -
/// <reference path="globals/angular-protractor/index.d.ts" />

+1

This should not happen any more in version 3, since ____empty.ts is not passed to the compiler any more. This file is not needed any more now that rootDir is always set. See #413 for more details on version 3.


Issue  #51: Allow users to create audit templates

This PR introduces the functionality of creating audit templates which is user story #51.
For details on implementation:

In the server, a model, view and serilizer is introduced for audit templates
In the client, two components are introduced:
A) AuditTemplateComponenet: to display the created templates. This component is accessed from the Template tab on the navigation menu
B) CreateAuditTemplateComponenet: A form to create an audit template. Can be accessed from the Create Template tab on the navigation menu

Codecov Report

Merging #184 (eb28e68) into master (7951dcd) will increase coverage by 0.48%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #184      +/-   ##
==========================================
+ Coverage   92.53%   93.01%   +0.48%
==========================================
  Files          22       28       +6
  Lines         616      659      +43
==========================================
+ Hits          570      613      +43
  Misses         46       46

Impacted Files
Coverage Δ

server/audit_template/migrations/0001_initial.py
100.00% <100.00%> (ø)

server/audit_template/models.py
100.00% <100.00%> (ø)

server/audit_template/serializers.py
100.00% <100.00%> (ø)

server/audit_template/tests.py
100.00% <100.00%> (ø)

server/audit_template/urls.py
100.00% <100.00%> (ø)

server/audit_template/views.py
100.00% <100.00%> (ø)

... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7951dcd...eb28e68. Read the comment docs.

I fixed all the changes @domludera and @Amanda-Kolopa , the PR should be good to go!

I fixed all the changes @domludera and @Amanda-Kolopa , the PR should be good to go!


Insulin activity

How hard would it be to also return the level of insulin activity (first derivative of IOB)? That is the other thing we need to be able to incorporate this into oref0 or similar.

All the curves I have seen use body mass as a factor.  But a quick hack might be to take the total insulin/DIA and get a U/min or use a normal distribution.

I think it should be literally as "simple" as also returning the derivative of the curves already in this code. (I'd have to get help from WolframAlpha to figure out the derivatives, though. I don't remember any of that from HS calc.) :-)

If my math is not that bad ( and please don't trust me...test test test ), the derivative should be:
(constant_a4) * time_from_bolus^3 + (constant_b3) * time_from_bolus^2 + (constant_c*2) * time_from_bolus + constant_d
Make sure to maintain each constant symbol ( plus or minus )...

I am not sure that is the correct way(formula above is fine  ax^b becomes abx^(b-1) for each term).
I may be wrong too, but that will give your the instantanious rate of change for iob left at time t in percentage.  But don't we really want the amount changed between time t and the last measurement.

If you need to get the difference of IOB between t and ( t-1 ), then you can do that with the actual formula as it is just manually getting the two values for each time and then subtracting the amounts... is that what you need @scottleibrand?

as @bustavo says its really asy to do it by simply taking a backward difference or a forward difference
since the step times change I dont use the old value - I simply do
(iob (t+1)-iob(t))/1.0 (you can skip the divide by 1 of course :)) that will give you the local slope of iob, and if you multiple that by your sensitivity at that moment it gives you the iob velocity

I've been looking at ways of changing the maths behind iob/activity in oref0 to something easier to maintain. As part of the comparison, I looked at the 3 hour formula from here.
I calculated the derivative (everything /100 to make the comparison easier) and compared to the existing oref0 results.
poly = -3.203e-9 * pow(i,4) + 1.354e-6 * pow(i,3) - 1.759e-4 * pow(i,2) + 9.255e-4 * i + 0.99951
polyDeriv = 4*3.203e-9 * pow(i,3) - 3*1.354e-6 * pow(i,2) + 2*1.759e-4 * i - 9.255e-4

This was the result - the tail end of the derivative doesn't fit very well with what would be expected. Is this potentially a problem with the polynomials currently being used?

I think I could explain this with two interesting things I've seen with my own personal data:

It could make sense that the curve goes back up in the end if you consider that sensitivity goes up as your bg goes down. If you keep your sensitivity fixed ( ie always 22 points per insulin Unit ), this curve shape could make sense... if you keep your sensitivity variable it doesn't ( ie 15 at 150 / 20 at 120 / 30 at 100 / 40 at 80 / etc ) because the sensitivity variability will already be accounting for the increment you are trying to show with the curve tail going up again.

It could make sense that the curve goes back up in the end if you consider that maybe your IOB curve is a little bit longer... @kenstack & I observed that after 180 minutes we had about other 30 minutes of activity ( bg still lowering ) and the only reason we found for this was a longer IOB curve, hence the new IOB 3.5 hour curve which now fits perfectly with the observed data.

I'd like to read @kenstack others opinion on this curve for discussion...

Just to be absolutely clear, the grey line above is purely from taking the derivative of this polynomial: https://github.com/Perceptus/iob/blob/master/insulin_on_board_pct.js#L71
The orange line is what is currently used by oref0.
I'm not sure where exactly the polynomial equations came from, but if it was just from trying to fit a curve to published ones then I could imagine it would be very easy to get something that looks right but with weird behaviours in the derivatives.
Trying to model things like changing insulin resistance as part of this equation doesn't feel right, mainly because there isn't actually a guarantee that BG will be lower 150 minutes after any bolus.

Yes there is absolutely no need at all to integrate insulin resistance into this curve as this curve just measures the effect of the insulin.
The referenced polynomial is a fit from Walsh's published insulin activity curves which come from a clamp study where a person got insulin put into its body and then glucose was used to try to level the bg according to the insulin activity... the resulting curve ( glucose used to maintain the bg level with the used insulin ) is this IOB curve.
I don't really still understand why there is a need to get a derivative from IOB curves... could you please explain?

The IOB curve tells you how much insulin you have that effectively hasn't done anything yet. The derivative tells you how much insulin you have acting on you at that time to lower your BG. This is useful in calculating expected BG change when determining what insulin doses you might need to end up in range.

Ah yes! I do the difference of the values between two points in time which is the same as the derivative...
So the question is really... is the derivative right? I think it is for myself I've been using it for a long time to calculate what I call "insulin consumption" so I can calculate the insulin sensitivity at that point in time.

It's currently unclear if the curve is correct or not (it probably isn't correct). If it is wrong, it is also unclear how much impact it has; I suspect "not much", but it would be nice for things to be more correct where possible. It certainly doesn't look right at first glance. It feels like the derivative should be 0 at 180 minutes.

There are a couple of IFs on the equation that help do that:
if( time_from_bolus <= 0.0 ) {
percentage = 100.0
} else if ( time_from_bolus >= insulin_duration * 60.0 ) {
percentage = 0.0
}

Ok, I'll be a bit more pedantic :P It feels like the derivative should only have one turning point at the peak insulin action, with no step changes - it should be almost 0 just before the end of DIA.

@cjo20 yes that is correct here is the function plus the derivative plotted together

those polynomials were fit without any constraints on the derivatives - but I dont think its an issue here - remeber that the IOB curves are MASSIVE approximations to start with - all that simple linear bolus wizard type math is not that accurate anyway, so I wouldnt be too worried about this.  If you are concerned and want a different velocity curve, you can certainly fit one.  If you are looking for a local derivative for "iob velocity", then either do what you did or simply take the difference between (iob(t+1 min)-iob(t)) and divide by one.  If you are looking for the effect on BG over say 20 min then id take the difference between iob(t+20)-iob(t) and use the actual difference in BG not the velocity imho.

No worries @cjo20  :)
The MDT devices jump from 5% to 0% so @kenstack worked on "smoothing" that tail part of the curve... it never hits 0 so we have to enforce the 0 at the end of the IOB curve length.

@cjo20 if you find an old MDT pump manual it has the curves they use in it - take a look - IOB never goes to zero even at 180 min for a 3 hour curve, derivatives arent zero... they are just approximations - if you want to smooth the derivative youll need to change the curve itself to be smooth to zero at the end - if you look at the iob curve you can see it hits zero at a slope so hence the non zero velocity

@kenstack It looks like your graph shows less of a kick than mine, which is odd.
AFAIK, The old MDT curves weren't really designed to work with an APS system - the problem being that 2.5 hours after basal correction starts, oref0 is going to think the correction is having more of an impact than it did at 2 hours. I need to look in to how much of a difference it'll actually make.

@cjo20 the MDT curves like most IOB curves come from a glucose clamp test where the subject's bg is "clamped" at 100 via intravenous feed of glucose.  then they are given a 12-15U bolus of insulin.  The curve is derived from the amount of glucose that needs to be given over the next say 5-6 hours to keep BG flat.  Incrementally you are right - but I dont think its going to matter much - at least I havent noticed it in my loop.  But looking at that curve you are talking about (eyeballing here the difference from 0.4 to that bump) max of about 0.05-0.075 versus a peak  of -0.8.  Not hug, but yes you could certainly smooth it - let me know if you see any real difference.

@kenstack Yeah, it looks a lot worse on my graph - going from under 0.004 to almost 0.006. It looks much less of an issue in your graph. Now I'm curious about why our graphs are so different.

one more set of curves - here is the 3.5 hour curve that @bustavo and I use in our loops

I think its going to be tough to get rid of the bump at the end  - physically I agree its liiely not real, but the reality is that "DIA" is really 5-6 hours however the observable effect we see in most boluses is 3-4 hours.  so these curves, to drive IOB to zero at DIA need to really get agressive at the end - or youll need to really modify the observable drop earlier (ie have it be more agressive) so you net out at zero.  This is likely why MDT chose to instead always leave about 5% of insulin "on board" even at DIA.

@cjo20 huh yes not sure... I am going to try to modify the curves a bit later today and try to smooth velocity at the end as well as hit zero iob at the DIA.  I dont think - without changing the initial shape drastically - Ill be able to get velocity to zero at the end of the curve but Ill see what I can do.  again Im not sure its going to make a ton of difference but lets try it.  Make sense>

It's theoretically possible to write a program that will generate the curves for you, based on setting a few constraints. I may give it a go at the weekend.

That 5-6 can be observable.  I have had it become significant when exercising.
Is that curve at that point going to be significant and change decisions?  There is very little active insulin to do anything at this point.  This is the speed of the decay going from slower/faster at the tail end right?

yes - but that wont match the experimental values (glucose clamp) for the effect of insulin as they measured it.  We can certainly create some smooth curves for speed and IOB level - is that what you are looking for?  It would just be an optimization loop around an equation form - could set iob to 100% at t=0, 0% at t=dia, derivatives equal to zero at t=0,DIA - youll either end up with a really complicated polynomial (order 6 plus Inwould guess) or something that doesnt fit in the middle but hits the boundary conditions.  Thats the tradeoff.  Also as you crank up the order of the polynomial youll get really weird derivative behavior in the middle.

@beached I dont think it is for an IOB calc but maybe for velocity calcs (I use velocity for example to calc deviations, but I havent noticed anything too weird) - but we can play with the smoothing - @cjo20 is right the velocity shouldnt decrease again at the end, but its likely as we try to fix it the fit gets worse everywhere else.  the issue is that these simple models have limits.  We are really pushing it at the moment using this stuff as a controller I think.  But, until we can simplify the more complicated models, this is what we have.

@kenstack You can try and get as close though. Basically, if you set up a system of equations:
f(x) = a*x^4 + b*x^3 + c*x^2 + d*x + e
f(0) = 1
f(180) = 0
f'(0) = 0
f'(180) = 0
f''(75) = 0

And then solve them as simultaneous equations. Some of the values will be unbound, which means you get to "pick" what they are and they'll still fit those points, and it should be possible to constrain it so there aren't any additional turning points in the area we care about. At that point, it should be possible to start adding more constraints to try and make it match the published curves. I don't know how close we can get, but it's probably worth me spending some time looking at it. If I can write a program to generate possible solutions then it should be easier.

@cjo20 right - but I think youve over constrained it - you have 5 conditions for 4 variables, and on top of that you havent included the ability to use those same constants to minimize the fit error to the data, right?  right now those constants are chosen with no regard to those derivatives etc - just to fit the experimental data.  We can definitely create a curve that fits the BCs, but it would like be of higher order and likely wouldnt fit the data.  If we would rather have a curve that simply is smooth betwee t=0 and t=DIA I totally agree.

5 variables sorry :) the over constraint is the fitting

My stuff keeps it at 5min granularity so I would only have 1-2 blip in the velocity anyway.
One thing I wonder though, and excuse my ignorance,  but this is all a fuzzy estimation to fit collected data. The original data was probably collected at some interval(5min?) and whole blood.  I think that too has a measurement error of over 5%.  How tight can the curve really be fitted to that and still be representative?
I wonder if carrying the error through all the calculations might give some insight into how to more safely make decisions.

@beached yes its just a very loose estimate.  The collection of the data - I think they collect at a larger interval since the test is so long (5-6 hours) - the shape is then "shrunk" in time to fit DIA
@cjo20 actually Im not sure you can constrain a 4th order poly as much as that - I think youll get no solution as Im thinking about this.... d=0 and e=1 by inspection based on the BC's at zero, youll end up with 3 equations for 3 unknowns but I not sure you can force the poly thru that.  As I said befor eyou may need to icnrease the order, which leads to more variables which is fine but its moving the wring way re getting more complicated

@cjo20 actually since your 2nd derivative constraint isnt at 180 you can indeed solve it - here is the result - looks fine - as suspected a bit more aggresive at early times in terms of velocity and less at the end.  Derivatives now match your BC's.

If it's not too much trouble, are you able to plot the IOB curve on the same graph as your formula?

Related, here is a screenshot I found that even shows the IOB increasing near the end of DAI.  It's from https://www.ncbi.nlm.nih.gov/pubmed/22882249

@beached I think that is insulin concentration through time... its different than IOB...
IOB measures the effect on glucose from insulin.
This curve measures the concentration of insulin through time in mg/kg/min.
I will publish that repository with those equations soon under Perceptus.

mg/kg/min  isn't that the glucose(mg) dropping/body mass(kg)/duration(min) ?

It's the infusion rate of glucose needed to match the insulin I thought.  so same as action of insulin.
Maybe I am confused

No idea... I can't access the document only view the summary... the times from dosing considered on that curve ( up to 12 hours ) makes sense to me from what I've seen on insulin concentration curves but not on IOB curves...

Here is the study that compares fast aspart to aspart and has both charts, but over 300min
http://download.springer.com/static/pdf/173/art%253A10.1007%252Fs40262-016-0473-5.pdf?originUrl=http%3A%2F%2Flink.springer.com%2Farticle%2F10.1007%2Fs40262-016-0473-5&token2=exp=1480466951~acl=%2Fstatic%2Fpdf%2F173%2Fart%25253A10.1007%25252Fs40262-016-0473-5.pdf%3ForiginUrl%3Dhttp%253A%252F%252Flink.springer.com%252Farticle%252F10.1007%252Fs40262-016-0473-5*~hmac=a221698e189095b0ad4cd9df78001387acf6422f0f66aa15f12a711c86680e3d

@beached you're right, mg/kg/min is the glucose infusion rate...
@kenstack, could those be the clamp studies results?

I wonder how the relationship between dose to body mass holds up as a method of determining the proper dia.  Looks like all the charts I see have a longer dia as the ratio goes up.  Might explain a lot of the anecdotal variability with people basing it on types of meals and something to play with.

@beached yes those are clamp studies - GIR is glucose infusion rate - they derive the IOB curves from those.  And yes they go very long 5+ hours - reality is insulin action is much longer then 3 hours - but its hidden by changes in EGP etc - again these simple models make tons of assumptions

@kenstack I have yet to see a AP that uses body mass in the predicting the GIR and DIA.  I am ignorant of the research out there, but it seems like it is a significant factor from the data I see in these clamp studies

@beached sorry not sure I understood your point there.  The IOB curves in this case are derived from the area under those curves - the body mass is taken into account (sort of) by them generally using an insulin dose proportional body mass (though studies can vary) - so if you are a 75 kg person they use about 14-16 U to give you an idea.  If less or more they change it proportionally - so in their minds the IOB curve takes into account the body mass

The charts seems to show that as the U dose/kg mass increases, so does the DIA.  So if one has a large meal, say 100g/CHO, takes 15U of insulin, and has a mass of 100kg they would have a ratio of 0.15U/kg.  So, probably, a shorter duration than had they eaten a 150g meal and taken 22.5U with a ratio of 0.23U/kg.
Adjust the choice of IOB curve based on the dose/body mass ratio is what I mean.  Not a fixed value

Increased body mass tends to be associated with increased insulin resistance.
People tend to have worked out an insulin:carb ratio that works for them. By adjusting this ratio so that it keeps your blood sugar in range after food, insulin resistance is taken in to account, which means that the I:C ratio will tend to take in to account body weight, leading to most people having a similar u/kg.

@cjo20 What I read from the data is that the more you take the longer it takes to complete.  For example, a 1U bolus would take 4hrs, but a 10U bolus could take 5hrs.   The U/kg would be 10x.  I made up those times, but the trend is what I am emphasising.  Large carb meals stretch the iob curve.

@beached Interesting! I'd like to read more about that... do you have the reference to the article?

Maybe I read into too much, but the data on all charts shows a longer DIA for larger doses(0.1/0.2/0.4U)/kg .  The link above shows it as does the graph above.   Plus this http://www.diapedia.org/management/81040851208/pharmacokinetics-and-dynamics-of-insulin-absorption

I am now live testing the new 3.5 hr smoothed out curve... will let you know how it goes
active_percentage = ( ((-0.0000000560934) * (elapsed_time4)) + ((0.0000451551) * (elapsed_time3)) - ((0.00927644) * (elapsed_time**2)) + ((0.0) * (elapsed_time)) + (100.0) )

@beached no doubt you are rihgt - but its a bit more complicated.  The real absorbtion of insulin, and diffusion of glucose is driven by gradients (like any diffusion process).  so a dose of 1 U with no insulin in tissue or blood is going to have a far different profile then one with insulin already there at a high concentration.  So lets say you bolused 5 U, then 1U an our later.  Its not really dose anymore - its concentration.  We are working on simplifying that stuff but its not easy.. at least for me :)

@cjo20 Ive been running a 3.5 hr curve since last night based on the smoother BC's you had asked for - I havent noticed a difference yet but Ill keep ypu updated let me know your results as well.


[ja] Translate reference/kubectl/conventions into Japanese

This is a Feature Request
What would you like to be added
Translate reference/kubectl/conventions/  into Japanese.
Why is this needed
This page has not been translated.
Comments
/language ja
/assign

/triage accepted


Add support for Nue/3A new model single gang light switch (fixes #600)

Just installed the switch and found out I need to add the zigbee model to devices.js.
May just as well do a PR for everyone benefit including myself in the future when i need to rebuild... no more manual edit is needed in the future

Thanks!


support headers in plan.request and plan.wait

Background & motivation
I am trying to make an http request and get some data but this API is behind bearer tokens; I now have to create a python script for thsi
Desired behaviour
support headers in plan.request
How important is this to you?
Painful; the lack of this feature makes using Kurtosis frictionful.
What area of the product does this pertain to?
Other: anything not covered by the above

Franjo from DIVA echo'd this

Thank you @h4ck3rk3y !


something is wrong

Hello sir i tried to run the software but i have a small problem here is log below
sufttun-server sufttun-server -l ":12050" -t "<IP_ADDRESS>:40000" -b 10 --key "yourkey" --tuncrypt true
2018/02/12 14:02:48 listening on  :29900
2018/02/12 14:02:48 tunnel encryption: false
as per my config local port on server should 12050 but it shows as 29900 which is the default

2018/02/12 14:08:39 rtt 437
2018/02/12 14:08:39 connected from <IP_ADDRESS>:3333
2018/02/12 14:09:09 [ERR] yamux: Invalid protocol version: 194
2018/02/12 14:09:09 invalid protocol version
2018/02/12 14:09:09 shutdown 0\
2018/02/12 16:14:53 listening on: [::]:12948
2018/02/12 16:14:53 rtt 256
2018/02/12 16:14:53 connected to <IP_ADDRESS>:29900
2018/02/12 16:14:53 tunnel encryption: true
2018/02/12 16:15:23 [ERR] yamux: keepalive failed: session shutdown
2018/02/12 16:15:23 shutdown 0

2018/02/12 14:15:17 connected from <IP_ADDRESS>:12948
2018/02/12 14:15:47 [ERR] yamux: Invalid protocol version: 127
2018/02/12 14:15:47 invalid protocol version
2018/02/12 14:15:48 shutdown 0

I have seen that you have an extra word sufttun-server on your command. It's the result that cause this problem.
The right command is:
sufttun-server -l ":12050" -t "<IP_ADDRESS>:40000" -b 10 --key "yourkey" --tuncrypt true

Hello sir thanks for guiding me to correct configuration of server and client .I have a question
sufttun-server -l ":1205" -t "<IP_ADDRESS>:40000" -b 100 --key "yourkey" --tuncrypt true
sufttun-client -l ":3333" -r "server:1205" -b 10 --key "yourkey" --tuncrypt true &
From server side
lsof -i:1205
COMMAND     PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sufttun-s 30842 root    3u  IPv6 609433      0t0  UDP *:1205
from Client Side
lsof -i:3333
COMMAND     PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sufttun-c 21925 root    3u  IPv6  46450      0t0  TCP *:3333 (LISTEN)
sufttun-c 21925 root    5u  IPv6  46451      0t0  UDP *:3333
in client side UDP and TCP are open on port 3333 .When i use UDP traffic to server i cannot get udp but when i use TCP i can see its working.Sir my question is there is no UDP on client side ? if udp is there i'm doing something wrong config ? Kindly check and update how can i get it working on udp
thanks again sir.

Sorry for the above message i'm really sorry i have checked the readme i found this
client <--> suft-client  <--> suft-server  <--> server
tcp <-> udp                        udp <-> tcp
Is it possible to have UDP in both direction ?
client <--> suft-client  <--> suft-server  <--> server
udp<-> udp                        udp <-> udp

Currently it do not support udp.

Hello sir thank you for the message i have a problem while trying to run the software  once communication from server is down Client stops working it doesn't try to send messages to server till it gets connection back.IS there any way i can have the connection back to client once server is UP.Send timeout might corrupt outgoing messages
my config from client
sufttun-client -l ":3333" -r "95.201.30.XX:1205" -b 10 --key "yourkey" --tuncrypt true &
sh-4.3# 2018/02/16 20:51:44 listening on: [::]:3333
2018/02/16 20:51:45 rtt 97
2018/02/16 20:51:45 connected to 95.201.30.XX:1205
2018/02/16 20:51:45 tunnel encryption: true
2018/02/16 20:51:46 stream opened
lsof -i:3333
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sufttun-c 598 root    3u  IPv6 692012      0t0  TCP *:3333 (LISTEN)
sufttun-c 598 root    5u  IPv6 692013      0t0  UDP *:3333
server side
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sufttun-s 1578 root    3u  IPv6  15104      0t0  UDP *:1205
Once i do reboot on server .Once the server is back online .Client cannot connect to server automatically .Below are the message
sh-4.3# 2018/02/16 21:02:01 listening on: [::]:3333
2018/02/16 21:02:01 rtt 94
2018/02/16 21:02:01 connected to 95.201.30.XX:1205
2018/02/16 21:02:01 tunnel encryption: true
2018/02/16 21:02:08 stream opened
2018/02/16 21:02:27 shutdown 0
2018/02/16 21:02:27 stream closed
2018/02/16 21:02:40 session shutdown
2018/02/16 21:02:40 listen udp :3333: bind: address already in use


cshort link on main website

Domain
cshort.org
Link
https://cshort.org/LPMNEEqK
Version
0.2251
What browsers are you seeing the problem on?
Microsoft Edge
What OS are you seeing the problem on?
Windows
Anything else?
it shows the actual countdown that you need to wait 10 seconds

It redirected after 2 seconds for me.


attributes.py broken

Something seems to have broken with this component when I went from 83.3 to 84.6.
Is there a way to tweak this to bring it back up?
I did update
from homeassistant.helpers.restore_state import async_get_last_state
to
from homeassistant.helpers.restore_state import RestoreEntity
which eliminated the error but the entities are still not available....

I will upgrade and see what i can do

Thx.   It looks like the same adjustments made here do the trick.
https://github.com/rogro82/hass-variables/commit/6221f722ce3145ead976e3bdf171d302794ae8ff
On December 22, 2018 2:55:51 AM Pavel S<EMAIL_ADDRESS>wrote:

I will upgrade and see what i can do
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

oh what a perfect link, i have fixed it


Failed StartOperation / StopOperation silently rejected

List of NuGet packages and version that you are using:

Runtime version (e.g. net461, net48, netcoreapp2.1, netcoreapp3.1, etc. You can find this information from the *.csproj file):

v4.7.2

Hosting environment (e.g. Azure Web App, App Service on Linux, Windows, Ubuntu, etc.):

Windows, console app
Describe the bug
The request telemetry produced by code below is silently rejected by ingestion endpoint.

POST https://dc.services.visualstudio.com/v2/track HTTP/1.1
Content-Type: application/x-json-stream
Host: dc.services.visualstudio.com
Content-Length: 604
Expect: 100-continue
Connection: Keep-Alive
{"name":"AppRequests","time":"2020-10-06T21:41:45.2966629Z","iKey":"","tags":{"ai.cloud.roleInstance":"","ai.operation.id":"ad4c9219a4d30d4490f4e3d5502ad0dc","ai.operation.name":"myoperationname","ai.internal.sdkVersion":"dotnet:2.15.0-44797","ai.internal.nodeName":""},"data":{"baseType":"RequestData","baseData":{"ver":2,"id":"e11a12fdade54445","name":"myoperationname","duration":"00:00:00.0025546","success":false,"properties":{"_MS.ProcessedByMetricExtractors":"(Name:'Requests', Ver:'1.1')"}}}}
HTTP/1.1 400 109: Field 'responseCode' on type 'RequestData' is required but missing or empty. Expected: string, Actual: undefined
Content-Type: application/json; charset=utf-8
x-ms-session-id: 79D0B20A-B2DF-4438-B271-20FC11D99050
Strict-Transport-Security: max-age=31536000
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Name, Content-Type, Accept, Sdk-Context
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 3600
X-Content-Type-Options: nosniff
Date: Tue, 06 Oct 2020 21:41:45 GMT
Content-Length: 207
{"itemsReceived":1,"itemsAccepted":0,"errors":[{"index":0,"statusCode":400,"message":"109: Field 'responseCode' on type 'RequestData' is required but missing or empty. Expected: string, Actual: undefined"}]}
The end result is that telemetry gets logged when it is successful. But all failures get rejected. This is very error-prone (don't ask me how I discovered it =)).
Expected behavior
Either SDK should throw an exception or ingestion endpoint should put some default value (for instance, "500" {similarly to how "200" is used for successful cases}).
To Reproduce
Create a self-contained project using the template of your choice, apply the minimum required code to result in the issue you're observing.
    static void Main(string[] args)
    {
        var telemetryClient = new TelemetryClient();

        var failedOperation = telemetryClient.StartOperation<RequestTelemetry>("myoperationname");
        failedOperation.Telemetry.Success = false;
        telemetryClient.StopOperation(failedOperation);

        telemetryClient.Flush();
        Console.ReadKey();
    }

We will close this issue if:

The repro project you share with us is complex. We can't investigate custom projects, so don't point us to such, please.
If we will not be able to repro the behavior you're reporting

I see this has come up on StackOverflow questions, and registered as some stale issues here.
Are there any plans to make this a bit more user friendly / explicit?


I want to select refs (and tables)

When ref is long you can't track it on a screen size without scrolling

Done


UI fixes

closes #26
closes #22
sort of addresses #23
will push more commits here

Right now the out token and in token address is clearing when "create new swap" is clicked leading to an error


default model

Following up an earlier discussion about changing the default model (see #47 ): I was just playing with gpt-4 and from my perspective, it is much slower than gpt-3.5-turbo.

Related: https://community.openai.com/t/gpt-4-extremely-slow-compared-to-3-5/106298
OK, not sure then maybe we leave 3.5-turbo as the default for now?

is blazing fast on the web.  I wonder whether they do not ship the latest version for the API...

gpt-4 via API is really super slow, maybe something is broken at openAI?

gpt-4-preview seems cheaper and faster than gpt-4. we could consider it as new default...
https://openai.com/blog/new-models-and-developer-products-announced-at-devday

Side remark, did you try the latest web-API?
They got rid of the streaming preview....

Side remark, did you try the latest web-API? They got rid of the streaming preview....

I just tried and it's still streaming...

now streaming for me too, again...
I am fine with gpt-4-turbo as new default.

just tried and gpt-4-turbo is awesome! best experience so far, by far!
let's just hope that that does not degrade once more people are using it.....
issue with adding this now as default model is that the name will likely change soon, right now it is something with "preview".
anyway, right now, I am all for this being the new default!

I don't have access to it yet. Maybe we wait a bit before we make this default ;-)

Ok, I just read gpt-4-turbo is called gpt-4-1106-preview.
https://help.openai.com/en/articles/8555510-gpt-4-turbo


update menu_items column

Add "q" column for update menu name query

uhh.... what's the "q" column supposed to be for?

column not found: 1054 Unknown column 'q' in 'field list' (SQL: update menu_items )

I get the feeling you're doing something wrong.  Can you provide the full error and stacktrace?

vendor/laravel/framework/src/Illuminate/Database/Connection.php
catch (Exception $e) {             throw new QueryException(                 $query, $this->prepareBindings($bindings), $e             );         }
Illuminate \ Database \ QueryException (42S22) SQLSTATE[42S22]: Column not found: 1054 Unknown column 'q' in 'field list' (SQL: update menu_itemssettitle= Sistem Ayarlarıs,updated_at= 2018-02-08 18:43:15,q= adminv/menus/1/item whereid = 17)

I need the full error (which you provided), AND the full stacktrace.
Also, when you have blocks of code to format, please surround it with triple-backticks (```) before and after.

Illuminate \ Database \ QueryException (42S22)
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'q' in 'field list' (SQL: update `menu_items` set `title` = B_news, `color` = #000000, `updated_at` = 2018-02-09 12:55:50, `parameters` = , `q` = adminv/menus/1/item where `id` = 15)

/home/admin/web/dev.servistest.info/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php
     * @param  array     $bindings
     * @param  \Closure  $callback
     * @return mixed
     *
     * @throws \Illuminate\Database\QueryException
     */
    protected function runQueryCallback($query, $bindings, Closure $callback)
    {
        // To execute the statement, we'll simply call the callback, which will actually
        // run the SQL against the PDO connection. Then we can calculate the time it
        // took to execute and log the query SQL, bindings and time in our memory.
        try {
            $result = $callback($query, $bindings);
        }

        // If an exception occurs when attempting to run a query, we'll format the error
        // message to include the bindings with SQL, which will make this exception a
        // lot more helpful to the developer instead of just the database's errors.
        catch (Exception $e) {
            throw new QueryException(
                $query, $this->prepareBindings($bindings), $e
            );
        }

        return $result;
    }

    /**
     * Log a query in the connection's query log.
     *
     * @param  string  $query
     * @param  array   $bindings
     * @param  float|null  $time
     * @return void
     */
    public function logQuery($query, $bindings, $time = null)
    {
        $this->event(new QueryExecuted($query, $bindings, $time, $this));

        if ($this->loggingQueries) {
Arguments
"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'q' in 'field list' (SQL: update `menu_items` set `title` = B_news, `color` = #000000, `updated_at` = 201 ▶"

And you get this error when you do what?

when update menu name or menu's other description.

@xembill, do you get this with a fresh install?  I'm inclined to believe not since nobody else is complaining about it.  This means it's something to do with your app (forgot to publish/run migrations after upgrading or something like that).
In either case, we can't support you unless you give us what we ask for, specifically the FULL stacktrace

@fletch3555 yes thats fresh install and already publish migrations.
More, I have already shared 2 message above stacktrace.
Its just "Column not found: 1054 Unknown column 'q' in 'menu_items"
When I added 'q" column in menu_items table its works.

No, you've provided the error message.  The stacktrace will be multiple lines long and tell me the history of function calls that lead to that error being displayed.

Closing due to inactivity.  Once you provide the requested information, it can be reopened for review

This is due to specific nginx configuration:
location / { try_files $uri $uri/ /index.php?q=$uri&$args; }

this adds another parameter q=admin/menus/1/item
perhaps the Voyager should take only the necessary parameters, but not everything


Bootstrap 3 and CheckboxSelectMultiple: Checkboxes misaligned

Here is a test form:
class TestForm(forms.Form):
    THREE_CHOICES = (
        ('1', 'Choice 1'),
        ('2', 'Choice 2'),
        ('3', 'Choice 3'),
    )

    text_field = forms.CharField()
    single_select = forms.ChoiceField(choices=THREE_CHOICES)
    multiple_select = forms.MultipleChoiceField(choices=THREE_CHOICES)
    single_checkbox = forms.BooleanField()
    multiple_checkboxes = forms.MultipleChoiceField(choices=THREE_CHOICES, widget=forms.CheckboxSelectMultiple)

And this is what it looks like when rendered with {{ form|crispy }} using the "bootstrap3" template pack:

Notice that the checkboxes in the "Multiple checkboxes" portion of the form are too far to the left. The checkboxes actually get cut off if your browser is any narrower than 768 pixels.

There's also a possible CSS fix:
form label.radio, form label.checkbox {
    font-weight: normal;
    padding-left: 20px;
}

Resolved in #358


crash: unhandled instruction

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
run valgrind against loki-storage 1.0.10 on active service node
Screenshots or log files
If applicable, add screenshots or log files to help explain your problem.
vex amd64->IR: unhandled instruction bytes: 0x6F 0x72 0x77 0x61 0x72 0x64 0x49 0x54 0x30 0x5F
vex amd64->IR:   REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR:   VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=NONE
vex amd64->IR:   PFX.66=0 PFX.F2=0 PFX.F3=0
==11382== valgrind: Unrecognised instruction at address 0x682726.
==11382==    at 0x682726: ??? (in /opt/loki-launcher/bin/loki-storage)
==11382==    by 0x810328: boost::asio::detail::conditionally_enabled_mutex::scoped_lock::lock() (conditionally_enabled_mutex.hpp:74)
==11382==    by 0x81271B: boost::asio::detail::scheduler::task_cleanup::~task_cleanup() (scheduler.ipp:47)
==11382==    by 0x812F93: boost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&, boost::asio::detail::scheduler_thread_info&, boost::system::error_code const&) (scheduler.ipp:379)
==11382==    by 0x812A7A: boost::asio::detail::scheduler::run(boost::system::error_code&) (scheduler.ipp:154)
==11382==    by 0x81340D: boost::asio::io_context::run() (io_context.ipp:62)
==11382==    by 0x7C5299: loki::http_server::run(boost::asio::io_context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned short, boost::filesystem::path const&, loki::ServiceNode&, ChannelEncryption<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, RateLimiter&, loki::Security&) (http_connection.cpp:279)
==11382==    by 0x793EB8: main (main.cpp:207)
==11382== Your program just tried to execute an instruction that Valgrind
==11382== did not recognise.  There are two possible reasons for this.
==11382== 1. Your program has a bug and erroneously jumped to a non-code
==11382==    location.  If you are running Memcheck and you just saw a
==11382==    warning about a bad jump, it's probably your program's fault.
==11382== 2. The instruction is legitimate but Valgrind doesn't handle it,
==11382==    i.e. it's Valgrind's fault.  If you think this is the case or
==11382==    you are not sure, please let us know and we'll try to fix it.
==11382== Either way, Valgrind will now raise a SIGILL signal which will
==11382== probably kill your program.
==11382==
==11382== Process terminating with default action of signal 4 (SIGILL)
==11382==  Illegal opcode at address 0x682726
==11382==    at 0x682726: ??? (in /opt/loki-launcher/bin/loki-storage)
==11382==    by 0x810328: boost::asio::detail::conditionally_enabled_mutex::scoped_lock::lock() (conditionally_enabled_mutex.hpp:74)
==11382==    by 0x81271B: boost::asio::detail::scheduler::task_cleanup::~task_cleanup() (scheduler.ipp:47)
==11382==    by 0x812F93: boost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&, boost::asio::detail::scheduler_thread_info&, boost::system::error_code const&) (scheduler.ipp:379)
==11382==    by 0x812A7A: boost::asio::detail::scheduler::run(boost::system::error_code&) (scheduler.ipp:154)
==11382==    by 0x81340D: boost::asio::io_context::run() (io_context.ipp:62)
==11382==    by 0x7C5299: loki::http_server::run(boost::asio::io_context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned short, boost::filesystem::path const&, loki::ServiceNode&, ChannelEncryption<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, RateLimiter&, loki::Security&) (http_connection.cpp:279)
==11382==    by 0x793EB8: main (main.cpp:207)
Storage Server error: ==11382==
Storage Server error: ==11382== HEAP SUMMARY:
==11382==     in use at exit: 2,535,352 bytes in 16,157 blocks
==11382==   total heap usage: 1,645,058 allocs, 1,628,901 frees, 787,016,847 bytes allocated

Desktop (please complete the following information):

Device: linux
OS + Version: 5.0.15-1-pve Ubuntu 18.04LTS
Release Version or Github commit hash: 1.0.10

1.x series bug report, closing


The following assertion was thrown building Navigator-[LabeledGlobalKey<NavigatorState>#448d3](dirty, dependencies: [HeroControllerScope, UnmanagedRestorationScope, _FocusTraversalGroupMarker], state: NavigatorState#088a1(tickers: tracking 3 tickers)):
'package:flutter

/src/widgets/navigator.dart

': Failed assertion: line 5243 pos 12: '_history.isNotEmpty': is not true.

navigator.dart:5243

2

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.

The relevant error-causing widget was
MaterialApp
main.dart:254
When the exception was thrown, this was the stack
#2      NavigatorState.build
navigator.dart:5243
#3      StatefulElement.build
framework.dart:5080
#4      ComponentElement.performRebuild
framework.dart:4968
#5      StatefulElement.performRebuild
framework.dart:5133
#6      Element.rebuild
framework.dart:4690
#7      BuildOwner.buildScope
framework.dart:2743
#8      WidgetsBinding.drawFrame
binding.dart:863
#9      SchedulerBinding._invokeFrameCallback
binding.dart:1289
#10     SchedulerBinding.handleDrawFrame
binding.dart:1218
(elided 2 frames from class _AssertionError)

Hi @NZhlebinkov. Thanks for filing this. From the logs, the issue seems to be with your navigation after signOut and might not be describing a bug or a feature request. Please see https://flutter.dev/community for resources and ask questions like this, you may also get some help if you post it on Stack Overflow
Closing, as this isn't an issue with Flutter itself. If you disagree, please provide all or some of the information indicated in the template so that we can address this issue properly.
More specifically, please provide the information indicated below:

A completed and minimal reproducible code sample
The output of flutter doctor -v
Reproduction steps

Also, write in the comments and I will reopen it.
Thank you


connection via https

I had to deactivate forced https because the tool connects through http. Any chance to use https?

Hi, I just verified that the plex media server supports HTTPS calls, I does. I'll patch to issue the calls to the server over HTTPS.
Thank you for pointing it out !

thx