text:
Many compilation errors (debian 8.0)

src/dotprod/src/dotprod_cccf.mmx.c: In function ‘dotprod_cccf_execute_mmx’: src/dotprod/src/dotprod_cccf.mmx.c:225:12: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi]      __m128 sum = _mm_setzero_ps(); // load zeros into sum register             ^ In file included from src/dotprod/src/dotprod_cccf.mmx.c:41:0: /usr/lib/gcc/i586-linux-gnu/4.9/include/xmmintrin.h:115:1: error: inlining failed in call to always_inline ‘_mm_setzero_ps’: target specific option mismatch  _mm_setzero_ps (void)  ^ src/dotprod/src/dotprod_cccf.mmx.c:225:12: error: called from here      __m128 sum = _mm_setzero_ps(); // load zeros into sum register             ^ In file included from src/dotprod/src/dotprod_cccf.mmx.c:41:0: /usr/lib/gcc/i586-linux-gnu/4.9/include/xmmintrin.h:929:1: error: inlining failed in call to always_inline ‘_mm_loadu_ps’: target specific option mismatch  _mm_loadu_ps (float const *__P)  ^ src/dotprod/src/dotprod_cccf.mmx.c:240:11: error: called from here          v = _mm_loadu_ps(&x[i]);            ^ In file included from src/dotprod/src/dotprod_cccf.mmx.c:41:0: /usr/lib/gcc/i586-linux-gnu/4.9/include/xmmintrin.h:922:1: error: inlining failed in call to always_inline ‘_mm_load_ps’: target specific option mismatch  _mm_load_ps (float const *__P)  ^ src/dotprod/src/dotprod_cccf.mmx.c:243:12: error: called from here          hi = _mm_load_ps(&_q->hi[i]);             ^ In file included from src/dotprod/src/dotprod_cccf.mmx.c:41:0: /usr/lib/gcc/i586-linux-gnu/4.9/include/xmmintrin.h:922:1: error: inlining failed in call to always_inline ‘_mm_load_ps’: target specific option mismatch  _mm_load_ps (float const *__P)  ^ src/dotprod/src/dotprod_cccf.mmx.c:244:12: error: called from here          hq = _mm_load_ps(&_q->hq[i]);             ^ In file included from src/dotprod/src/dotprod_cccf.mmx.c:41:0: /usr/lib/gcc/i586-linux-gnu/4.9/include/xmmintrin.h:193:1: error: inlining failed in call to always_inline ‘_mm_mul_ps’: target specific option mismatch  _mm_mul_ps (__m128 __A, __m128 __B)  ^ src/dotprod/src/dotprod_cccf.mmx.c:247:12: error: called from here          ci = _mm_mul_ps(v, hi);             ^ In file included from src/dotprod/src/dotprod_cccf.mmx.c:41:0: /usr/lib/gcc/i586-linux-gnu/4.9/include/xmmintrin.h:193:1: error: inlining failed in call to always_inline ‘_mm_mul_ps’: target specific option mismatch  _mm_mul_ps (__m128 __A, __m128 __B)  ^ src/dotprod/src/dotprod_cccf.mmx.c:248:12: error: called from here          cq = _mm_mul_ps(v, hq);             ^ In file included from src/dotprod/src/dotprod_cccf.mmx.c:41:0: /usr/lib/gcc/i586-linux-gnu/4.9/include/xmmintrin.h:741:1: error: inlining failed in call to always_inline ‘_mm_shuffle_ps’: target specific option mismatch  _mm_shuffle_ps (__m128 __A, __m128 __B, int const __mask)  ^ src/dotprod/src/dotprod_cccf.mmx.c:251:12: error: called from here          cq = _mm_shuffle_ps( cq, cq, _MM_SHUFFLE(2,3,0,1) );             ^ In file included from src/dotprod/src/dotprod_cccf.mmx.c:49:0: /usr/lib/gcc/i586-linux-gnu/4.9/include/pmmintrin.h:50:1: error: inlining failed in call to always_inline ‘_mm_addsub_ps’: target specific option mismatch  _mm_addsub_ps (__m128 __X, __m128 __Y)  ^ src/dotprod/src/dotprod_cccf.mmx.c:255:11: error: called from here          s = _mm_addsub_ps( ci, cq );            ^ In file included from src/dotprod/src/dotprod_cccf.mmx.c:41:0: /usr/lib/gcc/i586-linux-gnu/4.9/include/xmmintrin.h:181:1: error: inlining failed in call to always_inline ‘_mm_add_ps’: target specific option mismatch  _mm_add_ps (__m128 __A, __m128 __B)  ^ src/dotprod/src/dotprod_cccf.mmx.c:258:13: error: called from here          sum = _mm_add_ps(sum, s);              ^ In file included from src/dotprod/src/dotprod_cccf.mmx.c:41:0: /usr/lib/gcc/i586-linux-gnu/4.9/include/xmmintrin.h:971:1: error: inlining failed in call to always_inline ‘_mm_store_ps’: target specific option mismatch  _mm_store_ps (float *__P, __m128 __A)  ^ src/dotprod/src/dotprod_cccf.mmx.c:276:5: error: called from here      _mm_store_ps(w, sum);

Hi @btrsdr
Try the solution to https://github.com/jgaeddert/liquid-dsp/issues/67 https://github.com/jgaeddert/liquid-dsp/issues/66 or https://github.com/jgaeddert/liquid-dsp/issues/47 and see if that helps

Thanks for help!

authors: brian-armstrong btrsdr

repo: jgaeddert/liquid-dsp


text:
iirdes: fix number of zeroes in the docs

The number of analog zeros that this function outputs is 2*L; fix the documentation to match that.

Hmm the coverage check appears to be flaky, showing a change in a line of code that wasn't actually impacted in any way (indeed this commit here is a one line comment-only change).

I think what happened was that I had made a commit between when you forked/committed and this merge that dropped the coverage down by a couple of lines. And that made the merge itself drop some lines. But it's really not a big deal. I'm just trying to avoid merging in massive changes that aren't properly checked. It's a bit annoying that codecov throws such a fuss over minor changes like this. I'm sure there's a setting somewhere to change this, but I can't be bothered to look it up 🤣

source: gharchive/pull-request

authors: jgaeddert rstarkov

license: mit

license_type: permissive

license_source: bigquery


text:
Improve Connection.override_return_types macro and usage

As mentioned in https://github.com/mosquito-cr/mosquito/pull/98#issuecomment-1264511990, there are some commands' return types missing from the override_return_types macro.
Additionally, it may be worth looking into refactoring this macro so it doesn't also end up needing to be called in Cluster.

Added c77f7aa that moves the override_return_types macros into a single call that Client, Connection, and Cluster all share.

Fixed in 83973cb. That commit doesn't implement all of those commands, but it does set the return types for when they are implemented.

Out of curiosity: what's the purpose of that macro? Why not define the return type on each method?

Client, Connection, and Cluster can do this because they return the values immediately, but Pipeline and Transaction return them only once the pipeline/transaction is complete. They all include the same mixin so that the methods only need to be defined once.
I'm not sure if that's the best way to do it, but it was the only way that I could come up with.

Would putting that in a module work?

I'm not sure I understand. The Commands mixin is where all of the concrete types get the command methods from. Do you mean another module that overrides the return types for the classes that return immediate values?

Oh, sorry, I guess I didn't take a lot of time to look at the entire source code.
I'm just thinking "How could this be done in another language that doesn't have macros?" and I'm sure that's possible. Macros should be avoided if possible.
Then...
I tried removing that macro and casting the types when needed. Here's the diff:
diff --git a/src/client.cr b/src/client.cr
index 5b3b668..f4cbd05 100644
--- a/src/client.cr
+++ b/src/client.cr
@@ -50,8 +50,6 @@ module Redis
       end
     end

-    Connection.set_return_types!
-
     # All Redis commands invoked on the client check out a connection from the
     # connection pool, invoke the command on that connection, and then check the
     # connection back into the pool.
diff --git a/src/cluster.cr b/src/cluster.cr
index b7d7fb2..34333d7 100644
--- a/src/cluster.cr
+++ b/src/cluster.cr
@@ -297,8 +297,6 @@ module Redis
       end
     end

-    Connection.set_return_types!
-
     # Close all connections to this Redis cluster
     def close
       @write_pools.each do |(_, pool)|
diff --git a/src/commands.cr b/src/commands.cr
index 848d071..0a2708e 100644
--- a/src/commands.cr
+++ b/src/commands.cr
@@ -36,8 +36,8 @@ module Redis
     # redis.keys("f*") # => ["foo"]
     # redis.keys("b*") # => ["bar", "baz"]
     # ```
-    def keys(pattern = "*")
-      run({"keys", pattern})
+    def keys(pattern = "*") : Array
+      run({"keys", pattern}).as(Array)
     end

     # Set a given key to a given value, optionally specifying time-to-live (TTL).
@@ -220,8 +220,8 @@ module Redis
       run({"ttl", key})
     end

-    def pttl(key : String)
-      run({"pttl", key})
+    def pttl(key : String) : Int64
+      run({"pttl", key}).as(Int64)
     end

     def type(key : String)
diff --git a/src/commands/set.cr b/src/commands/set.cr
index e6c9b1b..0026611 100644
--- a/src/commands/set.cr
+++ b/src/commands/set.cr
@@ -7,8 +7,8 @@ module Redis::Commands::Set
     run({"sismember", key, value})
   end

-  def smembers(key : String)
-    run({"smembers", key})
+  def smembers(key : String) : Array
+    run({"smembers", key}).as(Array)
   end

   def srem(key : String, *values : String)
diff --git a/src/commands/stream.cr b/src/commands/stream.cr
index 40cc999..47317e2 100644
--- a/src/commands/stream.cr
+++ b/src/commands/stream.cr
@@ -81,19 +81,19 @@ module Redis::Commands::Stream
   end

   # Return the number of entries in the given stream
-  def xlen(key : String)
-    run({"xlen", key})
+  def xlen(key : String) : Int64
+    run({"xlen", key}).as(Int64)
   end

   # Return the entries in the given stream between the `start` and `end` ids.
   # If `count` is provided, Redis will return only that number of entries.
-  def xrange(key : String, start min, end max, count = nil)
+  def xrange(key : String, start min, end max, count = nil) : Array
     command = {"xrange", key, min, max}
     if count
       command += {"count", count}
     end

-    run command
+    run(command).as(Array)
   end

   def xgroup_create(key : String, groupname : String, *, id : String = "$", mkstream = false)
diff --git a/src/connection.cr b/src/connection.cr
index eeacb28..ffd8bb3 100644
--- a/src/connection.cr
+++ b/src/connection.cr
@@ -211,129 +211,6 @@ module Redis
       run({"readonly"})
     end

