w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to Play system beep sound programatically in iPhone?Is it possible to play system sound without adding it to bundle resources
Try this AudioServicesPlaySystemSound(1103); to vibrate AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); For list of sounds http://iphonedevwiki.net/index.php/AudioServices

Categories : Objective C

Windows Phone: How to get list of installed applications & install/remove applications remotely
AirWatch is a software for entreprise deployment. It's simply built upon Windows Phone's company hub. http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206943(v=vs.105).aspx

Categories : C#

System.Windows.Controls.WebBrowser, System.Windows.Threading.Dispatcher, and a windows service
Maybe the Webbrowser Control needs Desktop Interaction for rendering the content: My feeling say that using WPF controls and in particular particulary the Webbrowser-Control (=Wrapper around the IE ActiveX control) isn't the best idea.. There are other rendering engines that might be better suited for this task: Use chrome as browser in C#?

Categories : Wpf

A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in System.Windows.ni.dll
Have you tried it without the async? Also, the example in the documentation uses EventArgs rather than RoutedEventArgs, but I'm not sure that should cause the exception you're seeing.

Categories : C#

Difference in buildable C# applications on Windows 8 vs. Windows Server 2012?
Does this mean there are Windows applications that can't be built on any release of a Windows Server OS? Yes. You can't build Windows Store apps on Windows Server operating systems, due to licensing restrictions. Can someone describe what kinds of programs can be built on Windows 8 and not Windows Server 2012, or vice-versa? Windows Store applications can't be built on Server 2012. Anything can be developed on Windows 8. You can install a virtual machine for Windows 8 on a Windows Server 2012 machine, and develop within the VM, however. This is effectively developing on Windows 8.

Categories : C#

Do I need to create separate applications for windows phone 8 and windows 8 desktop?
You will not be able to create a single assembly which can run on Windows Phone 8 and Windows 8. You may be able to create libraries which you can reference in both projects or share code in other ways. You will need to create separate UI for each platform. (Even if they end up looking the same-although that would probably not be a good idea.) Each platform has different conventions and ways users will expect apps to behave. You should respect these to avoid confusing users. You can use SQLite on both Windows Phone 8 and Windows 8.

Categories : C#

'System.Windows.Markup.XamlParseException' occurred in System.Windows.ni.dll
Here is a working proof: File --> New Project --> New Databound Application (wp8) and here is the code: <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <ListBox x:Name="ContactResultsData" Tap="ContactResults_Tap_1" ItemsSource="{Binding Items}" Height="600" Loaded="ContactResultsData_Loaded_1" Margin="10,0"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal" Margin="0, 20, 0, 0"> <Border BorderThickness="2" HorizontalAlignment="Left" VerticalAlignment="Center" BorderBrush="{StaticResource PhoneAccentBrush}" Margin="5, 0, 0, 0"> <Image Width="48" Height="4

Categories : C#

execute user inputed Windows (or bash) commands from batch (or bash) file?
Do you need a full bash prompt? Or would something like this be enough? #!/bin/bash echo -n "Enter cmd: " read COMMAND echo ${COMMAND} | bash Also, in a script, you can just execute bash and get a full prompt in the current environment.

Categories : Bash

