QRcode with  Chinese

int main(int argc, char* argv[])
{
std::wstring text = L"家国234567hgreh346346w+_=@#$%| a|";
int width = 500, height = 500;
int margin = 10;
int eccLevel = 5;
bool inputIsFile = false;
std::string filePath = "D:/opencv/zxing-cpp-master/build/example/Release/QRCode.png";
try {
	auto writer = MultiFormatWriter(BarcodeFormat::QRCode).setEncoding(CharacterSet::UTF8);

	auto bitmap = ToMatrix<uint8_t>(writer.encode(text, 500, 500));
	stbi_write_png(filePath.c_str(), bitmap.width(), bitmap.height(), 1, bitmap.data(), 0);
	std::cout << bitmap.width() << "\n";
}
catch (const std::exception& e) {
	std::cerr << e.what() << std::endl;
	return -1;
}

return 0;

}
Hello, the generated  QRcode with Chinese can be generated normally, but the following situations will occur when readQRcode.
I do not know why. thank you.

I see what you mean. I currently don't have time to look into this. This is yet another issue that is most certainly going to be fixed with #332. If that is an option for you, I would recommend looking into the libzint project (which is going to be used a writer backend for zxing-cpp at some point in time).

使用了不正确的编码?这句setEncoding(CharacterSet::UTF8); 我在默认utf8的系统里没发现乱码
有没有这方面的说明文档英文或中文,刚接触,在测试上面的代码时总出现错误:error LNK2019: 无法解析的外部符号 stbi_write_png，函数 main 中引用了该符号

@sl00001 it seems your issue is solved? I currently still don't see the problem in your example code but if I call
ZXingWriter -encoding utf8 qrcode "家国234567hgreh346346w+_=@#$%| a|" out.png

I get this result:

@cshaorui please have a look at this and the following line. stbi_write_png is from an external image library.

Closing for lack of feedback.


Support authentification via IP

UB Bielefeld has build a web interface to edit concept schemes (more specific: their concepts) stored via jskos-server. The current prototype directly writes into the MongoDB database without validation. With #93 this would be simplified and improved but setting up a login-server for this use case is too much overhead. The write request would not come from the browser but from a custom write endpoint secured with custom authentification:
browser => custom write-endpoint => jskos-server

The write requests come from localhost anyway, so adding an IP [range] field to jskos-server configuration would make this use case possible.
{
  "concepts": {
    "read": {
      "auth": false
    },
    "create": {
      "auth": false,
      "ips": "<IP_ADDRESS>"
    },
    "update": {
      "auth": false,
      "ips": "<IP_ADDRESS>"
    },
    "delete": {
      "auth": false,
      "ips": "<IP_ADDRESS>"
    }
  }
}

Requires #95.
I would also adjust/extend the config format for this, but let's talk about this on Slack.

I added a first implementation of this issue. There is some documentation about it already as well. Please take a look @nichtich. Currently, only single addresses and CIDR ranges are supported, but not custom ranges (so something like <IP_ADDRESS>-<IP_ADDRESS> is not possible).
ToDos:

[ ] Add tests.
[ ] Test with dev-api.

CIDR ranges are enough, thanks!

I successfully tested IP authentication with dev-api and also added some tests for the middleware. 👍


Determine if it matters that it is possible for a user to define a file to be loaded by multiple entries

Determine if it matters that it is possible for a user to define a file to be loaded by multiple entries

They can end up making this happen but it has yet to be tested what this does.


Optimize jpg/png images to pass Google PageSpeed Insights

I am resizing images to a number of sizes depending on the necessary size per website visitor screen size.
Google page speed insights: https://developers.google.com/speed/pagespeed/insights/ is complaining that my png images could be compressed anywhere from 8% to 50% better.
Here is an example of what I am doing. I am uploading the original to s3 and then a task queue kicks in to take that and pipe it through sharp into a buffer to stream back up to s3:
sharp().resize(width)
.compressionLevel(6)
.withoutAdaptiveFiltering()
.toBuffer()
What I would like to do is the ideal settings for both png and jpg for images on the web. Compression/quality etc. My most important need is to figure out how to get PNG's compressed well so that pagespeed doesn't ding my on this. We are using page-speed insights as a means to market how we automatically optimize assets for our users.

Hello, let's focus on PNG to start with. Using compressionLevel(9) should help. I'd also suggest generating output with and without the use of withoutAdaptiveFiltering() to see which is smaller.
Page Speed Insights is probably using something like pngcrush under the hood. It tries combinations of compression level and row filter settings to see which produces the smallest output.
Are you able to provide an example URL we can use to work through?

