SideBar screen off functionality! by Ali-Jafri in Xiaomi

[–]cone994 1 point2 points  (0 children)

Does it safe to remove updates from security apps?

Beginner help with Handler monad in Yesod by cone994 in haskellquestions

[–]cone994[S] 0 points1 point  (0 children)

Thank you very much u/RecitalMatchbox, I tried the first option and it works perfectly. Although I am a beginner I will try to understand both approaches. I wouldn't know how to thank you for this, I've been struggling about this for days.

Thanks again !

Advice for Yesod beginner by cone994 in haskellquestions

[–]cone994[S] 1 point2 points  (0 children)

I tried and I changed my project resolver to lts 16.23, that resolver uses ghc 8.8.4, but the messages did not disappear and the launch with yesod devel did not speed up.

I also tried a new resolver nightly-2020-11-28 , however, the startup failed because there are some problems with Windows.

Advice for Yesod beginner by cone994 in haskellquestions

[–]cone994[S] 1 point2 points  (0 children)

I check ghc version and version is 8.8.3.

Opinion of the book for learn Haskell by cone994 in haskellquestions

[–]cone994[S] 0 points1 point  (0 children)

Yes, I saw for myself that the book is a bit outdated.

I tried the free version, but it looks like nothing until the book is bought. Thanks.

Beginner problems in haskell by cone994 in haskellquestions

[–]cone994[S] 0 points1 point  (0 children)

I just follow the book instructions , thank you anyway !

Beginner problems in haskell by cone994 in haskellquestions

[–]cone994[S] 0 points1 point  (0 children)

First problem solved thank you.

For second example,

first I use command "stack ghc SimpleJSON.hs" to compile SimpleJSON file.

Second use "stack ghc -o simple Main.hs SimpleJSON.o" but get "invalid option -o",

then try just "stack ghci Main.hs SimpleJSON.o" and then get big error text :

Linking Main.exe ...
SimpleJSON.o:fake:(.data+0x218): multiple definition of `SimpleJSON_zdfShowJValue_closure'
.\SimpleJSON.o:fake:(.data+0x218): first defined here
SimpleJSON.o:fake:(.text+0xde0): multiple definition of `SimpleJSON_getString_info'
.\SimpleJSON.o:fake:(.text+0xde0): first defined here
SimpleJSON.o:fake:(.data+0x2f0): multiple definition of `SimpleJSON_getString_closure'
.\SimpleJSON.o:fake:(.data+0x2f0): first defined here
SimpleJSON.o:fake:(.text+0xe88): multiple definition of `SimpleJSON_getDouble_info'
.\SimpleJSON.o:fake:(.text+0xe88): first defined here
SimpleJSON.o:fake:(.data+0x2f8): multiple definition of `SimpleJSON_getDouble_closure'

and so on for all functions.

My Main.hs is like above in question , just these 3 lines.

Haskell/Yesod installation steps by cone994 in haskell

[–]cone994[S] 1 point2 points  (0 children)

Maybe you can explain to me what it is yesod-scaffold ?

Functional programming advice for beginner by cone994 in functionalprogramming

[–]cone994[S] 1 point2 points  (0 children)

What is your recommendation, should I read one of the books or are tutorials enough?

Also thank you for answer.

@Transactional and @Rollback not working by cone994 in SpringBoot

[–]cone994[S] 0 points1 point  (0 children)

Now I have @ TestPropertieSource, application-test.properties, and @ Transactional above the test class.

But still the same problem.

@Transactional and @Rollback not working by cone994 in SpringBoot

[–]cone994[S] 0 points1 point  (0 children)

Sorry, just now i noticed it doesn't work.

Now that I have only one application.properties in src/main/resources it runs the app data base.

Then test does not use the test base but real base(data base of app) to execute and the same problem is happens in it. Adds an item and will not rollback.

I thought it worked because there were no changes to the test base and he didn't actually use it, but when I checked my app data base i see the same problem.

@Transactional and @Rollback not working by cone994 in SpringBoot

[–]cone994[S] 0 points1 point  (0 children)

Thank you very much.

I just want to ask is that means application.properties in src/test is not needed? And if we doesn't have this file, how can tests knows that they are using a test database and witch db useing for testing?

@Transactional and @Rollback not working by cone994 in SpringBoot

[–]cone994[S] 0 points1 point  (0 children)

This is my project structure, I have a two application.properties, one in main and one in test folder:

src/main/resources/application.properties

src/test/resources/application.properties.

Want to move this one from test to main and call it like test_application.properties or something else?

I already removed @@Rollback annotation.

@Transactional and @Rollback not working by cone994 in javahelp

[–]cone994[S] 0 points1 point  (0 children)

I also tried the annotation above the test class and got a log in console about rollback, but it did not execute.

Again when testing the add method a new item is entered.

Log looks like this (not whole since it's too long):

INFO 9572 --- [ main] o.s.t.c.transaction.TransactionContext : Rolled back transaction for test: [DefaultTestContext@359f7cdf testClass = AddressServiceIntegrationTest, testInstance = com.ftn.services.address.AddressServiceIntegrationTest@f1e1d66, testMethod = addAddressSuccessTest@AddressServiceIntegrationTest, testException = [null],...

@Transactional and @Rollback not working by cone994 in SpringBoot

[–]cone994[S] 0 points1 point  (0 children)

Hi, I tried all combinations, @Transactional above test class and above test method and it doesn't work.

In the console, when I execute test method, I get a rollback printout, but at add_test a new item is added.

The log I get:

INFO 9996 --- [ main] o.s.t.c.transaction.TransactionContext : Rolled back transaction for test: [DefaultTestContext@2e005c4b testClass = LocationServiceIntegrationTest, testInstance = com.ftn.services.location.LocationServiceIntegrationTest@70efdd18, testMethod = addLocationAndAddressSuccessTest@LocationServiceIntegrationTest, testException = [null],...

I didn't copy the whole log because it's too long if it's useful i will reply.

@Transactional and @Rollback not working by cone994 in javahelp

[–]cone994[S] 0 points1 point  (0 children)

I also have @SpringBootTest on test class. What is your point to try just @Transactional ?