text:
LoRA and dual GPU

I've been trying to use exllama with a LoRA, and it works until the following lines are added:
config.gpu_peer_fix = True
config.set_auto_map("10,24")

Which return the following error:
Exception has occurred: RuntimeError
CUDA error: invalid device ordinal
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
  File ".../exllama/model.py", line 722, in __init__
    tensor = tensor.to(device, non_blocking = True)
  File ".../exllama/example_lora.py", line 37, in <module>
    model = ExLlama(config)                                 # create ExLlama instance and load the weights
RuntimeError: CUDA error: invalid device ordinal
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

How should I run exllama with dual GPUs and LoRA support?

Do you have a more complete code example? The error indicates that he model is being loaded incorrectly before it even gets to loading the LoRA.

Sorry, I made a mistake. Also, the original issue lacks details, I hope the following can help.
I am using alpha scaling for longer context. In this example I use a context length of 3000 so it fits a single GPU.
config = ExLlamaConfig(model_config_path)               # create config from config.json
config.model_path = model_path                          # supply path to model weights file
config.alpha_value = 2
config.max_seq_len = 3000

config.gpu_peer_fix = True
config.set_auto_map("10,24")

It crashes with the following error:
 --- LoRA -----------------

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/asd/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
    cli.main()
  File "/home/asd/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
    run()
  File "/home/asd/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
    runpy.run_path(target, run_name="__main__")
  File "/home/asd/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/home/asd/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/home/asd/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
    exec(code, run_globals)
  File "/home/asd/pytests/exllama/example_lora.py", line 78, in <module>
    output = generator.generate_simple(prompt, max_new_tokens = 1200)
  File "/home/asd/pytests/exllama/generator.py", line 307, in generate_simple
    token = self.gen_single_token()
  File "/home/asd/pytests/exllama/generator.py", line 326, in gen_single_token
    logits = self.model.forward(self.sequence[:, -1:], self.cache, lora = self.lora)
  File "/home/asd/pytests/exllama/model.py", line 849, in forward
    r = self._forward(input_ids[:, chunk_begin : chunk_end],
  File "/home/asd/pytests/exllama/model.py", line 928, in _forward
    hidden_states = _move_tensor(hidden_states, device, "hidden_states", self.config)
  File "/home/asd/pytests/exllama/model.py", line 630, in _move_tensor
    return tensor.to(new_device)
RuntimeError: CUDA error: an illegal memory access was encountered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

But with the following configuration:
config.alpha_value = 2
config.max_seq_len = 3000

# The following lines have been commented out
#config.gpu_peer_fix = True
#config.set_auto_map("10,24")

The example_lora.py runs with no issues.

I just pushed a change that should fix #141. Could you try that and see if it also helps here?

repo: turboderp/exllama


text:
Fission reactor destroys contents with redstone current change

Minecraft Version: 1.12.2
NuclearCraft Version: 2.11a--1.12.2
Modpack used is ATM3
Fission reactors destroy any contained fuel and power when redstone current is changed if there is a reactor door next to the controller. This seems to only occur when redstone current is changed (in this case, a lever), this occurs whether or not the reactor is being turned off or on. This doesn't occur on a reactor with the same configuration, but with the door spaced one block away from the controller.
The specific reactor configuration tested has a lever on a casing block next to the controller, it still happens when the lever is directly on the controller but only when turning the reactor off.

I'm not able to recreate this exactly, but I instead did get a crash - this is because I wasn't accessing the block type of the controller correctly, which caused the door to crash when updating. I think this should now be fixed then, but I will leave this open until I get a new build out :)

Fixed in 2.11b as far as I can tell :)

source: gharchive/issue

license: MIT

license_type: permissive

license_source: github-api


text:
Server crashed when using alloy furnace

Modpack: Sky Factory iiii
Mod Version: NuclearCraft-2.16f-1.12.2
Forge Version: forge-14.23.5.2831
Crashlog: https://pastebin.com/6dUPumtz
Unknown reason as it happened on a server and I don't know who did it or how. Let me know if you need more details and I'll try to find it.

Looks like you're using 2.16e - update to 2.16f and that'll fix it ;)

you know what... you're right. I looked at the wrong name. My bad


text:
Override render to replace the entire body given the option of turbolinks => true

Credit: https://github.com/turbolinks/turbolinks/issues/85#issuecomment-298347900

I'd prefer if tubolinks could somehow handle the form submission so we don't have to add more server logic ... like having a data-turbolinks=true on forms ...

Having problems with this in that render json: { exampleJson: 'text' } calls are asking for a template.
Pulling PR for now.
In my app I have instead added this to application_controller.rb
  def render_with_turbolinks(options = nil, &block)
    html = render_to_string(options, &block)
    script = <<-SCRIPT
      (function(){
        Turbolinks.clearCache();
        var parser = new DOMParser();
        var doc = parser.parseFromString("#{ActionController::Base.helpers.j(html)}", "text/html");
        document.documentElement.replaceChild(doc.body, document.body);
        Turbolinks.dispatch("turbolinks:load");
        window.scroll(0, 0);
      })();
    SCRIPT
    self.status = 200
    self.response_body = script
    response.content_type = "text/javascript"
  end

Example call from a controller:
def create
  #.......
  if customer.save
    # ...
  else
    # ....
    render_with_turbolinks :new
  end

@minimul, if you are interested, I just packaged a solution to this problem into a gem turbolinks-form.
The solution is a little tricker than just using DOMParser and replacing the body because that doesn't work on all browsers, and also we want to run eventual script tags on the new body.
My solution still needs some polishing but it is already working properly on Chrome, Firefox, IE>=8 and PhantomJS (for tests).

I have a really simple CoffeeScript class that handles form submission nicely. Redirects if successful, and renders and replaces entire page if not. It uses Turbolinks internal classes to do the rendering so all things work as expected like running scripts, and all data-turbolinks options. It also does a great job of handling the browser history. Hope this helps someone!
class @FormHelper
  constructor: ->
    document.addEventListener "turbolinks:load", @dom_refresh

  dom_refresh: =>
    for element in document.querySelectorAll "form[data-remote='true']"
      element.addEventListener "ajax:send", @remote_form_submit
      element.addEventListener "ajax:complete", @remote_form_complete

  remote_form_submit: (event) ->
    document.activeElement.blur()
    Turbolinks.dispatch "turbolinks:click", event

  remote_form_complete: (event) =>
    xhr = event.detail.filter((object) -> object.constructor is XMLHttpRequest)[0]

    unless xhr.getResponseHeader "Location"
      current_snapshot = Turbolinks.Snapshot.fromElement document
      new_snapshot = Turbolinks.Snapshot.wrap xhr.responseText
      Turbolinks.controller.currentVisit = Turbolinks.controller.createVisit window.location.href, "replace", {}
      Turbolinks.SnapshotRenderer.render Turbolinks.controller, @complete, current_snapshot, new_snapshot

  complete: =>
    Turbolinks.dispatch "turbolinks:load"
    document.body.querySelector(".has-error input, .has-error select")?.focus()

new FormHelper

in controllers that do the redirect you will want to tell turbolinks to advance the history rather than replace it:
  def create
    @team = Team.create team_params.merge users: [current_user]
    if @team.persisted?
      redirect_to icon_team_path(@team), turbolinks: "advance"
    else
      render :new
    end
  end

Hi @jondavidchristopher, that is a cool solution.
One downside though is that your controller must be turbolinks-aware when there are redirects (this could be fixed). And also, for me specifically, I need a solution that works with forms displayed on dialogs too, where only the dialog content is replaced. I solved this issues in turbolinks-form.
On the other hand I am not so comfortable with CoffeeScript, so I wrote my solution in plain Javascript, but it would be good to reuse some of the internal methods of Turbolinks like you did.

source: gharchive/pull-request

authors: grosser hsgubert jondavidchristopher minimul

repo: turbolinks/turbolinks-rails

license: mit

license_source: bigquery


text:
Add azure_key_vault_detail. Closes #14

Checklist

[ ] Issue(s) linked

@khushboo9024

[ ] Explore if we have Key Vault Age Report , which can link to detail
[ ] Maintain cards first then assessment cards
[ ] Move Cloud Environment to overview
[ ] Add Public Access > Enabled/Disabled card as in dashboard
[ ] Remove the quotes "AzureServices" from tables

repo: turbot/steampipe-mod-azure-insights


text:
ModuleNotFoundError: No module named 'nnunet.paths'

Hello! I have encountered some problems. After installing nnunet according to the steps, I run the command "python3 experiment_planning/plan_and_preprocess_task.py -t Task017_AbdominalOrganSegmentation -p 8", and there is an error " ModuleNotFoundError: No module named'nnunet.paths' ". Why does this happen?

Hello,
sorry, i have this file ignored by GitHub since it differs on different devices. I uploaded the file in nnunet folder. Mind you need to accommodate the paths inside to your system.

authors: Zzzzzzzzzzh tureckova

repo: tureckova/Abdomen-CT-Image-Segmentation


text:
aws s3store

Question
Is it possible to separate actual files from .info?
files/
info/

Setup works fine and as expected.
Setup details
Please provide following details, if applicable to your situation:

Operating System: Ran it on AWS ECS Fargate
Used tusd version: "github.com/tus/tusd/v2/pkg/handler" package I used on my go code.
Used tusd data storage: AWS S3
Used tus client library: uppy

Yes, you can by configuring different ObjectPrefix and ObjectMetadataPrefix values: https://github.com/tus/tusd/blob/fb5b6209a7e1c807c9de8f081fa39ba8386b91d0/pkg/s3store/s3store.go#L108-L114

Yes, you can by configuring different ObjectPrefix and MetadataObjectPrefix values:
https://github.com/tus/tusd/blob/fb5b6209a7e1c807c9de8f081fa39ba8386b91d0/pkg/s3store/s3store.go#L108-L114

Copy, will try to implement now and update in a while.

Works as expected. Here is my full tusd handler.
package tushandler

import (
	"context"
	"fmt"

	env "library/go/env/library/go"

	"github.com/aws/aws-sdk-go-v2/config"
	"github.com/aws/aws-sdk-go-v2/credentials"
	"github.com/aws/aws-sdk-go-v2/service/s3"
	"go.uber.org/zap"

	logger "library/go/logger/library/go"

	tusd "github.com/tus/tusd/v2/pkg/handler"
	"github.com/tus/tusd/v2/pkg/s3store"
)

