Hard-coded /usr/share in canon-cups-ufr2-2.90

Issue description
I'm trying to set up a Canon printer, and I got this error from CUPS (the job was marked as completed although no printout was produced):
completed at
Tue Jan 17 12:09:14 2017
"src = bidiCommon.c, line = 1085, err = 0¥nI/O warning :
failed to load external entity "/usr/share/cnpkbidi/cnpkbidi_info_003.xml""

Of course that /usr/share/ will cause a problem with Nix. The derivation goes to some trouble to patch up the paths, but I guess it missed this one. I'm not sure I follow the sequence of binaries that are involved.
Steps to reproduce
My configuration.nix:
  services.printing.enable = true;
  services.printing.drivers = [pkgs.canon-cups-ufr2];

Then through the localhost:631 interface I set up a printer at https://$IP/ and set its PPD to "Canon iR-ADV 4225/4235 UFR II ver.2.9" (share/cups/model/CNCUPSIRADV4235ZK.ppd) and tried to send a test page.
Technical details

System: nixos 16.09.1465.fd1dbe5 (Flounder)
Nix version: nix-env (Nix) 1.11.4
Nixpkgs version: "16.09.1465.fd1dbe5"

One other thing I tried is using strings to find which executable files in the nix store path hard-code /usr/share/cnpkbidi, and it's lib32/libcanonufr2.so.1.0.0.
Incidentally, there are also some PPDs that hard-code /usr/share/ufr2filter, but not the ones for my printer.

I don't know much about how cups driver works? Are they executables or shared objects? But we have libredirect to work around such a assumptions. It will rewrite paths according to a NIX_REDIRECTS environment variable. An example is present in the teamspeak package: pkgs/applications/networking/instant-messengers/teamspeak/client.nix

Huh. The derivation seems to roll its own rewrite using ./preload.c, rather than NIX_REDIRECTS. That's for the c3pldrv executable, and I can't tell yet if CUPS is always calling that or if it tries to load shared objects directly. I'll see if I can get anywhere with NIX_REDIRECTS though.

It will be a little painful to do, but if it turns out CUPS uses direct libraries directly (shouldn't happen, though!) you can use libredirect for CUPS itself through hacks in CUPS NixOS module.

I dug a little deeper. The CUPS log file shows the executable that (I think) is failing, it's lib/cups/filter/pstoufr2cpca. This one was not wrapped at all, so I tried this:
    wrapProgram "$out/lib/cups/filter/pstoufr2cpca" \
      --set NIX_REDIRECTS /usr/share/cnpkbidi=$out/share/cnpkbidi

Trying the test page again, CUPS picks up the new wrapped executable but the error is the same.
Using strings, that executable doesn't itself refer to /usr/share; and using ldd, the executable doesn't appear to link the shared object that does contain /usr/share (lib32/libcanonufr2.so.1.0.0). Maybe it loads it at run-time, but I'm doubtful: in the build script the lib32 stuff seems to apply only to the c3pldrv executable, not pstoufr2cpca. I added the NIX_REDIRECTS to the existing wrapper for c3pldrv too, but same result.
So, I don't know. For posterity, here's a CUPS log fragment:
https://gist.github.com/league/25ada18a8907fc60115ae88d7b0a9c69

Just in case: have you also preloaded libredirect for that program?

Oh, I may have messed that up – but now I've got this, and same error:
    wrapProgram "$out/lib/cups/filter/pstoufr2cpca" \
      --set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
      --set NIX_REDIRECTS /usr/share/cnpkbidi=$out/share/cnpkbidi

The wrapped script file:
#! /nix/store/gabjbkwga2dhhp2wzyaxl83r8hjjfc37-bash-4.3-p48/bin/bash -e
export LD_PRELOAD="/nix/store/zvf7adb9kp0k5bpx75kim98hinsglizk-libredirect-0/lib/libredirect.so"
export NIX_REDIRECTS="/usr/share/cnpkbidi=/nix/store/wliqrasw2fyydzxsbyzs9mdm5krvbh43-canon-cups-ufr2-2.90/share/cnpkbidi"
exec -a "$0" /nix/store/wliqrasw2fyydzxsbyzs9mdm5krvbh43-canon-cups-ufr2-2.90/lib/cups/filter/.pstoufr2cpca-wrapped "${extraFlagsArray[@]}" "$@"

Does that seem right?
What's the difference between makeWrapper and wrapProgram?

That seems about right, yes. wrapProgram $1 is a short-hand for mv $1 .$1-wrapped; makeWrapper .$1-wrapped $1.

Try also to:

Use libredirect for all binaries instead of custom preload.c;
Cherry-pick this patch.

I wrapped all of the executables with your libredirect patch, and managed to get a different error message — maybe that's progress!
ld.so: object '/nix/store/vcq8sdpzs3arhsh6i6a7wkqn8gnms231-libredirect-0/lib/libredirect.so'
from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored."

I guess this is because some of them are 32-bit binaries:
result/bin/.c3pldrv-wrapped:                  ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /nix/store/562mkrhl9pw9ynd5pps5vgkjxdpgjvxx-glibc-2.24/lib/ld-linux.so.2, for GNU/Linux 2.2.5, stripped
result/bin/.cnpkbidi-wrapped:                 ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /nix/store/562mkrhl9pw9ynd5pps5vgkjxdpgjvxx-glibc-2.24/lib/ld-linux.so.2, for GNU/Linux 2.2.5, stripped
result/bin/.cnpkmoduleufr2-wrapped:           ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /nix/store/562mkrhl9pw9ynd5pps5vgkjxdpgjvxx-glibc-2.24/lib/ld-linux.so.2, for GNU/Linux 2.2.5, stripped
result/lib/cups/backend/.cnusb-wrapped:       ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /nix/store/q3wx1gab2ysnk5nyvyyg56ana2v4r2ar-glibc-2.24/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped
result/lib/cups/filter/.pstoufr2cpca-wrapped: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /nix/store/q3wx1gab2ysnk5nyvyyg56ana2v4r2ar-glibc-2.24/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped

pstoufr2cpca (64-bit) is the name that popped up in the log, but maybe cnpkbidi (32-bit) is what's actually failing. I guess the ./preload.c is there to patch the 32-bit binaries.
It has a dlopen function, but it patches /usr/lib only, not /usr/share. Will attack that next.

P.S., the open function does patch /usr/share... I guess dlopen wouldn't have to.

You can get 32-bit libredirect by using pkgsi686Linux: pkgsi686Linux.libredirext.
Nikolay.

Thanks for the suggestions. I was able to get past the /usr/share problem (I think). I am using the pkgsi686Linux.libredirect.  Right now data is getting to the printer, but then the printer flags some error and refuses to continue. I'm going to hold off on cleaning up my hacks for a PR until I get it end-to-end.


Notification on page load

during page load back from history page, it's giving again previous notification.

https://github.com/piyushdolar/timeo/commit/a6fe582eaba6930825eab79ee7094a408ca46337


extract_section_darwin failure

Hi,
I think there is a change with respect to byte-like objects and strings/regular expressions in Python 3. In particular, the regular expression match in extraction.py:180 throws an exception because line is a bytes-like object.
Moreover, otool output an extra line in plain english, which I needed to skip. My version of otool is:
llvm-otool(1): Apple Inc. version cctools-900
Apple LLVM version 9.0.0 (clang-9<IP_ADDRESS>)

I don't know python well enough to offer a merge request, but I have fixed the problem with the following patch. I can create a merge request if it looks reasonable. It's possible that this requires more version checking.
--- extraction.py	2018-02-26 07:54:09.000000000 -0800
+++ /nix/store/qcym14s8kwlqmr8a5sv10xdp9kl0q9dm-wllvm-1.1.3/lib/python3.6/site-packages/wllvm/extraction.py	2018-02-26 07:57:33.000000000 -0800
@@ -8,6 +8,7 @@
 import tempfile
 import shutil
 import argparse
+import codecs

 from .popenwrapper import Popen

@@ -21,7 +22,7 @@

 from .logconfig import logConfig

-
+decode_hex = codecs.getdecoder("hex_codec")
 _logger = logConfig(__name__)

@@ -123,14 +124,14 @@

     try:
         octets = []
-        for line in lines:
-            m = otool_hexdata.match(line)
+        for line in lines[1:]:
+            m = otool_hexdata.match(line.decode())
             if not m:
                 _logger.debug('otool output:\n\t%s\nDID NOT match expectations.', line)
                 continue
             octetline = m.group(1)
             octets.extend(octetline.split())
-        retval = ''.join(octets).decode('hex').splitlines()
+        retval = decode_hex("".join(octets))[0].splitlines()
         if not retval:
             _logger.error('%s contained no %s segment', inputFile, darwinSegmentName)
     except Exception as e:

Is this a recent change in Python? What version are we talking about?  I have the same otool but
I am stuck, by choice,  in the 2.7 python world. I thought we test travis for python 3.

Sorry! I'm using python 3.6.4 (which was pulled in by the nix package for wllvm). It looks like you might have Travis testing python >= 3.0 but on Linux only, while this particular failure is in the OS X specific procedure.

Great @abakst  I shall look into it. Thanks for the report and the proposed solution. I will get back to you with suggestions for a pull request, so your efforts can be acknowledged.

So I am still looking into this. But it currently looks good. Just wish homebrew did not rename pythons
underneath me. So it will take me a while to be sure I know what I am doing.

@abakst I have incorporated your changes into our working version
https://github.com/SRI-CSL/whole-program-llvm
and updated the pip package. Let me know if it works well for you. I will push it
upstream when I do that next.

@ianamason, I just cloned & installed with pip. Looks good! Thanks!

I suppose it's likely that this breaks on older versions of OS X...

I hope not, but  if homebrew is anything to go by, the motto these days is "screw the users" :-)


Annotation tool cannot reach the bottom of the canvas.

Please look at the two screenshots below. No matter which annotation tool I use (rectangle, ellipse, free-form, or polygon), I cannot reach below a certain line in the canvas. I'm using the latest of the release2.1 branch.

This problem is fixed here: https://github.com/IIIF/mirador/pull/808


chore: split Topology.UniformSpace.Basic

and reorganize material in UniformSpace.Compact (moving some material from Basic into it, and splitting parts of the original content out into later files)

I see that 2 files got heavy imports. Is it intentional?

Those are newly created files, so it is counting relative to a baseline of 0!
@adomani, could we perhaps make this clearer in the imports report?

I can think of two possibilities right now:

add (new file) next to each new file;
add a column that contains the head count also in the extended report, so there would be 0 for new files.

I imagine that either option is easy to implement, and both could be implemente ld as well.
What do you think?

I think (new file) is great.

Thanks! :tada:
bors merge


Improve the way LLM eval runs in the background

