This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So i was using Rails 4.1 with Unicorn v4.8.2 and when i tried to deploy my app it doesn't start properly and into the unicorn.log file i found this error message: | |
"app error: Missing `secret_key_base` for 'production' environment, set this value in `config/secrets.yml` (RuntimeError)" | |
After a little research i found that Rails 4.1 change the way to manage the secret_key, so if we read the secrets.yml file located at exampleRailsProject/config/secrets.yml (you need to replace "exampleRailsProject" for your project name) you will find something like this: | |
# Do not keep production secrets in the repository, | |
# instead read values from the environment. | |
production: | |
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
besoin : "recuperer la liste des devises étrangeres" | |
getListForeignDevise() { | |
getListDevise(['EUR']) | |
} | |
assert getListForeignDevise() == ['YEN', 'USD'] | |
En tant q'utilisateur |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package view.form; | |
/** | |
* Created by antoineomnes on 05/06/2017. | |
*/ | |
class MainThread { | |
public void startMyThread() { | |
Object requiredObject = new Object(); //Map/List/OwnClass | |
Thread myThread = new Thread(new RunnableObject(requiredObject)).start(); | |
myThread.join(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package view.thread; | |
import javax.swing.JOptionPane; | |
import controler.G_Joueur; | |
import view.form.Fenetre; | |
import view.form.FenetreJeu; | |
import javax.swing.*; | |
public class VerifGagnant extends JFrame implements Runnable { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void actionPerformed(ActionEvent arg0) { | |
ZDialog zd = new ZDialog(null, "General.io", true); | |
System.out.print(ZDialog.nb_ouverture); | |
nb_partie = ZDialog.nb_ouverture; | |
nom_a = zd.get_nom_r(); | |
nom_b = zd.get_nom_b(); | |
actualiser_param(); | |
ZDialogInfo zInfo = zd.showZDialog(); | |
JOptionPane jop = new JOptionPane(); | |
jop.showMessageDialog(null, zInfo.toString(), "Data Game", JOptionPane.INFORMATION_MESSAGE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
var count int = 0 | |
s := make([]bool, 120) | |
for i := 1; i <= 120; i++ { | |
for j := 0; j < 120; j += i { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T21:39:06+02:00) | |
Maven home: /usr/local/Cellar/maven/3.5.0/libexec | |
Java version: 1.8.0_144, vendor: Oracle Corporation | |
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre | |
Default locale: fr_FR, platform encoding: UTF-8 | |
OS name: "mac os x", version: "10.13.1", arch: "x86_64", family: "mac" | |
[DEBUG] Created new class realm maven.api | |
[DEBUG] Importing foreign packages into class realm maven.api | |
[DEBUG] Imported: javax.enterprise.inject.* < plexus.core | |
[DEBUG] Imported: javax.enterprise.util.* < plexus.core |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class Singleton<T> : MonoBehaviour where T : Singleton<T> | |
{ | |
protected static T instance; | |
/** | |
Returns the instance of this singleton. | |
*/ | |
public static T Instance |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using UnityEngine; | |
public class AutoReferencer<T> : MonoBehaviour where T : AutoReferencer<T> { | |
#if UNITY_EDITOR | |
// This method is called once when we add component do game object | |
protected new virtual void Reset() | |
{ | |
// Magic of reflection |
OlderNewer