How to get installed applications in Android and no system apps?
final PackageManager pm = getPackageManager(); List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA); Using PackageInfo: private boolean isSystemPackage(PackageInfo packageInfo) { return ((packageInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0); } Using ResolveInfo: private boolean isSystemPackage(ResolveInfo resolveInfo) { return ((resolveInfo.activityInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0); } Using ApplicationInfo: private boolean isSystemPackage(ApplicationInfo applicationInfo) { return ((applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0); } This filters the system package. See this question. Credits: Nelson Ramirez and Kenneth Evans.

Categories : Android

System.IO.File.Exists() different answer from x86 and x64 applications
Thank you for all of the comments. I tried a number of them and found that I could not reproduce the problem for any file other than the one I pointed to with my original code. Over the last couple days, I began to see my hard drive fail on me. After getting a new hard drive, setting it all up again, and running the aforementioned program, I no longer see this issue. I can't be 100% sure about this, but I'm going to assume that the file I was trying to open was corrupted by a failing hard drive. I apologize for the wild goose chase.

Categories : C#

Returning a set of installed applications without system apps
Check out the comment from @Wand Maker for this question: How to get installed applications in Android and no system apps? I think you need to use PackageManager to find out all the apps that support intent-filter with action "android.intent.action.MAIN" and category "android.intent.category.LAUNCHER" – Wand Maker Jul 6 at 15:23 You can do this by using PackageManager.queryIntentActivities (http://developer.android.com/reference/android/content/pm/PackageManager.html#queryIntentActivities(android.content.Intent, int)) E.g. Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_LAUNCHER); List<ResolveInfo> activities = getPackageManager().queryIntentActivities(intent, 0);

Categories : Java

Windows Forms: "System.ArgumentException: Parameter is not valid." coming from System stack
Reason: The common reason for this error is that you are passing invalid value as parameter to your function. My assumption is that you are calling your method something like this ApplyCellStyleToEditingControl(getStyleFromSomeWhere); Now in the above example getStyleFromSomeWhere is invalid thus throwing the exception Solution: The best solution here is that when ever you get this exception (and you get email) you send the parameter to yourself as well. This way you can diagnose what are the values of parameter when the exception occurred and diagnose the root cause.

Categories : C#

System.Reflection.TargetParameterCountException' occurred in System.Windows.Forms.dll
I guess The C++/CLI Invoke mistakes your array< String^ >^ for the array< Object^ >^ it expects to hold a parameter list. You should try wrapping your array< String^ >^ inside an array< Object^ >^. array <String^ > ^COM_PORTS = this -> SerialPort ->GetPortNames(); array <Object^ > ^parameters = gcnew array <Object^ >(1); parameters[0] = COM_PORTS; this->Invoke (gcnew WriteCOMPortDelegate(this, &MainForm::WriteCOMPortPannel), parameters);

Categories : Visual C++

How to run16 bit applications on Windows 7
You can use a virtual machine like : https://www.virtualbox.org/, there is also VMware, Microsoft Virtual machine you install a virtual OS on it (windows 7 32bits, XP, I was running Win98 on it to play old Prince of Persia :p) and do you work normally ;-)

Categories : Assembly

How to know details of System.InvalidOperationException in System.Windows.Forms.dll?
Try doing the following: Add a breakpoint in the necessary location Right-click on the breakpoint and click "When hit.." Check the "Print a message" box, and use the tokens that they show to display the information that you want (e.g., calling funciton, stacktrace, thread ID/name, process ID/name, etc.) If you want the program to continue execution after printing the message (i.e. you do not want it to pause on the breakpoint), also check the "Continue Execution" box You will likely want to combine this technique with a try/catch, as has been suggested by others. I do not want to repeat code provided in others' answers, but I would use Brian's try/catch to wrap your calls, and then set the breakpoints using this technique. Note: You can also use this technique and the "breakpoint

Categories : C#

Deploy Windows applications in Qt Creator
I think that copying the required dlls (one per each module, used plugins and two for MinGW runtime or if you use Visual Studio install the runtime for the used VS version) is simple enough for students that learn how to code. And regarding NSIS (i assume that NISI is a typo - or at least i haven't heard of it) you can use a gui project for it, like this one (i used one once, but i don't remember if that was the one) anyway you can google for some and play and see what you like or... a little nsis scripting can't hurt your students that much ;)

Categories : Qt

Multithreading with Windows Store Applications
You need to use the well documented async pattern for your operations that happen on the UI thread. The link given by Paul-Jan in the comments is where you need to start. http://msdn.microsoft.com/en-us/library/windows/apps/hh994635.aspx

Categories : C#

Using Windows Form in Win32 applications
In a Win32 application, you can include a dialog resource that contains controls and layout information for a particular window. Visual Studio includes a graphical dialog resource editor, as do many other Win32 resource editing applications. This will be somewhat similar to what you're used to with the WinForms designer, albeit with a few limitations. Win32 is a much older technology than WinForms and wasn't really designed with RAD (rapid application development) principles in mind. When you create a new Win32 project based on the template in Visual Studio, you already get one dialog resource created for you: the About box. If you double-click on your "ProjectName.rc" file in the Solution Explorer, then expand the "Dialog" resources folder, you'll see it. Double-clicking on it will bring

Categories : Windows

Build applications for Windows phone 8 using VS 2010
Yes, you need windows 8. No, it won't work on Visual Studio 2010 - but that also doesn't mean that you need Visual Studio 2012 - you can use Visual Studio Express 2012 for Windows Phone Also keep in mind that the emulator for this uses Hyper-V, so you'll need a machine capable of running in hypervisor mode. Full system requirements are listed on the linked page (x64, win 8 pro, hyper-v, SLAT, etc)

Categories : C#

Multiple MVC 4 Web Applications in the same Windows 2008 R2 Server
Yes, you can deploy multiple instances of the app to the server. I would measure "safe" and "reliable" as aspects of the deployment process, not where the application is deployed to. I try to keep my production and non-production environments separate, just in case anything goes wrong in testing I know it won't impact production. this separation can be physical (different hardware) or logical (same hardware, different configuration). There are multiple factors to consider when deciding where to host production vs non-production. The main thing to consider is you don't want non-production environments competing for resources with the production application. some other factors to consider are: size the application # of users nature of the app (is the app critical to the success of the

Categories : Sql Server

Using Python to build Windows Phone 8 applications?
Yes, with limitations on threading, according to this post: Compiling Python for Windows Phone 8

Categories : Python

Writing applications for Windows Mobile 6.1 and 6.5? (in which IDE, what language)
I ended up using Visual Studio 2008 Pro and doing development in C# (because of graphical designer for windows forms). I also found another option (but it's more problematic to set up) using SharpDevelop(#Develop) IDE: http://www.codeproject.com/Articles/31861/Windows-Mobile-Development-Without-Visual-Studio

Categories : Python

Windows 8 Store applications as enterprise software
The link provided by takemyoxygen already gives a lot of technical details. I'd just like to add a couple of additional notes. Not all versions of Windows 8 have the sideloading license for installing Windows Store apps outside the store: With Windows 8 Enterprise machines joined to a domain you're ready to go. With Windows 8 Pro (domain joined or not) and Windows 8 Enterprise outside a domain you need to buy a special activation key (sold in batches of 100). With Windows 8 there's no way to get a sideloading license. With Windows RT (ARM) you need the activation key. The machine can't be joined to a domain. Once you have a sideloading license, you can install a Windows Store app package: You can manually run the installation script creted by Visual Studio along with the package. Y

Categories : C#

How do i debug C# windows form applications in production?
Try logging stacktrace a.s.o. in AppDomain.UnhandledException event handler. Furthermore it's possible to trace all function calls utilizing aspect oriented programming with PostSharp. There are examples on the PostSharp webpage.

Categories : C#

RAM usage limit for .NET applications on Windows Server 2012?
It's not a question of "why is the server swapping" so much as "why is my app eating so much RAM?" STRONG SUGGESTION: Download the Microsoft CLR profiler: http://www.microsoft.com/en-us/download/details.aspx?id=16273 http://msdn.microsoft.com/en-us/library/ff650691.aspx To your original question "Why does the server use swap even if it should have plenty of free RAM?" - there are many possible reasons. You'll need to have administrative access to the server to determine exactly what's going on. These links might help: http://serverfault.com/questions/305295/why-does-windows-2008-use-swap-before-the-memory-is-full http://blogs.technet.com/b/askperf/archive/2008/03/25/lock-pages-in-memory-do-you-really-need-it.aspx <= You need to consider not just your app, but other things runn

Categories : C#

Installing Windows applications/extensions with Amazon CloudFormation
For your example of WebDeploy, you could add this: "C:\Webdeploy\WebDeploy_amd64_en-US.msi" : { "source" : "http://download.microsoft.com/download/1/B/3/1B3F8377-CFE1-4B40-8402-AE1FC6A0A8C3/WebDeploy_amd64_en-US.msi" } as a element of this section of the template "WindowsServer": { "Type" : "AWS::EC2::Instance", "Metadata" : { "AWS::CloudFormation::Init" : { "config" : { "files" : { You could then add this command: "1-installwebdeploy" : { "command" : "msiexec.exe /i C:\Webdeploy\WebDeploy_amd64_en-US.msi ADDLOCAL=ALL /qn /norestart" } to the list of commands.

Categories : Amazon

What are the alternatives to Windows security subsystem in .NET winforms applications
Once I worked in a WinForm application which was supposed to run on intranet, each user would log into the application....and this application was using centralized web service to authentication and other CRUD operation....The service was mediator between WinForm app and DB. The approach given in code project article which u mentioned in question...is also fine. Anyway I also got curious here....As you said u are about to start development in .Net 4.0 Winform.....I would like to understand why you made this choice over WPF? What reasons u got to favor WinForm in your scenario ?

Categories : Sql Server

windows mobile application development Windows 7 Operating System
I dont understand the question. I had to do nothing special as I installed Visual Studio 2008 and then the Windows Mobile 6 SDK. I assume, you already connected the WM device to your Win7 station. So you should have WMDC already installed. Otherwise install Windows Mobile Device Center from the MS site. Secondly install VS2008 (not express version, it does not support WM development). Then download and install Windows Mobile 6 (professionell) SDK and install. That is all, nothing special. I did it without any hassle on my Win7/64 PC. Should be the same for Win7/32. If you need further assistance be more specific in your description.

Categories : Windows

How to make a windows phone application load faster like default applications?
Windows Phone 7 On Windows Phone 7 it's not possible to make a 3rd party app perform like the built-in apps such as People, Pictures, Calendar, Games, Music+Videos, etc. Those apps are mostly likely written in C++ and are natively compiled, have special permission to run in the background (so they resume instantly), and have full OS/hardware access. 3rd party apps (ie. the apps you and I can write) are compiled against the Silverlight platform which is not as performant as natively compiled C++ code, which is why even a simple app with no splash screen and a single TextBlock will take longer to load than, say, the built-in Games app (and not feature the proper entrance animation). So, all you can do is try and make your app startup as fast as possible, given the circumstances. There ar

Categories : C#

Create Windows installer on non-Windows system
Have you tried Wine compatability for Wix & InnoSetup? Also you can make scripts that start virtual machines to do stuff like this automatically. I have a Linux system that makes Windows XP/Windows 7 installation files using a combination of Wine and VirtualBox scripting.

Categories : Java

How can I control context menus in other (Windows) applications using Java Robot and Swing buttons
Using MouseListener on the buttons instead of ActionListener, then 'consuming' the MouseEvent in the hope that the other application won't register it and hide the context menu. This doesn't currently work for you because consuming events in Java only effects your application, it cannot prevent the events propagation on the native system. JNativeHook 1.2 may have an undocumented method to allow you to do this on windows, although I am not sure if it will actually solve your problem. If you consume a click event on the native system, the jvm probably wont receive the click event on the osk button to send the arrow down events. There would be no way to detect if the java button is being clicked before you would need to consume the native event. In other words, the NativeIn

Categories : Java

How to beep different for JOptionPane?
beep issues a request to the underlying operating system to emit an audio beep. On certain platforms such as Windows, the "default sound" is played. Rather than attempting to interface with specific platforms, it is simpler to play a corresponding sound file prior to displaying the dialog: AudioInputStream ais = AudioSystem.getAudioInputStream(getClass().getResource("/information.wav")); Clip clip = AudioSystem.getClip(); clip.open(ais); clip.start(); JOptionPane.showMessageDialog(...); clip.close();

Categories : Java

Problems when I call a bash script from C with system()
If I understood correctly your bash script runs fine up to some point and then something fails. Probably some process shows an error message but you don't read it because you don't inspect stderr. You should modify the script to write stdout and stderr of the failing step into e.g. /tmp/$$.err for debugging.

Categories : C

Rescuing bash/system STDERR in Ruby
Instead, I'm getting: "Reached point #1" line 1: eho: command not found "Reached point #2" So in other words, it got rescued, but not in the way that you're expecting. What you actually want is probably more like this: ret = system("sh my_shell_script.sh") puts $? unless ret http://www.ruby-doc.org/core-2.0/Kernel.html#method-i-system

Categories : Ruby

Silence FullAjaxExceptionHandler
As per OmniFaces 1.6, you can extend it and override the method logException() as below to skip the stack trace for ViewExpiredException. public class YourAjaxExceptionHandler extends FullAjaxExceptionHandler { public YourAjaxExceptionHandler(ExceptionHandler wrapped) { super(wrapped); } @Override protected void logException(FacesContext context, Throwable exception, String location, String message, Object... parameters) { if (exception instanceof ViewExpiredException) { // With exception==null, no trace will be logged. super.logException(context, null, location, message, parameters); } else { super.logException(context, exception, location, message, parameters); } } } Create a factory aro

Categories : JSF

Redirect Console.Beep
You will not be able to redirect the beep sound. Console.Beep() is implemented by a call to the Windows API Beep() function which calls into the Sound Card hardware if it can. You have several options: You could use DirectShow's Audio Capture as described here. You could use an audio capture program such as described here. You could write a program to generate a wav file as described here. I reckon the last of those is your best bet.

Categories : C#

Android: SpeechRecognizer beep
You can place it in onReadyForSpeech (if you implement RecogntionListener) public class MySpeechRecognizer implements RecognitionListener { public void initialize() { //... other SpeechRecognizer initialization mSpeechRecognizer.setRecognitionListener(this); } @Override public void onReadyForSpeech(Bundle params) { final ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_MUSIC, 100); tg.startTone(ToneGenerator.TONE_PROP_BEEP); } //... other required methods of RecognitionListener } The only problem with this is that the beep will cause for recognition to start, so you'll need to restart recognition in the event that you get an er

Categories : Android

How to get the wlan number in the linux system using BASH script
if you just want want ifconfig wlan3 up, then you don't need to isolate the 3. you can get wlan3 with just $ iwconfig | grep -o "^wlan[0-9]+" wlan3

Categories : Linux

Return Java system exit value to bash script
You should do like this: Test.java: public class Test{ public static void main (String[] args){ System.exit(2); } } test.sh #!/bin/bash java Test STATUS=$? echo $STATUS

Categories : Java

How Can I Silence this PowerShell Error?
Try using try{} ... catch{} block like this try { // your code to find AD group goes here } catch { //whatever you want to do further } Another way of doing this would be using the -Filter option of Get-ADUser commandlet See Get-ADUser Commandlet

Categories : Powershell



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.