w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
While Sending Html Mails from my web application Recieved Mails contains Symbols like &ldquo,&rdquo, ‘
Check with another constructor for htmlView: ContentType mimeType = new System.Net.Mime.ContentType("text/html"); var htmlView = AlternateView.CreateAlternateViewFromString(bodyMessage, mimeType);

Categories : Asp Net Mvc

How to change mode from c++98 mode in Dev-C++ to a mode that supports C++0x (range based for)?
Go to Tools -> Compiler Options -> "Compiler" tab Check the checkbox labeled, "Add the following commands when calling the compiler" And add in the text entry box, "-std=c++11" or if that doesn't work "-std=C++0x" Should be something like that anyway, I haven't had Dev C++ installed for many years, so I had to look at some screenshots on Google to remember.

Categories : C++

Power saving mode in Android controlled programatically?
There aren't any publicly available API's to do this in the SDK. You can use the PowerManager to acquire and release wakelocks but that's about it. Besides, every manufacturer and device might have it's own version of what it means by "power saving mode", so it doesn't make sense to give 3rd party app developers an API to interact with the system in this way.

Categories : Java

Processing android mode installation error: could not move mode "Android Mode" to the sketchbook
I needed to download Android mode manually. The steps are given below: Download "Android Mode" zip file from here. Unzip the downloaded "Android Mode" in the directory "C:/ Users/User/My Documents/Processing/modes/". Restart Processing. For more information, visit here.

Categories : Android

I'm trying to write certain bits of a register hi to initiate power mode into sleep
First of all, rewrite the messed up pointer arithmetic. I assume the Offset is in bytes and not in u32 words. u32 RegRead32(u32* BaseAddr, u32 Offset) { volatile u32 *temp = (volatile u32 *) ((char *) BaseAddr + Offset); return *temp; } void RegWrite32(u32* BaseAddr, u32 Offset, u32 WriteData) { volatile u32 *temp = (volatile u32 *) ((char *) BaseAddr + Offset); *temp = WriteData; /* empty return at the end of a void function not needed */ } Since you've #defined some constants, don't use their numeric values afterwards, because you might make a mistake. I.e. simply test if (read & DEV_STATUS_CORE_SLEEP) and the result will be true when the bit is set. But most importantly, post a complete code sample (your code is missing some variable declarations and wait_reg()) an

Categories : C

HCM (High Contrast Mode) white vs black detection
http://www.w3.org/WAI/PF/aria-practices/#accessiblewidget Scroll down to 2.12 Compensate for Background Images when in High Contrast Mode

Categories : Javascript

which registers is changed when we move from user mode to kernel mode ?! and what is the reason to move to kernel mode?
From your questions i found that you are very poor in operating system concepts. Ok let me explain,(I am assuming you are using linux not windows). "which registers is changed when we move from user mode to kernel mode ?" For knowing answer for this question you need to learn about process management. But i can simply say, linux uses system call interface for changing from user space to kernel space. system call interface uses some registers (Based on your processor) to pass system call number and arguments for system call.

Categories : C++

UIImagePickerController in portrait mode inside UIPopoverController when view is locked for landscape mode
you can do this with Subclassing UIImagePickerController @interface UAImagePickerController : UIImagePickerController { } @end @implementation UAImagePickerController - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { return UIDeviceOrientationIsPortrait(toInterfaceOrientation); } @end

Categories : IOS

Portrait mode and landscape mode views display adjustment with phone size
You simply create 2 different layout files. You should read the developer guides on this subject. Basically you make 2 res/layout folders: res/layout and res/layout-land Then you add a layout for landscape to the land folder and the portrait version to the other.

Categories : Android

How do Emacs diary-mode and calendar-mode read so many date formats? Magic?
Date::Parse handles a good number of a date formats pretty well. It's part of the TimeDate distribution which has a lot of interesting date formatting stuff.

Categories : Perl

