Power BI Microsoft custom visual locked repo? - r

This is the link I will be referring to
I'm working with a Microsoft visual on Github. I have found a weird problem. No changes I make to the capabilities.JSON file will apply. I haven't even gotten the script to change. I went in and replaced all instances of the X axis variable with the Y, and vice-versa within the script.r file. Didn't work.
I have deleted the package-lock file, that didn't work. I even opened every single file in this visual folder, searched for the old variables for capabilities, and found nothing.
I went one step further and packaged the file to visualname.pbiviz, converted it to zip, opened the compressed file in a text editor, and still could not find anything that would revert it to the previous names.
The X axis is by default "X axis". I have changed it to be "Duration" in the capabilities.json file, but it will not stick.
If anyone has any insight as to what may be going on, or what Microsoft has done to prevent this visual from being modified, please inform me. I'm especially confused, because Microsoft has labeled this as an open source visual, yet changes are restricted. I'm new to creating/modifying visuals, so perhaps there is something I am just missing. Short of going in and deleting files at random, I'm out of ideas.

I found a way to get this working. I found a bunch of http imports and things like that. What I am assuming was happening is it would ping whatever online repo it was told to, and re-import the files from there before compressing to .pbiviz instead of actually using the files in the visual folder... I copied the two main files I needed (capabilities.json, and script.r) and pasted them into a blank template visual. Everything is working fine and I can continue working on this like normal.
This is based on the assumption that files were being re-imported from an external source before being compressed. If anyone knows for certain what is going on here, feel free to leave an answer.

Related

How can/should I set my path.expand in RStudio per project?

My goal is to have path.expand to be automatically modified as I open a project, so that I don't have to keep writing fread(paste0(getwd(),"foo.csv") every time I load a new file, replacing it instead with fread("~.foo.csv")
I've found this question: address project root in Rstudio
Which seems to suggest that there is a .R_USER file per project in Rstudio. I have successfully been running an R studio project in a folder, and have 'unhidden' the the .Rproj_user folder, however, I am now at a loss to edit it. I'm seeing a tonne of different folders and don't really understand what I can edit, or how.
Is this the right path to expand upon? (jks), or is there a simpler and different way to do this? Is this even sensible? It seems like it is to me, but I'm new to all this, so please do say if this is stupid (and why).

Automatically log changes to system files and allow revert

I'm trying to learn about the guts of Unix right now, mostly through experimentation. When I was first starting, I found myself looking through forum posts, copying and pasting bash code. When I broke something, I often had to do a fresh install because I couldn't remember what exactly I had changed where. Now, the simple solution is to record a log of all the system files I've changed and keep original copies of all the default files so I can revert if necessary. It would be great if there was a cl tool which did this for me automatically. It would be even greater if I could step back through changes. Basically, I'm looking to version control my entire OS.
Does anything like this exist? I would also accept alternative strategies for spelunking through Unix without causing permanent damage if you think I'm going about this wrong.
Using debian if it matters.

RStudio R File Corruption

I had a R script open in RStudio. The file was saved many times over the course of several weeks and worked perfectly fine when RStudio was opened and closed. However, today, I restarted my computer and when I opened RStudio and more specifically the script that I mentioned, all of the R code vanished, leaving a single long row of "....." with red highlighting.
When I tried to open the R file in other text processors such as Sublime Text and Notepad++, only a line of zeroes was visible. None of my other R files were affected. I'm currently running Windows 8.1 and have the latest version of R and RStudio. What can I do to recover the code in the file and prevent something like this from happening again?
It might be an old thread and it might have been covered in 'user4458796' answer in suggestion #1 ("Use the history..."), but:
My friend had the same problem and we managed to recover the code from a 'history_database' files located on Windows at:
'C:\Users\%user%\AppData\Local\RStudio-Desktop\'
I assume there is an equivalent location in Linux in general.
Hopefully I won't get downvoted, just sharing my 2cents.
Ben.
It's not clear what happened to corrupt your file (and thus how to fix it if possible) and it is kind of ominous that you're just seeing 0's in other text editors, but I'll give you my best suggestion and some tips.
Suggestions for Attempting Recovery
Since your other R files were unaffected, you should have a messy record of your code in the history. Use the history to reconstruct your code.
Access a copy of your file from any version control, cloud, or offline backup you may have used -- git, SVN, iCloud, SugarSync, Dropbox, etc (I realize you probably wouldn't have posted this question if that were an option, but I had to throw it out there).
Use a Hex or sector editor to try to recover the data.
Use a data recover program to find an old version of your file.
Inspect your trash or recycling bin to see if it has an old version. Depending on your OS and the settings of how you (insecurely or securely) delete files, then you may be able to undelete a deleted version, even if it's not immediately available.
Try different methods of recovering text data from corrupted text files like OpenOffice's and Microsoft's suggestions.
Tips for the Future
I know that hindsight is 20/20, but a few quick tips for good measure:
Use version control. Git is supported in RStudio's GUI interface.
Have more than one version of your file. Many professors and professionals recommend writing/storing code in a text editor and using your IDE only for the working copy.
Make backups. Distinct from #2, you should backup your files to a hard drive, flash drive, or cloud service like Dropbox or Spideroak.

The breakpoint will not be hit

This has got to be the most frustrating thing I've ever seen. I'm working with an asp.net web site (something I don't do often), and every once in a while, my breakpoints stop working.
About half of the time, it's because it doesn't load symbols. The other half, the source code is different from original. Deleting the solution file and re-saving the application usually fixes it, but I'm getting tired of doing that all of the time.
I've tried pretty much every solution the web has to offer, but no luck so far. Don't hold back from giving any suggestions you may have, though.
Any ideas?
The information's about the break points (among other information's) are saved on the same directory with the solution file, in a hidden file ending in .suo extension.
Close the solution, find this hidden file ending in .suo, backup it, and then delete it from there, and then maybe you solve your problems.
This is the first that I do when I have issues with break points, and works for me.
1- Check that do you have full access the folder below
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
2- If Yes close VisualStudio and delete all folders included. Clean and rebuid your project.
3- If No You need to get full access and try to delete
A rebuild usually fixes this for me (not a build, but build -> rebuild solution). This does a full build of everything in the solution. You could also try to do a clean and build.

<myapp>.app.dsym file gets deleted when I build my project

I am building my first iPhone app. I am using XCode 3.2.6. Everything was ticking along fine when all of a sudden, I get this strange build error. The message is shown below:
GenerateDSYMFile build/Debug-iphonesimulator/buddy.app.dSYM build/Debug-iphonesimulator/buddy.app/buddy
!error: unable to open executable"
From what I have managed to figure out, there is a file called buddy.app.dSYM that resides in my /build directory. If I clean my project, then build, it appears and everything is fine. However, if I build a second time, I get the error. If I build a third time, the error is gone, 4th time, I get the error again. And so on.
The error is consistent with the presence (or lack of) my buddy.app.dSYM in my build directory. ie, it is created, deleted, created, etc ...
So it seems like something is deleting the buddy.app.dSYM file every other build.
I recently started working with SQLite in my project. Other than that I can think of no major changes I have made to my project.
Any ideas?
Update
I can't put this as an answer because I am new to the system and not allowed. But .....
A: I think I figured it out. I struggle all day and then 5 mins after I post I get the answer. Figures. Anyway, it was to do with the SQLite database I had included in my project under the Resources tab. I had included it, but then deleted the .sql file. I recreated the file, but with a different name.
So I removed the file from my project and reimported the new .sql file. And no problems since.
I have no idea why this created such a funny error. If anyone knows, please post.

Resources