How to force file processing on one node without splitting? - azure

Is it possible to force file processing on one node without splitting? I tried to use AtomicFileProcessing set on true, but it doesn't work.

Setting
[SqlUserDefinedExtractor(AtomicFileProcessing = true)]
should work. Can you please contact me directly (mrys at msft) and provide more information on what does not, so we can investigate?

In one of my job, I am using custom user defined operators for data processing, and it does not split data. You can also try this option.

Related

Webdriver IO How to store Excel file in cache and call from cache on Node JS

I have an excel file that I want to only call in once and make available to all of my tests, at the moment it's being called on each test, I have tried storing it in the cache using https://www.npmjs.com/package/node-cache but when I tried to get it from cache it's saying undefined, so then I tried using onPrepare hook with no luck. Can someone point me in the right direction thanks in advance.
Assuming that excel has data for test automation and it does not include any writing operations, I would suggest reading the content and store it in a constant. If you declare that variable globally, it will be available to all your tests. The complexity of this READ function depends on how diverse is your data. You can use libraries like https://www.npmjs.com/package/xlsx, https://www.npmjs.com/package/exceljs, etc..,

Do I need to sanitize user input before inserting in MongoDB (MongoDB+Node js combo)

I'm using MongoDB with NodeJS and am wondering if I need to sanitize data before inserting/updating database documents. Its hard to find definite answer and I'm wondering if there are any Node modules that do it nicely or I need to strip all occurences of $ in strings or simply no need to worry about this. I know that PHP has holes but I'm using Node/Mongo (native driver) combo but still not sure if I need to do any cleaning of user input.
If you store your data as String and you are not parsing it to execute Mongo command, then there is nothing much to worry about it.
Nice article on security
http://cr.yp.to/qmail/guarantee.html
The only problem occurs when you are retrieving the user input, and you parse that input to execute the Mongo command, here you will need to take care to sanitize the input, or else you will get attack.
There is a npm package to do that for you
https://www.npmjs.com/package/mongo-sanitize
and nice article on this too
https://thecodebarbarian.wordpress.com/2014/09/04/defending-against-query-selector-injection-attacks/
Yes, you do.
For more information check this out; https://www.npmjs.com/package/content-filter
Also native escape() method might be used for to protect the database.
Run the code snippet below to see the results.
let a = "{$gt:25}"
console.log(a)
console.log(escape(a))

How to specify a run timeout with VSTest.Console?

With MSTest.exe, you can specify a total timeout for a test run by setting the /TestSettings/Execution/Timeouts/#runTimeout attribute in a .testsettings file.
With VSTest.Console.exe, the .testsettings has been deprecated in favor of .runsettings, which apparently has a completely different schema (with, ahem, sparse documentation). I know that I can configure the .runsettings file to use legacy MSTest mode (thereby allowing me to use a .testsettings file), but I would prefer to avoid that if possible.
Is there a way to set a run timeout in the .runsettings file? Or is there a different way to get the same effect?
Yes, there is. Please see RFC here: 0011-Test-Session-Timeout.md

Can I alter Python source code while executing?

What I mean by this is:
I have a program. The end user is currently using it. I submit a new piece of source code and expect it to run as if it were always there?
I can't find an answer that specifically answers the point.
I'd like to be able to say, "extend" or add new features (rather than fix something that's already there on the fly) to the program without requiring a termination of the program (eg. Restart or exit).
Yes, you can definitely do that in python.
Although, it opens a security hole, so be very careful.
You can easily do this by setting up a "loader" class that can collect the source code you want it to use and then call the exec builtin function, just pass some python source code in and it will be evaluated.
Check the package
http://opensourcehacker.com/2011/11/08/sauna-reload-the-most-awesomely-named-python-package-ever/ . It allows to overcome certain raw edges of plain exec. Also it may be worth to check Dynamically reload a class definition in Python

Matlab GUIDE GUI Handles change in values after using Load() function?

Inside a GUI that I have made using GUIDE in Matlab. I run into a problem where upon using the Load() function to load a .MAT file all my handles change values. This means that if I had a button that I wanted to use on my GUI. My program will believe its handle is for example
handles.button1 =190.082
when in reality the only way I can access that button any more is through a different handle that is unknown. So if its unknown lets see what its new handle must be.
findobj('Tag','button1') = 227.0093
As you can see these numbers are completely different. Why the handles values get changed is beyond me. Since the handles change I can no longer use the set() function as I have written in previous sections of code. For example I have to change
set(handles.button1, 'Enable', 'off');
to
set(findobj('Tag','button1'),'Enable','off');
Does anyone have an explanation as to why this problem occurs when using Load()?
Is there a feasible solution instead of having to find the handle for an object every time you want to use it?
The .MAT file conveniently also had a handles variable in it which overwrote my current handles.

Resources