Adjust CE Bomb for wide screen, add documentation

Preparation

[X] No one has asked for this feature before in other issues (even the closed ones)

Describe the feature
The current CE bomb feature is not documented, afaik. Also, the X offsets don't work for fullscreen.
To Dos:

[ ] Document the feature
[ ] Add isWide checks for the 3 locations. We also need to check if the wide screen X offset is the same for NA and JP.
[ ] Adjust the script for loading times, since any loading can cause the script to break.

@TheIanator Any chance you can help out?
For the documentation, I'd need a description in Markdown format. There are a few markdown editors available on the internet, including the one for writing Github comments.

Maybe I'm on the wrong release/branch but I don't actually see the CE bomb feature. Happy to work on a draft of documentation that addresses risk (or minimizes risk as much as possible) and usability

https://github.com/Fate-Grand-Automata/FGA/blob/master/scripts/src/main/java/com/mathewsachin/fategrandautomata/scripts/entrypoints/AutoCEBomb.kt#L64

I asked about this in the Gamepress thread a couple months ago; there's a bit of information in the comments at the beginning of the file, and a good bit more in the original issue (by TheIanator, who I recognize you've already pinged):
https://github.com/Fate-Grand-Automata/FGA/issues/733
What would documentation for this entail? Adding a page with info to the wiki?

What would documentation for this entail? Adding a page with info to the wiki?

Exactly, but only FGA members can edit wiki pages.
That's I will have to copy the guide.
Some screenshots in the guide would be helpful, I think.

Holy! I just discovered this feature!

I can't use the feature, i have a wide screen phone, is there any way for me to fix the script to launch this utility?

Hey there.
Since it was broken on wide phones and I wanted to use a CE bomb script, I just rewrote something for my personal use.
I threw something up in four hours, then spent a couple more testing on several phones and doing a couple adjustments .
It did work as intended on all three wide phone I tested, as well as an old non wide phone.
The script itself does the following:

Tries to select a CE to enhance, going in order from top left CE to bottom right CE
Select up to 20 CE to feed to it, by clicking on every possible CE spot on the screen from top left to bottom right
Skip upgrade animation
Loop until the selected CE is fully leveled, all usable fodder CE have been used or if the loop has iterated too many times (failsafe)

I attached a patch file and a showcase video (rename the .patch.txt into .patch obviously)
Hopefully, an actual maintainer could improve on it and clean up the code that I didn't really touch/care about.
I still based myself on the previous code quite heavily, so kudoes on the writer, and kudoes to the FGA team for writing code easy enough to understand that I could do so that easily.
Cheers
FGA_CEBomb.patch.txt
CEBomb-example.webm

Since it was broken on wide phones and I wanted to use a CE bomb script, I just rewrote something for my personal use.

Looks nice.  I might have to try this-- I haven't actually patched an apk before, but learning will be worth it to avoid manually creating CE bombs for 10 million more friend points....

So uh, yeah, I just saw the video I uploaded just cuts in the middle.
Here's a full one, that shows one of the expected exit condition, no more ce to feed (the other being ce reached maximum level)
ce_bomb_uncut.webm

Do we have any good guy who could submit a pull request for this? I wish I could do it but I'm on my phone only for the next couple days.

@matthewasage hello, I created the pull request and also tested it on my device which is also widescreen. Working great so far!
Also thanks to @gary-stu !

I have submitted a PR including the most recent patch from @gary-stu

Wanted to ask before testing it: Does the script select the CE to enhance or does the user have to?

Hey there,
the CE selection is done by the script.
I'll even go further and say that the user cannot at this point select his own CE because the entrypoint only looks for the "+" above "Tap to select a craft essence to enhance" to detect whether to start this script or not (I didn't touch that part from previous script, though it would be a good improvement to keep in mind to allow the user to choose the CE to upgrade)
If you refer to the video I posted above at "Step 1", the script will try to select a CE to enhance by clicking on all the possible CE spots on the screen from top left to bottom until we're out of the CE selection screen (done by checking after each click if we can still find the "Multi Select" image on the left of the screen.
In step 2, it'll reuse the same function to click on all the possible CE spots on the screen to try to add CEs to upgrade
In my specific case, I applied a filter to show only 2* and 1* CE, ordered by rarity so we only see those.
I hope this comment has been helpful.
Cheers,

So far, I've only added the isWide checks implementation, added a fix for a consistent looping operation, added a bunch of comments to further explain some code.
In terms of documentation:
The code itself doesn't have an automatic set-up of environment for the operation so the user will have to manually set their filter and sorting options to match the conditions required by this feature.
The conditions are as written in comment within the source:
package com.mathewsachin.fategrandautomata.scripts.entrypoints

import com.mathewsachin.fategrandautomata.scripts.IFgoAutomataApi
import com.mathewsachin.fategrandautomata.scripts.Images
import com.mathewsachin.libautomata.*
import com.mathewsachin.libautomata.dagger.ScriptScope
import javax.inject.Inject
import kotlin.time.Duration.Companion.seconds

/**
 * CE bomb maker script with caveats.
 * This script isn't much tested. Use at your own risk. This code isn't calibrated for FGO JP.
 *
 * - Can only be started from CE enhancement screen with no CE selected.
 * - In the CE picking screens, the item sizes must be set to lowest.
 * - Base CE pickup screen should be filtered to correct rarity and sorted in Ascending order by Level.
 * - Enhancement material pickup screen should be filtered to correct rarity and sorted in Descending order by Level.
 */
@ScriptScope
class AutoCEBomb @Inject constructor(
    exitManager: ExitManager,
    api: IFgoAutomataApi
) : EntryPoint(exitManager), IFgoAutomataApi by api {
    sealed class ExitReason {
        object NoSuitableTargetCEFound : ExitReason()
    }

    //Declaration of Image Files for CE Search
    private fun imagesForSelectedRarity() = when (prefs.ceBombTargetRarity) {
        1 -> listOf(
            Images.CEStarvationLv1,
            Images.CEAwakeningLv1,
            Images.CEBarrierLv1,
            Images.CELinkageLv1,
            Images.CECombatLv1
        )
        2 -> listOf(
            Images.CEGloomLv1,
            Images.CESynchronizationLv1,
            Images.CEDeceptionLv1,
            Images.CEProsperityLv1,
            Images.CEMercyLv1
        )
        else -> emptyList()
    }

    class ExitException(val reason: ExitReason) : Exception()

    //Declaration of function for Base CE Region Selection
    private fun findBaseCE(): Match {
        //function to find the region to be clicked of Base CE.
        for (img in imagesForSelectedRarity()) {
            //for each image under selected rarity do the following
            val matches = locations.levelOneCERegion
                .findAll(images[img])
                .toList()
                .sorted()
            //find all that matches the image in previous comment into a list and sort them.

            // At least 2 copies are needed to merge
            if (matches.size > 1) {
                return matches[0]
                //return the first match if there are more than one of it as the Base CE Region.
            }
        }

        throw ExitException(ExitReason.NoSuitableTargetCEFound)
        //If Return wasn't called then throw an Exception.
    }

    override fun script(): Nothing {
    //void function or main operations of this feature
        locations.ceEnhanceClick.click()
    //click on Base CE Area to select Base CE
        while (true) {
            2.seconds.wait()

            val baseCERegion = findBaseCE().region
    //call on function above for finding Base CE Region
            val img = baseCERegion.getPattern()

            img.use {
                baseCERegion.click()
                2.seconds.wait()

                locations.ceFoddersPreview.click()
                2.seconds.wait()
    //click on Area to Place Fodder CEs in to start selecting Fodder CEs

                // Picking the matching CE later allows more CE to be picked
                pickCEs()
                pickMatchingCE(img)

                repeat(2) {
                    locations.ceEnhanceButton.click()
                    1.seconds.wait()
                }

                locations.ceEnhanceConfirmButton.click()
                1.seconds.wait()

                Location(2000, 1000).click(130)
                locations.ceEnhanceClick.click()
                2.seconds.wait()
                locations.scrollToTop.click()
            }
        }
    }

    private fun pickMatchingCE(img: Pattern) {
        // Scroll to top
        locations.scrollToTop.click()
        2.seconds.wait()

        val matchingCE = locations.levelOneCERegion.find(img)
            ?: throw ExitException(ExitReason.NoSuitableTargetCEFound)

        matchingCE.region.click()
        1.seconds.wait()
    }

    private fun pickCEs() {
        // Scroll to bottom
        locations.scrollToBottom.click()
        1.seconds.wait()

        for (y in 0..3) {
            for (x in 0..6) {
                Location((if (locations.wideScreenBoolean) 2120 else 1900) - 270 * x, 1300 - 290 * y).click()
            }
        }
    }
}

Locations.kt
    val giftBoxSwipeEnd = Location(120, if (canLongSwipe) 350 else 575).xFromCenter()

    //CE Enhance Location & Regions
    val ceEnhanceRegion = Region(if (isWide) 436 else 200, 600, 400, 400)
    val ceEnhanceClick = Location(if (isWide) 436 else 200, 600)
    val levelOneCERegion = Region(if (isWide) 400 else 160, 380, 1840, 1008)
    val ceFoddersPreview = Location(if (isWide) 1100 else 900, 500)
    val scrollToBottom = Location(if (isWide) 2350 else 2040, 1400)
    val scrollToTop = Location(if (isWide) 2350 else 2040,  400)
    val wideScreenBoolean = isWide
    val ceEnhanceButton = Location(if (isWide) 2640 else 2300, 1300)
    val ceEnhanceConfirmButton = Location(if (isWide) 1920 else 1600, 1200)

    val npStartedRegion = Region(-400, 500, 800, 400).xFromCenter()

Documentation on Setting Up and How It Works:
[Setting Up]

Click on Base CE Area to see the Base CE Selection Screen.
Adjust filter to show only the rarity of your target CE Bombs(1 or 2 Stars).
Adjust Sorting to by Level in Ascending Order.
Adjust Item Sizes on the lower left Toggle to show at the smallest sizes for most items per page.
The feature selects the first lv1 CE in the screen from Top-Left to Bottom-Right as the Base CE. But for now, do it manually as we need to set the settings for the Enhancement Materials Selection Screen as well. So go ahead and select any CE as your Base CE.
Back at the Main CE Enhancement Screen, click at the Enhancement Materials Area to go into the Enhancement Materials Selection Screen.
Adjust filter to show only the rarity of your target CE Bombs(1 or 2 Stars). Same as Step 2.
Adjust Sorting to by Level in Descending Order.
Adjust Item Sizes on the lower left Toggle to show at the smallest sizes for most items per page.
You are now done setting up for the feature to function properly.
Go back to the Main Enhancement Screen and Deselect any Base CE if there is one.