How to change UINavigationBar background image when iPad goes from portrait mode to landscape mode?
You must use: - (void)viewDidLoad { [super viewDidLoad]; [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:) name:@"UIDeviceOrientationDidChangeNotification" object:nil]; } - (void) orientationChanged:(id)object { UIInterfaceOrientation interfaceOrientation = [[object object] orientation]; if(orientation == UIInterfaceOrientationPortrait) { NSLog(@"orientation is UIInterfaceOrientationPortrait"); // Assuming "self" is a view controller pushed on to a UINavigationController stack [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"portrait_

Categories : Objective C

Qt Application shows build error in Debug mode, OK in release mode
When you installed qt, did you configure it to install static debug libraries also. If not then try reconfiguring and reinstalling it. In windows, I think you installed from a preconfigured, precompiled binary that may not have static debug support. Try downloading the source and then configure and compile it according to your needs

Categories : Qt

What is difference in debugging in debug mode and release mode with disabled optimization?
There's very little magic to it. Debug and Release are simply names assigned to a set of compiler options. The most relevant option for the Debug configuration is the /Od option, it disables the optimizer so your code is easier to debug. Clearly you can always change the Release configuration options to resemble the Debug configuration options. Like disabling the optimizer. Now there's no relevant difference anymore between them and the Release configuration behaves a lot like the Debug configuration in the debugger. Other options normally used in the Debug configuration that affects your code: the _DEBUG macro is defined, asserts will fire function inlining is turned off the /RTC option is turned on, very good at catching bugs in your code the _HAS_ITERATOR_DEBUGGING macro is defi

Categories : Visual Studio

How to access kernel mode memory in user mode application in WinCe7
I'm not sure if this will help considering you're on Win CE 7, but in Windows 7, I have a driver that maps a kernel mode address to a user mode address before returning the resulting user-mode address to my application. void *userSpaceAddr; // Allocate the MDL describing our kernel memory pmdl = IoAllocateMdl((PVOID)&my_heap_var, (ULONG)size_of_my_heap_var, FALSE, FALSE, NULL); if(!pmdl) { DbgPrintEx(DPFLTR_IHVVIDEO_ID, DPFLTR_INFO_LEVEL, "Error on IoAllocateMdl. Returning from driver early. "); return STATUS_INSUFFICIENT_RESOURCES; } MmBuildMdlForNonPagedPool(pmdl); userSpaceAddr = (void *)MmMapLockedPagesSpecifyCache(pmdl, UserMode, MmWriteCombined, NULL, FALSE, LowPagePriority); userSpa

Categories : Windows

Renaming a file on HDFS works in local mode but not in cluster mode
Just curious, but how can you rename a file that officially doesn't exist (because you're still writing at that point)? The fix is to rename after the file has been completed. That is, when you invoked the close method. So your code should look like this: public void close() { String newPath = String.format("%s_dir/%s_file", date, timestamp); try { writer.close(); fileSystem.rename(new Path(hdfs_path+path), new Path(hdfs_path+newPath)); } catch (IOException e) { e.printStackTrace(); } }

Categories : Java

Acces Query runs smoothly in "select" mode, fails in "make table" mode
After some more research and trial and error, I was convinced this is a memory issue. So if anyone is having the same problem, and does not have the time or resources to upgrade to 64 bit access or create and sql server, here is a pretty simple workaround. Since the query runs in select mode, use vba to export the query result into a delimited .txt file, that you can read back into the original database, or a new database, as a table. for anyone looking, the vba code to do that is very simple: Sub exportQuery2Text() DoCmd.TransferText acExportDelim, "", "mapProducts2Bills",_ "[filepath].txt", True End Sub I hope this is helpful Cheers

Categories : SQL

Email composer show in landscape mode when restrict application in portrait mode (android +phonegap )
Actually you restricted particularly an Activity to be in a portrait mode, it will be apply only your SplashScreenActivity. For other Activity it will remain as default. If you want this for other activity also you have to write android:screenOrientation="portrait" in all activity, Try This android:screenOrientation="portrait" android:configChanges="orientation"

Categories : Android

emacs evil-mode simple bindings for command mode
Binding a key to a command The command that gets executed when you hit : is evil-ex, as you can find out by running: :describe-key<CR> : (i.e. run Emacs' describe-key command, then hit the key you want info on). So you can just bind ; to also run evil-ex. (define-key evil-normal-state-map (kbd ";") 'evil-ex) (define-key evil-visual-state-map (kbd ";") 'evil-ex) (define-key evil-motion-state-map (kbd ";") 'evil-ex) Binding one key sequence to another In Emacs, just generally, you can define keyboard macros, which are basically the same as how Vim handles mappings: (global-set-key (kbd ";") (kbd ":")) In evil-mode, you need to add them to the relevant keymap for the state: (define-key evil-normal-state-map (kbd ";") (kbd ":")) (define-key evil-visual-state-map (kbd ";") (k

Categories : Emacs

ViewController from .xib file is loading in portrait mode and not in landscape mode in iOS
You may need to use the below methods in the NextLandscapeViewController -(BOOL)shouldAutorotate { return YES; } -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscape; } If the control doesn't reach these methods in View Controller, then you need to subclass the Navigation Controller.

Categories : IOS

Foreign key column disabled in edit mode but editable in add mode
The Id attribute will only be applied to the column element (td), not the actual input of the dropdown. Try the code below for your grid edit function function gridEdit(e) { if (!e.model.isNew()) { var input = $("input[name='RightTypeId_input']"); input.prop('disabled', true); input.addClass("readonly"); // add custom css class to make it looks 'disabled' // avoid clicking on Kendo spans input.next('span.k-select').unbind("click"); } } css input.readonly { -webkit-touch-callout:none; -webkit-user-select:none; -khtml-user-select:none; -moz-user-select:none; -ms-user-select:none; -o-user-select:none; background-color:#E6E6E6 !important; }

Categories : Kendo Ui

toggle phone's state from ringing mode to vibration mode
Maybe an hint here : AudioManager To get mode : myAudioManager.getRingerMode(); and then (to change mode ) myAudioManager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE); Mode list here

Categories : Android

Release mode Vs DEbug mode in MS Visual Studio Windows
when the shared library/dll is built in Release mode and my application is also built in Debug mode Result: Application is getting crashed without loading any symbols from call stack. That's because this is not a supported configuration. By default, the Debug and Release targets link to different versions of the CRT, which (among other things) use different strategies for allocating memory and are not compatible with one another. This is just an extension of the more general rule that you aren't supposed to mix libraries that link to different versions of the CRT. All of the projects need to match. And as you've already seen, when they do, everything works correctly. There are workarounds for this, but they're a lot of work to get right. Essentially, you make sure that all memory al

Categories : C++

How to load a UIViewController in landscape mode if its parent is in Portrait mode?
In your child UIViewController set these two methods: - (BOOL)shouldAutorotate { return NO; } - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscapeLeft; } In parent UIViewController do: [self.navigationController presentViewController:controller animated:YES completion:nil]; instead of: [self.navigationController pushViewController:controller animated:YES]; If you want to present navigation bar in child: DetailViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"DetailViewController"]; controller.title = @"Child"; You'll have to subclass UINavigationController with the two methods mentioned above instead in the child view controller. MyNavigationController *nav = [[MyNavigationController alloc] ini

Categories : Iphone

Navigation menu disappears in landscape mode if the user clicks the toggle button in portrait mode in my responsive website
The problem is jQuery's .slideToggle() method dynamically adds a style: none to the element you are toggling, straight into the tag. So, it takes precedence over your media query rules set in your CSS. To overcome this issue, in your media query targeting devices with screen widths above 960px, add an !important to the display rule for the #main-nav. ul#main-nav { line-height:1; list-style:none; display:block !important; overflow:visible; } Another thing I noticed was your determining factor for adding a listener to the click event on your navigation toggle. If it's dependent on the #main-nav's float attribute, then when the page is first loaded in landscape then switched to portrait the slide toggle will not work, because no listener has been attached to the #nav-collap

Categories : Javascript

I failed in switching the cpu from real-mode to protected-mode
In your gdt_descriptor, you've got the limit and the address. Unlike most other addresses, this is NOT a segment:offset address. It needs to be a linear address. As an MBR, you've probably moved it from where it was originally loaded at 0x7C00. The address in your gdt_descriptor (often called gdtr) needs to be the linear address of where you are now. You don't show quite enough code to be sure, but I suspect your problem is right in there.

Categories : Assembly

Hight mode is 0 or ViewSwitcher can only be used in EXACTLY mode in realViewSwitcher in android
Just hard code the height. Replace with this, <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="45dp" android:layout_marginTop="54dp" > <com.test.RealViewSwitcher android:id="@+id/horizontal_pager" android:layout_width="fill_parent" android:layout_height="550dp" android:orientation="vertical" android:layout_weight="1" > </com.test.RealViewSwitcher> </ScrollView>

Categories : Android

How can I ensure that code works the same way in strict mode and lax mode?
All the strict mode features are summarized in the Annex C of the the ECMAScript specification. In most cases, strict mode will throw errors when you try to use disallowed features (new reserved words, octal literals and escape sequences, multiple definition of the same property in an object literal, etc.). I understand your question is about the cases that won't throw any errors, so here they are: Arguments objects for strict mode functions do not dynamically share their array indexed property values with the corresponding formal parameter bindings of their functions. (10.6). For strict mode functions, if an arguments object is created the binding of the local identifier arguments to the arguments object is immutable and hence may not be the target of an assignment expression. (

Categories : Javascript

What is the difference of tex-mode and latex-mode and LaTeX-mode in emacs
The modes provided by AUCTeX are listed at https://www.gnu.org/software/auctex/manual/auctex.html#Modes-and-Hooks and they are plain-TeX-mode LaTeX-mode ams-TeX-mode ConTeXt-mode Texinfo-mode docTeX-mode Instead, tex-mode plain-tex-mode latex-mode slitex-mode doctex-mode (note the different capitalization) are the major modes provided by the TeX mode package shipped with Emacs. If you want to open all *.tex files with AUCTeX LaTeX mode add this to your .emacs: (add-to-list 'auto-mode-alist '("\.tex$" . LaTeX-mode)) Actually, this shouldn't be necessary, because AUCTeX defines the tex-mode.el mode names as alias of its own modes.

Categories : Emacs

Floating point operations 32 bit mode vs 64 bit mode
Extended is equal to Double in X64. X32 mode is using the FPU floating point unit, while X64 is using the SSE registers for floating point execution. There is also the compiler directive Floating point precision control (Delphi for x64), which by default is on and keeps intermediate single floats as doubles.

Categories : Delphi

Swipe Gesture for LS Mode & Portrait Mode
You need to add this to your view: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. UISwipeGestureRecognizer *swipe1 = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeToggle:)]; swipe1.direction = UISwipeGestureRecognizerDirectionUp ; [self.view addGestureRecognizer:swipe1]; [swipe1 release]; UISwipeGestureRecognizer *swipe2 = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeToggle:)]; swipe2.direction = UISwipeGestureRecognizerDirectionDown ; [self.view addGestureRecognizer:swipe2]; [swipe2 release]; } then your toggle: -(void)swipeToggle:(UISwipeGestureRecognizer *)sender { if ([[UIApplication sharedApplication] statusBarOrientation] == UIInterfaceOrientationL

Categories : IOS

Android USB Host Mode and Accessory Mode
That's because when you connect an accessory to Device B, your accessory which is acting as US B host must implement the Android Open Accessory Protocol (AOAP). See Connecting over USB. Since Device A (host), does not implement the AOAP, Device B will refuse to communicate with Device A beyond a handshake attemp.

Categories : Android

How to set the IE Browser mode rather than setting Document mode
The two modes do two different things: The Document mode determines how IE renders the page. The Browser mode determines how IE identifies itself -- that is, its User Agent String. The X-UA-Compatible flag sets the document mode. There is no way to explicitly set the modes individually via your code; this can only be done manually in the dev tools. (but see below ‡) This means that if you're relying on the User Agent string to identify the browser, then using X-UA-Compatible will give you incorrect results, because the browser is identifying itself differently to how it is actually rendering. The upshot of all this is that you should avoid using User Agent string to identify the browser; it can lie to you, and often does. It's also a good idea, if possible, to avoid using X-U

Categories : Javascript

Android App working well with DEBUG mode, but not with RUN mode
I follow this steps and now it's working Plugged phone Start RUN mode Open DDMS perspective Select my application from Devices panel, under my device's name Open DEBUG perspective Now it's outputting errors. Fixed my errors and now it's working but i've no idea why i wasn't working only debug mode and not working with run mode. My problem solved with this steps. Thank you.

Categories : Android

How can I force IE9/10 to use IE8 for BOTH document mode and browser mode?
Controlling the browser mode isn't possible from the site itself. The Browser Mode setting is controlled by the Compatibility View list (clientside) only. The Document Mode setting is controlled by the browser mode and/or the X-UA-Compatible header.

Categories : Internet Explorer

Something works in debug mode but not in normal mode
WebSphere Application Server uses different XML engines for normal mode and debug mode, and it sounds like you've found a variance between them. You should double-check that your code is following the javadoc (i.e., you're not doing something with undefined behavior), and if that's not the case, considering opening a PMR with IBM to fix the problem in normal or debug mode (it could be that debug mode should also be failing...). Alternatively, consider moving up to a newer version; 6.1 is quite old, and your problem might be fixed in a later version of the product.

Categories : Java

Map :w to Escape in insert mode and normal mode
Information on Vim FAQ 10.9 may be useful: 10.9. When I use my arrow keys, Vim changes modes, inserts weird characters in my document but doesn't move the cursor properly. What's going on? There are a couple of things that could be going on: either you are using Vim over a slow connection or Vim doesn't understand the key sequence that your keyboard is generating. If you are working over a slow connection (such as a 2400 bps modem), you can try to set the 'timeout' or 'ttimeout' option. These options, combined with the 'timeoutlen' and 'ttimeoutlen' options, may fix the problem. The preceding procedure will not work correctly if your terminal sends key codes that Vim does not understand. In this situation, your best option is to map your key sequence to a matching cursor movement

Categories : Vim

Google Chrome - how can i programmatically enable chrome://flags some of the modules from disable mode to enabled mode?
Almost every Chrome flag can be set via the command line. Here is a quite exhaustive list of command line parameters, but also keep in mind that there would be even more in newer versions! EDIT: Here is the Comprehensive, up-to-date list of Chrome command line switches So basically you would launch chrome with these command line flags already set. That's the best way to go about it. You cannot manually set this using Javascript or other behavior. The only way you can set this programmatically (other than command line flags) is to use Capybara (a tool that can open and control browsers, generally used for running automated tests), open Chrome and then manually navigate to "chrome://flags" and click the necessary combo boxes. EDIT: Watir is also as good as Capybara Watir is another brow

Categories : Javascript

Convert a matrix from mode A to mode B
Building on @HongOoi's excellent answer, here's a function that will retain all attributes of the input matrix (incl. dimensions and dimension names) and change the data to the desired mode or to a numeric mode , factor class. change.mat <- function(X,ch.fun) { do.call(structure,c(list(.Data=do.call(ch.fun,list(X))),attributes(X))) } Examples: change.mat(NumMatrix,factor) # K L #A 1 4 #B 2 5 #C 3 6 #Levels: 1 2 3 4 5 6 change.mat(NumMatrix,as.character) # K L #A "1" "4" #B "2" "5" #C "3" "6" change.mat(BoolMatrix,as.numeric) # K L #A 1 0 #B 0 1 #C 1 0

Categories : R

outline-minor-mode and org-mode
Doesn't org-mode use an org- prefix pretty consistently? On that assumption, th-outline-minor-mode-init doesn't look like an org-mode function to me, so something else is probably at fault, and you'll need to find out what. Obviously you can't find-function if it's void, so I'd just M-x rgrep your config for th-outline-minor-mode-init (or most likely searching for (add-hook 'outline-minor-mode-hook 'th-outline-minor-mode-init will find the culprit directly). That issue aside, I happen to use outline-minor-mode in my init file (with headers being lines beginning with ;;;;, and auto-folding the ones beginning with ;;;; *), using the following Local Variables block at the end of the file: ;;; Local Variables: ;;; outline-regexp: ";;;; " ;;; eval:(progn (outline-minor-mode 1) (while (re-

Categories : Emacs

USB transfer speed between tablets and laptop
if your using a USB hub from you Mac it will slow down but not by much. Its because you will be using more bandwidth of the USB XHCI Host Controller. So the devices needs to split speeds to how ever many locations you are copying to and files copying concurrently. Also the CPU needs to work slightly harder therefore slowing down other processes. However on ADB the difference is negligible. You will not be able to tell I'm pretty sure this is the case anyways

Categories : Android



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