Toledo
102 questions
1
votes
0
answer
20
views
Is there a better way to call and place this click handler function?
I have a draw function whose purpose is to provide elements' movements and interactivity. In this function, I place an Event Listener for clicks.
How is supposed to work this Event Listener?
When pushed, the event listener gets the x and y values of the point where it was clicked, and, the elements...
1
votes
2
answer
109
views
Why Vue doesn't show data from my WebApi with axios and params?
i am practicing with axios and Vue in the use of WebApi.
I have done this:
My template:
Lista de nombres
Nombre
Apellido Paterno
Apellido Materno
{{usuario.Nombre}}
{{usuario.Apellido_P}}
{{usuario.Apellido_M}}
Buscar usuario
Buscar
And My Script:
import axios from 'axios'
export default {
data() {...
1
votes
1
answer
282
views
How to send the Claims with token in web api
I have a WebApi in .NET Core with token authorization.
I followed a guide to implement it, but the response only shows the token, and it's ok, but I would like to see other claims.
This is my code:
public IActionResult Post([FromBody]Personal personal)
{
if (ModelState.IsValid)
{
var userId = GetUse...
1
votes
0
answer
29
views
I can't do a POST with EF Core
with a new problem, it's because with Entity framework core web api i can't do a POST request. But if i write the same sentence in Sql Server it works.
Here is my POST:
public IActionResult PostEstacion([FromBody]PostEstacionDTO postEstacionDTO) {
if (!ModelState.IsValid)
{
return BadRequest(ModelSt...
1
votes
2
answer
795
views
My Vuetify Switch not change his value?
I have a vuetify switch that should receive value from the API True or False.
The API returns True, but the Switch always shows False.
{{props.item.habilitado}}
The switch is inside an a vuetify data table with others values. The other values receive data, but seems the switch not.
My items in data...
1
votes
0
answer
26
views
How Stop the timer after check rows in a database in c#?
I have a method that check for records in a database and a timer that starts the method every 10 seconds. I check if a new record was inserted in a table and get these values to send emails.
The problem is, if has sended the email 1 time, it is no stop the timer and sends email every 10 seconds. To...
1
votes
1
answer
565
views
How to change select based on another select in vue?
I have methods in a Web Api that loads the first select and loads the second select, but the second has a parameter that pass it from the first select.
The url for the second looks like this: http://localhost:58209/api/Tecnico/Tanque/[email protected]
Ok. I use Vuetify in front end, and to tr...
1
votes
0
answer
110
views
Remove console.log with TerserWebpackPlugin
I have a version 4.23.1 of Webpack and use TerserWebpackPlugin to minify my project.
I want to drop console.log on production, but it doesn't work.
I tried UglifyJsplugin and neither.
This is my webpack.config.js file:
var path = require('path')
var webpack = require('webpack')
const bundleOutputDir...
1
votes
1
answer
21
views
Webhook subscription has been disabled and I can't turn it back on
So I was integrating my Dialogflow bot into messenger was working fine , bot is replying from messenger , and I shut the dialogflow integration for a while , and then my webhook has been disabled by facebook saying
Your Webhooks subscription for callback URL https://bots.dialogflow.com/facebook/07...
1
votes
0
answer
22
views
Getting value from timepicker using Javascript
I am working on the last validation of a form. Basically, I need to get the value from a time picker and make some changes to the value to set another value. I've come with this code:
---- This one is the input which contains the data I need to get:
And in this part, I execute the process using the...
1
votes
1
answer
589
views
Paypal IPN 503 error with Rails 3.0.10 and Heroku
I'm trying to integrate Paypal IPN notifications in a Rails 3.0.10 application which is deployed to Heroku (bamboo-mri-1.9.2). It's not the first time I integrate IPN on a Rails application, but I'm having a problem that is driving me mad and I'm clueless at this moment.
I have defined a special rou...
1
votes
1
answer
309
views
SyntaxHighlighter BBCode PHP
I'm having some problems with the BBCode I created to use with the SyntaxHighlighter
function bb_parse_code($str) {
while (preg_match_all('`\[(code)=?(.*?)\]([\s\S]*)\[/code\]`', $str, $matches)) foreach ($matches[0] as $key => $match) {
list($tag, $param, $innertext) = array($matches[1][$key], $mat...
1
votes
2
answer
11.1k
views
how to make height auto depends in screen resolution
I've been thinking this for almost a days. But I can't find any solution in my problem.
Is there a way to set auto height div with scroll bar, because as of now I'm using a fix height but I see the problem that when I open it in another laptop or pc with bigger or smaller screen resolution its still...
1
votes
1
answer
393
views
How to stop camera following Y in unity
I have this code and I can't figure out how to make the camera stop following my player when he jumps, in unity3d
using UnityEngine;
using System.Collections;
public class Camera2DFollow2 : MonoBehaviour {
public Transform target;
public float damping = 1;
public float lookAheadFactor = 3;
public fl...
1
votes
1
answer
96
views
Changing direction infinitely
I am trying to make the enemy change direction when he touches the player, but when he touches it, it starts changing the direction without stopping, something like this gif:
Image (Epilepsy warning)
my code:
private int directionValue = 1;
public Vector2 speed = new Vector2((3/2), 0);
public Vecto...
1
votes
1
answer
1.4k
views
Swift error: Cannot call value of non-function type “SKSpriteNode”
I tried to translate this github code that was in Swift 1 to Swift 2. That makes a rope like in this video.
My translated Rope.swift finished looking like this:
//
// Rope.swift
// SKSwiftRopeDemo
//
// Created by Jeremy Higgins on 6/10/14.
// Copyright (c) 2014 Digital Buckeye. All rights reser...
1
votes
1
answer
322
views
Swift: How to make bullet spawn at player weapon?
I have a class CharacterCreator which makes the player and inside it I have these functions to make the player shoot:
func shoot(scene: SKScene) {
if (playerArmed) {
let bullet = self.createBullet()
scene.addChild(bullet)
bullet.position = playerWeaponBarrel.position
bullet.physicsBody?.velocity = C...
1
votes
1
answer
21
views
How can I run several projects on the same solution in Visual Studio
I have several projects in my solution (libraries, web apps, services,...) and I want to be able to run a service at the same time with my principal project.
How can I do that?
1
votes
1
answer
458
views
How to fetch JSON data from DB?
I've prepared a JavaScript visualization code, the visualization works via simple HTTP server, since all the necessary data are in one folder. However, I couldn't get it to work if the data input needs to be fetched from a database (now JSON file).
I've loaded the below sample data (csv file) into t...
1
votes
1
answer
81
views
Convert Linux Curl to PHP
I've been trying all week to try and enable connection to my web service using PHP curl, however, I couldn't make it work so I tried curl using command line and to my surprise.. it worked.
Here's the command that I used using the linux curl:
curl -k -i -H 'Content-type: application/x-www-form-urlenc...
1
votes
1
answer
599
views
Fetch JSON via REST API using PHP cURL
I want to retrieve a JSON data via REST API using PHP cURL.
Using the PHP code in this post, I was able to bypass the Spring Security page with the URL:
https:///appserver/j_spring_security_check
However, the JSON exist inside this URL and I want to fetch it:
https:///appserver/portal/api/1.0/apps
T...
1
votes
1
answer
505
views
Convert CMD cURL to Excel VBA code in order to fetch JSON data in an HTTPS site?
I need to get a JSON from this URL 'https://localhost/appserver/portal/api/1.0/apps' and I can do that using CMD cURL.
curl 'https:///appserver/portal/api/1.0/apps'
-H 'Accept-Encoding: gzip, deflate, sdch, br'
-H 'Accept-Language: en-US,en;q=0.8'
-H 'Upgrade-Insecure-Requests: 1'
-H 'User-Agent...
1
votes
1
answer
73
views
Outer Loop isn't working (java)
I'm trying read a set of numbers from a file and then isolate the lines in between the first line (which lets us know how many lines will need to be worked on, in this case, 5) and the seventh line (mind you that this is just an example, the range of the lines will is subject to change) so that I ca...
1
votes
1
answer
31
views
Logic in Change Conversion Program | indexOutOfRange [duplicate]
This question already has an answer here:
What is an IndexOutOfRangeException / ArgumentOutOfRangeException and how do I fix it?
4 answers
I'm working on a program for my C# class that is supposed to take an entered amount, as a double or not, and to find change in dollars, quarters, etc.,
I'm usin...
1
votes
2
answer
378
views
Error using bind_rows with list of quantiles
I have a list of quantiles in the output of pull, each element of the list is a named numeric vector with the decile position.
tibble(norm=rnorm(1e3, 100, 1000), group=sample(c('a', 'b', 'c', 'd'), 1e3, TRUE)) %>%
group_by(group) %>%
summarise_at('norm', ~list(quantile(.x, seq(0,1,.1)))) %>%
pul...
1
votes
1
answer
48
views
how can i get a data of a page to other page in ionic3
i was making a program but in a page i need some datas to use, so i made functions in a page to return datas of a page to other page, i have this error:
ERROR Error: Uncaught (in promise): Error: StaticInjectorError[NavController]:
StaticInjectorError[NavController]:
NullInjectorError: No provid...
1
votes
1
answer
1.2k
views
kubeadm init - fails
I'm having troubles with this Vagrantfile that I've defined https://github.com/pablotoledo/kubernetes-poc/blob/master/Vagrantfile.
In this Vagrant file I set:
1 Master
2 Workers
And I've defined a few scripts to be runned on each VMs:
SSH Keygen for Master -> script_generate_ssh_key
SSH Copy Key to...
1
votes
1
answer
39
views
How do you move a sprite up and down?
I've been at it for a while, and I cannot seem to figure out why my sprite is not moving up or down when the program is run.
Player Sprite Class
def __init__(self,name,x,y):
pygame.sprite.Sprite.__init__(self)
self.name = str(name)
self.speed = 5
self.image = pygame.image.load(name+'.png').convert_a...
1
votes
2
answer
58
views
How to group duplicate query result in C#?
I have this query result in SQL Server:
But i want to group those values like this:
Name: Isaias Orozco Toledo
Date of Birthday: 1993-07-25
Type: Abastecimiento
...
...
...
Types: Inventario en Punto de Re-Orden, Inventario Inventario Mínimo
That is to say, convert the duplicate query result to one...
1
votes
1
answer
63
views
How to simply respond to a dialogflow webhook fullfilment based on the parameters and intent that is sent
I'm quite new to nodeJS and I want to know how could I make a server that will respond to dialogflow's webhook fulfillment based on the intents and the parameters in dialogflow.
1
votes
2
answer
103
views
CSS Problems with div at the bottom
I have a div that is at the bottom of my page. It's CSS is:
#news-bottom {
color: white;
position: fixed;
white-space: nowrap;
overflow: hidden;
height: 66px;
bottom: 0;
right: 390px;
left: 180px;
padding: 5px;
border: 1px solid #CCC;
background-color: black;
}
And I have the div's content like on...
1
votes
1
answer
144
views
ImageView isn't showed on TableRow
I have the following code to create a table header in my code. But, for some reason, the column with ImageView don't show anything. As I fixed weight for the columns, instead of show the image, this code only reserves a empty space for the column, but don't show anything. I suspected that my drawabl...
1
votes
6
answer
14.9k
views
CSS: Auto resize of height
Is there a way how to auto resize the height of an image using CSS?
I have a menu in left side of the website. Image size is 216 x 504.
The width is okay but the height of the image will be auto resized depends on the monitor screen resolution.
Here's my HTML:
Here's my css:
.menu-bg
{
position:abso...
1
votes
2
answer
2.9k
views
ASP.NET: Fileupload filename gone after preview image
I'm doing an employee registration were there is an image that the user can preview the picture they choose. So my problem is, when I tried to preview the selected image, the filename in the fileupload is gone..
the 'save-14-copy.png' is the filename of the picture.
So next step is to preview the im...
1
votes
1
answer
297
views
android cant connect to wifi network programatically (drops after few seconds and come back to previous one)
I am trying to connect to a wifi network programatically. Android connects to it, but after few seconds it drops the connection and automatically connects to the previous one.
If i try to connect through the settings, android connects to my desire network and stay connected.
Am I missing something...
1
votes
2
answer
48
views
the_excerpt didn't appear - woocommerce / wordpress
HMTL original rendered:
3 - Blog Post
HTML after setup_postdata( $post );
3 - Blog Post
Bem-vindo ao WordPress. Esse é o seu primeiro post. Edite-o ou exclua-o, e então comece a escrever!
Weird things:
The code:
When I change the position of the code and remove title and thumbnail, t...
0
votes
0
answer
5
views
The command 'dotnet' not found in Dockerfile
I trie to build an image with docker to run a project, but When i run docker build, the step 5/12:
/bin/sh: 1: dotnet: not found
The command '/bin/sh -c dotnet restore' returned a non-zero code: 127
Note: I'm running .Net Core and Node Modules, so i put all in the Dockerfile, is that OK? I'm new wit...
1
votes
1
answer
193
views
Using XMLHttpRequest with Google Calendar API v3 Calendars:get Request
I can't seem to get the XMLHttpRequst method to work properly with the Calendars:get request from the Google Calendar API.
For example, a calendarId with '[email protected]' works properly, but When it includes a '#' character like 'en.usa#[email protected]' it will return a 401 er...
1
votes
1
answer
616
views
React & Redux: Uncaught TypeError: (0 , _reactRedux.connect) is not a function
I am new with redux, react and parceljs. I'm currently experimenting with this 3 stuff by doing the redux tutorial. And after parceljs did it job, when I went to the browser I got this error on the console:
Uncaught TypeError: (0 , _reactRedux.connect) is not a function
The code right now is
impor...
1
votes
1
answer
101
views
How to hide routes in vue router based in condition?
I want to hide a route based on a condition that return true or false.
I have a list of routes, for example:
- Products
- Clients
When a user logins and no have the action for editing products, then, the new list would be only:
-Clients.
I hide another routes based on the name: v-for='item in routes...