[How It Works]

Click the FGA Play Button
Select the Rarity(1 or 2 Stars) which you have set-up for.
The feature selects the first level 1 CE from top-left to bottom right as the Base CE.
Then it opens up the Enhancement Materials Selection Screen and scrolls to the bottom.
It then selects all CE that it can in that page from bottom-right to top-left by row.
It will then scroll to top of the Enhancement Materials Selection Screen to select a similar CE as the Base CE to Limitbreak the Base CE once.
Okay, Enhance, & Confirm are clicked.
It will skip the Enhancement Animation.
After Enhancement it will try to select a Base CE again by clicking on the Base CE Selection Region.
Scrolling to the top and repeating all the steps from Step 3 until it throws a NoSuitableCEFound Exception and exits.

Here's a video demo on 2 Star Rarity CE Bomb Creation process on a Widescreen Resolution after my fixes.
Video Demo

Hi, I'm using FGA(CI) version 1951 on Xiaomi Poco X3 now and cant detect this CE Bomb features, it's just show the combat menu. Do i need to configure something in the App ?

Did they ever include my fix in the app? because I only showed the fix I
applied but never got a response from the developers of that app.
On Mon, Feb 27, 2023 at 12:39 AM LinhLeNhat @.***>
wrote:

Hi, I'm using FGA(CI) version 1951 on Xiaomi Poco X3 now and cant detect
this CE Bomb features, it's just show the combat menu. Do i need to
configure something in the App ?
[image: 328918225_3429494760596592_5586936330133699357_n]
https://user-images.githubusercontent.com/24409175/221423811-6bc90ee2-b793-40d8-890b-bec8351e822a.jpg
—
Reply to this email directly, view it on GitHub
https://github.com/Fate-Grand-Automata/FGA/issues/998#issuecomment-1445404707,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHCHNTYMUP4D5GG32ETVKXTWZOBKXANCNFSM5JZ6BP3A
.
You are receiving this because you commented.Message ID:
@.***>

Ohh, so the app doesnt have this feature, my bad tho...

I've got an APK for testing, still working on some finer details like correcting some descriptions and making sure the user has set the display size to smallest: https://github.com/Fate-Grand-Automata/FGA/suites/11294412751/artifacts/579511258

Thanks reconman! I have quit FGO and sold my account so yeah anyway, thanks
for the amazing app and making it freeware! <3
On Thu, Mar 2, 2023 at 9:09 AM reconman @.***> wrote:

I've got an APK for testing, still working on some finer details like
correcting some descriptions and making sure the user has set the display
size to smallest:
https://github.com/Fate-Grand-Automata/FGA/suites/11294412751/artifacts/579511258
—
Reply to this email directly, view it on GitHub
https://github.com/Fate-Grand-Automata/FGA/issues/998#issuecomment-1451126278,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHCHNT5WJVD4ZHHTTZJSXEDWZ7XMNANCNFSM5JZ6BP3A
.
You are receiving this because you commented.Message ID:
@.***>

I've got an APK for testing, still working on some finer details like correcting some descriptions and making sure the user has set the display size to smallest: https://github.com/Fate-Grand-Automata/FGA/suites/11294412751/artifacts/579511258

I have stopped playing FGO and no longer have my account. Anyways, thanks for the amazing app! and specially for making it freeware! <3

I've got an APK for testing, still working on some finer details like correcting some descriptions and making sure the user has set the display size to smallest: https://github.com/Fate-Grand-Automata/FGA/suites/11294412751/artifacts/579511258

I'd be willing to test.  I'll download it and give it a try.

Hi! I just tested the current ce bomb feature.
I right now it works like that:
1 select the first lv1 CE Rarity 2
2 goes to the bottom
3 select CE until it's full
To me is already fine,  but it should select at least select one CE of the same type the limit breakthrough lv1.
So basically I would keep the same feature but like that
1 select the first lv1 CE Rarity 2
2 select one other identical CE lv1
3 goes to the bottom
4 select CE until it's full

I make a second post because the logic is fine, but the script fails:
the error

what has selected

what would have appened if it pressed ok:

I know the CE script isn't working right now and all, but I just also wanted to add the suggestion of adding a separate similarity check option in fine tuning for when doing CE bomb stuff.
I need to have my similarity check around 90% for scrips that spam skills, or else it fails to recognize their cool-downs and gets stuck checking servant stats forever, but then it can't recognize the CEs at all.
Which doesn't matter right now, but I imagine could be down the road.
And/Or possibly another one for skill cool-downs specifically, but I haven't had any issues with any other working features so far with the main check at 90%.

Hi,
I just tried the APK and it works! :D
But I think that the script could be improved to work this way:
1- Select the first LV1 CE
2 - If (there are 2 LV1 copies) Then -> select them
Else (go to the next LV1 CE
3 - select random lv1 CE
4 - Go back to 1
This way you can create multiple lv 10/15 CE that you then merge to create a better bomb

So just finished up a fairly extensive batch of using the ce bomb script (from 2306, since I had downloaded from these threads at some point) without any notable issues.  Is there a reason it's not in the main build yet?  It looks like it was finished up in January and I thought it worked well.


Filter of elements which not have all attributes / values?

I have json data, which has not the same structure for all items in a array. I wanted to filter the items, atm dasel v.2 does not output anything.
Following example:
echo '[
  {"label":"x","allow":true},
  {"label":"y"},
  {"label":"z","allow":true}
  ]' | dasel -r json 'all().filter(allow)'

Output:

Expected Output:
{
  "allow": true,
  "label": "x"
}
{
  "allow": true,
  "label": "z"
}

I tried also to use filterOr, which has the same behavior and doesn't output something when the items in a array have not the same structure:
echo '[
  {"label":"x","allow":true},
  {"label":"y"},
  {"label":"z","allow":false}
  ]' | dasel -r json 'all().filterOr(allow,equal(label,y))'

Output:

Expected Output:
{
  "allow": true,
  "label": "x"
}
{
  "label": "y"
}

You can use the optional field flag on the property selector: https://daseldocs.tomwright.me/functions/property#property-with-optional-field
$ echo '[
  {"label":"x","allow":true},
  {"label":"y"},
  {"label":"z","allow":true}
  ]' | dasel -r json 'all().filter(allow?)'
{
  "allow": true,
  "label": "x"
}
{
  "allow": true,
  "label": "z"
}


Kulfy: Watch MailsDaddy

Kulfy requests the watch of the watch_keyword MailsDaddy. See the MS search here and the Stack Exchange search here.

MailsDaddy has been seen in 5 true positives, 0 false positives, and 0 NAAs.

Approved by tripleee in Charcoal HQ


Stemio Service not found, please download.

Describe the bug
When opening Stemio Enhanced I receive a notification Stemio Service not found, please download even though I have downloaded Stremio service.

same here on mac os


Closes #1309 : Product Image gets stretched in full-screen after transition

Description
Fixed stretching of the product image in full-screen view. The image now maintains its original aspect ratio.
Related issues and discussion
Fixes #1309
Screen-shots, if any

Checklist
Make sure you've done all the following (You can delete the checklist before submitting)

[x] Apply the AndroidStyle.xml style template to your code in Android Studio.
[x] Code is well documented
[x] Include unit tests for new functionality
[x] All user-visible strings are made translatable
[x] Code passes Travis builds in your branch
[x] If you have multiple commits please combine them into one commit by squashing them.
[x] Read and understood the contribution guidelines.

Merged, thanks @huzaifaiftikhar


Camera name in burnins

Changes

camera name in maya is collected and added to representation data
extract burnin add camera name to burnin data

I fixed the collection to get camera transform instead of shape. All working good now.


unexplained behaviour

Hello,
Thanks for this framework it really helps me a lot in all the apps that I'm developing.
But there is something that happen that i couldn't understand.
I'm saving a record in the realm, and its saves the record. But when i close the app the record is also deleted or when I run and save data its overwritten. any help ?
by the way for the record I'm still using

swift 1.1 (the older version)
realm 91.1 (the older version)

Any help are highly appreciated.
Thank you.

@rjjohnpatrickcruz could you possibly share some code that demonstrates what's going wrong so we can help you figure out what's happening? Are you sure you'll not using an in-memory realm, and that you're adding your objects to the Realm and committing that inside a write transaction? Thanks!

Thanks for your quick response.
here is my code:
    let detailed_survey = Detailed_survey_answer.allObjects()
    let GSRealm = RLMRealm.defaultRealm()

    var detailed_survey_id = detailed_survey.count + 1

    for d_survey in arrAnswers {

        var bir_stamp = d_survey["bir_stamp"] as NSString
        var brand_id = d_survey["brand_id"] as NSString
        var graphical_warning = d_survey["graphical_warning"] as NSString
        var guid = d_survey["guid"] as NSString
        var other_brand_name = d_survey["other_brand_name"] as NSString
        var other_variant_name = d_survey["other_variant_name"] as NSString
        var pack_id = d_survey["pack_id"] as NSString
        var price = d_survey["price"] as NSString
        var variant_id = d_survey["variant_id"] as NSString

        let setDetailedSurvey = Detailed_survey_answer()
        GSRealm.beginWriteTransaction()

        setDetailedSurvey.id = Int(detailed_survey_id)
        setDetailedSurvey.store_id = store_id.integerValue
        setDetailedSurvey.bir_stamp = bir_stamp.integerValue
        setDetailedSurvey.brand_id = brand_id.integerValue
        setDetailedSurvey.graphical_warning = graphical_warning.integerValue
        setDetailedSurvey.other_brand_name = other_brand_name
        setDetailedSurvey.other_variant_name = other_variant_name
        setDetailedSurvey.pack_id = pack_id.integerValue
        setDetailedSurvey.price = price
        setDetailedSurvey.variant_id = variant_id.integerValue
        setDetailedSurvey.guid = guid
        setDetailedSurvey.status = 0
        setDetailedSurvey.sync_status = constants.STATUS_UNSYNC
        setDetailedSurvey.ts = dateToday

        GSRealm.addObject(setDetailedSurvey)
        GSRealm.commitWriteTransaction()

        detailed_survey_id++

    }

    arrAnswers = [] // clean up the array for the next item that Im going to save later.

