Google Translate proxy test broken

It seems the Google translate proxy test is broken, it’s reporting 100% failed proxies, but when I use them to translate (without testing), there’s no problem and everything is translated fine.

Also, SER keeps collapsing groups of projects that I don’t want to be collapsed. When I save a project, groups are collapsed. When I close and re-open SER, groups are collapsed. Is there some config file that causes this? Why does it happen?

[AZcaptcha] Recaptcha v2 token + 15.000 Image captcha solver. 25% off for GSA [FREE CREDIT FOR TEST]

Captcha Decoder Unlimited reCAPTCHA2 Solving – $ 25 / Month Only! +++

Please login or register to receive your 100 captcha solver for FREE and integrate our API in your applications.

Please test your captcha here https://azcaptcha.com/demo

ESASY integrate with GSA software 

Captcha solving is a serious project and business. It is hard to accept that it is costly and can never be cheap. However, AZcaptcha.com has came up with a unique way of offering a premium captcha solving service with other desired benefits targeted on the user’s finances.

The Captcha Decoder V.I.P. package is a membership plan offered to a limited number of users through a monthly payment subscription. Which means all V.I.P. members pays only 1’s a month and solves captchas FREE unlimitedly.

V.I.P. Member Benefits

– Unlimited FREE Captcha Solving on normal image captchas.
– Unlimited FREE Captcha Solving on reCAPTCHA v2 captchas.
– Premium support…
– NO MORE pay-as-you-go credit fees!
– Unlimited A.P.I. access calls.
– Faster solving rate and time.

Price

Price only $ 25.00 a month or 
$ 1.8/1000 Recaptcha solver
and
$ 0.4/1000 Images Captcha decoded

PLEASE USING COUPON to 25% OFF for only GSA USER: GSAWELCOME 

https://azcaptcha.com/

Complexity of brute force primality test in the number of digits

I’m wondering how to express the complexity of a brute force primality testing algorithm in the number of digits the number under test has. The brute force algorithm just checks whether $ n$ is prime by checking if there is a number $ k$ from $ 2 \leq k \leq \lfloor\sqrt{n}\rfloor$ that cleanly divides $ n$ . How would I go about expressing the complexity of this algorithm in the number of digits $ n$ has?

Improvise the code against test cases where code fails

I wrote below code and i want to identify the test cases where my code fails.I recently participated in contest where my one test case is failed to pass out of 15 test cases, I have one more attempt left and I want to identify the possible test cases where my test case failed. so i will improvise the same, in addition I also want to enhance it, meaning,also suggest me the best practice to improve performance.

At last, In the below code I have one method returnFinalComplement(String reverseStr) which return the complement, for calculating complement I have two Approaches, both are doing the same job, I am currenlty using approach-1, but i want to know about approach-2, which approach can pass all the test cases .

