text:
Q: No data returned from class method to PBO I want to return record of table from abap method, which is field of class
but nothing is returned to the variable in PBO
definition in class
 data MS_ZORK_JG_SETTING type ZORK_JG_SETTING .

  methods GET_MS_ZORK_JG_SETTING
    returning
      value(MS_ZORK_JG_SETTING) type ZORK_JG_SETTING .

MS_ZORK_JG_SETTING is a data type which contains data from ZORK_JG_SETTING transparent table, filled properly using other method, so there is a correct data in this variable
in pbo of the screen i wanted to assign returned value to variable of the same type as returned

MODULE pbo_0102 OUTPUT.

DATA: wa_jg_setting TYPE zork_jg_setting.

  wa_jg_setting = go_bukrs_conf->get_ms_zork_jg_setting( ).

  MOVE-CORRESPONDING wa_jg_setting TO zork_jg_setting.

ENDMODULE.

But wa_jg_setting is empty. Tell me why and how to repair that?
Place of invoking screen
DATA: go_bukrs_conf TYPE REF TO zork_cl_scr_bukrs_conf.
CREATE OBJECT go_bukrs_conf
        EXPORTING
          pa_bukrs = '3020'.

      CALL SCREEN 102.

And get_ms_zork_jg_settings method. I am assigning a value of field to a formal parameter
  method GET_MS_ZORK_JG_SETTING.
    ms_zork_jg_setting = ms_zork_jg_setting."zwracana wartosc to pole/ atrybut
  endmethod.

A: The line
ms_zork_jg_setting = ms_zork_jg_setting.

is useless, as you assign the value of the return parameter to itself.
Generally speaking, var = var is always non-sense.
Probably you want to do:
ms_zork_jg_setting = me->ms_zork_jg_setting.


text:
Q: Phonegap/AJAX/Codeigniter - Ajax post not working I'm trying to post data from a form to a codeigniter controller in a web server I deployed on a host online. It works when I use it on my laptop, but after I build it in build.phonegap.com and install it in my phone, it doesn't work. Here's the code in the index.html file:
Javascript:
function sendMessage(){
            //get values from the form
            var msgFrom = $('#msgFrom').val();
            var msgTo = $('#msgTo').val();
            var msg = $('#msg').val();

            //works up to here only after building on build.phonegap.com
            $.ajax({
                traditional: true,
                type: 'POST',
                dataType:'json',
                url: '<...>/welcome/savePostData',
                data: 'numberTo='+msgTo+'&numberFrom='+msgFrom+'&message='+msg,

                success: function(resp) {
                    Materialize.toast("Posted", 5000);

                }

            });

        }

Here are the resources in my HTML code:
    <script type="text/javascript" src="js/jquery-3.1.0.min.js"></script>
    <script type="text/javascript" src="js/jquery.mobile-1.4.5.js"></script>
    <script type="text/javascript" src="js/jquery.mobile-1.4.5.min.js"></script>

Other details:

*

*I have created the app in ubuntu using this command only: cordova create <appname>

*I'm still running on android kitkat (lol)

*I deployed my controller in freewebhostingarea.com

A: it sounds like the mobile ajax isn't enabled. have you set  $.support.cors to true?
source: http://demos.jquerymobile.com/1.0/docs/pages/phonegap.html

A: In order to use cross-domain AJAX requests you need to add the following code at the end of your config.xml file. This is what worked for me:
  <access origin="*"/>
  <gap:plugin name="cordova-plugin-whitelist" source="npm"/>
  <access url="*" subdomains="true"/>
  <allow-intent href="http://*/*"/>

redpajama_set_name: RedPajamaStackExchange