here is my realm object:
class Detailed_survey_answer: RLMObject {
dynamic var id:Int = 0
dynamic var store_id:Int = 0
dynamic var bir_stamp:Int = 0
dynamic var brand_id:Int = 0
dynamic var graphical_warning:Int = 0
dynamic var pack_id:Int = 0
dynamic var variant_id:Int = 0
dynamic var other_brand_name:NSString = ""
dynamic var other_variant_name:NSString = ""
dynamic var price:NSString = ""
dynamic var guid:NSString = ""
dynamic var status:Int = 0
dynamic var sync_status:Int = 0
dynamic var ts:NSDate?

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

}

That should work! What makes it seem like your saved object isn't being persisted?

Yup its working, my problem is that when i save another data my old data was overwritten or deleted .. I don't know why.. =(

Hi,
I've already resolve this problem.
Thanks for the quick response.
Cheers!

@rjjohnpatrickcruz glad to hear you figured things out!


Add appropriate Badges to the project for better viewer understanding and documentation

Is your feature request related to a problem? Please describe.
The readme file of this project is not properly done.Adding badges could increase efficiency of code
Describe the solution you'd like
Badges can improve the readability of a GitHub repository because they provide the users with a quick way to collect metrics about the repository.

I would like to work on this issue

Thanks for creating an issue, but I don't think this adds much value


[Feature in SDK]: Request rate limiter

Description
As mentioned here https://apidocs.bitrix24.com/limits.html Bitrix24 has rate limits for requests.
It would be great if SDK will support some kind of rate limiting.
Example
$api = ServiceBuilderFactory::createServiceBuilderFromWebhook('<hook>');

$limit = new RateLimiter(500); // time in miliseconds between requests
$api = $api->withLimit($limit); // should limit (sleep) `ApiClient::getResponse` calls

$res = $api->getCRMScope()->lead()->batch->list(['ID' => 'ASC'], [], ['ID', 'DATE_MODIFY'], 1000000);

Good feature request. Can you investigate this feature request?
https://symfony.com/blog/new-in-symfony-7-1-misc-improvements-part-3#throttling-http-client
maybe you can build prototype?


Define minimal interface of the data model

h3. High Level Points

The DataModel Interface should be a small contract
Pipeline Interface will be available as example code not apart of core
The surviving examples post https://github.com/openfin/fin-hypergrid/issues/523 and https://github.com/openfin/fin-hypergrid/issues/524 will use the  new interface
including
https://github.com/openfin/fin-hypergrid/blob/alpja/demo/sorting-example.html
https://github.com/openfin/fin-hypergrid/blob/alpja/demo/tree-column.html

See this sorting example, an examine if it will make appropriate usage of the new interface https://github.com/openfin/fin-hypergrid/blob/develop/demo/sorting-example.html

Relates to https://github.com/openfin/fin-hypergrid/issues/503

Calc Columns are explicitly passed a row object whereas we want to be agnostic about the shape of the data. The reason being the exec function has a handy access to the row object readily available whereas we would prefer to give them the cell coordinates and have the user requests the values of other cells (concerns of repeated calls to getRow)
Plan is to leave as is for now and provide another version of calc column in the future
DataModel will be more black boxed and internally we will not use calls to getRow
Remove name reIndex

Hey, i am new to Hypergrid, (b.t.w thanks for awesome work!). I need to architect manipulation datamodel with my huge app =). Should i wait for new one, or it's better to use the old one.
How long will this refactoring take?
Thanks!

Its best to wait for the next iteration, which will be end of next month. However, I can give you a gist of the surviving API when your ready

Dwayne,
Is 1.4 what you mean by next iteration?
Another question, I am trying to intergrate hypergrid with angular4.
Having issues instantiating Hypergrid in an Angular component.  I kept
getting Hypergrid not a constructor when doing  new Hypergrid(...)
I am using the library pulled from npm registry for fin-Hypergrid
Can you please help?
Thanks
Edward
On Wed, Mar 29, 2017 at 4:43 AM Dwayne Jones<EMAIL_ADDRESS>wrote:

Its best to wait for the next iteration, which will be end of next month.
However, I can give you a gist of the surviving API when your ready
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/openfin/fin-hypergrid/issues/517#issuecomment-290023843,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACjIShi5LydI-xUhKuqYF5ZkeaH0txQ1ks5rqhmsgaJpZM4L7CuG
.

1.4. is going to alpha on 3/31 (will not include the datamodel simplification) while 1.5 will be next month

1.4 has become 2.0 on master. This dataModel refactor will be available in the upcoming release planned for this month, it is in the current sprint


feat: add py.typed file

About
This pull request adds a py.typed file to the top level of the library, which allows type checkers to note that this package supports type hints. This is usually unnecessary, but it should be included just in case.
Checklist

[x] I've ran pre-commit to format and lint the change(s) made.
[x] I've checked to make sure the change(s) work on 3.8.6 and higher.
[x] This fixes/solves an Issue.

(If existent): #732

[x] I've made this pull request for/as: (check all that apply)

[ ] Documentation
[ ] Breaking change
[x] New feature/enhancement
[ ] Bugfix

should the new file be empty?

Yes, as mentioned in the PR, it serves to only indicate support for it


Migrating to RTM from RC2 frameworkAssemblies not resolving

My project.json used to look like this, everything was working and I was on RC2:
{
  "version": "1.0.0-*",
  "description": "TECH.Translator Console Application",
  "authors": [ "Elvis" ],

  "buildOptions": {
    "emitEntryPoint": true
  },

  "dependencies": {
    "SimpleInjector": "3.1.3",
    "SimpleInjector.Extensions.LifetimeScoping": "3.1.3",
    "TECH.Common": "1.0.0-*",
    "TECH.Repositories": "1.0.0-*"
  },

  "commands": {
    "TECH.Translator": "TECH.Translator"
  },

  "frameworks": {
    "net46": {
      "frameworkAssemblies": {
        "System.Configuration": "<IP_ADDRESS>",
        "System.Data": "<IP_ADDRESS>",
        "System.Data.DataSetExtensions": "<IP_ADDRESS>",
        "System.Xml": "<IP_ADDRESS>"
      }
    }
  }
}

Now I have migrated all my bits to RTM (VS + SDK), and I've done as suggested for project.json to add the Microsoft.NETCore.App dependency, and then the framework netcoreapp1.0 with the imports.  I don't fully understand how this works which is probably why I'm having issues.
My new project.json file looks like so:
{
  "version": "1.0.0-*",
  "description": "TECH.Translator Console Application",
  "authors": [ "Elvis" ],

  "buildOptions": {
    "emitEntryPoint": true
  },

  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.0.0",
      "type": "platform"
    },
    "SimpleInjector": "3.1.3",
    "SimpleInjector.Extensions.LifetimeScoping": "3.1.3",
    "TECH.Common": "1.0.0-*",
    "TECH.Repositories": "1.0.0-*"
  },

  "commands": {
    "TECH.Translator": "TECH.Translator"
  },

  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "dotnet5.6",
        "portable-net46+win8+wpa81"
      ],
      "frameworkAssemblies": {
        "System.Configuration": "<IP_ADDRESS>"
      }
    }
  }
}

The section with the frameworkAssemblies does not resolve.  System.Configuration <IP_ADDRESS> could not be resolved.   I'm missing a bunch of others that were included previously:
        "System.Configuration": "<IP_ADDRESS>",
        "System.Data": "<IP_ADDRESS>",
        "System.Data.DataSetExtensions": "<IP_ADDRESS>",
        "System.Xml": "<IP_ADDRESS>"

I'd like to know how to properly include these in RTM.

Also my application will be hosted on azure so it does not need to be cross platform.  Did I do the correct changes by adding the netcoreapp1.0 framework reference and also the Microsoft.NetCore.App dependency?
I did not include those before and it seemed to work.  Again, I do not intend to target a non-Windows server for this.  Can someone please clarify?

Thanks!

netcoreapp1.0 is the .NET Core Framework, you need to change it back to net46 to make that work. You should also remove the Microsoft.NetCore.App dependency.

Ok, I have done that and it's all working. Basically changed it back to how
it was on the top.
So correct me if I'm wrong here, what I've added is to be used for cross
platform applications aka .Net Core Framework.
Net46 is .Net Framework 4.6 (nothing to do with core?) which can be used
safely for Windows applications.
Is that correct?
On Jul 5, 2016 2:36 PM, "David Fowler"<EMAIL_ADDRESS>wrote:

netcoreapp1.0 is the .NET Core Framework, you need to change it back to
net46 to make that work. You should also remove the Microsoft.NetCore.App
dependency.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/aspnet/Home/issues/1638#issuecomment-230594962, or mute
the thread
https://github.com/notifications/unsubscribe/AGVeIWt81ABGiWZAP_6iGetF9wQCeyDBks5qSsBTgaJpZM4JFakR
.


regen: whitelist-proc

Added rawgpsd to fake_daemons since it i suppose it relies on readings from sensors directly.


yaml yaml yaml

Codecov Report

Merging #440 into master will increase coverage by 0.44%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #440      +/-   ##
==========================================
+ Coverage   96.68%   97.12%   +0.44%
==========================================
  Files          33       33
  Lines        2050     2054       +4
  Branches      151      151
==========================================
+ Hits         1982     1995      +13
+ Misses         46       37       -9
  Partials       22       22

Impacted Files
Coverage Δ

...hBoundControllerAbstraction/proxy/faucet/parser.py
85.89% <100%> (+12.92%)
:arrow_up:

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 23e8efa...93d9b2a. Read the comment docs.


[Add] Want to add a new link to open-source

Site URL
https://os.pradumnasaraf.dev/#/
Description of the above provided site
Hey @rupali-codes I want to add a open-source guide to link hub
The guide is created by @Pradumnasaraf, I hope this may not be in plagiarism
Category
Open Source
Sub Category
git and github
Checklist

[X] I have checked the existing issues
[X] I have read the Contributing Guidelines
[X] I am willing to work on this issue (optional)
[X] I am a GSSoC'23 contributor

Hi @marshadkhn! :) Just to confirm, are you participating in GSSOC'23?

Yes I am participating in gssoc

Yes I am participating in gssoc

You're assigned now @marshadkhn

Thankyou

@marshadkhn are you still working on this issue?

Yes I'll push today


Not working

App is not working, keeps saying check your internet connection wen I hit the download button