-    # :nodoc:
-    macro override_return_types(methods)
-      {% for method, return_type in methods %}
-        # :nodoc:
-        def {{method.id}}(*args, **kwargs) : {{return_type}}
-          super(*args, **kwargs){{".as(#{return_type})".id unless return_type.stringify == "Nil"}}
-        end
-      {% end %}
-    end
-
-    macro set_return_types!
-      # When new commands are added to the Commands mixin, add an entry here to
-      # make sure the return type is set when run directly on the connection.
-      ::Redis::Connection.override_return_types({
-        keys:   Array,
-        del:    Int64,
-        unlink: Int64,
-        ttl:    Int64,
-        pttl:   Int64,
-
-        # String commands
-        append:      Int64,
-        decr:        Int64,
-        decrby:      Int64,
-        get:         String?,
-        getdel:      String?,
-        getex:       String?,
-        getrange:    String,
-        getset:      String?,
-        incr:        Int64,
-        incrby:      Int64,
-        incrbyfloat: String,
-        mget:        Array,
-        mset:        String,
-        msetnx:      Int64,
-        psetex:      String,
-        set:         String?,
-        setex:       String,
-        setnx:       Int64,
-        setrange:    Int64,
-        strlen:      Int64,
-        substr:      String,
-
-        # List commands
-        blmove:     String?,
-        blmpop:     Array(Value)?,
-        blpop:      Array(Value)?,
-        brpop:      Array(Value)?,
-        brpoplpush: String?,
-        lindex:     String?,
-        linsert:    Int64?,
-        llen:       Int64,
-        lmove:      String?,
-        lmpop:      Array(Value)?,
-        lpop:       String | Array(Value) | Nil,
-        lpos:       Int64 | Array(Value) | Nil,
-        lpush:      Int64,
-        lpushx:     Int64,
-        lrange:     Array,
-        lrem:       Int64,
-        lset:       String,
-        ltrim:      String,
-        rpop:       String?,
-        rpoplpush:  String?,
-        rpush:      Int64,
-        rpushx:     Int64,
-
-        # Hash commands
-        hdel:         Int64,
-        hexists:      Int64,
-        hget:         String?,
-        hgetall:      Array,
-        hincrby:      Int64,
-        hincrbyfloat: String,
-        hkeys:        Array,
-        hlen:         Int64,
-        hmget:        Array,
-        hmset:        String,
-        hrandfield:   String | Array(Value),
-        hscan:        Array,
-        hset:         Int64,
-        hsetnx:       Int64,
-        hstrlen:      Int64,
-        hvals:        Array,
-
-        # Sets
-        sadd:        Int64,
-        scard:       Int64,
-        sdiff:       Array,
-        sdiffstore:  Int64,
-        sinter:      Array,
-        sintercard:  Int64,
-        sinterstore: Int64,
-        sismember:   Int64,
-        smembers:    Array,
-        smismember:  Array,
-        smove:       Int64,
-        spop:        String | Array(Value) | Nil,
-        srandmember: String | Array(Value) | Nil,
-        srem:        Int64,
-        sscan:       Array,
-        sunion:      Array,
-        sunionstore: Int64,
-
-        # Streams
-        xack:       Int64,
-        xadd:       String?,
-        xautoclaim: Array,
-        xclaim:     Array,
-        xdel:       Int64,
-        xgroup:     String | Int64,
-        xinfo:      Array,
-        xlen:       Int64,
-        xpending:   Array,
-        xrange:     Array,
-        xreadgroup: Array(Value)?,
-        xrevrange:  Array,
-        xtrim:      Int64,
-      })
-    end
-
-    set_return_types!
-
     # Execute the given command and return the result from the server. Commands must be an `Enumerable`.
     #
     # ```

All specs pass for me, and that entire macro is gone. Am I missing something?
(actually, not all specs pass for me: the ones for json and ts fail because I don't know how to enable those features locally)

All specs pass for me, and that entire macro is gone. Am I missing something?

I don't think it's you that's missing anything, I think my tests are, though. 🙂 They're mostly checking result.should eq expected, so they'll pass even if compile-time types aren't scoped down.

(actually, not all specs pass for me: the ones for json and ts fail because I don't know how to enable those features locally)

This is a frustrating thing for other folks that I should fix. Only 2 other people I know of besides me are using those Redis server modules, so those specs probably shouldn't run by default.

source: gharchive/issue

authors: asterite jgaskins

repo: jgaskins/redis

license: MIT

license_source: github-api


text:
Cpp17

Switch to C++ 17 standard.
Simplify cmake file by moving dep install to script.

Pull Request Test Coverage Report for Build 228

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-68.0%) to 0.0%

Totals

Change from base Build 217:
-68.0%

Covered Lines:
0

Relevant Lines:
0

💛  - Coveralls

authors: coveralls jgoppert

repo: jgoppert/cymoca


text:
Issue with Laravel 5.2.45

Hi
I'm looking to use forward this great library. But I'm having issues with the installer.
I wrote down
composer require jgrossi/corcel

and got this
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for jgrossi/corcel ^1.3 -> satisfiable by jgrossi/corcel[v1.3.0].
    - Conclusion: remove laravel/framework v5.2.45
    - Conclusion: don't install laravel/framework v5.2.45
    - jgrossi/corcel v1.3.0 requires illuminate/contracts ~5.3.0 -> satisfiable by illuminate/contracts[v5.3.0, v5.3.16, v5.3.4].
    - don't install illuminate/contracts v5.3.0|don't install laravel/framework v5.2.45
    - don't install illuminate/contracts v5.3.16|don't install laravel/framework v5.2.45
    - don't install illuminate/contracts v5.3.4|don't install laravel/framework v5.2.45
    - Installation request for laravel/framework (locked at v5.2.45, required as 5.2.*) -> satisfiable by laravel/framework[v5.2.45].

Installation failed, reverting ./composer.json to its original content.

Here is part of my composer.js
"require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.2.*",
        "infyomlabs/laravel-generator": "dev-master",
        "laravelcollective/html": "5.2.*",
        "infyomlabs/core-templates": "dev-master",
        "infyomlabs/swagger-generator": "dev-master",
        "jlapp/swaggervel": "dev-master",
        "doctrine/dbal": "~2.3",
        "yajra/laravel-datatables-oracle": "~6.0",
        "zizaco/entrust": "5.2.x-dev",
        "laravel/socialite": "^2.0",
        "spatie/laravel-medialibrary": "^3.18",
        "baum/baum": "~1.1"
}

Hope you can guide me through this.
Regards

Hello,
Try installing corcel 1.1.7, it should be working with Laravel 5.2.x

Hi @krugerdavid! As @rundef said, since version 1.2.3 we assume you're using Laravel 5.3. Maybe we should still add support for 5.2 instead of getting rid of it and just assume 5.3. JG

thanks to @jgrossi an honor to be answered by the author itself :) and to @rundef for your quick response as well!!
It worked like a charm!
Thanks!

@krugerdavid you're welcome! And maybe we go back and still support 5.2 soon :-) JG

authors: jgrossi krugerdavid rundef

repo: jgrossi/corcel


text:
No horizontal bar visible

I just installed cell-separator but nothing happens.
It is enabled but nothing happens.
Cell-Separator 0.4.1
Hydrogen 2.13.1
Atom 1.42.0 x64
Any Ideas?
I also restarted Atom but nothing happens.
Thank you!

Solved: As described in the info. Disable the tree-sitter in the core setting.

repo: jhabriel/hydrogen-cell-separator


text:
Add contact information?

Apologies for the noise but I just wanted to thank you so much for this powerful project.
Finding a common network protocol between modern machines and old Macs is an enormous pain. I've just been refurbishing a 2000 iMac DV and this is by far the fastest and most convenient means of transferring files between the new world and old. I get 2-6 MB/sec via ethernet, but throughput aside, the ergonomics are just terrific. Much easier than ferrying flash drives around!
Anyway I'm sure you'll get the occasional grateful party who will want to thank you, and if you provide a means of contacting the project, they'll not have to open an issue to do it.
Thanks again. This is so cool.

Thanks, for the feedback!  It wasn't my primary motivation, but I've also found this project useful for transferring software onto vintage Macs.  FTP works too, but isn't as fun or easy to setup.
You're right though, I'll add some contact info to the README.
Glad you're enjoying the project!

authors: daniloc jhalter

repo: jhalter/mobius


text:
Fix #585 - Add dockerfile

Fixes #585

Plz, can you add the call in the CI too plz?
https://github.com/jhipster/jhipster-lite/blob/main/tests-ci/generate.sh#L76

Plz, can you add the call in the CI too plz? https://github.com/jhipster/jhipster-lite/blob/main/tests-ci/generate.sh#L76

Yes, will handle it

@beatfreaker : just tested it, and it works well. Last comments from my side to handle dynamic port, with serverPort in configuration

@beatfreaker : just tested it, and it works well. Last comments from my side to handle dynamic port, with serverPort in configuration

Handled, and thank you for explaining it with the code samples.

@beatfreaker : approved :) thanks for your work

authors: beatfreaker pascalgrimaud

repo: jhipster/jhipster-lite


text:
同一CoverLevel中的Cover怎么区分显示层级？

现在是对不同的CoverLevel设计3个不同的组别层级，但是在实际中，可能UI组件需要多于三个的显示层级顺序。但在同一Level层级中，要区分它们的显示顺序是做不到的(代码中是在ReceiverGroup中使用Set的增强for循环遍历Cover，这个在不同的JDK版本得出的结果可能不一样，可能根据key的hashCode得到一种有序的结果)。所以建议设计CoverLevel为int值(类似ZOrder的概念)，来区分不同的显示层级。
还有既然设计了IReceiverGroup接口，为什么在xxx.setReceiverGroup(ReceiverGroup r)方法中，不指定参数为IReceiverGroup而是直接使用ReceiverGroup实现类？我想改你的forEach方法都做不到。。

这个问题我之前想到过了，大部分场景下使用三个CoverLevel是能满足的。如果目前不能满足的话，你还可以重写SuperContainer然后传入自定义的ICoverStrategy来实现层级的填充规则。目前我在独立分支下正在优化层级的合理填充这块，后期会更新。

@Elivish 3.3.0版本已发布，有需要可以看一下，有问题再反馈。

authors: Elivish jiajunhui

repo: jiajunhui/PlayerBase


text:
可以匯出/匯入設定的功能

如題
主要是iOS在Sideloading後可能會掉簽
然後又要重新設定蠻麻煩的

https://github.com/jiangtian616/JHenTai/wiki/常见问题#q4如何导入or导出各种数据

可是iOS平台很難碰到這個數據耶
還是希望有內建的功能

原來在那邊啊，抱歉是我自己沒先確認好，感謝您!


text:
No license specified

There's no code license, which means it's copyright infringement to actually use this library.

Bump! It really can not be used on our project unless it has a license. Is it possible specify one please? Thanks!

done!

That's cool, thanks for making it so promptly!

authors: jiangts pavlo skylarmt

repo: jiangts/JS-OTP


text:
🛑 O365 is down