Adding compressionLevel(9) seems to do the trick. I was confusing some cached and non cached resources when checking the differences in settings.
Thank you for taking the time to help me out.

No worries, glad you got it working.

Hey guys, using
sharp().resize(width)
.compressionLevel(6)

got me an error where compressionLevel is not a function.. Am i missing something here?

@jaspersorrio compressionLevel() was deprecated in v0.17.0 and removed in v0.18.0 - see http://sharp.dimens.io/en/stable/changelog/
For v0.18.0+ you'll need to use the compressionLevel option of png.
sharp(input)
  .resize(width)
  .png({ compressionLevel: 6 })
  ...


magic-gen: refactor script with unit test

The magicgen.go script was previously not testable, and has been
refactored to support tests. A unit test is also included, along with
the necessary changes in the Makefile.
Signed-off-by: Prajwal S N<EMAIL_ADDRESS>

Codecov Report

Merging #75 (62fcedf) into master (d45a2bb) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #75   +/-   ##
=======================================
  Coverage   62.04%   62.04%
=======================================
  Files           1        1
  Lines         137      137
=======================================
  Hits           85       85
  Misses         37       37
  Partials       15       15

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 d45a2bb...62fcedf. Read the comment docs.

@adrianreber the old test is doing the same thing as the unit test, but with stdout and stdin instead. It seems kinda hacky, which is why I removed it. If you want, I can add in a proper integration test for this script along with the tests for #66

@adrianreber the old test is doing the same thing as the unit test, but with stdout and stdin instead. It seems kinda hacky, which is why I removed it. If you want, I can add in a proper integration test for this script along with the tests for #66

I think unit tests are important, but you are removing the test which tests the actual usage of the script. I think it is also important to test the script in that way it will be used. Removing an existing tests does not seem like a good approach. I you want to improve it later, no problem, but removing it now seems unnecessary.


Valve Handle unobtainable

Version
3.2.5 (b05b532)
Seed
R721-8QQR-XXHH40ZZZCBZ9H9007JRZZZZZZ9LPXZZJ9ZQ3GWHZWZZEZZZZZZZ
Scenario
RE 2 (Leon B)
Player Character
Carlos (RE3R)
What happened?
In Resident Evil 2, Leon B Scenario,  The Valve Handle was randomized inside the burning helicopter, which can only be accessed by using the Valve handle to put out the fire.  Item unobtainable without debug menu.

Duplicate of #889


compatibility to go 1.5.1

[work@host ] $ go get github.com/Lazyshot/go-hbase
# github.com/Lazyshot/go-hbase
../../gospace/src/github.com/Lazyshot/go-hbase/client.go:43: silentLogger is not a type
[work@host ] $ go version
go version go1.5.1 linux/amd64

It seems that the declaration of silentLogger isn't compatible to go 1.5.

Yeah, that's was an oops on my part.


Exclude dependency from calcite to data-sketches in sql module

Calcite uses 0.9.0, which conflicts with one in druid, master(0.12.0).

Fixed


Update linux.mdx for Fedora

I think the compilation instructions have been superseded.
I would like to see inclusion of RPM installation added as an option if it works, but note that the last RPM build failed.

The last build is 9 months old in COPR website (and it failed 😢 ).
Since this PR is becoming a bit old, I'm going to close it.


Android OnChipCalibration JNI

Adding OnChipCalibration to the android wrapper.

I have added JNI functionality to allow for the on chip calibration methods to be called from android.

Squahsed commits into 1 as there was a few that just removed whitespace and un-needed includes


Update go version for nightly govulncheck

Upgrade go version from 1.20.5 -> 1.20.7 to fix errors running govulncheck ./... in the Nightly Github action.

PR #661 is a better solution, closing.


New deprecation feature

This PR is a continuation of https://github.com/pypa/warehouse/pull/910. #798 is also related.
The basic idea is that package maintainers can deprecate a release as insecure or EOL and provide a URL to a CVE or a blog post for further information.
After the discussion in #910, I've settled for the more generic deprecation instead of just marking a release as insecure.
Views/Routes
This PR adds a new view deprecate under packaging/views.py. To use it, the user has to be authenticated and to be a Project maintainer.
There's also a new route packaging.deprecate, accessible under /project/{name}/deprecate/
Database
Adds 3 new columns in the releases table, including a migration.

deprecated_at, Datetime, nullable.
deprecated_reason, enum("eol", "insecure"), nullable.
deprecated_url, Text, nullable.

Template Changes
There's a new template packaging/deprecate.html for the deprecate view.
Additionally, there are changes in packaging/detail.html:

