YYYY-MM-DD interpreted as YYYY-DD-MM

YYYY-MM-DD interpreted as YYYY-DD-MM for arabic, but also looks like in other languages which prefer DMY order, but this looks strange -- it seems that if year is first, then we should ignore DMY / MDY and just use YMD for all locales?
Examples:
>>> dateparser.parse('2023-11-08', languages=['ar'])
datetime.datetime(2023, 8, 11, 0, 0)

>>> dateparser.parse('2023-11-08', languages=['en'], region='GB')
datetime.datetime(2023, 8, 11, 0, 0)

>>> dateparser.parse('2023-11-08', languages=['en'], region='US')
datetime.datetime(2023, 11, 8, 0, 0)

>>> dateparser.parse('2023-11-08', languages=['en'])
datetime.datetime(2023, 11, 8, 0, 0)

Side note: in reality US also has MDY date order, so if we'd interpret en as en-US and if it had MDY set, then we'd parse a lot more dates incorrectly.

https://github.com/scrapinghub/dateparser/pull/790 by @Gallaecio might be related, but not sure if it's enough, because the date we do get is formatted in a more weird way, as 2023 - 11 - 08 (with extra spaces).

According to wikipedia, YDM is used in just 4 few countries: https://en.wikipedia.org/wiki/Calendar_date#Gregorian,year–day–month(YDM), but it looks like we're inferring that MDY (very popular) implies YDM (very rare)

Came here to confirm this affects German as well, another language which uses DMY for local date formats, but also just found issue #765, which already reported this problem back in 2020...

Interestingly, when it comes to ISO 8601 dates, DMY-related settings seem to also partially disable the built-in mechanism which swaps date components on impossible combinations... when that mechanism could theoretically "save" 2/3 of dates being misinterpreted (based on numbers > 12).
Examples parsing correctly formatted ISO date "1960-12-23":
>>> dateparser.parse("1960-12-23")  # default
datetime.datetime(1960, 12, 23, 0, 0)

>>> dateparser.parse("1960-12-23", languages=["en"])  # languages set to MYD language
datetime.datetime(1960, 12, 23, 0, 0)

>>> dateparser.parse("1960-12-23", languages=["de"])  # languages set to DMY language
# None (implicit)

>>> dateparser.parse("1960-12-23", languages=["en"], settings={"DATE_ORDER": "DMY"})  # languages set to MYD language, DATE_ORDER set to DMY
# None (implicit)

>>> dateparser.parse("1960-12-23", languages=["de"], settings={"DATE_ORDER": "MDY"})  # languages set to DMY language, DATE_ORDER set to MDY
datetime.datetime(1960, 12, 23, 0, 0)

... The last two examples have the same result even with PREFER_LOCALE_DATE_ORDER set (whether True or False).
Examples parsing jumbled ISO date "1960-23-12":
>>> dateparser.parse("1960-23-12")  # default
datetime.datetime(1960, 12, 23, 0, 0)

>>> dateparser.parse("1960-23-12", languages=["en"])  # languages set to MYD language
datetime.datetime(1960, 12, 23, 0, 0)

>>> dateparser.parse("1960-23-12", languages=["de"])  # languages set to DMY language
datetime.datetime(1960, 12, 23, 0, 0)

>>> dateparser.parse("1960-23-12", settings={"DATE_ORDER": "DMY"})  # DATE_ORDER set to DMY
datetime.datetime(1960, 12, 23, 0, 0)

... The jumbled date is parsed correctly for all possible combinations of the above languages + DATE_ORDER settings, also with and without PREFER_LOCALE_DATE_ORDER set (whether True or False).

@lopuhin It looks like the problem can be worked around by including the format codes for YYYY-(M)M-(D)D in date_formats in addition to setting your DMY language:
>>> dateparser.parse("2023-11-08", languages=["ar"], date_formats=["%Y-%m-%d"])
datetime.datetime(2023, 11, 8, 0, 0)

Other dates will continue to be interpreted as DMY:
>>> dateparser.parse("8.11.23", languages=["ar"], date_formats=["%Y-%m-%d"])
datetime.datetime(2023, 11, 8, 0, 0)

>>> dateparser.parse("8/11/23", languages=["ar"], date_formats=["%Y-%m-%d"])
datetime.datetime(2023, 11, 8, 0, 0)

Same for other hyphenated dates, e.g. 08-11-23, though it'd probably wise to not use hyphens at all with the explicitly set languages, just to avoid confusion. Or to always require the full year to be set everywhere and/or to not also allow %y for YY in date_formats.

I have a variation of this problem. I'm trying to parse invoice lines from a lot of different subcontractors. Much of it is in some variation of DMY or YMD, but never ever YDM, which I'm currently fighting. Refer to the code example below for some tests.
I was wondering if it'd be easy to amend the DATE_ORDER handling to accept a list of allowed values, or adding another one like FORBIDDEN_DATE_ORDER to specifically forbid American-style dates.
The code below requires rich, sorry about that.
import datetime
import dateparser.search
import dateparser.conf
import rich

def extract_dates(sample, debug=True):

    return dateparser.search.search_dates(
        sample,
        languages=['da', 'en'],
        settings={
            'PREFER_LOCALE_DATE_ORDER': True,
            'DATE_ORDER': 'DMY',
            'PREFER_DATES_FROM': 'past',
            'STRICT_PARSING': True,                  # There must be a day, month, year
            'PARSERS': ['absolute-time']
        },
        add_detected_language=True,
    )

tests = [
    ("sdds 07/09/2024  1. kons", datetime.datetime(2024, 9, 7, 0, 0)),
    ("sdds 30. september 2024 første kons", datetime.datetime(2024, 9, 30, 0, 0)),
    ("sdds 30. september 2024  1. kons", datetime.datetime(2024, 9, 30, 0, 0)),
    ("sdds 30. september 2024 sdw 1. kons", datetime.datetime(2024, 9, 30, 0, 0)),
    ("sdds 2024-11-02  1. kons", datetime.datetime(2024, 11, 2, 0, 0)),
    ("sdds 4. kons 3. februar 2023", datetime.datetime(2023, 2, 3, 0, 0)),
    ("sdds  4. kons 2. marts 2023", datetime.datetime(2023, 3, 2, 0, 0)),

]

for sample, correct in tests:
    results = extract_dates(sample)[0]

    date_part_of_string, result, language = extract_dates(sample)[0]
    if result == correct:
        rich.print(f"{date_part_of_string} -- [green]{sample}[/green] -- {result}")
    else:
        rich.print(f"{date_part_of_string} -- [red]{sample}[/red] -- {result}")


Dependency Graph

The dependency graph for the different modules should be checked, to see if any unneeded dependencies are provided by implemented modules.

Especially ui-base

Fixed with #11


Make a fly-by based on a speedrun

To achieve that one would need to parse *.dem files, extract player positions and play them.
Some sad facts:

There is no publicly available specs on GoldSrc (most speedruns are made playing original HL, not Source) *.dem format that look legit.
Source *.dem format (https://developer.valvesoftware.com/wiki/DEM_Format) suggests that the file itself contains just network packets, and common sense tells me that those should contain only player commands (input) and not much else. If this is right, then there's no way to extract player position without implementing the rest of the engine. Oh my!
(However, Source SDK sources contain DEM parser that suggests that there really is a way to extract just a player position without processing actual input, but I went no further in my preliminary investigation)

dem format references:

https://github.com/stgn/netdecode
https://github.com/jpcy/coldemoplayer/blob/master/compLexity Demo Player/demo parser/HalfLifeDemoParser.cs
https://github.com/Traderain/Listdemo-


[2pt] PR: SRC adjustment enhancements and downstream application

This feature branch includes additional enhancements to the synthetic rating curve adjustment algorithm. In addition to local hydroid catchment calculations of roughness, the algorithm now applies adjustments to corresponding hydroids that share a common featureid, and the mean roughness values for interconnected hydroids are also propagated downstream by a set distance (e.g. 10km). Address ticket #463
Changes

tools/adjust_rc_with_feedback.py: New additions include improved upstream to downstream traversal; blending roughness calculations for hydroid, featured, and group mean (prioritized in that order); new optional intermediate outputs for evaluating and debugging roughness calculations/application.
tools/tools_shared_variables.py: Added new variables for max roughness, min roughness and downstream distance used in adjust_rc_with_feedback.py

Testing
Completed alpha evaluation with the current codebase for both NWS and USGS FIM benchmark data. CSI box and whisker plots: Blue is the FIM skill using our current default SRCs from fim 3_0_23_3 (no SRC obs adjustments). Orange bars represent the FIM skill using the src adjustment algorithm and all available FIM observation point data. Green bars represent an preliminary attempt to evaluate the performance of the downstream propagation technique by withholding point observations for some hydroid catchments (only use the first three upstream hydroid calculations per AHPS LID).
NWS benchmark locations:

USGS benchmark locations:

Screenshots
Approach: convert flood extent polygons to points and attribute observed flow

Approach: solve Manning's equation for new roughness coefficient

Approach: downstream roughness propagation from upstream calculations

Approach: graph structure for depth first traversal of the huc flow network

Notes
Usage:
-p --points-layer --> Path to points layer containing known water boundary locations (required=True)
-d --fim-directory --> Parent directory of FIM-required datasets (required=True)
-w --wbd-path --> Path to national huc layer (required=True)
-i --extra-outputs --> True or False: Include intermediate output files for debugging/testing (default='False'; required=False)
-s --scale --> HUC6 or HUC8 (default='HUC8'; required=False)
-j --job-number --> Number of jobs to use (default=2; required=False)
Testing checklist

Can test code on a subset of testing hucs using: python foss_fim/tools/adjust_rc_with_feedback.py -p data/temp/water_edge_rc_adjust/known_water_edge_test_4hucs.gpkg -d data/outputs/obspts_adj_src_testing/ -w data/temp/water_edge_rc_adjust/WBD_National_copy.gpkg -s HUC8 -j 2 -i True
And/or view test inputs/outputs here: outputs/obspts_adj_src_testing
< 2min runtime

Future Todos

Future testing needed on FR resolution (currently only configured to run on MS networks)
Evaluate adjusted SRCs using the updated sierra test framework

Note: will need to merge with dev-fim3 after Carson's PR is merged and then updated the changelog prior to this branch getting merged


Port the process-<IP_ADDRESS> package

Steps to do the port:

etlas get process-<IP_ADDRESS>
cd process-<IP_ADDRESS>
etlas build

This will show you that directory >=1.1 && <1.4, filepath >=1.2 && <1.5, unix >=2.5 && <2.8 are needed. As a general rule, you should comment out the unix and Win32 dependency when doing ports since it's hard to shim the full package on the JVM (uses lots of platform-dependent C FFI calls) and we want to keep packages as portable as possible. We can offer platform-dependent versions for performance later on.

Open the process.cabal file and comment out all platform-dependent stuff, including:

the c-sources:, includes:, and install-includes: fields (i.e. anything that contains .c or .h files).
any conditional dependencies based on platform (i.e the entire if os(windows) clause should be commented out.)
You can use -- for single-line comments.

Change the build-type: field to Simple as that's the only build type supported by etlas, for now.
Run etlas install directory-<IP_ADDRESS> (the future versions are not supported for now) followed by etlas install --dependencies-only to install the rest.
Run etlas build.
You'll find lots of errors about missing modules. Remove those modules and you'll find now that functions are missing. Now your task is to study what's happening around that missing function, and figure out which Java API you need to use to substitute that functionality.
Keep fixing stuff, run etlas build, and keep going until the package builds successfully.

Bindings to Java's ProcessBuilder API most likely have to be made.
See the instructions here to create and submit the patch once you're done.

Did anyone already start this?
I just gave it a first shot and I'm currently stuck at this:
System/Process/Common.hs:203:45:
    Couldn't match type ‘Foreign.C.Types.CInt’
                   with ‘System.Posix.Types.Channel’

Am I right to assume that one needs to distinguish between Eta versions for Fd / Channel handling like in this patch from lifted-base?
+#if ((ETA_VERSION == 9) && (ETA_BUILD_NUMBER >= 2)) || (ETA_VERSION > 9)
+import System.Posix.Types ( Channel )
+#else
 import System.Posix.Types ( Fd )
+#endif

+#if ((ETA_VERSION == 9) && (ETA_BUILD_NUMBER >= 2)) || (ETA_VERSION > 9)
+threadWaitRead :: MonadBase IO m => Channel -> m ()
+#else
 threadWaitRead :: MonadBase IO m => Fd -> m ()
+#endif

I think it's fine to just support Eta > 0.9

@nightscape Don't worry about the conditional compilation for process as it will only be compatible with Eta >= 0.0.9b2 since the Channel API is only available since then. It will be assumed that process won't work for 0.0.9b1.

And moreover, make sure you have done a source installation on master when working on this patch.

https://github.com/typelead/eta-hackage/commit/3dc0c76f2049b568a35cc33fe44af05f1aeb1680
Only compatible with 4a9936f and beyond.


SECURITY WARNING: Please treat the URL above as you would your password.

I am getting blank page with following text and window is not closing in my phonegap app
SECURITY WARNING: Please treat the URL above as you would your password.
I already added inappbrowser plugin.
Any help would be must appreciated :)