In 77ae09f, O365 (https://outlook.office.com) was down:

HTTP code: 417
Response time: 127 ms

Resolved: O365 is back up in d4e2073 after 18 minutes.

repo: jiannystein/upptime


text:
🛑 O365 is down

In 9a7dca4, O365 (https://outlook.office.com) was down:

HTTP code: 417
Response time: 123 ms

Resolved: O365 is back up in 77725ba after 9 minutes.


text:
can the sum overflow?

https://github.com/jiayihu/pretty-algorithms/blob/e97dcb78129896b7dc7eb6ec22eba6dd20255bcd/algorithms/search/binary-search/binary-search.ts#L12

It's very unlikely that you have numbers so huge to overflow , especially on the client

You can use (start + ((end - start) / 2) to avoid the overflow, in case that happens.

authors: dilbert-ro jiayihu utkarshbhatt12

repo: jiayihu/pretty-algorithms


text:
There is a possible bug here

DGN+R and DGN have different adj acquisition methods for Surviving files, In the same environment, the adj of the two is very different. in dgn+r , function get_adj(self): if (np.abs(x-x1)<=3)|(np.abs(y-y1)<=3): I think it's a mistake if (np.abs(x-x1)<=3) and (np.abs(y-y1)<=3)  with 'and' there
adj
[[1. 0. 0. 1.]
[0. 1. 0. 0.]
[0. 0. 1. 0.]
[1. 0. 0. 1.]]
dgn+r_adj
[[0. 0. 0. 1.]
[0. 0. 0. 0.]
[0. 0. 0. 0.]
[1. 0. 0. 0.]]
the difference changes to a diagonal

For this reason, results will also vary

这个repo里的结果用的都是通信范围更大的那个版本，另一个版本可以看这里的一个结果https://arxiv.org/abs/2109.02032，但有点小问题如果多个智能体在同一个格点只能取其中一个，好像影响也不大

这个repo里的结果用的都是通信范围更大的那个版本，另一个版本可以看这里的一个结果https://arxiv.org/abs/2109.02032，但有点小问题如果多个智能体在同一个格点只能取其中一个，好像影响也不大)
不好意思，可能英文未表述清楚，我的疑问是相同条件下，代码里的get_adj()代码不同，导致DGN+R中的邻接矩阵明显比DGN中的邻接矩阵要丰富，因为使用的是'|'而不是'and', 所以其实存在邻接矩阵错误的问题。

梳理一下，这个repo里一共3个surviving.py, 其中DGN+ATOC文件夹下的和DGN+R文件夹下的是同一个，也是这个repo里所有结果所使用的，也就是说DGN使用的surviving.py和DGN+R的surviving.py同一个，另外Surviving文件夹下的surviving.py（也就是你所说的DGN中的邻接矩阵）我没有使用，他有个小问题就是我上面说的，这个问题影响不大，这篇文章使用了可以参考一下，不存在邻接矩阵错误的问题，只是把通信范围设大了，也可以设成and回头我试一试。

readme里不是写了“Update: We have fixed a small bug in surviving.py and modified some hyperparameters. The latest version is in DGN+ATOC.”，意思就是surviving.py以DGN+ATOC下的为准

我可能误解了这句话的意思，好的，感谢您

不客气～目前正在100-agent navigation上做实验（得需要点算力有限🤒），等实验跑完可以以新版本为准

好的，事实上| @.***，希望多和您交流，向您学习
------------------ 原始邮件 ------------------
发件人: @.>;
发送时间: 2022年1月19日(星期三) 晚上9:55
收件人: @.>;
抄送: @.>; "State @.>;
主题: Re: [jiechuanjiang/pytorch_DGN] There is a possible bug here (Issue #5)
不客气～目前正在100-agent navigation上做实验（得需要点算力有限🤒），等实验跑完可以以新版本为准
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you modified the open/close state.Message ID: @.***>

不敢当😶我其实觉得DGN这类智能体通信算法意义不大了，最多就是起到个信息共享的作用，现在在做的navigation只是想在大规模场景下验证一下，MARL这块更多还是应该研究fully decentralized training。

authors: Howrhy jiechuanjiang


text:
Why does the mel.npy file I trained with the tacotron2 model not match the dimensions in hifi-gan?

I trained the tacotron2 model to produce mel_**.npy ,but in this model, the error of dimension mismatch is reported
python3 inference_e2e.py --checkpoint_file cp_hifigan-1208-test/g_00036000  Initializing Inference Process.. cp_hifigan-1208-test/g_00036000 Loading 'cp_hifigan-1208-test/g_00036000' Complete. Removing weight norm... Traceback (most recent call last):   File "inference_e2e.py", line 90, in <module>     main()   File "inference_e2e.py", line 86, in main     inference(a)   File "inference_e2e.py", line 51, in inference     y_g_hat = generator(x)   File "/home/zhchen/python3/lib/python3.5/site-packages/torch/nn/modules/module.py", line 547, in __call__     result = self.forward(*input, **kwargs)   File "/home/zhchen/hifi-gan-master/models.py", line 101, in forward     x = self.conv_pre(x)   File "/home/zhchen/python3/lib/python3.5/site-packages/torch/nn/modules/module.py", line 547, in __call__     result = self.forward(*input, **kwargs)   File "/home/zhchen/python3/lib/python3.5/site-packages/torch/nn/modules/conv.py", line 200, in forward     self.padding, self.dilation, self.groups) RuntimeError: Expected 3-dimensional input for 3-dimensional weight 128 80, but got 2-dimensional input of size [288, 80] instead

It is because of the shape of the input data.
Insert the following code at line 50 of inference_e2e.py file and try again.
        if len(x.shape) < 3:
            x = x.unsqueeze(0)

We will update it soon.

It is because of the shape of the input data.
Insert the following code at line 50 of inference_e2e.py file and try again.
        if len(x.shape) < 3:
            x = x.unsqueeze(0)

We will update it soon.

Maybe below better
          if len(x.shape) < 3:
              x = x.unsqueeze(0)
          if not x.shape[1] == h.num_mels:
              x = x.tranpose(1, 2)

It is because of the shape of the input data.
Insert the following code at line 50 of inference_e2e.py file and try again.
        if len(x.shape) < 3:
            x = x.unsqueeze(0)

We will update it soon.

Maybe below better
          if len(x.shape) < 3:
              x = x.unsqueeze(0)
          if not x.shape[1] == h.num_mels:
              x = x.tranpose(1, 2)

Thanks a lot! It works!

I close this as there are no recent updates. Please reopen if you need additional comments.

Just a heads up that there's a typo in that code snippet... tranpose -> transpose
Should be:
          if len(x.shape) < 3:
              x = x.unsqueeze(0)
          if not x.shape[1] == h.num_mels:
              x = x.transpose(1, 2)


text:
Error reading arraybuffer in production environment

Expected Behavior

Correctly read the arraybuffer in the development environment after webpack packaging, and correctly process the trimmed output arraybuffer
Current Behavior

Crop the center of the picture with jimp
async function splitImage(buffer) {
  // Load the image from buffer
  const image = await Jimp.read(buffer);
  // Get image dimensions
  const { width, height } = image.bitmap;
  // Calculate half width and half height
  const halfWidth = Math.floor(width / 2);
  const halfHeight = Math.floor(height / 2);
  // Crop and encode each quadrant as base64
  const lti = image.clone().crop(0, 0, halfWidth, halfHeight).getBufferAsync(Jimp.MIME_JPEG);
  const rti = image.clone().crop(halfWidth, 0, halfWidth, halfHeight).getBufferAsync(Jimp.MIME_JPEG);
  const lbi = image.clone().crop(0, halfHeight, halfWidth, halfHeight).getBufferAsync(Jimp.MIME_JPEG);
  const rbi = image.clone().crop(halfWidth, halfHeight, halfWidth, halfHeight).getBufferAsync(Jimp.MIME_JPEG);
  // Wait for all quadrant images to be encoded as base64
  // const [lt, rt, lb, rb] = await Promise.all([lti, rti, lbi, rbi]);
  console.log('Image split into quadrants and encoded as base64 successfully.');
  return await Promise.all([lti, rti, lbi, rbi]);
}

Everything is normal in the development environment, but once packaged, an error will occur
It uses the framework of electron-reactboiler-plate, including the configuration of electron, webpack, etc. Packaged as an asar and encrypted the  asar file with asarmor
//afterPack.js
const asarmor = require('asarmor');
const { join } = require("path");

exports.default = async ({ appOutDir, packager }) => {
  try {
    const asarPath = join(packager.getResourcesDir(appOutDir), 'app.asar');
    console.log(`asarmor applying patches to ${asarPath}`);
    const archive = await asarmor.open(asarPath);
    archive.patch(); // apply default patches
    await archive.write(asarPath);
  } catch (err) {
    console.error(err);
  }
};

This also happens when sharp is used again. issue: https://github.com/lovell/sharp/issues/3924
Failure Information (for bugs)
(node:22532) UnhandledPromiseRejectionWarning: TypeError: en.read is not a function
    at dn (A:\ai-storyboard\resources\app.asar\dist\main\main.js:2:1290045)
    at IpcMainImpl.<anonymous> (A:\ai-storyboard\resources\app.asar\dist\main\main.js:2:1294662)
    at IpcMainImpl.emit (node:events:513:28)
    at WebContents.<anonymous> (node:electron/js2c/browser_init:2:88759)
    at WebContents.emit (node:events:513:28)
(node:22532) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)

Steps to Reproduce

Context

Jimp Version: 0.22.10
Operating System: Windows 11
Node version: 20.10.0

Failure Logs

Using require instead of import statement, the issue was solved

repo: jimp-dev/jimp


text:
Filtering based on expressions

New user here so please bear with me some naive questions.
Is it possible to have some user code , math expression based filtering while doing graph search (hnsw)
I read documentation , can you provide some guidance or pointer on why filtering query language was based on mongodb query operators , any merits here as opposed to supporting sql operators supported by different databases ?
Looking at the code , i observe filtering done by binary_fuse_filter , could you please provide some details on if the filtering is pre-filtering or post retrieval filtering or during graph traversal filtering ? are their any engineering blog or documentation or the filtering strategy that you can point me to , wondering how canwe extend for other expressions based filtering

Thanks for your interest.

why filtering query language was based on mongodb query operators , any merits here as opposed to supporting sql operators supported by different databases ?

For the query, we use MongoDB query as the query language. At the runtime, the mongo query will be transferred to SQL clauses (we implemented a simple converting function in annlite) which will be applied to filter the whole data. Here, we want to provide an easy way to construct the query.  SQL-based query needs the user to know all of the information about the table name (it is an internal variable, not visible to the general user) and column names. And what's more, mongodb-style query is a Dict, which is widely used by modern KV database (ES, MongoDB, ...).

could you please provide some details on if the filtering is pre-filtering or post retrieval filtering or during graph traversal filtering ?

It is graph traversal filtering indeed. Each node is marked with bool value to indicate whether it matches the query conditions. At the hnsw graph search time, the same traversal search algorithm is performed to find the closed-neighors, and only the valid node is considered as the candidate result to be returned (here, it seems like a pre-filtering strategy).

are their any engineering blog or documentation or the filtering strategy that you can point me to , wondering how canwe extend for other expressions based filtering

For the technical design documentation, we are working on them. And what's more, which expression do you want to use for filtering in your case?

Thanks for the info. the use case i am thinking is evaluating some expression like distance < 0.xyz  and metadata_color = "red" . I was under the impressions that the filter is constructed first by running the operators over some indexed data generating a small fuse filter of allowed/blocklisted candidates , and then during traversal we are just doing a probabilistic check ? we are not evaluating operators on neighbours during graph search but rather checking membership ?

we are using allowed/blocklisted candidates, and check membership during graph search.

Hi, great discussion! During searching with filters are there any chances of a disconnected graph cropping up - say when all the neighbors of a node are invalidated by a filter?

It is graph traversal filtering indeed. Each node is marked with bool value to indicate whether it matches the query conditions. At the hnsw graph search time, the same traversal search algorithm is performed to find the closed-neighors, and only the valid node is considered as the candidate result to be returned (here, it seems like a pre-filtering strategy).

For your question, actually, all of the graph nodes are considered valid during graph traversal. Only the nodes which match with the filter will be considered as the result candidates. Thus, there is no disconnected graph problem.

authors: bandhakavi numb3r3 patelprateek

repo: jina-ai/annlite


text:
!+[Here’s Way To Watch] Eastern Final CFL 2024 LIVE Broadcast Free On TV Channel 09 November 2024

CFL playoffs schedule 2024: Full bracket, dates, times, TV channels to watch every Canadian football game
After a competitive regular season, the 2024 CFL playoffs have arrived.
The Montreal Alouettes and Winnipeg Blue Bombers finished with the best records in the East and West Divisions, respectively, giving them first-round byes. Montreal is looking to defend its title, while Winnipeg is out for revenge after coming up just short in last year's Grey Cup.
WATCH:2024 Grey Cup on Fubo (free trial)
The Ottawa Redblacks and Toronto Argonauts will meet in the Eastern Semi-Final, while the BC Lions and Saskatchewan Roughriders will face off in the Western Semi-Final.
Here is everything you need to know about the 2024 CFL playoffs, including the full postseason schedule.
CFL playoffs schedule 2024
The 2024 CFL playoffs began on Saturday, Nov. 2. The two teams that advance all the way to the Grey Cup will battle for the title on Sunday, Nov. 17.
How to watch 2024 CFL playoffs: TV channels, live streams
TV channels: CBSSN (U.S.) | CTV, TSN, RDS (Canada)
Live streams: Fubo (U.S. - Grey Cup only) | CFL+ (U.S., Canada and International)
CFL playoff games will be available to watch on CTV, TSN and RDS in Canada. CBS Sports Network will air the Grey Cup in the U.S.
Cord-cutters around the world can stream the CFL playoffs on CFL+. U.S. viewers can catch the Grey Cup on Fubo, which is currently offering a free trial for new users.
For a limited time, you can get your first month of Fubo for as low as $59.99, a $20 savings. Stream ESPN, ABC, CBS, Fox, NBC and 200-plus top channels of live TV and sports without cable. (Participating plans only. Taxes and fees may apply.)
CFL playoffs radio station 2024
Radio channel: SiriusXM channel 167
You can listen to CFL playoff games live on SiriusXM. Coverage will be available on channel 167.
Get SiriusXM for free for your first month. Listen to live NBA, NFL, MLB and NHL games, plus NASCAR, college sports and more. Stay updated with all the news and get all the analysis on multiple sport-specific channels.
The 2024 CFL Playoff Schedule has been set following the completion of the regular-season on Saturday.
Following the 81-game regular-season, six teams advanced to the 111th Grey Cup Playoffs for the right to win the championship of the Canadian Football League.
The Ottawa RedBlacks (9-8-1) will travel to take on the Toronto Argonauts (10-8) at BMO Field in Toronto, Ontario, in the Eastern Semi-Final on Saturday, Nov. 2, 2024. The game will be streamed live in the United States via CFL+ at 3:00pm ET.
In the Western Semi-Final, the Saskatchewan Roughriders (9-8-1) will host the BC Lions (9-9) at Mosaic Stadium in Regina, Saskatchewan, also on Saturday, Nov. 2. The game will also be streamed live via CFL+ and will kickoff at 6:30pm ET.
The Montreal Alouettes, who won the 110th Grey Cup last season, finished atop the Eastern Division and the entire league with a 12-5-1 record. The Winnipeg Blue Bombers finished first in the Western Division standings again this season with a record of 11-7. Both teams receive a Semi-Final round bye and will host division finals.
Montreal will host the Eastern Final on Saturday, Nov. 9 at 3:00pm ET, while the Western Final featuring Winnipeg will follow at 6:30pm ET. Both games will be streamed via CFL+.
Teams missing out on the CFL Playoffs this season the include Calgary Stampeders (5-12-1), Edmonton Elks (7-11), and Hamilton Tiger-Cats (7-11).
The 111th Grey Cup is scheduled for Sunday, Nov. 17, 2024 at BC Place in Vancouver, British Columbia. The game is set for 6:00pm ET and it will be televised in the United States by CBS Sports Network.
All Canadian Football League games are televised in Canada by TSN (English) and RDS (French).

fghfghtrr

repo: jina-ai/reader


text:
keyError of rankdict

Hi，jingtao
When I train the STAR model. There exist an error.
File "./dataset.py", line 176, in getitem
hardpids = random.sample(self.rankdict[str(qid)], self.hard_num)
KeyError: '18337'
The valid keys of rankdict should be 1,2,...,6980. Am I right?

It should be. But in my experiment, JSON automatically convert the int qid to string when I dump the dict in this line.. Therefore, I use the str(qid) as the key.

Oh, I think the mode should be train !?
Next, we use this warmup model to extract static hard negatives, which will be utilized by STAR.
python ./star/prepare_hardneg.py
--data_type passage
--max_query_length 32
--max_doc_length 256
--mode dev
--topk 200

Yes, it should be train.

authors: jingtaozhan ylwangy

repo: jingtaozhan/DRhard


text:
脚本执行权限问题

没有sudo 执行./trojan_v2ray_install.sh 需要不但输入sudo 用户密码，但是很多时候还是不行， 比如这个pam_authenticate failed: trojanuser 用户有sudo 权限，但是脚本执行不下去。
ubuntu 18.04 amd x64 .
==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon === Authentication is required to reload the systemd state. Authenticating as: user,,, (user) Password: polkit-agent-helper-1: pam_authenticate failed: Authentication failure ==== AUTHENTICATION FAILED === Failed to reload daemon: Access denied Sibt==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon === Authentication is required to reload the systemd state. Authenticating as: user,,, (user) Password: polkit-agent-helper-1: pam_authenticate failed: Authentication failure ==== AUTHENTICATION FAILED === Failed to reload daemon: Access denied

选的是菜单哪项执行的？

我是准备装trojan go 的. 看来我理解的问题 这个脚本其实一定要root 装 我用sudo 装不行的，建议在说明里面加上一条，用root 或者有sudo 权限的用户su到root 也可以吧？

我是准备装trojan go 的. 看来我理解的问题 这个脚本其实一定要root 装 我用sudo 装不行的，建议在说明里面加上一条，用root 或者有sudo 权限的用户su到root 也可以吧？

对

authors: jinwyp maplewang


text:
卸载 v2ray 如何保留 nginx ？

和网站共存的，已经装了nginx，在菜单里只安装了 v2ray 和 TLS, 菜单里只能全部卸载。没有找到单独卸载 v2ray 和 TLS 的选项

选30后 子菜单中可以单独卸载v2ray


text:
BUG: Jira StopWatch encountered an unhandled error.

What happened?
Jira StopWatch encountered an unhandled error. A logfile has been created. If the error continues to occur, please send the logfile content to carsten@sarum.dk. See more details in the logfile: jirastopwatch.log
How can it be replicated?
Start the app
What did you expect instead?
Expected the app to start
Relevant log output
9/8/2021 9:51:16 AM Request: https://.../rest/api/2/configuration
9/8/2021 9:51:16 AM Response: Unauthorized -

- Replaced our domain with "..."
- Note that the date shown in the log is not correct.  I am entering this on 6/14/2023.

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Hi @mwoffenden, thanks for submitting this bug report!
Looking at the first log line, it looks like the domain for your Jira instance is not set. To update your settings, click on the little cog icon in bottom right corner and enter your Jira domain, your email (must be the same as your Jira account), and an API key.

I'm not sure why the logs would have the wrong timestamp, I'll have to look into that. In the meantime please try and set up those settings? If the problem continues, can you please provide more information about the system you are running; what operating system and which version of JiraStopWatch you are using, etc..
Thanks!

Thanks for the reply.
We can't even start the app, so we can't get to that screen.
Is there a way to clear stored data in the registry, or wherever it's kept?

@mwoffenden, it looks like the error you are seeing is coming from JiraApiRequester.cs on line 43. This would indicate that the exception is occurring due to an Unauthorised status code being returned from your Jira instance, possibly due to a bad API token?
https://github.com/jirastopwatch/jirastopwatch/blob/ca54b91e81caabbf5f0d2ecbe0be08386e28e157/source/StopWatch/Jira/JiraApiRequester.cs#L43
Can you please check if the API token shows as having been used in the Atlassian settings? If it hasn’t been used yet that probably indicates that the token isn’t being properly passed in the request, possibly because of an extra whitespace character for example. Otherwise if the token has been used recently and it’s use aligns with when you attempted to use JiraStopWatch, then that would indicate that the request is being denied due to insufficient permissions on your token or perhaps that the user it is attached to doesn’t have access to the Jia instance.
In either of these cases you might need to edit the settings manually. I don’t recall whether these settings are stored in the registry or in a config file, I’ll look in to that in the morning for you 👍

I need to reset the app, but it will not start.  Maybe you can advise on where the settings are stored and I can clear them out.

Hi @mwoffenden, The configuration file will be stored in C:\Users\<USERNAME>\AppData\Local\StopWatch\StopWatch.exe_<ID>\<VERSION>\, either in user.config or possibly in StopWatch.exe.config. The file is (mostly) human readable/modifiable so you can confirm that the settings are correct or delete the file and try re-installing.

Following the settings UI, created a PAT and entered the username and PAT.  The PAT did not work.  However using the username and password did work, and we can now use the tool again.
I think the UI could be clarified, to indicate that username+password is an option.

That's good to hear, I didn't even know that using the password was supported so I'll definitely add that to the documentation 👍
Thanks for again opening this issue and sharing what the fix was.

authors: mwoffenden norwd

repo: jirastopwatch/jirastopwatch


text:
Minor compatibility fixup

Changed two things:

CLang/ARM64 can't quite resolve unsigned long long == unsigned long despite them both being 64-bit unsigned integers.  Comparing those two via numeric limits now
Presumed a default parameter for compressed_cache_detail of ieee754_binary64.  If I got that wrong, my feelings won't be hurt and you can reject the PR :)

Two issues need attention before this is a viable PR:

I forgot use stdr namespace.  Oops
I'm feeling there's a better way to compare the two than max() thought max() is reasonable

I'm closing this because I came up with a different method of dealing with unsigned long long vs unsigned long issue.

authors: jk-jeon malachib

repo: jk-jeon/dragonbox


text:
Need Help: How to set an event weekly to the past and to the future?

At the moment, the minimum date is now, but I want to add an event to the past and to the future without any limit. How can I do this?
new RRule({
            freq: RRule.WEEKLY,
            byweekday: RRule[weekDayName.substr(0, 2).toUpperCase()],
          })

Using dtstart with a date at 1970-01-01 has a problem with timezones with daylight time.

I've found that doing rrule.options.dtstart = new Date("1970-01-01"); should get you somewhat closer; it seems to default the dtstart to today.

authors: jamesfulford meness

repo: jkbrzt/rrule


text:
Upcase body before searching to find lowercase tracking numbers

The regexps define the search pattern in terms of uppercase characters, so when the source data you're searching contains lowercase tracking numbers, they don't match.
By upcasing the body before searching, it's more likely to match the search patterns.
This also matches that initializing a new TrackingNumber object upcases the number for its internal value.
Inspired by:
https://github.com/jkeen/tracking_number_data/pull/102
Meant as an interim solution until it's decided whether the source regexps should be case-sensitive or not.

Summary by CodeRabbit

New Features

Enhanced tracking number detection by allowing case-insensitive search, improving user experience when entering tracking numbers in various formats.

Tests

Added a test case to verify the functionality of case-insensitive tracking number recognition, ensuring reliability and accuracy in diverse input scenarios.

@cgunther Thanks! A new version is getting cut and released right now 🤖

Thanks for the quick merge/release.
For anyone else who stumbles on this, if your goal was to take a string like "hello 1z879E930346834440 bye" and replace the tracking number with a link, TrackingNumber.search will now match on that tracking number, however the TrackingNumber::UPS object you get will have a tracking_number of 1Z879E930346834440 (upcase), due to being upcased, and even the original_number will be upcased, since the search string is upcased first. That means when you go to do the substitution, make sure it's case-insensitive, since the tracking number you'll be looking for might now be in a different case than your original string (upcase vs original).

authors: cgunther jkeen


text:
Doesn't work witj lens 6

apple silicone (m1 pro)
Lens: 2024.1.300751-latest
Extension API: 6.10.33
Electron: 27.2.4
Chrome: 118.0.5993.159
Node: 18.17.1

Since Lens is closed source, I'm not able to test the extension anymore.
Sorry.

That's a great pity! I loved to see the cert info in lens!
@jkroepke If there is no chance to update that, could you please add a notification to the README.md or archive the project?  However, I'd love to see the continued ... :(

Its still working for OpenLens

I see :+1:

authors: jkroepke rdxmb vitalyu


text:
Uploader Canvas

Is there any css file or something that shows uploader as it is in demo page?

Maybe this could be helpful https://rpia.io/docs/elements/progress, and here is the source.

authors: Vieshanis jkuri


text:
unhandled exception in focuser app

Hi Julien
There is a condition in the focuser app that will give an unhandled exception
The maximum target position of the focuser is 4000
Entering a number for the target position greater than 4000 will give an unhandled exception.
See below:

By the way, cool project. I made a focuser, but I made a no-solder version :)

This is 100% normal and expected. If you want to go beyond 4000 steps, you have to update the maximum position in the driver settings dialog. 4000 is just the default value... I also recommend setting the zero position first. See https://www.youtube.com/watch?v=zPPIgVuxk4Y for more details.

This is 100% normal and expected. If you want to go beyond 4000 steps, you have to update the maximum position in the driver settings dialog. 4000 is just the default value... I also recommend setting the zero position first. See https://www.youtube.com/watch?v=zPPIgVuxk4Y for more details.

Ah, thanks.
I need to read the manual :)