Adds a visible banner if the selected release is EOL (yellow), or insecure (red)
Adds badges in the Version History tab.

I couldn't find any form styling options, so the form looks pretty abysmal. Right now the form is just wrapped in divs to get proper form blocks. I thought that there's probably a bigger plan for forms in general, so I've decided to not include any stylings here.
Design
There are some minor changes:

Adds a --bad option to badges (to display insecure releases)
Adds a --highlight and --bad option to horizontal sections (to display a banner for the selected release).

Screenshots
Deprecate view

Release history with insecure and EOL release

Deprecated release selected

Insecure release selected

Discussion/Todo
There are still some things to left to do/discuss here.
Currently, the only deprecation options are insecure and EOL. Maybe add a third, unmaintained?
The deprecation form is full of placeholder texts once we have consensus on the options, this needs to be added.
Where to place the link? The package detail view would be an ideal fit, but from what I know is heavily cached. Is there some kind of session detection mechanism in place that makes it possible to use uncached views of the page?
API? Should this be added to the legacy JSON API views, or is there a new API planned?
Accessibility: Add a warning icon?

I've been working on a open database that contains all known security vulnerabilities in Python packages: https://github.com/pyupio/safety-db
The db (which is just a big json file) contains SpecifierSets as in packaging.specifiers, so it'd be relatively easy to write a data migration that flags insecure releases.
Please let me know if there is any interest in this.

@jayfk hi, and sorry for the slow response! Will you be at the PyCon North America sprints, which would be a good place to hash out the answers to your questions for a feature like this?

@woodruffw thought you might want to take a look at this.

Might be useful to revisit this after finishing #5863.

Please note:
If/when this PR is re-reviewed, we will need to ensure that the templates are appropriately translated.

Given the age of this PR, and that we just merged support for "yanking" releases which mostly covers this use case, I'm going to close it, but thanks for the attempt here!
The one thing we might want to surface from this (and which PEP 592 also provides for) is specifying the reason for yanking. If anyone is inclined to work on that, we'd be happy to accept a PR.

The one thing we might want to surface from this (and which PEP 592 also provides for) is specifying the reason for yanking. If anyone is inclined to work on that, we'd be happy to accept a PR.

@di do we have a ticket for that?  Could not find one.

@nlhkabu Done: https://github.com/pypa/warehouse/issues/7856


Markdown in incidents

Description
Allow admins to write markdown in their incidents for enhanced formatting
Type of change
New feature
Please delete any options that are not relevant.

User interface (UI)
New feature (non-breaking change which adds functionality)

Checklist

[ ] My code follows the style guidelines of this project
[ ] I ran ESLint and other linters for modified files
[ ] I have performed a self-review of my own code and tested it
[ ] I have commented my code, particularly in hard-to-understand areas
(including JSDoc for methods)
[ ] My changes generate no new warnings
[ ] My code needed automated testing. I have added them (this is optional task)

@Nuckerr Did you forget to commit your code? There's 0 changes showing.

I abandoned it because of #1253


Spider option should autogenerate the spider.yml file if the imported…

Bugfix for issue #498, this configures the spider option so that the imports file is autogenerated if it doesn't exist

Looks like the build is erroring out because the current version of nokogiri requires ruby >= 2.1.0.  Do you want to pin nokogiri to an older version or should I upgrade the ruby version?

Thanks for bringing that to my attention, @ThomasWunderlich - I have hopefully fixed the build in #505. Could you merge master into your branch so that the tests are run against this PR again?

@ChrisBAshton ,
Thanks for the quick fix. Wraith is now building with my fix

Thanks - your fix looks good, I think we intended to pass the imports_must_resolve boolean as part of v4.0.0 and it never made it in.
Will merge and release as 4.0.1.


"Giurgeni" is listed in the drop-down menu

Description:
When user writes "Giurgeni" the location appears in the drop-down menu next to the comune and the county witch is a part according to the law
Precondition:
The website is up an running.

Step 1
Write in the search bar "Giurgeni"
Expected results
The location appears in the drop-down menu as "Comuna Giurgeni, ** IALOMIȚA**"


tensorflow.python.framework.errors_impl.InvalidArgumentError

