Darius Boteand

Ranch Hand
+ Follow
since Jul 03, 2020
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Darius Boteand

Hello!
I am new to php, and I am trying to learn it.

Here is a code that I have been trying to make to work:


In this practice, I am trying to make a simple webpage that creates a file, and deletes it afterwards.
You see, this code works, but not as I would like it to:

First of all, once I load the page and press on the button that creates the new text file containing a message, I actually need to press on it a second time before it decides to even change the page to the next one. And you see, the exact same thing happens then I decide to delete that file. Of course it is calling that same page (called "practice2.php"), from which a different outcome would be resulted depending on if that text file exists or not.

Secondly, from the looks of it, I cannot manage to save the name of the file that has to be created and deleted, as apparently it is considered as "fopen('', 'w+')" instead of "fopen('messages.txt','w+')", of course error message displayed in "/Applications/XAMPP/xamppfiles/logs/php_error_log". And, the same thing would happen when I decide to unlink that file.

Finally, as you can see in the code, I have used "$file = fopen('messages.txt', 'w+');", line 28, inside of a function. Is there a way to declare outside of it, without having the page doing the "fopen" action when loading or reloading the page? I feel that this will become an issue if I would want to have different functions that would need to call this.

Could someone please help me correct my mistakes?
Please bear with me, i'm trying to learn php.
3 years ago
PHP
Thank you for the help!
I will let you know how I am progressing with this!
3 years ago
Hello everyone!
I am trying to change the background of an apk via android studio, using a function?
The idea is to make a "light/dark" mode by using a switch button.
Could anyone give me a lead on how I could do this please?
3 years ago
Hi everyone!
I am sad to see that this task seems not to be solvable.
Does anyone have any kind of leads by any chance?
3 years ago
Hello!
I would like to ask for help regarding geometrical shapes using java on android studio.
You see, I am coding an app where I want to make a button having the shape of a triangle that would take on the whole screen.
I searched on the internet regarding shapes, but I am having concerns about the fact that not every smartphones uses the same screen sizes.
How could I make this shape to stay "true" to the size of the screen?
I am intending to divide the screen in three main buttons separated by a "V" which would create 3 triangular buttons.
Could anyone help me and guide me through this task?
Many thanks in advance!
3 years ago
Oh I understand better now as for why using only / with its full path!
Thank you for your help!
3 years ago
Never mind, found the solution!!!
But this is very weird honestly...
How is this making sense??? instead of ./ I was supposed to only use / ...
well anyways, thanks again for the help!
3 years ago
Hi!
Thank you for your help!
I just managed to make it run.
Only I don't know exactly how to make it work with inputs:
If I echo something or use a simple bash script, it would display an output.
On the other hand, as soon as I use an input, it doesn't display anything anymore.
How should I do this?

Here is the code I have used:

3 years ago
Hi!

This is a tricky task, but I am trying to run a runnable jar across different OSs.
I know that this task is possible should you already have installed eclipse or anything supporting java.

Now how about a system without any IDE.  Is there a way of perhaps embedding something within the jar that will make it run?
Or perhaps I should use a portable IDE on a USB stick?

How would you do this if you were me?
3 years ago
ok, no... that's the terminal command...
3 years ago
Hello!
I am trying to connect to a server and execute commands remotely to that server via java code.
Unfortunately every code I could run (using JSch, since that's what google has mostly recommended  me) has resulted me in soooo many different types of errors for every tutorial.
Could anyone guide me for this task?
Let's sayI want to execute the command "ls -al". How could I connect to that server properly and execute the command?
Thank you in advance!
3 years ago
Ok, I found the answer myself.
In fact this "dark bar" was the colour of the navigation bar that followed the page when swiped up or down.
Changing its colour depending on what activity I go to was enough to solve the issue.
Thank you for trying at least.
3 years ago
Imagine two blank papers put on a table one next to the other.
From east to west and vis versa, it would slide from a page to another while stuck together. As if it was in fact one single big page.
From north to south and reverse, they are appearing separated (displaying a black background). The easiest experience that can relate to that is like using Microsoft Word when you get from a page to another.
3 years ago
Hello everyone!
I made a simple apk file that has 4 buttons. each button is redirecting to a new activity using a slide amin xml.
What I observed is that sliding to the right or left makes the pages stuck to each other, giving a continuous effect.
But this is not the case when I slide up or down. It has like a black gap between pages.
Are there any ways to make it look continuous?
Thank you in advance!
3 years ago
Thank you for you answer! You see I have been using the latest driver, I didn't know that I wasn't meant to use other than the 5.1 version! this did solve my issue. Thank you very much!
3 years ago