In https://stackoverflow.com/a/2867082/288568 I found two ways of disabling notices. So what exactly is the a difference between
error_reporting(E_ALL ^ E_NOTICE);
and
error_reporting(E_ALL & ~E_NOTICE);
?
And what does the following line do?
error_reporting((E_ALL | E_STRICT) ^ E_DEPRECATED ^ E_NOTICE );
Would this correctly report E_ALL and E_STRICT but not DEPRECATED AND NOTICEs ?
var_dump(error_reporting(E_ALL ^ E_NOTICE));
var_dump(error_reporting(E_ALL & ~E_NOTICE));
is the same int(32759). Just different binary operations to get there.
Would this correctly report E_ALL and E_STRICT but not DEPRECATED AND NOTICEs ?
var_dump( decbin ((E_ALL | E_STRICT) ^ E_DEPRECATED ^ E_NOTICE) );
is
101111111110111
111111111111111 E_ALL
000100000000000 E_STRICT
000000000001000 E_NOTICE
010000000000000 E_DEPRECATED
So the anwser is yes and (E_ALL ^ E_DEPRECATED ^ E_NOTICE) would be the same.
Related
Retrieving compiler information:
Compiler using remote version: 'latest', solidity version: 0.8.17+commit.8df45f5f.Emscripten.clang
ParserError: Expected string literal (path), "*" or alias list.
--> c:/Users/manis/Desktop/React_Native/contracts/NFTMarketplace.sol:6:8:
|
6 | import “#openzeppelin/contracts/utils/Counters.sol”;
| ^
Compilation failed with 1 errors
Please Tell me something about this error.
try in your console, in the main project folder:
yarn add #openzeppelin/contracts
also, check your node_modules folder.
I have a problem with compiling a vue module in Visual Studio code. During compilation It has always returned the same warning, although I'm using autoformat. I have already changed CRLF to LF, however it didn't help. Can somebody help me, please?
Module Warning (from ./node_modules/eslint-loader/index.js):
warning: Parsing error: Unexpected character "EOF" (prettier/prettier) at src\components\ViewEmployees.vue:34:2:
32 | }
33 | };
> 34 |
| ^
1 warning found.
I'm using the ng cli for the first time. I'm trying to make a new module ('foo') and a new component ('bar') under the foo module. Though, how I think I'm supposed to do it in ng cli doesn't seem to work:
mbp:my-new-app chris$ ng g m foo
installing module
create src/app/foo/foo.module.ts
mbp:my-new-app chris$ ng g c bar -m foo
installing component
create src/app/bar/bar.component.scss
create src/app/bar/bar.component.html
create src/app/bar/bar.component.spec.ts
create src/app/bar/bar.component.ts
EISDIR: illegal operation on a directory, read
Error: EISDIR: illegal operation on a directory, read
at Error (native)
at Object.fs.readSync (fs.js:732:19)
at tryReadSync (fs.js:487:20)
at Object.fs.readFileSync (fs.js:535:19)
at Class.afterInstall (/Users/chris/code/my-new-app/node_modules/#angular/cli/blueprints/component/index.js:209:34)
at tryCatch (/Users/chris/code/my-new-app/node_modules/rsvp/dist/rsvp.js:539:12)
at invokeCallback (/Users/chris/code/my-new-app/node_modules/rsvp/dist/rsvp.js:554:13)
at publish (/Users/chris/code/my-new-app/node_modules/rsvp/dist/rsvp.js:522:7)
at flush (/Users/chris/code/my-new-app/node_modules/rsvp/dist/rsvp.js:2414:5)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
ng cli version:
mbp:my-new-app chris$ ng version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
#angular/cli: 1.0.0
node: 6.10.1
os: darwin x64
#angular/common: 4.0.1
#angular/compiler: 4.0.1
#angular/core: 4.0.1
#angular/forms: 4.0.1
#angular/http: 4.0.1
#angular/platform-browser: 4.0.1
#angular/platform-browser-dynamic: 4.0.1
#angular/router: 4.0.1
#angular/cli: 1.0.0
#angular/compiler-cli: 4.0.1
Am I doing using this wrong? I haven't found documentation specifically on this feature.
Thanks!
instead of running
ng g c bar -m foo
try to run (without -m)
ng g c foo/bar
if you want to reference a module, which should export/import your new component, you should provide a relative path to this module, like:
ng g c bar -m foo/foo.module
in this case bar component will be imported/exported by foo.module, but located under src/app.
EASDIR error occurred because you provided a directory (foo) instead of file (foo/foo.module)
as answered for example here:
EISDIR means that the target of the operation is a directory in reality but that the expected filetype of the target is something other than a directory.
I recently updated my global A2 CLI, as well as an existing project, to:
_ _ _
__ _ _ __ __ _ _ _ | | __ _ _ __ ___ | |(_)
/ _` || '_ \ / _` || | | || | / _` || '__|_____ / __|| || |
| (_| || | | || (_| || |_| || || (_| || | |_____|| (__ | || |
\__,_||_| |_| \__, | \__,_||_| \__,_||_| \___||_||_|
|___/
#angular/cli: 1.0.0-beta.30
node: 7.4.0
os: darwin x64
#angular/common: 2.4.6
#angular/compiler: 2.4.6
#angular/core: 2.4.6
#angular/forms: 2.4.6
#angular/http: 2.4.6
#angular/platform-browser: 2.4.6
#angular/platform-browser-dynamic: 2.4.6
#angular/router: 3.4.6
#angular/cli: 1.0.0-beta.30
#angular/compiler-cli: 2.4.6
When I spin up ng serve on the project it runs fine but when I upload it to my vm I get the following errors:
[Error] SyntaxError: Unexpected token '<'
(anonymous function) (inline.bundle.js:1)
[Error] SyntaxError: Unexpected token '<'
(anonymous function) (polyfills.bundle.js:1)
[Error] ReferenceError: Can't find variable: webpackJsonp
Global Code (styles.bundle.js:1)
[Error] SyntaxError: Unexpected token '<'
(anonymous function) (vendor.bundle.js:1)
[Error] ReferenceError: Can't find variable: webpackJsonp
Global Code (main.bundle.js:1)
This morning I created a new project and uploaded it to the vm without additional changes, to see if it was something in the project update, and I get the same errors.
Pretty stumped on what's going on here. This is the first time I've encountered it and my projects have worked fine locally and remotely before updating.
The remote system is a Windows Server 2012 with XAMPP.
My local system is a Mac, usually running the app via ng serve, but checked with MAMP and it works under Apache there, too.
Has anyone run across this?
So evidently it had something to do with the directory. The app runs in a subdirectory on my vm and that hasn't posed a problem in the past. When I changed the bas href from "/" to "./", it worked again.
I just find
java -jar Build\Tools\compiler.jar ^
--compilation_level=ADVANCED_OPTIMIZATIONS ^
--externs Build\jQuery.externs.js ^
--js Build\Output\Compiling.js ^
--js Script/Themes.lang.js ^
--js Script/Themes.js ^
--module Core:3 ^
--js UI/ThemeChooser/ThemeChooser_en.htm.js ^
--js UI/ThemeChooser/ThemeChooser.js ^
--module UI_ThemeChooser:2:Core ^
--js UI/VerticalTabs/VerticalTabs_en.htm.js ^
--js UI/VerticalTabs/VerticalTabs.js ^
--module UI_VerticalTabs:2:Core ^
--js Pager/Pager_en.htm.js ^
--js Pager/jquery.Pager.js ^
--js Pager/Pager.js ^
--module Pager:3:VerticalTabs ^
--module_output_path_prefix .\Compiled\
but I want to know how to set the --closure_entry_point and how to load moduled js by demand
For your first question:
--closure_entry_point is used with --manage_closure_dependencies and --only_closure_dependencies to automatically trim files from the set pass to the compiler. If you aren't using these options they have no value.
For you second question:
You can load your module the same way you would load any other javascript. The simplest method is simply to append a script tag to the DOM when you want to load the module. Another method is to use an XHR to load the js and then call eval() with the results.