Alexei

0

votes
0

answer
4

views

Align flex inside another flex

I'm trying to create a mobile layout with a logo on the left nav in the middle and a chevron to display and hide the items of a navbar(I'm not interested in doing this functionality right now). But right now I'm trying to achieve something like this: +------+---------+---------+ | logo | lorem | c...
Alexei Rodriguez
1

votes
4

answer
36

views

Flatten Map<String,Set<String>> to List<String> (CSV conversion) with streams

Given input (Map key:value) 'a':['e','c','d'] 'b':['c'] Desired sorted output: 'a,c' 'a,d' 'a,e' 'b,c'
Alexei Vinogradov
0

votes
0

answer
2

views

How to integrate Quartz.Net jobs that require “scoped” services injected in them (ASP.NET Core 2.0)?

I am trying to create some Quartz.Net jobs following my own answer from this question. However, if the job is fairly complex and required 'scoped' (services.AddScoped) services, the example does not work because jobs are created as singletons. If I change them to be scoped, the serviceProvider does...
Alexei
1

votes
1

answer
215

views

How to inherit CDATA syntax in XML files from HTML syntax in Sublime Text 3?

I am trying to create a new sublime-syntax for XML files, which would treat tags inside CDATA as HTML. I got as far as creating a new sublime-syntax file, copied the original XML rules (opened them via PackageResourceViewer) and found the section I am interested in: contexts: main: - match: ' tag,...
Alexei Danchenkov
1

votes
1

answer
2.6k

views

Android: method call expected error

I've searched internet for that error and have not found right answer. I've got error saying 'method call expected' on mPrefsKeys in bindPreferenceSummaryToValue(findPreference(mPrefsKeys(i))) public final static String [] mPrefsKeys = new String[]{'username', 'devicename'} bindPreferenceSummaryToVa...
Alexei Martianov
1

votes
1

answer
105

views

how attach debugger to java program executed by jvm.dll?

I have a Windows executable written in C++. It loads libJVM as a shared library, and then executes a java program via JNI. I want to debug that java program, using Eclipse IDE. How can I do that? As a last resort, I even can modify the C++ program.
Alexei Kaigorodov
1

votes
3

answer
118

views

Get substring containing first N words in C# .NET using Regex