It was resolved as @eugenemaning suggested.
This item should be closed.

I have tried all solutions on this thread and many others, none seem to help me. I am getting the Success Security Warning message on my android device. It works very well on my browser (I am using Visual Studio 2013 update 4).
I do have the following:

InAppBowerser version 1.0.0, installed as a plugin
On my FB Dev. Setting -> Basic I have: http://localhost:4437/
My oauthcallback.html is in my root directory
Om my FB Dev. Setting -> Advance I have: https://www.facebook.com/connect/login_success.html

Side Notes:
Initially I was getting "the redirect_uri is not supported", I fixed this by placing:
runningInCordova = true;
right after this
document.addEventListener("deviceready", function () {
runningInCordova = true;
alert("runningInCordova");
}, false);
in the OpenFB.js file, since on my adroid device the above listener was not executing. This now gives me access to the FB login screen.
But after login in I get the Success Security Warning message. I have spent 3 days trying to resolved this issue. I have tried many, many things but nothing seems to works. I am sure there is a solution out there.
Is there a way to fix this?
Please help, Thank you in advance.
Louis

Compare your openfb.js file from mine... see if you find something https://github.com/eugenemaning/openfb.js/blob/master/openfb.js

What I found out on mine is that I have to do this to get it working:
rm plugins/ios.json
ionic plugins add org.apache.cordova.inappbrowser
But then somehow another plugin stops working. Just happens for iOS.
Peter
On Mon, May 11, 2015 at 10:54 PM, Eugene Maning<EMAIL_ADDRESS>wrote:

Compare your openfb.js file from mine... see if you find something
https://github.com/eugenemaning/openfb.js/blob/master/openfb.js
—
Reply to this email directly or view it on GitHub
https://github.com/ccoenraets/OpenFB/issues/30#issuecomment-101140919.

@eugenemaning I have pasted your code to my openfb.js and I got the exact same result.
What I am thinking is that I got the wrong InAppBrowser, I have tried with the one that installs through the config.xml core plugin which is version 0.5.2 the I tried one that has version 1.0.0
Where did you get your InAppBrowser?
I don't know what else to try.
All I need is to verify the user's login and get her/his email address. It is allowing them to login, Successfully, but then I get that annoying Security Warning message.
Any other ideas?
I really appreciate any type of help, I've been at it too long.
Thank you,
Louis

Hi Peter,
Thanks for answering, I am not using Ionic, I am using Angularjs,  I don't know if that makes a difference. I am also only using Android for now.
Any other ideas would be greatly appreciated.

I am sorry for being a pest, but I can't find any solution for my issue. It seems to be a very easy solution, but I can't find it. I've spend many days on this already.
Please help me.

This is the https://github.com/apache/cordova-plugin-inappbrowser that I am using.

Hi Eugene,
I finally fixed my problem. The solution was very simple but hard to spot.
In my index.html page I had this:

instead of this:

Although cordova.js is int the /scripts/ folder, having script/ before cordova was causing the problem. Everything else in my app worked fine, even openFB worked in the browser, except that openFB was not working in my android device. After removing /script from the path everything works fine.
I hope this might help someone.

That was funny! What a headache that was. Glad you finally solved your
issue.
On Thu, May 14, 2015 at 2:06 AM Louis777<EMAIL_ADDRESS>wrote:

Hi Eugene,
I finally fixed my problem. The solution was very simple but hard to spot.
In my index.html page I had this:
instead of this:
Although cordova.js is int the /scripts/ folder, having script/ before
cordova was causing the problem. Everything else in my app worked fine,
even openFB worked in the browser, except that openFB was not working in my
android device. After removing /script from the path everything works fine.
I hope this might help someone.
—
Reply to this email directly or view it on GitHub
https://github.com/ccoenraets/OpenFB/issues/30#issuecomment-101761595.

Yes, thank you.
Now I am running in to the following problem in the browser, when I go to login it's telling me:
////////////////////////////////////////////////
InAppBrowser Emulation
It is like a browser, only it is all up in your app
URL:
https://www.facebook.com/dialog/oauth?client_id=123456789&redirect_uri=https://www.facebook.com/connect/login_success.html&response_type=token&scope=email
TARGET:
_blank
OPTIONS:
"location=no"
///////////////////////////////////////////
Do you have any idea why this might be happening?
Android device is still working fine.
Thanks,

