Friday, August 31, 2018

WSSE - XML SOAP security and key encryption and storing (EncryptedData/EncryptedKey)

Leave a Comment
I have now spent the last couple of days to find documentation about this.. I need to send a XML via SOAP with the WSSE security header, but don't know how to encrypt and store the encrypted keys Here is an example <?xml version="1.0" encoding="UTF-8" standalone="no"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"...
Read More

large Navigation Bar backGround gets clear color when swiping back to root viewController

Leave a Comment
Hey guys i've used largeNavigationBar and it's ok until i swipe back to root view controller and large navigation gets clear color in a nasty way. here's the code: func largeNavigationTitle() { self.navigationController?.view.backgroundColor = VVUtility.navigationBarColor() let productTitle = request?.product?.name self.navigationItem.title = "\(productTitle ?? " ")".localized() self.navigationController?.navigationBar.titleTextAttributes...
Read More

Why can't load js file in my local apache2 server?

Leave a Comment
In my local domain's webpage , both jq.src = "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"; jq.src = http://127.0.0.1/js/jquery-3.3.1.min.js can be loaded. In the stackoverflow's webpage,right click to enter into chrome's inspect--console. const jq = document.createElement('script'); jq.src = "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"; document.head.appendChild(jq); jq.addEventListener('load',...
Read More

URL requested a HTTP redirect, but it could not be followed. - Facebook/Nginx issue

Leave a Comment
I have used Facebooks sharing debugger to highlight an issue on the website URL requested a HTTP redirect, but it could not be followed. https://developers.facebook.com/tools/debug/sharing/?q=https%3A%2F%2Fwww.badgerbookings.com This is also stopping it accepting the url in the privacy policy when creating an app. I have researched and made sure to add all OG meta tags. I also "reduced" down the redirects on my nginx to only...
Read More

How to correctly invalidate layout for supplementary views in UICollectionView

Leave a Comment
I am having a dataset displayed in a UICollectionView. The dataset is split into sections and each section has a header. Further, each cell has a detail view underneath it that is expanded when the cell is clicked. For reference: For simplicity, I have implemented the details cells as standard cells that are hidden (height: 0) by default and when the non-detail cell is clicked, the height is set to non-zero value. The cells are...
Read More

How to view code documentation in Visual Studio without opening an external browser instance?

Leave a Comment
If I want to see the full documentation for a class or method in Visual Studio, I have to press F1. This opens an external browser window where I can look it up. Now, I'd like to see the documentation within the IDE, in an integrated window, without having to mess around with a separate browser window. Additionally I'd like the documentation window to update as soon as I switch the cursor to another method/class/etc. This feature is fairly common in the Java IDEs. Is there any way to achieve this behavior in Visual Studio?...
Read More

Will download resume after closing my app in Background Mode

Leave a Comment
I figured out about it is possible to download in background mode of application. I have implemented Background Fetching Mode in XCode and registered background task and its working fine. Is it possible to resume downloading task after force closing my application by user? How? 3 AnswersAnswers 1 No, you can't continue download when your app get terminated by user! Your app must require to remains in background state!!! Because if user force close app that means, he doesn't want to run it anymore. If your app is...
Read More

Docker-compose check if mysql connection is ready

Leave a Comment
I am trying to make sure that my app container does not run migrations / start until the db container is started and READY TO accept connections. So I decided to use the healthcheck and depends on option in docker compose file v2. In the app, I have the following app: ... depends_on: db: condition: service_healthy The db on the other hand has the following healthcheck db: ... healthcheck: test: TEST_GOES_HERE timeout: 20s retries: 10 I have tried a couple of approaches like...
Read More

How to migrate existing Spring project to Spring Boot

Leave a Comment
I'm trying to migrate existing Spring project to Spring Boot. In project already used Spring Data JPA/Hibernate and simple DAO with JDBC (PostgreSQL used). In few states I found that all that I need to migrate on Spring boot, is: Add necessary dependencies Add entry point @SpringBootApplication profit, that's all. 1) Dependencies: <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId>...
Read More

Thursday, August 30, 2018

Taking the state of one activity to another

Leave a Comment
I have two activity screens: Create and View. Create is where the user creates their shopping list. View is where they view their list (and can still add items). I've tried reading about saving the instance state of activities but I'm still confused as to **how I can make it so when the user chooses items from the dropdowns in the create screen, those are copied, into the view screen. So basically both screens look the same - i.e the dropdowns with the selected items are in the view screen as well. (So like, the exact...
Read More