Change Activity and BottomNavigationBar will reset item 1

Hello,
I have a problem with the behaviour of an active element when I'm back to the Activity.
For example, I have a BottomNavigationBar with 5 items in my Activity.
Let's say I click the 4th item of my bar. If I change Activity,  onBackPress, my BottomNavigationBarActivity will still be on my 4th Fragment as expected, but the active item of my bar will be the first one.
The same behaviour appears when I put my app in background and then go back to it.
Any idea how to solve the problem? Am I missing something in onPause / onResume or something?
Here is the initBottomBar() method I call in onCreate() :
public void initBottomBar() {
        // Bottom Bar
        bottomNavigationBar = (BottomNavigationBar) findViewById(R.id.bottom_navigation_bar);
        // Mode
        bottomNavigationBar.setMode(BottomNavigationBar.MODE_FIXED);
        //bottomNavigationBar.setMode(BottomNavigationBar.MODE_SHIFTING);
        // Background
        bottomNavigationBar.setBackgroundStyle(BottomNavigationBar.BACKGROUND_STYLE_STATIC);

        // Auto Hide on Scroll
        bottomNavigationBar.setAutoHideEnabled(false);

        bottomNavigationBar
                .addItem(new BottomNavigationItem(R.drawable.ic_action_a, "A").setActiveColorResource(R.color.active).setInActiveColor(R.color.inactive))
                .addItem(new BottomNavigationItem(R.drawable.ic_action_b, "Mon B").setActiveColorResource(R.color.active).setInActiveColor(R.color.inactive))
                .addItem(new BottomNavigationItem(R.drawable.ic_action_c, "C").setActiveColorResource(R.color.active).setInActiveColor(R.color.inactive))
                .addItem(new BottomNavigationItem(R.drawable.ic_action_d, "D").setActiveColorResource(R.color.active).setInActiveColor(R.color.inactive))
                .addItem(new BottomNavigationItem(R.drawable.ic_action_e, "E").setActiveColorResource(R.color.active).setInActiveColor(R.color.inactive))
                .initialise();

        bottomNavigationBar.setTabSelectedListener(this);
    }

the default behaviour of bottomBar is different. You shouldn't launch a new activity on click of bottom bar item. So, this change won't be done in library. But i can give you some code

    int lastSelectedPosition = -1;
    int selectedPosition = -1;

    @Override
    protected void onResume() {
        super.onResume();
        if (selectedPosition == 3) {// since you asked for 4th item in bottom bar -> position 3
            if (lastSelectedPosition != -1) {
                bottomNavigationBar.selectTab(lastSelectedPosition);
            }
        }
    }

    @Override
    public void onTabSelected(int position) {
        if (selectedPosition != position) {
            lastSelectedPosition = selectedPosition;
            selectedPosition = position;
        }
//other logic which you do
}

You didn't understand, I am not launching an Activity not onClick on a bottomBar item, but inside a Fragment of a selected bottom bar item. But thank you very much for the code, I am sure that it will do the trick!

@flameboy the behaviour shouldn't be like that can you share me all your activity code all the part related to bottomNavBAr. i.e where are you calling this initBottomBar ..etc.
This code which i gave might solve your problem but might cause performance issues if you don't do it right. just share you code. i will have a look in to that and let you know about the issue

I am calling my initBottomBar() method only in the onCreate() part of my Activity. After, I have only one function that change the content of each tab (with fragments) as you can see in the code below.
This works really good, and I have for example a list of 10 items in my FragmentTabs4, and when I click on an item, a new Activity is opened that detail this selected item (full screen, without my bottom bar). When I go back to my main Activity with bottomBar, the Fragment is still set to FragmentTabs4, but the bottomBar is reset to the first element.
@Override
    public void onTabSelected(int position) {

        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();

        switch(position) {
            case 0:
                FragmentTabs1 fragmentTabs1 = new FragmentTabs1();
                transaction.replace(R.id.fragment_container, fragmentTabs1);
                break;
            case 1:
                FragmentTabs2 fragmentTabs2 = new FragmentTabs2();
                transaction.replace(R.id.fragment_container, fragmentTabs2);
                break;
            case 2:
                FragmentTabs3 fragmentTabs3 = new FragmentTabs3();
                transaction.replace(R.id.fragment_container, fragmentTabs3);
                break;
            case 3:
                FragmentTabs4 fragmentTabs4 = new FragmentTabs4();
                transaction.replace(R.id.fragment_container, fragmentTabs4);
                break;
            case 4:
                FragmentTabs5 fragmentTabs5 = new FragmentTabs5();
                transaction.replace(R.id.fragment_container, fragmentTabs5);
                break;
        }

        transaction.addToBackStack(null);
        transaction.commit();
    }


Category Image broken

Framework Version: 0.1.4
Fixed

how do i fix this?

how do i fix this?

@mahabubxtra
refer to this guide https://forums.bagisto.com/topic/188/broken-image-logo-in-bagisto-with-causes-and-solutions

@mahabubxtra
refer to this guide https://forums.bagisto.com/topic/188/broken-image-logo-in-bagisto-with-causes-and-solutions


Left axis top label cut

I just add as subview as following:
barChartView?.addSubview(chart.view)
Any idea why this happens?

Having same issue - in ChartSettings, set the top to some value like 10 - it will push the top down and the clipping goes away. The top of the chart is then compressed too.


dose no funktion on macos

dose no funktion on macos
comout1
comout2

@mcpeapsUnterstrichHD  it would be better if u update your powershell , and try then
also the setup.s1 is intended  to be run on window filesystem . while macos uses linux like filesystem hierarchy  so 🤷 i think it may be not quite good idea for mac to use that configs


change network lan ip cannot be apply

change lan ip then save && apply
after timeout to 0s
no force apply windows pop up
and cannot save config
Waiting for configuration to get applied… 0s
tested on latest HEAD code and really unusable

@jow-
it seems to be something related to your recently commits (don't know which one)

I met this bug, too.

commit 843031f8197aa2c86585360c0f6d8a3b1ee02dee
Author: Jo-Philipp Wich<EMAIL_ADDRESS>Date:   Sun Jan 6 17:08:37 2019 +0100

    luci-base: luci.js: add HTTP request functions

    Add a fetch() inspired HTTP request utility class to luci.js and
    replace the old xhr.js class with a stub using the new request api.

    Signed-off-by: Jo-Philipp Wich<EMAIL_ADDRESS>
This related?

Check the browser debug console for errors.

console log
luci.js?v=git-19.200.40594-b76e583:58 Uncaught (in promise) Error: XHR request aborted by browser
    at Object.handleReadyStateChange (luci.js?v=git-19.200.40594-b76e583:58)

at this line
catch(e){rejectFn.call(opt,e);}});},handleReadyStateChange:function(resolveFn,rejectFn,ev){var xhr=this.xhr;if(xhr.readyState!==4)
return;if(xhr.status===0&&xhr.statusText===''){rejectFn.call(this,new Error('XHR request aborted by browser'));}

somethings
luci.js?v=git-19.203.58942-a0254cb:57 GET http://<IP_ADDRESS>/ubus/?1563900586454 400 (Bad Request)

I don't really understand the javascript...

        handleReadyStateChange: function(resolveFn, rejectFn, ev) {
            var xhr = this.xhr;

            if (xhr.readyState !== 4)
                return;

            if (xhr.status === 0 && xhr.statusText === '') {
                rejectFn.call(this, new Error('XHR request aborted by browser'));
            }
            else {
                var response = new Response(
                    xhr, xhr.responseURL || this.url, Date.now() - this.start);

                Promise.all(Request.interceptors.map(function(fn) { return fn(response) }))
                    .then(resolveFn.bind(this, response))
                    .catch(rejectFn.bind(this));
            }
        },

@jow-
hi could you help to resolve this?
it rase Error on rejectFn.call(this, new Error('XHR request aborted by browser'));
I don't know what it is..

@jow-
you could reproduce this error by changing lan ip from <IP_ADDRESS> to <IP_ADDRESS> when you connect to lan from PC

I can reproduce this behaviour while changing the lan ip address. It happens 10 seconds after the timeout started - reproducible with latest firefox and chrome on debian 10.

Please try this change:
diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js
index 1a98dbcc9..43afc698f 100644
--- a/modules/luci-base/htdocs/luci-static/resources/ui.js
+++ b/modules/luci-base/htdocs/luci-static/resources/ui.js
@@ -1929,7 +1929,7 @@ return L.Class.extend({
                                                method: 'post',
                                                timeout: L.env.apply_timeout * 1000,
                                                query: L.ui.changes.confirm_auth
-                                       }).then(call);
+                                       }).then(call, call);
                                }, delay);
                        };

The proposed change fixes the problem for me - thank you!


Not all emojis work

We've been trying to send Emojis over Python 3. However, this does not work in all cases. There are many emojis that are only displayed as Unicode in Whatsapp.
At this point we believe that it is not a problem with Python. Because with print() all emojis are displayed correctly.
Does anyone have an idea why?
One example of a not working emoji is:
🤣 aka \U0001F923
Here is an example of what a received message in WhatsApp looks like:
😀😃😄😁😆😅😂U0001f923☺😗😍😘😌😉🙃🙂😇😊😙😚😋😜😝😛🤑🤗🤓🤔😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😑😰😰😰😰🤔U0001f925U0001f925U0001f925U0001f925U0001f925U0001f925U0001f925U0001f925U0001f925😬😬😬😬😬😬😬😬😬🤐U0001f924U0001f924U0001f924U0001f924U0001f924U0001f924U0001f924U0001f924U0001f924U0001f924U0001f924U0001f924U0001f924U0001f924U0001f924😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭U0001f922U0001f922U0001f922U0001f922😈😰😢

import emoji
driver.send_message_to_id(id, emoji.emojize(text))


HOW TO ADD NEW COLUMN

i need to add some column field in same file. can u tell how? cause in README.md i only found add column when create new file. thank you

@ctw28 unfortunately there is currently no way to add a new column to an existing file. If you really need it, I can start developing this feature.

yes, i need it, and i would say thank you if you want to develop this feature. and i think, it will be great feature.