We currently have no specialized solution whatsover for running LLM evals in the background.
After receiving the request, we simply start to iterate over the examples to annotate on the backend. We check for the running flag at each iteration of the loop and stop if the flag is set to False.
Surprisingly, this seems to work quite ok so far, probably since Flask takes care of threading.
However, it seems to be too YOLO. I also expect it not to work robustly, especially if users start launching multiple tasks at once.
At first, I also tried using Python threads manually in the code, something along the lines of:
thread = Thread(target=utils.run_llm_eval, args=(app, campaign_id))
thread.daemon = True
thread.start()

But that actually rendered the frontend unresponsive (I might have just messed it up, though). In any case, implementing a more principled solution would be much appreciated.

I would rather switch to async(io/HTTP), where we can wait for thousands of responses without affecting the server performance. We always delegate the heavy work to another server, and I think this works well for us.
If you worry about scaling the worker nodes, I would start solving it only once the waiting times for the users are too bad in some usecase. Somebody had to simulate it first. Personally, I think  I will never need it in factgenie.


Auto-sync files to Dropbox

Currently to save files to Dropbox, user has got to manually trigger the action, by selecting "Save progress" action in menu. We could add an ability to enable auto-sync file every specified amount of time.

Have anybody worked on this? If not, may I give it a try?

@WhiteHsu It's yours! Good luck :)

@sebbrudzinski
After some study, I have question to this feature and would like to ask your suggestion.
For current version, the update will sync to Dropbox unless clicking the "Save Progress" option. After clicking it, update will not only sync to Dropbox but there'll be new record created on the "Dropbox Revisions" list on the table below.

So I'm wandering if we have auto-sync feature, after an auto save, do we need to create new record in "Dropbox Revisions" as well?

If it'll create new record, because auto-sync may be triggered every few minutes, then we may have a lot of revision records in "Dropbox Revisions", which seems very poor user experience.
If it'll NOT create new record, and the auto-sync will overwrite the latest record in "Dropbox Revisions". However, if user would like to restore back to an old version, he/she may find the old version has already been overwritten by auto-sync, so the old version may not exist any more. This seems not a good way to implement this feature either.
Maybe we can have an auto sync will NOT update anything in "Dropbox Revisions", there'll be new record unless manually selecting "Save Progress"? I'm not sure if this's a good way and afraid whether this will make other issue, such as to make any data or update missed?

I'm not sure if I'm thinking on the right way and need your help to suggest. Please kindly help provide your feedback or comments. Thank you very much.

@sebbrudzinski
After some study, I have question to this feature and would like to ask your suggestion.
For current version, the update will sync to Dropbox unless clicking the "Save Progress" option. After clicking it, update will not only sync to Dropbox but there'll be new record created on the "Dropbox Revisions" list on the table below.

So I'm wandering if we have auto-sync feature, after an auto save, do we need to create new record in "Dropbox Revisions" as well?

If it'll create new record, because auto-sync may be triggered every few minutes, then we may have a lot of revision records in "Dropbox Revisions", which seems very poor user experience.
If it'll NOT create new record, and the auto-sync will overwrite the latest record in "Dropbox Revisions". However, if user would like to restore back to an old version, he/she may find the old version has already been overwritten by auto-sync, so the old version may not exist any more. This seems not a good way to implement this feature either.
Maybe we can have an auto sync will NOT update anything in "Dropbox Revisions", there'll be new record unless manually selecting "Save Progress"? I'm not sure if this's a good way and afraid whether this will make other issue, such as to make any data or update missed?

So which is the recommended way to implement this feature? I'm not sure if I'm thinking on the right way and need your help to suggest. Please kindly help provide your feedback or comments. Thank you very much.

@WhiteHsu We do not really have any choice here. The "Dropbox Revisions" list is managed by Dropbox itself. Every time a save to the file occurs, Dropbox automatically creates a revision entry I haven't done much research concerning this, but I believe there's no way to turn this off - feel free to verify.
Having said that, I guess we are fine with having a lot of revision records for now. Perhaps the display of the revision records can be adjusted or grouped somehow later on, in a separate ticket, so the auto-save revisions appear together. For now, I'm fine with just having a list of all the revisions.

@sebbrudzinski
OK, I got it. Thanks for your reply. I'll update codes on this way.  :-)

@sebbrudzinski
I've raised pull request but it got failed on Travis CI:
https://travis-ci.org/sebbrudzinski/Open-LaTeX-Studio/jobs/157129183
Because I'm not familiar with Travis CI, may you help guide me how to view the root cause of CI failure? Thank you very much.

@WhiteHsu Scroll to the bottom of the output and you will see a list of the checks that failed, right above the build summary.

@sebbrudzinski
Thanks for reply. I find it and already fix now. Please help review my code updates. Many thanks.  :-)

@sebbrudzinski
I have committed and pull request for this item but not gotten further response. May you kindly help check my updates and provide your valuable feedback? Please kindly let me know if there's anything wrong and where I should refine and improve (my Email is hsnu97526@gmail.com). Thank you very much.  :-)
Here's the URL of Pull Request:
https://github.com/sebbrudzinski/Open-LaTeX-Studio/pull/143

The basic auto-sync has been implemented by @WhiteHsu so I'm closing this ticket. Improvements/enhancements to the existing auto-sync should have new tickets opened.

@sebbrudzinski
Thanks for your help.  I'll pick another ticket to work.  :-)


mag2318_Assignment 4

I'm still having some issues with the accuracy measures in Assignment 4 part 2 that still need to be fixed..

Got it, let me know when you have part 2.


Multiple files upload

Hi!
For one of projects I needed multiple files upload so I extended CI_Upload with two functions: do_multiple_upload() and get_data() (that are equivalents of do_upload() and data() respectively but for multiple files). My extension uses dirty hack with substituting $_FILES contents and calling do_upload(), but that's the best way I can think of (duplicating whole class or just do_upload() is much worse).
Maybe that feature is important enough to add to CI, or maybe someone would just find my code useful, so here it is:
{{{
#!php
 $values) {
				$_FILES[$fld][$attr] = $values[$i];
			}
            // performing upload and updating flag
			$res = $this->do_upload($fld);
            $flag = $flag || $res;
            // saving upload's data (it can later be fetched using get_data()
            array_push($this->multiple_upload_data, $this->data());
		}
		return $flag;
	}

	// --------------------------------------------------------------------

	/**
	 * Returns data about all uploaded files as data() method does
	 *
	 * @return	array
	 */
	public function get_data()
	{
		return $this->multiple_upload_data;
	}

	// --------------------------------------------------------------------
}

?>
}}}
Thank you for developing Code Igniter!

I think codeigniter must have a multiple upload in the next release?
Te class CI_Upload  should have do_upload() method and do_multiple_upload() method.
Once uploaded files $this->upload->data() method should return an associative array with the information of each file.

Why has this been made "won't fix"? It still needs fixing. I can't believe I am still having to extend the upload class...
If people are struggling to write this here is a nice example: https://github.com/avenirer/MY_Upload

+1 @pleaseremove

in my opinion it is shame in 2015 and with good framework like codeigniter to discuss if we accept or not accept to add multiupload... so i support this request with @pleaseremove

You know what's a shame? That even in 2016 people like you will come here complaining that the framework isn't adding tens of lines of code for something that you can do by simply wrapping do_upload() in a foreach loop.
We're not discussing this; it's rejected and that's why it has the "Won't Fix" label.
If you truly understood the DRY concept, you would know that it stands for "Don't Repeat Yourself". So please explain to me, how is implementing a do_multiple_uploads() method is not in fact repetition of all the do_upload() logic? Because that would be, by definition, a violation of the DRY principle.
And furthermore, how would it make your code more in tact with DRY? The way I see it, there's nothing WET about the following piece of code:
foreach (['file1', 'file2', 'file3'] as $field)
{
    $this->upload->initialize($config);
    if ($this->upload->do_upload($field))
    {
        // success
    }
    else
    {
        // error
    }
}

And last but not least, DRY, KISS and whatever other catchy-name principles you can think of, are not the holy grail of programming and must not be followed blindly. There's always context to have in mind and you must always, always know why you're doing something.

The Solution:
Single file upload
Example:
<input type="file" name="image_file">
Controller:
        $config['upload_path'] = FCPATH . 'uploads/';
        $config['allowed_types'] = '*';

        $this->load->library('upload', $config);

        if ($this->input->post('single')) {
            if ($this->upload->do_upload('image_file')) {
                //SUCCESS
                $upload_data = $this->upload->data();
                var_dump($upload_data);
            } else {
                //ERROR
                $error = $this->upload->display_errors();
                var_dump($error);
            }
        }

View:
<?php echo form_open_multipart() ?>
                    <?php echo form_upload('image_file'); ?>
                    <?php echo form_submit('single','Upload'); ?>
		<?php echo form_close() ?>

Multiple inputs file upload
Example:
<input type="file" name="image_file1">
<input type="file" name="image_file2">
Controller:
        $config['upload_path'] = FCPATH . 'uploads/';
        $config['allowed_types'] = '*';

        $this->load->library('upload', $config);

       if ($this->input->post('multiple_inputs')) {

            $arr_inputs = array('image_file1', 'image_file2');
            $arr_result = array();

            foreach ($arr_inputs as $field) {
                $this->upload->initialize($config);
                if ($this->upload->do_upload($field)) {
                    //SUCCESS
                    $arr_result[$field] = array(
                        'upload_success' => true,
                        'upload_data' => $this->upload->data(),
                        'errors' => false
                    );
                } else {
                    //ERROR
                    $arr_result[$field] = array(
                        'upload_success' => false,
                        'upload_data' => array(),
                        'errors' => $this->upload->display_errors()
                    );
                }
            }

            var_dump($arr_result);

        }

View:
<?php echo form_open_multipart() ?>
                    <?php echo form_upload('image_file1'); ?>
                    <?php echo form_upload('image_file2'); ?>
                    <?php echo form_submit('multiple_inputs','Upload'); ?>
		<?php echo form_close() ?>

File upload with "multiple" attribute
Example:
<input type="file" multiple name="images[]">
Controller:
        $config['upload_path'] = FCPATH . 'uploads/';
        $config['allowed_types'] = '*';

        $this->load->library('upload', $config);

       if ($this->input->post('multiple_attribute')) {

            $arr_result = array();

            $files = $_FILES;
            $num_files = count($_FILES['images']['name']);

            for ($i = 0; $i < $num_files; $i++) {

                $_FILES['images']['name'] = $files['images']['name'][$i];
                $_FILES['images']['type'] = $files['images']['type'][$i];
                $_FILES['images']['tmp_name'] = $files['images']['tmp_name'][$i];
                $_FILES['images']['error'] = $files['images']['error'][$i];
                $_FILES['images']['size'] = $files['images']['size'][$i];

                $this->upload->initialize($config);

                if ($this->upload->do_upload('images')) {
                    //SUCCESS
                    $arr_result[] = array(
                        'upload_success' => true,
                        'upload_data' => $this->upload->data(),
                        'errors' => false
                    );
                } else {
                    //ERROR
                    $arr_result[] = array(
                        'upload_success' => false,
                        'upload_data' => array(),
                        'errors' => $this->upload->display_errors()
                    );
                }
            }

            var_dump($arr_result);

        }

