Ridiculous Question, but can I have SAS return the computer's volume level? [closed] - operating-system

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
To aid in the ability to multitask, I added a datastep that would play the first three notes of hot cross buns after my program would finish, so I could just minimize SAS and do something else while it runs.
The thing is, I've had a few complaints from colleagues that they would forget that their volume was up all the way, and would receive a not-so-pleasant surprise when their program would complete.
Is there a way to pull in system info, more specifically, the computer volume level, so I can set a threshold in which the music will play or not?

It can be done but is not easy or elegant - especially if you want to distribute the code. If you wanted to do it programmatically you would have to make a call to the relevant windows API DLL from SAS:
http://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#overdll.htm
As the article says it's not easy (and not guaranteed to work). The DLL you would be interested in is the one below:
Changing master volume level
A kludge solution would be to find a 3rd party program that takes command line calls to change the volume:
http://www.google.com/search?hl=en&client=firefox-a&hs=Tql&rls=org.mozilla%3Aen-US%3Aofficial&q=windows+change+volume+command+line&aq=f&aqi=&aql=&oq=
You could then call that using the 'x' comamnd in SAS. The issue here would be that you would need to install the 3rd party app on every machine that used your volume code.
Cheers
Rob

I think the short answer is the the SAS SOUND function has two parameters: pitch and duration. Since volume is not a parameter, you can't control the volume without making a call to the OS.

Related

What are the steps to upgrade old MATLAB code files? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm currently using MatLab 6.5 (it's a 2004 version), because the custom code files I need aren't compatible with newer versions.
I'm wondering what are the necessary steps to update those files.
Thanks very much to everyone reading!
Ideally, those files have associated unit tests, so you could have an indication on whether each of them runs correctly or not. Probably not your case.
If you can, try having both Matlab versions on your machine, then have a copy of the file sets to modify and another copy just to inspect and run in the old version for reference.
If changes are expected to be made on a per file basis, then start by opening each file and checking warnings. As good practice, never leave warning in .m files, and suppress those that you'll be accepting nominally. I.e. put %#ok<NASGU> or other warning code but not simply %#ok. Most upgrade related issues are indicated by warnings. You can check the current folder for such problems with mlintrpt (see here)
Then, there is a compatibility tool codeCompatibilityReport, simply typing this will explore folders in your current workspace, and you might just use that if you expect changes in general to be minor or not to be needed for every file.
Now, for simple files, these should be everything you need, I"d expect that after some debugging and relearning, you'd have a much smoother experience with a recent version of Matlab than with a 10+ years old version. For shorter-term updates, I would recommend to avoid switching versions mid-project.

Adding google drive integration for user signup [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I was wanting to start creating an app for users to store files into their drive acc.
I was looking at Google's API here GoogleAPIClientForREST.podspec
I have created a pod file etc. However can someone tell me if I need the whole API file or just certain parts?
Also I see that this is GSuite related (as in I found it through here:
G Suite APIs for iOS), though this was the only way to access the API.
Do I have to pay for the API access?
Like paying for GSuite?
Its best to not pick apart the file until you actually know what its doing. A lot of these libraries are interwoven. That being said. The APIs themselves are normally standalone. So if you are not going to be using all of the apis you should be able to remove them.
These for example
s.subspec 'Books' do |sp|
sp.dependency 'GoogleAPIClientForREST/Core'
sp.source_files = 'Source/GeneratedServices/Books/*.{h,m}'
end
s.subspec 'Calendar' do |sp|
sp.dependency 'GoogleAPIClientForREST/Core'
sp.source_files = 'Source/GeneratedServices/Calendar/*.{h,m}'
end
I have personally never tried to remove them. I suggest you start with one or two and work your way down.
No you don't need to pay to access google drive api. The code for Gsuite should be the same unless you are looking at something that has domain wide delegation set up.

Do libraries exist for building operating systems? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
So I'm curious about this. I assume the building of operating systems is a monumental task, especially with all the back end stuff that an os involves. I was curious if I wanted to rework the front end of an operating system, but take advantage of existing architecture/backend, what would be the best resources to use? Also, can you guys point to any examples of well designed front ends of operating systems that aren't really mainstream? It seems like everyone uses pretty large well known OS.
Yes, you can. But like you said, it's a huge, huge task. I am not sure of windows or mac, but in Linux you have options to do so. You can download a Kernel from https://www.kernel.org/ and write applications around it.
If your goal is to make applications around the kernel, then look at linux application development resources. Check out linux desktop environments https://en.wikipedia.org/wiki/Desktop_environment#History_and_common_use to see which one is good.

What are the benefits of using a tool like Chef vs. using a makefile/shell script for deployment? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have heard good things about Chef, was curious about all of the benefits before I devote time to learning a new tool. Not looking to turn this into opinion thread, looking for a list of additional features it has over makefile/shell script.
Chef, and Ansible/Puppet/Salt too (collectively called CAPS), are all based on the structure of "describe the desired state of the system and the tool will make it happen".
A script or Makefile is generally a procedural system, run this, then run that, etc. That means you need to keep a mental model of system from each step to the next, and if that ever deviates from the real system (ex, a directory you are trying to set the owner of doesn't exist) your script usually breaks.
With some stuff this is easy, like yum/apt-get install as they are internally idempotent, you can run them every time and if the package is already installed, it just does nothing.
CAPS systems take that principle (idempotence) and apply it to all management tasks. This has for the most part resulted in less brittle configuration management as you only need to tell the tool what the end result should look like and it will take care of figuring out the delta from the current state.

How can i send fax using perl script? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to send FAX using perl script.
How can I do it?
Is their any way send fax using perl script if any idea please tell me.
Thanks in advance
This older (6 yrs) thread on Perlmonks still seems like a good response to this question, in my opinion.
http://www.perlmonks.org/?node_id=782340
Basically, if you have a fax server that has some more or less straightforward method of communicating with it programmatically (like HylaFax) then you can use Perl to interact with it in a familiar way.
If that is not the case then your best answer is to seek out an external program and perhaps automate that, if possible. The "external program" is what you need in order to take care of the many fiddly issues involved with dialing the number, negotiating with the receiver, and so on.
One example of an external program to send faxes is OpenOffice
http://www.linuxjournal.com/content/faxing-openofficeorg
Finally, there is fax4j in Java which you could try and use with Inline::Java, which is kind of cheating in the sense that it is just barely a Perl solution.
http://sourceforge.net/projects/fax4j/
http://search.cpan.org/dist/Inline-Java/Java.pod
If any of this matches something that you can try out in your environment go ahead and then post back in more detail if you run into trouble implementing.