Posts by Florida • 2,598 points
80 posts
-
0
votes0
answers19
viewsQ: How to convert an AES decryption code to php?
I need to decrypt an encrypted variable in php via Javascript in the Cloudflare Workers, how could I convert this broken code into php for JS in order to decrypt correctly? Code:…
-
0
votes1
answer51
viewsQ: How to modify the values of a table td if it has a specific character?
I have a table that presents dynamic data, some of them are emails, how do I modify their value by adding the tag <kbd> and </kbd> between the value of each using javascript only?…
-
0
votes1
answer71
views -
0
votes1
answer71
views -
0
votes1
answer40
viewsQ: How to load all . lib in a directory through Cmake?
I have in my CMakeLists.txt several calls to the add_library where these call libraries(.lib) are located in the same directory. I would like to import all libs from that directory /lib without…
-
2
votes1
answer993
viewsQ: Copy the value of a list variable to a python variable
I’m declaring a variable X with the value of another Y using =, but when having do a append in the variable X, to Y also changes. Code: ''' Resultado obtido: ['casaRJ', 'casaSP', 'casaDF', 'apRJ',…
-
2
votes2
answers1740
viewsQ: Comparing datetime with minutes interval
I need to compare 2 dates, these dates are in format %d/%m/%Y %H:%M:%S and one is obtained through the internet, and the other locally, however I am not able to compare the two with an interval of 2…
-
0
votes1
answer61
viewsQ: How to sort items from a list using two different values?
I have a list, which contains several values, each group of values corresponds to an audio of a language, however I am not able to sort using two conditions. audio_list = [{640: 640, 'lang': u'en',…
-
0
votes1
answer92
viewsQ: How to return the redirect URL with js?
I have a URL that redirects to another URL where the Location with the final URL, I want to return in a var urlfinal only the final URL that is on this Location, and not the URL that is directing…
-
-1
votes2
answers116
viewsQ: Is there an alternative to using for in php?
Is there any way to do in php what the for does it differently? An alternative method for example, but with the same result that would be achieved by using the for. Example of the use of for:…
-
1
votes1
answer522
viewsQ: Split array with multiple INSERT array_push in SQL
I have a foreach that makes the loop in the data of a file, this loop generates some values that are inserted in a array with array_push, I need to break these values inserted in this array to…
-
1
votes1
answer285
viewsQ: How to separate and manipulate select data with js
I have a forum with a field select which has many options to select, I would like to divide these options by forum area in two select. All areas and sub-areas are in a single select. Example:…
-
1
votes1
answer1401
viewsQ: How to create a mouse-over effect on an image and position it where I want?
I’m looking to replicate an effect of mouse over but what I’ve achieved so far is a bit buggy, the line with the effect is going from one side to the other, and it’s not just the length of the text,…
-
1
votes1
answer134
viewsQ: How to return driver names in SQL table?
I have the following tables below, and I would like to return only the name of the pilots who never participated in a race in a Brazilian circuit in the country brasil. Table structure: PAIS (id,…
-
1
votes1
answer438
viewsQ: Auto click on button with Tampermonkey
I have a button on a site, which serves to thank, I would like to know how to make a script for Tampermonkey, and when the page is loaded, it performs this function of click on that button, based on…
-
1
votes2
answers545
viewsA: Problems with the result Curl and file_get_contents
You can use the following code, which makes use of the file_get_contents instead of curl, in it is passed the User-Agent so that the connection is not rejected, the capture of the mime-type…
-
10
votes2
answers3515
viewsQ: What is the difference of an empty string and NULL in SQL?
What’s the difference of storing a string as NULL or empty in SQL? How these two can behave when I go to make one SELECT, or INSERT worthwhile '' in that column which is of the type varchar? If I…
-
4
votes2
answers1474
viewsQ: Is it possible to do an INSERT and UPDATE in the same query in java?
I wonder if it is possible to make one INSERT and a UPDATE in the same query, that is, in the same operation. I’m using the following to do both operations. public Connection conn = null; ... conn =…
-
2
votes1
answer104
viewsQ: Mapping active and disconnecting users to exceed 3 users
I wonder how I could map the users who connect based on their unique id’s and id session so that when there are more than 3 sessions for that id, the users who connected first are removed from the…
-
1
votes0
answers49
viewsQ: What is the purpose of the avoid_negative_ts option in ffmpeg transcoding?
I would like to know details about this feature, as there is not much information about it. From what little I understand, it seems to me that activating this option, I will have an improvement when…
-
1
votes1
answer68
viewsQ: Problem after applying a patch to generate random names in ffmpeg
I applied the following patch below, it works as expected, but occasionally transcoding for and in other cases(rare cases, depending on the compiled ffmpeg version) keeps running but instead of…
-
1
votes0
answers93
viewsQ: How to add a comma to each loop string by omitting only the last string?
I have a loop that is generating several names, but need the result of this loop is merged into only one string and names are separated by commas, but omitting the comma in the last name. Expected…
-
5
votes3
answers894
viewsQ: What is the difference between foreach uses in php?
What is the difference between these two means of using the foreach in php? One would be more special than the other, bringing some advantage for example? Method 1: foreach ($arr as $key =>…
-
1
votes1
answer100
views -
3
votes2
answers13268
viewsQ: How to delete files in a directory with batch script?
I need that when executing one script cmd. it erases all files with the following extensions: .txt and .mp4 if any. These files are located in the following folder C:\comando\batch\diretorio\teste…
-
3
votes1
answer89
viewsQ: How to encrypt multiple variables within a php file?
I’m using php to read a file to a $string, he owns some words variables that I need to find and replace with others, that is, I need to get these variables, encrypt them with AES and write again…
-
1
votes2
answers3516
viewsQ: How to generate random numbers at command prompt?
I have a file on .cmd and I need it to generate random numbers with 10 algorithms. Like for example 9006100001 and 1579970319 randomly generated. I currently have the following function generating…
-
1
votes0
answers50
viewsQ: How to prevent the stream from falling when there is no picture?
I am running a command line on ffmpeg so that it saves the input in the format I need, however, input stream has occasionally some faults, such as missing 5 seconds, and it occurs that the output…
-
1
votes1
answer294
viewsQ: How to validate a wmsAuthSign hash in php?
I have the following code that creates a hash security for authentication on media servers, would like to know how it could be validated in php itself, media servers should use some logic for this,…
-
0
votes2
answers1820
viewsQ: How to configure multiple Nginx on a server?
I need to configure two Nginx servers on a windows server. One of them is responsible for processing the site, and already operating using the default settings of Nginx, what I need, is another…
-
14
votes3
answers19255
viewsQ: What is the difference between while, for, while and foreach?
What is the difference between the while , do while, for and foreach in PHP, because they give the impression that same functionality. All of them can be used to create a loop or has other purposes?…
-
5
votes2
answers3434
viewsQ: What’s the difference between Gravity and layout_gravity on Android?
In the customization of the layout properties in Android Studio I noticed that there is the gravity and the layout_gravity, both bear the name gravity, so I’m a little confused as to its…
-
5
votes2
answers4548
viewsQ: What’s the difference between Assets, res and raw directories on Android?
I would like to know the difference between directories /assets and /res present on android, I know that the layout and various images are in the directory /res and are accessed in different ways.…
-
3
votes1
answer754
viewsQ: What is the difference between the various JOIN types of SQL?
In SQL there are several types of JOIN, what is the difference between INNER JOIN, LEFT JOIN, CROSS JOIN, RIGHT JOIN and FULL JOIN?…
-
18
votes2
answers4597
viewsQ: What are the differences between HTTP 1.1 vs HTTP 1.0?
What are the differences between them, and for which case each is most recommended? We have the documentation of HTTP 1.1 and that of HTTP 1.0, but they are long, and I would like a brief…
-
3
votes2
answers82
viewsQ: Conversion of byte array to string when compiling revealing the string in C compiled code
I am using the function below to make the conversion of byte array for a string, but when analyzing the compiled code I note that the string is clearly shown (using an Hex editor), what I do not…
-
2
votes1
answer3401
viewsQ: Convert hexadecimal string to C-readable output
I would like to save a text in hexadecimal, and calling a function, the hexadecimal string is converted to a readable char string, i.e., decoding the hexadecimal, for example 0x6f0x69 for oi. I…
-
6
votes3
answers9114
viewsQ: What are the differences between printf, fprintf, sprintf, snprintf, printf_s and fprintf_s?
Researching I noticed that there are several variations of printf, but I did not understand which differences and which to use in a certain circumstance. I would like to know the purpose of each…
-
0
votes1
answer86
viewsQ: How to split a string sprintf into multiple lines in C?
I got a string on sprintf and I would like to divide it into multiple lines, because it gets big and the code gets messy. sprintf(srt,"GET %s HTTP/1.1\r\nAccept: text/javascript\r\nUser-Agent:…
-
5
votes1
answer1136
viewsQ: How to block a range of Ips with php?
I have a function in php, but I wouldn’t like it to be run by people from a certain country, as I do for the php script to block a range of Ips? Example, block the US IP range. You need to be able…
-
0
votes1
answer128
viewsA: Troublesome socket response on Android NDK
The solution found, however not the most desired is below, using the do/while in a loop which occurs 2 times, it is possible to bypass the null which is received when trying to obtain the response.…
-
7
votes1
answer953
viewsQ: How to uninstall an app automatically before installing again?
I am using Android Studio to test and debug my application with the librarys, but the application is not overlapped properly, so I need that, before installing it, it be removed. I tested with the…
-
1
votes1
answer128
viewsQ: Troublesome socket response on Android NDK
I’m trying to implement this library, Parson, in C, but when I try to manipulate the data obtained via connection socket(ONLY link), I get a null, what doesn’t happen when I manually put the json in…
-
0
votes0
answers47
viewsQ: C library with auto checksum
I’m creating a library/library for Android in C, and I’d like to know how to get it to display its own checksum, so, should you suffer any "alteration" once compiled, the checksum change.…
-
0
votes0
answers43
viewsQ: How to get Datetime from the internet?
How can I do to get the current date from the internet, and convert the result to char *data_atual? Example of the intended websites: nist.time.gov and/or time.windows.com. I would like two…
-
1
votes1
answer61
views -
1
votes1
answer679
viewsA: How to get the Package Name from an Android app in a C library?
How to get the Android APP Package Name on JNI? Below, I show you a full example of how to get it into a library. We get the context through the jstring context in the library. JNIEXPORT jstring…
-
1
votes1
answer679
viewsQ: How to get the Package Name from an Android app in a C library?
I would like to know how I can get the Package Name of my Android APP through a library written in C. What I want to get is this com/meu_app/mainframe/MainActivity or…
-
2
votes2
answers80
viewsQ: Is it possible to use Heredoc with special characters in an array?
I have a multidimensional array, as the example below shows, but I wonder, if I can use a Heredoc on it, would it be possible? I could include special characters not escaped, if it is possible to…
-
4
votes2
answers503
viewsQ: How to hide a string in C, so that it is not readable in compiled code?
I have a string Hello World, but I don’t want to keep it as Hello World in C, I would like to keep it as some value in Base64, aes or binary, or similar, so that it is not readable in the code. How…