View:
<?php echo form_open_multipart() ?>
                    <?php echo form_upload('images[]','','multiple'); ?>
                    <?php echo form_submit('multiple_attribute','Upload'); ?>
		<?php echo form_close() ?>

The Solution with examples:
Single file upload
Example:
<input type="file" name="image_file">
Controller:
        $config['upload_path'] = FCPATH . 'uploads/';
        $config['allowed_types'] = '*';

        $this->load->library('upload', $config);

        if ($this->input->post('single')) {
            if ($this->upload->do_upload('image_file')) {
                //SUCCESS
                $upload_data = $this->upload->data();
                var_dump($upload_data);
            } else {
                //ERROR
                $error = $this->upload->display_errors();
                var_dump($error);
            }
        }

View:
<?php echo form_open_multipart() ?>
                    <?php echo form_upload('image_file'); ?>
                    <?php echo form_submit('single','Upload'); ?>
		<?php echo form_close() ?>

Multiple inputs file upload
Example:
<input type="file" name="image_file1">
<input type="file" name="image_file2">
Controller:
        $config['upload_path'] = FCPATH . 'uploads/';
        $config['allowed_types'] = '*';

        $this->load->library('upload', $config);

       if ($this->input->post('multiple_inputs')) {

            $arr_inputs = array('image_file1', 'image_file2');
            $arr_result = array();

            foreach ($arr_inputs as $field) {
                $this->upload->initialize($config);
                if ($this->upload->do_upload($field)) {
                    //SUCCESS
                    $arr_result[$field] = array(
                        'upload_success' => true,
                        'upload_data' => $this->upload->data(),
                        'errors' => false
                    );
                } else {
                    //ERROR
                    $arr_result[$field] = array(
                        'upload_success' => false,
                        'upload_data' => array(),
                        'errors' => $this->upload->display_errors()
                    );
                }
            }

            var_dump($arr_result);

        }

View:
<?php echo form_open_multipart() ?>
                    <?php echo form_upload('image_file1'); ?>
                    <?php echo form_upload('image_file2'); ?>
                    <?php echo form_submit('multiple_inputs','Upload'); ?>
		<?php echo form_close() ?>

File upload with "multiple" attribute
Example:
<input type="file" multiple name="images[]">
Controller:
        $config['upload_path'] = FCPATH . 'uploads/';
        $config['allowed_types'] = '*';

        $this->load->library('upload', $config);

       if ($this->input->post('multiple_attribute')) {

            $arr_result = array();

            $files = $_FILES;
            $num_files = count($_FILES['images']['name']);

            for ($i = 0; $i < $num_files; $i++) {

                $_FILES['images']['name'] = $files['images']['name'][$i];
                $_FILES['images']['type'] = $files['images']['type'][$i];
                $_FILES['images']['tmp_name'] = $files['images']['tmp_name'][$i];
                $_FILES['images']['error'] = $files['images']['error'][$i];
                $_FILES['images']['size'] = $files['images']['size'][$i];

                $this->upload->initialize($config);

                if ($this->upload->do_upload('images')) {
                    //SUCCESS
                    $arr_result[] = array(
                        'upload_success' => true,
                        'upload_data' => $this->upload->data(),
                        'errors' => false
                    );
                } else {
                    //ERROR
                    $arr_result[] = array(
                        'upload_success' => false,
                        'upload_data' => array(),
                        'errors' => $this->upload->display_errors()
                    );
                }
            }

            var_dump($arr_result);

        }

View:
<?php echo form_open_multipart() ?>
                    <?php echo form_upload('images[]','','multiple'); ?>
                    <?php echo form_submit('multiple_attribute','Upload'); ?>
		<?php echo form_close() ?>

@davidgv88 Your last comment didn't accidentally disappear, I deleted it. This isn't StackOverflow ... we're not looking for a 3 pages long snippet of how to do something.

@narfbg OK!

I do take your point @narfbg and clearly whatever you decide is what will happen so that is fair enough.
I do just want to make clear that I do not support a "do_multiple_upload" option. That to me is no very elegant.
The way I normally extend what is there (and as such what I would be after) is support for the "multiple" attribute. Aka, the do upload would perform as normal, but if there were multiple files under that field name, spit out an array of results.
I accept there are complications like what to do if there is a single failure in a mix of 3 or 4 files etc, but personally I find most of my apps need to support multiple files.
Thanks

Codeigniter by default not support upload files with "multiple" attribute.
The Solution with "multiple" attribute is this:
Example:
<input type="file" multiple name="images[]">
        $config['upload_path'] = FCPATH . 'uploads/';
        $config['allowed_types'] = '*';

        $this->load->library('upload', $config);

       if ($this->input->post('multiple_attribute')) {

            $arr_result = array();

            $files = $_FILES;
            $num_files = count($_FILES['images']['name']);

            for ($i = 0; $i < $num_files; $i++) {

                $_FILES['images']['name'] = $files['images']['name'][$i];
                $_FILES['images']['type'] = $files['images']['type'][$i];
                $_FILES['images']['tmp_name'] = $files['images']['tmp_name'][$i];
                $_FILES['images']['error'] = $files['images']['error'][$i];
                $_FILES['images']['size'] = $files['images']['size'][$i];

                $this->upload->initialize($config);

                if ($this->upload->do_upload('images')) {
                    //SUCCESS
                    $arr_result[] = array(
                        'upload_success' => true,
                        'upload_data' => $this->upload->data(),
                        'errors' => false
                    );
                } else {
                    //ERROR
                    $arr_result[] = array(
                        'upload_success' => false,
                        'upload_data' => array(),
                        'errors' => $this->upload->display_errors()
                    );
                }
            }

            var_dump($arr_result);

        }

Has this been implemented yet? This looks just like the thing I need for our system. Looping is such a hassle and strain on resources.

According to the DRY principle we shouldn't have to write for loops every time we want to implement multiple file uploads. Besides that it keeps code clean if it's centralised.
Waiting for this to implemented.

TL;DR:
There is nothing left to be contributed to this thread and it has already been decided that this is not going to be implemented.
Here's a few reasons why (the list is not exhaustive):

Implementing the feature means making assumptions about:

Configuration being always the same
Error handling and the desired behavior
The desired behavior at large

The above-listed assumptions will result in numerous bug reports, regardless of how those would be treated. It won't make everybody happy.
Writing a loop is simple, easy, trivial.
Few applications need to use this feature on more than one screen and a well-designed application has to abstract that; this is not a DRY violation (and DRY is not the "law" to beging with).

The decision won't change.
I'm permanently locking the thread to avoid more pointless messages.

Has this been implemented yet?

Yes, but we like to troll people by keeping issues open and with the "Won't Fix" label applied.

Looping is such a hassle and strain on resources.

I agree, looping does take hours to implement. And it takes up so much resources, which would magically go away if the framework did the looping instead of you.

According to the DRY principle we shouldn't have to write for loops every time we want to implement multiple file uploads.

Indeed, the DRY principle does explicitly say that for loops equal repetitive code writing ... if only somebody else pointed this out earlier so we could avoid having such a long thread.
</sarcasm>

To the possibly offended by this comment:
If you can't be bothered to read the thread you are replying to (not even the last few comments, nor even its very visible labels), then you cannot reasonably expect a nice answer either.
No offense meant; that's just how it works and I like sarcasm.


Don't push the type hash on the stack for remote calls

https://www.pivotaltracker.com/story/show/161718149
This breaks breaks consensus since earlier versions of the vm cannot run code generated with this compiler. Earlier versions of code can be run by this vm, though.

[x] Update deploy dir and protocol version. (wait for rebase since other PRs already does this.)

Rebased and made the bumping.


FIX #162 - removed "*." added by client.py, removed often incomplete …

…fixes from most providers.
Contributor offers to license certain software (a “Contribution” or multiple “Contributions”) to sewer, and sewer agrees to accept said Contributions, under the terms of the MIT License.
Contributor understands and agrees that sewer shall have the irrevocable and perpetual right to make and distribute copies of any Contribution, as well as to create and distribute collective works and derivative works of any Contribution, under the MIT License.
What(What have you changed?)
Removed prepending of "*." to wildcard domains in Client.get_identifier_authorization to fix #162 as well as several other providers that appear to have the same problem but no open bug I can find.
Why(Why did you change it?)
8 of 11 providers had the obvious domain_name.lstrip("*') patch, though several only apply that to adding domains, and so probably fail when deleting them (may not be checked & reported in the driver?).  One other achieved the same removal in a different way.  The two that didn't were rout53 (cause of the cited bug report) and powerdns, which is a fairly new driver and certainly looks like it would fail to handle "*.domain.tld".  Would love to hear from @kylejohnson about that one.

 Here is an overview of what got changed by this pull request:

Clones removed
==============
+ sewer/dns_providers/tests/test_hedns.py  -2
+ sewer/dns_providers/tests/test_aliyundns.py  -2

See the complete overview on Codacy


Adds .local directory for tools configurations.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

.gitignore
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Minor changes in Chapter 12

These are mostly small wording or code style things, but it also fixes an issue that could occur if you had multiple setTimeout requests that fired in a different order from how they were created.

Which line of code fixes the bug you mentioned?

The line that fixes the bug is in the JavaScript, where the line delete XHR_REQUESTS[handle] would remove a key, which would potentially make the handle assigned to the next XHR be a handle that had already been assigned. By removing the delete line I've introduced a potential memory leak, but we already had memory leaks (and they're called out in the JS chapter) so I think it's OK. (Alternatively, we could fix it by introducing a real counter... I'll at least throw up a footnote with a warning.)

Added a footnote earlier, when discussing setTimeout, since it has a similar issue.

The line that fixes the bug is in the JavaScript, where the line delete XHR_REQUESTS[handle] would remove a key, which would potentially make the handle assigned to the next XHR be a handle that had already been assigned. By removing the delete line I've introduced a potential memory leak, but we already had memory leaks (and they're called out in the JS chapter) so I think it's OK. (Alternatively, we could fix it by introducing a real counter... I'll at least throw up a footnote with a warning.)

Does the javascript runtime need to be in this PR then?

Please see latest commit message :)


Uncaught ReferenceError: UserInfo is not defined

Hi Vincent!
Michael here. I have been wanting to integrate the API on our Shopify store's checkout page. FYI, the custom js codes that we can put on the checkout page is limited to 8000 chars only by Shopify for some reason. Also, Shopify's checkout page is served on a different server outside of our full control, so any files we upload on our domain won't matter on the checkout page.
This limitation forces us to become more creative on how we insert our custom js codes notwithstanding the character limit. Due to this, there is only one way we know we can integrate the API (at least for now). However, we are getting an uncaught referenceerror and couldn't integrate it properly. I am wondering if you can give some advice?

Thanks a lot!
Best,
Michael