Hi @mjsal
Thanks for bringing this to my attention. Have you tried installing the latest version?
https://github.com/emmanuelkehinde/TwittaSave-Android/releases/download/v3.0/twittasave-release.apk

Hi @mjsal
Thanks for bringing this to my attention. Have you tried installing the latest version?
https://github.com/emmanuelkehinde/TwittaSave-Android/releases/download/v3.0/twittasave-release.apk

yes It's working now thanks, it's a great app why don't you publish to the play store?

yes It's working now thanks, it's a great app why don't you publish to the play store?

yes It's working now thanks, it's a great app why don't you publish to the play store?

Thanks @mjsal
I had it on the play store previously but by account got terminated after some time. That's why I've been sharing here on GitHub through the readme.

yes It's working now thanks, it's a great app why don't you publish to the play store?

Thanks @mjsal
I had it on the play store previously but by account got terminated after some time. That's why I've been sharing here on GitHub through the readme.

Did it get terminated because of this app? I don’t think it’s against play store policies

Did it get terminated because of this app? I don’t think it’s against play store policies

Closing this issue as it's addressed.


Add call permission support(Android | IOS) and other missing permission support

Make a call permission is missing.


What is the difference between Simple Win rate and Estimated Win Rate ?

Hi,
Great thanks for this EA, very helpful.
I have a question more than an issue: What is the difference between Simple win rate and Estimated Win Rate ?
Can you share the formula?
I noticed when I chalk out indicator switch by choosing "ReopenOnOppositeSignal" = "False", both numbers are the same.
Thanks for your help.

wins or losses of opposite sinal only counts half


"Read only" state

Hi,
sometimes I just want to display the selected county and not let the users change it. It would be nice to have an "enabled" or "active" property that, when false, would not call the dialog.
Best Regards,
Pedro

If you set the value of onChanged to null, you may be able to accomplish this. I believe this approach could work.

I set the value of onChanged to null, and I could still touch the picker and make the dialog appear; the idea would be to prevent the dialog from appearing, thus having a "read only" setup.


Automated cherry pick of #7845: Feat & Fix & Refactor for ESXi

Cherry pick of #7845 on release/3.4.
#7845: refactor(esxi): fetchVms and fetchHardwareInfo

/lgtm
/approve


Errors: Could not acquire a connection - Pool is closed

Node version: 10.13.0
Sails version (sails): 1.2.2
ORM hook version (sails-hook-orm): 2.1.1
Sockets hook version (sails-hook-sockets): 2.0.0
Grunt hook version (sails-hook-grunt): 4.0.0
DB adapter & version (e.g. sails-mysql@5.55.5<EMAIL_ADDRESS>
I am trying to execute the 1000 API calls concurrently (using Artillery)but only 90-98 are successful and the remaining are failing. Also, the error is causing the server to stuck for some time.
I am getting below error:
getConnection failed ("failed"). Could not acquire a connection to the database using the specified manager

Then I tried with pool options:
pool: true,
connectionLimit: 100000,
connectTimeout: 60 * 60 * 1000,
acquireTimeout: 60 * 60 * 1000,
timeout: 60 * 60 * 1000,
waitForConnections: true

I am getting below error:
Error: Pool is closed.

Some times I am getting an error:
packets out of order. Got: 1 Expected: 0

Hi, @vishalbiradar!
I wonder if the database isn't configured to support that number of connections. If you reconfigure the database, we recommend reverting back to the default pool settings when testing it out.
If that doesn't seem to fix the problem, would you provide a minimal repo that reproduces the behavior you're getting? Thanks!

@rachaelshaw @madisonhicks
I have tried with and without the pool configurations, but still facing the same "connection poll closed issue".
I will send you the sample of my project which you can use to validate.

@rachaelshaw @madisonhicks @rachaelshaw
My questions are:

How can we enable a connection pool?
Hows the auto-increment of connections from the pool works?
How to set the default connections to be in the pool at any point in time?

Hi @vishalbiradar,
Your app should be using the pool automatically with mysql. Is your app configured to run in production mode? https://sailsjs.com/documentation/concepts/deployment/scaling
Is your app configured to use transactions and leasing connections? If so there a chance that the application is leaking connections.

@eashaw Yes the app is configured to run in production mode. We are using transactions and tried matching the default connectionLimit from the application to be compatible with maximum connections allowed to the database. We are observing that application gets stuck waiting forever for connections to be returned to the pool once the connection limit is hit.
This behaviour was commented in one of the existing threads https://stackoverflow.com/questions/18496540/node-js-mysql-connection-pooling/18496936 as well.
Sample code how we are using the transactions:

export async function getDataSource(reqObj: any, populate: any) {
return await sails.getDatastore().transaction(async(db, proceed)=> {
try {
let responseData;
if (populate) {
responseData = await sails.models[samplemodelName].find(reqObj, true).usingConnection(db);
} else if (Object.keys(reqObj).length === 0) {
responseData = await sails.models[samplemodelName].find().usingConnection(db);
} else {
responseData = await sails.models[samplemodelName].find(reqObj).usingConnection(db);
}
return proceed(false, responseData);
} catch(err) {
return proceed(err);
}
});
}

But the above thread says we need to release connection explicitly if we are using getConnection(). We are using sails mysql-adapter which we hope handles opening the database connection and releases the connection back to the pool once the operation is completed (We hope that is not happening in our case at least). Could you please confirm this and help us resolving the issue to release the connections back to the pool?

@eashaw Yes the app is configured to run in production mode. We are using transactions and tried matching the default connectionLimit from the application to be compatible with maximum connections allowed to the database. We are observing that application gets stuck waiting forever for connections to be returned to the pool once the connection limit is hit.
This behaviour was commented in one of the existing threads https://stackoverflow.com/questions/18496540/node-js-mysql-connection-pooling/18496936 as well.
Sample code how we are using the transactions:

export async function getDataSource(reqObj: any, populate: any) {
return await sails.getDatastore().transaction(async(db, proceed)=> {
try {
let responseData;
if (populate) {
responseData = await sails.models[samplemodelName].find(reqObj, true).usingConnection(db);
} else if (Object.keys(reqObj).length === 0) {
responseData = await sails.models[samplemodelName].find().usingConnection(db);
} else {
responseData = await sails.models[samplemodelName].find(reqObj).usingConnection(db);
}
return proceed(false, responseData);
} catch(err) {
return proceed(err);
}
});
}

But the above thread says we need to release connection explicitly if we are using getConnection(). We are using sails mysql-adapter which we hope handles opening the database connection and releases the connection back to the pool once the operation is completed (We hope that is not happening in our case at least). Could you please confirm this and help us resolving the issue to release the connections back to the pool?

Hi @anudeepchandrat, the default settings work for most deployments of mysql. People using custom connections to their database might have to change their database's settings or change the  number of connections in their Sails configuration.

@eashaw Thank you for the information. We tried changing the number of connections in their Sails configuration using connectionLimit to be compatible with number of connections allowed from mysql database. Once the connectionLimit is reached from Sails we could see the requests are added to the queue and waiting forever for the free connections to be available. Also the Sails application is not able to serve any requests further until the server is restarted. Could you please let us know your thoughts on this?

@anudeepchandrat, The try catch that you shared in the code above is already being handled by Sails, have you looked for any connection leaks in the transaction?

@eashaw As mentioned above we have tried increasing the connectionLimit from Sails for now to handle increase in number of clients. Could you please let us know how to check for connection leaks in transactions? It would be great if you can share some snippet for handling transactions that would work for any number of calls rather than increasing the connectionLimit.

Hey @anudeepchandrat, We suggest looking anywhere where you use .transaction() and making sure .usingConnection(db) chained on.

@eashaw Thank you for the suggestions. We were able to resolve the issue following the references and approached mentioned at https://dev.paygoenergy.co/blog/2019-06-20-sailsjs-transactions-and-exits/ (Rule: never reference exits from within transaction).


All good working, my wallet 0x45d5a2b6c9578aEFbb1A9b9CA1AEC05b18a9577b

Discussed in https://github.com/orgs/taikoxyz/discussions/335

Originally posted by d1onys1us November 24, 2022

👋 Welcome!
We’re using Discussions as a place to connect with other members of our community. We hope that you:

Ask questions you’re wondering about.
Share ideas.
Engage with other community members.
Welcome others and are open-minded. Remember that this is a community we
build together 💪.

To get started, comment below with an introduction of yourself and tell us about what you do with this community.

Thanks!


have an in-line find dialog

Just a simple in-line dialog - modeless and docked to the bottom of the test area? - to search for text matches.

+1


introduce extraHeaders (cookies)

The reason for this is: https://github.com/Automattic/socket.io/issues/2036

Usage: https://github.com/adrai/socket.io-scaling

@rauchg any feedback?

Why are we special casing cookies as opposed to enabling other headers?

Because of gorouter...
Il giorno 23-mar-2015, alle ore 20:08, Guillermo Rauch <notifications<EMAIL_ADDRESS>ha scritto:
Why are we special casing cookies as opposed to enabling other headers?

Reply to this email directly or view it on GitHubhttps://github.com/Automattic/engine.io-client/pull/379#issuecomment-85155061.

I don't follow. I mean that technically we could pass an object that customizes any header?

Aha, sorry I misundetstood...
Yes, if you want... I can extend the pull request... ok?
Il giorno 23-mar-2015, alle ore 20:25, Guillermo Rauch <notifications<EMAIL_ADDRESS>ha scritto:
I don't follow. I mean that technically we could pass an object that customizes any header?

Reply to this email directly or view it on GitHubhttps://github.com/Automattic/engine.io-client/pull/379#issuecomment-85160480.

Yes. extraHeaders. And we have to make sure to enable them only on Node.JS, since WS does not admit header changing in the browser.

Did you imagine something like this?

Looks great… Needs README tweaks though.
What is this for?
+        xhr.setDisableHeaderCheck(true);

Will update Readme asap...
That call (https://github.com/driverdan/node-XMLHttpRequest/blob/master/lib/XMLHttpRequest.js#L177) is needed so this call (https://github.com/driverdan/node-XMLHttpRequest/blob/master/lib/XMLHttpRequest.js#L192) does work.

ok? https://github.com/adrai/engine.io-client/commit/98c7074dae65293de0904676c917e36de5463968

@rauchg extraHeaders or headers?

Any news?

Is something missing for a merge?

Ok this looks ready. We just need at least one test for xhr and one for ws to ensure headers are actually set.

done ;-)

Here you're just testing that the reference gets set. Ideally we test in engine.io that the server receives the headers the client sets.
Look at this file for some examples:
https://github.com/Automattic/engine.io/blob/master/test/server.js

How do I get the correct ZUUL_PORT? And how do I test with ZUUL without a browser (just node as client)?

For engine.io tests you don't need zuul. I suggest you submit the test to the other repo. I'll merge so that you can also point the dependency of engine.io-client to the right commit.

done (second try) ;-)

