text:
Trim or ignore long lines

If ack finds a match in e.g. minified js file, or other files with just one or few very long lines, it will flood the output with the contents of the file and likely push all useful matches off-screen.
I would like an option to either ignore such matches altogether (maybe list the file name), or possibly to only show some number of characters worth of context around the match.

Ack should already be ignoring minified JS files.  What JS files is your ack finding?

Minified js was maybe a bad example because they usually have .min.js extension, but there are minified js files that don't have the extension. I think the Vaadin/GWT UI toolkit for one.
Also some tools produce minified html and xml files, which also cause problems with ack.

What happens when you grep these files?

I don't understand the question.
If I grep (or 'ack' or 'ack-grep', doesn't matter) these files and they have a match, I get a several screenfuls of text with a matches highlighted somewhere in the mess.

I don't understand the question.

Not a trick question.  Just wanted to know what grep did.  For the most part, I try to keep ack and grep behaving the same.

Well, in that case, both grep and ack fill the terminal with useless amounts of text. Depending on where I run the command, that can mean thousands of rows of scrollback, if I'm unlucky enough to have multiple minified files that match.
One possibility could be being able to define characters that work as line breaks depending of file format. E.g. if you find a match in a .js file with long lines, treat semicolons like linefeeds (for the purposes of -A -B and -C switches)

E.g. if you find a match in a .js file with long lines, treat semicolons like linefeeds (for the purposes of -A -B and -C switches)

That's a level of source awareness that we don't want to get into.

It wouldn't have to be language aware code, it could be an option, just like --type-set or --ignore-dir
This is probably only a problem with languages that can be minified in the first place, and those have to have some other statement separator, so it could be like --statement-separator or --record-separator or something similar.

A co-worker just IM'd me with same complaint about *.js. Since not all minifiers follow .min.js quasi-convention, there's much noise.  grep doesn't do any DWIM magic, we do, so expectations are higher of ack.

an option to trim (long|all) lines to KWIC (keyword in context) with specified window before/after start of match (default screen width  when piped).
For a proper KWIC index, the start of match will be centered on screen even if left context less than half screen
an option to ignore lines > NNN characters

Does grep not have an option to trim lines?  I'm not seeing one.

which grep ? IDK.  If gnu grep has one it would be good to be compatible, but we can be better.

Adding this kind of option gets things pretty ugly what with highlighting the matches etc.
It sounds to me that the solution should probably be more towards people excluding files to not search files they know they want to ignore.  Truncating result lines so they don't explode your screen is just saying "Let's work hard to make things more palatable that we don't even want to see anyway."

Truncating result lines so they don't explode your screen is just saying "Let's work hard to make things more palatable that we don't even want to see anyway."

I agree they should say --perl or --type=clojure  if that's what they mean, which ignores all JS whether we can tell it's .min.js or not.
And if both the minified and full JS are in the tree, they should arrange .ackrc to ignore the minified directories. We detect .min.js if that is in use. Adding ignore .js in .ackrc in dir containing minified only may help sometimes.  If we consulted .gitignore it might help DWIM otherwise. Classifying files with average line length() > 1024  as binary might help. But allowing users to say ignore lines > 1024 or 256 or whatever is good too.
If only the minified is available -- e.g. not shipped, or compiled from Clojure -- and they want to see where the JS calls the back end, maybe specifically having asked for --type=js or looking for all mentions of domain-specific word, seeing statements instead of lines would help them with minified files.
( Maybe that's setting $/  aka $INPUT_RECORD_SEPARATOR $RS ? I don't think we support that ... nor can we ? Might require a preprocess filter co-routine to expand and give statement numbers as faux line numbers?  That's less ugly and modular but still invasive. )

In some cases it's actually desirable to see results within minified js (assuming it's all that's available) to put back-end code into context of a front-end call, for instance. Having the option to truncate excessively long lines at a specified limit or otherwise provide limited contextual results would be flexible and useful in a number of common use cases, rather than just excluding the files outright.

I was (am?) a fan of the old KWOC/KWIC formats. (I say 'was' because who really needs a lineprinter corpus index (concordance) in the 21stCentury! But context index is still plausibly useful for text searching online.) That --output lets me generate KWOC and nearly-KWIC thrills me.  I don't think we need --kwic-.... options. Maybe I can write-up a KWOC/KWIC idiom or wrapper for documentation ...

What are KWOC/KWIC?

On Tue, Mar 14, 2017 at 12:46 AM, Andy Lester notifications@github.com
wrote:

What are KWOC/KWIC?

https://en.wikipedia.org/wiki/Key_Word_in_Context
--
Bill Ricker
bill.n1vux@gmail.com
https://www.linkedin.com/in/n1vux

Closed and moved to wiki.  https://github.com/petdance/ack2/wiki/Feature-requests

Could you reconsider this? It's been an issue in ack for 10+ years. I can't imagine anyone considers scrolling through pages of the following to be desired functionality, and it's a common occurrence in most codebases these days.

The simple way to do is to add an .ackrc compatible option that consists of a boolean flag and/or a width max limit. You don't have to get fancy with the trimming: put the matches in the center of the buffer when the line exceeds the width. This gives context on both sides and it's OK if the default buffer width results in a few lines of visual output (instead of thousands).

It's been an issue in ack for 10+ years.

It's been an issue with grep since the beginning of time.
I don't understand what you mean by "put the matches in the center of the buffer when the line exceeds the width."

line: the long matched line in a file
match: the text that is highlighted (substring of line)
buffer: the truncated line storage
The issue with truncating lines is that it isn't clear how to display a partial line as opposed to a full line. By making the buffer at least as large as the match, then you can find the middle of the buffer by dividing the buffer length by two (and the middle of the match by dividing its length by two), and then you can put the middle of the match in the middle of the buffer. This gives equal context on either side of the match. This is a simple and good enough way to do it, though it is not the only way.

Let's not get bogged down in the details of how it would be implemented internally, and keep it to the user interfece.
It sounds like you're suggesting that in the case of overrunning --maxwidth that ack print out some portion of the line that has the match on it, right?  Something like this?
47: ...  stuff that is from the middle of the line **MATCHED TEXT** more but not to the end...

How do we handle multiple matches per line?  What if acked on a comma and there are 1000 matches on the line in your minified javascript?
How do we handle lines that are longer than --maxwidth that show up in the context lines when using -A, -B and -C?
I have ideas for output that I don't want to put out here yet, but I don't see a way to handle the two scenarios above and still display matches.

It sounds like you're suggesting that in the case of overrunning --maxwidth that ack print out some portion of the line that has the match on it, right? Something like this?

Yes
I think the way to think about an option like --maxwidth is as a UI nicety instead of as something that plays nicely with rigorous output parsing scripts. The way I (and I presume from the Google hits, a lot of other people) use ack is as a nicer grep: I want to know what files trigger, primarily, and then secondarily it's nice to see what line numbers and what context, but ultimately I'm going to open that file in my editor and jump to the matched keyword.
So for

How do we handle multiple matches per line? What if acked on a comma and there are 1000 matches on the line in your minified javascript?

my answer would be: we could highlight only those matches that fit in the buffer starting with the first match. Now the objection to this is that you drop some valid matches, but for the stated use case, this is OK---it's only not OK if you're doing some kind of piped scripting or something.
One way to signal this to the user is to make the name obviously not script-friendly, e.g. --pretty-maxwidth or somesuch. Another way to make it play nicely with scripts is, possibly, to detect when you're outputting to a terminal and only do it then, say --terminal-output-maxwidth, and this functionality is, I think, already built-in for the coloring.
For -A, -B, -C I think the answer is to truncate the other lines as well, and that it would be fine to left-align and right-truncate, though I'm not as experienced with these options.

For -A, -B, -C I think the answer is to truncate the other lines as well, and that it would be fine to left-align and right-truncate, though I'm not as experienced with these options.

Realistically, the default buffer widths that people are going to use will be orders of magnitude smaller than the largest untruncated line, meaning that if you're displaying untruncated lines there, it's not like the output is going to be readable anyway.

Is it really meaningful to show the match on the line?  Vs. just saying "There are 14 matches in this 47,320 character line", for example?

For me, yes. I use the context to determine whether it was a "desirable" match or not. The group of people I've known over the years that use ack is fairly large and all developers, and the typical use case is "someone mentioned such and such string, or it came up somehow in my work, and now I need to know where all instances of 'isInitialBlankNavigation' occur in the codebase."

So what does the sample output look like?  How do we denote it's a partial line?

If this is our normal output:
t/illegal-regex.t
33-
34:    return subtest "test_ack_with( $testcase: @args )" => sub {
35-        my ( $stdout, $stderr ) = run_ack_with_stderr( @args );

maybe the partials look like
t/illegal-regex.t
33-
34*  ... whatever this that other subtest this other thing that goes very ....
35-        my ( $stdout, $stderr ) = run_ack_with_stderr( @args );

Kevin,
I'm planning to include in Ack3's cookbook section hints on displaying
selective context and may even get Andy to include features to do better at
it too.
Workarounds for context in Ack 2 for KWIC/KWOC Keyword indexes (with short
input lines):

     ack2 --output can sorta do KWOC/KWIC with evil before/after vars
     -

        --output '$&^I$'"'"'^I|| $`' # *KWOC*
        -

        --output '$`^I$&^I$'"'" # *pseudo KWIC*
        -

        but they’re nasty from Shell since mix quote and dollar
        -

        and tabs don’t truly line up if width variation exceeds a tab
        width

For your purpose, monsterline uglified JS/html/etc, I'll make a long line
version of ack-standalone and ack for perl 'use' statements.
perl -pE 's/\n$//' ack-standalone | ack2 --output '$1       $2      $3'
'(.{0,20})(\buse \w+(?:::\w+)*[^;]{0,40};?)(.{0,20})'  | less
( Those are ^V^I tabs )
Note that it steps over 'use warnings;' when it immediately follows 'use
strict' which may be ok because it finds each cluster. But  can get each
this way
perl -pE 's/\n$//' ack-standalone | ack2 --output '$1       $2      $3'
'(.{0,20})(\buse \w+(?:::\w+)*[^;]{0,40};?)((?=\buse)|.{0,20})'  | less
Bill
On Mon, Apr 24, 2017 at 9:24 PM, Kevin Lawler notifications@github.com
wrote:

For me, yes. I use the context to determine whether it was a "desirable"
match or not. The group of people I've known over the years that use ack
is fairly large and all developers, and the typical use case is "someone
mentioned such and such string, or it came up somehow in my work, and now I
need to know where all instances of 'isInitialBlankNavigation' occur in
the codebase."
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/petdance/ack2/issues/596#issuecomment-296865214, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AANS-MTqvMHv5vXy-UohyvQMAVb3810Pks5rzUsxgaJpZM4H6lqz
.

--
Bill Ricker
bill.n1vux@gmail.com
https://www.linkedin.com/in/n1vux

Use three dots on any side that's elided. Potentially color the dots. (Putting these "outside" is fine or you can put them inside and do the more complicated string math.) If you really want to get fancy you can put the number of dropped chars in brackets outside any elided side.

On Apr 24, 2017, at 6:46 PM, Andy Lester notifications@github.com wrote:
So what does the sample output look like? How do we denote it's a partial line?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

More than 2 years later, what's the status on this? I'm also having the same issue.

No more work is being done on ack2, but a related request came in the other day on ack3, and I think it might helpful here if it were implemented.
I welcome input on that ticket: https://github.com/beyondgrep/ack3/issues/234

I too would like some sort of feature to deal with suppressing or truncating matches from long lines.   My workaround is to filter the output of ack using grep to remove results that are longer than 300 characters.
ack my-seach-string | grep -vE '.{300,}'

but because  using ack with a pipe turns off color by default, I usually turn that back on with a flag:
ack --color my-seach-string | grep -vE '.{300,}'

It would be nice to be able to put something in my .ackrc to ignore or truncate long lines by default that I could then override on the command line if I needed to.

@stephenostermiller Please go comment on the current ticket at https://github.com/beyondgrep/ack3/issues/325

authors: digeomel jmhutch kevinlawler n1vux petdance stephenostermiller wheany


text:
--pager="less -R" = command not found

If you add --pager="less -R" to your .ackrc file and the run it  you get something like this:
(venv) mbp0 AWS-43 $ ack TODO
sh: less -R: command not found

Hi @jeffmacdonald, thanks for the report!  This is duplicate of #447; you can solve the issue by omitting the quotes around less -R.

I filed an issue #601 to document the options.

Thanks for the info!

source: gharchive/issue

authors: hoelzro jeffmacdonald

license_type: permissive

license_source: bigquery


text:
Inline calls to print_line_if_context

In the main loop, if the line isn't a match, we do this:
            else {
                chomp; # XXX Proper newline handling?
                print_line_if_context( $filename, $_, $., '-' );
            }

If we're not doing context (the most common case), then the chomp is unnecessary and the print_line_if_context is unnecessary.
Let's look at inlining that code, since we're not going to be making any more functionality changes in ack2, and keep this in mind in ack3.

In my basic testing, it sped things up about 4%.

Can't inline this.


text:
Support Leader Access

Could we get allowance for Support Leaders to use the add-on? It just displays an error message when trying to open within Terrain. I've tried doing a full clear of the cache and cookies with Terrain first to no avail.

Hmm I am not sure how the support leaders work, I have tested with youth member accounts. I might need to do a screenshare with someone who has one of these accounts. I did not know there was even a support leader option. Do you know how you get them setup? I might be able to get one for my wife and can test with that.

The Support Leader roles within Terrain are for District Leaders and above. We can request access to another formation for a set duration as either Read/Write or Write only. If we get Write access, we can do everything a Group Leader can within that Formations terrain.
This is different to just being added to a formation as an adult leader, as when you get added you can view members and modify roles and UC, but you can't change Patrols unless you're from that group; Support Leader role lets you modify patrols.
It also has a 'Branch Life' section seperate from Group Life where you can view all the groups you have access to in one place.
Happy to do a show and tell some time. Topo is having to make a few changes too as we had it working, but a Terrain Update over Xmas has broken whatever was working.

Now I know what you are talking about my DCL has been having the same issue with Topo.
Can you do me a favor and go to Developer Tools in chrome and run some code to give me a list of the roles you have?
Screenshot is below, steps are 1: click chrome menu, 2: click more tools, 3: click Developer Tools, 4: click Console Tab, 5: Paste the code in the cursor (as shown in the yellow box) and press Enter. Then copy the infomation in the Blue box and send it back to me.

Find attached listing. Just a tad long.

Thanks for that, it looks like it has to do with the new roles. Now I can see the names of the permissions, like support-leader-group-readwrite I should be able to add them to my code so it knows what to do. I will try to sort this for the next release.

I am fairly sure I have solved this issue but I can't test it as I dont have the role. The fix will be in the next release, I will keep this one open until I can verify that it is working after the release.
Also, apologies for not giving you the code in text, I just re-read this issue and the images and noticed I only gave you the code in a screenshot. Sorry!

Hey Pete, just tried it and it's all working perfectly.

Awesome, thanks for the update. Let me know if there is any other summary views or features that would be handy at the district, region and branch levels.

authors: pete-mc wilsteady

repo: pete-mc/Summit

license: MIT

license_source: github-api


text:
new bigInt(array of bytes) does not work

In Java, to manipulate a textual string (for example for RSA) you would convert the string to bytes, construct a new BigInteger with the bytes and then do modPow(...). The result would be the encrypted string.
This however does not work with this library. Could this feature be added?
My javascript equivalent test (with BigInteger.min.js version 3bd64ef38bba5e05912922f987f1b16e65798591):
var test = "bla";
var bytes = [];

for (var i = 0; i < test.length; i++) {
    bytes.push(test.charCodeAt(i));
}
var bInt = new bigInt(bytes);
console.log(bInt + ", " + bigInt.isInstance(bInt));
bInt.modPow(10, 100);

And this yields the following output (Firefox console):

[object Object], false
TypeError: bInt.modPow is not a function

Concluding that the constructor failed to create the object.

The problem isn't that new bigInt(bytes) isn't working correctly, the problem is that no such constructor exists.
First, bigInt is just a function, not a constructor, so using new will mess things up. (new is used internally for the BigInteger and SmallInteger classes, but the API doesn't expose those).
Second, bigInts are represented internally using base 107, so I don't feel comfortable providing a method for creating a bigInt from an array of bytes, because people might assume that doing so is the cheapest/most low-level way to create a bigInt, while it actually would be a fairly expensive operation requiring base conversion.
You can do what you want using a slightly different approach: generate a hex string from the bytes, and then create the bigInt using the hex string:
var test = "bla";
var hexString = "";

for (var i = 0; i < test.length; i++) {
    hexString += ("0" + test.charCodeAt(i).toString(16)).slice(-2);
}

var bInt = new bigInt(hexString, 16);
console.log(bInt + ", " + bigInt.isInstance(bInt));
console.log(+bInt.modPow(10, 100));

Which outputs

6450273, true
49

Let me know whether that resolves your question.

Oh my bad, I assumed it was a

authors: limnic peterolson

license: unlicense


text:
Alarm control unit not available

Hi Petr,
can you help me?
I can log in and set the central locally without authentication problems.
I can install and configure the addon from hacs but then the control panel can’t find the alarm central.

Modello dispositivo:DS-PWA96-M-WE
Versione Firmware:V1.2.8 build 230110
Versione Web:V4.25.1 build 221212
sensors:
DS-PDMCX-E-WE
DS-PDPG12P-EG2-WE
DS-PDPC12P-EG2-WE
DS-PDMCK-EG2-WE
DS-PDMC-EG2-WE
sirens:
DS-PS1-I-WE
DS-PS1-E-WE
tag readers:
DS-PT1-WE
wireless keyfob:
DS-PKF1-WE
I attach the debug
error_log.txt

I see main problem. AccessModuleType and that was fixed with 0.6.4.
Next thing is Invalid detector type magnetShockDetector but we are not crashing on this.
Please update to version 0.6.4 and restart homeassinstant.

You are great!!!!
Thank you very much.
It seems to work fine now

I still don't see the status of the batteries but it's a minor problem

Everytime if something is not working. Issue + log. We will sort it out.

More type of detectors are on the way.

Also batteries are issue #16, currently working on it how to implement this.


text:
The meaning of progress

When I implement trace collection in your osdi21-artifact branch.
I am a little confuse the meaning of progress in validation-2048.csv.
I obtain progress information via get_progress.
However, it seems not mismatch your released trace information.
My collected batch=128 trace information.

My collected batch=2048 trace information.

May I ask some suggestions to mitigate the mismatch?

Hi @gaow0007, apologies for the late reply. progress means the number of iterations discounted by the statistical efficiency. For example, 200 iterations at 50% statistical efficiency translates to "progress" of 100. This is based on theory so may not exactly match in practice.
For your experiments, one thing I can think of is to make sure you are changing the scaled-up batch size (M) and not the baseline batch size (M_0). The batch_size parameter for the DataLoader class is the baseline batch size for Pollux. To set a fixed scaled-up batch size, you should set the TARGET_BATCH_SIZE environment variable instead. Sorry this part is not well documented.

Thanks for your explanation.

A further question: Where does TARGET_BATCH_SIZE  work in the code? I fail to search such key word. @aurickq

A further question: Where does TARGET_BATCH_SIZE  work in the code? I fail to search such key word. @aurickq

https://github.com/petuum/adaptdl/blob/osdi21-artifact/adaptdl/adaptdl/torch/data.py
On line 266.

Thanks for your reply.

repo: petuum/adaptdl


text:
Save bonding info to file after receiving it

Hi
I am trying to figure how to save the bonding info to the /etc/btferret.dat file right after pairing has succeeded. Right now, when I start the server from python3 btferret.py and then s and LE server - the pairing information gets saved to the file in etc when I close the server.
The problem with that kind of an approach is that if my application closes unexpectedly, I might lose the information in memory.

The btferret.dat file is written on program termination by this call in close_all in btlib.c:
at LINE 5115
rwlinkey(1,0,NULL);

There is some protection against close_all not being called explicitly by using atexit which specifies functions that are called when the program exits:
at LINE 2017
atexit(close_all);

This should work when the program terminates, but if not, to save the data at any other time, call rwlinkey(1,0,NULL). In C, this is pretty simple, just declare rwlinkey in btlib.h or in your code. It will then be callable from your C code.
void rwlinkey(int rwflag,int ndevice,unsigned char *addr);

In Python it is more complicated because function calls go via btfpython.c, and rwlinkey would need its own entry. An easier option is to piggy-back on an existing Python call. I would suggest Set_flags:
at LINE 13062 in btlib.c modify as follows

void set_flags(int flags,int onoff)
  {
  if(flags == 0)
    {
    rwlinkey(1,0,NULL);
    return;
    }
  if(onoff == FLAG_OFF)
    gpar.settings &= ~flags;
  else
    gpar.settings |= flags;
  }

Then recompile the Python module with "python3 btfpy.py build".

Call from Python code via:

  btfpy.Set_flags(0,0)

I don't think there will be any problems with this, but I cannot be absolutely sure.

@petzval thanks for the detailed info - I will try this out and report here.
Are you open to accepting a PR where I add this as a separate API? I'd rather not maintain a fork if I can avoid it.

I've had a careful look at rwlinkey and there is a problem with calling it before program termination. If the device disconnects, a re-connection during the same session will probably fail. Some minor changes will fix this, and a revised version of rwlinkey is below. Rather than maintaining a PR, I would rather just add a new function to save the pairing info and do a full test to make sure it works . I can also see the value of adding an empty user-defined function inside btlib.c. These will be in a new version within a week or so.
void rwlinkey(int rwflag,int ndevice,unsigned char *addr)
  {
  int n,k,i,j,addcount,flag;
  unsigned char *badd,*key;
  struct devdata *dp;
  FILE *stream;
  static char *fname = "/etc/btferret.dat";
  static int count = -1;
  static int delflag = 0;
  static int writeflag = 0;
  static unsigned char zero[6] = {0,0,0,0,0,0};
  static unsigned char *table = NULL;

  if(rwflag == 0)
    {
    // read
    if(ndevice > 0 && (dev[ndevice]->linkflag & (KEY_NEW | KEY_FILE)) != 0)
      return;   // dev[]->linkey is good

    if(count < 0)
      {
      count = 0;  // in file
      stream = fopen(fname,"rb");
      if(stream == NULL)
        return;

      n = 0;
      count = fgetc(stream);

      if(count != 0 && count != 0xFF)
        {
        k = count*22;
        table = (unsigned char *)malloc(k);

        if(table != NULL && fread(table,1,k,stream) == (unsigned int)k)
          n = 1;
        }

      fclose(stream);
      if(n == 0)
        {
        count = 0;
        NPRINT "Read key data failed\n");
        return;
        }
      }

    for(k = 0 ; k < count && table != NULL ; ++k)
      {
      badd = table + k*22;
      key = badd+6;
      if(addr == NULL)
        n = devnfrombadd(badd,BTYPE_CL | BTYPE_LE | BTYPE_ME,DIRN_FOR);
      else
        {
        n = bincmp(badd,addr,6,DIRN_FOR);
        if(n != 0)
          n = ndevice;
        }
      if( (ndevice == 0 && n > 0) || (ndevice > 0 && n == ndevice) )
        {  // all on init (ndevice=0)  or ndevice only
        dp = dev[n];
        if((dp->linkflag & KEY_FILE) != 0 && bincmp(zero,key+10,6,DIRN_FOR) != 0)
          {
          for(n = 0 ; n < 10 ; ++n)
            dp->divrand[n] = key[n];
          dp->linkflag |= PAIR_FILE;
          }
        else
          {
          for(n = 0 ; n < 16 ; ++n)
            dp->linkey[n] = key[n];
          dp->linkflag |= KEY_FILE;
          }
        }
      }

    }
  else if(rwflag == 1)
    {  // write
    // update table
    if(writeflag != 0)
      {
      NPRINT "WARNING 2nd close\n");
      return;
      }
    writeflag = 1;
    flag = 0;  // no changes to table
    if(count > 0 && table != NULL && delflag == 0)
      {
      for(k = 0 ; k < count ; ++k)
        {
        badd = table + k*22;
        key = badd+6;
        n = devnfrombadd(badd,BTYPE_CL | BTYPE_LE | BTYPE_ME,DIRN_FOR);
        if(n > 0)
          {
          dp = dev[n];
          if(bincmp(zero,key+10,6,DIRN_FOR) != 0)
            {
            if((dp->linkflag & PAIR_NEW) != 0)
              {
              for(n = 0 ; n < 16 ; ++n)
                key[n] = dp->divrand[n];
              dp->linkflag &= ~PAIR_NEW;
              dp->linkflag |= PAIR_FILE;
              }
            flag = 1;
            }
          else if((dp->linkflag & KEY_NEW) != 0)
            {   // must be KEY_FILE also
            for(n = 0 ; n < 16 ; ++n)
              key[n] = dp->linkey[n];
            dp->linkflag &= ~KEY_NEW;
            dp->linkflag |= KEY_FILE;
            flag = 1;
            }
          }
        }
      }

    // count NEW additions not in table
    addcount = 0;
    for(n = 1 ; devok(n) != 0 ; ++n)
      {
      if((dev[n]->linkflag & KEY_NEW) != 0)
        ++addcount;
      if((dev[n]->linkflag & PAIR_NEW) != 0)
        ++addcount;
      }

    if(flag == 0 && delflag == 0 && addcount == 0)
      return;   // no changes

    if(count + addcount > 100)
      {
      NPRINT "/etc/btferret.dat file of paired devices is large\n");
      NPRINT "Recommendation: delete it and re-pair devices\n");
      }

    if(count + addcount > 254)
      {
      NPRINT "Too many paired devices - delete /etc/btferret.dat\n");
      NPRINT "file to reset and then re-pair devices\n");
      return;
      }

    stream = fopen(fname,"wb");
    if(stream == NULL)
      return;

    fputc(count+addcount,stream);
    if(count > 0)
      fwrite(table,1,count*22,stream);
    k = 0;
    for(n = 1 ; k < addcount && devok(n) != 0 ; ++n)
      {
      dp = dev[n];
      if((dp->linkflag & KEY_NEW) != 0)
        {
        fwrite(dp->baddr,1,6,stream);
        fwrite(dp->linkey,1,16,stream);
        dp->linkflag &= ~KEY_NEW;
        dp->linkflag |= KEY_FILE;
        ++k;
        }
      if((dp->linkflag & PAIR_NEW) != 0)
        {
        fwrite(dp->baddr,1,6,stream);
        fwrite(dp->divrand,1,16,stream);
        dp->linkflag &= ~PAIR_NEW;
        dp->linkflag |= PAIR_FILE;
        ++k;
        }
      }
    fclose(stream);
    }
  else if(rwflag == 2 && count > 0 && table != NULL && ndevice > 0)
    {  // delete
    flag = 0;
    for(k = 0 ; k < count && flag == 0 ; ++k)
      {
      badd = table + k*22;
      n = devnfrombadd(badd,BTYPE_CL | BTYPE_LE | BTYPE_ME,DIRN_FOR);
      if(n == ndevice)
        {    // found - remove
        flag = 1;
        delflag = 1;
        dev[n]->linkflag &= ~KEY_FILE;
        for(j = k ; j < count ; ++j)
          {
          badd = table + k*22;
          for(i = 0 ; i < 22 ; ++i)
            badd[i] = badd[i+22];
          }
         --count;
        }
      }
    }
  else if(rwflag == 3 && count > 0)
    {
    for(k = 0 ; k < count && table != NULL ; ++k)
      {
      badd = table + k*22;
      n = devnfrombadd(badd,BTYPE_CL | BTYPE_LE | BTYPE_ME,DIRN_FOR);
      if(n >= 0)
        NPRINT "%s (%02X) =",dev[n]->name,dev[n]->linkflag >> 10);
      else
        NPRINT "Unknown =");

      for(j = 0 ; j < 22 ; ++j)
        {
        NPRINT " %02X",badd[j]);
        if(j == 5)
          NPRINT " =");
        }
      NPRINT "\n");
      flushprint();
      }
    }
  }