text:
Q: iOS: How to simulate default camera controls in SceneKit? The code below is meant to simulate the default camera controls in SceneKit, specifically the zoom and rotate functionality.
However, the code isn't nearly as smooth and versatile as the default controls.
For instance, if you load these two models, the default zoom works consistently for both models. The code below only works well, however, for model 1 but zooms far too fast for model 2.
Any help would be appreciated.
Model 1: https://poly.google.com/view/6mRHqTCZHxw
Model 2: https://poly.google.com/view/cKryD9VnDEZ
    // Create camera
    let camera = SCNCamera()
    camera.automaticallyAdjustsZRange = true
    camera.xFov = 30
    camera.yFov = 0

    // Compute distance to place camera
    let theta = GLKMathDegreesToRadians(Float(camera.xFov/2))
    let adjacentLength = oppositeLength / Float(tan(theta))

    // Add camera to <cameraNode>
    cameraNode.camera = camera
    cameraNode.position = SCNVector3(x: 0, y: 0, z: adjacentLength)

    // Add <cameraNode> to <orbitNode>
    orbitNode.addChildNode(cameraNode)

    // Add <orbitNode>
    scene.rootNode.addChildNode(orbitNode)

    // Handle pinches
    let pinchRecognizer = UIPinchGestureRecognizer(target: self, action: #selector(didSceneViewPinch))
    pinchRecognizer.delegate = self
    sceneView.addGestureRecognizer(pinchRecognizer)

    // Handle pans
    let panRecognizer = UIPanGestureRecognizer(target: self, action: #selector(didSceneViewPanOneFinger))
    panRecognizer.minimumNumberOfTouches = 1
    panRecognizer.maximumNumberOfTouches = 1
    panRecognizer.delegate = self
    sceneView.addGestureRecognizer(panRecognizer)

func rotate(recognizer: UIPanGestureRecognizer) {
    // Set throttle value to slow down rotation
    let throttleFactor = Float(40)

    // Compute rotation
    let translation = recognizer.translation(in: recognizer.view!)
    let xRadians = GLKMathDegreesToRadians(Float(translation.x)) / throttleFactor
    let yRadians = GLKMathDegreesToRadians(Float(translation.y)) / throttleFactor

    // Orbit camera via <orbitNode>
    orbitNode.eulerAngles.x -= yRadians
    orbitNode.eulerAngles.y -= xRadians
}

func zoom(recognizer: UIPinchGestureRecognizer) {
    // Set zoom properties
    let minVelocity = CGFloat(0.10)
    let zoomDelta = 0.5

    // Only zoom when gesture changing and when velocity exceeds <minVelocity>
    if recognizer.state == .changed {
        // Ignore gesture on tiny movements
        if abs(recognizer.velocity) <= minVelocity {
            return
        }

        // If here, zoom in or out based on velocity
        let deltaFov = recognizer.velocity > 0 ? -zoomDelta : zoomDelta
        var newFov = cameraNode.camera!.xFov + deltaFov

        // Make sure FOV remains within min and max values
        if newFov <= minXFov {
            newFov = minXFov
        } else if newFov >= maxXFov {
            newFov = maxXFov
        }

        // Update FOV?
        if cameraNode.camera?.xFov != newFov {
            cameraNode.camera?.xFov = newFov
        }
    }
}

A: I tried recreating SCNCamera rotation as such in default camera controller. But it was not as smooth as the default camera. So I added pan gesture with two minimum touches and left the function empty doing nothing. This makes use of default camera rotation property alone and avoiding below two properties of the default camera as mentioned in https://developer.apple.com/documentation/scenekit/scnview/1523171-allowscameracontrol
1.Pan with two fingers to translate the camera on its local xy-plane
2.Pan with three fingers vertically to move the the camera forward backward
//Pan Gesture
let gesture = UIPanGestureRecognizer(target: self, action: #selector(panDetected(sender:)))
gesture.maximumNumberOfTouches = 3
gesture.minimumNumberOfTouches = 2
self.sceneView.addGestureRecognizer(gesture);

//Doing nothing in pan gesture other than  printing
@objc func panDetected (sender: UIPanGestureRecognizer) {
    print("two pan detected")
}

Next add pinch gesture to the scene view so that minimum and maximum zoom level can be controlled

//pinch gesture
let pinchGesture = UIPinchGestureRecognizer(target: self, action: #selector(pinched(sender:)))

self.sceneView.addGestureRecognizer(pinchGesture);
@objc func pinched(sender:UIPinchGestureRecognizer){
    let pinchVelocity = Double.init(sender.velocity)
    //print("PinchVelocity \(pinchVelocity)")

    self.sceneView.pointOfView?.camera!.orthographicScale -= (pinchVelocity/pinchAttenuation)

    if (self.sceneView.pointOfView?.camera!.orthographicScale)! <= 0.5 {
        self.sceneView.pointOfView!.camera!.orthographicScale = 0.5
    }

    if self.sceneView.pointOfView!.camera!.orthographicScale >= 1 {
        self.sceneView.pointOfView?.camera!.orthographicScale = 1
    }
}

Add UIRotationGestureRecognizer incase you want to disable or modify default camera rotation(Rotate with two fingers to roll the camera (rotate on the camera node's z-axis)


text:
Q: Nullpointer Exception - getCount I am getting this Nullpointer exception and I cannot tell why. I have researched and know the getCount is returning null, but I don't understand why. I am trying to parse a JSON array and send that information to a custom adapter to display a custom listview. I've been round and round for the last 7 days. The app was working and pulling data from a static JSON file. I need the feed to update as I update the database, so the static JSON is not a good solution. I ended up with the screen just showing white and no details at all. I can show data in a plain list view, but not in the inflated view. I have to clear this exception before I can tackle the blank screen. Here's the code for the main activity, custom adapter and model. I hope someone can take a look and assist.
logcat
12-19 01:02:58.516 32588-32588/com.brasiltradefx.btfxalerts E/AndroidRuntime: FATAL EXCEPTION: main
                                                                              Process: com.brasiltradefx.btfxalerts, PID: 32588
                                                                              java.lang.RuntimeException: Unable to start activity ComponentInfo{com.brasiltradefx.btfxalerts/com.brasiltradefx.btfxalertsadmin.AlertMainActivity}: java.lang.NullPointerException
                                                                                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
                                                                                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2350)
                                                                                at android.app.ActivityThread.access$800(ActivityThread.java:163)
                                                                                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1257)
                                                                                at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                at android.os.Looper.loop(Looper.java:157)
                                                                                at android.app.ActivityThread.main(ActivityThread.java:5335)
                                                                                at java.lang.reflect.Method.invokeNative(Native Method)
                                                                                at java.lang.reflect.Method.invoke(Method.java:515)
                                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
                                                                                at dalvik.system.NativeStart.main(Native Method)
                                                                               Caused by: java.lang.NullPointerException
                                                                                at com.brasiltradefx.btfxalertsadmin.adapter.FeedListAdapter.getCount(FeedListAdapter.java:48)
                                                                                at android.widget.ListView.setAdapter(ListView.java:486)
                                                                                at com.brasiltradefx.btfxalertsadmin.AlertMainActivity.onCreate(AlertMainActivity.java:46)

Main activity (updated)
    public class AlertMainActivity extends Activity {

    private String url = "http://www.contrariantradefx.info/android/btfxalerts/alerts_all_data_clients.php";
    ProgressDialog PD;
    ArrayList<String> feedItems;
    FeedListAdapter listadapter;
    ListView listView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_alert_main);

        listView = (ListView)findViewById(R.id.list);
        feedItems = new ArrayList<>();

        PD = new ProgressDialog(this);
        PD.setMessage("Loading...");
        PD.setCancelable(false);

        listadapter = new FeedListAdapter(this, feedItems);
        listView.setAdapter(listadapter);

        MakeJsonArrayReq();
    }

    private void MakeJsonArrayReq() {
        PD.show();

        JsonArrayRequest jreq = new JsonArrayRequest(url, new Response.Listener<JSONArray>() {

            @Override
            public void onResponse(JSONArray response) {

                for (int i = 0; i < response.length(); i++) {
                    try {
                        JSONObject jo = response.getJSONObject(i);
                        String date = jo.getString("date");
                        String order = jo.getString("order");
                        String pair = jo.getString("pair");
                        String rate = jo.getString("rate");
                        String quick_target = jo.getString("quick_target");
                        String long_target = jo.getString("long_target");
                        String stop_loss = jo.getString("stop_loss");
                        String break_even = jo.getString("break_even");
                        String name = jo.getString("name");
                        String status = jo.getString("status");
                        String profilePic = jo.getString("profilePic");
                        String image = jo.isNull("image")? null : jo.getString("image");

                        FeedItem item = new FeedItem();

                        item.setDate(date);
                        item.setOrder_type(order);
                        item.setPair(pair);
                        item.setRate(rate);
                        item.setQuick_target(quick_target);
                        item.setLong_target(long_target);
                        item.setStop_loss(stop_loss);
                        item.setBreak_Even(break_even);
                        item.setName(name);
                        item.setStatus(status);
                        item.setProfilePic(profilePic);
                        item.setImge(image);

                        feedItems.add(feedItems); // (feedItems)this is saying add(java.lang.String)  in ArrayList cannot be applied to(java.util.ArrayList<java.lang.String

                    } catch (JSONException e) {
                        e.printStackTrace();
                    }
                }
                PD.dismiss();
                listadapter.notifyDataSetChanged();
            }
        }, new Response.ErrorListener() {

            @Override
            public void onErrorResponse(VolleyError error) {
            }
        });

        AppController.getInstance().addToRequestQueue(jreq, "jreq");
    }

}

FeedListAdapter (updated)
    public class FeedListAdapter extends BaseAdapter {
    private Activity activity;
    private LayoutInflater inflater;
    private ArrayList<FeedItem> feedItems;

    int size=0 ;
    ImageLoader imageLoader = AppController.getInstance().getImageLoader();

    public FeedListAdapter(AlertMainActivity activity, ArrayList<String> feedItems) {
        this.activity = activity;
        this.feedItems = feedItems; // this is saying incompatible types.   required ArrayList com.brasiltradefx.btfxalertsadmin.data.FeedItem

found ArrayList java.lang.String
        if(this.feedItems !=null && !this.feedItems.isEmpty()){
            size = this.feedItems.size();
        }
    }

    @Override
    public int getCount() {
        return feedItems.size();
    }

    @Override
    public Object getItem(int location) {
        return feedItems.get(location);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        if (inflater == null)
            inflater = (LayoutInflater) activity
                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        if (convertView == null)
            convertView = inflater.inflate(R.layout.feed_item, null);

        if (imageLoader == null)
            imageLoader = AppController.getInstance().getImageLoader();

        TextView name = (TextView) convertView.findViewById(R.id.txtname);
        TextView date = (TextView) convertView
                .findViewById(R.id.txtdate);
        TextView statusMsg = (TextView) convertView
                .findViewById(R.id.txtStatusMsg);

        TextView order_type = (TextView) convertView.findViewById(R.id.txtOrderType);
        TextView pair = (TextView) convertView.findViewById(R.id.txtPair);
        TextView rate = (TextView) convertView.findViewById(R.id.txtRate);
        TextView quick_target = (TextView) convertView.findViewById(R.id.txtQuick_Target);
        TextView long_target = (TextView) convertView.findViewById(R.id.txtLong_Target);
        TextView stop_loss = (TextView) convertView.findViewById(R.id.txtStop_Loss);
        TextView break_even = (TextView) convertView.findViewById(R.id.txtBreak_Even);
        NetworkImageView profilePic = (NetworkImageView) convertView.findViewById(R.id.profilePic);
        FeedImageView feedImageView = (FeedImageView) convertView
                .findViewById(R.id.feedImage1);

        FeedItem item = feedItems.get(position);

        name.setText(item.getName());
        date.setText(item.getDate());
        order_type.setText(item.getOrder_type());
        pair.setText(item.getPair());
        rate.setText(item.getRate());
        quick_target.setText(item.getQuick_target());
        long_target.setText(item.getLong_target());
        stop_loss.setText(item.getStop_loss());
        break_even.setText(item.getBreak_Even());

        //Converting timestamp into x ago format - removed timeStamp - using date
        //CharSequence timeAgo = DateUtils.getRelativeTimeSpanString(
                //Long.parseLong(item.getTimeStamp()),
                //System.currentTimeMillis(), DateUtils.SECOND_IN_MILLIS);
        //timestamp.setText(timeAgo);

        // Chcek for empty status message
        if (!TextUtils.isEmpty(item.getStatus())) {
            statusMsg.setText(item.getStatus());
            statusMsg.setVisibility(View.VISIBLE);
        } else {
            // status is empty, remove from view
            statusMsg.setVisibility(View.GONE);
        }

        // Checking for null feed url
        //if (item.getUrl() != null) {
            //url.setText(Html.fromHtml(""
                    //+ item.getUrl() + " "));

            // Making url clickable
            //url.setMovementMethod(LinkMovementMethod.getInstance());
            //url.setVisibility(View.VISIBLE);
        //} else {
            // url is null, remove from the view
            //url.setVisibility(View.GONE);
        //}
        // user profile pic
        profilePic.setImageUrl(item.getProfilePic(), imageLoader);

        // Feed image
        if (item.getImge() != null) {
            feedImageView.setImageUrl(item.getImge(), imageLoader);
            feedImageView.setVisibility(View.VISIBLE);
            feedImageView
                    .setResponseObserver(new FeedImageView.ResponseObserver() {
                        @Override
                        public void onError() {
                        }

                        @Override
                        public void onSuccess() {
                        }
                    });
        } else {
            feedImageView.setVisibility(View.GONE);
        }

        return convertView;
    }

}

feed_item.xml
    <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/feed_bg"
    android:orientation="vertical"
    android:showDividers="end">

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:paddingLeft="@dimen/feed_item_padding_left_right"
        android:paddingRight="@dimen/feed_item_padding_left_right"
        android:background="#050505">

        <com.android.volley.toolbox.NetworkImageView
            android:id="@+id/profilePic"
            android:layout_width="@dimen/feed_item_profile_pic"
            android:layout_height="@dimen/feed_item_profile_pic"
            android:scaleType="fitCenter"
            android:layout_marginTop="15dp">
        </com.android.volley.toolbox.NetworkImageView>

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingLeft="@dimen/feed_item_profile_info_padd" >

            <TextView
                android:id="@+id/txtname"
                android:layout_width="fill_parent"
                android:layout_height="25dp"
                android:textSize="@dimen/feed_item_profile_name"
                android:textStyle="bold"
                android:background="#3452aa"
                android:layout_marginTop="10dp"
                android:textColor="#ffffff"
                android:textAlignment="center" />

            <TextView
                android:id="@+id/txtdate"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:textColor="#ffffff"
                android:textSize="@dimen/feed_item_date"
                android:layout_marginTop="10dp"
                android:gravity="right" />

            <TextView
                android:id="@+id/txtStatusMsg"
                android:layout_width="157dp"
                android:layout_height="wrap_content"
                android:paddingBottom="5dp"
                android:paddingLeft="@dimen/feed_item_status_pad_left_right"
                android:paddingRight="@dimen/feed_item_status_pad_left_right"
                android:paddingTop="@dimen/feed_item_status_pad_top"
                android:layout_marginTop="10dp"
                android:textColor="#ffffff"
                android:gravity="right"
                android:background="#3452aa"
                android:layout_gravity="right" />
        </LinearLayout>
    </LinearLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <TextView
            android:id="@+id/txtBreak_Even"
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:paddingBottom="5dp"
            android:paddingLeft="@dimen/feed_item_status_pad_left_right"
            android:paddingRight="@dimen/feed_item_status_pad_left_right"
            android:paddingTop="@dimen/feed_item_status_pad_top"
            android:background="#f8fe5a"
            android:textColor="#000000"
            android:layout_alignBottom="@+id/textViewBreakEven"
            android:layout_alignParentRight="true"
            android:layout_alignParentEnd="true"
            android:layout_below="@+id/txtStop_Loss"
            android:layout_marginLeft="120dp"
            android:layout_marginTop="5dp"
            android:textAlignment="center"
            android:layout_marginRight="5dp"
            android:gravity="center_vertical"
            android:textSize="18sp" />

        <TextView
            android:id="@+id/txtLong_Target"
            android:layout_width="fill_parent"
            android:layout_height="40dp"
            android:paddingBottom="5dp"
            android:paddingLeft="@dimen/feed_item_status_pad_left_right"
            android:paddingRight="@dimen/feed_item_status_pad_left_right"
            android:paddingTop="@dimen/feed_item_status_pad_top"
            android:background="#FF3CF14C"
            android:textColor="#000000"
            android:layout_below="@+id/txtQuick_Target"
            android:layout_alignLeft="@+id/txtQuick_Target"
            android:layout_alignStart="@+id/txtQuick_Target"
            android:layout_marginTop="5dp"
            android:textAlignment="center"
            android:layout_marginRight="5dp"
            android:gravity="center_vertical"
            android:textSize="18sp" />

        <TextView
            android:id="@+id/txtQuick_Target"
            android:layout_width="fill_parent"
            android:layout_height="40dp"
            android:paddingBottom="5dp"
            android:paddingLeft="@dimen/feed_item_status_pad_left_right"
            android:paddingRight="@dimen/feed_item_status_pad_left_right"
            android:paddingTop="@dimen/feed_item_status_pad_top"
            android:background="#3cf14c"
            android:textColor="#000000"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_marginLeft="120dp"
            android:layout_marginTop="5dp"
            android:layout_below="@+id/txtRate"
            android:textAlignment="center"
            android:layout_marginRight="5dp"
            android:gravity="center_vertical"
            android:textSize="18sp" />

        <TextView
            android:id="@+id/txtStop_Loss"
            android:layout_width="fill_parent"
            android:layout_height="40dp"
            android:paddingBottom="5dp"
            android:paddingLeft="@dimen/feed_item_status_pad_left_right"
            android:paddingRight="@dimen/feed_item_status_pad_left_right"
            android:paddingTop="@dimen/feed_item_status_pad_top"
            android:background="#FFFC5964"
            android:textColor="#000000"
            android:layout_below="@+id/txtLong_Target"
            android:layout_marginLeft="120dp"
            android:layout_marginTop="5dp"
            android:textAlignment="center"
            android:layout_marginRight="5dp"
            android:gravity="center_vertical"
            android:textSize="18sp" />

        <TextView
            android:id="@+id/txtRate"
            android:layout_width="fill_parent"
            android:layout_height="40dp"
            android:paddingBottom="5dp"
            android:paddingLeft="@dimen/feed_item_status_pad_left_right"
            android:paddingRight="@dimen/feed_item_status_pad_left_right"
            android:paddingTop="@dimen/feed_item_status_pad_top"
            android:background="#FF6AC1F7"
            android:textColor="#000000"
            android:layout_below="@+id/txtPair"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_marginLeft="120dp"
            android:layout_marginTop="5dp"
            android:textAlignment="center"
            android:layout_marginRight="5dp"
            android:gravity="center_vertical"
            android:textSize="18sp" />

        <TextView
            android:id="@+id/txtPair"
            android:layout_width="fill_parent"
            android:layout_height="40dp"
            android:paddingBottom="5dp"
            android:paddingLeft="@dimen/feed_item_status_pad_left_right"
            android:paddingRight="@dimen/feed_item_status_pad_left_right"
            android:paddingTop="@dimen/feed_item_status_pad_top"
            android:background="#FF6AC1F7"
            android:textColor="#000000"
            android:layout_below="@+id/txtOrderType"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_marginLeft="120dp"
            android:layout_marginTop="5dp"
            android:textAlignment="center"
            android:layout_marginRight="5dp"
            android:gravity="center_vertical"
            android:textSize="18sp" />

        <TextView
        android:id="@+id/txtOrderType"
        android:layout_width="fill_parent"
        android:layout_height="40dp"
        android:paddingBottom="5dp"
        android:paddingLeft="@dimen/feed_item_status_pad_left_right"
        android:paddingRight="@dimen/feed_item_status_pad_left_right"
        android:paddingTop="@dimen/feed_item_status_pad_top"
        android:background="#FF6AC1F7"
            android:textColor="#000000"
            android:layout_alignParentTop="true"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_marginTop="10dp"
            android:layout_toRightOf="@+id/textViewOrder_Type"
            android:layout_marginLeft="120dp"
            android:textAlignment="center"
            android:layout_marginRight="5dp"
            android:gravity="center_vertical"
            android:textSize="18sp" />

        <TextView
            android:layout_width="110dp"
            android:layout_height="40dp"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:text="BreakEven"
            android:id="@+id/textViewBreakEven"
            android:background="#FFF8FE5A"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_below="@+id/txtStop_Loss"
            android:layout_marginTop="5dp"
            android:textColor="#000000"
            android:layout_marginLeft="5dp"
            android:gravity="center_vertical|right"
            android:textSize="18sp" />

        <TextView
            android:layout_width="110dp"
            android:layout_height="40dp"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:text="StopLoss"
            android:id="@+id/textViewStop_Loss"
            android:background="#fc5964"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_below="@+id/txtLong_Target"
            android:layout_marginTop="5dp"
            android:textColor="#000000"
            android:singleLine="false"
            android:layout_marginLeft="5dp"
            android:gravity="center_vertical|right"
            android:textSize="18sp" />

        <TextView
            android:layout_width="110dp"
            android:layout_height="40dp"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:text="Long Target"
            android:id="@+id/textViewLong_Target"
            android:background="#FF3CF14C"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_below="@+id/txtQuick_Target"
            android:layout_marginTop="5dp"
            android:textColor="#000000"
            android:layout_marginLeft="5dp"
            android:gravity="center_vertical|right"
            android:textSize="18sp" />

        <TextView
            android:layout_width="110dp"
            android:layout_height="40dp"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:text="Quick Target"
            android:background="#FF3CF14C"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_below="@+id/txtRate"
            android:layout_marginTop="5dp"
            android:textColor="#000000"
            android:id="@+id/textViewQuick_Target"
            android:layout_marginLeft="5dp"
            android:gravity="center_vertical|right"
            android:textSize="18sp" />

        <TextView
            android:layout_width="110dp"
            android:layout_height="40dp"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:text="Rate"
            android:id="@+id/textViewRate"
            android:background="#FF6AC1F7"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_below="@+id/txtPair"
            android:layout_marginTop="5dp"
            android:textColor="#000000"
            android:layout_marginLeft="5dp"
            android:gravity="center_vertical|right"
            android:textSize="18sp" />

        <TextView
            android:layout_width="110dp"
            android:layout_height="40dp"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:text="Pair"
            android:id="@+id/textViewPair"
            android:background="#FF6AC1F7"
            android:layout_below="@+id/txtOrderType"
            android:layout_alignParentStart="true"
            android:layout_marginTop="5dp"
            android:textColor="#000000"
            android:layout_marginLeft="5dp"
            android:gravity="center_vertical|right"
            android:textSize="18sp" />

        <TextView
            android:layout_width="110dp"
            android:layout_height="40dp"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:text="Order Type"
            android:id="@+id/textViewOrder_Type"
            android:background="#6ac1f7"
            android:layout_alignTop="@+id/txtOrderType"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:textColor="#000000"
            android:layout_alignParentBottom="false"
            android:layout_marginLeft="5dp"
            android:gravity="center_vertical|right"
            android:textSize="18sp" />
    </RelativeLayout>

    <com.brasiltradefx.btfxalertsadmin.FeedImageView
            android:id="@+id/feedImage1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:scaleType="fitXY"
            android:visibility="visible" />
    </LinearLayout>

A: Remove other two contructer & give size like given in constructor.
public class FeedListAdapter extends BaseAdapter {
private Activity activity;
private LayoutInflater inflater;
private ArrayList<FeedItem> feedItems;

int size =0 ;
ImageLoader imageLoader = AppController.getInstance().getImageLoader();

    public FeedListAdapter(Activity activity, ArrayList<FeedItem> feedItems) {
        this.activity = activity;
        this.feedItems = feedItems;

    if(this.feedItems !=null && !this.feedItems.isEmpty()){
    size = this.feedItems.size();
    }
    }

    @Override
    public int getCount() {
        return size;
    }

    @Override
    public Object getItem(int location) {
        return feedItems.get(location);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        if (inflater == null)
            inflater = (LayoutInflater) activity
                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        if (convertView == null)
            convertView = inflater.inflate(R.layout.feed_item, null);

        if (imageLoader == null)
            imageLoader = AppController.getInstance().getImageLoader();

        TextView name = (TextView) convertView.findViewById(R.id.txtname);
        TextView date = (TextView) convertView
                .findViewById(R.id.txtdate);
        TextView statusMsg = (TextView) convertView
                .findViewById(R.id.txtStatusMsg);

        TextView order_type = (TextView) convertView.findViewById(R.id.txtOrderType);
        TextView pair = (TextView) convertView.findViewById(R.id.txtPair);
        TextView rate = (TextView) convertView.findViewById(R.id.txtRate);
        TextView quick_target = (TextView) convertView.findViewById(R.id.txtQuick_Target);
        TextView long_target = (TextView) convertView.findViewById(R.id.txtLong_Target);
        TextView stop_loss = (TextView) convertView.findViewById(R.id.txtStop_Loss);
        TextView break_even = (TextView) convertView.findViewById(R.id.txtBreak_Even);
        NetworkImageView profilePic = (NetworkImageView) convertView.findViewById(R.id.profilePic);
        FeedImageView feedImageView = (FeedImageView) convertView
                .findViewById(R.id.feedImage1);

        FeedItem item = feedItems.get(position);

        name.setText(item.getName());
        date.setText(item.getDate());
        order_type.setText(item.getOrder_type());
        pair.setText(item.getPair());
        rate.setText(item.getRate());
        quick_target.setText(item.getQuick_target());
        long_target.setText(item.getLong_target());
        stop_loss.setText(item.getStop_loss());
        break_even.setText(item.getBreak_Even());

        //Converting timestamp into x ago format - removed timeStamp - using date
        //CharSequence timeAgo = DateUtils.getRelativeTimeSpanString(
                //Long.parseLong(item.getTimeStamp()),
                //System.currentTimeMillis(), DateUtils.SECOND_IN_MILLIS);
        //timestamp.setText(timeAgo);

        // Chcek for empty status message
        if (!TextUtils.isEmpty(item.getStatus())) {
            statusMsg.setText(item.getStatus());
            statusMsg.setVisibility(View.VISIBLE);
        } else {
            // status is empty, remove from view
            statusMsg.setVisibility(View.GONE);
        }

        // Checking for null feed url
        //if (item.getUrl() != null) {
            //url.setText(Html.fromHtml(""
                    //+ item.getUrl() + " "));

            // Making url clickable
            //url.setMovementMethod(LinkMovementMethod.getInstance());
            //url.setVisibility(View.VISIBLE);
        //} else {
            // url is null, remove from the view
            //url.setVisibility(View.GONE);
        //}
        // user profile pic
        profilePic.setImageUrl(item.getProfilePic(), imageLoader);

        // Feed image
        if (item.getImge() != null) {
            feedImageView.setImageUrl(item.getImge(), imageLoader);
            feedImageView.setVisibility(View.VISIBLE);
            feedImageView
                    .setResponseObserver(new FeedImageView.ResponseObserver() {
                        @Override
                        public void onError() {
                        }

                        @Override
                        public void onSuccess() {
                        }
                    });
        } else {
            feedImageView.setVisibility(View.GONE);
        }

        return convertView;
    }

You also need to set the data to FeedItem & add it in Arraylist
    private void MakeJsonArrayReq() {
        PD.show();

        JsonArrayRequest jreq = new JsonArrayRequest(url, new Response.Listener<JSONArray>() {

            @Override
            public void onResponse(JSONArray response) {

                for (int i = 0; i < response.length(); i++) {
                    try {
                        JSONObject jo = response.getJSONObject(i);
                        String date = jo.getString("date");
                        String order = jo.getString("order");
                        String pair = jo.getString("pair");
                        String rate = jo.getString("rate");
                        String quick_target = jo.getString("quick_target");
                        String long_target = jo.getString("long_target");
                        String stop_loss = jo.getString("stop_loss");
                        String break_even = jo.getString("break_even");
                        String name = jo.getString("name");
                        String status = jo.getString("status");
                        String profilePic = jo.getString("profilePic");
                        String image = jo.isNull("image")? null : jo.getString("image");

    FeedItem  item = new FeedItem ();
item.setOrder(order);
item.setName(name);
//like this dont know about method name of item
                        feedItems.add(item);

                    } catch (JSONException e) {
                        e.printStackTrace();
                    }
                }
                PD.dismiss();
// set adapter here
                 listadapter = new FeedListAdapter(this, feedItems);
    listView.setAdapter(listadapter);
            }
        }, new Response.ErrorListener() {

            @Override
            public void onErrorResponse(VolleyError error) {
            }
        });

        AppController.getInstance().addToRequestQueue(jreq, "jreq");
    }

A: Because you don't have anything on your feedItems
first call your method to fill your feeditems.
MakeJsonArrayReq();
listadapter = new FeedListAdapter(this, feedItems);
listView.setAdapter(listadapter);

A: change
public FeedListAdapter(Activity activity, ArrayList<FeedItem> feedItems) {
    this.activity = activity;
    this.feedItems = feedItems;
}

public FeedListAdapter(AlertMainActivity activity, ArrayList<String> feedItems) {

}

to
public FeedListAdapter(Activity activity, ArrayList<FeedItem> feedItems) {

}

public FeedListAdapter(AlertMainActivity activity, ArrayList<String> feedItems) {
    this.activity = activity;
    this.feedItems = feedItems;
}


text:
Q: Differential backup in 4D database I am developing an accounting application in 4D. So, I need to take differential backups everyday.
I tried to take backups by configuring in database settings but 4D only takes the full backups (not differential backup).
Do 4D database support differential backup?
Is it possible?
Thanks in advance.

A: Take a look at the backup log file that is tied into the 4D backup system.
When the backup log file is enabled a new log will be created after each backup, it will contain all of the changes until the next backup. In this way the log file file is linked to the previous backup and could be integrated back into the restored database.
To take it a step further take a look at the NEW LOG FILE command. This will force the creation of a new log file without doing a backup. Once done the previous log would essentially be your differential backup.
More information on managing the log file is available here

There is also replication and mirroring options.


text:
Q: bundler: not executable: bin/rails in rails production while using whenever gem I'm using whenever gem for cronjobs in rails application - production.
I'm getting an error bundler: not executable: bin/rails
scheduler.rb
every 15.minute do
 runner 'TestJob.perform_later()'
end

crontab
0,15,30,45 * * * * /bin/bash -l -c 'cd /home/deploy/my-app/releases/20190719103116 && bundle exec bin/rails runner -e production '\''TestJob.perform_later()'\'''

but when i run /bin/bash -l -c 'cd /home/deploy/my-app/releases/20190719103116 && bundle exec bin/rails runner -e production '\''TestJob.perform_later()'\''' in my bash replacing bin/rails with just rails this work fine.How to fix this?

A: Try running it via a rake task:
config/schedule.rb
every 15.minutes do
  rake 'testing:run_tests'
end

lib/tasks/testing.rake
namespace :testing do
  desc 'Run tests'
  task run_tests: :environment do
    TestJob.perform_later
  end
end

A: Quick Answer
With the intent of still using the original runner job type, simply add this to your schedule.rb:
set :runner_command, "rails runner"

Long Answer
The documentation isn't so clear about it, but you can see the default runner job type being set as such in Whenever's /lib/whenever/setup.rb:
job_type :runner, "cd :path && :bundle_command :runner_command -e :environment ':task' :output"

In that same file you can see that this :runner_command setting is set with:
set :runner_command, case
  when Whenever.bin_rails?
    "bin/rails runner"
  when Whenever.script_rails?
    "script/rails runner"
  else
    "script/runner"
  end

So by default your cron command will be created using bin/rails runner unless you overide it with the above answer.


text:
Q: Going fullscreen with setTimeout I have a web page where I want to let the user to click a button and start to watch a video in fullscreen mode. However, I don't want the video to play immediately after clicking the button. I want it to wait some seconds and then play the video and go fullscreen. To achieve this; I have used the setTimeout function like so;
 function startVideoAfterSecs(seconds){
    setTimeout(() => {
      this.activateFullscreen(); // function to go fullsreen
      this.player.play();
    }, seconds);
  };

I know that it is not possible to go fullscreen without a user interaction, there should be some user event to trigger it. That's why, startVideoAfterSecs is bound to a button's onclick event. However, I am still getting the error;

Unhandled Rejection (TypeError): fullscreen error

I know that this error is causing about a browser blockage, because it does not accept it as a user action since the setTimeout function is being used. Are there any way to solve this issue?
Thanks in advance.

A:
"startVideoAfterSecs is bound to a button's onclick event"

But this.activateFullscreen() and this.player.play() are not anymore, since they are called from the timeout callback.
But actually that's not even the problem, which is more that after some time the browsers will not consider the call as still being from a user-interaction, it seems to be around 5s in Chrome, but it may very well change at any time.
For the play() call, you can workaround that by calling it in the click event handler directly, then pausing as soon as possible. This will mark the HTMLMediaElement as user-activated, and you'll be able to call play on it whenever you want.
For the fullscreen mode though, no other way than requesting an other user's interaction, or to make it in that given time.

A: Firstly, make sure this is pointing to the element you want to go fullscreen. Also, try using requestFullscreen() instead. Here's an example of it working with setTimeout()...
https://jsfiddle.net/8u3t5ae7/


text:
Q: How to put the title of screens in header of each screen? I need a hand to understand the behavior of my screens on my application.
I just noticed that, whatever screen I'm browsing, the title of the screen at the top of the header is always "Orders".
Of course, I want each header to display the screen title, so I think there is some information missing in my navigation file.
However, I don't really know where or how to add the title of the screen in the header.
However, I put the name/title of the screen in each Stack. screen.
Could you guide me, help me and explain to me where is my mistake, please?
Thank you for reading me.
const Stack = createStackNavigator();
const Tab = createBottomTabNavigator();

const screenOptionStyle = {
  headerStyle: {
    backgroundColor: "#F78400",
  },
  headerTintColor: "white",
  headerBackTitle: "Back",
  backgroundColor:'#f7f6f6'
};

export const MainStackNavigator = () => {
  return (
   <Stack.Navigator screenOptions={screenOptionStyle}>
      <Stack.Screen name = 'Orders' component = {BottomTabNavigator} options={{ title: i18n.t("orders.title") }}/>
      <Stack.Screen name = 'Authentication' component = {Authentication} options={{title: i18n.t("authentication.title"), headerShown: false }}/>
      <Stack.Screen name = 'Account' component = {Account} options={{ title: i18n.t("account.title") }}/>
      <Stack.Screen name = 'Activities' component = {Activities} options={{ title: i18n.t("activities.title") }}/>
      <Stack.Screen name = 'Contact' component = {Contact} options={{ title: i18n.t("contact.title") }}/>
      <Stack.Screen name = 'Login' component = {Login} options={{ title: i18n.t("login.title"), headerShown: false }}/>
      <Stack.Screen name = 'Register' component = {Register} options={{ title: i18n.t("register.title"), headerShown: false }}/>
      <Stack.Screen name = 'Reset' component = {Reset} options={{ title: i18n.t("reset.title") }}/>
      <Stack.Screen name = 'Tools' component = {Tools} options={{ title: i18n.t("tools.title") }}/>
      <Stack.Screen name = 'Scan' component = {Scan} options={{ title: i18n.t("scan.title") }}/>
      <Stack.Screen name = 'Current' component = {Current} options={{ title: i18n.t("current.title") }}/>
      <Stack.Screen name = 'Completed' component = {Completed} options={{ title: i18n.t("completed.title") }}/>
      <Stack.Screen name = 'Products' component = {Products} options={{ title: i18n.t("products.title") }}/>
      <Stack.Screen name = 'ProductDetails' component = {ProductDetails} options={{ title: i18n.t("fiche.title") }}/>
      <Stack.Screen name = 'Information' component = {Information} options={{ title: i18n.t("information.title") }}/>
      <Stack.Screen name = 'Photos' component = {Photos} options={{ title: i18n.t("photos.title") }}/>
      <Stack.Screen name = 'Stock' component = {Stock} options={{ title: i18n.t("stock.title") }}/>
      <Stack.Screen name = 'Terms' component = {Terms} options={{ title: i18n.t("terms.title") }}/>
      <Stack.Screen name = 'About' component = {About} options={{ title: i18n.t("about.title") }}/>
      <Stack.Screen name = 'Tickets' component = {Tickets} options={{ title: i18n.t("tickets.title") }}/>
      <Stack.Screen name = 'Dashboard' component = {Dashboard} options={{ title: i18n.t("dashboard.title") }}/>
      <Stack.Screen name = 'Settings' component = {Settings} options={{ title: i18n.t("settings.title") }}/>
      <Stack.Screen name = 'Welcome' component = {Welcome} options={{ title: i18n.t("welcome.title") }}/>
      <Stack.Screen name = 'BottomTabNavigator' component = {BottomTabNavigator} options={{ title: i18n.t("welcome.title") }}/>
    </Stack.Navigator>
  );
}

export const BottomTabNavigator = () => {
  return (
    <Tab.Navigator tabBarOptions={{
      activeTintColor: 'black',
      labelStyle: {fontSize: 12, color: 'white'},
      style: {backgroundColor: '#F78400'},
    }}>
      <Tab.Screen
          name={i18n.t("orders.title")}
          component={Orders}
          options={{
              tabBarIcon: ({ focused, horizontal, tintColor }) => {
                return (
                  <Image
                    source={require("../assets/images/orders.png")}
                    style={styles.icon}
                  />
                );
              }
          }}
        />
        <Tab.Screen
          name={i18n.t("dashboard.title")}
          component={Dashboard}
          options={{
            tabBarIcon: ({ focused, horizontal, tintColor }) => {
              return (
                <Image
                  source={require("../assets/images/dashboard.png")}
                  style={styles.icon}
                />
              );
            }
          }}
        />
        <Tab.Screen
          name={i18n.t("tools.title")}
          component={Tools}
          options={{
            tabBarIcon: ({ focused, horizontal, tintColor }) => {
              return (
                <Image
                  source={require("../assets/images/tools.png")}
                  style={styles.icon}
                />
              );
            }
          }}
        />
        <Tab.Screen
          name={i18n.t("settings.title")}
          component={Settings}
          options={{
            tabBarIcon: ({ focused, horizontal, tintColor }) => {
              return (
                <Image
                  source={require("../assets/images/settings.png")}
                  style={styles.icon}
                />
              );
            }
          }}
        />
    </Tab.Navigator>
  );
};

A: Since you have nested BottomTabNavigation in stack screen. Title of the stack screen will always be same.
import {getFocusedRouteNameFromRoute} from '@react-navigation/native';
const Stack = createStackNavigator();
const Tab = createBottomTabNavigator();

const screenOptionStyle = {
  headerStyle: {
    backgroundColor: '#F78400',
  },
  headerTintColor: 'white',
  headerBackTitle: 'Back',
  backgroundColor: '#f7f6f6',
};

function getHeaderTitle(route) {
  const routeName = getFocusedRouteNameFromRoute(route) ?? 'OrdersTab';

  switch (routeName) {
    case 'OrdersTab':
      return i18n.t('orders.title');
    case 'DashboardTab':
      return i18n.t('dashboard.title');
    case 'ToolsTab':
      return i18n.t('tools.title');
    case 'SettingsTab':
      return i18n.t('settings.title');
  }
}

export const MainStackNavigator = () => {
  return (
    <Stack.Navigator screenOptions={screenOptionStyle}>
      <Stack.Screen
        name="Orders"
        component={BottomTabNavigator}
        options={({route}) => ({
          headerTitle: getHeaderTitle(route),
        })}
      />
      <Stack.Screen
        name="Authentication"
        component={Authentication}
        options={{title: i18n.t('authentication.title'), headerShown: false}}
      />
      <Stack.Screen
        name="Account"
        component={Account}
        options={{title: i18n.t('account.title')}}
      />
      <Stack.Screen
        name="Activities"
        component={Activities}
        options={{title: i18n.t('activities.title')}}
      />
      <Stack.Screen
        name="Contact"
        component={Contact}
        options={{title: i18n.t('contact.title')}}
      />
      <Stack.Screen
        name="Login"
        component={Login}
        options={{title: i18n.t('login.title'), headerShown: false}}
      />
      <Stack.Screen
        name="Register"
        component={Register}
        options={{title: i18n.t('register.title'), headerShown: false}}
      />
      <Stack.Screen
        name="Reset"
        component={Reset}
        options={{title: i18n.t('reset.title')}}
      />
      <Stack.Screen
        name="Tools"
        component={Tools}
        options={{title: i18n.t('tools.title')}}
      />
      <Stack.Screen
        name="Scan"
        component={Scan}
        options={{title: i18n.t('scan.title')}}
      />
      <Stack.Screen
        name="Current"
        component={Current}
        options={{title: i18n.t('current.title')}}
      />
      <Stack.Screen
        name="Completed"
        component={Completed}
        options={{title: i18n.t('completed.title')}}
      />
      <Stack.Screen
        name="Products"
        component={Products}
        options={{title: i18n.t('products.title')}}
      />
      <Stack.Screen
        name="ProductDetails"
        component={ProductDetails}
        options={{title: i18n.t('fiche.title')}}
      />
      <Stack.Screen
        name="Information"
        component={Information}
        options={{title: i18n.t('information.title')}}
      />
      <Stack.Screen
        name="Photos"
        component={Photos}
        options={{title: i18n.t('photos.title')}}
      />
      <Stack.Screen
        name="Stock"
        component={Stock}
        options={{title: i18n.t('stock.title')}}
      />
      <Stack.Screen
        name="Terms"
        component={Terms}
        options={{title: i18n.t('terms.title')}}
      />
      <Stack.Screen
        name="About"
        component={About}
        options={{title: i18n.t('about.title')}}
      />
      <Stack.Screen
        name="Tickets"
        component={Tickets}
        options={{title: i18n.t('tickets.title')}}
      />
      <Stack.Screen
        name="Dashboard"
        component={Dashboard}
        options={{title: i18n.t('dashboard.title')}}
      />
      <Stack.Screen
        name="Settings"
        component={Settings}
        options={{title: i18n.t('settings.title')}}
      />
      <Stack.Screen
        name="Welcome"
        component={Welcome}
        options={{title: i18n.t('welcome.title')}}
      />
      <Stack.Screen
        name="BottomTabNavigator"
        component={BottomTabNavigator}
        options={{title: i18n.t('welcome.title')}}
      />
    </Stack.Navigator>
  );
};

export const BottomTabNavigator = () => {
  return (
    <Tab.Navigator
      tabBarOptions={{
        activeTintColor: 'black',
        labelStyle: {fontSize: 12, color: 'white'},
        style: {backgroundColor: '#F78400'},
      }}>
      <Tab.Screen
        name={'OrdersTab'}
        component={Orders}
        options={{
          tabBarIcon: ({focused, horizontal, tintColor}) => {
            return (
              <Image
                source={require('../assets/images/orders.png')}
                style={styles.icon}
              />
            );
          },
        }}
      />
      <Tab.Screen
        name={'DashboardTab'}
        component={Dashboard}
        options={{
          tabBarIcon: ({focused, horizontal, tintColor}) => {
            return (
              <Image
                source={require('../assets/images/dashboard.png')}
                style={styles.icon}
              />
            );
          },
        }}
      />
      <Tab.Screen
        name={'ToolsTab'}
        component={Tools}
        options={{
          tabBarIcon: ({focused, horizontal, tintColor}) => {
            return (
              <Image
                source={require('../assets/images/tools.png')}
                style={styles.icon}
              />
            );
          },
        }}
      />
      <Tab.Screen
        name={'SettingsTab'}
        component={Settings}
        options={{
          tabBarIcon: ({focused, horizontal, tintColor}) => {
            return (
              <Image
                source={require('../assets/images/settings.png')}
                style={styles.icon}
              />
            );
          },
        }}
      />
    </Tab.Navigator>
  );
};


text:
Q: Reload data in UITableView from UIPopoverView In my "didSelectRowAtIndexPath" i show a PopoverViewController. In this popover i loaded information of the row that i touched. I want modify this information and later i´ll change it in the same row of the tableView.
Someone can help me?
Thanks for all.
Best regards.

A: Not sure I am understanding you but as long as you will change the information in the data structure that acts as the UITableView dataSource you will be able to fire [tableView reloadData] and see the table data updated.


text:
Q: Targeting HTML IDs generated by PHP using echo My PHP:

        <?php
            $masterCat = 39; // Master category 'Seam Builder' ID is 39)
            $taxonomyName = "product_cat";
            $termchildren = get_term_children($masterCat, $taxonomyName);

            foreach ($termchildren as $child) {
                $subCat = get_term_by('id', $child, $taxonomyName); //assigns $subCat to the current subcategory in the loop
                $subCat_title = $subCat->name; //gets the name of the subcategory
                $cat_id = $subCat->term_id; //gets the ID of the subcategory on its own
                $thumbnail_id = get_term_meta($child, 'thumbnail_id', true); //gets the thumbnail of the subcategory
                $image = wp_get_attachment_url($thumbnail_id); //gets the URL of the thumbnail
        ?>

        <a id="<?php echo $cat_id ?>" class="seamBuilder_trigger">
            <img src="<?php echo $image ?>" />
            <?php echo $subCat_title ?>

            <?php } //ends for foreach loop above ?>

See the comments I made in the CSS block below to see which ones are working and which ones are not. Hopefully I'm not missing something painfully obvious, but I've been over it quite a few times and even the results I am finding on the web all seem to be related to generating an HTML ID for more than 1 element which would cause it to break.
The HTML Output from the PHP above:

#seam-builder-wrap {
  //This CSS statement DOES work.
  display: flex;
  flex-wrap: wrap;
  align-content: space-evenly;
}

#seam-builder-wrap div {
  //This CSS statement DOES work.
  max-width: 50%;
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 20%;
}

#40 {
  order: 1;
} //removed #seam-builder-wrap just for testing - still didn't work
#seam-builder-wrap #41 {
  order: 2;
} //NONE of these CSS statements work from here below
#seam-builder-wrap #42 {
  order: 3;
}

