silent

Can an iOS app switch the device to silent mode?

半腔热情 提交于 2019-11-28 02:04:18
Is there a way to programmatically set the device my app is running on to silent mode? The silence must encompass the entire device, not just my application. No. As it's a physical hardware switch, there's no software method for muting the entire device. No reason to fight the framework, just let the user mute the device if he/she pleases. 来源: https://stackoverflow.com/questions/7828958/can-an-ios-app-switch-the-device-to-silent-mode

Install iOS app directly from website - no password, no iTunes, no UDID

不想你离开。 提交于 2019-11-27 19:51:24
I just installed an app from a website - with no profile, no UDID, no anything. It just started installing. How is this possible? I am not jailbroken, not running the new beta 6. When it finished installing I tapped on it and it asked me if I was sure I wanted to run this app. Link to app that installs 'silently' joern They seem to have an Enterprise Developer Account that allows over the air distribution to any iPad without the need to add each device's UDID. The process to provide such an app is similar to providing an AdHoc Distribution with your "normal" Developer Account. You build your

Printing a Report Server-Side and Silently

牧云@^-^@ 提交于 2019-11-27 18:43:57
问题 I am trying to write a program that allows me to print a ssrs report(.rdl file) from the server-side code to a predetermined printer without any pop ups asking me which printer I want to use can this be done? 回答1: EDIT Also pasted the code for the ReportViewerDisposer implementation I'm using. Together with the class ReportViewerDisposer found here I'm using the following code, which is part of a larger project, but you should be able to adapt it easily: private string m_printerName; private

How to Play a sound using AVAudioPlayer when in Silent Mode in iPhone

戏子无情 提交于 2019-11-27 12:10:32
I want to play a sound even in silent mode in iPhone. Can it be done by using AVAudioPlayer (Without using AVAudioSession) (For ios 3.0+) Thanks in advance. Actually, you can do this. It is controlled via the Audio Session and has nothing to do with AVAudioPlayer itself. Why don't you want to use AudioSession? They play nice together... In your app, you should initialize the Audio Session, and then you can also tell indicate what kind of audio you intend to play. If you're a music player, then it sort of makes sense that the user would want to hear the audio even with the ring/silent switch

Silence Android Phone in Java

无人久伴 提交于 2019-11-27 11:24:02
问题 How can I silence the android phone in java? A code sample is VERY helpful. 回答1: You can use the AudioManager class. In this class you're looking for setRingerMode() function. AudioManager audiomanage = (AudioManager)getSystemService(Context.AUDIO_SERVICE); audiomanage.setRingerMode(AudioManager.RINGER_MODE_SILENT); The values you can pass into the function are: The ringer mode, one of RINGER_MODE_NORMAL , RINGER_MODE_SILENT , or RINGER_MODE_VIBRATE . You have to add this into the manifest

Why does $.getJSON silently fail?

醉酒当歌 提交于 2019-11-27 11:12:55
It seems very inconvenient that jQuery's $.getJSON silently fails when the data returned is not valid JSON. Why was this implemented with silent failure? What is the easiest way to perform getJSON with better failure behavior (e.g. throw an exception, console.log() , or whatever)? Mr Shoubs you can use function name() { $.getJSON("", function(d) { alert("success"); }).done(function(d) { alert("done"); }).fail(function(d) { alert("error"); }).always(function(d) { alert("complete"); }); } If you want to see the cause of the error, use the full version function name() { $.getJSON("", function(d)

Is there a quiet version of subprocess.call?

自作多情 提交于 2019-11-27 09:11:00
Is there a variant of subprocess.call that can run the command without printing to standard out, or a way to block out it's standard out messages? Matt Joiner Yes. Redirect its stdout to /dev/null . process = subprocess.call(["my", "command"], stdout=open(os.devnull, 'wb')) Often that kind of chatter is on stderr, so you may want to silence that too. Here's my example: from subprocess import call, DEVNULL return_code = call(args, stderr=DEVNULL, stdout=DEVNULL) Note: subprocess.DEVNULL is available since Python 3.3. If you are still on Python 2: import os with open(os.devnull, 'w') as shutup:

Silent printing of a PDF in Python

╄→尐↘猪︶ㄣ 提交于 2019-11-27 07:53:43
I'm trying to print a PDF with Python, without opening the PDF viewer application (Adobe, Foxit etc.). I need also to know when printing has finished (to delete the file). Here I found this implementation : import win32ui, dde, os.path, time from win32api import FindExecutable from os import spawnl, P_NOWAIT ... pd = "C:\\temp\\test.pdf" pdbits = os.path.split(pd) readerexe = FindExecutable(pdbits[1],pdbits[0]) spawnl(P_NOWAIT,readerexe[1],"DUMMY") #I added "DUMMY" to avoid a weird error time.sleep(2) s = dde.CreateServer() s.Create('') c = dde.CreateConversation(s) c.ConnectTo('acroview',

Cygwin - run script silenty from “run command”

你说的曾经没有我的故事 提交于 2019-11-27 06:58:12
I have script lets say: C:\foo.bsh I want to be able to run this command via the windows run command: Start -> Run Windows Key + R and type something small like 'foo' and hitting return. However, I do not want a cmd prompt to be visible. This script does some preprocessing for an IDE. I do not want the cmd prompt to be open for the lifetime of the IDE process. I have tried: 1) Creating a bat file with the following contents: c:\cygwin\bin\bash --login "C:\foo.bsh" (this fails because it keeps a cmd open) 2) Converting the above bat file to an exe using bat_2_exe_converter (does not make the

How can the terminal output of executables run by Python functions be silenced in a general way?

前提是你 提交于 2019-11-27 05:31:59
I want to suppress all of the terminal output produced by a function that runs executables. I have attempted to suppress the output of a Python function by using a context manager that temporarily redefines stdout and stderr each time the function is called. This suppresses terminal output produced by print calls in the function, but it doesn't seem to work when the function calls executables that produce terminal output. So, how could the output of executables called by Python functions be suppressed? My code is below. I have included an example function that calls ls to try to illustrate the