func TusdHandler() *tusd.Handler {
	l := logger.LoggerConfig()
	zapLog, _ := l.Build()

	defer zapLog.Sync()

	region := env.GetEnv("REGION", "xxx")
	bucket := env.GetEnv("BUCKET", "xxx")
	accessKey := env.GetEnv("ACCESS_KEY_ID", "")
	secretKey := env.GetEnv("SECRET_ACCESS_KEY", "")

	cfg, err := config.LoadDefaultConfig(context.TODO(),
		config.WithRegion(region),
		config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(
			accessKey,
			secretKey,
			"", // Session token (optional)
		)),
	)

	if err != nil {
		zapLog.Fatal("error load aws creds",
			zap.Error(err),
		)
	}

	client := s3.NewFromConfig(cfg)
	store := s3store.New(bucket, client)
	composer := tusd.NewStoreComposer()

	store.ObjectPrefix = "files/"
	store.MetadataObjectPrefix = "info/"

	store.UseIn(composer)
	handler, err := tusd.NewHandler(tusd.Config{
		BasePath:                "/uploads/",
		StoreComposer:           composer,
		RespectForwardedHeaders: true,
	})
	if err != nil {
		panic(fmt.Errorf("unable to create handler: %s", err))
	}

	return handler
}

Next question would be the Logger of the tusd.NewHandler. Is it possible to use zap on this one?

Next question would be the Logger of the tusd.NewHandler. Is it possible to use zap on this one?

I don't use zap, but if it implements the slog.Logger interface, then yes. If not, you have to use or implement an adapter.

authors: Acconut rodentskie

repo: tus/tusd


text:
改进部分反馈组件的使用方式，使其更加灵活

This function solves the problem (这个功能解决的问题)
希望 Dialog、Message、Notification、LoadingBar 这四个反馈组件的使用方式以及 Discrete API 的使用可以参考 Varlet UI 相关组件的使用方式改进，使其可以更加灵活的使用🧐
Expected API (期望的 API)
组件使用
<n-message-bar type="error" v-model:show="snackBarFlag"> 消息条 </n-message-bar>

函数使用（UMD 示例）
 naive.MessageBar({
    type: "info",
    content: "消息条",
    position: "bottom"
  })

不会改变现有 API

repo: tusen-ai/naive-ui


text:
表单中使用n-input时，trim修饰符不生效

TuSimple/naive-ui version (版本)
2.33.3
Vue version (Vue 版本)
3.2.39
Browser and its version (浏览器及其版本)
Google Chrome-105.0.5195.127
System and its version (系统及其版本)
Windows 11
Node version (Node 版本)
v16.14.0
Reappearance link (重现链接)
https://codesandbox.io/s/recursing-bhabha-6ftb4u?file=/src/App.vue
Reappearance steps (重现步骤)

在input组件的value属性后面添加trim修饰符；
输入时，在输入值的前后都添加空格，打印出来的value是带空格的；
结论是trim修饰符没有生效；

Expected results (期望的结果)
希望支持文本框的trim属性
Actual results (实际的结果)
trim修饰符没有生效
Remarks (补充说明)

没有实现.trim 自己在JS里面 trim一下就好 一行代码

文档网站有使用 allow-input 来实现 trim 的例子

+1, 大多数人第一反应肯定是直接用.trim,  结果却只能增加几行代码实现😕

+1, 大多数人第一反应肯定是直接用.trim, 结果却只能增加几行代码实现😕

为了不同而不同😕？

up


text:
README-pt-br

Solves #10
Proposed Changes
README on portuguese-br on a separate file
Recommendations
in the README, "This repo is a fork of the same project, but for Japan:", the right should be "but for Brazil" or "This repo is a fork of a Japan project" to give the idea that the project is for brazil

@tiagobpires Thank for this PR! You're right, the sentence on the English README sounds confusing. Can you update that line with your recommendation and add it to this PR?

Of course!
Already added in this PR. Congrats for this project.

authors: tiagobpires tuttiq

repo: tuttiq/speak-her-br


text:
Continuously repeat the  animation for text

Hi,
Any possibility to run animation continuously (e.g: fx_duration:"infinite")

Hello rajrs, I managed this by placing it in a function and then I called that function again with the callback function onElementComplete as follows:
var applyAnimation =  function(){
    $(".demo").letterfx({
        "fx":"fall",
        "words":true,
        "timing":200,
        onElementComplete: function($element, LetterFXObj) {
            setTimeout(applyAnimation,3000);
        }
    });
}
window.onload = applyAnimation();

authors: Emperyal rajrs

repo: tuxsudo/letterfx


text:
RTX TUYA WIFI RS2 RTX WRS2 CBU

Hello, a device slightly similiar to one submitted before by myself, but a different label.
RTX_WRS2_CBU.zip

I don't know if the flash content is the same, please check and add for further users. Thanks!

Added as RTX QS-WIFI-S04-2C WRS2 2 Channel Switch.  This is actually an exact match of Tuya Generic MOD003 2-Channel Smart Relay, but I added the profile under RTX to make it easier to find since we have a fully verified dump.

authors: Cossid openshwprojects

repo: tuya-cloudcutter/tuya-cloudcutter


text:
🛑 TSK is down