#seam-builder-wrap #43 {
  order: 4;
}

#seam-builder-wrap #44 {
  order: 5;
}

#seam-builder-wrap #45 {
  order: 6;
}

#seam-builder-wrap #46 {
  order: 9;
}

#seam-builder-wrap #47 {
  order: 7;
}

#seam-builder-wrap #48 {
  order: 8;
}

#seam-builder-wrap #49 {
  order: 10;
}

#seam-builder-wrap #50 {
  order: 11;
}

#seam-builder-wrap #51 {
  order: 13;
}

#seam-builder-wrap #52 {
  order: 14;
}

#seam-builder-wrap #53 {
  order: 15;
}

#seam-builder-wrap #54 {
  order: 16;
}

#seam-builder-wrap #55 {
  order: 17;
}

#seam-builder-wrap #56 {
  order: 18;
}

#seam-builder-wrap #57 {
  order: 19;
}

#seam-builder-wrap #58 {
  order: 20;
}

#seam-builder-wrap #59 {
  order: 22;
}

#seam-builder-wrap #60 {
  order: 23;
}

#seam-builder-wrap #61 {
  order: 21;
}

#seam-builder-wrap #62 {
  order: 24;
}

#seam-builder-wrap #63 {
  order: 25;
}

#seam-builder-wrap #64 {
  order: 29;
}

