Here I'll show you
- How to override devise registrations_controller(related to create/update user account)
- How to change redirect path after updating user
| /* | |
| * Copyright 2014 Google Inc. All rights reserved. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| public function etudiantExistant($ca,$cin,$cne) | |
| { | |
| $q = $this->db->prepare('SELECT count(*) FROM licence WHERE ca = :ca AND cin = :cin AND cne = :cne '); | |
| $q->bindValue(':ca', $ca); | |
| $q->bindValue(':cin', $cin); | |
| $q->bindValue(':cne', $cne); | |
| $q->execute(); | |
| $number_of_rows = $result->fetchColumn(); | |
| if ($number_of_rows > 0){ | |
| return true; |
This error means that there is a duplicated library used on one or many libraries.
To fix it, we should exclude them from our dependencies. On the build.gradle add the following line
dependencies {...}
configurations {
all*.exclude group: 'x', module: 'library'
}
| #!/bin/sh | |
| ADB_PATH="/Users/medyo/Library/Android/sdk/platform-tools" | |
| PACKAGE_NAME="com.mobiacube.elbotola.debug" | |
| DB_NAME="default.realm" | |
| DESTINATION_PATH="/Users/Medyo/Desktop/" | |
| NOT_PRESENT="List of devices attached" | |
| ADB_FOUND=`${ADB_PATH}/adb devices | tail -2 | head -1 | cut -f 1 | sed 's/ *$//g'` | |
| if [[ ${ADB_FOUND} == ${NOT_PRESENT} ]]; then | |
| echo "Make sure a device is connected" | |
| else |
| #!/bin/bash | |
| NOW="$(date +"%Y-%m-%d")" | |
| FILENAME=$OPENSHIFT_APP_NAME.$NOW.backup.sql.gz | |
| DATABASE_PATH=$OPENSHIFT_DATA_DIR/db_backups/$FILENAME | |
| # Create db_backups folder if not existing | |
| cd $OPENSHIFT_DATA_DIR && mkdir -p db_backups && cd db_backups | |
| # Dump the postgresql database (for Mysql database, check the bottom of this page) | |
| /opt/rh/postgresql92/root/usr/bin/pg_dump -h $OPENSHIFT_POSTGRESQL_DB_HOST -p $OPENSHIFT_POSTGRESQL_DB_PORT -F c $OPENSHIFT_APP_NAME > $FILENAME |
| #!/usr/bin/env bash | |
| # | |
| # Dropbox Uploader | |
| # | |
| # Copyright (C) 2010-2017 Andrea Fabrizi <[email protected]> | |
| # | |
| # This program is free software; you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation; either version 2 of the License, or | |
| # (at your option) any later version. |
| # tables for owned by 'tableowner' | |
| select 'drop table if exists "' || tablename || '" cascade;' from pg_tables where tableowner='tableowner'; | |
| # all sequences | |
| select 'drop sequence if exists "' || relname || '" cascade;' from pg_class where relkind = 'S'; |
| package com.google.android.youtube.player; | |
| /** | |
| * Please create this directories schema com.google.android.youtube.player and post the file there | |
| */ | |
| import android.os.Bundle; | |
| import android.util.AttributeSet; | |
| import android.view.LayoutInflater; | |
| import android.view.View; |