regions – RegionIntersection of two overlapping lines

Consider these simple exampes of two overlapping lines:

RegionIntersection(Line({{0, 0}, {2, 0}}), Line({{1 , 0}, {2, 0}}))
(*Line({{1, 0}, {2, 0}})*)
RegionIntersection(Line({{0, 0}, {2, 0}}), Line({{1 , 0}, {3, 0}}))
(*Line({{{1, 0}, {2, 0}}})*)

In both examples Mathematica evaluates the intersection as expected.
Surprisingly in the second example with extra curly brackets .

My questions:
What’s the reason for this behavior? How to avoid or remove the outer curly brackets?


bluetooth – what does UUIDs lines means

I get many Bluetooth uuids , I don’t know what does this mean and which one I must use to identify the device in the application.

uuid :00000110a-0000-….

uuid :00000111f-0000-….

uuid :000001112-0000-….

    BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); 
    Method getUuidsMethod = null;
    ParcelUuid() uuids = null;
    try {
        getUuidsMethod = BluetoothAdapter.class.getDeclaredMethod("getUuids", null);
        uuids = (ParcelUuid()) getUuidsMethod.invoke(adapter, null);
    } catch (Exception e) {
    String s="";
    for (ParcelUuid uuid: uuids) {
        s=s+"UUID: " + uuid.getUuid().toString()+"n";

data structures – why segmentation fault is arising , because of these three lines?

The code is giving segmentation fault. But it is working fine, :

  1. if i remove the first weird line “q++;”. Or
  2. if i call solve(s,1) in main function instead of solve(s,0) at third weird line.
  3. the code is working fine if i use “solve(s,q)” at second weird line.
using namespace std;

>bool solve(string s,int q)
    q++; //first weird line
        return true;
    solve(s,q+1);//second weird line
    return false;

int main()
    string s;
    solve(s,0);//third weird line

    return 0;

libgdx – Bullet: Mesh drops after debug lines turn green

My mesh drops after a while when rigid body turns green. Maybe I sound wierd, but I am new to bullet-physics and 3d stuff, and don’t know the actual cause ;P

It happens on using MotionState.
Initial state:

enter image description here

After debugdraw turn green

enter image description here

Here is my code inside render method:

        delta = Math.min(1f / 30f,;

        world.stepSimulation(delta, 5, 1f/60f);
        modelBatch.render(stickobj, environment);

Here is my motion State for stickman:

class StickMotionState extends btMotionState {

    Matrix4 transform;
    float radius;

    StickMotionState(float r){
        radius = r;

    public void getWorldTransform(Matrix4 trans) {
            trans.translate(0, -radius, 0);
    public void setWorldTransform(Matrix4 trans) {

It works fine without explicitly calling,
stickobj.body.getMotionState().getWorldTransform(stickobj.transform); as Xoppa stated in this tutorial, but then my model is offset a little bit.

enter image description here

Also, I don’t want to offset origin in blender due to increased calulations in placing them in game.
PS: What does that green colour signifies 😛

java – Drawing object lines in the Tiled map editor

Suppose I have this picture:

I have a map like this created in Tiled already. I would like to draw collision lines (the green ones in the picture) without having to make it a polygon. As far as I know, Tiled does not support drawing a line as a collision object, so I would appreciate ideas on how to make this work.

I also tried drawing a quadrilateral and calculating the diagonal in code (LibGDX), but that’s a bit clunky and can go wrong easily.

touchscreen – Smoothing active capacitive stylus lines, LG G pad X

No idea if this is the right place to post this, since I don’t know if the problem is my OS (android 6.0), stylus (Xiron active capacitive), software, or screen. My stylus makes very jerky/wavy lines, especially when slow and diagonal. However, it works ok with the passive capacitive end of it or best just my finger. The only app that seems to smooth this is Bamboo Paper. But, I need to annotate PDFs, which bamboo cannot open. Do i have a faulty pen? Is there better software that I could use? Pics below of finger vs stylus in bamboo and adobe reader.
enter image description here

enter image description here

JSPDF Bold text in certain lines

I have a table that anglejs renders with a ng iteration and has a group and a subgroup.
and I wanted the groups in my spreadsheet to be bolded in PDF. wanted to know if the jspf recognizes an id in the td and becomes bold