authors: CheekyMonkey jlecomte

repo: jlecomte/ascom-oag-focuser


text:
Operators in calc() are incorrectly minified when using CSS nesting

necessary whitespace has been removed.
nesting example
div {
  height: calc(1em + 4px);

  &.hide {
    display: none;
  }
}

when it minify
div{height:calc(1em+4px);&.hide{display: none;}}

not nesting example
div {
  height: calc(1em + 4px);
}

when it minify
div{height:calc(1em + 4px);}

Thanks for opening this issue @kphrx, it looks like the css minifier implementation was not properly parsing calc when encountering nested css. I have updated the implementation and was able to produce the expected result. Try updating your version to v3.5.5 and let me know if that fixed it for you.

I tried v3.5.5 and it works as expected behavior. Thank you for your work.

authors: jleeson kphrx

repo: jleeson/rollup-plugin-import-css


text:
Documentation Issue:  startapp.sh

startapp.sh MUST Start with #!/bin/sh

#!/bin/sh
exec /usr/bin/xterm

What's the issue exactly?  You want the documentation to precise that the script must start with a valid shebang?

authors: hansmuc jlesage

repo: jlesage/docker-baseimage-gui


text:
[Feature request] Automated Conversion triggered only within specified time range

Idea
Hello,
I would like to suggest to implement a way to specify time slot for automated conversions. I would desire it to be triggered only during night hours when I am not using the server for other activities..
Haven't seen this in documentation so I expect it is not possible at the moment.. Please let me know if it is something you can implement in your image.
Should be possible via CRON. I would like to see multiple CRON slots so it can be combined in a more precise way:

