I am attempting to follow instructions in this article:
https://www.dartlang.org/articles/libraries/serialization#protobuf-example
Step one is to install protocol compiler. My question is, does it matter which version I download? Do I need to use the javasript version as Dart will be compiling down to Javascript? Please see below link to list of all protoc downloads to see what I mean:
https://github.com/google/protobuf/releases/tag/v3.0.0
Any advise would be massively appreciated. Apologies if this has a very obvious answer - I am quite new to this and struggling to find more information anywhere.
Thanks in advance.
You don't need anything special for JS. The compiler generates Dart code that gets compiled to JS
Install one of:
protoc-3.0.0-linux-x86_32.zip
protoc-3.0.0-linux-x86_64.zip
protoc-3.0.0-osx-x86_32.zip
protoc-3.0.0-osx-x86_64.zip
protoc-3.0.0-win32.zip
Related
I am trying to write a contract with ERC-721 token system. I have experience with ERC-20, so I thought I can find a tutorial and follow the tutorial. However, tutorials I found are based on solidity version between 4.0~4.2. Nowadays we use 5.0~6.0. Therefore tutorial codes are not working. Is there any tutorial, or code can I look and learn? HELP!
I tried to fix the code, and make suitable for 5.0 or higher, but I failed.
Therefore I tried to downgrade solidity and use docker but still get
Error: CompileError: ParsedContract.sol:3:1: ParserError: Source
"zeppelin-solidity/contracts/token/ERC721/ERC721Token.sol" not found:
Unknown exception in read callback. import
'zeppelin-solidity/contracts/token/ERC721/ERC721Token.sol'; this
error. :(
+
I found https://github.com/OpenZeppelin/openzeppelin-solidity , this but I do not know how to write test. Thank you for your time to read this !.
due to renaming, ERC721Token.sol is no longer available in the latest version of OpenZeppelin v2.3.0. change ERC721Token.sol to ERC721.sol, and it should work.
I suggest you have a look at the OpenZeppelin documentation:
https://docs.openzeppelin.org/v2.3.0/tokens#erc721
If you have more questions about OpenZeppelin you can always ask in the community forum
I can put together a sample contract in the community forum if you need.
I'm trying to get ImageMagick to work in my iOS project. Unfortunately everything I have tried so far has not worked.
Cocoapods
The most obvious approach would be to use the cocoapod. Unfortunately after installing the cocoapod there doesn't appear to be anything exposed to swift to import. Maybe I'm missing something obvious and if anyone has any ideas that would be great. Unfortunately the documentation is lacking as far as specific examples go.
Static library - approach #1
The official ImageMagick docs provide some instructions to compile the latest version of ImageMagick and include a static library in your Xcode project. Unfortunately the first step of the instructions requires running a bash script imagemagick_compile.sh which I cannot find. Once again I could be missing something obvious.
Static library - approach #2
After some additional searching I found the ~Claudio guy which the ImageMagick docs mention as the maintainer of the iOS version of ImageMagick. He has a repo with similar instructions as provided by ImageMagick but this repo includes a bash script to compile and generate a static library of ImageMagick. I tried running the script directly ./all.sh 6.8.8-9 but soon realized I hadn't setup a build directory they way his instructions outlined and I got stuck getting libpng installed correctly.
Static library - approach #3
The same repo with the instructions to compile and generate a static library also includes an old sample iOS project with a static library already included for an older version of ImageMagick. This just about worked except the ImageMagick library has a class Timer that clashes with the Timer class provided by Swift4/iOS so I couldn't get my project to compile using this static library of ImageMagick.
ImageMagick iOS Questions on SO
There are a handful of other questions on Stack Overflow that deal with running ImageMagick on iOS so I know other people have done it but nothing very recent. If anyone has any ideas that would be greatly appreciated, thanks!
Un-answered question on how to use ImageMagick on iOS: ImageMagick iOS image Potentially useful comment that includes some of the same links that I provided above.
Someone already using ImageMagick for iOS but gives no details on how it was implemented: ImageMagick circular dstortion on iOS
Un-answered question from someone already using ImageMagick in their app: Ios - ImageMagick - No Image Created after Distortion
More recent question related to warnings using the cocoapod version: iOS: ImageMagick compiler warnings in Xcode
Other questions: https://stackoverflow.com/search?q=imagemagick+ios Unfortunately I haven't found any of these that have helped.
To integrate ImageMagick into iOS you will need to do the following:
Install the library available here https://www.imagemagick.org/download/iOS/
You will need a Swift-Objective-C bridging header that includes:
#import "ImageMagick.h"
#import "MagickWand.h"
You will need to modify any functions that reference Timer to Foundation.Timer, this will resolve any conflicts with the ImageMagick library
You will need to add under Your target > Build Phases > Link Binary With Libraries > "libxml2.tbd".
Hope this helps
I am currently working on NDN architecture (one of the ICN architecture) and for that i need ndn-traffic generator module. This module is available on github. You can find it here.
The prerequisite for ndn-traffic-generator is ndn-cxx which is NDN C++ library. The steps to install these libraries are given in INSTALL.rst file. But when I try to install these libraries i get an error saying "Waf script '2.0.6' and library '1.8.19' do not match".
I have googled about it and i found this link.
I am not able to figure out how to fix this problem any kind of help is appreciated.
Thanks!
I am trying to use codeblocks to compile the code available here
The thing is every time I try to build and run, I run into the following error:
|/.../head_pose_estimation/opencv2/core/core.hpp|48|fatal error: opencv2/core.hpp: No such file or directory
Does anyone know how I can fix this? Thank you!
You do not have the pre-built (compiled) version of OpenCV, what you currently have are the source files. If you want to do something special with OpenCV (Target/GPU SUpport etc) then you will need to build the framework using an appropriate guide.
If however you simply want to use OpenCV in the most common way then download the pre-built libraries from the OpenCV.org website.
NOTE:
If you are using OpenCV with MinGW compiler, I do not remember if the pre-built is actually pre-built for MinGW. (I dont think they do) In this case you will HAVE to built the libraries. You can find a guide here
Could someone shed some light on why the following, in simplecv, does not work?
https://gist.github.com/2220293
Apparently, the image.findKeypointMatch attribute does not exist? It is indeed not the simplecv documentation.. How could I accomplish the something without this?
Thanks
Alex
I am the one to write the above code.
The keypointmatch function is included in the latest github repository of simple. Install it from there. You also would be needing OpenCV 2.3 to run this.
Note: It is just an example for SimpleCV. This is in no way perfect, that is obvious.
Did you install the latest version of SimpleCV? If not I suggest you get the latest version from the repository. This library is very young, and after a quick look at the code I saw many bugs. So it's not a bad idea to go with the latest version hoping the number of bugs is reduced.
In
SimpleCV/ImageClass.py
you will find the findKeypointMatch() method. One thing you can do is to investigate why you cant call this function. If you copy here the error message you get and exactly the code you're trying to run then probably someone here can help you.
The other way is to go through the code as you wanted and see what it does and you copy the code in your script. I wouldn't recommend this.
Please let me know how it goes.
To verify you can always run:
import SimpleCV
print SimpleCV.__version__
Keypoint detection was added after 1.2.