How to pinpoint the source of angular console errors - angularjs

Note: This question will be changed to eliminate old question with lower rating.
I see AngularJS console errors as follows:
Lexer Error: Unexpected next character at columns 0-0 [#] in expression [#].
The problem now is how to locate the source of this error among thousands of lines of code?
Old Question:
NOTE: This is the old question, please ignore.
I was working with a sample application from ng-flow file upload. I then moved the developed parts to my colleague's environment who is using bootstrap for CSS. I noticed that the look and feel changed on from his environment.
I realized that my colleague is using this css file:
http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css
and I am using the css file the came with the download:
http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css
and both work fine, but they have clear differences on how the look and feel and how layout is presented.
I included both, and it seems the application is still working fine, and the look and feel is now merged.
I am just wondering if there is documentation that explains the differences and how to decide which one to use.
Appreciate your feedback.

The reason they look different is that they're referring to different versions of Bootstrap - version 3.3.7 vs version 2.3.2. (The other difference is where the files are hosted.) 3.3.7 is more recent than 2.3.2.
Generally, you want to use the most recent version available for whatever libraries you're including, unless you need to stay compatible with an older one. You shouldn't include both, though; that's going to have your users downloading a lot of redundant css.

Related

Use commitizen on a code-agnostic project

I would like to start incorporating commitizen in my repository; however, implementation seems to revolve around adding a js dependency on the repository, and calling it independently (and enforcing it with a hook).
My project currently is python, but that's besides the point - it seems to me that commitizen should be able to be orthogonal to the underlying repository.
However, I don't understand how would that be possible. Maybe the instructions don't exist, or I have not yet separated them from the "main usage path".
Good question #Stavros. I have recently been playing with it and started to have the same question. I tried to find an answer from its documentation https://commitizen-tools.github.io/commitizen/ but could not find it. Based on my testing, it seems to me that it only supports Python projects. However by the way it works, it should be able to support all Git projects.

How to get package depencies for Prism and Unity working?

I have a WPF application built on .Net 4.8, Prism and Unity, using PackageReference in the project files. Every once in a while I update Nuget references to the newest ones. The packages related to Prism and Unity repeatedly have been a pain in the arse.
Now is such a moment again. Or rather, the past DAYS. I am trying to use packages like
Prism.Wpf 7.2.0.1422
Unity.Container 5.11.8
I keep bumping into the dreaded "The located assembly's manifest definition does not match the assembly reference", again & again in various variations. Seeing warnings like "Found conflicts between different versions of ... that could not be resolved", or "explicit binding redirect on ... conflicts with an autogenerated binding redirect".
I have been tinkering with this a lot, checking a whole dependency tree, removing, adding, or changing redirects, adding or removing packages. Of course searching on the web. It has driven me nuts. How to get out of this, and prevent it for the future?!
I don't know if this is combination of bugs somewhere, or just me not understanding how to use it. So I will put this as a question.
How on earth am I supposed to get things working?!
Set AutoGenerateBindingRedirects or not?
Set explicit redirects or not? If so, for which versions, to which other version? What about the publicKeyToken?
What about testing projects using MSTest, Moq, Appium, do they need a different approach?
Frankly, I was under the impression that using Nuget to install packages would just take care of all that, particularly using PackageReference. Well apparently, it doesn't.
I am at a loss. Is there anyone who can direct me to a valid approach?
Thanks in advance!

Roslyn Analyzer to analyse and modify csproj file

Currently I have a script that modifies nuget reference paths in old style csproj files. (for anyone that is interested this is due to building using different solutions which breaks the NuGet reference paths. I have reported it to Microsoft and it is currently in triage).
The script works correctly and does what I need it to, however I thought that this would be a good candidate for a Roslyn Analyzer with a Code fix.
I have played around with analysers and have been able to write several that can modify code within a project, but I am having great difficulty writing one that can work on the csproj file itself.
I have looked at workspaces (VisualStudioWorkspace and MSBuildWorkspace) however it seems to me that these will give you access to the various projects in a solution but will not give you access to the project file itself?
If anyone can give me a pointer to where/what I should be looking for, or if it is actually possible, i'd very much appreciate it.
Thank you

React instance not being exposed in a browser

Recently I've been setting up a development stack for React using Webpack (new for me) and of course wanted to benefit from all of the shiny conveniences that it provides (which are by the way great!). Among tons of resources I dug on the internet, the particularly good one I found was the React Webpack Cookbook, with which every step went like clockwork. However I stumbled across a hitch that has been taking me several hours to try to solve, not being able to find a solution in the aforementioned page, nor any other source: the expose-loader wouldn't expose React to global scope in Chrome (not tested on other browsers) therefore not allowing React DevTools extension to run. I tried mixing all the steps from the Cookbook, using different versions of React, minified/unprocessed, nothing worked.
The problem was trivial when discovered, but the source of the problem tricky to find: all the time I was using the localhost:8080/webpack-dev-server/ version of my development page, as suggested by the Cookbook, because it allowed me not to bother with the inability to inject <script src="http://localhost:8080/webpack-dev-server.js"></script> into html-webpack-plugin index file generator and provided sort of a nice status bar. It works perfectly since I switched to localhost:8080. Unfortunatelly I wasn't able to make it work with the localhost:8080/webpack-dev-server/ version, though I think it has something to do with the fact that under this url the page is loaded into a frame.

Xcode 4 - how does it know what build configuration to use for nested projects?

First time poster, this site is invaluable for answering my questions - so thanks to everyone who contributes!
I have an Xcode 4 project with multiple nested projects (which build as libraries for the main project). Everything is working fine but one step baffles me:
How does it know what configuration to build (and link) for the nested projects? For example my main app has a Distribution configuration. I want it to build and link against the nested projects' Release configurations. And it does!!! but how does it know that? I can't find anywhere where I would specify it.
After scouring the internet to no avail - I'm thinking it might be using magic...
I may have a solution to your question:
If you look at the scheme settings of your included frameworks, they by default have defined Release as configuration to use when you build for Archive. Would be possible that Xcode uses this setting when you build your main project for Archive (and would actually make sense).
(For me this doesn't work, won't find the headers, maybe you have an idea?)

Resources