In b9b470f, TSK (https://www.tsk.tr) was down:

HTTP code: 0
Response time: 0 ms

Resolved: TSK is back up in b6e9c5c after 9 minutes.

repo: tuz-z/upp


text:
Hyperion 21:9 support

I want to figure out if this frame grabber is capable of grabbing the 21:9 aspect ratio to use. With or without HDMI duplicator.

Could you give a little bit more details? The software-grabber just captures from a digital stream somewhere. It does not care about aspect ratio.
The usb-grabbers might. You should check this based on the chipset of the usb-grabber.

USB grabber is one labeled VideoDVR, DC60 Y ordered on eBay. That's pretty
much all I know about it. Why I'm asking is because I was trying to use my
HDMI output on my GC to duplicate screen but it wouldn't go over 768p. That
made me wonder if the convertor is actually capable of grabbing this aspect
ratio.
On Sun Mar 01 2015 at 6:05:49 PM tvdzwan notifications@github.com wrote:

Could you give a little bit more details? The software-grabber just
captures from a digital stream somewhere. It does not care about aspect
ratio.
The usb-grabbers might. You should check this based on the chipset of the
usb-grabber.
—
Reply to this email directly or view it on GitHub
https://github.com/tvdzwan/hyperion/issues/269#issuecomment-76613622.

Do you by any chance know what might be up? Because I'm also fiddling around with an Arduino-based alternative which is not going that well :)

The issue as you describe it is almost certainly related to your hardware components. One of your HDMI devices will not led you set the desired resolution. This will prompt the whole chain to bump back to 768p. It is hard to say whether it is the USB-grabber or the splitter or maybe both. If you have a second screen (with that resolution or maybe just 1080p) you could check that the splitter is capable of higher resolutions.
I myself do not own a splitter or grabber (or a 21:9 2560x1080 display :-( ), which gives me a disadvantage in solving issues with splitters or USB grabbers..

It might have something to do with my main screen being connected to DP
instead of just a splitter output. And duplicating the screen to pick
something like 21:9 seems impossible. So I have not yet actually tested
with a splitter, but it wouldn't surprise me of that wouldn't solve the
issue. For now I'm looking at Arduino hoping that will be the fitting
extension in my case. And learn some of the programming on the go. Who
knows...
On Fri, Mar 6, 2015, 22:14 tvdzwan notifications@github.com wrote:

The issue as you describe it is almost certainly related to your hardware
components. One of your HDMI devices will not led you set the desired
resolution. This will prompt the whole chain to bump back to 768p. It is
hard to say whether it is the USB-grabber or the splitter or maybe both. If
you have a second screen (with that resolution or maybe just 1080p) you
could check that the splitter is capable of higher resolutions.
I myself do not own a splitter or grabber (or a 21:9 2560x1080 display :-(
), which gives me a disadvantage in solving issues with splitters or USB
grabbers..
—
Reply to this email directly or view it on GitHub
https://github.com/tvdzwan/hyperion/issues/269#issuecomment-77636972.

Closed due to age. Please open a new one, if problems still exists.
Thank you

authors: Fid3lity brindosch tvdzwan

repo: tvdzwan/hyperion


text:
应用无法打开，请使用 1.4.6 版本就好了

电脑为 MacBook Air m1，系统为 Monterey 12.5，参考之前的 issue 无法解决，测试 1.3.1 版本和 1.2.0 版本，均无法打开，截图如下

辛苦试试官方github下的版本看看有问题吗

我也遇到了，为什么会这样？

+1  intel版本   而且下载历史版本装上也打不开了

辛苦试试这个版本 下载

谢谢，这个版本是可以使用的

辛苦试试这个版本 下载

谢谢，这个版本是可以使用的

这个版本也没法用

你可以尝试升级一下 macOS 的版本，现在 Monterey12.5.1 已经有了，在关于本机中检查更新就可以

那提个建议, 最好release新版本的时候写下要求的系统版本号 💯

抱歉大家 今天应该是证书过期了，辛苦去下载最新版

请使用 1.4.6 版本，兼容性已测试ok
https://github.com/tw93/MiaoYan/releases/tag/V1.4.6
@jievince

@jievince 最后好了吗

authors: conanjunn jievince sbccznfy shellRaining tw93 vampuke


text:
glyphicons are not showed on bootstrap sass

Hello Ive been trying to make this glyphicons to work with my bootstrap sass, I change the bootstrap-variables file (not sure if erase the// from the sass file) but so far I cannot get the glyphicons to work.
I also change the path to ../bootstrap but nothing at all, someone please help me. using compass and sass

@twbs/sass Seems like https://github.com/twbs/bootstrap-sass#fonts already sufficiently covers this?

That's right, closing this, if you are having problems please have a look at the Readme section linked in the comment above

FYI rails 5.0.2, I had to add $icon-font-path: "bootstrap/"; before
@import 'bootstrap-sprockets'; @import 'bootstrap';
For some (unknown) reason the icon-font-path was not being changed by bootstrap-sprockets.

Thanks @ianheggie, you've just saved me a lot of head-scratching :-)

Try change the source folder of your glyphicons fonts files to "bootstrap", or create a new folder in your fonts folder, with this name "bootstrap" and put your glyphicons fonts there.

i read you all, but sorry, could you be more precise please ?
@saidsoualhi where is supposed to be the "fonts folder" and the "source folder of your glyphicons fonts" ? (I'm using Rails-5.2 actually, and what ever i done about change stylesheet import call the result stay the same: no glyphicons).
thank you for your precisions.

authors: Gusduenas cvrebert glebm ianheggie jerome-diver saidsoualhi siwilkins

repo: twbs/bootstrap-sass


text:
.container should be available as a mixin

First off, I do understand that CSS classes can be used as mixins. Please continue reading for a detailed explanation why I think the .container functionality should be available as a pure mixin.
Side note: this is somewhat related to #14276, but I think it's different enough or at least hopefully explained well enough to warrant a separate issue. #14276 doesn't state the problem clearly and mainly concentrates on a possible solution (which isn't backwards compatible, so I don't recommend it).
I'm using the Bootstrap mixins/classes with LESS for more semantic markup; using mixins instead of adding the classes to the HTML. However, to use .container() in my less files, I have to include the whole less/grid.less file that includes the other grid classes. This results in about 30KB of CSS classes being dumped into my compiled CSS that I don't need since I won't be adding them to my HTML tags.
I can work around this by copying just the .container code to my own file and changing it to just be a mixin, but seems to me that this should be available by default since Bootstrap 3 already includes so much to support semantic markup.
I think this could be implemented just by moving the code for the .container class to less/mixins/grid.less (adding parentheses to make it a pure mixin of course), re-naming it, and then calling it from less/grid.less for the .container class.

@cvrebert, do you have any thoughts on this...Would it be helpful if I did a pull request showing my proposed solution?

Sounds square
On Mar 13, 2015 1:37 PM, "jmotes" notifications@github.com wrote:

@cvrebert https://github.com/cvrebert, do you have any thoughts on
this...Would it be helpful if I did a pull request showing my proposed
solution?
--
Reply to this email directly or view it on GitHub
https://github.com/twbs/bootstrap/issues/15997#issuecomment-79168163.

To clarify, you want the following code available as a mixin, right?

.container {
  .container-fixed();

  @media (min-width: @screen-sm-min) {
    width: @container-sm;
  }
  @media (min-width: @screen-md-min) {
    width: @container-md;
  }
  @media (min-width: @screen-lg-min) {
    width: @container-lg;
  }
}

If so, I don't think we'll go that route in v3. It's an extra abstraction that will add complications too close to the end of life for this version. I'm unsure we'd even do this in v4, but I do understand the urge to have more semantic markup. Lots of changes will be coming for that in the next major release.

@mdo, that is the code in question. I understand your reasoning....Looking forward to Bootstrap 4!

authors: dffp jmotes mdo

repo: twbs/bootstrap


text:
grids in IE8 always stack when using non-customized Bootstrap

As of today if you were to download Bootstrap via the 'Download Bootstrap' link on the homepage of http://getbootstrap.com/ your grids in IE8 would stack(fail).  Whereas, if you were to goto http://getbootstrap.com/customize/ and choose the 'Compile and Download' version with all defaults accepted Bootstrap grids, as advertised, work flawlessly in IE8.  Initial issue noticed when testing https://github.com/cesterline/ic-2015 then later verified against Bootstrap provided examples found at http://getbootstrap.com/getting-started/.

Are you absolutely sure it's due to the CSS and not due to a problem with setting up Respond.js? There are several Respond.js gotchas to be aware of: http://getbootstrap.com/getting-started/#support-ie8-respondjs

Good question: meta content is set to IE=Edge, I'm not using cross-domain CSS, nor am I referencing CSS via @import or calling the page via file://.  In either event, the only thing which changed, in my build, which produced a positive result (grids in IE8 performing as advertised) was making use of the version of bootstrap.css which was generated as a result of the Bootstrap customization script(accepting all defaults).
This issue is easily tested.  DL both versions of v.3.3.4 from the download link here (http://getbootstrap.com/) and here (http://getbootstrap.com/customize/).  Then point unique instances of any of the templates found here (http://getbootstrap.com/getting-started/) which make use of grids.  I believe you will find your results produce stacked(broken) grids in the version of bootstrap.css which is DL'd from the homepage and properly presented grids in the version DL'd from the Customization page.

Sorry, but I can't reproduce your issue.
Test page: http://run.plnkr.co/plunks/d0TzLqvRfaNB2cKTVNvX/
Screenshot:

It looks as if my original assumption was incorrect.  I may have missed a step.
Within your test, use  in place of the local reference.
My current tests involve a number of freshly downloaded, Bootstrap provided, templates which all point to the hosted(bootstrapcdn) version of bootstrap.css.  All of which, via IE8 running on Win7, cause grids to improperly stack.  If, however, I re-point the same templates towards a freshly downloaded, local, copy of bootstrap.min.css the grids work as advertised.

So you're running into the "Respond.js and cross-domain CSS" gotcha, which is among those I specifically asked you to check for earlier.

Gotcha.  My original tests regarded the two paths to downloading a local distribution of the Bootstrap framework.  In which case the cross-domain issues which affect the behavior of Respond.js would not have been a factor.  However, in my latest tests, it seems I was remiss of your original concern.  In either case, I appreciate your time and attention.

authors: cesterline cvrebert


text:
justify-content-end goes out of container in IE11

On Windows10 in IE11 the content goes to the next col when justify-content-end is used
I made a demo https://codepen.io/jvanderkroon/pen/pdEewx
The first example shows the problem. The button goes out of the col-8 and is not clickable
In the second example the button shows in the correct col-8 and is clickable

Please can you update your Codepen using our latest release ? https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta.2/css/bootstrap.min.css

The Codepen example is updated with beta2 css.

This is a IE10 and IE11 bug: https://stackoverflow.com/questions/37534254/flex-auto-margin-not-working-in-ie10-11/37535548#37535548. You're using competing methods of alignment with the auto margins and the justify-content utility. Choose one or the other, but not both.

authors: Johann-S jvanderkroon mdo


text:
tracking end of transition collapse on multiple element

Discussed in https://github.com/twbs/bootstrap/discussions/35317

Originally posted by arcanisgk November  2, 2021
i  am try to implemente a check (type switches) to collapse multiple element:
let atsu_enable = document.getElementById('act-url');
atsu_enable.addEventListener("change", function (e) {
    let collapseElementList = [].slice.call(document.querySelectorAll('.atsu-options'));
    if (atsu_enable.checked) {
        collapseElementList.map(function (collapseEl) {
            new bootstrap.Collapse(collapseEl, { hide: false });
        });
    }else{
        collapseElementList.map(function (collapseEl) {
            new bootstrap.Collapse(collapseEl, { show: false });
        });
    }
})

but if i click to fast the switches collides with the collapse transition:
Fine:

collides transition result:

I have seen that when it comes to an element it can be detected when the transition ends with this.
but in my case they are multiple elements, how can I track multiple elements?

Promise.race maybe?
Either way this should be a discussion.

authors: XhmikosR arcanisgk


text:
Navbar only working in stackblitz demo

Prerequisites

[X] I have searched for duplicate or closed issues
[X] I have validated any HTML to avoid common problems
[X] I have read the contributing guidelines

Describe the issue
Was trying out 5.3.2 and the navbar. Noticed on the documentation page that it didn't appear to be rendering correctly.

Went to the stackblitz demo page for it and it is working there.

Put the same code in a single page in my project and it doesn't work (looks like the documentation page).
Then created a codepen page and copied the same code over to it. It also had the same issue.
https://codepen.io/scottlocknet/pen/poYovjJ
Appreciate any thoughts on what is going on.
Reduced test cases
https://codepen.io/scottlocknet/pen/poYovjJ
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
Microsoft Edge
What version of Bootstrap are you using?
5.3.2

Thanks for reporting this issue @scottlocknet
Could you please provide a more precise definition of what you mean by 'that it didn't appear to be rendering correctly'? I'm not quite sure about the nature of the issue here.

Sorry for not being more precise. In the first screenshot, you can see that the hamburger menu didn't collapse up and instead spreads out to the right. The bootstrap documentation site (https://getbootstrap.com/docs/5.3/components/navbar/), CodePen example and looking locally at a generic page all show the subitems spread out to the right.
When I viewed in stackblitz, it rendered as expected, with it collapsed and then able to expand.

Ok, this is a user issue. I didn't even notice the nav class the example was generating. I've been stuck in legacy code for the past two years and just took the example code without looking through ever line... :)

Expand in there is forcing it out. Removing that fixed my issue. Odd that it worked in one testing tool and not anything else. No biggy though.

authors: julien-deramond scottlocknet


text:
Use multiplier numbers instead of shirt sizes for spacing utility class names

Rename the spacerclasses.
Example:
.m-a-0  // No margin
.m-a     // Default $spacer margin
.m-a-2  // Double Margin
.m-a-3  //  Triple  Margin
The Problem with using "md" or "lg" here is that you could confuse with the Breakpoints of the same name.
Plus: if you want to add Breakpoint-Specific Spacerclasses they would become impossible to remember:
.m-a-lg-md // medium margin for large breakpoints -> hard to understand
.m-a-lg-2    //  double  margin for large breakpoints -> easier to understand

CC: @mdo
(Note: This will need squashing at merge time.)

But how would you name classes with 1.5rem-padding?
I think it is not useful to write the hardcoded margin/padding-size in the HTML... it's like using inline-style ;-)

Punting for #18185.

authors: cvrebert mdo michaseel sergej2705


text:
rate limit tweepy paginator search_all_tweets

Im not sure why I am getting rate limited so quickly using:
mentions = []

for tweet in tweepy.Paginator(client.search_all_tweets, query= "to:######## lang:nl -is:retweet",
                            start_time = "2022-01-01T00:00:00Z", end_time = "2022-05-31T00:00:00Z",
                            max_results=500).flatten(limit=10000):
  mention = tweet.text
  mentions.append(mention)

I suppose I could put time.sleep(1) after these lines, but then it would mean I could only process one tweet every second, whereas with a regular client.search_all_tweets I would get 500 tweets per request.
Is there anything I'm missing here? How can I process more than one tweet a second using tweepy.Paginator?
BTW: I have academic access and know the rate limit documentation.

See the FAQ section in the documentation about this.
This is also a duplicate of #1688 and #1871.

repo: tweepy/tweepy


text:
AsyncStreamingClient examples

Hello,
and thanks for developping this lib.
I am struggling to find any example of use of the async streaming V2 version: AsyncStreamingClient.
If you could poinit me to some website with exampe of connection and streaming, rules handling, that would be great.
(the example folder of the lib, doesn't seem to have been updated since 2017, or anyway I couldn't find an AsyncStreamingClient example)
Best

AsyncStreamingClient's interface mirrors that of StreamingClient, for which there is a guide with examples.
The main difference is that many of AsyncStreamingClient's methods are coroutines, which is documented.
You can see that the last commit for the examples folder was in March of this year, not 2017.

Just in case someone finds it useful to start the jourmey.
And in case this code helps people who wants to get started. It bugs DELIBERATELY in order to point out what seems to be a potential error, when handling rules (all code inspired or corrected from the TweePy Community).
Corrections/improvements are welcomed.
import asyncio
import logging
import sys
from typing import Union

from tweepy.asynchronous.streaming import (AsyncStreamingClient,
                                           StreamRule)

from twitter_news_tickers.app_config_secret2 import (TWITTER_API_BEARER_KEY, ) # just put your own BEARER_KEY

class RunForeverClient(AsyncStreamingClient):
    def __init__(self, bearer_token, **kwargs):
        super().__init__(bearer_token, **kwargs)
        self.request_tweeter_fields: list = ['author_id', 'text', 'id', 'created_at', ]

        # set tickers to follow
        self.follow_tickers: str = '$BBBY OR $NDX OR $FIGS OR $SPLK OR $0293.HK OR $TSLA OR $SNN.L OR $USO OR $NVAX OR $PLUG OR $VWAPY OR $AMZN OR $SCHB.OL OR $VWAGY OR $VLTSA.PA OR $CB OR $NVDA OR $SQM OR $AF.PA OR $BRK-B OR $MYPS OR $SPX OR $QQQ OR $SGFY OR $AAC.PA OR $AACW.PA OR $ADE.OL OR $FB OR $LPK.DE OR $ARKK OR $MKS.L OR $ZM OR $PLTR OR $BKKT OR $AAPL OR $SNAP OR $BDT.DE OR $CAT OR $BAR OR $EPHYU OR $DAL OR $UAL OR $MSFT OR $ES OR $TWTR OR $PFE OR $LVS OR $VOW3.DE OR $ANET OR $GOOGL OR $ILMN OR $SPY OR $VLA.PA OR $AMD OR $AAL'

        # set users to follow
        self.users_to_follow: Union[
            str, None] = 'from:KingOfAllStonks OR from:HedgeMind OR from:HalfersPower OR from:BreakingStocks_ OR from:OptionsMike OR from:OptionAlert OR from:Vtradez OR from:compound248 OR from:smashelito OR from:daniburgz OR from:FNStonerman OR from:vixologist OR from:BankofVol OR from:UKCovid19Stats OR from:realwillmeade OR from:NateGeraci OR from:perushka OR from:TimTheMM OR from:laurenthomas OR from:federalreserve OR from:bankofengland OR from:A_Setup_Calls OR from:hipster_trader OR from:TrendSpider OR from:unusual_whales OR from:tradebotAI OR from:CNN OR from:fintwit_synapse OR from:trader_debo OR from:DmytroKuleba OR from:turbonator_23 OR from:R_Zandi OR from:LionelHutz_Esq OR from:stockresearchhq OR from:MarketRebels OR from:congresstrading OR from:LongBullInfo OR from:CitronResearch OR from:JessicaNutt96 OR from:Bladerunner871 OR from:davidfaber OR from:arbitratuer OR from:algobotnews OR from:turbo_quantum OR from:CheddarFlow OR from:ripster47 OR from:ElonJet OR from:TwitterIR OR from:StrizziJ OR from:TlmTheMM OR from:WsbmodR OR from:ZelenskyyUa OR from:annmarie OR from:Bank_of_Japan_e OR from:TickerHistory OR from:thebirdabides OR from:SelectOptions OR from:HindenburgRes OR from:GammaEdges OR from:NATOpress OR from:turboleistung OR from:SeekingAlpha OR from:chancery_daily OR from:Doctabones OR from:OptionsAction OR from:SoberLook OR from:Amena__Bakr OR from:JulianKlymochko OR from:squawksquare OR from:C_Barraud OR from:JimScalpert OR from:DivesTech OR from:AdaptivCharts OR from:EmmanuelMacron OR from:MariaBartiromo OR from:Mayhem4Markets OR from:tmts_media OR from:androsForm OR from:DeItaone OR from:muddywatersre OR from:POTUS OR from:FTMarkets OR from:RyansTrading_ OR from:dampedspring OR from:bankofcanada OR from:BullishBearz OR from:MrDarnton OR from:iaeaorg OR from:The_Real_Fly OR from:AAPLinsights OR from:FortuneOptions OR from:Fxhedgers OR from:spotgamma OR from:ProfRobAnderson OR from:SpacBobby OR from:staunovo OR from:KyivIndependent OR from:OptionTakes OR from:labeltrader1122 OR from:traderboog OR from:markets OR from:AnnMLipton OR from:Hafizebot OR from:Reuters OR from:EricBalchunas OR from:ProfEricTalley OR from:WSJmarkets OR from:StockMKTNewz OR from:WholeMarsBlog OR from:Mike_Hunt_Sr OR from:zerohedge OR from:kateconger OR from:T_L_B_S_ OR from:business OR from:Lagarde OR from:financialjuice OR from:ftbreakingnews OR from:MuhammadLila OR from:CommodityImpVol OR from:TradeWithAlerts OR from:PalantirTech OR from:newsfilterio OR from:fly4dat OR from:hyperconvexity OR from:WSJ OR from:matt_levine'

    async def on_exception(self, exception):
        print(f"Exception while running Tweeter streamer V2:\n"
              f"{exception.__class__.__name__}")
        print(exception)
        exit(exception)

    async def on_disconnect(self):
        print(f'Disconnected')

    async def on_includes(self, includes):
        print(includes)
        tweets: list = includes['tweets']
        users: list = includes['users']
        if len(users) != len(tweets):
            print(f'Not same size between users and tweets')
            # user replied to himself=> 1 user, multiple tweets
            # user[0] replied to more than one [1:] user involved in the discussion

    async def on_connect(self):
        print(f'Connected')

    async def on_response(self, response):
        tweet_id: int = response.data['id']
        tweeter_user_id = response.data['author_id'] or -1
        # TODO:
        # handle truncated text for re-tweets
        # https://dev.to/twitterdev/a-comprehensive-guide-for-using-the-twitter-api-v2-using-tweepy-in-python-15d9
        # https://docs.tweepy.org/en/stable/extended_tweets.html
        print(response)
        tweet_str: str = response.data['text']
        if tweet_str[-3] == "…":
            print(tweet_str)
        print("#" * 100)
        print(f'Response tweet_id: {tweet_id}')
        print(f'Response author_id: {tweeter_user_id}')

        print(f'Response data:\n{tweet_str}')
        print(response.errors)

    async def run_forever(self):
        response = await self.add_rules(add=[StreamRule(value=self.follow_tickers, id="equities"),
                                             StreamRule(value=self.users_to_follow, id="followed"),
                                             ])
        if len(response.errors) > 0:
            print(f'Error while adding rules: {response}')
            exit(0)
        print(response)
        self.filter(tweet_fields=self.request_tweeter_fields,
                    expansions=[
                        'author_id',
                        'referenced_tweets.id']
                    )

async def main():
    client = RunForeverClient(TWITTER_API_BEARER_KEY)

    await client.run_forever()

if __name__ == "__main__":
    # Use to debug  your app
    logging.basicConfig(level=logging.DEBUG)

    # asyncio check for OS limitations related to windows
    if sys.platform == "win32" and sys.version_info.minor >= 8:
        asyncio.set_event_loop_policy(
            asyncio.WindowsSelectorEventLoopPolicy()  # pylint: disable=no-member
        )
    event_loop = asyncio.get_event_loop()

    event_loop.run_until_complete(main())

Returns a Response value poiting to your mistake. In this case:
.... exceeds the maximum length of a rule. It is 2533 characters while the maximum allowed is 512 (at position 1)"]

omg, this lib's docs are TRASH,
abandonware (specifically for using API v2 with async tweepy)

tipped 50$ for docs improvement, let's make tweepy great again!

OMG, twitter API is soooo mess (or I am stupid afk),
it seems that you need a PRO PLAN TO ACCESS STREAMING API but it's not mentioned in errors/docs etc. The only fking place where you can deduce it it's Twitter Portal where it lists what endpoints are available for each plan...
So frustrating (@!#)

authors: ArtemBernatskyy Harmon758 nono-london


text:
fix missing insert in cache_role

The cache_role method on the InMemoryCache struct was not inserting the roles into the guild_roles map

Can you please add a test similar to the others at the bottom to prevent a regression in the future?

Will do

Dont merge yet, I found another missing insert in cache_member.

authors: BlackHoleFox DusterTheFirst

repo: twilight-rs/twilight

license: ISC


text:
Linter

Add linter

LGTM!
I tested both voicemal and callback task and didn't observe any new issue / regression. I noticed that there is no confirmation when a recording is deleted (only a printout in console), but that was the same in the original plugin, so I'll raise a separate issue for that.
Thank you so much @ktalebian

authors: ktalebian vernig


text:
[Housekeeping] - Fixed DemoApp compilation

Jira Ticket

Description

Fixes DemoApp compilation

Commit message

chore: Fix Cocoapods release

Screenshot

Testing

[ ] Added unit tests
[x] Ran unit tests successfully
[ ] Added documentation for public APIs and/or Wiki

Commit message chore: Fix Cocoapods release
Is it correct?

Code coverage
Total coverage: 95.50%

Powered by Slather

  Generated by :no_entry_sign: Danger

Commit message chore: Fix Cocoapods release
Is it correct?

The commit message is correct, I just put the wrong one on the description but it has the right one now

Code coverage
Total coverage: 95.50%

Powered by Slather

  Generated by :no_entry_sign: Danger

authors: AuthyApps SergioFierro sanarroya

repo: twilio/twilio-verify-ios


text:
not working in the run search

Run search
twint.run.Search(c)
RuntimeError                              Traceback (most recent call last)
 in ()
1 # Run search
----> 2 twint.run.Search(c)
3 frames
/usr/local/lib/python3.6/dist-packages/twint/run.py in Search(config, callback)
325     config.Profile = False
326     config.Profile_full = False
--> 327     run(config, callback)
328     if config.Pandas_au:
329         storage.panda._autoget("tweet")
/usr/local/lib/python3.6/dist-packages/twint/run.py in run(config, callback)
224         raise
225
--> 226     get_event_loop().run_until_complete(Twint(config).main(callback))
227
228 def Favorites(config):
/usr/lib/python3.6/asyncio/base_events.py in run_until_complete(self, future)
469         future.add_done_callback(_run_until_complete_cb)
470         try:
--> 471             self.run_forever()
472         except:
473             if new_task and future.done() and not future.cancelled():
/usr/lib/python3.6/asyncio/base_events.py in run_forever(self)
423         self._check_closed()
424         if self.is_running():
--> 425             raise RuntimeError('This event loop is already running')
426         if events._get_running_loop() is not None:
427             raise RuntimeError(
RuntimeError: This event loop is already running
CRITICAL:root:twint.run:Twint:Feed:noDataExpecting value: line 1 column 1

Probably need to enable nestasyncio before you run the query.
import nest_asyncio
nest_asyncio.apply()

Probably need to enable nestasyncio before you run the query.
import nest_asyncio
nest_asyncio.apply()

repo: twintproject/twint


text:
website: add docs for inconsistent URL path issue

Issue #, if available:
#244
Description of changes:
Adds a section to the Twirp docs about inconsistent URL paths across language implementations (#244).
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@marioizquierdo I moved the docs to the routing section as you suggested and provided an example. Care to take another look?

repo: twitchtv/twirp


text:
support udp port mappings

in order to communicate with services like riemann or statsd, port mappings need to support udp as well as tcp
I seem to have a failing acceptance test, but the same test fails on master for me.
~/src/galley (adamvduke/add-udp-port-mapping-support)$ gulp compile && gulp test && gulp acceptance
[16:46:38] Using gulpfile /crashlytics/galley/gulpfile.js
[16:46:38] Starting 'compile'...
[16:46:39] Finished 'compile' after 454 ms
[16:46:40] Using gulpfile /crashlytics/galley/gulpfile.js
[16:46:40] Starting 'test'...

  DockerArgs
    formatEnvVariables
      ✓ should be a list for Docker
      ✓ excludes nulls but includes empty strings
    formatLinks
      ✓ should format links, looking up container names
    formatPortBindings
      ✓ should return portBindings and exposedPorts
    formatVolumes
      ✓ should return volumes
    formatVolumesFrom
      ✓ looks up some services but not others

  PromiseUtils
    promiseEach
      ✓ resolves after each promise resolves
      ✓ rejects if a value rejects

  parseArgs
    addons option support
      with a single value
        ✓ should generate addon options with an array with one value
      with a multiple values through multiple params
        ✓ should generate addon options with an array with multiple values
      with a multiple values through a single delimited param
        ✓ should generate addon options with an array with multiple values
      with a trailing comma
        ✓ should generate addon options that do not include an empty string
      with a mix of delimited and non-delimited params
        ✓ should generate addon options with an array with multiple values
      with the long param name
        ✓ should generate the addon options as usual
      with the parameter not specified
        ✓ should generate an empty array of addons

  normalizeMultiArgs
    with a non-delimited string
      ✓ should be an array with one value
    with a delimited string with two values
      ✓ should be an array with two values
    with a delimited string with a bad leading comma
      ✓ should be an array with one value
    with a delimited string with a bad trailing comma
      ✓ should be an array with one value
    with an array with one value
      ✓ should be an array with one value
    with an array with one value
      ✓ should be an array with one value
    with an array with two values
      ✓ should be an array with two values
    with an array with two values, one of which is delimited
      ✓ should be an array with three values

  normalizeVolumeArgs
    ✓ handles a single value
    ✓ handles multiple values
    ✓ resolves relative paths

  generatePrereqServices
    generates simple dependency chain
      ✓ should generate correctly ordered list
    does not have duplicate service entries, keeps the earliest
      ✓ should generate correctly ordered list
    fails on circular dependency
      ✓ should throw

  collapseEnvironment
    not parameterized
      ✓ does not modify a string
      ✓ does not modify an array
    parameterized
      ✓ returns defaultValue when env is missing
      ✓ finds named environment
      ✓ finds namespaced environment
      ✓ falls back when namespace is missing

  collapseServiceConfigEnv
    array parameterization
      ✓ collapses down to just the environment
    env parameterization
      ✓ paramerizes the env variables

  combineAddons
    addons
      array parameter merging
        without env
          ✓ merges addons array parameters with addon
        with addon env
          ✓ merges addons array parameters with addon env
        with addon namespaced env
          ✓ merges addons array parameters with namespaced addon env
      env parameter merging
        with no base env
          ✓ parametrizes the env variables
        with a base env
          ✓ parametrizes the env variables
        with multiple addons
          ✓ paramerizes the env variables

  addDefaultNames
    ✓ preserves existing image name
    ✓ adds missing image name
    ✓ tolerates no registry

  envsByService
    envs
      ✓ processes services

  addonsByService
    envs
      ✓ processes addons

  processConfig
    naming
      ✓ processes services
      ✓ returns global config

  50 passing (42ms)

[16:46:40] Finished 'test' after 221 ms
[16:46:40] Using gulpfile /crashlytics/galley/gulpfile.js
[16:46:40] Starting 'acceptance'...
[16:46:40] Starting 'acceptance:build'...
Sending build context to Docker daemon 2.048 kB
Step 0 : FROM ubuntu:14.04
 ---> 8693db7e8a00
Step 1 : RUN apt-get update && apt-get install -y   curl   nodejs   npm
 ---> Using cache
 ---> 4e8c24344e5e
Step 2 : RUN ln -s /usr/bin/nodejs /usr/bin/node
 ---> Using cache
 ---> ab7811af2fcb
Step 3 : RUN npm install -g http-server@0.7.4
 ---> Using cache
 ---> 8a8f996c2b70
Successfully built 8a8f996c2b70
Sending build context to Docker daemon 6.144 kB
Step 0 : FROM galley-integration-base
 ---> 8a8f996c2b70
Step 1 : COPY src /src
 ---> Using cache
 ---> 4991f8db616c
Step 2 : WORKDIR /src
 ---> Using cache
 ---> 67f1b1e3acf1
Step 3 : CMD /usr/bin/node server.js
 ---> Using cache
 ---> 7d7867436f31
Step 4 : EXPOSE 9615
 ---> Using cache
 ---> fc6b46311c23
Successfully built fc6b46311c23
Sending build context to Docker daemon 2.048 kB
Step 0 : FROM galley-integration-base
 ---> 8a8f996c2b70
Step 1 : CMD curl http://backend:9615/
 ---> Using cache
 ---> 1621c7713485
Successfully built 1621c7713485
Sending build context to Docker daemon 3.584 kB
Step 0 : FROM galley-integration-base
 ---> 8a8f996c2b70
Step 1 : COPY config /config
 ---> Using cache
 ---> 3b8215eac958
Step 2 : VOLUME /config
 ---> Using cache
 ---> c355bc2b2a0f
Successfully built c355bc2b2a0f
Sending build context to Docker daemon 3.584 kB
Step 0 : FROM galley-integration-base
 ---> 8a8f996c2b70
Step 1 : COPY data /data
 ---> Using cache
 ---> 8282ab48b41d
Step 2 : CMD /usr/local/bin/http-server /data
 ---> Using cache
 ---> ab3c0dcf329d
Step 3 : EXPOSE 8080
 ---> Using cache
 ---> 3b87d7f3e27a
Successfully built 3b87d7f3e27a
Sending build context to Docker daemon 3.584 kB
Step 0 : FROM galley-integration-base
 ---> 8a8f996c2b70
Step 1 : RUN apt-get update && apt-get install -y   rsync
 ---> Using cache
 ---> c6d0a847449a
Step 2 : COPY etc /etc
 ---> Using cache
 ---> dfc89a34c0b5
Step 3 : EXPOSE 873
 ---> Using cache
 ---> 9c9a0bd7d995
Step 4 : CMD /usr/bin/rsync --no-detach --daemon
 ---> Using cache
 ---> 4c1024498a76
Successfully built 4c1024498a76
[16:46:42] Finished 'acceptance:build' after 1.96 s
[16:46:42] Starting 'acceptance:test'...

  galley
    cleanup
      ✓ removes everything except stateful (1297ms)
    list
      ✓ prints addons and services with environments
    basics
      ✓ starts up prereq services (664ms)
      ✓ preserves running services (1768ms)
    commands
      1) allows source, entrypoint, and new command
      ✓ sets env variables, pipes stdin through correctly (631ms)
    links
      ✓ creates removed linked-to services (1528ms)
      ✓ recreates services with removed linked-to services (1075ms)
      ✓ uses existing backend container (2036ms)
    volumes
      ✓ recreates after volume is deleted (875ms)

  9 passing (17s)
  1 failing

  1) galley commands allows source, entrypoint, and new command:
     Error: /src/code.txt failed with exit code 1
    at build/acceptance/test_commands.js:63:23
    at build/lib/commands/run.js:922:12
    at lib$rsvp$$internal$$tryCatch (node_modules/rsvp/dist/rsvp.js:493:16)
    at lib$rsvp$$internal$$invokeCallback (node_modules/rsvp/dist/rsvp.js:505:17)
    at lib$rsvp$$internal$$publish (node_modules/rsvp/dist/rsvp.js:476:11)
    at lib$rsvp$asap$$flush (node_modules/rsvp/dist/rsvp.js:1198:9)

[16:46:59] 'acceptance:test' errored after 17 s
[16:46:59] Error in plugin 'gulp-mocha'
Message:
    1 test failed.
[16:46:59] 'acceptance' errored after 19 s
[16:46:59] Error in plugin 'run-sequence'
Message:
    An error occured in task 'acceptance:test'.

Hrm. Not sure about the test failure, but your branch passes on my machine.

One comment.

I revisited this a bit and it actually feels better as a regex given that the pattern is pretty stable. Would you prefer a new PR with only that commit, or an additional commit to this PR?

Squashing it all into this PR is reasonable.
On Fri, Jan 22, 2016 at 1:52 PM, Adam Duke notifications@github.com wrote:

I revisited this a bit and it actually feels better as a regex given that
the pattern is pretty stable. Would you prefer a new PR with only that
commit, or an additional commit to this PR?
—
Reply to this email directly or view it on GitHub
https://github.com/twitter-fabric/galley/pull/32#issuecomment-174010724.

Updated

Nice.

authors: adamvduke phopkins

repo: twitter-fabric/galley


text:
Use variables for media query breakpoints

I like to set my own breakpoints rather than the standard 480/768/980px. It's much simpler to change these when responsive.less uses variables since they are mentioned in several places. For example:
@bkptPhone:           480px;
@bkptTablet:          768px;

And then:
// UP TO LANDSCAPE PHONE
@media (max-width: @bkptPhone) {
  ...
}

// PORTRAIT TABLET TO DEFAULT DESKTOP
@media (min-width: @bkptTablet) and (max-width: @bkptDesktop) {
  ...
}

Unfortunately while the actual values fo the breakpoints are easy to change, it's not as straightforward as we have all custom styles designed for those breakpoints. I definitely want to explore this potentially in the future, but for now I think it's better to leave them as is.

Fair enough, but I'm not sure I understand why it would hurt to use variables. I would leave them assigned to the same values (480/768/etc), so there would be no impact on developers unless they consciously chose to change the values (which means they'd understand what it could break).

authors: cpatik markdotto

repo: twitter/bootstrap


text:
change the length of  data in response

when i append data into response, i always cant get the result what i want.
and i read source find this
function async(suggestions) {
        suggestions = suggestions || [];

        // if the update has been canceled or if the query has changed
        // do not render the suggestions as they've become outdated
        if (!canceled && rendered < that.limit) {
          that.cancel = $.noop;
          rendered += suggestions.length;
          that._append(query, suggestions.slice(0, that.limit - rendered));

if suggestions.length = 5 and limit = 5 it will render nothing

This is a duplicate of #1240, should be closed.

authors: ckrad jarthod


text:
Overwrite instead of append mode for async results

It is useful to provide an alternate interpretation of sync vs. async results. The current implementation is "append" upon receiving async result, the proposed alternate is "overwrite" upon receiving async result. This gives the application full control over precisely how the sync results (the preliminary results) and the async results (the full results) are merged, especially but not just the sort order of the merge.
Assuming an overwrite option is added that defaults to false, the following shows possible code:
function async(suggestions) {
    suggestions = suggestions || [];
    if (!canceled && (rendered < that.limit || that.overwrite)) {
        that.cancel = $.noop;
        if (that.overwrite) {
            that._overwrite(query, suggestions.slice(0, that.limit));
        } else {
            that._append(query, suggestions.slice(0, that.limit - rendered));
        }
        that.async && that.trigger("asyncReceived", query);
    }
}

I was going for the same request, but my use case is to debounce search in a large dataset (or other expensive computation). My ideal scenario would be to return a cached result to sync callback, then do computation and return async when UI event clean up a bit. (Right now it is not possible because corrected call is appended to cache. Typical problem for me is holding backspace to delete )
If global option is not possible this would serve me well too:
function async(suggestions, overwrite) {}
with overwrite default to false.

authors: jasonkres jeancroy


text:
R cells show output even on variable assignment. Should they?

Python cells show output only when there's a print statement, or the last statement is a variable:
x = 2 # assing value
x # show value as cell output
R cells, though, seem to show cell output just on variable assignment.
x <- 2 # shows output
This is fine for small values, but problematic for large dataframes since their output takes so long to generate and show to screen.
For now, I just mask the output by assigning a variable and then including a dummy assignment statement, so it gets shown to screen instead of a large dataframe.
x <- my.large.dataframe
dummy <- ""

I see what you mean about the dataframe showing up, compared to what the native R console does.
We have had some trouble reproducing its behavior, and I would be happy to see a definitive rule
about what to show and when with R.  For me, the simpler case x <- 2 works correctly.
In the meantime you can suppress the output with just "" or 0 like this:
x <- my.large.dataframe
0

and save a few chars.

repo: twosigma/beaker-notebook


text:
src/handlers.rs: explicitly handle INVALIDATE, SHUTDOWN, GETFD*

In both cases, we want to no-op. The client doesn't expect any response from nscd, but let's at least log a debug message on why we're no-op'ing here, to distinguish from the operations that are not yet implemented.

I saw the GETFD* requests on the wire when working on reverse host lookups (while adding GETHOSTBYADDR*) support as part of https://github.com/twosigma/nsncd/issues/37.
@geofft @leifwalsh WDYT?

Seems reasonable to me

Hmm, not unreasonable but I'm curious about the motivation. I feel like I'd do it the other way around - all of these really should get no response but the rest of them are unimplemented and it might be worth noting if we get one.

I was mostly concerned about having a distinction in code if something has not been implemented yet, or if we consciously decided it's okay to return no data, and userspace can cope with it.

Should we (also? instead?) log the unimplemented requests? The enum derives Debug so we can just log the actual request value.

I think we already debug! the request in main.rs.

(Also now that I'm looking at this it occurs to me that LASTREQ isn't actually a valid protocol request. :) )

Can you elaborate? It's not something that ever happens to be sent out by the client, or it's something where we should always pretend to have not yet have had any previous request?

Btw, can these workflows be changed to not require approval? It'd be nice to immediately get feedback on the various GH action checks...

It's set to require approval for first time contributors, to prevent something like someone running a crypto miner using actions. Once we get you that CLA (#44) and merge some PRs from you you'll be good.

Is this good to go?

I feel like I'd do it the other way around - all of these really should get no response but the rest of them are unimplemented and it might be worth noting if we get one.
Should we (also? instead?) log the unimplemented requests? The enum derives Debug so we can just log the actual request value.

I like the gist of this: it clarifies which operations we'll never implement and makes it clear which remain to be implemented. We can log the unimplemented ones (at info? warn?) later.
I'm gonna merge this for now, we can tweak later (e.g. doing something with LASTREQ).

Codecov Report
Base: 30.04% // Head: 29.22% // Decreases project coverage by -0.82% :warning:

Coverage data is based on head (c6282ba) compared to base (e3de17c).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
- Coverage   30.04%   29.22%   -0.83%
==========================================
  Files           5        5
  Lines         213      219       +6
==========================================
  Hits           64       64
- Misses        149      155       +6

Impacted Files
Coverage Δ

src/handlers.rs
33.33% <0.00%> (-2.23%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

authors: codecov-commenter flokli leifwalsh

repo: twosigma/nsncd


text:
Added Image Picking Functionality

No breaking changes in API
Removed sampleData (didn't required it anymore)

Hello! Thank you for this. What happens if someone doesn't have a QR code in their simulator photo library?

I think sample data should be there and we can provide a button to mock the scan or pick from the gallery.

Well, if you could please provide a solution that preserves backward compatibility that would be great. This library is used in my videos (see https://www.hackingwithswift.com/books/ios-swiftui/scanning-qr-codes-with-swiftui), so I want to make sure folks can continue using it without having to have a QR code in their library.

I had updated the codebase with backward compatibility with sampleData users can optionally provide sample data.
If they provide the samapleData they will be shown with an extra button "Mock scan with sample data", otherwise only with pick image from the gallery button.

Well, if you could please provide a solution that preserves backward compatibility that would be great. This library is used in my videos (see https://www.hackingwithswift.com/books/ios-swiftui/scanning-qr-codes-with-swiftui), so I want to make sure folks can continue using it without having to have a QR code in their library.

I am also learning from your content thanks for putting the vast contents for us.

Thank you!

authors: DominatorVbN twostraws

repo: twostraws/CodeScanner


text:
Correct module name.

As mentioned in issue #115 this is due to an oversight in pull request #112 my apologies.

Thank you!

authors: nashysolutions twostraws

repo: twostraws/ControlRoom


text:
Shaders with DaVincing & Chisel2

When I try to work with a chisel on block from Chiesl2.
http://pastebin.com/HNFhsqDe
DaVincing-1710.1.5
Chisel2-2.3.5.31
ShadersModCore-v2.3.28-mc1.7.10-f

This issue is caused by the Shaders Mod.

Workaround in place with 1710.1.8

authors: Meowt twothe

repo: twothe/DaVincing


text:
nearest point

Is there a method exposed to get the nearest point on a linestring to a given point?

https://pkg.go.dev/github.com/twpayne/go-geos#Geom.NearestPoints
You can find this by searching for "nearest" in the documentation. Please do this in the future.

authors: alienatorZ twpayne

repo: twpayne/go-geos


text:
[Breaking change] Fix calling Records::encode / Records::decode with None

Calling encode or decode with the correct compression automatically chosen is very difficult. Providing None results in an error like this:
 1  error[E0283]: type annotations needed
    --> kafka-fetch-rewrite/src/lib.rs:87:88
     |
 87  | ...                   RecordBatchDecoder::decode(&mut records_bytes.clone(), None)
     |                       --------------------------                             ^^^^ cannot infer type of the type parameter `T` declared on the enum `Option`
     |                       |
     |                       required by a bound introduced by this call
     |
     = note: multiple `impl`s satisfying `for<'a> _: Fn(&'a mut bytes::Bytes, kafka_protocol::records::Compression)` found in the following crates: `alloc`, `core`:
             - impl<A, F> std::ops::Fn<A> for &F
               where A: std::marker::Tuple, F: std::ops::Fn<A>, F: ?Sized;
             - impl<Args, F, A> std::ops::Fn<Args> for std::boxed::Box<F, A>
               where Args: std::marker::Tuple, F: std::ops::Fn<Args>, A: std::alloc::Allocator, F: ?Sized;
 note: required by a bound in `kafka_protocol::records::RecordBatchDecoder::decode`
    --> /home/rukai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kafka-protocol-0.13.0/src/records.rs:495:12
     |
 493 |     pub fn decode<B: ByteBuf, F>(buf: &mut B, decompressor: Option<F>) -> Result<Vec<Record>>
     |            ------ required by a bound in this associated function
 494 |     where
 495 |         F: Fn(&mut bytes::Bytes, Compression) -> Result<B>,
     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RecordBatchDecoder::decode`
 help: consider specifying the generic argument
     |
 87  |                                 RecordBatchDecoder::decode(&mut records_bytes.clone(), None::<T>)
     |                                                                                +++++

For which the fix is to change the None to None::<fn(&mut bytes::Bytes, Compression) -> Result<Bytes>>.
This is a pretty poor experience.
To fix this I am making decode/encode provide the correct None value, and have the original implementation moved to decode_with_custom_compression/encode_with_custom_compression.
@pdeva heads up that you will want to adjust your project to call decode_with_custom_compression instead of decode.

It's not just a poor experience, without anyhow you can't even match the signature.

@tychedelia This PR is a very clear improvement to usability so I'll merge it tomorrow unless I hear back otherwise.

authors: davide-baldo rukai

repo: tychedelia/kafka-protocol-rs


text:
Wiki Instruction contains file name without extension in regression training

In wiki instruction for regression training sample.csv contains filenames without extension
wiki instruction in regression
but in https://github.com/tyiannak/pyAudioAnalysis/blob/master/audioTrainTest.py
In this function
def featureAndTrainRegression(dirName, mtWin, mtStep, stWin, stStep, modelType, modelName,computeBEAT=False):
you are using preparing file list with extension(.wav). at line 407 fileNames = [ntpath.basename(f) for f in fileNames[0]]
So the code at line 423,if row[0] in fileNames:  is not satisfying.
So while running program its throwing error given below
    numOfFeatures = featuresFinal[0].shape[1]
IndexError: tuple index out of range

Either instruction or instruction needs to be changed

I was getting this error, and no longer removing the extension fixed it.

repo: tyiannak/pyAudioAnalysis


text:
【asset目录找不到文件】java.lang.RuntimeException: Font asset not found

09-20 23:25:58.605 19658-19658/cn.demo.package.demo E/AndroidRuntime: FATAL EXCEPTION: main
Process: cn.demo.package.demo, PID: 19658
java.lang.RuntimeException: Unable to create application fastdex.runtime.FastdexApplication: java.lang.RuntimeException: Font asset not found fonts/DINCondensedBold.ttf
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5451)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1564)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6186)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Caused by: java.lang.RuntimeException: Font asset not found fonts/DINCondensedBold.ttf
at android.graphics.Typeface.createFromAsset(Typeface.java:206)
at cn.demo.package.utils.AppFont.init(AppFont.java:56)
at cn.demo.package.core.AppGlobal.initAppGlobal(AppGlobal.java:149)
at com.zztzt.android.simple.app.MainApplication.onCreate(MainApplication.java:137)
at fastdex.runtime.FastdexApplication.onCreate(FastdexApplication.java:138)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1025)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5448)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1564)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6186)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

    Typeface typeface = Typeface.createFromAsset(context.getAssets(), "fonts/DINCondensedBold.ttf");

但是 run fastdex 运行两次之后就能正常启动

还有一个报错：
java.lang.RuntimeException: 修改了抽象类导致的错误,Fastdex已经为你自动恢复状态，重新执行一次fastdexDEVDebug任务就可以解决这个问题了
这个是什么意思？重新运行一下就好了吗？

在运行一次会触发一次安装就好了，里面用到了qq空间的那个热修复的技术，这个在art下修改抽象类会报这个问题的，5.0以前的设备不会报这个问题

你之前说的找不到assets内容的问题，如果在发现可以看下/data/data/包名/fastdex/patch/res/resources.apk  里面有没有对应的资源

@ycdm 问题解决了，换成0.8.4


text:
Update fs2-io to 3.1.3

Updates co.fs2:fs2-io from 3.1.2 to 3.1.3.
GitHub Release Notes - Changelog - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "co.fs2", artifactId = "fs2-io" } ]

labels: library-update, semver-patch

Scala steward set up completed successfully.

authors: scala-steward vasilmkd

repo: typelevel/jdk-index


text:
blind-cvpr:0.5.0

I am submitting

[x] a new package
[ ] an update for a package

Description: Template for one of the largest conferences on computer vision (CV) (see details in upstream https://github.com/daskol/typst-templates/pull/9 and https://github.com/daskol/typst-templates/pull/21).
I have read and followed the submission guidelines and, in particular, I

[x] selected a name that isn't the most obvious or canonical name for what the package does
[x] added a typst.toml file with all required keys
[x] added a README.md with documentation for my package
[x] have chosen a license and added a LICENSE file or linked one in my README.md
[x] tested my package locally on my system and it worked
[x] excluded PDFs or README images, if any, but not the LICENSE
[x] ensured that my package is licensed such that users can use and distribute the contents of its template directory without restriction, after modifying them through normal use.

This looks great! Also, nice name. :)

Happy that someone noticed that! :grinning:

authors: daskol laurmaedje

repo: typst/packages


text:
Should calc.pow(0, 0) return NaN?

Description
According to the NaN wikipedia article, 0^0 can return NaN but typst raises an error instead:
// Or calc.pow(0.0, 0.0)
#calc.pow(0, 0)
//Error: zero to the power of zero is undefined

Isn't NaN the definition of an undefined number and would thus be an acceptable return value?
Side note: Is there any way to get NaN or inf as a variable other than storing the result of an invalid float calculation?
Reproduction URL
No response
Operating system
No response
Typst version

[X] I am using the latest version of Typst

Typst generally tries to limit NaN and ±Inf for floats.
They can be confusing when debugging code and while they may have a place in other applications, I don't think typesetting is one of them.

I can see the argument for integer args, but what about #capc.pow(0.0, 0.0)? Currently It raises the same error
I would also think consistency with all other NaN specifications is less astonishing than confirming to a subset, but to your point I come from a programming background rather than typesetting

In general-purpose programming languages, $0^0$ is typically $1$. Would it be better if it returns 1?

It makes most sense IMO to have calc.pow(x, 0) = x, and calc.pow(0 or 0.0, any float) be an error / NaN, especially if we get a nth root parameter to sqrt as suggested in #2522 (to still allow rational powers of zero)

I've never seen $x^y$ for real numbers defined as $e^{y \ln x}`—certainly, it's often a useful transformation, but I've never seen it as a definition and it seems like a useless definition because it doesn't answer how to define $e^y$ to begin with for real number $x$.
Additionally, as $x^y$ for negative $x$ is well-defined as a complex number or when $y$ happens to be an integer, though admittedly it is not defined in the real numbers for other values.
I see absolutely no reason why it would make sense to say that calc.pow(0, X) should be an error, this is a perfectly well-defined operation which evaluates to $0$ for any choice of X which is not 0.
Throwing an error on calc.pow(0, 0) seems reasonable; while saying that it's NaN would not be theoretically unreasonable, I think that silent NaNs in general are often a bad idea. Checking that the arguments are not 0 before doing it is easier and less confusing than checking if the output is NaN after doing it (since, for example, NaN == NaN is false, at least in the floating point standard (I dunno how Typst handles this)), especially because it could be NaN afterwards from the inputs being NaN rather than from the arguments being 0.

Also, returning NaN or 1 is so much better than throwing an error. Imagine you want to plot something and write some simple codes to generate a set of data, but for the range of values there is a point where you need to calculate 0^0. Then your program suddenly breaks, and then you have to add an "if" statement to treat it specially.
For the same reasons, we should be thankful that 0.0**0.0==1.0 in NumPy. Otherwise, it would be so easy to trigger an error by 0^0 when doing vectorized operation.

You've never seen does not mean the definition is wrong. Exponential and logarithm are defined in terms of power series and inverse function, and then the power between two complex numbers is defined as $x^y:=e^{y\ln x}$. You can see this definition on Wikipedia.

The definition you linked is literally a definition for complex exponentiation. Granted, the wikipedia page you linked does also include using that definition for real numbers, but the fact remains that it is certainly not the standard definition of exponentiation.

I included this example does not imply any relation between typst and NumPy, but just to provide a perspective on why throwing error on a calc call is bad.

I'll be honest, silently ignoring NaNs when plotting or really doing anything else has never made my life better. NaNs make sense implementation-wise because we want floating point arithmetic to occur directly in the CPU on dedicated hardware and hardware exceptions are worth avoid. That doesn't mean having silent NaN propagation is good language design, and in a language which has a concept of errors and no particular care for extreme performance, they should probably be avoided.
Defining $0^0 = 1$ is a potentially reasonable choice, though, as it is indeed commonly done in other programming languages and consistent with many mathematical definitions.

0^0 is undefined, let us define it
0^0:=1.
There, it is now defined. let's implement it.

authors: Kreijstal SabrinaJewson UlyssesZh frozolotl ntjess yaksher

repo: typst/typst


text:
Mis-indented first outline entry in the default IEEE template

Description
When using #outline() to create an index for a document using the default IEEE template, the first outline entry is not indented correctly.

Here, the first outline is created with #outline(indent: false) and the second with #outline(indent: true)
Reproduction URL
https://typst.app/project/rSHTfH6hRDVZx6I9vXQMON
Operating system
Web app, macOS
Typst version

[X] I am using the latest version of Typst

Hello, outline(indent: true / false) are deprecated in favor of outline(indent: auto / none). Outline with automatic indent uses the numbering to determine the indentation, which can cause those problems. Can you try to specify a fixed indent instead, e.g. with outline(indent: 2em)?

This screenshot is rendered using -
#outline(indent: auto)

= Introduction
Scientific writing is a crucial part of the research process, allowing researchers to share their findings with the wider scientific community. However, the process of typesetting scientific documents can often be a frustrating and time-consuming affair, particularly when using outdated tools such as LaTeX. Despite being over 30 years old, it remains a popular choice for scientific writing due to its power and flexibility. However, it also comes with a steep learning curve, complex syntax, and long compile times, leading to frustration and despair for many researchers. @netwok2020

#outline(indent: 2em)

I expected Introduction and Method entries to be indented equally.

Thanks for the input. I've identified in the template that it seems that #set par(..., first-line-indent: 1em) is set. Can you try moving that option to your document, after the outline is placed?
I believe the problem here is that such option - perhaps a bit inadvertently - affects outline.

Thanks, this fixes it. I will close this issue and open one in the templates repository in some time.

authors: DhruvDh PgBiel


text:
Improve confusing error message: missing argument

Description
Trying to use named arguments when positional arguments are expected leads to confusing error messages.
Example
I want to take a slice of an array. I look at the documentation for array.slice and find it takes the arguments start and end. I tend to use named arguments, so I write:
successes = successes.slice(start: 0, end: 2)                                                                                !

I get the following error message:

My confusion is immense. It says Missing argument: start and underlines the exact point where I specified an argument of that very name.
what I did wrong
The solution is to not use named arguments but positional arguments, as the function expects.
successes = successes.slice(0, 2)                                                                                !

The fact that these arguments are positional is in the documentation, but easy to miss.
What typst could do better here
The main problem here is that the error message is not helpful.
It should be something like:

Missed positional arguments (at least 2 were expected)

or even better:

Missed positional argument start
help: There is a named argument of that name, but the function expects a positional argument for name)

Use Case
Confusing error messages are frustrating, especially for non-programmers.

Yes, this error message is pretty horrible! We should definitely fix it.

I think this was already fixed by https://github.com/typst/typst/commit/2007f30b1137eec20678e3e9cd96788dc6c1b222 and the commit is part of 0.10.0. I can confirm with
#let numbers = (1,2,3)
#numbers.slice(start: 0, end: 2)

$ typst --version
typst 0.10.0 (70ca0d25)
$ typst compile test.typ
error: the argument `start` is positional
  ┌─ test.typ:2:15
  │
2 │ #numbers.slice(start: 0, end: 2)
  │                ^^^^^^^^
  │
  = hint: try removing `start:`

Oh, it was even me who implemented it! My memory is getting worse by the day...

Awesome, thanks.

authors: Kaligule Leedehai laurmaedje


text:
Moving calc functions to methods where possible

This issue intends to track the progress of migrating calc functions to methods in int and float, as well as other types.
The main reasons behind this effort are to improve organization of those functions - e.g. calc.binom is specific to ints, so it would make sense to invoke it as int.binom instead, much like other operations we have today like sign and bitwise operations -, but also to allow for new, more concise - but optional - syntax (e.g. 5.rem(40) is equivalent to int.rem(5, 40)).
PR #3489 started this effort, in a very general way, attempting to migrate all calc functions to methods.
After several rounds of discussion over Discord, it currently seems wiser to avoid doing that for the moment. In an initial phase, we should consider just migrating methods which unambiguously belong to either int or float, such as int.binom or float.sin. Later on, we could decide how to deal with methods which work with a diversity of types (namely min, max and abs) as well as methods which have differing behavior for ints and floats (such as pow). They could stay in calc as needed, or in more than one place at once; that'd require further discussion.

Based on all the discussion on Discord and the number of voices against it, I'll close this.

authors: PgBiel laurmaedje


text:
it doesn't work

Environment
Windows10 wsl(Ubuntu 20.04)
nvim 0.5

configuration
lua <<EOF

  -- nvim-cmp setup
  local cmp = require 'cmp'
  cmp.setup {
    snippet = {
      expand = function(args)
        -- You must install `vim-vsnip` if you use the following as-is.
        vim.fn['vsnip#anonymous'](args.body)
      end,
    },
    mapping = {
      ['<C-p>'] = cmp.mapping.select_prev_item(),
      ['<C-n>'] = cmp.mapping.select_next_item(),
      ['<C-d>'] = cmp.mapping.scroll_docs(-4),
      ['<C-f>'] = cmp.mapping.scroll_docs(4),
      ['<C-Space>'] = cmp.mapping.complete(),
      ['<C-e>'] = cmp.mapping.close(),
    },
    sources = {
      { name = 'cmp_tabnine' },
      { name = 'nvim_lsp' },
      { name = 'buffer' },
    },
  }

  -- auto pairs
  require('nvim-autopairs').setup{}
  require("nvim-autopairs.completion.cmp").setup({
    map_cr = true, --map <CR> on insert mode
    map_complete = true, --it will auto insert `(` after select function or method item
  })

  -- tabnine
  local tabnine = require('cmp_tabnine.config')
  tabnine:setup({
    max_lines = 1000;
    max_num_results = 20;
    sort = true;
  })

  -- nvim lsp config
  local nvim_lsp = require('lspconfig')
  -- Use an on_attach function to only map the following keys
  -- after the language server attaches to the current buffer
  local on_attach = function(client, bufnr)
    local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
    local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end

    -- Enable completion triggered by <c-x><c-o>
    buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')

    -- Mappings.
    local opts = { noremap=true, silent=true }

    -- See `:help vim.lsp.*` for documentation on any of the below functions
    buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
    buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
    buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
    buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
    buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
    buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
    --buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
    --buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
    buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
    buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
    buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
    buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
    buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
    buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
    buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
    buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
    buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
  end

  -- Add additional capabilities supported by nvim-cmp
  local capabilities = vim.lsp.protocol.make_client_capabilities()
  capabilities.textDocument.completion.completionItem.snippetSupport = true
  capabilities.textDocument.completion.completionItem.preselectSupport = true
  capabilities.textDocument.completion.completionItem.insertReplaceSupport = true
  capabilities.textDocument.completion.completionItem.labelDetailsSupport = true
  capabilities.textDocument.completion.completionItem.deprecatedSupport = true
  capabilities.textDocument.completion.completionItem.commitCharactersSupport = true
  capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } }
  capabilities.textDocument.completion.completionItem.resolveSupport = {
    properties = {
      'documentation',
      'detail',
      'additionalTextEdits',
    },
  }

  -- lsp install
  require'lspinstall'.setup() -- important
  local servers = require'lspinstall'.installed_servers()
  for _, server in pairs(servers) do
    nvim_lsp[server].setup{
      on_attach = on_attach,
      flags = {
        debounce_text_changes = 150,
      },
      capabilities = capabilities,
    }
  end

EOF

Result
Tabnine doesn't work

Tabnine binaries can be downloaded normally. But it  dont's also work.

The problem with TabNine is that it expects a very specific directory layout, as TabNine auto updates itself.
Allowing users to supply their own path would probably netage the auto update and end up with TabNine trying endlessly to update itself (been there).
To further try and unserstand why it is not working in your setup, lets try the following:

check if the TabNine binary is there
after opening nvim, check if there is a TabNine process: ps -aef | grep -i TabNine
add the following to you cmp config:

formatting = {
  format = function(entry, vim_item)
    -- set a name for each source
    vim_item.menu = ({
      buffer = "[Buffer]",
      nvim_lsp = "[LSP]",
      cmp_tabnine = "[T9]",
    })[entry.source.name]
    return vim_item
  end,
},

```  and see if you get `[T9]` in the completion menu

b.t.w, if you run the TabNine binary by hand does it work?

@tzachar Yeah. it work.

Well, I got a windows machine, installed wsl ubuntu 20.04, and everything works for me out of the box:

here is my config, try and see if it works: https://github.com/tzachar/conf/blob/master/.config/nvim/lua/cmp_setup.lua

The problem with TabNine is that it expects a very specific directory layout, as TabNine auto updates itself.
Allowing users to supply their own path would probably netage the auto update and end up with TabNine trying endlessly to update itself (been there).

I've been thinking about how to package this for Nixpkgs, since builds don't have internet connection during buildPhase, so the install.sh script won't work, also I couldn't get to this point yet, but if the tabnine binary modifies itself in the directory it would fail due to the /nix/store directory being readonly. Is it possible to provide a different location for the tabnine folder? Such as XDG_DATA_HOME?

The problem with TabNine is that it expects a very specific directory layout, as TabNine auto updates itself.
Allowing users to supply their own path would probably netage the auto update and end up with TabNine trying endlessly to update itself (been there).

I've been thinking about how to package this for Nixpkgs, since builds don't have internet connection during buildPhase, so the install.sh script won't work, also I couldn't get to this point yet, but if the tabnine binary modifies itself in the directory it would fail due to the /nix/store directory being readonly. Is it possible to provide a different location for the tabnine folder? Such as XDG_DATA_HOME?

These are two separate issues:

you need to install the plugin while there is no network connectivity
tabnine modifies itself during runtime.

I'll start with (2). You can't get past this, as the tabnine process downloads a model from the net when it is executed for the first time. without this model, tabnine will not work.
You can solve both (1) and (2) with the same approach; instead of going through the normal install process, 'freeze' a working version of the binaries and use them, making use of the same directory structure the plugin creates. You would also have to copy the ~/.config/TabNine and ~/.local/share/TabNine folders, as they are. This should then help you solve both issues.
As for TabNine trying to update itself, there's not much I can help, this is something you need to take with the TabNine team. Maybe there is a configuration option to disable it.

It works

What was the problem in the end?

I don't known.  I updated the code. 9da5a5f. it work.

authors: arcticlimer paulzhang5511 tzachar

repo: tzachar/cmp-tabnine


text:
Another uncaught error causing node-red crash

input on virtual write
26 Oct 16:23:18 - [red] Uncaught Exception:
26 Oct 16:23:18 - Error: write EPIPE
at exports._errnoException (util.js:746:11)
at WriteWrap.afterWrite (net.js:775:14)

hi, could you give me a sample node red flow(minimum viable to reproduce) and let me know what value you are sending?
cheers

Sorry not possible had about 30 nodes working at the time it crashed, restarted and it's been fine since, so no idea whitch caused the error, in reality I am only sending 0 1 and some sensor values nothing special, but thought I would add here to inform another uncaught error code.

authors: Toshibass tzapu

repo: tzapu/node-red-contrib-blynk


text:
🛑 InfluxDB is down

In 1889278, InfluxDB (https://influx.uvvu.pw) was down:

HTTP code: 0
Response time: 0 ms

Resolved: InfluxDB is back up in 6e50456.

repo: u-v-v-u/status