#seam-builder-wrap #65 {
  order: 26;
}

#seam-builder-wrap #66 {
  order: 27;
}

#seam-builder-wrap #67 {
  order: 28;
}

#seam-builder-wrap #68 {
  order: 30;
}

#seam-builder-wrap #69 {
  order: 31;
}

#seam-builder-wrap #70 {
  order: 34;
}

#seam-builder-wrap #71 {
  order: 32;
}

#seam-builder-wrap #72 {
  order: 33;
}

#seam-builder-wrap #73 {
  order: 12;
}

```

      1" Instaloc Seam

      1" Snap-On Seam

      1" Double Fold Seam

      1" Nail Strip Seam

      1" Single Fold Seam

      1" Snap Seam

      1 3⁄8" T-Seam

      1 1⁄2" Dutch Seam

      1 1⁄2" Batten Cap T-Seam

      1 1⁄2" Double Fold Seam

      1 1⁄2" Single Fold Seam

      1 1⁄2" Snap-On Seam

      1 1⁄2" Nail Strip Seam

      1 1⁄2" Cee-Lock Seam

      1 5⁄8" Snap Seam

      1 3⁄4" Ultra Lock Seam

      1 3⁄4" Interlock Seam

      1 3⁄4" Snap Lock

      1 3⁄4" Mirage II Seam

      2" Bulb Seam Cap

      2" Double Fold Seam

      2" Single Fold Seam

      2" T-Seam

      2 1⁄8" Trap Single Fold Seam

      2 1⁄2" Batten Cap T-Seam

      2 3⁄8" Single Fold Seam

      2 3⁄8" T-Seam

      2 1⁄2" Single Fold Seam

      2 1⁄2" Double Fold Seam

      2 1⁄2" Bulb Seam

      3" Trap Snap Seam

      3" Trap Double Fold Seam

      3" Trap Single Fold Seam

      1 1⁄2" Snap Seam

Thank you all for your input. This problem was solved when I put a prefix before my unique ID instead of starting it with a number.

A: Answer: The HTML ID could not start with a number and needed a prefix.


text:
Q: I need to build a wpf application with some animations, whats the best and fastet way to start with? I need to build a wpf application with some animations, what do you recommend me to use (sample applications, books tutorials) that can benefit me very fast taking into consideration I have a 6 years experience in DotNet apps.
Thanks

A: I've just started WPF myself, and I can highly recommend Adam Nathan's book:  'WPF Unleashed'. http://www.amazon.com/Windows-Presentation-Foundation-Unleashed-WPF/dp/0672328917 .  It has  a friendly style with lots of colour illustrations.  It also seeks to teach by example.
I would also suggest you download Vertigo's Family.Show and 'dig around under the bonnet'.  This is a teaching application that uses every trick in the WPF book it can:  styles, templates and the suchlike.  Get it from http://www.vertigo.com/familyshow.aspx


text:
Q: Event Slide Toggle stops after page changed I'm working on my Rails project. I have a header dropdown menu and SlideToggle is working fine unless I change the page. Then it works again if I refresh the page (F5).
$(document).ready(function(){
    $('.dropdown-toggle').click(function(){
        $('.dropdown-menu').slideToggle("fast");
    });
});

A: The problem will be with Turbolinks
You'll be able to resolve like this:
var load_new = function(){
    $(document).on("click", ".dropdown-toggle", function(){
        $('.dropdown-menu').slideToggle("fast");
    });
});

$(document).on("page:load ready", load_new);


text:
Q: Avoid recursive dupes in review queue I've just come to this review:
https://meta.stackexchange.com/review/close/39952
The question suggested as the duplicate is already closed as a duplicate of the question in the review queue.
I presume the question proposed as the duplicate was itself marked as dupe of the question in the review queue after the flag was raised on the question in the review.

In the interest of science, I clicked "close as dupe" to see if the site would allow me to create a dupe loop in the review area.
However, clever site, simply told me:

This closure would result in the 'duplicate of' navigation only
  leading in a circle.

Both "Edit" and "Skip" are essentially pointless as I'll just be leaving the review there for someone else to clean up, or the close votes to eventually time out.
"Leave Open" is the only possible option to clean up this review.
Solution
When a question is being flagged as a duplicate, check if the question being proposed as the duped question is not already in a review queue with the question being flagged as a proposed duplicate.
So:
QuestionA is flagged as a dupe of QuestionB.
If QuestionB is already in an an active review queue as being a dupe of QuestionA, don't allow the flag on QuestionA until the review is completed.
This makes sense because it resolves the issue of a review queue obtaining a potentially recursive review.
And allows the first flagged question to be fully reviewed.
In the review I saw this scenario in, the question flagged first seems to have been reviewed last.
If community decides the first question flagged is a dupe, then so be it. No need for a war. In fact, the same user(s) who do not remember the two questions might vote to close both as a dupe for each other, until the final vote, then the question remaining in the review queue can only be "Left Open".

I recognise it's probs not worthwhile to think about all this and write code for it, when it'll likely be a rare occurrence.
Just making it known for discussion, and more-so for the site devs to be aware of it (who, to be fair, will likely start singing "things that make you go meh" :D).


text:
Q: Excel - Using SUMIFS (OR) using criteria inputted in a separate cell I have a very specific issue with the SUMIFS formula, I am positive there is a fix for this, that said I have not been able to find it.
In essence, the result of =SUM(SUMIFS(A:A;B:B;{3;4})) is what I am going for, however, I want the "{3;4}" to be dynamic and changeable through a cell in another worksheet (Dashboard purposes).
If I write =SUM(SUMIFS(A:A;B:B;C1))where C1="{"&3;4&"}"or C1{=3;4} (using ctrl+shift+enter) - I do not get the same result.
Anything I try is either treated by SUMIFS as text, or a number combination, but not as an array criteria.
Any ideas? :)

A: When in doubt add a helper column! ( Personal preference but I try to stay away from array calc's unless absolutely necessary ). Maybe try the following?
table1
+---+------+--------+
| A |  B   | helper |
+---+------+--------+
| 1 | 1    | TRUE   |
| 4 | blah | TRUE   |
| 3 | 3    | FALSE  |
| 6 | 1    | TRUE   |
| 7 | 1    | TRUE   |
| 3 | blah | TRUE   |
+---+------+--------+

...having a helper array named helper containing your acceptable inputs and looks like this:
+------+
|  ok  |
+------+
| 1    |
| blah |
+------+

..and where the "helper" column from table1 has a formula of =COUNTIFS(helper[ok],[@B])>0. your target sumifs() formula would then look something like this: =SUMIFS(Table1[A],Table1[helper],TRUE). Hope this helps, good luck!

A: I've had a go at writing a formula that might do it:
=SUM(SUMIFS(A:A;B:B;value(c1);B:B;value(c2)))
writing the value function forces the cell reference into a number, I'm not clear wether you want the criteria to be an either/or (what's been written) or if you're look for an as well as (=sum(sumifs(A:A;BB;Value(c1))+sumifs(A:A;B:B:Value(c2))), but if you wanted an inbetween function. (=sum(sumifs(A:A;BB;<=Value(c1))+sumifs(A:A;B:B:=>Value(c2)))


text:
Q: Terminology: What is a "bounded problem"? In mathematical optimization, what does it mean if we say that a problem is bounded.
This appears (but is not defined) in a paper that I am reading and I have not found any definitions for it.
So far, I've looked in Boyd's Convex Optimization, on Wikipedia, and on this site.
For example, consider Problem $(P)$:
$$
\min_x f(x) \quad \text{s.t.} \quad x \in X
$$
If we say that $(P)$ is bounded, does this mean:

*

*The feasible set $X$ is bounded?

*The image of the feasible set $f(X)$ is bounded?

*The image of the feasible set $f(X)$ is bounded from below?

By the way, I am reading this article.
This expression is found in the algorithm at the top of page 145.

A: To say a problem is bounded is to say that the solution to the problem has to be special ( in simplest terms) ( special in sense that it's defined a certain way) apart from being just a general solution.
Here, there can be values of F for which it attains a minimum (global/local) which are not in the set X and they will not be considered.
In your words, in this problem, "the image of X under F" is bounded from below, or, we need the smallest element from the set of images under F of those x which belong to X.


text:
Q: Como posso ler uma página e capturar um e-mail? A ideia: Ler uma página qualquer da Web e extrair dela uma lista de e-mails ou apenas um e-mail que esteja presente nessa página.
Exemplo: Digamos que eu tenha uma página de Energia Solar para prospectar e eu tenho interesse em abrir esse site e retirar dele apenas informações de contato dessa empresa, tipo o e-mail, telefone e entre outros campos. Mas a intenção inicialmente, seria apenas fazer funcionar essa parte de captura para posteriormente ficar mais complexo, mas nesse caso ainda não funciona com esse código.
Esse é o código que estou utilizando atualmente:

(async () => {
  let browser = await puppeteer.launch({ headless: true });
  let page = await browser.newPage();

  try {
    await page.goto('http://agenciaar3.com.br/');
    const email = await page.evaluate(() => {
      let emailEl = document.querySelector(':contains("contato@agenciaar3.com.br")');
      return emailEl ? emailEl.textContent : null;
    });

    console.log(email);
  } catch (error) {
    console.error('Erro ao executar o Puppeteer:', error);
  } finally {
    await browser.close();
  }
})(); ```