I want to obtain a string containing the first N words from a given string. E.g. Get first 5 words from The quick_brown, fox1 jumps over the lazy dog should return The quick_brown, fox1 jumps over Notice that word include letters, digits and _ (basically \W+ match) and all the original separators (...
Alexei
1

votes
1

answer
603

views

OnOptionsItemSelected not invoked using MasterDetails page on Android

I try to implement popup which will prevent user to leave page without saving. That means I have to handle two cases: when user uses hardware back button and back button in toolbar. I have MasterDetails page. As Detail I push a Details1 page wrapped by NavigationPage. From Details1 I pused Details2...
Alexei Malashkevich
1

votes
1

answer
177

views

How do I change Android Studio editor appearance?

I started learning Java in BlueJ and BlueJ has a great layout for code where you have a background color for each 'method'. BlueJ Layout Picture: Android Studio Layout Picture:
1

votes
1

answer
57

views

How add space (e.g.height = 20dp) between searchView and dropdown list?

In my fragment (not in ToolBar) I has SearchView component. Here fragment's layout in xml: Here my dropdown's item layout in xml: Here java code in my fragment: searchView = view.findViewById(R.id.searchView); SearchManager sMng = context.getSystemService(Context.SEARCH_SERVICE); searchView.setS...
Alexei
1

votes
1

answer
454

views

SearchView in fragment (non in toolbar) can't remove underline

In my fragment I use searchView (not in toolbar). My layout snippet: In my fragment's code : searchView = view.findViewById(R.id.searchView); SearchManager searchManager = (SearchManager) getActivity().getSystemService(Context.SEARCH_SERVICE); searchView.setSearchableInfo(searchManager.getSearchable...
Alexei
1

votes
3

answer
244

views

Android: butterKnife - @BindView - throw NPE

Android Studio 2.3.3. My layout xml file: In my app/build.gradle: apply plugin: 'com.android.application' apply plugin: 'com.jakewharton.butterknife' apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-android' android { compileSdkVersion 26 buildToolsVersion '26.0.2' defaultConfig { applicationId 'co...
Alexei
1

votes
1

answer
149

views

Unknown number of fragments: FragmentPagerAdapter or FragmentStatePagerAdapter?

In activity I have ViewPager. I don't know how many fragments will be added to viewPager. The question is: What I need to use in this case: FragmentPagerAdapter or FragmentStatePagerAdapter?
Alexei
1

votes
1

answer
134

views

Android: SearchView: How set individual icons for every item in suggestion list?

My fragment: SearchManager searchManager = (SearchManager) getActivity().getSystemService(Context.SEARCH_SERVICE); searchView.setSearchableInfo(searchManager.getSearchableInfo(getActivity().getComponentName())); searchView.setSuggestionsAdapter(new SearchCategorySuggestionsAdapter(getActivity()));...
Alexei
1

votes
2

answer
325

views

How to perform multiple asynchronous actions in Ionic 3 and dismiss a loader after everything is done?

I developing an Ionic 3 application which has the option to cache a list of articles content on demand. I am using Storage which uses promises for its operations. My code is the following: article-service.ts getArticleFullData(articleId: number) { let appSettings = this.appSettingsService.getSetting...
Alexei
1

votes
1

answer
36

views

How to unit test a simple repository that contains a dagger injection?

I'm trying to unit test a simple repository but it gives me a NullPointerException. The repository contains one method which depends on a webService. The webService is working fine (I successfully tested). I'm using Retrofit for webService and Dagger for dependency injection. Below is my code: webSe...
Andritchi Alexei
1

votes
1

answer
178

views

Android Studio 3.1.4: java.time.LocalDate" is not supported

Android Studio 3.1.4, Java 8, Gradle 4.4. in my build.gradle: compileSdkVersion 26 minSdkVersion 18 targetSdkVersion 26 compileOptions { targetCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8 } implementation 'com.android.support:appcompat-v7:26.1.0' In my POJO impor...
Alexei
1

votes
0

answer
7

views

Mapping by request's body use two matches

I has http request with body: endpoint = http://127.0.0.1:54400/json reqBody: {...
Alexei
1

votes
2

answer
33

views

git merge - commits or branches (not clear docs)?

From docs(https://git-scm.com/docs/git-merge) SYNOPSIS git merge [-n] [--stat] [--no-commit] [--squash] [--[no-]edit] [-s ] [-X ] [-S[]] [--[no-]allow-unrelated-histories] [--[no-]rerere-autoupdate] [-m ] [-F ] […​] git merge --abort git merge --continue DESCRIPTION 'git merge topic' will repl...
Alexei Martianov
1

votes
2

answer
1.4k

views

Using URI-fragments in Ruby on rails routing

RoR application can generate URL such as /post/10. But now I want to create a site, which works with URI-fragments like gmail. For example gmail uses the following URLs https://mail.google.com/mail/?shva=1#sent https://mail.google.com/mail/?shva=1#label/books I need to generate URL such as /#/post/1...
Alexei
1

votes
3

answer
639

views

How to comment out/in a paragraph of haml in vi?

I just started diving into vi and so far learned only basic moving around/editing commands. While I am going through the book, is there a fast way to comment out a paragraph with -# in the same column with the cursor position (indenting the lines accordingly)? Let's say I have a piece of code: %tabl...
Alexei Danchenkov
1

votes
2

answer
1.1k

views

wxPython: How to make a TextCtrl not fill the whole panel?

I have a panel containing a button as well as another panel which itself contains a textCtrl. I have a panel just for the textctrl because I am trying to have a custom border color around the textCtrl. Unfortunately I can not get the textCtrl to not fill the entire panel..I suspect it has to do with...
Alexei Bassinski
1

votes
1

answer
12

views

How to not synchronize all maps between services in Hazelcast

I have two different services (let's call them Middleware and Gateway) in my cluster setup to share the same cache. Middleware instances are sharing two Hazelcast maps Session and Chat. But in Gateway application I don't need Chat map, but only Session map. As far as I investigated thru Hazelcast d...
Alexei Talankov
0

votes
0

answer
63

views

okhttp3: websocket - java.io.EOFException: null - okio.RealBufferedSource.require(RealBufferedSource.java:61)

In my build.gradle: 'com.squareup.okhttp3:okhttp:3.13.1', 'com.squareup.okhttp3:logging-interceptor:3.13.1', Kotlin project open connect to websocket: const val WEB_SOCKET_URL = 'wss://api.lbkex.com/ws/V2/'; fun main(args: Array) { val оkHttpClient = OkHttpClient() val wsListener = object : WebSock...
Alexei
1

votes
1

answer
130

views

Foundation components not compiling

I cloned a clean copy of zurb/foundation (4fd252238f165709e77c696cd0459bca95f38479), no changes are done with _settings.scss, but some components are not making it to the css file. git clone [email protected]:zurb/foundation.git cd foundation sass --update scss:css produces foundation.css which starts...
Alexei Danchenkov
0

votes
0

answer
16

views

Why not read all lines from text file?

In my Kotlin project in folder src/resources/ I has file pairs_ids.txt. This is a property file: key=value The count of all lines are 1389. Here code that read content of this file line by line. open class AppStarter : Application() { override fun getName() = 'stats' override fun run(configuration:...
Alexei
1

votes
1

answer
24

views

How to gracefully end a Quartz 3.0.x with ASP.NET Core 2.2 job in IIS?

I am trying to gracefully end a Quartz job which run in IIS. My code is as follows: the job [DisallowConcurrentExecution] public class TestJob : IJob { private ILoggingService Logger { get; } private IApplicationLifetime ApplicationLifetime { get; } private static object lockHandle = new object(); p...
Alexei
0

votes
0

answer
4

views

Android 4.3: FileUtils.readFileToString - java.lang.NoClassDefFoundError: java.nio.charset.StandardCharsets

Android 3.2.1 In my app/build.gradle: android { compileSdkVersion 28 defaultConfig { applicationId 'com.myproject' minSdkVersion 18 targetSdkVersion 28 versionCode 423 versionName '2.1.423' } dependencies { annotationProcessor 'org.androidannotations:androidannotations:$AAVersion' annotationProcesso...
Alexei
1

votes
1

answer
110

views

Python class % operator overloading

I have a set of functions that calculate different numeric characteristics (in example named calculate) but some of them might not be calculate properly. After calculation result will be print in graphic user interface with string formatting. So I would like to return an object of special class that...
Alexei
1

votes
1

answer
2.2k

views

How to get the keys and values of an associative array indirectly in Bash?

In Bash, given only a variable that contains the name of an associative array, $ declare -A dict=([abc]=125 [def]=456) $ dictvar='dict' how can we retrieve the keys and values of the associative array?
alexei
1

votes
0

answer
6

views

SearchView: Why not show glass icon

Android studio 3.2.1 in my app/build.gradle: android { compileSdkVersion 28 defaultConfig { applicationId 'com.myproject' minSdkVersion 18 targetSdkVersion 28 versionCode 1 versionName '1.1.1' here my widget: import android.view.Menu; import android.view.MenuItem; import android.view.View; import an...
Alexei
0

votes
1

answer
27

views

How use rounded icon on API 15

In my android project: In my Manifest file: I can't build project. I get error message: Attribute 'roundIcon' is only used in API level 25 and higher (current min is 15) I can't increment api level to 25. Because it's requirement to use api 15. How I can fix this problem with round icon?
Alexei
2

votes
1

answer
203

views

Custom plugin with DOM manipulation CKEditor 4.x

I am developing one custom plugin for the CKEditor 4.7 which do a simple think take in case user select some stuff it will put it in a div with specific class, else it will put a div with same class just with text like 'Add content here' I try to use some functions according to CKEditor docs but hav...
Alexei
17

votes
3

answer
26.4k

views

ADFS authentication - IE8 works, Chrome fails

so, have web-site configured for ADFS 2.0 authentication... for IE - it works fine and did authentication correct for Chrome - it reaches redirect to AD FS server... ask to authenticate but could not authenticate. I try to requests using fiddler but it show nothing interesting - so show that we redi...
Alexei Izotov
17

votes
5

answer
2.2k

views

How to find source_location of the code executed by super?

class C1 def pr puts 'C1' end end class C2 < C1 def pr puts 'C2' super puts self.method(:pr).source_location end end c = C2.new c.pr In the program above is it possible to obtain location of the code executed by super (C1::pr in our case) as well as we obtain the location of C2::pr code using source...
17

votes
1

answer
32.4k

views

View is not updating after changing auto-layout constraints programmatically

Beforehand I have to say that I actually got the visible effect I've wanted but not in a satisfying way since, right now, constraints need to be 'broken' instead of being properly updated. I got a ViewController which holds a UITableView. The height of that tableView can vary from 0 (not visible) to...
Alexei S.
17

votes
1

answer
7.5k

views

Gradle: How to get output from test STDERR/STDOUT into console?

(Gradle 3.2.1) I run some java tests, which logs output in Stderr/Stdout. I can see that output, if I start gradle test --info but in that case, much of unwanted output from 3-rd party libraries is there too. Documentation suggests using logging.caputureStandardError / logging.caputureStandardError...
Alexei Vinogradov
18

votes
9

answer
2.2k

views

Is it better to pass reference to an object or pass individual attributes in an object in Java?

I'm dealing with legacy code and I constantly see method calls with multiple attributes from the same object being passed into a method: update(user.getID(), user.getLanguage() etc...) Is there a distinct advantage or disadvantage to doing it this way or would I just be as well to pass in the user o...
Alexei Blue
3

votes
0

answer
404

views

Emacs: Is it possible to fold (collapse/expand) json objects/collections?

Windows 10 (64 bit), Emacs 25.1. Suppose I have big json file. And it's very comfortably if I can folding (collapse/expand) any node of this json. I do this by Notepad++. Here example: Is it possible to do same in Emacs? Thanks.
Alexei
3

votes
4

answer
232

views

Is there a Java data structure that returns a set of a specific attribute in a collection of objects?

I have a collection of objects which are all the same object type. Within that type there is an attribute that I want to access - in this case it's to add it to a comma separated list: String sep = ', '; List items = db.findItems(); for (Item item : items) { result.append(item.getDescription() + s...
Alexei Blue

View additional