Anyone have an answer for this, i am seeing the exact same screen :(

Hi, can you check your facebook app to ensure you have added the "website" platform?
In Facebook Developers Console, go to your app then go to "Basic" section and under the section with App ID, click "Add Platform" and choose "website". You do not have to add any of the URLs since you're using cordova.
Also make sure that you have turned on OAuth Login in the "Advanced" section
This worked for me. Let me know if it works for you

hi.. i got the SECURITY WARNING: Please treat the URL above as you would your password. only on the ios device while in android in works like charm.. anybody face the same issue? i develop the app using ionic and run the app from ionic view..
do you guys know why this happens?
your feedback much appreciate..
Thanks

Got the same issue on Android (Samsung Galaxy Tab 3 - on Android 4.2.2 JellyBean). Had to install and configure a whitelist for facebook;
#install the plugin
cordova plugin add https://github.com/apache/cordova-plugin-whitelist.git
#Add whitelist(s) to the bottom of config.xml (before closing  tag!).  NOTE: Only use these values for testing;

#Test if it works with the above settings. If it does, you should lock this down a little.. I haven't tested this out yet, but I think all you'll need is;

I'm having the same security issue, can anyone show the steps what you did in Facebook App as well as opneFB.js.
I've even set static: runningInCordova = true; in openfb.js and also installed  in config.xml.

How to solve all of those issues,
you need to include a link to cordova.js in your index, without a link cordovaisrunning will always be false and this cause the first problem "URL not supported", also the security warning  caused for the same reason.

Hi guys,
Anyone finally found a solution to this issue ? I have spent all my day on this issue and I am still facing with this error ... I tried all your suggestions like change my version of cordova-plugin-inappbrowser, set runningInCordova variable to true, cordova.js is included in my index.html ...
In more details, my cordova/ionic app works like a charm on my android device, on ionic serve too but I have this error on iOS simulator with iOS 9 and 8.4. I didn't try with older version of iOS but I don't think it will be better.
Any suggestions or solutions will be welcome !

Any solution for this ISSUE? I did not find the solution for "secure warning ....", @Louis777  can you explain your solution? I cant see the code in yotu commment

Also needing a solution, doesn't work on Android at all, so far.

I have the same problem, android not working at all. I'm stuck at the Success Security Warning and the page does not return to the app.

Got the same problem on my virtual android device...

I fixed this issue to change this line :
loginWindow.addEventListener('loadstart', loginWindow_loadStartHandler);

by :
loginWindow.addEventListener('loadstop', loginWindow_loadStartHandler);

The callback of the listener was never called, maybe because the window was already loaded with the url before to create the listener to know if the window is loading.
So now, the listener check if the window is loaded and not loading.

@picot56 maaaan, you saved my LIFE and my job!!!!! thaaaaaanks a lot!!!!!!

@picot56  where should be it?

In the openfb.js file, line 163

same problem here
I change this
loginWindow.addEventListener('loadstart', loginWindow_loadStartHandler);

with
loginWindow.addEventListener('loadstop', loginWindow_loadStartHandler);

but still got security warning, have another suggestion?

I tried with this, but it didn't work
2016-02-16 7:42 GMT-03:00 Dery Febriantara<EMAIL_ADDRESS>
same problem here
I change this
loginWindow.addEventListener('loadstart', loginWindow_loadStartHandler);
with
loginWindow.addEventListener('loadstop', loginWindow_loadStartHandler);
but still got security warning, have another suggestion?
—
Reply to this email directly or view it on GitHub
https://github.com/ccoenraets/OpenFB/issues/30#issuecomment-184619276.

@ignacio-chiazzo  I'm using ionic and build in android platform no problem at all, but this happened in blackberry10 platform.

in the function function loginWindow_loadStartHandler(event) in openfb.js
log variable  event.url. it show errors if have one. i had the same problem, my problem was wrong fb permissions.

@aytuncbeken What did you do to fix the wrong fb permissions?
I did what you suggested and saw the error code 200 (permission denied) in the variable event.url in the loginWindow_loadStartHandler function. I double-checked my app settings on the FB Developers page and also deleted the app from my personal facebook account so I could re-give permissions to the app.
Any suggestions on what to do?
Thanks!

I had the permission public_info, deleted it and just put email. May be you can try like that, if this passes the error then it means you have error on facebook permissions.
for ex:
function login() {
openFB.login(
function(response) {
if(response.status === 'connected') {
$.mobile.changePage("success.html");
} else {
alert('Facebook Login Failed: ' + response.error);
}
}, {scope: 'email'});
}

Thanks for the response!
I tested it out and it still didn't work. It turns out that InAppBrowser wasn't firing events (loadstart, exit, etc) on the first time I tried to log in, but only on the second time it loaded the page. I haven't fixed it yet but when I do, I'll post it here.
Thanks again.

nop, by the way when you said loadstart not firing, remembered that I had the same problem and i changed loadstart to loadstop. may it works for you too.
For Ex: in openfb.js
changed the line
loginWindow.addEventListener('loadstart', loginWindow_loadStartHandler);
to
loginWindow.addEventListener('loadstop', loginWindow_loadStartHandler);

Still not working. This is so weird...

I spent two days try to get this work but always the same in my bb10 platform i got security warning, and i end up with code like this and it work in my bb10 platform . i'm not using open fb.
$scope.bbFbLogin = function(){
       facebookOptions = {
   clientId: '82282982450922',
   clientSecret: 'bac50f42846b460485e82642102c03f',
   redirectUri: 'https://www.facebook.com/connect/login_success.html'
             };

           function startOAuth() {
   // open the authorzation url
   var url = 'https://www.facebook.com/dialog/oauth?client_id=' + facebookOptions.clientId + '&redirect_uri=' + facebookOptions.redirectUri + '&scope=email,publish_actions,public_profile';
   childWindow = window.open(url, '_blank');

   // evaluate the url every second, when facebook redirects to our callback url, the following if statements gets fired
   window.int = self.setInterval(function() {
       var currentURL = childWindow.window.location.href;
       var callbackURL = facebookOptions.redirectUri;
       var inCallback = currentURL.indexOf(callbackURL);
       // location has changed to our callback url, parse the oauth code
       if (inCallback == 0) {
         console.log("in if state");
           // stop the interval from checking for url changes
           window.clearInterval(int)

           // parse the oauth code
           var code = childWindow.window.location.search;
           console.log(childWindow.window);
           code = code.split('code=');
           code = code[1];
           window.authCode = code;

           // close the childWindow
           childWindow.close();

           setTimeout(function() {
               getAccessToken();
           }, 1000);
       }
   }, 1000);
}

/**
*  echange the oauth code, from an access token
*/
function getAccessToken() {

   var url = 'https://graph.facebook.com/oauth/access_token?client_id=' + facebookOptions.clientId + '&redirect_uri=' + facebookOptions.redirectUri + '&client_secret=' + facebookOptions.clientSecret + '&code=' + authCode;

   $.ajax({
       type: 'GET',
       url: url,
       success: function(data) {
           var response = data;

           // parse 'access_token' from the response
           var response = response.split('&');
           var theAccessToken = response[0].split('=');
           window.accessToken = theAccessToken[1];

           // get authenticated users' info/name
           getUserInfo();
       },

       error: function(data) {
           alert('Error getting access_token: ' + data.responseText);
           return false;
       }
   });
}

function getUserInfo() {
  $ionicLoading.show({
               template: '<ion-spinner icon="spiral"></ion-spinner>'
             })

$http.get("https://graph.facebook.com/v2.2/me", {params: {access_token: accessToken, fields: "name,gender,location,picture,email", format: "json" }}).then(function(result) {

         console.log();
          $scope.user = result.data;

         $ionicLoading.hide();
          $state.go('create-account');
   }, function(error) {
      $ionicLoading.hide();
       alert("Error: " + error);
   });

}

startOAuth();

     };

maybe it will help ..

@deryfebriantara thanks for the help, but i believe you should not be exposing your api secret. Maybe you generated a new one, just wanted to flag that out for you.

@cortezcristian  i delete two character :)

Hey everyone,
I am experiencing the same issue in my Cordova-based application. The different thing in my case is that the issue is only reproducible on iOS devices, when NOT connected to WIFI.
If the device is connected to wifi hotspot with good speed everything works, but with 3G or any other mobile data with weak connection, the security warning is shown every time.
On Android device the login works even on slow connection.
If anyone can suggest a solution for this, it would be great help (I have tried almost everything mentioned in the thread)!

@n1xan did you fix the issue with iOS devices when not connected to wifi?

@sabrinapisol no, i didn't. This was part of the cause for my project to fail. Having an application that fails to authenticate with facebook is really disappointing. After all this I decided to switch to native using NativeScript.
Good luck with this!


Fix Python-Logo stretching

@andrewstech do you know why no Deployment-Preview is generated?

@andrewstech do you know why no Deployment-Preview is generated?

Its appearing for me. It's the last check. Click the last details button.

https://deploy-preview-42--alpha-video-docs.netlify.app/

@andrewstech do you know why no Deployment-Preview is generated?

Its appearing for me. It's the last check. Click the last details button.

oh sorry, xD Yes, i also can see it

It should be fixed, there was just an css Variable missing, maybe have a last look at it
New Old


Made the home page

Dont think I messed up anything, but just check.. have to change the buttons function later to direct OAuth later...

have to change the buttons function later to direct OAuth later...
and what do you mean by this?

aand please dont do this

Consider using a formatter like Prettier and the pt prop instead of using the <br /> tag for Chakra components

Its not using those images... we can delete them. its taking the imgs from urls