Monday-Friday from midnight until 4pm: 0 0-16 * * MON-FRI
Saturday-Sunday from 2am until 10am: 0 2-10 * * SAT-SUN

Having such environment variable:

AUTOMATED_CONVERSION_TIMEFRAME: ['0 0-16 * * MON-FRI', '0 2-10 * * SAT-SUN']

Then implement just ifcheck if the current time is within given CRON range.
Appreciate, Michal

Although such feature seems to be not implemented, as a workaround, you can take advantage of a pre-conversion hook (docs), that will pause the execution of the conversion as long as a certain condition is met.
An example pre-conversion hook could look like this:
#!/bin/sh

# ...

current_time="$(date +'%s')"
min_time="$(date -d '14:00' +'%s')"

while [ "$current_time" -lt "$min_time" ]; do
    echo "pre-conversion: Conversion is paused until 14:00"
    sleep 60
    current_time="$(date +'%s')"
done

(Make sure your timezone is set correctly within the container.)
Of course, you will have to implement your own pause condition logic depending on your needs.

:OOOOOOO
Am I having a Fairy Godmother or something??

authors: DrWarpMan aronmgv

repo: jlesage/docker-handbrake


text:
Add CNAME record

I bought speedscope.app, might as well use it!

Following this to set up HTTPS & HSTS for the domain. https://hackernoon.com/set-up-ssl-on-github-pages-with-custom-domains-for-free-a576bdf51bc

It's done! https://www.speedscope.app/

repo: jlfwong/speedscope


text:
Add reel in uploadPhoto({post: ''})

Is it possible to post reels from this API? If so, please let me know.

AFAIK you can't do that with this library. I wouldn't recommend you either to use it because it's poorly and rarely maintained (look at the number of PRs and issues)

Ok thanks, will try to find another one then. Good luck haha
On Thu, Jun 10, 2021 at 05:33 MonsieurBibo @.***> wrote:

AFAIK you can't do that with this library. I wouldn't recommend you either
to use it because it's poorly and rarely maintained (look at the number of
PRs and issues)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jlobos/instagram-web-api/issues/259#issuecomment-858468977,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ASAOQF5DWBPLBKSP3ROIP4TTSCBGHANCNFSM46NAR4DQ
.

repo: jlobos/instagram-web-api


text:
Mixed operators code breaking

version: 0.13.1
original code:

formatting error:

how it should look like:

Thanks for the report and sorry about this! There's a PR for a fix in https://github.com/jlongster/prettier/pull/502. I'm going to close it down as it's already being tracked by https://github.com/jlongster/prettier/issues/501

authors: sonaye vjeux

repo: jlongster/prettier


text:
Publish utils package to pkg.go.dev

This can really help in: https://github.com/iotaledger/iota-wiki/issues/1451
Where a lot of solidity contracts would be moved to the wasp repo, and tests added for each.
I think it just needs a release to be published?
@lucas-tortora @Dr-Electron WDYT?

Hi @salaheldinsoliman, can you write a description for this package, what it does, and explain how we can use it in the move Solidity code to the Wasp repo tasks?

Thanks. This new repo is clear and has fewer files.

yes, as most of @jlvandenhout 's util was later introduced in evmtest and wasp/util.
@jlvandenhout Did you introduce util there yourself?

The utils in this repo are written by myself, partially based on what was, and probably more importantly what was not, available back then in the Wasp repo. With the recent changes to the Wasp repo, I guess it makes more sense to actually use what is in the Wasp repo and improve that where necessary. Feel free to close this if you agree.

Yup, closing this as the current util in wasp suffices what is needed for testing.

authors: Ginowine jlvandenhout salaheldinsoliman

repo: jlvandenhout/contracts


text:
TypeTag instances for SCrypt

