Questions tagged [root]

1

votes
2

answer
287

Views

SCALA: Function for Square root of BigInt

I searched internet for a function to find exact square root of BigInt using scala programming language. I didn't get one, But saw one Java Program and I converted that function into Scala version. It is working but I am not sure, whether it can handle very large BigInt. But it returns BigInt only....
RAGHHURAAMM
1

votes
1

answer
55

Views

Square root loop in python

I need to take an input of a number greater than 2, and take the square root until the square root is less than two. I need a print statement that includes the count of the times the square root of the number was taken as well as the output. What I have so far is: import math input_num = float(input...
Europa14
1

votes
1

answer
129

Views

run part of code as root

I have a package which runs uses Gtk and written in vala.A dialog box or a gui opens after selecting a file.I want this dialog box or gui to run as root so as to open and read the files which don't open with normal users.I have this code static void open_file(string filename) { selected_file = filen...
abhay gurrala
1

votes
0

answer
18

Views

Android: How to manipulate the sound of the whole device?

I'm trying to create a small equalizer-app for my android device, so I need to manipulate the sound of the whole device. Is this possible ? Or do the users of my app need root? Can I manipulate the sound of specific applications only?
JavaProgrammer.002
1

votes
1

answer
291

Views

Swift - get user password through dialog

I am creating an application with Xcode and I need to use the users password to perform root tasks. My problem is that without creating a pipe that uses sudo like shell('echo',prompt('Enter Password'),'| sudo -S do_root_thing') which is very insecure (shell and prompt are pre-defined). I know some p...
Unknown
1

votes
0

answer
329

Views

How to run grafical tool (e.g. deja-dup) as root on Ubuntu 17.10

When trying to setup automated backup under Ubuntu 17.10 using Deja-Dup I realized that one can not backup the root directory since a normal user starting the deja-dup application does not have all rights to access all files in /. (german discussion about rather similar situation can be found here:...
Simeon
1

votes
0

answer
3.7k

Views

Can't connect to X11 window server using ':0'

I want to open phpStorm with this code : sudo phpstorm because i want to access to root mode. And I've got this error message in terminal : > No protocol specified > Start Failed: Failed to initialize graphics environment > java.awt.AWTError: Can't connect to X11 window server using ':0' as the va...
Mahdi Alikhani
1

votes
0

answer
232

Views

How to run cronjob without root or sudo?

I want to create cronjob which will execute in alpine container. However I cannot install sudo or run cron as root.
LazyCoder
1

votes
0

answer
812

Views

Uninstall XAMPP on mac

Not long ago, I installed XAMPP, and I wanted to change the root password. But i did bad commands in the wampp's terminal and I couldn't access to phpmyadmin. So i did 'sudo rm -r /opt/lampp' but it only deleted the configs files. And now I'm stuck because I can't access to anythings and I don't eve...
Xentiie
1

votes
1

answer
27

Views

Most efficient way to get a tree object's root node

I am interested in some design pattern that will give me very fast access from any tree node to the tree root with as little CPU and memory overhead as possible. Now, to iterate the obvious solutions, and explain why they are inapplicable: go down the tree until the root is found - which is what I a...
dtech
1

votes
1

answer
643

Views

Apache Virtual Host redirect to document root directory

I have successfully set the DocumentRoot for a given server names: DocumentRoot '/var/www/html/domain1' ServerName www.domain1.com ServerAlias *.domain1.com #Other directives here I can't seem to figure out, how to move the subfolders ie.'www.domain1.com/contact-us' so it presents index.html located...
sredwopclub
1

votes
1

answer
54

Views

python return None

I am trying to return objects from a function, in the format of dictionary. It seems it is working fine inside of function, but return 'None'. =================================================== The printed result is :: {'tree1': [, , ], 'tree2': [, , ]} {'tree1': [None, None, None], 'tree2': [None...
junho
1

votes
0

answer
106

Views

Can System App access /data/data of other apps

I am developing an app for the custom device. My app run from /system/priv-apps I need to access /data/data for other apps to give a cloud backup functionality. While searching I came across 'android.permission.CONFIRM_FULL_BACKUP' permission but I couldn't find a way to get the content of that par...
Dhruv Kaushal
1

votes
1

answer
66

Views

Modify android first installation time

There's: packageManager.getPackageInfo(packageName, 0).firstInstallTime; How can we modify it? Maybe with root/xposed or programmatically
Ilya Nenilin
1

votes
2

answer
258

Views

Remember root password throughout script using Bash

Background I have a long bash script which setup a large environment of interconnected software, taking several hours to complete. A few of the tasks it performs need to be run as root, for which I use sudo .... The whole process is then paused until the user notices and types in the root password....
jmd_dk
1

votes
0

answer
37

Views

How to extract battery usage data via recovery or something else

There is a battery stat in Android (Settings - Battery). For example: Idle - 30 % Screen - 10 % BT - 5 % Chrome - 25 % Camera - 5 % Where is the data located? I need somehow to extract this data via a file manager (I have ROOT) or ADB or TWRP. UPD: I don't think this is a duplicate of How to get inf...
SerVB
1

votes
2

answer
298

Views

CMAKE MAC OSX library linking Issue: compiles on Linux but on on Mac

I am trying to compile my code with CMake. But when I do the make command I get the following error: [ 17%] Linking CXX shared library libglobal.so Apple LLVM version 9.1.0 (clang-902.0.39.1) Target: x86_64-apple-darwin17.5.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Develo...
francis
1

votes
1

answer
20

Views

How can i copy a file from a rooted directory to another directory in a non rooted android phone prorammatically?

Can i copy a file from a rooted directory like data/data/something/ to another directory in non rooted android phone prorammatically ? If yes then how ? If no then how whatsapp stores its key file in directory data/data/com.whatsapp.com in all the phones (non -rooted phones also)
1

votes
1

answer
55

Views

Requests in subdirectory of document root return 404

I've set the document root of my apache virtual host config file to laravel's public directory. I have an angular 4 app that builds into the public/dashboard-dist directory. I have added this directory as a location to search for views config/view.php like this: 'paths' => [ resource_path('views'),...
moonwalker
1

votes
0

answer
290

Views

Reading Values using PyROOT

I am trying to read out values from a ROOT file using PyROOT and is stuck with this issue. Any help is appreciated. import ROOT rootFile = 'file.root' f = ROOT.TFile(rootFile,'read') tree = f.Get('FCS_ParametrizationInput') leaves = tree.GetListOfLeaves() # define dynamically a python class contain...
1

votes
0

answer
76

Views

Jenkins - build docker image - prevent seeing files owned by root

What are the options to secure Jenkins slave nodes that have docker daemon? Someone could launch docker container and essentially access files owned by root. Environment and problem details: Jenkins Docker daemon available on Jenkins slaves Jenkins agent run as user “build” User build is adde...
dsatish
1

votes
0

answer
172

Views

Debug an system application

I'm trying to develop an app that requires System App permission (for example, I want to reboot the device and install new apks). Now, I write the code and I generate a apk which I place intro /system/priv-app. Then I reboot the device and I run the app. The problem is that I want to debug my app, b...
Pedro Garcia
1

votes
0

answer
19

Views

recover imagen for the wallpapers in android motorola e2

I have a Android motorola e2, time ago I put one image for the wallpaper, after a time I deleted that image, but that picture still in the options, when I have to select one wallpaper for the background of my phone and I can select the image and put it in my background image, so now I want to get th...
mrpepo877
1

votes
1

answer
43

Views

no matching function for call to 'evaluate_net_weight' in C++11

I'm working on a deep-learning project in which I've written some tests to evaluate net weights in a neural net. The code is looks like this for evaluate_net_weight: /*! Compute the loss of the net as a function of the weight at index (i,j) in * layer l. dx is added as an offset to the current valu...
Harshit
1

votes
1

answer
38

Views

directory and sub-directory path not working [duplicate]

This question already has an answer here: How to recursively list all the files in a directory in C#? 17 answers I have the following code, The problem i am having is its only looking at the root directory and not in the sub-folders within the root directory, how can i change it so it would look in...
Allen Soine
1

votes
1

answer
266

Views

Converting C++ to pyroot: How to get a file object from a file in pyroot?

I am doing neutrino research that requires me to do data analysis by overlaying histograms. We are using ROOT. I am currently trying to convert the following code from C++ to pyroot: #include 'TFile.h' #include 'TH1F.h' #include 'TCanvas.h' #include 'TString.h' void myscript() { //get a histogram na...
Kasey
1

votes
0

answer
138

Views

How to find roots for a numpy array

I am wondering how to find foots for an array. What I have now is: import numpy as np from scipy.optimize import brentq as find_root t = np.linspace(0, 100) def f(x): return x ** 2 - t a = find_root(f, -400, 400) print(a) It gives me a type array saying that: TypeError: only size-1 arrays can be con...
J Jas
1

votes
1

answer
106

Views

Where are the mistakes in my own sqrt() function?

Learning C for a couple of days, wanted to write a code to find the square root of a number by Newton's method. #include #include int truncate (double num) //rounds float to integer { if (num < 0) { return (num + 0.5); } else { return (num - 0.5); } } double sqr(double num){...
kirus
1

votes
0

answer
244

Views

Mount /system RW / RO Android 7.1.1 Lenovo Tab 4 10"

I have a problem with making a /system folder into read/write permission. I made root (TWRP 3.2.3, SuperSU-v2.82 - in TWRP is unchecked read-only) and the problem is tablet freezes EVERY time a make change from RO to RW. I used Root explorer, ES file explorer, Root file manager, Super manager... Ev...
Krzysztof Heller
1

votes
0

answer
24

Views

VSCode exit superuser mode

I am new to VSCode (switching from Sublime) and I accidentally caused VSCode to boot up in superuser mode each time I open the app, how do I exit out and go back to zsh or bash? I am not familiar with how to change settings in VSCode. So far, I tried changing the settings like so to zsh, But what th...
Lullaby
1

votes
1

answer
28

Views

Change web root directory - problem with anchor links

I tried edit web root directory via .htaccess file: RewriteCond %{REQUEST_URI} !newweb/ RewriteRule (.*) /newweb/ [L] RewriteCond %{REQUEST_FILENAME} !-f and in index.html code change CSS, JS links via base tag but anchror links not redirect to example.com/#tag but to example.com/newweb#tag I need t...
pavelbedi
1

votes
0

answer
64

Views

Cannot change com.apple.atrun.plist even with root permissions

I'm using OSX Mojave and I've been wanting to use the at command to run scripts at certain times, but I've discovered that I need to change its plist file in order to use it. Right now, one of the attributes in it is Disabled=true which of course, isn't what I want. I've gone to the ends of the eart...
unhappycat
1

votes
0

answer
58

Views

root phpmyadmin with all privileges shows: “No privileges” and cannot create nor modify anything

I have installed Bitnami Wamp server it means: Apache 2 as Web Server, MySQL as SQL server, PHP and PhpMyAdmin. It runs on Wondows 10. I have followed all steps in video tutorials: user root couldn't Access PhpMyAdmin, but now it does because I changed the my.ini file and I wrote there: skip-grant-...
RamiStack
1

votes
0

answer
41

Views

Set virtualenv interpreter to run as root?

I'm using PyCharm to remotely execute a project on a RPi via SSH interpreter. The target for the interpreter is pyenv virtualenv built specifically for the project; i.e. the project requires libbluetooth so that socket is built with AF_BLUETOOTH support. Everything works as expected except for one...
Sean McVeigh
1

votes
2

answer
62

Views

'Bad Substitution' sourcing an auto-completion script as non-root user

I am trying to source an auto-completion script as a non-root user but receive a 'Bad Substitution' error message. I am able to source it as root though. On a other server I am able to source the script as non-root user. I am guessing it is not a permission issue since I receive the same error tryin...
alhd2si
1

votes
1

answer
163

Views

MatPlotLib won't install without python 3.5 or above and pip 18 and above, and I don't have root access

I have been given remote access to a server. And I need to use modules such as pyswarms. However pyswarms attempts to install Matplotlib and Matplotlib 3 requires python 3.5 or higher and/or pip 9 or higher. On that server there is python 3.4 and pip 8. I have been installing modules with --user. I...
Astrodhan
1

votes
0

answer
414

Views

Openshift Nginx permission problem [nginx: [emerg] mkdir() “/var/cache/nginx/client_temp” failed (13: Permission denied)]

I am currently running into a problem trying to set up nginx:alpine in Openshift. My build runs just fine but I am not able to deploy with permission being denied with the following error 2019/01/25 06:30:54 [emerg] 1#1: mkdir() '/var/cache/nginx/client_temp' failed (13: Permission denied) nginx: [e...
relief.melone
1

votes
0

answer
49

Views

SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO) WEIRD ERROR MESSAGE

I just uploaded my entire website to my server. I'm trying to connect to database by these two files: db_conx.php: $con = mysqli_connect('localhost','danoupco_pouya','Slimshady12345678','danoupco_homeblog'); if(!$con) { die('Connection error: ' . mysqli_connect_errno()); } And pdo_conx.php: try{ $ha...
houdriwiokug
1

votes
1

answer
57

Views

Run shutdown command inside bash script

I'm trying to make an executable file (bash script) to show me a notification and shutdown my computer when a process is not found. I will run the script as a Startup Application and I'm using the notify-send and shutdown commands in this script. The problem is: (1) If I add myfolder/myscript to t...
Vinícius Valente
1

votes
0

answer
15

Views

How can I properly sign my app in order to use task_for_pid() without getting error code 5?

I am developing a small application for macOS using C++ and Objective-C. I want toscan the memory of other applications. In order to do that I am using task_for_pid. But in most cases I get error 5. How do I have to sign my app in order not to get this error?
Ivelin Krastev

View additional questions