[irods/irods#6073] Bumped version to 4.2.12 (4-2-stable)

#'d

Should we hold off on this in light of our release plans, or just go ahead and bump it?

i think i vote bump it, b/c we'll forget and then confuse ourselves later.   we can always come back and branch and... whatever.

Sold


Displaying multiple elections

We finally have two elections in the same jurisdiction available to test the multiple election functionality. Unfortunately, I'm not able to click on either election and move forward.
Operating System & Version: Windows Enterprise
Browser and Version: Chrome 37.0.2062.120 m
Test address (on staging): 2 Anne Hoxsie Ln
Narragansett RI 02882

@jen-tolentino Has this changed? When I enter that address into the staging tool it takes me to the RI State Rep. 33 Primary Election

One of the elections has been published, so they aren't showing up together. I'll ping you on this thread once both are live so you can test again. Thanks for check!


Can i put hidden states in sru cell forward like in vanilla pytorch?

In vanilla it work like this
rnn = nn.LSTMCell(10, 20)
input = torch.randn(6, 3, 10)
hx = torch.randn(3, 20)
cx = torch.randn(3, 20)
output = []
for i in range(6):
    hx, cx = rnn(input[i], (hx, cx))
    output.append(hx)

How can i do same for sru cell?

Yes you can. Here is an example:
https://github.com/asappresearch/sru/blob/master/language_model/train_enwik8.py#L79
The usage is like:
output, state = rnn(input, previous_state)
or explicitly
output, state = rnn(input, c0=previous_state)
https://github.com/asappresearch/sru/blob/master/sru/sru_functional.py#L348

@taoleicn
Should you advise, how can I use SRU class for train and SRU or SRUCell for autoregressive interference?
Using SRUCell should be ineffective for train, right?

@taoleicn
Should be sru cell example looks like this?
input = torch.randn(6, 3, 10)
cx = torch.randn(3, 20)
output = []
for i in range(6):
hx, cx = rnn(input[i], cx)
output.append(hx)

@hadaev8 you don't need to use the for loop here. It will be slow.
SRUCell takes care of it for you. Just do:
input = torch.randn(6, 3, 10)  # length: 6, batch size: 3, d: 10
cx = torch.randn(3, 20)
output, new_cx = SRUCell(input, cx)

output will be a tensor of output hidden states, with size = (length, batch_size, output_hidden_size)

@taoleicn
Well, it is for decoder.
I tried to compare performance with lstmcell.
But encountered a memory leak.
https://github.com/asappresearch/sru/issues/69
As I understand, it makes sense to use sru only in the encoder.

Well. You still don't need to use the for loop and can train SRU for decoder (autoregressive model).
The language model examples should already show how to do that:
https://github.com/asappresearch/sru/tree/master/language_model
These examples are no different to those using LSTM / GRU to be honest.

@taoleicn
My attention calucaletes recurcivelly.
I will try to check if it can be calculated in parallel.
Thanks.


Bug with Toggle In-call Status Bar

Hello, i have a bug with Toggle In-call status bar...

Project updated.


sdk: remove Microsoft.CodeAnalysis.NetAnalyzers

Removes Microsoft.CodeAnalysis.NetAnalyzers reference
cc @dagood @crummel @dseefeld @omajid

Looks like an error in dotnet new console smoke-test:
    Determining projects to restore...
    All projects are up-to-date for restore.
/src/testing-smoke/builtCli/sdk/5.0.100-preview.8.20417.9/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.Analyzers.props(13,3):
  error MSB4019: The imported project "/src/testing-smoke/builtCli/sdk/5.0.100-preview.8.20417.9/Sdks/Microsoft.NET.Sdk/analyzers/build/Microsoft.CodeAnalysis.NetAnalyzers.props" was not found. Confirm that the expression in the Import declaration "../analyzers/build/Microsoft.CodeAnalysis.NetAnalyzers.props" is correct, and that the file exists on disk. [/src/testing-smoke/C#_console/C#_console.csproj] [/src/build.proj]

  Build FAILED.

I'm not the most familiar with the background of these analyzers, but it looks like this one is shipped.
@crummel @dseefeld do you know more about this?

I'm not the most familiar with the background of these analyzers, but it looks like this one is shipped.

Ah yes, the code I removed includes the analyzer from the package:
-      <AnalyzerAssemblies Include="$(PkgMicrosoft_CodeAnalysis_NetAnalyzers)/analyzers/dotnet/cs/**/*.dll" />
-      <AnalyzerAssemblies Include="$(PkgMicrosoft_CodeAnalysis_NetAnalyzers)/analyzers/dotnet/vb/Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers.dll" />
-      <AnalyzerTargets Include="$(PkgMicrosoft_CodeAnalysis_NetAnalyzers)/build/**/*" />

Closing this PR because we should build  the analyzer instead.


React 17

Hello,
I am using react-native in version 0.64 with react 17. This version is not compatible because of the peerDependencies. Do you know if it will evolve to the new version?
Thanks.

Hi @alexandrtovmach, using yarn work fine.
I try also to remove node_modules, package-lock.json and yarn.lock but this doesnt work. I am pretty sure it is link to the peerDependencies from the package.json of `react-native-maps' library.
So I will now use yarn. I tell you if something wrong happened using the lib.

@nazstone yes, yarn resolving packages in a different way than npm, that's why it works. So you can use it as workaround.
Anyway if you interested in fixing the issue to continue using npm, just put things that I asked, and I'll try to help.

This is a hack which is not recommended if you don't know what you are doing.
So I just manually cloned and installed myself.

clone repo into /node_modules
cd node_modules && git clone https://github.com/react-native-maps/react-native-maps.git
config Podfile
add pod 'react-native-maps', :path => '../node_modules/react-native-maps' into Podfile
cd ios && pod install

This way you can use the package like normal at least on IOS.
(I only needed IOS version so haven't configured Android part)

just force install package
npm install react-native-maps --force

@nazstone yes, yarn resolving packages in a different way than npm, that's why it works. So you can use it as workaround.
Anyway if you interested in fixing the issue to continue using npm, just put things that I asked, and I'll try to help.

Thanks I will use yarn.

Hello, every all.
The steps I gave to make it work:
Update to version 17.0.2 of ReactJS
Remove Package-lock.json, yarn.lock, node_modules
Change in the package.json the version of the reactjs manually 17.0.2
-yarn upgrade --dev
yarn add react-native-maps -E
-ncu -u
There the map was installed correctly, but I had some other things that I could not install with yarn and therefore it gave me some problems, so I executed:
npm install
and voila I have the maps already working in the latest version of ReactJS with React Native

Regards,

I'm not quite sure why this was closed. Force installing is not a sensible option as it will cause any other invalid peer dependencies inside your dependency resolution chain to also be installed.
The real fix here is to change the peer dependency resolution field in the package.json for this project to "react": "16.x || 17.x". Otherwise, people using npm 7 and React Native 0.64 will see this error and will not be able tom proceed without force-installing.
The reason that some people are seeing this error, and others aren't: npm v7 has started installing peer dependencies automatically. If two of your dependencies ask for the same peer dependency package, but a different version, this is a package mismatch and npm v7 will bail out when installing. In this case, because React Native 0.64 has a peer dependency of React 17, and this repo has a peer dependency of React 16, npm can't continue. If you are on npm v6, or yarn, you won't see this error.
More info: https://github.com/npm/rfcs/blob/latest/implemented/0025-install-peer-deps.md


Dashboard Settings: Publisher Logo Copy Update

Feature Description
Per discussion here: https://github.com/google/web-stories-wp/issues/9096#issuecomment-928048933 updating the publisher logo copy to include a little blurb about removal.
Suggested copy is: Removing a logo from your settings won't remove it from any stories that use that logo.
Alternatives Considered

Additional Context

Lowercase "stories" would be nice :-)

Verified in QA


Workaround for bug in rendering of raw tags

Closes #1992
Workaround for issue with raw tags rendering on certain pages.
Continuation of PR #1979

Thanks!


Sentry init

From this PR  https://github.com/docker-library/sentry/pull/8 on, there is no config file anymore.
As mentioned in that PR:

From now on, "sentry init" is going to be required for generating a sane sentry.conf.py.

If you fail to do this, you get this error:

ValueError: Configuration file does not exist at '/.sentry/sentry.conf.py'

So what to do after doing, essentially, a docker run progress and docker run sentry?
The sentry container is stopped now, and we need to run sentry init and have that config inside your container. And keep it there.
There is no mention of how to run the init, but I believe the basics would be something like this
sudo docker run -it --rm --link some-postgres:postgres sentry sentry init /home/user/.sentry/sentry.conf.py

this does create a sentry.conf.py somewhere, but where? Because if I want to go on and create a superuser as the README.md suggest, I still get the issue with the config file:
sudo docker run -it --rm --link some-postgres:postgres sentry sentry --config=/home/user/.sentry/sentry.conf.py createsuperuser

ValueError: Configuration file does not exist at '/home/user/.sentry/sentry.conf.py'

On your first run you'll need to get the file out of the container. Since the --rm will delete the container once it stops, you'll need to get it while it is still running. Try using a -v /local/dir/:home/user/.sentry/ and then the same -v with the next run.

ok, that sounds doable I guess, I'lll try that later this week. It might be a good one to add to the Readme later on.

I made:
$ docker run -ti --name sentry --link some-postgres:postgres --link some0redis:redis -p 3000:9000  sentry bash
# sentry init /home/user/.sentry/sentry.conf.py

$ docker start sentry

I thought I'd filed an issue specifically about documenting this in https://github.com/docker-library/docs/blob/master/sentry/content.md, but I can't find it now.  This process definitely needs to be documented, since it's not as trivial as the current description leads one to believe.

This is fixed now! :+1:


Thread – Unable to leave thread in a task detail.

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number:  v9.0.5-3
Reproducible in staging?: y
Reproducible in production?: n
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4700550
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: applause internal team
Slack conversation:
Action Performed:

Go to https://staging.new.expensify.com/
Log in
Open any chat
Send a message
Right click on the message and select Reply in thread
Send a message in a thread
Click on the header

Expected Result:
Leave thread option is present in a task detail
Actual Result:
Leave thread option is missing in a task detail
Workaround:
unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
https://github.com/Expensify/App/assets/38435837/9932b490-414e-407b-bab1-4c9b11962dc7

View all open jobs on GitHub

@abekkala FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

We think that this bug might be related to  #vip-vsb

Proposal
Please re-state the problem that we are trying to solve in this issue.
There is no option to leave thread in report details page.
What is the root cause of that problem?
The condition of showing the leave button requires the report to not be a thread.
https://github.com/Expensify/App/blob/e0ccba51a40d67283b658aeffa3040fb2eb45795/src/pages/ReportDetailsPage.tsx#L243-L244
Previously, we had a 3-dot button that shows the leave option for the thread, but now it's removed, but the leave button condition isn't updated yet.
What changes do you think we should make in order to solve the problem?

I propose that we just use ReportUtils.canLeaveChat function to check whether we can leave a report or not. Then, we can move the other current conditions to canLeaveChat.
const shouldShowLeaveButton = ReportUtils.canLeaveChat(report, policy)

function canLeaveChat(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>): boolean {
    if (isGroupChat) return true;
    if (isPolicyExpenseChat && !report.isOwnPolicyExpenseChat && !isPolicyAdmin) return true;
    ...

Last, we need to update the leaveChat logic so that leaving a thread will call leaveRoom instead of leaveGroupChat.
https://github.com/Expensify/App/blob/e0ccba51a40d67283b658aeffa3040fb2eb45795/src/pages/ReportDetailsPage.tsx#L224-L232
We can do that by switching the check.
if (isGroupChat) {
    leaveGroupChat()
    return;
}
leaveRoom()

I don't think this needs to block the deploy. Going to demote it and make it external.

@bernhardoj's proposal works here.
🎀👀🎀 C+ reviewed.

Sounds good. I like consolidating the logic into ReportUtils.canLeaveChat.

PR is ready
cc: @akinwale

waiting on PR Review @akinwale

deployed to production Jul 23

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

[x]  [@akinwale] The PR that introduced the bug has been identified. Link to the PR:
[x]  [@akinwale] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:

This was a regression from https://github.com/Expensify/App/pull/44252.

[x]  [@akinwale] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[x]  [@akinwale] Determine if we should create a regression test for this bug.
[x]  [@akinwale] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression Test Steps

Launch Expensify
Open a chat report
Send a message
Reply in the thread of the message that was sent
Click or tap on the chat header
Verify that the Leave option is displayed in the menu

Do we agree 👍 or 👎?

PAYMENT SUMMARY FOR JULY 30

Fix: @bernhardoj [$250] payment via New Dot
PR Review: @akinwale [$250] Offer

@akinwale payment sent and contract ended - thank you!

Requested in ND.

$250 approved for @bernhardoj


Fix for tool path

Fixes the launch commands showing the workflow name twice when present.

Codecov Report

Merging #215 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #215   +/-   ##
========================================
  Coverage    61.29%   61.29%
========================================
  Files          106      106
  Lines         3175     3175
  Branches       411      411
========================================
  Hits          1946     1946
  Misses        1016     1016
  Partials       213      213

Continue to review full report at Codecov.

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


Example of reading and writing baseline

Hi, is there an example of a code with read and write baseline somewhere?

I remembered that I added that code upon request, and that somebody tested it and said it worked. I looked up who said that, it's you 😉 "I did the test. Saving the baseline works."
I don't have code, but indeed it would be good to have it in some example. Volunteers?

Yes, I remember that. Maybe someone did it and share their code.

I found some time and made an example based on https://github.com/sparkfun/SparkFun_CCS811_Arduino_Library/blob/master/examples/Example4_SetBaseline/Example4_SetBaseline.ino
To make it work, I changed the get_baseline in ccs811.h to:
uint16_t CCS811::get_baseline(void) {   uint8_t buf[2];   wake_up();   bool ok = i2cread(CCS811_BASELINE,2,buf);   wake_down();   unsigned int baseline = (buf[0]<<8) + buf[1];   return baseline; }
My example code for ESP32 (I did not test it on ESP8266!) for loading, saving and deleting a baseline: https://pastebin.com/KGigYPr6

Hello,
It looks maarten-pennings wanted to make you work a bit ahaha.
I guess you previously tested baseline on another library.
Here's how to do it with maarten's code, simply ;
uint16_t ccs811Baseline;
ccs811.get_baseline(&ccs811Baseline);

Can you post a valid code for ESP8266? And more precisely what needs to be changed in the library to work because the above example gives error.

I'm not sure what you want to see.
The easy part is to actually get and set the baseline.
The hard part is when.
And another hard part is how and where to save the baseline when the Arduino itself will power off.
This is how a main program could be structured
void setup() {
  ... no special code for baseline (the CCS811 will run with "zero baseline" the first 20 min) ...
}

void loop() {
  // Get the baseline from persistent memory and write to CCS811 when the CCS811 is on for 20 min
  if( CCS811 is powered 20 min ) {
    handle_baseline_for_power_on();
  }

  // If there is a reason to switch off the CCS811 and the Arduino
  if( ... reason to switch off ... ) {
    if( CCS811 is powered for at least 20 min) { handle_baseline_for_power_off(); }
    // somehow switch ourselves (Arduino) and CCS811 off
    ...
  }

  ... code that uses the CCS811 ...
}

Then you would need two helpers handle_baseline_for_power_on/off.
They need persistent storage...
// These variable should somehow be made persistent (i.e. saved to some flash)
// In this example I will just pretent they are persistent
uint16_t persistent_baseline;
bool persistent_baseline_available = false;

// Only call after CCS811 is on for 20min
void handle_baseline_for_power_off() {
  uint16_t baseline;
  bool ok;

  ok= get_baseline(&baseline);
  if( ok ) {
    // I2C transaction successful, so save the baseline persistently (and record it is valid)
    persistent_baseline = baseline;
    persistent_baseline_available = true;
  }
}

// Only call after CCS811 is on for 20min
void handle_baseline_for_power_on() {
  // If no baseline is saved persistently, continue with the "zero baseline" from setup()
  if( persistent_baseline_available ) {
    bool ok;
    ok= set_baseline(persistent_baseline);
    if( !ok ) { ... I2C transaction failed ... hmm ... what to do ... }
  }
}

This code is not even tested on syntax ...

I had the impression baseline register can't be written, thats why Google brought me here.
If you save the baseline, be sure to save that values when sensor is outside in fresh air for a few minutes. I've waited at least 20 minutes. Since it is winter now and temperatures are quite cold, please make sure to write environmental calibration settings. This changes the TVOC and thus eCO2 a lot.
Then take the sensor in and restore the baseline calibration.
If you restore a baseline calibration value which would lead to no detection of TVOC internal calibration method adjusts baseline calibration register and so it seems your write to the baseline calibration was unsuccessful.
I hope the automatic baseline calibration won't change or adjust this value that after 24 hours the lowest measured TVOC measurement is set as baseline for 0 TVOC / 400 ppm eCO2. Reading the section about automatic calibration could mean this. If so you have to monitor baseline register and write back your value from clean outside air.
If you don't write the baseline calibration register CCS811 adjusts its internal correction after each startup to 0 TVOC / 400 ppm eCO2.
For long running sensors after the first 500 hours manual recommends saving baseline every 5-7 days. So to get a tradeoff between reliable values and comfort I would put it to fresh outside air once month.
Please note that just opening a window can take hours to have really fresh like outside air inside. I've seen this with CO2 sensors.  This strongly depends on the position of the sensor inside the room and how wide you open the window. But at cold temperatures outside you lose significant amount of energy until air has really outside quality.

I had the impression baseline register can't be written, thats why Google brought me here.
If you save the baseline, be sure to save that values when sensor is outside in fresh air for a few minutes. I've waited at least 20 minutes. Since it is winter now and temperatures are quite cold, please make sure to write environmental calibration settings. This changes the TVOC and thus eCO2 a lot.
Then take the sensor in and restore the baseline calibration.
If you restore a baseline calibration value which would lead to no detection of TVOC internal calibration method adjusts baseline calibration register and so it seems your write to the baseline calibration was unsuccessful.
I hope the automatic baseline calibration won't change or adjust this value that after 24 hours the lowest measured TVOC measurement is set as baseline for 0 TVOC / 400 ppm eCO2. Reading the section about automatic calibration could mean this. If so you have to monitor baseline register and write back your value from clean outside air.
If you don't write the baseline calibration register CCS811 adjusts its internal correction after each startup to 0 TVOC / 400 ppm eCO2.
For long running sensors after the first 500 hours manual recommends saving baseline every 5-7 days. So to get a tradeoff between reliable values and comfort I would put it to fresh outside air once month.
Please note that just opening a window can take hours to have really fresh like outside air inside. I've seen this with CO2 sensors.  This strongly depends on the position of the sensor inside the room and how wide you open the window. But at cold temperatures outside you lose significant amount of energy until air has really outside quality.

I'm experimenting with this library and sensor's baseline for quite a while now. I'm getting some problems setting the correct baseline.
It's winter now so to get clean air means putting it on my balcony where it's quite cold (~0C). I then wait for the baseline to stabilize after about 30-40min.
So first question arises - does the temperature/humidity affect baseline reading? I assume that yes.
Therefore I have DHT22 sensor connected to the same ESP32 and I tried adding corrections via setEnvironmentalData. This changes the baseline significantly, however, in my case for some reson it sets it to "higher" standard. So indoors it shows very high numbers (eCO2 @ 2500+) although air is not nearly that bad. Of course indoor readings also get compensated via setEnvironmentalData.
This leads me to the main question - how to properly get the baseline? Do I need to wait for warmer weather and then take it outside to get proper baseline? Should I somehow get clean air indoors at room tempertures? Are there any general guidelines to get proper baseline?

The MoX sensor has a resistance depending on the gases in the air. The cleaner the air the lower the resistance. Unfortunately, this relation is not stable in time (resistance changes due to what happened in the past). So what the firmware of a MoX sensor does is record the lowest resistance it has seen - the cleanest air. Let's call this R0. When you perform a measurement, the sensor measures the current resistance, let's call it Rc, and it roughly outputs Rc/R0; this is called eqTVOC. The problem is, that the sensor resistance for clean air changes in time, so the sensor needs to adapt R0. The firmware has algorithms to adapt R0 on a daily basis (24 hour cycle).
The R0 is called the "baseline". As noted above, R0 is maintained by the sensor as long as it is powered. Once the sensor is switched off, R0 is lost. After a new power on, it takes some time before a good R0 is determined by the sensor.
What the chip supports is baseline backup and restore.  Make sure that the x=get_baseline() is executed when the chip actually has a good baseline, so it must have run long enough. Also,  execute set_baseline(x) after power on and a delay to wait that the sensor is stable otherwise the written baseline might be overwritten by not-yet-correct Rc (unstable MoX) by the firmware. Read the datasheet  (and separate app note https://www.sciosense.com/wp-content/uploads/documents/Application-Note-Baseline-Save-and-Restore-on-CCS811.pdf) for details on when to do this exactly
Putting it outside does not seem wise: 1) the baseline is constantly adjusted, 2) R0 is now for outside and Rc for inside, so Rc/R0 has a mismatch, 3) ccs811 is in indoor air quality sensor.
Yes humidity and temperature are relevant, so measure them and feed them (use the appropriate function, and take care of the units).


Upon mirror topic creation, have the option to not store credentials in the Terraform state file.

Just like with topic and schema creation, customer has asked if it could be possible to also have the option of NOT storing credentials in the TF state file when creating mirror topics.
Case 187643
Discussed in #terraform: https://confluent.slack.com/archives/C01880K2BAA/p1703872608176549?thread_ts=1703869169.969629&cid=C01880K2BAA

We've hit this issue as well. This has more effect on other parts of the code as well.
The issue lies within this code:
https://github.com/confluentinc/terraform-provider-confluent/blob/master/internal/provider/resource_kafka_mirror_topic.go#L95
It lacks the same logic as the regular topic:
https://github.com/confluentinc/terraform-provider-confluent/blob/master/internal/provider/resource_kafka_topic.go#L153
The regular topic attempts to extract the configuration from either the Environment or the Resource, whereas the Mirror topic specifically requires it to be set in the Resource.


[Xcodeproj] Assign stable object IDs to critical objects.

Objects where can be referenced across projects should have stable IDs,
because Xcode will embed the references to these targets by their ID. We want
those references to remain stable even as the project evolves under
regeneration.

rdar://problem/31019219 Generated .xcodeproj needs to use stable object IDs

@swift-ci please smoke test


Adds Frizbee Action

This PR adds the open source Frizbee action to the repository.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.86%. Comparing base (dde86c6) to head (f782d4f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #596   +/-   ##
=======================================
  Coverage   89.86%   89.86%
=======================================
  Files          19       19
  Lines        1125     1125
=======================================
  Hits         1011     1011
  Misses        114      114

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

thanks!


Spark-16669:Adding partition prunning to Metastore statistics for better join selection.

What changes were proposed in this pull request?
Currently the metastore statistics returns the size of entire table which results in Join selection strategy to not use broadcast joins even when only a single partition from a large table is selected. This PR addresses that issue by only estimating the size of the partition by applying partition pruning during size estimation. Currently it only works with partition columns used with equality checks under AND,OR,IN Operators. If a partition column is used in any other operator, it defaults back to total table size. A config controls the behavior which is off by default.
How was this patch tested?
Unit tests added, and manually tested in local environment.

Can one of the admins verify this patch?

closing this PR and opening a PR against master branch as 2.0 is already released.


ENH: update package version

Hi! This is the friendly automated conda-forge-webservice.
I've started a version update as instructed in #17.
I'm currently searching for new versions and will update this PR shortly if I find one! Thank you for waiting!
Fixes #17

Hi! This is the friendly automated conda-forge-linting service.
I wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found some lint.
Here's what I've got...
For recipe/meta.yaml:

❌ This recipe is using a compiler, which now requires adding a build dependence on {{ stdlib("c") }} as well. Note that this rule applies to each output of the recipe using a compiler. For further details, please see https://github.com/conda-forge/conda-forge.github.io/issues/2102.

For recipe/meta.yaml:

ℹ No valid build backend found for Python recipe for package pygcgopt using pip. Python recipes using pip need to explicitly specify a build backend in the host section. If your recipe has built with only pip in the host section in the past, you likely should add setuptools to the host section of your recipe.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/12224260190. Examine the logs at this URL for more detail.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.
I do have some suggestions for making it better though...
For recipe/meta.yaml:

ℹ No valid build backend found for Python recipe for package pygcgopt using pip. Python recipes using pip need to explicitly specify a build backend in the host section. If your recipe has built with only pip in the host section in the past, you likely should add setuptools to the host section of your recipe.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/12340450827. Examine the logs at this URL for more detail.

@conda-forge-admin, please rerender


Update TOC of docs

delete unused files and update TOC of README

Coverage remained the same at 55.179% when pulling eb11215b95bb31fdf8973d4d5fc7a43e573e3f11 on hainingzhang:master into 05378cbd85be141c19d9aa7542356beb274d8845 on vmware:master.

Coverage remained the same at 55.179% when pulling fec9084e3fadeeb168eabbe4ddcead4fd48a22f6 on hainingzhang:master into 05378cbd85be141c19d9aa7542356beb274d8845 on vmware:master.

Coverage increased (+0.05%) to 55.226% when pulling 58433df1acc9b4114fa05dc85be048171fd42b16 on hainingzhang:master into 05378cbd85be141c19d9aa7542356beb274d8845 on vmware:master.


Any tools to convert Assemblytics bed output to vcf format?

Hi Nattestad,
Do you have any recommended tools to convert Assemblytics bed output to vcf format?
Thanks,
Junpeng

Some followups, I just want to annotate the functional consequence of these structural variations. VCF format is the stadard file format for some variant predictors such as snpEff and VEP.

I’m not sure if there are any tools for that, so I think your best bet is
to write a custom script like in python. Just note that VCF formats for
structural variants are not well standardized, and the tools you mentioned
may only be able to work with very specific formats.
Good luck!
On Sat, Jun 22, 2019 at 2:19 AM Junpeng Shi<EMAIL_ADDRESS>wrote:

Some followups, I just want to annotate the functional consequence of
these structural variations. VCF format is the stadard file format for some
variant predictors such as snpEff and VEP.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/MariaNattestad/Assemblytics/issues/17?email_source=notifications&email_token=AB4W4PPOGZ2LQCA3VLYPQP3P3XVB3A5CNFSM4H2WITR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYKFEKA#issuecomment-504648232,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB4W4PJQFHQJ4GBNHZPX3HTP3XVB3ANCNFSM4H2WITRQ
.

It would be nice if there is any script already to convert Assemblytics output to VCF, in order other tools can accept this output.
Thanks

SURVIVOR has some support for this:
https://github.com/fritzsedlazeck/SURVIVOR
Good luck!
Mike
On Wed, Nov 4, 2020 at 9:45 AM AGR<EMAIL_ADDRESS>wrote:

It would be nice if there is any script already to convert Assemblytics
output to VCF, in order other tools can accept this output.
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/MariaNattestad/Assemblytics/issues/17#issuecomment-721773900,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABP345MVJCD2DEDKYPRRTDSOFSH3ANCNFSM4H2WITRQ
.

Cordial greeting. Thanks for your answer, however Im not been able to get
in the same VCF file all types of variants.
The command request "TYPE", thus, is there any way to put ALL types of
variants, in order the vcf output extract all the variants identified by
assemblytics.
In the moment if I type DEL, Survivor changes all the variants to Deletions
even the insertions are marked as Deletions
thanks
El mié., 4 nov. 2020 a las 10:26, Michael Schatz<EMAIL_ADDRESS>escribió:

SURVIVOR has some support for this:
https://github.com/fritzsedlazeck/SURVIVOR
Good luck!
Mike
On Wed, Nov 4, 2020 at 9:45 AM AGR<EMAIL_ADDRESS>wrote:

It would be nice if there is any script already to convert Assemblytics
output to VCF, in order other tools can accept this output.
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<
https://github.com/MariaNattestad/Assemblytics/issues/17#issuecomment-721773900
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AABP345MVJCD2DEDKYPRRTDSOFSH3ANCNFSM4H2WITRQ
.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/MariaNattestad/Assemblytics/issues/17#issuecomment-721798033,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHFDTT3V4337KA3HZRE5D3LSOFXATANCNFSM4H2WITRQ
.

--
Adriana María Gallego Rúa
*Investigadora *Laboratorio de Biotecnología
Universidad de Antioquia
ColombiaMedellín-2020

Hmmm.... Can you fill a ticket with SURVIVOR to see if they can address?
On Wed, Nov 4, 2020 at 10:29 AM AGR<EMAIL_ADDRESS>wrote:

Cordial greeting. Thanks for your answer, however Im not been able to get
in the same VCF file all types of variants.
The command request "TYPE", thus, is there any way to put ALL types of
variants, in order the vcf output extract all the variants identified by
assemblytics.
In the moment if I type DEL, Survivor changes all the variants to Deletions
even the insertions are marked as Deletions
thanks
El mié., 4 nov. 2020 a las 10:26, Michael Schatz (<
<EMAIL_ADDRESS>escribió:

SURVIVOR has some support for this:
https://github.com/fritzsedlazeck/SURVIVOR
Good luck!
Mike
On Wed, Nov 4, 2020 at 9:45 AM AGR<EMAIL_ADDRESS>wrote:

It would be nice if there is any script already to convert Assemblytics
output to VCF, in order other tools can accept this output.
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<

https://github.com/MariaNattestad/Assemblytics/issues/17#issuecomment-721773900

,
or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AABP345MVJCD2DEDKYPRRTDSOFSH3ANCNFSM4H2WITRQ

.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<
https://github.com/MariaNattestad/Assemblytics/issues/17#issuecomment-721798033
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AHFDTT3V4337KA3HZRE5D3LSOFXATANCNFSM4H2WITRQ
.

--
Adriana María Gallego Rúa
*Investigadora *Laboratorio de Biotecnología
Universidad de Antioquia
ColombiaMedellín-2020
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/MariaNattestad/Assemblytics/issues/17#issuecomment-721800133,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABP34ZNLTW4IA5E3Y3TU7DSOFXN3ANCNFSM4H2WITRQ
.

I already did
Thanks
El mié., 4 nov. 2020 a las 10:42, Michael Schatz<EMAIL_ADDRESS>escribió:

Hmmm.... Can you fill a ticket with SURVIVOR to see if they can address?
On Wed, Nov 4, 2020 at 10:29 AM AGR<EMAIL_ADDRESS>wrote:

Cordial greeting. Thanks for your answer, however Im not been able to get
in the same VCF file all types of variants.
The command request "TYPE", thus, is there any way to put ALL types of
variants, in order the vcf output extract all the variants identified by
assemblytics.
In the moment if I type DEL, Survivor changes all the variants to
Deletions
even the insertions are marked as Deletions
thanks
El mié., 4 nov. 2020 a las 10:26, Michael Schatz (<
<EMAIL_ADDRESS>escribió:

SURVIVOR has some support for this:
https://github.com/fritzsedlazeck/SURVIVOR
Good luck!
Mike
On Wed, Nov 4, 2020 at 9:45 AM AGR<EMAIL_ADDRESS>wrote:

It would be nice if there is any script already to convert
Assemblytics
output to VCF, in order other tools can accept this output.
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<

https://github.com/MariaNattestad/Assemblytics/issues/17#issuecomment-721773900

,
or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AABP345MVJCD2DEDKYPRRTDSOFSH3ANCNFSM4H2WITRQ

.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<

https://github.com/MariaNattestad/Assemblytics/issues/17#issuecomment-721798033

,
or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AHFDTT3V4337KA3HZRE5D3LSOFXATANCNFSM4H2WITRQ

.

--
Adriana María Gallego Rúa
*Investigadora *Laboratorio de Biotecnología
Universidad de Antioquia
ColombiaMedellín-2020
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<
https://github.com/MariaNattestad/Assemblytics/issues/17#issuecomment-721800133
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AABP34ZNLTW4IA5E3Y3TU7DSOFXN3ANCNFSM4H2WITRQ
.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/MariaNattestad/Assemblytics/issues/17#issuecomment-721807999,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHFDTT7PDRWWL7CB2G7OJW3SOFY6ZANCNFSM4H2WITRQ
.

--
Adriana María Gallego Rúa
*Investigadora *Laboratorio de Biotecnología
Universidad de Antioquia
ColombiaMedellín-2020


Refactor categorized sort order code to use Wicket events

To improve the robustness and reduce complexity of the categorized sort order mechanism, we should look to refactor the existing code to use Wicket events.  The problem is, we need to keep the sort order XML in sync with the state of the gradebook.  This includes when grade items are added, removed or moved to a new category; or when categories are enabled, disabled, added or removed.  Wicket events seem like a good fit to broadcast when these changes happen and callbacks can ensure the XML is in sync.
Relates to #282.

This issue was moved to sakaiproject/sakai#1389


Add note to say preemptible VMs cannot be automatically restarted

From Google's documentation:
You cannot configure a preemptible instances to live migrate. The maintenance behavior for preemptible instances is always set to TERMINATE by default, and you cannot change this option. It is also not possible to set the automatic restart option for preemptible instances

@peterellisjones did @EngineerBetter sign CLA?

Hi Dmitriy,
Yep EB have signed it and I've also signed it as an individual
cheers,
Pete
--
Peter Jones
From: Dmitriy Kalinin<EMAIL_ADDRESS><EMAIL_ADDRESS>Reply: cloudfoundry/docs-bosh
<EMAIL_ADDRESS><EMAIL_ADDRESS>Date: 6 March 2017 at 23:22:38
To: cloudfoundry/docs-bosh<EMAIL_ADDRESS><EMAIL_ADDRESS>CC: Peter Jones<EMAIL_ADDRESS><EMAIL_ADDRESS>Mention
<EMAIL_ADDRESS><EMAIL_ADDRESS>Subject:  Re: [cloudfoundry/docs-bosh] Add note to say preemptible VMs
cannot be automatically restarted (#277)
@peterellisjones https://github.com/peterellisjones did @EngineerBetter

https://github.com/EngineerBetter sign CLA?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/cloudfoundry/docs-bosh/pull/277#issuecomment-284567774,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACqMzGQzMgBqSGTWGXORpYG5tWzDqDHmks5rjJU-gaJpZM4Lzygq
.

Thank you.


Add save_fig function

Implementation of saving figure function

Codecov Report

Merging #26 (ab7596c) into main (363739f) will increase coverage by 0.44%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #26      +/-   ##
==========================================
+ Coverage   98.75%   99.19%   +0.44%
==========================================
  Files          39       39
  Lines        4653     4872     +219
==========================================
+ Hits         4595     4833     +238
+ Misses         58       39      -19

Flag
Coverage Δ

unittests
99.19% <100.00%> (+0.44%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pDESy/model/base_factory.py
99.27% <100.00%> (+0.16%)
:arrow_up:

pDESy/model/base_organization.py
100.00% <100.00%> (ø)

pDESy/model/base_product.py
100.00% <100.00%> (ø)

pDESy/model/base_project.py
98.46% <100.00%> (+0.11%)
:arrow_up:

pDESy/model/base_team.py
100.00% <100.00%> (ø)

pDESy/model/base_workflow.py
97.24% <100.00%> (+0.24%)
:arrow_up:

tests/model/test_base_factory.py
100.00% <100.00%> (+1.12%)
:arrow_up:

tests/model/test_base_organization.py
100.00% <100.00%> (+3.05%)
:arrow_up:

tests/model/test_base_product.py
100.00% <100.00%> (+2.01%)
:arrow_up:

tests/model/test_base_project.py
100.00% <100.00%> (+1.17%)
:arrow_up:

... and 6 more

Continue to review full report at Codecov.

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

OK!!

Fix #26


Proper license support

Currently only the license name can be changed, but it would be good to have a list of licenses that the user could pick from and set in the config to generate.

The implementation for this, to do it well, is too different for it to not be breaking. This has been delayed until v1.0.


URL refuses download on latest YT-DL:    https://youtu.be/9lembnHGIfU

HI YTDL-ORG:
I have used your marvellous code for years - thank you for it - it's been faultless for years.
TODAY I've for the first time ever - hit one it can't download:       https://youtu.be/9lembnHGIfU
PLAYS fine - it's precious CSNY-at-Woodstock material.   But just refuses to download.
BELOW is a full verbose output,  after checking I have latest copy.   This is on Antix Linux v19 on a Dell D830:
Would be marvellous if you can advise or fix :)
Best Wishes
Mike H
London UK
 ```
$ youtube-dl -U
youtube-dl is up-to-date (2021.12.17)
mikeh@Dell830-Antix1:/media/DATA/__MEDIA/Youtube_DLs
$ youtube-dl --verbose https://youtu.be/9lembnHGIfU
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'https://youtu.be/9lembnHGIfU']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 2.7.16 (CPython) - Linux-4.9.0-264-antix.1-amd64-smp-x86_64-with-antiX-19.4-buster
[debug] exe versions: ffmpeg 4.1.6-1, ffprobe 4.1.6-1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] 9lembnHGIfU: Downloading webpage
ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 1794, in _real_extract
    'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profile_url else None,
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 1012, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
 ```

Mike, #30839, please.


Make JSON prettifying optional

This PR adds an optional argument to the |tojson filter, which controls if the serialized JSON data gets prettified or not. The arguments works the same as flask's |tojson filter, which passes the argument to python's json.dumps():

Omitting the argument, providing a negative integer, or None, then compact JSON data is generated.
Providing a non-negative integer, then this amount of ASCII spaces is used to indent the data. (Capped to 16 characters.)
Providing a string, then this string is used as prefix. I attempts are made to ensure that the prefix actually consists of whitespaces, because chances are, that if you provide e.g. &nsbp;, then you are doing it intentionally.

This is a breaking change, because it changes the default behavior to not prettify the data. This is done intentionally, because this is how it works in flask.

Looks much simpler now, thanks! Please feel free to merge once CI pass.


fix(python): Fix Relative Import Paths

We were previously including the root module in the import path and going up an extra level. This is a bug that this PR fixes.

Ah it turns out that this was an issue in my implementation, not on fern's side. Going to close this.


add a method providing access to the original VOTable parser

It is politically important to tell users: you can leave the model framework at any time  and fall back into the standard way to process data.
__init__(...)
...
self._votable = parse("...")
....

@property
def votable(self):
    return self._votable

property added


Directory path instead of file path

Hello, It's me again. In the latest commit you introduce the method ToAbsoluteUri.
Is it on purpose to trim the file name and only keep the directory? From what I read the vertex uri should target the file instead of the directory.

Oh, I forgot to check the document path when refactoring. Quick fix has been pushed

Fixed, thank you


Add minimum platforms

This PR will add the minimum platforms to Package.swift this will allow an app that uses the framework to build for archiving/release
This PR also fixes some comments

@orj was using this in RoadRunner and figured this should probably be on the main branch


Require only the parts of pyobjc that we need.

The pyobjc is large and takes a long time to compile. We only need pyobjc-core.

@stuaxo Just saw this. It's been a while, sorry 😮. PR created.

Thanks!


get a documentation for and finalized version of RecommendedTBBVersions

At the moment RecommendedTBBVersions looks like this.
[
"2.3.25-15-MacOS",
"2.3.25-15-Windows",
"2.3.25-15-Linux",
"2.3.25-16-Linux",
"2.4.17-rc-1-MacOS",
"2.4.17-rc-1-Windows",
"2.4.17-rc-1-Linux",
"2.4.18-rc-1-MacOS",
"2.4.18-rc-1-Windows",
"2.4.18-rc-1-Linux",
"2.4.18-rc-2-Linux",
"3.0-beta-1-Linux",
"3.0-beta-1-MacOS",
"3.0-beta-1-Windows"
]

This time only the 64 bit version was updated.
On the download page,

2.3.25-15 32 bit exists.
2.3.25-15 64 bit exists.
2.3.25-16 32 bit does not exist.
2.3.25-16 64 bit exists.

How are scripts supposed to know 2.3.25-15 is the latest recommended version for 32 bit? Because 2.3.25-15 precedes 2.3.25-16 in the list? Where is this documented?
torbrowser-launcher will probably break again and again when  RecommendedTBBVersions changes its format. Would it make sense to ask The Tor Project about documentation for and finalized version of RecommendedTBBVersions?

Posted a bunch of tickets related to this.
better support for TBB / TPO software downloaders:
https://trac.torproject.org/projects/tor/ticket/14386
finalize RecommendedTBBVersions format:
https://trac.torproject.org/projects/tor/ticket/14383
have a permanent link to RecommendedTBBVersions:
https://trac.torproject.org/projects/tor/ticket/14384
use a download similar folder layout as TBB:
https://trac.torproject.org/projects/tor/ticket/14385

Now that TBL isn't checking RecommendTBBVerisons, this issue isn't relevant anymore.


No Clear way to abort XmlHttpRequest

Is there a simple way to expose the XHR object so that it can be aborted, or is this better off being handled somehow in a response interceptor?

This is a common problem with using Promises. There is no way to return the XHR object from axios since the Promise is already being returned. I have had a lot of requests for this behavior though, and have given it a lot of thought. I actually had an idea last night that I want to play with. I will let you know if it pans out.

If you're interested in seeing my proposal, I have it in a Gist https://gist.github.com/mzabriskie/ec3a25dd45dfa0de92c2

Has this proposal been implemented?

I have a working version of aborting requests ready to commit. Though I am debating a piece of the implementation. How should aborting a request be handled? Should it be treated as an error, or ignored completely as if the request hadn't even been made? I took a look at jQuery, and superagent to see how they are handling things, and found they are not unified in their approaches.
jQuery:
var xhr = $.ajax({
  url: 'https://api.github.com/users/mzabriskie',
  success: function (data, status) {
    console.log('success', status);
  },
  error: function (xhr, status) {
    console.log('error', status);
  },
  complete: function (xhr, status) {
    console.log('complete', status);
  }
});
xhr.abort();

// Logs 'error abort', 'complete abort'

superagent:
var request = require('superagent');
var req = request
  .get('https://api.github.com/users/mzabriskie')
  .end(function (err, res) {
    console.log(err);
    console.log(res);
  });
req.abort();

// Nothing is logged

What I'm trying to decide is which approach to follow. I think that superagent has the right idea. Aborting a request should be the same as if it had never happened. It's not an error; it was explicitly canceled.

Since you're dealing with promises, I would still expect some kind of completion where I can choose to ignore the error if I'm expecting an abort. RxJS-DOM also throws an error with a type abort: https://github.com/Reactive-Extensions/RxJS-DOM/blob/master/doc/operators/ajax.md#returns

Also, maybe you'd want to return another promise as the result of an abort?

I like the idea of it being ignored since you actively choose to abort the
request. No need to send an error that I have to do extra work to handle.
On Jul 25, 2015 3:46 PM, "Patrick Stoica"<EMAIL_ADDRESS>wrote:

Also, maybe you'd want to return another promise as the result of an abort?
—
Reply to this email directly or view it on GitHub
https://github.com/mzabriskie/axios/issues/50#issuecomment-124908875.

@pstoica what would you want to do with an aborted request?
function fetchListData() {
  // Abort request already in-flight, in case user hits "Refresh" repeatedly
  axios.abort('fetch-list-data');

  axios.get('/list/data', { requestId: 'fetch-list-data' })
    .then(function (response) {
      // Populate DOM with data, or whatever
    })
    .catch(function (response) {
      if (response instanceof AbortedRequestError) {
        // What would I even do with this?
      } else {
        // Handle 404, 500, et al, or some other Error
      }
    });
}

document.getElementById('refresh-list-data').onclick = fetchListData;

I had a hard time with this one. I definitely want to be able to respond to a request cancellation because I think that'd be valuable, but I don't want to have cancel checking logic all over my error handlers... I'm thinking that having the flexibility would be worth it though.

I'm mostly thinking of abstractions here. In the case where I'm interacting with axios directly and making a request myself like that, then I don't care as much because I'm the one who canceled so I can handle it there. However, if I have some kind of abstraction and I want to respond to cancellations in some cases but not in others, then not having the flexibility might be a pain...
But I don't have a use case for this currently, so you can ignore my opinion :-) I'm just speculating here... I suppose that if a strong use case surfaced itself, a major version change could be made to add this...
Perhaps it could be configurable on the request...............

@kentcdodds what do you gain by having an error flow? The only way that the request will get aborted is if you, as a developer explicitly abort it axios.abort('some-id'). In which case, entering the catch provides no value. If you want to do something at the time a request is canceled, why not do it when you call axios.abort?
For me catch is what it says it is: a way to catch an error that you would have otherwise missed. This is where I would have logic for handling a request not reaching the server, or an error due to an improperly formatted request, etc.
In the example above, just move any "error" handling logic from the catch up to the line after axios.abort.

@mzabriskie, I think we just had a race condition in our comments :-)

@kentcdodds :-)
I had considered that, for the case of abstractions. The trouble comes with having to always check if the error was from aborting in every catch, even if you don't want that behavior. As you mentioned this could be handled by making it configurable, but that adds extra complexity within axios.

For some reason a promise that is never resolved seems much worse than an event never firing or a callback never being called. If it was an event or callback based API, it would be easier to ignore.
Even in an extra layer of abstraction though, if I abort an ongoing operation, it is because I no longer care about the result, so needing to handle it in all of my error handling is just superfluous work. If it is important in the new abstraction, it can expose its own abort method that aborts the request and resolves/rejects/emits/calls back as it prefers.

FWIW, Bluebird rejects cancelled promises with a CancellationError (docs). That way you can still handle cancellations if needed.

Before this ID-based (I know, I suggested it :sweat_smile:) approach lands in the API, and maybe just useful for completeness, here are two other approaches I've seen while researching this:
Cancel/abort using the promise itself
var req = axios.get(/*...*/);
axios.abort(req);

The drawbacks are that axios would need to keep track of all requests and that it only would work with the original promise (so not if we returned another one in .then).
Return an object with a abort method
var req = axios.get(/*...*/);
// req.promise would be the actual promise
req.abort();

That would be a breaking change in axios' API. But it would make it a bit more flexible, and other things could be added, like xhr onprogress handlers.

@thetalecrafter I don't see why a Promise never being settled is any different/worse than a callback not getting invoked. Would you mind elaborating?

@herrstucki the drawback to both of these approaches is that it would require you to pass around an object in order to abort a request. Where using an ID you only need to know what the ID is.
function uploadFile(file) {
  var data = new FormData();
  data.append('file', file);
  axios.post('/upload', data, {
    requestId: 'file-upload'
  }).then(function (response) {
    alert('File has been uploaded');
  });
}

function cancelUpload() {
  axios.abort('file-upload');
}

This doesn't look too bad, but assume the cancel function is in a cancelable loading type component from a separate file. You would have to pass the object around, vs using a constant.

I mostly don't care because if you synchronously aborted, then you're responsible for can deal with consequences.  But, I could see a case for rejections once you've abstracted a bit.
renderLoading()
Promise
  .all(stuff.map(src => Lib.load))
  .then(render, renderFail)

Lib={
  reqs:[],
  load:src=>
    (this.reqs.push(let x=axios(src)) && x),
  stop:()=>
    this.reqs.map(req=>req.abort())
}

Event.on("user scrolled", () => Lib.stop())

I'd really prefer an optional way to respond to a request being aborted. This would be helpful for optimistic updates, where you update your UI assuming the request succeeds, and need to roll it back if it doesn't go through.  This is specifically when you, the developer, manually abort the request.

@jergason ^

@jergason in your use case, what would be causing the abort?

i think @mzabriskie  is right. The whole need of catching is when the developer cannot foresee all possible errors not for an event triggered manually by him.
@jergason  even if we have a use case where the user cancels the upload, the developer still has the total country of UI updates...
like
function uploadFile(file) {
var data = new FormData();
data.append('file', file);
axios.post('/upload', data, {
requestId: 'file-upload'
}).then(function (response) {
alert('File has been uploaded');
});
}
function unCancelButtonClicked()
{
axios.abort('file-upload');
UIUpdate(''Hey you just cancelled the update");
}
thou @mzabriskie, how sure are you that the abort() action will be carried out and that it won't come back as an error.... (I'm new to the whole promise thing).

Leaving promises unresolved when a request is aborted is a bad idea.
The examples I see here on why one might want to abort a request are a limited set. The code that wants to abort the request may not always be directly integrated with the code making a request. And saying code calling abort should be responsible for cleanup can end up actually making code messier and/or add duplication to code.
Here's an example for a different use case. Say this is part of an application is written to use the browser's pushState API. When a user navigates to a new page this app decides it's best to abort any API request that is related to the context of the previously open page.
Say this runs as part of an AJAX form submit.
var obj = createExpensiveObject();
button.pending(); // Disable submit button and display a pending indicator
Bluebird.cast(axios.get('/api/req', {requestId: 'api-req'}))
  .then((response) => {
    // Do something with the result data and expensive object
  })
  .finally(() => {
    // Disable the pending indicator when the request has either succeeded or failed
    button.pending(false);
    // Allow the expensive object to be garbage collected
    obj = null;
  });
apiRequestIds.push('api-req');

And the cleanup when navigating pages runs this.
apiRequestIds.forEach((id) => {
  axios.abort(id);
});

In this code a finally is used to turn off a pending button state if the request fails or succeeds and a separate piece of code wants to abort the request. Under this use case if an abort leaves a promise hanging in the pending state either the button will never leave that state (in this case not a big deal since the button will probably disappear, but not always the case). And saying that the code doing the aborting should be responsible for aborting should be responsible for handling it is saying two bad things. A) This disconnected code that only wants to abort a HTTP request should be responsible for digging into the state of every button, etc... related to the requests and cleaning them up. Which of course can be handled by making a more complex system where abort callbacks that can handle cleanup are passed. B) That code in the .finally needs to be duplicated for aborts to work.
Additionally the finally also cleans up a reference to an expensive object. In this example, depending on whether references belonging to a promise that is pending and not resolved but references to the promise itself have been lost are garbage collected the expensive object may be collected after all. However if the reference being cleaned up is global, then you're guaranteed a leak.

@dantman :+1:

I think rejecting the promise on abort is better than leaving it hanging. It's better to have too much information than not enough. If I'm aborting the request, I can make sure the rejection is ignored. If something else aborted, I should be informed via rejection.
My initial thought on callbacks not getting called or events not triggered vs promise unresolved is probably mostly derived emotion from terminology. "You promised you'd do it, and never even told me when you decided not to."

Jumping in as this is affecting my current project. Have you considered what Angular does with $http? They have a timeout parameter that takes milliseconds or a promise. If that timeout promise gets resolved, the request gets aborted. For axios, it might look something like:
var cancelRequest = Promise.defer();
axios.post('/upload', data, {
  timeout: cancelRequest.promise
});

cancelRequest.resolve(); // Aborts request

This solves a couple of problems -- you can differentiate between requests that were cancelled versus requests that were aborted. Furthermore, you don't have to worry about colliding "request IDs".

:+1: User interactions on my app can cause requests, further action can make previous actions invalid and necessary. Right now all requests remain in flight and I have to have to track state to determine if I should use the response. Instead it would be nice to just abort the previous requests and start a new one. That way I only ever have one of a certain type of request in flight.

Angular has an elegant way, where you pass in a promise to abort, meaning if that promise resolves it aborts it. The cool thing with this strategy is that you can do timeout + abort with the same abstraction
e.g. axios.post(..., {timeout:somePromise})...
timeout or manual abort = somePromiseDeffered.resolve()

How about providing 2 functions instead of an abort?
Something like:
let req = axios.post(...).then(...);

// Would abort the request in flight but resolve the promise to supplied object.
req.resolve({ foo: 'bar' });

// Would abort the request in flight and reject the promise
// to `supplied error || new Error("Request Aborted")`. Can be aliased as `abort`.
req.reject(new Error("Aborting Request"));

BTW, my arguments against silent aborts:

ES7 async functions will never continue over await calls. It is better to have an AbortedError or something.
Some promise libraries tend to keep a registry of running promises for lifecycle management etc. Bluebird recently added such features, I'm not sure about the implementation details but forgotten promises might lead up to memory leaks.
Easier to check and ignore an aborted exception than to work around that if you need the promise to resolve / reject.

I think .abort should just reject with an error.

+1 for the way Angular does it, via resolving a promise.  It has worked very well for me in practice.

Related: https://github.com/domenic/cancelable-promise and https://github.com/w3c/web-animations/issues/141. Maybe it will inspire you :)

I believe the best way to handle aborting a request is to steal from the Context pattern in Go. In this case, the context would be another Promise.
Consider these example invocations using Q for brevity.
cancelationDeferred = Q.defer()
p = axios.get('/user?ID=12345', { context: cancelationDeferred.promise })
pp = axios({
  method: 'post',
  url: '/user/12345',
  data: {
    firstName: 'Fred',
    lastName: 'Flintstone'
  },
  context: cancelationDeferred.promise
})

To cancel either p or pp, we'd call cancelationDeferred.reject({ foo: 'bar' }). Doing this should abort the XHR and reject both p and pp with { foo: 'bar' }.

is this still on the roadmap?

@Plummat Yes, it is.

New fetch API is also promise based and has the same problem, see discussion on whatwg/fetch#27

I think we should close this issue and work on this only in #333.

use faxios
// building..
let req = faxios()
  .baseURL("http://jsonplaceholder.typicode.com")
  .url("posts", 1, "comments")

// fetching..
req // =>
  .FETCH // => Promise
  .then(res => {})
  .catch(err => {});

// canceling...
req.cancel();


Update wording and code block format for plugin execution order

The live site currently is printing out the javascript meant to trigger the syntax on the code block, so I added the extra newline necessary to render this properly
I also adjusted one word for clarity (changed "specify" to "specifying")

Thanks!


[request] make it possible to change the color of the popup

In Sublime Text I use a light background, that's my preference. The suggestions of TabNine also appear in a popup with light background, and when I edit for instance a normal text file that has no syntax highlighting, it's very hard to see and read the TabNine popup. Is there a way to change the colors of the popup?

Hi,
TabNine uses the popup functionality from Sublime Text's API, so you can change its colour by changing your theme. The relevant element is popup_control html_popup (https://www.sublimetext.com/docs/3/themes.html#elements). Note that TabNine does not use the auto_complete_popup element.


Misleading information when starting app while offline.

This is me starting the app while offline:

A couple bugs here:

No Not connected to the internet banner is shown.
The topic list is displayed, but clicking on a topic does nothing. I'd either expect the app to not allow me to click on topics, or aloow me to click on them and show the last n messages cached for that topic.
The All Streams screen shows "No streams found", even though it just couldn't load a list of streams from the server.
No users and messages are shown. Every other messaging app caches my messages, so this is very surprising for me as a user. Now, Zulip is different from other chat platforms in that there is many more messages and only a small percentage is sent by me. I think it'd be reasonable to at least store all users and all PMs with them, so Zulip matches messaging apps. Not sure what to do about public messages.

Thanks for that investigation and bug report.
It is very important to do more testing of the app's behavior when offline as this will be a frequent occurrence in real-life mobile use.
Each <li> you listed is likely a separate bug. I think two of them are trivial to fix and I am doing it right now.

@borisyankov just to get in sync, I'm currently trying the Not connected to the internet banner on my own.

Let me know if you wanna go ahead and fix this, but I'd appreciate the opportunity to try this and get some feedback :)
My approach is to move the <OfflineNotice /> tag to a prominent position in the app:
            <StylesProvider>
              <OfflineNotice />
              <AppWithNavigation />
            </StylesProvider>

Is this the right direction?

Go ahead, I am investigating the other issues :)
One issue might be that the state might not be initialized correctly if starting from the offline state.
Also, on the OfflineNotice being moved up the chain that looks reasonable, but I think it will show above our top navigation UI which wouldn't look good. Not a bad idea to try it.

This is what I have now. I don't think it looks good, but it doesn't look bad either. One advantage this top display has that it doesn't change position over different screens.
I tried to animate it on appearance and disappearance, without success so far.


Stop generating separate codepath for 1-phase deprecated async code

The original C++ CQ-based async API used 1-phase call initiation but that is error-prone so we added a 2-phase version in 2017 and marked the 1-phase deprecated for multithreaded use. This PR stops generating a separate codepath for the 1-phase version and instead implements it using a call to the 2-phase version. Because of some inlining, benefits are not obvious until some other PRs are added (coming soon).

Thanks for the prompt review!


tasks: should be able to find task by name

tasks: should be able to find task by name
@goller asked that I add this.

Here is a more context from @lyondhill

TaskService FindTasks currently doesn't support org name. It can be moved to the platform adapter if we wanted to update the FindTasks method in the interface.
Out of this context The FindTasks probably needs to be updated to use FindOptions sometime. When that happens would be a good time to move this out of the http handler.

https://github.com/influxdata/influxdb/pull/12022#discussion_r258737266

Task names are not unique. What is the consequence of finding a task with a non unique name? Would we error or return 'first'?

I figured it would be a task-list action.  This does mean we need to re-add the index for task names, which means for backwards compatibility this needs to happen while we are still alpha, before the beta, unless we want to check versions and add indexing after the fact.