elevation

How to read HGT files in C++

落花浮王杯 提交于 2019-12-21 06:45:02
问题 I'm trying to read the elevation data stored in HGT files. As far as I know they can be read as binary files. I found this thread: How do I access .HGT SRTM files in C++? Based on that post, my sample code is: #include <iostream> #include <fstream> int main(int argc, const char * argv[]) { std::ifstream::pos_type size; char * memblock; std::ifstream file ("N45W066.hgt", std::ios::in|std::ios::binary|std::ios::ate); if (file.is_open()) { size = 2; memblock = new char [size]; file.seekg(0, std:

How does task manager elevate without UAC Prompt?

允我心安 提交于 2019-12-21 04:12:53
问题 This has been on my mind for sometime. I can open task manager by pressing Ctrl + Shift + Esc and on the second tab (Processes), I can easily press Alt + S -- Show processes from all users to elevate my task manager without any prompts whatsoever . And voila, I have a powerful tool to play with. I've been unable to find any documents explaining this and I'm very curious about how this feat is achieved; since the button should actually ask for a prompt but does not. 回答1: What you are

WindowsError: [Error 740] The requested operation requires elevation even after disabling UAC

倖福魔咒の 提交于 2019-12-19 04:23:23
问题 I have disabled UAC and running my script in python. command = "abcd.exe" subprocess.Popen(command,stdout=subprocess.PIPE,stderr=subprocess.PIPE).communicate() Also, I set the application abcd.exe from its property to run as admin. Then I'm getting the following error: WindowsError: [Error 740] The requested operation requires elevation 回答1: You could try using: subprocess.call(["abcd.exe"], shell=True) Basically the important part here is shell=True ; if set to False , then you will get the

Developing Apps with Administrator Rights in Delphi

隐身守侯 提交于 2019-12-19 02:27:13
问题 I'm using D2010 under Windows 7 to write an app that seems to require admin rights (I think because it uses COM to communicate with a third party .exe, which also requires admin rights). I've added the manifest resource as required, but when I try to debug the app from the IDE, it reports "Unable to create process. The requested operation requires elevation" ...and it won't run. If I run Delphi as administrator, then my app runs correctly, but this feels like a dangerous brute force approach,

how to randomly select a neighbor patch that has a higher elevation in netlogo

霸气de小男生 提交于 2019-12-18 09:05:56
问题 how to randomly select among all the neighbour patches that are higher instead of the highest neighbour patch? I was thinking to remove (if elevation >= [elevation] of max-one-of neighbors [elevation] [stop]) and place "[stop]" in [move-to-one-of neighbors [stop]] to move ; a turtle procedure if elevation >= [elevation] of max-one-of neighbors [elevation] [stop] ifelse random-float 1 < q [uphill elevation] [move-to one-of neighbors] end 回答1: one-of randomly selects an agent from the agentset

How to run another app as administrator on Windows XP

邮差的信 提交于 2019-12-18 06:16:13
问题 I used the application manifest file as described here to have a part of my application running with elevated privileges (which it needs). So when needed, the main program just invokes a small assembly using Process.Start which then handles the task for which admin rights are required. However, how can I do the same thing on Windows XP? It seems XP just ignores this manifest and runs the small assembly in the current user context. 回答1: The following code from here does just what I need:

Impersonating in .NET using Process.Start and UAC

主宰稳场 提交于 2019-12-12 15:40:56
问题 I am trying to run programs from another .NET program that requires elevation using the impersonation option of the Process.Start (System.Diagnostics) method. The user for impersonation is a local administrator. The O/S is 2008 and UAC is turned on. Whenever calling process start I'm getting a Win32 permission error: "The requested operation requires elevation" 回答1: If the .NET application you are calling is configured properly in the app.manifest, you don't have to specify anything in the

Requesting Administrator privileges during runtime

拈花ヽ惹草 提交于 2019-12-12 12:09:33
问题 How do I request Administrator privileges during runtime so the user is given the prompt to allow or disallow it? 回答1: This information is written in the exe file manifest. You must use the requestedExecutionLevel field (but not sure about that - try setting it to highestAvailable and see if it does what you need). See for example here for more information (somewhat older article but still valid): http://blogs.msdn.com/b/cjacks/archive/2006/09/08/exploring-manifests-part-2-default-namespaces

Strange shadow behavior during `alpha` animation

ぐ巨炮叔叔 提交于 2019-12-12 10:43:30
问题 Have recycler with CardView items. When screen open - I start alpha animation on recycler : recyclerView.animate().alpha(1f).setStartDelay(300).start() Recycler item: <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="20dp" android:layout_marginTop="6dp

Floating Action Button no shadow showing [duplicate]

蹲街弑〆低调 提交于 2019-12-12 04:06:38
问题 This question already has answers here : How to add shadow to the FAB provided with the android support design library? (6 answers) Closed 2 years ago . I am trying to get a shadow under my Floating action button but its not showing. <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="20dp" android:background="@color/colorAccent" android