Describe the problem
How can I use tf.scatter_update with tf.bool  in the eager mode?
Traceback (most recent call last):
  File "/home/reon/src/github.com/ashigirl96/fake_agents/fagents/snippets/eager/error_bool.py", line 14, in <module>
    tf.app.run()
  File "/home/reon/src/github.com/ashigirl96/keras-snippet/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 126, in run
    _sys.exit(main(argv))
  File "/home/reon/src/github.com/ashigirl96/fake_agents/fagents/snippets/eager/error_bool.py", line 9, in main
    _update = tf.scatter_update(ref, indices, updates)
  File "/home/reon/src/github.com/ashigirl96/keras-snippet/lib/python3.6/site-packages/tensorflow/python/ops/state_ops.py", line 359, in scatter_update
    name=name)]):
  File "/home/reon/src/github.com/ashigirl96/keras-snippet/lib/python3.6/site-packages/tensorflow/python/ops/gen_resource_variable_ops.py", line 459, in resource_scatter_update
    name=name)
  File "/home/reon/src/github.com/ashigirl96/keras-snippet/lib/python3.6/site-packages/tensorflow/python/eager/execute.py", line 66, in quick_execute
    six.raise_from(core._status_to_exception(e.code, message), None)
  File "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.InvalidArgumentError: Value for attr 'dtype' of bool is not in the list of allowed values: float, double, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64
	; NodeDef: ResourceScatterUpdate = ResourceScatterUpdate[Tindices=DT_INT32, dtype=DT_BOOL](dummy_input, dummy_input, dummy_input); Op<name=ResourceScatterUpdate; signature=resource:resource, indices:Tindices, updates:dtype -> ; attr=dtype:type,allowed=[DT_FLOAT, DT_DOUBLE, DT_INT32, DT_UINT8, DT_INT16, ..., DT_UINT16, DT_COMPLEX128, DT_HALF, DT_UINT32, DT_UINT64]; attr=Tindices:type,allowed=[DT_INT32, DT_INT64]; is_stateful=true> [Op:ResourceScatterUpdate]

Source code / logs
from tensorflow.contrib.eager.python import tfe
import tensorflow as tf

def main(_):
	ref = tfe.Variable([False, True, False], trainable=False)
	indices = tf.range(3)
	updates = tf.constant([True, True, True])
	_update = tf.scatter_update(ref, indices, updates)

if __name__ == '__main__':
	tfe.enable_eager_execution()
	tf.app.run()

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

It has been 14 days with no activity and the awaiting response label was assigned. Is this still an issue?

It has been 14 days with no activity and the awaiting response label was assigned. Is this still an issue?

This happens because the eager placer is a little too aggressive about putting your variable on the GPU if one is available. Place it on the cpu by putting a with tf.device('cpu:0'): around the variable declaration.


Navy commands hang when navy doesn't exist or state is invalid

This also appears to be happening on navy delete. Turns out that my navy state.json is malformed. Navy debug:
  navy Start CLI +0ms
  navy:cli Invoked CLI action +675ms
  navy:state Got raw state for env test +6ms /Users/Jamie.Greeff/.navy/navies/test/state.json {
  "_c": [],
  "_s": 1,
  "_d": true,
  "_v": {
    "services": {},
    "configProvider": "filesystem",
    "path": "xxx",
    "driver": "docker-compose"
  },
  "_h": 0,
  "_n": true,
  "services": {
    "xxx": {
      "_develop": {
        "mounts": {
          "xxx": "/opt/nodeservice"
        }
      }
    }
  }
}

This actually appears to be happening on all commands when the navy doesn't exist or the state is invalid.


Small fixes to COPY_DATA

This PR applies two small fixes to COPY_DATA:

The use of the OpenACC runtime function ACC_DEVICEPTR in COPY_DIM_CONTIGUOUS is replaced with acc host_data to align it with COPY_2D
The case of the fully contiguous field is promoted to the top of the nested SELECT CASE. This is the best possible scenario for data transfers and we should check this first rather than at the end.

The last point resulted in a more than 10% gain in data transfer speeds for CLOUDSC

 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.

So what you mean is that we are spending a lot of time in the nested SELECT CASE constructs ? If so, we should probably take some more radical action, like storing a pointer to the copy function in the object itself.

Yes I think there was definitely an overhead for the nested SELECT CASE constructs. I really like your solution with determining the copy method at field construction time and storing a pointer to it, thanks so much for suggesting it 😄  Could I please merge that commit to this PR and test it?

Hi @pmarguinaud,
I tested your COPY_FUNC fix and it indeed restores all the lost performance, thanks again for that! Could I please merge your naan-copy-data-fix branch to this PR? I need another small fix on top of that for transferring very large arrays. After that we can close this PR.

Hi @pmarguinaud. Thanks again for contributing the fix. Could I please your contribution to this PR (and add another small commit on top) so we can close this soon?

Hello Ahmad,
Yes please merge my branch in your PR.
Regards