text:
Supporting new Bitcoin core version v0.16.1

For rpc  command    (listunspent, sendrawtransaction )
ListUnspentAsync  (query_options    )
SendRawTransactionAsync not returning transaction  id

listunspent ( minconf maxconf  ["addresses",...] [include_unsafe] [query_options])

Returns array of unspent transaction outputs
with between minconf and maxconf (inclusive) confirmations.
Optionally filter to only include txouts paid to specified addresses.

Arguments:
1. minconf          (numeric, optional, default=1) The minimum confirmations to filter
2. maxconf          (numeric, optional, default=9999999) The maximum confirmations to filter
3. "addresses"      (string) A json array of bitcoin addresses to filter
    [
      "address"     (string) bitcoin address
      ,...
    ]
4. include_unsafe (bool, optional, default=true) Include outputs that are not safe to spend
                  See description of "safe" attribute below.
5. query_options    (json, optional) JSON with query options
    {
      "minimumAmount"    (numeric or string, default=0) Minimum value of each UTXO in BTC
      "maximumAmount"    (numeric or string, default=unlimited) Maximum value of each UTXO in BTC
      "maximumCount"     (numeric or string, default=unlimited) Maximum number of UTXOs
      "minimumSumAmount" (numeric or string, default=unlimited) Minimum sum value of all UTXOs in BTC
    }

Result
[                   (array of json object)
  {
    "txid" : "txid",          (string) the transaction id
    "vout" : n,               (numeric) the vout value
    "address" : "address",    (string) the bitcoin address
    "account" : "account",    (string) DEPRECATED. The associated account, or "" for the default account
    "scriptPubKey" : "key",   (string) the script key
    "amount" : x.xxx,         (numeric) the transaction output amount in BTC
    "confirmations" : n,      (numeric) The number of confirmations
    "redeemScript" : n        (string) The redeemScript if scriptPubKey is P2SH
    "spendable" : xxx,        (bool) Whether we have the private keys to spend this output
    "solvable" : xxx,         (bool) Whether we know how to spend this output, ignoring the lack of keys
    "safe" : xxx              (bool) Whether this output is considered safe to spend. Unconfirmed transactions
                              from outside keys and unconfirmed replacement transactions are considered unsafe
                              and are not eligible for spending by fundrawtransaction and sendtoaddress.
  }

sendrawtransaction "hexstring" ( allowhighfees )

Submits raw transaction (serialized, hex-encoded) to local node and network.

Also see createrawtransaction and signrawtransaction calls.

Arguments:
1. "hexstring"    (string, required) The hex string of the raw transaction)
2. allowhighfees    (boolean, optional, default=false) Allow high fees

Result:
"hex"             (string) The transaction hash in hex

When do you planning implement it ?

I don't know, feel free to make a PR, it does not seems to complicated, I would merge fast.

I tried to implement it. But there were various errors with parsing Json.
NBitcoin.RPC.RPCException: JSON value is not an object as expected
RPC_MISC_ERROR

Take example on GetNewAddress where several options are passed.

