Posts by Meeeefiu • 2,859 points
55 posts
-
0
votes0
answers92
viewsQ: When saving an image to S3 using the AWS Lambda function with PHP, the file is saved as . bin
I have an Laravel app that runs as a Lambda function on AWS. When I upload an image using the S3 driver, the final file is saved with the extension .bin. I used the method storeAs, to set the file…
-
2
votes0
answers44
viewsQ: How to execute an SQL statement concatenated with a variable in a Procedure in Mysql
I am creating a database to create a database and some tables within that database. I get the name of the database to be created by parameter. I’m having difficulty concatenating this parameter next…
-
0
votes0
answers1488
viewsQ: How to format date in UTC format for yyyy-mm-dd
I am working with the XML of an NF-e where the date fields are in UTC format (YYYY-MM-Ddthh:mm:ssTZD) and need to insert them into the database in yyyyyy-mm-dd format. I’m using Simpledateformat to…
-
0
votes1
answer68
viewsQ: Determine the time of execution of the next task based on the end of the current run in Windows Service C#
This is my problem. I have an application as a windows service that needs to run 15 seconds after the current job execution is finished. The task basically performs database operations and may be…
-
0
votes2
answers155
viewsA: Easiest way to turn a request into Formdata
You can make use of the $httpProvider which is a good place where you can set settings that are common to various requests. Using your case as an example, it could be done this way:…
-
0
votes0
answers36
viewsQ: Should I use a "Provider" type service just to check if the user is logged in?
I have an application that makes use of the module ngRoute. When the url of a restricted page is accessed, I check if the user is logged in, and then allow access. Only I was replicating this…
-
1
votes1
answer519
viewsQ: How to save my queries (sql strings) in the log file in Codeigniter?
My problem is the following, how to register queries(the generated sql string) in my log file. I know there’s a function to it, only I don’t want to have to call this guy in all my Model methods. My…
codeigniterasked Meeeefiu 2,859 -
0
votes1
answer194
viewsQ: Set custom database settings in Laravel
My situation is as follows, I have several settings with the database set in the file databade.php, so far so good. But there are some connections that need data 'variables', such as the name of the…
-
0
votes2
answers1346
viewsA: Editing data with Angular and php
Put your code in the following way: <script type="text/javascript"> angular.module("myCrud", []); angular.module("myCrud").controller("myCrudCtrl", function ($scope, $http) { var…
-
3
votes2
answers1190
viewsQ: How to perform an algebraic expression on a string in C
My program has the following objective:: Given a function, my program replaces the function'X(s)' by any number. The code below exemplifies what was said. //funcao a ser trabalhada char funcao[150]…
-
8
votes8
answers2805
viewsQ: How to know which is the last element on a list?
I am doing a dynamic sql query, in which I use lists, my problem is, how to know which last element of this list Follow the code made so far: List<string> campos = new List<string>();…
-
0
votes0
answers373
viewsQ: Angularjs validation does not work very well
I have a form where it is shown inside a modal, used by the Bootstrap framework, and because of that, the angular validation does not work right. Only some fields are validated and still yes…
-
1
votes1
answer605
viewsQ: How to get back data from a Angularjs post request
I have the following code: $http.post('data.php').success(function(data) { return data; }).error(function(data) { console.log(data); }); How to handle data from this request? I’m doing it this way:…
-
0
votes0
answers102
viewsQ: Semantic UI dropdown does not work with Angularjs
I am using the Semantic UI Framework, when the resource dropdown is within the directive ng-repeat, this feature simply stops working. Someone’s been through this or something?…
-
4
votes2
answers1014
viewsA: How to recover data sent from a post request at angular
The solution is as follows: $post = file_get_contents("php://input"); $json = json_dencode($post);
-
3
votes2
answers1014
viewsQ: How to recover data sent from a post request at angular
I’m making a post request for a php file that requires some data that is sent by the request. My question is how to retrieve this information that is being sent in the request My requisition code is…
-
6
votes2
answers5569
viewsQ: How to read a digital certificate file with php
I have a system where it does digital certificate storage, I need some information in addition to the file itself, one such information is the expiration date of the certificate. The question is,…
-
1
votes0
answers387
viewsQ: Problem with Codeigniter session
When I authenticate the user in my application, I save some user information in sessions. This is done in Controller User, Only when I recover this data in another controller, they don’t exist. When…
-
2
votes1
answer477
viewsQ: Using Codeigniter configuration file sessions
In my project, I need to do some tasks, which depend on information that is in the database. I store this information in sessions to use throughout my project. One of these tasks is to connect to…
-
5
votes1
answer1201
viewsQ: Problem connecting multiple Codeigniter databases
I have an application where it connects to multiple databases, initially I use the file database settings database php.. Only when I connect to another bank, it still loads the file settings…
-
8
votes2
answers938
viewsQ: CSS or Jquery for animation
When it comes to animation, which one should I use? Which one is the lightest? It is possible to do the same animations both in one and the other?
-
2
votes1
answer57
viewsQ: Problems to define new route
I can’t access my controllers through the url. I already set the routes, but from what I saw, instead of calling the Controller I put in the url it’s calling the action AN EX:…
-
2
votes1
answer1166
viewsQ: Convert Integer to Decimal in SQL
I have numbers in the database that are in the whole format. Ex:12345 I want to convert it to price format, in real ones. Ex: 12.345,00
-
3
votes1
answer694
viewsQ: How to build a url in Django?
I am learning Django, but one thing I have not understood so far is, how to build a url, I know it uses regular expression, but someone there has how to explain to me, or indicate me a material that…
-
0
votes1
answer200
viewsQ: pick number of results of a query with the database using cakephp
I want to make a loop to show the results of a database query, and get the number of results found in the query. I’m using the cakephp. Does it have any function that does the same thing as the…
-
0
votes1
answer834
views -
2
votes1
answer1120
viewsQ: Retrieve data from fields of the same name but from different tables
I have a select that looks for data from three different tables, but has some common fields between these three tables. My question is how to get the data of these fields, which has the common name…
-
0
votes1
answer1137
views -
1
votes1
answer204
viewsQ: Error Uploading File to Database
I’m trying to upload a file to the database. Only instead of him sending the file to you, he’s sending you his temporary location. My code is like this: $arquivo = $_FILES['arquivo']; $name =…
-
3
votes1
answer4892
viewsQ: How to use the pointer concept in php?
I’m learning about pointer in C language and I already know how to use it. I believe the way to use php pointer is the same in C. But how do I declare php pointer?
-
1
votes1
answer149
viewsQ: How I apply slideDown() together with load()
I have a page, where it displays dynamic content using the load(). How to apply the effect slideDown() when document is displayed on page? My code is like this: index php. <div…
-
3
votes1
answer427
views -
10
votes3
answers25526
viewsQ: How to delete a character within a string?
In this code I read two strings and I withdraw from the first all the letters in common with the second string. But how to put a null character in place of this common letter in both strings? My…
-
7
votes1
answer898
viewsQ: What is the difference between puts() and fputs()?
I know both functions are for display strings on screen. But what’s the difference between them? Which one is better to use?
-
5
votes2
answers356
viewsQ: Is it possible to apply push technology?
I have a system, in which it displays database files, in list form. I do the query in the database every 5 seconds to see if there are new files, and if you have it is shown to the user using AJAX.…
-
4
votes1
answer822
viewsQ: How to force the download of a file, which is stored in the database
I have a system where, are listed documents from the database, where the user has the option to view or download the file. I want to know how to rescue this file from the bank and force the download…
-
3
votes2
answers26487
viewsQ: Best way to make a script to logout
I am developing a system in which it is accessed with the login and password, once logged in the user has the option to logout, follows below my script: if(isset($_SESSION['logado'])){…
-
0
votes1
answer1004
viewsQ: How to check winner in the game of old
I’m playing an old-fashioned game on C, I want to know how to check which player won by checking the lines horizontally and vertically and on the diagonals. Here’s my program done so far: #define…
-
0
votes1
answer371
viewsQ: How to take multiple data from a page and display separately with AJAX
I have a program where it creates cookies with the data that the user typed in the fields <input>. All this through AJAX. So far without problems, but in this file where I make the request, it…
-
2
votes2
answers1814
viewsQ: How to access the COOKIE on another page?
I have a file where he creates a cookie. And I have another file where I call this cookie, only it gives me that mistake: Undefined index: name in Here’s the code from the first file:…
-
4
votes2
answers12072
viewsQ: Take the value of an input with javascript
I’m making a dynamic table where the data comes from the database, and the user has the possibility to edit this data. This data coming from the bank is inside <div>. Next to these dice is a…
-
2
votes1
answer834
viewsQ: Is it advantageous to use the MVC standard in small applications?
I’ve read several articles related to MVC, its advantages in maintaining reusability codes and everything else. But the question is, in small applications it is worth using this standard, because…
-
1
votes2
answers2452
viewsQ: How to make a database connection using the Singleton design standard
Well I do many web applications, where I all use database, and every time I do a new project, I create a file responsible for making queries with the database (CRUD). Only that I want to change…
-
5
votes3
answers339
viewsQ: Why is ':' used in queries?
I was looking at a php script and noticed that every time SQL query was written, this "operator". A part of the code $sql = "INSERT INTO categorias (nome) VALUES(:nome)"; $stmt = DB::prepare($sql);…
-
17
votes1
answer8180
viewsQ: What is a minimal generating tree?
I have an exercise to solve and the teacher told me that I would just use this method to solve. What is a minimal generating tree and how can I use it in practice?
-
2
votes2
answers765
viewsQ: Tips for turning procedural code into object-oriented?
I have a system that is totally procedural style, and I want to know what are the points I need to identify to turn this code into object-oriented.
-
3
votes2
answers2553
viewsQ: How to get database information without updating the page
I have a system where he picks up information from the database. And this database is getting data directly, so I wanted to know how I took this data and show it on the page, but without this page…
-
1
votes1
answer335
viewsA: What causes "Call to a Member Function fetchAll() on a non-object in..."?
I used the function var_dump() in the variable $query. Initially she would return to me false. So I went to check the line where I put the object PDO, I saw that I had forgotten the = on the part of…
-
0
votes1
answer335
viewsQ: What causes "Call to a Member Function fetchAll() on a non-object in..."?
I made a class for connection to the database using PDO and at the time I will get the data from my table it gives this error. This is the code: require_once('../class/connection.class.php'); $db =…
-
1
votes1
answer1635
viewsQ: What is the purpose of using the filter_input function
Why it is safer to use the function filter_input, than to simply use global variables ($_SERVER, $_GET, $_POST)?