@rauchg Do you already have an ETA for making new versions for engine.io-client, engine.io, socket.io-client, socket.io ?

@rauchg Do you already have an ETA for making new versions for engine.io-client, engine.io, socket.io-client, socket.io ?

friendly reminder: not released right now

+1 @adrai  I'm interested in this also.  React-Native doesn't forward cookie (or other) headers when establishing WebSocket connections so it's breaking code that is supposed to be isomorphic across http requests.

@rauchg has this been included in a release?

@rauchg has this been included in a release?

bump is this released now?

For others finding this thread - this has been released now :)
You can use it in engine.io/socket.io like so,
var io = require('socket.io-client')   var socket = io('http://yourwebsite.com', {     extraHeaders: {       'Cookie': 'your-cookie_info_here'     }   });
Note: in engine.io you'll need to change https to ws and the require to engine.io-client


azurectl 2.0 - config conflict

Potential conflict of configuration. Prior to 2.0 all configuration was stored in 1 config file. With azurectl 2.0 we have 1 config file per account. It is now possible to create a configuration with conflicting information.
For example if I previously configured an account "foo" there exists and entry in .config/azurectl/config of
[account:foo]
.....
It is now possible with azurectl 2.0 to run
azurectl setup account configure --name=foo --publish-settings-file=PATH
and generate a config/azurectl/foo.config file. Depending on the information I provide to the "account configure" command the previous configuration and the new configuration may be inconsistent or incompatible.
The user should get a warning, possibly error out, or the account from config should be converted to the new style when an attempt is made to create an account of the same name.

How about the following change
When calling "azurectl setup account configure" that account will become the default account automatically ?
This will prevent any inconsistency in my eyes
Thoughts


Migration of older data

Is there any documented way of migrating old data from some other golinks solution (given base data such as creator, shortened url and target) to a new db ?
Maybe a dev API I am missing?

A possible workaround I came up with to do that directly from the code, by running something like that:
/usr/src/app/server/src# FLASK_APP=main.py flask shell

This will open a flask shell:
Instance: /usr/src/app/server/src/instance
>>>

At which point it would be possible to basically trigger directly the API using plain python:
Instance: /usr/src/app/server/src/instance
>>> from modules.links import helpers
>>> helpers.create_short_link('1.com'<EMAIL_ADDRESS>'go', 'drive', 'drive1000.com')
>>> helpers.create_short_link('1.com'<EMAIL_ADDRESS>'go', 'drive2', 'drive2000.com')

And so the path to migration can just be a series of create_short_link invocations.
Maybe there is a better way, but this worked as a patch for us.


Update profiling

We need profiling::function_scope which was introduced in 1.0.16, so this is the minimum required version

Closes https://github.com/emilk/egui/issues/5491
[x] I have followed the instructions in the PR template

Maybe we could try to setup a workflow that runs cargo check / test with -Z-minimal-version, to prevent issues like this in the future?
https://github.com/taiki-e/cargo-minimal-versions
https://internals.rust-lang.org/t/zminimal-versions-cargo-update-and-cargo-upgrade/21335

Maybe we could try to setup a workflow that runs cargo check / test with -Z-minimal-version, to prevent issues like this in the future?

that would be nice yes - can you create an issue for this (or just add the workflow)? 🙏

Done: #5497


stop stripping whitespace from the armored keys we hash

@maxtaco This fixes https://github.com/keybase/client/issues/1908, but I'm going to need to do a lot of checking to make sure it doesn't fail anyone else's chain. In particular, any pgp_update link made with the Go client could be at risk, if client stripped any whitespace from the armored string before making it. Ultimately we might have to fix this by doctoring the server's version of some people's PGP keys to match what their clients actually signed.

:+1:

Ok, I confirmed that all of the hashes in key_bundles match the bundle in the same row. I think we're good here, though it's hard for me to follow all the codepaths in web/key.iced.

Ok great! Thanks for checking this out.
On Friday, February 5, 2016, oconnor663<EMAIL_ADDRESS>wrote:

Ok, I confirmed that all of the hashes in key_bundles match the bundle in
the same row. I think we're good here, though it's hard for me to
follow all the codepaths in web/key.iced.
—
Reply to this email directly or view it on GitHub
https://github.com/keybase/client/pull/1913#issuecomment-180625152.

Note for future us: Both the Go client and the keybase-proofs implementation strip leading and trailing whitespace from armored keys before passing them to SHA256. This PR only changes what the client was doing to interior whitespace.

 Go Openpgp??????
Thanks jack
On Friday, February 5, 2016, oconnor663<EMAIL_ADDRESS>wrote:

Note for future us: Both the Go client and the keybase-proofs
implementation strip leading and trailing whitespace from armored keys
before passing them to SHA256. This PR only changes what the client was
doing to interior whitespace.
—
Reply to this email directly or view it on GitHub
https://github.com/keybase/client/pull/1913#issuecomment-180626112.

7f1930d7c1529a71312ce58328e4bc2b5ae7dde1


HNC: Added Client Interface to support test cases for kubectl commands

Changes:
Create Client interface in kubectl package and some code refactoring. This change is done to make the kubectl package functions testable in future.
Tested:  manually run kubectl tree, show and set commands and verified that they were
reported correctly.

/ok-to-test

This lgtm, hold for @adrianludwin  to look at
/lgtm
/approve
/hold

/test pull-hnc-test

@rjbez17 @adrianludwin can you please help in resolving this error.

/retest

/retest

/hold cancel

Not sure why this test is so flaky today. A PR is coming to remove it.
/retest

Flaky test removed in #190


Client send data

Hi,
can you develop also
a functon to replay to client with
client.write(msg.payload);
?
regards Paolo

Hi Paolo,
Updating now with version 0.0.5
to use it please input "write" as the action and configure the write property with either a static string or a custom variable.
regards,
Tiago


Update to newest version.

Updates knock-elixir example dependency in README.md.
Updates hackney dependency to 1.18

Thank you @aglassman 🎉


支持按实例数目/比例的灰度策略适应容器化的场景

目前配置灰度策略，有IP和Label两种实现，
但是对于容器化的场景是不友好的，主要有一下几个考量

ip的方式不适用于容器化场景，因为容器重启会出现ip漂移不能保证稳定的灰度，单个容器重启灰度配置会失效（灰度不稳定）
通过label的方式将容器和配置强绑定了，每次发布新配置需要更改label重启应用，然后配置灰度策略，这样增加了配置变更的维护成本（发布配置成本高）

能否实现一种按一定的实例数量或者比例灰度，比如容器有20个实例，10%就始终保持2个容器获取到灰度配置，同时要考虑容器漂移带来的影响，比如未灰度的容器重启应该获取到的还是原来的配置，灰度的容器重启获取到依旧是灰度的配置

简单设计了一个按机器数灰度的策略，让业务在portal上指定应用灰度的实例数量，可以通过后台定时计算并更新灰度的实例列表。

这个方案有个缺陷，相比标签发布，无法保证灰度实例列表IP的稳定，可能灰度IP重启后会路由到另一个实例，把原始实例变为灰度实例

Does it mean we need to re-calculate the grayscale instance list every time when the instance lists change(step 2)?

Does it mean we need to re-calculate the grayscale instance list every time when the instance lists change(step 2)?
No, we use "grayscale  amount" instead of "grayscale  percent".

While user confirm "grayscale  amount" , the grayscale  instance is fixed, and the grayscale  instance list will be shown on webpage, so user can know which node is grayscale  or normal.

while grayscale  instance is shutdown, and we choose  a new grayscale  instance randomly, and update grayscale  instance list on webpage.

while normal  instances  are shutdown, nothing happens

And we think on k8s env, every node is same.
User just want to know which nodes are grayscale instance and check it work well or not under grayscale configuration.
So we let user set "grayscale instance amount" , and show them grayscale instance list.
We think it is enough for most users.

Thanks for the clarification, the grayscale amount is an interesting idea. However, I still have some concerns about the dynamic grayscale lists, but I'm open to discussions.
BTW, I think for k8s scenarios, the grayscale label is a better solution as it is more stable?

For grayscale amount rules, I begin to develop and make some test, the design as follow.

I create a schedule task at portal to select all grayRules which type is grayscale amount by adminAPI.
The task will check the current gray ips with active ips. If some gray ips are not active, they will be removed. An algorithm is designed to remove old inactive gray ips and add new active gray ips, making sure the grayscale amount is same with gray ips size.New active ips are choosen by data_modify_time of instance priority.
Some problem
However, I found a problem. I user /instances/by-release api to get active ips, but the ips are not stable, so it make difficult to choose new grayscale ips. Why the active instances list is changed so often, I support it may have something to do with the apollo design which definate  instances 2 minutes from now are avtive. But the instances register is from client query config.It is half minute from http long poll.
I dont know why the instances list is changed without reboot/scale triggered.

Thanks for the clarification, the grayscale amount is an interesting idea. However, I still have some concerns about the dynamic grayscale lists, but I'm open to discussions. BTW, I think for k8s scenarios, the grayscale label is a better solution as it is more stable?

Yes, but when gray config are changed, grayscale label rules need user to reboot k8s deployment, which may cover all pods.It is difficult to control step.

it may have something to do with the apollo design which defines instances 2 minutes from now are active

the current active instance definition is 25 hours, see
https://github.com/apolloconfig/apollo/blob/5ad5b410f0ff43111855d7bd76e047d08ab477b4/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/InstanceService.java#L155-L164

Yes, but when gray configs are changed, the grayscale label rules need user to reboot k8s deployment

I suppose the grayscale period should be temporary. So we may always keep some amount of pods with the grayscale label and then we could apply the grayscale label rule if we want to test some new configurations and then remove the grayscale label rule if the test is finished. In this case, there is no need to reboot the k8s deployments and we could fully reuse k8s to keep the grayscale amount for us.

Yes, but when gray configs are changed, the grayscale label rules need user to reboot k8s deployment

