Mode is a state in which a program exposes a particular subset of its functionality.
Questions tagged [mode]
977 questions
722
votes
9 answers
Shortcut to exit scale mode in VirtualBox
What is the shortcut to exit scaled mode in Oracle VM VirtualBox, Windows 7/10 host?

foki
- 8,624
- 6
- 33
- 32
186
votes
13 answers
GroupBy pandas DataFrame and select most common value
I have a data frame with three string columns. I know that the only one value in the 3rd column is valid for every combination of the first two. To clean the data I have to group by data frame by first two columns and select most common value of the…

Viacheslav Nefedov
- 2,259
- 3
- 15
- 15
154
votes
27 answers
Finding the mode of a list
Given a list of items, recall that the mode of the list is the item that occurs most often.
I would like to know how to create a function that can find the mode of a list but that displays a message if the list does not have a mode (e.g., all the…

bluelantern
- 1,639
- 2
- 12
- 7
146
votes
12 answers
Most efficient way to find mode in numpy array
I have a 2D array containing integers (both positive or negative). Each row represents the values over time for a particular spatial site, whereas each column represents values for various spatial sites for a given time.
So if the array is like:
1 3…

Nik
- 5,515
- 14
- 49
- 75
133
votes
1 answer
Building C# Solution in Release mode using MSBuild.exe
I am able to build a solution using MSBuild.exe, but my issue is I can only manage to get it to build in DEBUG mode. I need to build my solution in Release mode using MSBUILD.
Here is what I've tried
Process msbuild =…

user3682000
- 1,371
- 2
- 8
- 4
122
votes
42 answers
Get the element with the highest occurrence in an array
I'm looking for an elegant way of determining which element has the highest occurrence (mode) in a JavaScript array.
For example, in
['pear', 'apple', 'orange', 'apple']
the 'apple' element is the most frequent one.

vise
- 12,713
- 11
- 52
- 64
78
votes
5 answers
PIL cannot write mode F to jpeg
I am taking a jpg image and using numpy's fft2 to create/save a new image. However it throws this error
"IOError: cannot write mode F as JPEG"
Is there an issue with CMYK and JPEG files in PIL???
p = Image.open('kibera.jpg')
bw_p =…

JHHP
- 781
- 1
- 5
- 4
74
votes
6 answers
Is there a possibility to execute a Python script while being in interactive mode
Normally you can execute a Python script for example: python myscript.py, but if you are in the interactive mode, how is it possible to execute a Python script on the filesystem?
>>> exec(File) ???
It should be possible to execute the script more…

lennykey
- 1,195
- 2
- 12
- 25
62
votes
9 answers
Finding the max value in a map
I've been doing a basic program to find the max, min, median, variance, mode etc. of a vector. Everything went fine until I got to the mode.
The way I see it, I should be able to loop through the vector, and for each number that occurs I increment a…

Sh0gun
- 871
- 4
- 10
- 16
62
votes
1 answer
How to write an emacs mode for a new language?
I would like to write an Emacs major mode for a 4GL.
Can someone show me a tutorial?
As far as I googled I was able to find only this broken:
link http://two-wugs.net/emacs/mode-tutorial.html

Prabu
- 2,313
- 2
- 28
- 31
58
votes
6 answers
How to force a WPF application to run in Administrator mode
I have an WPF application which access windows services, task schedulers on the local machine.
When I deploy this WPF application and run it without "Run as Administrator" , it fails as it is not able to access the windows services and task…

SVI
- 1,631
- 3
- 22
- 30
56
votes
1 answer
How does git handle folder permission?
I'm using git version 1.5.6.3, and it seems git doesn't notice a folder's mode changes
#create a test repository with a folder with 777 mode
:~$ mkdir -p test/folder
:~$ touch test/folder/dummy.txt
:~$ cd test
:~/test$ chmod 777 folder/
#init git…

hdorio
- 12,902
- 5
- 34
- 34
46
votes
1 answer
How to enable a non-global minor mode by default, on emacs startup?
I want to enable rainbow-mode everytime I start emacs, rather than having to use M-x rainbow-mode.
I guess there is some command I put in my .emacs file.
I tried all of the following, but none of them worked:
(require 'rainbow-mode) …

Dark Knight
- 461
- 1
- 4
- 3
38
votes
4 answers
How to disable Sandbox Mode for app in new Facebook Developer?
I can not see an option to disable that in the new Developers design!

Krasavchik
- 389
- 1
- 3
- 5
32
votes
10 answers
Toggle airplane mode in Android
Did I make a mistake? It's not working.
public void airplane() {
boolean isEnabled = Settings.System.getInt(this.getApplicationContext().getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 0) == 1;
…

user669046
- 373
- 2
- 5
- 13