patch

Log Scale Matplotlib PatchCollection Colors

孤街醉人 提交于 2020-01-02 19:21:29
问题 I have a function that generates a heterogeneous mesh and then plots the patches. It specifies the lower and upper x and y edge for every bin. For example, a single bin is defined by the vector [x0, x1, y0, y1] . These coordinates translate to a bin: y1|---------| | | | bin | | | y0|---------| x0 x1 I have an (Nx4) mesh that contains N bins with [x0, x1, y0, y1] columns. To plot the data, I do the following: z_plot = z_stat / (dx * dy) # ``z_stat`` is a calculated z-value z_plot = z_plot / z

How to create an update patch for windows application

自古美人都是妖i 提交于 2020-01-02 10:09:14
问题 How do I create an update patch that updates the application without having to reinstall the application in newer version? Also, how could I combine other software such as SQL express and printer driver with the application setup file? I have used Visual Studio 2010 to develop my application. 回答1: Here is a useful link for you : http://www.codeproject.com/Articles/125721/Installer-and-Patching-Program-using-Visual-Studio You can combine other software such as SQL express and printer driver

IDA Pro and editing executables

别等时光非礼了梦想. 提交于 2020-01-02 04:24:10
问题 This is kind of an unorthodox question. I'm kinda new to using IDA Pro. Is there a way to edit the assembly code and then have IDA save the result as an executable? Is there some kind of plugin maybe that does that? because it seems that IDA doesn't want to save as an EXE. Or do I need to manually edit it in some other way? 回答1: Version 6.1+ (maybe 6.2+) of IDA Pro will allow you to apply your patches directly to the input file. Equally, it allows you to revert the changes back. 回答2: I've

Can I import a patch without touching the working directory?

末鹿安然 提交于 2020-01-02 02:05:33
问题 Normally, Mercurial will abort if I have a dirty working copy when I try to import a patch: $ hg import x.patch abort: outstanding uncommitted changes Is it possible to import it anyway? 回答1: With Mercurial 1.9, you can use hg import --bypass to apply a patch without touching the working copy. The patch will be applied on the working copy parent revision by default. Use the --exact flag to apply the patch onto the changeset mentioned in the patch header instead. 回答2: If you are using

git am: Patch format detection failed

断了今生、忘了曾经 提交于 2020-01-01 09:24:41
问题 I have never used patches with Git before and I need some help. I am trying to apply a patch to a Git repo to test a Wine patch, specifically this patch here. So I did the following: $ git clone git://source.winehq.org/git/wine.git $ cd wine $ nano patch.p1 I then pasted the content of the patch with Ctrl + Shift + V and used Ctrl + O to save. Then I tried this: $ git am patch.p1 Patch format detection failed. What am I doing wrong? I have never applied a patch before. 回答1: Patch format

How should I handle product upgrades in a WiX installer?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-01 04:50:51
问题 I have a reasonably large WiX installer (250 Mb plus) and I am trying to come up with a suitable upgrade strategy. Most of the files in the installer will not change and we would prefer not to have to distribute the whole package when only one or two files have changed. I have looked into major and minor upgrades and my understanding is that a major upgrade will happen if the Product ID changes, so long as the Upgrade ID stays the same and minor upgrade patches can be used if both of these

Anyone know of a good free patch creator?

女生的网名这么多〃 提交于 2020-01-01 04:43:29
问题 Does anyone know of a good patching program that is free? You know, one that can take a directory with your old program in it and compare it to a directory with your new version, and spit out a patch that is only the difference between the two? Also, I am looking for something that can patch the entire directory, not just one exe. EDIT: Thanks for the answers, but I am looking for an end user patch for product updates. Nothing to do with the source. 回答1: There is Binary patch and diff, which

Import patches with conflicting changes for mercurial repository with tortoiseHg

♀尐吖头ヾ 提交于 2020-01-01 03:11:27
问题 I have successfully imported patches without having conflicting changes. But when I try to import patch with conflicting changes it throws an error saying "Hunk #1 FAILED at 11.. ". There is no option to merge changes. Is there any other way to accomplish this? 回答1: Manual resolution The latest versions of TortoiseHg 2.1 have tools for helping you resolve rejected chunks from patches. When you apply a patch and it has rejections, for each file with rejections it asks if you want to resolve

How to patch a module's internal functions with mock?

不想你离开。 提交于 2019-12-31 08:57:28
问题 By "internal function", I mean a function that is called from within the same module it is defined in. I am using the mock library, specifically the patch decorators, in my unit tests. They're Django unit tests, but this should apply to any python tests. I have one module with several functions, many of which call each other. For example (fictitious code, ignore the lack of decimal.Decimal): TAX_LOCATION = 'StateName, United States' def add_tax(price, user): tax = 0 if TAX_LOCATION ==

Draw rounded fancyarrowpatch with midpoint arrow in matplotlib

十年热恋 提交于 2019-12-31 03:36:08
问题 I've been trying to push the boundaries of matplotlib's patches and instruct it to draw a rounded FancyArrowPatch with a directional arrow on its midpoint. This would prove incredibly useful in a network representation I am trying to create. My coding hours with python are not yet in the double digit, so I can't say I have a clear understanding of matplotlib's patches.py, but I have narrowed down the solution to two possible strategies: the smart, possibly pythonic way: create a custom