I can now see other problems associated with calling rwlinkey twice, so I cannot recommend the changes I have suggested. A new version will have a fix.

Thanks a lot @petzval - will try it out and get back!

@petzval do you think it makes sense to have an event for that? Maybe LE_BONDED - so that user can take further action in the callback

authors: anujdeshpande petzval

repo: petzval/btferret


text:
”Brețcu”, ”Mărtănuș”, ”Oituz” are listed in the drop-down menu

Description:
When user writes ”Brețcu”, ”Mărtănuș”, ”Oituz” the locations appear in the drop-down menu next to the comune and the county witch is a part according to the law.
Precondition:
The website is up an running.

Step 1
Write in the search bar "Brețcu"

Expected results
The location appears in the drop-down menu as "Sat Brețcu, COVASNA (Brețcu)".

Step 2
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 3
Write in the search bar "Mărtănuș"

Expected results
The location appears in the drop-down menu as "Sat Mărtănuș, COVASNA (Brețcu)".

Step 4
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 5
Write in the search bar "Oituz"

Expected results
The location appears in the drop-down menu as "Sat Oituz, COVASNA (Brețcu)".


text:
Refactor CRC interfaces and implementations

This PR:

Creates a templated CRCChecker interface class, as well as CRC8 and CRC32 aliases which can be used as interfaces.
Removes inclusion of the Pufferfish/HAL/STM32/CRC.h header from driver files so that they can compile without the STM32 libraries.
Updates the CRC32C-based driver classes to take the CRC32 interface in their constructors, rather than an STM32-specific CRC32C class.
Generalizes the CRC8 software implementation to work for CRCs of any size in the templated SoftCRC class in Pufferfish/HAL/CRCChecker.h. This class subclasses CRCChecker and is usable both for any CRC8 and for CRC32C. It uses a table lookup-based algorithm rather than the naive bit-by-bit algorithm. Because it implements the CRC32 interface, it should be possible to use the SoftCRC32 as a drop-in replacement for the hardware-based HALCRC32 in unit tests by dependency injection, though I haven't written a unit test confirming this.
Defines a templated CRCParameters struct for initializing SoftCRC objects in the SFM3019 driver and other Sensirion drivers.
Simplifies the interface of SensirionDevice by passing the CRC implementation in the constructor, rather than passing in CRC parameters with every method call.
Creates Catch2 unit tests for CRC8 (with SDP3019 parameters) and CRC32C, matching the example inputs which were used in a unit test in the backend (though that test was deleted in #90 because we moved to a third-party library for CRC in python).
Adds clang-tidy checks for the Catch2 unit tests to the Github Actions workflow.
Fixes clang-tidy issues for the Catch2 Nonin OEM III unit tests written by Hemanth.

As discussed with Renji on Slack, this PR appears to work, so I will merge this PR in first. For records-keeping:

This project is licensed under Apache License v2.0 for any software, and Solderpad Hardware License v2.1 for any hardware - do you agree that your contributions to this project will be under these licenses, too? Yes
Were any of these contributions also part of work you did for an employer or a client? No
Does this work include, or is it based on, any third-party work which you did not create? No

source: gharchive/pull-request

repo: pez-globo/pufferfish-software


text:
!problems with training!

I have done all preparations for training,including apex, tinycuda. My torch version is 1.13.1+cu116.
Once I trained the first DFF, I came across such err as below:
Traceback (most recent call last):
File "train.py", line 21, in
from models.networks import NGP
File "/home/DFF/models/networks.py", line 3, in
import tinycudann as tcnn
File "/opt/conda/lib/python3.8/site-packages/tinycudann-1.7-py3.8-linux-x86_64.egg/tinycudann/init.py", line 9, in
from tinycudann.modules import free_temporary_memory, NetworkWithInputEncoding, Network, Encoding
File "/opt/conda/lib/python3.8/site-packages/tinycudann-1.7-py3.8-linux-x86_64.egg/tinycudann/modules.py", line 50, in
C = importlib.import_module(f"tinycudann_bindings.{cc}_C")
File "/opt/conda/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /opt/conda/lib/python3.8/site-packages/tinycudann-1.7-py3.8-linux-x86_64.egg/tinycudann_bindings/_86_C.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNK3c1010TensorImpl36is_contiguous_nondefault_policy_implENS_12MemoryFormatE

It seems that you failed to install tinycudann itself.
Did the tinycudann work by itself?
If it fails, it would be an issue with your installation of tinycudann. I cannot solve it in this thread. Please see the tinycudann repository.
And, note that DFF README uses 1.10.2+cu111. I didn't check if later versions work.

Ok，I created a new conda environment and solved this problem.

inycudann_bindings/_86_C

Can you show how you solve this problem? My instance is CUDA 11.7. Can you show your torch, cuda and CUDA verison? Thank you.

authors: PatrickDDj fangli333 soskek

repo: pfnet-research/distilled-feature-fields


text:
Speed up tests

This PR reduces extra test cases.

LGTM

authors: gwtnb okuta

repo: pfnet/chainer


text:
Use autospec in mock creation.

Use 'autospec'. Related to https://github.com/pfnet/chainer/pull/2037

LGTM!

authors: okuta zori


text:
doc: Move type annotation to description from signature

This is a resubmit of #241 to trainer-dev branch as it was out of synchronization.

/test

repo: pfnet/pytorch-pfn-extras


text:
Tags that start with an underscore may cause incorrect rendering

eg. :
#theme
#_theme
#the_me

Maybe it has something to do with Chinese characters?
#教程 #obsidian

#theme #_theme   #the_me

#_教程  #_指南 #_参考

#_公司/阿里  #_公司/百度

Hi there!
That's the limitation of the plugin as mentioned in #20

authors: chenbihao pfrankov

repo: pfrankov/obsidian-colored-tags


text:
Independent Dashboard Theme

With the current 'Theme' design, the chosen theme is used in all pages.
This work-around will allow the setting of a 'theme' for the Dashboard, Independent of the Theme for the balance of the pfSense Pages.
Use case would be setting the "Dashboard" to a Wide-Screen theme, and leaving all other pages in a Standard Width theme.
When the   index.php   file is loaded, if the "Dashboard Theme" is defined with a theme that is different than the "Default Theme", the "Default Theme" setting is captured into    $g['theme_revert'] . The new "Dashboard Theme" is now used for the Dashboard. All other pages will use the "Default Theme" setting.
If the user applies any changes in any of the Dashboard Widgets, it will save the "Dashboard Theme" as the "Default Theme" and this will cause all future pages to use the "Dashboard Theme". To over come this issue, code is added to the php  function    write_config()    to revert the "Theme" back to its "Default" before saving the changes to the config.xml file.
Future designs of Themes should allow for independent Theme customization per page to better utilize
Wide-Screen/Standard-Width-Screen settings.

Thanks Phil, I have incorporated those changes.

pfSense is moving to bootstrap, as you can see in https://github.com/SjonHortensius/pfsense. I'm not sure it's worth it to add this right now.

repo: pfsense/pfsense


text:
DNS/Ping/Traceroute IDN support. Issue #10538

[X] Redmine Issue: https://redmine.pfsense.org/issues/10538
[X] Ready for review

Add support for IDN hostnames on the DNS/Ping/Traceroute diagnostics pages.

in the same way it's possible to add IDN support to DNS Resolver/IPsec/OpenVPN etc.
but I think it's better to add idn_to_utf8() to Form_Input class


text:
Support passing parse mode to parse/fingerprint functions

Fixes #215

Mainly commenting so I don't forget:
For the newly introduced _opt functions, I wonder if we should also consider the use cases requested in https://github.com/pganalyze/libpg_query/issues/50 here, i.e. to set GUCs that affect parsing.
Need to think through this more how it could be part of the API, but might be worth doing now so we don't have to break the _opt function API in the future.

@lcheruka Thanks for the contribution! Merged with slight revisions to allow passing additional options beyond the parse mode.

authors: lcheruka lfittl


text:
[#366] client side translation of numeric values

WIP
Translations for :-

Command
Output Format
Valid field
Compression field
Encryption field

@jesperpedersen PTAL

The idea is that all changes are in cli.c.
Maybe we can extract some static functions into in the public API once we have a good idea

@jesperpedersen PTAL

We are close with this

@jesperpedersen PTAL

Looks good to me besides some format issues. Would be nice if we can have some output demos~

Okay attaching some demos for commands:
Backup:

List Backup:

Status:

Staus Details:

@Jubilee101 Please have a look.

You can also look at converting sizes to "B", "kB", "MB", "GB", "TB" and "PB", so something like
UsedSpace: 15.3MB

and so on

You can also look at converting sizes to "B", "kB", "MB", "GB", "TB" and "PB", so something like
UsedSpace: 15.3MB

and so on

Can we also do for timestamp

I think timestamp is ok as is

@jesperpedersen
Do we need to limit the number of digits after decimal in the translated size?
If so, I am thinking of adding another function pgmoneta_append_double_setprecision(char* s, double d, int32_t precision) in utils.c to limit the number of digits.

Yes, you add a separate function for it - and set the default to 2 digits so XXX.YY

@jesperpedersen  @Jubilee101 PTAL

Looks like you are having some problems with rebasing, other than that it looks good

Looks like you are having some problems with rebasing, other than that it looks good

Not sure what is wrong with the rebasing. Kindly elaborate

Looks like you are having some problems with rebasing, other than that it looks good

Not sure what is wrong with the rebasing. Kindly elaborate

Nvm, it looks alright now. Probably a glitch on my side, apologies~

Looks like you are having some problems with rebasing, other than that it looks good

Not sure what is wrong with the rebasing. Kindly elaborate

Nvm, it looks alright now. Probably a glitch on my side, apologies~

No issues :)

@jesperpedersen @Jubilee101 Review!!

Comments like that doesn't work AT ALL.
Your pull request is open, so we will get to it

I am extremely sorry @jesperpedersen @Jubilee101
Never gonna happen again

Hey, can you rebase?

Hey, can you rebase?

Done

Merged, thanks for your contribution!

repo: pgmoneta/pgmoneta


text:
Fixed issue with header function evaluation + added 2 tests

Fixes #454

Reply header functions were evaluated twice per request.
Reply header functions were overridden by evaluated values.

After fix each header function is evaluated only once per request.
After fix each header function is evaluated on each and every request separately.

Hmm, the problem with coverage is here: https://coveralls.io/builds/4824108/source?filename=lib%2Frequest_overrider.js#L461. I've coded it to be sure that both response.headers and response.rawHeaders will be evaluated. But it seems that interceptor.headers are identical to interceptor.rawHeaders, but in array (instead of object) representation. Is that true? If yes then I can change:
if (typeof value === "function") {
  // Check if header has not been already evaluated. Evaluate it otherwise.
  if (evaluatedHeaders.hasOwnProperty(key)) {
    response.rawHeaders[rawHeaderIndex + 1] = evaluatedHeaders[key]
  } else {
    response.rawHeaders[rawHeaderIndex + 1] = value(req, response, responseBody);
  }
}

to
if (typeof value === "function") {
  response.rawHeaders[rawHeaderIndex + 1] = evaluatedHeaders[key];
}

@alekbarszczewski agree, that should be enough.

@pgte Done, squashed additional commit, thanks.

@alekbarszczewski thanks!
Landed on v6.0.1.

authors: alekbarszczewski pgte

repo: pgte/nock


text:
端口转发功能可能存在的问题

师傅，这个端口转发的功能可能存在些许问题。事情是这样的，我打算模拟一个环境，把listener_1本地监听端口（8017）转发到服务器（18017）上，然后再在本地配置一个listener_2（IP填服务器IP，监听端口填18017），这样生成攻击载荷的时候选择listener_2也可以成功上线。
但是我发现如果我先配置了listener_2，再使用stowaway转发端口，stowaway就会报错

而如果先使用stowaway转发端口，再配置listener_2，CS就会报错端口占用。

经过测试，发现功能类似Stowaway的另一位师傅的工具Venom可以在上文的这种环境下成功转发端口（先配置listener，后转发端口以及先转发端口，后配置listener都是可以成功的）

麻烦师傅修修BUG啦！

如果我没理解错的话，listener_2不需要配置，你只需要配置listener_1就行

或者使用reflect命令，你这个写反了


text:
内存泄漏严重

xxxxx这里是问题描述xxxx

当前使用的版本号
v0.1.9

是否已经升级到新版本
是

当前遇到的问题
内存泄漏自动宕机

错误日志或截图
xxx

希望增加的功能
希望大佬尽快解决内存泄漏的问题！

更新最新版本v0.2.1

authors: haoyuanliu phachon

repo: phachon/mm-wiki


text:
Forked my own verson of SWAPI

I forked your SWAPI.
I'm curious to know when following the MakeFile, which python version do you used for this?
I'm assuming the service has always been written in Python 2 for a while..
Also do you recommend using virtualenv when running locally?  I'm running into a lot of versioning incompatibility noises with Django modules...

@awongCM have you managed to run it locally or on the server?

I tried to run it locally. It failed.
When troubleshooting, I realised the entire django api platform is using Python 2, instead of Python 3.
I have both Python versions on my Mac. But the app still doesn’t play nicely with it...
Hence the reason for raising this github issue.

I have managed to start the project: https://swapi.dev, it is deployed from my fork: https://github.com/juriy/swapi

thank so much @Juriy

Thanks for doing that @Juriy.  I sincerely appreciated your help.
Just out of my insatiable curiosity, how did you manage to get your forked project to work locally?
Do you have the correct Python 2 dependencies that got everything working on the outset?
I'm keen to know as I want to get it working for my forked project.
Thanks again!

@awongCM I was deploying it right away on the server, so I didn't try it locally yet, it is a next thing to do. I used Amazon Linux 2, which already has the appropriate version of Python - 2.7.16. I had to install the toolset and dependencies (gcc-c++, make, zlib-devel zip unzip bzip2-devel postgres, postgresql-devel, python-devel, libmemcached-devel, ). Not sure if everything is needed from the list, but most of it makes sense.
Then I fixed the version of keen in requirements.txt to 0.3.0, to fix the incompatibility error. Then it started without an issue. You need to provide environment variables for DEBUG and DATABASE_URL to for the service to start. That's pretty much it.
As for the local setup - I haven't tried it yet, but I assume the process is going to be similar. Except, maybe, for using sqlite instead of Postgres for development mode.

@Juriy Awesome stuff.  Thank you very much for putting all this together.
I sincerely appreciate your effort to give this much detail.
This would certainly be a useful guide for me to try installing myself locally to work when troubleshooting.
Thanks again!

authors: CaioBRosa Juriy awongCM

repo: phalt/swapi


text:
Pre-release v0.8.3

Thank you for your Pull Request! We have developed this task checklist from the Development Process Guide to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.
Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the devel branch until you have checked off each task.

[ ] Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
[ ] Code is formatted according to the tidyverse style guide. Run styler::style_file() to style R and Rmd files
[ ] Updated relevant unit tests or have written new unit tests - See Unit Test Guide
[ ] If you removed/replaced any function and/or function parameters, did you fully follow the deprecation guidance?
[ ] Update to all relevant roxygen headers and examples
[ ] Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately
[ ] Address any updates needed for vignettes and/or templates
[ ] Update NEWS.md if the changes pertain to a user-facing function (i.e. it has an @export tag) or documentation aimed at users (rather than developers)
[ ] Build admiral site pkgdown::build_site() and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page.
[ ] Address or fix all lintr warnings and errors - lintr::lint_package()
[ ] Run R CMD check locally and address all errors and warnings - devtools::check()
[ ] Link the issue in the Development Section on the right hand side.
[ ] Address all merge conflicts and resolve appropriately
[ ] Pat yourself on the back for a job well done! Much love to your accomplishment!

@bms63 We have to release today. As per CRAN (related to the encoding issue):

Please fix before 2022-10-06 to safely retain your package on CRAN.

@bms63 If you want to get updates relating to #1454 included, then please open a PR for that today. I'm out of office today but will login again this evening to create the release and upload to CRAN.

repo: pharmaverse/admiral


text:
Icons not rendering correctly

The icons in the sidebar aren't rendering correctly for me.

From my investigation, it's because the lsb class defines a font-family property which cascades down to the icon element and overrides the font-family of the fa-* classes. When I added !important to the fa-* font-family property, the icons render properly.

duplicate of #111

Posted as a comment on #111 instead.

authors: benregn woylie


text:
Training multi class at the same time?

Hi, how to training multi class at the same time?

Sorry this is not supported currently.

authors: jinfagang philip-huang

repo: philip-huang/PIXOR


text:
Can not get feedback from Sever

I installed the environment and ran the demo code.  However, I can not get the feedback from the client. Is there any issue with my set up?

Do you have java installed properly?

I have java installed:
$ java -version
openjdk version "24-loom" 2025-03-18
OpenJDK Runtime Environment (build 24-loom+7-60)
OpenJDK 64-Bit Server VM (build 24-loom+7-60, mixed mo
de, sharing)

should I use an older java runtime?

even after setting up java 8, the server isn't starting:
Exception in thread "main" edu.stanford.nlp.io.RuntimeIOException: argsToProperties could not read properties f
ile: corenlp_server-8090116e1a084988.props
        at edu.stanford.nlp.util.StringUtils.argsToProperties(StringUtils.java:1060)
        at edu.stanford.nlp.util.StringUtils.argsToProperties(StringUtils.java:973)
        at edu.stanford.nlp.pipeline.StanfordCoreNLPServer.<init>(StanfordCoreNLPServer.java:183)
        at edu.stanford.nlp.pipeline.StanfordCoreNLPServer.launchServer(StanfordCoreNLPServer.java:1590)
        at edu.stanford.nlp.pipeline.StanfordCoreNLPServer.main(StanfordCoreNLPServer.java:1644)
Caused by: java.io.IOException: Unable to open "corenlp_server-8090116e1a084988.props" as class path, filename
or URL
        at edu.stanford.nlp.io.IOUtils.getInputStreamFromURLOrClasspathOrFileSystem(IOUtils.java:501)
        at edu.stanford.nlp.io.IOUtils.readerFromString(IOUtils.java:634)
        at edu.stanford.nlp.util.StringUtils.argsToProperties(StringUtils.java:1051)
        ... 4 more
[Thread-0] INFO CoreNLP - CoreNLP Server is shutting down.

I am trying to start the server manually here because when the python library tries to start the server automatically, it doesn't do -cp "<filepath"> and instead just does -cp <filepath

repo: philipperemy/stanford-openie-python

license: ISC


text:
Spring 4

Thank you for a very good tutorial.
What about Spring 4 annotations config integration?
Thank you.

Check my fork for Spring4 + Annotations
https://github.com/storytime/angular-rest-springsecurity

repo: philipsorst/angular-rest-springsecurity


text:
⚠ ECDC Shop has degraded performance

In 394cb8c, ECDC Shop (https://shop.memmingen-indians.de) experienced degraded performance:

HTTP code: 200
Response time: 7622 ms

Resolved: ECDC Shop performance has improved in c5e3f04 after 21 minutes.

repo: phimado/status


text:
Add dynamic syncing of code and applications support

TODO

[x] purge consolidated protocols
[x] sync priv dirs of start_apps

@josevalim ready for a new pass

repo: phoenixframework/flame


text:
Add push template to package.json

We should add the push template to the CLI:
https://github.com/phonegap/phonegap-template-push

Added this with above commit

authors: mwbrooks surajpindoria

repo: phonegap/phonegap-cli


text:
PDF_417 format not being read on iOS

Issue
I'm using this plugin to read the barcode on US drivers' licenses and extract some information, for android it worked like a charm, the problem is when you try to use it on iOS, it doesn't read the barcode, seems like it doesn't recognize the format. According to PR-431 (https://github.com/phonegap/phonegap-plugin-barcodescanner/pull/431) this problem was resolved, still it doesn't work on iOS.
Platform and Version
iOS 10.3.1
Android 6.2.3
Cordova CLI version and cordova platform version
cordova --version 7.0.1
cordova platforms android 6.2.3 && ios 4.4.0

Plugin version
cordova plugin version 6.0.8

Sample Code that illustrates the problem
cordova.plugins.barcodeScanner.scan(
    scanSuccess,
    scanError,
    {
      formats: 'PDF_417,CODE_128'
    }
  );
}

function scanSuccess (result) {
    console.log(result.format, result.text);
}

According to the documentation, I don't think they support PDF_417 format on iOS yet. We could ask them if they plan to support it soon.

Please comment on #478 and give me an example image.

Despite the documentation , PDF_417 works fine on ios for me , but never did the same on android, I've tried with some phonegap-plugin-barcodescanner plugins's version like 6.0.6 and 7.1.0 , didn't works for me on android.

So frustrating, I can't find some post that really fix it.

authors: jamesyangf jeanpi-gomez lsaballo macdonst

repo: phonegap/phonegap-plugin-barcodescanner


text:
sync.cancel(); not working propperly on second cancel()

When canceling the sync process the first time, it works perfectly.
Starting the same process again and cancel again, contentsync still downloads the file.
It's easy to reproduce from the sample code. Just put sync.cancel() in the progress-callback and start it two times.
sync.on('progress', function(progress) {
  sync.cancel();
  console.log("Progress event", progress);
  app.setProgress(progress);
});

Only tested on iOS.

I'd like to work on this as my first contribution. Can you please help me get started with it?

@mansimarkaur For sure! Fork this repository, make your changes in separate branch and submit a pull request please.

authors: dmaus imhotep mansimarkaur

repo: phonegap/phonegap-plugin-contentsync


text:
iOS 9.3

Hello, i reed this https://github.com/phonegap/phonegap-plugin-push/issues/752 about push problem in iOS 9.3. I have the same problem but i don't understand what i need to do to resolve the problem. What does it mean that I need to fill everything on the push object?
Thanks to all!

@lucasabba if you are using the same sample code as in #752 remove the call to unregister. You should only call that method if you don't want to get push messages anymore.
Also, sorry to be a jerk but I'm now closing issues that don't follow the issue submission guidelines. This plugin takes a lot of work to maintain and I can't afford the time required to solicit the required info from everyone.
I'm closing this issue but please feel free to re-open the issue if you provide the requested details from the issue submission guidelines.

authors: lucasabba macdonst

repo: phonegap/phonegap-plugin-push


text:
'notification' event not working on Notification click in Android

I can not get 'notification' called on notification click in Android. Everything else works fine.
Device: Samsung galaxy s5
payload:
{
"notification" : {
      "body" : "test body",
      "title" : "test title"
 	},
  "data": {
    "eventId": "TEST123",
    "content-available":"1"
  	},
 "priority":"high",
  "registration_ids" :[reg_ids]
}

Android manifest:
<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true">
       <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize">
           <intent-filter android:label="@string/launcher_name">
               <action android:name="android.intent.action.MAIN" />
               <category android:name="android.intent.category.LAUNCHER" />
           </intent-filter>
       </activity>
       <activity android:exported="true" android:name="com.adobe.phonegap.push.PushHandlerActivity" />
       <receiver android:name="com.adobe.phonegap.push.BackgroundActionButtonHandler" />
       <receiver android:exported="true" android:name="com.google.android.gms.gcm.GcmReceiver" android:permission="com.google.android.c2dm.permission.SEND">
           <intent-filter>
               <action android:name="com.google.android.c2dm.intent.RECEIVE" />
               <category android:name="${applicationId}" />
           </intent-filter>
       </receiver>
       <service android:exported="false" android:name="com.adobe.phonegap.push.GCMIntentService">
           <intent-filter>
               <action android:name="com.google.android.c2dm.intent.RECEIVE" />
           </intent-filter>
       </service>
       <service android:exported="false" android:name="com.adobe.phonegap.push.PushInstanceIDListenerService">
           <intent-filter>
               <action android:name="com.google.android.gms.iid.InstanceID" />
           </intent-filter>
       </service>
       <service android:exported="false" android:name="com.adobe.phonegap.push.RegistrationIntentService" />
   </application>

init object:
 {
                    android: {
                        senderID: senderId
                    },
                    ios: {
                        alert: true,
                        badge: true,
                        sound: true,
                        senderID: senderId,
                        gcmSandbox: gcmSandbox
                    }
                }

Am I missing something?
Any help is greatly appreciated.

I tested it on a huawei Honor 3c. Handler gets fired sometimes (Randomly)

Is the PushHandlerActivity responsible for firing the 'notification' event on a notification click? I am not seeing any logs from that.
(I have no knowledge in android development (native))

@malwatte wrong payload. If you include the notification part then the OS takes over. Try sending the following instead:
{
  "data": {
      "body" : "test body",
      "title" : "test title",
      "eventId": "TEST123",
      "content-available":"1"
    },
  "priority":"high",
  "registration_ids" :[reg_ids]
}

@macdonst  yeahh, niceee, it worked. I thought if it was ok to add both "data" and "notification" to the payload. Will this work in iOS as well?

Ops. iOS notifications does not work without
"notification" : {
      "body" : "test body",
      "title" : "test title"
    }

Helppppp.
Does that mean I need two payloads. One for android and one for iOS?

I ill refer #960 for above question

authors: macdonst malwatte


text:
Enhance Photobooth Experience with Distinct ISO and Shutter Speed Settings for Live View and Capture

This pull request introduces an enhancement to the photobooth application by allowing separate ISO and shutter speed settings for the live preview mode and the photo capture mode. This feature is particularly useful for cameras that do not support Exposure Simulation and when using an external flash.

Looks great, thank you for this contribution! ✨
I'll let the automated tests run, test on my system later also and merge this evening.

repo: photobooth-app/photobooth-app


text:
Graphics improperly extends DisplayObject

Hi there,
Looks like the signature for Graphics.generateTexture doesn't match that of DisplayObject.generateTexture. This is an issue for typescript compilation (see pixi.d.ts).
Thanks for the awesomeness y'all.

Experienced the same problem when I tried to update to the latest version of Phaser.

Suggested fix? Because PIXI.DisplayObject.generateTexture returns a RenderTexture, where-as PIXI.Graphics.generateTexture_does_ return Texture`. So they are actually different.

Then is it possible to rename Graphics.generateTexture? The current implementation prevents typescript compilation  from succeeding.

I wish I was back on game work :(
Reminds me of my old stack question. http://stackoverflow.com/questions/29593905/typescript-declaration-extending-class-with-static-method/29595798#29595798
declare class DisplayObject {
    static generateTexture(): RenderTexture;
}

Include the same signature from the primary above to the other class and overload it.
declare class Graphics extends DisplayObject {
    static generateTexture(): RenderTexture;
    static generateTexture(): Texture;
}

Does it work?

Overloading the function sounds like a reasonable solution to me.

"Include the same signature from the primary above to the other class and overload it."

Except that both signatures would be visible and the 1st signature (from base class) wouldn't ever actually work as described. Renaming the PIXI.Graphics.generateTexture() might be best.

Yeah totally but that is a different issue.  What you see today in JS is valid and correct JS. If TypeScript cannot define it, then you must work around it.
If you want to change the implementation, you have the much bigger job of making a PR which is going to be bug free, and not break 1000 peoples existing games for the sake of a function overload.

Hmm. Valid javascript or not, it's a flawed design. Either Graphics derives from DisplayObject or it does not. If it does, it must provide a working definition of DisplayObject.generateTexture. Typescript is simply enforcing proper design.
I'm not sure what precipitated the original change to the signature of DisplayObject.generateTexture, but you might want to reconsider...

Yeah I am having this issue even when rolling back to 2.4.6. I tried that function overloading recommendation and didn't seem to work. I am also wondering if this has anything to do with the misbehaving of the cursor when changing to a hand when over a graphic.

@smks - i modified the Graphics signature to match that of DisplayObject and I'm working ok...though I'm exercising very little of the engine.

This is kinda a blocker for me right now. @shinygruv3 How did you get it working exactly?

@JimmyBoh - I modified ../phaser/typescript/pixi.d.ts locally and changed the signature of Graphics.generateTexture to match that of DisplayObject.generateTexture:
generateTexture(resolution?: number, scaleMode?: number, renderer?: PixiRenderer): RenderTexture;

Awesome, thanks @shinygruv3. I'm just starting a new project with Phaser. It's small, but I will share any issues or oddities I encounter.

This is now fixed in the dev branch. Well, I say 'fixed', the defs are basically reverted back to how they were before. So the TS compilation errors are done, but the return type is technically incorrect. Then again, it has been for several years now and no-one complained, so such is life.

@shinygruv3 Your turnaround is not working for me :(

repo: photonstorm/phaser

license: mit


text:
useHandCursor not working properly in Phaser 2.4.8

The hard cursor only appears while pressing.
Example:
https://jsfiddle.net/snake/vg3Ljk26/
I've tested in other versions and works fine, only the 2.4.8 have this issue,

I was going to report this, just to add more info:
This Issue is about:

A bug in the API

When mouse over the button in version 2.4.7 works normally.
2.4.7 example
2.4.8 example
In 2.4.8 detects only if you click outside button(inside canvas), hold and move over the button, and also after this don't dispatch mouseOut if you release inside button.
The same occur with sprite with event.onInputOver(inputEnabled is enabled).
After some research looks like something related with Phaser.Pointer parameter in inputHandler._pointerOverHandler.

Thanks for spending time reporting this issue. However we've already fixed this in the dev branch of Phaser, and it will be part of the next official release. You can track what's already been fixed by looking at the Change Log part of the dev README file.

authors: MichelAlonso marcelodeassis photonstorm


text:
Documentation: Broken Link to Code of Conduct in phaser/.github/CONTRIBUTING.md

This Issue is about:

An error in the documentation

Hello! I have noticed that in the first section of CONTRIBUTING.md, the link to the code of conduct is outdated, and thus results in a 404 error. See the image below to see the broken link highlighted in blue.

The fix would be to edit the url of the link from "[...]/v2/CODE_OF_CONDUCT.md", to "[...]/.github/CODE_OF_CONDUCT.md". I'm happy to issue a pull request with this fix!

Thanks for opening this issue, and for submitting a PR to fix it. We have merged your PR into the master branch and attributed the work to you in the Change Log. If you need to tweak the code for whatever reason please submit a new PR.

authors: melissaelopez photonstorm


text:
Cropped sprites behave unexpectedly when recropped

Phaser Version: 3.11
Operating System: Windows 7 Professional x64
Browser: Firefox Developer Edition 62.0b13 x64

I have noticed while working on a project of mine that if you use .setCrop on an already cropped sprite, all other cropped sprites will also be affected. Here's a small demo to try and show this:
var config = {
    type: Phaser.AUTO,
    width: 800,
    height: 600,
    backgroundColor: '#2d2d2d',
    parent: 'phaser-example',
    scene: {
        preload: preload,
        create: create
    }
};

var group;

var game = new Phaser.Game(config);

function preload()	{
    this.load.spritesheet('diamonds', 'diamonds32x24x5.png', { frameWidth: 32, frameHeight: 24 });
}

function create() {
    group = this.add.group();
    group.createMultiple({ key: 'diamonds', frame: [0,1,2,3,4], frameQuantity: 2, repeat: 1 });
    group.children.iterate(function(child) {
    	child.setCrop(0, 0, 32, 32);
    });
    group.children.entries[10].setCrop(0, 0, 32, 8);
    Phaser.Actions.SetXY(group.getChildren(), 32, 100, 32);
}

To start off with .setCrop(0, 0, 32, 32) is ran on all children of the group, I don't believe this should have any immediately visible effect. However, strangely the frame is set to four (the last of the sprite sheet).
So this is what I would have expected:

This is what I actually got:

After this the 10th child of the group is cropped with .setCrop(0, 0, 16, 16) which I would think would make it so you could only see a quarter of that particular sprite. But for some reason all the sprites in the group are cropped this way instead of just the one.
So in end what I would expect to see is this:

What I actually end up with is this:

If you need any more information for this issue, please let me know.

Thank you for spending time reporting this issue. However, we've already fixed this in the master branch of Phaser and it will be part of the next official release. You can track what's already been fixed by searching closed issues, or by looking at the Change Log.


text:
is video module removed from phaser3?

is phaser3 still has video module?

Phaser 3 has never had video support (it wasn't removed, it was just never there in the first place) - it will be added in 2019, or if someone in the community wants to do it before then, I'd merge it in too.

I have a video plugin, which can display video on DOM, or canvas, here is a demo.

It took time to show fullscreen video on canvas for phaser so I leave my result.
import 'phaser'

const GameWidth = 1280
const GameHeight = 640
const FrameCenter = {
  x: GameWidth / 2,
  y: GameHeight / 2
}

export class OpeningMovie extends Phaser.Scene {
  private movieFrame: Phaser.GameObjects.Image
  private movieTexture: Phaser.Textures.CanvasTexture
  private video: HTMLVideoElement

  constructor() {
    super({ key: 'OpeningMovie' })
  }

  init(params) {
  }

  preload() {
  }

  create() {
    this.movieTexture = this.textures.createCanvas('movie', GameWidth, GameHeight)
    this.movieFrame = this.add.image(FrameCenter.x, FrameCenter.y, 'movie').setInteractive()
    this.video = document.createElement('video')
    this.video.src = '/some/movie.mp4'
    const game = this
    this.video.addEventListener('loadeddata', function() {
      this.play()
      const fps = 30
      const loop = () => {
        if (!this.paused && !this.ended) {
          game.movieTexture.context.drawImage(this, 0, 0, GameWidth, GameHeight)
          game.movieTexture.refresh()
          setTimeout(loop, 1000/fps)
        }
      }
      loop()
    })
    this.video.addEventListener('ended', function() {
      game.goNextScene()
    })
    this.video.addEventListener('pause', function() {
      game.goNextScene()
    })
    this.movieFrame.on('pointerdown', () => {
      this.video.pause()
    })
  }

  goNextScene() {
    this.video.remove()
    this.movieTexture.destroy()
    this.scene.switch('Menu')
  }

  update() {
  }
}

Thank you.
References:
https://github.com/photonstorm/phaser/issues/3575#issuecomment-455912692
https://stackoverflow.com/questions/4429440/html5-display-video-inside-canvas/38711016

authors: asukiaaa huangshengping2017 photonstorm rexrainbow


text:
Particle emitter does not stops, even though maxParticles is being set

Version

Phaser Version: 3.55.2
Operating system: Windows 10
Browser: Chrome 91

Description
Particle emitter does not stop creating particles, even thought the maxParticles is being set.
When changing the below codepen from maxParticles: 30 to maxParticles: 19, it stops. From 20 onwards it does not stops.
It is a bit random, just keep playing with the numbers. It also have the same weird behavior if you change the lifespan or speed.
Example Test Code
https://codepen.io/ivorcosta/pen/qBmZGON

I'm not sure what's the expected behavior for maxParticles. It changed from v3.15.1 to v3.16.1, but that may have been because of an unrelated bugfix.
In the test code example, the emitter is never at its limit because it never creates 30 particles. It creates only 20 or so and then recycles them. If you change lifespan or frequency it may then hit the limit if no dead particles are available.
It does seem peculiar to me that once an emitter reaches its limit (described as a creation limit) it stops emitting particles at all, even if dead ones are available.

I thought maxParticles was the maximum total allowed amount of particles the emitter could fire.
I want a small animation that fires a few particles and stops. In order to achieve that, I have to start a emitter and use setTimeout to stop it after a while? Wouldn't have a more elegant solution?

maxParticles is the maximum amount it can fire in one single burst, not in total.
There is no such feature for 'kill this emitter after X particles are emitted', although I may consider it for a PR.

@photonstorm Is https://labs.phaser.io/view.html?src=src/game objects\particle emitter\fire max 10 particles.js&v=3.16.1 the expected behavior then?

There is no such feature for 'kill this emitter after X particles are emitted', although I may consider it for a PR.

@photonstorm The emitter does stop once the sum of the recycling-pending (dead) particle count and the alive count is greater than maxParticles.

maxParticles is the maximum amount it can fire in one single burst, not in total.

By changing maxParticles to 15 in this example, the sum of dead and alive ones never exceed 15 since the dead ones are recycled.

Set to hard limit the amount of particle objects this emitter is allowed to create.

Docs sentence communicates particle object amount limit. While this is technically true since total amount of js objects (dead + alive) is not greater than that, it is misleading since one expects the option to apply on what they see on screen.
https://github.com/photonstorm/phaser/blob/aa5f54cfa268c86823bf1dd52c83099fa0ef9ac2/src/gameobjects/particles/ParticleEmitter.js#L462-L471

By changing the following on the aforementioned example page, one can validate the non-exceeding counts over time:
// ...
        maxParticles: 15,
// ...

function update (time, delta)
{
    fpsText.setText('FPS: ' + (1000/delta).toFixed(3) + '\n' +
       `Alive ${particles.emitters.first.alive.length}` + '\n' + `Dead ${particles.emitters.first.dead.length}`);
}

authors: ivorcosta kootoopas photonstorm samme


text:
Add Tiled point object and change offset in createFromObjects()

This PR

Adds a new feature
Fixes a bug?

Current Behavior
Tiled point objects are parsed to
{ rectangle: true, width: 0, height: 0, … }

When creating a sprite from a Tiled object with `{ width: 0, height: 0 }, createFromObjects() maps the Tiled object origin onto the sprite origin using the sprite's dimensions (which are not zero). This is probably not what authors want.
New Behavior
Tiled point objects are parsed to
{ point: true, width: 0, height: 0, … }

When creating a sprite from a zero-size object, createFromObjects() doesn't adjust the position at all. The new sprite is given coordinates identical to the object.
I think this is more sensible, but it is a "breaking" change for projects using createFromObjects() with zero-dimensioned Tiled objects.
Internal Changes
I removed some redundant assignments in Tiled.ParseObject().

👍

authors: photonstorm samme


text:
Can't separate numbers from strings

Hi
I have trained a RandomForest algoritm and it won't separate numbers from strings.
This is my class:
<?php
declare(strict_types=1);

namespace PhpmlExamples;

include '../../vendor/autoload.php';

use Phpml\Classification\Ensemble\RandomForest;
use Phpml\Dataset\CsvDataset;
use Phpml\Dataset\ArrayDataset;
use Phpml\FeatureExtraction\TokenCountVectorizer;
use Phpml\Tokenization\WordTokenizer;
use Phpml\CrossValidation\StratifiedRandomSplit;
use Phpml\FeatureExtraction\TfIdfTransformer;
use Phpml\Metric\Accuracy;

$dataset = new CsvDataset('../data/languages.csv', 1);
$vectorizer = new TokenCountVectorizer(new WordTokenizer());
$tfIdfTransformer = new TfIdfTransformer();

$samples = [];
foreach ($dataset->getSamples() as $sample) {
    $samples[] = $sample[0];
}

$vectorizer->fit($samples);
$vectorizer->transform($samples);
$tfIdfTransformer->fit($samples);
$tfIdfTransformer->transform($samples);

$dataset = new ArrayDataset($samples, $dataset->getTargets());

$randomSplit = new StratifiedRandomSplit($dataset, 0.1);

$classifier = new RandomForest();
$classifier->setFeatureSubsetRatio('log');
$classifier->train($randomSplit->getTrainSamples(), $randomSplit->getTrainLabels());

$predictedLabels = $classifier->predict($randomSplit->getTestSamples());

$examples = [
    ['content' => 'I need to build this english sentence by myself'],
    ['content' => 'Italiano pizza pasta margeritta'],
    ['content' => 'Do I have to change?'],
    ['content' => 'Je voudrais une boîte de chocolates.'],
    ['content' => 'irewhgewruhgiee e retyrtyrt'],
    ['content' => '64564'],
    ['content' => '5476'],
    ['content' => '9925'],
    ['content' => '24'],
];

foreach ($examples as $example) {
    $newSample = [$example['content']];
    $vectorizer->transform($newSample);
    $tfIdfTransformer->transform($newSample);
    echo $classifier->predict($newSample)[0] . '<br>';
}

var_dump($examples);

echo 'Accuracy: '.Accuracy::score($randomSplit->getTestLabels(), $predictedLabels);
?>

And this is my training data:
`"content","label"
"123","number"
"6546","number"
"548","number"
"5678","number"
"583","number"
"38","number"
"454","number"
"28655","number"
"65","number"
"3568","number"
"5679","number"
"5679","number"
"96","number"
"Where's the nearest railway station?","string"
"The storms caused flooding.","string"
"Where is the duty free shop?","string"
"I witnessed it happening.","string"
"I would like two postcards, please.","string"
"How about going to the cinema?","string"
"Où est la boulangerie?","string"
"Je voudrais une boîte de chocolates.","string"
"Y a-t-il un autre hôtel près d'ici?","string"
"Vérifiez la batterie, s'il vous plaît.","string"
"La banque ouvre à quelle heure?","string"
"Est-ce que je peux l'écouter?","string"
"Vous devez faire une déclaration de perte.","string"
"Combien des élèves y a-t-il dans votre collège?","string"`

Any ideas why RandomForest recognise all strings as numbers?

moved to:
https://github.com/php-ai/php-ml/issues/282

repo: php-ai/php-ml


text:
Generate stubs for ACF PRO 6.0.2

Hi,
ACF Pro had an update recently and thought of creating a PR to update the stubs for it.
Thank you,
Cezar

Hello @cezarpopa!
This repo has not so much life in it.
So I'm merging your PR blindly.

Thank you.

Hello @cezarpopa! This repo has not so much life in it. So I'm merging your PR blindly.

Thank you!

authors: cezarpopa szepeviktor

repo: php-stubs/acf-pro-stubs


text:
🛑 phpMyFAQ API is down

In 495392e, phpMyFAQ API (https://api.phpmyfaq.de/versions) was down:

HTTP code: 0
Response time: 0 ms

Resolved: phpMyFAQ API is back up in 2287337.


text:
🛑 phpMyFAQ Homepage is down

In a7d24c8, phpMyFAQ Homepage (https://www.phpmyfaq.de) was down:

HTTP code: 0
Response time: 0 ms

Resolved: phpMyFAQ Homepage is back up in f9bf1fc after 10 minutes.


text:
🛑 Blog is down

In 1169cc9, Blog (https://blog.phpbb.com) was down:

HTTP code: 503
Response time: 71 ms

Resolved: Blog is back up in 524a40f after 13 minutes.

repo: phpbb/status-site


text:
opcode error with composer and phpunit

I had PHP 5.5.28 installed on my Ubuntu machine with everything working as expected.
I decided to start using phpbrew to make upgrading to PHP 5.6 easier. To start with I just installed the same version of PHP that I have on my machine: phpbrew install 5.5.28 +default+dbs+debug+apxs2 (I also installed 5.6.12, with xdebug, and got the same errors)
After doing so everything worked great with 2 exceptions: phpunit and composer. Both commands run to completion but right at the end I get fatal opcode errors which cause issues with the CI server.
As an example I get the following at the end of running phpunit (4.6.10):
PHP Fatal error:  Invalid opcode 65/16/8. in phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php on line 0
Fatal error: Invalid opcode 65/16/8. in phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php on line 0
Let me know if you need any further details. Any help would be greatly appreciated. Thanks

Did you installe eaccelerator or some similar?

Hey jhdxr.
eaccellerator isn't installed. I did install uopz and decided to remove that temporarily and the fatal errors went away so it looks to be an issue with that and not phpbrew.
Thanks for the response and I'll just go ahead and close the issue.

I think you may refer to krakjoe/uopz#19 , which has an explanation of this fatal error.

authors: ciatog jhdxr

repo: phpbrew/phpbrew


text:
Digest relative and absolute relative links before converting to pdf

It might be a good idea to remove all relative links (/foo.smth, foo.smth or file://path/foo.smth) from the HTML file before rendering it to HTML, since these links won't be valid in the resulting PDF anyways. This would, of course, leave the thing the links are displayed as intact, and only remove their linking ability.

Upgrade to v1.9.1 to have this.


text:
🛑 Where Have I Been? is down

In 276d9cf, Where Have I Been? (https://wherehaveibeen.co.uk) was down:

HTTP code: 403
Response time: 121 ms

Resolved: Where Have I Been? is back up in 0f1bbf2.


text:
THIS FILE WILL BE OVERWRITTEN DURING BUILD TIME, DO NOT EDIT

Issue created from code comment with imdone.io

NOTE:  THIS FILE WILL BE OVERWRITTEN DURING BUILD TIME, DO NOT EDIT id:179
src/vs/workbench/workbench.main.nls.js:6
@imdone - Efficiently manage your project's technical debt. imdone.io

Issue closed by removing a comment.

NOTE:  THIS FILE WILL BE OVERWRITTEN DURING BUILD TIME, DO NOT EDIT id:179 gh:179
src/vs/workbench/workbench.main.nls.js:6
@imdone - Efficiently manage your project's technical debt. imdone.io

repo: piascikj/vscode


text:
Slow for parsing large arrays containing objects

Environment
Browser. Timing tested in latest Firefox.
Description
During experimentation with Jackson-JS we noticed that its JSON deserialization is rather slow for large arrays. The JSON response we parse is an array containing roughly 1200 of the below objects - and parsing takes about 15 seconds.
I'm aware this use case is rather extreme, but unfortunately we are dealing with a legacy API within an enterprise here - so things won't improve somewhen soon.
import {
  JsonIgnoreProperties,
  JsonProperty,
  JsonAlias
} from 'jackson-js';

@JsonIgnoreProperties({ value: [
  'abc',
  'def',
  //... 67 more ignore properties
]})
export class MyModel {

	@JsonProperty()
	@JsonAlias({values: ['xyz']})
	myVarName: number;

	// ... 18 more properties with @JsonProperty and @JsonAlias
}

What you'd like to happen:
I'd love to hear your thoughts on strategies on how to mitigate the parsing impact and/or speed it up.
Alternatives you've considered:

Obviously, we can cache the result - but 15 secs still seems way too slow.
Although building a paging into the backend API would solve this, this is very unlikely to happen within a reasonable time span

Hi @marbetschar
Did you find a way to speed up the deserialization?

@badetitou back then we used @marcj/marshal instead of jackson-js. Don't know if it is still maintained though (I no longer work at the project in question).

authors: badetitou marbetschar

repo: pichillilorenzo/jackson-js


text:
Fails when client package is minified

Environment
Any environment that minifies code. For example, Angular production builds which use WebPack with optimization enabled.
Description
Minification should not have any effect on usage including serialization and/or deserialization.
After minification serialization/deserialization fails with the error Invalid Keyword. This can be traced to an issue with getArgumentNames and meriyah's parseScript failing to parse the minified function signature.
Also, it appears that even if the parsing succeeded the argument names would then be incorrect but I am not sure if this affects usage.
Steps to reproduce

Create a class that uses JsonCreator or JsonPropertys on the constructor.
Minify the class
Attempt to serialize or deserialize using the minified class.

@kdubb - I see you have a PR open for this issue; any idea what's going on with it?

the same here

@niveo @cdunford We have a fork @outfoxx/jackson-js currently published on NPM that includes all of our open PRs.
It's looking like this great project may be abandoned.

authors: cdunford kdubb niveo


text:
Consider normalizing submitted flags before checking

The current code uses substring (python: submitted_flag in desired_flag). This leads to surprises when there are, say, leading/trailing spaces in the submitted flag.
P.S. For competition, most problems have the flags in a special format but there are some exceptions. For the problems in the latter group (no format), this can create confusion if some user formats the flag because now the flag contains extra characters.

After brief discussion with problem devs, what would work better would be a case-insensitive flag on the problem, carried over from the problem.json config.

authors: hiliang-cmu maverickwoo

repo: picoCTF/picoCTF


text:
Sorting pages using a customer header isn't honoured.

I am sorting pages (posts) per a meta header.

{% if (current_page.id == "categories") %}
{% for page in pages|sort_by("page.meta.Catposition") %}
	{% if (page.meta.Category == "Sections") and not page.hidden %}

{{ page.title }}

	{% endif %}
{% endfor %}
{% endif %}

---
Title: Title of the page
Template: template_name
Position: 1
Category: Sections
Catposition: 1
---

Earlier, the sorting was done by Position and it worked. I later changed it to Catposition and added this header to all the required pages numbered them correctly. But for some reason, sorting by Catposition just does not work. Posts are listed alphabetically. However, the moment I revert the sorting code to page.meta.Position, lists are sorted as per the Position. It is as if something is syntactically wrong with the code containing Catposition even though it is an exact copy with a change in the header. Any idea what could be wrong?

I'm not seeing anything obvious here... if it works with Position, and you've change all occurrences to Catposition instead, it should function exactly the same.  The fact that it's falling back to alphabetical sort would probably imply that it's not finding Catposition in the page.
I know it's not helpful, but maybe double check everything for typos?  Copy and paste Catposition between your code and your metadata just to sanity-check that it matches, etc.
@PhrozenByte Do you have any thoughts on this?

Check for typos and upper/lowercase (especially when the meta header was registered using a plugin's onMetaHeaders or the theme's pico-theme.yml)

I figured out what's causing it. For next and previous buttons I had added a sorting configuration in the config.yml as per this discussion.
sort_directories:
    - docs
pages_order_by: meta
pages_order_by_meta: position
pages_order: asc

This is overriding my {% for page in pages|sort_by("page.meta.Number")%} in the .twig template. If I change pages_order_by_meta: position above to pages_order_by_meta: Catposition, the order of posts listings is correct. But I can't change that since elsewhere in the website, I need the pages to be sorted as per position. Don't you think that the {% for page in pages|sort_by("page.meta.Catposition")%} in the template must have overridden the sorting order in config file since templates are the bare metal layer to listings' page?

To be honest, what it sounds like is that your original code just didn't work.  It only appeared to work because you were already sorting pages by position globally.
And, I'm realizing now that I'm looking at the docs, that your syntax for sort_by is wrong. 😅
It should be:
{% for page in pages|sort_by(['meta', 'Number'])%}

Not:
{% for page in pages|sort_by("page.meta.Number")%}

So, why don't you give that a try and see if it behaves right. 😉

So, why don't you give that a try and see if it behaves right.

It does. Crazy! I don't know how I got the idea of using page.meta.name. Perhaps it was an edit to the listing code that sorted pages as per default headers (title, time, etc).
Thanks for the help.

No worries. It happens. 😉
It is an odd syntax.  On the technical side, this is because you're giving a Pico function some strings as arguments rather than reading them inside of Twig.
Don't feel too bad though, me and @PhrozenByte didn't catch that one either. 😅

authors: PhrozenByte mayamcdougall notakoder

repo: picocms/Pico


text:
Ask, conversation, conversations commands

https://drive.google.com/open?id=1PVJrobh4PflT3Vbg7HoEiDDH_jyxMNcN
https://drive.google.com/open?id=1EIywJT5rSXRE40TanCHWMAdGQpY6KBLu

@hal-8999-alpha anything wrong with this PR?

@hal-8999-alpha anything wrong with this PR?

Only minor thing I had was to change it to GPT 3.5 instead of ChatGPT3

repo: pieces-app/cli-agent


text:
gcore provider not working

apiVersion: se.quencer.io/v1alpha1
kind: DNSIntegration
metadata:
  labels:
    argocd.argoproj.io/instance: k8s-blue-cc-phonebook
  name: gcore
spec:
  provider:
    name: gcore
  secretRef:
    keys:
      - key: GCORE_PERMANENT_API_TOKEN
        name: GCORE_API_TOKEN
    name: phonebook-secrets
  zones:
    - myzone.com

Name:         gcore
Namespace:
Labels:       argocd.argoproj.io/instance=k8s-blue-cc-phonebook
Annotations:  <none>
API Version:  se.quencer.io/v1alpha1
Kind:         DNSIntegration
Metadata:
  Creation Timestamp:  2024-11-01T20:06:44Z
  Finalizers:
    phonebook.se.quencer.io/deployment
  Generation:        1
  Resource Version:  90979843
  UID:               b0c39020-951e-448c-8bbd-df03550567e0
Spec:
  Provider:
    Name:  gcore
  Secret Ref:
    Keys:
      Key:   GCORE_PERMANENT_API_TOKEN
      Name:  GCORE_API_TOKEN
    Name:    phonebook-secrets
  Zones:
    wxs.ro
Status:
  Conditions:
    Last Transition Time:  2024-11-01T20:06:44Z
    Reason:                Deployment.apps "provider-gcore" is invalid: spec.template.spec.containers[0].image: Required value
    Status:                Error
    Type:                  Deployment
Events:                    <none>

Sorry about that, the release process is very manual and error prone. I have rebuilt and reshipped 0.3.7. Usually, helm chart versions needs to increment but I didn't do it.
Can you try again? You might need to remove phonebook from your helm repo or at the very least force an update.

No worries, but i tried everything that I could think off, I am deploying with argo, I've tried hard refresh, removing the app, etc, nothing worked, same error, I suspect this is still present.
Can you please reopen it and maybe bump the chart version so we can exclude the caching of the old version?
Thank you!

@WladyX Before I make changes to the helm chart can you test this DNSIntegration for me first?
apiVersion: se.quencer.io/v1alpha1
kind: DNSIntegration
metadata:
  labels:
    argocd.argoproj.io/instance: k8s-blue-cc-phonebook
  name: gcore
spec:
  provider:
    name: gcore
    image: "ghcr.io/pier-oliviert/providers-gcore:v0.3.7"
  secretRef:
    keys:
      - key: GCORE_PERMANENT_API_TOKEN
        name: GCORE_API_TOKEN
    name: phonebook-secrets
  zones:
    - myzone.com

You can specify images directly and I want to make sure the image loads OK for you. One thing I realized is that all images are built for x64 platform so I want to make sure the image is actually running in your cluster.

still does not work and i don't think it's related to x64.
❯ kd dnsintegrations.se.quencer.io gcore
Name:         gcore
Namespace:
Labels:       argocd.argoproj.io/instance=k8s-blue-cc-phonebook
Annotations:  <none>
API Version:  se.quencer.io/v1alpha1
Kind:         DNSIntegration
Metadata:
  Creation Timestamp:  2024-11-02T12:09:00Z
  Finalizers:
    phonebook.se.quencer.io/deployment
  Generation:        2
  Resource Version:  91942169
  UID:               a91c64b1-7d34-4a1b-83bc-fb9a00380131
Spec:
  Provider:
    Image:  ghcr.io/pier-oliviert/providers-gcore:v0.3.7
    Name:   gcore
  Secret Ref:
    Keys:
      Key:   GCORE_PERMANENT_API_TOKEN
      Name:  GCORE_API_TOKEN
    Name:    phonebook-secrets
  Zones:
    myzone.com
Status:
  Conditions:
    Last Transition Time:  2024-11-02T12:09:22Z
    Reason:                Deployment.apps "provider-gcore" is invalid: spec.template.spec.containers[0].image: Required value
    Status:                Error
    Type:                  Deployment
Events:                    <none>
❯ kg dnsintegrations.se.quencer.io gcore -oyaml|kneat
apiVersion: se.quencer.io/v1alpha1
kind: DNSIntegration
metadata:
  labels:
    argocd.argoproj.io/instance: k8s-blue-cc-phonebook
  name: gcore
spec:
  provider:
    image: ghcr.io/pier-oliviert/providers-gcore:v0.3.7
    name: gcore
  secretRef:
    keys:
      - key: GCORE_PERMANENT_API_TOKEN
        name: GCORE_API_TOKEN
    name: phonebook-secrets
  zones:
    - myzone.com

scratch that, i removed the dnsintegration gcore and redeployed it and the pod started, will do some more tests and come back, thank you!

@WladyX I was going crazy over here, looking at the code I couldn't understand what was going on and was about to create a discord server to discuss with you.
Glad you got it working!

i just tried deleting the dnsintegration and testing without image spec, still does not work, so pls bump the chart, so I can test it without image in dnsintegration.
the record was created ok on gcore when I tried with the image specified, but I would have expected an error from desec, since it should try to create the record on both, but that's another story, I can opened another issue if you like.
thank you!

authors: WladyX pier-oliviert

repo: pier-oliviert/phonebook


text:
Fix docs Assets section

Changes
Fix docs Assets section.
Before:

After:

Thank you!

authors: FredKSchott Utwo

repo: pikapkg/snowpack


text:
🛑 Blog URL is down

In 0b0d43a, Blog URL (http://blog.pik.farm) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Blog URL is back up in cfff9f9 after 12 minutes.

repo: pikfarm/PikfarmStatus


text:
🛑 www.pikfarm.com is down

In 17a712b, www.pikfarm.com (https://www.pikfarm.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: www.pikfarm.com is back up in 81515ef after 40 minutes.


text:
🛑 www.pikfarm.com is down

In 33abd07, www.pikfarm.com (https://www.pikfarm.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: www.pikfarm.com is back up in 23b6516 after 1 hour, 42 minutes.


text:
🛑 Stripe Test Endpoint URL is down

In 5e7a09e, Stripe Test Endpoint URL ($STRIPETESTAPI) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Stripe Test Endpoint URL is back up in d4f1468 after 31 minutes.


text:
convert from using uint32 to uint16 in array and run containers

Overview
See title and issue - wait on this until RLE is merged.
Fixes #664
Pull request checklist

[ ] I have read the contributing guide.
[ ] I have agreed to the Contributor License Agreement.
[ ] I have updated the documentation.
[ ] I have resolved any merge conflicts.
[ ] I have included tests that cover my changes.
[ ] All new and existing tests pass.

Code review checklist
This is the checklist that the reviewer will follow while reviewing your pull request. You do not need to do anything with this checklist, but be aware of what the reviewer will be looking for.

[ ] Ensure that any changes to external docs have been included in this pull request.
[ ] If the changes require that minor/major versions need to be updated, tag the PR appropriately.
[ ] Ensure the new code is properly commented and follows Idiomatic Go.
[ ] Check that tests have been written and that they cover the new functionality.
[ ] Run tests and ensure they pass.
[ ] Build and run the code, performing any applicable integration testing.

@travisturner On that line, we're trying to decide if it would be more space efficient to convert to an array container to a run container. Each run takes up twice the space of an element of an array, so if the number of runs is less than half the array cardinality, then using RLE is more efficient.
TLDR; I think 2 is correct there

@jaffee but doesn't the change to 16-bit array values mean that each run takes up 4x the space of an array element?

we changed to interval16 for run containers as well

oh, got it. sorry.

closed due to #758

authors: jaffee tgruben travisturner

repo: pilosa/pilosa


text:
getTypesForEIP712Domain error

Wagmi + Viem + AA upgrade === disaster.
Anyone seen this error:
../../node_modules/permissionless/actions/smartAccount/signTypedData.ts:137:49
 const types = {
> 137 |         EIP712Domain: getTypesForEIP712Domain({ domain }),
      |                                                 ^
  138 |         ...(types_ as TTypedData)
  139 |     }

'((TTypedData extends { [x: string]: readonly TypedDataParameter[]; [x: `string[${string}]`]: undefined; [x: `function[${string}]`]: undefined; [x: `address[${string}]`]: undefined; [x: `uint32[${string}]`]: undefined; [x: `bytes[${string}]`]: undefined; [x: `uint256[${string}]`]: undefined; [x: `bytes32[${string}]`]...' is not assignable to type 'TypedDataDomain | undefined'.
  Type '(TTypedData extends { [x: string]: readonly TypedDataParameter[]; [x: `string[${string}]`]: undefined; [x: `function[${string}]`]: undefined; [x: `address[${string}]`]: undefined; [x: `uint32[${string}]`]: undefined; [x: `bytes[${string}]`]: undefined; [x: `uint256[${string}]`]: undefined; [x: `bytes32[${string}]`]:...' is not assignable to type 'TypedDataDomain | undefined'.
    Type 'unknown' is not assignable to type 'TypedDataDomain | undefined'.

    "viem": "2.9.3",
    "wagmi": "2.5.12",
        "@alchemy/aa-accounts": "3.6.1",
        "@alchemy/aa-alchemy": "3.7.0",
        "@alchemy/aa-core": "3.6.1",
        "@alchemy/aa-ethers": "3.6.1",
        "@alchemy/aa-signers": "3.6.1",

Same error here. Anyone can help?

Hard to tell what's going on without a minimal reproduction. Likely that skipLibCheck is falsy in your tsconfig.json.

Hey what's your tsconfig's target? or as @jxom pointed out skipLibCheck is falsy in your tsconfig.json

Hey but can you provide a small repro repo? It will help us solve it!

We're also getting this bug when moving from typescript 5.2.2 -> 5.4.5
../../node_modules/permissionless/actions/smartAccount/signTypedData.ts:139:49
Type error: Type '((TTypedData extends { [x: string]: readonly TypedDataParameter[]; [x: `string[${string}]`]: undefined; [x: `function[${string}]`]: undefined; [x: `address[${string}]`]: undefined; [x: `uint32[${string}]`]: undefined; [x: `uint64[${string}]`]: undefined; [x: `uint256[${string}]`]: undefined; [x: `bytes32[${string}]`...' is not assignable to type 'TypedDataDomain | undefined'.
  Type '(TTypedData extends { [x: string]: readonly TypedDataParameter[]; [x: `string[${string}]`]: undefined; [x: `function[${string}]`]: undefined; [x: `address[${string}]`]: undefined; [x: `uint32[${string}]`]: undefined; [x: `uint64[${string}]`]: undefined; [x: `uint256[${string}]`]: undefined; [x: `bytes32[${string}]`]...' is not assignable to type 'TypedDataDomain | undefined'.
    Type 'unknown' is not assignable to type 'TypedDataDomain | undefined'.

  137 |
  138 |     const types = {
> 139 |         EIP712Domain: getTypesForEIP712Domain({ domain }),
      |                                                 ^
  140 |         ...(types_ as TTypedData)
  141 |     }
  142 |

trying to get a minimal repro/narrow down the typescript version

Sorry missed the ongoing thread. I can confirm that skipLibCheck is true on my end as well. Typescript upgrades are a huge PITA and cost factor these days :(. Would probably be best to always test on the latest supported Typescript version to catch this early.

obviously this isn't a permanent fix for the issue but you can use patch-package to patch in an ignore flag for this type issue.
Doing this with the patch-package allows the patch to be applied after post-install so this will work in production builds and for other engineers working in the project.
example patch:

     const types = {
+        // @ts-ignore
         EIP712Domain: getTypesForEIP712Domain({ domain }),
         ...(types_ as TTypedData)
     }

authors: CarterAppleton eruizgar91 gavinnewcomer jxom mwawrusch plusminushalf


text:
Weather board fails to upload every other reading

My weather board is powered via the USB-Micro cable and when it uploads a reading and takes another one it seems to start flashing red and fails, but then a few tries later it succeeds (Probably a connection issue). I was wondering if there's anyway of me disabling it sleeping because I think that's what the issue is.

@MrBisquit First step would be to apply the wifi improvements code in pr #199 as that can sort all sorts of issues including ones similar to what you have described. The files for this are available in a recent build: https://github.com/pimoroni/enviro/actions/runs/8784437254

Alright, I'll try that next time I bring it in, thanks :)
(I'll close the issue once I've tested it and if it works, which may be a while depending on when I next bring it in)

@MrBisquit This code is now in main, so upgrade to v0.2.0 and see how you go.

I feel like there could be an option for like if it's going to be plugged into a constant power source (instead of batteries) to have the option to never disconnect from Wi-Fi so that it could possibly prevent this issue.

repo: pimoroni/enviro