Same error (
I can not send JSON
query_options    (json, optional) JSON with query options
    {
      "minimumAmount"    (numeric or string, default=0) Minimum value of each UTXO in BTC
      "maximumAmount"    (numeric or string, default=unlimited) Maximum value of each UTXO in BTC
      "maximumCount"     (numeric or string, default=unlimited) Maximum number of UTXOs
      "minimumSumAmount" (numeric or string, default=unlimited) Minimum sum value of all UTXOs in BTC
    }

How I can forming this query  { "minimumAmount": 0.005 }
{"jsonrpc":"1.0","id":1,"method":"listunspent","params":[1,9999,[],true,{"minimumSumAmount": 1}]}
is not valid json for json writer

Use named arguments, as I did inside GetNewAddressAsync(GetNewAddressRequest request).
As value of query_options, create a JObject with the right properties.

authors: Ilchuk-Mihail NicolasDorier

repo: MetacoSA/NBitcoin


text:
Await send message operations to avoid unobserved exceptions

This PR attempts to fix some places where unobserved exceptions can be thrown. I would like to avoid introducing NBitcoin's design changes as much as possible. Note that this PR is not complete in the sense that it does not fix all SendMessageAsync calls (depends on feedback).
The PR is meant to be a preview really. Anyway, I believe that awaiting https://github.com/MetacoSA/NBitcoin/blob/cb6d64664b9f38d0442a4a4ad5edaed9e310bf40/NBitcoin/Protocol/Node.cs#L1085 would lead to significant decrease of unobserved exceptions in Wasabi.
WDYT? Concept ACK?
note: I believe https://github.com/zkSNACKs/WalletWasabi/issues/2554 is a result of not awaiting some an async method.

what's up with this?

source: gharchive/pull-request

authors: MaxHillebrand kiminuo

license: MIT

license_type: permissive

license_source: github-api


text:
Start planning for model refactoring

pathway.model is currently a huge mess that needs some serious love.
It would be nice if we could do something similar to #42 and separate the Scala and Java APIs so that we can make them both more idiomatic rather than having to write code that compromises between those two languages.
However, unlike pathway.io, I feel like model doesn't have as much of a logical entry point for inversion of control. In io, everything comes directly from a ResourceManager, so as long as you make sure to start with either a Scala or Java ResourceManager, we can ensure that you're handed the correct FileHandle types. Unfortunately, model doesn't really have a single entry point. You create lots of things via their constructors.
It would also just be really nice if a lot of the weird and ugly code in there could be cleaned up and made more elegant. The telescopic constructors could be de-uglified using named arguments with defaults (and possibly the addition of builders for Java clients). GameObject doesn't do most of the stuff it will eventually handle. I don't really know why Payload is necessary, considering that it's mostly just a wrapper for a Map with the addition of stamping (which could just go on the Events themselves?), but at the very least we could make it less gross by just mixing in one of the Scala Map traits (like we do in ForkTable) rather than having to wrap all of the underlying map's various operations. Obviously script is going to be completely ripped out and rewired as well (#52), so maybe there would be opportunities to build in some easier script integrations at this stage as well.

Looking at model, I also feel like there's a lot of repetition that could be refactored out pretty easily. Like, for example, Property has a bunch of stuff in it for getting and setting DrawIDs and so forth that could obviously just be refactored out and put in a Drawable trait or something.
Similarly, we have some really similar code for getting and setting locations that's repeated in Entity and TileProperty (and that we might also want to have in some types of events), and I feel like that could be easily refactored out into a WithLocation trait or something. This might be especially useful if we want to the grid/location system actually useful or add more location based features (for example, instead of holding a reference to the tile we're at, we could just hold an ordered pair and look up that tile against the context that holds it when necessary); because we wouldn't want to duplicate that code in anything that can occupy a location.

See also changes to the script system (#57)

See #61

We nuked everything in the nashorn-script branch; closed by merging 87529d0e47cb4963777037849b4dec1aa1de9861.

source: gharchive/issue

repo: MeteorCode/Pathway

license: mit

license_source: bigquery


text:
🛑 MEP API is down

In cf71a82, MEP API (https://api.metropoliplan.org/api/healthz) was down:

HTTP code: 0
Response time: 0 ms

Resolved: MEP API is back up in 76a7743 after 16 minutes.

repo: MetroPoliPlan/MEP-Status


text:
[Feedback] New Items in Feedback do not get the tools button associated with them

User cannot click tool to add as issue to Github.

Fixed with #206

authors: Keareys mziyambi


text:
aarch64-darwin: pr fails on unrelated package live555

Trying to use pr, wip, or even rev on aarch64-darwin fails on this seemingly unrelated package, trying to -P live555 and/or -p packageToActuallyBeTested doesn't seem to affect anything. All leads to an error like the following (picked a random PR here):
[...]
$ nix-env --option system aarch64-darwin -f /Users/ash/.cache/nixpkgs-review/pr-133535/nixpkgs -qaP --xml --out-path --show-trace
error: attribute 'aarch64-darwin' missing

       at /Users/ash/.cache/nixpkgs-review/pr-133581/nixpkgs/pkgs/development/libraries/live555/default.nix:29:22:

           28|
           29|     ./genMakefiles ${{
             |                      ^
           30|       x86_64-darwin = "macosx";

       … while evaluating the attribute 'configurePhase' of the derivation 'live555-2019.11.22'

       at /Users/ash/.cache/nixpkgs-review/pr-133581/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:203:11:

          202|         // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          203|           name =
             |           ^
          204|             let

       … while querying the derivation named 'live555-2019.11.22'
https://github.com/NixOS/nixpkgs/pull/133581 failed to build

Using --system x86_64-darwin is one workaround but doesn't always work.
error: a 'x86_64-darwin' with features {} is required to build '/nix/store/fjdavfgdbrfdmc5p0v5n35bqyrqfkn5r-source.drv', but I am a 'aarch64-darwin' with features {benchmark, big-parallel, nixos-test, recursive-nix}

I think the code here https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/live555/default.nix#L29-L34 lacks handling for other arches. nixpkgs-review evals all packages once ignoring meta.broken to know which packages are available and the code piece does not work for that. I thought ofborg should catch such issues.

@polynomialspace Could you locally checkout https://github.com/NixOS/nixpkgs/pull/133732 and do nixpkgs-review rev HEAD? I think that should show us if the fix works and where the next problem is if that attempt is correct.

That seems to have done it. Misunderstanding how nixpkgs-review works I thought this was something deeper.


text:
Cant get Open CV to work

I get multiple issues when trying to add Open CV to my project. So my first error in XCode...
ld: framework not found opencv2
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I then tried to add it manually to the Build Phases > Link Binary with Libraries I get the follwing error
/Users/mika/Library/Developer/Xcode/DerivedData/JuliaStudy-civerreznbtmgwezznnemirozxxf/Build/Intermediates/JuliaStudy.build/Debug-iphonesimulator/JuliaStudy.build/Script-00DD1BFF1BD5951E006B06BC.sh: line 3: ../node_modules/react-native/packager/react-native-xcode.sh: No such file or directory
So... it would be really nice to have a solution with iOS Core graphics instead of Open CV.

Actually adding openCV is normally pretty easy on iOS. The linker error is straightforward, there is a reference to the framework but it can't be found.
You must add the opencv2.framework to both your main xcode project and the Library. Right click on your project, add files -> choose your opencv2.framework. Repeat with the Library/React-native-perspective-image-chopper folder.
The second error however does not seem to be related to this library at all.
If you want you can always try using the code referenced in #2.
Put it in node_modules/react-native-perspective-image-cropper/ios/Customcropmanager.mm. Remove all the references to openCV and try to make work this way, you should just face orientation troubles. I can't work on it for now.

Got it. I guess this has to do with me not being an iOS dev, I am just banging my head against the wall here :( I must be doing something stupid here, because my project builds when I remove the OpenCV framework and your module to XCode, but when I add them I get multiple different errors. I understand you don't have time to fix the iOS Core Graphics solution... do you think you would have time to record a 2 minute screen cast with quicktime and publish on Youtube on how you add this module to the project? Your module is the perfect solution to my app, but I am so stuck right now :(

Tell me if this helps https://youtu.be/aZ8j_M_837Q

Nope. Tried over and over and over again, and no luck. Sorry that I didn't answer, but I really wanted to put some hours down before I said I couldn't get it working.
Some of the initial instructions differ from what I am able to do, for example I have to install the react-native-svg by "npm install --save react-native-svg && react-native link", but now I have issues with RNSVG giving me build failures. Have you tried to install this in a fresh RN project? To me it seems that you are showing this from an existing project. Cheers

authors: Michaelvilleneuve mikasjoman


text:
Difficulties generating reasonable actions

I followed the Embodied CoT reasoning example notebook, loading in the model with the following code:
path_to_converted_ckpt = "Embodied-CoT/ecot-openvla-7b-bridge"
processor = AutoProcessor.from_pretrained(path_to_converted_ckpt, trust_remote_code=True)
vla = AutoModelForVision2Seq.from_pretrained(
path_to_converted_ckpt,
torch_dtype=torch.bfloat16,
low_cpu_mem_usage=True,
trust_remote_code=True,
# [Optional] Set load_in_4bit=True if not enough GPU memory + run pip install bitsandbytes
# Then, comment out .to(device)
).to(device)
and the provided prompt. I used this code to generate actions:
action, generated_ids = vla.predict_action(**inputs, unnorm_key="bridge_orig", do_sample=False, max_new_tokens=1024)
generated_text = processor.batch_decode(generated_ids)[0].
This produces good task reasonings. However, when I run the model on various bridge tasks and images (offline) I am not able to get the model to generate reasonable actions. For example, the gripper seems to never close and the actions differ greatly from both ground truth actions and OpenVLA outputs. I first tried Embodied CoT on the simpler env widowx tasks, and the gripper always drifts off screen, whereas OpenVLA generates good actions - with up 50% task success on the place eggplant task (embodied cot always 0% success).
I also ran the model on images/rollouts from various bridge tasks offline, to see how well Embodied CoT matched ground truth action and OpenVLA actions. On the task "take the blue spoon off the burner and put it on the right side of the burner", Embodied CoT had average L2 norm vs ground turth actions of 0.44, whereas openVLA had 0.16. I found that even although Embodied CoT generates the correct reasonings most of the time for this task, the actions are not alight; ie when the move reasoning is "close gripper" the action is not to close the gripper. This appears to be an action normalization issue, as the index 5 of the action appears to be the gripper action, and index 0 appears to be flipped. How should the actions be correctly processed?

I'm wondering if it's an issue related to a difference between predict_action on HuggingFace in OpenVLAForActionPrediction versus predict_action in openvla.py.
Specifically, it looks like this operation (https://github.com/MichalZawalski/embodied-CoT/blob/22244869fe449d4f47b5234cae752d1e7e03f94e/prismatic/models/vlas/openvla.py#L207) occurs in openvla.py before action denormalization
but not here (https://huggingface.co/Embodied-CoT/ecot-openvla-7b-oxe/blob/bcc12ab58303ee2d6da5ca1be4efc4d9914d8354/modeling_prismatic.py#L518)
Could this be the issue?

So true bestie, just updated the HF model s.t. actions now take
predicted_action_token_ids = generated_ids[0, -(self.get_action_dim(unnorm_key) + 1) : -1].cpu().numpy()

(so final 7 tokens other than the EOS token).
With that change, the example inference from the Colab notebook now produces the actions:
[ 0.01321167, -0.03668522,  0.00027841, -0.0205739 , -0.02891492, -0.08065662,  0.        ]
instead of
[-0.0252603  -0.00884188 -0.00154037 -0.0199353  -0.04030262 -0.00167851 0.99607843]
which should be correct (the last term being open / close gripper should only ever be 0, 1)
Thanks for catching this!

authors: jadenvc smirchan verityw

repo: MichalZawalski/embodied-CoT


text:
missing lib versions in Project.toml

missing the versions of:

julia
Weave

Is the Julia version part of the Project.toml environment?

Do not include Weave, not necessary for the use of the content.
Consider removing Plots, since it is only used once.

I have tested it several times, startup times are lower than 20 seconds. Is it slower on your devices? Maybe it is not necessary to remove Plots?

Is the Julia version part of the Project.toml environment?

Now it is stated that at least Julia version 1 is required. Seems to be ok.

It is fast for me.  Plots is used twice, I don't think it is necessary to remove this. Isn't it necessary for binder?

I haven't found anything on "standard libs" that are loaded in binder, so I would keep it.

Ok
On Tue, 17 Dec 2019, 22:12 DaanVanHauwermeiren, notifications@github.com
wrote:

I have tested it several times, startup times are lower than 20 seconds.
Is it slower on your devices? Maybe it is not necessary to remove Plots?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/MichielStock/Julia925/issues/15?email_source=notifications&email_token=ABN5PI6T74QJIA32JNKNWIDQZE6DDA5CNFSM4JY227DKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHD66LI#issuecomment-566751021,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABN5PI6CWYDGDU5O5GN5GELQZE6DDANCNFSM4JY227DA
.

I'm going to test all notebooks now to see if everything is fine

just for clarity, when using
[compat] julia = "1"
it appears to be using the latest stable relase, which is 1.3.
Everything seems to be ok, closing issue


text:
convert project to new MPP format

In kotlin 1.3 there is a new format for MPP projects. we need to convert to that format.

Were you also thinking about moving tothe Gradle Kotlin DSL as part of this change?

initially not, but I am open to that change as well. Last time I checked, it was not mature enough.

Fixed in #81 released in 1.7.1

authors: amcghie oshai

repo: MicroUtils/kotlin-logging


text:
[Bug] Feedback section doesn't work

Bugs

[ ] The feedback section is not open for voters
[ ] Feedback disappear after some time

need to remove duplicates


text:
[Event Request] Codeunit 408 ; Function GetDefaultDimID

Hi,
we need an Event with handler pattern in Codeunit 408 Dimension Management in Function GetDefaultDimID.

With Parameters:
VAR DimensionBufferTmp2RL : TEMPORARY Record "Dimension Buffer";
TableIDL : Integer;
NoL : Code[20];
GLSetupShortcutDimCodeL : ARRAY [8] OF Code[20];
VAR globalDimCode1RL : Code[20];
VAR globalDimCode2RL : Code[20];
var isCreatedRL : boolean
Thanks in Advance

In our solution we use Item variants. We have custom variant tables, that we want to use in the Dimensions, therefore we want to insert our own Dimensions, instead of using the ones created here.

Does it mean what actually you need possibility to set up Dimensions for Item Variants?

Well to keep it simple, in this event subscriber we insert into temp table TempDimBuf2 and we also create entries in DimValue (Rec 349). If you need further information i will have to ask the original programmer.

authors: AlexanderYakunin LFlamme

repo: Microsoft/AL


text:
MaxStrLen Deprecated?

Hi,
I'm trying to resolve some CodeCop error but I'm stuck here:
I was used to solving the error "Possible overflow assigning 'Text' to 'Code[128]'. (AL0139)" simply by adding a CopyStr(myVar,1,MaxStrLen(MyVar)).
But today I found out this Warning message:
{
	"resource": "",
	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "AL0141",
	"severity": 4,
	"message": "'MaxStrLen' is deprecated",
	"source": "AL",
	"startLineNumber": 55,
	"startColumn": 81,
	"endLineNumber": 55,
	"endColumn": 104
}

Assuming that I would not like to implement some hard-coded code (like CopyStr(myVar,1, MaxStrLen(50)) ) also to make my code easier to maintain, How can I fix that?
Thanks
Stefano Primo

AL Extension Version: 2.1.99743

Server Version: BC RTM (13.0.24623.0) with a W1 Cronus DB

I leave an Update:
I was watching my code where throws this warning and I saw this:

Now I'm a bit disappointing: If you watch carefully you will see the MaxStrLen that throws the warning and a few lines before there is also another MaxStrLen that does not throw any type of error/warning.

Hi @stefanoPrimo,
The reason why you are getting an error on one and not the other is because the method has an overload. The first takes a text and the second a variant.
The method that takes a variant results in a error being raised not matter what, so you need to change it to a text if you want to use that method.

Hi @thpeder,
Thanks a lot, I didn't saw or knew that the MaxStrLen method could have an overload.

authors: stefanoPrimo thpeder


text:
Application Area Page not visible

The application area is set to basic, the same on the company information. The page is not displayed on the search. How do I do to show it up on the search?

We are currently working on the ability to have pages created in extensions show up in the search. It is not possible right now.

Hi @andrecavalcanti, it is possible to add your pages and report to the search bar by using the property UsageCategory. This is available in the AL extension from the December update (version: 0.12.15359).
For more information on how to use it, see the online doc: Adding Pages and Reports to Search.
I hope this solves your issue!

authors: andrecavalcanti esbenk qutreson


text:
ComponentVersionTelemetryInitializer is not having implementationType in services

As a result, customers can never get access to this service, when they check the initializers through ImplementationType property of service.

Fixed it as a part of : https://github.com/Microsoft/ApplicationInsights-aspnetcore/pull/163


text:
Database wrapper code fails with a Promise, expects a callback

When we use the postgres pg module within node and turn on application insights, the code that explicitly requests a connection from the pg pool fails.  We have traced this down to an issue within application insights whereby it is not handling a promise correctly, but expects a callback.
To replicate the issue use the following test script.....
'use strict';

const ai = require('applicationinsights');
const pg = require('pg');
const url = require('url');

const DB_URL = 'postgres://user:password@localhost:5432/db';
const USE_SSL = false;
const INSTRUMENTATION_KEY = '';

ai.setup(INSTRUMENTATION_KEY).start();

async function createPool(dbUrl, ssl) {
    const params = url.parse(dbUrl);
    const auth = params.auth.split(':');

    const poolConfig = {
        user: auth[0],
        password: auth[1],
        host: params.hostname,
        port: params.port,
        database: params.pathname.split('/')[1],
        ssl,
    };

    const pool = new pg.Pool(poolConfig);

    pool.on('error', function (err, client) {
        if (err.message === 'read ECONNRESET') {
            console.log(`DB connection reset.`);
        } else {
            console.error(`DB pool error: ${err.message} ${err.stack}`);
        }
    });

    return pool;
}

async function fails(pool) {
    // This does _not_ await - it immediately returns undefined
    const conn = await pool.connect();
    console.log(`Connected: ${conn}`);
}

async function succeeds(pool) {
    pool.connect((err, conn) => {
        if (err) {
            console.error(err);
        } else {
            console.log(`Connected: ${conn}`);
        }
    });
}

async function executeQuery(pool, sql, args) {
    return pool.query(sql, args || []);
}

async function test() {
    try {
        const pool = await createPool(DB_URL, USE_SSL);
        await fails(pool);
        // await succeeds(pool);
    } catch (err) {
        console.error(err);
    }
}

test();

Thanks for the report and repro code! Looks like this might be a bug in the patching for pg. As a workaround you can disable it with an environment variable like this:
APPLICATION_INSIGHTS_NO_PATCH_MODULES=pg,pg-pool


text:
Device.Id in metrics

Hi,
I've added a tag to my client context for setting my custom device id. It works well on traces, but I don't see the device id as a grouping criteria in metrics. Is it supported and correctly sent in metrics?
Thanks!

Our latest recommendation is to start using device roleInstance instead of device id. You should be able to group metrics by roleInstance.
Device ID is used in devices monitoring and can be quite high cardinality. Think of every phone having unique ID. So we do not allow to group by it

That's in fact what I wanted to do, group metrics by single device. But as you pointed out, this would be impractical in case of a large number of devices.
Thanks.

authors: SergeyKanzhelev bragma


text:
Error when copying one attached blob container with name containing "_"

Storage Explorer Version: 1.7.0/20190227.3
Platform/OS Version: Windows 10/ MacOS High Sierra/ Linux Ubuntu 16.04
Architecture: ia32
Commit: 1f111467
Regression From: Not a regression
Steps to Reproduce:

Get SAS URI for one normal blob container like below.
Blob Container: newblob
SAS URI: [REDACTED]
Open 'Connect' dialog -> Paste the copied URI then update the display name containing underlines on 'Attached with SAS URI' dialog (Like 'newblob' => 'newblob_test1')-> 'Connect'.
Expand 'Local & Attached' -> 'Storage Accounts' -> (SAS-Attached Service) -> 'Blob Container'.
Right click the attached blob container then click 'Copy Blob Container'.

Expected Experience:
No error occurs.
Actual Experience:
An error occurs.

More info:

Execute other actions like 'Open'/'Detach'/'Add to Quick Access' for the attached blob container without errors.
This issue doesn't reproduce for attached file shares/tables.

The problem is copy is trying to use the display name instead of proper container name. Easy fix.

authors: craxal v-xuanzh

repo: Microsoft/AzureStorageExplorer


text:
NodeJS: UserData not saved

Hi,
I may have missed something, tested with the emulator,
bot.dialog('/', [(session) => {
   session.userData.cpt = (session.userData.cpt || 0) + 1;
 }]);

User data seems to be never saved ?

Ok calling session.save() after a modification will work.
I thought it was magically saved();

Can you show the rest of your code please?  If all you're doing is modifying userData and you're not calling send() or beginDialog() afterwards you will need to call save(). You also need to call save() if you do something like make an async call and simply want to persist something to userData afterwards.  Think of it more like cookie storage. Modifications are bounded to the lifetime of your bots response.

Hum, that might be that.
I made a little implementation of MSBot in NodeRED. So I may or may not call send() while storing some data.
At last, I always call save() so i'm sure not to lost something

authors: JpEncausse Stevenic

repo: Microsoft/BotBuilder


text:
[Direct Line] My bot's first message appears very slow?

Bot Info

SDK Platform: Node.js
SDK Version: 3.10.1
Active Channels: Direct Line
Deployment Environment: Amazon

My First message appears very slow, all other message are relatively fast.
Let me know how can I improve the performance for bot builder.
When Bot WebChat Direct Line is getting connected to  BotBuilder, it make a api call
https://directline.botframework.com/v3/directline/conversations , is there a way I can bypass it.

I noticed the same behaviour

@mitijain123 This is a known issue with Direct Line.
It's not a good idea to try to disable API calls because your bot will not function correctly.
It is totally normal for the first message on conversation initiation to take longer to resolve. Once the conversation gets going, there shouldn't be any such issues.
One way to address this is to ping your bot on regular intervals using automated scripts.

@nwhitmont How do we tell a new user that the first message of the bot will take longer than usual?  The new user will not be aware that we are processing the first message.


text:
Masking sensitive user data

SDK Platform: .Net
SDK Version: Latest
Active Channels: Facebook, Webchat
Deployment Environment: Azure

I have a chat bot where the user will input some sensitive data, I would like to mask the user input, like account number, bank credit card number, pin, etc...

Hi @waleedabuyahia
The bot builder sdk does not contain client side rendered controls.  In order to have a masking control client side, you would need to work with the client library itself.

authors: EricDahlvang waleedabuyahia


text:
PSID, webview and the messenger_extensions parameter

Bot Info

SDK Platform: Node.js
SDK Version: 3.15
Active Channels: Facebook
Deployment Environment: Azure App Service

Issue Description
Some features in Facebook Messenger's webview do not work if the incoming message does not contain the messenger_extensions: true property. In particular, one cannot get the user ID (PSID) of the user and execute the getContext() function of the Facebook SDK.
Currently botbuilder does not provide a way to set the messenger_extensions parameter, unless you create the entire message by yourself in the Facebook native format and place it into the channelData property of the message.
Expected Behavior

For HeroCards, there needs to be a way to set a parameter which ultimately results in this: the message sent from Bot Framework to Facebook contains the property messenger_extensions: true.

Hi @catcher-in-the-try
Thank you for this suggestion.  I've added it to the Facebook Messenger Feature Request issue: https://github.com/Microsoft/BotBuilder/issues/4360  We are currently using this to track all Facebook Messenger feature requests.

authors: EricDahlvang catcher-in-the-try


text:
Select client certificate tests

Increase code coverage of Dialogs (including ClientCertSelectDialog) & uiCommands

Pull Request Test Coverage Report for Build 1208

18 of 21 (85.71%)  changed or added relevant lines in 4 files are covered.
13 unchanged lines in 4 files lost coverage.
Overall coverage decreased (-0.05%) to 54.78%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

packages/app/client/src/ui/dialogs/clientCertSelectDialog/clientCertSelectDialogContainer.ts
3
4
75.0%

packages/app/client/src/ui/dialogs/clientCertSelectDialog/clientCertSelectDialog.tsx
7
9
77.78%

Files with Coverage Reduction
New Missed Lines
%

packages/emulator/core/src/utils/approximateObjectSize.ts
1
74.19%

packages/app/main/src/utils/isLocalhostUrl.ts
2
20.0%

packages/app/shared/src/types/serverSettingsTypes.ts
3
54.55%

packages/app/main/src/utils/getThemes.ts
7
30.0%

Totals

Change from base Build 1200:
-0.05%

Covered Lines:
4333

Relevant Lines:
7136

💛  - Coveralls

authors: corinagum coveralls

repo: Microsoft/BotFramework-Emulator


text:
Send box in speech listening mode don't auto scroll to far right

Repro steps:

Resize Web Chat window to be as narrow as possible without clipping
Click on microphone button
Say a very long sentence, like, "A quick brown fox jumped over the lazy dogs"

Expected: when the intermediate result is shown, Web Chat should keep the latest words on the screen by scrolling right
Actual: we only show the first few words, clipped everything else
Investigations:

We move caret with selectionStart = selectionEnd = value.length

This only works when the send box is focused
UX-wise, we stop listening when the send box is focused

When speech start, turn  into a single-line

Change the parent to be scrollable, and auto-scroll to far right

I think a better solution is provide multi-line support.

Related to #124

authors: compulim corinagum

repo: Microsoft/BotFramework-WebChat


text:
cross-platform: Make amd64 asm files compatible with OSX

The assembly files fail to assemble due to unsupported @plt modifier and fail to link on OS X due to missing label prefix on function names.

Hi @tadeuzagallo, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;

@tadeuzagallo IMO these files need a bit more change to be OSX compatible or to be able to pass the linker.
However,  I'm okay with the changes overall. Please update the title from compatible with to compiles on, and squash your changes.
Thanks for the PR!

LGTM. @tadeuzagallo Thanks for the PR again

authors: msftclas obastemur tadeuzagallo

repo: Microsoft/ChakraCore


text:
fix an invalid DynamicObject* cast

Scope objects are not always "DynamicObject"s (e.g. may be of type
"WithScopeObject"). Use RecyclerObject instead.

similar issue in PatchGetPropertyScoped as well

similar issue in PatchGetPropertyScoped as well

You are right, fixed in update

Thanks @Penguinwizzard @rajatd

authors: jianchun rajatd


text:
[Manual] - Comment is closed after adding of a reply in offline

Commit number: 12778db
Preconditions: Test user is signed in;
Steps to reproduce:

Open a comment with several pages of replies
Set the application to offline mode
Add a reply to the comment

Actual Result: The "Comment" screen is closed
Expected Result: The "Comment" screen is opened and the added reply is displayed

Сould not reproduce.

Jaroslaw reproduced it in 100%

Verified on the build from commit number 949aa726711635969e6cb57e2adf4ac9951e3a17

authors: JaroslawRomanovich mrdevms orezhko

repo: Microsoft/EmbeddedSocial-iOS-SDK


text:
Issue with 'random_state' parameter in LightGBM 2.1.0

I am using lightgbm 2.1.0 for a binary classification problem.
Here, my model :
from sklearn.feature_selection import SelectKBest
from sklearn.feature_selection import f_classif
from lightgbm.sklearn import LGBMClassifier
from sklearn.pipeline import Pipeline
clf = Pipeline([("selectfeat", SelectKBest(f_classif)), ("model", LGBMClassifier(n_estimators = 1000, subsample = 0.8, colsample_bytree = 0.8, n_jobs = 1, random_state = 1234))])
When I fit the model to my data, I got this error : " KeyError: 'random_state' "
Indeed, the error message also reports which part of the code of lightgbm triggers this error :
/usr/local/lib/python2.7/dist-packages/lightgbm/sklearn.py
388         # sklearn interface has another naming convention
389         params.setdefault('seed', params.pop('random_state'))
Nothing in the documentation and in LGBMClassifier parameters indicates that 'random_state' cannot be used. And I think that it is strange to go back to previous naming convention so drastically in an upgraded version, whereas it was changed in previous versions (e.g. lightgbm 2.0.10) to respect Scikit-Learn conventions.

Hi,
I'm also using lightgbm 2.1.0 (installed via conda) and for me the random_state arg of the sklearn API works (also in the fit). The differencesin what i have tried: I do not use a pipeline.
The line that you pointed out prepares arguments for the native lightgbm.train() call. I'm a new user, so i do not know the history of past releases. But the code looks as if random_state was implemented in the sklearn API, but the native API kept the original arg names. This is not a problem (only a little confusion for users of different API's). The problem is that in your case the code thinks that there is no random_state attribute of the class as collected by get_params(), and thus params.pop('random_state') raises the KeyError. Why does it happen- i have no idea. More experienced people can comment. How to fix it/ improve on it- do params.pop('random_state', None) in that line (and the following one for n_jobs ).

I have got the same issue with LightGBM 2.0.10 but with the parameter "n_jobs".

@StrikerRUS could you please comment?

@AlexandraBomane Could you reproduce the error with latest version and random data? Please provide random data generator code.

ping @AlexandraBomane

@AlexandraBomane On my compute the following code works fine. The only change of your code I've made was k='all'
from sklearn.feature_selection import SelectKBest
from sklearn.feature_selection import f_classif
from lightgbm.sklearn import LGBMClassifier
from sklearn.pipeline import Pipeline

clf = Pipeline([("selectfeat", SelectKBest(f_classif, k='all')),
                ("model",LGBMClassifier(n_estimators=1000,
                                        subsample=0.8,
                                        colsample_bytree=0.8,
                                        n_jobs=1,
                                        random_state=1234))])

from sklearn.datasets import load_iris

iris = load_iris()
clf.fit(iris.data, iris.target).predict(iris.data)

ping @AlexandraBomane
Is this problem still presented in your environmental?

I was running several models like that with the function Parallel().
When I set the argument "backend" as "multiprocessing", instead of "threading", I solved the problem.

authors: AlexandraBomane StrikerRUS guolinke mlisovyi

repo: Microsoft/LightGBM


text:
Mrtk 2018beta stabilization getting started guide

Overview
Getting started documentation, first pass for feedback.
Comments please (WIP), include any additional sections that everyone feels is necessary for a "Getting Started".
Currently in progress:

Getting Started
Download Instructions
Configuring the toolkit (Started...)
Links to non-existent guides listed, for future tbc

Mixed Reality Configuration Guide
Getting to know the Mixed Reality Toolkit Input System (Coming Soon)
Customizing your controllers in the MRTK (Coming Soon)
A walkthrough the UX components of the MRTK SDK (Coming Soon)
Using Solvers to bind your objects together (Coming Soon)
Creating interactions between the player and your project (Coming Soon)
Guide to Mixed Reality Profiles (Coming Soon)
Guide to Building Registered Services (Coming Soon)
Guide to Creating / managing pointers (Coming Soon)

These are placeholders until the relevant people responsible for those systems can document guides for them.
Changes

Resolves #2974

Fresh updates in baring the s-> z and a little reworking.
Captured all the profile images for the config guide, need to add words

Ready for final review everyone :D @davidkline-ms ?

Any further comments @davidkline-ms / @StephenHodgson ? Anyone?
If not, why isn't this merged already, since we are almost a week past beta :S

Any further comments @davidkline-ms / @StephenHodgson ? Anyone?
If not, why isn't this merged already, since we are almost a week past beta :S

Been swamped recently... sorry. Merging now.

So do you have a path for this to now get to release /dev @davidkline-ms ? thought the old stabilization branch had been deleted?

authors: SimonDarksideJ davidkline-ms

repo: Microsoft/MixedRealityToolkit-Unity


text:
DStream API review - new in 1.6.0

Add new DStream APIs to SparkCLR

http://spark.apache.org/docs/1.6.0/api/scala/org/apache/spark/streaming/dstream/DStream.html
http://spark.apache.org/docs/1.6.0/api/scala/org/apache/spark/streaming/dstream/PairDStreamFunctions.html
http://spark.apache.org/docs/1.6.0/api/scala/org/apache/spark/streaming/dstream/MapWithStateDStream.html
http://spark.apache.org/docs/1.6.0/api/scala/org/apache/spark/streaming/dstream/ConstantInputDStream.html

MapWithStateDStream has already been supported in Mobius.
https://github.com/Microsoft/Mobius/blob/master/csharp/Samples/Microsoft.Spark.CSharp/DStreamStateSample.cs#L49

ConstantInputDStream now is also supported by https://github.com/Microsoft/Mobius/commit/f6777a3098a2af31f57bdb970f80af57232ddac4

Except MapWithStateDStream and ConstantInputDStream, no other changes are found in

http://spark.apache.org/docs/1.6.0/api/scala/org/apache/spark/streaming/dstream/DStream.html
http://spark.apache.org/docs/1.6.0/api/scala/org/apache/spark/streaming/dstream/PairDStreamFunctions.html

repo: Microsoft/Mobius


text:
15 phút có ngay bữa sáng thành công với bún thịt bò rau cần

Bún thịt bò rau cần sẽ không làm mất nhiều thời gian chuẩn bị trước, rất thích hợp cùng bữa sáng nhanh gọn đủ chất.
PHẦN 1: THÀNH PHẦN CẦN CHUẨN BỊ ĐỂ CHẾ BIẾN

Xương bò: tầm chừng 2 kí

Thịt bò: 500 gram

Hành khô: 4 củ

Cà chua: 3-4 trái

Rau cần (hay rau cải, rau ăn cùng với)

Phụ gia: nước mắm, hạt nêm, bột canh, một chút tiêu, ớt.

Bún: 500 gram

Hành hoa, rau răm, mùi.

PHẦN 2: CÁCH CHẾ BIẾN BÚN THỊT BÒ RAU CẦN
Quá trình 1: Xương bò làm sạch, rồi để khô nước. (Các bạn có thể nướng xương bò bằng lò nướng trong vòng 10 'p cùng với cách này sẽ làm các bạn khử mùi gây của xương bò). Sau khi bạn đã nướng xong, thì cho xương vào nồi chế ngập nước lọc, nước đun sôi chắt phần nước lọc bỏ đi rồi thêm vào nước đậy nồi áp suất và hầm tầm chừng Hai giờ. Tiếp đó chắt lấy nước lọc xương để riêng. (Cách này nên chuẩn bị trước từ tối để tiết kiệm thời gian)
Quy trình 2: Cà chua, rau cần, hành hoa, mùi xữ lý sạch. Cà chua bổ múi cau, rau cần phải cắt khúc. Hành hoa, mùi cắt nhỏ.
Quy trình 3: Thịt bò thái mỏng. (Nếu muốn bạn có thể tẩm thêm chút xíu phụ gia).
Quy trình 4: Phi thơm hành khô thái nhỏ cho cà chua vào xào, nêm nếm 1 muổng bột nêm cho cà chua mau mềm.
Quy trình 5: Cho phần cà chua vừa xào vào nồi nước lèo xương, nêm phụ gia cho vừa ăn.
Quá trình 6: Trong quá trình chờ đợi nồi nước chế xương sôi thì trần bún qua nước đun xếp vào tô. Nước lèo sôi hạ bớt lửa, cho rau cần, thịt bò vào trần, riêng rau cần nhúng chín rồi xếp vào bát bún cùng ít hành răm băm nhỏ, một vài lát ớt hiểm rồi từ từ chan nước lèo ngập bún.
Vậy là các bạn đã có bát bún bò cực ngon dành cho bữa sáng rồi nha.
Hy vọng các bạn ăn ngon miệng cùng với các cách làm bún thịt bò rau cần nhanh gọn dành cho bữa sáng!

Spam; closing.

authors: monngoncuamom tylerbutler


text:
Embed the test YAML/JSON files into the DLL

Stems out from #115

@PerthCharern @darrelmiller Please review #164. Thanks.

authors: PerthCharern xuzhg


text:
Fix css import definitions in Less compiler

Adds handling for external CSS imports and provides a mechanism for user-configurable wrapping of instanced vs. global css definitions.  Wrapping everything in a brute regex'd class will break any imported files and is a very brittle approach to encapsulation.
@plugin-name: autoreplaceatbuildtime;

.@{plugin-name} {
    body {
        min-width: 0 !important;
    }
}

@import "http://external.link.to/custom.css";

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

It looks like you're a Microsoft contributor (Tyler Gibson). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

authors: msftclas tylergibson

repo: Microsoft/PowerBI-visuals-tools


text:
Export and import plot snapshots

Plot snapshots are stored in C++ objects and not available directly on the session.  But we could provide access via C functions that let you save and load them in a graphics device.
Note that this would save them as R snapshot objects. This will require R 3.3 or later, which is when they added the ability to save/load snapshots across R sessions.

Cleaning up backlog

authors: MikhailArkhipov huguesv

repo: Microsoft/RTVS


text:
Connection is not initiated if REPL is not open

Open connection manager
Close REPL
Restart VS
Now, with CM up and REPL not visible try connecting to remote
No effect.
Open REPL, try connecting again
It works. Expected: attempt to connect should be opening progress and then REPL.

#2397


text:
Switch to Nuget 3 and make RTVS compilable for both VS14 and VS15

We still can't produce signed builds because microbuild lab has no machines that have VS15 installed
Changes to CONTRIBUTING.md will be submitted as a separate PR.

:shipit:

authors: AlexanderSher MikhailArkhipov


text:
#3847 + port performance fix

Port perf fixes from release/1_0
#3847 Code block not recognized as R should be output as text

👍


text:
Support relative week of days

Sample utterances: "second sunday", "next Sunday", "two sundays from now"

@rubio41 isn't this working?

"two sundays from now" still not be recognized in C# and Javascript.

authors: STayinloves tellarin

repo: Microsoft/Recognizers-Text


text:
Extract text based features for items with text based meta data

What is affected by this bug?
For example:

Run of a notebook.
Unit tests.
...

Where on the platform does it happen?
For example:

Azure Data Science Virtual Machine.
Azure Databricks.
Other platforms.

How do we replicate the issue?
(Please be specific as possible. Use dashes (-) or numbers (1.) to create a list of steps.)
For example:

Create a conda environment for pyspark
Run unit test test_sar_pyspark.py with pytest -m 'spark'
...

Expected behavior (i.e. solution)
For example:

The tests for SAR PySpark should pass successfully.

Other Comments

DKN can do this, closing for now. Feel free to reopen

authors: dciborow miguelgfierro

repo: Microsoft/Recommenders


text:
Fix broken links in README.md

Found some broken links in README.md by accident, most of them are caused by case sensitivity.

LGTM

repo: Microsoft/SparkCLR


text:
Fix wrong @types/react version. Changed to latest version.

Fixes an incorrect @types/react version number (5.0.14), changing it to the latest version (15.0.24).
Using @types/react@5.0.14 results in the following error when running npm install:
No compatible version found: @types/react@5.0.14

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

see #16

Fixed in #16

authors: cdoremus msftclas tugberkugurlu

repo: Microsoft/TypeScript-React-Starter


text:
enzyme @types use old version

@types/enzyme seem to be using v1.2.0 typings from DT https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/enzyme/enzyme-1.2.0.d.ts
Instead of the newer v2.4.1 typings https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/enzyme/enzyme.d.ts

Furthermore it appears @types/react defines HTMLAttributes<T> while enzyme on DT does not expect it to be generic.

We're working on the merge from master to 2.0 and will be publishing a new version of everything in the next few days.

Alright, great, I did see the other threads, but was unsure it applied to the same thing.

authors: RyanCavanaugh mvestergaard

repo: Microsoft/TypeScript


text:
Unexpected /// <reference types="angular" /> in .d.ts files

TypeScript Version:  2.0.2
Code
I am sorry I don't have a smaller repro case. :-(
(https://github.com/mhevery/angular/tree/ts-issue-11039)
The issue is that d.ts file contains /// <reference types="angular" /> and I don't know why.
Angular had incorrectly included @types/angularjs. The PR changes it to @types/angular The only place where @types/angular should be used is in modules/@angular/upgrade/tsconfig-build.json as that is the only folder which imports  from @types/angular
The change (@types/angularjs => @types/angular) now sprinkles /// <reference types="angular" /> in some d.ts files where it did not before. An example for it is dist/packages-dist/core/src/type.d.ts.
Steps to repro:

clone the repo git clone https://github.com/mhevery/angular.git
check out ts-issue-11039: git checkout ts-issue-11039
npm i
./build.sh
Examine that dist/packages-dist/core/src/type.d.ts has /// <reference types="angular" /> Why?
Delete compiler folder rm -rf dist/packages-dist/core
Rebuild manually node --max-old-space-size=3000 dist/tools/@angular/tsc-wrapped/src/main -p modules/@angular/core/tsconfig-build.json (We have a custom TSC main to deal with our sim link issue, which is why $(npm bin)/tsc -p modules/@angular/core/tsconfig-build.json) does not work. Notice that after rebuild the  dist/packages-dist/core/src/type.d.ts has /// <reference types="angular" /> yet there is no reference to @types/angular in the modules/@angular/core folder

NOTE: There are many more files which have this issue (not just the core)`

We have a custom TSC main to deal with our sim link issue

what is you symlink issue? can we fix it?

The issue is that we have modules/@angular/facade which is being symlinked into modules/@angular/*/src/facade. (This is due to historical Dart support and we are slowly getting rid of it.) Because TSC resolves symlinks into absolute links. It then throws an error like so:
$(npm bin)/tsc -p modules/@angular/core/tsconfig-build.json
error TS6059: File '/Users/misko/work/angular/modules/@angular/facade/src/async.ts' is not under 'rootDir' '/Users/misko/work/angular/modules/@angular/core'. 'rootDir' is expected to contain all source files.
error TS6059: File '/Users/misko/work/angular/modules/@angular/facade/src/collection.ts' is not under 'rootDir' '/Users/misko/work/angular/modules/@angular/core'. 'rootDir' is expected to contain all source files.
error TS6059: File '/Users/misko/work/angular/modules/@angular/facade/src/errors.ts' is not under 'rootDir' '/Users/misko/work/angular/modules/@angular/core'. 'rootDir' is expected to contain all source files.
error TS6059: File '/Users/misko/work/angular/modules/@angular/facade/src/lang.ts' is not under 'rootDir' '/Users/misko/work/angular/modules/@angular/core'. 'rootDir' is expected to contain all source files.
error TS6059: File '/Users/misko/work/angular/modules/@angular/facade/src/math.ts' is not under 'rootDir' '/Users/misko/work/angular/modules/@angular/core'. 'rootDir' is expected to contain all source files.

this sounds like the same underlying issue in https://github.com/Microsoft/TypeScript/issues/9552. we should be fixing this in the next release.

But the original question remains. Why is there /// <reference types="angular" /> when no one references it? And why only in some files?

ah sorry @vladima looked into it. and the issue is the compiler automatically loads all @types packages in the containing directories. so it did include @types\angular. it so happens that @types\angular adds $inject to Function and some of other part of your code extends Function creating a false dependency. The solution would be to add types: [] to your tsconfig.json to state you do not want to include @types\angular in your compilation. this seems to address the issue on the angular repo.

Hmm. I thought I tried it and it did not work for me. Will try again.
On Wed, Sep 21, 2016 at 1:36 PM Mohamed Hegazy notifications@github.com
wrote:

ah sorry @vladima https://github.com/vladima looked into it. and the
issue is the compiler automatically loads all @types
https://github.com/types packages in the containing directories. so it
did include @types\angular. it so happens that @types\angular adds $inject
to Function and some of other part of your code extends Function creating
a false dependency. The solution would be to add types: [] to your
tsconfig.json to state you do not want to include @types\angular in your
compilation. this seems to address the issue on the angular repo.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/TypeScript/issues/11039#issuecomment-248734841,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAG1TwFwHIBl6KiaE7hGXmzYexfp0Z-Eks5qsZUvgaJpZM4KDCBU
.

@mhevery Hi, I have the same issue with update to typescript 2.0.3. Did you find a solution to fix this ?

Did types: [] not work?
On Thu, Sep 22, 2016 at 1:20 PM Julien Bier notifications@github.com
wrote:

@mhevery https://github.com/mhevery Hi, I have the same issue with
update to typescript 2.0.3. Did you find a solution to fix this ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/TypeScript/issues/11039#issuecomment-249016486,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAG1Tyd0iQTk6ovqeri4q5q4_PMlWmaFks5qsuMXgaJpZM4KDCBU
.

No it didn't. Issue seems to be in @types/angular-mocks npm package.

authors: JulienBier mhegazy mhevery


text:
JSDoc comments are not produced in generated declaration files

I looked high and low for this issue having already been brought up OR an option in the typescript compiler to control this behavior.
Basically, my code has JSDocs all over it explaining how everything works, but when the typescript compiler generates the d.ts files ALL the JSDocs are stripped away.  I get definition files that describe the classes, methods, and interfaces but nothing else.  No documentation.
I would like to see an option to tell the TS compiler to leave the comments in the definition files it generates.

Do you have removeComments enabled in your tsconfig.json file - seen here: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html?

No,
My compile command is this:
./node_modules/.bin/tsc --stripInternal -d --declarationDir "." -t "ES5" --rootDir "src"
You can see the file where it's being executed here.
The source typescripe file for the project I'm referencing is here and the resulting definitions are here.

I can not get this to reproduce locally.. i copied your file locally, and ran the same command, and no luck. something else is going on here, can you share a self-contained repro project?
Here is what i see. file contents redacted for brevity.
c:\test\13209>Tree /F
C:.
└───src
        a.ts

c:\test\13209>type src\a.ts
import { TSMap } from "typescript-map";
import { TSPromise } from "typescript-promise";
import { SomeSQLMemDB } from "./memory-db";

/**
 * This is the format used for actions and views
 *
 * @export
 * @interface ActionOrView
 */
export interface ActionOrView {
    name: string;
    args?: Array<string>;
    call: (args?: Object) => TSPromise<any>;
}

c:\test\13209>tsc -v
Version 2.1.5-insiders.20161229

c:\test\13209>tsc  --stripInternal -d --declarationDir "." -t "ES5" --rootDir "src" src\a.ts
src/a.ts(1,23): error TS2307: Cannot find module 'typescript-map'.
src/a.ts(2,27): error TS2307: Cannot find module 'typescript-promise'.
src/a.ts(3,30): error TS2307: Cannot find module './memory-db'.

c:\test\13209>type a.d.ts
import { TSPromise } from "typescript-promise";
/**
 * This is the format used for actions and views
 *
 * @export
 * @interface ActionOrView
 */
export interface ActionOrView {
    name: string;
    args?: Array<string>;
    call: (args?: Object) => TSPromise<any>;
}

Yes, the project where the comments aren't being exported is here:
https://github.com/ClickSimply/Some-SQL
Just run npm install && npm run build on the repo.

https://github.com/ClickSimply/Some-SQL/blob/58d897e0a51be7b5e328518531b3e48161225836/tsconfig.json#L6 ?

Yes, but if you look at the build.sh command you'll see that I'm explicitly passing command line arguments to TSC instead of telling to use the config file.  Maybe that's the confusing part?  I want to build the tsd files with comments, but the final JS file shouldn't have them.  Seems like a pretty common use case to me.
Anyway I got it working now.  With the repo above, this command generated tsd files without comments:
./node_modules/.bin/tsc --stripInternal -d --declarationDir "." -t "ES5" --rootDir "src"
But when I changed the build command to this it worked:
./node_modules/.bin/tsc --stripInternal -d --declarationDir "." -t "ES5" --rootDir "./src" src/index.ts
Working on recreating this behavior in a cleaner environment.

if you call tsc with no files or no --p, the tsconfig.json in the current folder is used. so your command
./node_modules/.bin/tsc --stripInternal -d --declarationDir "." -t "ES5" --rootDir "src"

is actually using the tsconfig.json to build...
the other one specifies a list of files, i.e. src/index.ts. and thus the tsconfig.json is not used.

Ah, I don't think I was expecting the compiler to merge my CLI commands with the TSConfig stuff.

@ClickSimply so you can just pass --removeComments false to tsc and everything will work 😃

authors: ClickSimply aluanhaddad blakeembrey mhegazy


text:
Conflict betwen Partial and 'this' type

TypeScript Version:  2.1.4 / nightly (2.2.0-dev.20170102)
Code
class Tween<T>{

    static get<T>(target: T): Tween<T> {
        return new Tween(target);
    }

    constructor(private target: T) {
    }

    public to(props: Partial<T>) {
    }
}

class DisplayObject {
    public x: number;
    public y: number;
}

class Button extends DisplayObject {

    public z: number;
    onClick = () => {
        let tween = Tween.get(this);
        tween.to({ x: 100 });
        tween.to({ z: 100 });
        tween.to({ a: 100 });
    }
}

Expected behavior:
        let tween = Tween.get(this);
        tween.to({ x: 100 }); // right
        tween.to({ z: 100 }); // right
        tween.to({ a: 100 }); // compile error

Actual behavior:
        let tween = Tween.get(this);
        tween.to({ x: 100 }); // compile error
        tween.to({ z: 100 }); // compile error
        tween.to({ a: 100 }); // compile error

I have observed a possibly related issue in nightly (2.2.0-dev.20170103) with the code:
export abstract class A<P> { public props: P; }

export abstract class B<T, P extends { params: T }> extends A<P> {
    public get params(): this['props']['params'] { return this.props.params; }
    update(params: Partial<this['params']>) {
        // ...
    }
}

export interface P { x: number, y: string }
export class C extends B<P, { params: P }> {
    f() {
        const p = this.params;
        this.update({ x: p.x + 1 }); // compile error here
    }
}

Who can give me a feedback ?
@ahejlsberg @DanielRosenwasser

@WanderWang I'd suggest changing the to method to use Pick<T, K>:
    public to<K extends keyof T>(props: Pick<T, K>) {
    }

For more discussion on a similar issue, see  #12793.

thanks @ahejlsberg  , it works !!! I think I can close this issue and concern about https://github.com/Microsoft/TypeScript/issues/12793

authors: WanderWang ahejlsberg dsehnal


text:
A resource to better grok the lack of errors when using types, interfaces, unions, intersections.

Are there simple guide phrases / mnemonics people to use to remind themselves a type is not going to do be as restrictive as what they think it will be?  Like the is-a / has-a for helping choosing classes or interfaces?
I always expect more assistance from my typings than they actually afford, for example, and "Why does TypeScript not raise a warning when an interface is overridden", and "Typescript type for limiting assignment".  This has led me to keep typings as simple as possible for now and rely more on tests to catch type errors.  It's not a complaint.  I think the TypeScript team are doing an excellent job of building a type system for Javascript that isn't cripplingly pedantic or onerous to use and allows the expression of an incredibly power ("dangerously" so at times) language.  But I was hoping someone might point towards some resource for understanding types better.  I know this is a shifting landscape too so perhaps this isn't possible until things settle and Typescript sees improvements less frequently.
This is a question.  I tried asking it on stackoverflow and it was closed (not unreasonably).

Some mnemonics I just made up:

If your type is all-optional, you're likely to fall
An unused generic is poison like arsenic
Identical classes are stubborn like asses
A Fish & Car can both swim and drive far, but a (need union type rhyme here)
Type aliases look nominal but are only a new label

That's excellent thanks Ryan.  I am closing this but don't let it put anyone off adding / editing 👍
There's something in this example that needs to be extracted from this union but union is rhyme poor!:
type MaybeOneOrTheOther = ({
    first: number;
    orTheOther?: undefined;
} | {
    first?: undefined;
    orTheOther: string;
} | {
    first?: undefined;
    orTheOther?: undefined;
});

var result: MaybeOneOrTheOther = {};           // ✓ valid
result = { first: 1 };                         // ✓ valid
result = { orTheOther: "other" };              // ✓ valid
result = { first: 1, orTheOther: "other" };    // ✓ invalid - both defined
result = { first: "1", orTheOther: "other" };  // ✓ invalid - one defined correctly, the other wrong type
result = { two: 1, orTheOther: "other" };      // ✓ invalid - one defined correctly, additional unknown also provided

authors: AJamesPhillips RyanCavanaugh


text:
Incorrect inference when combining intersection types and index signatures

TypeScript Version:  2.4.0 / nightly (2.5.0-dev.201xxxxx)
Code
type A = {
 [index: string]: string;
} & {
 body: string | A;
}

var x: A;

var a = x.hi;
var b = x.body; // var b: string | A

let c:A = { body: { body: 'nope'} } // TypeError: property 'body' is incompatible with index signature

Expected behavior:
b should be inferred to be of type string since the index type forces every property of x to be string
Actual behavior:
b is inferred to a more general type that can actually be assigned to it

The actual & expected behaviour section here implies this should be made consistent by being more strict, another option (that I personally would prefer) would be to make it consistent by being less strict instead.
I.e. x.body should still be inferred as string | A, but it should also allow you to provide a body property of type A.

@mhegazy sorry to insist, but I don't understand why this is working as intended. I came up with a similar example that maybe highlights the problem better.
type A = {
 [index: string]: string;
} & {
 body: string | A;
}

var b: A;
var c: A;

b = { body: '' }
c = { body: '' }

c.body = b // This works
c = { body: b } // TypeError

Expected behavior
I would expect the two constructions to be either both allowed or both disallowed.
Actual behavior
You can construct c one way but not the other.

At the point that you construct a self-contradictory type A, I don't know how to determine what behavior is "expected" and what's not.

I also encountered this problem. I tried to intersect two index signatures and I thought it would unionise the values.

interface A {
  a: string;
};

interface B {
  b: string;
}

let ab: A & B = {
  a: '',
  b: '',
} // Working as intended

interface String {
  [index: string]: string;
}

interface Numbers {
  [index: string]: number;
}

let sn: String & Numbers = {
  a: '',
  b: 1,
} // Error

// Not even this works:
let sn: String & Numbers = {}

http://www.typescriptlang.org/play/#src=
interface String {
  [index%3A string]%3A string%3B
}

interface Numbers {
  [index%3A string]%3A number%3B
}

let sn%3A String %26 Numbers %3D {
  a%3A ''%2C%0A%20%20b%3A%201%2C%0A%7D%0A%0Ainterface%20A%20%7B%0A%20%20a%3A%20string%3B%0A%7D%3B%0A%0Ainterface%20B%20%7B%0A%20%20b%3A%20string%3B%0A%7D%0A%0Alet%20ab%3A%20A%20%26%20B%20%3D%20%7B%0A%20%20a%3A%20''%2C%0A%20%20b%3A%20''%2C%0A%7D

One more unusual thing I encountered:
interface Strings {
  [index: string]: string;
}

interface Numbers {
  [index: string]: number;
}

interface A {
  a: string;
}

function f(ab: Strings & Numbers & A) {
  ab.a; // No error
}

f({ a: '' }); // Error

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

authors: RyanCavanaugh mhegazy nazrhom pimterry tinganho


text:
Variable type detected incorrectly inside for loop

TypeScript Version:  2.5.2
Code
let myObj: { [key: number]: number } = { 0: 43, 5: 23 };

let obj = myObj[0]; // let obj: number

for (let obj in myObj) {
	if (obj == 1) {
		// ^ [ts] Operator '==' cannot be applied to types 'string' and 'number'.
		// TypeScript compiler thinks 'obj' is of type 'string' when used in `for in` loop.
	}
}

Expected behavior:
var obj within the for loop should be detected as type number.
Actual behavior:
var obj within the for loop is actually detected as type string.

This has now been answered here: https://stackoverflow.com/questions/47585606/typescript-compiler-not-detecting-variable-type-correctly


text:
TypeError: Cannot read property 'flags' of undefined in getActionsForAddMissingMember during getCodeFixesAtPosition

tsserver version:
hits: 4938
stack:
TypeError: Cannot read property 'flags' of undefined
    at Object.getActionsForAddMissingMember [as getCodeActions] (tsserver.js:75172:31)
    at tsserver.js:74988:33
    at Object.forEach (tsserver.js:1312:30)
    at Object.getFixes (tsserver.js:74987:16)
    at tsserver.js:80109:35
    at Object.flatMap (tsserver.js:1550:25)
    at Object.getCodeFixesAtPosition (tsserver.js:80107:23)
    at IOSession.Session.getCodeFixes (tsserver.js:86515:64)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (tsserver.js:85423:61)
    at tsserver.js:86669:88
    at IOSession.Session.executeWithRequestId (tsserver.js:86660:28)
    at IOSession.Session.executeCommand (tsserver.js:86669:33)
    at IOSession.Session.onMessage (tsserver.js:86689:35)
    at Interface.<anonymous> (tsserver.js:87881:27)
    at emitOne (events.js:96:13)
    at Interface.emit (events.js:191:7)
    at Interface._onLine (readline.js:241:10)
    at Interface._normalWrite (readline.js:384:12)
    at Socket.ondata (readline.js:101:10)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at readableAddChunk (_stream_readable.js:178:18)
    at Socket.Readable.push (_stream_readable.js:136:10)
    at Pipe.onread (net.js:560:20)

code has changed since this issue was reported making the issue outdated. closing as won't fix for now.

authors: aozgaa mhegazy


text:
In JS, both module.exports assignments and property assignments should be allowed in a single file

Code
// @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: a.js

// modified from graceful-fs
module.exports = patch
module.exports.close = function (fs$close) {
}
function patch(fs) {
    // do something with Fs
}

Expected behavior:
No errors, and graceful-fs creates a callable module with an exported member patch.
Actual behavior:
Lots of errors, and no exported member patch.

This should be true for exports assignments too, and when the assignments are out of order, and when some property assignments are to exports and some to the alias. Here's an example based on uglify's code:
// @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: ugly.js
// from uglify-js
var FILES = exports.FILES = [
    "./a.js",
    "./b.js"
]
var ugly = exports
ugly.ast.warn = function (txt) {
    return "WARN: " + txt
}
exports.other = function(files) {
}

// @Filename: use.js
var ugly = require('./ugly')
ugly.ast.warn('oh no')
ugly.other(ugly.FILES)


text:
Array.includes not recognized

TypeScript Version:  2.9.2

Search Terms:
"array includes"
Code
const blah: string[] = ['hi', 'bye'];
const inc = blah.includes('hi');

Expected behavior:
TS should know what Array.includes is by now.
Actual behavior:
TS complains that .includes doesn't exist on an array.
Playground Link:
Playground is currently broken.
Related Issues:
https://github.com/Microsoft/TypeScript/issues/12678
https://github.com/Microsoft/TypeScript/issues/12848
tsconfig.json
{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    "strict": true,
    "skipLibCheck": true,
    "allowSyntheticDefaultImports": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "jsx": "preserve",
    "importHelpers": true,
    "moduleResolution": "node",
    "esModuleInterop": true,
    "sourceMap": true,
    "baseUrl": ".",
    "types": [
      "node",
      "jest",
      "webpack",
      "webpack-env",
      "webpack",
      "webpack-env"
    ],
    "paths": {
      "@/*": ["src/*"]
    },
    "lib": ["es2015", "dom", "dom.iterable", "scripthost"]
  },
  "include": [
    "src/**/*.ts",
    "src/**/*.tsx",
    "src/**/*.vue",
    "tests/**/*.ts",
    "tests/**/*.tsx"
  ],
  "exclude": ["node_modules"]
}

"lib": ["es2015", "dom", "dom.iterable", "scripthost"]

This line says "I only want lib definitions for ES2015, the dom, iterable, and scripthost", in other words, "Don't show me APIs from post-ES2015, such as Array#includes".
If you want APIs from post-ES2015, of which Array#includes is one, you can specify that:

"lib": ["es2015", "esnext", "dom", "dom.iterable", "scripthost"]

authors: RyanCavanaugh ffxsam


text:
Pick<Type, GenericParameter> throws new errors for attempting to access properties

TypeScript Version:  3.2.0-rc, 9319ea4941e8495645511cdc33b774c4721aa283

Search Terms:
Pick, keyof
Code
interface Foo {
    a: number;
    b: boolean;
}

const SomeFunc = <K extends keyof Foo>(
    state: Pick<Foo, K>
) => {
    if (state.a) {
        state.b = true;
    }
};

Expected behavior:
No error (passes in 3.1.6)
Actual behavior:
src/example.ts:17:15 - error TS2339: Property 'a' does not exist on type 'Pick<Foo, K>'.

17     if (state.a) {
                 ~

src/example.ts:19:15 - error TS2339: Property 'b' does not exist on type 'Pick<Foo, K>'.

19         state.b = true;

Playground Link:
Related Issues:
Possibly related to #28647, but I'm unsure.

That's plausible. Currently, the function in question in our code base is trying to pass the parameter on to React's setState, whose types have the following comment:
        // We MUST keep setState() as a unified signature because it allows proper checking of the method return type.
        // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257
        // Also, the ` | S` allows intellisense to not be dumbisense
        setState<K extends keyof S>(
            state: ((prevState: Readonly<S>, props: P) => (Pick<S, K> | S | null)) | (Pick<S, K> | S | null),
            callback?: () => void
        ): void;

In our actual usage, we're seeing if a property exists on the parameter; if so, we add more properties before calling setState:
    private setStateBasedOnMode = <K extends keyof DateSelectorState>(
        state: Pick<DateSelectorState, K>
    ) => {
        if (state.currentSelectorMode) {
            // update the shownViewStates if the currentSelectorMode is changed
            let shownViewStates = this.getShownViewState(state.currentSelectorMode);
            state.showEndTime = shownViewStates.showEndTime;
            state.showDuration = shownViewStates.showDuration;
            state.showEndDate = shownViewStates.showEndDate;
            state.showTimeOrDuration = shownViewStates.showTimeOrDuration;
            state.showTimeZones = shownViewStates.showTimeZones;
        }

        this.setState(state);
    };

Is this something that would simply need to be fixed in @types/react? And/or is there a better method on our side?

Off the cuff I'd say a spread'd be better, personally.

Agreed. A particularly troublesome aspect of the code example above is that it mutates the state input object. That could lead to some very subtle issues if a caller were to use a shared object instead of an object literal. With a spread you're guaranteed that the combined object is freshly allocated and not aliased.

Spread where, exactly? To get it to work, I still seem to have to type-cast it:
    private setStateBasedOnMode = <K extends keyof DateSelectorState>(
        state: Pick<DateSelectorState, K>
    ) => {
        if ((state as DateSelectorState).currentSelectorMode) {
            // update the shownViewStates if the currentSelectorMode is changed
            let shownViewStates = this.getShownViewState((state as DateSelectorState).currentSelectorMode);
            this.setState({
                ...state,
                showEndTime: shownViewStates.showEndTime,
                showDuration: shownViewStates.showDuration,
                showEndDate: shownViewStates.showEndDate,
                showTimeOrDuration: shownViewStates.showTimeOrDuration,
                showTimeZones: shownViewStates.showTimeZones,
            });
        } else {
            this.setState(state);
        }
    };

    private setStateBasedOnMode = (
        state: Partial<DateSelectorState>
    ) => {
        if (state.currentSelectorMode) {
            // update the shownViewStates if the currentSelectorMode is changed
            let shownViewStates = this.getShownViewState(state.currentSelectorMode);
            this.setState({
                ...state,
                showEndTime: shownViewStates.showEndTime,
                showDuration: shownViewStates.showDuration,
                showEndDate: shownViewStates.showEndDate,
                showTimeOrDuration: shownViewStates.showTimeOrDuration,
                showTimeZones: shownViewStates.showTimeZones,
            });
        } else {
            this.setState(state);
        }
    };

?

Unfortunately, no. 😔
packages/calendar/packages/calendar-common/owa-calendar-dateselector/lib/components/DateSelector.tsx:351:27 - error TS2345: Argument of type '{ showEndTime: boolean; showDuration: boolean; showEndDate: boolean; showTimeOrDuration: boolean; showTimeZones: boolean; currentSelectorMode?: DateSelectorMode; startDate?: OwaDate; endDate?: OwaDate; wasEndTimeSetManually?: boolean; shouldFocusEndTimePickerOnMount?: boolean; }' is not assignable to parameter of type 'DateSelectorState | ((prevState: Readonly<DateSelectorState>, props: DateSelectorProps) => DateSelectorState | Pick<DateSelectorState, "showTimeZones" | "currentSelectorMode" | ... 7 more ... | "shouldFocusEndTimePickerOnMount">) | Pick<...>'.
  Type '{ showEndTime: boolean; showDuration: boolean; showEndDate: boolean; showTimeOrDuration: boolean; showTimeZones: boolean; currentSelectorMode?: DateSelectorMode; startDate?: OwaDate; endDate?: OwaDate; wasEndTimeSetManually?: boolean; shouldFocusEndTimePickerOnMount?: boolean; }' is not assignable to type 'Pick<DateSelectorState, "showTimeZones" | "currentSelectorMode" | "showEndDate" | "showEndTime" | "showDuration" | "showTimeOrDuration" | "startDate" | "endDate" | "wasEndTimeSetManually" | "shouldFocusEndTimePickerOnMount">'.
    Property 'currentSelectorMode' is optional in type '{ showEndTime: boolean; showDuration: boolean; showEndDate: boolean; showTimeOrDuration: boolean; showTimeZones: boolean; currentSelectorMode?: DateSelectorMode; startDate?: OwaDate; endDate?: OwaDate; wasEndTimeSetManually?: boolean; shouldFocusEndTimePickerOnMount?: boolean; }' but required in type 'Pick<DateSelectorState, "showTimeZones" | "currentSelectorMode" | "showEndDate" | "showEndTime" | "showDuration" | "showTimeOrDuration" | "startDate" | "endDate" | "wasEndTimeSetManually" | "shouldFocusEndTimePickerOnMount">'.

351             this.setState({
                              ~
352                 ...state,
    ~~~~~~~~~~~~~~~~~~~~~~~~~
...
357                 showTimeZones: shownViewStates.showTimeZones,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
358             });
    ~~~~~~~~~~~~~

packages/calendar/packages/calendar-common/owa-calendar-dateselector/lib/components/DateSelector.tsx:360:27 - error TS2345: Argument of type 'Partial<DateSelectorState>' is not assignable to parameter of type 'DateSelectorState | ((prevState: Readonly<DateSelectorState>, props: DateSelectorProps) => DateSelectorState | Pick<DateSelectorState, "showTimeZones" | "currentSelectorMode"
| ... 7 more ... | "shouldFocusEndTimePickerOnMount">) | Pick<...>'.
  Type 'Partial<DateSelectorState>' is not assignable to type 'Pick<DateSelectorState, "showTimeZones" | "currentSelectorMode" | "showEndDate" | "showEndTime" | "showDuration" | "showTimeOrDuration" | "startDate" | "endDate" | "wasEndTimeSetManually" | "shouldFocusEndTimePickerOnMount">'.
    Property 'showTimeZones' is optional in type 'Partial<DateSelectorState>' but required in type 'Pick<DateSelectorState, "showTimeZones" | "currentSelectorMode" | "showEndDate" | "showEndTime" | "showDuration" | "showTimeOrDuration" | "startDate" | "endDate" | "wasEndTimeSetManually" | "shouldFocusEndTimePickerOnMount">'.

360             this.setState(state);
                              ~~~~~

authors: MLoughry ahejlsberg weswigham


text:
generic constraint not working

This compiles cleanly:
function foo <T extends { someNumber: number }> (thingWithId: T): T {
    return thingWithId;
}

[1,2].map(foo);

and obviously, numbers don't have a someNumber numeric property.

See #3410 as mentioned in the Stack Overflow answer

tracked by https://github.com/Microsoft/TypeScript/issues/5616

authors: RyanCavanaugh fernandezpablo85 mhegazy


text:
IntelliSense for Object Literal Properties

In both the TypeScript Playground as well as VS Code, code hints don't appear complete for properties of object literals, and the goto definition doesn't seem to work:
interface Item {

    /** Doc-comment. */
    alpha: number;
}

let item: Item = {

    alpha: 10
//    ^
//     \---- Goto definition not working?
//      ---- Code hint doesn't display doc-comment?
};

item.alpha = 10;
//     ^
//      \---- Goto definition works :)
//       ---- Code hint shows doc-comment :)

// Since `alpha` is a required property,
// I am obliged to declare it upfront in object literal form..
//  ..I am forced to miss out on intellisense features?

Note, the property's type is displayed in the code hint, and the refactor/rename function does work -- so it's not all missing.
I was hoping to fully leverage intellisense features in TS files that I am using like JSON files to declare data structured in accordance with TS interfaces. Am I going about this the wrong way, or is this currently a lacking TypeScript/IntelliSense capability?
Loving TypeScript with VS Code,
Thanks!

It'd be nice if this worked.
For anyone looking to implement this, the fix would be (in services.ts) to use the contextual type of the object literal (the same way we do to establish the completion list for the property names) to remap the property names inside the literal to their corresponding symbols in the contextual type. Once that's hooked up, everything should just work.

Anyone should make sure that the following case works correctly, in that go-to-definition at /*use*/ jumps to /*declaration*/
interface I {
    xyz: number;
}

/*declaration*/let xyz = 10;
let obj: I = {
    xyz/*use*/
}

Would be really nice if this worked. It makes object literals much harder to use without it.

I've just run into this as well on a conversion from js -> ts with property heavy objects. I'm almost wondering if using simple classes is the way to go, that way the intellisense works and makes life much easier...

This works now

authors: ChaseMoskal DanielRosenwasser MgSam RyanCavanaugh timothyallan


text:
set the maximum depth to explore during type inference

this PR + #7163 (already merged) fix #7081

:+1:

:+1:

authors: RyanCavanaugh mhegazy vladima


text:
XPath sometimes does not work for search by Automation ID

I searched for an element by looking for its Automation ID, and found it. I clicked another element, but this did not cause original element to disappear from view. Then I searched for original element again. If I search using same XPath as I used before, I can't find element. If I search by FindElementsByAccessibilityId, then I do find the element. I think using XPath should still find element.
Here is essential part of C# program I used:
`string xpath = "//*[@AutomationId='ReportWizardGeneral_FileName']";
string automationId = "ReportWizardGeneral_FileName";
var sourceBefore = session.PageSource;
var listBefore = session.FindElementsByXPath(xpath).ToList();
typesElt.Click();
var listAfter = session.FindElementsByXPath(xpath).ToList();
var listByAccessibilityId =
session.FindElementsByAccessibilityId(automationId).ToList();
var sourceAfter = session.PageSource;
int beforeCount = listBefore.Count;	// 1
int afterCount = listAfter.Count; // 0
int countByAccessibilityId = listByAccessibilityId.Count; // 1
`
I've attached relevant JSON wire protocol output, as well as extract of page source before the click and after the click. The main difference in page source is that after clicking on an element a dropdown menu appears, but it does not cover up element I want to search for. Dropdown menu contains a list. A list similar to this list also appears in another place in page source after the click.
jsonWire.txt
shortSourceBefore.txt
shortSourceAfter.txt

Hi @mbnovick,
Can you try using the UI Recorder  and report back what the generated XPath query is? Depending on how you set up your session, you may have to truncate the root node.

Hi,
I know that it may sound a little weird but try to add a Thread.sleep() before the xpath statement and check if the element is found by winappdriver. I was facing a similar issue when trying to run a script on rdp but it was working fine locally. After a lot of trial and error I found out that it was due to the element not being available on the screen.
If you are able to identify the element after adding thread.sleep() ,then I would suggest to use explicit wait from selenium as implicit wait doesn't solve the problem.

I tried the suggestion @Chintzz recommended to no avail. I added a Sleep of 5 seconds after the click, but that did not help.
I also used UI Recorder, as suggested by @hassanuz
The XPath query generated by UI Recorder is:
"/Pane[@Name="Desktop 1"][@ClassName="#32769"]/Window[@Name="App 7.10.0.38 "][@ClassName="Window"]/Window[@Name="Generate Report"][@ClassName="Window"]/Custom[@AutomationId="wizard"]/Pane[starts-with(@Name,"WPFComponents.Reports.MultipleReportWindow.ViewModels.GeneralSet")][@ClassName="ScrollViewer"]/Custom[@ClassName="GeneralSettingsPageView"]/Edit[@AutomationId="ReportWizardGeneral_FileName"]"
The XPath query is also stored in attached file, as is XML generated by UI Recorder for element of interest.
uirecorderXpath.txt
uirecorderXml.txt

@mbnovick  - Try using @Name instead of @name. It should work fine.

It looks like GitHub is replacing uppercase @Name with lowercase@name. When I wrote uppercase and then look at Preview, I see name in lowercase. The file I attached earlier shows Name in uppercase. In any case I only use AutomationId to identify element, as mentioned in the C# code mentioned when I opened the issue. So it won't help to use @Name instead of @name, since I don't use either of them. The problem is "Why does WinAppDriver sometimes not find element when using XPath for AutomationId, when in same circumstances it always finds element if I search for AccessiblityId without using XPath?"

It looks like I need to write @Name and @name in GitHub, because if I write Name after at-sign then GitHub thinks I'm referring to GitHub user called "name". That explains uppercase/lowercase confusion, but still does not explain my original problem occurs.

@ mbnovick,
Try the following xpath
//*[contains(@AutomationId,'ReportWizardGeneral_FileName')]

But I can find the element if I use FindElementsByAccessibilityId. And I'm only trying to find the element at this point, not trying to click on it. Finally as far as I know the element is clickable at this point. It seems like there should be a different explanation of what's causing the problem.

Hi @mbnovick,
Would it be possible for you to share the app in question and the WinAppDriver script being used for this test?
If it contains sensitive information, you can email it to hassan.uraizee@microsoft.com or winappdriverteam@microsoft.com if possible. This would help us reproduce this issue and resolve it as soon as possible.
Thanks

Hi @mbnovick,
We'd like to help you further by addressing this particular issue you reported. The information you provided so far is insufficient for us to identify or to reproduce the problem. It will be great if you can privately share the application and the steps/script to reproduce the issue so that we can make a proper fix for it.

I can't share the application I'm using because of security reasons. I think it will be necessary to close this issue for now. Maybe it can be reopened in future if WinAppDriver becomes open source so I can debug the problem I observed.
Another possibility would be to provide me with a version of WinAppDriver which creates log files that could be used to debug the problem. I still might have security issues releasing the data from the resulting logs. At this point I think there's no alternative other than to close the issue.

authors: Chintzz hassanuz mbnovick timotiusmargo

repo: Microsoft/WinAppDriver


text:
Winmd2ObjC update:

Fixed inconsistencies with create method and added annotations.

I don't think any header changes are in here.

They are there, you just cannot see them on github because of the large number of files modified.

In reply to: 276532250 [](ancestors = 276532250)

authors: DHowett-MSFT mukhole

repo: Microsoft/WinObjC


text:
Cannot create session with GPU device

I'm submitting a…

Bug report (I searched for similar issues and did not find one)

Current behavior

WinML UWP
It cannot create learning model session with GPU.

WinMLRunner
I also tried to use
 WinMLRunner.exe -model Squeeze.onnx
And it crush as below.

When I try to debug it, it also got error in create learning model session with GPU.

Minimal reproduction of the problem with instructions
code in UWP
_device = new LearningModelDevice(LearningModelDeviceKind.DirectX);
_session_gpu = new LearningModelSession(_model, _device);
Environment
Windows Build Number:
Win 10 v1809
App min and target version:
build version 17763
OS Version (Server, IoT Core, Desktop, etc):
Desktop
Graphics Driver version:

DxDiag:
  Display Tab 1: No problems found.
    Sound Tab 1: No problems found.
    Sound Tab 2: No problems found.
      Input Tab: No problems found.

Visual Studio
2017

I am not sure the reason, but I clean the environment and it works now. And I found that , if I install CUDA, it happens again. Cuz I was trying onnxruntime with CUDA.

Do you happen to use any of these features when you repro the crash described here?

NvCpl FXAA.
NvCpl MFAA.
Ansel.
Shadowplay
Gsync

I didn't use those features manually, if these turn on by default or not?

repo: Microsoft/Windows-Machine-Learning


text:
Unable to deploy to XDK with Microsoft Visual Studio 2017

Was able to build and deploy for x64 using Visual Studio 2017 on a local Windows 10 PC but was unable to deploy to the remote Xbox One (XDK).  The game built and was installed to the Xbox One just fine, but upon launching the following error message was displayed:
A dependent dll was not found
I found these two other developer posts, but I believe they were using Visual Studio 2015 instead.  I also did not see WIN32_LEAN_AND_MEAN set as a preprocessor flag in the GitHub project, so I don't believe that is the issue.  I retargeted the solution to platform tools v141 and tried the latest two Windows SDKs 15063 and 14393.
https://social.msdn.microsoft.com/Forums/windowsapps/en-US/2c06b874-9ee0-4a81-beea-a03278278aa1/uwpccxxbox-one-app-crashes-on-xbox-one-0xc0000135-a-dependent-dll-was-not-found?forum=wpdevelop
https://social.msdn.microsoft.com/Forums/windowsapps/en-US/92ea9bfa-2968-4cb6-9c36-d0e70d09064d/uwpxbox-a-dependent-dll-was-not-found?forum=wpdevelop
Please let me know if any additional information would be helpful to assist in debugging this issue.  If someone could confirm they also encounter errors deploying this sample to Xbox One (XDK) with Visual Studio 2017, that would also be helpful information.
For now, I am attempting to uninstall VS 2017 and will try again with a fresh install of VS 2015.
Thanks,
Mark

It seems this also doesn't work for me in Visual Studio 2015.  I just performed a fresh install and I am using platform toolset v140, x64 architecture. Windows SDK 10.0.14393.  Everything works fine deploying to the local Windows 10 machine, but I get the following errors deploying to Xbox One (XDK):
'MarbleMaze_VS2015.exe' (Win32): Loaded 'D:\DevelopmentFiles\Microsoft.SDKSamples.MarbleMaze.CPPVS.Debug_x64.mark_\MarbleMaze_VS2015.exe'. Symbols loaded. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\kernel32legacy.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\d2d1.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\d3d11.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\advapi32legacy.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\sspicli.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\MinUser.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\gdi32min.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. Cannot find or open the PDB file. 'MarbleMaze_VS2015.exe' (Win32): Loaded 'C:\Windows\System32\dxgi.dll'. Cannot find or open the PDB file. The thread 0x5f4 has exited with code -1073741515 (0xc0000135). The thread 0xc98 has exited with code -1073741515 (0xc0000135). The program '[5736] MarbleMaze_VS2015.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.

Thanks for bringing this issue to our attention!
I just attempted to deploy from Visual Studio 2017 without any luck. I'll investigate and see if we can get this resolved soon. :)

Following back up on this.
In its current state, this sample isn't meant to run on Xbox. One block is that it uses XINPUT which is not a valid API for UWP. By updating the sample to use Windows.Gaming.Input, you'd be a step closer to getting it deployed to an Xbox One.
This page could also be a helpful reference if you do attempt to make this work for Xbox:
UWP features not yet supported on Xbox
Thanks!
Abby

One other piece of info.
While the above suggestion is a long term fix for that particular issue, you could also change the link pointing to xinput.lib to xinputuap.lib. This library is an adapter that uses Windows.Gaming.Input.

authors: abbycar mstorch

repo: Microsoft/Windows-appsample-marble-maze


text:
Fix SystemPerformanceInformation DataContract and add asserrt when we…

Fix SystemPerformanceInformation DataContract and add assert when web socket fails to parse data.
Closes #254.

Looks like this broke the following tests:
GetRunningProcessesTest
GetRunningProcessesTest_XboxOne_1608
GetRunningProcessesWebSocketTest
GetRunningProcessesWebSocketTest_XboxOne_1608
GetSystemPerf_HoloLens_1607
GetSystemPerfTest
GetSystemPerfTest_XboxOne_1608
GetSystemPerfWebSocketTest
GetSystemPerfWebSocketTest_XboxOne_1608

authors: MattHyman hpsin

repo: Microsoft/WindowsDevicePortalWrapper


text:
in 90deg,photo can not recognized

in 90deg,photo can not recognized，and then it generate two boxes whth line

you are right, it cannot detect if the provided image is rotated yet. It tries to understand your rotated image  as if it wasn't and that explain the bad results. Maybe this could be an interesting feature

haha,show you two photos,i think it need more data to learn

authors: macastejon pandaiiz

repo: Microsoft/ailab


text:
Update functions-bindings-storage-blob.md

Fix a small typo.

Hi @kheiakiyama, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;

yalu102-master 4.zip

@christopheranderson Please review these proposed changes. Thanks.

#sign-off

Thanks for the fix!

authors: christopheranderson jomolnar jraah55 kheiakiyama msftclas

repo: Microsoft/azure-docs


text:
Polish DocumentDBAutoConfiguration

This commit removes a redundant @ConditionalOnMissingBean check and makes sure that the right bean is injected if overridden.

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

authors: msftclas snicoll

repo: Microsoft/azure-spring-boot-starters


text:
Serializing List<T> results in invalid output instead of exception constructing a serializer

Code like the following should throw an exception when attempting to create the Serializer. Instead, it writes the byte 0.
var output = new OutputBuffer();
var writer = new CompactBinaryWriter<OutputBuffer>(output);

var serializer = new Serializer<CompactBinaryWriter<OutputBuffer>>(typeof(List<int>));
serializer.Serialize(new List<int> {1, 2, 3}, writer);

Something similar happens if you create a serializer for IBonded<Foo>:
var serializer = new Serializer<CompactBinaryWriter<OutputBuffer>>(typeof(IBonded<Foo>));

repo: Microsoft/bond


text:
"unknown error" and missing "system.collection.immutable" when analyzing net45 project

I get this in the visual studio 2017.3 tool window:
I'm not using s.c.immutable in the target project, so I'm not sure what this is about.
Microsoft (R) .NET Portability Analyzer 1.0.0.0 (alpha)
Copyright (C) Microsoft Corporation. All rights reserved.
More information is available at http://go.microsoft.com/fwlink/?LinkId=506955

An unknown error occured.
System.IO.FileNotFoundException: Could not load file or assembly 'System.Collections.Immutable, Version=1.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Collections.Immutable, Version=1.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at ApiPortVS.Analyze.ApiPortVsAnalyzer.<GetApiPortOptions>d__8.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at ApiPortVS.Analyze.ApiPortVsAnalyzer.GetApiPortOptions(IEnumerable`1 assemblyPaths, IEnumerable`1 formats, String reportFileName)
   at ApiPortVS.Analyze.ApiPortVsAnalyzer.<WriteAnalysisReportsAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at ApiPortVS.Analyze.ProjectAnalyzer.<AnalyzeProjectAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at ApiPortVS.AnalyzeMenu.<AnalyzeProjectsAsync>d__6.MoveNext()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

@oising This is because the VS extension was using a higher version of System.Collections.Immutable than the one that Visual Studio uses (version 1.2.1 was needed for VS 2017). PR #473 addresses this issue.
Thanks for reporting this bug!

authors: alinapopa oising

repo: Microsoft/dotnet-apiport


text:
Add template option to README example

the --template command line option is referenced on DefinitelyTyped, so it should be shown here to prevent confusion.

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

Thanks!

authors: RyanCavanaugh kbuzby msftclas

repo: Microsoft/dts-gen


text:
'expect': Don't use TypeScript scanner to parse error comments, just use a regexp

This was giving us problems if there was a template literal anywhere in the file -- that broke the scanner and it no longer returned any comments.

@andy-ms,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

authors: andy-ms msftclas

repo: Microsoft/dtslint


text:
As a developer I can control the mix of simulated REST calls (CRUD) being sent to the application end point

Copied from Azure Dev Ops Backlog

moved to entref-appservice-containers project

authors: day-jeff rickrain

repo: Microsoft/entref-spring-boot


text:
Name change breaks assembly redirection between 15.0 and 16.0

The decision to make Web Tools assembly names sexier for VS2019 (https://devblogs.microsoft.com/aspnet/changes-to-the-web-and-json-editor-apis-in-visual-studio-2019) is great and all, but does this mean that if referencing these one cannot have one VSIX target both VS17 and 19, as assembly redirection does not work across differing namespaces/assembly names?
The change seems a bit contradictory, as the article states it's done "to improve extensibility features for extension developers," so is there a way to resolve this issue without having to build multiple VSIX packages with different assembly targets?

Looks like there's no common target to use here for both 15.0 and 16.0. Closing up.

repo: Microsoft/extendvs


text:
Which posetrack standard do you use during evaluation?

There are two papers regarding posetrack. In paper "PoseTrack: Joint Multi-Person Pose Estimation and Tracking", the PCKh is 20% of head bounding box's diagonal. In paper "PoseTrack: A Benchmark for Human Pose Estimation and Tracking", the PCKh is 30% of head bounding box's diagonal. I'm wondering, which one you guys used? In PoseTrack GitHub site, their evaluation toolkit "poseval" uses 30% version.

The default value is 0.5. You can check "lib/core/evaluate.py" for details.

authors: ArchNew wjbKimberly