The error happens because you're calling getUI() right away even if the UserInfo JS has not yet been loaded from Cloudflare.
Something like this might help. Found on https://stackoverflow.com/questions/14644558/call-javascript-function-after-script-is-loaded
function getUI() {   // your code here...  } var uiLib = document.createElement("script"); uiLib.type = "text/javascript"; uiLib.src = "your_src_here"; if(uiLib.readyState) {  //IE     uiLib.onreadystatechange = function() {       if ( uiLib.readyState === "loaded" || uiLib.readyState === "complete" ) {         uiLib.onreadystatechange = null;         getUI();       }     };   } else {  //Others     uiLib.onload = function() {       getUI();     };   } document.head.appendChild(uiLib);

Hi @igorbenic
I didn't think of that lol I was literally checking the actual external  if it has been loaded then run the function, like so var apiLoaded = $('script[src="<external JS>"]').length; which I believe was wrong lmao. Anyway, your solution works really great and we can now integrate the API just right.
Thanks a lot! Cheers!


Fix sha1sum call to work on both Linux and Darwin.

When running scripts/run on Darwin the xhyve boot process fails due to a missing root device. This is because sha1sum is called to generate a temp folder using the SHA1 hash of dist/artifacts/initrd  as its name. This temp folder is then used to generate the Rancher OS initrd.test to boot xhyve. Since sha1sum is named shasum on Darwin the command fails and $INITRD_TMP is set to ./build instead and the generated initrd.test file is unbootable. This PR fixes the issue by setting sha1sum to the result of which sha1sum for Linux hosts and the result of which shasum for Darwin hosts. Tested and working as intended on a clean 10.10.5 host.

@bruienne when I switched to OS X, I also hit this, but quickly found an alternative:
brew install md5sha1sum

This installs md5sum and sha1sum binaries and makes the problem go away :)
Seriously though, I think I should write a small blurb in the README on how to start developing w/ OS X.

@bruienne BTW, you also need coreutils (for greadlink), cdrtools (for mkisofs) and qemu (for qemu-img) installed to be able to successfully run ./scripts/run

@imikushin I did also install the required tools with brew, but since I've run into the sha1sum vs. shasum issue in the past I didn't think it required installing overlapping tools. Obviously the tools in coreutils, cdrtools (actually that needed dvdrtools for me) and qemu are not built in to Darwin so it was required to install them. You're right that it's more of a documentation issue than code. Thought I'd offer the PR with the fix in case it would be useful to the project.

@bruienne Does shasum -a 1 work across both.  I think I've ran into this before and found that using shasum and passing the algorithm was the most compatible incarnation.  (fyi, Not a Mac user, don't have a Mac readily available)

@ibuildthecloud It doesn't - sadly. The sha<algo>sum commands on Linux are not aliases but actual separate binaries so there's no multi-purpose shasum to call. One other solution could be to use openssl instead to generate the hash: openssl dgst -sha1 <filename> - that's pretty certain to be available across platforms. It comes with OS X by default. If you'd like I can update the PR using openssl instead.

Oh bummer.  I run Ubuntu/Debian and I do have shasum but maybe that isn't consistent across all Linux distros.


Add bazel as a supported repo for clone, add updated readme

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


GitHub webhook token

Explore:

#1227

Provide a way to have ngrok in cluster using the following template, using informations we already collect from installation time and store on vault:
apiVersion: v1
kind: ServiceAccount
metadata:
  name: ngrok-agent-sa
  namespace: ngrok-agent
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: ngrok-agent-cr
rules:
  - apiGroups: [""]
    resources: ["secrets"]
    verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: ngrok-agent-crb
subjects:
- kind: ServiceAccount
  name: ngrok-agent-sa
  namespace: ngrok-agent
roleRef:
  kind: ClusterRole
  name: ngrok-agent-cr
  apiGroup: rbac.authorization.k8s.io

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: ngrok-agent
  namespace: ngrok-agent
spec:
  selector:
    matchLabels:
      app: ngrok-agent
  template:
    metadata:
      labels:
        app: ngrok-agent
    spec:
      containers:
      - args:
        - http
        - atlantis.atlantis.svc.cluster.local:80

        image: docker.io/ngrok/ngrok:3
        name: ngrok-agent
        ports:
        - containerPort: 4040
          name: web
        readinessProbe:
          httpGet:
            path: /status
            port: 4040
            scheme: HTTP
          initialDelaySeconds: 10
          periodSeconds: 20

---
apiVersion: v1
kind: Service
metadata:
  name: ngrok-agent
  namespace: ngrok-agent
spec:
  ports:
  - name: web
    port: 4040
    targetPort: 4040
  selector:
    app: ngrok-agent

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: ngrok-checker
spec:
  selector:
    matchLabels:
      app: ngrok-checker
  template:
    metadata:
      labels:
        app: ngrok-checker
    spec:
      serviceAccount: ngrok-agent-sa
      containers:
      - command:
        - /usr/local/bin/kubefirst
        - tool
        - webhook-checker
        - --owner
        - kxdroid
        - --repo
        - gitops
        image: docker.io/6zar/k1-webhook-checker:a7eee22
        env:
        - name: KUBEFIRST_GITHUB_AUTH_TOKEN
          valueFrom:
          secretKeyRef:
            name: ngrok-secrets
            key: PERSONAL_ACCESS_TOKEN
            optional: false
        name: ngrok-checker
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: ngrok-secrets
  annotations:
    argocd.argoproj.io/sync-wave: "0"
spec:
  target:
    name: ngrok-secrets
  secretStoreRef:
    kind: ClusterSecretStore
    name: vault-secrets-backend
  refreshInterval: 10s
  dataFrom:
    - extract:
        key: /ci-secrets

I end-up going to this route of having as external tool to handle this feature. This way, I think this PR may be closed. Feel free to re-use the code here on in the article if its interest you as feature to kubefirst.
Regards,


datahub health check tool

datahub depends many service, some connection issue may occur.
some user didn't use docker, rather integrate existing database system.

so basically, the tool will do the port, user, schema check...,
and fix and setup it when the table and schema is missing if specifyed.
i'll explore it a little.
https://github.com/linkedin/datahub/blob/master/docs/debugging.md

elk health check example:
https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/elk.nix

@clojurians-org do you plan to work on this further? If not we'll close this issue for now and maybe revisit it again in the future if needed.


[INJIMOB-2160] use pixelpass for processing mmdoc data for rendering

Description

Wallet will get the mso_mdoc Vc output from vci-client and passing it to PixelPass to convert the CBOR to JSON. The processed JSON will then be used to render VC data in UI

Issue ticket number and link

Example : INJIMOB-000

Screenshots

> More info.

Inji wallet is not having the updated Pixelpass version so
PixelPass().toJson(...)  method causes 'method missing' failure


Videoio for WinRT maintenance update

A few refactoring changes simplifying inner structure of videoio for WinRT bits, comment improvements and overall code cleanup.

:+1:


Login walkthrough

Added the library walk-through's User Authentication feature in order to manage user access to comments page.

https://travisjy-step-2020-v2.ue.r.appspot.com/


Convert to bitmap

Hello ik have a question, how can i convert the fastbitmap to a bitmap?

Got the same question

I did find a solution: in the source code there is this variable
private readonly Bitmap _bitmap;
if you chance this to
public readonly Bitmap _bitmap;
then you have a using bitmap

ah. ok. I fiddled around with my code and apparently one can just convert the FastBitmap by simply doign
Bitmap bitmap = myfastbitmap and vice versa.

i have tried that but it did not work.

Weird. That way I made this work.
The image was made pixel by pixel from a json and for the scaling in the lower left corner I converted it to normal bitmap and used Graphics.Fromimage(bitmap).

yes i do

aah maybe there is a difference between the nuget package and the source code

i would be nice if the developer could tell us.

might be. If you want to I can send you my code.. maybe it could help you.

i would be nice

i dont know if it is smart to chance the variable to public

I mean.. it really depends on what you are doing.

i am creating a image processing class for my CCreative library and i need the bitmap so i can draw it in GDI+ and opengl

https://github.com/WaldemarLehner/EDEDSMVisualizer/blob/feature/gridlines/EDEDSMVisualizer/pages/Generation.xaml.cs#L379
The code is horrible, not commented.. but maybe it ill help you.

bitmap is a FastBitmap while _bitmap is a regular Bitmap

i think there is a difference to the nuget package and the source code
ps i copied the source code onto my project.

I mean.. in that case.. try the nuget package 😄

i am trying to use as less as possible but maybe it is better. thank you for your comment.

you're welcome :) good luck!

lol i came to help you but you helped me. good luck to you to.

Heyo! Looks like I came a little late to the party, but anyways...
The reason I left _bitmap private was to encourage using FastBitmap as a thin layer that you'd use locally whenever you needed to manipulate a bitmap. Since FastBitmap works mostly by locking and unlocking the bitmap's memory region using LockBits, it doesn't make sense to keep the bitmap locked further than a couple of operations, since to use the bitmap again to paint to the screen etc. you need the bitmap to be unlocked anyways.
If possible, I recommend passing the original Bitmap around method parameters and lock/unlock FastBitmap's locally, or wrap the Bitmap+FastBitmap pair on a structure and pass that instead.

Thank you for your response :)


Updated the about page text

Pre-Flight checklist

[x] Screenshots and design review for any changes that affect layout or styling

[x] Desktop screenshots

[x] Testing
[x] Changes have been manually tested

What are the relevant tickets?
Closes #519
What's this PR do?
Accomplishes the following

[x] text changes
[x] fix the link: Find courses with Instructor Insights
[x] update the "Dean's message" video to https://www.youtube.com/watch?v=1vSCB9V-Yqw
[x] add Angela Pignatiello, Administrative Assistant to the OCW team  (until I locate a picture, you can use the same grey box as the one for Phil Sandy)
[x] update the faculty advisory committee members

How should this be manually tested?
Verify all required changes mentions in issue #519 have been made.
Screenshots (if appropriate)

Please add / change the following images:

@pdpinch Can you also provide some meta data as well in regards to where to add them, their name and title.

Looks good. Noticed few things: I think, this might be something which can to be catered here.
1- Redbox: 2nd paragrapgh:
Doc:
Site:
2- Milestones > 2001-2005: Document has 5 points where as site has 7 points, Do we have to match it with the document? As there's this note in the document: ** Note: text has generally been rewritten throughout the page.** Same goes for 2006-2010, 2011-2015, 2016-2020: Number/Count of bullet points are not matching with the document.

@pdpinch @MAbdurrehman12, I just updated the text of the points in milestones  and did not remove any point. As the doc did not explicitly say to remove any point.
I just need some confirmation if I can remove  points in milestones which are not mentioned in document

I just need some confirmation if I can remove points in milestones which are not mentioned in document

Yes, please remove the points that don't appear in the updated doc.

@Wassaf-Shahzad here's the issue for the home page link. I think you said you wanted to add it to this PR.

The new images are all people who are already on the page:

[ ] Brett Paci
[ ] Curt Newton
[ ] Sarah Hansen
[ ] Yunpeng Wang
[ ] Angela Pignatiello

