Posts by Igor Oliveira • 1,110 points
124 posts
-
2
votes1
answer2362
viewsA: Request Curl Post with PHP
Using the CURL library itself would look like this: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://api.urlapi.com.br'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch,…
-
0
votes1
answer265
viewsQ: Click on checkbox option deselect other options
I have a component in Vue that I pass a prop with the options and it generates a several checkbox for min, what is necessary is that when checking the option "none of the alternatives" it unchecks…
-
0
votes2
answers172
viewsQ: Good practice with Phpunit tests
I’m starting tests, and I wanted to know if I’m following correctly, use Portable, and have had some dilemmas to develop a test of a service that I have. He does some operations in an app via API,…
-
1
votes1
answer414
viewsQ: Docker creating root volume as owner
I am trying to install the Laravel using the official image of the Composer, this is the command: docker run -it --rm --user $(id -u):$(id -g) -v $(pwd)/src:/src composer create-project…
-
1
votes1
answer74
viewsQ: Why doesn’t my . map run?
I have the following function: function (markers) { const geocoder = new google.maps.Geocoder() const geocodingResults = [] markers.forEach((latLong) => { geocoder.geocode({ 'location': latLong…
-
0
votes2
answers269
viewsQ: Operator "or" of Blade Laravel does not work
When I try to use the operator "or" in the Blade it processes wrong and the Undefined variable. I’m calling it that: {{ $confirmed or false }} But he’s compiling it like this: <?php echo…
-
1
votes1
answer40
viewsQ: .val does not work on Ubmit button
I have a Ubmit button with a span inside: <div class="btn-toolbar justify-content-center"> <button type="submit" class="btn btn-primary btn-loading"> <span…
-
0
votes1
answer191
viewsQ: Modularize only Views of Laravel
I have the following structure: - resources/ - views - Modulo1 - view01.blade.php - Modulo2 - view01.blade.php However I have a problem, I can not use the directives of Lade without conflict, if I…
-
0
votes2
answers38
viewsQ: Expose an object ( based on request ) for every application
Oops, I don’t know if it’s possible to do what I want, but come on: I have a Lumen api that basically reads a specific request header and parses it into a YAML file and turns it into an array, but…
-
-2
votes1
answer41
viewsQ: Function within function - PHP
I want to do a function that generates a string in alphanumeric format ( XXXXXX-XXXXXX ) and did the following function for such: private static function generateCode() { function generate() {…
phpasked Igor Oliveira 1,110 -
1
votes1
answer282
viewsQ: Use route controller method with Slim
I have a controller called CardController with various methods within it, however I need to pass some data for these methods via parameter. Currently I can only access the methods directly as the…
-
1
votes2
answers389
viewsQ: Redirect to another Codeigniter application
I have a Codeignter with 3 applications, within each welcome view pattern, the structure is similar to that: www Applications website site2 site3 system I need to figure out how to redirect to site2…
-
1
votes3
answers82
viewsQ: Common conveter array in associative array
I need to transform this array: Array ( [0] => Array ( [name] => Email [value] => [email protected] ) [1] => Array ( [name] => Telefone [value] => 22222222222222 ) [2] => Array (…
phpasked Igor Oliveira 1,110 -
1
votes1
answer86
viewsQ: Codeignite - Why doesn’t my route work?
I have the following route in Routes.php: $route['xxxxx/(:any)'] = 'Order/index/$1'; And the following index in the Order controller: public function index(){ switch( $this->uri->segment(2)){…
-
-3
votes1
answer61
viewsQ: Why is this function going into infinite loop?
I made this function to return a unique code ( it checks if already exists searching in a webservice), but when run, it is running forever, does not return me result. public function…
phpasked Igor Oliveira 1,110 -
2
votes1
answer61
viewsQ: Get the innermost multidimensional array array
I have the following json { "data": { "card": { "current_phase": { "id": "3134719", "name": "Phase Final" }, "child_relations": [ { "cards": [ { "id": "6405893", "current_phase": { "id": "3147728",…
phpasked Igor Oliveira 1,110 -
1
votes1
answer68
viewsQ: Concatenate string in the middle of another using array loop
My idea is to create a function where I will pass an array as a parameter with the format array("c_digo"=>$cod,"nome"=>$nomecompleto) And create a loop with this array so that it creates the…
phpasked Igor Oliveira 1,110 -
0
votes0
answers67
viewsQ: Codeigniter - A function for various controllers
I’m using the IC in my projects, but I have a question. I have several controllers that need to access the same api, currently I create the connection with a function called "apicall" in all…
-
1
votes3
answers268
viewsQ: Generate randomly in XXXX-0000 format
How to generate a string randomly in the format XXXX-0000 where X can it be a letter or a number? What I have achieved so far is as follows:: var letra =…
javascriptasked Igor Oliveira 1,110 -
0
votes1
answer1356
viewsQ: Is it possible to hide parameters from the URL with PHP?
I have a php project with codeigniter that gets dominio.com/?id=212454&survey=complete and after I save this data in a variable, I wanted to remove it from the url, just getting dominio.com My…
-
0
votes1
answer309
viewsQ: Why is this json invalid?
Why this json is valid: { "query":"mutation{ createCard(input: {pipe_id: 426174 fields_attributes: [{field_id: \"o_que\", field_value: \"Igor\"}{field_id: \"idade\", field_value: \"21\"}{field_id:…
-
1
votes1
answer308
viewsQ: How to transform this json into an array
I need to turn this json ( not with all fields_attribute fields) into an array in php to easily change the data mutation{ createCard( input: { pipe_id: 219739 fields_attributes: [ {field_id:…
phpasked Igor Oliveira 1,110 -
1
votes2
answers2443
viewsQ: 100VH height however page contains scroll bar
I have this page, that I put the height of the page in 100VH, to occupy the entire screen, but it is generating these white spaces at the bottom and side, and this is making appear scrollbars, I do…
-
0
votes1
answer60
viewsQ: Make facebook widget responsive
I have a div that is put news, and in the laterial of this div, has the widget facebook, wanted his size to be responsive, IE, his height was the same as the news div My current html: <div…
-
2
votes1
answer846
viewsQ: Is it possible to leave part of image transparent with css?
It is possible to make a photo gradient to transparent at the bottom of an image using css only ? Example:…
cssasked Igor Oliveira 1,110 -
1
votes4
answers1009
viewsQ: Image occupy entire column
I have the following html structure: <div class="col-8 ml-2 bg-secondary"> <h3 class="">Ultimas Notícias</h3> <div class="card"> <div class="row"> <div class="col-3…
-
1
votes2
answers1496
viewsQ: How to keep 2 elements in the same row Grid bootstrap 4
What I need is this: What I tried to do with the knowledge I have in bs4 and grid was the following: <div class="card-body"> <h5 class="card-title">Pizzaria 1</h5> <hr…
-
1
votes2
answers3759
viewsQ: center vertically Row bootstrap 4
I needed to center this Row in the middle of the page, following the bootstrap documentation, tells me to put align-items-center along with Row, I did, but nothing has changed. my html structure is…
-
1
votes1
answer437
viewsQ: Navbar bugada in the resposivo
My site has a bug that I don’t know when it started, it was working normally, when I clicked on the burger menu the menu went down with the options with a white background and below on Nav, but now…
-
0
votes1
answer145
viewsQ: Put footer floating on another div
I have the following html structure: <body> <div id="gmap"></div> <footer> //conteudo do footer </footer> </body> I want to put the div Gmaps occupying the whole…
-
1
votes1
answer265
viewsQ: Remove "floating" div in the responsive
I have the following HTML structure: <div class="container"></div> <div class="card encontreundiade"> <div class="card-body p-3"> <form id="formcontato" class="p-0">…
-
1
votes2
answers242
viewsQ: Get an html and store in variable
I have a simple html file and want to ghettarda it in a variable to use, I made the get so: let popup = ''; $.get( "popup.html", function( data ) { // the contents is now in the variable data…
-
0
votes1
answer753
viewsQ: Get values from a json / object
I have the following json: And 2 selects, one for state and one for city, I have already filled the status correctly using this json: //combobox estados…
-
1
votes1
answer556
viewsQ: Create JSON from Select from the database
I populated a mysql database with data in this format: and wanted to return this in json using php, the problem is that I have for example several lines with the same state, and need to return the…
-
1
votes2
answers943
viewsQ: Colorize all the header
I need to change the color of header entire site, however when I apply the background color to header, the color occupies only the space of the content, thus leaving the color of the body at the top…
-
0
votes0
answers61
viewsQ: Backfit URL Encounter
How do I get my url that contains a "+" to be sent by retrofit with "Encode" but currently the result url is: http://api.xxxx.com.br/aluno?campo=220+2d+ And hence my backend entede this + as a…
-
2
votes4
answers549
viewsQ: Footer with one line
I am using bootstrap to make a footer, but currently it is playing each element in a row like this: I wanted him to stay on a single line like this: <footer class="footer"> <div…
-
1
votes1
answer975
viewsQ: Center button vertically inside Nav boostrap
As I center this button inside a Nav-item, the html is so: <nav class="navbar navbar-expand-sm bg-light navbar-light sticky-top"> <div class="container"> <a class="navbar-brand"…
-
3
votes3
answers745
viewsQ: How to put link border without increasing menu size
I have a menu, and wanted to put the mouse on top the link had a border, I managed to put, but the problem is that it increases the size of the menu when the border appears, how to avoid this ?…
cssasked Igor Oliveira 1,110 -
1
votes1
answer79
viewsQ: Update SQL with Template Object
I have a method that receives a model with some fields filled, I want to update only these fields, my current method is like this: public function atualizar($aluno,$email) { $sql = new Sql(); if…
phpasked Igor Oliveira 1,110 -
0
votes0
answers108
viewsQ: Error when using error error method in edittext()
I made a simple validation in my form, but when I try to apply an error in Textinputedittext the app closes, I always used so, I do not understand why it is not working. Logcat: FATAL EXCEPTION:…
androidasked Igor Oliveira 1,110 -
0
votes1
answer134
viewsQ: String comparison does not work
I have a string that currently only gets "ERROR" and I did an if for when she gave me this value ran some things, it turns out that the comparison always fails, even the strings being exactly the…
-
1
votes1
answer388
viewsQ: Best practice for sending authorization via HTTP header
I am developing a Rest api, I need to pass some data on all the requests that are basically the required authorization. The data are: Token, unit and an id. What better way to pass this via header.…
-
0
votes1
answer545
viewsQ: Require login to access wordpress site
I have to make a portal, but it can only be accessed by authorized people, how do I do this with wordpress? I am well beginner and do not know how to proceed in this case
wordpressasked Igor Oliveira 1,110 -
1
votes1
answer628
viewsQ: Fatal error Uncaught Pdoexception: General error: mode must be an integer
I am getting this error when I try to make an insert in the bank with PDO: > > <br /> <b>Fatal error</b>: Uncaught PDOException: SQLSTATE[HY000]: General error: mode must be…
-
1
votes1
answer226
viewsA: How to set values in a Fragment instead of an Activity using Drawer menu?
To pass the data pro Fragment you use Arguments, so: MyFragment myFragment = new MyFragment(); Bundle args = new Bundle(); args.putInt("someInt", someInt); myFragment.setArguments(args); To get the…
-
0
votes2
answers152
viewsQ: Get text inside input with radiobutton input-group-addon
I have this form with these inputs, I want to get the value that is inside the radio button input selected, example as in the image, I should get "bb". My html: <label>Respostas:</label>…
-
0
votes0
answers38
viewsQ: PHP insertion in the uploaded database returning Undefined
I have this file I call via ajax, however it always returns me "Undefined" not any other error clue. <?php require_once 'Db.php'; $sql = Database::conexao();…
phpasked Igor Oliveira 1,110 -
2
votes1
answer51
viewsQ: How to use Shape as drawable in imagespan
I have a Pan image, but it only works with images, when I try to use a Hape the location of the image is as if n has no image, but also does not present any error. String text =…
androidasked Igor Oliveira 1,110 -
2
votes2
answers71
viewsQ: Replace part of string with drawable or image
I receive from the database a string in formatting "text text ??? text text" and need to transform the "??" in an image or some character, the ideal would be an image or drawable that I can…