import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.SortedSet; import java.util.TreeSet;  /*  * To change this license header, choose License Headers in Project Properties.  * To change this template file, choose Tools | Templates  * and open the template in the editor.  */ /**  *  * @author Ossu  */ class DNAString {      private final static Character[] DATASET = {'A', 'C', 'G', 'T'};     private final static int MIN_RANGE = 0;     private final static int MAX_RANGE = 1000;     private final static String INVALID_CHAR = "Invalid input,not matched with dataset";     private final static String CHAR_LENGTH_EXCEEDS = "Input does not allow to be exceeds more than " + MAX_RANGE + " characters";      private static String returnFinalComplement(String reverseStr) { //APPROACH-1         StringBuilder finalStr = new StringBuilder();         for (char c : reverseStr.toCharArray()) {             finalStr.append(                     c == 'G' ? 'C'                             : c == 'C' ? 'G'                                     : c == 'T' ? 'A'                                             : c == 'A' ? 'T'                                                     : c             );          }         return finalStr.toString();   //APPROACH-2   char[] charlist = list.toCharArray();         for (int i = 0; i < charlist.length; i++) {             switch (charlist[i]) {                 case 'A': {                     charlist[i] = 'T';                 }                 break;                 case 'T': {                     charlist[i] = 'A';                 }                 break;                 case 'G': {                     charlist[i] = 'C';                 }                 break;                 case 'C': {                     charlist[i] = 'G';                 }                 break;             }         }         return new String(charlist);        }       public static boolean validateInput(String input) {         List<Character> chars = new ArrayList<>();         for (char c : input.toCharArray()) {             chars.add(c);         }         boolean result = false;         SortedSet<Character> mySet = new TreeSet<>(chars);         for (int i = 0; i <= mySet.size();) {             for (Character c : mySet) {                 result = Objects.equals(c, DATASET[i]);                 i++;                 if (!result) {                     break;                 }             }             if (result) {                 return result;             } else {                 break;             }         }         return result;      }      public static String reverseIt(String source) {         int i, len = source.length();         StringBuilder dest = new StringBuilder(len);         for (i = (len - 1); i >= 0; i--) {             dest.append(source.charAt(i));         }         return dest.toString();     }      public static void main(String[] args) throws IOException {          BufferedReader readInput = new BufferedReader(new InputStreamReader(System.in));         String source = readInput.readLine();         if (source.length() > MIN_RANGE && source.length() <= MAX_RANGE) {             boolean validateInput = validateInput(source);             if (validateInput) { //                String reverseString = reverseIt(source);                 String reverseString = reverseIt(source);                 System.out.println(returnFinalComplement(reverseString)); //                String revereStringComplement = returnFinalComplement(reverseString);             } else {                 System.out.println(INVALID_CHAR);             }         } else {             System.out.println(CHAR_LENGTH_EXCEEDS);         }     } } 

Should unit test expected results be hardcoded?

Should the expected results of a unit test be hardcoded, or can they be dependant on initialised variables? Do hardcoded or calculated results increase the risk of introducing errors in the unit test? Are there other factors I haven’t considered?

For instance, which of these two is a more reliable format?

[TestMethod] public void GetPath_Hardcoded() {     MyClass target = new MyClass("fields", "that later", "determine", "a folder");     string expected = "C:\Output Folder\fields\that later\determine\a folder";     string actual = target.GetPath();     Assert.AreEqual(expected, actual,         "GetPath should return a full directory path based on its fields."); }  [TestMethod] public void GetPath_Softcoded() {     MyClass target = new MyClass("fields", "that later", "determine", "a folder");     string expected = "C:\Output Folder\" + string.Join("\", target.Field1, target.Field2, target.Field3, target.Field4);     string actual = target.GetPath();     Assert.AreEqual(expected, actual,         "GetPath should return a full directory path based on its fields."); } 

EDIT 1: In response to DXM’s answer, is option 3 a preferred solution?

[TestMethod] public void GetPath_Option3() {     string field1 = "fields";     string field2 = "that later";     string field3 = "determine";     string field4 = "a folder";     MyClass target = new MyClass(field1, field2, field3, field4);     string expected = "C:\Output Folder\" + string.Join("\", field1, field2, field3, field4);     string actual = target.GetPath();     Assert.AreEqual(expected, actual,         "GetPath should return a full directory path based on its fields."); } 

Can the test set of attributes be a subset of the training set’s attributes?

I’m currently writing an application for a trick-based card game, where agents are assigned points based on the accuracy of their predictions of how many hands they’re going to win. The number of tricks predicted will display a level of confidence to the other agents as well as also potentially allowing the agent to choose the Trump suit.

I’ve compiled a set of attributes (such as cards in hand, score sum total in hand) that will be useful in the prediction, but it would be ideal if I could include previous predictions in the training set.

My question is can my test data [attributes] be a subset of the training data [attributes ∩ predictions] both of which are predicting the number of hands that the agent will win?

Autenticar Usuario con Unit Test

tenia tiempo sin hacer alguna pregunta, pero me he visto en la necesidad ya que no consigo algo en la web (quizás estoy haciendo mal la búsqueda).

Bueno le comento de una vez, estoy haciendo pruebas unitarias en Laravel 5.7 y específicamente cuando hago el test para autenticar un usuario, la prueba nunca pasa, aquí mi código:

/** @test */ public function autenticandoUnUsuario() {      $  user = User::where('email', 'test@test.com')->first();     $  this->get('/login')->assertSee('Log in');     $  credentials = [         "email" => $  user->email,         "password" => $  user->password     ];      $  response = $  this->post('/login', $  credentials);     $  response->assertRedirect('/bienvenido');     $  this->assertCredentials($  credentials); } 

El error que me da PHPUnit es este:

F 1 / 1 (100%)

Time: 1.47 seconds, Memory: 16.00MB

There was 1 failure:

1) Tests\Unit\LoginTest::autenticandoUnUsuario Response status code [419] is not a redirect status code. Failed asserting that false is true.

/home/vagrant/Projects/mynewproject/vendor/laravel/framework/src/Illuminate/Foundation/T /home/vagrant/Projects/mynewproject/tests/Unit/LoginTest.php:40

FAILURES! Tests: 1, Assertions: 2, Failures: 1.

Las credenciales son la correctas, debería pasar la prueba. Cuando comento la linea 45 que seria esta:

$  response->assertRedirect('/bienvenido'); 

El error que muestra PHPUnit es otro:

F 1 / 1 (100%)

Time: 2.16 seconds, Memory: 16.00MB

There was 1 failure:

1) Tests\Unit\LoginTest::autenticandoUnUsuario The given credentials are invalid. Failed asserting that false is true.

/home/vagrant/Projects/mynewproject/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php:114 /home/vagrant/Projects/mynewproject/tests/Unit/LoginTest.php:41

FAILURES! Tests: 1, Assertions: 2, Failures: 1.

Intenta validar pero dice que las credenciales no son validas cuando en realidad si lo son, inicio sesion y todo funciona ok.

Espero puedan iluminarme un poco ya que de verdad no se por no funciona.

Saludos

P.D.: Laravel 5.7 tiene 2 carpetas en /tests que son /Feature y /Unit mis pruebas se están guardando en Unit

P-value in Likelihood Ratio Test definition

According to Williams, D.: Weighing the Odds the p-value of observed data in the likelihood ratio setting is defined as

$ $ \mathrm{p_{val}}(y^{obs}) := \mathrm{sup}_{\theta \in B_0} \mathbb{P}\big(\mathrm{lr}(Y) \geq \mathrm{lr}(y^{obs}) \vert \theta \big)$ $

where

$ $ \mathrm{lr}(y) := \frac{\mathrm{sup}_{\theta \in B_A} \mathrm{lhd}(\theta, y)}{\mathrm{sup}_{\theta \in B_0} \mathrm{lhd}(\theta, y)} $ $

where $ \mathrm{lhd}$ is the likelihood function. He further calls it a ‘convoluted concept’, which got me thinking what is the reason for this comment. One thing I realized, which I did not realize before, is that in the first equation the supremum can be achieved by a value of $ \theta^*$ that could have never generated the $ y^{obs}$ (could be $ f_{\theta^*}(y^{obs}) = 0).$ So I thought maybe it would make sense to define something like

$ $ \mathrm{p^{mod}_{val}}(y^{obs}) := \mathrm{sup}_{\theta \in B_0} \bigg (\mathbb{P}\big(\mathrm{lr}(Y) \geq \mathrm{lr}(y^{obs}) \vert \theta \big) \mathbb{P}(y^{obs} \vert \theta) \bigg )$ $

Has this been done before? Does it have some name? What about if we change it to

$ $ \mathrm{p^{mod 2}_{val}}(y^{obs}) := \mathrm{sup}_{\theta \in B_0} \bigg (\mathbb{P}\big(\mathrm{lr}(Y) \geq \mathrm{lr}(y^{obs}) \vert \theta \big) \mathbb{I}_{\mathbb{P}(y^{obs} \vert \theta) > 0} \bigg )$ $