@Wassaf-Shahzad here's the issue for the home page link. I think you said you wanted to add it to this PR.

Also added changes needed for issue #524

Updated text and also included changes for issue #530

Thanks. I know that was a lot of small text changes, but it looks like you missed a couple:

[ ]  https://github.com/mitodl/ocw-hugo-themes/pull/522/files#r829622620
[ ]  https://github.com/mitodl/ocw-hugo-themes/pull/522/files#r829622412
[ ]  https://github.com/mitodl/ocw-hugo-themes/pull/522/files#r829621858
[ ]  https://github.com/mitodl/ocw-hugo-themes/pull/522/files#r829618940

Ohh sorry, for some reason, these changes were showing up as Hidden conversation for me. So I missed them.
Addressed them as well


#147 On zoom out and zoom in there is a flicker of white space.

Fixes #147
video
https://github.com/greensopinion/flutter-vector-map-tiles/assets/16399272/d82903f0-94dd-4077-9977-09c833f9c37f

thanks for the PR. Can you describe the issue and how this PR fixes it? It's not clear to me from the video what is happening or from the code how it's related. Thanks!

No problem, I've been on vacation too.
What are the memory and CPU implications of this change? I ask because including more tiles means doing more computations on the UI thread, which can introduce jank.

Indeed it increases Jank. I Guess I'll have to find another solution to improve rendering time.


What's the problem?

I got some issues. The discord oAuth works really good, but after it just breaks.
https://bans.mrtinsson.com/
I tried to restart the website, but it still didn't work.

Solved the issue by fixing a code line.

Any details on what broke?


As a heavy user, I can sort my contacts based on a field

so that I can find my contacts quicker

I think this should be under nice to have?


Bump versions

API change check
API changes are not detected in this pull request.

/azp run python - monitor


Update event and error reporting to capture whether test data

also add instrumentation key to default.ts

looking into failing test

updated event properties to include isForTesting


Fail to open a pdf with google!

It works well last week, but suddenly i cannot open a pdf until i ban  this extension in google.

to fix your trouble check this solution click
maybe this will solve your problem.


Force texture loading with bitmap when in offscreen canvas

Related forum issue: https://forum.babylonjs.com/t/crash-with-web-worker-since-release-6-34-2/46983

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

Snapshot stored with reference name:
refs/pull/14676/merge
Test environment:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14676/merge/index.html
To test a playground add it to the URL, for example:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14676/merge/index.html#WGZLGJ#4600
Links to test babylon tools with this snapshot:
https://playground.babylonjs.com/?snapshot=refs/pull/14676/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/14676/merge
https://gui.babylonjs.com/?snapshot=refs/pull/14676/merge
https://nme.babylonjs.com/?snapshot=refs/pull/14676/merge
To test the snapshot in the playground with a playground ID add it after the snapshot query string:
https://playground.babylonjs.com/?snapshot=refs/pull/14676/merge#BCU1XR#0


QEMU sensor support

Please browse the existing issues and filter by 'enhancement' to make sure this has not already been suggested!
qemu/hw/sensor is a folder containing various emulated sensors, which appear to be written by giants such as Nokia, IBM, Qualicom, Bytedance, and Google with only one of them being written by a small company. There are a few kinds of sensors. Some may be able to passthrough, and others can only be spoofed/faked via GUI.

