Posts by Carlos Fagiani Jr • 160 points
29 posts
-
0
votes0
answers31
viewsQ: Return group of objects by referencing the item in the postgres array field
I need a collection of objects having as reference the items of an array field in postgres, duplicating the person in the relationships she participates in. I am using Rails 6 and created the field…
-
0
votes1
answer16
viewsA: How to make one function wait for the answer of another that is within the first
I wear it like this confirmacao(msg, function (err, bt) { if(err) { console.log('erro'); } else { if(bt.answer == true) return true; else return false; } });…
javascriptanswered Carlos Fagiani Jr 160 -
0
votes0
answers54
viewsQ: Working with branchs in git
I have a problem understanding GIT, whether the "master" branch is used for production and the "Development" branch for staging. When I create a branch to work on a new Feature, create the "master"…
-
1
votes1
answer122
viewsA: List posts related by category in wordpress
I found the answer here: https://enternauta.com.br/wordpress/posts-relacionados-por-categorias-ou-tags-no-wordpress/ actually returns an array, and use category__in in the category ids array.…
-
0
votes1
answer122
viewsQ: List posts related by category in wordpress
When opening a blog post, I need to pick up all posts, ordered by descending date, that have the same label and are in the same state of the open post. This is OK. I need to filter more, the…
-
2
votes1
answer503
viewsQ: Create HTML shape and overwrite navbar
I need ideas on how to make a navbar like this. I tried with clip-path, but I don’t know if it’s a good one. These triangle curves and mainly the green bar curves complicate my life. The navbar is…
-
0
votes0
answers450
viewsQ: Configure subdomain on NGINX with Rails
I’m uploading a Ruby on Rails app on Digitalocean, and I need it to stay in a Ubdomain, I’ve already configured DNS and it’s working. the application works in the main domain. But in Ubdomain it…
-
0
votes1
answer78
viewsA: Getting nested Sources in the Rails controller
From what I understand you want to use the accepts_nested_attributes_for :Author http://api.rubyonrails.org/classes/ActiveRecord/NestedAttributes/ClassMethods.html within your model Design has_many…
-
0
votes1
answer685
viewsQ: Rails 5.2.0 `method_missing': Undefined method `has_one_attached'
My project uses Rails 5.2, Ruby 2.4.1p111. Rails 5.2 comes with active_record "pre-installed", rails active_storage:install that generated the Migrations, then rails db:migrate All right, in the…
ruby-on-railsasked Carlos Fagiani Jr 160 -
0
votes1
answer100
viewsA: rails_admin employee can only edit who is not administrator
can :update, [User], admin_role: false by can :Manage, [User], admin_role: false So the rule is much more complete.
-
0
votes1
answer100
viewsQ: rails_admin employee can only edit who is not administrator
Rails 5 gens rails_admin, Devise, cancancan I have a User model {name:string, ..., admin_role:Boolean, employee_role:Boolean, user_role:Boolean} class Ability include CanCan::Ability def…
-
0
votes1
answer395
viewsQ: Swift 4 http get and iterate the JSON response
Hello, I am learning Swift and am making a GET request via URL that returns me a JSON with this structure. { "data": { "response": […
-
2
votes3
answers969
viewsA: Consulting a JSON via an ANGULAR POST
I do so using $http with PUTS. .service('LoginService', ['$http', function($http) { this.getToken = function(login, senha) { return $http({ method: 'PUT', url:…
-
1
votes1
answer708
viewsA: My device does not update when making a modification to Ionic code
Ionic serves --lab only works in the browser, to run on the device without having to compile straight you have to use the command ionic cordova run android --device --livereload ionic cordova run…
-
0
votes3
answers146
viewsA: Views specifies for Devise
Create an app/views/layouts/Devise.html.erb file and it will already be used as a layout for the views of the controller.
-
3
votes2
answers916
viewsQ: Orderby with ng-repeat nested in the Angularjs
I need to order a list, which is in two ng-repeat, but I can only order within the group of the second ng-repeat and made a jsFiddle that shows my code: https://jsfiddle.net/xxg4ajkk/2/ The order I…
-
0
votes1
answer232
viewsQ: sort with Angualrjs / orderby by a field that will be created later
I am using Ionic 1 with Angularjs. I need to sort a result by a field that should be created later, the field is the distance from the first company address, in orderby do not know what to put, and…
-
0
votes1
answer43
viewsQ: Select values from another table with more than one row in Websql
I’m using Ionic + Ordova + Websql. I have basically these tables, partners and partiesEnderecos. In the address table can contain more than one row for each partner. How do I return these values? I…
-
1
votes3
answers710
viewsQ: Read json via http by Angularjs
I am trying to read with an Angularjs/Phonegap application an HTTPS address that gives me a JSON (https://gestormegaclube.com.br/api/app/v1/parceiros). I’m getting this mistake: Xmlhttprequest…
-
1
votes1
answer374
viewsQ: Leave image with responsive text
Hello, I need to insert a text on top of an image, which is responsive in the correct place of the image, until then it is working "well", but the site is done in bootstrap, and when it comes out of…
-
0
votes1
answer897
viewsA: Google geolocation works on the pc browser, but not on the android browser
Google only allows you to use getCurrentPosition() on HTTPS://connections (it would never work by accessing my local IP), in Heroku it only works if I use https:// before the address in both the PC…
-
0
votes1
answer897
viewsQ: Google geolocation works on the pc browser, but not on the android browser
Using Ruby, Sinatra, Slim, Javascript, Google maps v3 API. Geolocation works perfectly in the browser on the PC, the map is generated with the partner marker, when you click on the button you are…
-
2
votes2
answers815
viewsA: Error summing 2 php values
Use dots for decimals and do not separate thousands. $vl_mobra = 1250.59; $vl_mat = 2020.19; $mo = $vl_mobra ; //VALOR 1 250,59 $mt = $vl_mat; //VALOR 2 20,19 $vt = $mo + $mt; //SOMA echo $vt;…
-
0
votes1
answer380
viewsQ: How to paste text in the same Excel column?
I copy data from a PDF and would like each row to be pasted all in the same column "A", because then I have a macro that does all the work of dividing into columns that works very well. On my…
-
2
votes2
answers1837
viewsA: #REF! when deleting cells in another spreadsheet
The solution, let’s say it’s the easiest, was to rewrite the second spreadsheet with a macro. Since it’s kinda static worked out that way: Sheets("Plan2").Select Range("A5").Select…
-
1
votes2
answers1837
viewsQ: #REF! when deleting cells in another spreadsheet
Good morning, I have an Excel file with two spreadsheet, in 'Plan1' all data are deleted, and a MACRO I made, imports a TXT file and populates the 'Plan1', inserting data and calculations. In…
-
0
votes3
answers601
viewsQ: Mandatory fields depending on the form
need to specify what will be mandatory depending on which form is displayed. I have a Model that has some Ex fields.: //Model User :name, age, address: In Create for User, only :name must be…
ruby-on-railsasked Carlos Fagiani Jr 160 -
1
votes1
answer228
viewsQ: Checkbox status
Hello, This code does the following, when the checkbox is selected, the table row is added in the bottom table. If I create the input.checkbox in hand the code works but does not save its status…
-
0
votes1
answer295
viewsQ: Checkbox conflicting with paging
I’m trying to use the bootstrap-table to create some filters in a table, in the first column has a checkbox, that when a function is selected JQuery copies the column row and adds in another table,…