Need help in configuring correct paths for DOH - dojo

I'm trying to get DOH testing working for my company's upcoming platform, but I can't figure out the right combination of paths. Our file structure looks like this:
/dojo15
/release
/dojo
/dojo
dojo.js
dojoExt.js
/dojo
dojo.js
/util
/doh
/js
mainLib.js
/tests
base.js
This was created by our contractors, so unfortunately there are some things I have to figure out as I'm going along.
The "release" directory is what is used on our pages.
The "util" directory doesn't exist in our release directory. (I'd like to avoid having to make a copy of it there.)
I'm not entirely sure what they did with dojoExt.js there, but it seems to be required. I was able to make a simple "hello world" sort of test, but once I did dojo.require(js.mainLib), I got an error that dojo.behavior.add is not a method. So it seems to be they made a stripped-down dojo.js and put other required code in dojoExt.js.
My guess is that DOH is using the dojo in dojo15/dojo, but I need to include dojo15/release/dojo/dojo/dojoExt.js. I've tried every combination of dojoUrl, testModule, registerModulePath I can think of...also saw "boot" and "path" from other SE questions, even though I can't see in runner.html where they would even be used, but I tried throwing them in to see if they'd magically help anyway.
At the moment I don't really have the option to move code around, so I'm hoping to work this out with files where they currently are.

Did you try the bits I suggested over at a related question? We use the bits I detailed there to pull together a completely custom layout of dojo + util. Take a look at both boot and dojoUrl. I think it's runner.js that does most of the cunning stuff, rather than runner.html.
Is the problem that you can't arrange for dojoExt.js to get loaded? How does your other code arrange for it to get loaded? Is tests/base.js your test module?

Related

Is it possbile to not to show source code in vue?

I wonder if it is possible to disable webpack folder in inspect, so users cant see my source code?
And if it's not possible, can users change it and run it?
Most commonly such a structured view is available only in development environment.
When the code is shipped to production environment it's normally minimized & bundled into one or several files which already makes it quite hard to read.
If you want to "hide" it from the user even further, you can use code obfuscation tools (you will likely need to pay for them) or move sensitive parts of your code to serverland.
Generally speaking, the only bulletproof way to hide the code from your users is never ship it to their browsers.
Whether the code is obfuscated or not, the user is alway able to change it & run. Obfuscation just makes it significantly more difficult.
There is a solution, you can try this in the "vue.config.js"
module.exports = {
productionSourceMap: true,
}
This option will tell Webpack to exclude the source code. Could be a solution for you.
Cheers
having the same issue here.
The Original Source files are NOT even close to the Server its running on and i tried multiple, independent Pcs now and everytime it showns me the full original source code in the Source list in chrome.
I dont really mind "showing" the source code but what annoys me is that this way people can literally steal the source and built the exact software on their own and it exposed stuff about my pc like directory of stuff, my full name (due to windows username), etc.

Can I include scripts and styles into Smidge bundler by wild card?

And if so, how? :) I tried doing simply for example
"~/scripts/src/*.js"
but no luck. It would save me quite a lot of work if I could do that, or even
"~/scripts/src/**/*.js"
You can but it doesn't currently support the correct/nice globbing patterns that you describe. For example, you can include a folder with a filter with this syntax: #{ Smidge.RequiresJs("~/Js/Stuff*js"); } ... so include the Stuff folder for *.js files (see https://github.com/Shazwazza/Smidge/wiki/declarations#view-based-declarations)
This is the task that needs to be completed to make this work nicely https://github.com/Shazwazza/Smidge/issues/47 Hopefully i can find some time to get that done soon.

404 When Trying to implement Utils in Power BI Custom Visual

I've run into this problem several times when trying to import external libraries to run with a Power BI custom visual, and I'm not really sure what I'm doing wrong. This current attempt is recreating the Card Visual in the latest API, and it's been a painstaking effort that hopefully someone else can help me out with. I can't point at any one reason why this is happening though it appears to be caused by using statements like:
import valueFormatter = powerbi.extensibility.utils.formatting.valueFormatter;
and I get error, in the browser:
Unable to get property 'valueFormatter' of undefined or null reference
visualSandboxMinimal.html (626,17)
when I tried removing these things I instead run into the error:
HTTP404: NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier).
(XHR)GET - https://app.powerbi.com/13.0.3328.205/visual.js.map;
I can't really resolve either of these errors, to make the project work. The project will build fine and display in the application, but not show any information. Something isn't setup with the API or the project where it just doesn't put the pieces together properly or something. I really don't know and there's so little information out there about this thing, that it's kind of like shouting in the dark at this point.
I am including the whole source project, hopefully so that anyone who can help will be able to, and if anyone wants to take my effort and build their own "Card" like Power BI visual: https://www.dropbox.com/s/9ks8u0v56eph8ul/cardWithConditionalFormatting.zip?dl=0 . This is based on the source available at https://github.com/Microsoft/PowerBI-visuals-core, specifically related to the Card visual.
If anyone figures this out, it would be a huge help to me, though I will continue to do my own research and if I find anything about it I will update the information here.
I figured out what was happening here, I had included the index.d.ts files in the tsconfig.json file, but forgot to include the index.js files in the pbiviz.json file and in some cases forgot to include the css files in the .less file.

Embedding .exe's into a VB.net application

So here's whats up,
I am a Bench Technician for an IT company. I find myself repeating the same task over and over when preforming system reloads. I want to write an application where I have all the programs for a reload in one spot, and call them by a button click event. I have tried adding them into the Resources and calling them by Environment.CurrentDirectory+"\Path" to no avail, I get " System cannot find the file specified. When the path is hard coded it works like a charm, but this will obviously not do as it needs to be able to move to any system. I am looking for a way to add the exe's I need and a generic way to call the path. I am not looking for handouts here, I have done my homework on this one and still not found a solution, If I could get someone to -point me in the right direction, it would be awesome.
Since what you have already tried is much saner and easier for the average user to work with than having the files embedded in another executable, I'll explain that method.
CurrentDirectory is where your executable is executed from, Like this:
C:\MyDir> MyOtherDir\MyProgram.exe
CurrentDirectory refers to C:\MyDir in this example.
What you need is the application directory; and according to top answer of this question the most reliable way to get that is using AppDomain.CurrentDomain.BaseDirectory
EDIT: Also consider using Path.DirectorySeparatorChar instead of \.

Accessing model attribute from css/less file with Rails 3

The project I'm working on requires me to adapt the size of the elements on screen according to per-user setting. We're using Twitter bootstrap, so my first idea was to toy with the #basefont value, and it seems to do the trick.
However, I don't know how to access the user setting from the .less file. I tried using erb with .less.erb, but it looks like I don't have access to any code in my application.
Is there a way to get the value I'm looking for from the .less file, or - even better - a proper way to do this ?
Thanks for your time.
EDIT
Since I need to get the value at runtime, the way I tried won't work anyway, though I'm still interested on an answer. The only way I see to do what I want is to add a class according to the user setting. Again, I'd be glad to have alternatives.
I opted for css3 transform (and vendors implementation) property. It does the job, but seems to hit the GPU quite a lot. So still open to other answers. :)