I'm using Doobie and while trying to build an instance of Meta from another Meta using xmap, I've stumbed upon an issue. The xmap method needs a TypeTag type class instance. Usually those are provided by the compiler but in the case of SCrypt, the compiler was not able to do it.
I'm not familiar with TypeTag and I can't really help on this one. I worked around it by wrapping my SCrypt value inside a case class TTSCrypt(value: SCrypt) extends AnyVal and building a Metat[TTSCrypt instead.
It's not a major issue, it's just ugly.
Thanks for the library 👍 So far it works great!

I suspect the same thing happens for BCrypt and HardenedSCrypt

@daddykotex I know how to fix this issue quite easily, and it's something that requires library-wide changes (in a good way! nothing bad).
To explain a little, SCrypt is a little trick to use newtypes using cats.evidence.Is. In a sense, given that it's actually just a newtype, there is no type tag.
The actual definition for it in tsec is:
  protected val SCrypt$$ : TaggedString = new TaggedString {
    type I = String
    val is = Is.refl[String]
  }

  type SCrypt = SCrypt$$.I

This can give you compile-time newtypes that are typechecked, but can behave with much less overhead than case classes.
is has a subst method as such:
 /**
   * To create an instance of `A Is B` you must show that for every choice
   * of `F[_]` you can convert `F[A]` to `F[B]`. Loosely, this reads as
   * saying that `B` must have the same effect as `A` in all contexts
   * therefore allowing type substitution.
   */
  def substitute[F[_]](fa: F[A]): F[B]

Which means with the is instance for SCrypt, all you'd need to do is use is.subst(meta) to get a Meta[SCrypt].
For now, you can use metaString.asInstanceOf[Meta[SCrypt]], but I will make these fields public in the next milestone, thanks for pointing it out!
For the record, I've been enforcing this as of recently with my newtypes, as can be  seen here:
https://github.com/jmcardon/tsec/blob/tryswig/tsec-libsodium/src/main/scala/tsec/libsodium/hashing/package.scala#L27
Thank you! This solution is simple and simply using SCrypt.is.subst(meta) can fix it, but I didn't make the is public. I'll make sure to fix.

Also no, you don't need to wrap it in AnyVal. you can use asInstanceOf[Meta[Scrypt]] on a Meta[String] for now, and I'll make sure to fix this in a quick pr in a day or two (a tad busy today)

Oh wow. In the end, SCrypt is just a String.
And Meta[String].asInstanceOf[Meta[SCrypt]] worked just fine!
Should I close this?

@daddykotex not yet. I can pr a fix in a minute that's not ugly.
you shouldn't have to use .asInstanceOf. Is.subst is type checked and ultimately what you're after.

All right!
Also, there is no rush, take your time!

@daddykotex, not a problem, honestly, it was a quick fix that I intended to do anyway.
Thanks!
Fixed in #56, so I will be closing this issue. This fix will be out with the next milestone, which will release with Http4s-M6.

👍  thank you!

authors: daddykotex jmcardon

repo: jmcardon/tsec


text:
Installation issues

When I install the latest package in my virtual env, using Python 3.2, I get:
Downloading/unpacking cfenv==0.5.2 (from -r requirements.txt (line 4))
  Downloading cfenv-0.5.2.tar.gz
  Running setup.py egg_info for package cfenv
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/home/travis/build/app/app/component/venv/build/cfenv/setup.py", line 44, in <module>
        license=read('LICENSE'),
      File "/home/travis/build/app/app/component/venv/build/cfenv/setup.py", line 28, in read
        with open(fname) as fp:
    IOError: [Errno 2] No such file or directory: 'LICENSE'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
  File "<string>", line 14, in <module>
  File "/home/travis/build/app/app/component/venv/build/cfenv/setup.py", line 44, in <module>
    license=read('LICENSE'),
  File "/home/travis/build/app/app/component/venv/build/cfenv/setup.py", line 28, in read
    with open(fname) as fp:
IOError: [Errno 2] No such file or directory: 'LICENSE'

Seems like it will probably be fixed here:
https://github.com/jmcarp/py-cfenv/pull/3

repo: jmcarp/py-cfenv


text:
Thread Error (concurrency), Socket closed or lost

Hi!
I'm using your integration to write an API for my Deye Inverter but I'm facing errors that force me to restart the API whenever the connection is not used for 3 to 10 minutes.
I'm using the auto_reconnect option and sometimes it works but eventually, when a read or write operation is performed, the following error is thrown and cannot be recovered.
Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/pi/.local/lib/python3.8/site-packages/pysolarmanv5/pysolarmanv5.py", line 299, in _data_receiver
data = self.sock.recv(1024)
ConnectionResetError: [Errno 104] Connection reset by peer

This is definitely a discrepancy between the sync and async versions. Connection reset is handled in the latter. A try/except block assigning empty bytes to the data variable on reset should fix it.

That's what I ended up doing :)

Thanks for the report. If @jmccrohan  knows how to add you to the co-authors that would be great :)

Thanks @jlopez77 and @githubDante. I've pushed b87f4a0 now which resolves this and #45.
Btw, you can add  Co-authored-by: to commit messages to credit additional developers.

authors: githubDante jlopez77 jmccrohan


text:
Redux resource@3.0.0

WIP. For more info see #297

Breaking:

