Create a new project with the latest version of the androidstudio ide. When the environment is opened, it shows me this error in the log and it crashes: I tried to clean the cache, open/close, but I can't find in google what could be the error. Since I'm on windows 10, I put Run as admin, but it didn't work either.
Cristian Budzicz's questions
I have a problem in shared hosting when trying to access a resource within public_html/accounting/tmp
When I try to access a file in that directory, it gives me the error 403 Forbidden Access to this resource on the server is denied!
In the cpanel log I got the following:
2020-11-22 13:09:24.172080 [INFO] [22332]
[190.183.80.134:61644-Q:B996F4677DDA92B2-47#APVH_faeppfss.com.ar:443]
/home/faeppfsscom/public_html/contable/tmp/tmpIZ0mcZ.pdf: access is denied.
I checked in the cpanel the configuration of my .htaccess and it is the following:
RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_HOST} ^faeppfss\.com\.ar$ [OR]
RewriteCond %{HTTP_HOST} ^www\.faeppfss\.com\.ar$
RewriteRule ^/?$ "https\:\/\/faeppfss\.com\.ar\/contable" [R=301,L]
The directory has 755 permissions. However the files are created with 655 permissions
I'm doing a symfony backend integration with react frontend. I followed a tutorial guide and the official symfony documentation.
Try running the command yarn run encore dev --watch
to generate the corresponding transpile. I fail with the following error that I copy:
Entry module not found: Error: Can't resolve 'C:\Users\User_' in 'C:\xampp\htdocs\web_cotizacion_repuestos'
The webpack.config.js configuration file has the following form:
var Encore = require('@symfony/webpack-encore');
Encore
// Directorio donde se almacenarán los assets ya compilados.
.setOutputPath('public/build/')
.setPublicPath('/build')
// Nuestro archivo app.js, que será compilado y almacenado en /web/build/app.js
.addEntry('app', './assets/js/app.js')
// .addEntry('buscarRepuesto', './assets/js/Components/buscar repuesto/buscarRepuesto.js')
// Habilitar el mapeo de recursos en Desarrollo.
.enableSourceMaps(!Encore.isProduction())
// Borra el contenido del directorio /web/build antes de volver a compilar una nueva versión.
.cleanupOutputBeforeBuild()
// Muestra una notificación cuando se ha finalizado la compilación.
.enableBuildNotifications()
// Activa React
.enableReactPreset()
// .configureBabel(function(babelConfig) {
// // add additional presets
// babelConfig.presets.push('@babel/preset-flow');
// // no plugins are added by default, but you can add some
// babelConfig.plugins.push('styled-jsx/babel');
// }, {
// // node_modules is not processed through Babel by default
// // but you can whitelist specific modules to process
// includeNodeModules: ['foundation-sites'],
// // or completely control the exclude rule (note that you
// // can't use both "includeNodeModules" and "exclude" at
// // the same time)
// exclude: /bower_components/
// })
.copyFiles({
from: './assets/img',
// optional target path, relative to the output dir
to: 'images/[path][name].[ext]',
// if versioning is enabled, add the file hash too
//to: 'images/[path][name].[hash:8].[ext]',
// only copy files matching this pattern
pattern: /\.(png|jpg|jpeg)$/
})
;
// Exporta la configuración final
module.exports = Encore.getWebpackConfig();
Can anyone guide me on how to resolve this issue? Thank you very much!!!
I ask if it is possible to solve the following:
- keep the content of a webview contained in a fragment when changing to another fragment
What I have implemented and copied below, resets the content every time the snippet is displayed. For example: if you are completing a form, you go back to home (google.com) and this is lost.
public class GalleryFragment extends Fragment {
WebView miVisorWeb;
String url = "https://www.google.com/";
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.fragment_gallery, container,false);
// Bloque 1
miVisorWeb = (WebView) root.findViewById(R.id.webViewGoogle);
miVisorWeb.requestFocus();
WebSettings webSettings = miVisorWeb.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setCacheMode(LOAD_CACHE_ELSE_NETWORK);
webSettings.setAppCacheEnabled(true);
miVisorWeb.loadUrl(url.toString());
CookieManager.getInstance().setAcceptCookie(true);
// Bloque 2
miVisorWeb.setWebViewClient( new WebViewClient(){
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return false;
}
});
miVisorWeb.setOnKeyListener(new View.OnKeyListener()
{
@Override
public boolean onKey(View v, int keyCode, KeyEvent event)
{
if(event.getAction() == KeyEvent.ACTION_DOWN)
{
WebView webView = (WebView) v;
switch(keyCode)
{
case KeyEvent.KEYCODE_BACK:
if(webView.canGoBack())
{
webView.goBack();
return true;
}
break;
}
}
return false;
}
});
return root;
}
}
Suppose a video is played in fragment A, when I change to B and return to A the idea is that the playback continues.
Similar to browser tabs, the idea would be that.
Cheers!!!
I have a rest api, developed in symfony 5 using JWT. Locally it works correctly but when I upload it to productive it fails. The login that returns the token works (when authenticated) but then any query to the api fails, returning JWT NOT FOUND 401
The strange thing is that the token is sent in the header and it works correctly locally.
In my security.yaml I have the following:
firewalls:
login:
pattern: ^/api/login
stateless: true
anonymous: true
form_login:
check_path: /api/login_check
success_handler: lexik_jwt_authentication.handler.authentication_success
failure_handler: lexik_jwt_authentication.handler.authentication_failure
require_previous_session: false
api:
pattern: ^/api/v1
stateless: true
guard:
authenticators:
- lexik_jwt_authentication.jwt_token_authenticator
access_control:
- { path: ^/api/login_check, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/api/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/api/ingresar, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/api/register, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/api/v1, roles: IS_AUTHENTICATED_FULLY }
Then in my lexik_jwt_authentication.yaml file I have the following:
lexik_jwt_authentication:
secret_key: '/home12/eisenluk/symfony/config/jwt/private.pem' #required for token creation
public_key: '/home12/eisenluk/symfony/config/jwt/public.pem' #required for token verification
pass_phrase: '' # required for token creation, usage of an environment variable is recommended
token_ttl: '3600'
If you can guide me how to solve it, thank you very much!!!!!
I am using the react-select component consuming data from an api-rest. The query and the return of the data works correctly. However, the following fails to load the options in the select
My developed code is as follows, from the html I call it like this:
<AsyncSelect cacheOptions defaultOptions loadOptions={this.loadRepuestos} />
Then I have my code for the loadRepuestos function, which is as follows:
loadRepuestos = (name) => {
if(name.length > 3 && this.state.peticionActiva !== true) {
const config = {
headers: { Authorization: `Bearer ${this.state.token['token']}` }
};
let url = API_REPUESTOS_FILTER + `?name=${name}`;
// console.log(this.state.token['token']);
this.setState({peticionActiva: true});
//seteo peticionActiva true para evitar que se desaten continuas peticiones
return axios.get(url,config)
.then(response => {
this.setState({peticionActiva: false});
let lista = response.data.data;
//armo el par {{value ... label.. } ......}
let options = lista.map(elemento => {
let item = {};
item.value = elemento.id;
item.label = elemento.name;
return item;
});
console.log(options);
// console.log({options: options});
return {options: options};
})
.catch(e => {
this.setState({peticionActiva: false});
if(e.response)
{
let error = '';
error = e.response.data.message;
console.log(error);
// this.setState({errorApi: error});
}
});
}
}
Printing to the console, the data comes in and looks like the following:
I developed a system with symfony 5 and now I have deployed to hosting. Migrate the files by fpt and everything is perfect. However, when I run the system I get the following error:
Uncaught LogicException: Extension DOM is required.
The system in the hosting is in php 7.4 On the other hand, my index file is configured as:
<?php
use App\Kernel;
use Symfony\Component\ErrorHandler\Debug;
use Symfony\Component\HttpFoundation\Request;
require '/home12/eisenluk/symfony/config/bootstrap.php';
require '/home12/eisenluk/symfony/vendor/autoload.php';
if ($_SERVER['APP_DEBUG']) {
umask(0000);
Debug::enable();
}
if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST);
}
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
Request::setTrustedHosts([$trustedHosts]);
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
On the other hand my .htaccess file set my env:
SetEnv APP_ENV prod
SetEnv DATABASE_URL 'mysql://eisenluk_user:Hm2DsQL9h@[email protected]:3306/eisenluk_sql'
If you can guide me on how to configure it, thank you!
I have a component called app that is responsible for rendering a menu bar with options. One of the options is login .
When the user successfully logs in via request with axios, I am interested in returning a boolean variable that indicates that the login is successful . Following the following tutorial: link I was able to implement the following code that I attach.
The problem is that it is not executing the method in the parent
The following parent app component is implemented:
class App extends React.Component {
constructor(props){
super(props);
this.state = ({
isUserLogin: false
})
this.myCallback = this.myCallback.bind(this);
}
//funcion ques se ejecutaria cuando se retornen los datos
myCallback = (dataFromChild) => {
// [...we will use the dataFromChild here...]
alert('soy el padre' + dataFromChild);
}
// ref: https://gist.github.com/darklilium/183ce1405788f2aef7e8
render() {
return (
<>
<BrowserRouter>
<>
{ (this.state.isLoggedIn) ? null : <NavBar /> }
{/* <NavBar /> */}
<div className="container">
<Switch>
<Route exact path="/" component={Home} />
<Route exact path="/login" component={Login} callbackFromParent={this.myCallback}/>
</Switch>
</div>
<PiePagina />
</>
</BrowserRouter>
</>
);
}
}
ReactDOM.render(
<App />,
document.getElementById('root')
);
In its child called Login I have implemented the following logic (I copy the main part so that it is not extensive):
class Login extends React.Component {
constructor(props){
super(props);
this.state = ({
username:'',
password:'',
errors: {},
errorApi: ''
})
this.cambioUsername = this.cambioUsername.bind(this);
this.cambioPassword = this.cambioPassword.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.consumirApiLogin = this.consumirApiLogin.bind(this);
this.validarFormulario = this.validarFormulario.bind(this);
}
consumirApiLogin() {
const payload={
"_username":this.state.username,
"_password":this.state.password,
}
axios.post(API_LOGIN, payload)
.then(response => {
// console.log(response.data.token);
// this.setState({errorApi: response.data})
// console.log(this.state.errorApi);
sessionStorage.setItem('AccessToken', response.data.token);
// INTENTO LLAMAR AL METODO DEL PADRE, PERO NO EJECUTA NADA
// TAMPOCO GENERA UN ERROR EN LA CONSOLA
this.props.callbackFromParent('hijo');
})
.catch(e => {
if(e.response)
{
let error = '';
error = e.response.data.message;
this.setState({errorApi: error});
}
});
}
If you can guide me, thank you very much!
I am developing a query to an api using axios with react . The responses arrive correctly but I am not being able to update the status of a variable, which shows errors from the server or correct login
In the console, it tells me that the this operator is undefined.
The code of my function is the following:
consumirApiLogin() {
const payload={
"_username":this.state.username,
"_password":this.state.password,
}
axios.post(API_LOGIN, payload)
.then(function (response) {
this.setState({errorApi: response.data})
})
.catch(function (e) {
console.log(e);
let error = '';
if(e.response)
{
let error = e.response.message;
}
this.setState({errorApi: error})
});
}
My constructor is the following:
constructor(props){
super(props);
this.state = ({
username:'',
password:'',
errors: {},
errorApi: ''
})
this.cambioUsername = this.cambioUsername.bind(this);
this.cambioPassword = this.cambioPassword.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.consumirApiLogin = this.consumirApiLogin.bind(this);
this.validarFormulario = this.validarFormulario.bind(this);
}
Any help is welcome! Greetings!
I am learning the use of routing following the following tutorial . Where bootstrap is imported and a navbar is used to navigate between pages. The component and the following function are declared:
getNavLinkClass = (path) => {
return this.props.location.pathname === path ? 'active' : '';
}
But when transpiling I get the following error:
getNavLinkClass = (path) => {
| ^
| return this.props.location.pathname === path
? 'active' : '';
| }
| render() {
Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL)
to the 'plugins' section of your Babel config to enable transformation.
at parser.next (<anonymous>)
at normalizeFile.next (<anonymous>)
at run.next (<anonymous>)
at transform.next (<anonymous>)
@ ./assets/js/app.js 25:0-56
In my package.json I have the following configured:
{
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/preset-env": "^7.9.5",
"@babel/preset-react": "^7.9.4",
"@symfony/webpack-encore": "^0.29.1",
"babel-preset-react": "^6.24.1",
"bootstrap": "^4.4.1",
"prop-types": "^15.7.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"webpack-notifier": "^1.8.0"
},
"dependencies": {
"node-sass": "^4.14.0"
}
}
Edit Add the following .babel file
{
"plugins": [
["@babel/plugin-proposal-class-properties"]
]
}
Because it was not incorporated. It does not show the first error but now it generates the following:
Syntax Error: C:\xampp\htdocs\web_cotizacion_repuestos\assets\js\app.js:
Unexpected token (17:8)
15 | render() {
16 | return (
> 17 | <div>
| ^
If you can guide me how to solve it, or throw me a line. In my project I don't have a specific babel config file, could it be that???
Is there a way to pass the validations that are done on the fields of a reactive form (in the .html) to the component file (.ts). So that the template is clean and without the logic.
For example, I have a form with the following logic
<div class="form-group">
<label for="correo">Correo</label>
<input formControlName="correo" type="text" class="form-control" id="correo" placeholder="Ingrese su correo">
<small id="nombreHelp" class="form-text text-muted">No mostraremos tu correo.</small>
</div>
<div class="errorCodigo"
*ngIf="formulario.controls.correo.touched &&
formulario.controls.correo.hasError('pattern')">
El formato del correo no es valido
</div>
<div class="errorCodigo"
*ngIf="formulario.controls.correo.touched &&
formulario.controls.correo.hasError('required')">
El campo es requerido
</div>
How can I move the validations that are shown with the ngIf to the component, so that it is the one that returns the corresponding error?
Hello, when running an example of the following page https://oracle-base.com/articles/9i/consuming-web-services-9i
The oracle developer generates an error with the acl that says the following:
ORA-29273: fallo de la solicitud HTTP
ORA-06512: en "SYS.UTL_HTTP", línea 1130
ORA-24247: acceso de red denegado por la lista de control de acceso (ACL)
ORA-06512: en "xxxxxx.SOAP_API", línea 150
ORA-06512: en "xxxxx.ADD_NUMBERS", línea 34
29273. 00000 - "HTTP request failed"
*Cause: The UTL_HTTP package failed to execute the HTTP request.
*Action: Use get_detailed_sqlerrm to check the detailed error message.
Fix the error and retry the HTTP request.
How can I solve it? What dou you recommend?
I am working on a symfony 2.8 project, I had the project versioned with svn but now we are starting to work with git
When synchronizing my local repository with the cloud, and trying to run it, I get the following error
An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "_assetic_c49beaa_0" as such route does not exist.").
Could it be that I need to install some vendor? Or am I missing some configuration?
Any guidance is welcome!
Hi I'm installing angular on my pc (ub
with the following command sudo npm install -g @angular/cli
I have
npm -v 6.10.1
node -v v12.6.0
and it generates the following error
sudo npm install -g @angular/cli
sudo: imposible resolver el anfitrión P8534
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to https://registry.npmjs.org/@angular%2fcli failed, reason: write EPROTO 139783343089472:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /home/desarrollo/.npm/_logs/2019-07-16T20_21_44_897Z-debug.log
Additionally, I tried to do an npm cache clear and I got the following error:
As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent,
use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use
`npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one.
If someone can guide me on how to fix it, thank you very much!
I have defined a function in which I use the pager, used in my controllers it works correctly. However, when I define a service to not copy and paste the code, I have the following:
app.paginacion:
class: Caja\SiafcaInternetBundle\Services\Paginacion
public: true
arguments: ["@knp_paginator"]
In my config.yml
knp_paginator:
page_range: "%knp_paginator_page_range%"
default_options:
page_name: "%knp_paginator_page_name%"
sort_field_name: "%knp_paginator_sort_field_name%"
sort_direction_name: "%knp_paginator_sort_direction_name%"
distinct: "%knp_paginator_distinct%"
template:
pagination: "%knp_paginator_pagination%"
sortable: "%knp_paginator_sortable%"
And in my controller I define the following class
class Paginacion{
private $paginator;
public function __contruct($paginator){
$this->$paginator = $paginator;
}
public function obtenerPaginacion($request,$aportantesWS,$totalAportantes)
{
if (!$aportantesWS)
{
$pagination = null;
}
else
{
// $paginator = $this->get('app.knp_paginator');
$pagination =
$this->paginator->paginate(
$aportantesWS,
$request->query->getInt('page', 1),
20
);
$pagination->setTotalItemCount($totalAportantes);
}
return $pagination;
}}
For example calling it:
$this->get('app.paginacion')->obtenerPaginacion($request,$aportantesWS,$totalAportantes)
When I try to use it, it generates the following error Error: Call to a member function paginate() on null Checking with dump() the request data , contributorsWS and totalcontributors come back non-null, that is, with data.
I am developing a login with Symfony 3.4. When I try to enter with said login, it generates the error Invalid credentials. . I went ahead and implemented the login following the following tutorial link . In my database I have the following:
Whose sql structure is as follows:
I implemented my user class:
/**
* Usuario
*
* @ORM\Table(name="usuario")
* @ORM\Entity(repositoryClass="ComensalesBundle\Repository \UsuarioRepository")
*/
class Usuario implements UserInterface
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="nombreUsuario", type="string", length=255)
*/
private $nombreUsuario;
/**
* @var string
*
* @ORM\Column(name="contrasenia", type="string", length=255)
*/
private $contrasenia;
/**
* @var string
*
* @ORM\Column(name="rolUsuario", type="string", length=255)
*/
private $rolUsuario;
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set nombreUsuario
*
* @param string $nombreUsuario
*
* @return Usuario
*/
public function setNombreUsuario($nombreUsuario)
{
$this->nombreUsuario = $nombreUsuario;
return $this;
}
/**
* Get nombreUsuario
*
* @return string
*/
public function getNombreUsuario()
{
return $this->nombreUsuario;
}
/**
* Set contrasenia
*
* @param string $contrasenia
*
* @return Usuario
*/
public function setContrasenia($contrasenia)
{
$this->contrasenia = $contrasenia;
return $this;
}
/**
* Get contrasenia
*
* @return string
*/
public function getContrasenia()
{
return $this->contrasenia;
}
/**
* Set rolUsuario
*
* @param string $rolUsuario
*
* @return Usuario
*/
public function setRolUsuario($rolUsuario)
{
$this->rolUsuario = $rolUsuario;
return $this;
}
/**
* Get rolUsuario
*
* @return string
*/
public function getRolUsuario()
{
return $this->rolUsuario;
}
public function getUsername()
{
return $this->nombreUsuario;
}
public function getSalt()
{
return null;
}
public function getRoles()
{
// En este caso definimos un rol fijo, en el caso de que tengamos un campo role en la tabla de la BBDD tendríamos que hacer $this->getRole()
return array('ROLE_USER');
}
public function eraseCredentials()
{
}
public function getPassword()
{
return $this->contrasenia;
}
// NO PERSISTIDO EN LA BD
private $plainPassword;
public function getPlainPassword()
{
return $this->plainPassword;
}
public function setPlainPassword($plainPassword)
{
$this->plainPassword = $plainPassword;
}
}
On the other hand, I configured my service.yml
providers:
user_provider:
entity:
class: ComensalesBundle:Usuario
property: nombreUsuario
encoders:
ComensalesBundle\Entity\Usuario:
algorithm: bcrypt
firewalls:
# disables authentication for assets and the profiler, adapt it according to your needs
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
anonymous: ~
form_login:
login_path: login
check_path: login
logout:
path: /logout
target: /login
access_control:
- { path: ^/registro, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/, roles: ROLE_USER }
The controller that shows me the form
namespace ComensalesBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Request;
class DefaultController extends Controller
{
/**
* @Route("/login", name="login")
*/
public function loginAction(Request $request)
{
// Recupera el servicio de autenticación
$authenticationUtils = $this->get('security.authentication_utils');
// Recupera, si existe, el último error al intentar hacer login
$error = $authenticationUtils->getLastAuthenticationError();
// Recupera el último nombre de usuario introducido
$lastUsername = $authenticationUtils->getLastUsername();
// Renderiza la plantilla, enviándole, si existen, el último error y nombre de usuario
return $this->render('login.html.twig', array(
'last_username' => $lastUsername,
'error' => $error,
));
}
/*
* @Route("/logout", name="logout")
*/
public function logoutAction(Request $request)
{
// UNREACHABLE CODE
}
}
The template does not have many secrets:
{% extends 'base.html.twig' %}
{% block body %}
{# Muestra el error en caso de existir#}
{% if error %}
<div>{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
<form action="{{ path('login') }}" method="post">
{# Input para el campo email #}
<label for="username">Email:</label>
<input type="text" id="username" name="_username" value="{{ last_username }}" />
{# Input para el campo contraseña #}
<label for="password">Contraseña:</label>
<input type="password" id="password" name="_password" />
{# Ruta a la que redirige si hay éxito #}
<input type="hidden" name="{{path('ventas_panel')}}" value="/" />
<button type="submit">Entrar</button>
</form>
{# Enlace al registro #}
{# <p><a href="{{ path('register') }}">Registro</a></p>#}
{% endblock %}
When I try to enter, with the user and pass registered in the database, it generates a credential error. It occurs to me that the error may be a data type or conversion problem. If you can guide me I would appreciate it.
Edit: I copy a part of the log: security.INFO: Authentication request failed. {"exception":"[object] (Symfony\Component\Security\Core\Exception\BadCredentialsException(code: 0): Bad credentials. Maybe it's relevant to help me. Thanks!
I am starting to develop an app with android studio with jre and jvm that I copy below.
Android Studio 3.2.1
Build #AI-181.5540.7.32.5056338, built on October 8, 2018
JRE: 1.8.0_152-release-1136-b06 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
When executing a project, it gives me the following error
Unable to locate adb
I reported it to google and I have searched in other forums where they affirm that avast (in my case) would have eliminated the adb.exe file, I looked in the virus chest and I did not see it. Deactivate the antivirus, uninstall and install the android studio and I still have the same problem.
Also, run rebolding and clear project, getting the same error. If someone could solve it or can guide me or pass me a forum in which it is solved, I would be very grateful. Thank you
I created a repository on github to upload an academic project that I am doing. Install the gitbash to work on windows with the command console, set the global variables of user.name user.email .
Run the following statements
git add
git commit - m"primer commit"
git remote add origin https://github.com/cristian16b/SICU.git
The problem happens when git push
because it gives me the following error shown in the screenshot:
If you can guide me or give me any recommendation, it will be welcome. I'm taking my first steps with git. Thank you very much
I am developing a web shift management system with symfony 3.4, jquery and ajax. In a form, the user selects a venue and a date and must press a button to obtain the available shifts. I cannot get the response from the server or the request is not being executed. It is the first time that I apply ajax.
The script that should send me the data by POST is the following:
//AJAX CON JQUERY
$("#actualizar").on("click",consultarTurnos);
function consultarTurnos()
{
var sede = $("#sede").val();
var fecha = $("#fecha").val();
$.ajax
({
method: 'GET',
url: '/turnos',
data: datos,
dataType: 'json',
success: function (respuesta)
{
// alert('la respuesta es ' + respuesta);
$("#respuesta").html(data);
},
error : function(xhr, status)
{
alert('hay error');
//alert('ERROR -> '. status);
}
});
}
</script>
The html code is the following:
<div class="col-lg-4 col-md-4">
<select class="form-control"
name="sede"
id="sede"
required=""
onchange="guardarSede();">
<option disabled selected hidden>Seleccione la sede</option>
<option value="1">Predio UNL - ATE</option>
<option value="2">Rectorado</option>
<option value="3">Esperanza</option>
</select>
</div>
<div class="col-lg-4 col-md-4">
<input class="form-control"
type="text"
id = "datepicker"
required=""
placeholder="Seleccione la fecha"
onchange="guardarFecha();"
disabled
/>
<textarea
name="fecha"
id="fecha"
style = "display:none"
onchange="habilitarTurno();">
</textarea>
<!-- -->
</div>
<div class="col-lg-2 col-md-2">
<button class="btn btn-default"
name ="actualizar"
id="actualizar"
type="button">Actualizar </button>
</div>
The method that should receive the information and respond in json format is as follows:
/**
* @Route("/turnos",name="turnos")
*/
public function buscarTurnos(Request $request)
{
//var_dump($_GET);
if($request->isXmlHttpRequest())
{
$sede = $request->request->get('sede');
$fecha = new \DateTime($request->request->get('fecha'));
$db = $this->getDoctrine()->getEntityManager();
$qb = $db->createQueryBuilder();
//escribo la consuLta
$qb->select('t.dia,t.horario,t.cupo')
->from('ComensalesBundle:Turno','t')
->where('t.dia = :fecha')
->andWhere('t.sede = :sede')
->setParameter('fecha',$fecha)
->setParameter('sede',$sede)
;
//genero
$q = $qb->getQuery();
//consulto
//$resultado = $q->getResult();
$resultado = $q->getArrayResult();
//retorno
return new JsonResponse($resultado);
}
return $this->redirect($this->generateUrl('final'));
}
Entering the browser console, it shows the following: From what I see, it is being sent by getting the information but it is not getting the response from the server.
The searchTurnos() mysql query works correctly and the method returns the response in json format as expected. I guess the error is in how I use ajax with jquery. Any collaboration will be eternally grateful. Greetings Christian
I am learning symfony 3.4 and I am trying to link a route with a view. When I run the program using the path:
http://127.0.0.1:8000/home
It generates the following: Unable to find template "BlogBundle::start.html.twig"
My routing.yml file is as follows:
blog:
resource: "@BlogBundle/Controller/"
type: annotation
prefix: /
app:
resource: "@AppBundle/Controller/"
type: annotation
My controller is the following:
<?php
namespace BlogBundle\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
class DefaultController extends Controller
{
/**
* @Route("/home",name="home_route")
* @Method({"GET"})
*/
public function indexAction()
{
//esta sentencia funciona
//return new Response('<html><body>hola mundo</body></html>' );
//
return $this->render('BlogBundle::inicio.html.twig');
}
}
My file inicio.html.twig
is the following:
Hello World!
If someone can guide me on how to solve this problem or any suggestion will be well received, I'm a bit complicated and I'm just starting.