Nicolas Raoul

Java

Dedicated to the discussion of the Java programming language a...
Jan 3, 2022 14:23
Thanks everyone!
The library will be embedded in apps, so I want to keep it as small as possible. That might rule out 1 and 2.
It must work offline, which rules out 3.
4 sounds good, I will try!
Jan 3, 2022 12:43
I maintain a Java library.
**Problem**: To decode PNGs it uses `javax.imageio`which makes it unusable on Android.
**Question**: Is there a PNG decoder that can be used both on desktop and on Android? If not, can I avoid duplicating Gradle/everything?

(Maybe create a PNG decoding library and provide two implementations, one for desktop and one for Android? Not sure how the library would automatically choose the correct implementation, though.)
Jan 26, 2018 13:22
I investigate an error that shows in the log as "ajp_ilink_receive", and I am trying to find the source code for that method, but can't find it in Tomcat/mod_jk/httpd... any idea where it is? (AJP is a technology to accelerate Java servlet traffic)
Jun 26, 2017 07:37
`clazz` is a common variable name to avoid hitting the `class` keyword.
Question: Do we have a question about the equivalents for the other keywords such as `private`, `package`, etc? Or is there a list somewhere outside SO?
 

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Aug 1, 2019 14:34
I installed pear/Mail but my PHP script seems to stop as soon as it reaches Mail::factory(...).
Any idea what could be wrong?
No error is outputted even though I called error_reporting(E_ALL);.
 
Jun 4, 2019 04:38
@Vince: HockeyApp is for automatic distribution/CI/analytics. Whereas I am OK with manual distribution and no CI nor analytics :-) My main concern is bypassing the Apple Developer account when deploying the app to phones that are using Apple IDs different from mine.
Jun 4, 2019 04:21
I need to develop a small app for my family, 7 iPhones and 3 Androids. No need to publish on the App Store.
Unfortunately I don't have 99$/year to spend on an Apple Developer Account.
I am thinking of using Flutter (but ReachNative would be OK too).
Question: Is it possible to deploy my app to other people's phone (via USB I guess)? I have found https://stackoverflow.com/questions/52753693 but it is for a single person (the developer deploying to her phone), whereas I need to deploy the app to 10 devices that do not belong to me, so I feel like the answer might be different. Thanks! :-)
 

SQL

Got a SQL question? Any SQL flavor here, just ask. Indicate yo...
Oct 23, 2018 08:05
Wonderful! Thanks @Andrew it works as intended, I tried adding more persons with various numbers of laptops and phones. I will study the query and experiment by myself :-)
Oct 23, 2018 07:59
Not including recent suggestions: sqlfiddle.com/#!9/117ad/1
Oct 23, 2018 07:54
Thanks for the answers! I am testing all of your suggestions in SQL Fiddle right now :-)
Oct 23, 2018 07:46
Hello! I have 3 tables: Persons, Laptops, Phones. Each person owns a number of laptops and phones. Now I want to output a table showing for each person how many laptops and phones they own. Example: John, 2, 1; Anna, 3, 2; etc. My unsuccessful attempt: SELECT COUNT(*) FROM Laptops, Phones WHERE PersonId IN (SELECT PersonId FROM Persons). I guess I need some more advanced SQL concept here, would you mind telling me what kind of query could solve my problem? Thanks!
 

 Android Era with Kotlin and Java

Important: Read dos and don'ts here: androidera.github.io . Ma...
Jan 12, 2017 09:15
Why does Pattern.compile("(.*)").matcher("abc").group(0); say No match found? Shouldn't it match everything?
Aug 10, 2016 10:29
How to get the Charset for SHIFT_JIS? I am sure someone has already asked, but somehow it does not show up in searches? Or should I post a new question about that?
 

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Jul 25, 2016 07:36
OK, got it as argv._ thanks for your help :-)
Jul 25, 2016 07:35
a Node.js library to get command line arguments
Jul 25, 2016 07:35
@JanDvorak: From require('minimist')(process.argv.slice(2))
Jul 25, 2016 07:34
I have an object that outputs as { _: [ 'abc' ] } and I am trying to get the 'abc' inside, but being a beginner I don't know what data structure it is (a kind of array?) and all searches for "underscore" lead to Underscore.js which seems to be something else... how is this data structure called, and is there a name for that underscore peculiarity?
Jun 13, 2016 10:22
My data => console.log is met with SyntaxError: Unexpected token >, I guess it is because my Ubuntu 2015.10's Node.js is too old? nodejs --version returns v0.10.25.
Feb 23, 2016 09:13
For instance in bash I would execute curl and the call would only return when the download is done. That's what I mean by synchronous.
Feb 23, 2016 09:07
My end goal is to write a kind of batch script in NodeJs, nothing asynchronous.
Feb 23, 2016 09:05
@BenFortune: Looks like what I was looking for, thanks! I am trying ES6 so I guess Promise is the way to go... I will read the whole top answer first anyway.
Feb 23, 2016 09:04
@CapricaSix: Thanks for the tip!
Feb 23, 2016 08:59
//Beginner question but can't find the answer, how to download data then use it? I tried:

    var data;
    request.get(url, function (error, response, body) {
            data = body;
    });
    useThisData(data);