[x] Rename NULL to IDLE ( #294 )

Libs updated: redux-resource, redux-resource-plugins...maybe others.

[x] Remove deprecated getResources API: getResources(state, resourceName, filter) #228
[x] Calling getResources with no filter will return all of the resources #177

New features

[x] New list API for managing lists #303
[ ] Introduce a requestReducer for storing requests in one place
[ ] New feature: requestName and requestKey on actions
[ ] Official React bindings library (it will require v3.0.0) #290
[ ] New supported resources structure, enabling multiple resource types
[ ] Add lists to action

Deprecations

[ ] Referencing requests through resource slices. Use the request slice instead
[ ] Specifying a list on an action. Use lists instead
[ ] mergeListIds. Imperatively update lists instead
[ ] request item from actions. Use requestKey and requestName instead

Todo

[x] Rough draft of new lists API
[ ] Finalize new Lists API
[ ] Add deprecation warnings to logs
[ ] Introduce request reducer with request key/name
[ ] Only log each error type once ( #306 )
[ ] Publish a beta
[ ] Build React Redux Resource to test out v3.0.0
[ ] Publish

Closing this. v2.5 will come before v3.

repo: jmeas/redux-resource


text:
Is this project alive?

I see a bunch of issues and open PRs, but they stay untouched since some time. Is this project still alive?

For anyone looking for a maintained version, there's a fork that is being updated regularly: https://github.com/seblj/roslyn.nvim

I've been wanting to work go through issues and PRs for a long time, unfortunately I haven't had the time to do it. I still hope to be able to come back to it in the near future. But if not maybe I'll consider redirecting people to one of the forks.

authors: jmederosalvarado marcinjahn tiasmt


text:
Check script fixes

Import check scripts from general-superstaq[dev] rather than trying to maintain a parallel copy.
Also clean up other codes a bit, such that ./check/all_.py now passes!

Note: let's wait to merge this PR until after https://github.com/Infleqtion/client-superstaq/pull/789 is completed.


text:
Where are the models pulled to?

It downloaded 7 gigs of stuff and i can't seem to find where it went.  I want to download it.  Any ideas?

@m3kwong We store the models in layers in ~/.ollama/models.
If you list that folder, you'll see two directories: blobs and manifests. Blob is the raw data, and manifest is the metadata. Together, they make up the model.
If you are looking for a model file (e.g. .bin file), it's currently not available. We can look into potentially building an export feature for the file.

If you don't have much storage on your main mac drive and keep big files on an external drive, you can use a symbolic link to trick ollama into putting the files on an external drive.
# move existing models
mv ~/.ollama/models /Volumes/SSD/Data/ollama/models
# or before you start
mkdir -p /Volumes/SSD/Data/ollama/models

ln -s /Volumes/SSD/Data/ollama/models ~/.ollama/models

Closing as this question has been answered. Moedls are pulled to:
~/.ollama/models

Note they are stored as blobs so they can be re-used between models that share different prompts, etc.

I cannot locate the model directory in the specified location, "~/.ollama/models," on Linux!

If ollama is installed by root on a linux system like it should be because it is installing a system-service, models etc are stored under /usr/share/ollama/.ollama.
The directory /usr/share/ollama is used as the home directory for the system-user ollama which is added to the OS for running the systemd system-service.
A normal user does not have access to this dir because it is owned by the ollama user.
If you like another normal user have read access to ollama home directory, you need to add this user to the ollama usergroup.
But a normal user can use the ollama console application to access the ollama system-service!

where is the model directory in windows?

can't you put them in folders under the model name? I want to delete some models but I don't know which is which.

Win Path：C:\Users\“Username”.ollama

authors: Nasreddine NigelWan abulka byteconcepts insooneelife jmorganca m3kwong mchiang0610 oricoh

repo: jmorganca/ollama


text:
Split up API classes

⚠ Is your feature request related to a problem? Please describe
The API classes we use to communicate with the back-end are splittered and makes it more complicated in my opinion.

💡 Describe the solution you'd like
Make the classes cover multiple use cases, eg. one general to getting, adding and removing houses, one for house members, etc., things that are needed for all of the methods in the class should be in the constructor (eg. house id, token)

@Tobi406 certain decisions were made to make it easier and convenient to implement user access control, permissions in the future.
Having said that, there is absolutely no point in making the API ugly and complicated for the end user, so +1 for your thoughts. For sure, we should be cleaning up the API endpoints, In case you have a concrete example in mind, please leave a note.

I think I made a mistake in the title, sorry for that.
What I meant was that we have lots of API classes that do a similar thing (if my PR is merged even more). An example is AddCommunityAdministrators.js and GetAdmins.js. Both related to one topic (admins) and with similar arguments (communityId, token)

repo: jmprathab/MyHome-Web


text:
Undo and clear board confirmation

Hello, I was testing your fastboard.io, and looks awesome!! I'm thinking of using it in class with students. For this, would be nice having an "undo" button as well as a confirmation screen previous to clear the screen.
Imagine a student in the class that clears all the drawings, that can be a problem!
Thanks!

Hello,
Thanks for the feedback. Not the first time I have been asked for "undo" feature, so will probably implement it in the near future.
Regarding the board clearing confirmation, it is absolutely a good idea, so that will be coming sooner. Will keep you updated here.
Thanks!

I just published online an update of the webapp containing some fixes, as well as the clear confirmation feature you suggested, so closing this issue. Not the "undo" feature for the moment, as it will take more time. Will let you know if it is released in the future!

authors: erseco jmsaugar


text:
Make elements returned by all and first reloadable

Should fix #1410
All elements are considered reloadable. #allow_reload! may be removed from Element and Simple in next major version as it's not needed with this PR.
One of moments to discuss - currently behavior may be unexpected e.g. in the following case:
el = all('li')[-1] # there are 4 'li' elements on the page
find('.remove_last_li').click
expect { el.text } not_to raise_error # I believe that will raise an error as that will search for third element, not for the last one

But I don't know at the moment a good solution for it. The problem is that element of enumerable doesn't know the way using which it was got from that enumerable.

Closing due to @jnicklas huge :-1: and my misgivings about the potential unexpected behavior

authors: abotalov twalpole

repo: jnicklas/capybara


text:
Api V1 Group Gate

Endpoint for enabling/disabling feature for a given group.
flipper[:feature].enable_group :group

Thanks for adding this and the other API endpoint features. I dropped them on the API project as well to help keep track of stuff.

authors: AlexWheeler jnunemaker

repo: jnunemaker/flipper


text:
Add environment mode banner in UI

Closes https://github.com/jnunemaker/flipper/issues/101 and is a replacement for https://github.com/jnunemaker/flipper/pull/290
Purpose
Show an information banner across the top of the page for different environments. This will allow you to call out Production environments from other environments.
Notable Changes

new configuration options for Flipper::UI::Configuration: environment, environment_banner_color
when environment is set a banner will show at the top of the screen stating the name of the environment
the banner color (environment_banner_color) can be changed based on the basic bootstrap color scheme (info, danger, success, etc)
add configuration information to the UI README

Screenshot

The other option is to just allow the user to set a string value to environment and display that in the alert instead of ${environment} Environment.

Another thought I had this morning was to keep the environment and environment_banner_color has Options. That way for the environment there could be a title and a description. Not sure what benefit it gives to the environment_banner_color, but it would at least stay consistent with the other configuration options.

Also! If you don't mind, what are you using flipper for? Are you just contributing/making awesome or are you also using flipper in production on some app somewhere? If you aren't comfortable dropping this in a public issue, you can email me directly at john@featureflipper.com.

Thanks for the comments! I have some time today to get your comments resolved. I'll shoot you an email regarding the last comment.

@jnunemaker All updated based on your feedback.

authors: jnunemaker thetimbanks


text:
🛑 MegaConstruct is down

In f7feb08, MegaConstruct (https://www.megaconstruct.ro) was down:

HTTP code: 0
Response time: 0 ms

Resolved: MegaConstruct is back up in 72e7e85.


text:
🛑 MegaConstruct is down

In c8cd0dd, MegaConstruct (https://www.megaconstruct.ro) was down:

HTTP code: 0
Response time: 0 ms

Resolved: MegaConstruct is back up in 2c356cc.


text:
🛑 Security & Telecom Systems is down

In 9d23070, Security & Telecom Systems (https://security-telecom.ro) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Security & Telecom Systems is back up in 4fc01fe after 12 minutes.


text:
🛑 Security & Telecom Systems is down

In 355e5e9, Security & Telecom Systems (https://security-telecom.ro) was down:

HTTP code: 403
Response time: 691 ms

Resolved: Security & Telecom Systems is back up in 5a7fd87 after 13 minutes.


text:
redis-commander cannot connect to password-protected redis when running in Kubernetes

we ran into a complicated issue when trying to deploy redis and redis-commander in Kubernetes.
redis-commander was not able to connect onto a password protected redis db, even after correctly setting REDIS_HOST, REDIS_PORT, REDIS_PASSWORD in yaml deployment.
We did some debugging into the running container and observed that setting "REDIS_HOST=redis" resulted in " --redis-port tcp://10.0.24.23:6379" on the command line.
We gave up due to our project timeboxing and changed "args" in the K8S deployment:
...
image: elkcommoncontainer.azurecr.io/redis-commander:2020-03-05
args: ["sh", "-c", "cd /redis-commander; /usr/local/bin/node ./bin/redis-commander --redis-host redis --redis-password SECRET "]
...
To make matters worse, we were unable to reproduce the bug with docker or docker-compose on a developer box. I suspect that either the entrypoint.sh is wrong for Kubernetes or there is a bug in the node module "redis-parser" in lib/parser.js
excerpt from our logs:
Creating custom redis-commander config '/redis-commander/config/local-production.json'.
Parsing 1 REDIS_HOSTS into custom redis-commander config '/redis-commander/config/local-production.json'.
node ./bin/redis-commander --redis-port tcp://10.0.24.23:6379 --redis-password
Using scan instead of keys
Found long tcp port descriptor with hostname in redis-port param, parse this as host and port value
No Save: false
listening on 0.0.0.0:8081
access with browser at http://127.0.0.1:8081
Redis Connection 10.0.24.23:6379 using Redis DB #0
setUpConnection (R:redis:6379:0) Redis error ReplyError: NOAUTH Authentication required.
at parseError (/redis-commander/node_modules/redis-parser/lib/parser.js:179:12)
at parseType (/redis-commander/node_modules/redis-parser/lib/parser.js:302:14)
redis command "command" not supported, cannot build dynamic command list for (R:redis:6379:0
{ ReplyError: NOAUTH Authentication required.
at parseError (/redis-commander/node_modules/redis-parser/lib/parser.js:179:12)
at parseType (/redis-commander/node_modules/redis-parser/lib/parser.js:302:14) command: { name: 'select', args: [ '0' ] } }

Its an Kubernetes problem, not Redis-Commander.
As you deployed an "redis" service into the same namespace its automatically providing an environment variable REDIS_PORT with the tcp:/... value.
Some time ago i added a fix for that to correctly parses this redis connection url and use this instead of throwing an exception (no valid port number) to allow to-configurations inside docker-compose and kubernetes environments. Thats where the line
Redis Connection 10.0.24.23:6379 using Redis DB #0

cames from...
To solve your problem:
a) As you use REDIS_HOSTS env var and not the ones to setup a single connection just add the env var REDIS_PORT with an empty string to your kubernetes deployment. - this connection info is ignored than
b) use this connection (as there seems to be a redis running) and provide the needed password via REDIS_PASSWORD or REDIS_PASSWORD_FILE env var.

face-palm :-)
yes, you are perfectly right. I was using "REDIS_HOSTS" instead of "REDIS_HOST"

Thanks for the updates. I'll close this. When there are other questions please open a new issue.

authors: omichels sseide

repo: joeferner/redis-commander


text:
pwhois errors when a blank line finds its way past one of the regexes

when querying pwhoiis x.gg, the following pattern appears:

Name servers:
ns1.subdomain.com
ns2.subdomain.com

WHOIS lookup made on Thu, 09 Jul 2015 16:59:28 BST

pwhois matches a blank line here are tries to run match.split()[0] which results in an index error

You're on a roll :)
I'm going to have a look at these (and other outstanding issues) soon. Probably tonight or tomorrow, actually.
One sidenote; the commit in your own repository that fixes this, seems to mix indentation - it uses spaces rather than tabs for indentation. I'm not sure what editor you're using, but you'll probably want to look into configuring it to automatically recognize the indentation type. That mixed indentation also appears to be present in your outstanding pull request.

I'm using vim, and I have it set to automatically use 4-space tabbing for *.py files

You'll probably want to have a look at this extension, then. It'll derive the correct indentation from the file itself (as long as it's consistently indented, which pythonwhois should be).

license: WTFPL


text:
Fix creating github releases CI

See https://github.com/taiki-e/upload-rust-binary-action/issues/10

I think this should fix it. Closing for now, we'll see in the next release if things work out.

repo: joepio/atomic-data-rust


text:
[Bug][rubysrc2cpg] - block parameter without name is throwing error

Describe the bug
The following code sample fails to parse
    def build(&)
        another_method_call(&)
    end

However, the below sample works.
    def build(&a)
        another_method_call(a)
    end

@karan-batavia as you resolved this one - https://github.com/joernio/joern/issues/3168. So tagging you for this ticket.
cc: @xavierpinho

@xavierpinho , this looks straightforward. I'll take this up before #3189.

Closed by #3204.

Closed by #3204.

I believe we still need to support  another_method_call(&) from the original sample though. I'm not sure how this should be modelled yet.

Closed by #3204.

I believe we still need to support  another_method_call(&) from the original sample though. I'm not sure how this should be modelled yet. For the parser though, this should be enough:
blockArgument
    :   AMP expression?
    ;

Ah, yes. I didn't take this into account. Argument name could be optional too. Will look into this.

repo: joernio/joern


text:
Avoid corruption of headers dict passed by client to Client.request

Before this the Client.request method was able to corrupt the headers dict
passed by the user, since all complex objects are passed by reference.

@hades @jaitaiwan and I just took over maintaining this and are trying to get things back up to snuff. Any chance you got a test for this in a fork somewhere?

No, sorry.

authors: hades joestump


text:
Improve 10-minute example by adding reading from STDIN

The 10 minute example does a good job on explaining how to display STDOUT, yet fails to (somehow interactively?) read STDIN input from the user back to the running script. I'd appreciate an example (or an amended 10-minute example) on how to do this.
I'd appreciate being shown how to bring the classic display-read-compute-display shellscripts to the browser:
#!/bin/bash
echo "Some initial text."
echo "Now enter your input text: "
read sometext
echo "You entered --${sometext}--."
(...)

This works quite well using the developer console, as it has an "input" field visible all the time (which can be used once an input is required). But how to bring such an input field to the example html stays unclear.

Here is small migration from count.html to greeter.html that would work with greeter examples:
https://gist.github.com/asergeyev/a33f0f595ff551a5b8d3
Your multi-line output is tiny bit different, it might require appending to some HTML element instead of resetting it.

I think it would be clearer if we created a tutorial dedicated to reading stdin.
I'd also like to add a tutorial on how to build a chatroom (which implies sharing state between programs).
Leaving this issue open as a reminder to do it.

I'd also like to add a tutorial on how to build a chatroom (which implies sharing state between programs).

I'd say this is part of the underlying script.

Is the addition of tutorials and examples going to hold up releases ?
I think unit tests should precede examples and tutorials.
On 5 March 2015 5:33:19 pm AEDT, ctshh notifications@github.com wrote:

I'd also like to add a tutorial on how to build a chatroom (which
implies sharing state between programs).

I'd say this is part of the underlying script.

Reply to this email directly or view it on GitHub:
https://github.com/joewalnes/websocketd/issues/135#issuecomment-77314326

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Agreed as long as the documentation is written by the same people that do the code. If you'd outsource documentation to someone else though.... ;)

Re releases: Documention (including tutorials, website, examples) and the underlying code itself is constantly improving and being released incrementally. Sometimes it makes sense to release them in lock step, but most of the time they'll just be released when ready assuming there's no negative side effect.
Re unit tests: These are internal implementation details. It's not an API, it's an end user tool and most users don't even know what language it's built in (nor should they). So I don't see unit tests as a valuable addition to the end user learning process - in fact they're more of a distraction. Please don't read that as me being against unit tests - I am absolutely for them, just not in the context of this documentation discussion.
Re who writes the docs: That's me.

Before having found this thread I wondered why the recommended syntax is not
my-program | websocketd --port=8080
as long as the program does not expect to read from stdin, such syntax makes more sense to me and it avoids --passenv.

ha :) @joewalnes if we would allow this kind of syntax it could solve demuxing problem once and for all.
But that causes need for flag that would be incompatible with cmd... making it into something like vmstat 1 | websocketd --port=8080 --pipe...

This is a wildly different case. Non interactive, output only, broadcast.
Does it buffer responses (eg store data so when clients connect it gets replayed?).
It's so different I would make it another tool. It's a very useful tool, I just wouldn't have it in websocketd. Too confusing. Also WebSockets are overkill - I would use EventSource instead: https://medium.com/@joewalnes/tail-f-to-the-web-browser-b933d9056cc

I came from exactely this article in which you recommend to use websocketd. You are right about the question of buffering for multiple clients - one would have to define a buffer length in number of lines so every new client gets send the buffer first after receiving following lines as broadcast to all connections. If buffering is not needed, we could open and write to a named pipe and let websocketd read from this pipe:
$ mkfifo my_pipe
$ vmstat 1 -n > my_pipe &
$ websocketd --port 8080 cat my_pipe

Unfortunately this hack requires to manually set up the pipe and do cleanup afterwards, why not let websocketd do it?

we're way off topic here but, Nope your suggestion with mkfifo would not work since each new cat would steal data from previous one, you could not make them concurrent.

Ooops hit wrong button!

Indeed, we are off topic.
@nichtich If you want to continue this discussion about different ways of streaming to multiple clients, please can you start a new issue for discussion. This issue is about something entirely different.
I also recommend reading #95, #50, and #132 to get some context about broadcast from similar discussions.
Leaving this issue open as the original documentation related issue is still todo.

I just created an example that demonstrates two way communication using c++: https://github.com/joewalnes/websocketd/wiki/CPP-Input-Output-Example

@mbbackus I think your example needs to be changed to react to end of input stream. It also should be fixed for errors (see further below).
When web-client disconnects, websocketd closes stdin of the running command. When command is still running couple seconds later (which means resources are used for something that does not do any work), websocketd would start using signals to terminate it.  That outcome is somewhat "error handling" rather than normal.
Also any command that websocketd is supervising should be possible to use on it's own, say with test stream of input data. Your command would not ever  finish, try "echo 1234 | ./example", it should acknowledge message arrival once and finish. Currently there is some problem that causes code continuously say that same message arrived again and again.
Also at least my default compiler was not able to build your code until I added unistd.h for usleep to work. Which IMO is part of another problem, you try to use global variable to pass message between threads with futex but only reading from that variable once a second. This means that thousands of messages could be skipped for a client that's fast enough to send data to client.  Something like "seq 1 10 | ./example" should also work and handle 10 distinct input messages.

The code you see here is a basic example of two way communication. I compiled and tested it before posting it. It's similar to what's on my robot. Sorry it's not working for you. Feel free to change it as you see fit. I was just so grateful to the guys that made this available that I thought I'd pay them back by helping out a little with the documentation.

I just wonder if you can finish it.
BTW if your program also not reacting to stream closing and you run it with websocketd and --loglevel=debug  you might see that KILL signals are getting issued, which is really quite an overhead on everything.

authors: aj664 asergeyev ctshh joewalnes mbbackus nichtich

repo: joewalnes/websocketd


text:
Request: Configuration file

I've been using Websocketd for some time now and its a really useful tool. However, when there are multiple instances of websocketd on a development server, utilized by multiple people for various purposes, it becomes a real nuisance to take care of the machine in the event of an accident when there are multiple processes using 10+ parameters in their command line, expanding over 3+ lines in a process list.
Generally I believe it would be quite easier for websocketd users as well if the settings were defined in a standalone config file, rather than passed as arguments. If this was C, Python, PHP, or Bash I would've spent the couple of hours needed to expand the functionality of config.go and filed a PR, but given that websocketd is based on Go, at which I am not fluent, I'd prefer to leave that to the professionals - you guys.
I hope you understand my point and you will agree with me that passing settings as 10+ script parameters is easier and quicker to do for a prototype, but for the long run - its just unprofessional. A config file is the better approach and I do believe that you have reached the point to integrate this given the age of websocketd.

I don't mind a conf file...
Could you propose format for it so others could weight in here?
I just think command line flags would stay and have precedence anyway.

Thank you for the reply.
I didn't mean to imply to replace command line parameters as a whole, just implement a way for a config file to be used instead. In turn that would render far shorter line in the process list.
The config file can have a single general location, acceptable across a variety of distros, like /etc/websocketd.conf with settings formatted in a similar fashion to:
[Network]
#interface to bind to
address=127.0.0.1

#port to listen for connections
port=443

#HTTP port to redirect to canonical `port` address
redirport=8443

[SSL]
#Whether to use SSL encryption
ssl=false

#path to SSL certificate in PEM format, when ssl=true
sslcert=/tmp/domain.ssl

#path to SSL private key, when ssl=true
sslkey=/tmp/domain.rsa

[Headers]
#custom headers for any response
header='websocketd server'

#custom headers for all but WebSocket upgrade HTTP
header-http='websocketd server'

#custom headers for successful WebSocket upgrade
header-ws='websocketd server'

[Operational]
#Log level, one of: debug, trace, access, info, error, fatal (default "access")
loglevel=access

#Restrict upgrades if origin does not match the list
origin='127.0.0.1:443'

#Whether or not to restrict WebSocket upgrades if the origin and host headers differ
sameorigin=true

#Use experimental binary mode
binary=false

#Time to start sending signals (0 never)
closems=100

#Max forks the server can spawn. 0 is unlimited
maxforks=0

#List of envvars to pass to subprocesses
passenv="PATH,DYLD_LIBRARY_PATH"

#Perform reverse DNS lookups on connecting remote clients
reverselookup=false

[Server]
#Directory base for WebSocket scripts
dir='/full/path/to/WebSocket/scripts'

#Serve CGI scripts from this directory over HTTP
cgidir='/full/path/to/cgi/dir'

#Serve static content from this directory over HTTP
staticdir='/full/path/to/static/content/dir'

[Other]
#Console for development purposes (cannot be used in conjunction with staticdir)
devconsole=true

The grouping of course would be just for ease of use to people new to websocketd. The names for the settings can be retained to keep a general namespace, allowing easier future code moderation when it comes to manipulating supported options.
A config without any comments or groups would be even smaller:
address=127.0.0.1
port=443
redirport=8443
ssl=false
sslcert=/tmp/domain.ssl
sslkey=/tmp/domain.rsa
header='websocketd server'
header-http='websocketd server'
header-ws='websocketd server'
loglevel=access
origin='127.0.0.1:443'
sameorigin=true
binary=false
closems=100
maxforks=0
passenv="PATH,DYLD_LIBRARY_PATH"
reverselookup=false
dir='/full/path/to/WebSocket/scripts'
cgidir='/full/path/to/cgi/dir'
staticdir='/full/path/to/static/content/dir'
devconsole=true```

I think I like idea of config (2) where flags just listed with values... And IMO quotes should be optional here... as semi-interesting outcome we may do comments allowed in all ways
[something]
; something
# something

would be just ignored on parsing
I'll probably take on this in few days unless someone else has more time for it :)

We will probably have
--config filename
to read that config values as "defaults" for flags. Any flag given would override the config (as it now overrides defaults)

Hi @asergeyev
any news about that?
(If I may, I think yaml or json would be a better move than windows ini file like format, much easier to get it flexible at several levels)

authors: asergeyev leolivier xPh03n1x


text:
Add swift greeter example

I've added a greeter example written in swift and also updated the README file.

Thanks @joewalnes for letting me know, that git handles file modes. :heart:
It looks like I've commited the example files with +x mode already.

Thanks - merged!

authors: Cosmo joewalnes


text:
Simplified business event for workflow task assignment

The current business event for workflow task assignment does not export the reference (RECID) of the source of the workflow.
This will cause issues for integrations that relies on having an exact key for sources of the workflow.
A new business event should be created, since the existing business event is internal and cannot be corrected.

Not relevant for Finance Toolbox


text:
Better Cocoapods integration

By declaring React/Core as a dependency we can easily add react-native-fs to our podfile

@dabrut Is there any difference in declaring React/Core vs React as in  https://github.com/johanneslumpe/react-native-fs/pull/82 ?

It's pretty much the same except React is deprecated

authors: dabrut johanneslumpe

repo: johanneslumpe/react-native-fs


text:
Blank page after revisiting the demo

First encountered by @tchmnn.

This occured since the CONTENT_API_SLUG was added in the current version of the starterkit.
The following note has been added to the README already:

⚠ Don't change the CONTENT_API_SLUG once you deployed your app publicly and thus a service worker is installed on clients. Otherwise fetch requests will fail and a blank page will show until the new service worker is activated, which then is only possible by closing the tab/PWA.


text:
Uncaught TypeError occurs when comparing two valid CFI

How to reproduce:
➜  foliate-js git:(d5d1541) ✗ node
Welcome to Node.js v22.9.0.
Type ".help" for more information.
> const CFI = await import("./epubcfi.js");
undefined
> CFI.compare("epubcfi(/6/12)", "epubcfi(/6/12!/4/2/2[preface],/22/1:441");
Uncaught TypeError: Cannot read properties of undefined (reading 'length')
    at compare (file:///Users/chrox/dev/foliate/src/foliate-js/epubcfi.js:171:37)
    at Module.compare (file:///Users/chrox/dev/foliate/src/foliate-js/epubcfi.js:166:36)
>

This patch should fix the issue:
Enumerating objects: 5, done.
diff --git a/epubcfi.js b/epubcfi.js
index cd16d2b..1829ace 100644
--- a/epubcfi.js
+++ b/epubcfi.js
@@ -167,7 +167,7 @@ export const compare = (a, b) => {
         || compare(collapse(a, true), collapse(b, true))

     for (let i = 0; i < Math.max(a.length, b.length); i++) {
-        const p = a[i], q = b[i]
+        const p = a[i] || [], q = b[i] || []
         const maxIndex = Math.max(p.length, q.length) - 1
         for (let i = 0; i <= maxIndex; i++) {
             const x = p[i], y = q[i]

Strictly speaking, it probably doesn't make sense to compare /6/12 and 6/12!/4/2/2[preface],/22/1:441 because the former is technically referencing an element in the package document, not the content document referenced by that element. I suppose it is an abuse of notation that feels rather natural to do, to treat it that way, but I'm not entirely sure whether it is really useful.

I described the cfi as valid cfi because it was taken from the section.cfi field. And there is a use case to compare a highlight or note with the TOC entries with CFI taken from sections. And the highlight or note can be located in a specific section/TOC entry. See
https://github.com/chrox/readest/blob/main/apps/readest-app/src/utils/toc.ts#L56
and
https://github.com/chrox/readest/blob/main/apps/readest-app/src/utils/toc.ts#L26

I described the cfi as valid cfi because it was taken from the section.cfi field.

Yes, it is a valid CFI, but technically, without an indirection (!) what it refers to is the <itemref> in the package document. Well, at least that's how I interpreted it.
But I suppose there's another case which is not currently supported by foliate-js. When you have a document that is embedded within a section, and when that document is not otherwise included in the spine, to reference fragments within it, you would need to have two or more indirections. And this should be sorted properly. (foliate-js doesn't handle having more than one indirection when generating/resolving CFIs, but that is a separate issue.) From this point of view, it does make sense to sort it this way if the content documents are seen as being embedded in the package document (forming a single "rendition").

And there is a use case to compare a highlight or note with the TOC entries with CFI taken from sections. And the highlight or note can be located in a specific section/TOC entry.

For getting the TOC entry, the progress.js module is specifically designed for that purpose. Currently, in <foliate-view>, apart from being used in the search() and addAnnotation() methods, it's also exposed as the getProgressOf(index, range) method. If a range isn't specified it will perform the same kind of match that disregards the fragment identifier in the TOC href, with the index of the section only, without using CFIs.
Note that you should not split on the #. In order to support Kindle files, the format of hrefs is considered internal to the book implementation and there's a splitTOCHref() method for splitting the href.

Great. I will switch to the splitTOCHref() method.

authors: chrox johnfactotum

repo: johnfactotum/foliate-js


text:
markdown filters are not handled correctly

#md ## References
#md
#md # ```@docs
#md # FlipX
#md # FlipY
#md # ```

outputs
``@example flip
# References
#md
``

``@docs
FlipX
FlipY
``

This turns out to be an upstream issue https://github.com/fredrikekre/Literate.jl/issues/121

A second read on the Literate's syntax book tells me that it should be
#md # ## References
#md #
#md # ```@docs
#md # FlipX
#md # FlipY
#md # ```

#md is only used to as filters and #  is used as a flag to tell Literate "this should be recognized as plain markdown format"


text:
Fix cuda kernel for Pascal & Cuda 6/6.1

When I left the other functions to use normal atomic add it seemed like a small speedup. 4.79 it/s vs 5.23 it/s
It works by just changing the parameter to _half though.

Thanks you!

@Ph0rk0z @johnsmith0031
Is line 634 supposed to say
atomicAdd(&mul2[n_cols * height * 8 + n_rows], res);

rather than
atomicAddHalf(&mul2[n_cols * height * 8 + n_rows], res);

?

Yes just fixed it.

Ooops!


text:
Update README.md

Update README.md to reflect new API design - ISSUE #11
HACKTOBERFEST :metal:

Thanks @nikje94 !

repo: johnsylvain/pagine