Se alguém poder me ajudar, agradeçooo!


text:
Q: Deallocating BufferGeometry? As the basis for my scene objects, I have a single root Object3D. My data is loaded as a tree structure of Object3Ds from this root. Meshes are added to the leaf Object3Ds, using BufferGeometry/MeshPhongMaterial. I clear the existing tree by passing the root Object3D into this method:
clearScene:
    function (obj) {
        if (obj instanceof THREE.Mesh)
        {
            obj.geometry.dispose();
            obj.geometry = undefined;
            obj.material.dispose();
            obj.material = undefined;
            obj = undefined;
        }
        else
        {
            if (obj.children !== undefined) {
                while (obj.children.length > 0) {
                    this.clearScene(obj.children[0]); // removing children changes the length of the array.
                    obj.remove(obj.children[0]);
                }
            }
        }
    }

Consider the following simple tree:

*

*Scene (Scene)

*

*Root (Object3D)

*

*Branch (Object3D)

*

*Leaf (Mesh)

Once this structure is in the scene, I observe the heap (using Chrome's dev tools). I can see 3 Object3Ds objects, and 2 Mesh objects (the extras are the prototypes).
When I call clearScene(Root), I see it step through the tree, removing the Object3Ds, and cleaning up the meshes.  But when I observe the heap, I see that although the Object3Ds have been removed, the 2 Mesh objects (and their associated BufferGoemetry and Material objects) remain. If I load the data a second time after clearing, I see 3 Object3Ds (okay), and 4 Meshes (not okay).
I believe this means that a reference isn't getting cleared correctly, but I didn't see any retainers in the heap that would do this.
I must be missing something else which is causing these objects to hang around.
r69dev (I was seeing the same in r68), testing in Chrome 36.0.1985.125

A: Issue (concern) submitted on github: https://github.com/mrdoob/three.js/issues/5175
r69dev requires an explicit call to the dispose method for meshes to properly remove references held by the renderer.
Working code:
clearScene:
function (obj) {
    if (obj instanceof THREE.Mesh)
    {
        obj.geometry.dispose();
        obj.geometry = null;
        obj.material.dispose();
        obj.material = null;
        obj.dispose(); // required in r69dev to remove references from the renderer.
        obj = null;
    }
    else
    {
        if (obj.children !== undefined) {
            while (obj.children.length > 0) {
                this.clearScene(obj.children[0]);
                obj.remove(obj.children[0]);
            }
        }
    }
}


text:
Q: Make local repository fall to the default repositories I have a local nexus repository in my organization. I would like to make sure that when a new artifact needs to be loaded on a developer's machine it will first go to the local repository and if the artifact is not found fallback to the default maven repositories and download it to the local repository and then to the developer's machine.
Is using mirrorOf in each machine's settings.xml the way to go?

A: Defining a mirror in the settings.xml configures maven to override the location of a repository it is configured. Instead of using the location the repository requests it will use the one declared in the mirror.
To override the location of all repositories including the central repository add the following to the settings.xml file.
<mirrors>
  <mirror>
    <id>nexus-mirror</id>
    <url>http://nexus.example.com:8081/nexus/content/groups/examplegroup/</url>
    <mirrorOf>*</mirrorOf>
  </mirror>
</mirrors>

A nexus server can host group and proxy type repositories. A group repository allows you reference multiple over repositories. A proxy repository delegates to a remote repository and caches its artifacts.
In this case the examplegroup needs to be configured to include proxy respositories of the remote repositories you want to fallback to.
You can configure additional repositories in the pom.xml file. These are tried in addition to the default repositories.
<repositories>
    <repository>
        <id>sonatype-nexus-snapshots</id>
        <name>Sonatype Nexus Snapshots</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>


text:
Q: JENKINS build fatal error: file has been modified since the precompiled header was built Hello IOS build in Jenkins failed with:
 20:30:25 fatal error: file '/Users/epa/workspace/LIB-   continious/Pods/Headers/CocoaLumberjack/DDLog.h' has been modified since the precompiled header   '/Users/epa/Library/Developer/Xcode/DerivedData/Horizon-   byelvvypwyklmtfohzjdakhwxgnk/Build/Intermediates/PrecompiledHeaders/Horizon-Prefix-  dhhovaqluqdqbgeholxnfujpmhmg/Horizon-Prefix.pch.pch' was built

I have got only ssh connect


text:
Q: Ecto Migrations specify collation How do I specify the column collation while using add in Ecto Migrations? I am using Postgres.
I saw an option of using custom types like specifying :"varchar(120)", but :"varchar(120) collate "C"" does not work due to the necessary quotes.
I know I can fallback to raw sql, but would prefer to leverage add.


text:
Q: Overuse of "however" in my scientific writing? In scientific writing, I always feel the need to logically connect all my sentences to have a clear logical path between beginning and end of a paragraph, else it is just feels like a list of random phrases to me and not a complete argument. However, more often than not, the only fitting connector is "however", as "but" is informal.
Is it acceptable to use "however" very often or is that bad style and in the latter case, how can I improve it?
An example
Blue data is better than red data.
Standard algorithms, however, are all written with red data in mind and don't work on blue data.
Violet algorithms handle blue data as well as red data, however they are very slow.
Blue-only algorithms can process blue data really fast, however most blue data is mixed with a small percentage of red data.

A: Possible fixes:
Blue data is better than red data. Standard algorithms, on the other hand, are all written with red data in mind and don't work on blue data. Violet algorithms handle blue data as well as red data, yet they are very slow. Blue-only algorithms can process blue data really fast, even though most blue data is mixed with a small percentage of red data.
Also, consider the alternatives:

Synonyms for however adv
still, nevertheless,
      nonetheless,
      notwithstanding,
      withal,
      yet,
      after all,
      all the same,
      anyhow,
      be that as it may,
      but,
      despite,  for all that,
      howbeit,
      in spite of,
      on the other hand,
          per contra,  though

[Sorry, Lucky, I didn't see your link at the time of editing; you were earlier]

A: Yes, however is fine and extremely common in scientific writing. There's nothing wrong with but either, by the way. You can also use other alternatives. For example:

Blue data is better than red data. Standard algorithms, however, are all written with red data in mind and don't work on blue data. Violet algorithms handle blue data as well as red data, but they are very slow. On the one hand, blue-only algorithms can process blue data really fast; on the other hand, most blue data is mixed with a small percentage of red data.

What is certainly true, however, is that not only is the word however used in scientific writing, it is far more common there than anywhere else. See this COCA result:

A: If you start the statement with "while" or "although" once in a while, you can cut out some of the "however's".

A: In many cases cases you use however improperly, and you refer to the wrong points.
In addition to 'however' the formal writing connectors can be

*

*although

*whereas

*while

*whilst

I rewrote your piece, with my suggestions in bold and unnecessary words in [brackets]

Blue data is better than red data, although standard algorithms [,
  however,] are all written with red data in mind and don't work on blue
  data. While violet algorithms handle blue data as well as red
  data, [however] they are very slow. Blue-only algorithms can process
  blue data really fast, however most blue data is mixed with a small
  percentage of red data.

Also be careful with 'as well as'. While it can not be confused with ',as well as' meaning 'along with' because it would have been prefixed with coma in that case, it is better to use 'as efficiently as' instead for better clearness.


text:
Q: PNG from CSS using PHP? I'd like to ask whether its possible to take a bit of CSS on a page with a PHP extension, and add the PHP header to define the page as a PNG, and have a dynamic image? From what I've heard this isn't possible, but if it isn't, is there a way easier than the conventional method of creating a PHP image?
Edit*
To elaborate, I want to do something like draw a bordered 200x200p box in CSS with styling and HTML, and have this HTML/CSS box on a .PHP page, and get this page to become a PNG image with the .PNG extension using the PHP header tag.
Thank You!
Karan

A: You can make use of wkhtmltopdf which can convert html to pdf using webkit (qtwebkit) which supports CSS properly. There even exists a PHP binding for it.
You can then convert the PDF file to a PNG (e.g. with ImageMagick) and serve it from within PHP.
Related: Website screenshots using PHP

A: If I understand your question properly, I am not sure how this would be possible using only PHP but you could use ImageMagick on server side to convert the HTML page to a png.


text:
Q: Latex biber gives me [0] for cites using JabRef Hi guys I'm having an unresolvable problem with my LaTeX document (at least for me).
Here are my first two entries from the references file:
% Encoding: UTF-8

@Article{FelixWortmann2015,
  author       = {Felix Wortmann, Kristina Fluechter},
  title        = {Internet of Things - Technology and Value Added},
  journal      = {Springer},
  journaltitle = {Business \& Information Systems Engineering},
  year         = {2015},
  date         = {2015-03-27},
  url          = {https://link.springer.com/content/pdf/10.1007/s12599-015-0383-3.pdf},
}

@Online{Lueth2016,
  author = {Knud Lasse Lueth},
  title  = {OVERVIEW OF 640+ ENTERPRISE IOT USE CASES},
  year   = {2016},
  date   = {2016-08-11},
  url    = {https://iot-analytics.com/global-overview-640-enterprise-iot-use-cases/},
}

Here are my headers for the document:
\RequirePackage[utf8]{inputenc}

\graphicspath{{images/}}
\logofile{logo}
\bibliography{references}

in my project folder there is an "references.bib" and a "references.bib.bak" file (containing all the sources)
Now when creating my pdf-file i get all [0] instead of the correct number. My texnic center gives me this output:

pdflatex> LaTeX Warning: Citation 'Repschlaeger2014' on page1 undefined on input line 75
  pdflatex> There were undefined references.
  pdflatex> Package biblatex Warning: Please (re)run Biber on the file

I get the same warning for a number of citations. Please tell me if you require any more information.


text:
Q: how do I find proportion of the total respondents were aged less than 45 in pandas? how do I find the proportion of the total respondents who were aged less than 45 in pandas?
I have tried this code till now
survey['age_45']=(survey['age'] < 45)
survey['result']=(survey['age_45']  / survey ['age'].count())*100
survey['result']

A: the len() function will allow you to count the elements in a dataframe. in the code below, proportion = 0.4
import pandas as pd
df = pd.DataFrame({"Person":
                   ["John", "Myla", "Lewis", "John", "Myla"],
                   "Age": [55, 60, 45, 40, 28] })

proportion = len(df[df['Age']<45]) / len(df)


text:
Q: updateable table from function I have a plpgsql function that returns a table. One of its columns is dynamically generated based on the parameters passed to the function. Is there a possibility to have the user have the ability to update the non-dynamically generated columns of that returned table, like with an instead of update trigger with a view?
Here's a simplified version:
In reality, the function is a lot more complex, and the value of the calculated column for the currently processing row is dependent on the previous rows, which is why I have to use a plpgsql function.
create table test(id integer, startdate date);

CREATE FUNCTION test2 (IN compare_date date)
    RETURNS TABLE(id integer, startdate date, is_before boolean)
    LANGUAGE plpgsql
DECLARE
    rec record;
BEGIN
    FOR rec IN SELECT id, startdate FROM test LOOP
        IF rec.startdate < compare_date THEN
            test2.is_before := true;
        ELSE
            test2.is_before := false;
        END
        test2.id := rec.id;
        test2.startdate := rec.startdate;
        return next;
    END LOOP;
END;

The user just accesses the function, I want him to be able to update the columns in the original table. With a view, this could be done using a trigger, but I can't have dynamically generated columns in a view, can I?

A: Your function doesn't return a "table" in the usual sense. As noted in the docs, RETURNS TABLE (...) is just a syntactic shortcut for RETURNS SETOF record, plus a bunch of OUT params.
The output of the function is just a collection of values in memory, with no connection to the source of the data, so while callers can transform those values as they please, there is no way to propagate anything back to the original table via the function output.
If you want a different presentation of the underlying data which the user is still able to apply updates to, the only way is with an updatable view. Including generated columns should be no problem, as long as your trigger is written to handle these appropriately. The main obstacle in your case is that, unlike a function, you cannot (directly) pass parameters to a view.
The only workaround that I know of is to define your view in terms of a custom configuration variable, and require that users set this variable before querying the view, e.g.:
CREATE VIEW test2 AS
  SELECT *
  FROM test2(current_setting('my_vars.compare_date')::date);

SET my_vars.compare_date TO '2000-01-01';
SELECT * FROM test2;

Your UPDATE trigger may also query this variable if needed.


text:
Q: How do I make a spark DataGrid grow horizontally to fully render all the columns? I've set a DataGrid to display all the rows in the data provider by binding it to the height of the control.
Now that all rows are rendered, I want the DataGrid to grow horizontally so that every column renders the whole text (of Labels).
Is there a way of doing this without resorting to a typical object?
thanks,
Dan

A: Have a look at the asdoc for the DataGrid component :
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/controls/DataGrid.html
When you create a DataGrid, you also set its size.What you can do, however, is cycle through all the labels for a certain column, get the max value, and re-set the column minColumnWidth :
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/controls/DataGrid.html#minColumnWidth
Then, you would resize the DataGrid accordingly, and call invalidate() to redraw the component.


text:
Q: Separate regressions approach vs. interaction term approach I am writing my thesis in finance, and my thesis advisor want me to do a categorical analysis, where I include control variables. He tells me I cannot simply include interaction terms (i.e. category x interest variable) in my model, unless I can ascertain the reader that the categories do not differ on any of the control variables. (Otherwise, these variables need to be interacted with the category as well). As an alternative, he advises me to run separate regressions and compare the coefficients in some kind of test. This should correct the above issue, since any possible interaction between the category and the control variable will then be captured. My question is: How to do this? I know of a z-test

which, among other statistical teaching books, is described in Cohen & Cohen (1983) and Keith (2014). But does anyone know how reliable this test is, and what are its assumptions? No one on the Internet seems to know much about this test, and articles/books writing about the test do not discuss it in much detail, so I simply wonder if anyone can recommend this test. Furthermore, can anyone tell me of the drawbacks - as well as the advantages - of both approaches (running separate regressions versus including interaction terms) apart from those described above? To your info, the separate regressions include the same dependent variable as well as control variables. Thanks in advance!!


text:
Q: Facebook login problem in iphone? In app I used fbconnect library in case of my app the fb browser shows lot of thing but i actually want the browser which shows only two textfield & one button for submit what i do for that still i'm using only fbconnect not fbconnect with json.

A: It is really hard to understand your question, to be honest. I will try my best to make the most appropriate guess
If you use FBConnect library, you have to use their login dialog, this is the common expected User Experience. Whenever users touch the button "F connect", they expect to see the FB connect dialog includes a lot of information and username and password textfield


text:
Q: What is faster LAG(column) or saving in a variable the last value of a cursor? Basically what the question says. I have this sql
select
LAG(ID_ESTADO) over(order by ID_EXPEDIENTE,orden) ULTIMO_IDESTADO,
LAG(ID_EXPEDIENTE) over(order by ID_EXPEDIENTE,orden) ULTIMO_EXPEDIENTE,
LAG(TABLA) over(partition by ID_EXPEDIENTE order by orden) ULTIMA_TABLA,
LAG(TIPO_ESTADO) over(partition by ID_EXPEDIENTE order by orden) ULTIMO_ESTADO,
LAG(FECHA_ESTADO) over(partition by ID_EXPEDIENTE order by orden) ULTIMA_FECHA,
LAG(ID_EXPEDIENTE,2) over(order by ID_EXPEDIENTE,orden) INMANT_EXPEDIENTE,
LAG(TABLA,2) over(partition by ID_EXPEDIENTE order by orden) INMANT_TABLA,
LAG(TIPO_ESTADO,2) over(partition by ID_EXPEDIENTE order by orden) INMANT_ESTADO,
ID_ESTADO,
ID_EXPEDIENTE,
TABLA,
TIPO_ESTADO,
orden,
anio,
fecha_estado,
NUMERO_EXPEDIENTE,
ANIO_EXPEDIENTE,
NATURALEZA_EXPEDIENTE,
ID_OFICINA,
DESCRIPCION,
ID_TIPO_INSTANCIA,
ID_OBJETO_JUICIO,
DESC_OBJETO_JUICIO,
FECHA_INICIO,
ID_EXPEDIENTE_ORIGEN,
CARATULA_EXPEDIENTE
from EST_ESTADOS_CIVIL e where TABLA like 'R%' and ANIO between 2012 and
2016

I wanted to know what is faster if to compare values in a cursor like this with lets say TIPO_ESTADO = ULTIMO_ESTADO
or to use the query alone and get the LAG values from variables and comparing them.
Bear in mind that changing this changes my query from 280.000 or so rows to 3 million rows.
I can keep the 280.000 rows but i need at least to include one or two LAG columns

A: As with all questions about performance, you can test the code to see which is better.
As for my opinion, I would not even consider using a cursor for performance.  Set-based operations in the data should be better.
Note:  If you do use a cursor, you will need an order by, which will probably pretty much kill any expected performance gains that you might think that you would get.


text:
Q: Could not configure a C compiler (Windows) On a Windows system, currently I'm trying a waf configure on a directory of code, and it spits out the error "could not configure a C compiler."
Now, I'm 100% certain that I have gcc and g++ installed and in my path because when I type gcc --version, it gives me the current version information. (I'm using mingw and the gcc/g++ are in the /bin subdirectory).
In the author's code directory there is a wscript file which looks like
C_COMPILER = 'gcc-4.7'
CPLUSPLUS_COMPILER = 'g++-4.7'
Now, I have tried changing the strings to simply gcc as well as gcc-4.8.1 (since my current version is 4.8.1), but it still says could not configure compiler.
I tried reading one solution on this same site that looks related, but the solution was on ubuntu and trying to work through those commands didn't help
could not configure a c compiler
I'm at the end of my common sense here after making sure I have gcc and g++ installed, trying different strings in the wscript file trying to get it to recognize I have them installed, and could use some help, thanks.
Edit: I've now tried simply deleting the lines in the wscript file where it changes the compiler name, and suddenly waf configure goes through, but the waf build fails saying things like it can't find really basic things like include vector. The output says it's defaulting to msvs (microsoft visual studio) whereas the author says gcc/g++ is needed; maybe this is the issue but how do I get waf configure/build to use g++/gcc as default?


text:
Q: Cookie contains multiple values? I'm having a problem where I'm adding a persistent cookie using Response.Cookies.Add(cookie) but this seems to be adding the value if the user already has a cookie with that name.  I think end up with multiple values in the cookie, which is not what I want.  Should I be using .Set instead?
Note that the cookie may contain a value from a previous visit and I wish to overwrite it with a new value, not keep multiple values.

A: Cookies are an associative array, meaning they are a collection of key-value pairs, and like a form, if a given key has more than one value its value will be an array.
Keys are segregated by domain, so google.com can have a cookie with the same name as yours and that shouldn't cause any collisions. How is it that someone has the same cookie name you're trying to set? have they been to your site before?
Perhaps you should try to GET the cookie and then SET updates to it as you suggested.

A: I discovered the reason for this is that if you have a cookie x and .mydomain.com and try to set another cookie x at .subdomain.mydomain.com you end up with both values when you read the cookie x from .subdomain.mydomain.com.  The choice of Add vs Set isn't relevent to my problem then, it was just me misunderstanding how cookies and subdomains interact.


text:
Q: Stripe: how to get user email (and/or other info) and after payment redirect to a confirmation page? I would like to sell a software using Stripe as payment gateway.
After a succesfully payment i want to redirect to a php page that get user email, and generate a serial number given that email.
I don't know how to:

*

*Redirect to a succesfully page

*Get the user email previously inserted by user

I have this listener from standard documentation:
// Close Checkout on page navigation:
window.addEventListener('popstate', function() {
  handler.close();
});

Is the one I've to use ?
Thanks

A: You can redirect by
// Close Checkout on page navigation:
window.addEventListener('popstate', function() {
  handler.close();
  window.location.replace("http://stackoverflow.com");
});

You can retrieve the email entered in the stripeEmail field when you POST the result of Checkout to your server, like this
  $token  = $_POST['stripeToken'];
  $email  = $_POST['stripeEmail'];

  $customer = \Stripe\Customer::create(array(
    'email' => $email,
    'source'  => $token
   ));

  $charge = \Stripe\Charge::create(array(
    'customer' => $customer->id,
    'amount'   => 5000,
    'currency' => 'usd'
  ));

Here is the PHP + Checkout page in the Stripe docs, which goes over this:
https://stripe.com/docs/checkout/php


text:
Q: How to get file location from content uri android My app opens documents like pdf, djvu, odt. From content uri given by other apps like file manager it can read the file using getInputStream(). But this app has a recents/history section. Currently this is implemented woth copying the document somewhere and opening it if someone opens a recent document. This comes with the cost of storage usage and more file io. If the file location can be determined in accessible storage like internal sd card then nome of these required as the app has fike permission anyway.
So can somehow the location be inferred?

A:
If the file location can be determined in accessible storage like internal sd card

There is no file. A content:// Uri might point to:

*

*A local file on external storage that is in some common place that your app can access on Android 11+

*A local file on external storage, but in an app-specific location, that your app cannot access on Android 11+

*A local file on internal storage for the other app (e.g., via FileProvider)

*A local file on removable storage

*A local file that is encrypted and needs to be decrypted on the fly

*A stream of bytes held in a BLOB column in a database

*A piece of content that needs to be downloaded by the other app first

*...and so on

So can somehow the location be inferred?

No. And, even if it could, you may not have rights to access the file.
You could limit your sources of external content to Storage Access Framework actions (ACTION_OPEN_DOCUMENT, ACTION_OPEN_DOCUMENT_TREE, and ACTION_CREATE_DOCUMENT). For those, you can use takePersistableUriPermission() on a ContentResolver to get durable access to the content. You can then persist the Uri value (not the content) and retain rights to access that content later, without making a copy of that content.


text:
Q: Deterministic coupling of probability measures with a constrained support condition given a random coupling. The following question has come up while working on my senior thesis: Assume $\mu$ and $\nu$ are regular probability measures on $\mathbf{R}^n$. We are also given a coupling $\gamma$ of $\mu$ and $\nu$ such that if $(x,y)\in Supp(\gamma)$ then $|x-y| \leq 1$. So basically given random variable $X$ based on $\mu$ and another one $Y$ based on $\nu$ we know $|X-Y|\leq 1$ with probability $1$.
Now additionally assume $\mu$ is absolutely continuous with respect to Lebesgue measure. Show that there is a deterministic coupling of $\mu$ and $\nu$, i.e. a Borel mapping $s:\mathbf{R}^n \rightarrow \mathbf{R}^n$ such that $s$ pushes $\mu$ forward to $\nu$.
Note that this is true in dimension $1$ by taking monotone measure preserving map.


text:
Q: Set a dataframe as column names for another data frame So I have a data frame (called SNPlist) which is of dimensions 1 by 500000 (rows by columns). I want SNP list to be the column names for my dataframe of data (called Data) which is of dimension 100 by 500000. I already tried colnames(Data) <- SNPlist but it does not seem to be working. Can anyone help with this issue?
Thanks

A: If SNPlist is a data.frame, then you need to point to the first row of it:
colnames(Data) <- SNPlist[1, ]

If it was a vector, what you'd tried would have worked

A: It's been a while since the question was asked, but I noticed nobody suggested what works for me:
colnames(Data) <- colnames(SNPlist)
Amos

A: I was having a lot of trouble with this because the usual method (provided above by alexwhan) wasn't getting it done. I eventually got around it by first ripping out a headers vector from the old data frame and using the names function to slap it on the new one.
names(new_DF) <- as.character(apply(old_DF["wanted_header_row", ], 1, paste))

Perhaps it's a bit much, but it was the only thing that worked for me.


text:
Q: Не могу авторизоваться на сайте и парсить, так-как сайт в запросе автоматически меняет пароль на набор букв с числами На сайте https://m.stepn.com/ при регистрации нужно ввести код, приходящий на почту, состоящий из цифр. При вводе кода он в запросе, преобразуется в набор букв с числами, как сайт это делает я не понял. Для примера скриншот:

прошу помочь советом, уже 3-й день не могу толком понять. В ссылке запроса, на вход в аккаунт нужен именно преобразованный пароль, что написан в строке password.