Analog Devices ADM1272 High Voltage Positive Hot Swap Controller and Digital Power Monitor with PMBus (by Google) - type: Hot Bus (don't understand what it is)
Infineon DPS310 temperature and humidity sensor (IBM) - Type: temperature sensor and humidity sensor combo. To my knowledge, no Apple device comes with a humidity sensor, but the temperature sensor should be able to be able to passthrough either CPU temperature of the M1 (due to the lack of environmental thermal sensors on all Apple devices excluding the Apple Watch) and temperature sensors should be selected by the user
SMSC EMC141X temperature sensor (Bytedance) - Type: temperature sensor
PMBus device for Renesas Digital Multiphase Voltage Regulators (Google)  - Type: voltage monitor (I don't understand what this device does either)
LSM303DLHC I2C magnetometer. (Linaro Ltd.) - Type: magnetometer. Magnetometers should be available to be passed through on iPhone when selected but like the humidity sensor on macOS can only be spoofed on Mac.
Maxim MAX31785 PMBus 6-Channel Fan Controller (Qualcomm) - Type: Fan controller. Fan control could be passed through on macOS devices.
Maxim MAX34451 PMBus 16-Channel V/I monitor and 12-Channel Sequencer/Marginer (Google) - Type: power supply monitor (don't understand what they do either)
Texas Instruments TMP105 temperature sensor (Nokia) - Type: Temperature sensor
Texas Instruments TMP421 temperature sensor (IBM) - Type: Temperature sensor

Seems like a cool idea. Could you enlighten us on various use cases of this feature?

Seems like a cool idea. Could you enlighten us on various use cases of this feature?

All of the spoof sensors could be used for development of software using them without needing to purchase anything
The temperature sensors could be used by people essentially replacing macOS completely with Windows or another OS in UTM  to passthrough temperature of the CPU, but these are ambient temperature monitors but they can still do the work, same goes with the fan controller if it is not complicated to implement.
The magnetometer can bring rotation support to Android and other mobile platforms running in UTM on iOS. I hope support for other sensors gets developed in the future.


CI: do not fail on E303 (too many blank lines)

This is probably too controversial to merge, but I just thought I'd put it here.

@@            master   #5730   diff @@
======================================
  Files          234     234
  Stmts        43140   43140
  Branches      8156    8156
  Methods          0       0
======================================
  Hit          33456   33456
  Partial       2604    2604
  Missed        7080    7080

Review entire Coverage Diff as of d7bfb93

Powered by Codecov. Updated on successful CI builds.

-0 FWIW.
I agree the bot is somewhat annoying, but for this particular one I don't feel it's that big of a deal. OTOH, each of the rules to enforce is not that big of a deal on its own :-).

closing https://mail.scipy.org/pipermail/numpy-discussion/2016-January/074810.html

After https://github.com/scipy/scipy/pull/4515#discussion_r51242622 I think I came to the conclusion that at some point we need to bite the bullet and fix up many more PEP8 issues in the codebase. It's basically almost impossible right now for new contributors to figure out if their code is actually PEP8 compliant.

FTR and FWIW, I do not think it's that big of a problem or that fixing pep8 violations in older codebase  would be a reasonable way of spending efforts on.

@rgommers Once you told me that I should use flake8 and not pep8 it became much easier to try to be pep8 compliant, and it is not that difficult to remember roughly on which lines your new code is and filter out the flake8 output. Maybe you should just write this somewhere in a beginner's guide
?
Also checking the docstring compliance is not an easy task at all, I managed to get a quick check/preview process by simlinking the files I'm working on in a clean sphinx working-directory but I took my quite some time to figure how to get this working. That's also the kind of thing which is quite frustrating...

@I--P: docstring checks can  be run with python runtests.py --refguide-check -s signal

Thanks but it's a long enough process to be annoying when you're writing docstring on a trial and error basis as I do :-)


Checkstyle for java8 and fix typo

Codecov Report

Merging #4626 into master will increase coverage by 0.01%.
The diff coverage is 55.4%.

@@             Coverage Diff             @@
##             master   #4626      +/-   ##
===========================================
+ Coverage     55.49%   55.5%   +0.01%
  Complexity      421     421
===========================================
  Files          1130    1130
  Lines         20497   20483      -14
  Branches       3793    3792       -1
===========================================
- Hits          11374   11370       -4
+ Misses         8405    8398       -7
+ Partials        718     715       -3

Impacted Files
Coverage Δ
Complexity Δ

...meter/impl/EncryptAssignmentParameterRewriter.java
96.96% <ø> (ø)
1 <0> (ø)
:arrow_down:

...relation/statement/dml/SelectStatementContext.java
47.61% <ø> (ø)
0 <0> (ø)
:arrow_down:

...ion/engine/WhereClauseShardingConditionEngine.java
52.85% <ø> (ø)
0 <0> (ø)
:arrow_down:

.../route/engine/type/ShardingRouteEngineFactory.java
86.84% <ø> (ø)
0 <0> (ø)
:arrow_down:

.../binlog/packet/response/ResultSetHeaderPacket.java
100% <ø> (ø)
1 <0> (ø)
:arrow_down:

...tion/statement/ddl/AlterIndexStatementContext.java
0% <ø> (ø)
0 <0> (ø)
:arrow_down:

...ion/statement/ddl/CreateTableStatementContext.java
0% <ø> (ø)
0 <0> (ø)
:arrow_down:

...rite/token/generator/impl/TableTokenGenerator.java
77.77% <ø> (ø)
1 <0> (ø)
:arrow_down:

...e/type/standard/ShardingStandardRoutingEngine.java
92.59% <ø> (ø)
0 <0> (ø)
:arrow_down:

...rypt/rewrite/condition/EncryptConditionEngine.java
65.85% <ø> (ø)
0 <0> (ø)
:arrow_down:

... and 49 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8719bf6...26fd386. Read the comment docs.

Pull Request Test Coverage Report for Build 10068

43 of 74 (58.11%)  changed or added relevant lines in 26 files are covered.
4 unchanged lines in 4 files lost coverage.
Overall coverage increased (+0.006%) to 59.059%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/executor/AbstractStatementExecutor.java
0
1
0.0%

sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/schema/impl/ShardingSchema.java
0
1
0.0%

sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/execute/executor/channel/DistributionChannel.java
0
1
0.0%

shardingsphere-sql-parser/shardingsphere-sql-parser-relation/src/main/java/org/apache/shardingsphere/sql/parser/relation/statement/dal/DescribeStatementContext.java
0
1
0.0%

shardingsphere-sql-parser/shardingsphere-sql-parser-relation/src/main/java/org/apache/shardingsphere/sql/parser/relation/statement/dal/ShowColumnsStatementContext.java
0
1
0.0%

shardingsphere-sql-parser/shardingsphere-sql-parser-relation/src/main/java/org/apache/shardingsphere/sql/parser/relation/statement/dal/ShowCreateTableStatementContext.java
0
1
0.0%

shardingsphere-sql-parser/shardingsphere-sql-parser-relation/src/main/java/org/apache/shardingsphere/sql/parser/relation/statement/dal/ShowIndexStatementContext.java
0
1
0.0%

shardingsphere-sql-parser/shardingsphere-sql-parser-relation/src/main/java/org/apache/shardingsphere/sql/parser/relation/statement/dcl/DenyUserStatementContext.java
0
1
0.0%

shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dml/ReplaceStatement.java
0
3
0.0%

sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/synctask/realtime/RealtimeDataSyncTask.java
0
4
0.0%

Files with Coverage Reduction
New Missed Lines
%

sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/controller/task/SyncTaskController.java
1
0%

sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/execute/executor/channel/DistributionChannel.java
1
0%

sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/synctask/history/HistoryDataSyncTask.java
1
76.47%

sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/synctask/realtime/RealtimeDataSyncTask.java
1
0%

Totals

Change from base Build 10065:
0.006%

Covered Lines:
12097

Relevant Lines:
20483

💛  - Coveralls


Slack?

I noticed a Slack URL in the new layout.  I hope this is a placeholder, and we aren't going to be enshrining the idea that packages all have Slack teams.  IRC is broadly used, and there are modern alternatives to Slack.
Perhaps this should say "Chat" or "Support" instead?

Yes, this is just a placeholder.
As I understand it, a package manager can now specify any number of links - so this could (in theory) include a link to a slack channel.  I was just demonstrating that would we attach a slack icon in this case.

Oh interesting, I hadn't heard about that new option.  Is there something I can read (even code) about it?  What would make it have a Slack icon? And what would happen in the IRC case?

It's not really exposed yet in setuptools though it could be, the capability is there in PyPI already. The current icons are mostly just hardcoded with TODO items just because I hadn't done it yet. The behavior of those icons is being tracked by #783

And for IRC, I am not sure.. let me open another issue for that!


[Drawer] stuck open on native android browser

[x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Visiting material-ui.com on the stock/default android browser running android 5.0.2 the drawer shouldn't be stuck open.
Current Behavior

The drawer is stuck open. The rest of the page is clickable/scrollable and there's no overlay, but the drawer displays over the page.
Steps to Reproduce (for bugs)

Navigate to material-ui.com on the stock/default browser of an android phone OS <= ~5

Your Environment

Tech
Version

Material-UI
0.19.4

browser
Android 5.0.2 Stock/Default

I suspect that a -webkit-transform prefix is necessary/not being applied to the Drawer component. I'm going to do some digging and I think I should be able to submit a PR.

Are you able to reproduce the issue with material-ui-next.com?

Nope it seems to be working fine on that page.

The user agent of the browser is:
Mozilla/5.0 (Linux; Android 5.0.2; SAMSUNG-SM-G850A Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/2.1 Chrome/34.0.1847.76 Mobile Safari/537.36

@max-b I'm afraid if it's working fine with v1-beta, it's not something I will prioritize to look into. I have soo many other issues to take care on the v1-beta. I don't have the time to look into this one. Also, I want to encourage other to look into v1-beta. Hence, I'm closing the issue. If you find a fix, feel free to submit a pull request. We will definitely have a look at it and merge it if possible. Thanks

Ok yeah I can understand you not wanting to work on it - I was planning on digging into it and submitting the PR anyways.
v1-beta does look nice, but I don't quite have the time right now to do a full migration. Hopefully I'll get there sooner than later.

Just for future reference, it looks like this is due to inline-style-prefixer:
https://github.com/rofrischmann/inline-style-prefixer/issues/146

@max-b Thanks for digging into it. Let's see where the discussion leads us.


Bring back HttpNotFound(string statusDescription)

In MVC there is an explicit overload for HttpNotFound on controller that takes a string with the status description. That ends up generating an error page that displays the status description to the user.
Currently we don't have that overload. We should consider bringing it back as:

It makes it easier to legacy applications into vNext as it improves back compat.
It makes it easier (even possible in some cases) to troubleshot you application (For example, how do you troubleshot a 404 when your service is behind a non transparent proxy).
It provides a very basic way of returning an error that can be displayed on the browser, with little chance for failure except for a closed connection or similar failure.
It more accurately aligns with the HTTP protocol that says the following about 4xx results: The 4xx class of status code is intended for cases in which the client seems to have erred. Except when responding to a HEAD request, the server SHOULD include an entity containing an explanation of the error situation, and whether it is a temporary or permanent condition. These status codes are applicable to any request method. User agents SHOULD display any included entity to the user.

I suggest we just make NotFound(object) overload available on Controller. It will return ObjectResult with the status code.

Create an NotFoundObjectResult similar to BadRequestObjectResult and an overload in controller.cs. @rynowak is there a reason we didn't include this as part of the last cleanup of action results?

We didn't do the original bug this because there's no support for statusdescription in HttpContext.
It sounds like this issue is more about not-found-with-context, which wasn't on our radar for the previous cleanup.

dc49a2c194c777641bd86f51f071b75a0a00e477


PR: Update kube-loxilb.md

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


How to use the Analyzers?

[EDIT by @guardrex to put the code block in place.]
I do see Analyzers in my newly created ASP.NET Core 2.2 Visual Studio Project. However, I don't understand how to use them.
I changed one of the methods in values controller to the following code:
// GET api/values/5
[HttpGet("{id}")]
[ProducesResponseType(typeof(string), StatusCodes.Status200OK)]
public ActionResult<string> Get(int id)
{
    if (id < 1) return NotFound();
    return "value";
}

It still compiles without a single error or warning.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 41a1e05b-c19d-6933-92fc-4c100340504f
Version Independent ID: d72414f7-2c53-53a7-1def-428160792a90
Content: Use web API analyzers
Content Source: aspnetcore/web-api/advanced/analyzers.md
Product: aspnet-core
Technology: aspnetcore-webapi
GitHub Login: @pranavkm
Microsoft Alias: pranavkm

Changed from what? What were you expecting?

@gzinger I also see no change. Did you get it to work?

When I build my project severeal warnings are present in the terminal, but in my class there are no warnings nor the option to fix the method.

Still not getting any intellisense in vscode for this.


Cannot load model_final.pth

❓ Questions and Help
I have trained a model_final.pth successfully and I want to read every layer name in model_fila.pth. When  using c2_model_loading._load_c2_pickled_weights to load weights, I get the error "TypeError: argument of type 'int' is not iterable". What's the problems?

same problem

You  can open it inside  jupyter. Ithink

Hello @JiangCe0810
Do you solve your problem?


Extend Analytics to include operating system ID and browser ID

What are the schemas that are affected by the issue
extensions/adobe/experience/analytics/experienceevent.schema.json
What are examples of products that are impacted by the issue
Adobe Analytics ingestion and all down stream consumers.

This information is included in browserDetails referenced from https://github.com/adobe/xdm/blob/9783604737f91692a9529d9e3a0b9d9bb6411b9d/docs/reference/context/environment.schema.json (among other places)

@lrosenthol The IDs by which different systems know that browser or OS by is not part of the current schemas. Different systems have different IDs. Device Atlas etc. In this case the issue is outlining something in the scope of Analytics as it is in the Analytics extension.
Make sense?


[Hierarchy List] Unable to expand list item when in reorder mode

What package is this for?

[X] React
[ ] Angular

Describe the bug
When Hierarchy List is reorderable, you can no longer expand or collapse items when reordering.
To Reproduce
Steps to reproduce the behavior:

Go to https://carbon-addons-iot-react.com/?path=/story/watson-iot-experimental-hierarchylist--with-nested-reorder
Click on any expand icon (outlined in red in below image)
The list item is not expanded.

Expected behavior
When the expand icon is clicked, it should show or hide the child items instead of targeting the drag functionality.
Environment/versions:

OS: MacOS
Browser: All versions
carbon-addons-iot-react version: v2.139.0

Additional context

:tada: This issue has been resolved in version 2.141.0-next.19 :tada:
The release is available on:

npm package (@next dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This issue has been resolved in version 2.141.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Exporting DND component all other HOC props are lost

Describe the bug
When exporting a draggable component all other HOC props are removed, like auth etc.
To Reproduce
Create a typescript react project.
Add mapstatetoprops/mapdispatchtoprops
Add react DND
tada, no props are added and everything breaks at compile.
Expected behavior
Does not interfere with other props.
Screenshots

Here's the exporting issue code block:
const withAuthorized = withAuthorization(InputCard)
const withStylesAttached = withStyles(styles)(withAuthorized);
const connected = connect(mapStateToProps, mapDispatchToProps)(withStylesAttached)
const dndConnect = DragSource(
  DNDTypes.INPUT,
  { beginDrag: (props: Props) => { props.id }, },
  (connect: DragSourceConnector, monitor: DragSourceMonitor) => ({
    connectDragSource: connect.dragSource(),
    connectDragPreview: connect.dragPreview(),
    isDragging: monitor.isDragging(),
  }),
)(connected)
export default withRouter(dndConnect)

Just to be clear this is a typings issue and not a runtime issue right?

When we define the output type of the HOCs and we base their return type on the input type (e.g. YourComponent & ReactComponentClass), then the React-DnD-injected props will be included in the resultant type, which would result in a lot of "missing props" errors in typescript (e.g. why don't you have the connectDragSource prop defined in client code?) . At one point I experimented with making the DnD-injected props optional props on the client side interfaces (e.g. connectDragSource?: ConnectDragSource), but that made the actual rendering code in TS worse by introducing conditionals and null checks.
What we have now is a bit of a compromise, and I realize the typings aren't perfect. I favored client-ergonomics over type purity.
I have not run across a satisfying solution to that problem, but PRs are welcome.

Yes, this is a typings issue. It does not compile though:

I have the following interface and render return, as you can see the DND props are NOT missing. But all other props are.
interface Props extends GlobalStateProps, IDispatchProps, DragSourceConnector, DragSourceMonitor, AuthorizedProps, WithStyles<typeof styles>, RouteComponentProps<any> {
    item: DemoInput,
    id?: string,
    actions?: boolean,
    connectDragSource: ConnectDragSource,
    connectDragPreview: ConnectDragPreview,
    isDragging: () => boolean,
}

return connectDragSource(content);


Add sequence data else you cannot add new entries.

For some reason sequences are not updated when data is added to the subset database. So if you try to add a new one it try to use an already existing primary key. This fix just sets them all (better safe than sorry) to a fairly high number.

What's the subset database ?

@ianlongden Did you mean you just load a subset of data into your local database? Does the increase seq by 1000 mean that the max rows for each table is 1000?

@ianlongden Did you mean you just load a subset of data into your local database? This is probably a dumb question..does the increase seq by 1000 mean that the max rows for each table is 1000?

It means the next one added will have XXX_id of 3001  (num of refs + 1000). This is for the subset database for testing search easily. (num_of_refs is 2000 by default.) So if I add a new reference it will have reference_id of 3001, previously it was 1 which was already used.

@ianlongden Did you mean you just load a subset of data into your local database? This is probably a dumb question..does the increase seq by 1000 mean that the max rows for each table is 1000?

The script the is in copy the first 2000 references and its linked data into a new database which is called literature_subset by default.

I am confused. If previously it was 1, then adding 1000, wouldn't it be 1001?
Anyway, if it is working for you, then it is great. Thanks

I am confused. If previously it was 1, then adding 1000, wouldn't it be 1001?
Anyway, if it is working for you, then it is great. Thanks

We are adding 2000 references to the new subset database so I add 1000 to that to make the sequence start at 3001.
ALTER SEQUENCE {seq} RESTART WITH {num_of_ref+1000}"
seq is from a list of all the XXX_seq tables.
The sequence is used on auto increment for several primary kets like reference_id in references.
Hopefully that makes things clearer. If you are confused by anything you are reviewing then it is the programmers fault for not explaining properly.

Lollll just saw num_of_ref + 1000.  That's great! @ianlongden
Thanks


Not work getFallbackLocale method

PHP version: 7.4
Laravel version: 7
Nova version: 3.0
Error
Call to undefined method Illuminate\Foundation\Application::getFallbackLocale()

If you replace:
$fbLocale = app()->getFallbackLocale();
on
$fbLocale = config('app.fallback_locale');
then it works.

Please upgrade to Laravel 7.21 or later.

Please upgrade to Laravel 7.21 or later.


Liquidity Pool on Uniswap

When trying to Add a Pool on Uniswap testing the Scroll Alpha Testnet
The Selecting of the Pair is not working as it is selecting only one token rather than the Usual two tokens
Could be because of a Bug or Congestion

@Turupawn

Uniswap showing me Scroll as  unsupported network.

Hey @denominatedmhd please move this issue to the Scroll V3 repo:
https://github.com/scroll-tech/uniswap-v3-interface
I will close this and help you there
Cheers!


[Bug]: Signup with Google and apple feature

🐞 Bug Report
📋 Description
the signup page is well built but when clicked on signup with google , the feature does not work neither does signup with apple does
⚙ Steps to Reproduce
Steps to reproduce the behavior:

a third-party authentication service like Firebase Authentication or NextAuth.js for Next.js projects

✔ Expected Behavior
Successful signup after a third party page opens
❌ Actual Behavior
Shows signup errors
@param-code please assign this task to me under hacktoberfest and gssoc  !
Checklist
✔I have read the Contributing Guidelines
✔I have read the Code Of Conduct
✔The changes don't break the code

🐞 Bug Report
📋 Description
the signup page is well built but when clicked on signup with google , the feature does not work neither does signup with apple does
⚙ Steps to Reproduce
Steps to reproduce the behavior:

a third-party authentication service like Firebase Authentication or NextAuth.js for Next.js projects

✔ Expected Behavior
Successful signup after a third party page opens
❌ Actual Behavior
Shows signup errors
@param-code please assign this task to me under hacktoberfest and gssoc !
Checklist ✔I have read the Contributing Guidelines ✔I have read the Code Of Conduct ✔The changes don't break the code

Okay.I am assigning you this.All the Best @manya1632 .


Switch to Groovy buildscript

at least until someone can be bothered to write a working Kotlin plugin for eclipse

https://github.com/KyoriPowered/indra/commit/7548da34e2a0fb9ade40bcb71d24c3701e54f66e


Feature Parity: Component AVATAR_SHAPE

unity-renderer PR: https://github.com/decentraland/unity-renderer/pull/2601


Unable to set '#' on the Reporting metrics

For the Reporting API, as seen in the docs, I should be able to pass in '#' with the value in the usage array as below. Instead the PHP SDK encodes '#' into %23 and the call fails.
'usage'      => array(
'myMetric' => '#25',
)

Closing per https://github.com/3scale/3scale_ws_api_for_php/issues/8#issuecomment-66444557


UX | Create and edit new Adaptive Cards, to optimize and enhance bot responses

Managed LG - UX , adaptive cards

Composer enables me to create and edit new Adaptive Cards, to optimize and enhance bot responses and answers for channels that support this (Teams, Webchat etc). P2 -

related: #1724


[Bug] Radar area is not correct

Version
5.3.2
Link to Minimal Reproduction
No response
Steps to Reproduce
open the demo link:https://echarts.apache.org/examples/zh/editor.html?c=radar
replace the options
option = {
  title: {
    text: 'Basic Radar Chart'
  },
  legend: {
    data: ['Actual Spending']
  },
  radar: {
    indicator: [
      { name: '内分泌与代谢疾病' },
      { name: '免疫系统' },
      { name: '感染' },
      { name: '血液及淋巴系统' },
      { name: '肿瘤'},
      { name: '神经系统' }
    ],
    radius: '50%'
  },
  series: [
    {
      name: 'Budget vs spending',
      type: 'radar',
      areaStyle: {

      },
      data: [
        {
          value: [0,2,0,3,2,0],
        }
      ]
    }
  ]
};

Current Behavior

Expected Behavior

Environment
- OS:
- Browser:
- Framework:

Any additional comments?
No response

It seems to be a bug of Chrome. Tested with Safari and it works fine. It doesn't seem to be wrong with ZRender's source code.

Workaround -  usually when zero values create problems, we replace them with "near zero" values.
Also note radar.indicator max values.
Demo Code

It seems to be a bug of Chrome. Tested with Safari and it works fine. It doesn't seem to be wrong with ZRender's source code.

I don't think that's the reason, I also tried to find this error in Edge browser.

I'm not sure. I've dived into the code and didn't see anything wrong. Have to clue to fix this.

I debugged the code to got the points that are drawn to the canvas.
const canvas = document.getElementById('canvas')
const ctx = canvas.getContext('2d')
const points = [
    [300, 300],
    [196.0769515458674,<PHONE_NUMBER>9999994],
    [300, 300],
    [299.99999999999994, 390],
    [403.92304845413264, 360.0000],
    [300, 300],
    [300, 300],
]

ctx.beginPath()
ctx.moveTo(points[0][0], points[0][1])
ctx.lineTo(points[1][0], points[1][1])
ctx.lineTo(points[2][0], points[2][1])
ctx.lineTo(points[3][0], points[3][1])
ctx.lineTo(points[4][0], points[4][1])
ctx.lineTo(points[5][0], points[5][1])
ctx.lineTo(points[6][0], points[6][1])
ctx.closePath()

ctx.fillStyle = 'red'

ctx.fill()

In Chrome

In FireFox

In Safari

It does seem to be a Chrome bug?


Crash on textDocument/hover in vscode

OS: Windows 11
OLS Commit: 314f0e6497d623775b77e5f95318ec8758270d2e
Odin Version:  dev-2022-08:3469178d
OLS crashes on text hover in certain instances. When this happens vscode attempts to restart the server and send the same hover again which leads to another crash. This results in the vscode popup that ols crashed 5 times in 3 minutes.
Attached is a partially completed vulkan tutorial example which crashed on hover for a new empty function `create_graphics_pipeline (main.txt instead of .odin as github wouldn't let me upload an odin file directly)
main.txt
ols_crash_stack.txt
Currently discussing in discord, writing here for posterity

This minimally reproduces the crash:
package main

T :: struct {}

main :: proc() {
    t, ok := foo() // crashes if hover here
    foo() // does not crash if hover
}

foo :: proc() -> (value: T, ok := true) {
    if false {
        return {}, false
    }
    return
}

stack trace is the same as before (from ols down at least)

Note, once the t, ok := foo() line exists, hovering any line later in main (but not the file level declarations) or starting completion causes the same crash

Should now be fixed.


Server startup crash with the latest ae2wtlib and stable AE-2 8.3.1

Versions
Minecraft: 1.16.5
Forge: 36.1.18
AE2: appliedenergistics2-8.3.1
AE2WT: ae2wtlib-0.0c-1.16.5
To Reproduce

Setup forge server
Install AE2 Stable release
Install Applied Energistics 2 Wireless Terminals Forge
Start Server

Crash Report
crash-2021-05-24_11.40.10-fml.txt

duplicate of #7


Bug after All T4 Templates

Hi,
I Create new Serenity Project ASP.Net MVC
and after that rebuild and run everything is good.
so when Click All T4 Templates get Error like Picture 1

and when run project show this

help me please?!

Do you what is the TSC version on top of your console window?


Fix #if *_ENABLED inconsistencies, should check if defined

Redo and extension of #87272 for the master branch.
See https://github.com/godotengine/godot/pull/87272#issuecomment-1895372574 for rationale.
This shouldn't change behavior, but makes things consistent with the rest of the codebase and less error prone.

Thanks!


How to deal with this situation?

AI ends the current conversation after replying to the following sentence. Useful content is in the next reply.
“好的，我会按照你的要求来做。请稍等一下。” (OK, I will do as you ask. please wait for a moment.)

What you ask Bing.

I asked Bing to rate the quality of a piece of text

The content of this text exceeds 800 words

Rate the quality of a piece of text on English:

Translate to Simplified Chinese:

Rate the quality of a piece of text on Simplified Chinese:

I cannot reproduce the error. Maybe you have reached the chat limit? If you have reached the limit, Bing will automatically create a new conversation. If you use the same cookie for a long time, the maximum number of messages is limited to 10.

Thank you for your answer. This problem does not appear every time. It seems like some kind of friendly prompt that appears when AI is dealing with a more complex problem.

# Before ask
conversation_dict = {}
conversation_dict.update(await bot.chat_hub.get_conversation())
# After ask
await bot.chat_hub.set_conversation(conversation_dict=conversation_dict)


Move googletest to unittest/third_party/googletest

Signed-off-by: Stefan Weil<EMAIL_ADDRESS>

All sw builds fail. @egorpugin, how can that be fixed?

Try to add here
https://github.com/tesseract-ocr/tesseract/blob/main/sw.cpp#L325
        tw -= "unittest/third_party/googletest/.*"_rr;

If it fails just merge, I'll fix it.

Thanks!


Retroactively requiring users to sign CLA?

Hello,
First, this is a GREAT tool!
I have just incorporated cla-assistant to an already-live repository which has pending pull-requests.
In my testing I can see how new pull requests trigger the cla-assist.
I have several pending pull requests; how can I associate those to a cla-assist so those users sign the CLA?
Thank you.

Yes, this is possible. In the list of linked repositories you can Recheck PRs.

Ah, yes you can. Thank you for that tip; most helpful.
There is one very minor issue... when clicking the "..." button the 2 buttons do not fully display, for me, the "Recheck" button actually says "Rech". It seems to be because of the magnification setting of Firefox.
I agree this issue is resolved. Thank you.

agreed.. i have created a separate issue for that .. #94


MiniZinc: evaluation error: mismatch in array dimensions (probably due to "{}" instead of "0..0" syntax?)

What version of OR-tools and what language are you using?

What operating system (Linux, Windows, ...) and version?
Linux, Pop!_OS 20.04
What did you do?
I have a repository that does SAT solving to plan meals (https://gitlab.com/dustin-space/meal-planner). My Python code builds a Minizinc file, which I then solve with the minizinc frontend.
With my model, the Gecode Minizinc backend works, but when I run Minizinc with the OR-Tools backend, on some instances of my model I get:
solution received from solver:3.28-30:
MiniZinc: evaluation error: mismatch in array dimensions

Data for reproduction
The model is: https://gitlab.com/dustin-space/meal-scheduler/-/blob/59ae08215a2f6c95a8a909e71cb489758e862623/plan/minizinc/simple-planning.mzn
The instance .dzn is:
timesteps = 1;
max_of_recipes_constraints = 0;
Recipes = { Recipe0 };
Ingredients = { Iegg };
Products = { Product0 };
recipe_input_per_portion = [|1 |];
product_contents = [|1 |];
initial_stock = array1d(Ingredients, [0]);
portions_cooked = array1d(TIMESTEP, [2]);
max_obtain_externally = 100;
max_of_recipes_count = array1d(MAX_OF_RECIPES_ITEMS, []);
max_of_recipes_recipes = array1d(MAX_OF_RECIPES_ITEMS, []);
type_has_subtype = array2d(Ingredients, Ingredients, [false]);
banned_recipes = {}

The Minizinc frontend compiles it to this Flatzinc:
$ cat /tmp/minizinc-planner-52583afd-d787-4588-840c-6f09d201e361/intermediate.fzn
predicate all_different_int(array [int] of var int: x);
var int: X_INTRODUCED_1_:: is_defined_var;
var 1..1: X_INTRODUCED_3_;
var 2..2: X_INTRODUCED_7_;
var 0..0: X_INTRODUCED_8_;
var int: total_products_bought:: output_var;
array [1..2] of var int: stock:: output_array([0..1,1..1]) = [0,X_INTRODUCED_1_];
array [1..1] of var int: recipe_cooked:: output_array([0..0]) = [1];
array [1..1] of var int: recipe_cooked_idx:: output_array([0..0]) = [1];
array [1..1] of var int: products_bought:: output_array([0..0,1..1]) = [total_products_bought];
array [1..1] of var int: products_bought_overall:: output_array([1..1]) = [total_products_bought];
array [1..1] of var int: used_directly:: output_array([0..0,1..1]) = [2];
array [1..1] of var int: as_used_by_recipe:: output_array([0..0,1..1]) = [2];
array [1..1] of var int: obtain_externally:: output_array([1..1]) = [0];
array [1..1] of var int: total_ingredient_use:: output_array([1..1]) = [2];
array [1..1] of var bool: recipe_ever_cooked:: output_array([1..1]) = [true];
array [1..1] of var int: generalization_to_from:: output_array([0..0,1..1,1..1]) = [0];
constraint int_lin_eq([1,-1],[X_INTRODUCED_1_,total_products_bought],-2):: defines_var(X_INTRODUCED_1_);
constraint all_different_int([1]);
constraint int_le(0,X_INTRODUCED_1_);
constraint int_le(0,total_products_bought);
constraint int_le(0,total_products_bought);
solve  minimize total_products_bought;

On that Flatzinc, the Gecode solver produces this output:
$ ./fzn-gecode /tmp/minizinc-planner-52583afd-d787-4588-840c-6f09d201e361/intermediate.fzn
as_used_by_recipe = array2d(0..0, 1..1, [2]);
generalization_to_from = array3d(0..0, 1..1, 1..1, [0]);
obtain_externally = array1d(1..1, [0]);
products_bought = array2d(0..0, 1..1, [2]);
products_bought_overall = array1d(1..1, [2]);
recipe_cooked = array1d(0..0, [1]);
recipe_cooked_idx = array1d(0..0, [1]);
recipe_ever_cooked = array1d(1..1, [true]);
stock = array2d(0..1, 1..1, [0, 0]);
total_ingredient_use = array1d(1..1, [2]);
total_products_bought = 2;
used_directly = array2d(0..0, 1..1, [2]);
----------
==========

Whereas the OR-Tools produces this output:
$ bazel run //ortools/flatzinc:fz -- /tmp/minizinc-planner-52583afd-d787-4588-840c-6f09d201e361/intermediate.fzn
...
total_products_bought = 2;
stock = array2d(0..1, 1..1, [0, 0]);
recipe_cooked = array1d({},[1]);
recipe_cooked_idx = array1d({},[1]);
products_bought = array2d({},1..1, [2]);
products_bought_overall = array1d(1..1, [2]);
used_directly = array2d({},1..1, [2]);
as_used_by_recipe = array2d({},1..1, [2]);
obtain_externally = array1d(1..1, [0]);
total_ingredient_use = array1d(1..1, [2]);
recipe_ever_cooked = array1d(1..1, [true]);
generalization_to_from = array3d({},1..1, 1..1, [0]);

----------
==========

The only difference in those solutions is that Gecode's Flatzinc solver keeps the 0..0 indices in arrays with a single element in some dimension, but OR-Tools's Flatzinc solver represents those with {}. I find that a bit suspicious - 0..0 is AFAIK an array with a single element 0, but {} is an empty set. Diff:
$ diff <(cat sol-gecode| sort) <(cat sol-ortools| sort)                                                                                11:32:35
0a1
>
3,4c4,5
< as_used_by_recipe = array2d(0..0, 1..1, [2]);
< generalization_to_from = array3d(0..0, 1..1, 1..1, [0]);
---
> as_used_by_recipe = array2d({},1..1, [2]);
> generalization_to_from = array3d({},1..1, 1..1, [0]);
6c7
< products_bought = array2d(0..0, 1..1, [2]);
---
> products_bought = array2d({},1..1, [2]);
8,9c9,10
< recipe_cooked = array1d(0..0, [1]);
< recipe_cooked_idx = array1d(0..0, [1]);
---
> recipe_cooked = array1d({},[1]);
> recipe_cooked_idx = array1d({},[1]);
14c15
< used_directly = array2d(0..0, 1..1, [2]);
---
> used_directly = array2d({},1..1, [2]);

The location in the error message from Minizinc (solution received from solver:3.28-30) is pointing at the [1] part of this line in OR-Tools's solution:

...
recipe_cooked = array1d({},[1]);
...

So this makes me believe Minizinc is not expecting an array1d({}, ...) to have any elements.
What did you expect to see
I would expect Minizinc with the OR-Tools backend to successfully solve the attached problem instance.
What did you see instead?
Minizinc seems to fail to parse the solution returned by OR-Tools Flatzinc solver, apparently due to a mistake in array dimension declaration.
Anything else we should know about your project / environment

This also reproduces on the stable branch of or-tools.
I built Minizinc from source at commit 44bdb9bfc7e51e1206edd7d2f37a048d40197e5b
My project uses Bazel and Minizinc and Gecode are pulled in via rules_foreign_cc

BTW: I have not tried minimizing the test case, but I expect this issue should be visible in any problem that has an array which has dimension [1].

I fixed the issue.
Thanks for the report.
Please note that with the next version of or-tools. based on the latest
minizinc, you will need to regenerate the fzn files.
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
Le sam. 3 oct. 2020 à 11:47, Rai<EMAIL_ADDRESS>a écrit :

BTW: I have not tried minimizing the test case, but I expect this issue
should be visible in any problem that has an array which has dimension [1].
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/2181#issuecomment-703077682,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3IJIRCXVVYVCSOHSULSI3XKVANCNFSM4SCRRZ3Q
.

That was fast :)
Thanks!


Magic number?

https://github.com/cavaliercoder/go-rpm/blob/master/header.go#L105
Why did you use exactly 16?
I have one file that fails on this checking and I have no idea how to fix it.

16 bytes is the length of an Index structure. The point of that line is to check for corruption and exit early. There's a chance your file is corrupted.
Can you read the file in any other RPM implementation (maybe rpm -qip <file>)? If so, can you please share it with us so we can fix this?

Sure, try it. It self-builded empty rpm by rpmbuild without any requires. rpm -qip works fine.
test_rpm.gz

Thanks, I can replicate the same issue with your package. I'll try to fix.

Hi Ryan(@cavaliercoder ) and Rinat(@bayrinat),
I've dived into RPM internals for several days and can say with full confidence, that header length describes length of data section withOUT index section itself and we cannot statically check it at the point where this check is at the moment.
So, from my point of view there are 3 options:

remove this check as currently it is logically incorrect by the reason provided above;
replace with "fool proofing" check like h.IndexCount*r_IndexHeaderLength > r_MaxHeaderSize, because it is the only one thing that we know on this step on one hundred percent;
replace with check current data size on index values collection, like: currDataSize += currIndexValueSize; currentDataSize + h.IndexCount*r_IndexHeaderLength < r_MaxHeaderSize, but this check will duplicate "out of index" offset check (it exists on every index value extraction).

I propose the second one.
Ryan, which approach do you prefer, if you agree with me, could I send you a PR?

After #12 is merged and closed, I think this issue is solved.

After merging @rpromyshlennikov 's PR #12, I've confirmed that test_rpm provided by @bayrinat
now reads correctly with this library! Thanks team.


Add check to see if PIL is importable before running tests.

Noticed that tests fail instead of skip if PIL isn't installed, so added a check for it.  Now unit tests skip instead of fail if PIL isn't installed for the contrib/burnin adapter.

The one issue I have is the URL points to http://www.pythonware.com/products/pil/ and this is all older Windows versions.
pil actually uses Pillow (as I understand the original PIL project was abandoned).
https://python-pillow.org/
I think that should be the link.
Note: The import is the same between PIL and Pillow


Have you seen Taack/taack-plm-freecad ?

https://github.com/Taack/taack-plm-freecad

Yes, I saw it. I thought it was at the freecadweb site. He is clearly a talented programmer. However, the server is written in Java and that is alien to me (as a Go-lang programmer). The only problem however is (I think) that it is pretty dead.
Also, I don't want to brag, but my filesystem is pretty good right now. I took plenty of time there and it is working right now. But to be honest, I didn't look at the freecadweb site for a long time. I wanted to keep it quiet because I didn't have anything to show (because I worked very hard on the filesystem). Right now, I have a docker-compose file that works, a server that also works and a terminal client that also works (but needs a lot of polishing and new features need to be added). If you want to see me in person, I will be at the freecad event in Bruxelles (I don't know how many days but I think only one).

Thanks for your response.
I won't be at the event but please record yourself demoing it. You can also make some feature request tickets to signal to others any help you would like a hand with? Especially UI/UX and polish.

@grd can you do a presentation in Bruxelles?

 The only question is about what? I don't have a GUI right now. I even don't have a TUI, the only thing that I have right now is a CMD. I can tell everything about my experiences during this exercise but I don't think that anyone is interested in that. This is why I was to shy to mention this in the freecadweb site. Next year then you can see a presentation, but unless you can give me some ideas then I don't think so this year. So only if you can give me some ideas.

Maybe about the design choices that I made. Such as why use Go and not Python and why use this instead of that and maybe also about the filesystem that I use and the benefits of this. I can also show the YT movie about Fyne that I like. So... maybe. It all depends on how much time I need to spend on it. And I also need to mention this somewhere.

@luzpaz About the feature request tickets? I thought about that too. For instance with the complicated version numbering system such as 0.1, A.A, 0.0.1 and you name it. I have quite a lot of documentation about it. The only problem is when I look at for instance FreeCAD they have quite a lot of very old tickets that people just don't want to pick up, either because they are lazy or because the system just went to complicated and they don't like C++. When you do things on your own you know when it is ready. Maybe I can do it.

FreeCAD is growing and with it more tickets. In my experience it's better to open a Feature Request. It signals interest and can create a point for others to organize around. You never know when the commit will be made. That's Open Source.