referencing figures and equations in LaTeX (overleaf) stopped working - reference

I am writing a report in Overleaf and to my surprise, suddenly all the references stopped working...
Code example:
\begin{equation}
A = B * C
\label{eq:tryout}
\end{equation}
Tryout reference: \ref{eq:tryout}
The document shows this:
Does anyone see a syntactical error? Or could it be that I accidentally removed a package or something? Thanks in advance!
p.s. compiling multiple times does not work either

I finally found out what the problem was. I was using another package:
\usepackage{hyperref}
Apparently, this package interferes with the standard references, because if I remove it, the document works perfectly again.

Related

How do I force VS Code to import the latest Python source file?

I am working with Python in VS Code. I have two modules, mod_A and mod_b, where mod_A imports a method do_this_thing from mod_B. Everything was going fine until I tried to refactor do_this_thing into _do_this_thing. (The function is an internal function).
I used the Rename Symbol option in VS Code to perform the refactor. I doublechecked that all instances in my fairly simple code base were covered.
The strange behavior that I'm getting is that when I run mod_A and it gets to the renamed function call, I get an AttributeError telling me that there is no function _do_this_thing. The head scratcher, though, is that if I manually change _do_this_thing back into do_this_thing in mod_A, my code executes as expected— even though it is still defined as _do_this_thing in mod_B! Furthermore, I can't step into do_this_thing when I run it in mod_A.
I have tried deleting all __pycache__ files, as that was the first thing that I thought of. I've also tried clearing VS Code's cache, deleting my project, and starting over with the refactor from a fresh pull from GitHub. No dice.
Hopeful that someone here can help me solve this esoteric problem!
Edit: Adding some debugging context for the votes to close my question:
Windows 10, VS Code
Miniconda Python distribution
PYTHONPATH variable has project directory on it
Modules imported correctly; the bug happened when I changed the name of a function in the module being imported
Python appears to be importing a cached verison of the earlier code from somewhere, but I've reset everything and still have the issue

VS 2010 C++ phantom compile errors

problem: when attempting to build completed code VS 2010 returns with compile errors. when "errors" are checked in text environment after a few seconds VS 2010 recognizes that "errors" were in fact not errors at all with no external input. when build is attempted again the entire chain of events restarts.
theories: when i attempt to build VS 2010 it appears to "forget" many of the classes and structs that i have defined. many of the errors are required ';' in between a class or struct declaration and the variable name that it is attached to and the red squiggle that indicates an error appears under the struct / class definition.
Example: myStruct myNamedStruct; //in this case "myStruct" would show a red line underneath for a few seconds when viewed after each build attempt but then VS would decide it is fine after a few seconds.
Trouble Shooting: i have hit the "clean solution" button within the build tab and it consistently returns "Clean: 1 succeeded, 0 failed, 0 skipped" which seams like a positive response to me. i have tried restarting VS, hiding the .suo file (to make intellisense behave), systematically opening each program file forcing VS to properly run it's error diagnostic on each, along with tinkering with turning off and on some of the code environment settings within the tools -> options window.
The rest: i am not naive i am fairly certain my code does have errors within it, but these odd fake errors make it impossible to find and test the real errors. any suggestions would be appreciated.
after significant trouble shooting and research i have come to the conclusion that i was declaring my structs incorrectly (i was not using typedef). i still don't understand why the compiler was only saying they were bad when i tried to build and was ok with these errors the rest of the time.
edit: well after more tinkering the problem still persists. typedef solved the issue for my structs, but my classes are still popping the same "errors".
edit2: after more troubleshooting it was discovered that i had header files indirectly calling themselves through other header files. i guess in effect i was creating endless loops on build. i am still not sure why VS found these errors acceptable in the coding environment but producing errors at build.

Androidplot - getSeriesSet() and other methods in newer AndroidPlot versions