I suppose the grayscale period should be temporary. So we may always keep some amount of pods with the grayscale label and then we could apply the grayscale label rule if we want to test some new configurations and then remove the grayscale label rule if the test is finished. In this case, there is no need to reboot the k8s deployments and we could fully reuse k8s to keep the grayscale amount for us.

Sometimes, we dont change our code, just want change config by gray rules, in this case we need to reboot k8s.

it may have something to do with the apollo design which defines instances 2 minutes from now are active

the current active instance definition is 25 hours, see
https://github.com/apolloconfig/apollo/blob/5ad5b410f0ff43111855d7bd76e047d08ab477b4/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/InstanceService.java#L155-L164

Sorry, I find someone changed the rule 25hour to 2 minutes.

Yes, but when gray configs are changed, the grayscale label rules need user to reboot k8s deployment

I suppose the grayscale period should be temporary. So we may always keep some amount of pods with the grayscale label and then we could apply the grayscale label rule if we want to test some new configurations and then remove the grayscale label rule if the test is finished. In this case, there is no need to reboot the k8s deployments and we could fully reuse k8s to keep the grayscale amount for us.

Sometimes, we dont change our code, and just want to change config by gray rules. In this case we need to reboot k8s.

I think we could always keep some amount of pods with a grayscale label and only apply the rules when we want to test the new configurations? In this case, we don't need to always reboot k8s?
e.g. If some application has 10 pods, we always label 3 of them with a grayscale label. If there is no grayscale rule, then all the 10 pods receive the same configurations. If there is some new configuration we need to test, then we apply the grayscale rule to make 3 of them updated with the new configurations.

Sometimes we need to expand number of gray instances dynamicly. For this case, we need to reboot k8s to add new label.Your scenerio is just suitable for static gray number.

Yes, but when gray configs are changed, the grayscale label rules need user to reboot k8s deployment

I suppose the grayscale period should be temporary. So we may always keep some amount of pods with the grayscale label and then we could apply the grayscale label rule if we want to test some new configurations and then remove the grayscale label rule if the test is finished. In this case, there is no need to reboot the k8s deployments and we could fully reuse k8s to keep the grayscale amount for us.

Sometimes, we dont change our code, and just want to change config by gray rules. In this case we need to reboot k8s.

I think we could always keep some amount of pods with a grayscale label and only apply the rules when we want to test the new configurations? In this case, we don't need to always reboot k8s? e.g. If some application has 10 pods, we always label 3 of them with a grayscale label. If there is no grayscale rule, then all the 10 pods receive the same configurations. If there is some new configuration we need to test, then we apply the grayscale rule to make 3 of them updated with the new configurations.

Sometimes we need to expand number of gray instances dynamicly. For this case, we need to reboot k8s to add new label.Your scenerio is just suitable for static gray number.

I think we could always keep some amount of pods with a grayscale label and only apply the rules when we want to test the new configurations? In this case, we don't need to always reboot k8s?
e.g. If some application has 10 pods, we always label 3 of them with a grayscale label. If there is no grayscale rule, then all the 10 pods receive the same configurations. If there is some new configuration we need to test, then we apply the grayscale rule to make 3 of them updated with the new configurations.

We agree that  grayscale label is a good idea while application and configuration  are grayscaled at the same time in K8S env.
But in most case, user do use configuration because user want to modify configure instead of program while they do some test. Do you think so ?
And in our company, while most app is deployed in K8S,  all containers are same.
and user don't care which node  is normal ,and while node is grayscale.
They just want to grayscale some node's configuration and do comfirm.
But grayscale ip list should be shown on portal, so they can check grayscale  effort.

Well, then the grayscale amount rule sounds a reasonable feature to me. However, we may need to let the user know clearly what this feature does, e.g. dynamically updating the grayscale instance list. And I'm looking forward to the implementation.


OOP school library: add basic UI

Changes:

Created the app entry-point (app.rb)
Added functions (list_book, list_people, create_person, create_book, create_rental, list_rental)
Created the main.rb
Added the run function
Updated the README

Hello @usorfaitheloho, thank you for your time. It is working on my computer and my friend's computer but don't know why it is not working on your computer.
My computer:

My friends computer:


2.5.0 still truncating labels on pie chart

My labels are still getting cut off when too long on a pie chart. Is there any way to allow them to overflow outside of the canvas?
I previously fixed this problem by using the custom function, and setting my own tooltip to the mouse position. This doesn't work on mobile, however.

I think this is a duplicate of #1731. To allow them to overflow the canvas you need to create an HTML tooltip rather than one that draws on the canvas


Aegislash base stats are incorrect

In swsh, the attack and defense base stats were lowered to 140 for their respective form.

Just fixed by #92.


Task 5.3: Develop Future Test Cases

Task 5.3: Develop Future Test Cases

Assigned to Agung @gungwah and Kumar @kmsharma


Add cancel data to destroy subscription

Could you add the same for requesters y repliers?

Codecov Report

:exclamation: No coverage uploaded for pull request base (galactic@801c8fc). Click here to learn what that means.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             galactic     #224   +/-   ##
===========================================
  Coverage            ?   50.05%
===========================================
  Files               ?       43
  Lines               ?     1678
  Branches            ?      478
===========================================
  Hits                ?      840
  Misses              ?      615
  Partials            ?      223

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 801c8fc...4e5517c. Read the comment docs.

@mergify backport foxy main


Crash on Xcode 9 when mocking a NSManagedObject

I made a sample project to reproduce the crash: https://github.com/koke/ocmock-xcode9
What I know so far from debugging:

setupForwarderForClassMethodSelector is called successfully for a few selectors
setupForwarderForClassMethodSelector is called successfully for resolveClassMethod:
setupForwarderForClassMethodSelector is called for retain, then it enters infinite recursion and eventually crashes

This is the recurring part of the backtrace:
    frame #92313: 0x0000000109a784af libobjc.A.dylib`lookUpImpOrForward + 451
    frame #92314: 0x0000000109a782c1 libobjc.A.dylib`lookUpImpOrNil + 20
    frame #92315: 0x0000000109a6efa3 libobjc.A.dylib`class_respondsToSelector + 37
    frame #92316: 0x000000010a5b94ac CoreFoundation`___forwarding___ + 492
    frame #92317: 0x000000010a5b9238 CoreFoundation`__forwarding_prep_0___ + 120
    frame #92318: 0x0000000109a6ec61 libobjc.A.dylib`_class_resolveMethod + 124
    frame #92319: 0x0000000109a784af libobjc.A.dylib`lookUpImpOrForward + 451
    frame #92320: 0x0000000109a782c1 libobjc.A.dylib`lookUpImpOrNil + 20
    frame #92321: 0x0000000109a6efa3 libobjc.A.dylib`class_respondsToSelector + 37
    frame #92322: 0x000000010a5b94ac CoreFoundation`___forwarding___ + 492
    frame #92323: 0x000000010a5b9238 CoreFoundation`__forwarding_prep_0___ + 120
    frame #92324: 0x0000000109a6ec61 libobjc.A.dylib`_class_resolveMethod + 124
    frame #92325: 0x0000000109a784af libobjc.A.dylib`lookUpImpOrForward + 451
    frame #92326: 0x0000000109a78251 libobjc.A.dylib`class_getInstanceMethod + 53
  * frame #92327: 0x00000001211fd2f9 ocmock-xcode9-test`-[OCClassMockObject setupForwarderForClassMethodSelector:](self=0x0000618001060140, _cmd="setupForwarderForClassMethodSelector:", selector="retain") at OCClassMockObject.m:149

Don't mock NSManagedObject. It will never work.

Mocking managed objects is actually a feature since OCMock v3.4. It seems fine with Xcode 9 when a iOS 10 or any macOS SDK is selected, it only breaks on iOS 11. I ran the OCMockTests on an iOS 11 simulator and they crash as well (-[OCMockObjectPartialMocksTests testMockingManagedObject]) with the same stack trace.
Any ideas on this? We use mogenerator and have custom logic in our NSManagedObject subclasses so there aren't any protocols that we can mock instead of the managed objects.

I have some old test that are using PartialMock on a NSManagedObject, on iOS 11 I have the same problem. Exactly like @koke described. We have used the ManagedObject Generator too and no protocols, this migration will cost me a lot of time!

Same problem, suddenly started crashing on XCode 9 on iOS 11.

I have the same issue

I have the same problem. Xcode 9 on iOS 11.