//Unfortunately the download seems to get executed *after* useThisData...
 

C

C stands for Control.
Mar 8, 2016 03:00
@Antti: Thanks that was the problem indeed! And sorry I am never sure what belongs to C and C++. printf/sprintf/etcprintf just sounded C to me. The other day people in the C++ room told me to come here haha :-)
Mar 7, 2016 12:39
swprintf_s(buf1, 256, "Error: %ls\n", buf2);
I get "Error: no instance of overloaded function "swprintf_s" matches the argument list" despite matching the third pattern at https://msdn.microsoft.com/en-us/library/ce3zzk1k.aspx (wchar_t buf1[256], wchar_t buf2[256])
Any idea what is going wrong?
 

Lounge<C++>

Today we're daydreaming about C++26 reflection
Mar 3, 2016 07:36
My bad
Mar 3, 2016 07:36
0 if equal I guess
Mar 3, 2016 07:36
oops
Mar 3, 2016 07:35
Mar 3, 2016 07:30
Apparently strcmp( abc , abc\0efg ) returns different form zero.
The second argument is a char[] that contained abcdefg but I replaced d with \0
Am I missing something? Is there another strcmp that stops comparing when it reaches \0?
Mar 3, 2016 06:17
Thanks^^
Mar 3, 2016 06:17
@HubertApplebaum: My Korean skills tell me it reads to something like "meues" :-)
Mar 3, 2016 06:13
↑ Now with C# StreamWriter configured for UTF-8
Mar 3, 2016 06:13
Mar 3, 2016 06:08
@wilx: Thanks! So I should force C# to send as wchar_t (which if I understand correctly is the same as the C# string) right?
Mar 3, 2016 06:07
@Aaron3468: On the C# side it is just StreamWriter.WriteLine("0123456789")
Mar 3, 2016 06:05
On the C++ side I read it with ReadFile() into a TCHAR[512]
Mar 3, 2016 06:04
@Mikhail: The message is sent to the named pipe by C# as a normal string.
Mar 3, 2016 06:03
I am getting this when reading from a named pipe (message mode) in C++.
It is supposed to be the string "0123456789", no idea why it ends up like this...
Mar 3, 2016 06:02
 

The SO Tavern (Free Snacks)

Room 5 was frozen for inactivity even though it was once an ac...
Feb 5, 2016 08:06
When I see chatty old comments, should I tag them as obsolete? I would but the "for serious moderator attention" makes me feel my flags could be turned down... example: stackoverflow.com/a/30576839/226958
 

[iOS][Android][ChaosOverFlow]

Join to become part of the community, not to simply ask questi...
Dec 1, 2015 05:27
@iAnum: Fixed, thanks a lot :-)
Dec 1, 2015 05:19
@iAnum: Maybe I inserted it into the wrong build.gradle file...
Dec 1, 2015 05:12
I want to assembleRelease my Android app, so apparently I need to add a signingConfigs block. I tried adding that block to my existing build.gradle but it says Could not find method signingConfigs() for arguments [...] wherever I put it... where to put this signingConfigs block?
 

Ruby :: Sometimes on Rails

The humane programming language. Be nice. Have fun. Lurkers...
Jul 30, 2015 12:26
That question is not Rails-specific. I guess Rails has a special place where such things belong.
Jul 30, 2015 12:25
It is a way to have the stack shown when getting a recursion loop. Looks very convenient to solve my current "stack level too deep" error. The answer says "put this function in your code". But I am not sure where.
Jul 30, 2015 12:23
3
A: How to get a backtrace from a SystemStackError: stack level too deep?

Jonathan SwartzCombining suggestions from several answers, this will throw an error (with stack trace) when your call stack gets too deep. This will slow down all method calls, so you should try to put it as close to where you think the infinite loop is happening as you can. set_trace_func proc { |event, fil...

Jul 30, 2015 12:22
Rails newbie here: In what file should I put set_trace_func proc {?
 

HTML / CSS / WebDesign

This room is now defunct. RIP.
May 22, 2015 09:38
May 22, 2015 09:37
First powder your JavaScript with floor()