I'm looking at this answer from another question and trying to test it out.
One problem I'm having is a couple of the methods seem to have changed in newer versions of Androidplot. For whatever reason I can't figure out what replacement methods I'm meant to use.
The methods in question are:
mPlot.getSeriesSet().iterator().next() //Cannot resolve getSeriesSet
ValPixConverter.valToPix //Cannot resolve ValPixConverter
widget.getXVal //Cannot resolve .getXVal
My ultimate goal is to be able to place markers on the graph traces
EDIT:
Ok I've figured getXVal/getYVal gets replaced with screenToSeriesX/screenToSeriesY, the rest are still unknown :(
I eventually figured it out :)
mPlot.getSeriesSet().iterator().next() gets replaced with plot2.getRegistry().getSeriesList().iterator().next()
getXVal & getYVal gets replaced with screenToSeriesX & screenToSeriesY
For ValPixConverter I just copied the class from an older version of Androidplot.
This was enough to get me playing around with placing markers/cursor on the graph but a better solution will be formulated for the future.

VC++ EXE standalone has bugs that don't happen in IDE

My program has a very specific error that took me a while to track down - now I don't know how to fix it. My code is very long and in many files and I don't see much point in posting it here.
In the IDE, everything runs fine, in both Debug and Release (with the runtime library set to either /MTd or /MT, respectively, so I'm assuming all dependencies are included).
However, when I run the standalone, I get a crash. At first I thought it was a dependency problem but it doesn't seem so.
At some point in the code, I am accessing a vector via a method call: t->GetList(), where GetList is defined as std::vector<T*> & GetList() and the method simply returns a member variable (simply defined as std::vector<T*> field in the class).
It turns out, if I print out the size of the list while running from the IDE, I get 0 (which is the correct answer in this case).
However, when doing the same thing running from standalone, I get the size as 467467353.
I tried changing the method declaration to std::vector<T*> * GetList() and doing return &field; and updating the rest of the code but this didn't fix anything.
I then tried replacing the member variable field with a pointer, and in the constructor instantiating a new vector and deleting it in the destructor. Still no luck.
So I made a simple test case program that simply made a class with a vector field, and a method to return a reference to it. Then in main I would create an instance variable and getting the vector and printing the size. This worked both in VC++ and as a standalone - both returned zero.
This is driving me nuts and I can't figure out why I'm getting different behaviour. Why is the standalone running differently, and what should I be looking at to fix this?
Thanks
Okay so it was literally a bug in my code that was very well hidden. I was dynamically casting to a wrong type.
Somehow it slipped past when I was running on Windows and OSX in both Debug and Release, and as a standalone on OSX. Good thing I found it.

OpenLaszlo 5.0.x - HTML5 compile issues

I know this has got to be something stupid as it use to work...
We have an app that works great in V4.2.0.4... some time ago (year or so) we started playing in the nightly builds and seeing how well our apps work under the HTML5 runtime. After much playing around an a few coding changes, we got there. Still some differences we're trying to work through, but all in all we got it working. The nightly build I was using was from the last one in 2011.
So with all the improvements that have come through, we thought we'd try the newest and see if some of the things we were trying to work around have been fixed. After upgrading, it's looking good until we create the solo version. Once we create the solo when we compile it, we get tons of redefining errors and the solo version also doesn't load at all, I'm guessing the redefining errors are causing problems.
Thinking since it's the new nightly build thats the issue, I go back to the previous version that we had that was working for us. But the issue continues to happen... I don't know how it's possible when our specific code didn't change.
If we make a coding change, even adding a space somewhere, it will compile without the redefining errors again until we create the solo, then they are back.
I'm at a complete loss. We didn't make code changes on our end so if nothing else the version we were using for the past year should still at least preform as before? What am I missing or being dumb about? Any ideas?
Sorry can't really do any code snippit as it's on a whole application type thing.
Here are a few of the errors.. all point to LFCdhtml-debug.js (line 698)
ERROR:
Redefining $lzc$class__mvd from () to () (an empty string)
LFCdhtml-debug.js (line 698)
ERROR:
Redefining $lzc$class__mve from () to () (an empty string)
LFCdhtml-debug.js (line 698)
ERROR:
Redefining $lzc$class__mw8 from () to () (an empty string)
LFCdhtml-debug.js (line 698)
ERROR:
Redefining $lzc$class__mw9 from () to () (an empty string)
LFCdhtml-debug.js (line 698)
I use the developer console to create the solo. Is the command line tool better? Haven't had a chance to use it.
I will try the lzt=clearcache and see if it helps.
Thanks for the help so far!

Resources