rules

Firebase Rules: Allow only Specific URL?

穿精又带淫゛_ 提交于 2020-08-24 09:55:54
问题 I have a firebase realtime database. And i have a "like" button app for my website. But my database is not safe, because everyone can write to my database. I want is : "allow only incoming data from my website. And block incoming from other sites" For example: { "rules": { ".read": true, ".write": allow only incoming data from "www.example.com" and block incoming from other sites } } How can I do this? Or how can I set this rule on Firebase console? 回答1: If I understand correctly what you are

Firebase Rules: Allow only Specific URL?

吃可爱长大的小学妹 提交于 2020-08-24 09:52:49
问题 I have a firebase realtime database. And i have a "like" button app for my website. But my database is not safe, because everyone can write to my database. I want is : "allow only incoming data from my website. And block incoming from other sites" For example: { "rules": { ".read": true, ".write": allow only incoming data from "www.example.com" and block incoming from other sites } } How can I do this? Or how can I set this rule on Firebase console? 回答1: If I understand correctly what you are

Laravel validation: exists two column same row

人走茶凉 提交于 2020-08-03 09:17:59
问题 Is there a way of referencing another field when specifying the exists validation rule in Laravel? My request : public function rules() { return [ 'numero_de_somme' => 'unique:personnels,numero_de_somme|exists:fonctionnaire,num_somme', 'cin' => 'unique:personnels,cin|exists:fonctionnaire,cin', ]; } in my validation rules I want to be able to make sure that: num_somme exists within the fonctionnaire table cin exists within the fonctionnaire table and cin input must be on the same row of the

Java - Generic Drools rule

╄→гoц情女王★ 提交于 2020-07-10 10:28:38
问题 I would like to create my rule more Generic format which mean it should be validate the fields and values. Following my POJO structure. public class RulesModel private String field; private List<String> values; // other stuff And my rule rule "sample" when $rule : RulesModel( field == "source", values contains "facebook", values contains "youtube", value not contains "instagram" ) then // actions end It's working fine to validate single field, but i want to validate the multiple fields of

Java - Generic Drools rule

折月煮酒 提交于 2020-07-10 10:28:04
问题 I would like to create my rule more Generic format which mean it should be validate the fields and values. Following my POJO structure. public class RulesModel private String field; private List<String> values; // other stuff And my rule rule "sample" when $rule : RulesModel( field == "source", values contains "facebook", values contains "youtube", value not contains "instagram" ) then // actions end It's working fine to validate single field, but i want to validate the multiple fields of

Define a type for an object where all values have the same type

寵の児 提交于 2020-06-26 12:09:34
问题 I'm trying to define a type for an object, such that every value of the object has the same type, and must have the same keys. I'd like to be able to do this where every value has the same keys, defined as the union of the types of all the values. const test = { a: { // I'd like to see a type error on this line x: 1, }, b: { x: 1, y: 2, }, } It's possible when you define the type in advance: interface IA { [key: string]: { x: number; y: number; } } const test: IA = { a: { // now we get a type

Can somebody walk me through what this question is trying to ask of me?

◇◆丶佛笑我妖孽 提交于 2020-02-25 16:58:00
问题 The following programming languages question seems really unclear and what it wants me to do is not obvious to me, could somebody help me to understand it? The question: Implement part of a recursive descent parser for a simple set of language rules. Use any programming language for the implementation; if it isn’t a common language, please make a note of which language it is in a comment. You should implement functions for each of the nonterminal symbols and, using the following rules that

Can somebody walk me through what this question is trying to ask of me?

自闭症网瘾萝莉.ら 提交于 2020-02-25 16:57:11
问题 The following programming languages question seems really unclear and what it wants me to do is not obvious to me, could somebody help me to understand it? The question: Implement part of a recursive descent parser for a simple set of language rules. Use any programming language for the implementation; if it isn’t a common language, please make a note of which language it is in a comment. You should implement functions for each of the nonterminal symbols and, using the following rules that

Can somebody walk me through what this question is trying to ask of me?

谁说胖子不能爱 提交于 2020-02-25 16:56:33
问题 The following programming languages question seems really unclear and what it wants me to do is not obvious to me, could somebody help me to understand it? The question: Implement part of a recursive descent parser for a simple set of language rules. Use any programming language for the implementation; if it isn’t a common language, please make a note of which language it is in a comment. You should implement functions for each of the nonterminal symbols and, using the following rules that

Can somebody walk me through what this question is trying to ask of me?

好久不见. 提交于 2020-02-25 16:53:07
问题 The following programming languages question seems really unclear and what it wants me to do is not obvious to me, could somebody help me to understand it? The question: Implement part of a recursive descent parser for a simple set of language rules. Use any programming language for the implementation; if it isn’t a common language, please make a note of which language it is in a comment. You should implement functions for each of the nonterminal symbols and, using the following rules that