Same problem :(

Thank you. I am aware of the problem. Haven't had a chance to look into it in detail. Please do not add more "me too" comments.

It's seems that bug not depend on Xcode 9. Problem is in iOS 11, on iOS 10 simulator in Xcode 9 all works.

So, I have looked into this but haven't really understood why this happens with the updated runtime in iOS 11.
That said, I did find a workaround. A way to stop the crashes is to avoid installing the method hooks on class methods of NSManagedObject. This means, though, that verification of these methods becomes impossible.  For those of you who use OCMock with NSManagedObject, is this reasonable?
In any case, in a moment I will push a commit that implements this workaround. Please let me know what you think of it.

Can you please confirm whether this fix works for you? If it does it'd do a small release.

I'll check only on Monday. Thanks.
Отправлено с iPhone

21 окт. 2017 г., в 22:15, Erik Doernenburg<EMAIL_ADDRESS>написал(а):
Can you please confirm whether this fix works for you? If it does it'd do a small release.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

It did not work for me. I am still getting a crash.
#35207	0x00000001372f7ce2 in -[OCClassMockObject setupForwarderForClassMethodSelector:] at OCClassMockObject.m:151
#35208	0x00000001372f7c19 in __54-[OCClassMockObject prepareClassForClassMethodMocking]_block_invoke at OCClassMockObject.m:139
#35209	0x00000001372f71d3 in +[NSObject(OCMAdditions) enumerateMethodsInClass:usingBlock:] at /OCMock/NSObject+OCMAdditions.m:69
#35210	0x00000001372f7ac4 in -[OCClassMockObject prepareClassForClassMethodMocking] at OCClassMockObject.m:125
#35211	0x00000001372f7662 in -[OCClassMockObject initWithClass:] at OCClassMockObject.m:33
#35212	0x00000001372fe0f2 in -[OCPartialMockObject initWithObject:] at OCPartialMockObject.m:35
#35213	0x00000001372fb0d4 in +[OCMockObject partialMockForObject:] at OCMockObject.m:59

Hi @erikdoe,
I Had the same issue and implementing the workaround solved it.
Waiting for official release.
Thanks,
Tomer

This workaround fixed the issue for me

@murthyveda2000 When you say you're still getting a crash, do you mean the code sample from the opening post crashes? Or do you have a different test that crashes? If so, could you provide more detail?

In the meantime I released OCMock 3.4.1 which contains the workaround.

3.4.1 does not fix it for me. Still getting crash.

Hi @erikdoe, I think the other crashes happens when we try to mock an object that inherits from NSManagedObject.
Please see how I implemented your workaround to support this scenario:
https://github.com/erikdoe/ocmock/compare/master...applitom:master
Thanks,
Tomer

@Applitom am I reading your change correctly? It looks like you're attempting to mock methods on your classes before CoreData has scribbled them in to the runtime?

@erikdoe Not working for PartialMock, in case of

@givip why do you need a partial mock of a managed object?
Swizzling the metaClass won't help races on selectors that don't exist in the runtime yet.

@erikdoe FWIW I'm not sure what OCMock is going to do here. As far as I can tell these issues are based on races with the initialization of the CoreData stack, which is a private implementation detail to the framework.
In fact some classes / selectors aren't written in to the runtime until the objects are used by an instance of NSManagedObjectContext. Without materializing a full stack in memory "this will never work".
The fact that this changed across major OS releases isn't surprising, and any test code that functions today given a certain initialization loop is inherently subject to failure in future releases as they permutations of loop change for future optimizations.

@Applitom Thanks for looking into it. Do you have a test case that fails without your change but passes with it? I'm asking because as far as I can tell, your change only affects class methods added by subclasses of NSManagedObject.
It might not be totally obvious but the change I made does already affect subclasses of NSManagedObjects. This is because enumerateMethodsInClass:usingBlock: walks up the superclass chain, and the cls argument passed to the block is the class in the hierarchy that actually implements the method.
Example: assume you have a class Foo that has a class method bar. The block will be called with class Foo and method bar and in that case your change prevents a forwarder to be implemented. As far as class methods implemented by NSManagedObject go, their class methods will be skipped in this case even without the change you proposed.

@murthyveda2000, @FlorianMielke, @givip, do all of you encounter the crash only when you try to use a partial mock with a managed object?

Yes.

@erikdoe I've been updating our companies project to iOS 11 and Xcode 9. As a result, I've also come into contact with this issue. I've updated the pod spec to use 3.4.1 and the above issue presents when using a partial mock on a managed object.

@rt-bink Thanks for providing another data point. I think, at this stage, it's pretty clear that the change included in OCMock 3.4.1 fixes most of the crashes with NSManagedObject that were caused by the changes in the new runtime, leaving the crash with partial mocks for NSManagedObject the only open part of this issue.
To be honest, at the moment I don't know how to change OCMock so that it can still create partial mocks for NSManagedObject with Apple's changes in the new runtime. Not saying it won't happen, but it will probably take some time. If you have any ideas please post them here.

@erikdoe OCMock 3.4.1 doesn't fix the crash with NSManagedObject. However, the implementation of your workaround suggest by @Applitom correct it

@erikdoe, as I told you on 22 Feb, the workaround suggest by @Applitom correct the problem for me, but not your workaround. To reproduce it, just use partialMock for a NSManagedObject.

Hi, i had the same problem with a crash for partialMockForObject with OCMock 3.4.1.
Adding the changes from https://github.com/erikdoe/ocmock/pull/354/commits/9d2a803dedfe625983684fa7b2b78a2d241f62b8
fixed the crash and the (old) test seem also to work.
Please add this to a new Release

I hear what you say. Would it be possible, though, please, to provide a unit test that fails without that change and passes with that change. I would really like to understand the problem.

Hello,
I'm sorry about the late response (better late than never 😄).
I made a little example of the crash, I hope it explains our problem better.
You can find it here:
https://github.com/Applitom/ocmock-issue339-fix
Thanks!

Thank you for providing the example; very helpful. I now had time and a machine with Xcode 9.3 (don't ask) to look into this. Finally, it's clear to me what the underlying problem is.
The change I just made fixes the problem and it should have less of a performance impact than the original proposal. A known downside of the way I addressed it is that you cannot stub/mock class methods on NSObject for subclasses of NSManagedObject.
Could you let me know whether that works for you?

Hi @erikdoe,
Thanks, I can confirm that now it's working for me when I point to master branch.
could you please release new version with this fix?
Thanks,
Tomer.

Thanks for confirming. I'll get a release out when I have a moment, hopefully on Monday.

Release is out on Github, Carthage, and Cocoapods. Website will be a bit delayed.


Half-formed is statement blows up in bind

search @browser
   menu-item = [#menu-item item]

bind @browser
   menu-item.children += [#div class: [disabled: is(count style: [padding: 10]]

The explosion went away when is(count was corrected to is(count =


Not working when calling from a fragment

When i am calling RxImagePicker from a fragment application is closing after taking image or picking from gallery.
Is there any way to work it with Fragment ?

It works fine with Fragment, Dialog, etc...
Maybe you don't handle lifecycle correctly.
Application is closing? What crash you receive?

No crash, just application is closing after capturing image. Also on camera orientation its not working.Inside activity its working fine.
On Friday, May 13, 2016 1:23 PM, Glebov Sergey<EMAIL_ADDRESS>wrote:

It works fine with Fragment, Dialog, etc...
Maybe you don't handle lifecycle correctly.
Application is closing? What crash you receive?—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

Probably you don't handle orientation change.
Check updated sample app. It works with library from fragment.

I am calling imagepicker from Drawer Activity fragment
So my drawer Activity is closing after calling image picker from a button click. then after choosing/capture image there is no drawer activity exist.Any solution ?
On Friday, May 13, 2016 1:56 PM, Glebov Sergey<EMAIL_ADDRESS>wrote:

Probably you don't handle orientation change.
Check updated sample app. It works with library from fragment.—
You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub

Your issue is not related to library.
Solution: maybe do not destroy receiver activity when you want to pick something.


Replace OpenCensusTraceLoggingEnhancer(String) constructor with factory method.

opencensus-contrib-log-correlation-stackdriver is still experimental, so this is
a good time to improve the API.

Codecov Report

Merging #1535 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##             master   #1535      +/-   ##
===========================================
- Coverage     82.71%   82.7%   -0.02%
- Complexity     1674    1675       +1
===========================================
  Files           251     251
  Lines          7781    7782       +1
  Branches        763     763
===========================================
  Hits           6436    6436
  Misses         1121    1121
- Partials        224     225       +1

Impacted Files
Coverage Δ
Complexity Δ

...on/stackdriver/OpenCensusTraceLoggingEnhancer.java
86.95% <100%> (+0.59%)
13 <3> (+1)
:arrow_up:

...census/implcore/trace/export/SpanExporterImpl.java
91.78% <0%> (-1.37%)
8% <0%> (ø)

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 17e327f...56c3d77. Read the comment docs.


HHH-10242 Detect ambiguous properties

This is a proposal for the discussion on HHH-10242.
There is some more thinking/checking to do around access type. Also the test suite raised some ClassNotFoundException in other tests but only when run from Gradle, IDE was fine. Not sure where that comes from.

A rerun after a clean seems to have addressed the ClassNotFoundException.

Applied this upstream with a few edits to give (imo) a better error message


Support for hostnames instead of IPs

At the moment the link between the inventory and serviceddefinitions is the IP adrdess of the host.
This works for fixed IPs but should also work for hosts which are only known by their DNS name.
This might lead to strange results if there are multiple IPs or something like round-robin DNS load balancing is used.

added with https://github.com/echox/servicedef/commit/a259032c327b3d4b115990c37eeadf4b677cd84b


Updating example on adding additional servlet for clarity.

When I was following documentation it referenced the HelloWorldServlet to show how to add an additional servlet to the javalin servlet. I was fairly confused by the other-servlet usage as I wasn't sure whether the Test-Servlet or the Javalin servlet was "other" in this case.
Additionally, I was not certain how the context path worked. My initial thought was that the context path was for javalin and the pathSpec in addServlet was for the servlet. After further investigation I found that the context path in the config.server section always applied to the added servlet, and modifying the context path outside of create (but before the routes block) applied to Javalin. I think this simple update makes this a little more clear. I also updated the test (it doesn't actually reference the HelloWorldServlet) that does something similar to show that modifying the config contextPath outside of create does in fact apply to the javalin server and not the TestServlet.

Thanks for cleaning this up @MrThreepwood !


fix name of marker class

just noticed this change as a result of https://github.com/alex3165/react-mapbox-gl/commit/4f7a4ddac7a34f38fc78e25ba5c4d2cdbd3fdbe1 and I think you meant to keep the name Marker.
thanks!

It didn't technically break anything as it is a default export but obviously it was wrong. Thanks for the PR and happy to see someone from Mapbox having an interest on this library.


I suggest adding the preceding matching character before the regular expression to each ‘json’ message to be matched.

hello everyone
The rule matching process uses regular expressions.  I think there is an initial screening before using regular expression matching, for example:
To be matched: ‘Server: Apache/2.2.21 (Win64) PHP/5.3.10’, the characters in the corresponding application matching rule should be in it. If the matching character is not in the text to be matched, no regular expression matching is used.
So I suggest adding the preceding matching character before the regular expression to each ‘json’ message to be matched.
thanks

I like the idea but I'm not sure how it would work. Here's the pattern for Apache, for instance:
(?:Apache(?:$|/([\\d.]+)|[^/-])|(?:^|\\b)HTTPD)\\;version:\\1
How would you screen this? The technology name is not always in the pattern.

I did some testing and found that all the regular expressions combined run in about 300ms, with the slowest expressions taking 1-2ms.
I did improve performance by automatically by replacing * with {0,250} and + with {1,250} in all expressions to avoid scanning very long strings, which made a big difference.
Let me know if you still think performance is an issue. A preliminary string match is a good idea but will add a lot of maintenance and I'm not sure how much of a difference it will make.

In fact, we look at the problem from a different perspective. My point of view is that in the matching process of a request information, it is not necessary to use regular expressions to match, rather than the execution time of a single regular.
Assuming that the request information we want to match will hit 10 applications, the number of regular matches can be reduced during matching. It is not necessary to match all regulars. The "preMatch" field is used to accomplish this.
Let's calculate the time consumption in the case of 100,000 requests.
Preset:
Number of application rules: 2090
Full regular expression matching time: 300ms
"PreMatch" field matching time: 0.0001ms (presumed value: use "bitrix(?:\.info/|/js/main/core)..contains("bitrix");" 7ms for 100000 times )
Single regular time length: 0.2ms (inferred value: full regular expression matching time/number of rules)
Assume that the number of successful pre-matches is 1/3 of the total number of rules: 2090 (the number of applied rules)/3=697
Duration without pre-matching:
100000*300ms=30000000ms=30000s
Duration of pre-matching:
100000*(0.0001ms300)=3000ms=3s
100000(0.2ms*697)=13940000ms=13940s
Total: 3s+13940s=13943s
The result is obvious.

A string match is only about 60% faster than a simple regex match in my testing:
let startTime = Date.now()

for (let i = 0; i < 100000000; i++) 'test'.includes('test')

console.log(Date.now() - startTime) // 2,349ms

startTime = Date.now()

for (let i = 0; i < 100000000; i++) /test/.test('test')

console.log(Date.now() - startTime) // 3,855ms

I'm not sure if it's worth optimising a 300ms process if it means writing preMatch values for about 3,000 technologies by hand. Apache can match server: Apache or server: HTTPD so it's not always possible to just use a single string match.
Maybe we can change specific cases like /^Example$/ to === "Example" automatically.

I agree with you that maintaining matching rules is indeed a headache.
It would be great if some applications can be matched to use string matching instead of regular.


Add a hint to find unnecessary uses of late

The rule should look for variables that are marked late, but which could be made just regular variables because definite assignment can prove that they're always assigned before being used.

This could only be applied to variables or fields declared without an initializer, right?
The values of even local late variables is not computed until they are accessed, so it has consequences:
// prints 1, 3, 2, 4
void main() {
  print(1);
  late int i = (() { print(2); return 2;})();
  print(3);
  i;
  print(4);
}

// prints 1, 2, 3, 4
void main() {
  print(1);
  int i = (() { print(2); return 2;})();
  print(3);
  i;
  print(4);
}

But I think it could be applied to top-level variables, local variables, and fields. Except I don't think you could ever determine for a public top-level field that its lateness is unnecessary.

I guess this is closed with https://github.com/dart-lang/linter/pull/3052

I think that lint only covers static fields and top-level variables. That leaves local variables.

+1, would really like to see this lint.
This happens very frequently in test setup code.
  TestComponent testComponent;
  late TestBed testBed;

  void setUp() {
    final testContext = testBed.load()
    testComponent = testContext.componentInstance
    testComponent.foo = Foo();
  }

  test('x', () {
    use(testBed);
  });

There are often suggestions made during code review - "did you forget to mark that one late too?"
I would like to have a codified decision one way or another and save time on those.


Error occurs with target when accessing value (pypykatz)

Executing spraykatz but getting error when executing the pypykatz.
Installed on Ubuntu 18.04.
Created a test machine running Windows 2012 so fictional user accounts.
Installed as per instructions given (https://github.com/aas-n/spraykatz)

Hi,
Can you attach the problematic dump?

+1 Same error

Hi,
Same answer


service*/bad_reload_test tests fail on Windows

There are new test failures on [cfe] Enable alternative-invalidation-strategy by default.
The tests
service_2/bad_reload_test/dds RuntimeError (expected Pass)
service_2/bad_reload_test/service RuntimeError (expected Pass)

are failing on configurations
dartk-win-debug-x64
dartk-win-release-x64

Log: https://dart-ci.appspot.com/log/vm-kernel-win-debug-x64/dartk-win-debug-x64/18259/service_2/bad_reload_test/service
@johnniwinther Is your CL related to reloading? Could it have caused this failure?

The CL changes to behavior of the incremental compiler which (I believe) is used for the hot reload scenario, it is likely to have caused the failure.
Isn't it weird, though, that it only fails on Windows?

Also failing on
dartk-weak-asserts-win-release-ia32
dartk-weak-asserts-win-release-x64

(which are run nightly), so yeah, this looks Windows specific interestingly enough.

I can replicate the (lack of) error locally by flipping the enableByDefault flag for ExperimentalFlag.alternativeInvalidationStrategy in pkg/front_end/lib/src/api_prototype/experimental_flags_generated.dart, but I haven't yet found why it makes a difference.

cc @jensjoha

I've looked into this a bit.
The immediate reason is this:
On Windows when compiling bad_reload/v2/main.dart it first invalidates bad_reload/v1/main.dart which means that the advanced invalidation kicks in.
On Linux it does not, so the advanced invalidation doesn't kick in (there are no changed files).
When advanced invalidation kicks in on the old file it's compiled again and the compile thus knows about it when asked to do an expression compilation.
The reason it becomes invalidated on Windows and not on Linux is that on Windows, when checking if the files have been invalidated the VM --- I'm guessing - is doing it wrong:
It asks ScriptModifiedSince for - in my case - file:///C:/src/dart-sdk/sdk/runtime/observatory_2/tests/service_2/bad_reload/v1/main.dart --- it lands at FileModifiedCallback (in main.cc) and File::Stat returns File::kDoesNotExist. So I'm guessing the Windows implementation of stat doesn't work with uris, but I haven't looked into it.
On Linux it returns that the file was modified ~2 years ago and concludes that it hasn't changed.

On the VM side the Windows implementation should probably be updated to be able to find the file.
On the CFE side we should probably not compile a file we generally wasn't asked to compile (in this case it compiles another file that doesn't point at the first, the fact that the first was invalidated shouldn't make us compile that too).

Further more:

it's weird that the VMs kernel service protocol has a accept method but not a reject method. I'm not quite sure what state the VM expects here, though, because the test ultimative asks to evaluate and expression on the v1 file and expects it to fail. But if the VM had rejected and gone back to the previous world (as I think it does in the flutter world) it would have existed and the evaluation shouldn't fail (which is by accident what currently happens on Windows which makes the test fail, soooo)
pkg/vm/lib/incremental_compiler.dart in IncrementalCompiler.compile saves any given entry point in a field meaning that if we compile a new entry point, rejects and tries to go back it will (in IncrementalCompiler.reject) ask to compile the new entrypoint and not the original one, so if the new entry point was the one that made it not work, it still won't work. The entrypoint field should only be updated on accept I think.

(For anyone interested the prints I did to debug are available at https://dart-review.googlesource.com/c/sdk/+/255463)

cc @rmacnak-google @aam

@jensjoha wrote

Further more:
it's weird that the VMs kernel service protocol has a accept method but not a reject method. I'm not quite sure what state the VM expects here, though, because the test ultimative asks to evaluate and expression on the v1 file and expects it to fail. But if the VM had rejected and gone back to the previous world (as I think it does in the flutter world) it would have existed and the evaluation shouldn't fail (which is by accident what currently happens on Windows which makes the test fail, soooo)
pkg/vm/lib/incremental_compiler.dart in IncrementalCompiler.compile saves any given entry point in a field meaning that if we compile a new entry point, rejects and tries to go back it will (in IncrementalCompiler.reject) ask to compile the new entrypoint and not the original one, so if the new entry point was the one that made it not work, it still won't work. The entrypoint field should only be updated on accept I think.

I think we do want to fix currently accepted behavior(which was updated relatively recently https://github.com/dart-lang/sdk/commit/869b007e9fac7bff02cfda4cdc50de8b96f9d915) and make expression evaluation work correctly even if hot-reload failed.
Should we open new issue for this?

I think we might not talk about the same thing.
Currently - without a reject call - the VM and the CFE have two different world views and expression evaluation doesn't really work as expected. It might in many cases "work" anyway, but it doesn't really.
What I'm suggesting is that we add the reject call so that the CFE and the VM talks about the thing.


HDDS-2995. Add integration test for Recon's Passive SCM state.

What changes were proposed in this pull request?

Verify Recon gets pipeline, node and container report from Datanode.
Verify SCM metadata state == Recon metadata state (Create pipeline , Close pipeline, create container)
Fix issue in DN StateContext.

What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-2995
How was this patch tested?
Manually tested.

The IT failures are related. Working on fixing them.

I am not able to reproduce this issue locally. Trying to root cause this based of PR runs.

/retest

/retest

The test failures seem to be unrelated. I will try one more time.

Thanks for the review @saintstack  & @swagle. Closing this PR since it is taking longer than expected to fix the flakiness of Recon's integration tests. This patch contains other important refactoring that need not wait for the integration tests to be added. I will be creating separate JIRAs for that.


pixel-wise regressions

Start with min, mean, and max GDD thresholds.  Create rasters with two layers—slope coef and FDR adjusted p-values.
Get these running on on the HPC before thinking more about GAMs.

Forgot to ask if we want to do this on the full resolution (4km) data or if it  makes sense to aggregate spatially a little (8km or 16km maybe)

Oh, nevermind! I've already done this!  Instead I'll focus on exporting the data in a csv format with figures.  Maybe do like 9 thresholds to make a 3x3 faceted plot


Weave chain

Hey, all things are good, but please remove the background noise from the video.

okay, i'll change the video directly

I've updated the video in the README.md section, is there anything else I need to change?

Thanks ✌


Add user list component + snap to user functionality

Creates a horizontal user avatar list in the top right of the window that displays the current users, with the first 2 letters of the username if provided, else a ? appears. Exact labelling/naming tbd. The design could probably be improved, looking for feedback or ideas.
Adds functionality, when clicking a collaborator's avatar, snaps the user to their current cursor position.

This somewhat solves the problem of https://github.com/excalidraw/excalidraw/issues/1721 . The solution provided here is a first pass by snapping the user's window to center on the target collaborators cursor. No following occurs as this will require adding collaborator scroll position to state and sending this over sockets which is a larger chunk of work.
There shouldn't be too many surprises with the code here, with the notable exception of this being the first time where we are rendering actions dynamically, and therefore need to pass a unique key in order to pick props off the state, which combats the need to get into messing generic props which is probably overkill at this stage.
How it looks:

Interaction clicking between collaborators:

Nice work!

How does it scale with more participants or smaller screen?

Few things updated:

Fixed initials
Added tooltip component.
Removed fixed positioning and put in app menu.
Added responsive styles so the avatar stack when there are a ton of collaborators (this creates a long vertical list on small, portrait tablets but this is an extreme edge case with loads of users)
Added collaborators to mobile menu. Mobile menu closes on touch of a collaborator.

Tooltips:

Small screens:

Mobile menu:

I believe I have addressed the feedback here - what are the next steps in getting this merged?

Sorry, I completely blocked this out. Looks great, thanks a lot!