You can add a column to an existing table in Laravel before you set data
use Illuminate\Support\Facades\DB;
DB::raw('ALTER TABLE '.$FullTableLocationPath.' ADD COLUMN new_column_name VARCHAR(255)');
$dbfTable = new WritableTable($FullTableLocationPath, [
'editMode' => WritableTable::EDIT_MODE_CLONE,
]);
foreach ($query as $row) {
$record = $dbfTable->appendRecord();
foreach ($row as $field => $value) {
	$column = strtolower($field);
	$record->set($column, $value);
}
$dbfTable->writeRecord()->save();

}
$dbfTable->close();
}
You can do it using PDO in laravel as well
$dsn = 'dbase://your_path/to/your_dbase_file';
$pdo = new PDO($dsn);
$sql = 'ALTER TABLE your_table_name ADD COLUMN new_column_name VARCHAR(255)';
$pdo->exec($sql);
.... The do set data parts here..

Adding notes about adding columns. The 2.2.0 version now has a way to add columns to a new table.
You can read all the columns in an existing structure and then create a new table with the extra columns.
This will allow you do create a table with the added columns, then just fill the new table with the old table's
data and while you do, add the data to the new column.
Note: This is good if the table is not too big. I have tables I would not do this with because they are huge, like in the millions of records from old DBASE software. But if they are not so big, then pump the jam man.  Good Luck!


add HUD visible status

Is visible,  default NO

This would not be super accurate. Just querying hud.alpha > 0.f should work better.


Problem with watch and browser sync

Hello,
may be I'm doing something wrong or have wrong expectation.
I run npm start and application is built in dev mode and localhost server started.
But after this actions changes aren't watched and propagate to the browser sync.
Please can you help me/describe problem?
Thanks
Martin

What is your OS, node.js, npm versions?
Did you make any changes in the seed or this occurs in fresh clone?

I think I have almost the same problem. Every time after npm start everything works just fine, but after I change something it throw me Error: SyntaxError: Unexpected token < in JSON at position 0(…) "Report this error at https://github.com/mgechev/angular2-seed/issues" I just added some classes (services) in the seed. I am on win 10, node 4.4.6, npm 2.15.5. I just tried with a fresh clone, and everything is working.

Would you share the content of your tools/env/config.json?

{   "dev": {     "API": "https://demo.com"   },   "prod": {     "API": "https://prod.com"   },   "staging": {     "API": "https://staging.com"   } }

I am on win 7, node 4.2.4, npm 3.10.2 (updated today, it was broken in v2 too)
It occurs in fresh clone.
I run browser at localhost:5555 (automatically opened), localhost:4000 is unavailable.
When I change for example home.component.html and save it, watch isn't processed.

Hello again, it looks on problem with npm 3.10.2 v. On my older notebook with npm v2 version it works ok. Concretely I checkout repo, run "npm i" twice (maybe not needed) and "npm i typings" an it works ok.

Anyway thank you for perfect seed! :-)

Hi again, on other computer browser sync works with npm v3. So it isn't related to npm version. Probably some local problem in my notebook.

Ok, thanks. Lets close the issue then.

Hello again, I found out why my issue occurs. I use Visual Studio for both backend and frontend (typescript) and sometimes I misclick f5 for building the frontend instead of the backend. So it generates me all the .js files and browsersync stops working. After I discard these files everything is fine. I thought it would be nice if you know this.

I ran into this issue too, it went away after I rebuilt the app.


How to play multiple sounds in quick succession?

Hello,
I’m completely new to naudio so please bear with me…
I trying to play many short (about 500 milliseconds) sounds (wav files) in quick succession with little to no time between them and no overlap.
Let us say, for example, I have 5 different sounds, each exactly 400 ms long. Ideally I would like to play them all in a row, getting a 2000 ms long output.
I accomplished that using the OffsetSampleProvider-class, where I simply give each sound a fitting DelayBy-value and then call the play-functions of all corresponding IWavePlayer simultaneously. This way, I get very good results (only a little time gap between sounds, about 5 ms).
So far so good.
However, the situation becomes slightly more complicated:
What if I want to change a sound while the one before is already playing?
Let us say, I play a row of 5 Sounds like in the previous example. But while the 3.th one is playing I want to change the 4.th one.
I tried to accomplish that again by using the OffsetSampleProvider-class, initializing each sound individually while the previous one is playing and giving an offset (DelayBy-value) based on the CurrentTime-value of the AudioFileReader of the currently playing sound.
This works in principle, but I get huge (about 30 ms) time gaps and overlaps between the sounds.
Anny Ideas?
Thank you.

For cases like this create only one IWavePlayer that plays the sounds sequentially. The ConcatenatingSampleProvider can help you to do this. You can use it to concatenate a bunch of OffsetSampleProvider instances.

Hello,
Thank you, I think your comment pushed me in the right direction.
I think I found a good solution:
I put all the necessary sounds within a single sound-file with the help of a simple editing program.
Then I use a Stopwatch-objekt to set the current time of the relevant AudioFileReader that contains the sound. The setting of current time seems to have far less delay than the play-order itself. This way I can fast and easily control which sound (-segment) shall be played, even while the previous segment is already playing.

great, glad to hear you got something working
On Wed, 12 Apr 2017 at 15:39 Marc125<EMAIL_ADDRESS>wrote:

Hello,
Thank you, I think your comment pushed me in the right direction.
I think I found a good solution:
I put all the necessary sounds within a single sound-file with the help of
a simple editing program.
Then I use a Stopwatch-objekt to set the current time of the relevant
AudioFileReader that contains the sound. The setting of current time seems
to have far less delay than the play-order itself. This way I can fast and
easily control which sound (-segment) shall be played, even while the
previous segment is already playing.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/naudio/NAudio/issues/178#issuecomment-293598429, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAJA1MWlF9fZGJEqPKArMj2UeyowuuZuks5rvOIUgaJpZM4M59Wn
.

--
Mark Heath
http://markheath.net


issue installing Tensorflow on NVIDIA Jetson TX2

Hello
I am following this tutorial from Jetsonhacks to install Tensorflow on my NVIDIA Jetson TX2 board: http://www.jetsonhacks.com/2017/04/02/tensorflow-on-nvidia-jetson-tx2-development-kit/
The situation:
I ran a couple of provided scripts and seems like I ran into a bug, based on the error message I got.
- I haven't set up any swap memory
- normally CUDNN and CUDA should be properly installed, I installed them remotely via Jetpack
- df -h returns:

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/mmcblk0p1   28G   19G  7.6G  71% /
none            7.0G     0  7.0G   0% /dev
tmpfs           7.7G  264K  7.7G   1% /dev/shm
tmpfs           7.7G   14M  7.7G   1% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           7.7G     0  7.7G   0% /sys/fs/cgroup
tmpfs           786M   72K  786M   1% /run/user/1001

