Resu

1

votes
0

answer
49

views

Java generics and reflection to create and set model for SimpleJdbcCall in Spring

I am trying to use reflection and generics to create models using SimpleJdbcCall. At the moment I have to create a distinct mapper per model that I add to the project. I would like to create a mapper that uses reflection to just simply map the model, so that I only have to write one mapper (in the m...
resu
1

votes
1

answer
137

views

Use RxJs to create HttpRequest queue in Angular2+ interceptors

I am using interceptors in Angular5 to add an Authorization header to each request. The tokens coming from the backend can expire though, in which case a token refresh must occur. If multiple HttpRequest come in at the same time, I have no way of making them queue up, so multiple unauthorized reques...
resu
1

votes
1

answer
123

views

java one dimensional string to multidimensional

I am given a string that can represent hex values and am told to convert it to such and store it in a string: String str = new String('FF E7 C3 E7 FF'); String[] arrayStr = str.split(' '); Then I need to convert each hex value to its binary equivalent: String[] arrayBin = new String[arrayStr.length]...
resu
1

votes
1

answer
361

views

Defining finite sets in Isabelle

How can I define constant sets in Isabelle ? For example something like {1,2,3} (to give it a more interesting twist with 1,2,3 being reals), or {x \in N: x < m}, where m is some fixed number - or, perhaps more difficult, the set {N,R,C}, where N are the naturals numbers, R the real and C the compl...
resu
1

votes
2

answer
0

views

Using Dependency Injection or are there simpler solutions?

In our project, we have a class KnowledgeBaseManager, which gets used by other classes as follows: KnowledgeBaseManager manager = KnowledgeBaseManager.get(); manager.foo(); KnowledgeBaseManager holds a static variable standardKnowledgeBaseManager which gets initialized when used for the first time:...
Eman Resu
2

votes
1

answer
3.6k

views

force website render doctype html5 standard & IE9 browser

We have an html5 standard website; everything renders perfectly when viewed from a test webhost site server. Ideally...from the client's Learning Management System (LMS), when the user launches the html5 website, the html5 site will appear in a popup. But, the client's LMS is not compatible with htm...
ediug resu
2

votes
1

answer
544

views

How to circumvent “code too large” error (Java)?

I automatically produce a java class from a rdf file (with schemagen/jena). The class just contains constants, that is statements of the form public static final Resource foo = m_model.createResource( 'http://example.com/foo' ); The generated java class has a size of 930 KB, so it doesn't compile....
Eman Resu
5

votes
4

answer
439

views

C++ - Single local class instance for entire program duration

I'm working on a lil' game engine in C++, and decided to do it all OOPily (heavy use of classes.) It's intended to be (theoretically) cross-platform, so I have an 'Engine' class, an instance of which is created by the 'OS Module', which is WinMain for Windows (the platform I'm developing it for firs...
Resu Rep
2

votes
1

answer
1.4k

views

How to update excel sheet using c#

I have two Excel sheets. This is the first sheet. This is the second sheet In the first sheet there is a column called Language and there is a similar column in the second sheet. So now I want Language data from the first sheet to the second sheet according to their ID. Below is my Code. System.Data...
Resu
2

votes
0

answer
560

views

jQueryUI Menu enter key doesn't work

I'm using the latest jQueryUI Menu code, but when I tab into the menu, and select a link by hitting the Enter key, the li containing a suitable a href does not open. The only way to get a link to open is to click with the mouse, but I want the Enter key to function for accessibility. Here's the code...
Resu
2

votes
1

answer
428

views

Openscad is in array or equivalent

There is something like this on openScad? list = [2, 3]; if(1 in list){ echo('in'); }else{ echo('not in'); } /* or better: */ list = [2, 3]; isin = 1 in list? 100 : 0;
Leved Resu
1

votes
2

answer
583

views

Apache git server with Alpine Linux on Docker

I am trying to serve git repos over http using Alpine's Apache image in Docker. I am able to get Apache to serve up documents and folders over http (there are some non git repos in this folder, this is just a proof of concept at the moment, so they can be ignored): However when I attempt to clone th...
resu
2

votes
1

answer
47

views

How to find all possible entities

I need to find some entities in xml files. These entities can be decimal, hexadecimal or named (common or my own). test.xml Hello, world! I tried to use test1.xsl or test2.xsl but got no result. Is there a way to find entities using regular expressions? Maybe there is a special text type that allow...
Resu
2

votes
4

answer
4.7k

views

BufferedReader readLine used in while loop

I have seen BufferedReader using while loops to iterate through the contents of a file, with code more or less like: try { FileReader fr = new FileReader(file); Buffered Reader br = new BufferedReader(fr); String line; while ( (line = br.readLine()) != null ) { // do something } } catch () {} what...
resu
1

votes
1

answer
809

views

c# mvvm binding button commandparameter to control outside compositeCollection

I'm just not getting it: I've a ribbon-menu where some tabs/groups/buttons are defined in xaml and some tabs/groups/buttons are defined during runtime (user loads a certain 'command set'). To realise this I put the ribbonTab which is defined in xaml and a collection container inside a compositeColle...
Resu
1

votes
1

answer
448

views

PInvoke Nikon c++ DLL Function from c#

I'm trying to access the Nikon image SDK(for those interested see: 1) to implement access to *.nef file in a programm. I'm stuck at a return code from the dll which should be interpreted as 'invalid parameter' and I'm running out of ideas. Yes I know the chance, that somebody is exactly using this d...
Resu