The issue:
When running the script provided by jetsonhacks: $ ./buildTensorFlow.sh
I get this error message:
ERROR: /home/nvidia/tensorflow/tensorflow/core/kernels/BUILD:2183:1: C++ compilation of rule '//tensorflow/core/kernels:svd_op'     failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command
  (cd /home/nvidia/.cache/bazel/_bazel_nvidia/d2751a49dacf4cb14a513ec663770624/execroot/org_tensorflow && \
  exec env - \
    CUDA_TOOLKIT_PATH=/usr/local/cuda \
    CUDNN_INSTALL_PATH=/usr/lib/aarch64-linux-gnu \
    GCC_HOST_COMPILER_PATH=/usr/bin/gcc \
    LD_LIBRARY_PATH=/home/nvidia/torch/install/lib:/home/nvidia/torch/install/lib: \
    PATH=/home/nvidia/torch/install/bin:/home/nvidia/torch/install/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin \
    PWD=/proc/self/cwd \
    PYTHON_BIN_PATH=/usr/bin/python \
    PYTHON_LIB_PATH=/usr/local/lib/python2.7/dist-packages \
    TF_CUDA_CLANG=0 \
    TF_CUDA_COMPUTE_CAPABILITIES=6.2 \
    TF_CUDA_VERSION=8.0 \
    TF_CUDNN_VERSION=5.1.10 \
    TF_NEED_CUDA=1 \
    TF_NEED_OPENCL=0 \

  external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE         '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-    frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -MD -MF bazel-out/local_linux-opt/bin    /tensorflow/core/kernels/_objs/svd_op/tensorflow/core/kernels/svd_op_complex64.pic.d '-frandom-seed=bazel-out/local_linux-    opt/bin/tensorflow/core/kernels/_objs/svd_op/tensorflow/core/kernels/svd_op_complex64.pic.o' -fPIC -DEIGEN_MPL2_ONLY -DSNAPPY -iquote . -iquote bazel-out/local_linux-opt/genfiles -iquote external/bazel_tools -iquote bazel-out/local_linux-    opt/genfiles/external/bazel_tools -iquote external/protobuf -iquote bazel-out/local_linux-opt/genfiles/external/protobuf -iquote external/eigen_archive -iquote bazel-out/local_linux-opt/genfiles/external/eigen_archive -iquote external/local_config_sycl -iquote bazel-out/local_linux-opt/genfiles/external/local_config_sycl -iquote external/gif_archive -iquote bazel-out/local_linux-opt/genfiles/external/gif_archive -iquote external/jpeg -iquote bazel-out/local_linux-opt/genfiles/external/jpeg -iquote external/com_googlesource_code_re2 -iquote bazel-out/local_linux-opt/genfiles/external/com_googlesource_code_re2 -iquote external/farmhash_archive -iquote bazel-out/local_linux-opt/genfiles/external/farmhash_archive -iquote external/fft2d -iquote bazel-out/local_linux-opt/genfiles/external/fft2d -iquote external/highwayhash -iquote bazel-out/local_linux-opt/genfiles/external/highwayhash -iquote external/png_archive -iquote bazel-out/local_linux-opt/genfiles/external/png_archive -iquote external/zlib_archive -iquote bazel-out/local_linux-opt/genfiles/external/zlib_archive -iquote external/snappy -iquote bazel-out/local_linux-opt/genfiles/external/snappy -iquote external/local_config_cuda -iquote bazel-out/local_linux-opt/genfiles/external/local_config_cuda -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/protobuf/src -isystem bazel-out/local_linux-opt/genfiles/external/protobuf/src -isystem external/eigen_archive -isystem bazel-out/local_linux-opt/genfiles/external/eigen_archive -isystem external/gif_archive/lib -isystem bazel-out/local_linux-opt/genfiles/external/gif_archive/lib -isystem external/farmhash_archive/src -isystem bazel-out/local_linux-opt/genfiles/external/farmhash_archive/src -isystem external/png_archive -isystem bazel-out/local_linux-opt/genfiles/external/png_archive -isystem external/zlib_archive -isystem bazel-out/local_linux-opt/genfiles/external/zlib_archive -isystem external/local_config_cuda/cuda -isystem bazel-out/local_linux-opt/genfiles/external/local_config_cuda/cuda -isystem external/local_config_cuda/cuda/cuda/include -isystem bazel-out/local_linux-opt/genfiles/external/local_config_cuda/cuda/cuda/include -DEIGEN_AVOID_STL_ARRAY -Iexternal/gemmlowp -Wno-sign-compare -fno-exceptions '-DGOOGLE_CUDA=1' -pthread '-DGOOGLE_CUDA=1' -no-canonical-prefixes -Wno-builtin-macro-redefined         '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers -c     tensorflow/core/kernels/svd_op_complex64.cc -o bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/svd_op/tensorflow/core/kernels/svd_op_complex64.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 4.
gcc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 5924.737s, Critical Path: 813.48s[/code]

after this error message I can't run this script:
$ ./packageTensorFlow.sh
./packageTensorFlow.sh: line 3: cd: /home/nvidia/tensorflow: No such file or directory
./packageTensorFlow.sh: line 4: bazel-bin/tensorflow/tools/pip_package/build_pip_package: No such file or directory
mv: cannot stat '/tmp/tensorflow_pkg/tensorflow-*.whl': No such file or directory

What can I do to solve this issue so I can install Tensorflow as shown in this tutorial?

@andrewharp may have some ideas. That said, TensorFlow on platforms other than those covered by https://www.tensorflow.org/install/ are not supported by the TensorFlow maintainers (we unfortunately do not have the bandwidth to do so). You may want to contact the authors of the blog you pointed to.

TensorFLow can be successfully installed on Jetson TX2.


add metallipää role

Could you describe the purpose/idea behind this addition?

Well, there seems to be a significant population of metal enjoyers within our members, and thus for ease of not tagging everyone individually and also for not knowing who else might be interested, they asked for a role - Metallipää. This role was given to them, and there was discussion of adding it to self serve menu in testauskoira. For some mysterious reason this was never done, and the people were also not aware that the role even existed. Then there was a rush as the role was manually bestowed upon them who asked of it, but this is just silliness as we have this system of the people being capable of assigning themselves desired roles. Search for "metallipää" in Discord should show appropriate discussions about this.

This was already merged, but for the record: this checks out! (I'm just out of the loop :p)


README example link not working

This one ("Time series regression"):

This one too

Here we will provide a list of citations for the project as soon as the articles are published.

Но статья же уже есть и ссылка приведена.


Some api specifications

@arteevraina @henilp105 @perazz
I've built and deployed a simple backend so I could implement the parsing on the fpm side. As that is basically done, there are a few things to consider in terms of the api so everything works flawlessly:

The endpoint to download a specific version should be a GET request: <base_url>/packages/namespace/name/1.2.3.
The endpoint to download the latest version of package is a POST request: <base_url>/packages/namespace/name.
With the POST request, i'm sending a json with a list of cached versions via curl's -d parameter (it should be the same with wget's --post-data):

json = {
  "cached_versions": ["0.1.0", "0.2.0"]
}

curl <url> -d json -o <output>

cached_versions is an array of strings and required, but it could be empty.
Furthermore, I currently expect a json response from both requests that both contain the following fields: code, version and tar:

response = {
  ...
  "code": 200,
  "version": "0.1.0",
  "tar": "https://...",
  ...
}

An error is currently thrown in fpm if any of the three fields aren't present.
A side note on the document scheme because we just talked about it: Even if the version should be contained in the manifest, too, I think it is normal to have such essential data as a field in the document (yes, redundancy is ok) because that speeds up queries (mostly within the backend). Imagine you want to find the latest version of a package, you just want to compare the version fields and not parse every single manifest file to find out its version.
By executing another curl or wget command to download from the url (tar's value), I'm currently expecting a tar.gz file.
If I unpack and unzip the file with tar -zxf <file> -C <destination>, I expect all the contents of a package including src directory and manifest to be on the same level as <destination>. So the manifest should end up here <destination>/fpm.toml, not here <destination>/example_package/fpm.toml after unpacking.
If you'd like to change any of these keys (e.g., if you prefer url over tar or status over code) just let me know and I can change or implement it in fpm.

@minhqdao Thanks for sharing this.
I already have this API ready. I will refactor it and merge it inside a single API and ask you to review it.

@minhqdao
Can you on the url /base_url/packages/namespace/package_name be able to send "GET" request as well ?
So, for the API when you basically don't have anything in the list of cached_versions (which means the list can be empty as you mentioned) you just send the GET request and get the latest version in response and in case you already have something in the cached_versions list, you can make a POST request and the same API will handle that and send you the desired response.

https://stackoverflow.com/questions/28947132/is-it-okay-to-use-same-resource-name-for-both-get-and-post-rest-api
It seems like you can. 🙂

https://stackoverflow.com/questions/28947132/is-it-okay-to-use-same-resource-name-for-both-get-and-post-rest-api

Yes, it's exactly what I am doing.
So, the thing is this API will also be used in the frontend React App to make a get request and it should only show the data of the latest version + version history as well. So, I thought if you can make the method type as method: "get" in fpm if we don't have cached versions in fpm and just use the same endpoint ?
But yeah, it's not set in stone. I can always adjust the API if you will have to change too many things in the fpm. Let me know about that as well.
@minhqdao

I already implemented it. If I cannot find cached versions, I make a GET request, if I can find cached versions, I make a POST request on the same endpoint, sending a list of cached_versions.

Here is the PR : https://github.com/henilp105/registry/pull/18.
Please feel free to review & request any changes.
@henilp105 @minhqdao

@arteevraina Is it deployed somewhere so I can try it out "in real world"?

@arteevraina Is it deployed somewhere so I can try it out "in real world"?

Sure. I will try to deploy it somewhere and share the url with you.

Hi @minhqdao , You can use this endpoint https://registry-apis-arteevraina.vercel.app/packages/fortranlang/postman .
Here, fortranlang is the namespace and postman is the package name.

Thanks, I do get a response there although it's quite different from what I expected. Please document the final response scheme and I will make the necessary changes to parse it correctly in fpm.
I guess that POST https://registry-apis-arteevraina.vercel.app/packages/fortranlang/postman isn't finished yet, right? It doesn't deliver a status code and also the response scheme is very different from the GET to the same endpoint. Since we expect package data in both cases, I would expect the same response scheme.
tarball should always contain the final link of the tarball. So you could copy and paste to download it. That would be great.
I guess that GET https://registry-apis-arteevraina.vercel.app/packages/fortranlang/postman/0.0.X with X = {1, 2, 3} is not supposed to work yet, right?

Thanks for the review @minhqdao .
I have made the scheme for both GET and POST request same.  So, it should be like this now.
{
    "code":  200,
    "data": {
            ...
           "latest_version_data": {
                "dependencies": [
                "string",
                " vegetables"
            ],
            "isDeprecated": false,
            "tarball": "postman-0.0.3.tar.gz",
            "version": "0.0.3"
             }
      }
}

There is some more metadata (like description and other stuff) that I am sending for now in the API but that is not required by fpm client. Right ?
I think as far the tarball is considered we have still not decided which storage service to use. But, I think now is the good to think about it. After that is decided I will replace the current string with link in the metadata so it should be fine after that.
GET API for specific version was supposed to work but I think there was some crash in the backend. I have fixed it and it should be working fine now. Schema for it looks something like this :
{
    "code: 200,
    "data": {
      ...
      "version_data": {
            "dependencies": [
                "string",
                " vegetables"
            ],
            "isDeprecated": false,
            "tarball": "postman-0.0.1.tar.gz",
            "version": "0.0.1"
        }
     }
}

I also just realized the url that I shared for testing APIs is just the preview url.
Here is the final url that is in production you can test - https://registry-apis.vercel.app/

@minhqdao @perazz
How is fpm planning to give the project to the backend ? I think flask allows single and multiple files uploads. But, the server will not be able to access the user's file system and do some manipulation there to generate .tar.gz file ?
Can we generate the distribution file for example .tar.gz file and send the single file to the backend and it will take care of that ?
Is this something we can do on fpm side ? I think we can make use of tar command line for that. https://stackoverflow.com/questions/50338201/how-to-compress-and-tar-a-folder-in-linux

I would follow the example of other package managers and do most of the packaging and checking work on the fpm side, then create a compressed tarball that contains everything to be uploaded:

msys2
cargo

Thanks @arteevraina, the POST now works and I receive a similar scheme as the GET. I've also seen that I get a slightly different result for requesting versions (instead of latest_version_data, I get version_data). But that's ok, I think this is something I can work with if it stays like that (please make sure to document all of it). I'll implement it in fpm once we have the links for the tarballs and then we can check it there.
Considering the upload, of course we create and compress the tarball on the fpm side if we choose to use fpm for the upload. We could also do the checking in fpm. However, I think we need to check the package on the backend, too, because even if we use an API token such as cargo does, it'll just be an http request where we send data containing the token and the tarball. You could literally send any tarball using the same token via a curl request and completely bypass fpm for the upload. Or am I seeing things wrong? 🤔
So if that is the case, there is no point in verifying a package in fpm as it needs to be done on the backend again. To verify a package on the backend, you untar it, unzip it and check it. 🙂 If it passes the check, the tarball is put in the database, otherwise send an error back with what was exactly wrong about the package.
I also think that the dry-run option in cargo is great. 😄

Considering the upload, of course we create and compress the tarball on the fpm side if we choose to use fpm for the upload. We could also do the checking in fpm. However, I think we need to check the package on the backend, too, because even if we use an API token such as cargo does, it'll just be an http request where we send data containing the token and the tarball. You could literally send any tarball using the same token via a curl request and completely bypass fpm for the upload. Or am I seeing things wrong? 🤔

Yes, exactly we would do the checking on the backend side. That I think is doable, the only thing I was worried about generating tarballs on the backend side. But, that fpm will handle now. I think everything is on the track now.

I'll mention it here again for documentation purposes. I think we can drop the POST now because you're sending me package data that I can use on the fpm side to decide whether to download the tarball or not after checking with the cache. Sending a list of cached versions has become unnecessary.
We will need a POST request for resolving real constraints in the future. But it'll look different that what we currently have.

I've checked the GET requests with the latest base url (https://fpm-registry.onrender.com) and it works. The integration for loading packages seems successful and I think we can close this issue.
Thanks, @arteevraina.
However, cold starts are very slow (probably 5-10 seconds) and the performance generally also doesn't seem spectacular. I think we should do sth about that in the long term.

I've checked the GET requests with the latest base url (https://fpm-registry.onrender.com) and it works. The integration for loading packages seems successful and I think we can close this issue.
Thanks, @arteevraina.
However, cold starts are very slow (probably 5-10 seconds) and the performance generally also doesn't seem spectacular. I think we should do sth about that in the long term.

Thanks for the feedback @minhqdao . Yes, as you said on render deployments are generally for our testing right now. It will not be set in stone for future release deployments and we will surely migrate to some other fast server hoisting service.

Let's share future updates to performance issues here: https://github.com/fortran-lang/registry/issues/18


No button is added in the top right corner

Undiscord Version
v5.2.3
Browser
125.0.6422.142 (Build officiel) (64 bits) (cohort: Stable)
Extension
TamperMonkey
Reproduction steps
Install the script on TamperMonkey, I can see the script is on on tampermonkey but I have no delete button on discord web right top corner
Actual results
I have no delete button on discord web right top corner
Expected results
Should have a remove button
Bug affects

[X] DMs
[X] DMs (group)
[X] Channels
[X] Channel (NSFW)

Additional information & file uploads
Nothing more

Same.

Do enable developer mode for the extension

Change browser or extension Tapermonkey + Brave = not working violentmonkey + brave = works

Brave + tampermonkey = work


Added scroll to top button on the hacktoberfest page

Description

Added scroll to top button on the hacktoberfest page
Issue Ticket Number
Fixes #356

Type of change

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

Checklist:

[x] I have followed the contributing guidelines of this project as mentioned in CONTRIBUTING.md
[x] I have checked to ensure there aren't other open Pull Requests for the same update/change?
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes needed to the documentation

Congrats @itsmeAnubhab 🎉, your PR got merged. To be eligible for the swags from ClueLess. Follow this steps.

Star this repository. ⭐
SignIn / SignUp in [ClueLess Website](https://www.clueless.tech/) .
Go to profile section from the top right hand corner.

Comment your profile URL under this comment tagging the person who merged your PR.

That’s it. Follow the leaderboard !
And don’t forget to share your achievement with your friends.

https://www.clueless.tech/profile/admin/91974827
@Debajyoti14


Scrollable within a div?

Is it possible to configure scroll in order to scroll through a selected element (such as a div with overflow:scroll styling) rather than the window? I'm trying to customize the components to do so, but I might be missing an obvious functionality. Thanks

Not sure it's possible in the current version.
https://github.com/fisshy/react-scroll/blob/master/modules/mixins/animate-scroll.js
Looking at line 71 - It could be possible to target an element and scroll that element I believe instead of the Window.

Ok, I'll try to modify it to work with divs or any other type of component. Thank you!

Hi, so I modified the files a bit and ended up editing them so that automated scrolling within a div was an option by using Element props! I'm working still on cleaning it up though

Hi! Great job, sounds like a good to have feature :)

Sweet could I send you a pull request with the changes?

Of course - but I will have to look into the code and test it first :)

It's now possible to scroll within a div. Checkout v1.0.19.


stringify of cstring literals doesn't work out of the box with separate test_driver.cpp

Description
The following example compares a string object against a c-string literal.
The overloaded == operator ensures that the comparison is done character by character,
and doctest correctly prints the observed "bad" string as well as the expected "expected" c-string.
tests.cpp:
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest.h"
#include <string>

TEST_CASE("transfer") {
    std::string bad = "bad";
    // make a failing test
    REQUIRE(bad == "expected");
}

g++ tests.cpp; ./a.out gives the following expected output:
[doctest] doctest version is "2.3.6"
[doctest] run with "--help" for options
===============================================================================
tests.cpp:5:
TEST CASE:  transfer

tests.cpp:8: FATAL ERROR: REQUIRE( bad == "expected" ) is NOT correct!
  values: REQUIRE( bad == expected )

===============================================================================
[doctest] test cases:      1 |      0 passed |      1 failed |      0 skipped
[doctest] assertions:      1 |      0 passed |      1 failed |
[doctest] Status: FAILURE!

However, if I separate out the test-driver into it's own test-driver.cpp:
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest.h"

Taking the #define DOTEST_CONFIG... out of tests.cpp:
#include "doctest.h"
#include <string>

TEST_CASE("transfer") {
    std::string bad = "bad";
    // make a failing test
    REQUIRE(bad == "expected");
}

g++ test-driver.cpp tests.cpp; ./a.out does not printed the c-string literal (notice the {?} rather than "expected"):
[doctest] doctest version is "2.3.6"
[doctest] run with "--help" for options
===============================================================================
tests.cpp:4:
TEST CASE:  transfer

tests.cpp:7: FATAL ERROR: REQUIRE( bad == "expected" ) is NOT correct!
  values: REQUIRE( bad == {?} )

===============================================================================
[doctest] test cases:      1 |      0 passed |      1 failed |      0 skipped
[doctest] assertions:      1 |      0 passed |      1 failed |
[doctest] Status: FAILURE!

Work Around
If I #include <iostream> (e.g. right after #include <string>), then stringify works again.
Comments
At first I thought that avoiding the extra include inside of doctest.h might be intentional.  If that is the case, then maybe an entry in the FAQ page with an explanation and workaround would be helpful.
Extra information

doctest version: v2.3.6
Operating System: Ubuntu 18.4
Compiler+version: g++ 7.4.0

For the pointer equality thing you could use DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING

This should be fixed in dev! (If it somehow isn't please reopen!)


Proposal: support generic proxies next to Tor

Currently, LND allows for Tor connectivity by connecting to the Tor socks proxy and/or Control port.
No other proxies are currently supported, but this would be beneficial to users since it could provide a way to allow for clearnet, i2p and other connectivity like cjdns.
Implementation idea
I have never written in go myself before, but it looks like the code from the tor package can be used as a basis for SOCKS5 proxies.
It think it is good to start refactoring to a  generic proxy package and let the tor package build upon that (which is already suggested in the comments in the source files).
Considerations

Bitcoin Core already supports Tor, I2P and cjdns connectivity.
There are many types of proxies, personally I would prioritise supporting SOCKS5 and HTTP proxies
I would recommend supporting frequently used SOCKS proxy schemes to keep configuration simple. It looks like the already used net.proxy package supports this.
The behaviour of tor.skip-proxy-for-clearnet-targets=true should be used when next to tor, a generic proxy is used.

This is incredibly important IMO. I'm hearing from many node operators who are choosing to abandon Tor-only in favor of a clearnet IPv4 or VPN due to negative effects of Tor network congestion affecting their ability to route payments. At a time when online privacy is under attack, any effort to decrease reliance on Tor should be a priority.

Great proposal/feature request. Looks like PR #5651 is trying to achieve very similar objectives.

While I think adding other proxy/connection types is a good idea in general, just adding generic support for proxies in lnd doesn't mean they can be used for p2p connections (at least not end to end) automatically. For the wider network to understand I2P for example, the spec also needs to be adjusted.


list view does not show build param

Would like the list view to show build parameters.
This would avoid having to discover it via http://xxx/job/<org>/job/<repo>/<build number>/parameters

+1 This definitely would be useful.

If filtering view allowed seaching by build parameter ... this would help too

@sdoumbouya
I've confirmed you can add a FILTER to search by build paramters
FQDN=<host>.<colo>

Its not as dynamic, so you'll have to delete that filter once done using it.


Use dashed name for django-polymorphic in setup.py

The name with an underscore works, but just looks off in a requirements.txt. Also it will create unnecessary diffs when using tools such as prequ when an other setup.py has specified the name with a dash.

Could this be merged? 🧐

thank you @ruohola , could you also add a changelog entry for this?

thank you @ruohola , could you also add a changelog entry for this?

Done.

Codecov Report

Merging #1203 into master will decrease coverage by 0.25%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1203      +/-   ##
==========================================
- Coverage   70.47%   70.22%   -0.26%
==========================================
  Files          63       63
  Lines        3004     2992      -12
  Branches      436      432       -4
==========================================
- Hits         2117     2101      -16
- Misses        734      738       +4
  Partials      153      153

Impacted Files
Coverage Δ

filer/models/imagemodels.py
51.51% <0.00%> (-24.25%)
:arrow_down:

filer/utils/pil_exif.py
23.80% <0.00%> (-4.77%)
:arrow_down:

filer/admin/patched/admin_utils.py
83.33% <0.00%> (-4.77%)
:arrow_down:

filer/admin/imageadmin.py
91.66% <0.00%> (-4.17%)
:arrow_down:

filer/models/abstract.py
74.54% <0.00%> (-0.91%)
:arrow_down:

filer/admin/views.py
62.50% <0.00%> (+9.86%)
: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 42ca9f3...5000362. Read the comment docs.

thank you @ruohola !


Support for FS Edge

The Freestyle Edge uses the same syntax for its configuration, but has different file-names.
When I mount the internal v-drive, I see the layouts like this:
/media/$USER/FS EDGE/layouts/layout1.txt
...
/media/$USER/FS EDGE/layouts/layout9.txt

Do you think you could support those as well?

The Freestyle Edge (and Pro) use basically the same syntax, but the naming of the action tokens (the keys) are slightly different in some cases and they also have more action tokens compared to the Advantage2 according to the manual. I'd prefer to make a separate syntax file for the Freestyle Edge/Pro to make typos easier to spot and make it clear that the files of the Advantage2 and Freestyle are incompatible.
But yes, I'll add support for the Freestyle Edge/Pro probably somewhere in the next few weeks, time permitting.

That sounds great. No rush, though, I just stumbled over this and wanted to let you know.

I added Freestyle Pro/Edge layout file support. Try it out and report any bugs if you find them.


Remove PrivacyExperienceHistory and Duplication b/t Experiences and Configs

Is your feature request related to a specific problem?
A continuation of the removal of the "delivery mechanism" constraint -
Now that several of the constraints have been lifted between notices and experiences, we are duplicating too much information on PrivacyExperience that is also on PrivacyExperienceConfig.   The introduction of loading in ExperienceConfigs by default is highlighting how there are too many things to keep in sync between PrivacyExperiences and PrivacyExperienceConfigs.  We need to have one source of truth.
Our data model has PrivacyNotices, PrivacyExperiences (for a specific region) and have a FK to Privacy Experience Configs, which contain the copy.  There are a few duplicate fields on PrivacyExperiences and PrivacyExperienceConfigs which are hard to keep in sync, and we are unnecessarily versioning PrivacyExperience.
Describe the solution you'd like

Remove disabled, privacy_experience_config_history_id and version fields from PrivacyExperience.

Look to the associated PrivacyExperienceConfig to determine if the resource is disabled.

Remove the PrivacyExperienceHistory table.  Since we've made some changes that you can't change the type of config once it's created, there's no real need to version this experience any longer.
When saving privacy preferences, save the privacy experience id rather than the privacyexperiencehistory id (which I'm removing)

Describe alternatives you've considered, if any
A description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

moving to done


list limitations and available blocks?

just a suggestion:
It would be great if you could list all the available blocks, and those that are known not to be available here.

Not sure what you mean by "all the available blocks"?

Images, bookmarks, and most importantly, which database types are available
(like list, gallery, calendar, etc). That's what I mean by blocks.
On Fri, Feb 2, 2024, 1:50 PM Vels Lobak @.***> wrote:

Not sure what you mean by "all the available blocks"?
—
Reply to this email directly, view it on GitHub
https://github.com/velsa/notehost/issues/9#issuecomment-1923846391, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AEL4NAAIL5I6PQ7KTDH43CDYRTVIVAVCNFSM6AAAAABCUUWZHWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRTHA2DMMZZGE
.
You are receiving this because you authored the thread.Message ID:
@.***>

If you mean Notion blocks and types - those don't need special support, since NoteHost acts as reverse proxy. Meaning, it simply proxies Notion pages AS IS under the specified domain.

Oh! That's incredible! You fixed it! @hosso might be interested in this too.
edit: do you know how to resolve
https://github.com/hosso/notion-custom-domain/issues/22 ?
On Fri, Feb 2, 2024, 2:33 PM Vels Lobak @.***> wrote:

If you mean Notion blocks and types - those don't need special support,
since NoteHost acts as reverse proxy. Meaning, it simply proxies Notion
pages AS IS under the specified domain.
—
Reply to this email directly, view it on GitHub
https://github.com/velsa/notehost/issues/9#issuecomment-1924008462, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AEL4NAETC3A7X5PFIELH3ELYRT2MNAVCNFSM6AAAAABCUUWZHWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRUGAYDQNBWGI
.
You are receiving this because you authored the thread.Message ID:
@.***>


Consider some convenience changes for MVC options

It would be really nice to be able to write:
services.AddMvc(options => options.ModelBinderProviders.RemoveByType(typeof(ByteArrayModelBinderProvider));

or
services.AddMvc().RemoveModelBinderProvider(typeof(ByteArrayModelBinder));

Instead of:
services.AddMvc(options => options.ModelBinderProviders.Remove(options.ModelBinderProviders.OfType<ByteArrayModelBinderProvider>().Single()));

See https://github.com/aspnet/Mvc/issues/6160#issuecomment-295296083

The first option would be expose a custom collection type, the second would be to just add more stuff to the IMvcBuilder. Either one of these could work for this scenario, but I think the builder approach could be to basically anything we want to make into a one liner.

@jbagga - if this is super easy to add (+ tests), which I think it would be, let's sneak it into 2.0.0. If not, 2.1.0 is fine.

Which path should we take here? Is there a preference for extension methods on IMvcBuilder vs a custom collection type for model binder providers?

/cc @rynowak @Eilon

Right now I'm thinking of something like this:
public static IMvcBuilder RemoveModelBinderProvider<T>(this IMvcBuilder builder) where T : IModelBinderProvider
{
    builder.AddMvcOptions(o => o.ModelBinderProviders.Remove(o.ModelBinderProviders.OfType<T>().Single()));
    return builder;
}

Though I'm not sure if builder.AddMvcOptions() is right thing to use. Is there another way to get a hold of the options?

This is cleaner:
services.AddMvc(options => options.ModelBinderProviders.RemoveByType(typeof(ByteArrayModelBinderProvider));

That is indeed clean. However that requires a custom collection type.

I think we'd prefer the custom collection types over extensions on the builder. This is how the filters convenience methods already work, so we should be consistent.

That is indeed clean. However that requires a custom collection type.

I think we're ok with that. If you inherit from Collection<T> there's literally nothing you have to write except for the new methods.

Great, I'll do that.
Would the API look like this?
public class ModelBinderProviderCollection : Collection<IModelBinderProvider>
{
    RemoveByType<TModelBinderProvider>();
    RemoveByType(Type modelBinderProviderType);
}

I think we'll need to call it RemoveType, since that's what's on FormatterCollection. https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNetCore.Mvc.Abstractions/Formatters/FormatterCollection.cs#L36
So it would look like:
public class ModelBinderProviderCollection : Collection<IModelBinderProvider>
{
    RemoveType<TModelBinderProvider>();
    RemoveType(Type modelBinderProviderType);
}

So it looks like we should do this for:

Conventions
ModelBinderProviders
ModelMetadataDetailsProviders
ModelValidatorProviders
ValueProviderFactories

And add the RemoveType(Type type) to formatter collection, which its missing from
see: https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNetCore.Mvc.Core/MvcOptions.cs

Oh and as for where these types go, they belong with whatever T is. So ModelBinderProviderCollection -> Microsoft.AspNetCore.Mvc.ModelBinding

Sounds good. Does it makes sense to create a base class for such collection types? All their logic for removing is the same.

For the scope of this PR and 2.0.0: do we want this on all the types you mentioned or just model binder providers for now?

We've been down that road before and I don't want to go down it again 😑
If you want to try it and it's not gross, then sure.
I still want to have a nominal collection type for each of these because that's the place where any tailored functionality goes (like filters have).

For the scope of this PR and 2.0.0: do we want this on all the types you mentioned or just model binder providers for now?

We'll take as much as you want to give us. This bug stays open until I'm satisfied 😆 We weren't planning to do any of this work in 2.0.0 so it's a bonus for us.

Yeah I know, base classes can be evil. 😝 If there is not very much code duplication might as well go with individual classes.
I'll just get started and see where it ends. 👍

Yeah. Wayyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy back when we had a sort of 'omni-options-item-collection' thing. It was pretty gross and made our lives better to delete. But we lost of the convenience things like this when we did it.

OptionsDescriptor 😄

I think I remember that, lol.
Although this is a rather specific set of types, it might not be worth it. And even if we did, what name would it have? RemovableTypeColletion<T> 😆 ?

We've done all we're going to do here for 2.0.0 but I want to leave this open to track future improvements.

@rynowak, is anything left here for us to handle during 2.2 ?

@rynowak @mkArtakMSFT what "future improvements" is this issue tracking exactly?

The changes here require binary breaking changes to define and return concrete collection types for these properties. We should evaluate this for 3.0 - but I don't think there's much we should do now.

@mkArtakMSFT pushing this to 3.0 and removing my assignment based on @rynowak's month-old comment:

I don't think there's much we should do now.


Split the worker and API server into separate trees

Makes it so you can have fewer dependencies in the build. Makes it so we can have a Docker image for the API server and one for the worker.

I'm going to take a different approach to this. Let's just use flags to configure what the server actually does once it's initialized.


Add key binding to focus next terminal within project only

I would like to assign a key binding to something like terminal.focusNextPaneInProject that would work like workbench.action.terminal.focusNextPane but it would only cycle through terminals in the current project.
As it is in VSCode 1.39.2, if you have multiple projects open in separate windows, focusNextPane will cycle through each terminal across all open projects.

I feel like this is too niche to be built into the core product. It will however be possible and quite easy to put an extension together that does this once this API becomes stable: https://github.com/microsoft/vscode/pull/84005

OK, thanks. Cycling through all project terminals is surprising behavior to me. I expected it to work more like workbench.action.navigateEditorGroups.


Evaluate, Discuss + Document role of "alloc" feature in Crate

As pointed out in https://github.com/rust-osdev/uefi-rs/pull/1297#issuecomment-2278207759, we should discuss our strategy regarding the alloc feature and its priority when creating user API. This should also be documented, once we discussed and agreed on a strategy.

So far, the used approach is unspoken and was never really discussed. From my point of view, it was a 66.6% prefer non-alloc and a 33.3% do as you like.


YAMLException: unknown tag

Hi,
I get an error when i try to edit my yaml file. That line works fine, it's an extension for MkDocs.
Error: YAMLException: unknown tag !<tag:yaml.org,2002:python/name:pymdownx.emoji.to_svg> (17:5)
markdown_extensions:
    - markdown_fenced_code_tabs:
        template: "bootstrap4"
    - pymdownx.emoji:
        emoji_generator: !!python/name:pymdownx.emoji.to_svg   <---
    - attr_list
    - md_in_html

Hey, thank you for reporting. I will have a look on your exception.

Is it possible for you to set your value in quotes?
markdown_extensions:
    - markdown_fenced_code_tabs:
        template: "bootstrap4"
    - pymdownx.emoji:
        emoji_generator: '!!python/name:pymdownx.emoji.to_svg'
    - attr_list
    - md_in_html

Unfortunately not. If i add !!python/name:pymdownx.emoji.to_svg in quotes or double quotes, it will throw a lot of errors when i try to build the mkdocs static site.

How to add reviewers to the PR created by fjogeleit/yaml-update-action@main

https://github.com/fjogeleit/yaml-update-action/blob/main/action.yml#L91
It accepts a comma separated list of usernames

can be PR be automerged from GitHub actions

Sorry, don't know.


Egg Dropping Puzzle- DYNAMIC PROGRAMMING

Description
I can write clean and optimized code for the famous yet tough EGG DROPPING problem using DP, under the Dynamic Programming file.
I will also add other links that can help students understand the intuition behind it.
I am GSSOC'22 participant. please assign me to this @iamgunjan @Lakhankumawat @miraj0507
Domain
Algorithm
Type of Contribution
Addition
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of LearnCPP.

Please assign me to this @Lakhankumawat


Provide default for datastore.secure in all cases

With this commit we choose False as default value for the
configuration property datastore.secure even when an in-memory metrics
store is used. Contrary to the previous default ("" (empty string)),
this avoids errors when the user manually changes their configuration
file to use an Elasticsearch metrics store but only provides host and
port.

Thanks for the review! :)


Redmine #4568 Preserve MLPPP settings when saving interface settings RELENG_2_2

Fix for RELENG_2_2 to match master pull request https://github.com/pfsense/pfsense/pull/1822

RELENG_2_2 branch seems to still have the old folder structure - good stuff, this PR can still merge there if needed.

Thanks for spotting. My brain has gone to mush with various versions of things for master and RELENG_2_2 and manually re-doing changes over time. This one has been sitting here for a while without the error being spotted.
I made pull request https://github.com/pfsense/pfsense/pull/1928 with a clean and correct (I hope) version of this for RELENG_2_2.


[git] repo is getting bigger as we keep the history of all builds of the frontend in it

Currently, on every merge to the main, we compile the frontend using a GitHub action, and push the compiled version to label_sleuth/frontend.
We should:

Remove all the historic compiled versions
Look for a solution to prevent historic builds from being saved

We could use git filter-branch for this. However this will a) rewrite all the history and b) remove build files from tagged commits.
The simplest solution here is to do shallow clones with git clone --depth. Other solution, though more complex, would be to store build files somewhere else, like in another repository. The backend could somehow pull them automatically on start.

Interesting related article: https://www.atlassian.com/git/tutorials/big-repositories


Bytecode function seems broken

Hi,
The following function:
ocaml_export! {
    fn rust_rust_add_7ints|rust_rust_add_7ints_byte(
            cr,
            int1: OCamlRef<OCamlInt>,
            int2: OCamlRef<OCamlInt>,
            int3: OCamlRef<OCamlInt>,
            int4: OCamlRef<OCamlInt>,
            int5: OCamlRef<OCamlInt>,
            int6: OCamlRef<OCamlInt>,
            int7: OCamlRef<OCamlInt>,
        ) -> OCaml<OCamlInt> {
            let int1: i64 = int1.to_rust(cr);
            let int2: i64 = int2.to_rust(cr);
            let int3: i64 = int3.to_rust(cr);
            let int4: i64 = int4.to_rust(cr);
            let int5: i64 = int5.to_rust(cr);
            let int6: i64 = int6.to_rust(cr);
            let int7: i64 = int7.to_rust(cr);
            unsafe { OCaml::of_i64_unchecked(int1 + int2 + int3 + int4 + int5 + int6 + int7) }
    }
}

Gets expanded to:
#[no_mangle]
pub extern "C" fn rust_rust_add_7ints_byte(
    argv: &[::ocaml_interop::RawOCaml],
    argn: isize,
) -> ::ocaml_interop::RawOCaml {
    let mut i = 0usize;
    let int1 = argv[i];
    i += 1;
    let int2 = argv[i];
    i += 1;
    let int3 = argv[i];
    i += 1;
    let int4 = argv[i];
    i += 1;
    let int5 = argv[i];
    i += 1;
    let int6 = argv[i];
    i += 1;
    let int7 = argv[i];
    i += 1;
    if true {
        if !(i == argn as usize) {
            panic!("assertion failed: i == argn as usize")
        }
    }
    rust_rust_add_7ints(int1, int2, int3, int4, int5, int6, int7)
}

If you were to write this out manually, the Rust compiler gives the following warning:
warning: `extern` fn uses type `[isize]`, which is not FFI-safe
  --> src/lib.rs:27:11
   |
27 |     argv: &[::ocaml_interop::RawOCaml],
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
   |
   = help: consider using a raw pointer instead
   = note: slices have no C equivalent
   = note: `#[warn(improper_ctypes_definitions)]` on by default

And in fact, when actually calling this function from bytecode in OCaml I observe panics like thread '<unnamed>' panicked at 'expected 7 arguments, got<PHONE_NUMBER>6832'.
I believe we actually want to take a *const ::ocaml_interop::RawOCaml and convert it to a slice using ::std::slice::from_raw_parts(argv, argn as usize).
I hit this issue with my own macros which mirror the expansion behavior of ocaml_export! in ocaml-interop (but with some additional convenience modifications), and hit this issue which I was able to fix with the above change (commit here: https://github.com/mt-caret/polars-ocaml/pull/37/commits/337727bff33d3cede060155d35edfabc812864b0).

@mt-caret looking into it, but in general, what you say is correct, the generated code should accept a pointer there, then read each value from an offset. Also, argn shouldn't be an isize, but an i32 (just re-checked the OCaml docs and it is an int in C)

Aha, interesting, I hadn't considered that aspect. In that case (kind of pedantic, but...), do we want to use this type instead of an i32? https://doc.rust-lang.org/std/os/raw/type.c_int.html

Just pushed to #53

Aha, interesting, I hadn't considered that aspect. In that case (kind of pedantic, but...), do we want to use this type instead of an i32? https://doc.rust-lang.org/std/os/raw/type.c_int.html

yes!

@mt-caret just published v0.9.2 with the fix. Thank you for the debugging work and report.

Thanks for the blazing-fast response!! :)


Bug:  External Resources cannot be loaded in Firefox

There seems to be a cross-origin resource sharing problem in Firefox. It is not possible to load external resources.
Screenshots:
Chrome - Works
Firefox - Error

Thank you, @scheibome for reporting this.
An explanation of the problem and a fix are provided by PR #629
This should be available in the next release.
Meanwhile, you can try it in the development build on: https://dev.livecodes.io/
Thank you 💚

That looks really good. 👍🏻


Trying to deploy a new token to the local network (venom)

Following the venom documentation to deploy a token on local network.
I am running npx locklift run -s ./scripts/1-deploy-collection.ts -n local and getting error
[INFO]  Found 3 sources
[INFO]  Found 3 changes, compiling...
[ERROR]  path: C:\my-first-nft\contracts\Nft.tsol, contractFile: Nft. error: Error: Source file requires different compiler version (current compiler is 0.62.0+commit.e66e9ac9.Windows.msvc)
 --> C:/my-first-nft\node_modules\@broxus\tip4\contracts\TIP4_1\structures\ICallbackParamsStructure.tsol:1:1:
  |
1 | pragma ever-solidity ^0.61.2;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Error: Source file requires different compiler version (current compiler is 0.62.0+commit.e66e9ac9.Windows.msvc)
 --> C:/my-first-nft\node_modules\@broxus\tip4\contracts\TIP4_1\interfaces\ITIP4_1NFT.tsol:1:1:
  |
1 | pragma ever-solidity ^0.61.2;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Error: Source file requires different compiler version (current compiler is 0.62.0+commit.e66e9ac9.Windows.msvc)
 --> C:/my-first-nft\node_modules\@broxus\tip4\contracts\TIP4_1\interfaces\INftChangeOwner.tsol:1:1:
  |
1 | pragma ever-solidity ^0.61.2;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Error: Source file requires different compiler version (current compiler is 0.62.0+commit.e66e9ac9.Windows.msvc)
 --> C:/my-first-nft\node_modules\@broxus\tip4\contracts\TIP4_1\interfaces\INftChangeManager.tsol:1:1:
  |
1 | pragma ever-solidity ^0.61.2;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Error: Source file requires different compiler version (current compiler is 0.62.0+commit.e66e9ac9.Windows.msvc)
 --> C:/my-first-nft\node_modules\@broxus\tip4\contracts\TIP4_1\interfaces\INftTransfer.tsol:1:1:
  |
1 | pragma ever-solidity ^0.61.2;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Error: Source file requires different compiler version (current compiler is 0.62.0+commit.e66e9ac9.Windows.msvc)
 --> C:/my-first-nft\node_modules\@broxus\tip4\contracts\TIP6\ITIP6.tsol:1:1:
  |
1 | pragma ever-solidity ^0.61.2;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Error: Source file requires different compiler version (current compiler is 0.62.0+commit.e66e9ac9.Windows.msvc)
 --> C:/my-first-nft\node_modules\@broxus\tip4\contracts\TIP6\TIP6.tsol:1:1:
  |
1 | pragma ever-solidity ^0.61.2;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Error: Source file requires different compiler version (current compiler is 0.62.0+commit.e66e9ac9.Windows.msvc)
 --> C:/my-first-nft\node_modules\@broxus\tip4\contracts\TIP4_1\TIP4_1Nft.tsol:3:1:
  |
3 | pragma ever-solidity ^0.61.2;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^```

  Tried changing compiler versions to various others but to no solution.

Hi!
This is not the problem of locklift. You are trying to use 0.62.0 compiler while tip4 contracts are tied to 0.61.2 . Anyway, I acknowledged team about this and we will fix that asap.


Let plugin authors optionally provide an argument schema

Using a JSON Schema standard, we can let plugin authors more explicitly define necessary input, if they want.
This has benefits like:

Improved automatic documentation on complex optional arguments, i.e. where an argument is optional depends on other arguments.
Makes it possible in the future to easily build config snippet using existing React components based on JSON Schema.
Possible later to outsource some of the type checks during Python runtime to e.g. jsonschema.
Trivial to solve #234 for use in e.g. Visual Studio Code with Red Hat's YAML Schema extension.

Reading more on the typing standard Python module, especially the @overload decorator, I think we can manage also complex optional arguments / different argument combinations to the plugins.
webviz-config can then behind the scenes create the JSON schema based on provided standard Python type hints, since there appears to be enough similarities between JSON Schema and Python type hints to do that automatically. Benefits of this approach is then:

Plugin authors can provide Python type hints only...
...and even express complex optional arguments (which mypy then optionally can test for them in static type checks).
webviz-config can automatically transform the type signatures into JSON Schemas, for usage in docs and future configuration file GUI editors.


Translate the game design documentation

I want to translate the documentation to English to make it more internationalized (because we anyways are developing everything in English) and put it to GitHub instead of Google docs.

As a first step, I'll extract the Russian docs from Google Docs and put them here.


Should not remove > on blank line in markdown block quote

For example, the following:
> Testing this out
> Testing
>
> Testing
> Testing asdf

Should format as-is.

Fixed in https://github.com/dprint/dprint-plugin-markdown/commit/28520b5ca3cbfdba26cc1b009c487212ffee8229


git.stage no longer working in 1.11

VSCode Version: 1.11.2
OS Version: Linux 4.11.0-0.rc7.git0.1.fc26.x86_64

I had { "key": "ctrl+k s", "command": "git.stage" } in my keybindings.json to be able to stage the file I have currently opened. But after updating to 1.11 this no longer works.

Great catch.


UTs fails on windows platform

/kind flake

What versions of software are you using?
Operating System:
Windows, Linux
Output of odo version:
master
How did you run odo exactly?
make test
Actual behavior
Observed in travis CI
?   	github.com/openshift/odo/pkg/odo/cli/component/ui	[no test files]
?   	github.com/openshift/odo/pkg/odo/cli/config	[no test files]
?   	github.com/openshift/odo/pkg/odo/cli/debug	[no test files]
--- FAIL: TestPrintSupportedParameters (0.00s)
    --- FAIL: TestPrintSupportedParameters/Case_1:_Test_print_supported_set_parameters (0.00s)
        env_test.go:49: Got Available parameters:
              Namespace: Use this value to set component namespace
              DebugPort: Use this value to set component debug port
              Name: Use this value to set component name, want Available parameters:
              Name: Use this value to set component name
              Namespace: Use this value to set component namespace
              DebugPort: Use this value to set component debug port
FAIL
FAIL	github.com/openshift/odo/pkg/odo/cli/env	0.333s
?   	github.com/openshift/odo/pkg/odo/cli/login	[no test files]
?   	github.com/openshift/odo/pkg/odo/cli/logout	[no test files]
?   	github.com/openshift/odo/pkg/odo/cli/plugins	[no test files]

Expected behavior
No such flake should appear
Any logs, error output, etc?

@amitkrout I can see this flake on linux too
?   	github.com/openshift/odo/pkg/odo/cli/debug	[no test files]
--- FAIL: TestPrintSupportedParameters (0.00s)
    --- FAIL: TestPrintSupportedParameters/Case_1:_Test_print_supported_set_parameters (0.00s)
        env_test.go:49: Got Available parameters:
              DebugPort: Use this value to set component debug port
              Name: Use this value to set component name
              Namespace: Use this value to set component namespace, want Available parameters:
              Name: Use this value to set component name
              Namespace: Use this value to set component namespace
              DebugPort: Use this value to set component debug port
FAIL
coverage: 7.2% of statements
FAIL	github.com/openshift/odo/pkg/odo/cli/env	0.067s
FAIL
Makefile:115: recipe for target 'test-coverage' failed
make: *** [test-coverage] Error 1
The command "make test-coverage" exited with 2.
Done. Your build exited with 1.

It is failing sometimes on mac too.

Hitting same on prow unit test https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_odo/3763/pull-ci-openshift-odo-master-unit/1295594035787862016#1:build-log.txt%3A104

As it is failing on all the supported platform, modifying the issue title


Add /proc//maps

Adds support for parsing /proc//maps

I am using self/maps to figure out base address of the .text section in the https://github.com/larytet/binlog project.


Hello world

I have issues replicating basic examples from the docs. What should i do?
Go 1.23
Godot 4.3

What operating system and architecture are you on? Do you have cgo setup?

 Everything on Linux installed rather easily but not on Windows.
I thought i installed msys2 and put the command correctly but it didn't install anything or i put it wrong.
My specs:

Version	10.0.22631 Build 22631
Windows 11

So with the second link to this, gcc intalled correctly and now it picking dgextension up:

Many people have good experiences with TDM-GCC: https://jmeubank.github.io/tdm-gcc/, https://github.com/jmeubank/tdm-gcc/releases

Good to hear, we are keen to improve the Windows experience but we would need somebody on Windows who would like to contribute these improvements.


Compiler error unhelpful

TypeScript Version:  2.4.1
Code
interface HKT<URI, A> {
  readonly _URI: URI
  readonly _A: A
}

interface URI2HKT<A> {
  "Test": Test<A>
}

type HKTS = keyof URI2HKT<any>;

type HKTTest<URITest extends HKTS, A, B extends HKT<URITest, A>> = B;

// Type '"Test"' is not assignable to type URIHKTof
type HKTof<URIHKTof extends HKTS, A> = HKTTest<URIHKTof, A, URI2HKT<A>[URIHKTof]>;

class Test<A> {
  readonly _A: A
  readonly _URI: "Test"
}

I think this code should typecheck, but it doesn't. If it's not a bug in the code, the compiler error is clearly wrong, so either this is a bug with the typechecker or the error it gives is wrong.
This specific code is all that stops higher kinded types from being completely typesafe in TypeScript, so it'd be a really useful feature.

I have a fix for this, that uses another method, but I'm still quite curious why this gives an error.

@SimonMeskens Here's a simpler example that demonstrates the issue:
function foo<T extends "Test">() {
    let x: T = "Test";  // Error, "Test" is not assignable to T
}

Given a type parameter T with a constraint C, T is known to be a subtype of C. Therefore, T is assignable to C, but not the other way around. However, in cases where C is a unit type, we effectively know that T and C are idential (because the only possible argument for T is C), but we don't currently take that into account.

I don't think that's the error here actually, as this code works:
type HKTof<URIHKTof extends HKTS, A> = URI2HKT<A>[URIHKTof];

Which does exactly the same constrained parameter indexing the exact same class.

No, I think it boils down to what I said above. This simplification also fails:
type HKTof<URIHKTof extends HKTS, A> = HKTTest<URIHKTof, A, Test<A>>;

Here the third type argument to HKTTest fails the constraint check because the _URI property has type URIHKTof in the constraint and type "Test" in the type argument, where URIHKTof is a type parameter with the constraint "Test", which is a unit type (but we don't take that into account).

Interesting, thanks, I think I understand a little better now. The type system is so powerful, it's hard to reason about these complex structures sometimes. It almost turns into write-only code. Luckily we can bury code like this in libraries, so they don't face the user.


Update copyright years to 2017

Happy new year sir

Ahaha. Someone's on the ball.

Ahaha. Someone's on the ball.


[Feature Request] Highlight all the same words of the selected word

Hi,
When we select a word in a document, all the same words are highlighted.
This feature is already available in Notepad++, and I feel it is very useful when modifying code.
The below picture shows this feature:

Thank you very much.

Check out the highlight-selected package.

@UziTech thank you very much.

Should this be closed?


python3Packages.pdoc3: patch failing test

Description of changes
Pull in https://github.com/pdoc3/pdoc/pull/414, which fixes https://github.com/pdoc3/pdoc/issues/400.
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

@ofborg build python310Packages.pdoc3

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/1354


Permissions: Add Community Creator Role for can_create

:heart: Thank you for your contribution!
Description

The can_create permission will now have the option to check if RDM_COMMUNITY_REQUIRED_TO_PUBLISH is set to True, requiring the user to have the community manager role to create new communities.
The community creator role name can be overridden from the user instance.
Closes https://github.com/inveniosoftware/product-rdm/issues/183
Update communities settings so it can always be closed if the config is True

Checklist
Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

[ ] I'm aware of the code of conduct.
[ ] I've created logical separate commits and followed the commit message format.
[ ] I've added relevant test cases.
[ ] I've added relevant documentation.
[ ] I've marked translation strings.
[ ] I've identified the copyright holder(s) and updated copyright headers for touched files (>15 lines contributions).
[ ] I've NOT included third-party code (copy/pasted source code or new dependencies).

If you have added third-party code (copy/pasted or new dependencies), please reach out to an architect.

Frontend

[ ] I've followed the CSS/JS and React guidelines.
[ ] I've followed the web accessibility guidelines.
[ ] I've followed the user interface guidelines.

Reminder
By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

You license your contribution under the same terms as the current repository’s license.
You agree that you have the right to license your contribution under the current repository’s license.

I think that this is not needed. You can override the community service permissions in your instance, as we did it in our instance at CERN, see example here.


Optimizing the Swan Python SDK

1. Modular Design

Separation of Concerns: Break down the SDK into distinct modules or services. For instance, create separate modules for task management, hardware management, payment processing, and authentication. This allows users to import only the modules they need, improving efficiency and maintainability.
from swan_sdk.task import TaskService
from swan_sdk.hardware import HardwareService

2. Comprehensive Initialization and Configuration

Flexible Configuration: Allow users to configure the SDK with environment variables, configuration files, or directly in the code, similar to how AWS SDK handles credentials and regions.
# Using environment variables
import os
from swan_sdk import SwanClient

client = SwanClient(
    api_key=os.getenv('SWAN_API_KEY'),
    region=os.getenv('SWAN_REGION', 'global')
)

# Using a configuration file
client = SwanClient.from_config_file('path/to/config.json')

Profiles for Different Environments: Implement support for profiles (like AWS CLI profiles), allowing users to easily switch between different environments (e.g., development, production).
client = SwanClient(profile_name='production')

3. Improved Error Handling

Custom Exceptions: Create a hierarchy of custom exceptions (e.g., SwanAPIException, SwanAuthenticationException, SwanTaskException) to provide more specific error handling. This approach is similar to how AWS SDK provides distinct exceptions for different error cases.
try:
    client.create_task(...)
except SwanTaskException as e:
    logging.error(f"Task creation failed: {e}")
except SwanAuthenticationException as e:
    logging.error(f"Authentication failed: {e}")

Retry Mechanism: Implement a built-in retry mechanism for handling transient errors like network issues, with exponential backoff, similar to Google Cloud SDK.
from swan_sdk.utils import retry

@retry(exceptions=(SwanAPIException,), tries=3, delay=2)
def create_task_with_retry():
    return client.create_task(...)

4. Asynchronous Operations

Async Support: Introduce asynchronous versions of methods using Python's asyncio for non-blocking operations, allowing users to handle multiple tasks concurrently.
import asyncio
from swan_sdk.async_client import AsyncSwanClient

async def main():
    client = AsyncSwanClient(api_key="your_api_key")
    task = await client.create_task(...)
    print(task)

asyncio.run(main())

5. Pagination and Batching

Pagination Support: For operations that can return a large number of results (e.g., listing tasks or hardware configurations), implement automatic pagination similar to AWS SDK.
tasks = client.list_tasks(page_size=50)
for task in tasks:
    print(task)

Batch Processing: Support batch operations to handle multiple tasks in a single API call, reducing network overhead.
client.batch_terminate_tasks(task_uuids=[...])

6. Robust Logging and Monitoring

Integrated Logging: Provide configurable logging that integrates with cloud logging services (e.g., AWS CloudWatch, Google Cloud Logging). Allow users to set log levels and format logs easily.
import logging
logging.basicConfig(level=logging.INFO)
client = SwanClient(api_key="your_api_key", logger=logging.getLogger("swan_sdk"))

Monitoring and Metrics: Implement hooks for integrating with monitoring tools to track SDK usage and performance metrics.

7. Resource Management and Cleanup

Context Managers for Resource Handling: Implement context managers for resources (e.g., tasks) that automatically handle cleanup, similar to how Google Cloud's Python SDK manages resources.
with client.create_task(...) as task:
    # Task is created and will be cleaned up automatically
    print(task.status)

8. Documentation and Developer Experience

Comprehensive Documentation: Create thorough documentation with usage examples, API references, and best practices. Consider using tools like Sphinx for generating documentation and hosting it on platforms like ReadTheDocs.

Auto-generated Code Samples: Provide code samples for each API method directly in the documentation, similar to AWS SDK documentation.

Interactive CLI: Develop an interactive command-line interface (CLI) that wraps around the SDK for quick operations, akin to AWS CLI.
$ swan tasks create --hardware-id 1 --duration 3600

9. Versioning and Backward Compatibility

API Versioning: Implement versioning in the SDK to ensure backward compatibility as new features and improvements are added.
from swan_sdk.v1 import SwanClient as SwanClientV1

Deprecation Warnings: Provide clear deprecation warnings when features are slated for removal, allowing developers time to migrate.

10. Security Best Practices

Secure Credential Storage: Encourage the use of secure methods for storing API keys and credentials, like AWS Secrets Manager or environment variables.

Token Management: Implement automatic token refresh mechanisms to handle session expiration seamlessly.

Example Optimized SDK Structure
swan_sdk/
│
├── auth/
│   ├── __init__.py
│   ├── authentication.py
│   └── profiles.py
│
├── task/
│   ├── __init__.py
│   ├── task_service.py
│   └── async_task_service.py
│
├── hardware/
│   ├── __init__.py
│   ├── hardware_service.py
│   └── async_hardware_service.py
│
├── payment/
│   ├── __init__.py
│   ├── payment_service.py
│   └── async_payment_service.py
│
├── utils/
│   ├── __init__.py
│   ├── logger.py
│   ├── retry.py
│   └── config_loader.py
│
├── swan_client.py
├── async_client.py
├── exceptions.py
├── cli.py
└── README.md

This optimized SDK structure improves modularity, extensibility, and usability, making it easier for developers to interact with the Swan network while adhering to cloud computing best practices.

@alphaflows  FYI

hello
I would love to dive in this project


ISPN-5536 Base Server onto WildFly 9.0.0.CR2 using feature packs

https://issues.jboss.org/browse/ISPN-5536

Something caused the build to abort:
Failed to execute goal org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.0.0.Final:build (server-provisioning) on project infinispan-server-build: Execution server-provisioning of goal org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.0.0.Final:build failed: java.lang.RuntimeException: java.lang.IllegalStateException: No supplement called 'clustered' could be found to augment the subsystem configuration

Fixed most failures, remaining ones caused by https://issues.jboss.org/browse/WFLY-4771 and we'll need wildfly arquillian 1.0.0.CR2 for that

It seems to me that we can't really integrate this with ALL of the arquillian tests broken though.. Is there some way to workaround this (at least in a hacky way) until the issue can be resolved?

I have issued a PR for WildFly Arquillian https://github.com/wildfly/wildfly-arquillian/pull/20

Thanks to Tomasz Cerar, I have modified the arquillian.xml file to add the  line which won't require updating WildFly Arquillian. Waiting for CI to verify this

It looks like the tests still failed:
http://ci.infinispan.org/viewLog.html?buildId=27535&buildTypeId=bt9&guest=1

We're still having some test failures:
Tests failed: 8 (4 new)
but some are still related to  https://issues.jboss.org/browse/WFLY-4771, although I've worked around most of the others and others seem related to https://issues.jboss.org/browse/ISPN-4123

This is now good to go !

It seems there is a compilation error now
http://ci.infinispan.org/viewLog.html?tab=buildLog&logTab=tree&filter=err&expand=all&buildId=27669#_focus=167509

Should be fixed, waiting for CI

Rerunning on CI again as it seems to have crashed.

Pulling...

Integrated into master, thanks @tristantarrant !


Add order option to table

Would be nice to be able to order table columns:
tb($data, 'order:state,name,email,*');

This would order the first three columns, then the * would indicate everything else to follow afterwards.
Omitting the star would only show the first 3 columns.

Closed in 8aa877417cea49b256b85d16716aa42169f93e76


indent author metadata

Currently the blog isn't showing the author! I didn't realize initially but I think the indenting is necessary
current screenshot

This should fix things!
cc @darkfrog26

Properly attributed now 🎉
proof!!

@samspills thanks for lookin' out for me. :)


Foreign links opening in browser and outside the app

AMAZING PROJECT!!
I have one issue though :
When I open a foreign link it does not open inside the app, can you please help me fix that?

change ASWP_EXTURL to false

Thanks, SOLVED


Generated from latest swagger of advisor 2020-01-01

[ ] The purpose of this PR is explained in this or a referenced issue.
[ ] The PR does not update generated files.

These files are managed by the codegen framework at Azure/autorest.go.

[ ] The PR targets the latest branch.
[ ] Tests are included and/or updated for code changes.
[ ] Updates to CHANGELOG.md are included.
[ ] Apache v2 license headers are included in each file.

Can one of the admins verify this patch?


How to route preserving the location hash?

Hi,
Im having a problem with “hash” mode on “m.route.mode”. I`m using that because “..is the only mode in which routing changes do not cause page refreshes in any browser. (http://lhorie.github.io/mithril/mithril.route.html#mode)”. However, every time i use the m.route(path) command, the scroll is intentionally set up to top (0,0) ignoring the previous “windown.location.hash”. I know that set up the scroll to top is the most popular and used away to web app, but sometimes would be useful let the scroll on the previous “windown.location.hash” (like in mobile), has any way for to do that? If not with the "hash" mode, any order kind of mode as capable of to do that?
Thnx

But how, I did not find any solution for monitoring routing. I can store scrollTop before m.route action but how can I replay it after routing! Use config function does not work for me.

setting scroll position in a config should work as of 0.2.0


dart:mirrors includes static members when doing mixin-application

import "dart:mirrors";

class M {
static staticFoo(x) => x + 1;
}

class A {}

class B extends A with M {}

main() {
  print(reflectType(B).superclass.declarations);
  print(reflectType(B).superclass.invoke(#staticFoo, [1]));
}

prints (on the vm):
{Symbol("staticFoo"): MethodMirror on 'staticFoo', Symbol(".A with .M"): MethodMirror on '.A with .M'}
Unhandled exception:
No static method 'staticFoo' declared in class 'A&M'.

NoSuchMethodError: method not found: 'staticFoo'
Receiver: Type: class 'A&M'
Arguments: [1]
#0      NoSuchMethodError._throwNew (dart:core-patch/errors_patch.dart:188)
#1      _LocalClassMirror._invoke (dart:mirrors-patch/mirrors_impl.dart:927)
#2      _LocalObjectMirror.invoke (dart:mirrors-patch/mirrors_impl.dart:363)
#3      main (file:///usr/local/google/home/sigurdm/test/main.dart:13:35)
#4      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:261)
#5      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

So the method seems to be there (in declarations) but cannot be invoked. Dart2js has similar behavior.
The spec seems to say that static methods are not mixed in.

I have made a cl https://codereview.chromium.org/1315103003/ that fixes a few formatting issues of this and undoes the changes to run_tests. We prefer having modularized changes.
I will apply this, and then apply the diff to the cl when it has LGTM.

And sorry for the delay

I believe this is a bug in the spec: that mixin applications should get copies of static members and the following should print false.
class S1 {}
class S2 {}
class M {
static var field = new Object();
staticField() => field;  // Not M.field.
}
class MA1 extends S1 with M {}
class MA2 extends S2 with M {}
main() {
print(new MA1().staticField() == new MA2().staticField());
}
@gbracha


Multisonar

By @jverbeke - I had to resort to some brutal means in order to get a clean history on this one, integrating over six months of changes.

@jverbeke A quick cross-test would be appreciated. You will need to rebuild the archives and build clean, but this Firmware version will give you much better performance.


Option to only show word count (no character count)

The character count IMHO is not terribly informative, it would be nice to have an option to only show word count and reduce status bar clutter a little

Due to the fact that the plugin is highly configurable anyway, I do like
the idea of having the option. But the default should be showing it, so we
don't introduce a BC here.
I'd like to see a PR for that :+1:
On Wed, Apr 20, 2016 at 1:04 PM, mangecoeur<EMAIL_ADDRESS>wrote:

The character count IMHO is not terribly informative, it would be nice to
have an option to only show word count and reduce status bar clutter a
little
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/nesQuick/atom-wordcount/issues/61

Fixed by #68


Javet cant handle Unicode character class escapes

Hi, I am finding that Javet cant handle a regex like:
/(^(?:[$_\p{ID_Start}][$_\p{ID_Continue}]*\.)*[\p{ID_Start}][$_\p{ID_Continue}]*)\.bind\(([$_\p{ID_Start}][$_\p{ID_Continue}]*)\)$/u
We get an error like:
SyntaxError: Invalid regular expression: /(^(?:[$_\p{ID_Start}][$_\p{ID_Continue}]*\.)*[\p{ID_Start}][$_\p{ID_Continue}]*)\.bind\(([$_\p{ID_Start}][$_\p{ID_Continue}]*)\)$/u: Invalid property name in character class
Digging further it seems Javet doesn't like the p{XXX} syntax at all, although this has been supported for a while in Chrome (and underlying V8).  Is there some setting somewhere needed to enable this?
This regex capability is described here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Unicode_character_class_escape
According to this web page, this feature has been supported since Chrome 64 (V8 6.4) so I am surprised it is not working in Javet, but I could have missed something.

Please check this doc out.

Thanks so much for the response!  I wondered if this was the case,  I also (after I created the issue, which is my bad) discovered that this has been mentioned in the discord channel.  I should have read the discord first before raising the issue, and apologise for being so trigger happy.  I'll dig into the process of I18N support but for now maybe I can work around this issue without the need for it.
BTW: Javet is great ...

Thank you. And, yes, discord channels are golden mines. You've got it. It's up to you to decide when to close this issue, I suppose.

I should have read the docs first (and/or the discord channel).  For now I'll work around the issue and if necessary look into I18N builds ...